Commit c124239da7dcf4c466737148461d725900cc0edb
Merge branch 'main' of http://git.xlyprint.cn/zhangz/xlyUmi into main
Showing
2 changed files
with
48 additions
and
41 deletions
src/components/Common/CommonElementEvent.js
| @@ -34,7 +34,7 @@ export default (ChildComponent) => { | @@ -34,7 +34,7 @@ export default (ChildComponent) => { | ||
| 34 | eleknifemouldproductConfig: eleknifemouldOldproductConfig, eleteststandarditemConfig: eleteststandardOlditemConfig, | 34 | eleknifemouldproductConfig: eleknifemouldOldproductConfig, eleteststandarditemConfig: eleteststandardOlditemConfig, |
| 35 | } = nextProps; | 35 | } = nextProps; |
| 36 | if (commonUtils.isEmptyObject(contactOldConfig) && (sModelsType === 'element/supplyInfo' || sModelsType === 'element/customerInfo') && formData.length > 0) { | 36 | if (commonUtils.isEmptyObject(contactOldConfig) && (sModelsType === 'element/supplyInfo' || sModelsType === 'element/customerInfo') && formData.length > 0) { |
| 37 | - const sId = currentId !== undefined ? currentId : ''; | 37 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 38 | /* 数据Id */ | 38 | /* 数据Id */ |
| 39 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 39 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 40 | if (sModelsType === 'element/customerInfo') { | 40 | if (sModelsType === 'element/customerInfo') { |
| @@ -90,7 +90,7 @@ export default (ChildComponent) => { | @@ -90,7 +90,7 @@ export default (ChildComponent) => { | ||
| 90 | } | 90 | } |
| 91 | } | 91 | } |
| 92 | if (commonUtils.isEmptyObject(supplyOldConfig) && formData.length > 0 && sModelsType === 'element/materialsInfo') { | 92 | if (commonUtils.isEmptyObject(supplyOldConfig) && formData.length > 0 && sModelsType === 'element/materialsInfo') { |
| 93 | - const sId = currentId !== undefined ? currentId : ''; | 93 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 94 | /* 数据Id */ | 94 | /* 数据Id */ |
| 95 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 95 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 96 | /* bGrd代表是否是表格 */ | 96 | /* bGrd代表是否是表格 */ |
| @@ -121,7 +121,7 @@ export default (ChildComponent) => { | @@ -121,7 +121,7 @@ export default (ChildComponent) => { | ||
| 121 | } | 121 | } |
| 122 | /* 印件分类 */ | 122 | /* 印件分类 */ |
| 123 | if (commonUtils.isEmptyObject(sisproductclassifyProcessClassifyConfig) && formData.length > 0 && sModelsType === 'element/sisproductclassify') { | 123 | if (commonUtils.isEmptyObject(sisproductclassifyProcessClassifyConfig) && formData.length > 0 && sModelsType === 'element/sisproductclassify') { |
| 124 | - const sId = currentId !== undefined ? currentId : ''; | 124 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 125 | /* 数据Id */ | 125 | /* 数据Id */ |
| 126 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 126 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 127 | /* bGrd代表是否是表格 */ | 127 | /* bGrd代表是否是表格 */ |
| @@ -146,7 +146,7 @@ export default (ChildComponent) => { | @@ -146,7 +146,7 @@ export default (ChildComponent) => { | ||
| 146 | }); | 146 | }); |
| 147 | } | 147 | } |
| 148 | if (commonUtils.isEmptyObject(masterConfig) && formData.length > 0 && sModelsType === 'element/processInfo') { | 148 | if (commonUtils.isEmptyObject(masterConfig) && formData.length > 0 && sModelsType === 'element/processInfo') { |
| 149 | - const sId = currentId !== undefined ? currentId : ''; | 149 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 150 | /* 数据Id */ | 150 | /* 数据Id */ |
| 151 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 151 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 152 | /* bGrd代表是否是表格 */ | 152 | /* bGrd代表是否是表格 */ |
| @@ -213,7 +213,7 @@ export default (ChildComponent) => { | @@ -213,7 +213,7 @@ export default (ChildComponent) => { | ||
| 213 | }); | 213 | }); |
| 214 | } | 214 | } |
| 215 | if (commonUtils.isEmptyObject(picFileOldConfig) && formData.length > 0 && sModelsType === 'element/printInfo') { | 215 | if (commonUtils.isEmptyObject(picFileOldConfig) && formData.length > 0 && sModelsType === 'element/printInfo') { |
| 216 | - const sId = currentId !== undefined ? currentId : ''; | 216 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 217 | /* 数据Id */ | 217 | /* 数据Id */ |
| 218 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 218 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 219 | /* bGrd代表是否是表格 */ | 219 | /* bGrd代表是否是表格 */ |
| @@ -249,7 +249,7 @@ export default (ChildComponent) => { | @@ -249,7 +249,7 @@ export default (ChildComponent) => { | ||
| 249 | } | 249 | } |
| 250 | // 常用规格信息 commonUtils.isEmptyArr(siscommonstyleproductclassifyColumn) | 250 | // 常用规格信息 commonUtils.isEmptyArr(siscommonstyleproductclassifyColumn) |
| 251 | if (commonUtils.isEmptyObject(siscommonstyleproductclassifyConfig) && formData.length > 0 && sModelsType === 'element/siscommonstyle') { | 251 | if (commonUtils.isEmptyObject(siscommonstyleproductclassifyConfig) && formData.length > 0 && sModelsType === 'element/siscommonstyle') { |
| 252 | - const sId = currentId !== undefined ? currentId : ''; | 252 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 253 | /* 数据Id */ | 253 | /* 数据Id */ |
| 254 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 254 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 255 | /* bGrd代表是否是表格 */ | 255 | /* bGrd代表是否是表格 */ |
| @@ -275,7 +275,7 @@ export default (ChildComponent) => { | @@ -275,7 +275,7 @@ export default (ChildComponent) => { | ||
| 275 | } | 275 | } |
| 276 | // 班组信息 | 276 | // 班组信息 |
| 277 | if (commonUtils.isEmptyObject(eleemployeeOldConfig) && formData.length > 0 && sModelsType === 'element/teamInfo') { | 277 | if (commonUtils.isEmptyObject(eleemployeeOldConfig) && formData.length > 0 && sModelsType === 'element/teamInfo') { |
| 278 | - const sId = currentId !== undefined ? currentId : ''; | 278 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 279 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'eleteam')[0]; | 279 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'eleteam')[0]; |
| 280 | const eleemployeeConfig = formData.filter(item => item.bGrd && item.sTbName === 'eleteamemployee')[0]; | 280 | const eleemployeeConfig = formData.filter(item => item.bGrd && item.sTbName === 'eleteamemployee')[0]; |
| 281 | const eleemployeeColumn = commonFunc.getHeaderConfig(eleemployeeConfig); | 281 | const eleemployeeColumn = commonFunc.getHeaderConfig(eleemployeeConfig); |
| @@ -305,7 +305,7 @@ export default (ChildComponent) => { | @@ -305,7 +305,7 @@ export default (ChildComponent) => { | ||
| 305 | }); | 305 | }); |
| 306 | } | 306 | } |
| 307 | if (commonUtils.isEmptyObject(jurgroupOldConfig) && formData.length > 0 && sModelsType === 'element/sftloginInfo') { | 307 | if (commonUtils.isEmptyObject(jurgroupOldConfig) && formData.length > 0 && sModelsType === 'element/sftloginInfo') { |
| 308 | - const sId = currentId !== undefined ? currentId : ''; | 308 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 309 | /* 数据Id */ | 309 | /* 数据Id */ |
| 310 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 310 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 311 | /* bGrd代表是否是表格 */ | 311 | /* bGrd代表是否是表格 */ |
| @@ -381,7 +381,7 @@ export default (ChildComponent) => { | @@ -381,7 +381,7 @@ export default (ChildComponent) => { | ||
| 381 | }); | 381 | }); |
| 382 | } | 382 | } |
| 383 | if ((bReceived === undefined || !bReceived) && formData.length > 0 && sModelsType === 'system/sisformulaInfo') { | 383 | if ((bReceived === undefined || !bReceived) && formData.length > 0 && sModelsType === 'system/sisformulaInfo') { |
| 384 | - const sId = currentId !== undefined ? currentId : ''; | 384 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 385 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'sisformula')[0]; | 385 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'sisformula')[0]; |
| 386 | const paramConfig = formData.filter(item => item.bGrd && item.sTbName === 'sisformulaparam')[0]; | 386 | const paramConfig = formData.filter(item => item.bGrd && item.sTbName === 'sisformulaparam')[0]; |
| 387 | let customizeParamConfig = commonUtils.isNotEmptyArr(formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizeparam')) ? formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizeparam')[0] : {}; | 387 | let customizeParamConfig = commonUtils.isNotEmptyArr(formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizeparam')) ? formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizeparam')[0] : {}; |
| @@ -552,7 +552,7 @@ export default (ChildComponent) => { | @@ -552,7 +552,7 @@ export default (ChildComponent) => { | ||
| 552 | }); | 552 | }); |
| 553 | } | 553 | } |
| 554 | if ((bReceived === undefined || !bReceived) && formData.length > 0 && sModelsType === 'element/machineInfo') { | 554 | if ((bReceived === undefined || !bReceived) && formData.length > 0 && sModelsType === 'element/machineInfo') { |
| 555 | - const sId = currentId !== undefined ? currentId : ''; | 555 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 556 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'elemachine')[0]; | 556 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'elemachine')[0]; |
| 557 | let addState = {}; | 557 | let addState = {}; |
| 558 | let slaveConfig = {}; | 558 | let slaveConfig = {}; |
| @@ -626,7 +626,7 @@ export default (ChildComponent) => { | @@ -626,7 +626,7 @@ export default (ChildComponent) => { | ||
| 626 | }); | 626 | }); |
| 627 | } | 627 | } |
| 628 | if (commonUtils.isEmptyObject(userOldConfig) && formData.length > 0 && sModelsType === 'element/checkModelInfo') { | 628 | if (commonUtils.isEmptyObject(userOldConfig) && formData.length > 0 && sModelsType === 'element/checkModelInfo') { |
| 629 | - const sId = currentId !== undefined ? currentId : ''; | 629 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 630 | /* 数据Id */ | 630 | /* 数据Id */ |
| 631 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'elecheckmodel')[0]; | 631 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'elecheckmodel')[0]; |
| 632 | /* bGrd代表是否是表格 */ | 632 | /* bGrd代表是否是表格 */ |
| @@ -661,7 +661,7 @@ export default (ChildComponent) => { | @@ -661,7 +661,7 @@ export default (ChildComponent) => { | ||
| 661 | }); | 661 | }); |
| 662 | } | 662 | } |
| 663 | if (commonUtils.isEmptyObject(sischeckphaselogininfoOldConfig) && formData.length > 0 && sModelsType === 'element/checkPhaseInfo') { | 663 | if (commonUtils.isEmptyObject(sischeckphaselogininfoOldConfig) && formData.length > 0 && sModelsType === 'element/checkPhaseInfo') { |
| 664 | - const sId = currentId !== undefined ? currentId : ''; | 664 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 665 | /* 数据Id */ | 665 | /* 数据Id */ |
| 666 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'sischeckphase')[0]; | 666 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'sischeckphase')[0]; |
| 667 | /* bGrd代表是否是表格 */ | 667 | /* bGrd代表是否是表格 */ |
| @@ -686,7 +686,7 @@ export default (ChildComponent) => { | @@ -686,7 +686,7 @@ export default (ChildComponent) => { | ||
| 686 | }); | 686 | }); |
| 687 | } | 687 | } |
| 688 | if ((bReceived === undefined || !bReceived) && formData.length > 0 && sModelsType === 'sis/paymentTerms') { | 688 | if ((bReceived === undefined || !bReceived) && formData.length > 0 && sModelsType === 'sis/paymentTerms') { |
| 689 | - const sId = currentId !== undefined ? currentId : ''; | 689 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 690 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'sispayment')[0]; | 690 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'sispayment')[0]; |
| 691 | 691 | ||
| 692 | const firstRow = masterConfig.gdsconfigformslave.filter(item => item.bVisible && item.sName === 'sName'); | 692 | const firstRow = masterConfig.gdsconfigformslave.filter(item => item.bVisible && item.sName === 'sName'); |
| @@ -712,7 +712,7 @@ export default (ChildComponent) => { | @@ -712,7 +712,7 @@ export default (ChildComponent) => { | ||
| 712 | }); | 712 | }); |
| 713 | } | 713 | } |
| 714 | if (commonUtils.isEmptyObject(employeeConfig) && formData.length > 0 && sModelsType === 'element/employeeInfo') { | 714 | if (commonUtils.isEmptyObject(employeeConfig) && formData.length > 0 && sModelsType === 'element/employeeInfo') { |
| 715 | - const sId = currentId !== undefined ? currentId : ''; | 715 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 716 | /* 数据Id */ | 716 | /* 数据Id */ |
| 717 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 717 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 718 | /* bGrd代表是否是表格 */ | 718 | /* bGrd代表是否是表格 */ |
| @@ -734,7 +734,7 @@ export default (ChildComponent) => { | @@ -734,7 +734,7 @@ export default (ChildComponent) => { | ||
| 734 | }); | 734 | }); |
| 735 | } | 735 | } |
| 736 | if (formData.length > 0 && commonUtils.isEmptyObject(sysmsguserOldConfig) && sModelsType === 'smg/sendMailMsg') { | 736 | if (formData.length > 0 && commonUtils.isEmptyObject(sysmsguserOldConfig) && sModelsType === 'smg/sendMailMsg') { |
| 737 | - const sId = currentId !== undefined ? currentId : ''; | 737 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 738 | /* 数据Id */ | 738 | /* 数据Id */ |
| 739 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 739 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 740 | 740 | ||
| @@ -761,7 +761,7 @@ export default (ChildComponent) => { | @@ -761,7 +761,7 @@ export default (ChildComponent) => { | ||
| 761 | }); | 761 | }); |
| 762 | } | 762 | } |
| 763 | if (formData.length > 0 && commonUtils.isEmptyObject(masterConfig) && sModelsType === 'sis/monthEndingClosing') { | 763 | if (formData.length > 0 && commonUtils.isEmptyObject(masterConfig) && sModelsType === 'sis/monthEndingClosing') { |
| 764 | - const sId = currentId !== undefined ? currentId : ''; | 764 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 765 | masterConfig = formData.filter(item => !item.bGrd)[0]; | 765 | masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 766 | 766 | ||
| 767 | const firstRow = masterConfig.gdsconfigformslave[0]; | 767 | const firstRow = masterConfig.gdsconfigformslave[0]; |
| @@ -783,7 +783,7 @@ export default (ChildComponent) => { | @@ -783,7 +783,7 @@ export default (ChildComponent) => { | ||
| 783 | } | 783 | } |
| 784 | /* 刀模信息 */ | 784 | /* 刀模信息 */ |
| 785 | if (commonUtils.isEmptyObject(eleknifemouldOldproductConfig) && formData.length > 0 && sModelsType === 'element/knifemouldInfo') { | 785 | if (commonUtils.isEmptyObject(eleknifemouldOldproductConfig) && formData.length > 0 && sModelsType === 'element/knifemouldInfo') { |
| 786 | - const sId = currentId !== undefined ? currentId : ''; | 786 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 787 | /* 数据Id */ | 787 | /* 数据Id */ |
| 788 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 788 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 789 | /* bGrd代表是否是表格 */ | 789 | /* bGrd代表是否是表格 */ |
| @@ -820,7 +820,7 @@ export default (ChildComponent) => { | @@ -820,7 +820,7 @@ export default (ChildComponent) => { | ||
| 820 | } | 820 | } |
| 821 | /* 检验标准 */ | 821 | /* 检验标准 */ |
| 822 | if (commonUtils.isEmptyObject(eleteststandardOlditemConfig) && formData.length > 0 && sModelsType === 'element/eleteststandInfo') { | 822 | if (commonUtils.isEmptyObject(eleteststandardOlditemConfig) && formData.length > 0 && sModelsType === 'element/eleteststandInfo') { |
| 823 | - const sId = currentId !== undefined ? currentId : ''; | 823 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 824 | /* 数据Id */ | 824 | /* 数据Id */ |
| 825 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 825 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 826 | /* bGrd代表是否是表格 */ | 826 | /* bGrd代表是否是表格 */ |
| @@ -1096,7 +1096,7 @@ export default (ChildComponent) => { | @@ -1096,7 +1096,7 @@ export default (ChildComponent) => { | ||
| 1096 | handleGetData = (masterConfig, contactConfig, addressConfig, bEditClick) => { | 1096 | handleGetData = (masterConfig, contactConfig, addressConfig, bEditClick) => { |
| 1097 | const { currentId } = this.props; | 1097 | const { currentId } = this.props; |
| 1098 | /* 当前页签数据 */ | 1098 | /* 当前页签数据 */ |
| 1099 | - const sId = currentId !== undefined ? currentId : ''; | 1099 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 1100 | this.props.handleGetDataOne({ | 1100 | this.props.handleGetDataOne({ |
| 1101 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, | 1101 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, |
| 1102 | }); | 1102 | }); |
| @@ -1117,7 +1117,7 @@ export default (ChildComponent) => { | @@ -1117,7 +1117,7 @@ export default (ChildComponent) => { | ||
| 1117 | handleGetProductclassifyData = async (masterConfig, sisproductclassifyProcessClassifyConfig, bEditClick) => { | 1117 | handleGetProductclassifyData = async (masterConfig, sisproductclassifyProcessClassifyConfig, bEditClick) => { |
| 1118 | const { currentId } = this.props; | 1118 | const { currentId } = this.props; |
| 1119 | /* 当前页签数据 */ | 1119 | /* 当前页签数据 */ |
| 1120 | - const sId = currentId !== undefined ? currentId : ''; | 1120 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 1121 | const addState = await this.props.handleGetDataOne({ | 1121 | const addState = await this.props.handleGetDataOne({ |
| 1122 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, isWait: true, bEditClick, | 1122 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, isWait: true, bEditClick, |
| 1123 | }); | 1123 | }); |
| @@ -1137,7 +1137,7 @@ export default (ChildComponent) => { | @@ -1137,7 +1137,7 @@ export default (ChildComponent) => { | ||
| 1137 | handleGetPrintData = (masterConfig, picFileConfig, stockConfig, customerInfoConfig, bEditClick) => { | 1137 | handleGetPrintData = (masterConfig, picFileConfig, stockConfig, customerInfoConfig, bEditClick) => { |
| 1138 | const { currentId } = this.props; | 1138 | const { currentId } = this.props; |
| 1139 | /* 当前页签数据 */ | 1139 | /* 当前页签数据 */ |
| 1140 | - const sId = currentId !== undefined ? currentId : ''; | 1140 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 1141 | this.props.handleGetDataOne({ | 1141 | this.props.handleGetDataOne({ |
| 1142 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, | 1142 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, |
| 1143 | }); | 1143 | }); |
| @@ -1155,7 +1155,7 @@ export default (ChildComponent) => { | @@ -1155,7 +1155,7 @@ export default (ChildComponent) => { | ||
| 1155 | handleGetStyleData = (masterConfig, siscommonstyleproductclassifyConfig, bEditClick) => { | 1155 | handleGetStyleData = (masterConfig, siscommonstyleproductclassifyConfig, bEditClick) => { |
| 1156 | const { currentId } = this.props; | 1156 | const { currentId } = this.props; |
| 1157 | /* 当前页签数据 */ | 1157 | /* 当前页签数据 */ |
| 1158 | - const sId = currentId !== undefined ? currentId : ''; | 1158 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 1159 | this.props.handleGetDataOne({ | 1159 | this.props.handleGetDataOne({ |
| 1160 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, | 1160 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, |
| 1161 | }); | 1161 | }); |
| @@ -1167,7 +1167,7 @@ export default (ChildComponent) => { | @@ -1167,7 +1167,7 @@ export default (ChildComponent) => { | ||
| 1167 | handleGetCheckModelData = (masterConfig, userConfig, phaseConfig, conditionConfig, bEditClick) => { | 1167 | handleGetCheckModelData = (masterConfig, userConfig, phaseConfig, conditionConfig, bEditClick) => { |
| 1168 | const { currentId } = this.props; | 1168 | const { currentId } = this.props; |
| 1169 | /* 当前页签数据 */ | 1169 | /* 当前页签数据 */ |
| 1170 | - const sId = currentId !== undefined ? currentId : ''; | 1170 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 1171 | this.props.handleGetDataOne({ | 1171 | this.props.handleGetDataOne({ |
| 1172 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, | 1172 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, |
| 1173 | }); | 1173 | }); |
| @@ -1185,7 +1185,7 @@ export default (ChildComponent) => { | @@ -1185,7 +1185,7 @@ export default (ChildComponent) => { | ||
| 1185 | handleGetEleemployeeData = (masterConfig, bEditClick) => { | 1185 | handleGetEleemployeeData = (masterConfig, bEditClick) => { |
| 1186 | const { currentId } = this.props; | 1186 | const { currentId } = this.props; |
| 1187 | /* 当前页签数据 */ | 1187 | /* 当前页签数据 */ |
| 1188 | - const sId = currentId !== undefined ? currentId : ''; | 1188 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 1189 | this.props.handleGetDataOne({ | 1189 | this.props.handleGetDataOne({ |
| 1190 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, | 1190 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, |
| 1191 | }); | 1191 | }); |
| @@ -1194,7 +1194,7 @@ export default (ChildComponent) => { | @@ -1194,7 +1194,7 @@ export default (ChildComponent) => { | ||
| 1194 | handleGetSisproductclassifyData = (masterConfig, sisproductclassifyProcessClassifyConfig, bEditClick) => { | 1194 | handleGetSisproductclassifyData = (masterConfig, sisproductclassifyProcessClassifyConfig, bEditClick) => { |
| 1195 | const { currentId } = this.props; | 1195 | const { currentId } = this.props; |
| 1196 | /* 当前页签数据 */ | 1196 | /* 当前页签数据 */ |
| 1197 | - const sId = currentId !== undefined ? currentId : ''; | 1197 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 1198 | this.props.handleGetDataOne({ | 1198 | this.props.handleGetDataOne({ |
| 1199 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, | 1199 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, |
| 1200 | }); | 1200 | }); |
| @@ -1206,7 +1206,7 @@ export default (ChildComponent) => { | @@ -1206,7 +1206,7 @@ export default (ChildComponent) => { | ||
| 1206 | handleGetCheckPhaseData = (masterConfig, sischeckphaselogininfoConfig, bEditClick) => { | 1206 | handleGetCheckPhaseData = (masterConfig, sischeckphaselogininfoConfig, bEditClick) => { |
| 1207 | const { currentId } = this.props; | 1207 | const { currentId } = this.props; |
| 1208 | /* 当前页签数据 */ | 1208 | /* 当前页签数据 */ |
| 1209 | - const sId = currentId !== undefined ? currentId : ''; | 1209 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 1210 | this.props.handleGetDataOne({ | 1210 | this.props.handleGetDataOne({ |
| 1211 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, | 1211 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, |
| 1212 | }); | 1212 | }); |
| @@ -1219,7 +1219,7 @@ export default (ChildComponent) => { | @@ -1219,7 +1219,7 @@ export default (ChildComponent) => { | ||
| 1219 | handleGetMaterialsData = (masterConfig, supplyConfig, stockConfig, bEditClick) => { | 1219 | handleGetMaterialsData = (masterConfig, supplyConfig, stockConfig, bEditClick) => { |
| 1220 | const { currentId } = this.props; | 1220 | const { currentId } = this.props; |
| 1221 | /* 当前页签数据 */ | 1221 | /* 当前页签数据 */ |
| 1222 | - const sId = currentId !== undefined ? currentId : ''; | 1222 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 1223 | this.props.handleGetDataOne({ | 1223 | this.props.handleGetDataOne({ |
| 1224 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, | 1224 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, |
| 1225 | }); | 1225 | }); |
| @@ -1235,7 +1235,7 @@ export default (ChildComponent) => { | @@ -1235,7 +1235,7 @@ export default (ChildComponent) => { | ||
| 1235 | handleGetSflLoginData = async (masterConfig, jurgroupConfig, customergroupConfig, supplygroupConfig, persongroupConfig, processgroupConfig, drivergroupConfig, departgroupConfig, flag, isWait, bEditClick, { approveGroupConfig, brandgroupConfig }) => { | 1235 | handleGetSflLoginData = async (masterConfig, jurgroupConfig, customergroupConfig, supplygroupConfig, persongroupConfig, processgroupConfig, drivergroupConfig, departgroupConfig, flag, isWait, bEditClick, { approveGroupConfig, brandgroupConfig }) => { |
| 1236 | const { currentId } = this.props; | 1236 | const { currentId } = this.props; |
| 1237 | /* 当前页签数据 */ | 1237 | /* 当前页签数据 */ |
| 1238 | - const sId = currentId !== undefined ? currentId : ''; | 1238 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 1239 | const masterAddState = await this.props.handleGetDataOne({ | 1239 | const masterAddState = await this.props.handleGetDataOne({ |
| 1240 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, isWait, | 1240 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, isWait, |
| 1241 | }); | 1241 | }); |
| @@ -1460,7 +1460,7 @@ export default (ChildComponent) => { | @@ -1460,7 +1460,7 @@ export default (ChildComponent) => { | ||
| 1460 | handleGetProcessData = (masterConfig, machineConfig, assortConfig, outsideConfig, processstyleConfig, processApsRuleConfig, dynamicParamConfig, bEditClick) => { | 1460 | handleGetProcessData = (masterConfig, machineConfig, assortConfig, outsideConfig, processstyleConfig, processApsRuleConfig, dynamicParamConfig, bEditClick) => { |
| 1461 | const { currentId } = this.props; | 1461 | const { currentId } = this.props; |
| 1462 | /* 当前页签数据 */ | 1462 | /* 当前页签数据 */ |
| 1463 | - const sId = currentId !== undefined ? currentId : ''; | 1463 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 1464 | this.props.handleGetDataOne({ | 1464 | this.props.handleGetDataOne({ |
| 1465 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, | 1465 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, |
| 1466 | }); | 1466 | }); |
| @@ -1498,7 +1498,7 @@ export default (ChildComponent) => { | @@ -1498,7 +1498,7 @@ export default (ChildComponent) => { | ||
| 1498 | handleGetTeamData = (masterConfig, eleemployeeConfig, elemachineConfig, bEditClick) => { | 1498 | handleGetTeamData = (masterConfig, eleemployeeConfig, elemachineConfig, bEditClick) => { |
| 1499 | const { currentId } = this.props; | 1499 | const { currentId } = this.props; |
| 1500 | /* 当前页签数据 */ | 1500 | /* 当前页签数据 */ |
| 1501 | - const sId = currentId !== undefined ? currentId : ''; | 1501 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 1502 | this.props.handleGetDataOne({ | 1502 | this.props.handleGetDataOne({ |
| 1503 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, | 1503 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, |
| 1504 | }); | 1504 | }); |
| @@ -1513,7 +1513,7 @@ export default (ChildComponent) => { | @@ -1513,7 +1513,7 @@ export default (ChildComponent) => { | ||
| 1513 | handleGetEleKnifeMouldData = (masterConfig, knifemouldproductConfig, knifemouldfileConfig, bEditClick) => { | 1513 | handleGetEleKnifeMouldData = (masterConfig, knifemouldproductConfig, knifemouldfileConfig, bEditClick) => { |
| 1514 | const { currentId } = this.props; | 1514 | const { currentId } = this.props; |
| 1515 | /* 当前页签数据 */ | 1515 | /* 当前页签数据 */ |
| 1516 | - const sId = currentId !== undefined ? currentId : ''; | 1516 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 1517 | this.props.handleGetDataOne({ | 1517 | this.props.handleGetDataOne({ |
| 1518 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, | 1518 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, |
| 1519 | }); | 1519 | }); |
| @@ -1528,7 +1528,7 @@ export default (ChildComponent) => { | @@ -1528,7 +1528,7 @@ export default (ChildComponent) => { | ||
| 1528 | handleGetTestStandData = (masterConfig, eleteststandarditemConfig, bEditClick) => { | 1528 | handleGetTestStandData = (masterConfig, eleteststandarditemConfig, bEditClick) => { |
| 1529 | const { currentId } = this.props; | 1529 | const { currentId } = this.props; |
| 1530 | /* 当前页签数据 */ | 1530 | /* 当前页签数据 */ |
| 1531 | - const sId = currentId !== undefined ? currentId : ''; | 1531 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 1532 | this.props.handleGetDataOne({ | 1532 | this.props.handleGetDataOne({ |
| 1533 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, | 1533 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, |
| 1534 | }); | 1534 | }); |
| @@ -1540,7 +1540,7 @@ export default (ChildComponent) => { | @@ -1540,7 +1540,7 @@ export default (ChildComponent) => { | ||
| 1540 | handleGetSysMsgData = (masterConfig, sysmsguserConfig, bEditClick) => { | 1540 | handleGetSysMsgData = (masterConfig, sysmsguserConfig, bEditClick) => { |
| 1541 | const { currentId } = this.props; | 1541 | const { currentId } = this.props; |
| 1542 | /* 当前页签数据 */ | 1542 | /* 当前页签数据 */ |
| 1543 | - const sId = currentId !== undefined ? currentId : ''; | 1543 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 1544 | this.props.handleGetDataOne({ | 1544 | this.props.handleGetDataOne({ |
| 1545 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, | 1545 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, |
| 1546 | }); | 1546 | }); |
| @@ -1557,7 +1557,7 @@ export default (ChildComponent) => { | @@ -1557,7 +1557,7 @@ export default (ChildComponent) => { | ||
| 1557 | const { currentId, sModelsType } = this.props; | 1557 | const { currentId, sModelsType } = this.props; |
| 1558 | /* 当前页签数据 */ | 1558 | /* 当前页签数据 */ |
| 1559 | let addState = {}; | 1559 | let addState = {}; |
| 1560 | - const sId = currentId !== undefined ? currentId : ''; | 1560 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 1561 | if (getType === 'One') { | 1561 | if (getType === 'One') { |
| 1562 | if(sModelsType === 'system/sisformulaInfo') { | 1562 | if(sModelsType === 'system/sisformulaInfo') { |
| 1563 | const addMaster = await this.props.handleGetDataOne({ | 1563 | const addMaster = await this.props.handleGetDataOne({ |
| @@ -1643,15 +1643,19 @@ export default (ChildComponent) => { | @@ -1643,15 +1643,19 @@ export default (ChildComponent) => { | ||
| 1643 | const configObj = sColTitleNameIndex === undefined ? JSON.parse(sColTitleName) : JSON.parse(sColTitleName)[sColTitleNameIndex]; | 1643 | const configObj = sColTitleNameIndex === undefined ? JSON.parse(sColTitleName) : JSON.parse(sColTitleName)[sColTitleNameIndex]; |
| 1644 | const gdsconfigformslaveNew = []; | 1644 | const gdsconfigformslaveNew = []; |
| 1645 | if (commonUtils.isNotEmptyObject(configObj)) { | 1645 | if (commonUtils.isNotEmptyObject(configObj)) { |
| 1646 | + const { extraConfig = {} } = configObj; | ||
| 1646 | for (const key of Object.keys(configObj)) { | 1647 | for (const key of Object.keys(configObj)) { |
| 1647 | - if (key !== 'panelName') { | ||
| 1648 | - const configNew = {}; | 1648 | + if (!['panelName', 'extraConfig'].includes(key)) { |
| 1649 | + let configNew = {}; | ||
| 1649 | configNew.sName = key; | 1650 | configNew.sName = key; |
| 1650 | configNew.sChinese = configObj[key]; | 1651 | configNew.sChinese = configObj[key]; |
| 1651 | configNew.bVisible = true; | 1652 | configNew.bVisible = true; |
| 1652 | configNew.iFitWidth = 80; | 1653 | configNew.iFitWidth = 80; |
| 1653 | configNew.showName = configObj[key]; | 1654 | configNew.showName = configObj[key]; |
| 1654 | configNew.bReadonly = false; | 1655 | configNew.bReadonly = false; |
| 1656 | + if (extraConfig[key]) { | ||
| 1657 | + configNew = { ...configNew, ...extraConfig[key] }; | ||
| 1658 | + } | ||
| 1655 | gdsconfigformslaveNew.push(configNew); | 1659 | gdsconfigformslaveNew.push(configNew); |
| 1656 | } | 1660 | } |
| 1657 | } | 1661 | } |
| @@ -1978,7 +1982,7 @@ export default (ChildComponent) => { | @@ -1978,7 +1982,7 @@ export default (ChildComponent) => { | ||
| 1978 | // const { | 1982 | // const { |
| 1979 | // app, currentId, token, masterConfig, sModelsId, | 1983 | // app, currentId, token, masterConfig, sModelsId, |
| 1980 | // } = this.props; | 1984 | // } = this.props; |
| 1981 | - // const sId = currentId !== undefined ? currentId : ''; | 1985 | + // const sId = currentId || this.props.masterData?.sId || ''; |
| 1982 | // const { userinfo } = app; | 1986 | // const { userinfo } = app; |
| 1983 | // const value = { | 1987 | // const value = { |
| 1984 | // tableName: masterConfig.sTbName, | 1988 | // tableName: masterConfig.sTbName, |
| @@ -2064,7 +2068,7 @@ export default (ChildComponent) => { | @@ -2064,7 +2068,7 @@ export default (ChildComponent) => { | ||
| 2064 | approveGroupConfig, brandgroupConfig, | 2068 | approveGroupConfig, brandgroupConfig, |
| 2065 | } = props; | 2069 | } = props; |
| 2066 | /* 当前页签数据 */ | 2070 | /* 当前页签数据 */ |
| 2067 | - const sId = currentId !== undefined ? currentId : ''; | 2071 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 2068 | let value = {}; | 2072 | let value = {}; |
| 2069 | if (sModelsType === 'element/customerInfo' || sModelsType === 'element/supplyInfo') { | 2073 | if (sModelsType === 'element/customerInfo' || sModelsType === 'element/supplyInfo') { |
| 2070 | value = { | 2074 | value = { |
| @@ -3072,7 +3076,7 @@ export default (ChildComponent) => { | @@ -3072,7 +3076,7 @@ export default (ChildComponent) => { | ||
| 3072 | const { | 3076 | const { |
| 3073 | currentId, sModelsId, masterData, masterConfig, handleType, | 3077 | currentId, sModelsId, masterData, masterConfig, handleType, |
| 3074 | } = props; | 3078 | } = props; |
| 3075 | - const sId = currentId !== undefined ? currentId : ''; | 3079 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 3076 | const value = { | 3080 | const value = { |
| 3077 | sClientType: '1', | 3081 | sClientType: '1', |
| 3078 | sId: [sId], | 3082 | sId: [sId], |
src/components/Manufacture/CommonPackEvent.js
| @@ -1035,9 +1035,12 @@ const CommonPackEvent = props => { | @@ -1035,9 +1035,12 @@ const CommonPackEvent = props => { | ||
| 1035 | <Tabs size="small" style={{ marginTop: 10, marginBottom: 12 }}> | 1035 | <Tabs size="small" style={{ marginTop: 10, marginBottom: 12 }}> |
| 1036 | {Object.keys(controlGroup).map(tabNameKey => { | 1036 | {Object.keys(controlGroup).map(tabNameKey => { |
| 1037 | console.log("eeee", tabNameKey); | 1037 | console.log("eeee", tabNameKey); |
| 1038 | - const tabName = tabNameKey.replace(/\d+/g, ""); | 1038 | + let tabName = tabNameKey.replace(/\d+/g, ""); |
| 1039 | const num = tabNameKey.replace(/[^\d]/g, "").trim(); | 1039 | const num = tabNameKey.replace(/[^\d]/g, "").trim(); |
| 1040 | - | 1040 | + const tableConfigArr = config?.gdsconfigformslave.filter(row => row.sControlName === tabNameKey.trim()); |
| 1041 | + if(commonUtils.isNotEmptyArr(tableConfigArr)) { | ||
| 1042 | + tabName =tableConfigArr[0].showName; | ||
| 1043 | + } | ||
| 1041 | const viewProps = { | 1044 | const viewProps = { |
| 1042 | ...props, | 1045 | ...props, |
| 1043 | viewConfigs: controlGroup[tabNameKey], | 1046 | viewConfigs: controlGroup[tabNameKey], |