Commit 8d5978179c5d3d9632afbcef942722fd55c5cd0c
Merge branch 'main' of http://git.xlyprint.cn/zhangz/xlyUmi into main
Showing
45 changed files
with
519 additions
and
421 deletions
src/components/AuditInformation/AuditInformation.js
| ... | ... | @@ -33,7 +33,7 @@ class AuditInformation extends Component { |
| 33 | 33 | let { masterConfig, canSendMsg } = nextProps; |
| 34 | 34 | const { userinfo } = app; |
| 35 | 35 | if (commonUtils.isEmptyArr(masterConfig) && formData.length > 0) { |
| 36 | - const sId = currentId !== undefined ? currentId : ''; | |
| 36 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 37 | 37 | /* 数据Id */ |
| 38 | 38 | masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 39 | 39 | const checkConfig = formData.filter(item => item.bGrd && item.sTbName === 'sysbillcheckresult')[0]; |
| ... | ... | @@ -58,7 +58,7 @@ class AuditInformation extends Component { |
| 58 | 58 | /** 获取主表数据 */ |
| 59 | 59 | handleGetData = async (masterConfig, checkConfig) => { |
| 60 | 60 | const { currentId } = this.props; /* 当前页签数据 */ |
| 61 | - const sId = currentId !== undefined ? currentId : ''; | |
| 61 | + const sId = currentId || this.props.masterData?.sId || ''; | |
| 62 | 62 | await this.props.handleGetDataOne({ name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' } }); |
| 63 | 63 | const { masterData } = this.props; |
| 64 | 64 | if (!commonUtils.isEmptyObject(checkConfig) && !commonUtils.isEmptyObject(masterData)) { | ... | ... |
src/components/Common/CommonBillDeliverEvent.js
| ... | ... | @@ -47,7 +47,7 @@ export default (ChildComponent) => { |
| 47 | 47 | employeeConfig: employeeConfigOld, |
| 48 | 48 | } = nextProps; |
| 49 | 49 | if (commonUtils.isEmptyObject(slaveConfigOld) && formData.length > 0 && (sModelsType !== 'cashier/financialTransfer' && sModelsType !== 'cashier/financialAdjustment' && sModelsType !== 'quality/accident' && sModelsType !== 'purchase/purchaseEnquiry' && sModelsType !== 'complaint/complaint' && sModelsType !== 'print/printLabel' && sModelsType !== 'commonBill/onlyMaster' && formRoute.indexOf('indexOee') === -1)) { |
| 50 | - const sId = currentId !== undefined ? currentId : ''; | |
| 50 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 51 | 51 | /* 数据Id */ |
| 52 | 52 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 53 | 53 | const BtnDesignFunctionConfig = commonUtils.isNotEmptyObject(masterConfig) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'BtnBsOperation.BtnDesignFunction') : {}; |
| ... | ... | @@ -274,7 +274,7 @@ export default (ChildComponent) => { |
| 274 | 274 | }); |
| 275 | 275 | } else if (commonUtils.isEmptyObject(masterConfigOld) && formData.length === 1 && (sModelsType === 'cashier/financialTransfer' || sModelsType === 'purchase/purchaseEnquiry' || sModelsType === 'cashier/financialAdjustment' || sModelsType === 'print/printLabel' || sModelsType === 'complaint/complaint' || sModelsType === 'commonBill/onlyMaster') && formRoute.indexOf('indexOee') === -1) { |
| 276 | 276 | const config = {}; |
| 277 | - const sId = currentId !== undefined ? currentId : ''; | |
| 277 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 278 | 278 | /* 数据Id */ |
| 279 | 279 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 280 | 280 | let addState = {}; |
| ... | ... | @@ -296,7 +296,7 @@ export default (ChildComponent) => { |
| 296 | 296 | masterConfig, sId, pageLoading: false, ...addState, |
| 297 | 297 | }); |
| 298 | 298 | } else if (commonUtils.isEmptyObject(slaveConfigOld) && commonUtils.isEmptyObject(masterConfigOld) && formData.length === 2 && (sModelsType === 'quality/accident') && formRoute.indexOf('indexOee') === -1) { |
| 299 | - const sId = currentId !== undefined ? currentId : ''; | |
| 299 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 300 | 300 | /* 数据Id */ |
| 301 | 301 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 302 | 302 | const slaveConfig = formData.filter(item => item.bGrd && item.sTbName === 'mftqualityaccidentSlave')[0]; |
| ... | ... | @@ -319,7 +319,7 @@ export default (ChildComponent) => { |
| 319 | 319 | }); |
| 320 | 320 | } else if (formRoute.indexOf('indexOee') > -1 && commonUtils.isEmptyObject(employeeConfigOld) && commonUtils.isEmptyObject(slaveConfigOld) && formData.length > 0) { |
| 321 | 321 | if (formRoute === '/indexOee/labelPrint' && commonUtils.isEmpty(slaveConfigOld)) { /* 入库标签打印 */ |
| 322 | - const sId = currentId !== undefined ? currentId : ''; | |
| 322 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 323 | 323 | /* 数据Id */ |
| 324 | 324 | const masterConfig = formData[0]; |
| 325 | 325 | const slaveConfig = formData[0]; |
| ... | ... | @@ -507,7 +507,7 @@ export default (ChildComponent) => { |
| 507 | 507 | /** 获取主表、从表、审核表数据 */ |
| 508 | 508 | handleGetData = async (masterConfig, slaveConfig, checkConfig, bEditClick) => { |
| 509 | 509 | const { currentId } = this.props; /* 当前页签数据 */ |
| 510 | - const sId = currentId !== undefined ? currentId : ''; | |
| 510 | + const sId = currentId || this.props.masterData?.sId || ''; | |
| 511 | 511 | await this.props.handleGetDataOne({ |
| 512 | 512 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, |
| 513 | 513 | }); |
| ... | ... | @@ -544,7 +544,7 @@ export default (ChildComponent) => { |
| 544 | 544 | /* 获取表数据 */ |
| 545 | 545 | handleGetMemoData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig) => { |
| 546 | 546 | const { currentId, sModelsType } = this.props; /* 当前页签数据 */ |
| 547 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 547 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 548 | 548 | const addStateControl = await this.props.handleGetDataSet({ |
| 549 | 549 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, |
| 550 | 550 | }); |
| ... | ... | @@ -597,7 +597,7 @@ export default (ChildComponent) => { |
| 597 | 597 | /* 获取单张表数据 */ |
| 598 | 598 | handleGetOneMemoData = (memoName, memoConfig) => { |
| 599 | 599 | const { currentId } = this.props; /* 当前页签数据 */ |
| 600 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 600 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 601 | 601 | if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ |
| 602 | 602 | this.props.handleGetDataSet({ |
| 603 | 603 | name: memoName, configData: memoConfig, condition: { sSqlCondition: { sParentId: sId } }, | ... | ... |
src/components/Common/CommonBillEvent.js
| ... | ... | @@ -79,7 +79,7 @@ export default (ChildComponent) => { |
| 79 | 79 | slaveInfoList: slaveInfoListOld, |
| 80 | 80 | } = nextProps; |
| 81 | 81 | if (commonUtils.isEmptyObject(slaveConfigOld) && formData.length > 0 && (sModelsId === '12710101117024321284220' || (sModelsType !== 'cashier/financialTransfer' && sModelsType !== 'cashier/financialAdjustment' && sModelsType !== 'quality/accident' && sModelsType !== 'purchase/purchaseEnquiry' && sModelsType !== 'complaint/complaint' && sModelsType !== 'print/printLabel' && sModelsType !== 'commonBill/onlyMaster' && (formRoute.indexOf('indexOee') === -1 || formRoute === '/indexOee/commonOeeBill')))) { |
| 82 | - const sId = currentId !== undefined ? currentId : ''; | |
| 82 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 83 | 83 | /* 数据Id */ |
| 84 | 84 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 85 | 85 | const BtnDesignFunctionConfig = commonUtils.isNotEmptyObject(masterConfig) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'BtnBsOperation.BtnDesignFunction') : {}; |
| ... | ... | @@ -494,7 +494,7 @@ export default (ChildComponent) => { |
| 494 | 494 | }); |
| 495 | 495 | } else if (commonUtils.isEmptyObject(masterConfigOld) && formData.length === 1 && (sModelsType === 'cashier/financialTransfer' || sModelsType === 'purchase/purchaseEnquiry' || sModelsType === 'cashier/financialAdjustment' || sModelsType === 'print/printLabel' || sModelsType === 'complaint/complaint' || sModelsType === 'commonBill/onlyMaster') && formRoute.indexOf('indexOee') === -1) { |
| 496 | 496 | const config = {}; |
| 497 | - const sId = currentId !== undefined ? currentId : ''; | |
| 497 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 498 | 498 | /* 数据Id */ |
| 499 | 499 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 500 | 500 | let addState = {}; |
| ... | ... | @@ -516,7 +516,7 @@ export default (ChildComponent) => { |
| 516 | 516 | masterConfig, sId, pageLoading: false, ...addState, |
| 517 | 517 | }); |
| 518 | 518 | } else if (commonUtils.isEmptyObject(slaveConfigOld) && commonUtils.isEmptyObject(masterConfigOld) && formData.length === 2 && (sModelsType === 'quality/accident') && formRoute.indexOf('indexOee') === -1) { |
| 519 | - const sId = currentId !== undefined ? currentId : ''; | |
| 519 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 520 | 520 | /* 数据Id */ |
| 521 | 521 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 522 | 522 | const slaveConfig = formData.filter(item => item.bGrd && item.sTbName === 'mftqualityaccidentSlave')[0]; |
| ... | ... | @@ -551,7 +551,7 @@ export default (ChildComponent) => { |
| 551 | 551 | // employeeConfig, employeeColumn, masterConfig, ...addState, |
| 552 | 552 | // }); |
| 553 | 553 | if (formRoute === '/indexOee/labelPrint' && commonUtils.isEmpty(slaveConfigOld)) { /* 入库标签打印 */ |
| 554 | - const sId = currentId !== undefined ? currentId : ''; | |
| 554 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 555 | 555 | /* 数据Id */ |
| 556 | 556 | const masterConfig = formData[0]; |
| 557 | 557 | const slaveConfig = formData[0]; |
| ... | ... | @@ -801,7 +801,7 @@ export default (ChildComponent) => { |
| 801 | 801 | /* 获取表数据 */ |
| 802 | 802 | handleGetMemoData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig) => { |
| 803 | 803 | const { currentId, sModelsType } = this.props; /* 当前页签数据 */ |
| 804 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 804 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 805 | 805 | const addStateControl = await this.props.handleGetDataSet({ |
| 806 | 806 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, |
| 807 | 807 | }); |
| ... | ... | @@ -860,7 +860,7 @@ export default (ChildComponent) => { |
| 860 | 860 | /* 获取单张表数据 */ |
| 861 | 861 | handleGetOneMemoData = (memoName, memoConfig) => { |
| 862 | 862 | const { currentId } = this.props; /* 当前页签数据 */ |
| 863 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 863 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 864 | 864 | if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ |
| 865 | 865 | this.props.handleGetDataSet({ |
| 866 | 866 | name: memoName, configData: memoConfig, condition: { sSqlCondition: { sParentId: sId } }, |
| ... | ... | @@ -2290,8 +2290,6 @@ export default (ChildComponent) => { |
| 2290 | 2290 | }, |
| 2291 | 2291 | onCancel() { |
| 2292 | 2292 | }, |
| 2293 | - okText: '保存', | |
| 2294 | - cancelText: '不保存', | |
| 2295 | 2293 | }); |
| 2296 | 2294 | this.props.onSaveState({ |
| 2297 | 2295 | loading: false, |
| ... | ... | @@ -2829,7 +2827,8 @@ export default (ChildComponent) => { |
| 2829 | 2827 | /* 上一条、下一条、首条、末条 */ |
| 2830 | 2828 | handleSearchData = async (handleType) => { |
| 2831 | 2829 | const { |
| 2832 | - sModelsId, app, currentIndexFlag, currentPageNo, masterData, masterConfig, slaveConfig, checkConfig | |
| 2830 | + sModelsId, app, currentIndexFlag, currentPageNo, masterData, masterConfig, slaveConfig, checkConfig, | |
| 2831 | + sSrcModelsId, | |
| 2833 | 2832 | } = this.props; |
| 2834 | 2833 | let { sBillIdsArray = []} = this.props; |
| 2835 | 2834 | let { currentId } = this.props; |
| ... | ... | @@ -2888,7 +2887,7 @@ export default (ChildComponent) => { |
| 2888 | 2887 | if(!bExist) { |
| 2889 | 2888 | const value = { |
| 2890 | 2889 | sClientType: '1', sFilterOrderBy, bFilter, sListFormmasterId, currentPosition, handleType, iCountSum: pages.total, |
| 2891 | - sUpId: masterData?.sId, | |
| 2890 | + sUpId: masterData?.sId, sParentModelId :sSrcModelsId, | |
| 2892 | 2891 | }; |
| 2893 | 2892 | const url = `${commonConfig.server_host}business/getBusinessDataByIndex?sModelsId=${sModelsId}`; |
| 2894 | 2893 | /* 接收返回值 */ | ... | ... |
src/components/Common/CommonCheckBillEvent.js
| ... | ... | @@ -72,7 +72,7 @@ export default (ChildComponent) => { |
| 72 | 72 | employeeConfig: employeeConfigOld, |
| 73 | 73 | } = nextProps; |
| 74 | 74 | if (commonUtils.isEmptyObject(slaveConfigOld) && formData.length > 0 && (sModelsType !== 'cashier/financialTransfer' && sModelsType !== 'cashier/financialAdjustment' && sModelsType !== 'quality/accident' && sModelsType !== 'purchase/purchaseEnquiry' && sModelsType !== 'complaint/complaint' && sModelsType !== 'print/printLabel' && sModelsType !== 'commonBill/onlyMaster' && (formRoute.indexOf('indexOee') === -1 || formRoute === '/indexOee/commonOeeBill'))) { |
| 75 | - const sId = currentId !== undefined ? currentId : ''; | |
| 75 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 76 | 76 | /* 数据Id */ |
| 77 | 77 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 78 | 78 | const BtnDesignFunctionConfig = commonUtils.isNotEmptyObject(masterConfig) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'BtnBsOperation.BtnDesignFunction') : {}; |
| ... | ... | @@ -373,7 +373,7 @@ export default (ChildComponent) => { |
| 373 | 373 | }); |
| 374 | 374 | } else if (commonUtils.isEmptyObject(masterConfigOld) && formData.length === 1 && (sModelsType === 'cashier/financialTransfer' || sModelsType === 'purchase/purchaseEnquiry' || sModelsType === 'cashier/financialAdjustment' || sModelsType === 'print/printLabel' || sModelsType === 'complaint/complaint' || sModelsType === 'commonBill/onlyMaster') && formRoute.indexOf('indexOee') === -1) { |
| 375 | 375 | const config = {}; |
| 376 | - const sId = currentId !== undefined ? currentId : ''; | |
| 376 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 377 | 377 | /* 数据Id */ |
| 378 | 378 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 379 | 379 | let addState = {}; |
| ... | ... | @@ -395,7 +395,7 @@ export default (ChildComponent) => { |
| 395 | 395 | masterConfig, sId, pageLoading: false, ...addState, |
| 396 | 396 | }); |
| 397 | 397 | } else if (commonUtils.isEmptyObject(slaveConfigOld) && commonUtils.isEmptyObject(masterConfigOld) && formData.length === 2 && (sModelsType === 'quality/accident') && formRoute.indexOf('indexOee') === -1) { |
| 398 | - const sId = currentId !== undefined ? currentId : ''; | |
| 398 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 399 | 399 | /* 数据Id */ |
| 400 | 400 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 401 | 401 | const slaveConfig = formData.filter(item => item.bGrd && item.sTbName === 'mftqualityaccidentSlave')[0]; |
| ... | ... | @@ -430,7 +430,7 @@ export default (ChildComponent) => { |
| 430 | 430 | // employeeConfig, employeeColumn, masterConfig, ...addState, |
| 431 | 431 | // }); |
| 432 | 432 | if (formRoute === '/indexOee/labelPrint' && commonUtils.isEmpty(slaveConfigOld)) { /* 入库标签打印 */ |
| 433 | - const sId = currentId !== undefined ? currentId : ''; | |
| 433 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 434 | 434 | /* 数据Id */ |
| 435 | 435 | const masterConfig = formData[0]; |
| 436 | 436 | const slaveConfig = formData[0]; |
| ... | ... | @@ -618,7 +618,7 @@ export default (ChildComponent) => { |
| 618 | 618 | /** 获取主表、从表、审核表数据 */ |
| 619 | 619 | handleGetData = async (masterConfig, slaveConfig, checkConfig, bEditClick) => { |
| 620 | 620 | const { currentId } = this.props; /* 当前页签数据 */ |
| 621 | - const sId = currentId !== undefined ? currentId : ''; | |
| 621 | + const sId = currentId || this.props.masterData?.sId || ''; | |
| 622 | 622 | const addStateMaster = await this.props.handleGetDataOne({ |
| 623 | 623 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, isWait: true, bEditClick, |
| 624 | 624 | }); |
| ... | ... | @@ -669,7 +669,7 @@ export default (ChildComponent) => { |
| 669 | 669 | /* 获取表数据 */ |
| 670 | 670 | handleGetMemoData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig) => { |
| 671 | 671 | const { currentId, sModelsType } = this.props; /* 当前页签数据 */ |
| 672 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 672 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 673 | 673 | let addStateControl = {}; |
| 674 | 674 | if (commonUtils.isNotEmptyObject(controlConfig)) { |
| 675 | 675 | addStateControl = await this.props.handleGetDataSet({ |
| ... | ... | @@ -732,7 +732,7 @@ export default (ChildComponent) => { |
| 732 | 732 | /* 获取单张表数据 */ |
| 733 | 733 | handleGetOneMemoData = (memoName, memoConfig) => { |
| 734 | 734 | const { currentId } = this.props; /* 当前页签数据 */ |
| 735 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 735 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 736 | 736 | if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ |
| 737 | 737 | this.props.handleGetDataSet({ |
| 738 | 738 | name: memoName, configData: memoConfig, condition: { sSqlCondition: { sParentId: sId } }, | ... | ... |
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 | }; |
| ... | ... | @@ -2554,7 +2556,7 @@ class CommonNewBill extends Component { |
| 2554 | 2556 | // 刷新工单交期 |
| 2555 | 2557 | handleRefreshGdjq = async() => { |
| 2556 | 2558 | const { currentId, slave2Child0Config, slave2Child0InfoConfig } = this.props; |
| 2557 | - const sId = currentId !== undefined ? currentId : ''; | |
| 2559 | + const sId = currentId || this.props.masterData?.sId || ''; | |
| 2558 | 2560 | const conditonValues1 = this.props.onGetSqlConditionValues(slave2Child0Config); |
| 2559 | 2561 | let returnData1 = await this.props.handleGetDataSet({ |
| 2560 | 2562 | name: "slave2Child0", | ... | ... |
src/components/Common/CommonElementEvent.js
| ... | ... | @@ -35,7 +35,7 @@ export default (ChildComponent) => { |
| 35 | 35 | eleknifemouldproductConfig: eleknifemouldOldproductConfig, eleteststandarditemConfig: eleteststandardOlditemConfig, |
| 36 | 36 | } = nextProps; |
| 37 | 37 | if (commonUtils.isEmptyObject(contactOldConfig) && (sModelsType === 'element/supplyInfo' || sModelsType === 'element/customerInfo') && formData.length > 0) { |
| 38 | - const sId = currentId || this.props.masterData?.sId || ''; | |
| 38 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 39 | 39 | /* 数据Id */ |
| 40 | 40 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 41 | 41 | if (sModelsType === 'element/customerInfo') { |
| ... | ... | @@ -91,7 +91,7 @@ export default (ChildComponent) => { |
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | if (commonUtils.isEmptyObject(supplyOldConfig) && formData.length > 0 && sModelsType === 'element/materialsInfo') { |
| 94 | - const sId = currentId || this.props.masterData?.sId || ''; | |
| 94 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 95 | 95 | /* 数据Id */ |
| 96 | 96 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 97 | 97 | /* bGrd代表是否是表格 */ |
| ... | ... | @@ -122,7 +122,7 @@ export default (ChildComponent) => { |
| 122 | 122 | } |
| 123 | 123 | /* 印件分类 */ |
| 124 | 124 | if (commonUtils.isEmptyObject(sisproductclassifyProcessClassifyConfig) && formData.length > 0 && sModelsType === 'element/sisproductclassify') { |
| 125 | - const sId = currentId || this.props.masterData?.sId || ''; | |
| 125 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 126 | 126 | /* 数据Id */ |
| 127 | 127 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 128 | 128 | /* bGrd代表是否是表格 */ |
| ... | ... | @@ -147,7 +147,7 @@ export default (ChildComponent) => { |
| 147 | 147 | }); |
| 148 | 148 | } |
| 149 | 149 | if (commonUtils.isEmptyObject(masterConfig) && formData.length > 0 && sModelsType === 'element/processInfo') { |
| 150 | - const sId = currentId || this.props.masterData?.sId || ''; | |
| 150 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 151 | 151 | /* 数据Id */ |
| 152 | 152 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 153 | 153 | /* bGrd代表是否是表格 */ |
| ... | ... | @@ -214,7 +214,7 @@ export default (ChildComponent) => { |
| 214 | 214 | }); |
| 215 | 215 | } |
| 216 | 216 | if (commonUtils.isEmptyObject(picFileOldConfig) && formData.length > 0 && sModelsType === 'element/printInfo') { |
| 217 | - const sId = currentId || this.props.masterData?.sId || ''; | |
| 217 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 218 | 218 | /* 数据Id */ |
| 219 | 219 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 220 | 220 | /* bGrd代表是否是表格 */ |
| ... | ... | @@ -250,7 +250,7 @@ export default (ChildComponent) => { |
| 250 | 250 | } |
| 251 | 251 | // 常用规格信息 commonUtils.isEmptyArr(siscommonstyleproductclassifyColumn) |
| 252 | 252 | if (commonUtils.isEmptyObject(siscommonstyleproductclassifyConfig) && formData.length > 0 && sModelsType === 'element/siscommonstyle') { |
| 253 | - const sId = currentId || this.props.masterData?.sId || ''; | |
| 253 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 254 | 254 | /* 数据Id */ |
| 255 | 255 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 256 | 256 | /* bGrd代表是否是表格 */ |
| ... | ... | @@ -276,7 +276,7 @@ export default (ChildComponent) => { |
| 276 | 276 | } |
| 277 | 277 | // 班组信息 |
| 278 | 278 | if (commonUtils.isEmptyObject(eleemployeeOldConfig) && formData.length > 0 && sModelsType === 'element/teamInfo') { |
| 279 | - const sId = currentId || this.props.masterData?.sId || ''; | |
| 279 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 280 | 280 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'eleteam')[0]; |
| 281 | 281 | const eleemployeeConfig = formData.filter(item => item.bGrd && item.sTbName === 'eleteamemployee')[0]; |
| 282 | 282 | const eleemployeeColumn = commonFunc.getHeaderConfig(eleemployeeConfig); |
| ... | ... | @@ -306,7 +306,7 @@ export default (ChildComponent) => { |
| 306 | 306 | }); |
| 307 | 307 | } |
| 308 | 308 | if (commonUtils.isEmptyObject(jurgroupOldConfig) && formData.length > 0 && sModelsType === 'element/sftloginInfo') { |
| 309 | - const sId = currentId || this.props.masterData?.sId || ''; | |
| 309 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 310 | 310 | /* 数据Id */ |
| 311 | 311 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 312 | 312 | /* bGrd代表是否是表格 */ |
| ... | ... | @@ -382,7 +382,7 @@ export default (ChildComponent) => { |
| 382 | 382 | }); |
| 383 | 383 | } |
| 384 | 384 | if ((bReceived === undefined || !bReceived) && formData.length > 0 && sModelsType === 'system/sisformulaInfo') { |
| 385 | - const sId = currentId || this.props.masterData?.sId || ''; | |
| 385 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 386 | 386 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'sisformula')[0]; |
| 387 | 387 | const paramConfig = formData.filter(item => item.bGrd && item.sTbName === 'sisformulaparam')[0]; |
| 388 | 388 | let customizeParamConfig = commonUtils.isNotEmptyArr(formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizeparam')) ? formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizeparam')[0] : {}; |
| ... | ... | @@ -553,7 +553,7 @@ export default (ChildComponent) => { |
| 553 | 553 | }); |
| 554 | 554 | } |
| 555 | 555 | if ((bReceived === undefined || !bReceived) && formData.length > 0 && sModelsType === 'element/machineInfo') { |
| 556 | - const sId = currentId || this.props.masterData?.sId || ''; | |
| 556 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 557 | 557 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'elemachine')[0]; |
| 558 | 558 | let addState = {}; |
| 559 | 559 | let slaveConfig = {}; |
| ... | ... | @@ -627,7 +627,7 @@ export default (ChildComponent) => { |
| 627 | 627 | }); |
| 628 | 628 | } |
| 629 | 629 | if (commonUtils.isEmptyObject(userOldConfig) && formData.length > 0 && sModelsType === 'element/checkModelInfo') { |
| 630 | - const sId = currentId || this.props.masterData?.sId || ''; | |
| 630 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 631 | 631 | /* 数据Id */ |
| 632 | 632 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'elecheckmodel')[0]; |
| 633 | 633 | /* bGrd代表是否是表格 */ |
| ... | ... | @@ -662,7 +662,7 @@ export default (ChildComponent) => { |
| 662 | 662 | }); |
| 663 | 663 | } |
| 664 | 664 | if (commonUtils.isEmptyObject(sischeckphaselogininfoOldConfig) && formData.length > 0 && sModelsType === 'element/checkPhaseInfo') { |
| 665 | - const sId = currentId || this.props.masterData?.sId || ''; | |
| 665 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 666 | 666 | /* 数据Id */ |
| 667 | 667 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'sischeckphase')[0]; |
| 668 | 668 | /* bGrd代表是否是表格 */ |
| ... | ... | @@ -687,7 +687,7 @@ export default (ChildComponent) => { |
| 687 | 687 | }); |
| 688 | 688 | } |
| 689 | 689 | if ((bReceived === undefined || !bReceived) && formData.length > 0 && sModelsType === 'sis/paymentTerms') { |
| 690 | - const sId = currentId || this.props.masterData?.sId || ''; | |
| 690 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 691 | 691 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'sispayment')[0]; |
| 692 | 692 | |
| 693 | 693 | const firstRow = masterConfig.gdsconfigformslave.filter(item => item.bVisible && item.sName === 'sName'); |
| ... | ... | @@ -713,7 +713,7 @@ export default (ChildComponent) => { |
| 713 | 713 | }); |
| 714 | 714 | } |
| 715 | 715 | if (commonUtils.isEmptyObject(employeeConfig) && formData.length > 0 && sModelsType === 'element/employeeInfo') { |
| 716 | - const sId = currentId || this.props.masterData?.sId || ''; | |
| 716 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 717 | 717 | /* 数据Id */ |
| 718 | 718 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 719 | 719 | /* bGrd代表是否是表格 */ |
| ... | ... | @@ -735,7 +735,7 @@ export default (ChildComponent) => { |
| 735 | 735 | }); |
| 736 | 736 | } |
| 737 | 737 | if (formData.length > 0 && commonUtils.isEmptyObject(sysmsguserOldConfig) && sModelsType === 'smg/sendMailMsg') { |
| 738 | - const sId = currentId || this.props.masterData?.sId || ''; | |
| 738 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 739 | 739 | /* 数据Id */ |
| 740 | 740 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 741 | 741 | |
| ... | ... | @@ -762,7 +762,7 @@ export default (ChildComponent) => { |
| 762 | 762 | }); |
| 763 | 763 | } |
| 764 | 764 | if (formData.length > 0 && commonUtils.isEmptyObject(masterConfig) && sModelsType === 'sis/monthEndingClosing') { |
| 765 | - const sId = currentId || this.props.masterData?.sId || ''; | |
| 765 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 766 | 766 | masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 767 | 767 | |
| 768 | 768 | const firstRow = masterConfig.gdsconfigformslave[0]; |
| ... | ... | @@ -784,7 +784,7 @@ export default (ChildComponent) => { |
| 784 | 784 | } |
| 785 | 785 | /* 刀模信息 */ |
| 786 | 786 | if (commonUtils.isEmptyObject(eleknifemouldOldproductConfig) && formData.length > 0 && sModelsType === 'element/knifemouldInfo') { |
| 787 | - const sId = currentId || this.props.masterData?.sId || ''; | |
| 787 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 788 | 788 | /* 数据Id */ |
| 789 | 789 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 790 | 790 | /* bGrd代表是否是表格 */ |
| ... | ... | @@ -821,7 +821,7 @@ export default (ChildComponent) => { |
| 821 | 821 | } |
| 822 | 822 | /* 检验标准 */ |
| 823 | 823 | if (commonUtils.isEmptyObject(eleteststandardOlditemConfig) && formData.length > 0 && sModelsType === 'element/eleteststandInfo') { |
| 824 | - const sId = currentId || this.props.masterData?.sId || ''; | |
| 824 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 825 | 825 | /* 数据Id */ |
| 826 | 826 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 827 | 827 | /* bGrd代表是否是表格 */ | ... | ... |
src/components/Common/CommonGroupBillEvent.js
| ... | ... | @@ -64,7 +64,7 @@ export default (ChildComponent) => { |
| 64 | 64 | } = nextProps; |
| 65 | 65 | const { masterConfig: masterConfigOld, app } = nextProps; |
| 66 | 66 | if (commonUtils.isEmptyObject(masterConfigOld) && formData.length > 0) { |
| 67 | - const sId = currentId !== undefined ? currentId : ''; | |
| 67 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 68 | 68 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 69 | 69 | |
| 70 | 70 | const sReasonTitle = commonUtils.isNotEmptyObject(commonFunc.showMessage(app.commonConst, 'sReason'))? |
| ... | ... | @@ -360,7 +360,7 @@ export default (ChildComponent) => { |
| 360 | 360 | /** 获取主表、从表、审核表数据 */ |
| 361 | 361 | handleGetData = async (masterConfig, slaveConfig, slave0Config, slave1Config, slave2Config, slave3Config, slave4Config, bEditClick, slave5Config, slave6Config, slave7Config, slave8Config, slave9Config, slave10Config) => { |
| 362 | 362 | const { currentId, app } = this.props; /* 当前页签数据 */ |
| 363 | - const sId = currentId !== undefined ? currentId : ''; | |
| 363 | + const sId = currentId || this.props.masterData?.sId || ''; | |
| 364 | 364 | const { sModelsId, masterData, sModelsType, slaveSelectedRowKeys } = this.props; |
| 365 | 365 | await this.props.handleGetDataOne({ name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick }); |
| 366 | 366 | let addStateSlave = {}; |
| ... | ... | @@ -530,7 +530,7 @@ export default (ChildComponent) => { |
| 530 | 530 | /* 获取表数据 */ |
| 531 | 531 | handleGetMemoData = async (slaveConfig, slave0Config, slave1Config, slave2Config, slave3Config, slave4Config) => { |
| 532 | 532 | const { currentId } = this.props; /* 当前页签数据 */ |
| 533 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 533 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 534 | 534 | const addStateSlave = slaveConfig ? await this.props.handleGetDataSet({ |
| 535 | 535 | name: 'slave', configData: slaveConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, |
| 536 | 536 | }) : ''; |
| ... | ... | @@ -564,7 +564,7 @@ export default (ChildComponent) => { |
| 564 | 564 | /* 获取单张表数据 */ |
| 565 | 565 | handleGetOneMemoData = (memoName, memoConfig) => { |
| 566 | 566 | const { currentId } = this.props; /* 当前页签数据 */ |
| 567 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 567 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 568 | 568 | if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ |
| 569 | 569 | this.props.handleGetDataSet({ |
| 570 | 570 | name: memoName, configData: memoConfig, condition: { sSqlCondition: { sParentId: sId } }, | ... | ... |
src/components/Common/CommonJurisdictionEvent.js
| ... | ... | @@ -22,7 +22,7 @@ export default (ChildComponent) => { |
| 22 | 22 | formData, currentId, groupConfig, treeData, |
| 23 | 23 | } = nextProps; |
| 24 | 24 | let { bReceived } = nextProps; |
| 25 | - const sId = currentId !== undefined ? currentId : ''; | |
| 25 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 26 | 26 | |
| 27 | 27 | if (commonUtils.isEmptyObject(groupConfig) && bReceived === undefined) { |
| 28 | 28 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| ... | ... | @@ -199,7 +199,7 @@ export default (ChildComponent) => { |
| 199 | 199 | handleGetSlaveData = (getType, sName, currConfig) => { |
| 200 | 200 | const { currentId } = this.props; |
| 201 | 201 | /* 当前页签数据 */ |
| 202 | - const sId = currentId !== undefined ? currentId : ''; | |
| 202 | + const sId = currentId || this.props.masterData?.sId || ''; | |
| 203 | 203 | if (getType === 'One') { |
| 204 | 204 | this.props.handleGetDataOne({ |
| 205 | 205 | name: 'master', configData: currConfig, condition: { sId, pageSize: '', pageNum: '' }, | ... | ... |
src/components/Common/CommonJurisdictionNewEvent.js
| ... | ... | @@ -23,7 +23,7 @@ export default (ChildComponent) => { |
| 23 | 23 | formData, currentId, groupConfig, treeData, formRoute, |
| 24 | 24 | } = nextProps; |
| 25 | 25 | let { bReceived } = nextProps; |
| 26 | - const sId = currentId !== undefined ? currentId : ''; | |
| 26 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 27 | 27 | |
| 28 | 28 | if (commonUtils.isEmptyObject(groupConfig) && bReceived === undefined) { |
| 29 | 29 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| ... | ... | @@ -228,7 +228,7 @@ export default (ChildComponent) => { |
| 228 | 228 | handleGetSlaveData = (getType, sName, currConfig) => { |
| 229 | 229 | const { currentId } = this.props; |
| 230 | 230 | /* 当前页签数据 */ |
| 231 | - const sId = currentId !== undefined ? currentId : ''; | |
| 231 | + const sId = currentId || this.props.masterData?.sId || ''; | |
| 232 | 232 | if (getType === 'One') { |
| 233 | 233 | this.props.handleGetDataOne({ |
| 234 | 234 | name: 'master', configData: currConfig, condition: { sId, pageSize: '', pageNum: '' }, | ... | ... |
src/components/Common/CommonListEditEvent.js
| ... | ... | @@ -65,7 +65,7 @@ export default (ChildComponent) => { |
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | 67 | if (commonUtils.isEmptyObject(slaveConfigOld) && formData.length > 0 && (formRoute.indexOf('/indexOee') > -1 || searchSolution !== undefined)) { |
| 68 | - const sId = currentId !== undefined ? currentId : ''; | |
| 68 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 69 | 69 | /* 数据Id */ |
| 70 | 70 | const slaveConfig = formData[0]; |
| 71 | 71 | let addState = {}; | ... | ... |
src/components/Common/CommonListEvent.js
| ... | ... | @@ -65,7 +65,7 @@ export default (ChildComponent) => { |
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | 67 | if (commonUtils.isEmptyObject(slaveConfigOld) && formData.length > 0 && (formRoute.indexOf('/indexOee') > -1 || searchSolution !== undefined)) { |
| 68 | - const sId = currentId !== undefined ? currentId : ''; | |
| 68 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 69 | 69 | /* 数据Id */ |
| 70 | 70 | const slaveConfig = formData[0]; |
| 71 | 71 | let addState = {}; | ... | ... |
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/CommonListTabEvent.js
| ... | ... | @@ -65,7 +65,7 @@ export default (ChildComponent) => { |
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | 67 | if (commonUtils.isEmptyObject(slaveConfigOld) && formData.length > 0 && (formRoute.indexOf('/indexOee') > -1 || searchSolution !== undefined)) { |
| 68 | - const sId = currentId !== undefined ? currentId : ''; | |
| 68 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 69 | 69 | /* 数据Id */ |
| 70 | 70 | const slaveConfig = formData[0]; |
| 71 | 71 | let addState = {}; | ... | ... |
src/components/Common/CommonListTreeEvent.js
| ... | ... | @@ -58,7 +58,7 @@ export default (ChildComponent) => { |
| 58 | 58 | let { iPageSize } = nextProps; |
| 59 | 59 | |
| 60 | 60 | if (commonUtils.isEmptyObject(slaveConfigOld) && formData.length > 0 && (formRoute.indexOf('/indexOee') > -1 || searchSolution !== undefined)) { |
| 61 | - const sId = currentId !== undefined ? currentId : ''; | |
| 61 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 62 | 62 | /* 数据Id */ |
| 63 | 63 | const slaveConfig = formData[0]; |
| 64 | 64 | const addState = {}; | ... | ... |
src/components/Common/CommonNewBillEvent.js
| ... | ... | @@ -66,7 +66,7 @@ export default (ChildComponent) => { |
| 66 | 66 | } = nextProps; |
| 67 | 67 | const { masterConfig: masterConfigOld, app } = nextProps; |
| 68 | 68 | if (commonUtils.isEmptyObject(masterConfigOld) && formData.length > 0) { |
| 69 | - const sId = currentId !== undefined ? currentId : ''; | |
| 69 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 70 | 70 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 71 | 71 | |
| 72 | 72 | const sReasonTitle = commonUtils.isNotEmptyObject(commonFunc.showMessage(app.commonConst, 'sReason'))? |
| ... | ... | @@ -593,7 +593,7 @@ export default (ChildComponent) => { |
| 593 | 593 | /* 获取表数据 */ |
| 594 | 594 | handleGetMemoData = async (slaveConfig, slave0Config, slave1Config, slave2Config, slave3Config, slave4Config) => { |
| 595 | 595 | const { currentId } = this.props; /* 当前页签数据 */ |
| 596 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 596 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 597 | 597 | const addStateSlave = slaveConfig ? await this.props.handleGetDataSet({ |
| 598 | 598 | name: 'slave', configData: slaveConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, |
| 599 | 599 | }) : ''; |
| ... | ... | @@ -627,7 +627,7 @@ export default (ChildComponent) => { |
| 627 | 627 | /* 获取单张表数据 */ |
| 628 | 628 | handleGetOneMemoData = (memoName, memoConfig) => { |
| 629 | 629 | const { currentId } = this.props; /* 当前页签数据 */ |
| 630 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 630 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 631 | 631 | if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ |
| 632 | 632 | this.props.handleGetDataSet({ |
| 633 | 633 | name: memoName, configData: memoConfig, condition: { sSqlCondition: { sParentId: sId } }, |
| ... | ... | @@ -1935,7 +1935,7 @@ export default (ChildComponent) => { |
| 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) => { |
| 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/CommonNewTabBillEvent.js
| ... | ... | @@ -65,7 +65,7 @@ export default (ChildComponent) => { |
| 65 | 65 | } = nextProps; |
| 66 | 66 | const { masterConfig: masterConfigOld, app } = nextProps; |
| 67 | 67 | if (commonUtils.isEmptyObject(masterConfigOld) && formData.length > 0) { |
| 68 | - const sId = currentId !== undefined ? currentId : ''; | |
| 68 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 69 | 69 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 70 | 70 | |
| 71 | 71 | const sReasonTitle = commonUtils.isNotEmptyObject(commonFunc.showMessage(app.commonConst, 'sReason'))? |
| ... | ... | @@ -514,7 +514,7 @@ export default (ChildComponent) => { |
| 514 | 514 | } |
| 515 | 515 | |
| 516 | 516 | const { currentId, app } = this.props; /* 当前页签数据 */ |
| 517 | - const sId = currentId !== undefined ? currentId : ''; | |
| 517 | + const sId = currentId || this.props.masterData?.sId || ''; | |
| 518 | 518 | const { sModelsId, masterData, sModelsType, slaveSelectedRowKeys } = this.props; |
| 519 | 519 | const conditonValues = this.handleGetSqlConditionValues(masterConfig) |
| 520 | 520 | await this.props.handleGetDataOne({ name: 'master', configData: masterConfig, condition: { sSqlCondition: { ...conditonValues }, sId, pageSize: '', pageNum: '' }, bEditClick }); |
| ... | ... | @@ -707,7 +707,7 @@ export default (ChildComponent) => { |
| 707 | 707 | |
| 708 | 708 | handleGetData1 = async (configArr, bEditClick, other, isWait) => { |
| 709 | 709 | const { currentId } = this.props; /* 当前页签数据 */ |
| 710 | - const sId = currentId !== undefined ? currentId : ''; | |
| 710 | + const sId = currentId || this.props.masterData?.sId || ''; | |
| 711 | 711 | |
| 712 | 712 | let addState = {}; |
| 713 | 713 | |
| ... | ... | @@ -846,7 +846,7 @@ export default (ChildComponent) => { |
| 846 | 846 | /* 获取表数据 */ |
| 847 | 847 | handleGetMemoData = async (slaveConfig, slave0Config, slave1Config, slave2Config, slave3Config, slave4Config) => { |
| 848 | 848 | const { currentId } = this.props; /* 当前页签数据 */ |
| 849 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 849 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 850 | 850 | const addStateSlave = slaveConfig ? await this.props.handleGetDataSet({ |
| 851 | 851 | name: 'slave', configData: slaveConfig, condition: { sSqlCondition: { ...this.handleGetSqlConditionValues(slaveConfig), sParentId: sId } }, isWait: true, |
| 852 | 852 | }) : ''; |
| ... | ... | @@ -880,7 +880,7 @@ export default (ChildComponent) => { |
| 880 | 880 | /* 获取单张表数据 */ |
| 881 | 881 | handleGetOneMemoData = (memoName, memoConfig) => { |
| 882 | 882 | const { currentId } = this.props; /* 当前页签数据 */ |
| 883 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 883 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 884 | 884 | if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ |
| 885 | 885 | this.props.handleGetDataSet({ |
| 886 | 886 | name: memoName, configData: memoConfig, condition: { sSqlCondition: { ...this.handleGetSqlConditionValues(memoConfig), sParentId: sId } }, | ... | ... |
src/components/Common/CommonProductionPlanEvent.js
| ... | ... | @@ -34,7 +34,7 @@ export default (ChildComponent) => { |
| 34 | 34 | const { otherCondition } = currentPane; |
| 35 | 35 | if (formData.length > 0 && commonUtils.isEmptyObject(teamConfig) && commonUtils.isEmptyArr(searchSolution)) { |
| 36 | 36 | isReceive = false; |
| 37 | - const sId = currentId !== undefined ? currentId : ''; | |
| 37 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 38 | 38 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'eleteam')[0]; |
| 39 | 39 | |
| 40 | 40 | teamConfig = formData.filter(item => item.sTbName === 'Sp_Manufacture_ProductionPlanInfo_WorkCenter')[0]; | ... | ... |
src/components/Common/CommonProductionPlanOutsideEvent.js
| ... | ... | @@ -36,7 +36,7 @@ export default (ChildComponent) => { |
| 36 | 36 | const { otherCondition } = currentPane; |
| 37 | 37 | if (formData.length > 0 && commonUtils.isEmptyObject(teamConfig) && commonUtils.isEmptyArr(searchSolution)) { |
| 38 | 38 | isReceive = false; |
| 39 | - const sId = currentId !== undefined ? currentId : ''; | |
| 39 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 40 | 40 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'eleteam')[0]; |
| 41 | 41 | |
| 42 | 42 | teamConfig = formData.filter(item => item.sTbName === 'Sp_Manufacture_ProductionPlanInfo_WorkCenter2')[0]; | ... | ... |
src/components/Common/CommonProductionPlanTreeEvent.js
| ... | ... | @@ -102,7 +102,7 @@ export default (ChildComponent) => { |
| 102 | 102 | const { otherCondition } = currentPane; |
| 103 | 103 | if (formData.length > 0 && !treeLoaded && searchSolution !== undefined) { |
| 104 | 104 | isReceive = false; |
| 105 | - const sId = currentId !== undefined ? currentId : ''; | |
| 105 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 106 | 106 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'eleteam')[0]; |
| 107 | 107 | treeLoaded = true; |
| 108 | 108 | // teamConfig = formData.filter(item => item.sTbName === 'Sp_Manufacture_ProductionPlanInfo_WorkCenter')[0]; | ... | ... |
src/components/Common/CommonSubBillEvent.js
| ... | ... | @@ -51,7 +51,7 @@ export default (ChildComponent) => { |
| 51 | 51 | employeeConfig: employeeConfigOld, |
| 52 | 52 | } = nextProps; |
| 53 | 53 | if (commonUtils.isEmptyObject(slaveConfigOld) && formData.length > 0 && (sModelsType !== 'cashier/financialTransfer' && sModelsType !== 'cashier/financialAdjustment' && sModelsType !== 'quality/accident' && sModelsType !== 'purchase/purchaseEnquiry' && sModelsType !== 'complaint/complaint' && sModelsType !== 'print/printLabel' && sModelsType !== 'commonBill/onlyMaster' && formRoute.indexOf('indexOee') === -1)) { |
| 54 | - const sId = currentId !== undefined ? currentId : ''; | |
| 54 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 55 | 55 | /* 数据Id */ |
| 56 | 56 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 57 | 57 | const BtnDesignFunctionConfig = commonUtils.isNotEmptyObject(masterConfig) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'BtnBsOperation.BtnDesignFunction') : {}; |
| ... | ... | @@ -506,7 +506,7 @@ export default (ChildComponent) => { |
| 506 | 506 | }); |
| 507 | 507 | } else if (commonUtils.isEmptyObject(masterConfigOld) && formData.length === 1 && (sModelsType === 'cashier/financialTransfer' || sModelsType === 'purchase/purchaseEnquiry' || sModelsType === 'cashier/financialAdjustment' || sModelsType === 'print/printLabel' || sModelsType === 'complaint/complaint' || sModelsType === 'commonBill/onlyMaster') && formRoute.indexOf('indexOee') === -1) { |
| 508 | 508 | const config = {}; |
| 509 | - const sId = currentId !== undefined ? currentId : ''; | |
| 509 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 510 | 510 | /* 数据Id */ |
| 511 | 511 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 512 | 512 | let addState = {}; |
| ... | ... | @@ -528,7 +528,7 @@ export default (ChildComponent) => { |
| 528 | 528 | masterConfig, sId, pageLoading: false, ...addState, |
| 529 | 529 | }); |
| 530 | 530 | } else if (commonUtils.isEmptyObject(slaveConfigOld) && commonUtils.isEmptyObject(masterConfigOld) && formData.length === 2 && (sModelsType === 'quality/accident') && formRoute.indexOf('indexOee') === -1) { |
| 531 | - const sId = currentId !== undefined ? currentId : ''; | |
| 531 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 532 | 532 | /* 数据Id */ |
| 533 | 533 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 534 | 534 | const slaveConfig = formData.filter(item => item.bGrd && item.sTbName === 'mftqualityaccidentSlave')[0]; |
| ... | ... | @@ -551,7 +551,7 @@ export default (ChildComponent) => { |
| 551 | 551 | }); |
| 552 | 552 | } else if (formRoute.indexOf('indexOee') > -1 && commonUtils.isEmptyObject(employeeConfigOld) && commonUtils.isEmptyObject(slaveConfigOld) && formData.length > 0) { |
| 553 | 553 | if (formRoute === '/indexOee/labelPrint' && commonUtils.isEmpty(slaveConfigOld)) { /* 入库标签打印 */ |
| 554 | - const sId = currentId !== undefined ? currentId : ''; | |
| 554 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 555 | 555 | /* 数据Id */ |
| 556 | 556 | const masterConfig = formData[0]; |
| 557 | 557 | const slaveConfig = formData[0]; |
| ... | ... | @@ -745,7 +745,7 @@ export default (ChildComponent) => { |
| 745 | 745 | /** 获取主表、从表、审核表数据 */ |
| 746 | 746 | handleGetData = async (masterConfig, slaveConfig, checkConfig, bEditClick) => { |
| 747 | 747 | const { currentId, sModelsId } = this.props; /* 当前页签数据 */ |
| 748 | - const sId = currentId !== undefined ? currentId : ''; | |
| 748 | + const sId = currentId || this.props.masterData?.sId || ''; | |
| 749 | 749 | await this.props.handleGetDataOne({ |
| 750 | 750 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, |
| 751 | 751 | }); |
| ... | ... | @@ -786,7 +786,7 @@ export default (ChildComponent) => { |
| 786 | 786 | /* 获取表数据 */ |
| 787 | 787 | handleGetMemoData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig) => { |
| 788 | 788 | const { currentId, sModelsType } = this.props; /* 当前页签数据 */ |
| 789 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 789 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 790 | 790 | const addStateControl = await this.props.handleGetDataSet({ |
| 791 | 791 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, |
| 792 | 792 | }); |
| ... | ... | @@ -839,7 +839,7 @@ export default (ChildComponent) => { |
| 839 | 839 | /* 获取单张表数据 */ |
| 840 | 840 | handleGetOneMemoData = (memoName, memoConfig) => { |
| 841 | 841 | const { currentId } = this.props; /* 当前页签数据 */ |
| 842 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 842 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 843 | 843 | if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ |
| 844 | 844 | this.props.handleGetDataSet({ |
| 845 | 845 | name: memoName, configData: memoConfig, condition: { sSqlCondition: { sParentId: sId } }, |
| ... | ... | @@ -849,7 +849,7 @@ export default (ChildComponent) => { |
| 849 | 849 | |
| 850 | 850 | handleGetMemoData1 = async (memoDataList, isWait) => { |
| 851 | 851 | const { currentId, sModelsType, sModelsId } = this.props; /* 当前页签数据 */ |
| 852 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 852 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 853 | 853 | let addState = {}; |
| 854 | 854 | // eslint-disable-next-line no-plusplus |
| 855 | 855 | for (let i = 0; i < memoDataList.length; i++) { |
| ... | ... | @@ -2815,7 +2815,7 @@ export default (ChildComponent) => { |
| 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) => { |
| 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/CommonSystemSettingEvent.js
| ... | ... | @@ -23,7 +23,7 @@ export default (ChildComponent) => { |
| 23 | 23 | const { formData, currentId } = nextProps; |
| 24 | 24 | let { masterConfig } = nextProps; |
| 25 | 25 | if (commonUtils.isEmptyArr(masterConfig) && formData.length > 0) { |
| 26 | - const sId = currentId !== undefined ? currentId : ''; | |
| 26 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 27 | 27 | masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 28 | 28 | const sysaccountperiodConfig = formData.filter(item => item.bGrd && item.sTbName === 'sysaccountperiod')[0]; |
| 29 | 29 | const sysaccountperiodColumn = commonFunc.getHeaderConfig(sysaccountperiodConfig); |
| ... | ... | @@ -58,7 +58,7 @@ export default (ChildComponent) => { |
| 58 | 58 | } |
| 59 | 59 | handleGetData = (masterConfig, sysaccountperiodConfig, sysbillnosettingsConfig, syspushMsgConfig) => { |
| 60 | 60 | const { currentId, year } = this.props; |
| 61 | - const sId = currentId !== undefined ? currentId : ''; | |
| 61 | + const sId = currentId || this.props.masterData?.sId || ''; | |
| 62 | 62 | const condition = { |
| 63 | 63 | sSqlCondition: { |
| 64 | 64 | sParentId: masterConfig.sId, | ... | ... |
src/components/Common/CommonTable/index.js
| ... | ... | @@ -6987,6 +6987,7 @@ class CommonTableRc extends React.Component { |
| 6987 | 6987 | } |
| 6988 | 6988 | |
| 6989 | 6989 | const hasColorInfo = this.props?.masterConfig?.sTableColorTs; |
| 6990 | + const BtnUpload = commonFunc.showLocalMessage(this.props, "BtnUpload", "上传"); | |
| 6990 | 6991 | |
| 6991 | 6992 | return ( |
| 6992 | 6993 | <FormItem className={styles.subForm} style={{ height: '100%' }}> |
| ... | ... | @@ -7009,7 +7010,7 @@ class CommonTableRc extends React.Component { |
| 7009 | 7010 | this.uploadRef.setAttribute('contenteditable', "true"); |
| 7010 | 7011 | }} |
| 7011 | 7012 | > |
| 7012 | - <UploadOutlined /> 上传 | |
| 7013 | + <UploadOutlined /> {BtnUpload} | |
| 7013 | 7014 | </Button> |
| 7014 | 7015 | </Upload> |
| 7015 | 7016 | : null } | ... | ... |
src/components/Common/MakeUpPDF/index.js
| ... | ... | @@ -226,6 +226,8 @@ const MakeUpPDF = baseProps => { |
| 226 | 226 | }; |
| 227 | 227 | |
| 228 | 228 | const tabsConfig = masterConfig.gdsconfigformslave.filter(item => item.sName && item.bVisible && item.sControlName); |
| 229 | + const tabOrderInfomation = commonFunc.showLocalMessage(props, "tabOrderInfomation", "订单信息"); | |
| 230 | + const tabPlatemakingProgress = commonFunc.showLocalMessage(props, "tabPlatemakingProgress", "拼版进度"); | |
| 229 | 231 | |
| 230 | 232 | return ( |
| 231 | 233 | <AntdDraggableModal |
| ... | ... | @@ -270,8 +272,8 @@ const MakeUpPDF = baseProps => { |
| 270 | 272 | ), |
| 271 | 273 | }} |
| 272 | 274 | items={[ |
| 273 | - { label: "订单信息", key: "100", children: <SlaveComponent {...props} /> }, | |
| 274 | - { label: "拼板进度", key: "200", children: <ProcessComponent {...props} /> }, | |
| 275 | + { label: tabOrderInfomation, key: "100", children: <SlaveComponent {...props} /> }, | |
| 276 | + { label: tabPlatemakingProgress, key: "200", children: <ProcessComponent {...props} /> }, | |
| 275 | 277 | ...tabsConfig.map((config, index) => { |
| 276 | 278 | const { showName, sName } = config; |
| 277 | 279 | const fileUrl = masterData[sName]; | ... | ... |
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/FilfileManageInfo.js
| ... | ... | @@ -193,6 +193,8 @@ const FilfileManageComponent = Form.create({ |
| 193 | 193 | tableProps: { setUpload: true, setDownload: true }, |
| 194 | 194 | enabled: true, |
| 195 | 195 | }; |
| 196 | + const BtnSure = commonFunc.showLocalMessage(props, "BtnSure", "确定"); | |
| 197 | + const BtnCancel = commonFunc.showLocalMessage(props, "BtnCancel", "取消"); | |
| 196 | 198 | return ( |
| 197 | 199 | <Form > |
| 198 | 200 | <Layout> |
| ... | ... | @@ -204,8 +206,8 @@ const FilfileManageComponent = Form.create({ |
| 204 | 206 | </div> |
| 205 | 207 | </Layout> |
| 206 | 208 | <div style={{ textAlign: 'right', marginRight: '9px', marginBottom: '9px' }}> |
| 207 | - <Button key="back" style={{ marginRight: '8px' }} onClick={props.onModalCancel.bind(this, 'visibleFilfile')}>取消</Button> | |
| 208 | - <Button type="primary" onClick={props.onModalOk.bind(this, 'visibleFilfile')}>确认</Button> | |
| 209 | + <Button key="back" style={{ marginRight: '8px' }} onClick={props.onModalCancel.bind(this, 'visibleFilfile')}>{BtnCancel}</Button> | |
| 210 | + <Button type="primary" onClick={props.onModalOk.bind(this, 'visibleFilfile')}>{BtnSure}</Button> | |
| 209 | 211 | </div> |
| 210 | 212 | </Layout> |
| 211 | 213 | </Form> | ... | ... |
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/ProcessCard/ProcessCard.js
| ... | ... | @@ -55,7 +55,7 @@ class ProcessCard extends Component { |
| 55 | 55 | } = nextProps; |
| 56 | 56 | const { formData, currentId } = nextProps; |
| 57 | 57 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { |
| 58 | - const sId = currentId !== undefined ? currentId : ''; | |
| 58 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 59 | 59 | /* 数据Id */ |
| 60 | 60 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 61 | 61 | /* bGrd代表是否是表格 */ |
| ... | ... | @@ -136,7 +136,7 @@ class ProcessCard extends Component { |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | // // 未清复制到时,产品ID需要再获取动态部件 |
| 139 | - // const sId = currentId !== undefined ? currentId : ''; | |
| 139 | + // const sId = currentId || nextProps.masterData?.sId || ''; | |
| 140 | 140 | // if (sId === '' && commonUtils.isNotEmptyObject(this.props.masterData) && !this.props.bGetPartsData) { |
| 141 | 141 | // const { sAllPartsName } = this.props.masterData; |
| 142 | 142 | // if (sAllPartsName !== undefined) { |
| ... | ... | @@ -164,7 +164,7 @@ class ProcessCard extends Component { |
| 164 | 164 | /* 获取表数据 */ |
| 165 | 165 | handleGetData = async (controlConfig, materialsConfig, processConfig, colorConfig, dailyConfig, extraState = {}) => { |
| 166 | 166 | const { currentId } = this.props; /* 当前页签数据 */ |
| 167 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 167 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 168 | 168 | const addStateControl = await this.props.handleGetDataSet({ |
| 169 | 169 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, |
| 170 | 170 | }); | ... | ... |
src/components/Manufacture/ProcessCardPack/ProcessCardPack.js
| ... | ... | @@ -80,7 +80,7 @@ class ProcessCardPack extends Component { |
| 80 | 80 | } = nextProps; |
| 81 | 81 | const { formData, currentId } = nextProps; |
| 82 | 82 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { |
| 83 | - const sId = currentId !== undefined ? currentId : ''; | |
| 83 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 84 | 84 | /* 数据Id */ |
| 85 | 85 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 86 | 86 | /* bGrd代表是否是表格 */ |
| ... | ... | @@ -210,7 +210,7 @@ class ProcessCardPack extends Component { |
| 210 | 210 | } |
| 211 | 211 | } |
| 212 | 212 | // // 未清复制到时,产品ID需要再获取动态部件; |
| 213 | - // const sId = currentId !== undefined ? currentId : ''; | |
| 213 | + // const sId = currentId || nextProps.masterData?.sId || ''; | |
| 214 | 214 | // if (sId === '' && commonUtils.isNotEmptyObject(this.props.masterData) && !this.props.bGetPartsData) { |
| 215 | 215 | // const { sAllPartsName } = this.props.masterData; |
| 216 | 216 | // if (sAllPartsName !== undefined) { |
| ... | ... | @@ -287,7 +287,7 @@ class ProcessCardPack extends Component { |
| 287 | 287 | /* 获取表数据 */ |
| 288 | 288 | handleGetData = async (controlConfig, materialsConfig, processConfig, colorConfig, dailyConfig, packConfig, extraState = {}) => { |
| 289 | 289 | const { currentId, slaveData } = this.props; /* 当前页签数据 */ |
| 290 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 290 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 291 | 291 | const addStateControl = await this.props.handleGetDataSet({ |
| 292 | 292 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, |
| 293 | 293 | }); | ... | ... |
src/components/Manufacture/ProcessCardPack/ProcessCardPackTableTree.js
| ... | ... | @@ -98,7 +98,7 @@ class ProcessCardPackTableTree extends Component { |
| 98 | 98 | } = nextProps; |
| 99 | 99 | const { formData, currentId } = nextProps; |
| 100 | 100 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { |
| 101 | - const sId = currentId !== undefined ? currentId : ''; | |
| 101 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 102 | 102 | /* 数据Id */ |
| 103 | 103 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 104 | 104 | if(masterConfig && masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'bLayout')[0]) { |
| ... | ... | @@ -273,7 +273,7 @@ class ProcessCardPackTableTree extends Component { |
| 273 | 273 | }); |
| 274 | 274 | } |
| 275 | 275 | // // 未清复制到时,产品ID需要再获取动态部件; |
| 276 | - // const sId = currentId !== undefined ? currentId : ''; | |
| 276 | + // const sId = currentId || nextProps.masterData?.sId || ''; | |
| 277 | 277 | // if (sId === '' && commonUtils.isNotEmptyObject(this.props.masterData) && !this.props.bGetPartsData) { |
| 278 | 278 | // const { sAllPartsName } = this.props.masterData; |
| 279 | 279 | // if (sAllPartsName !== undefined) { |
| ... | ... | @@ -426,7 +426,7 @@ class ProcessCardPackTableTree extends Component { |
| 426 | 426 | /* 获取表数据 */ |
| 427 | 427 | handleGetData1 = async (controlConfig, materialsConfig, processConfig, colorConfig, dailyConfig, packConfig, extraState = {}, configMap) => { |
| 428 | 428 | const { currentId, slaveData, masterData } = this.props; /* 当前页签数据 */ |
| 429 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 429 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 430 | 430 | const addStateControl = await this.props.handleGetDataSet({ |
| 431 | 431 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, |
| 432 | 432 | }); |
| ... | ... | @@ -703,7 +703,7 @@ class ProcessCardPackTableTree extends Component { |
| 703 | 703 | /* 获取表数据 */ |
| 704 | 704 | handleGetData = async (controlConfig, materialsConfig, processConfig, colorConfig, dailyConfig, packConfig, extraState = {}, configMap) => { |
| 705 | 705 | const { currentId, slaveData } = this.props; /* 当前页签数据 */ |
| 706 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 706 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 707 | 707 | |
| 708 | 708 | this.handleGetAllData(controlConfig, processConfig, sId, materialsConfig, colorConfig, dailyConfig, packConfig, extraState, configMap); |
| 709 | 709 | }; |
| ... | ... | @@ -711,7 +711,7 @@ class ProcessCardPackTableTree extends Component { |
| 711 | 711 | |
| 712 | 712 | handleGetOtherData = async (tableList, childTableList, configMap) => { |
| 713 | 713 | const { currentId, slaveData, sModelsType, masterData } = this.props; /* 当前页签数据 */ |
| 714 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 714 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 715 | 715 | if(commonUtils.isNotEmptyObject(configMap)){ |
| 716 | 716 | for (const configName of Object.keys(configMap)) { |
| 717 | 717 | const tableName = configName.replace('Config', '').trim(); | ... | ... |
src/components/Manufacture/WorkOrder/WorkOrder.js
| ... | ... | @@ -100,7 +100,7 @@ class WorkOrder extends Component { |
| 100 | 100 | } = nextProps; |
| 101 | 101 | const { formData, currentId } = nextProps; |
| 102 | 102 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { |
| 103 | - const sId = currentId !== undefined ? currentId : ''; | |
| 103 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 104 | 104 | /* 数据Id */ |
| 105 | 105 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 106 | 106 | /* bGrd代表是否是表格 */ |
| ... | ... | @@ -167,7 +167,7 @@ class WorkOrder extends Component { |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | // // 未清复制到时,产品ID需要再获取动态部件 |
| 170 | - // const sId = currentId !== undefined ? currentId : ''; | |
| 170 | + // const sId = currentId || nextProps.masterData?.sId || ''; | |
| 171 | 171 | // if (sId === '' && commonUtils.isNotEmptyObject(this.props.masterData) && !this.props.bGetPartsData) { |
| 172 | 172 | // const { sAllPartsName } = this.props.masterData; |
| 173 | 173 | // if (sAllPartsName !== undefined) { |
| ... | ... | @@ -220,7 +220,7 @@ class WorkOrder extends Component { |
| 220 | 220 | /* 获取表数据 */ |
| 221 | 221 | handleGetData = async (controlConfig, materialsConfig, processConfig, colorConfig, extraState = {}) => { |
| 222 | 222 | const { currentId } = this.props; /* 当前页签数据 */ |
| 223 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 223 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 224 | 224 | const addStateControl = await this.props.handleGetDataSet({ |
| 225 | 225 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, |
| 226 | 226 | }); | ... | ... |
src/components/Manufacture/WorkOrderPack/WorkOrderPack.js
| ... | ... | @@ -95,7 +95,7 @@ class WorkOrderPack extends Component { |
| 95 | 95 | } = nextProps; |
| 96 | 96 | const { formData, currentId } = nextProps; |
| 97 | 97 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { |
| 98 | - const sId = currentId !== undefined ? currentId : ''; | |
| 98 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 99 | 99 | /* 数据Id */ |
| 100 | 100 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 101 | 101 | /* bGrd代表是否是表格 */ |
| ... | ... | @@ -300,7 +300,7 @@ class WorkOrderPack extends Component { |
| 300 | 300 | /* 获取表数据 */ |
| 301 | 301 | handleGetData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig, extraState = {}) => { |
| 302 | 302 | const { currentId, slaveData, sModelsType } = this.props; /* 当前页签数据 */ |
| 303 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 303 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 304 | 304 | const addStateControl = await this.props.handleGetDataSet({ |
| 305 | 305 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, |
| 306 | 306 | }); | ... | ... |
src/components/Manufacture/WorkOrderPack/WorkOrderPackTableTree.js
| ... | ... | @@ -140,7 +140,7 @@ class WorkOrderPack extends Component { |
| 140 | 140 | } = nextProps; |
| 141 | 141 | const { formData, currentId, sModelsId } = nextProps; |
| 142 | 142 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { |
| 143 | - const sId = currentId !== undefined ? currentId : ''; | |
| 143 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 144 | 144 | /* 数据Id */ |
| 145 | 145 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 146 | 146 | if(masterConfig && masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'bLayout')[0]) { |
| ... | ... | @@ -613,7 +613,7 @@ class WorkOrderPack extends Component { |
| 613 | 613 | /* 获取表数据 */ |
| 614 | 614 | handleGetData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig, extraState = {}) => { |
| 615 | 615 | const { currentId, slaveData } = this.props; /* 当前页签数据 */ |
| 616 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 616 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 617 | 617 | |
| 618 | 618 | this.handleGetAllData(controlConfig, processConfig, sId, materialsConfig, colorConfig, packConfig, extraState); |
| 619 | 619 | }; |
| ... | ... | @@ -621,7 +621,7 @@ class WorkOrderPack extends Component { |
| 621 | 621 | |
| 622 | 622 | handleGetOtherData = async (tableList, childTableList, configMap) => { |
| 623 | 623 | const { currentId, slaveData, sModelsType, masterData } = this.props; /* 当前页签数据 */ |
| 624 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 624 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 625 | 625 | if(commonUtils.isNotEmptyObject(configMap)){ |
| 626 | 626 | for (const configName of Object.keys(configMap)) { |
| 627 | 627 | const tableName = configName.replace('Config', '').trim(); | ... | ... |
src/components/Manufacture/WorkOrderPack/WorkOrderResearchTableTree.js
| ... | ... | @@ -117,7 +117,7 @@ class WorkOrderPack extends Component { |
| 117 | 117 | } = nextProps; |
| 118 | 118 | const { formData, currentId, sModelsId } = nextProps; |
| 119 | 119 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { |
| 120 | - const sId = currentId !== undefined ? currentId : ''; | |
| 120 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 121 | 121 | /* 数据Id */ |
| 122 | 122 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 123 | 123 | if(masterConfig && masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'bLayout')[0]) { |
| ... | ... | @@ -428,7 +428,7 @@ class WorkOrderPack extends Component { |
| 428 | 428 | /* 获取表数据 */ |
| 429 | 429 | handleGetData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig, extraState = {}) => { |
| 430 | 430 | const { currentId, slaveData, sModelsType, masterData } = this.props; /* 当前页签数据 */ |
| 431 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 431 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 432 | 432 | const addStateControl = await this.props.handleGetDataSet({ |
| 433 | 433 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, |
| 434 | 434 | }); |
| ... | ... | @@ -540,7 +540,7 @@ class WorkOrderPack extends Component { |
| 540 | 540 | |
| 541 | 541 | handleGetOtherData = async (tableList, childTableList, configMap) => { |
| 542 | 542 | const { currentId, slaveData, sModelsType, masterData } = this.props; /* 当前页签数据 */ |
| 543 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 543 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 544 | 544 | if(commonUtils.isNotEmptyObject(configMap)){ |
| 545 | 545 | for (const configName of Object.keys(configMap)) { |
| 546 | 546 | const tableName = configName.replace('Config', '').trim(); |
| ... | ... | @@ -1524,8 +1524,12 @@ class WorkOrderPack extends Component { |
| 1524 | 1524 | /* 验证通过与不通过走不同的流程 */ |
| 1525 | 1525 | if (err) { /* 验证失败 */ |
| 1526 | 1526 | /* 直接渲染显示错误提示 */ |
| 1527 | + const language = this.props?.app?.userinfo?.sLanguage || 'sChinese'; // 默认简体中文 | |
| 1528 | + const requiredText = language === 'sEnglish' ? 'is Required' : | |
| 1529 | + (language === 'sBig5' ? '為必填項' : '为必填项'); | |
| 1527 | 1530 | for (const key of Object.keys(err)) { |
| 1528 | - message.warning(err[key].errors[0].message); | |
| 1531 | + const sContent = err[key].errors[0].message?.replace('为必填项', requiredText); | |
| 1532 | + message.warning(sContent); | |
| 1529 | 1533 | } |
| 1530 | 1534 | this.props.onSaveState({ |
| 1531 | 1535 | loading: false, |
| ... | ... | @@ -1543,6 +1547,7 @@ class WorkOrderPack extends Component { |
| 1543 | 1547 | }); |
| 1544 | 1548 | return; |
| 1545 | 1549 | } |
| 1550 | + console.log('3332', 1111); | |
| 1546 | 1551 | if (!commonBusiness.validateTable(slaveConfig, slaveData, this.props) || !commonBusiness.validateTable(controlConfig, controlData, this.props) || |
| 1547 | 1552 | (!commonBusiness.validateTable(materialsConfig, materialsData, this.props)) || !commonBusiness.validateTable(processConfig, processData, this.props) || |
| 1548 | 1553 | !commonBusiness.validateTable(colorConfig, colorData, this.props)) { | ... | ... |
src/components/Manufacture/WorkOrderPackTableTreeNew/index.js
| ... | ... | @@ -3213,14 +3213,21 @@ const controlProps = props => { |
| 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/components/ProductionReport/ProductionReport.js
| ... | ... | @@ -50,7 +50,7 @@ class ProductionReport extends Component { |
| 50 | 50 | } = nextProps; |
| 51 | 51 | const { formData, currentId } = nextProps; |
| 52 | 52 | if (commonUtils.isEmptyArr(employeeColumn) && formData.length > 0) { |
| 53 | - const sId = currentId !== undefined ? currentId : ''; | |
| 53 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 54 | 54 | /* 数据Id */ |
| 55 | 55 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 56 | 56 | /* bGrd代表是否是表格 */ |
| ... | ... | @@ -115,7 +115,7 @@ class ProductionReport extends Component { |
| 115 | 115 | /* 获取表数据 */ |
| 116 | 116 | handleGetData = (employeeConfig, extraState = {}) => { |
| 117 | 117 | const { currentId } = this.props; /* 当前页签数据 */ |
| 118 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 118 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 119 | 119 | this.props.handleGetDataSet({ |
| 120 | 120 | name: 'employee', configData: employeeConfig, condition: { sSqlCondition: { sParentId: sId } }, |
| 121 | 121 | }); |
| ... | ... | @@ -364,7 +364,7 @@ class ProductionReport extends Component { |
| 364 | 364 | /** 获取主表、从表、审核表、员工表数据 */ |
| 365 | 365 | handleGetTableData = (masterConfig, slaveConfig, checkConfig, employeeConfig) => { |
| 366 | 366 | const { currentId } = this.props; /* 当前页签数据 */ |
| 367 | - const sId = currentId !== undefined ? currentId : ''; | |
| 367 | + const sId = currentId || this.props.masterData?.sId || ''; | |
| 368 | 368 | this.props.handleGetDataOne({ |
| 369 | 369 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, |
| 370 | 370 | }); | ... | ... |
src/components/QuoQuotation/Quotation/Quotation.js
| ... | ... | @@ -63,7 +63,7 @@ class Quotation extends Component { |
| 63 | 63 | } = nextProps; |
| 64 | 64 | const { formData, currentId } = nextProps; |
| 65 | 65 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { |
| 66 | - const sId = currentId !== undefined ? currentId : ''; | |
| 66 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 67 | 67 | /* 数据Id */ |
| 68 | 68 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 69 | 69 | /* bGrd代表是否是表格 */ |
| ... | ... | @@ -177,7 +177,7 @@ class Quotation extends Component { |
| 177 | 177 | /* 获取表数据 */ |
| 178 | 178 | handleGetData = async (controlConfig, materialsConfig, processConfig, manyqtysConfig, colorConfig, extraState = {}) => { |
| 179 | 179 | const { currentId } = this.props; /* 当前页签数据 */ |
| 180 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 180 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 181 | 181 | const addStateControl = await this.props.handleGetDataSet({ |
| 182 | 182 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, |
| 183 | 183 | }); | ... | ... |
src/components/QuoQuotation/QuotationPack/QuotationPack.js
| ... | ... | @@ -80,7 +80,7 @@ class QuotationPack extends Component { |
| 80 | 80 | } = nextProps; |
| 81 | 81 | const { formData, currentId } = nextProps; |
| 82 | 82 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { |
| 83 | - const sId = currentId !== undefined ? currentId : ''; | |
| 83 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 84 | 84 | /* 数据Id */ |
| 85 | 85 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 86 | 86 | /* bGrd代表是否是表格 */ |
| ... | ... | @@ -291,7 +291,7 @@ class QuotationPack extends Component { |
| 291 | 291 | /* 获取表数据 */ |
| 292 | 292 | handleGetData = async (controlConfig, materialsConfig, processConfig, manyqtysConfig, colorConfig, packConfig, extraState = {}) => { |
| 293 | 293 | const { currentId, slaveData } = this.props; /* 当前页签数据 */ |
| 294 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 294 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 295 | 295 | const addStateControl = await this.props.handleGetDataSet({ |
| 296 | 296 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, |
| 297 | 297 | }); | ... | ... |
src/components/QuoQuotation/QuotationPackTableTree/QuotationPackTableTree.js
| ... | ... | @@ -101,7 +101,7 @@ class QuotationPackTableTree extends Component { |
| 101 | 101 | } = nextProps; |
| 102 | 102 | const { formData, currentId } = nextProps; |
| 103 | 103 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { |
| 104 | - const sId = currentId !== undefined ? currentId : ''; | |
| 104 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 105 | 105 | /* 数据Id */ |
| 106 | 106 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 107 | 107 | if(masterConfig && masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'bLayout')[0]) { |
| ... | ... | @@ -382,7 +382,7 @@ class QuotationPackTableTree extends Component { |
| 382 | 382 | /* 获取表数据 */ |
| 383 | 383 | handleGetData = async (controlConfig, materialsConfig, processConfig, manyqtysConfig, colorConfig, packConfig, extraState = {}) => { |
| 384 | 384 | const { currentId, masterData, slaveData } = this.props; /* 当前页签数据 */ |
| 385 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 385 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 386 | 386 | const addStateControl = await this.props.handleGetDataSet({ |
| 387 | 387 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, |
| 388 | 388 | }); |
| ... | ... | @@ -654,7 +654,7 @@ class QuotationPackTableTree extends Component { |
| 654 | 654 | |
| 655 | 655 | handleGetOtherData = async (tableList, childTableList, configMap) => { |
| 656 | 656 | const { currentId, slaveData, sModelsType, masterData } = this.props; /* 当前页签数据 */ |
| 657 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 657 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 658 | 658 | if(commonUtils.isNotEmptyObject(configMap)){ |
| 659 | 659 | for (const configName of Object.keys(configMap)) { |
| 660 | 660 | const tableName = configName.replace('Config', '').trim(); | ... | ... |
src/components/productionMainPlan/productionMainPlan.js
| ... | ... | @@ -561,6 +561,10 @@ const ProductionPlanComponent = Form.create({ |
| 561 | 561 | }; |
| 562 | 562 | } |
| 563 | 563 | |
| 564 | + const WorkCenterMachinePlan = commonFunc.showLocalMessage(props, "WorkCenter&MachinePlan", "工作中心&机台计划"); | |
| 565 | + | |
| 566 | + const MPS = commonFunc.showLocalMessage(props, "MPS", "产品主计划"); | |
| 567 | + | |
| 564 | 568 | const machineCharProps = commonBusiness.getCharTypes('machineChar', charConfigArr, charConfigAndDataArr, props); |
| 565 | 569 | const setUp = commonFunc.showMessage(app.commonConst, 'setUp');/* 上移 */ |
| 566 | 570 | const setDown = commonFunc.showMessage(app.commonConst, 'setDown');/* 下移 */ |
| ... | ... | @@ -584,7 +588,7 @@ const ProductionPlanComponent = Form.create({ |
| 584 | 588 | <Avatar src={props.imgSrc} /> |
| 585 | 589 | </div> |
| 586 | 590 | <Tabs className={styles.slaveTabs} tabBarStyle={{ marginLeft: 10, marginRight: 10 }}> |
| 587 | - <TabPane tab="产品主计划" key={2} > | |
| 591 | + <TabPane tab={MPS} key={2} > | |
| 588 | 592 | <div className={selfstyles.mainPlan} > |
| 589 | 593 | <Layout className="processList"> |
| 590 | 594 | <Sider className="process"> |
| ... | ... | @@ -612,7 +616,7 @@ const ProductionPlanComponent = Form.create({ |
| 612 | 616 | </Layout> |
| 613 | 617 | </div> |
| 614 | 618 | </TabPane> |
| 615 | - <TabPane tab="工作中心&机台计划" key={3}> | |
| 619 | + <TabPane tab={WorkCenterMachinePlan} key={3}> | |
| 616 | 620 | <Content |
| 617 | 621 | className="xly-productionPlanInfo" |
| 618 | 622 | style={{ maxHeight: 'calc( 100vh - 220px)', overflowY: 'auto' }} | ... | ... |
src/components/productionScheduleTree/productionScheduleTree.js
| ... | ... | @@ -1547,7 +1547,7 @@ const ProductionScheduleComponent = Form.create({ |
| 1547 | 1547 | // okProps.disabled = !props.bChangeTimerEnable; |
| 1548 | 1548 | okProps.loading = props.loadingTimer; |
| 1549 | 1549 | } |
| 1550 | - | |
| 1550 | + const WorkCenter = commonFunc.showLocalMessage(props, "WorkCenter", "工作中心"); | |
| 1551 | 1551 | return ( |
| 1552 | 1552 | <Form style={{ height: '100%' }}> |
| 1553 | 1553 | <Layout style={{ height: '100%' }} className="xly-productionPlan-list productionScheduleTree"> |
| ... | ... | @@ -1563,7 +1563,7 @@ const ProductionScheduleComponent = Form.create({ |
| 1563 | 1563 | <div className="resize-controller" onMouseDown={handleResizeLayout} /> |
| 1564 | 1564 | <div className="productionScheduleTree-sider-title"> |
| 1565 | 1565 | <Icon type={expandAll ? 'minus-square' : 'plus-square'} className="control-icon" onClick={onTreeExpandChange} /> |
| 1566 | - <span>工作中心</span> | |
| 1566 | + <span>{WorkCenter}</span> | |
| 1567 | 1567 | </div> |
| 1568 | 1568 | <div className="productionScheduleTree-sider-content"> |
| 1569 | 1569 | { | ... | ... |
src/mobile/common/CommobileBillEvent.js
| ... | ... | @@ -25,7 +25,7 @@ export default (ChildComponent) => { |
| 25 | 25 | formData, currentId, masterConfig: masterConfigOld, sModelsId, |
| 26 | 26 | } = nextProps; |
| 27 | 27 | if (commonUtils.isEmptyObject(masterConfigOld) && formData.length > 0) { |
| 28 | - const sId = currentId !== undefined ? currentId : ''; | |
| 28 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 29 | 29 | /* 数据Id */ |
| 30 | 30 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 31 | 31 | const slaveConfig = formData.filter(item => item.bGrd)[0]; |
| ... | ... | @@ -777,7 +777,7 @@ export default (ChildComponent) => { |
| 777 | 777 | /** 获取主表、从表、审核表数据 */ |
| 778 | 778 | handleGetData = async (masterConfig, slaveConfig) => { |
| 779 | 779 | const { currentId } = this.props; /* 当前页签数据 */ |
| 780 | - const sId = currentId !== undefined ? currentId : ''; | |
| 780 | + const sId = currentId || this.props.masterData?.sId || ''; | |
| 781 | 781 | await this.props.handleGetDataOne({ name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' } }); |
| 782 | 782 | if (!commonUtils.isEmptyObject(slaveConfig)) { |
| 783 | 783 | this.props.handleGetDataSet({ |
| ... | ... | @@ -788,7 +788,7 @@ export default (ChildComponent) => { |
| 788 | 788 | |
| 789 | 789 | handleGetMemoData = async (employeeConfig) => { |
| 790 | 790 | const { currentId } = this.props; /* 当前页签数据 */ |
| 791 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | |
| 791 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ | |
| 792 | 792 | this.props.handleGetDataSet({ |
| 793 | 793 | name: 'employee', configData: employeeConfig, condition: { sSqlCondition: { sParentId: sId } }, |
| 794 | 794 | }); | ... | ... |
src/mobile/common/CommobileSubBillEvent.js
| ... | ... | @@ -25,7 +25,7 @@ export default (ChildComponent) => { |
| 25 | 25 | formData, currentId, masterConfig: masterConfigOld, sModelsId, |
| 26 | 26 | } = nextProps; |
| 27 | 27 | if (commonUtils.isEmptyObject(masterConfigOld) && formData.length > 0) { |
| 28 | - const sId = currentId !== undefined ? currentId : ''; | |
| 28 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 29 | 29 | /* 数据Id */ |
| 30 | 30 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 31 | 31 | const slaveConfig = formData.filter(item => item.bGrd)[0]; | ... | ... |
src/mobile/common/ProcessReportMobile.js
| ... | ... | @@ -59,7 +59,7 @@ class ProcessReportMobileComponent extends React.Component { |
| 59 | 59 | componentWillReceiveProps(nextProps) { |
| 60 | 60 | const { formData, employeeConfig, currentId } = nextProps; |
| 61 | 61 | if (commonUtils.isEmptyObject(employeeConfig) && formData.length > 0) { |
| 62 | - const sId = currentId !== undefined ? currentId : ''; | |
| 62 | + const sId = currentId || nextProps.masterData?.sId || ''; | |
| 63 | 63 | const employeeConfig = formData.filter(item => item.sTbName.toUpperCase() === 'mftproductionreportemployee'.toUpperCase())[0]; |
| 64 | 64 | const addState = {}; |
| 65 | 65 | if (sId === '') { | ... | ... |