Commit 01c13ae94e154588677df95e7ec2b49ad81dc7bf
1 parent
6dc23d74
1.增加自定义参数功能
Showing
2 changed files
with
38 additions
and
1 deletions
src/components/Common/CommonElementEvent.js
| ... | ... | @@ -391,7 +391,18 @@ export default (ChildComponent) => { |
| 391 | 391 | customizeParamConfig = customizeParamConfigNew; |
| 392 | 392 | } |
| 393 | 393 | |
| 394 | + /* 自定义参数 */ | |
| 395 | + let selfParamConfig = commonUtils.isNotEmptyArr(formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizevariable')) ? | |
| 396 | + formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizeparam')[0] : {}; | |
| 397 | + let selfParamColumn = []; | |
| 398 | + if(commonUtils.isNotEmptyArr(selfParamConfig)) { | |
| 399 | + selfParamColumn = commonFunc.getHeaderConfig(selfParamConfig); | |
| 400 | + } | |
| 401 | + console.log('systemParamColumn', selfParamConfig, selfParamColumn); | |
| 402 | + | |
| 403 | + | |
| 394 | 404 | this.handleGetSlaveData('Set', 'param', paramConfig); |
| 405 | + this.handleGetSlaveData('Set', 'selfParam', selfParamConfig); | |
| 395 | 406 | let addState = {}; |
| 396 | 407 | let addStateMaster = {}; |
| 397 | 408 | |
| ... | ... | @@ -411,6 +422,7 @@ export default (ChildComponent) => { |
| 411 | 422 | config.masterConfig = masterConfig; |
| 412 | 423 | config.paramConfig = paramConfig; |
| 413 | 424 | config.customizeParamConfig = customizeParamConfig; |
| 425 | + config.selfParamConfig = selfParamConfig; | |
| 414 | 426 | addState = await this.handleAdd(config, nextProps.app.currentPane.copyTo, true); |
| 415 | 427 | } else { |
| 416 | 428 | addStateMaster = await this.handleGetSlaveData('One', undefined, masterConfig); |
| ... | ... | @@ -468,6 +480,9 @@ export default (ChildComponent) => { |
| 468 | 480 | if (commonUtils.isNotEmptyObject(customizeParamConfig)) { |
| 469 | 481 | this.handleGetSlaveData('customizeParam', 'customizeParam', customizeParamConfig); |
| 470 | 482 | } |
| 483 | + if (commonUtils.isNotEmptyObject(selfParamConfig)) { | |
| 484 | + this.handleGetSlaveData('Set', 'selfParam', selfParamConfig); | |
| 485 | + } | |
| 471 | 486 | } |
| 472 | 487 | |
| 473 | 488 | let customizeParamColumn = []; |
| ... | ... | @@ -529,6 +544,8 @@ export default (ChildComponent) => { |
| 529 | 544 | systemFunctionData, |
| 530 | 545 | bussinessFunctionData, |
| 531 | 546 | bReceived, |
| 547 | + selfParamConfig, | |
| 548 | + selfParamColumn, | |
| 532 | 549 | pageLoading: false, |
| 533 | 550 | ...addState, |
| 534 | 551 | ...addState1, |
| ... | ... | @@ -1895,7 +1912,7 @@ export default (ChildComponent) => { |
| 1895 | 1912 | const { |
| 1896 | 1913 | sModelsType, masterConfig, slaveConfig, iPlcNoConfig, siscommonstyleproductclassifyConfig, contactConfig, addressConfig, machineConfig, assortConfig, outsideConfig, processstyleConfig, processApsRuleConfig, dynamicParamConfig, supplyConfig, |
| 1897 | 1914 | stockConfig, customerInfoConfig, picFileConfig, eleemployeeConfig, elemachineConfig, jurgroupConfig, customergroupConfig, supplygroupConfig, |
| 1898 | - persongroupConfig, processgroupConfig, drivergroupConfig, departgroupConfig, paramConfig, userConfig, phaseConfig, conditionConfig, sischeckphaselogininfoConfig, | |
| 1915 | + persongroupConfig, processgroupConfig, drivergroupConfig, departgroupConfig, paramConfig, selfParamConfig, userConfig, phaseConfig, conditionConfig, sischeckphaselogininfoConfig, | |
| 1899 | 1916 | sisproductclassifyProcessClassifyConfig, sysmsguserConfig, eleknifemouldproductConfig, eleknifemouldfileConfig, eleteststandarditemConfig, formData, approveGroupConfig, |
| 1900 | 1917 | brandgroupConfig, slave0Config, memoDataList, |
| 1901 | 1918 | } = this.props; |
| ... | ... | @@ -1934,6 +1951,7 @@ export default (ChildComponent) => { |
| 1934 | 1951 | this.handleGetSlaveData('One', null, masterConfig, bEditClick); |
| 1935 | 1952 | } else if (sModelsType === 'system/sisformulaInfo') { |
| 1936 | 1953 | this.handleGetSlaveData('Set', 'param', paramConfig, bEditClick); |
| 1954 | + this.handleGetSlaveData('Set', 'selfParam', selfParamConfig, bEditClick); | |
| 1937 | 1955 | this.handleGetSlaveData('One', undefined, masterConfig, bEditClick); |
| 1938 | 1956 | let customizeParamConfig = commonUtils.isNotEmptyArr(formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizeparam')) ? formData.filter(item => item.bGrd && item.sTbName === 'sisformulacustomizeparam')[0] : {}; |
| 1939 | 1957 | /* 获取主表自定义列名为自定义变量配置 */ |
| ... | ... | @@ -2351,6 +2369,7 @@ export default (ChildComponent) => { |
| 2351 | 2369 | userDelData, phaseDelData, conditionDelData, sisproductclassifyProcessClassifyData, sisproductclassifyProcessClassifyDelData, |
| 2352 | 2370 | siscommonstyleproductclassifyConfig, siscommonstyleproductclassifyData, siscommonstyleproductclassifyDelData, customerInfoData, |
| 2353 | 2371 | customerInfoDelData, sysmsguserConfig, customergroupOldData, customergroupOldDelData, supplygroupOldData, supplygroupOldDelData, |
| 2372 | + selfParamConfig, selfParamData,selfParamDelData, | |
| 2354 | 2373 | processgroupOldData, processgroupOldDelData, jurgroupOldData, jurgroupOldDelData, persongroupOldData, persongroupOldDelData, drivergroupOldData, drivergroupOldDelData, |
| 2355 | 2374 | eleknifemouldproductData, eleknifemouldproductDelData, eleknifemouldfileData, eleknifemouldfileDelData, eleteststandarditemData, eleteststandarditemDelData, |
| 2356 | 2375 | customizeParamConfig, customizeParamData, customizeParamDelData, dynamicParamData, dynamicParamDelData, departgroupOldData, departgroupOldDelData, customizeParamName, |
| ... | ... | @@ -2766,6 +2785,9 @@ export default (ChildComponent) => { |
| 2766 | 2785 | } else if (commonUtils.isNotEmptyObject(customizeParamConfig)) { |
| 2767 | 2786 | data.push(commonBusiness.mergeData('customizeParam', customizeParamConfig.sTbName, customizeParamData, customizeParamDelData)); |
| 2768 | 2787 | } |
| 2788 | + if (commonUtils.isNotEmptyObject(selfParamConfig)) { | |
| 2789 | + data.push(commonBusiness.mergeData('selfParam', selfParamConfig.sTbName, selfParamData, selfParamDelData)); | |
| 2790 | + } | |
| 2769 | 2791 | } else if (sModelsType === 'smg/sendMailMsg') { |
| 2770 | 2792 | masterData.sContent = masterData.sContentMemo; |
| 2771 | 2793 | masterData.sType = '1'; | ... | ... |
src/components/CommonElementEvent/SisformulaInfo.js
| ... | ... | @@ -114,6 +114,8 @@ const SisformulaComponent = Form.create({ |
| 114 | 114 | const tabCalculationParameter = commonFunc.showMessage(app.commonConst, 'tabCalculationParameter');/* 计算参数 */ |
| 115 | 115 | const tabSystemFunction = commonFunc.showMessage(app.commonConst, 'tabSystemFunction');/* 系统函数 */ |
| 116 | 116 | const tabBusinessFunction = commonFunc.showMessage(app.commonConst, 'tabBusinessFunction');/* 业务函数 */ |
| 117 | + const tabBusinessParameters = commonFunc.showMessage(app.commonConst, 'tabBusinessParameters');/* 自定义参数 */ | |
| 118 | + | |
| 117 | 119 | const showTypeProps = { |
| 118 | 120 | record: masterData, |
| 119 | 121 | name: 'master', |
| ... | ... | @@ -146,6 +148,16 @@ const SisformulaComponent = Form.create({ |
| 146 | 148 | rowSelection: null, |
| 147 | 149 | }; |
| 148 | 150 | |
| 151 | + /* 自定义参数 */ | |
| 152 | + const selfParamPropsType = { | |
| 153 | + ...commonBusiness.getTableTypes('selfParam', props), | |
| 154 | + tableProps: { | |
| 155 | + AutoTableHeight: 255, | |
| 156 | + }, | |
| 157 | + // bNaturalWidth: true, /* 原始宽度 不进行最后一列计算 */ | |
| 158 | + rowSelection: null, | |
| 159 | + }; | |
| 160 | + | |
| 149 | 161 | const customizeParamPropsTypeArr = []; |
| 150 | 162 | if (commonUtils.isNotEmptyArr(props.customizeParamName)) { |
| 151 | 163 | props.customizeParamName.forEach((paramName) => { |
| ... | ... | @@ -263,6 +275,9 @@ const SisformulaComponent = Form.create({ |
| 263 | 275 | <TabPane tab={tabBusinessFunction} key={5}> |
| 264 | 276 | <TabParam {...commonBusiness.getShowTableSelectTypes('bussinessFunction', props, 'value')} /> |
| 265 | 277 | </TabPane> |
| 278 | + <TabPane tab={tabBusinessParameters} key={6}> | |
| 279 | + { commonUtils.isNotEmptyObject(selfParamPropsType) ? <StaticEditTable {...selfParamPropsType} setOpterationColumn="Y" footer="hidden" /> : ''} | |
| 280 | + </TabPane> | |
| 266 | 281 | </Tabs> |
| 267 | 282 | {/* <div style={{ height: '1px', backgroundColor: '#d9d9d9', width: '100%' }} /> */} |
| 268 | 283 | <TabCounter {...props} /> | ... | ... |