Commit bcfae90bb49dd15a162fed091295a06435ae9b22
Merge branch 'main' of http://git.xlyprint.cn/zhangz/xlyUmi
Showing
34 changed files
with
111 additions
and
111 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 } }, | ... | ... |
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/CommonCostomTabBill.js
| ... | ... | @@ -2556,7 +2556,7 @@ class CommonNewBill extends Component { |
| 2556 | 2556 | // 刷新工单交期 |
| 2557 | 2557 | handleRefreshGdjq = async() => { |
| 2558 | 2558 | const { currentId, slave2Child0Config, slave2Child0InfoConfig } = this.props; |
| 2559 | - const sId = currentId !== undefined ? currentId : ''; | |
| 2559 | + const sId = currentId || this.props.masterData?.sId || ''; | |
| 2560 | 2560 | const conditonValues1 = this.props.onGetSqlConditionValues(slave2Child0Config); |
| 2561 | 2561 | let returnData1 = await this.props.handleGetDataSet({ |
| 2562 | 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/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 } }, | ... | ... |
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++) { | ... | ... |
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/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(); | ... | ... |
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/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 === '') { | ... | ... |