Commit 49e8874ca5beea8df16a37f1b3d24fef9c7b1d52

Authored by zhangzzzz
1 parent da2f349e

批量修改sId的获取方式;

src/components/Common/CommonElementEvent.js
@@ -35,7 +35,7 @@ export default (ChildComponent) => { @@ -35,7 +35,7 @@ export default (ChildComponent) => {
35 eleknifemouldproductConfig: eleknifemouldOldproductConfig, eleteststandarditemConfig: eleteststandardOlditemConfig, 35 eleknifemouldproductConfig: eleknifemouldOldproductConfig, eleteststandarditemConfig: eleteststandardOlditemConfig,
36 } = nextProps; 36 } = nextProps;
37 if (commonUtils.isEmptyObject(contactOldConfig) && (sModelsType === 'element/supplyInfo' || sModelsType === 'element/customerInfo') && formData.length > 0) { 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 /* 数据Id */ 39 /* 数据Id */
40 const masterConfig = formData.filter(item => !item.bGrd)[0]; 40 const masterConfig = formData.filter(item => !item.bGrd)[0];
41 if (sModelsType === 'element/customerInfo') { 41 if (sModelsType === 'element/customerInfo') {
@@ -91,7 +91,7 @@ export default (ChildComponent) => { @@ -91,7 +91,7 @@ export default (ChildComponent) => {
91 } 91 }
92 } 92 }
93 if (commonUtils.isEmptyObject(supplyOldConfig) && formData.length > 0 && sModelsType === 'element/materialsInfo') { 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 /* 数据Id */ 95 /* 数据Id */
96 const masterConfig = formData.filter(item => !item.bGrd)[0]; 96 const masterConfig = formData.filter(item => !item.bGrd)[0];
97 /* bGrd代表是否是表格 */ 97 /* bGrd代表是否是表格 */
@@ -122,7 +122,7 @@ export default (ChildComponent) => { @@ -122,7 +122,7 @@ export default (ChildComponent) => {
122 } 122 }
123 /* 印件分类 */ 123 /* 印件分类 */
124 if (commonUtils.isEmptyObject(sisproductclassifyProcessClassifyConfig) && formData.length > 0 && sModelsType === 'element/sisproductclassify') { 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 /* 数据Id */ 126 /* 数据Id */
127 const masterConfig = formData.filter(item => !item.bGrd)[0]; 127 const masterConfig = formData.filter(item => !item.bGrd)[0];
128 /* bGrd代表是否是表格 */ 128 /* bGrd代表是否是表格 */
@@ -147,7 +147,7 @@ export default (ChildComponent) => { @@ -147,7 +147,7 @@ export default (ChildComponent) => {
147 }); 147 });
148 } 148 }
149 if (commonUtils.isEmptyObject(masterConfig) && formData.length > 0 && sModelsType === 'element/processInfo') { 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 /* 数据Id */ 151 /* 数据Id */
152 const masterConfig = formData.filter(item => !item.bGrd)[0]; 152 const masterConfig = formData.filter(item => !item.bGrd)[0];
153 /* bGrd代表是否是表格 */ 153 /* bGrd代表是否是表格 */
@@ -214,7 +214,7 @@ export default (ChildComponent) => { @@ -214,7 +214,7 @@ export default (ChildComponent) => {
214 }); 214 });
215 } 215 }
216 if (commonUtils.isEmptyObject(picFileOldConfig) && formData.length > 0 && sModelsType === 'element/printInfo') { 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 /* 数据Id */ 218 /* 数据Id */
219 const masterConfig = formData.filter(item => !item.bGrd)[0]; 219 const masterConfig = formData.filter(item => !item.bGrd)[0];
220 /* bGrd代表是否是表格 */ 220 /* bGrd代表是否是表格 */
@@ -250,7 +250,7 @@ export default (ChildComponent) => { @@ -250,7 +250,7 @@ export default (ChildComponent) => {
250 } 250 }
251 // 常用规格信息 commonUtils.isEmptyArr(siscommonstyleproductclassifyColumn) 251 // 常用规格信息 commonUtils.isEmptyArr(siscommonstyleproductclassifyColumn)
252 if (commonUtils.isEmptyObject(siscommonstyleproductclassifyConfig) && formData.length > 0 && sModelsType === 'element/siscommonstyle') { 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 /* 数据Id */ 254 /* 数据Id */
255 const masterConfig = formData.filter(item => !item.bGrd)[0]; 255 const masterConfig = formData.filter(item => !item.bGrd)[0];
256 /* bGrd代表是否是表格 */ 256 /* bGrd代表是否是表格 */
@@ -276,7 +276,7 @@ export default (ChildComponent) => { @@ -276,7 +276,7 @@ export default (ChildComponent) => {
276 } 276 }
277 // 班组信息 277 // 班组信息
278 if (commonUtils.isEmptyObject(eleemployeeOldConfig) && formData.length > 0 && sModelsType === 'element/teamInfo') { 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 const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'eleteam')[0]; 280 const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'eleteam')[0];
281 const eleemployeeConfig = formData.filter(item => item.bGrd && item.sTbName === 'eleteamemployee')[0]; 281 const eleemployeeConfig = formData.filter(item => item.bGrd && item.sTbName === 'eleteamemployee')[0];
282 const eleemployeeColumn = commonFunc.getHeaderConfig(eleemployeeConfig); 282 const eleemployeeColumn = commonFunc.getHeaderConfig(eleemployeeConfig);
@@ -306,7 +306,7 @@ export default (ChildComponent) => { @@ -306,7 +306,7 @@ export default (ChildComponent) => {
306 }); 306 });
307 } 307 }
308 if (commonUtils.isEmptyObject(jurgroupOldConfig) && formData.length > 0 && sModelsType === 'element/sftloginInfo') { 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 /* 数据Id */ 310 /* 数据Id */
311 const masterConfig = formData.filter(item => !item.bGrd)[0]; 311 const masterConfig = formData.filter(item => !item.bGrd)[0];
312 /* bGrd代表是否是表格 */ 312 /* bGrd代表是否是表格 */
@@ -382,7 +382,7 @@ export default (ChildComponent) => { @@ -382,7 +382,7 @@ export default (ChildComponent) => {
382 }); 382 });
383 } 383 }
384 if ((bReceived === undefined || !bReceived) && formData.length > 0 && sModelsType === 'system/sisformulaInfo') { 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 const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'sisformula')[0]; 386 const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'sisformula')[0];
387 const paramConfig = formData.filter(item => item.bGrd && item.sTbName === 'sisformulaparam')[0]; 387 const paramConfig = formData.filter(item => item.bGrd && item.sTbName === 'sisformulaparam')[0];
388 let customizeParamConfig = commonUtils.isNotEmptyArr(formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizeparam')) ? formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizeparam')[0] : {}; 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,7 +553,7 @@ export default (ChildComponent) => {
553 }); 553 });
554 } 554 }
555 if ((bReceived === undefined || !bReceived) && formData.length > 0 && sModelsType === 'element/machineInfo') { 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 const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'elemachine')[0]; 557 const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'elemachine')[0];
558 let addState = {}; 558 let addState = {};
559 let slaveConfig = {}; 559 let slaveConfig = {};
@@ -627,7 +627,7 @@ export default (ChildComponent) => { @@ -627,7 +627,7 @@ export default (ChildComponent) => {
627 }); 627 });
628 } 628 }
629 if (commonUtils.isEmptyObject(userOldConfig) && formData.length > 0 && sModelsType === 'element/checkModelInfo') { 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 /* 数据Id */ 631 /* 数据Id */
632 const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'elecheckmodel')[0]; 632 const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'elecheckmodel')[0];
633 /* bGrd代表是否是表格 */ 633 /* bGrd代表是否是表格 */
@@ -662,7 +662,7 @@ export default (ChildComponent) => { @@ -662,7 +662,7 @@ export default (ChildComponent) => {
662 }); 662 });
663 } 663 }
664 if (commonUtils.isEmptyObject(sischeckphaselogininfoOldConfig) && formData.length > 0 && sModelsType === 'element/checkPhaseInfo') { 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 /* 数据Id */ 666 /* 数据Id */
667 const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'sischeckphase')[0]; 667 const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'sischeckphase')[0];
668 /* bGrd代表是否是表格 */ 668 /* bGrd代表是否是表格 */
@@ -687,7 +687,7 @@ export default (ChildComponent) => { @@ -687,7 +687,7 @@ export default (ChildComponent) => {
687 }); 687 });
688 } 688 }
689 if ((bReceived === undefined || !bReceived) && formData.length > 0 && sModelsType === 'sis/paymentTerms') { 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 const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'sispayment')[0]; 691 const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'sispayment')[0];
692 692
693 const firstRow = masterConfig.gdsconfigformslave.filter(item => item.bVisible && item.sName === 'sName'); 693 const firstRow = masterConfig.gdsconfigformslave.filter(item => item.bVisible && item.sName === 'sName');
@@ -713,7 +713,7 @@ export default (ChildComponent) => { @@ -713,7 +713,7 @@ export default (ChildComponent) => {
713 }); 713 });
714 } 714 }
715 if (commonUtils.isEmptyObject(employeeConfig) && formData.length > 0 && sModelsType === 'element/employeeInfo') { 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 /* 数据Id */ 717 /* 数据Id */
718 const masterConfig = formData.filter(item => !item.bGrd)[0]; 718 const masterConfig = formData.filter(item => !item.bGrd)[0];
719 /* bGrd代表是否是表格 */ 719 /* bGrd代表是否是表格 */
@@ -735,7 +735,7 @@ export default (ChildComponent) => { @@ -735,7 +735,7 @@ export default (ChildComponent) => {
735 }); 735 });
736 } 736 }
737 if (formData.length > 0 && commonUtils.isEmptyObject(sysmsguserOldConfig) && sModelsType === 'smg/sendMailMsg') { 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 /* 数据Id */ 739 /* 数据Id */
740 const masterConfig = formData.filter(item => !item.bGrd)[0]; 740 const masterConfig = formData.filter(item => !item.bGrd)[0];
741 741
@@ -762,7 +762,7 @@ export default (ChildComponent) => { @@ -762,7 +762,7 @@ export default (ChildComponent) => {
762 }); 762 });
763 } 763 }
764 if (formData.length > 0 && commonUtils.isEmptyObject(masterConfig) && sModelsType === 'sis/monthEndingClosing') { 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 masterConfig = formData.filter(item => !item.bGrd)[0]; 766 masterConfig = formData.filter(item => !item.bGrd)[0];
767 767
768 const firstRow = masterConfig.gdsconfigformslave[0]; 768 const firstRow = masterConfig.gdsconfigformslave[0];
@@ -784,7 +784,7 @@ export default (ChildComponent) => { @@ -784,7 +784,7 @@ export default (ChildComponent) => {
784 } 784 }
785 /* 刀模信息 */ 785 /* 刀模信息 */
786 if (commonUtils.isEmptyObject(eleknifemouldOldproductConfig) && formData.length > 0 && sModelsType === 'element/knifemouldInfo') { 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 /* 数据Id */ 788 /* 数据Id */
789 const masterConfig = formData.filter(item => !item.bGrd)[0]; 789 const masterConfig = formData.filter(item => !item.bGrd)[0];
790 /* bGrd代表是否是表格 */ 790 /* bGrd代表是否是表格 */
@@ -821,7 +821,7 @@ export default (ChildComponent) => { @@ -821,7 +821,7 @@ export default (ChildComponent) => {
821 } 821 }
822 /* 检验标准 */ 822 /* 检验标准 */
823 if (commonUtils.isEmptyObject(eleteststandardOlditemConfig) && formData.length > 0 && sModelsType === 'element/eleteststandInfo') { 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 /* 数据Id */ 825 /* 数据Id */
826 const masterConfig = formData.filter(item => !item.bGrd)[0]; 826 const masterConfig = formData.filter(item => !item.bGrd)[0];
827 /* bGrd代表是否是表格 */ 827 /* bGrd代表是否是表格 */