Commit 59f470d82a6a6bff3bad915ed1816a5ea83e490f

Authored by Min
1 parent 2b8dc8a6

1.处理上查,下查

2.完善翻译
src/components/Common/CommonBillEvent.js
... ... @@ -2829,7 +2829,8 @@ export default (ChildComponent) => {
2829 2829 /* 上一条、下一条、首条、末条 */
2830 2830 handleSearchData = async (handleType) => {
2831 2831 const {
2832   - sModelsId, app, currentIndexFlag, currentPageNo, masterData, masterConfig, slaveConfig, checkConfig
  2832 + sModelsId, app, currentIndexFlag, currentPageNo, masterData, masterConfig, slaveConfig, checkConfig,
  2833 + sSrcModelsId,
2833 2834 } = this.props;
2834 2835 let { sBillIdsArray = []} = this.props;
2835 2836 let { currentId } = this.props;
... ... @@ -2888,7 +2889,7 @@ export default (ChildComponent) => {
2888 2889 if(!bExist) {
2889 2890 const value = {
2890 2891 sClientType: '1', sFilterOrderBy, bFilter, sListFormmasterId, currentPosition, handleType, iCountSum: pages.total,
2891   - sUpId: masterData?.sId,
  2892 + sUpId: masterData?.sId, sParentModelId :sSrcModelsId,
2892 2893 };
2893 2894 const url = `${commonConfig.server_host}business/getBusinessDataByIndex?sModelsId=${sModelsId}`;
2894 2895 /* 接收返回值 */
... ...
src/components/Common/CommonComponent/index.js
... ... @@ -2758,15 +2758,17 @@ export default class CommonComponent extends Component {
2758 2758 */
2759 2759 floatNumberCheck = (num) => {
2760 2760 const dNetPrice = this.props.app?.decimals?.dNetPrice;
  2761 + const Maximum = commonFunc.showLocalMessage(this.props, 'Maximum', '最多输入${digit}位小数');
2761 2762 const { showConfig } = this.props;
2762 2763 const { sName, showName } = showConfig;
2763 2764 const digit = sName.includes('Price') && dNetPrice ? dNetPrice : 6;
  2765 + const Maximun = Maximum.replace('${digit}', digit);
2764 2766 if (typeof num === 'string') {
2765 2767 num = num.replace('*', '');
2766 2768 }
2767 2769 const checkRule = new RegExp(`^(-?\\d+)(\\.?)(\\d{1,${digit}})?$`);
2768 2770 if (!checkRule.test(num) && num && num !== '-' && num !== '.') {
2769   - message.warning(`【${showName}】【${sName}】最多输入${digit}位小数!`);
  2771 + message.warning(`【${showName}】【${sName}】${Maximun}`);
2770 2772 return undefined;
2771 2773 } else {
2772 2774 return num;
... ...
src/components/Common/CommonCostomTabBill.js
... ... @@ -2371,6 +2371,8 @@ class CommonNewBill extends Component {
2371 2371 slave6Child1Config,
2372 2372 slave6Child1InfoConfig,
2373 2373 } = this.props;
  2374 + const confirmSetting = commonFunc.showLocalMessage(this.props, 'confirmSetting', '请配置按钮的存储过程');
  2375 + const confirmSettingParam = commonFunc.showLocalMessage(this.props, 'confirmSettingParam', '请先操作参数运算');
2374 2376 const iIndex =
2375 2377 commonUtils.isNotEmptyObject(tableSelectedRowKeys) &&
2376 2378 commonUtils.isNotEmptyArr(tableData)
... ... @@ -2388,7 +2390,7 @@ class CommonNewBill extends Component {
2388 2390 showConfig.sControlName.includes("BtnCustom.dSplitworkQty")
2389 2391 ) {
2390 2392 if (masterData.bFirstCalc !== 1) {
2391   - message.error("请先操作参数运算!");
  2393 + message.error(confirmSettingParam);
2392 2394 return;
2393 2395 }
2394 2396 this.props.onSaveState({ pageLoading: true });
... ... @@ -2435,7 +2437,7 @@ class CommonNewBill extends Component {
2435 2437 });
2436 2438 }
2437 2439 } else {
2438   - message.error("请正确配置存储过程名称!");
  2440 + message.error(confirmSetting);
2439 2441 }
2440 2442 } else if (
2441 2443 commonUtils.isNotEmptyObject(showConfig) &&
... ... @@ -2523,7 +2525,7 @@ class CommonNewBill extends Component {
2523 2525 });
2524 2526 }
2525 2527 } else {
2526   - message.error("请正确配置存储过程名称!");
  2528 + message.error(confirmSetting);
2527 2529 }
2528 2530 }
2529 2531 };
... ...
src/components/Common/CommonListSelectFlex/index.js
... ... @@ -501,8 +501,8 @@ const CommonListComponent = Form.create({
501 501 const sProcessParams = commonFunc.showMessage(app.commonConst, 'sProcessParams');/* 选择工艺参数标题 */
502 502 const displayLeft = (sModelsType !== 'search/sisColor' && sModelsType !== 'search/commonPopup');
503 503  
504   - const BtnSure = commonFunc.showLocalMessage(this.props, 'BtnSure', '确定');
505   - const BtnCancel = commonFunc.showLocalMessage(this.props, 'BtnCancel', '取消');
  504 + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确定');
  505 + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消');
506 506 return (
507 507 <div className="modalChooseProcessContent">
508 508 <Form >
... ...
src/components/Common/CommonListSelectMulti/index.js
1   -import React, { Component } from 'react';
2   -import { DownOutlined } from '@ant-design/icons';
3   -import { Form } from '@ant-design/compatible';
  1 +import React, { Component } from "react";
  2 +import { DownOutlined } from "@ant-design/icons";
  3 +import { Form } from "@ant-design/compatible";
4 4 // import '@ant-design/compatible/assets/index.css';
5   -import { Layout, Spin, Button, Row, Col, message } from 'antd-v4';
6   -import CommonListEvent from '@/components/Common/CommonListEvent';/* 继承销售模块业务功能 */
  5 +import { Layout, Spin, Button, Row, Col, message } from "antd-v4";
  6 +import CommonListEvent from "@/components/Common/CommonListEvent"; /* 继承销售模块业务功能 */
7 7 // import * as commonUtils from '../../utils/utils'; /* 通用方法 */
8   -import * as commonFunc from '@/components/Common//commonFunc';/* 通用单据方法 */ /* 通用单据方法 */
  8 +import * as commonFunc from "@/components/Common//commonFunc"; /* 通用单据方法 */ /* 通用单据方法 */
9 9 // eslint-disable-next-line import/no-named-as-default
10   -import StaticEditTable from '@/components/Common//CommonTable';/* 可编辑表格 */
11   -import StaticEditTree from '@/components/Common/Tree/StaticTree';
12   -import CommonBase from '@/components/Common/CommonBase';/* 获取配置及数据 */
13   -import * as commonBusiness from '@/components/Common//commonBusiness';/* 单据业务功能 */
14   -import SearchComponent from '@/components/Common/SearchComponent';
15   -import AntdDraggableModal from '@/components/Common/AntdDraggableModal';
16   -import * as commonUtils from '@/utils/utils';
17   -import ShowType from '@/components/Common/CommonComponent';
18   -import commonConfig from '@/utils/config';
  10 +import StaticEditTable from "@/components/Common//CommonTable"; /* 可编辑表格 */
  11 +import StaticEditTree from "@/components/Common/Tree/StaticTree";
  12 +import CommonBase from "@/components/Common/CommonBase"; /* 获取配置及数据 */
  13 +import * as commonBusiness from "@/components/Common//commonBusiness"; /* 单据业务功能 */
  14 +import SearchComponent from "@/components/Common/SearchComponent";
  15 +import AntdDraggableModal from "@/components/Common/AntdDraggableModal";
  16 +import * as commonUtils from "@/utils/utils";
  17 +import ShowType from "@/components/Common/CommonComponent";
  18 +import commonConfig from "@/utils/config";
19 19 // eslint-disable-next-line no-unused-vars
20   -import stylesIndex from '@/components/Common/CommonListSelectMulti/index.less';
  20 +import stylesIndex from "@/components/Common/CommonListSelectMulti/index.less";
21 21 // import DelIcon from '../../assets/delete.svg';
22 22 // import DisableDelIcon from '../../assets/disabledelete.svg';
23 23  
... ... @@ -34,20 +34,18 @@ class CommonList extends Component {
34 34 };
35 35 }
36 36 componentWillReceiveProps(nextProps) {
37   - const {
38   - slaveData, selectedRowKeys, sModelsType, slaveFilterData, slaveSelectedData, masterConfig,
39   - gdsjurisdiction,
40   - } = nextProps;
41   - if (slaveFilterData === undefined && sModelsType === 'search/sisColor') {
  37 + const { slaveData, selectedRowKeys, sModelsType, slaveFilterData, slaveSelectedData, masterConfig, gdsjurisdiction } = nextProps;
  38 + if (slaveFilterData === undefined && sModelsType === "search/sisColor") {
42 39 if (commonUtils.isNotEmptyArr(slaveData) && commonUtils.isNotEmptyArr(selectedRowKeys)) {
43 40 const slaveFilterData = slaveData.filter(item => selectedRowKeys.includes(item.sSlaveId));
44 41 if (commonUtils.isNotEmptyArr(slaveFilterData)) {
45 42 this.props.onSaveState({
46   - slaveFilterData, slaveSelectedRowKeys: selectedRowKeys,
  43 + slaveFilterData,
  44 + slaveSelectedRowKeys: selectedRowKeys,
47 45 });
48 46 }
49 47 }
50   - } else if (commonUtils.isEmptyArr(slaveFilterData) && sModelsType === 'search/commonPopup') {
  48 + } else if (commonUtils.isEmptyArr(slaveFilterData) && sModelsType === "search/commonPopup") {
51 49 if (commonUtils.isNotEmptyArr(slaveData) && commonUtils.isNotEmptyArr(slaveSelectedData)) {
52 50 this.props.onSaveState({
53 51 slaveFilterData: slaveSelectedData,
... ... @@ -57,13 +55,17 @@ class CommonList extends Component {
57 55 if (masterConfig) {
58 56 // 过滤存储需要展示的按钮
59 57 let btnList = masterConfig.gdsconfigformslave.filter(item => item.bVisible && !item.sName && item.showName && item.sControlName);
60   - btnList = btnList.filter(item => gdsjurisdiction.findIndex(child => item.sControlName === child.sAction) < 0 && (item.sControlName.includes('BtnAdd') || item.sControlName.includes('BtnCopyTo')));
  58 + btnList = btnList.filter(
  59 + item =>
  60 + gdsjurisdiction.findIndex(child => item.sControlName === child.sAction) < 0 &&
  61 + (item.sControlName.includes("BtnAdd") || item.sControlName.includes("BtnCopyTo"))
  62 + );
61 63 // 过滤权限
62 64 this.setState({ btnList });
63 65 }
64 66 if (this.state.openFlag) {
65 67 this.setState({ openFlag: false }, () => {
66   - this.props.onButtonClick('BtnRefresh');
  68 + this.props.onButtonClick("BtnRefresh");
67 69 });
68 70 }
69 71 }
... ... @@ -71,21 +73,21 @@ class CommonList extends Component {
71 73 onOpenNewTab = () => {
72 74 this.setState({ openFlag: true });
73 75 this.props.onOpenNewTab();
74   - }
  76 + };
75 77  
76 78 /** 确认下单 */
77 79 handleSelect = () => {
78   - const {
79   - slaveFilterData, app, processData, controlSelectedRowKeys,
80   - } = this.props;
  80 + const { slaveFilterData, app, processData, controlSelectedRowKeys } = this.props;
81 81 let startIndex = 0; /* 最开始下标 */
82 82 const iOrderArr = [];
83 83 /* 当前控制表选中行下的工序 接着编号 */
84   - const filterData = commonUtils.isNotEmptyArr(processData) && commonUtils.isNotEmptyArr(controlSelectedRowKeys) ?
85   - processData.filter(item => controlSelectedRowKeys.includes(item.sControlId)) : [];
  84 + const filterData =
  85 + commonUtils.isNotEmptyArr(processData) && commonUtils.isNotEmptyArr(controlSelectedRowKeys)
  86 + ? processData.filter(item => controlSelectedRowKeys.includes(item.sControlId))
  87 + : [];
86 88 if (commonUtils.isNotEmptyArr(filterData)) {
87 89 /* 找到最大序号值 接着拍 */
88   - filterData.forEach((item) => {
  90 + filterData.forEach(item => {
89 91 const iOrder = commonUtils.isNotEmptyNumber(item.iOrder) ? item.iOrder : 0; /* 获取tableData中iOrder最大值 */
90 92 iOrderArr.push(iOrder);
91 93 });
... ... @@ -108,10 +110,11 @@ class CommonList extends Component {
108 110 };
109 111 handleDoubleClickSelect = () => {
110 112 const { slaveConfig } = this.props;
111   - if (commonUtils.isNotEmptyObject(slaveConfig) && !slaveConfig.bMutiSelect) { // 单选时双击选中数据
  113 + if (commonUtils.isNotEmptyObject(slaveConfig) && !slaveConfig.bMutiSelect) {
  114 + // 单选时双击选中数据
112 115 this.handleSelect();
113 116 }
114   - }
  117 + };
115 118 /** 关闭 */
116 119 handleCancelModal = () => {
117 120 const { app } = this.props;
... ... @@ -125,17 +128,17 @@ class CommonList extends Component {
125 128 handleTreeSelect = (name, checkedKeys, e) => {
126 129 this.props.onSelect(name, checkedKeys, e); /* 调用CommonListEvent通用处理 */
127 130 };
128   - handleTableSelectRowChange = (name, selectedRowKeys, changeValue, chooseProcessParams) => { /* 表格行选择 */
  131 + handleTableSelectRowChange = (name, selectedRowKeys, changeValue, chooseProcessParams) => {
  132 + /* 表格行选择 */
129 133 this.props.onTableSelectRowChange(name, selectedRowKeys);
130   - if (name === 'slave') { /* 选择工序 从表表 */
131   - const {
132   - [`${name}Data`]: tableData, slaveConfig, fatherModelsType, sModelsType,
133   - } = this.props;
  134 + if (name === "slave") {
  135 + /* 选择工序 从表表 */
  136 + const { [`${name}Data`]: tableData, slaveConfig, fatherModelsType, sModelsType } = this.props;
134 137 const { selectedRowKeysLength } = this.props;
135 138 const { slaveFilterData } = this.props;
136 139 const oldSlaveFilterData = slaveFilterData === undefined ? [] : JSON.parse(JSON.stringify(slaveFilterData));
137 140 const newSlaveFilterData = [];
138   - selectedRowKeys.forEach((key) => {
  141 + selectedRowKeys.forEach(key => {
139 142 const filterDataIndex = oldSlaveFilterData.findIndex(item => item.sSlaveId === key);
140 143 if (filterDataIndex < 0) {
141 144 const tableDataIndex = tableData.findIndex(item => item.sSlaveId === key);
... ... @@ -144,8 +147,9 @@ class CommonList extends Component {
144 147 newSlaveFilterData.push({ ...oldSlaveFilterData[filterDataIndex] });
145 148 }
146 149 });
147   - let sDeliverRemark = '';
148   - if (sModelsType === 'search/commonPopup') { /* 选择成品库存 改变时候 增加数量信息提示 */
  150 + let sDeliverRemark = "";
  151 + if (sModelsType === "search/commonPopup") {
  152 + /* 选择成品库存 改变时候 增加数量信息提示 */
149 153 let dChooseProductQty = 0;
150 154 let dSrcQty = 0;
151 155 let dMinsQty = 0; /* 欠数 */
... ... @@ -160,19 +164,22 @@ class CommonList extends Component {
160 164 }
161 165  
162 166 this.props.onSaveState({
163   - slaveFilterData: newSlaveFilterData, sDeliverRemark,
  167 + slaveFilterData: newSlaveFilterData,
  168 + sDeliverRemark,
164 169 });
165 170 if (chooseProcessParams) {
166 171 let modalVisible = false;
167 172 let slaveSelectOneData = {};
168 173 let slaveSelectOneDataIndex = -1;
169 174 if (commonUtils.isNotEmptyArr(tableData)) {
170   - if (selectedRowKeys instanceof Array) { // 多选情况下
171   - if (commonUtils.isEmpty(selectedRowKeysLength) || (selectedRowKeys.length - selectedRowKeysLength) > 0) {
  175 + if (selectedRowKeys instanceof Array) {
  176 + // 多选情况下
  177 + if (commonUtils.isEmpty(selectedRowKeysLength) || selectedRowKeys.length - selectedRowKeysLength > 0) {
172 178 modalVisible = true;
173 179 }
174 180 slaveSelectOneDataIndex = tableData.findIndex(item => item.sId === selectedRowKeys[selectedRowKeys.length - 1]); // 多选选择最后一个
175   - } else { // 单选情况下
  181 + } else {
  182 + // 单选情况下
176 183 slaveSelectOneDataIndex = tableData.findIndex(item => item.sId === selectedRowKeys);
177 184 }
178 185 if (slaveSelectOneDataIndex > -1) {
... ... @@ -181,14 +188,14 @@ class CommonList extends Component {
181 188 }
182 189 // let masterData = {};
183 190 const sProcessParamsSelects = [];
184   - let paramType = '';
  191 + let paramType = "";
185 192 if (commonUtils.isNotEmptyObject(slaveSelectOneData) && commonUtils.isNotEmptyObject(fatherModelsType)) {
186   - if (fatherModelsType.includes('manufacture/')) {
  193 + if (fatherModelsType.includes("manufacture/")) {
187 194 paramType = slaveSelectOneData.sWorkOrderParam;
188 195 if (commonUtils.isNotEmptyObject(slaveSelectOneData.sWorkOrderParam)) {
189 196 slaveSelectOneData = { ...slaveSelectOneData, ...commonUtils.convertStrToObj(slaveSelectOneData.sWorkOrderParam) };
190 197 }
191   - } else if (fatherModelsType.includes('quotation/')) {
  198 + } else if (fatherModelsType.includes("quotation/")) {
192 199 paramType = slaveSelectOneData.sProcessParam;
193 200 if (commonUtils.isNotEmptyObject(slaveSelectOneData.sProcessParam)) {
194 201 slaveSelectOneData = { ...slaveSelectOneData, ...commonUtils.convertStrToObj(slaveSelectOneData.sProcessParam) };
... ... @@ -200,36 +207,42 @@ class CommonList extends Component {
200 207 bisMutiSelect: false,
201 208 bMutiSelect: false,
202 209 };
203   - const gdsconfigformslave = [{
204   - sId: commonUtils.createSid(),
205   - sName: 'sId',
206   - showName: '主键',
207   - bVisible: false,
208   - iFitWidth: 45,
209   - }, {
210   - sId: commonUtils.createSid(),
211   - sName: 'bSelfCbx',
212   - showName: '选择',
213   - bVisible: true,
214   - iFitWidth: 37,
215   - }, {
216   - sId: commonUtils.createSid(),
217   - sName: 'sParamKey',
218   - showName: '参数主键',
219   - bVisible: false,
220   - iFitWidth: 200,
221   - }, {
222   - sId: commonUtils.createSid(),
223   - sName: 'sParamName',
224   - showName: '参数名',
225   - bVisible: true,
226   - iFitWidth: 230,
227   - }, {
228   - sId: commonUtils.createSid(),
229   - sName: 'sParamValue',
230   - showName: '参数值',
231   - bVisible: true,
232   - }];
  210 + const gdsconfigformslave = [
  211 + {
  212 + sId: commonUtils.createSid(),
  213 + sName: "sId",
  214 + showName: "主键",
  215 + bVisible: false,
  216 + iFitWidth: 45,
  217 + },
  218 + {
  219 + sId: commonUtils.createSid(),
  220 + sName: "bSelfCbx",
  221 + showName: "选择",
  222 + bVisible: true,
  223 + iFitWidth: 37,
  224 + },
  225 + {
  226 + sId: commonUtils.createSid(),
  227 + sName: "sParamKey",
  228 + showName: "参数主键",
  229 + bVisible: false,
  230 + iFitWidth: 200,
  231 + },
  232 + {
  233 + sId: commonUtils.createSid(),
  234 + sName: "sParamName",
  235 + showName: "参数名",
  236 + bVisible: true,
  237 + iFitWidth: 230,
  238 + },
  239 + {
  240 + sId: commonUtils.createSid(),
  241 + sName: "sParamValue",
  242 + showName: "参数值",
  243 + bVisible: true,
  244 + },
  245 + ];
233 246 sParamConfig.gdsconfigformslave = gdsconfigformslave;
234 247 const sParamColumn = commonFunc.getHeaderConfig(sParamConfig);
235 248 /* 要把数据以表格的形式显示出来 */
... ... @@ -237,13 +250,13 @@ class CommonList extends Component {
237 250 const sParamData = [];
238 251 if (commonUtils.isNotEmptyArr(sParamJsonObj)) {
239 252 for (const key of Object.keys(sParamJsonObj)) {
240   - if (key.includes('sParam') && !key.includes('DropDown') && !key.includes('Default')) {
  253 + if (key.includes("sParam") && !key.includes("DropDown") && !key.includes("Default")) {
241 254 const obj = {};
242 255 obj.sId = commonUtils.createSid();
243 256 obj.sParamKey = key;
244 257 obj.sParamName = sParamJsonObj[key];
245 258 /* 找到数字 找到下拉数据源 */
246   - const num = key.replace(/[^\d]/g, '').trim();
  259 + const num = key.replace(/[^\d]/g, "").trim();
247 260 if (Number(num)) {
248 261 const number = Number(num);
249 262 const sParamDropDownKey = `sParamDropDown${number}`;
... ... @@ -262,10 +275,10 @@ class CommonList extends Component {
262 275 const iIndex = slaveConfig.gdsconfigformslave.findIndex(item => item.sName === `sParamValue${i.toString()}`);
263 276 if (iIndex > -1 && !commonUtils.isEmpty(slaveSelectOneData[`sParam${i.toString()}`])) {
264 277 slaveConfig.gdsconfigformslave[iIndex].showName = slaveSelectOneData[`sParam${i.toString()}`];
265   - slaveConfig.gdsconfigformslave[iIndex].bVisible = !slaveSelectOneData[`sParam${i.toString()}`].includes('参数值');
  278 + slaveConfig.gdsconfigformslave[iIndex].bVisible = !slaveSelectOneData[`sParam${i.toString()}`].includes("参数值");
266 279 /* 判断是否是sql下拉 */
267 280 if (!commonUtils.isEmpty(slaveSelectOneData[`sParamDropDown${i.toString()}`])) {
268   - slaveConfig.gdsconfigformslave[iIndex].sDropDownType = 'sql';
  281 + slaveConfig.gdsconfigformslave[iIndex].sDropDownType = "sql";
269 282 }
270 283 // masterData = { ...masterNewData, ...commonUtils.convertStrToObj(slaveFilterData[0].sProcessParam) };
271 284 sProcessParamsSelects.push(slaveConfig.gdsconfigformslave[iIndex]);
... ... @@ -295,7 +308,7 @@ class CommonList extends Component {
295 308 sParamData,
296 309 });
297 310 }
298   - } else if (name === 'sParam' && commonUtils.isNotEmptyArr(selectedRowKeys)) {
  311 + } else if (name === "sParam" && commonUtils.isNotEmptyArr(selectedRowKeys)) {
299 312 /* 点击工艺参数列表 根据点击行动态加载配置 */
300 313 const { sParamData, sParamConfig } = this.props;
301 314 /* 找到最后一个选中 */
... ... @@ -304,13 +317,13 @@ class CommonList extends Component {
304 317 /* 选中数据时 塞入选中行的配置 */
305 318 if (iIndex > -1) {
306 319 const sParamObj = sParamData[iIndex];
307   - const index = sParamConfig.gdsconfigformslave.findIndex(item => item.sName === 'sParamValue');
  320 + const index = sParamConfig.gdsconfigformslave.findIndex(item => item.sName === "sParamValue");
308 321 if (index > -1) {
309 322 if (commonUtils.isNotEmptyObject(sParamObj.sDropDownData)) {
310   - sParamConfig.gdsconfigformslave[index].sDropDownType = 'const';
  323 + sParamConfig.gdsconfigformslave[index].sDropDownType = "const";
311 324 sParamConfig.gdsconfigformslave[index].showDropDown = JSON.stringify(sParamObj.sDropDownData);
312 325 } else {
313   - sParamConfig.gdsconfigformslave[index].sDropDownType = '';
  326 + sParamConfig.gdsconfigformslave[index].sDropDownType = "";
314 327 sParamConfig.gdsconfigformslave[index].showDropDown = undefined;
315 328 }
316 329 }
... ... @@ -325,20 +338,20 @@ class CommonList extends Component {
325 338 });
326 339 }
327 340 }
328   - }
  341 + };
329 342  
330 343 /* 连续点击 复制选择 */
331   - handleContinueTableSelectRowChange= (name, selectedRowKeys, changeValue, chooseProcessParams) => { /* 表格行选择 */
  344 + handleContinueTableSelectRowChange = (name, selectedRowKeys, changeValue, chooseProcessParams) => {
  345 + /* 表格行选择 */
332 346 this.props.onTableSelectRowChange(name, selectedRowKeys);
333   - if (name === 'slave') { /* 选择工序 从表表 */
334   - const {
335   - [`${name}Data`]: tableData, slaveConfig, fatherModelsType, sModelsType,
336   - } = this.props;
  347 + if (name === "slave") {
  348 + /* 选择工序 从表表 */
  349 + const { [`${name}Data`]: tableData, slaveConfig, fatherModelsType, sModelsType } = this.props;
337 350 const { selectedRowKeysLength } = this.props;
338 351 const { slaveFilterData } = this.props;
339 352 const oldSlaveFilterData = slaveFilterData === undefined ? [] : JSON.parse(JSON.stringify(slaveFilterData));
340 353 let newSlaveFilterData = [];
341   - selectedRowKeys.forEach((key) => {
  354 + selectedRowKeys.forEach(key => {
342 355 const filterDataIndex = oldSlaveFilterData.findIndex(item => item.sSlaveId === key);
343 356 if (filterDataIndex < 0) {
344 357 newSlaveFilterData = JSON.parse(JSON.stringify(oldSlaveFilterData));
... ... @@ -347,7 +360,7 @@ class CommonList extends Component {
347 360 const newRow = JSON.parse(JSON.stringify(tableData[tableDataIndex]));
348 361 newRow.sId = commonUtils.createSid();
349 362 newRow.sSlaveId = newRow.sId;
350   - newRow.handleType = 'add';
  363 + newRow.handleType = "add";
351 364 newRow.key = newRow.sId;
352 365 newSlaveFilterData.push(newRow);
353 366 }
... ... @@ -357,13 +370,14 @@ class CommonList extends Component {
357 370 const newRow = JSON.parse(JSON.stringify(oldSlaveFilterData[filterDataIndex]));
358 371 newRow.sId = commonUtils.createSid();
359 372 newRow.sSlaveId = newRow.sId;
360   - newRow.handleType = 'add';
  373 + newRow.handleType = "add";
361 374 newRow.key = newRow.sId;
362 375 newSlaveFilterData.push(newRow);
363 376 }
364 377 });
365   - let sDeliverRemark = '';
366   - if (sModelsType === 'search/commonPopup') { /* 选择成品库存 改变时候 增加数量信息提示 */
  378 + let sDeliverRemark = "";
  379 + if (sModelsType === "search/commonPopup") {
  380 + /* 选择成品库存 改变时候 增加数量信息提示 */
367 381 let dChooseProductQty = 0;
368 382 let dSrcQty = 0;
369 383 let dMinsQty = 0; /* 欠数 */
... ... @@ -377,19 +391,22 @@ class CommonList extends Component {
377 391 sDeliverRemark = `源单数量:${dSrcQty} 已选数量:${dChooseProductQty} 欠数:${dMinsQty}`;
378 392 }
379 393 this.props.onSaveState({
380   - slaveFilterData: newSlaveFilterData, sDeliverRemark,
  394 + slaveFilterData: newSlaveFilterData,
  395 + sDeliverRemark,
381 396 });
382 397 if (chooseProcessParams) {
383 398 let modalVisible = false;
384 399 let slaveSelectOneData = {};
385 400 let slaveSelectOneDataIndex = -1;
386 401 if (commonUtils.isNotEmptyArr(tableData)) {
387   - if (selectedRowKeys instanceof Array) { // 多选情况下
388   - if (commonUtils.isEmpty(selectedRowKeysLength) || (selectedRowKeys.length - selectedRowKeysLength) > 0) {
  402 + if (selectedRowKeys instanceof Array) {
  403 + // 多选情况下
  404 + if (commonUtils.isEmpty(selectedRowKeysLength) || selectedRowKeys.length - selectedRowKeysLength > 0) {
389 405 modalVisible = true;
390 406 }
391 407 slaveSelectOneDataIndex = tableData.findIndex(item => item.sId === selectedRowKeys[selectedRowKeys.length - 1]); // 多选选择最后一个
392   - } else { // 单选情况下
  408 + } else {
  409 + // 单选情况下
393 410 slaveSelectOneDataIndex = tableData.findIndex(item => item.sId === selectedRowKeys);
394 411 }
395 412 if (slaveSelectOneDataIndex > -1) {
... ... @@ -398,14 +415,14 @@ class CommonList extends Component {
398 415 }
399 416 // let masterData = {};
400 417 const sProcessParamsSelects = [];
401   - let paramType = '';
  418 + let paramType = "";
402 419 if (commonUtils.isNotEmptyObject(slaveSelectOneData) && commonUtils.isNotEmptyObject(fatherModelsType)) {
403   - if (fatherModelsType.includes('manufacture/')) {
  420 + if (fatherModelsType.includes("manufacture/")) {
404 421 paramType = slaveSelectOneData.sWorkOrderParam;
405 422 if (commonUtils.isNotEmptyObject(slaveSelectOneData.sWorkOrderParam)) {
406 423 slaveSelectOneData = { ...slaveSelectOneData, ...commonUtils.convertStrToObj(slaveSelectOneData.sWorkOrderParam) };
407 424 }
408   - } else if (fatherModelsType.includes('quotation/')) {
  425 + } else if (fatherModelsType.includes("quotation/")) {
409 426 paramType = slaveSelectOneData.sProcessParam;
410 427 if (commonUtils.isNotEmptyObject(slaveSelectOneData.sProcessParam)) {
411 428 slaveSelectOneData = { ...slaveSelectOneData, ...commonUtils.convertStrToObj(slaveSelectOneData.sProcessParam) };
... ... @@ -417,36 +434,42 @@ class CommonList extends Component {
417 434 bisMutiSelect: false,
418 435 bMutiSelect: false,
419 436 };
420   - const gdsconfigformslave = [{
421   - sId: commonUtils.createSid(),
422   - sName: 'sId',
423   - showName: '主键',
424   - bVisible: false,
425   - iFitWidth: 45,
426   - }, {
427   - sId: commonUtils.createSid(),
428   - sName: 'bSelfCbx',
429   - showName: '选择',
430   - bVisible: true,
431   - iFitWidth: 37,
432   - }, {
433   - sId: commonUtils.createSid(),
434   - sName: 'sParamKey',
435   - showName: '参数主键',
436   - bVisible: false,
437   - iFitWidth: 200,
438   - }, {
439   - sId: commonUtils.createSid(),
440   - sName: 'sParamName',
441   - showName: '参数名',
442   - bVisible: true,
443   - iFitWidth: 230,
444   - }, {
445   - sId: commonUtils.createSid(),
446   - sName: 'sParamValue',
447   - showName: '参数值',
448   - bVisible: true,
449   - }];
  437 + const gdsconfigformslave = [
  438 + {
  439 + sId: commonUtils.createSid(),
  440 + sName: "sId",
  441 + showName: "主键",
  442 + bVisible: false,
  443 + iFitWidth: 45,
  444 + },
  445 + {
  446 + sId: commonUtils.createSid(),
  447 + sName: "bSelfCbx",
  448 + showName: "选择",
  449 + bVisible: true,
  450 + iFitWidth: 37,
  451 + },
  452 + {
  453 + sId: commonUtils.createSid(),
  454 + sName: "sParamKey",
  455 + showName: "参数主键",
  456 + bVisible: false,
  457 + iFitWidth: 200,
  458 + },
  459 + {
  460 + sId: commonUtils.createSid(),
  461 + sName: "sParamName",
  462 + showName: "参数名",
  463 + bVisible: true,
  464 + iFitWidth: 230,
  465 + },
  466 + {
  467 + sId: commonUtils.createSid(),
  468 + sName: "sParamValue",
  469 + showName: "参数值",
  470 + bVisible: true,
  471 + },
  472 + ];
450 473 sParamConfig.gdsconfigformslave = gdsconfigformslave;
451 474 const sParamColumn = commonFunc.getHeaderConfig(sParamConfig);
452 475 /* 要把数据以表格的形式显示出来 */
... ... @@ -454,13 +477,13 @@ class CommonList extends Component {
454 477 const sParamData = [];
455 478 if (commonUtils.isNotEmptyArr(sParamJsonObj)) {
456 479 for (const key of Object.keys(sParamJsonObj)) {
457   - if (key.includes('sParam') && !key.includes('DropDown') && !key.includes('Default')) {
  480 + if (key.includes("sParam") && !key.includes("DropDown") && !key.includes("Default")) {
458 481 const obj = {};
459 482 obj.sId = commonUtils.createSid();
460 483 obj.sParamKey = key;
461 484 obj.sParamName = sParamJsonObj[key];
462 485 /* 找到数字 找到下拉数据源 */
463   - const num = key.replace(/[^\d]/g, '').trim();
  486 + const num = key.replace(/[^\d]/g, "").trim();
464 487 if (Number(num)) {
465 488 const number = Number(num);
466 489 const sParamDropDownKey = `sParamDropDown${number}`;
... ... @@ -479,10 +502,10 @@ class CommonList extends Component {
479 502 const iIndex = slaveConfig.gdsconfigformslave.findIndex(item => item.sName === `sParamValue${i.toString()}`);
480 503 if (iIndex > -1 && !commonUtils.isEmpty(slaveSelectOneData[`sParam${i.toString()}`])) {
481 504 slaveConfig.gdsconfigformslave[iIndex].showName = slaveSelectOneData[`sParam${i.toString()}`];
482   - slaveConfig.gdsconfigformslave[iIndex].bVisible = !slaveSelectOneData[`sParam${i.toString()}`].includes('参数值');
  505 + slaveConfig.gdsconfigformslave[iIndex].bVisible = !slaveSelectOneData[`sParam${i.toString()}`].includes("参数值");
483 506 /* 判断是否是sql下拉 */
484 507 if (!commonUtils.isEmpty(slaveSelectOneData[`sParamDropDown${i.toString()}`])) {
485   - slaveConfig.gdsconfigformslave[iIndex].sDropDownType = 'sql';
  508 + slaveConfig.gdsconfigformslave[iIndex].sDropDownType = "sql";
486 509 }
487 510 // masterData = { ...masterNewData, ...commonUtils.convertStrToObj(slaveFilterData[0].sProcessParam) };
488 511 sProcessParamsSelects.push(slaveConfig.gdsconfigformslave[iIndex]);
... ... @@ -512,7 +535,7 @@ class CommonList extends Component {
512 535 sParamData,
513 536 });
514 537 }
515   - } else if (name === 'sParam' && commonUtils.isNotEmptyArr(selectedRowKeys)) {
  538 + } else if (name === "sParam" && commonUtils.isNotEmptyArr(selectedRowKeys)) {
516 539 /* 点击工艺参数列表 根据点击行动态加载配置 */
517 540 const { sParamData, sParamConfig } = this.props;
518 541 /* 找到最后一个选中 */
... ... @@ -521,13 +544,13 @@ class CommonList extends Component {
521 544 /* 选中数据时 塞入选中行的配置 */
522 545 if (iIndex > -1) {
523 546 const sParamObj = sParamData[iIndex];
524   - const index = sParamConfig.gdsconfigformslave.findIndex(item => item.sName === 'sParamValue');
  547 + const index = sParamConfig.gdsconfigformslave.findIndex(item => item.sName === "sParamValue");
525 548 if (index > -1) {
526 549 if (commonUtils.isNotEmptyObject(sParamObj.sDropDownData)) {
527   - sParamConfig.gdsconfigformslave[index].sDropDownType = 'const';
  550 + sParamConfig.gdsconfigformslave[index].sDropDownType = "const";
528 551 sParamConfig.gdsconfigformslave[index].showDropDown = JSON.stringify(sParamObj.sDropDownData);
529 552 } else {
530   - sParamConfig.gdsconfigformslave[index].sDropDownType = '';
  553 + sParamConfig.gdsconfigformslave[index].sDropDownType = "";
531 554 sParamConfig.gdsconfigformslave[index].showDropDown = undefined;
532 555 }
533 556 }
... ... @@ -542,22 +565,25 @@ class CommonList extends Component {
542 565 });
543 566 }
544 567 }
545   - }
  568 + };
546 569  
547 570 handleCancelProcessParamsModalVisible = () => {
548 571 this.props.onSaveState({
549 572 sProcessParamsModalVisible: false,
550 573 });
551   - }
  574 + };
552 575 handleProcessParamsOk1 = () => {
553   - const {
554   - slaveData, slaveSelectOneDataIndex, slaveFilterData, sProcessParamsSelects,
555   - } = this.props;
556   - let sProcessParamStr = '';
557   - if (commonUtils.isNotEmptyArr(slaveData) && !commonUtils.isEmpty(slaveSelectOneDataIndex) && commonUtils.isNotEmptyArr(slaveFilterData) && commonUtils.isNotEmptyArr(sProcessParamsSelects)) {
  576 + const { slaveData, slaveSelectOneDataIndex, slaveFilterData, sProcessParamsSelects } = this.props;
  577 + let sProcessParamStr = "";
  578 + if (
  579 + commonUtils.isNotEmptyArr(slaveData) &&
  580 + !commonUtils.isEmpty(slaveSelectOneDataIndex) &&
  581 + commonUtils.isNotEmptyArr(slaveFilterData) &&
  582 + commonUtils.isNotEmptyArr(sProcessParamsSelects)
  583 + ) {
558 584 // eslint-disable-next-line array-callback-return
559   - sProcessParamsSelects.map((item) => {
560   - let sParamValue = '';
  585 + sProcessParamsSelects.map(item => {
  586 + let sParamValue = "";
561 587 if (commonUtils.isNotEmptyObject(slaveData[slaveSelectOneDataIndex][item.sName])) {
562 588 sParamValue = slaveData[slaveSelectOneDataIndex][item.sName];
563 589 }
... ... @@ -570,17 +596,20 @@ class CommonList extends Component {
570 596 slaveFilterData,
571 597 sProcessParamsModalVisible: false,
572 598 });
573   - }
  599 + };
574 600 handleProcessParamsOk = () => {
575   - const {
576   - slaveData, slaveSelectOneDataIndex, slaveFilterData, sProcessParamsSelects, sParamData,
577   - } = this.props;
  601 + const { slaveData, slaveSelectOneDataIndex, slaveFilterData, sProcessParamsSelects, sParamData } = this.props;
578 602 /* 保存时候把sParamData赛道sParam1中 */
579   - let sProcessParamStr = '';
580   - if (commonUtils.isNotEmptyArr(slaveData) && !commonUtils.isEmpty(slaveSelectOneDataIndex) && commonUtils.isNotEmptyArr(slaveFilterData) && commonUtils.isNotEmptyArr(sProcessParamsSelects)) {
  603 + let sProcessParamStr = "";
  604 + if (
  605 + commonUtils.isNotEmptyArr(slaveData) &&
  606 + !commonUtils.isEmpty(slaveSelectOneDataIndex) &&
  607 + commonUtils.isNotEmptyArr(slaveFilterData) &&
  608 + commonUtils.isNotEmptyArr(sProcessParamsSelects)
  609 + ) {
581 610 // eslint-disable-next-line array-callback-return
582   - sProcessParamsSelects.map((item) => {
583   - let sParamValue = '';
  611 + sProcessParamsSelects.map(item => {
  612 + let sParamValue = "";
584 613 if (commonUtils.isNotEmptyObject(slaveData[slaveSelectOneDataIndex][item.sName])) {
585 614 sParamValue = slaveData[slaveSelectOneDataIndex][item.sName];
586 615 }
... ... @@ -601,18 +630,32 @@ class CommonList extends Component {
601 630 slaveFilterData,
602 631 sProcessParamsModalVisible: false,
603 632 });
604   - }
  633 + };
605 634 // ----------------------------数据修改回带end ---------------------------- //
606   - copyTo = (sActiveId) => {
  635 + copyTo = sActiveId => {
607 636 const {
608   - dispatch, masterConfig, masterData, contactData, addressData, slavePagination,
609   - sisproductclassifyProcessClassifyData, machineData, assortData, outsideData, processstyleData, processApsRuleData,
610   - eleemployeeData, elemachineData, eleknifemouldproductData, eleknifemouldfileData, eleteststandarditemData,
  637 + dispatch,
  638 + masterConfig,
  639 + masterData,
  640 + contactData,
  641 + addressData,
  642 + slavePagination,
  643 + sisproductclassifyProcessClassifyData,
  644 + machineData,
  645 + assortData,
  646 + outsideData,
  647 + processstyleData,
  648 + processApsRuleData,
  649 + eleemployeeData,
  650 + elemachineData,
  651 + eleknifemouldproductData,
  652 + eleknifemouldfileData,
  653 + eleteststandarditemData,
611 654 slaveSelectedData,
612 655 } = this.props;
613 656 const copyTo = {};
614 657 const copyToConfig = masterConfig.gdsconfigformslave.filter(item => item.sControlName.includes(name));
615   - copyTo.name = 'BtnCopyTo';
  658 + copyTo.name = "BtnCopyTo";
616 659 copyTo.config = copyToConfig;
617 660 copyTo.masterData = slaveSelectedData[0] || masterData;
618 661 copyTo.supplyData = [];
... ... @@ -633,21 +676,21 @@ class CommonList extends Component {
633 676 copyTo.eleknifemouldfileData = eleknifemouldfileData;
634 677 copyTo.eleteststandarditemData = eleteststandarditemData;
635 678 dispatch({
636   - type: 'content/onRouter',
  679 + type: "content/onRouter",
637 680 payload: {
638   - url: `${commonConfig.server_host}gdsmodule/getGdsmoduleById/${sActiveId}?sModelsId=${sActiveId}`, /* 接口地址 */
  681 + url: `${commonConfig.server_host}gdsmodule/getGdsmoduleById/${sActiveId}?sModelsId=${sActiveId}` /* 接口地址 */,
639 682 copyTo,
640 683 pages: slavePagination,
641 684 newRecordFlag: `NewRecord_${sActiveId}`,
642 685 },
643 686 });
644   - }
  687 + };
645 688  
646   - handleDrag = (data) => {
  689 + handleDrag = data => {
647 690 this.props.onSaveState({
648 691 slaveFilterData: data,
649 692 });
650   - }
  693 + };
651 694  
652 695 handleTableDel = (name, isWait, tableSelectedRowKeys) => {
653 696 const { slaveSelectedRowKeys } = this.props;
... ... @@ -659,14 +702,14 @@ class CommonList extends Component {
659 702 });
660 703 this.props.onDataRowDel(name, isWait, tableSelectedRowKeys);
661 704 }
662   - }
  705 + };
663 706 /* 动态参数标题选择框 全选/取消全选 */
664 707 handleCheckParamChange = () => {
665 708 const { sParamData, sParamColumn } = this.props;
666 709 /* 全选 取消全选功能 */
667 710 if (commonUtils.isNotEmptyArr(sParamData)) {
668 711 /* 标题bSelfCbx加标识 */
669   - const iIndex = sParamColumn.findIndex(item => item.dataIndex === 'bSelfCbx');
  712 + const iIndex = sParamColumn.findIndex(item => item.dataIndex === "bSelfCbx");
670 713 if (iIndex > -1) {
671 714 let bSelfCbx = false;
672 715 if (sParamColumn[iIndex].bCheckAll) {
... ... @@ -684,13 +727,13 @@ class CommonList extends Component {
684 727 sParamColumn,
685 728 });
686 729 }
687   - }
  730 + };
688 731 render() {
689 732 const { pageLoading } = this.props;
690 733 return (
691   - <div style={{ height: '100%' }}>
  734 + <div style={{ height: "100%" }}>
692 735 <Spin spinning={pageLoading}>
693   - <div style={{ height: '100%' }}>
  736 + <div style={{ height: "100%" }}>
694 737 <CommonListComponent
695 738 {...this.props}
696 739 {...this.state}
... ... @@ -721,7 +764,7 @@ const CommonListComponent = Form.create({
721 764 const obj = commonFunc.mapPropsToFields(masterData, Form);
722 765 return obj;
723 766 },
724   -})((props) => {
  767 +})(props => {
725 768 const {
726 769 form,
727 770 onReturnForm,
... ... @@ -740,23 +783,28 @@ const CommonListComponent = Form.create({
740 783 onReturnForm(form);
741 784 const pagination = {
742 785 ...slavePagination,
743   - size: 'large',
  786 + size: "large",
744 787 showQuickJumper: true,
745 788 hideOnSinglePage: false,
746 789 showTotal: false,
747 790 simple: true,
748 791 };
749 792 const tableProps = {
750   - ...commonBusiness.getTableTypes('slave', props),
  793 + ...commonBusiness.getTableTypes("slave", props),
751 794 tableProps: {
752   - rowKey: 'sSlaveId', pagination, onChange: props.onTitleChange, chooseProcessParams: true, sModelsType, AutoTableHeight: 350, // chooseProcessParams为选择工序中点击工序名称表格行出现弹窗
  795 + rowKey: "sSlaveId",
  796 + pagination,
  797 + onChange: props.onTitleChange,
  798 + chooseProcessParams: true,
  799 + sModelsType,
  800 + AutoTableHeight: 350, // chooseProcessParams为选择工序中点击工序名称表格行出现弹窗
753 801 },
754 802 bContinueClick: true,
755 803 };
756 804 const sParamProps = {
757   - ...commonBusiness.getTableTypes('sParam', props),
  805 + ...commonBusiness.getTableTypes("sParam", props),
758 806 tableProps: {
759   - rowKey: 'sId',
  807 + rowKey: "sId",
760 808 pagination,
761 809 onChange: props.onTitleChange,
762 810 sModelsType,
... ... @@ -776,17 +824,20 @@ const CommonListComponent = Form.create({
776 824 // disableimg: <img src={DisableDelIcon} alt="删除" width={width} height={height} />,
777 825 // };
778 826 const deleteSet = {
779   - autoHeight: '100%',
780   - setOpterationColumn: 'Y',
  827 + autoHeight: "100%",
  828 + setOpterationColumn: "Y",
781 829 };
782 830 let tableFilterProps = {
783   - ...commonBusiness.getTableTypes('slaveFilter', props),
  831 + ...commonBusiness.getTableTypes("slaveFilter", props),
784 832 tableProps: {
785   - rowSelection: null, rowKey: 'sSlaveId', onChange: props.onTitleChange, AutoTableHeight: 350,
  833 + rowSelection: null,
  834 + rowKey: "sSlaveId",
  835 + onChange: props.onTitleChange,
  836 + AutoTableHeight: 350,
786 837 },
787 838 onDrag: props.onDrag,
788 839 };
789   - if (props.sModelsType && props.sModelsType.includes('modal/searchProcess')) {
  840 + if (props.sModelsType && props.sModelsType.includes("modal/searchProcess")) {
790 841 tableFilterProps = {
791 842 ...tableFilterProps,
792 843 ...deleteSet,
... ... @@ -800,11 +851,12 @@ const CommonListComponent = Form.create({
800 851 enabled: true,
801 852 };
802 853 }
803   - const tableBelone = commonUtils.isNotEmptyObject(app.currentPane) && commonUtils.isNotEmptyObject(app.currentPane.name) && app.currentPane.bEdit ? 'none' : 'list';
  854 + const tableBelone =
  855 + commonUtils.isNotEmptyObject(app.currentPane) && commonUtils.isNotEmptyObject(app.currentPane.name) && app.currentPane.bEdit ? "none" : "list";
804 856  
805   - const name = 'filterTree';
  857 + const name = "filterTree";
806 858 const treeProps = {
807   - ...commonBusiness.getTreeTypes('tree', props),
  859 + ...commonBusiness.getTreeTypes("tree", props),
808 860 isSearch: false,
809 861 checkable: false,
810 862 [`${name}Column`]: props[`${name}Column`],
... ... @@ -829,17 +881,17 @@ const CommonListComponent = Form.create({
829 881 showLine: true,
830 882 switcherIcon: <DownOutlined />,
831 883 };
832   - const sProcessParams = commonFunc.showMessage(app.commonConst, 'sProcessParams');/* 选择工艺参数标题 */
833   - const displayLeft = (sModelsType !== 'search/sisColor' && sModelsType !== 'search/commonPopup');
  884 + const sProcessParams = commonFunc.showMessage(app.commonConst, "sProcessParams"); /* 选择工艺参数标题 */
  885 + const displayLeft = sModelsType !== "search/sisColor" && sModelsType !== "search/commonPopup";
834 886 const realizeHeight = commonUtils.isNotEmptyNumber(props.realizeHeight) ? props.realizeHeight : 0;
835   - const BtnSure = commonFunc.showLocalMessage(this.props, 'BtnSure', '确定');
836   - const BtnCancel = commonFunc.showLocalMessage(this.props, 'BtnCancel', '取消');
837   - const btnClick = (btn) => {
  887 + const BtnSure = commonFunc.showLocalMessage(props, "BtnSure", "确定");
  888 + const BtnCancel = commonFunc.showLocalMessage(props, "BtnCancel", "取消");
  889 + const btnClick = btn => {
838 890 const { sControlName } = btn;
839   - const picArr = slaveConfig.gdsconfigformslave.filter(item => (item.sName === 'picArr'));
  891 + const picArr = slaveConfig.gdsconfigformslave.filter(item => item.sName === "picArr");
840 892 if (picArr.length) {
841   - const sActiveId = picArr[0] ? picArr[0].sActiveId : '';
842   - if (sControlName === 'BtnAdd') {
  893 + const sActiveId = picArr[0] ? picArr[0].sActiveId : "";
  894 + if (sControlName === "BtnAdd") {
843 895 const params = {
844 896 newRecordFlag: `NewRecord_${sActiveId}`,
845 897 };
... ... @@ -852,9 +904,9 @@ const CommonListComponent = Form.create({
852 904 }
853 905 props.onAdd(params);
854 906 props.onOpenNewTab();
855   - } else if (sControlName === 'BtnCopyTo') {
  907 + } else if (sControlName === "BtnCopyTo") {
856 908 if (!Array.isArray(slaveSelectedData) || slaveSelectedData.length !== 1) {
857   - message.warn('请选择一例单据'); // 请选择数据
  909 + message.warn("请选择一例单据"); // 请选择数据
858 910 } else {
859 911 onCopyTo(sActiveId);
860 912 props.onOpenNewTab();
... ... @@ -862,80 +914,97 @@ const CommonListComponent = Form.create({
862 914 }
863 915 }
864 916 };
  917 + const filteItem = commonFunc.showLocalMessage(props, "filteItem", "过滤项");
865 918 return (
866 919 <div className="modalChooseProcessContent">
867   - <Form >
  920 + <Form>
868 921 <Layout>
869 922 <Layout>
870 923 <div id="modalChooseProcess">
871   - <div style={{ maxHeight: '100%', zIndex: 20 }}>
  924 + <div style={{ maxHeight: "100%", zIndex: 20 }}>
872 925 <SearchComponent {...props} />
873 926 </div>
874 927 <Content
875   - className={realizeHeight <= 0 ? 'xly-normal-list' : 'xly-normal-list resize-container'}
876   - style={{ height: realizeHeight > 0 ? `${500 + realizeHeight}px` : 'auto', paddingLeft: '10px' }}
  928 + className={realizeHeight <= 0 ? "xly-normal-list" : "xly-normal-list resize-container"}
  929 + style={{ height: realizeHeight > 0 ? `${500 + realizeHeight}px` : "auto", paddingLeft: "10px" }}
877 930 >
878 931 <Row gutter={[8, 0]}>
879   - {displayLeft ?
880   - <Col span={4} style={{ height: realizeHeight > 0 ? `${500 + realizeHeight}px` : 'auto' }}>
  932 + {displayLeft ? (
  933 + <Col span={4} style={{ height: realizeHeight > 0 ? `${500 + realizeHeight}px` : "auto" }}>
881 934 <div className="xly-tree-box">
882   - <div className="xly-tree-title">过滤项</div>
  935 + <div className="xly-tree-title">{filteItem}</div>
883 936 <StaticEditTree {...treeProps} noVlist />
884 937 </div>
885   - </Col> : ''
886   - }
887   - <Col style={{ height: realizeHeight > 0 ? `${500 + realizeHeight}px` : 'auto' }} span={sModelsType === 'search/commonPopup' ? 15 : 5}>
  938 + </Col>
  939 + ) : (
  940 + ""
  941 + )}
  942 + <Col
  943 + style={{ height: realizeHeight > 0 ? `${500 + realizeHeight}px` : "auto" }}
  944 + span={sModelsType === "search/commonPopup" ? 15 : 5}
  945 + >
888 946 <StaticEditTable {...tableProps} footer="hidden" tableBelone="list" showConfig={props.showConfig} />
889 947 </Col>
890   - <Col style={{ height: realizeHeight > 0 ? `${500 + realizeHeight}px` : 'auto' }} span={displayLeft ? 15 : sModelsType === 'search/commonPopup' ? 9 : 19} >
891   - <StaticEditTable dragHandle={props.dragHandle} {...tableFilterProps} footer="hidden" tableBelone={tableBelone} showConfig={props.showConfig} noVlistTable />
  948 + <Col
  949 + style={{ height: realizeHeight > 0 ? `${500 + realizeHeight}px` : "auto" }}
  950 + span={displayLeft ? 15 : sModelsType === "search/commonPopup" ? 9 : 19}
  951 + >
  952 + <StaticEditTable
  953 + dragHandle={props.dragHandle}
  954 + {...tableFilterProps}
  955 + footer="hidden"
  956 + tableBelone={tableBelone}
  957 + showConfig={props.showConfig}
  958 + noVlistTable
  959 + />
892 960 </Col>
893 961 </Row>
894 962 </Content>
895 963 </div>
896 964 </Layout>
897   - <div style={{ display: 'flex', justifyContent: 'space-between' }}>
  965 + <div style={{ display: "flex", justifyContent: "space-between" }}>
898 966 <div>
899   - {
900   - props.btnList.map(btn => (
901   - <Button
902   - onClick={() => btnClick(btn)}
903   - style={{ marginRight: 8 }}
904   - type="primary"
905   - key={btn.sControlName}
906   - >
907   - { btn.showName }
908   - </Button>
909   - ))
910   - }
  967 + {props.btnList.map(btn => (
  968 + <Button onClick={() => btnClick(btn)} style={{ marginRight: 8 }} type="primary" key={btn.sControlName}>
  969 + {btn.showName}
  970 + </Button>
  971 + ))}
911 972 </div>
912   - {
913   - commonUtils.isNotEmptyObject(app.currentPane) && commonUtils.isNotEmptyObject(app.currentPane.name) && app.currentPane.bEdit ?
914   - <div style={{ width: '46%', color: 'red' }}> {props.sDeliverRemark}</div> : ''
915   - }
916   - <div style={{
917   - width: '50%', textAlign: 'right', marginRight: '9px', marginBottom: '9px',
918   - }}
  973 + {commonUtils.isNotEmptyObject(app.currentPane) && commonUtils.isNotEmptyObject(app.currentPane.name) && app.currentPane.bEdit ? (
  974 + <div style={{ width: "46%", color: "red" }}> {props.sDeliverRemark}</div>
  975 + ) : (
  976 + ""
  977 + )}
  978 + <div
  979 + style={{
  980 + width: "50%",
  981 + textAlign: "right",
  982 + marginRight: "9px",
  983 + marginBottom: "9px",
  984 + }}
919 985 >
920   - <Button key="back" style={{ marginRight: '8px' }} onClick={props.onCancel}>{BtnCancel}</Button>
921   - <Button type="primary" onClick={props.onSelect}>{BtnSure}</Button>
  986 + <Button key="back" style={{ marginRight: "8px" }} onClick={props.onCancel}>
  987 + {BtnCancel}
  988 + </Button>
  989 + <Button type="primary" onClick={props.onSelect}>
  990 + {BtnSure}
  991 + </Button>
922 992 </div>
923 993 </div>
924 994 </Layout>
925   - {
926   - false ?
927   - <AntdDraggableModal
928   - width="33%"
929   - title={sProcessParams}
930   - visible={props.sProcessParamsModalVisible}
931   - onOk={props.onProcessParamsOk}
932   - onCancel={props.onCancelProcessParamsModalVisible}
933   - // footer={null}
934   - >
935   - <div className="sProcessParamsModal" style={{ height: '80%', overflowY: 'auto' }}>
936   - { commonUtils.isNotEmptyArr(sProcessParamsSelects) && commonUtils.isNotEmptyArr(selectedRowKeys) ?
937   - sProcessParamsSelects.map((child) => {
938   - const sMemo = child.sName.toLowerCase().endsWith('memo');
  995 + {false ? (
  996 + <AntdDraggableModal
  997 + width="33%"
  998 + title={sProcessParams}
  999 + visible={props.sProcessParamsModalVisible}
  1000 + onOk={props.onProcessParamsOk}
  1001 + onCancel={props.onCancelProcessParamsModalVisible}
  1002 + // footer={null}
  1003 + >
  1004 + <div className="sProcessParamsModal" style={{ height: "80%", overflowY: "auto" }}>
  1005 + {commonUtils.isNotEmptyArr(sProcessParamsSelects) && commonUtils.isNotEmptyArr(selectedRowKeys)
  1006 + ? sProcessParamsSelects.map(child => {
  1007 + const sMemo = child.sName.toLowerCase().endsWith("memo");
939 1008 let enabledNew = !child.bReadonly;
940 1009 if (child.iTag === 1) {
941 1010 enabledNew = false;
... ... @@ -944,11 +1013,11 @@ const CommonListComponent = Form.create({
944 1013 }
945 1014 const slaveSelectOneDataIndex = slaveData.findIndex(item => item.sId === selectedRowKeys[selectedRowKeys.length - 1]); // 多选选择最后一个
946 1015 /* 如果没值 则取默认值 */
947   - let sDataValue = '';
  1016 + let sDataValue = "";
948 1017 if (commonUtils.isNotEmptyArr(slaveData) && commonUtils.isNotEmptyObject(slaveData[slaveSelectOneDataIndex])) {
949 1018 sDataValue = slaveData[slaveSelectOneDataIndex][child.sName];
950   - const sDefaultName = child.sName.replace('Value', 'Default');
951   - let sDefaultValue = '';
  1019 + const sDefaultName = child.sName.replace("Value", "Default");
  1020 + let sDefaultValue = "";
952 1021 if (sDefaultName) {
953 1022 sDefaultValue = slaveData[slaveSelectOneDataIndex][sDefaultName];
954 1023 }
... ... @@ -957,7 +1026,7 @@ const CommonListComponent = Form.create({
957 1026 }
958 1027 }
959 1028 const showTypeProps = {
960   - name: 'slave',
  1029 + name: "slave",
961 1030 form: props.form,
962 1031 record: slaveData[slaveSelectOneDataIndex],
963 1032 sId: slaveData[slaveSelectOneDataIndex].sId,
... ... @@ -979,30 +1048,32 @@ const CommonListComponent = Form.create({
979 1048 <span>{`${child.showName}:`}</span>
980 1049 <ShowType {...showTypeProps} />
981 1050 </div>
982   - );
983   - }) : ''
984   - }
985   - </div>
986   - </AntdDraggableModal>
987   - : ''
988   - }
989   - {
990   - props.sProcessParamsModalVisible ?
991   - <AntdDraggableModal
992   - width="920px"
993   - // bodyStyle={{ width: '930px' }}
994   - className="paramModal"
995   - title={sProcessParams}
996   - visible={props.sProcessParamsModalVisible}
997   - onOk={props.onProcessParamsOk}
998   - onCancel={props.onCancelProcessParamsModalVisible}
999   - // footer={null}
1000   - >
1001   - <div className="xly-bill-list" >
1002   - <StaticEditTable {...sParamProps} footer="hidden" />
1003   - </div>
1004   - </AntdDraggableModal> : ''
1005   - }
  1051 + );
  1052 + })
  1053 + : ""}
  1054 + </div>
  1055 + </AntdDraggableModal>
  1056 + ) : (
  1057 + ""
  1058 + )}
  1059 + {props.sProcessParamsModalVisible ? (
  1060 + <AntdDraggableModal
  1061 + width="920px"
  1062 + // bodyStyle={{ width: '930px' }}
  1063 + className="paramModal"
  1064 + title={sProcessParams}
  1065 + visible={props.sProcessParamsModalVisible}
  1066 + onOk={props.onProcessParamsOk}
  1067 + onCancel={props.onCancelProcessParamsModalVisible}
  1068 + // footer={null}
  1069 + >
  1070 + <div className="xly-bill-list">
  1071 + <StaticEditTable {...sParamProps} footer="hidden" />
  1072 + </div>
  1073 + </AntdDraggableModal>
  1074 + ) : (
  1075 + ""
  1076 + )}
1006 1077 </Form>
1007 1078 </div>
1008 1079 );
... ...
src/components/Common/CommonNewBillEvent.js
... ... @@ -1935,7 +1935,7 @@ export default (ChildComponent) =&gt; {
1935 1935 /* 上一条、下一条、首条、末条 */
1936 1936 handleSearchData = async (handleType) => {
1937 1937 const {
1938   - sModelsId, app, currentIndexFlag, currentPageNo, masterData,
  1938 + sModelsId, app, currentIndexFlag, currentPageNo, masterData, sSrcModelsId,
1939 1939 masterConfig, slaveConfig, slave0Config, slave1Config, slave2Config, slave3Config, slave4Config,
1940 1940 } = this.props;
1941 1941 let { sBillIdsArray = []} = this.props;
... ... @@ -1993,7 +1993,7 @@ export default (ChildComponent) =&gt; {
1993 1993 if(!bExist) {
1994 1994 const value = {
1995 1995 sClientType: '1', sFilterOrderBy, bFilter, sListFormmasterId, currentPosition, handleType, iCountSum: pages.total,
1996   - sUpId: masterData?.sId,
  1996 + sUpId: masterData?.sId, sParentModelId :sSrcModelsId,
1997 1997 };
1998 1998 const url = `${commonConfig.server_host}business/getBusinessDataByIndex?sModelsId=${sModelsId}`;
1999 1999 /* 接收返回值 */
... ...
src/components/Common/CommonSubBillEvent.js
... ... @@ -2815,7 +2815,7 @@ export default (ChildComponent) =&gt; {
2815 2815 handleSearchData = async (handleType) => {
2816 2816 const {
2817 2817 sModelsId, app, currentIndexFlag, currentPageNo, slaveChildConfig, memoDataList, masterData,
2818   - masterConfig, slaveConfig, checkConfig,
  2818 + masterConfig, slaveConfig, checkConfig, sSrcModelsId,
2819 2819 } = this.props;
2820 2820 let { sBillIdsArray = []} = this.props;
2821 2821 let { currentId } = this.props;
... ... @@ -2868,7 +2868,7 @@ export default (ChildComponent) =&gt; {
2868 2868 if(!bExist) {
2869 2869 const value = {
2870 2870 sClientType: '1', sFilterOrderBy, bFilter, sListFormmasterId, currentPosition, handleType, iCountSum: pages.total,
2871   - sUpId: masterData?.sId,
  2871 + sUpId: masterData?.sId, sParentModelId :sSrcModelsId,
2872 2872 };
2873 2873 const url = `${commonConfig.server_host}business/getBusinessDataByIndex?sModelsId=${sModelsId}`;
2874 2874 /* 接收返回值 */
... ...
src/components/Common/ToolBar/ToolBarNew.js
... ... @@ -1281,9 +1281,10 @@ class ToolBarComponent extends Component {
1281 1281 loading: true,
1282 1282 });
1283 1283 const { sModelsId, masterData, slaveData, slaveDelData: slaveDelDataOld, app } = this.props;
  1284 + const confirmSetting = commonFunc.showLocalMessage(this.props, 'confirmSetting', '请配置按钮的存储过程');
1284 1285 const btnConfig = this.props.masterConfig.gdsconfigformslave.filter(item => item.sControlName === "BtnCommonImport")[0]; // sButtonEnabled sButtonParam
1285 1286 if (!commonUtils.isNotEmptyObject(btnConfig) || !commonUtils.isNotEmptyStr(btnConfig.sButtonParam)) {
1286   - message.error("请配置按钮的存储过程");
  1287 + message.error(confirmSetting);
1287 1288 this.props.onSaveState({
1288 1289 loading: false,
1289 1290 });
... ... @@ -1527,6 +1528,7 @@ class ToolBarComponent extends Component {
1527 1528  
1528 1529 const bInvalidCancel = commonFunc.showLocalMessage(this.props, 'bInvalidCancel', '确定要作废');
1529 1530  
  1531 + const confirmSetting = commonFunc.showLocalMessage(this.props, 'confirmSetting', '请配置按钮的存储过程');
1530 1532 /* 新增 */
1531 1533 if (key === "BtnAdd") {
1532 1534 /* 增加 */
... ... @@ -2354,7 +2356,7 @@ class ToolBarComponent extends Component {
2354 2356 loading: false,
2355 2357 });
2356 2358 } else {
2357   - message.error("请配置按钮的存储过程");
  2359 + message.error(confirmSetting);
2358 2360 this.props.onSaveState({
2359 2361 loading: false,
2360 2362 });
... ...
src/components/CommonElementEvent/SftLoginInfo.js
... ... @@ -59,7 +59,8 @@ const SftLoginComponent = Form.create({
59 59 const tabDrivergroup = commonFunc.showMessage(app.commonConst, 'tabDrivergroup');/* 司机查看权限 */
60 60 const tabDepartgroup = commonFunc.showMessage(app.commonConst, 'tabDepartgroup');/* 部门查看权限 */
61 61 const tabApproveGroup = commonFunc.showMessage(app.commonConst, 'sftlogininfoCheck');/* 审核组权限 */
62   - const tabBrandgroup = '分管公司权限';
  62 + const tabCompanyAuthority = commonFunc.showLocalMessage(this.props, 'tabCompanyAuthority', '分管公司权限');
  63 + const tabBrandgroup = tabCompanyAuthority;
63 64  
64 65 return (
65 66 <Form>
... ...
src/components/Manufacture/WorkOrderPackTableTreeNew/index.js
... ... @@ -3213,14 +3213,21 @@ const controlProps = props =&gt; {
3213 3213 const tableRow = controlData.find(item => item.sId === tableSelectedRowKeys[0]);
3214 3214 let controlChildData = [];
3215 3215 if(commonUtils.isNotEmptyObject(tableRow)) {
3216   - // 递归查找所有子节点
  3216 + // 使用Set来记录已处理节点,防止循环引用
  3217 + const processedNodes = new Set();
  3218 +
3217 3219 const findChildren = (parentId, allNodes) => {
3218   - const children = allNodes.filter(node => node.sControlParentId === parentId);
3219   - let result = [...children];
3220   - children.forEach(child => {
3221   - result = result.concat(findChildren(child.sNodeId, allNodes));
3222   - });
3223   - return result;
  3220 + // 防止重复处理同一个父节点
  3221 + if (processedNodes.has(parentId)) return [];
  3222 + processedNodes.add(parentId);
  3223 +
  3224 + const children = allNodes.filter(node =>
  3225 + node.sControlParentId === parentId && !processedNodes.has(node.sNodeId)
  3226 + );
  3227 +
  3228 + return children.concat(
  3229 + ...children.map(child => findChildren(child.sNodeId, allNodes))
  3230 + );
3224 3231 };
3225 3232  
3226 3233 controlChildData = findChildren(tableRow.sNodeId, controlData);
... ...
src/utils/config.js
... ... @@ -8,8 +8,8 @@ const API = process.env.API;
8 8  
9 9 const bHttps = false;
10 10 export const webSite = {
11   - faceAddress: isDev ? '//8.130.144.93:8088/xlyFace' : '//' + location.host + '/xlyFace',
12   - ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//8.130.144.93:8088/xlyEntry/' : '//' + location.host + '/xlyEntry/',
  11 + faceAddress: isDev ? '//192.168.2.19:8080/xlyFace' : '//' + location.host + '/xlyFace',
  12 + ipAddress: isDev ? '//192.168.2.19:8080/xlyEntry/' : '//' + location.host + '/xlyEntry/',
13 13 interfaceAddress: localStorage.apiAddress ? localStorage.apiAddress : isDev ? '//8.130.144.93:8088/xlyApi/' : '//' + location.host + '/xlyApi/', // 接口地址
14 14 fileAddress: isDev ? '//8.130.144.93:8088/xlyReport/' : '//' + location.host + '/xlyReport/', // 接口地址
15 15 fileAddressEbc: isDev ? '//8.130.144.93:8088/xlyReport/' : '//' + location.host + '/xlyReport/',
... ...