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