Commit 8d5978179c5d3d9632afbcef942722fd55c5cd0c
Merge branch 'main' of http://git.xlyprint.cn/zhangz/xlyUmi into main
Showing
45 changed files
with
519 additions
and
421 deletions
src/components/AuditInformation/AuditInformation.js
| @@ -33,7 +33,7 @@ class AuditInformation extends Component { | @@ -33,7 +33,7 @@ class AuditInformation extends Component { | ||
| 33 | let { masterConfig, canSendMsg } = nextProps; | 33 | let { masterConfig, canSendMsg } = nextProps; |
| 34 | const { userinfo } = app; | 34 | const { userinfo } = app; |
| 35 | if (commonUtils.isEmptyArr(masterConfig) && formData.length > 0) { | 35 | if (commonUtils.isEmptyArr(masterConfig) && formData.length > 0) { |
| 36 | - const sId = currentId !== undefined ? currentId : ''; | 36 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 37 | /* 数据Id */ | 37 | /* 数据Id */ |
| 38 | masterConfig = formData.filter(item => !item.bGrd)[0]; | 38 | masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 39 | const checkConfig = formData.filter(item => item.bGrd && item.sTbName === 'sysbillcheckresult')[0]; | 39 | const checkConfig = formData.filter(item => item.bGrd && item.sTbName === 'sysbillcheckresult')[0]; |
| @@ -58,7 +58,7 @@ class AuditInformation extends Component { | @@ -58,7 +58,7 @@ class AuditInformation extends Component { | ||
| 58 | /** 获取主表数据 */ | 58 | /** 获取主表数据 */ |
| 59 | handleGetData = async (masterConfig, checkConfig) => { | 59 | handleGetData = async (masterConfig, checkConfig) => { |
| 60 | const { currentId } = this.props; /* 当前页签数据 */ | 60 | const { currentId } = this.props; /* 当前页签数据 */ |
| 61 | - const sId = currentId !== undefined ? currentId : ''; | 61 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 62 | await this.props.handleGetDataOne({ name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' } }); | 62 | await this.props.handleGetDataOne({ name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' } }); |
| 63 | const { masterData } = this.props; | 63 | const { masterData } = this.props; |
| 64 | if (!commonUtils.isEmptyObject(checkConfig) && !commonUtils.isEmptyObject(masterData)) { | 64 | if (!commonUtils.isEmptyObject(checkConfig) && !commonUtils.isEmptyObject(masterData)) { |
src/components/Common/CommonBillDeliverEvent.js
| @@ -47,7 +47,7 @@ export default (ChildComponent) => { | @@ -47,7 +47,7 @@ export default (ChildComponent) => { | ||
| 47 | employeeConfig: employeeConfigOld, | 47 | employeeConfig: employeeConfigOld, |
| 48 | } = nextProps; | 48 | } = nextProps; |
| 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)) { | 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 | /* 数据Id */ | 51 | /* 数据Id */ |
| 52 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 52 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 53 | const BtnDesignFunctionConfig = commonUtils.isNotEmptyObject(masterConfig) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'BtnBsOperation.BtnDesignFunction') : {}; | 53 | const BtnDesignFunctionConfig = commonUtils.isNotEmptyObject(masterConfig) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'BtnBsOperation.BtnDesignFunction') : {}; |
| @@ -274,7 +274,7 @@ export default (ChildComponent) => { | @@ -274,7 +274,7 @@ export default (ChildComponent) => { | ||
| 274 | }); | 274 | }); |
| 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) { | 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 | const config = {}; | 276 | const config = {}; |
| 277 | - const sId = currentId !== undefined ? currentId : ''; | 277 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 278 | /* 数据Id */ | 278 | /* 数据Id */ |
| 279 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 279 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 280 | let addState = {}; | 280 | let addState = {}; |
| @@ -296,7 +296,7 @@ export default (ChildComponent) => { | @@ -296,7 +296,7 @@ export default (ChildComponent) => { | ||
| 296 | masterConfig, sId, pageLoading: false, ...addState, | 296 | masterConfig, sId, pageLoading: false, ...addState, |
| 297 | }); | 297 | }); |
| 298 | } else if (commonUtils.isEmptyObject(slaveConfigOld) && commonUtils.isEmptyObject(masterConfigOld) && formData.length === 2 && (sModelsType === 'quality/accident') && formRoute.indexOf('indexOee') === -1) { | 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 | /* 数据Id */ | 300 | /* 数据Id */ |
| 301 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 301 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 302 | const slaveConfig = formData.filter(item => item.bGrd && item.sTbName === 'mftqualityaccidentSlave')[0]; | 302 | const slaveConfig = formData.filter(item => item.bGrd && item.sTbName === 'mftqualityaccidentSlave')[0]; |
| @@ -319,7 +319,7 @@ export default (ChildComponent) => { | @@ -319,7 +319,7 @@ export default (ChildComponent) => { | ||
| 319 | }); | 319 | }); |
| 320 | } else if (formRoute.indexOf('indexOee') > -1 && commonUtils.isEmptyObject(employeeConfigOld) && commonUtils.isEmptyObject(slaveConfigOld) && formData.length > 0) { | 320 | } else if (formRoute.indexOf('indexOee') > -1 && commonUtils.isEmptyObject(employeeConfigOld) && commonUtils.isEmptyObject(slaveConfigOld) && formData.length > 0) { |
| 321 | if (formRoute === '/indexOee/labelPrint' && commonUtils.isEmpty(slaveConfigOld)) { /* 入库标签打印 */ | 321 | if (formRoute === '/indexOee/labelPrint' && commonUtils.isEmpty(slaveConfigOld)) { /* 入库标签打印 */ |
| 322 | - const sId = currentId !== undefined ? currentId : ''; | 322 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 323 | /* 数据Id */ | 323 | /* 数据Id */ |
| 324 | const masterConfig = formData[0]; | 324 | const masterConfig = formData[0]; |
| 325 | const slaveConfig = formData[0]; | 325 | const slaveConfig = formData[0]; |
| @@ -507,7 +507,7 @@ export default (ChildComponent) => { | @@ -507,7 +507,7 @@ export default (ChildComponent) => { | ||
| 507 | /** 获取主表、从表、审核表数据 */ | 507 | /** 获取主表、从表、审核表数据 */ |
| 508 | handleGetData = async (masterConfig, slaveConfig, checkConfig, bEditClick) => { | 508 | handleGetData = async (masterConfig, slaveConfig, checkConfig, bEditClick) => { |
| 509 | const { currentId } = this.props; /* 当前页签数据 */ | 509 | const { currentId } = this.props; /* 当前页签数据 */ |
| 510 | - const sId = currentId !== undefined ? currentId : ''; | 510 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 511 | await this.props.handleGetDataOne({ | 511 | await this.props.handleGetDataOne({ |
| 512 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, | 512 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, |
| 513 | }); | 513 | }); |
| @@ -544,7 +544,7 @@ export default (ChildComponent) => { | @@ -544,7 +544,7 @@ export default (ChildComponent) => { | ||
| 544 | /* 获取表数据 */ | 544 | /* 获取表数据 */ |
| 545 | handleGetMemoData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig) => { | 545 | handleGetMemoData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig) => { |
| 546 | const { currentId, sModelsType } = this.props; /* 当前页签数据 */ | 546 | const { currentId, sModelsType } = this.props; /* 当前页签数据 */ |
| 547 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 547 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 548 | const addStateControl = await this.props.handleGetDataSet({ | 548 | const addStateControl = await this.props.handleGetDataSet({ |
| 549 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, | 549 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, |
| 550 | }); | 550 | }); |
| @@ -597,7 +597,7 @@ export default (ChildComponent) => { | @@ -597,7 +597,7 @@ export default (ChildComponent) => { | ||
| 597 | /* 获取单张表数据 */ | 597 | /* 获取单张表数据 */ |
| 598 | handleGetOneMemoData = (memoName, memoConfig) => { | 598 | handleGetOneMemoData = (memoName, memoConfig) => { |
| 599 | const { currentId } = this.props; /* 当前页签数据 */ | 599 | const { currentId } = this.props; /* 当前页签数据 */ |
| 600 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 600 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 601 | if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ | 601 | if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ |
| 602 | this.props.handleGetDataSet({ | 602 | this.props.handleGetDataSet({ |
| 603 | name: memoName, configData: memoConfig, condition: { sSqlCondition: { sParentId: sId } }, | 603 | name: memoName, configData: memoConfig, condition: { sSqlCondition: { sParentId: sId } }, |
src/components/Common/CommonBillEvent.js
| @@ -79,7 +79,7 @@ export default (ChildComponent) => { | @@ -79,7 +79,7 @@ export default (ChildComponent) => { | ||
| 79 | slaveInfoList: slaveInfoListOld, | 79 | slaveInfoList: slaveInfoListOld, |
| 80 | } = nextProps; | 80 | } = nextProps; |
| 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')))) { | 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 | /* 数据Id */ | 83 | /* 数据Id */ |
| 84 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 84 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 85 | const BtnDesignFunctionConfig = commonUtils.isNotEmptyObject(masterConfig) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'BtnBsOperation.BtnDesignFunction') : {}; | 85 | const BtnDesignFunctionConfig = commonUtils.isNotEmptyObject(masterConfig) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'BtnBsOperation.BtnDesignFunction') : {}; |
| @@ -494,7 +494,7 @@ export default (ChildComponent) => { | @@ -494,7 +494,7 @@ export default (ChildComponent) => { | ||
| 494 | }); | 494 | }); |
| 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) { | 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 | const config = {}; | 496 | const config = {}; |
| 497 | - const sId = currentId !== undefined ? currentId : ''; | 497 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 498 | /* 数据Id */ | 498 | /* 数据Id */ |
| 499 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 499 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 500 | let addState = {}; | 500 | let addState = {}; |
| @@ -516,7 +516,7 @@ export default (ChildComponent) => { | @@ -516,7 +516,7 @@ export default (ChildComponent) => { | ||
| 516 | masterConfig, sId, pageLoading: false, ...addState, | 516 | masterConfig, sId, pageLoading: false, ...addState, |
| 517 | }); | 517 | }); |
| 518 | } else if (commonUtils.isEmptyObject(slaveConfigOld) && commonUtils.isEmptyObject(masterConfigOld) && formData.length === 2 && (sModelsType === 'quality/accident') && formRoute.indexOf('indexOee') === -1) { | 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 | /* 数据Id */ | 520 | /* 数据Id */ |
| 521 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 521 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 522 | const slaveConfig = formData.filter(item => item.bGrd && item.sTbName === 'mftqualityaccidentSlave')[0]; | 522 | const slaveConfig = formData.filter(item => item.bGrd && item.sTbName === 'mftqualityaccidentSlave')[0]; |
| @@ -551,7 +551,7 @@ export default (ChildComponent) => { | @@ -551,7 +551,7 @@ export default (ChildComponent) => { | ||
| 551 | // employeeConfig, employeeColumn, masterConfig, ...addState, | 551 | // employeeConfig, employeeColumn, masterConfig, ...addState, |
| 552 | // }); | 552 | // }); |
| 553 | if (formRoute === '/indexOee/labelPrint' && commonUtils.isEmpty(slaveConfigOld)) { /* 入库标签打印 */ | 553 | if (formRoute === '/indexOee/labelPrint' && commonUtils.isEmpty(slaveConfigOld)) { /* 入库标签打印 */ |
| 554 | - const sId = currentId !== undefined ? currentId : ''; | 554 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 555 | /* 数据Id */ | 555 | /* 数据Id */ |
| 556 | const masterConfig = formData[0]; | 556 | const masterConfig = formData[0]; |
| 557 | const slaveConfig = formData[0]; | 557 | const slaveConfig = formData[0]; |
| @@ -801,7 +801,7 @@ export default (ChildComponent) => { | @@ -801,7 +801,7 @@ export default (ChildComponent) => { | ||
| 801 | /* 获取表数据 */ | 801 | /* 获取表数据 */ |
| 802 | handleGetMemoData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig) => { | 802 | handleGetMemoData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig) => { |
| 803 | const { currentId, sModelsType } = this.props; /* 当前页签数据 */ | 803 | const { currentId, sModelsType } = this.props; /* 当前页签数据 */ |
| 804 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 804 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 805 | const addStateControl = await this.props.handleGetDataSet({ | 805 | const addStateControl = await this.props.handleGetDataSet({ |
| 806 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, | 806 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, |
| 807 | }); | 807 | }); |
| @@ -860,7 +860,7 @@ export default (ChildComponent) => { | @@ -860,7 +860,7 @@ export default (ChildComponent) => { | ||
| 860 | /* 获取单张表数据 */ | 860 | /* 获取单张表数据 */ |
| 861 | handleGetOneMemoData = (memoName, memoConfig) => { | 861 | handleGetOneMemoData = (memoName, memoConfig) => { |
| 862 | const { currentId } = this.props; /* 当前页签数据 */ | 862 | const { currentId } = this.props; /* 当前页签数据 */ |
| 863 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 863 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 864 | if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ | 864 | if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ |
| 865 | this.props.handleGetDataSet({ | 865 | this.props.handleGetDataSet({ |
| 866 | name: memoName, configData: memoConfig, condition: { sSqlCondition: { sParentId: sId } }, | 866 | name: memoName, configData: memoConfig, condition: { sSqlCondition: { sParentId: sId } }, |
| @@ -2290,8 +2290,6 @@ export default (ChildComponent) => { | @@ -2290,8 +2290,6 @@ export default (ChildComponent) => { | ||
| 2290 | }, | 2290 | }, |
| 2291 | onCancel() { | 2291 | onCancel() { |
| 2292 | }, | 2292 | }, |
| 2293 | - okText: '保存', | ||
| 2294 | - cancelText: '不保存', | ||
| 2295 | }); | 2293 | }); |
| 2296 | this.props.onSaveState({ | 2294 | this.props.onSaveState({ |
| 2297 | loading: false, | 2295 | loading: false, |
| @@ -2829,7 +2827,8 @@ export default (ChildComponent) => { | @@ -2829,7 +2827,8 @@ export default (ChildComponent) => { | ||
| 2829 | /* 上一条、下一条、首条、末条 */ | 2827 | /* 上一条、下一条、首条、末条 */ |
| 2830 | handleSearchData = async (handleType) => { | 2828 | handleSearchData = async (handleType) => { |
| 2831 | const { | 2829 | const { |
| 2832 | - sModelsId, app, currentIndexFlag, currentPageNo, masterData, masterConfig, slaveConfig, checkConfig | 2830 | + sModelsId, app, currentIndexFlag, currentPageNo, masterData, masterConfig, slaveConfig, checkConfig, |
| 2831 | + sSrcModelsId, | ||
| 2833 | } = this.props; | 2832 | } = this.props; |
| 2834 | let { sBillIdsArray = []} = this.props; | 2833 | let { sBillIdsArray = []} = this.props; |
| 2835 | let { currentId } = this.props; | 2834 | let { currentId } = this.props; |
| @@ -2888,7 +2887,7 @@ export default (ChildComponent) => { | @@ -2888,7 +2887,7 @@ export default (ChildComponent) => { | ||
| 2888 | if(!bExist) { | 2887 | if(!bExist) { |
| 2889 | const value = { | 2888 | const value = { |
| 2890 | sClientType: '1', sFilterOrderBy, bFilter, sListFormmasterId, currentPosition, handleType, iCountSum: pages.total, | 2889 | sClientType: '1', sFilterOrderBy, bFilter, sListFormmasterId, currentPosition, handleType, iCountSum: pages.total, |
| 2891 | - sUpId: masterData?.sId, | 2890 | + sUpId: masterData?.sId, sParentModelId :sSrcModelsId, |
| 2892 | }; | 2891 | }; |
| 2893 | const url = `${commonConfig.server_host}business/getBusinessDataByIndex?sModelsId=${sModelsId}`; | 2892 | const url = `${commonConfig.server_host}business/getBusinessDataByIndex?sModelsId=${sModelsId}`; |
| 2894 | /* 接收返回值 */ | 2893 | /* 接收返回值 */ |
src/components/Common/CommonCheckBillEvent.js
| @@ -72,7 +72,7 @@ export default (ChildComponent) => { | @@ -72,7 +72,7 @@ export default (ChildComponent) => { | ||
| 72 | employeeConfig: employeeConfigOld, | 72 | employeeConfig: employeeConfigOld, |
| 73 | } = nextProps; | 73 | } = nextProps; |
| 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'))) { | 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 | /* 数据Id */ | 76 | /* 数据Id */ |
| 77 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 77 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 78 | const BtnDesignFunctionConfig = commonUtils.isNotEmptyObject(masterConfig) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'BtnBsOperation.BtnDesignFunction') : {}; | 78 | const BtnDesignFunctionConfig = commonUtils.isNotEmptyObject(masterConfig) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'BtnBsOperation.BtnDesignFunction') : {}; |
| @@ -373,7 +373,7 @@ export default (ChildComponent) => { | @@ -373,7 +373,7 @@ export default (ChildComponent) => { | ||
| 373 | }); | 373 | }); |
| 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) { | 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 | const config = {}; | 375 | const config = {}; |
| 376 | - const sId = currentId !== undefined ? currentId : ''; | 376 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 377 | /* 数据Id */ | 377 | /* 数据Id */ |
| 378 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 378 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 379 | let addState = {}; | 379 | let addState = {}; |
| @@ -395,7 +395,7 @@ export default (ChildComponent) => { | @@ -395,7 +395,7 @@ export default (ChildComponent) => { | ||
| 395 | masterConfig, sId, pageLoading: false, ...addState, | 395 | masterConfig, sId, pageLoading: false, ...addState, |
| 396 | }); | 396 | }); |
| 397 | } else if (commonUtils.isEmptyObject(slaveConfigOld) && commonUtils.isEmptyObject(masterConfigOld) && formData.length === 2 && (sModelsType === 'quality/accident') && formRoute.indexOf('indexOee') === -1) { | 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 | /* 数据Id */ | 399 | /* 数据Id */ |
| 400 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 400 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 401 | const slaveConfig = formData.filter(item => item.bGrd && item.sTbName === 'mftqualityaccidentSlave')[0]; | 401 | const slaveConfig = formData.filter(item => item.bGrd && item.sTbName === 'mftqualityaccidentSlave')[0]; |
| @@ -430,7 +430,7 @@ export default (ChildComponent) => { | @@ -430,7 +430,7 @@ export default (ChildComponent) => { | ||
| 430 | // employeeConfig, employeeColumn, masterConfig, ...addState, | 430 | // employeeConfig, employeeColumn, masterConfig, ...addState, |
| 431 | // }); | 431 | // }); |
| 432 | if (formRoute === '/indexOee/labelPrint' && commonUtils.isEmpty(slaveConfigOld)) { /* 入库标签打印 */ | 432 | if (formRoute === '/indexOee/labelPrint' && commonUtils.isEmpty(slaveConfigOld)) { /* 入库标签打印 */ |
| 433 | - const sId = currentId !== undefined ? currentId : ''; | 433 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 434 | /* 数据Id */ | 434 | /* 数据Id */ |
| 435 | const masterConfig = formData[0]; | 435 | const masterConfig = formData[0]; |
| 436 | const slaveConfig = formData[0]; | 436 | const slaveConfig = formData[0]; |
| @@ -618,7 +618,7 @@ export default (ChildComponent) => { | @@ -618,7 +618,7 @@ export default (ChildComponent) => { | ||
| 618 | /** 获取主表、从表、审核表数据 */ | 618 | /** 获取主表、从表、审核表数据 */ |
| 619 | handleGetData = async (masterConfig, slaveConfig, checkConfig, bEditClick) => { | 619 | handleGetData = async (masterConfig, slaveConfig, checkConfig, bEditClick) => { |
| 620 | const { currentId } = this.props; /* 当前页签数据 */ | 620 | const { currentId } = this.props; /* 当前页签数据 */ |
| 621 | - const sId = currentId !== undefined ? currentId : ''; | 621 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 622 | const addStateMaster = await this.props.handleGetDataOne({ | 622 | const addStateMaster = await this.props.handleGetDataOne({ |
| 623 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, isWait: true, bEditClick, | 623 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, isWait: true, bEditClick, |
| 624 | }); | 624 | }); |
| @@ -669,7 +669,7 @@ export default (ChildComponent) => { | @@ -669,7 +669,7 @@ export default (ChildComponent) => { | ||
| 669 | /* 获取表数据 */ | 669 | /* 获取表数据 */ |
| 670 | handleGetMemoData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig) => { | 670 | handleGetMemoData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig) => { |
| 671 | const { currentId, sModelsType } = this.props; /* 当前页签数据 */ | 671 | const { currentId, sModelsType } = this.props; /* 当前页签数据 */ |
| 672 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 672 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 673 | let addStateControl = {}; | 673 | let addStateControl = {}; |
| 674 | if (commonUtils.isNotEmptyObject(controlConfig)) { | 674 | if (commonUtils.isNotEmptyObject(controlConfig)) { |
| 675 | addStateControl = await this.props.handleGetDataSet({ | 675 | addStateControl = await this.props.handleGetDataSet({ |
| @@ -732,7 +732,7 @@ export default (ChildComponent) => { | @@ -732,7 +732,7 @@ export default (ChildComponent) => { | ||
| 732 | /* 获取单张表数据 */ | 732 | /* 获取单张表数据 */ |
| 733 | handleGetOneMemoData = (memoName, memoConfig) => { | 733 | handleGetOneMemoData = (memoName, memoConfig) => { |
| 734 | const { currentId } = this.props; /* 当前页签数据 */ | 734 | const { currentId } = this.props; /* 当前页签数据 */ |
| 735 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 735 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 736 | if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ | 736 | if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ |
| 737 | this.props.handleGetDataSet({ | 737 | this.props.handleGetDataSet({ |
| 738 | name: memoName, configData: memoConfig, condition: { sSqlCondition: { sParentId: sId } }, | 738 | name: memoName, configData: memoConfig, condition: { sSqlCondition: { sParentId: sId } }, |
src/components/Common/CommonComponent/index.js
| @@ -2758,15 +2758,17 @@ export default class CommonComponent extends Component { | @@ -2758,15 +2758,17 @@ export default class CommonComponent extends Component { | ||
| 2758 | */ | 2758 | */ |
| 2759 | floatNumberCheck = (num) => { | 2759 | floatNumberCheck = (num) => { |
| 2760 | const dNetPrice = this.props.app?.decimals?.dNetPrice; | 2760 | const dNetPrice = this.props.app?.decimals?.dNetPrice; |
| 2761 | + const Maximum = commonFunc.showLocalMessage(this.props, 'Maximum', '最多输入${digit}位小数'); | ||
| 2761 | const { showConfig } = this.props; | 2762 | const { showConfig } = this.props; |
| 2762 | const { sName, showName } = showConfig; | 2763 | const { sName, showName } = showConfig; |
| 2763 | const digit = sName.includes('Price') && dNetPrice ? dNetPrice : 6; | 2764 | const digit = sName.includes('Price') && dNetPrice ? dNetPrice : 6; |
| 2765 | + const Maximun = Maximum.replace('${digit}', digit); | ||
| 2764 | if (typeof num === 'string') { | 2766 | if (typeof num === 'string') { |
| 2765 | num = num.replace('*', ''); | 2767 | num = num.replace('*', ''); |
| 2766 | } | 2768 | } |
| 2767 | const checkRule = new RegExp(`^(-?\\d+)(\\.?)(\\d{1,${digit}})?$`); | 2769 | const checkRule = new RegExp(`^(-?\\d+)(\\.?)(\\d{1,${digit}})?$`); |
| 2768 | if (!checkRule.test(num) && num && num !== '-' && num !== '.') { | 2770 | if (!checkRule.test(num) && num && num !== '-' && num !== '.') { |
| 2769 | - message.warning(`【${showName}】【${sName}】最多输入${digit}位小数!`); | 2771 | + message.warning(`【${showName}】【${sName}】${Maximun}`); |
| 2770 | return undefined; | 2772 | return undefined; |
| 2771 | } else { | 2773 | } else { |
| 2772 | return num; | 2774 | return num; |
src/components/Common/CommonCostomTabBill.js
| @@ -2371,6 +2371,8 @@ class CommonNewBill extends Component { | @@ -2371,6 +2371,8 @@ class CommonNewBill extends Component { | ||
| 2371 | slave6Child1Config, | 2371 | slave6Child1Config, |
| 2372 | slave6Child1InfoConfig, | 2372 | slave6Child1InfoConfig, |
| 2373 | } = this.props; | 2373 | } = this.props; |
| 2374 | + const confirmSetting = commonFunc.showLocalMessage(this.props, 'confirmSetting', '请配置按钮的存储过程'); | ||
| 2375 | + const confirmSettingParam = commonFunc.showLocalMessage(this.props, 'confirmSettingParam', '请先操作参数运算'); | ||
| 2374 | const iIndex = | 2376 | const iIndex = |
| 2375 | commonUtils.isNotEmptyObject(tableSelectedRowKeys) && | 2377 | commonUtils.isNotEmptyObject(tableSelectedRowKeys) && |
| 2376 | commonUtils.isNotEmptyArr(tableData) | 2378 | commonUtils.isNotEmptyArr(tableData) |
| @@ -2388,7 +2390,7 @@ class CommonNewBill extends Component { | @@ -2388,7 +2390,7 @@ class CommonNewBill extends Component { | ||
| 2388 | showConfig.sControlName.includes("BtnCustom.dSplitworkQty") | 2390 | showConfig.sControlName.includes("BtnCustom.dSplitworkQty") |
| 2389 | ) { | 2391 | ) { |
| 2390 | if (masterData.bFirstCalc !== 1) { | 2392 | if (masterData.bFirstCalc !== 1) { |
| 2391 | - message.error("请先操作参数运算!"); | 2393 | + message.error(confirmSettingParam); |
| 2392 | return; | 2394 | return; |
| 2393 | } | 2395 | } |
| 2394 | this.props.onSaveState({ pageLoading: true }); | 2396 | this.props.onSaveState({ pageLoading: true }); |
| @@ -2435,7 +2437,7 @@ class CommonNewBill extends Component { | @@ -2435,7 +2437,7 @@ class CommonNewBill extends Component { | ||
| 2435 | }); | 2437 | }); |
| 2436 | } | 2438 | } |
| 2437 | } else { | 2439 | } else { |
| 2438 | - message.error("请正确配置存储过程名称!"); | 2440 | + message.error(confirmSetting); |
| 2439 | } | 2441 | } |
| 2440 | } else if ( | 2442 | } else if ( |
| 2441 | commonUtils.isNotEmptyObject(showConfig) && | 2443 | commonUtils.isNotEmptyObject(showConfig) && |
| @@ -2523,7 +2525,7 @@ class CommonNewBill extends Component { | @@ -2523,7 +2525,7 @@ class CommonNewBill extends Component { | ||
| 2523 | }); | 2525 | }); |
| 2524 | } | 2526 | } |
| 2525 | } else { | 2527 | } else { |
| 2526 | - message.error("请正确配置存储过程名称!"); | 2528 | + message.error(confirmSetting); |
| 2527 | } | 2529 | } |
| 2528 | } | 2530 | } |
| 2529 | }; | 2531 | }; |
| @@ -2554,7 +2556,7 @@ class CommonNewBill extends Component { | @@ -2554,7 +2556,7 @@ class CommonNewBill extends Component { | ||
| 2554 | // 刷新工单交期 | 2556 | // 刷新工单交期 |
| 2555 | handleRefreshGdjq = async() => { | 2557 | handleRefreshGdjq = async() => { |
| 2556 | const { currentId, slave2Child0Config, slave2Child0InfoConfig } = this.props; | 2558 | const { currentId, slave2Child0Config, slave2Child0InfoConfig } = this.props; |
| 2557 | - const sId = currentId !== undefined ? currentId : ''; | 2559 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 2558 | const conditonValues1 = this.props.onGetSqlConditionValues(slave2Child0Config); | 2560 | const conditonValues1 = this.props.onGetSqlConditionValues(slave2Child0Config); |
| 2559 | let returnData1 = await this.props.handleGetDataSet({ | 2561 | let returnData1 = await this.props.handleGetDataSet({ |
| 2560 | name: "slave2Child0", | 2562 | name: "slave2Child0", |
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代表是否是表格 */ |
src/components/Common/CommonGroupBillEvent.js
| @@ -64,7 +64,7 @@ export default (ChildComponent) => { | @@ -64,7 +64,7 @@ export default (ChildComponent) => { | ||
| 64 | } = nextProps; | 64 | } = nextProps; |
| 65 | const { masterConfig: masterConfigOld, app } = nextProps; | 65 | const { masterConfig: masterConfigOld, app } = nextProps; |
| 66 | if (commonUtils.isEmptyObject(masterConfigOld) && formData.length > 0) { | 66 | if (commonUtils.isEmptyObject(masterConfigOld) && formData.length > 0) { |
| 67 | - const sId = currentId !== undefined ? currentId : ''; | 67 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 68 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 68 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 69 | 69 | ||
| 70 | const sReasonTitle = commonUtils.isNotEmptyObject(commonFunc.showMessage(app.commonConst, 'sReason'))? | 70 | const sReasonTitle = commonUtils.isNotEmptyObject(commonFunc.showMessage(app.commonConst, 'sReason'))? |
| @@ -360,7 +360,7 @@ export default (ChildComponent) => { | @@ -360,7 +360,7 @@ export default (ChildComponent) => { | ||
| 360 | /** 获取主表、从表、审核表数据 */ | 360 | /** 获取主表、从表、审核表数据 */ |
| 361 | handleGetData = async (masterConfig, slaveConfig, slave0Config, slave1Config, slave2Config, slave3Config, slave4Config, bEditClick, slave5Config, slave6Config, slave7Config, slave8Config, slave9Config, slave10Config) => { | 361 | handleGetData = async (masterConfig, slaveConfig, slave0Config, slave1Config, slave2Config, slave3Config, slave4Config, bEditClick, slave5Config, slave6Config, slave7Config, slave8Config, slave9Config, slave10Config) => { |
| 362 | const { currentId, app } = this.props; /* 当前页签数据 */ | 362 | const { currentId, app } = this.props; /* 当前页签数据 */ |
| 363 | - const sId = currentId !== undefined ? currentId : ''; | 363 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 364 | const { sModelsId, masterData, sModelsType, slaveSelectedRowKeys } = this.props; | 364 | const { sModelsId, masterData, sModelsType, slaveSelectedRowKeys } = this.props; |
| 365 | await this.props.handleGetDataOne({ name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick }); | 365 | await this.props.handleGetDataOne({ name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick }); |
| 366 | let addStateSlave = {}; | 366 | let addStateSlave = {}; |
| @@ -530,7 +530,7 @@ export default (ChildComponent) => { | @@ -530,7 +530,7 @@ export default (ChildComponent) => { | ||
| 530 | /* 获取表数据 */ | 530 | /* 获取表数据 */ |
| 531 | handleGetMemoData = async (slaveConfig, slave0Config, slave1Config, slave2Config, slave3Config, slave4Config) => { | 531 | handleGetMemoData = async (slaveConfig, slave0Config, slave1Config, slave2Config, slave3Config, slave4Config) => { |
| 532 | const { currentId } = this.props; /* 当前页签数据 */ | 532 | const { currentId } = this.props; /* 当前页签数据 */ |
| 533 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 533 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 534 | const addStateSlave = slaveConfig ? await this.props.handleGetDataSet({ | 534 | const addStateSlave = slaveConfig ? await this.props.handleGetDataSet({ |
| 535 | name: 'slave', configData: slaveConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, | 535 | name: 'slave', configData: slaveConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, |
| 536 | }) : ''; | 536 | }) : ''; |
| @@ -564,7 +564,7 @@ export default (ChildComponent) => { | @@ -564,7 +564,7 @@ export default (ChildComponent) => { | ||
| 564 | /* 获取单张表数据 */ | 564 | /* 获取单张表数据 */ |
| 565 | handleGetOneMemoData = (memoName, memoConfig) => { | 565 | handleGetOneMemoData = (memoName, memoConfig) => { |
| 566 | const { currentId } = this.props; /* 当前页签数据 */ | 566 | const { currentId } = this.props; /* 当前页签数据 */ |
| 567 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 567 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 568 | if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ | 568 | if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ |
| 569 | this.props.handleGetDataSet({ | 569 | this.props.handleGetDataSet({ |
| 570 | name: memoName, configData: memoConfig, condition: { sSqlCondition: { sParentId: sId } }, | 570 | name: memoName, configData: memoConfig, condition: { sSqlCondition: { sParentId: sId } }, |
src/components/Common/CommonJurisdictionEvent.js
| @@ -22,7 +22,7 @@ export default (ChildComponent) => { | @@ -22,7 +22,7 @@ export default (ChildComponent) => { | ||
| 22 | formData, currentId, groupConfig, treeData, | 22 | formData, currentId, groupConfig, treeData, |
| 23 | } = nextProps; | 23 | } = nextProps; |
| 24 | let { bReceived } = nextProps; | 24 | let { bReceived } = nextProps; |
| 25 | - const sId = currentId !== undefined ? currentId : ''; | 25 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 26 | 26 | ||
| 27 | if (commonUtils.isEmptyObject(groupConfig) && bReceived === undefined) { | 27 | if (commonUtils.isEmptyObject(groupConfig) && bReceived === undefined) { |
| 28 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 28 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| @@ -199,7 +199,7 @@ export default (ChildComponent) => { | @@ -199,7 +199,7 @@ export default (ChildComponent) => { | ||
| 199 | handleGetSlaveData = (getType, sName, currConfig) => { | 199 | handleGetSlaveData = (getType, sName, currConfig) => { |
| 200 | const { currentId } = this.props; | 200 | const { currentId } = this.props; |
| 201 | /* 当前页签数据 */ | 201 | /* 当前页签数据 */ |
| 202 | - const sId = currentId !== undefined ? currentId : ''; | 202 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 203 | if (getType === 'One') { | 203 | if (getType === 'One') { |
| 204 | this.props.handleGetDataOne({ | 204 | this.props.handleGetDataOne({ |
| 205 | name: 'master', configData: currConfig, condition: { sId, pageSize: '', pageNum: '' }, | 205 | name: 'master', configData: currConfig, condition: { sId, pageSize: '', pageNum: '' }, |
src/components/Common/CommonJurisdictionNewEvent.js
| @@ -23,7 +23,7 @@ export default (ChildComponent) => { | @@ -23,7 +23,7 @@ export default (ChildComponent) => { | ||
| 23 | formData, currentId, groupConfig, treeData, formRoute, | 23 | formData, currentId, groupConfig, treeData, formRoute, |
| 24 | } = nextProps; | 24 | } = nextProps; |
| 25 | let { bReceived } = nextProps; | 25 | let { bReceived } = nextProps; |
| 26 | - const sId = currentId !== undefined ? currentId : ''; | 26 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 27 | 27 | ||
| 28 | if (commonUtils.isEmptyObject(groupConfig) && bReceived === undefined) { | 28 | if (commonUtils.isEmptyObject(groupConfig) && bReceived === undefined) { |
| 29 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 29 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| @@ -228,7 +228,7 @@ export default (ChildComponent) => { | @@ -228,7 +228,7 @@ export default (ChildComponent) => { | ||
| 228 | handleGetSlaveData = (getType, sName, currConfig) => { | 228 | handleGetSlaveData = (getType, sName, currConfig) => { |
| 229 | const { currentId } = this.props; | 229 | const { currentId } = this.props; |
| 230 | /* 当前页签数据 */ | 230 | /* 当前页签数据 */ |
| 231 | - const sId = currentId !== undefined ? currentId : ''; | 231 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 232 | if (getType === 'One') { | 232 | if (getType === 'One') { |
| 233 | this.props.handleGetDataOne({ | 233 | this.props.handleGetDataOne({ |
| 234 | name: 'master', configData: currConfig, condition: { sId, pageSize: '', pageNum: '' }, | 234 | name: 'master', configData: currConfig, condition: { sId, pageSize: '', pageNum: '' }, |
src/components/Common/CommonListEditEvent.js
| @@ -65,7 +65,7 @@ export default (ChildComponent) => { | @@ -65,7 +65,7 @@ export default (ChildComponent) => { | ||
| 65 | } | 65 | } |
| 66 | } | 66 | } |
| 67 | if (commonUtils.isEmptyObject(slaveConfigOld) && formData.length > 0 && (formRoute.indexOf('/indexOee') > -1 || searchSolution !== undefined)) { | 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 | /* 数据Id */ | 69 | /* 数据Id */ |
| 70 | const slaveConfig = formData[0]; | 70 | const slaveConfig = formData[0]; |
| 71 | let addState = {}; | 71 | let addState = {}; |
src/components/Common/CommonListEvent.js
| @@ -65,7 +65,7 @@ export default (ChildComponent) => { | @@ -65,7 +65,7 @@ export default (ChildComponent) => { | ||
| 65 | } | 65 | } |
| 66 | } | 66 | } |
| 67 | if (commonUtils.isEmptyObject(slaveConfigOld) && formData.length > 0 && (formRoute.indexOf('/indexOee') > -1 || searchSolution !== undefined)) { | 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 | /* 数据Id */ | 69 | /* 数据Id */ |
| 70 | const slaveConfig = formData[0]; | 70 | const slaveConfig = formData[0]; |
| 71 | let addState = {}; | 71 | let addState = {}; |
src/components/Common/CommonListSelectFlex/index.js
| @@ -501,8 +501,8 @@ const CommonListComponent = Form.create({ | @@ -501,8 +501,8 @@ const CommonListComponent = Form.create({ | ||
| 501 | const sProcessParams = commonFunc.showMessage(app.commonConst, 'sProcessParams');/* 选择工艺参数标题 */ | 501 | const sProcessParams = commonFunc.showMessage(app.commonConst, 'sProcessParams');/* 选择工艺参数标题 */ |
| 502 | const displayLeft = (sModelsType !== 'search/sisColor' && sModelsType !== 'search/commonPopup'); | 502 | const displayLeft = (sModelsType !== 'search/sisColor' && sModelsType !== 'search/commonPopup'); |
| 503 | 503 | ||
| 504 | - const BtnSure = commonFunc.showLocalMessage(this.props, 'BtnSure', '确定'); | ||
| 505 | - const BtnCancel = commonFunc.showLocalMessage(this.props, 'BtnCancel', '取消'); | 504 | + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确定'); |
| 505 | + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); | ||
| 506 | return ( | 506 | return ( |
| 507 | <div className="modalChooseProcessContent"> | 507 | <div className="modalChooseProcessContent"> |
| 508 | <Form > | 508 | <Form > |
src/components/Common/CommonListSelectMulti/index.js
| 1 | -import React, { Component } from 'react'; | ||
| 2 | -import { DownOutlined } from '@ant-design/icons'; | ||
| 3 | -import { Form } from '@ant-design/compatible'; | 1 | +import React, { Component } from "react"; |
| 2 | +import { DownOutlined } from "@ant-design/icons"; | ||
| 3 | +import { Form } from "@ant-design/compatible"; | ||
| 4 | // import '@ant-design/compatible/assets/index.css'; | 4 | // import '@ant-design/compatible/assets/index.css'; |
| 5 | -import { Layout, Spin, Button, Row, Col, message } from 'antd-v4'; | ||
| 6 | -import CommonListEvent from '@/components/Common/CommonListEvent';/* 继承销售模块业务功能 */ | 5 | +import { Layout, Spin, Button, Row, Col, message } from "antd-v4"; |
| 6 | +import CommonListEvent from "@/components/Common/CommonListEvent"; /* 继承销售模块业务功能 */ | ||
| 7 | // import * as commonUtils from '../../utils/utils'; /* 通用方法 */ | 7 | // import * as commonUtils from '../../utils/utils'; /* 通用方法 */ |
| 8 | -import * as commonFunc from '@/components/Common//commonFunc';/* 通用单据方法 */ /* 通用单据方法 */ | 8 | +import * as commonFunc from "@/components/Common//commonFunc"; /* 通用单据方法 */ /* 通用单据方法 */ |
| 9 | // eslint-disable-next-line import/no-named-as-default | 9 | // eslint-disable-next-line import/no-named-as-default |
| 10 | -import StaticEditTable from '@/components/Common//CommonTable';/* 可编辑表格 */ | ||
| 11 | -import StaticEditTree from '@/components/Common/Tree/StaticTree'; | ||
| 12 | -import CommonBase from '@/components/Common/CommonBase';/* 获取配置及数据 */ | ||
| 13 | -import * as commonBusiness from '@/components/Common//commonBusiness';/* 单据业务功能 */ | ||
| 14 | -import SearchComponent from '@/components/Common/SearchComponent'; | ||
| 15 | -import AntdDraggableModal from '@/components/Common/AntdDraggableModal'; | ||
| 16 | -import * as commonUtils from '@/utils/utils'; | ||
| 17 | -import ShowType from '@/components/Common/CommonComponent'; | ||
| 18 | -import commonConfig from '@/utils/config'; | 10 | +import StaticEditTable from "@/components/Common//CommonTable"; /* 可编辑表格 */ |
| 11 | +import StaticEditTree from "@/components/Common/Tree/StaticTree"; | ||
| 12 | +import CommonBase from "@/components/Common/CommonBase"; /* 获取配置及数据 */ | ||
| 13 | +import * as commonBusiness from "@/components/Common//commonBusiness"; /* 单据业务功能 */ | ||
| 14 | +import SearchComponent from "@/components/Common/SearchComponent"; | ||
| 15 | +import AntdDraggableModal from "@/components/Common/AntdDraggableModal"; | ||
| 16 | +import * as commonUtils from "@/utils/utils"; | ||
| 17 | +import ShowType from "@/components/Common/CommonComponent"; | ||
| 18 | +import commonConfig from "@/utils/config"; | ||
| 19 | // eslint-disable-next-line no-unused-vars | 19 | // eslint-disable-next-line no-unused-vars |
| 20 | -import stylesIndex from '@/components/Common/CommonListSelectMulti/index.less'; | 20 | +import stylesIndex from "@/components/Common/CommonListSelectMulti/index.less"; |
| 21 | // import DelIcon from '../../assets/delete.svg'; | 21 | // import DelIcon from '../../assets/delete.svg'; |
| 22 | // import DisableDelIcon from '../../assets/disabledelete.svg'; | 22 | // import DisableDelIcon from '../../assets/disabledelete.svg'; |
| 23 | 23 | ||
| @@ -34,20 +34,18 @@ class CommonList extends Component { | @@ -34,20 +34,18 @@ class CommonList extends Component { | ||
| 34 | }; | 34 | }; |
| 35 | } | 35 | } |
| 36 | componentWillReceiveProps(nextProps) { | 36 | componentWillReceiveProps(nextProps) { |
| 37 | - const { | ||
| 38 | - slaveData, selectedRowKeys, sModelsType, slaveFilterData, slaveSelectedData, masterConfig, | ||
| 39 | - gdsjurisdiction, | ||
| 40 | - } = nextProps; | ||
| 41 | - if (slaveFilterData === undefined && sModelsType === 'search/sisColor') { | 37 | + const { slaveData, selectedRowKeys, sModelsType, slaveFilterData, slaveSelectedData, masterConfig, gdsjurisdiction } = nextProps; |
| 38 | + if (slaveFilterData === undefined && sModelsType === "search/sisColor") { | ||
| 42 | if (commonUtils.isNotEmptyArr(slaveData) && commonUtils.isNotEmptyArr(selectedRowKeys)) { | 39 | if (commonUtils.isNotEmptyArr(slaveData) && commonUtils.isNotEmptyArr(selectedRowKeys)) { |
| 43 | const slaveFilterData = slaveData.filter(item => selectedRowKeys.includes(item.sSlaveId)); | 40 | const slaveFilterData = slaveData.filter(item => selectedRowKeys.includes(item.sSlaveId)); |
| 44 | if (commonUtils.isNotEmptyArr(slaveFilterData)) { | 41 | if (commonUtils.isNotEmptyArr(slaveFilterData)) { |
| 45 | this.props.onSaveState({ | 42 | this.props.onSaveState({ |
| 46 | - slaveFilterData, slaveSelectedRowKeys: selectedRowKeys, | 43 | + slaveFilterData, |
| 44 | + slaveSelectedRowKeys: selectedRowKeys, | ||
| 47 | }); | 45 | }); |
| 48 | } | 46 | } |
| 49 | } | 47 | } |
| 50 | - } else if (commonUtils.isEmptyArr(slaveFilterData) && sModelsType === 'search/commonPopup') { | 48 | + } else if (commonUtils.isEmptyArr(slaveFilterData) && sModelsType === "search/commonPopup") { |
| 51 | if (commonUtils.isNotEmptyArr(slaveData) && commonUtils.isNotEmptyArr(slaveSelectedData)) { | 49 | if (commonUtils.isNotEmptyArr(slaveData) && commonUtils.isNotEmptyArr(slaveSelectedData)) { |
| 52 | this.props.onSaveState({ | 50 | this.props.onSaveState({ |
| 53 | slaveFilterData: slaveSelectedData, | 51 | slaveFilterData: slaveSelectedData, |
| @@ -57,13 +55,17 @@ class CommonList extends Component { | @@ -57,13 +55,17 @@ class CommonList extends Component { | ||
| 57 | if (masterConfig) { | 55 | if (masterConfig) { |
| 58 | // 过滤存储需要展示的按钮 | 56 | // 过滤存储需要展示的按钮 |
| 59 | let btnList = masterConfig.gdsconfigformslave.filter(item => item.bVisible && !item.sName && item.showName && item.sControlName); | 57 | let btnList = masterConfig.gdsconfigformslave.filter(item => item.bVisible && !item.sName && item.showName && item.sControlName); |
| 60 | - btnList = btnList.filter(item => gdsjurisdiction.findIndex(child => item.sControlName === child.sAction) < 0 && (item.sControlName.includes('BtnAdd') || item.sControlName.includes('BtnCopyTo'))); | 58 | + btnList = btnList.filter( |
| 59 | + item => | ||
| 60 | + gdsjurisdiction.findIndex(child => item.sControlName === child.sAction) < 0 && | ||
| 61 | + (item.sControlName.includes("BtnAdd") || item.sControlName.includes("BtnCopyTo")) | ||
| 62 | + ); | ||
| 61 | // 过滤权限 | 63 | // 过滤权限 |
| 62 | this.setState({ btnList }); | 64 | this.setState({ btnList }); |
| 63 | } | 65 | } |
| 64 | if (this.state.openFlag) { | 66 | if (this.state.openFlag) { |
| 65 | this.setState({ openFlag: false }, () => { | 67 | this.setState({ openFlag: false }, () => { |
| 66 | - this.props.onButtonClick('BtnRefresh'); | 68 | + this.props.onButtonClick("BtnRefresh"); |
| 67 | }); | 69 | }); |
| 68 | } | 70 | } |
| 69 | } | 71 | } |
| @@ -71,21 +73,21 @@ class CommonList extends Component { | @@ -71,21 +73,21 @@ class CommonList extends Component { | ||
| 71 | onOpenNewTab = () => { | 73 | onOpenNewTab = () => { |
| 72 | this.setState({ openFlag: true }); | 74 | this.setState({ openFlag: true }); |
| 73 | this.props.onOpenNewTab(); | 75 | this.props.onOpenNewTab(); |
| 74 | - } | 76 | + }; |
| 75 | 77 | ||
| 76 | /** 确认下单 */ | 78 | /** 确认下单 */ |
| 77 | handleSelect = () => { | 79 | handleSelect = () => { |
| 78 | - const { | ||
| 79 | - slaveFilterData, app, processData, controlSelectedRowKeys, | ||
| 80 | - } = this.props; | 80 | + const { slaveFilterData, app, processData, controlSelectedRowKeys } = this.props; |
| 81 | let startIndex = 0; /* 最开始下标 */ | 81 | let startIndex = 0; /* 最开始下标 */ |
| 82 | const iOrderArr = []; | 82 | const iOrderArr = []; |
| 83 | /* 当前控制表选中行下的工序 接着编号 */ | 83 | /* 当前控制表选中行下的工序 接着编号 */ |
| 84 | - const filterData = commonUtils.isNotEmptyArr(processData) && commonUtils.isNotEmptyArr(controlSelectedRowKeys) ? | ||
| 85 | - processData.filter(item => controlSelectedRowKeys.includes(item.sControlId)) : []; | 84 | + const filterData = |
| 85 | + commonUtils.isNotEmptyArr(processData) && commonUtils.isNotEmptyArr(controlSelectedRowKeys) | ||
| 86 | + ? processData.filter(item => controlSelectedRowKeys.includes(item.sControlId)) | ||
| 87 | + : []; | ||
| 86 | if (commonUtils.isNotEmptyArr(filterData)) { | 88 | if (commonUtils.isNotEmptyArr(filterData)) { |
| 87 | /* 找到最大序号值 接着拍 */ | 89 | /* 找到最大序号值 接着拍 */ |
| 88 | - filterData.forEach((item) => { | 90 | + filterData.forEach(item => { |
| 89 | const iOrder = commonUtils.isNotEmptyNumber(item.iOrder) ? item.iOrder : 0; /* 获取tableData中iOrder最大值 */ | 91 | const iOrder = commonUtils.isNotEmptyNumber(item.iOrder) ? item.iOrder : 0; /* 获取tableData中iOrder最大值 */ |
| 90 | iOrderArr.push(iOrder); | 92 | iOrderArr.push(iOrder); |
| 91 | }); | 93 | }); |
| @@ -108,10 +110,11 @@ class CommonList extends Component { | @@ -108,10 +110,11 @@ class CommonList extends Component { | ||
| 108 | }; | 110 | }; |
| 109 | handleDoubleClickSelect = () => { | 111 | handleDoubleClickSelect = () => { |
| 110 | const { slaveConfig } = this.props; | 112 | const { slaveConfig } = this.props; |
| 111 | - if (commonUtils.isNotEmptyObject(slaveConfig) && !slaveConfig.bMutiSelect) { // 单选时双击选中数据 | 113 | + if (commonUtils.isNotEmptyObject(slaveConfig) && !slaveConfig.bMutiSelect) { |
| 114 | + // 单选时双击选中数据 | ||
| 112 | this.handleSelect(); | 115 | this.handleSelect(); |
| 113 | } | 116 | } |
| 114 | - } | 117 | + }; |
| 115 | /** 关闭 */ | 118 | /** 关闭 */ |
| 116 | handleCancelModal = () => { | 119 | handleCancelModal = () => { |
| 117 | const { app } = this.props; | 120 | const { app } = this.props; |
| @@ -125,17 +128,17 @@ class CommonList extends Component { | @@ -125,17 +128,17 @@ class CommonList extends Component { | ||
| 125 | handleTreeSelect = (name, checkedKeys, e) => { | 128 | handleTreeSelect = (name, checkedKeys, e) => { |
| 126 | this.props.onSelect(name, checkedKeys, e); /* 调用CommonListEvent通用处理 */ | 129 | this.props.onSelect(name, checkedKeys, e); /* 调用CommonListEvent通用处理 */ |
| 127 | }; | 130 | }; |
| 128 | - handleTableSelectRowChange = (name, selectedRowKeys, changeValue, chooseProcessParams) => { /* 表格行选择 */ | 131 | + handleTableSelectRowChange = (name, selectedRowKeys, changeValue, chooseProcessParams) => { |
| 132 | + /* 表格行选择 */ | ||
| 129 | this.props.onTableSelectRowChange(name, selectedRowKeys); | 133 | this.props.onTableSelectRowChange(name, selectedRowKeys); |
| 130 | - if (name === 'slave') { /* 选择工序 从表表 */ | ||
| 131 | - const { | ||
| 132 | - [`${name}Data`]: tableData, slaveConfig, fatherModelsType, sModelsType, | ||
| 133 | - } = this.props; | 134 | + if (name === "slave") { |
| 135 | + /* 选择工序 从表表 */ | ||
| 136 | + const { [`${name}Data`]: tableData, slaveConfig, fatherModelsType, sModelsType } = this.props; | ||
| 134 | const { selectedRowKeysLength } = this.props; | 137 | const { selectedRowKeysLength } = this.props; |
| 135 | const { slaveFilterData } = this.props; | 138 | const { slaveFilterData } = this.props; |
| 136 | const oldSlaveFilterData = slaveFilterData === undefined ? [] : JSON.parse(JSON.stringify(slaveFilterData)); | 139 | const oldSlaveFilterData = slaveFilterData === undefined ? [] : JSON.parse(JSON.stringify(slaveFilterData)); |
| 137 | const newSlaveFilterData = []; | 140 | const newSlaveFilterData = []; |
| 138 | - selectedRowKeys.forEach((key) => { | 141 | + selectedRowKeys.forEach(key => { |
| 139 | const filterDataIndex = oldSlaveFilterData.findIndex(item => item.sSlaveId === key); | 142 | const filterDataIndex = oldSlaveFilterData.findIndex(item => item.sSlaveId === key); |
| 140 | if (filterDataIndex < 0) { | 143 | if (filterDataIndex < 0) { |
| 141 | const tableDataIndex = tableData.findIndex(item => item.sSlaveId === key); | 144 | const tableDataIndex = tableData.findIndex(item => item.sSlaveId === key); |
| @@ -144,8 +147,9 @@ class CommonList extends Component { | @@ -144,8 +147,9 @@ class CommonList extends Component { | ||
| 144 | newSlaveFilterData.push({ ...oldSlaveFilterData[filterDataIndex] }); | 147 | newSlaveFilterData.push({ ...oldSlaveFilterData[filterDataIndex] }); |
| 145 | } | 148 | } |
| 146 | }); | 149 | }); |
| 147 | - let sDeliverRemark = ''; | ||
| 148 | - if (sModelsType === 'search/commonPopup') { /* 选择成品库存 改变时候 增加数量信息提示 */ | 150 | + let sDeliverRemark = ""; |
| 151 | + if (sModelsType === "search/commonPopup") { | ||
| 152 | + /* 选择成品库存 改变时候 增加数量信息提示 */ | ||
| 149 | let dChooseProductQty = 0; | 153 | let dChooseProductQty = 0; |
| 150 | let dSrcQty = 0; | 154 | let dSrcQty = 0; |
| 151 | let dMinsQty = 0; /* 欠数 */ | 155 | let dMinsQty = 0; /* 欠数 */ |
| @@ -160,19 +164,22 @@ class CommonList extends Component { | @@ -160,19 +164,22 @@ class CommonList extends Component { | ||
| 160 | } | 164 | } |
| 161 | 165 | ||
| 162 | this.props.onSaveState({ | 166 | this.props.onSaveState({ |
| 163 | - slaveFilterData: newSlaveFilterData, sDeliverRemark, | 167 | + slaveFilterData: newSlaveFilterData, |
| 168 | + sDeliverRemark, | ||
| 164 | }); | 169 | }); |
| 165 | if (chooseProcessParams) { | 170 | if (chooseProcessParams) { |
| 166 | let modalVisible = false; | 171 | let modalVisible = false; |
| 167 | let slaveSelectOneData = {}; | 172 | let slaveSelectOneData = {}; |
| 168 | let slaveSelectOneDataIndex = -1; | 173 | let slaveSelectOneDataIndex = -1; |
| 169 | if (commonUtils.isNotEmptyArr(tableData)) { | 174 | if (commonUtils.isNotEmptyArr(tableData)) { |
| 170 | - if (selectedRowKeys instanceof Array) { // 多选情况下 | ||
| 171 | - if (commonUtils.isEmpty(selectedRowKeysLength) || (selectedRowKeys.length - selectedRowKeysLength) > 0) { | 175 | + if (selectedRowKeys instanceof Array) { |
| 176 | + // 多选情况下 | ||
| 177 | + if (commonUtils.isEmpty(selectedRowKeysLength) || selectedRowKeys.length - selectedRowKeysLength > 0) { | ||
| 172 | modalVisible = true; | 178 | modalVisible = true; |
| 173 | } | 179 | } |
| 174 | slaveSelectOneDataIndex = tableData.findIndex(item => item.sId === selectedRowKeys[selectedRowKeys.length - 1]); // 多选选择最后一个 | 180 | slaveSelectOneDataIndex = tableData.findIndex(item => item.sId === selectedRowKeys[selectedRowKeys.length - 1]); // 多选选择最后一个 |
| 175 | - } else { // 单选情况下 | 181 | + } else { |
| 182 | + // 单选情况下 | ||
| 176 | slaveSelectOneDataIndex = tableData.findIndex(item => item.sId === selectedRowKeys); | 183 | slaveSelectOneDataIndex = tableData.findIndex(item => item.sId === selectedRowKeys); |
| 177 | } | 184 | } |
| 178 | if (slaveSelectOneDataIndex > -1) { | 185 | if (slaveSelectOneDataIndex > -1) { |
| @@ -181,14 +188,14 @@ class CommonList extends Component { | @@ -181,14 +188,14 @@ class CommonList extends Component { | ||
| 181 | } | 188 | } |
| 182 | // let masterData = {}; | 189 | // let masterData = {}; |
| 183 | const sProcessParamsSelects = []; | 190 | const sProcessParamsSelects = []; |
| 184 | - let paramType = ''; | 191 | + let paramType = ""; |
| 185 | if (commonUtils.isNotEmptyObject(slaveSelectOneData) && commonUtils.isNotEmptyObject(fatherModelsType)) { | 192 | if (commonUtils.isNotEmptyObject(slaveSelectOneData) && commonUtils.isNotEmptyObject(fatherModelsType)) { |
| 186 | - if (fatherModelsType.includes('manufacture/')) { | 193 | + if (fatherModelsType.includes("manufacture/")) { |
| 187 | paramType = slaveSelectOneData.sWorkOrderParam; | 194 | paramType = slaveSelectOneData.sWorkOrderParam; |
| 188 | if (commonUtils.isNotEmptyObject(slaveSelectOneData.sWorkOrderParam)) { | 195 | if (commonUtils.isNotEmptyObject(slaveSelectOneData.sWorkOrderParam)) { |
| 189 | slaveSelectOneData = { ...slaveSelectOneData, ...commonUtils.convertStrToObj(slaveSelectOneData.sWorkOrderParam) }; | 196 | slaveSelectOneData = { ...slaveSelectOneData, ...commonUtils.convertStrToObj(slaveSelectOneData.sWorkOrderParam) }; |
| 190 | } | 197 | } |
| 191 | - } else if (fatherModelsType.includes('quotation/')) { | 198 | + } else if (fatherModelsType.includes("quotation/")) { |
| 192 | paramType = slaveSelectOneData.sProcessParam; | 199 | paramType = slaveSelectOneData.sProcessParam; |
| 193 | if (commonUtils.isNotEmptyObject(slaveSelectOneData.sProcessParam)) { | 200 | if (commonUtils.isNotEmptyObject(slaveSelectOneData.sProcessParam)) { |
| 194 | slaveSelectOneData = { ...slaveSelectOneData, ...commonUtils.convertStrToObj(slaveSelectOneData.sProcessParam) }; | 201 | slaveSelectOneData = { ...slaveSelectOneData, ...commonUtils.convertStrToObj(slaveSelectOneData.sProcessParam) }; |
| @@ -200,36 +207,42 @@ class CommonList extends Component { | @@ -200,36 +207,42 @@ class CommonList extends Component { | ||
| 200 | bisMutiSelect: false, | 207 | bisMutiSelect: false, |
| 201 | bMutiSelect: false, | 208 | bMutiSelect: false, |
| 202 | }; | 209 | }; |
| 203 | - const gdsconfigformslave = [{ | ||
| 204 | - sId: commonUtils.createSid(), | ||
| 205 | - sName: 'sId', | ||
| 206 | - showName: '主键', | ||
| 207 | - bVisible: false, | ||
| 208 | - iFitWidth: 45, | ||
| 209 | - }, { | ||
| 210 | - sId: commonUtils.createSid(), | ||
| 211 | - sName: 'bSelfCbx', | ||
| 212 | - showName: '选择', | ||
| 213 | - bVisible: true, | ||
| 214 | - iFitWidth: 37, | ||
| 215 | - }, { | ||
| 216 | - sId: commonUtils.createSid(), | ||
| 217 | - sName: 'sParamKey', | ||
| 218 | - showName: '参数主键', | ||
| 219 | - bVisible: false, | ||
| 220 | - iFitWidth: 200, | ||
| 221 | - }, { | ||
| 222 | - sId: commonUtils.createSid(), | ||
| 223 | - sName: 'sParamName', | ||
| 224 | - showName: '参数名', | ||
| 225 | - bVisible: true, | ||
| 226 | - iFitWidth: 230, | ||
| 227 | - }, { | ||
| 228 | - sId: commonUtils.createSid(), | ||
| 229 | - sName: 'sParamValue', | ||
| 230 | - showName: '参数值', | ||
| 231 | - bVisible: true, | ||
| 232 | - }]; | 210 | + const gdsconfigformslave = [ |
| 211 | + { | ||
| 212 | + sId: commonUtils.createSid(), | ||
| 213 | + sName: "sId", | ||
| 214 | + showName: "主键", | ||
| 215 | + bVisible: false, | ||
| 216 | + iFitWidth: 45, | ||
| 217 | + }, | ||
| 218 | + { | ||
| 219 | + sId: commonUtils.createSid(), | ||
| 220 | + sName: "bSelfCbx", | ||
| 221 | + showName: "选择", | ||
| 222 | + bVisible: true, | ||
| 223 | + iFitWidth: 37, | ||
| 224 | + }, | ||
| 225 | + { | ||
| 226 | + sId: commonUtils.createSid(), | ||
| 227 | + sName: "sParamKey", | ||
| 228 | + showName: "参数主键", | ||
| 229 | + bVisible: false, | ||
| 230 | + iFitWidth: 200, | ||
| 231 | + }, | ||
| 232 | + { | ||
| 233 | + sId: commonUtils.createSid(), | ||
| 234 | + sName: "sParamName", | ||
| 235 | + showName: "参数名", | ||
| 236 | + bVisible: true, | ||
| 237 | + iFitWidth: 230, | ||
| 238 | + }, | ||
| 239 | + { | ||
| 240 | + sId: commonUtils.createSid(), | ||
| 241 | + sName: "sParamValue", | ||
| 242 | + showName: "参数值", | ||
| 243 | + bVisible: true, | ||
| 244 | + }, | ||
| 245 | + ]; | ||
| 233 | sParamConfig.gdsconfigformslave = gdsconfigformslave; | 246 | sParamConfig.gdsconfigformslave = gdsconfigformslave; |
| 234 | const sParamColumn = commonFunc.getHeaderConfig(sParamConfig); | 247 | const sParamColumn = commonFunc.getHeaderConfig(sParamConfig); |
| 235 | /* 要把数据以表格的形式显示出来 */ | 248 | /* 要把数据以表格的形式显示出来 */ |
| @@ -237,13 +250,13 @@ class CommonList extends Component { | @@ -237,13 +250,13 @@ class CommonList extends Component { | ||
| 237 | const sParamData = []; | 250 | const sParamData = []; |
| 238 | if (commonUtils.isNotEmptyArr(sParamJsonObj)) { | 251 | if (commonUtils.isNotEmptyArr(sParamJsonObj)) { |
| 239 | for (const key of Object.keys(sParamJsonObj)) { | 252 | for (const key of Object.keys(sParamJsonObj)) { |
| 240 | - if (key.includes('sParam') && !key.includes('DropDown') && !key.includes('Default')) { | 253 | + if (key.includes("sParam") && !key.includes("DropDown") && !key.includes("Default")) { |
| 241 | const obj = {}; | 254 | const obj = {}; |
| 242 | obj.sId = commonUtils.createSid(); | 255 | obj.sId = commonUtils.createSid(); |
| 243 | obj.sParamKey = key; | 256 | obj.sParamKey = key; |
| 244 | obj.sParamName = sParamJsonObj[key]; | 257 | obj.sParamName = sParamJsonObj[key]; |
| 245 | /* 找到数字 找到下拉数据源 */ | 258 | /* 找到数字 找到下拉数据源 */ |
| 246 | - const num = key.replace(/[^\d]/g, '').trim(); | 259 | + const num = key.replace(/[^\d]/g, "").trim(); |
| 247 | if (Number(num)) { | 260 | if (Number(num)) { |
| 248 | const number = Number(num); | 261 | const number = Number(num); |
| 249 | const sParamDropDownKey = `sParamDropDown${number}`; | 262 | const sParamDropDownKey = `sParamDropDown${number}`; |
| @@ -262,10 +275,10 @@ class CommonList extends Component { | @@ -262,10 +275,10 @@ class CommonList extends Component { | ||
| 262 | const iIndex = slaveConfig.gdsconfigformslave.findIndex(item => item.sName === `sParamValue${i.toString()}`); | 275 | const iIndex = slaveConfig.gdsconfigformslave.findIndex(item => item.sName === `sParamValue${i.toString()}`); |
| 263 | if (iIndex > -1 && !commonUtils.isEmpty(slaveSelectOneData[`sParam${i.toString()}`])) { | 276 | if (iIndex > -1 && !commonUtils.isEmpty(slaveSelectOneData[`sParam${i.toString()}`])) { |
| 264 | slaveConfig.gdsconfigformslave[iIndex].showName = slaveSelectOneData[`sParam${i.toString()}`]; | 277 | slaveConfig.gdsconfigformslave[iIndex].showName = slaveSelectOneData[`sParam${i.toString()}`]; |
| 265 | - slaveConfig.gdsconfigformslave[iIndex].bVisible = !slaveSelectOneData[`sParam${i.toString()}`].includes('参数值'); | 278 | + slaveConfig.gdsconfigformslave[iIndex].bVisible = !slaveSelectOneData[`sParam${i.toString()}`].includes("参数值"); |
| 266 | /* 判断是否是sql下拉 */ | 279 | /* 判断是否是sql下拉 */ |
| 267 | if (!commonUtils.isEmpty(slaveSelectOneData[`sParamDropDown${i.toString()}`])) { | 280 | if (!commonUtils.isEmpty(slaveSelectOneData[`sParamDropDown${i.toString()}`])) { |
| 268 | - slaveConfig.gdsconfigformslave[iIndex].sDropDownType = 'sql'; | 281 | + slaveConfig.gdsconfigformslave[iIndex].sDropDownType = "sql"; |
| 269 | } | 282 | } |
| 270 | // masterData = { ...masterNewData, ...commonUtils.convertStrToObj(slaveFilterData[0].sProcessParam) }; | 283 | // masterData = { ...masterNewData, ...commonUtils.convertStrToObj(slaveFilterData[0].sProcessParam) }; |
| 271 | sProcessParamsSelects.push(slaveConfig.gdsconfigformslave[iIndex]); | 284 | sProcessParamsSelects.push(slaveConfig.gdsconfigformslave[iIndex]); |
| @@ -295,7 +308,7 @@ class CommonList extends Component { | @@ -295,7 +308,7 @@ class CommonList extends Component { | ||
| 295 | sParamData, | 308 | sParamData, |
| 296 | }); | 309 | }); |
| 297 | } | 310 | } |
| 298 | - } else if (name === 'sParam' && commonUtils.isNotEmptyArr(selectedRowKeys)) { | 311 | + } else if (name === "sParam" && commonUtils.isNotEmptyArr(selectedRowKeys)) { |
| 299 | /* 点击工艺参数列表 根据点击行动态加载配置 */ | 312 | /* 点击工艺参数列表 根据点击行动态加载配置 */ |
| 300 | const { sParamData, sParamConfig } = this.props; | 313 | const { sParamData, sParamConfig } = this.props; |
| 301 | /* 找到最后一个选中 */ | 314 | /* 找到最后一个选中 */ |
| @@ -304,13 +317,13 @@ class CommonList extends Component { | @@ -304,13 +317,13 @@ class CommonList extends Component { | ||
| 304 | /* 选中数据时 塞入选中行的配置 */ | 317 | /* 选中数据时 塞入选中行的配置 */ |
| 305 | if (iIndex > -1) { | 318 | if (iIndex > -1) { |
| 306 | const sParamObj = sParamData[iIndex]; | 319 | const sParamObj = sParamData[iIndex]; |
| 307 | - const index = sParamConfig.gdsconfigformslave.findIndex(item => item.sName === 'sParamValue'); | 320 | + const index = sParamConfig.gdsconfigformslave.findIndex(item => item.sName === "sParamValue"); |
| 308 | if (index > -1) { | 321 | if (index > -1) { |
| 309 | if (commonUtils.isNotEmptyObject(sParamObj.sDropDownData)) { | 322 | if (commonUtils.isNotEmptyObject(sParamObj.sDropDownData)) { |
| 310 | - sParamConfig.gdsconfigformslave[index].sDropDownType = 'const'; | 323 | + sParamConfig.gdsconfigformslave[index].sDropDownType = "const"; |
| 311 | sParamConfig.gdsconfigformslave[index].showDropDown = JSON.stringify(sParamObj.sDropDownData); | 324 | sParamConfig.gdsconfigformslave[index].showDropDown = JSON.stringify(sParamObj.sDropDownData); |
| 312 | } else { | 325 | } else { |
| 313 | - sParamConfig.gdsconfigformslave[index].sDropDownType = ''; | 326 | + sParamConfig.gdsconfigformslave[index].sDropDownType = ""; |
| 314 | sParamConfig.gdsconfigformslave[index].showDropDown = undefined; | 327 | sParamConfig.gdsconfigformslave[index].showDropDown = undefined; |
| 315 | } | 328 | } |
| 316 | } | 329 | } |
| @@ -325,20 +338,20 @@ class CommonList extends Component { | @@ -325,20 +338,20 @@ class CommonList extends Component { | ||
| 325 | }); | 338 | }); |
| 326 | } | 339 | } |
| 327 | } | 340 | } |
| 328 | - } | 341 | + }; |
| 329 | 342 | ||
| 330 | /* 连续点击 复制选择 */ | 343 | /* 连续点击 复制选择 */ |
| 331 | - handleContinueTableSelectRowChange= (name, selectedRowKeys, changeValue, chooseProcessParams) => { /* 表格行选择 */ | 344 | + handleContinueTableSelectRowChange = (name, selectedRowKeys, changeValue, chooseProcessParams) => { |
| 345 | + /* 表格行选择 */ | ||
| 332 | this.props.onTableSelectRowChange(name, selectedRowKeys); | 346 | this.props.onTableSelectRowChange(name, selectedRowKeys); |
| 333 | - if (name === 'slave') { /* 选择工序 从表表 */ | ||
| 334 | - const { | ||
| 335 | - [`${name}Data`]: tableData, slaveConfig, fatherModelsType, sModelsType, | ||
| 336 | - } = this.props; | 347 | + if (name === "slave") { |
| 348 | + /* 选择工序 从表表 */ | ||
| 349 | + const { [`${name}Data`]: tableData, slaveConfig, fatherModelsType, sModelsType } = this.props; | ||
| 337 | const { selectedRowKeysLength } = this.props; | 350 | const { selectedRowKeysLength } = this.props; |
| 338 | const { slaveFilterData } = this.props; | 351 | const { slaveFilterData } = this.props; |
| 339 | const oldSlaveFilterData = slaveFilterData === undefined ? [] : JSON.parse(JSON.stringify(slaveFilterData)); | 352 | const oldSlaveFilterData = slaveFilterData === undefined ? [] : JSON.parse(JSON.stringify(slaveFilterData)); |
| 340 | let newSlaveFilterData = []; | 353 | let newSlaveFilterData = []; |
| 341 | - selectedRowKeys.forEach((key) => { | 354 | + selectedRowKeys.forEach(key => { |
| 342 | const filterDataIndex = oldSlaveFilterData.findIndex(item => item.sSlaveId === key); | 355 | const filterDataIndex = oldSlaveFilterData.findIndex(item => item.sSlaveId === key); |
| 343 | if (filterDataIndex < 0) { | 356 | if (filterDataIndex < 0) { |
| 344 | newSlaveFilterData = JSON.parse(JSON.stringify(oldSlaveFilterData)); | 357 | newSlaveFilterData = JSON.parse(JSON.stringify(oldSlaveFilterData)); |
| @@ -347,7 +360,7 @@ class CommonList extends Component { | @@ -347,7 +360,7 @@ class CommonList extends Component { | ||
| 347 | const newRow = JSON.parse(JSON.stringify(tableData[tableDataIndex])); | 360 | const newRow = JSON.parse(JSON.stringify(tableData[tableDataIndex])); |
| 348 | newRow.sId = commonUtils.createSid(); | 361 | newRow.sId = commonUtils.createSid(); |
| 349 | newRow.sSlaveId = newRow.sId; | 362 | newRow.sSlaveId = newRow.sId; |
| 350 | - newRow.handleType = 'add'; | 363 | + newRow.handleType = "add"; |
| 351 | newRow.key = newRow.sId; | 364 | newRow.key = newRow.sId; |
| 352 | newSlaveFilterData.push(newRow); | 365 | newSlaveFilterData.push(newRow); |
| 353 | } | 366 | } |
| @@ -357,13 +370,14 @@ class CommonList extends Component { | @@ -357,13 +370,14 @@ class CommonList extends Component { | ||
| 357 | const newRow = JSON.parse(JSON.stringify(oldSlaveFilterData[filterDataIndex])); | 370 | const newRow = JSON.parse(JSON.stringify(oldSlaveFilterData[filterDataIndex])); |
| 358 | newRow.sId = commonUtils.createSid(); | 371 | newRow.sId = commonUtils.createSid(); |
| 359 | newRow.sSlaveId = newRow.sId; | 372 | newRow.sSlaveId = newRow.sId; |
| 360 | - newRow.handleType = 'add'; | 373 | + newRow.handleType = "add"; |
| 361 | newRow.key = newRow.sId; | 374 | newRow.key = newRow.sId; |
| 362 | newSlaveFilterData.push(newRow); | 375 | newSlaveFilterData.push(newRow); |
| 363 | } | 376 | } |
| 364 | }); | 377 | }); |
| 365 | - let sDeliverRemark = ''; | ||
| 366 | - if (sModelsType === 'search/commonPopup') { /* 选择成品库存 改变时候 增加数量信息提示 */ | 378 | + let sDeliverRemark = ""; |
| 379 | + if (sModelsType === "search/commonPopup") { | ||
| 380 | + /* 选择成品库存 改变时候 增加数量信息提示 */ | ||
| 367 | let dChooseProductQty = 0; | 381 | let dChooseProductQty = 0; |
| 368 | let dSrcQty = 0; | 382 | let dSrcQty = 0; |
| 369 | let dMinsQty = 0; /* 欠数 */ | 383 | let dMinsQty = 0; /* 欠数 */ |
| @@ -377,19 +391,22 @@ class CommonList extends Component { | @@ -377,19 +391,22 @@ class CommonList extends Component { | ||
| 377 | sDeliverRemark = `源单数量:${dSrcQty} 已选数量:${dChooseProductQty} 欠数:${dMinsQty}`; | 391 | sDeliverRemark = `源单数量:${dSrcQty} 已选数量:${dChooseProductQty} 欠数:${dMinsQty}`; |
| 378 | } | 392 | } |
| 379 | this.props.onSaveState({ | 393 | this.props.onSaveState({ |
| 380 | - slaveFilterData: newSlaveFilterData, sDeliverRemark, | 394 | + slaveFilterData: newSlaveFilterData, |
| 395 | + sDeliverRemark, | ||
| 381 | }); | 396 | }); |
| 382 | if (chooseProcessParams) { | 397 | if (chooseProcessParams) { |
| 383 | let modalVisible = false; | 398 | let modalVisible = false; |
| 384 | let slaveSelectOneData = {}; | 399 | let slaveSelectOneData = {}; |
| 385 | let slaveSelectOneDataIndex = -1; | 400 | let slaveSelectOneDataIndex = -1; |
| 386 | if (commonUtils.isNotEmptyArr(tableData)) { | 401 | if (commonUtils.isNotEmptyArr(tableData)) { |
| 387 | - if (selectedRowKeys instanceof Array) { // 多选情况下 | ||
| 388 | - if (commonUtils.isEmpty(selectedRowKeysLength) || (selectedRowKeys.length - selectedRowKeysLength) > 0) { | 402 | + if (selectedRowKeys instanceof Array) { |
| 403 | + // 多选情况下 | ||
| 404 | + if (commonUtils.isEmpty(selectedRowKeysLength) || selectedRowKeys.length - selectedRowKeysLength > 0) { | ||
| 389 | modalVisible = true; | 405 | modalVisible = true; |
| 390 | } | 406 | } |
| 391 | slaveSelectOneDataIndex = tableData.findIndex(item => item.sId === selectedRowKeys[selectedRowKeys.length - 1]); // 多选选择最后一个 | 407 | slaveSelectOneDataIndex = tableData.findIndex(item => item.sId === selectedRowKeys[selectedRowKeys.length - 1]); // 多选选择最后一个 |
| 392 | - } else { // 单选情况下 | 408 | + } else { |
| 409 | + // 单选情况下 | ||
| 393 | slaveSelectOneDataIndex = tableData.findIndex(item => item.sId === selectedRowKeys); | 410 | slaveSelectOneDataIndex = tableData.findIndex(item => item.sId === selectedRowKeys); |
| 394 | } | 411 | } |
| 395 | if (slaveSelectOneDataIndex > -1) { | 412 | if (slaveSelectOneDataIndex > -1) { |
| @@ -398,14 +415,14 @@ class CommonList extends Component { | @@ -398,14 +415,14 @@ class CommonList extends Component { | ||
| 398 | } | 415 | } |
| 399 | // let masterData = {}; | 416 | // let masterData = {}; |
| 400 | const sProcessParamsSelects = []; | 417 | const sProcessParamsSelects = []; |
| 401 | - let paramType = ''; | 418 | + let paramType = ""; |
| 402 | if (commonUtils.isNotEmptyObject(slaveSelectOneData) && commonUtils.isNotEmptyObject(fatherModelsType)) { | 419 | if (commonUtils.isNotEmptyObject(slaveSelectOneData) && commonUtils.isNotEmptyObject(fatherModelsType)) { |
| 403 | - if (fatherModelsType.includes('manufacture/')) { | 420 | + if (fatherModelsType.includes("manufacture/")) { |
| 404 | paramType = slaveSelectOneData.sWorkOrderParam; | 421 | paramType = slaveSelectOneData.sWorkOrderParam; |
| 405 | if (commonUtils.isNotEmptyObject(slaveSelectOneData.sWorkOrderParam)) { | 422 | if (commonUtils.isNotEmptyObject(slaveSelectOneData.sWorkOrderParam)) { |
| 406 | slaveSelectOneData = { ...slaveSelectOneData, ...commonUtils.convertStrToObj(slaveSelectOneData.sWorkOrderParam) }; | 423 | slaveSelectOneData = { ...slaveSelectOneData, ...commonUtils.convertStrToObj(slaveSelectOneData.sWorkOrderParam) }; |
| 407 | } | 424 | } |
| 408 | - } else if (fatherModelsType.includes('quotation/')) { | 425 | + } else if (fatherModelsType.includes("quotation/")) { |
| 409 | paramType = slaveSelectOneData.sProcessParam; | 426 | paramType = slaveSelectOneData.sProcessParam; |
| 410 | if (commonUtils.isNotEmptyObject(slaveSelectOneData.sProcessParam)) { | 427 | if (commonUtils.isNotEmptyObject(slaveSelectOneData.sProcessParam)) { |
| 411 | slaveSelectOneData = { ...slaveSelectOneData, ...commonUtils.convertStrToObj(slaveSelectOneData.sProcessParam) }; | 428 | slaveSelectOneData = { ...slaveSelectOneData, ...commonUtils.convertStrToObj(slaveSelectOneData.sProcessParam) }; |
| @@ -417,36 +434,42 @@ class CommonList extends Component { | @@ -417,36 +434,42 @@ class CommonList extends Component { | ||
| 417 | bisMutiSelect: false, | 434 | bisMutiSelect: false, |
| 418 | bMutiSelect: false, | 435 | bMutiSelect: false, |
| 419 | }; | 436 | }; |
| 420 | - const gdsconfigformslave = [{ | ||
| 421 | - sId: commonUtils.createSid(), | ||
| 422 | - sName: 'sId', | ||
| 423 | - showName: '主键', | ||
| 424 | - bVisible: false, | ||
| 425 | - iFitWidth: 45, | ||
| 426 | - }, { | ||
| 427 | - sId: commonUtils.createSid(), | ||
| 428 | - sName: 'bSelfCbx', | ||
| 429 | - showName: '选择', | ||
| 430 | - bVisible: true, | ||
| 431 | - iFitWidth: 37, | ||
| 432 | - }, { | ||
| 433 | - sId: commonUtils.createSid(), | ||
| 434 | - sName: 'sParamKey', | ||
| 435 | - showName: '参数主键', | ||
| 436 | - bVisible: false, | ||
| 437 | - iFitWidth: 200, | ||
| 438 | - }, { | ||
| 439 | - sId: commonUtils.createSid(), | ||
| 440 | - sName: 'sParamName', | ||
| 441 | - showName: '参数名', | ||
| 442 | - bVisible: true, | ||
| 443 | - iFitWidth: 230, | ||
| 444 | - }, { | ||
| 445 | - sId: commonUtils.createSid(), | ||
| 446 | - sName: 'sParamValue', | ||
| 447 | - showName: '参数值', | ||
| 448 | - bVisible: true, | ||
| 449 | - }]; | 437 | + const gdsconfigformslave = [ |
| 438 | + { | ||
| 439 | + sId: commonUtils.createSid(), | ||
| 440 | + sName: "sId", | ||
| 441 | + showName: "主键", | ||
| 442 | + bVisible: false, | ||
| 443 | + iFitWidth: 45, | ||
| 444 | + }, | ||
| 445 | + { | ||
| 446 | + sId: commonUtils.createSid(), | ||
| 447 | + sName: "bSelfCbx", | ||
| 448 | + showName: "选择", | ||
| 449 | + bVisible: true, | ||
| 450 | + iFitWidth: 37, | ||
| 451 | + }, | ||
| 452 | + { | ||
| 453 | + sId: commonUtils.createSid(), | ||
| 454 | + sName: "sParamKey", | ||
| 455 | + showName: "参数主键", | ||
| 456 | + bVisible: false, | ||
| 457 | + iFitWidth: 200, | ||
| 458 | + }, | ||
| 459 | + { | ||
| 460 | + sId: commonUtils.createSid(), | ||
| 461 | + sName: "sParamName", | ||
| 462 | + showName: "参数名", | ||
| 463 | + bVisible: true, | ||
| 464 | + iFitWidth: 230, | ||
| 465 | + }, | ||
| 466 | + { | ||
| 467 | + sId: commonUtils.createSid(), | ||
| 468 | + sName: "sParamValue", | ||
| 469 | + showName: "参数值", | ||
| 470 | + bVisible: true, | ||
| 471 | + }, | ||
| 472 | + ]; | ||
| 450 | sParamConfig.gdsconfigformslave = gdsconfigformslave; | 473 | sParamConfig.gdsconfigformslave = gdsconfigformslave; |
| 451 | const sParamColumn = commonFunc.getHeaderConfig(sParamConfig); | 474 | const sParamColumn = commonFunc.getHeaderConfig(sParamConfig); |
| 452 | /* 要把数据以表格的形式显示出来 */ | 475 | /* 要把数据以表格的形式显示出来 */ |
| @@ -454,13 +477,13 @@ class CommonList extends Component { | @@ -454,13 +477,13 @@ class CommonList extends Component { | ||
| 454 | const sParamData = []; | 477 | const sParamData = []; |
| 455 | if (commonUtils.isNotEmptyArr(sParamJsonObj)) { | 478 | if (commonUtils.isNotEmptyArr(sParamJsonObj)) { |
| 456 | for (const key of Object.keys(sParamJsonObj)) { | 479 | for (const key of Object.keys(sParamJsonObj)) { |
| 457 | - if (key.includes('sParam') && !key.includes('DropDown') && !key.includes('Default')) { | 480 | + if (key.includes("sParam") && !key.includes("DropDown") && !key.includes("Default")) { |
| 458 | const obj = {}; | 481 | const obj = {}; |
| 459 | obj.sId = commonUtils.createSid(); | 482 | obj.sId = commonUtils.createSid(); |
| 460 | obj.sParamKey = key; | 483 | obj.sParamKey = key; |
| 461 | obj.sParamName = sParamJsonObj[key]; | 484 | obj.sParamName = sParamJsonObj[key]; |
| 462 | /* 找到数字 找到下拉数据源 */ | 485 | /* 找到数字 找到下拉数据源 */ |
| 463 | - const num = key.replace(/[^\d]/g, '').trim(); | 486 | + const num = key.replace(/[^\d]/g, "").trim(); |
| 464 | if (Number(num)) { | 487 | if (Number(num)) { |
| 465 | const number = Number(num); | 488 | const number = Number(num); |
| 466 | const sParamDropDownKey = `sParamDropDown${number}`; | 489 | const sParamDropDownKey = `sParamDropDown${number}`; |
| @@ -479,10 +502,10 @@ class CommonList extends Component { | @@ -479,10 +502,10 @@ class CommonList extends Component { | ||
| 479 | const iIndex = slaveConfig.gdsconfigformslave.findIndex(item => item.sName === `sParamValue${i.toString()}`); | 502 | const iIndex = slaveConfig.gdsconfigformslave.findIndex(item => item.sName === `sParamValue${i.toString()}`); |
| 480 | if (iIndex > -1 && !commonUtils.isEmpty(slaveSelectOneData[`sParam${i.toString()}`])) { | 503 | if (iIndex > -1 && !commonUtils.isEmpty(slaveSelectOneData[`sParam${i.toString()}`])) { |
| 481 | slaveConfig.gdsconfigformslave[iIndex].showName = slaveSelectOneData[`sParam${i.toString()}`]; | 504 | slaveConfig.gdsconfigformslave[iIndex].showName = slaveSelectOneData[`sParam${i.toString()}`]; |
| 482 | - slaveConfig.gdsconfigformslave[iIndex].bVisible = !slaveSelectOneData[`sParam${i.toString()}`].includes('参数值'); | 505 | + slaveConfig.gdsconfigformslave[iIndex].bVisible = !slaveSelectOneData[`sParam${i.toString()}`].includes("参数值"); |
| 483 | /* 判断是否是sql下拉 */ | 506 | /* 判断是否是sql下拉 */ |
| 484 | if (!commonUtils.isEmpty(slaveSelectOneData[`sParamDropDown${i.toString()}`])) { | 507 | if (!commonUtils.isEmpty(slaveSelectOneData[`sParamDropDown${i.toString()}`])) { |
| 485 | - slaveConfig.gdsconfigformslave[iIndex].sDropDownType = 'sql'; | 508 | + slaveConfig.gdsconfigformslave[iIndex].sDropDownType = "sql"; |
| 486 | } | 509 | } |
| 487 | // masterData = { ...masterNewData, ...commonUtils.convertStrToObj(slaveFilterData[0].sProcessParam) }; | 510 | // masterData = { ...masterNewData, ...commonUtils.convertStrToObj(slaveFilterData[0].sProcessParam) }; |
| 488 | sProcessParamsSelects.push(slaveConfig.gdsconfigformslave[iIndex]); | 511 | sProcessParamsSelects.push(slaveConfig.gdsconfigformslave[iIndex]); |
| @@ -512,7 +535,7 @@ class CommonList extends Component { | @@ -512,7 +535,7 @@ class CommonList extends Component { | ||
| 512 | sParamData, | 535 | sParamData, |
| 513 | }); | 536 | }); |
| 514 | } | 537 | } |
| 515 | - } else if (name === 'sParam' && commonUtils.isNotEmptyArr(selectedRowKeys)) { | 538 | + } else if (name === "sParam" && commonUtils.isNotEmptyArr(selectedRowKeys)) { |
| 516 | /* 点击工艺参数列表 根据点击行动态加载配置 */ | 539 | /* 点击工艺参数列表 根据点击行动态加载配置 */ |
| 517 | const { sParamData, sParamConfig } = this.props; | 540 | const { sParamData, sParamConfig } = this.props; |
| 518 | /* 找到最后一个选中 */ | 541 | /* 找到最后一个选中 */ |
| @@ -521,13 +544,13 @@ class CommonList extends Component { | @@ -521,13 +544,13 @@ class CommonList extends Component { | ||
| 521 | /* 选中数据时 塞入选中行的配置 */ | 544 | /* 选中数据时 塞入选中行的配置 */ |
| 522 | if (iIndex > -1) { | 545 | if (iIndex > -1) { |
| 523 | const sParamObj = sParamData[iIndex]; | 546 | const sParamObj = sParamData[iIndex]; |
| 524 | - const index = sParamConfig.gdsconfigformslave.findIndex(item => item.sName === 'sParamValue'); | 547 | + const index = sParamConfig.gdsconfigformslave.findIndex(item => item.sName === "sParamValue"); |
| 525 | if (index > -1) { | 548 | if (index > -1) { |
| 526 | if (commonUtils.isNotEmptyObject(sParamObj.sDropDownData)) { | 549 | if (commonUtils.isNotEmptyObject(sParamObj.sDropDownData)) { |
| 527 | - sParamConfig.gdsconfigformslave[index].sDropDownType = 'const'; | 550 | + sParamConfig.gdsconfigformslave[index].sDropDownType = "const"; |
| 528 | sParamConfig.gdsconfigformslave[index].showDropDown = JSON.stringify(sParamObj.sDropDownData); | 551 | sParamConfig.gdsconfigformslave[index].showDropDown = JSON.stringify(sParamObj.sDropDownData); |
| 529 | } else { | 552 | } else { |
| 530 | - sParamConfig.gdsconfigformslave[index].sDropDownType = ''; | 553 | + sParamConfig.gdsconfigformslave[index].sDropDownType = ""; |
| 531 | sParamConfig.gdsconfigformslave[index].showDropDown = undefined; | 554 | sParamConfig.gdsconfigformslave[index].showDropDown = undefined; |
| 532 | } | 555 | } |
| 533 | } | 556 | } |
| @@ -542,22 +565,25 @@ class CommonList extends Component { | @@ -542,22 +565,25 @@ class CommonList extends Component { | ||
| 542 | }); | 565 | }); |
| 543 | } | 566 | } |
| 544 | } | 567 | } |
| 545 | - } | 568 | + }; |
| 546 | 569 | ||
| 547 | handleCancelProcessParamsModalVisible = () => { | 570 | handleCancelProcessParamsModalVisible = () => { |
| 548 | this.props.onSaveState({ | 571 | this.props.onSaveState({ |
| 549 | sProcessParamsModalVisible: false, | 572 | sProcessParamsModalVisible: false, |
| 550 | }); | 573 | }); |
| 551 | - } | 574 | + }; |
| 552 | handleProcessParamsOk1 = () => { | 575 | handleProcessParamsOk1 = () => { |
| 553 | - const { | ||
| 554 | - slaveData, slaveSelectOneDataIndex, slaveFilterData, sProcessParamsSelects, | ||
| 555 | - } = this.props; | ||
| 556 | - let sProcessParamStr = ''; | ||
| 557 | - if (commonUtils.isNotEmptyArr(slaveData) && !commonUtils.isEmpty(slaveSelectOneDataIndex) && commonUtils.isNotEmptyArr(slaveFilterData) && commonUtils.isNotEmptyArr(sProcessParamsSelects)) { | 576 | + const { slaveData, slaveSelectOneDataIndex, slaveFilterData, sProcessParamsSelects } = this.props; |
| 577 | + let sProcessParamStr = ""; | ||
| 578 | + if ( | ||
| 579 | + commonUtils.isNotEmptyArr(slaveData) && | ||
| 580 | + !commonUtils.isEmpty(slaveSelectOneDataIndex) && | ||
| 581 | + commonUtils.isNotEmptyArr(slaveFilterData) && | ||
| 582 | + commonUtils.isNotEmptyArr(sProcessParamsSelects) | ||
| 583 | + ) { | ||
| 558 | // eslint-disable-next-line array-callback-return | 584 | // eslint-disable-next-line array-callback-return |
| 559 | - sProcessParamsSelects.map((item) => { | ||
| 560 | - let sParamValue = ''; | 585 | + sProcessParamsSelects.map(item => { |
| 586 | + let sParamValue = ""; | ||
| 561 | if (commonUtils.isNotEmptyObject(slaveData[slaveSelectOneDataIndex][item.sName])) { | 587 | if (commonUtils.isNotEmptyObject(slaveData[slaveSelectOneDataIndex][item.sName])) { |
| 562 | sParamValue = slaveData[slaveSelectOneDataIndex][item.sName]; | 588 | sParamValue = slaveData[slaveSelectOneDataIndex][item.sName]; |
| 563 | } | 589 | } |
| @@ -570,17 +596,20 @@ class CommonList extends Component { | @@ -570,17 +596,20 @@ class CommonList extends Component { | ||
| 570 | slaveFilterData, | 596 | slaveFilterData, |
| 571 | sProcessParamsModalVisible: false, | 597 | sProcessParamsModalVisible: false, |
| 572 | }); | 598 | }); |
| 573 | - } | 599 | + }; |
| 574 | handleProcessParamsOk = () => { | 600 | handleProcessParamsOk = () => { |
| 575 | - const { | ||
| 576 | - slaveData, slaveSelectOneDataIndex, slaveFilterData, sProcessParamsSelects, sParamData, | ||
| 577 | - } = this.props; | 601 | + const { slaveData, slaveSelectOneDataIndex, slaveFilterData, sProcessParamsSelects, sParamData } = this.props; |
| 578 | /* 保存时候把sParamData赛道sParam1中 */ | 602 | /* 保存时候把sParamData赛道sParam1中 */ |
| 579 | - let sProcessParamStr = ''; | ||
| 580 | - if (commonUtils.isNotEmptyArr(slaveData) && !commonUtils.isEmpty(slaveSelectOneDataIndex) && commonUtils.isNotEmptyArr(slaveFilterData) && commonUtils.isNotEmptyArr(sProcessParamsSelects)) { | 603 | + let sProcessParamStr = ""; |
| 604 | + if ( | ||
| 605 | + commonUtils.isNotEmptyArr(slaveData) && | ||
| 606 | + !commonUtils.isEmpty(slaveSelectOneDataIndex) && | ||
| 607 | + commonUtils.isNotEmptyArr(slaveFilterData) && | ||
| 608 | + commonUtils.isNotEmptyArr(sProcessParamsSelects) | ||
| 609 | + ) { | ||
| 581 | // eslint-disable-next-line array-callback-return | 610 | // eslint-disable-next-line array-callback-return |
| 582 | - sProcessParamsSelects.map((item) => { | ||
| 583 | - let sParamValue = ''; | 611 | + sProcessParamsSelects.map(item => { |
| 612 | + let sParamValue = ""; | ||
| 584 | if (commonUtils.isNotEmptyObject(slaveData[slaveSelectOneDataIndex][item.sName])) { | 613 | if (commonUtils.isNotEmptyObject(slaveData[slaveSelectOneDataIndex][item.sName])) { |
| 585 | sParamValue = slaveData[slaveSelectOneDataIndex][item.sName]; | 614 | sParamValue = slaveData[slaveSelectOneDataIndex][item.sName]; |
| 586 | } | 615 | } |
| @@ -601,18 +630,32 @@ class CommonList extends Component { | @@ -601,18 +630,32 @@ class CommonList extends Component { | ||
| 601 | slaveFilterData, | 630 | slaveFilterData, |
| 602 | sProcessParamsModalVisible: false, | 631 | sProcessParamsModalVisible: false, |
| 603 | }); | 632 | }); |
| 604 | - } | 633 | + }; |
| 605 | // ----------------------------数据修改回带end ---------------------------- // | 634 | // ----------------------------数据修改回带end ---------------------------- // |
| 606 | - copyTo = (sActiveId) => { | 635 | + copyTo = sActiveId => { |
| 607 | const { | 636 | const { |
| 608 | - dispatch, masterConfig, masterData, contactData, addressData, slavePagination, | ||
| 609 | - sisproductclassifyProcessClassifyData, machineData, assortData, outsideData, processstyleData, processApsRuleData, | ||
| 610 | - eleemployeeData, elemachineData, eleknifemouldproductData, eleknifemouldfileData, eleteststandarditemData, | 637 | + dispatch, |
| 638 | + masterConfig, | ||
| 639 | + masterData, | ||
| 640 | + contactData, | ||
| 641 | + addressData, | ||
| 642 | + slavePagination, | ||
| 643 | + sisproductclassifyProcessClassifyData, | ||
| 644 | + machineData, | ||
| 645 | + assortData, | ||
| 646 | + outsideData, | ||
| 647 | + processstyleData, | ||
| 648 | + processApsRuleData, | ||
| 649 | + eleemployeeData, | ||
| 650 | + elemachineData, | ||
| 651 | + eleknifemouldproductData, | ||
| 652 | + eleknifemouldfileData, | ||
| 653 | + eleteststandarditemData, | ||
| 611 | slaveSelectedData, | 654 | slaveSelectedData, |
| 612 | } = this.props; | 655 | } = this.props; |
| 613 | const copyTo = {}; | 656 | const copyTo = {}; |
| 614 | const copyToConfig = masterConfig.gdsconfigformslave.filter(item => item.sControlName.includes(name)); | 657 | const copyToConfig = masterConfig.gdsconfigformslave.filter(item => item.sControlName.includes(name)); |
| 615 | - copyTo.name = 'BtnCopyTo'; | 658 | + copyTo.name = "BtnCopyTo"; |
| 616 | copyTo.config = copyToConfig; | 659 | copyTo.config = copyToConfig; |
| 617 | copyTo.masterData = slaveSelectedData[0] || masterData; | 660 | copyTo.masterData = slaveSelectedData[0] || masterData; |
| 618 | copyTo.supplyData = []; | 661 | copyTo.supplyData = []; |
| @@ -633,21 +676,21 @@ class CommonList extends Component { | @@ -633,21 +676,21 @@ class CommonList extends Component { | ||
| 633 | copyTo.eleknifemouldfileData = eleknifemouldfileData; | 676 | copyTo.eleknifemouldfileData = eleknifemouldfileData; |
| 634 | copyTo.eleteststandarditemData = eleteststandarditemData; | 677 | copyTo.eleteststandarditemData = eleteststandarditemData; |
| 635 | dispatch({ | 678 | dispatch({ |
| 636 | - type: 'content/onRouter', | 679 | + type: "content/onRouter", |
| 637 | payload: { | 680 | payload: { |
| 638 | - url: `${commonConfig.server_host}gdsmodule/getGdsmoduleById/${sActiveId}?sModelsId=${sActiveId}`, /* 接口地址 */ | 681 | + url: `${commonConfig.server_host}gdsmodule/getGdsmoduleById/${sActiveId}?sModelsId=${sActiveId}` /* 接口地址 */, |
| 639 | copyTo, | 682 | copyTo, |
| 640 | pages: slavePagination, | 683 | pages: slavePagination, |
| 641 | newRecordFlag: `NewRecord_${sActiveId}`, | 684 | newRecordFlag: `NewRecord_${sActiveId}`, |
| 642 | }, | 685 | }, |
| 643 | }); | 686 | }); |
| 644 | - } | 687 | + }; |
| 645 | 688 | ||
| 646 | - handleDrag = (data) => { | 689 | + handleDrag = data => { |
| 647 | this.props.onSaveState({ | 690 | this.props.onSaveState({ |
| 648 | slaveFilterData: data, | 691 | slaveFilterData: data, |
| 649 | }); | 692 | }); |
| 650 | - } | 693 | + }; |
| 651 | 694 | ||
| 652 | handleTableDel = (name, isWait, tableSelectedRowKeys) => { | 695 | handleTableDel = (name, isWait, tableSelectedRowKeys) => { |
| 653 | const { slaveSelectedRowKeys } = this.props; | 696 | const { slaveSelectedRowKeys } = this.props; |
| @@ -659,14 +702,14 @@ class CommonList extends Component { | @@ -659,14 +702,14 @@ class CommonList extends Component { | ||
| 659 | }); | 702 | }); |
| 660 | this.props.onDataRowDel(name, isWait, tableSelectedRowKeys); | 703 | this.props.onDataRowDel(name, isWait, tableSelectedRowKeys); |
| 661 | } | 704 | } |
| 662 | - } | 705 | + }; |
| 663 | /* 动态参数标题选择框 全选/取消全选 */ | 706 | /* 动态参数标题选择框 全选/取消全选 */ |
| 664 | handleCheckParamChange = () => { | 707 | handleCheckParamChange = () => { |
| 665 | const { sParamData, sParamColumn } = this.props; | 708 | const { sParamData, sParamColumn } = this.props; |
| 666 | /* 全选 取消全选功能 */ | 709 | /* 全选 取消全选功能 */ |
| 667 | if (commonUtils.isNotEmptyArr(sParamData)) { | 710 | if (commonUtils.isNotEmptyArr(sParamData)) { |
| 668 | /* 标题bSelfCbx加标识 */ | 711 | /* 标题bSelfCbx加标识 */ |
| 669 | - const iIndex = sParamColumn.findIndex(item => item.dataIndex === 'bSelfCbx'); | 712 | + const iIndex = sParamColumn.findIndex(item => item.dataIndex === "bSelfCbx"); |
| 670 | if (iIndex > -1) { | 713 | if (iIndex > -1) { |
| 671 | let bSelfCbx = false; | 714 | let bSelfCbx = false; |
| 672 | if (sParamColumn[iIndex].bCheckAll) { | 715 | if (sParamColumn[iIndex].bCheckAll) { |
| @@ -684,13 +727,13 @@ class CommonList extends Component { | @@ -684,13 +727,13 @@ class CommonList extends Component { | ||
| 684 | sParamColumn, | 727 | sParamColumn, |
| 685 | }); | 728 | }); |
| 686 | } | 729 | } |
| 687 | - } | 730 | + }; |
| 688 | render() { | 731 | render() { |
| 689 | const { pageLoading } = this.props; | 732 | const { pageLoading } = this.props; |
| 690 | return ( | 733 | return ( |
| 691 | - <div style={{ height: '100%' }}> | 734 | + <div style={{ height: "100%" }}> |
| 692 | <Spin spinning={pageLoading}> | 735 | <Spin spinning={pageLoading}> |
| 693 | - <div style={{ height: '100%' }}> | 736 | + <div style={{ height: "100%" }}> |
| 694 | <CommonListComponent | 737 | <CommonListComponent |
| 695 | {...this.props} | 738 | {...this.props} |
| 696 | {...this.state} | 739 | {...this.state} |
| @@ -721,7 +764,7 @@ const CommonListComponent = Form.create({ | @@ -721,7 +764,7 @@ const CommonListComponent = Form.create({ | ||
| 721 | const obj = commonFunc.mapPropsToFields(masterData, Form); | 764 | const obj = commonFunc.mapPropsToFields(masterData, Form); |
| 722 | return obj; | 765 | return obj; |
| 723 | }, | 766 | }, |
| 724 | -})((props) => { | 767 | +})(props => { |
| 725 | const { | 768 | const { |
| 726 | form, | 769 | form, |
| 727 | onReturnForm, | 770 | onReturnForm, |
| @@ -740,23 +783,28 @@ const CommonListComponent = Form.create({ | @@ -740,23 +783,28 @@ const CommonListComponent = Form.create({ | ||
| 740 | onReturnForm(form); | 783 | onReturnForm(form); |
| 741 | const pagination = { | 784 | const pagination = { |
| 742 | ...slavePagination, | 785 | ...slavePagination, |
| 743 | - size: 'large', | 786 | + size: "large", |
| 744 | showQuickJumper: true, | 787 | showQuickJumper: true, |
| 745 | hideOnSinglePage: false, | 788 | hideOnSinglePage: false, |
| 746 | showTotal: false, | 789 | showTotal: false, |
| 747 | simple: true, | 790 | simple: true, |
| 748 | }; | 791 | }; |
| 749 | const tableProps = { | 792 | const tableProps = { |
| 750 | - ...commonBusiness.getTableTypes('slave', props), | 793 | + ...commonBusiness.getTableTypes("slave", props), |
| 751 | tableProps: { | 794 | tableProps: { |
| 752 | - rowKey: 'sSlaveId', pagination, onChange: props.onTitleChange, chooseProcessParams: true, sModelsType, AutoTableHeight: 350, // chooseProcessParams为选择工序中点击工序名称表格行出现弹窗 | 795 | + rowKey: "sSlaveId", |
| 796 | + pagination, | ||
| 797 | + onChange: props.onTitleChange, | ||
| 798 | + chooseProcessParams: true, | ||
| 799 | + sModelsType, | ||
| 800 | + AutoTableHeight: 350, // chooseProcessParams为选择工序中点击工序名称表格行出现弹窗 | ||
| 753 | }, | 801 | }, |
| 754 | bContinueClick: true, | 802 | bContinueClick: true, |
| 755 | }; | 803 | }; |
| 756 | const sParamProps = { | 804 | const sParamProps = { |
| 757 | - ...commonBusiness.getTableTypes('sParam', props), | 805 | + ...commonBusiness.getTableTypes("sParam", props), |
| 758 | tableProps: { | 806 | tableProps: { |
| 759 | - rowKey: 'sId', | 807 | + rowKey: "sId", |
| 760 | pagination, | 808 | pagination, |
| 761 | onChange: props.onTitleChange, | 809 | onChange: props.onTitleChange, |
| 762 | sModelsType, | 810 | sModelsType, |
| @@ -776,17 +824,20 @@ const CommonListComponent = Form.create({ | @@ -776,17 +824,20 @@ const CommonListComponent = Form.create({ | ||
| 776 | // disableimg: <img src={DisableDelIcon} alt="删除" width={width} height={height} />, | 824 | // disableimg: <img src={DisableDelIcon} alt="删除" width={width} height={height} />, |
| 777 | // }; | 825 | // }; |
| 778 | const deleteSet = { | 826 | const deleteSet = { |
| 779 | - autoHeight: '100%', | ||
| 780 | - setOpterationColumn: 'Y', | 827 | + autoHeight: "100%", |
| 828 | + setOpterationColumn: "Y", | ||
| 781 | }; | 829 | }; |
| 782 | let tableFilterProps = { | 830 | let tableFilterProps = { |
| 783 | - ...commonBusiness.getTableTypes('slaveFilter', props), | 831 | + ...commonBusiness.getTableTypes("slaveFilter", props), |
| 784 | tableProps: { | 832 | tableProps: { |
| 785 | - rowSelection: null, rowKey: 'sSlaveId', onChange: props.onTitleChange, AutoTableHeight: 350, | 833 | + rowSelection: null, |
| 834 | + rowKey: "sSlaveId", | ||
| 835 | + onChange: props.onTitleChange, | ||
| 836 | + AutoTableHeight: 350, | ||
| 786 | }, | 837 | }, |
| 787 | onDrag: props.onDrag, | 838 | onDrag: props.onDrag, |
| 788 | }; | 839 | }; |
| 789 | - if (props.sModelsType && props.sModelsType.includes('modal/searchProcess')) { | 840 | + if (props.sModelsType && props.sModelsType.includes("modal/searchProcess")) { |
| 790 | tableFilterProps = { | 841 | tableFilterProps = { |
| 791 | ...tableFilterProps, | 842 | ...tableFilterProps, |
| 792 | ...deleteSet, | 843 | ...deleteSet, |
| @@ -800,11 +851,12 @@ const CommonListComponent = Form.create({ | @@ -800,11 +851,12 @@ const CommonListComponent = Form.create({ | ||
| 800 | enabled: true, | 851 | enabled: true, |
| 801 | }; | 852 | }; |
| 802 | } | 853 | } |
| 803 | - const tableBelone = commonUtils.isNotEmptyObject(app.currentPane) && commonUtils.isNotEmptyObject(app.currentPane.name) && app.currentPane.bEdit ? 'none' : 'list'; | 854 | + const tableBelone = |
| 855 | + commonUtils.isNotEmptyObject(app.currentPane) && commonUtils.isNotEmptyObject(app.currentPane.name) && app.currentPane.bEdit ? "none" : "list"; | ||
| 804 | 856 | ||
| 805 | - const name = 'filterTree'; | 857 | + const name = "filterTree"; |
| 806 | const treeProps = { | 858 | const treeProps = { |
| 807 | - ...commonBusiness.getTreeTypes('tree', props), | 859 | + ...commonBusiness.getTreeTypes("tree", props), |
| 808 | isSearch: false, | 860 | isSearch: false, |
| 809 | checkable: false, | 861 | checkable: false, |
| 810 | [`${name}Column`]: props[`${name}Column`], | 862 | [`${name}Column`]: props[`${name}Column`], |
| @@ -829,17 +881,17 @@ const CommonListComponent = Form.create({ | @@ -829,17 +881,17 @@ const CommonListComponent = Form.create({ | ||
| 829 | showLine: true, | 881 | showLine: true, |
| 830 | switcherIcon: <DownOutlined />, | 882 | switcherIcon: <DownOutlined />, |
| 831 | }; | 883 | }; |
| 832 | - const sProcessParams = commonFunc.showMessage(app.commonConst, 'sProcessParams');/* 选择工艺参数标题 */ | ||
| 833 | - const displayLeft = (sModelsType !== 'search/sisColor' && sModelsType !== 'search/commonPopup'); | 884 | + const sProcessParams = commonFunc.showMessage(app.commonConst, "sProcessParams"); /* 选择工艺参数标题 */ |
| 885 | + const displayLeft = sModelsType !== "search/sisColor" && sModelsType !== "search/commonPopup"; | ||
| 834 | const realizeHeight = commonUtils.isNotEmptyNumber(props.realizeHeight) ? props.realizeHeight : 0; | 886 | const realizeHeight = commonUtils.isNotEmptyNumber(props.realizeHeight) ? props.realizeHeight : 0; |
| 835 | - const BtnSure = commonFunc.showLocalMessage(this.props, 'BtnSure', '确定'); | ||
| 836 | - const BtnCancel = commonFunc.showLocalMessage(this.props, 'BtnCancel', '取消'); | ||
| 837 | - const btnClick = (btn) => { | 887 | + const BtnSure = commonFunc.showLocalMessage(props, "BtnSure", "确定"); |
| 888 | + const BtnCancel = commonFunc.showLocalMessage(props, "BtnCancel", "取消"); | ||
| 889 | + const btnClick = btn => { | ||
| 838 | const { sControlName } = btn; | 890 | const { sControlName } = btn; |
| 839 | - const picArr = slaveConfig.gdsconfigformslave.filter(item => (item.sName === 'picArr')); | 891 | + const picArr = slaveConfig.gdsconfigformslave.filter(item => item.sName === "picArr"); |
| 840 | if (picArr.length) { | 892 | if (picArr.length) { |
| 841 | - const sActiveId = picArr[0] ? picArr[0].sActiveId : ''; | ||
| 842 | - if (sControlName === 'BtnAdd') { | 893 | + const sActiveId = picArr[0] ? picArr[0].sActiveId : ""; |
| 894 | + if (sControlName === "BtnAdd") { | ||
| 843 | const params = { | 895 | const params = { |
| 844 | newRecordFlag: `NewRecord_${sActiveId}`, | 896 | newRecordFlag: `NewRecord_${sActiveId}`, |
| 845 | }; | 897 | }; |
| @@ -852,9 +904,9 @@ const CommonListComponent = Form.create({ | @@ -852,9 +904,9 @@ const CommonListComponent = Form.create({ | ||
| 852 | } | 904 | } |
| 853 | props.onAdd(params); | 905 | props.onAdd(params); |
| 854 | props.onOpenNewTab(); | 906 | props.onOpenNewTab(); |
| 855 | - } else if (sControlName === 'BtnCopyTo') { | 907 | + } else if (sControlName === "BtnCopyTo") { |
| 856 | if (!Array.isArray(slaveSelectedData) || slaveSelectedData.length !== 1) { | 908 | if (!Array.isArray(slaveSelectedData) || slaveSelectedData.length !== 1) { |
| 857 | - message.warn('请选择一例单据'); // 请选择数据 | 909 | + message.warn("请选择一例单据"); // 请选择数据 |
| 858 | } else { | 910 | } else { |
| 859 | onCopyTo(sActiveId); | 911 | onCopyTo(sActiveId); |
| 860 | props.onOpenNewTab(); | 912 | props.onOpenNewTab(); |
| @@ -862,80 +914,97 @@ const CommonListComponent = Form.create({ | @@ -862,80 +914,97 @@ const CommonListComponent = Form.create({ | ||
| 862 | } | 914 | } |
| 863 | } | 915 | } |
| 864 | }; | 916 | }; |
| 917 | + const filteItem = commonFunc.showLocalMessage(props, "filteItem", "过滤项"); | ||
| 865 | return ( | 918 | return ( |
| 866 | <div className="modalChooseProcessContent"> | 919 | <div className="modalChooseProcessContent"> |
| 867 | - <Form > | 920 | + <Form> |
| 868 | <Layout> | 921 | <Layout> |
| 869 | <Layout> | 922 | <Layout> |
| 870 | <div id="modalChooseProcess"> | 923 | <div id="modalChooseProcess"> |
| 871 | - <div style={{ maxHeight: '100%', zIndex: 20 }}> | 924 | + <div style={{ maxHeight: "100%", zIndex: 20 }}> |
| 872 | <SearchComponent {...props} /> | 925 | <SearchComponent {...props} /> |
| 873 | </div> | 926 | </div> |
| 874 | <Content | 927 | <Content |
| 875 | - className={realizeHeight <= 0 ? 'xly-normal-list' : 'xly-normal-list resize-container'} | ||
| 876 | - style={{ height: realizeHeight > 0 ? `${500 + realizeHeight}px` : 'auto', paddingLeft: '10px' }} | 928 | + className={realizeHeight <= 0 ? "xly-normal-list" : "xly-normal-list resize-container"} |
| 929 | + style={{ height: realizeHeight > 0 ? `${500 + realizeHeight}px` : "auto", paddingLeft: "10px" }} | ||
| 877 | > | 930 | > |
| 878 | <Row gutter={[8, 0]}> | 931 | <Row gutter={[8, 0]}> |
| 879 | - {displayLeft ? | ||
| 880 | - <Col span={4} style={{ height: realizeHeight > 0 ? `${500 + realizeHeight}px` : 'auto' }}> | 932 | + {displayLeft ? ( |
| 933 | + <Col span={4} style={{ height: realizeHeight > 0 ? `${500 + realizeHeight}px` : "auto" }}> | ||
| 881 | <div className="xly-tree-box"> | 934 | <div className="xly-tree-box"> |
| 882 | - <div className="xly-tree-title">过滤项</div> | 935 | + <div className="xly-tree-title">{filteItem}</div> |
| 883 | <StaticEditTree {...treeProps} noVlist /> | 936 | <StaticEditTree {...treeProps} noVlist /> |
| 884 | </div> | 937 | </div> |
| 885 | - </Col> : '' | ||
| 886 | - } | ||
| 887 | - <Col style={{ height: realizeHeight > 0 ? `${500 + realizeHeight}px` : 'auto' }} span={sModelsType === 'search/commonPopup' ? 15 : 5}> | 938 | + </Col> |
| 939 | + ) : ( | ||
| 940 | + "" | ||
| 941 | + )} | ||
| 942 | + <Col | ||
| 943 | + style={{ height: realizeHeight > 0 ? `${500 + realizeHeight}px` : "auto" }} | ||
| 944 | + span={sModelsType === "search/commonPopup" ? 15 : 5} | ||
| 945 | + > | ||
| 888 | <StaticEditTable {...tableProps} footer="hidden" tableBelone="list" showConfig={props.showConfig} /> | 946 | <StaticEditTable {...tableProps} footer="hidden" tableBelone="list" showConfig={props.showConfig} /> |
| 889 | </Col> | 947 | </Col> |
| 890 | - <Col style={{ height: realizeHeight > 0 ? `${500 + realizeHeight}px` : 'auto' }} span={displayLeft ? 15 : sModelsType === 'search/commonPopup' ? 9 : 19} > | ||
| 891 | - <StaticEditTable dragHandle={props.dragHandle} {...tableFilterProps} footer="hidden" tableBelone={tableBelone} showConfig={props.showConfig} noVlistTable /> | 948 | + <Col |
| 949 | + style={{ height: realizeHeight > 0 ? `${500 + realizeHeight}px` : "auto" }} | ||
| 950 | + span={displayLeft ? 15 : sModelsType === "search/commonPopup" ? 9 : 19} | ||
| 951 | + > | ||
| 952 | + <StaticEditTable | ||
| 953 | + dragHandle={props.dragHandle} | ||
| 954 | + {...tableFilterProps} | ||
| 955 | + footer="hidden" | ||
| 956 | + tableBelone={tableBelone} | ||
| 957 | + showConfig={props.showConfig} | ||
| 958 | + noVlistTable | ||
| 959 | + /> | ||
| 892 | </Col> | 960 | </Col> |
| 893 | </Row> | 961 | </Row> |
| 894 | </Content> | 962 | </Content> |
| 895 | </div> | 963 | </div> |
| 896 | </Layout> | 964 | </Layout> |
| 897 | - <div style={{ display: 'flex', justifyContent: 'space-between' }}> | 965 | + <div style={{ display: "flex", justifyContent: "space-between" }}> |
| 898 | <div> | 966 | <div> |
| 899 | - { | ||
| 900 | - props.btnList.map(btn => ( | ||
| 901 | - <Button | ||
| 902 | - onClick={() => btnClick(btn)} | ||
| 903 | - style={{ marginRight: 8 }} | ||
| 904 | - type="primary" | ||
| 905 | - key={btn.sControlName} | ||
| 906 | - > | ||
| 907 | - { btn.showName } | ||
| 908 | - </Button> | ||
| 909 | - )) | ||
| 910 | - } | 967 | + {props.btnList.map(btn => ( |
| 968 | + <Button onClick={() => btnClick(btn)} style={{ marginRight: 8 }} type="primary" key={btn.sControlName}> | ||
| 969 | + {btn.showName} | ||
| 970 | + </Button> | ||
| 971 | + ))} | ||
| 911 | </div> | 972 | </div> |
| 912 | - { | ||
| 913 | - commonUtils.isNotEmptyObject(app.currentPane) && commonUtils.isNotEmptyObject(app.currentPane.name) && app.currentPane.bEdit ? | ||
| 914 | - <div style={{ width: '46%', color: 'red' }}> {props.sDeliverRemark}</div> : '' | ||
| 915 | - } | ||
| 916 | - <div style={{ | ||
| 917 | - width: '50%', textAlign: 'right', marginRight: '9px', marginBottom: '9px', | ||
| 918 | - }} | 973 | + {commonUtils.isNotEmptyObject(app.currentPane) && commonUtils.isNotEmptyObject(app.currentPane.name) && app.currentPane.bEdit ? ( |
| 974 | + <div style={{ width: "46%", color: "red" }}> {props.sDeliverRemark}</div> | ||
| 975 | + ) : ( | ||
| 976 | + "" | ||
| 977 | + )} | ||
| 978 | + <div | ||
| 979 | + style={{ | ||
| 980 | + width: "50%", | ||
| 981 | + textAlign: "right", | ||
| 982 | + marginRight: "9px", | ||
| 983 | + marginBottom: "9px", | ||
| 984 | + }} | ||
| 919 | > | 985 | > |
| 920 | - <Button key="back" style={{ marginRight: '8px' }} onClick={props.onCancel}>{BtnCancel}</Button> | ||
| 921 | - <Button type="primary" onClick={props.onSelect}>{BtnSure}</Button> | 986 | + <Button key="back" style={{ marginRight: "8px" }} onClick={props.onCancel}> |
| 987 | + {BtnCancel} | ||
| 988 | + </Button> | ||
| 989 | + <Button type="primary" onClick={props.onSelect}> | ||
| 990 | + {BtnSure} | ||
| 991 | + </Button> | ||
| 922 | </div> | 992 | </div> |
| 923 | </div> | 993 | </div> |
| 924 | </Layout> | 994 | </Layout> |
| 925 | - { | ||
| 926 | - false ? | ||
| 927 | - <AntdDraggableModal | ||
| 928 | - width="33%" | ||
| 929 | - title={sProcessParams} | ||
| 930 | - visible={props.sProcessParamsModalVisible} | ||
| 931 | - onOk={props.onProcessParamsOk} | ||
| 932 | - onCancel={props.onCancelProcessParamsModalVisible} | ||
| 933 | - // footer={null} | ||
| 934 | - > | ||
| 935 | - <div className="sProcessParamsModal" style={{ height: '80%', overflowY: 'auto' }}> | ||
| 936 | - { commonUtils.isNotEmptyArr(sProcessParamsSelects) && commonUtils.isNotEmptyArr(selectedRowKeys) ? | ||
| 937 | - sProcessParamsSelects.map((child) => { | ||
| 938 | - const sMemo = child.sName.toLowerCase().endsWith('memo'); | 995 | + {false ? ( |
| 996 | + <AntdDraggableModal | ||
| 997 | + width="33%" | ||
| 998 | + title={sProcessParams} | ||
| 999 | + visible={props.sProcessParamsModalVisible} | ||
| 1000 | + onOk={props.onProcessParamsOk} | ||
| 1001 | + onCancel={props.onCancelProcessParamsModalVisible} | ||
| 1002 | + // footer={null} | ||
| 1003 | + > | ||
| 1004 | + <div className="sProcessParamsModal" style={{ height: "80%", overflowY: "auto" }}> | ||
| 1005 | + {commonUtils.isNotEmptyArr(sProcessParamsSelects) && commonUtils.isNotEmptyArr(selectedRowKeys) | ||
| 1006 | + ? sProcessParamsSelects.map(child => { | ||
| 1007 | + const sMemo = child.sName.toLowerCase().endsWith("memo"); | ||
| 939 | let enabledNew = !child.bReadonly; | 1008 | let enabledNew = !child.bReadonly; |
| 940 | if (child.iTag === 1) { | 1009 | if (child.iTag === 1) { |
| 941 | enabledNew = false; | 1010 | enabledNew = false; |
| @@ -944,11 +1013,11 @@ const CommonListComponent = Form.create({ | @@ -944,11 +1013,11 @@ const CommonListComponent = Form.create({ | ||
| 944 | } | 1013 | } |
| 945 | const slaveSelectOneDataIndex = slaveData.findIndex(item => item.sId === selectedRowKeys[selectedRowKeys.length - 1]); // 多选选择最后一个 | 1014 | const slaveSelectOneDataIndex = slaveData.findIndex(item => item.sId === selectedRowKeys[selectedRowKeys.length - 1]); // 多选选择最后一个 |
| 946 | /* 如果没值 则取默认值 */ | 1015 | /* 如果没值 则取默认值 */ |
| 947 | - let sDataValue = ''; | 1016 | + let sDataValue = ""; |
| 948 | if (commonUtils.isNotEmptyArr(slaveData) && commonUtils.isNotEmptyObject(slaveData[slaveSelectOneDataIndex])) { | 1017 | if (commonUtils.isNotEmptyArr(slaveData) && commonUtils.isNotEmptyObject(slaveData[slaveSelectOneDataIndex])) { |
| 949 | sDataValue = slaveData[slaveSelectOneDataIndex][child.sName]; | 1018 | sDataValue = slaveData[slaveSelectOneDataIndex][child.sName]; |
| 950 | - const sDefaultName = child.sName.replace('Value', 'Default'); | ||
| 951 | - let sDefaultValue = ''; | 1019 | + const sDefaultName = child.sName.replace("Value", "Default"); |
| 1020 | + let sDefaultValue = ""; | ||
| 952 | if (sDefaultName) { | 1021 | if (sDefaultName) { |
| 953 | sDefaultValue = slaveData[slaveSelectOneDataIndex][sDefaultName]; | 1022 | sDefaultValue = slaveData[slaveSelectOneDataIndex][sDefaultName]; |
| 954 | } | 1023 | } |
| @@ -957,7 +1026,7 @@ const CommonListComponent = Form.create({ | @@ -957,7 +1026,7 @@ const CommonListComponent = Form.create({ | ||
| 957 | } | 1026 | } |
| 958 | } | 1027 | } |
| 959 | const showTypeProps = { | 1028 | const showTypeProps = { |
| 960 | - name: 'slave', | 1029 | + name: "slave", |
| 961 | form: props.form, | 1030 | form: props.form, |
| 962 | record: slaveData[slaveSelectOneDataIndex], | 1031 | record: slaveData[slaveSelectOneDataIndex], |
| 963 | sId: slaveData[slaveSelectOneDataIndex].sId, | 1032 | sId: slaveData[slaveSelectOneDataIndex].sId, |
| @@ -979,30 +1048,32 @@ const CommonListComponent = Form.create({ | @@ -979,30 +1048,32 @@ const CommonListComponent = Form.create({ | ||
| 979 | <span>{`${child.showName}:`}</span> | 1048 | <span>{`${child.showName}:`}</span> |
| 980 | <ShowType {...showTypeProps} /> | 1049 | <ShowType {...showTypeProps} /> |
| 981 | </div> | 1050 | </div> |
| 982 | - ); | ||
| 983 | - }) : '' | ||
| 984 | - } | ||
| 985 | - </div> | ||
| 986 | - </AntdDraggableModal> | ||
| 987 | - : '' | ||
| 988 | - } | ||
| 989 | - { | ||
| 990 | - props.sProcessParamsModalVisible ? | ||
| 991 | - <AntdDraggableModal | ||
| 992 | - width="920px" | ||
| 993 | - // bodyStyle={{ width: '930px' }} | ||
| 994 | - className="paramModal" | ||
| 995 | - title={sProcessParams} | ||
| 996 | - visible={props.sProcessParamsModalVisible} | ||
| 997 | - onOk={props.onProcessParamsOk} | ||
| 998 | - onCancel={props.onCancelProcessParamsModalVisible} | ||
| 999 | - // footer={null} | ||
| 1000 | - > | ||
| 1001 | - <div className="xly-bill-list" > | ||
| 1002 | - <StaticEditTable {...sParamProps} footer="hidden" /> | ||
| 1003 | - </div> | ||
| 1004 | - </AntdDraggableModal> : '' | ||
| 1005 | - } | 1051 | + ); |
| 1052 | + }) | ||
| 1053 | + : ""} | ||
| 1054 | + </div> | ||
| 1055 | + </AntdDraggableModal> | ||
| 1056 | + ) : ( | ||
| 1057 | + "" | ||
| 1058 | + )} | ||
| 1059 | + {props.sProcessParamsModalVisible ? ( | ||
| 1060 | + <AntdDraggableModal | ||
| 1061 | + width="920px" | ||
| 1062 | + // bodyStyle={{ width: '930px' }} | ||
| 1063 | + className="paramModal" | ||
| 1064 | + title={sProcessParams} | ||
| 1065 | + visible={props.sProcessParamsModalVisible} | ||
| 1066 | + onOk={props.onProcessParamsOk} | ||
| 1067 | + onCancel={props.onCancelProcessParamsModalVisible} | ||
| 1068 | + // footer={null} | ||
| 1069 | + > | ||
| 1070 | + <div className="xly-bill-list"> | ||
| 1071 | + <StaticEditTable {...sParamProps} footer="hidden" /> | ||
| 1072 | + </div> | ||
| 1073 | + </AntdDraggableModal> | ||
| 1074 | + ) : ( | ||
| 1075 | + "" | ||
| 1076 | + )} | ||
| 1006 | </Form> | 1077 | </Form> |
| 1007 | </div> | 1078 | </div> |
| 1008 | ); | 1079 | ); |
src/components/Common/CommonListTabEvent.js
| @@ -65,7 +65,7 @@ export default (ChildComponent) => { | @@ -65,7 +65,7 @@ export default (ChildComponent) => { | ||
| 65 | } | 65 | } |
| 66 | } | 66 | } |
| 67 | if (commonUtils.isEmptyObject(slaveConfigOld) && formData.length > 0 && (formRoute.indexOf('/indexOee') > -1 || searchSolution !== undefined)) { | 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 | /* 数据Id */ | 69 | /* 数据Id */ |
| 70 | const slaveConfig = formData[0]; | 70 | const slaveConfig = formData[0]; |
| 71 | let addState = {}; | 71 | let addState = {}; |
src/components/Common/CommonListTreeEvent.js
| @@ -58,7 +58,7 @@ export default (ChildComponent) => { | @@ -58,7 +58,7 @@ export default (ChildComponent) => { | ||
| 58 | let { iPageSize } = nextProps; | 58 | let { iPageSize } = nextProps; |
| 59 | 59 | ||
| 60 | if (commonUtils.isEmptyObject(slaveConfigOld) && formData.length > 0 && (formRoute.indexOf('/indexOee') > -1 || searchSolution !== undefined)) { | 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 | /* 数据Id */ | 62 | /* 数据Id */ |
| 63 | const slaveConfig = formData[0]; | 63 | const slaveConfig = formData[0]; |
| 64 | const addState = {}; | 64 | const addState = {}; |
src/components/Common/CommonNewBillEvent.js
| @@ -66,7 +66,7 @@ export default (ChildComponent) => { | @@ -66,7 +66,7 @@ export default (ChildComponent) => { | ||
| 66 | } = nextProps; | 66 | } = nextProps; |
| 67 | const { masterConfig: masterConfigOld, app } = nextProps; | 67 | const { masterConfig: masterConfigOld, app } = nextProps; |
| 68 | if (commonUtils.isEmptyObject(masterConfigOld) && formData.length > 0) { | 68 | if (commonUtils.isEmptyObject(masterConfigOld) && formData.length > 0) { |
| 69 | - const sId = currentId !== undefined ? currentId : ''; | 69 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 70 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 70 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 71 | 71 | ||
| 72 | const sReasonTitle = commonUtils.isNotEmptyObject(commonFunc.showMessage(app.commonConst, 'sReason'))? | 72 | const sReasonTitle = commonUtils.isNotEmptyObject(commonFunc.showMessage(app.commonConst, 'sReason'))? |
| @@ -593,7 +593,7 @@ export default (ChildComponent) => { | @@ -593,7 +593,7 @@ export default (ChildComponent) => { | ||
| 593 | /* 获取表数据 */ | 593 | /* 获取表数据 */ |
| 594 | handleGetMemoData = async (slaveConfig, slave0Config, slave1Config, slave2Config, slave3Config, slave4Config) => { | 594 | handleGetMemoData = async (slaveConfig, slave0Config, slave1Config, slave2Config, slave3Config, slave4Config) => { |
| 595 | const { currentId } = this.props; /* 当前页签数据 */ | 595 | const { currentId } = this.props; /* 当前页签数据 */ |
| 596 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 596 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 597 | const addStateSlave = slaveConfig ? await this.props.handleGetDataSet({ | 597 | const addStateSlave = slaveConfig ? await this.props.handleGetDataSet({ |
| 598 | name: 'slave', configData: slaveConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, | 598 | name: 'slave', configData: slaveConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, |
| 599 | }) : ''; | 599 | }) : ''; |
| @@ -627,7 +627,7 @@ export default (ChildComponent) => { | @@ -627,7 +627,7 @@ export default (ChildComponent) => { | ||
| 627 | /* 获取单张表数据 */ | 627 | /* 获取单张表数据 */ |
| 628 | handleGetOneMemoData = (memoName, memoConfig) => { | 628 | handleGetOneMemoData = (memoName, memoConfig) => { |
| 629 | const { currentId } = this.props; /* 当前页签数据 */ | 629 | const { currentId } = this.props; /* 当前页签数据 */ |
| 630 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 630 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 631 | if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ | 631 | if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ |
| 632 | this.props.handleGetDataSet({ | 632 | this.props.handleGetDataSet({ |
| 633 | name: memoName, configData: memoConfig, condition: { sSqlCondition: { sParentId: sId } }, | 633 | name: memoName, configData: memoConfig, condition: { sSqlCondition: { sParentId: sId } }, |
| @@ -1935,7 +1935,7 @@ export default (ChildComponent) => { | @@ -1935,7 +1935,7 @@ export default (ChildComponent) => { | ||
| 1935 | /* 上一条、下一条、首条、末条 */ | 1935 | /* 上一条、下一条、首条、末条 */ |
| 1936 | handleSearchData = async (handleType) => { | 1936 | handleSearchData = async (handleType) => { |
| 1937 | const { | 1937 | const { |
| 1938 | - sModelsId, app, currentIndexFlag, currentPageNo, masterData, | 1938 | + sModelsId, app, currentIndexFlag, currentPageNo, masterData, sSrcModelsId, |
| 1939 | masterConfig, slaveConfig, slave0Config, slave1Config, slave2Config, slave3Config, slave4Config, | 1939 | masterConfig, slaveConfig, slave0Config, slave1Config, slave2Config, slave3Config, slave4Config, |
| 1940 | } = this.props; | 1940 | } = this.props; |
| 1941 | let { sBillIdsArray = []} = this.props; | 1941 | let { sBillIdsArray = []} = this.props; |
| @@ -1993,7 +1993,7 @@ export default (ChildComponent) => { | @@ -1993,7 +1993,7 @@ export default (ChildComponent) => { | ||
| 1993 | if(!bExist) { | 1993 | if(!bExist) { |
| 1994 | const value = { | 1994 | const value = { |
| 1995 | sClientType: '1', sFilterOrderBy, bFilter, sListFormmasterId, currentPosition, handleType, iCountSum: pages.total, | 1995 | sClientType: '1', sFilterOrderBy, bFilter, sListFormmasterId, currentPosition, handleType, iCountSum: pages.total, |
| 1996 | - sUpId: masterData?.sId, | 1996 | + sUpId: masterData?.sId, sParentModelId :sSrcModelsId, |
| 1997 | }; | 1997 | }; |
| 1998 | const url = `${commonConfig.server_host}business/getBusinessDataByIndex?sModelsId=${sModelsId}`; | 1998 | const url = `${commonConfig.server_host}business/getBusinessDataByIndex?sModelsId=${sModelsId}`; |
| 1999 | /* 接收返回值 */ | 1999 | /* 接收返回值 */ |
src/components/Common/CommonNewTabBillEvent.js
| @@ -65,7 +65,7 @@ export default (ChildComponent) => { | @@ -65,7 +65,7 @@ export default (ChildComponent) => { | ||
| 65 | } = nextProps; | 65 | } = nextProps; |
| 66 | const { masterConfig: masterConfigOld, app } = nextProps; | 66 | const { masterConfig: masterConfigOld, app } = nextProps; |
| 67 | if (commonUtils.isEmptyObject(masterConfigOld) && formData.length > 0) { | 67 | if (commonUtils.isEmptyObject(masterConfigOld) && formData.length > 0) { |
| 68 | - const sId = currentId !== undefined ? currentId : ''; | 68 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 69 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 69 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 70 | 70 | ||
| 71 | const sReasonTitle = commonUtils.isNotEmptyObject(commonFunc.showMessage(app.commonConst, 'sReason'))? | 71 | const sReasonTitle = commonUtils.isNotEmptyObject(commonFunc.showMessage(app.commonConst, 'sReason'))? |
| @@ -514,7 +514,7 @@ export default (ChildComponent) => { | @@ -514,7 +514,7 @@ export default (ChildComponent) => { | ||
| 514 | } | 514 | } |
| 515 | 515 | ||
| 516 | const { currentId, app } = this.props; /* 当前页签数据 */ | 516 | const { currentId, app } = this.props; /* 当前页签数据 */ |
| 517 | - const sId = currentId !== undefined ? currentId : ''; | 517 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 518 | const { sModelsId, masterData, sModelsType, slaveSelectedRowKeys } = this.props; | 518 | const { sModelsId, masterData, sModelsType, slaveSelectedRowKeys } = this.props; |
| 519 | const conditonValues = this.handleGetSqlConditionValues(masterConfig) | 519 | const conditonValues = this.handleGetSqlConditionValues(masterConfig) |
| 520 | await this.props.handleGetDataOne({ name: 'master', configData: masterConfig, condition: { sSqlCondition: { ...conditonValues }, sId, pageSize: '', pageNum: '' }, bEditClick }); | 520 | await this.props.handleGetDataOne({ name: 'master', configData: masterConfig, condition: { sSqlCondition: { ...conditonValues }, sId, pageSize: '', pageNum: '' }, bEditClick }); |
| @@ -707,7 +707,7 @@ export default (ChildComponent) => { | @@ -707,7 +707,7 @@ export default (ChildComponent) => { | ||
| 707 | 707 | ||
| 708 | handleGetData1 = async (configArr, bEditClick, other, isWait) => { | 708 | handleGetData1 = async (configArr, bEditClick, other, isWait) => { |
| 709 | const { currentId } = this.props; /* 当前页签数据 */ | 709 | const { currentId } = this.props; /* 当前页签数据 */ |
| 710 | - const sId = currentId !== undefined ? currentId : ''; | 710 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 711 | 711 | ||
| 712 | let addState = {}; | 712 | let addState = {}; |
| 713 | 713 | ||
| @@ -846,7 +846,7 @@ export default (ChildComponent) => { | @@ -846,7 +846,7 @@ export default (ChildComponent) => { | ||
| 846 | /* 获取表数据 */ | 846 | /* 获取表数据 */ |
| 847 | handleGetMemoData = async (slaveConfig, slave0Config, slave1Config, slave2Config, slave3Config, slave4Config) => { | 847 | handleGetMemoData = async (slaveConfig, slave0Config, slave1Config, slave2Config, slave3Config, slave4Config) => { |
| 848 | const { currentId } = this.props; /* 当前页签数据 */ | 848 | const { currentId } = this.props; /* 当前页签数据 */ |
| 849 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 849 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 850 | const addStateSlave = slaveConfig ? await this.props.handleGetDataSet({ | 850 | const addStateSlave = slaveConfig ? await this.props.handleGetDataSet({ |
| 851 | name: 'slave', configData: slaveConfig, condition: { sSqlCondition: { ...this.handleGetSqlConditionValues(slaveConfig), sParentId: sId } }, isWait: true, | 851 | name: 'slave', configData: slaveConfig, condition: { sSqlCondition: { ...this.handleGetSqlConditionValues(slaveConfig), sParentId: sId } }, isWait: true, |
| 852 | }) : ''; | 852 | }) : ''; |
| @@ -880,7 +880,7 @@ export default (ChildComponent) => { | @@ -880,7 +880,7 @@ export default (ChildComponent) => { | ||
| 880 | /* 获取单张表数据 */ | 880 | /* 获取单张表数据 */ |
| 881 | handleGetOneMemoData = (memoName, memoConfig) => { | 881 | handleGetOneMemoData = (memoName, memoConfig) => { |
| 882 | const { currentId } = this.props; /* 当前页签数据 */ | 882 | const { currentId } = this.props; /* 当前页签数据 */ |
| 883 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 883 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 884 | if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ | 884 | if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ |
| 885 | this.props.handleGetDataSet({ | 885 | this.props.handleGetDataSet({ |
| 886 | name: memoName, configData: memoConfig, condition: { sSqlCondition: { ...this.handleGetSqlConditionValues(memoConfig), sParentId: sId } }, | 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,7 +34,7 @@ export default (ChildComponent) => { | ||
| 34 | const { otherCondition } = currentPane; | 34 | const { otherCondition } = currentPane; |
| 35 | if (formData.length > 0 && commonUtils.isEmptyObject(teamConfig) && commonUtils.isEmptyArr(searchSolution)) { | 35 | if (formData.length > 0 && commonUtils.isEmptyObject(teamConfig) && commonUtils.isEmptyArr(searchSolution)) { |
| 36 | isReceive = false; | 36 | isReceive = false; |
| 37 | - const sId = currentId !== undefined ? currentId : ''; | 37 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 38 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'eleteam')[0]; | 38 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'eleteam')[0]; |
| 39 | 39 | ||
| 40 | teamConfig = formData.filter(item => item.sTbName === 'Sp_Manufacture_ProductionPlanInfo_WorkCenter')[0]; | 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,7 +36,7 @@ export default (ChildComponent) => { | ||
| 36 | const { otherCondition } = currentPane; | 36 | const { otherCondition } = currentPane; |
| 37 | if (formData.length > 0 && commonUtils.isEmptyObject(teamConfig) && commonUtils.isEmptyArr(searchSolution)) { | 37 | if (formData.length > 0 && commonUtils.isEmptyObject(teamConfig) && commonUtils.isEmptyArr(searchSolution)) { |
| 38 | isReceive = false; | 38 | isReceive = false; |
| 39 | - const sId = currentId !== undefined ? currentId : ''; | 39 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 40 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'eleteam')[0]; | 40 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'eleteam')[0]; |
| 41 | 41 | ||
| 42 | teamConfig = formData.filter(item => item.sTbName === 'Sp_Manufacture_ProductionPlanInfo_WorkCenter2')[0]; | 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,7 +102,7 @@ export default (ChildComponent) => { | ||
| 102 | const { otherCondition } = currentPane; | 102 | const { otherCondition } = currentPane; |
| 103 | if (formData.length > 0 && !treeLoaded && searchSolution !== undefined) { | 103 | if (formData.length > 0 && !treeLoaded && searchSolution !== undefined) { |
| 104 | isReceive = false; | 104 | isReceive = false; |
| 105 | - const sId = currentId !== undefined ? currentId : ''; | 105 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 106 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'eleteam')[0]; | 106 | const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'eleteam')[0]; |
| 107 | treeLoaded = true; | 107 | treeLoaded = true; |
| 108 | // teamConfig = formData.filter(item => item.sTbName === 'Sp_Manufacture_ProductionPlanInfo_WorkCenter')[0]; | 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,7 +51,7 @@ export default (ChildComponent) => { | ||
| 51 | employeeConfig: employeeConfigOld, | 51 | employeeConfig: employeeConfigOld, |
| 52 | } = nextProps; | 52 | } = nextProps; |
| 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)) { | 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 | /* 数据Id */ | 55 | /* 数据Id */ |
| 56 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 56 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 57 | const BtnDesignFunctionConfig = commonUtils.isNotEmptyObject(masterConfig) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'BtnBsOperation.BtnDesignFunction') : {}; | 57 | const BtnDesignFunctionConfig = commonUtils.isNotEmptyObject(masterConfig) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'BtnBsOperation.BtnDesignFunction') : {}; |
| @@ -506,7 +506,7 @@ export default (ChildComponent) => { | @@ -506,7 +506,7 @@ export default (ChildComponent) => { | ||
| 506 | }); | 506 | }); |
| 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) { | 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 | const config = {}; | 508 | const config = {}; |
| 509 | - const sId = currentId !== undefined ? currentId : ''; | 509 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 510 | /* 数据Id */ | 510 | /* 数据Id */ |
| 511 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 511 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 512 | let addState = {}; | 512 | let addState = {}; |
| @@ -528,7 +528,7 @@ export default (ChildComponent) => { | @@ -528,7 +528,7 @@ export default (ChildComponent) => { | ||
| 528 | masterConfig, sId, pageLoading: false, ...addState, | 528 | masterConfig, sId, pageLoading: false, ...addState, |
| 529 | }); | 529 | }); |
| 530 | } else if (commonUtils.isEmptyObject(slaveConfigOld) && commonUtils.isEmptyObject(masterConfigOld) && formData.length === 2 && (sModelsType === 'quality/accident') && formRoute.indexOf('indexOee') === -1) { | 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 | /* 数据Id */ | 532 | /* 数据Id */ |
| 533 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 533 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 534 | const slaveConfig = formData.filter(item => item.bGrd && item.sTbName === 'mftqualityaccidentSlave')[0]; | 534 | const slaveConfig = formData.filter(item => item.bGrd && item.sTbName === 'mftqualityaccidentSlave')[0]; |
| @@ -551,7 +551,7 @@ export default (ChildComponent) => { | @@ -551,7 +551,7 @@ export default (ChildComponent) => { | ||
| 551 | }); | 551 | }); |
| 552 | } else if (formRoute.indexOf('indexOee') > -1 && commonUtils.isEmptyObject(employeeConfigOld) && commonUtils.isEmptyObject(slaveConfigOld) && formData.length > 0) { | 552 | } else if (formRoute.indexOf('indexOee') > -1 && commonUtils.isEmptyObject(employeeConfigOld) && commonUtils.isEmptyObject(slaveConfigOld) && formData.length > 0) { |
| 553 | if (formRoute === '/indexOee/labelPrint' && commonUtils.isEmpty(slaveConfigOld)) { /* 入库标签打印 */ | 553 | if (formRoute === '/indexOee/labelPrint' && commonUtils.isEmpty(slaveConfigOld)) { /* 入库标签打印 */ |
| 554 | - const sId = currentId !== undefined ? currentId : ''; | 554 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 555 | /* 数据Id */ | 555 | /* 数据Id */ |
| 556 | const masterConfig = formData[0]; | 556 | const masterConfig = formData[0]; |
| 557 | const slaveConfig = formData[0]; | 557 | const slaveConfig = formData[0]; |
| @@ -745,7 +745,7 @@ export default (ChildComponent) => { | @@ -745,7 +745,7 @@ export default (ChildComponent) => { | ||
| 745 | /** 获取主表、从表、审核表数据 */ | 745 | /** 获取主表、从表、审核表数据 */ |
| 746 | handleGetData = async (masterConfig, slaveConfig, checkConfig, bEditClick) => { | 746 | handleGetData = async (masterConfig, slaveConfig, checkConfig, bEditClick) => { |
| 747 | const { currentId, sModelsId } = this.props; /* 当前页签数据 */ | 747 | const { currentId, sModelsId } = this.props; /* 当前页签数据 */ |
| 748 | - const sId = currentId !== undefined ? currentId : ''; | 748 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 749 | await this.props.handleGetDataOne({ | 749 | await this.props.handleGetDataOne({ |
| 750 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, | 750 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, |
| 751 | }); | 751 | }); |
| @@ -786,7 +786,7 @@ export default (ChildComponent) => { | @@ -786,7 +786,7 @@ export default (ChildComponent) => { | ||
| 786 | /* 获取表数据 */ | 786 | /* 获取表数据 */ |
| 787 | handleGetMemoData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig) => { | 787 | handleGetMemoData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig) => { |
| 788 | const { currentId, sModelsType } = this.props; /* 当前页签数据 */ | 788 | const { currentId, sModelsType } = this.props; /* 当前页签数据 */ |
| 789 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 789 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 790 | const addStateControl = await this.props.handleGetDataSet({ | 790 | const addStateControl = await this.props.handleGetDataSet({ |
| 791 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, | 791 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, |
| 792 | }); | 792 | }); |
| @@ -839,7 +839,7 @@ export default (ChildComponent) => { | @@ -839,7 +839,7 @@ export default (ChildComponent) => { | ||
| 839 | /* 获取单张表数据 */ | 839 | /* 获取单张表数据 */ |
| 840 | handleGetOneMemoData = (memoName, memoConfig) => { | 840 | handleGetOneMemoData = (memoName, memoConfig) => { |
| 841 | const { currentId } = this.props; /* 当前页签数据 */ | 841 | const { currentId } = this.props; /* 当前页签数据 */ |
| 842 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 842 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 843 | if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ | 843 | if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ |
| 844 | this.props.handleGetDataSet({ | 844 | this.props.handleGetDataSet({ |
| 845 | name: memoName, configData: memoConfig, condition: { sSqlCondition: { sParentId: sId } }, | 845 | name: memoName, configData: memoConfig, condition: { sSqlCondition: { sParentId: sId } }, |
| @@ -849,7 +849,7 @@ export default (ChildComponent) => { | @@ -849,7 +849,7 @@ export default (ChildComponent) => { | ||
| 849 | 849 | ||
| 850 | handleGetMemoData1 = async (memoDataList, isWait) => { | 850 | handleGetMemoData1 = async (memoDataList, isWait) => { |
| 851 | const { currentId, sModelsType, sModelsId } = this.props; /* 当前页签数据 */ | 851 | const { currentId, sModelsType, sModelsId } = this.props; /* 当前页签数据 */ |
| 852 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 852 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 853 | let addState = {}; | 853 | let addState = {}; |
| 854 | // eslint-disable-next-line no-plusplus | 854 | // eslint-disable-next-line no-plusplus |
| 855 | for (let i = 0; i < memoDataList.length; i++) { | 855 | for (let i = 0; i < memoDataList.length; i++) { |
| @@ -2815,7 +2815,7 @@ export default (ChildComponent) => { | @@ -2815,7 +2815,7 @@ export default (ChildComponent) => { | ||
| 2815 | handleSearchData = async (handleType) => { | 2815 | handleSearchData = async (handleType) => { |
| 2816 | const { | 2816 | const { |
| 2817 | sModelsId, app, currentIndexFlag, currentPageNo, slaveChildConfig, memoDataList, masterData, | 2817 | sModelsId, app, currentIndexFlag, currentPageNo, slaveChildConfig, memoDataList, masterData, |
| 2818 | - masterConfig, slaveConfig, checkConfig, | 2818 | + masterConfig, slaveConfig, checkConfig, sSrcModelsId, |
| 2819 | } = this.props; | 2819 | } = this.props; |
| 2820 | let { sBillIdsArray = []} = this.props; | 2820 | let { sBillIdsArray = []} = this.props; |
| 2821 | let { currentId } = this.props; | 2821 | let { currentId } = this.props; |
| @@ -2868,7 +2868,7 @@ export default (ChildComponent) => { | @@ -2868,7 +2868,7 @@ export default (ChildComponent) => { | ||
| 2868 | if(!bExist) { | 2868 | if(!bExist) { |
| 2869 | const value = { | 2869 | const value = { |
| 2870 | sClientType: '1', sFilterOrderBy, bFilter, sListFormmasterId, currentPosition, handleType, iCountSum: pages.total, | 2870 | sClientType: '1', sFilterOrderBy, bFilter, sListFormmasterId, currentPosition, handleType, iCountSum: pages.total, |
| 2871 | - sUpId: masterData?.sId, | 2871 | + sUpId: masterData?.sId, sParentModelId :sSrcModelsId, |
| 2872 | }; | 2872 | }; |
| 2873 | const url = `${commonConfig.server_host}business/getBusinessDataByIndex?sModelsId=${sModelsId}`; | 2873 | const url = `${commonConfig.server_host}business/getBusinessDataByIndex?sModelsId=${sModelsId}`; |
| 2874 | /* 接收返回值 */ | 2874 | /* 接收返回值 */ |
src/components/Common/CommonSystemSettingEvent.js
| @@ -23,7 +23,7 @@ export default (ChildComponent) => { | @@ -23,7 +23,7 @@ export default (ChildComponent) => { | ||
| 23 | const { formData, currentId } = nextProps; | 23 | const { formData, currentId } = nextProps; |
| 24 | let { masterConfig } = nextProps; | 24 | let { masterConfig } = nextProps; |
| 25 | if (commonUtils.isEmptyArr(masterConfig) && formData.length > 0) { | 25 | if (commonUtils.isEmptyArr(masterConfig) && formData.length > 0) { |
| 26 | - const sId = currentId !== undefined ? currentId : ''; | 26 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 27 | masterConfig = formData.filter(item => !item.bGrd)[0]; | 27 | masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 28 | const sysaccountperiodConfig = formData.filter(item => item.bGrd && item.sTbName === 'sysaccountperiod')[0]; | 28 | const sysaccountperiodConfig = formData.filter(item => item.bGrd && item.sTbName === 'sysaccountperiod')[0]; |
| 29 | const sysaccountperiodColumn = commonFunc.getHeaderConfig(sysaccountperiodConfig); | 29 | const sysaccountperiodColumn = commonFunc.getHeaderConfig(sysaccountperiodConfig); |
| @@ -58,7 +58,7 @@ export default (ChildComponent) => { | @@ -58,7 +58,7 @@ export default (ChildComponent) => { | ||
| 58 | } | 58 | } |
| 59 | handleGetData = (masterConfig, sysaccountperiodConfig, sysbillnosettingsConfig, syspushMsgConfig) => { | 59 | handleGetData = (masterConfig, sysaccountperiodConfig, sysbillnosettingsConfig, syspushMsgConfig) => { |
| 60 | const { currentId, year } = this.props; | 60 | const { currentId, year } = this.props; |
| 61 | - const sId = currentId !== undefined ? currentId : ''; | 61 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 62 | const condition = { | 62 | const condition = { |
| 63 | sSqlCondition: { | 63 | sSqlCondition: { |
| 64 | sParentId: masterConfig.sId, | 64 | sParentId: masterConfig.sId, |
src/components/Common/CommonTable/index.js
| @@ -6987,6 +6987,7 @@ class CommonTableRc extends React.Component { | @@ -6987,6 +6987,7 @@ class CommonTableRc extends React.Component { | ||
| 6987 | } | 6987 | } |
| 6988 | 6988 | ||
| 6989 | const hasColorInfo = this.props?.masterConfig?.sTableColorTs; | 6989 | const hasColorInfo = this.props?.masterConfig?.sTableColorTs; |
| 6990 | + const BtnUpload = commonFunc.showLocalMessage(this.props, "BtnUpload", "上传"); | ||
| 6990 | 6991 | ||
| 6991 | return ( | 6992 | return ( |
| 6992 | <FormItem className={styles.subForm} style={{ height: '100%' }}> | 6993 | <FormItem className={styles.subForm} style={{ height: '100%' }}> |
| @@ -7009,7 +7010,7 @@ class CommonTableRc extends React.Component { | @@ -7009,7 +7010,7 @@ class CommonTableRc extends React.Component { | ||
| 7009 | this.uploadRef.setAttribute('contenteditable', "true"); | 7010 | this.uploadRef.setAttribute('contenteditable', "true"); |
| 7010 | }} | 7011 | }} |
| 7011 | > | 7012 | > |
| 7012 | - <UploadOutlined /> 上传 | 7013 | + <UploadOutlined /> {BtnUpload} |
| 7013 | </Button> | 7014 | </Button> |
| 7014 | </Upload> | 7015 | </Upload> |
| 7015 | : null } | 7016 | : null } |
src/components/Common/MakeUpPDF/index.js
| @@ -226,6 +226,8 @@ const MakeUpPDF = baseProps => { | @@ -226,6 +226,8 @@ const MakeUpPDF = baseProps => { | ||
| 226 | }; | 226 | }; |
| 227 | 227 | ||
| 228 | const tabsConfig = masterConfig.gdsconfigformslave.filter(item => item.sName && item.bVisible && item.sControlName); | 228 | const tabsConfig = masterConfig.gdsconfigformslave.filter(item => item.sName && item.bVisible && item.sControlName); |
| 229 | + const tabOrderInfomation = commonFunc.showLocalMessage(props, "tabOrderInfomation", "订单信息"); | ||
| 230 | + const tabPlatemakingProgress = commonFunc.showLocalMessage(props, "tabPlatemakingProgress", "拼版进度"); | ||
| 229 | 231 | ||
| 230 | return ( | 232 | return ( |
| 231 | <AntdDraggableModal | 233 | <AntdDraggableModal |
| @@ -270,8 +272,8 @@ const MakeUpPDF = baseProps => { | @@ -270,8 +272,8 @@ const MakeUpPDF = baseProps => { | ||
| 270 | ), | 272 | ), |
| 271 | }} | 273 | }} |
| 272 | items={[ | 274 | items={[ |
| 273 | - { label: "订单信息", key: "100", children: <SlaveComponent {...props} /> }, | ||
| 274 | - { label: "拼板进度", key: "200", children: <ProcessComponent {...props} /> }, | 275 | + { label: tabOrderInfomation, key: "100", children: <SlaveComponent {...props} /> }, |
| 276 | + { label: tabPlatemakingProgress, key: "200", children: <ProcessComponent {...props} /> }, | ||
| 275 | ...tabsConfig.map((config, index) => { | 277 | ...tabsConfig.map((config, index) => { |
| 276 | const { showName, sName } = config; | 278 | const { showName, sName } = config; |
| 277 | const fileUrl = masterData[sName]; | 279 | const fileUrl = masterData[sName]; |
src/components/Common/ToolBar/ToolBarNew.js
| @@ -1281,9 +1281,10 @@ class ToolBarComponent extends Component { | @@ -1281,9 +1281,10 @@ class ToolBarComponent extends Component { | ||
| 1281 | loading: true, | 1281 | loading: true, |
| 1282 | }); | 1282 | }); |
| 1283 | const { sModelsId, masterData, slaveData, slaveDelData: slaveDelDataOld, app } = this.props; | 1283 | const { sModelsId, masterData, slaveData, slaveDelData: slaveDelDataOld, app } = this.props; |
| 1284 | + const confirmSetting = commonFunc.showLocalMessage(this.props, 'confirmSetting', '请配置按钮的存储过程'); | ||
| 1284 | const btnConfig = this.props.masterConfig.gdsconfigformslave.filter(item => item.sControlName === "BtnCommonImport")[0]; // sButtonEnabled sButtonParam | 1285 | const btnConfig = this.props.masterConfig.gdsconfigformslave.filter(item => item.sControlName === "BtnCommonImport")[0]; // sButtonEnabled sButtonParam |
| 1285 | if (!commonUtils.isNotEmptyObject(btnConfig) || !commonUtils.isNotEmptyStr(btnConfig.sButtonParam)) { | 1286 | if (!commonUtils.isNotEmptyObject(btnConfig) || !commonUtils.isNotEmptyStr(btnConfig.sButtonParam)) { |
| 1286 | - message.error("请配置按钮的存储过程"); | 1287 | + message.error(confirmSetting); |
| 1287 | this.props.onSaveState({ | 1288 | this.props.onSaveState({ |
| 1288 | loading: false, | 1289 | loading: false, |
| 1289 | }); | 1290 | }); |
| @@ -1527,6 +1528,7 @@ class ToolBarComponent extends Component { | @@ -1527,6 +1528,7 @@ class ToolBarComponent extends Component { | ||
| 1527 | 1528 | ||
| 1528 | const bInvalidCancel = commonFunc.showLocalMessage(this.props, 'bInvalidCancel', '确定要作废'); | 1529 | const bInvalidCancel = commonFunc.showLocalMessage(this.props, 'bInvalidCancel', '确定要作废'); |
| 1529 | 1530 | ||
| 1531 | + const confirmSetting = commonFunc.showLocalMessage(this.props, 'confirmSetting', '请配置按钮的存储过程'); | ||
| 1530 | /* 新增 */ | 1532 | /* 新增 */ |
| 1531 | if (key === "BtnAdd") { | 1533 | if (key === "BtnAdd") { |
| 1532 | /* 增加 */ | 1534 | /* 增加 */ |
| @@ -2354,7 +2356,7 @@ class ToolBarComponent extends Component { | @@ -2354,7 +2356,7 @@ class ToolBarComponent extends Component { | ||
| 2354 | loading: false, | 2356 | loading: false, |
| 2355 | }); | 2357 | }); |
| 2356 | } else { | 2358 | } else { |
| 2357 | - message.error("请配置按钮的存储过程"); | 2359 | + message.error(confirmSetting); |
| 2358 | this.props.onSaveState({ | 2360 | this.props.onSaveState({ |
| 2359 | loading: false, | 2361 | loading: false, |
| 2360 | }); | 2362 | }); |
src/components/CommonElementEvent/FilfileManageInfo.js
| @@ -193,6 +193,8 @@ const FilfileManageComponent = Form.create({ | @@ -193,6 +193,8 @@ const FilfileManageComponent = Form.create({ | ||
| 193 | tableProps: { setUpload: true, setDownload: true }, | 193 | tableProps: { setUpload: true, setDownload: true }, |
| 194 | enabled: true, | 194 | enabled: true, |
| 195 | }; | 195 | }; |
| 196 | + const BtnSure = commonFunc.showLocalMessage(props, "BtnSure", "确定"); | ||
| 197 | + const BtnCancel = commonFunc.showLocalMessage(props, "BtnCancel", "取消"); | ||
| 196 | return ( | 198 | return ( |
| 197 | <Form > | 199 | <Form > |
| 198 | <Layout> | 200 | <Layout> |
| @@ -204,8 +206,8 @@ const FilfileManageComponent = Form.create({ | @@ -204,8 +206,8 @@ const FilfileManageComponent = Form.create({ | ||
| 204 | </div> | 206 | </div> |
| 205 | </Layout> | 207 | </Layout> |
| 206 | <div style={{ textAlign: 'right', marginRight: '9px', marginBottom: '9px' }}> | 208 | <div style={{ textAlign: 'right', marginRight: '9px', marginBottom: '9px' }}> |
| 207 | - <Button key="back" style={{ marginRight: '8px' }} onClick={props.onModalCancel.bind(this, 'visibleFilfile')}>取消</Button> | ||
| 208 | - <Button type="primary" onClick={props.onModalOk.bind(this, 'visibleFilfile')}>确认</Button> | 209 | + <Button key="back" style={{ marginRight: '8px' }} onClick={props.onModalCancel.bind(this, 'visibleFilfile')}>{BtnCancel}</Button> |
| 210 | + <Button type="primary" onClick={props.onModalOk.bind(this, 'visibleFilfile')}>{BtnSure}</Button> | ||
| 209 | </div> | 211 | </div> |
| 210 | </Layout> | 212 | </Layout> |
| 211 | </Form> | 213 | </Form> |
src/components/CommonElementEvent/SftLoginInfo.js
| @@ -59,7 +59,8 @@ const SftLoginComponent = Form.create({ | @@ -59,7 +59,8 @@ const SftLoginComponent = Form.create({ | ||
| 59 | const tabDrivergroup = commonFunc.showMessage(app.commonConst, 'tabDrivergroup');/* 司机查看权限 */ | 59 | const tabDrivergroup = commonFunc.showMessage(app.commonConst, 'tabDrivergroup');/* 司机查看权限 */ |
| 60 | const tabDepartgroup = commonFunc.showMessage(app.commonConst, 'tabDepartgroup');/* 部门查看权限 */ | 60 | const tabDepartgroup = commonFunc.showMessage(app.commonConst, 'tabDepartgroup');/* 部门查看权限 */ |
| 61 | const tabApproveGroup = commonFunc.showMessage(app.commonConst, 'sftlogininfoCheck');/* 审核组权限 */ | 61 | const tabApproveGroup = commonFunc.showMessage(app.commonConst, 'sftlogininfoCheck');/* 审核组权限 */ |
| 62 | - const tabBrandgroup = '分管公司权限'; | 62 | + const tabCompanyAuthority = commonFunc.showLocalMessage(this.props, 'tabCompanyAuthority', '分管公司权限'); |
| 63 | + const tabBrandgroup = tabCompanyAuthority; | ||
| 63 | 64 | ||
| 64 | return ( | 65 | return ( |
| 65 | <Form> | 66 | <Form> |
src/components/Manufacture/ProcessCard/ProcessCard.js
| @@ -55,7 +55,7 @@ class ProcessCard extends Component { | @@ -55,7 +55,7 @@ class ProcessCard extends Component { | ||
| 55 | } = nextProps; | 55 | } = nextProps; |
| 56 | const { formData, currentId } = nextProps; | 56 | const { formData, currentId } = nextProps; |
| 57 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { | 57 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { |
| 58 | - const sId = currentId !== undefined ? currentId : ''; | 58 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 59 | /* 数据Id */ | 59 | /* 数据Id */ |
| 60 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 60 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 61 | /* bGrd代表是否是表格 */ | 61 | /* bGrd代表是否是表格 */ |
| @@ -136,7 +136,7 @@ class ProcessCard extends Component { | @@ -136,7 +136,7 @@ class ProcessCard extends Component { | ||
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | // // 未清复制到时,产品ID需要再获取动态部件 | 138 | // // 未清复制到时,产品ID需要再获取动态部件 |
| 139 | - // const sId = currentId !== undefined ? currentId : ''; | 139 | + // const sId = currentId || nextProps.masterData?.sId || ''; |
| 140 | // if (sId === '' && commonUtils.isNotEmptyObject(this.props.masterData) && !this.props.bGetPartsData) { | 140 | // if (sId === '' && commonUtils.isNotEmptyObject(this.props.masterData) && !this.props.bGetPartsData) { |
| 141 | // const { sAllPartsName } = this.props.masterData; | 141 | // const { sAllPartsName } = this.props.masterData; |
| 142 | // if (sAllPartsName !== undefined) { | 142 | // if (sAllPartsName !== undefined) { |
| @@ -164,7 +164,7 @@ class ProcessCard extends Component { | @@ -164,7 +164,7 @@ class ProcessCard extends Component { | ||
| 164 | /* 获取表数据 */ | 164 | /* 获取表数据 */ |
| 165 | handleGetData = async (controlConfig, materialsConfig, processConfig, colorConfig, dailyConfig, extraState = {}) => { | 165 | handleGetData = async (controlConfig, materialsConfig, processConfig, colorConfig, dailyConfig, extraState = {}) => { |
| 166 | const { currentId } = this.props; /* 当前页签数据 */ | 166 | const { currentId } = this.props; /* 当前页签数据 */ |
| 167 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 167 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 168 | const addStateControl = await this.props.handleGetDataSet({ | 168 | const addStateControl = await this.props.handleGetDataSet({ |
| 169 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, | 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,7 +80,7 @@ class ProcessCardPack extends Component { | ||
| 80 | } = nextProps; | 80 | } = nextProps; |
| 81 | const { formData, currentId } = nextProps; | 81 | const { formData, currentId } = nextProps; |
| 82 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { | 82 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { |
| 83 | - const sId = currentId !== undefined ? currentId : ''; | 83 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 84 | /* 数据Id */ | 84 | /* 数据Id */ |
| 85 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 85 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 86 | /* bGrd代表是否是表格 */ | 86 | /* bGrd代表是否是表格 */ |
| @@ -210,7 +210,7 @@ class ProcessCardPack extends Component { | @@ -210,7 +210,7 @@ class ProcessCardPack extends Component { | ||
| 210 | } | 210 | } |
| 211 | } | 211 | } |
| 212 | // // 未清复制到时,产品ID需要再获取动态部件; | 212 | // // 未清复制到时,产品ID需要再获取动态部件; |
| 213 | - // const sId = currentId !== undefined ? currentId : ''; | 213 | + // const sId = currentId || nextProps.masterData?.sId || ''; |
| 214 | // if (sId === '' && commonUtils.isNotEmptyObject(this.props.masterData) && !this.props.bGetPartsData) { | 214 | // if (sId === '' && commonUtils.isNotEmptyObject(this.props.masterData) && !this.props.bGetPartsData) { |
| 215 | // const { sAllPartsName } = this.props.masterData; | 215 | // const { sAllPartsName } = this.props.masterData; |
| 216 | // if (sAllPartsName !== undefined) { | 216 | // if (sAllPartsName !== undefined) { |
| @@ -287,7 +287,7 @@ class ProcessCardPack extends Component { | @@ -287,7 +287,7 @@ class ProcessCardPack extends Component { | ||
| 287 | /* 获取表数据 */ | 287 | /* 获取表数据 */ |
| 288 | handleGetData = async (controlConfig, materialsConfig, processConfig, colorConfig, dailyConfig, packConfig, extraState = {}) => { | 288 | handleGetData = async (controlConfig, materialsConfig, processConfig, colorConfig, dailyConfig, packConfig, extraState = {}) => { |
| 289 | const { currentId, slaveData } = this.props; /* 当前页签数据 */ | 289 | const { currentId, slaveData } = this.props; /* 当前页签数据 */ |
| 290 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 290 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 291 | const addStateControl = await this.props.handleGetDataSet({ | 291 | const addStateControl = await this.props.handleGetDataSet({ |
| 292 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, | 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,7 +98,7 @@ class ProcessCardPackTableTree extends Component { | ||
| 98 | } = nextProps; | 98 | } = nextProps; |
| 99 | const { formData, currentId } = nextProps; | 99 | const { formData, currentId } = nextProps; |
| 100 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { | 100 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { |
| 101 | - const sId = currentId !== undefined ? currentId : ''; | 101 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 102 | /* 数据Id */ | 102 | /* 数据Id */ |
| 103 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 103 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 104 | if(masterConfig && masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'bLayout')[0]) { | 104 | if(masterConfig && masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'bLayout')[0]) { |
| @@ -273,7 +273,7 @@ class ProcessCardPackTableTree extends Component { | @@ -273,7 +273,7 @@ class ProcessCardPackTableTree extends Component { | ||
| 273 | }); | 273 | }); |
| 274 | } | 274 | } |
| 275 | // // 未清复制到时,产品ID需要再获取动态部件; | 275 | // // 未清复制到时,产品ID需要再获取动态部件; |
| 276 | - // const sId = currentId !== undefined ? currentId : ''; | 276 | + // const sId = currentId || nextProps.masterData?.sId || ''; |
| 277 | // if (sId === '' && commonUtils.isNotEmptyObject(this.props.masterData) && !this.props.bGetPartsData) { | 277 | // if (sId === '' && commonUtils.isNotEmptyObject(this.props.masterData) && !this.props.bGetPartsData) { |
| 278 | // const { sAllPartsName } = this.props.masterData; | 278 | // const { sAllPartsName } = this.props.masterData; |
| 279 | // if (sAllPartsName !== undefined) { | 279 | // if (sAllPartsName !== undefined) { |
| @@ -426,7 +426,7 @@ class ProcessCardPackTableTree extends Component { | @@ -426,7 +426,7 @@ class ProcessCardPackTableTree extends Component { | ||
| 426 | /* 获取表数据 */ | 426 | /* 获取表数据 */ |
| 427 | handleGetData1 = async (controlConfig, materialsConfig, processConfig, colorConfig, dailyConfig, packConfig, extraState = {}, configMap) => { | 427 | handleGetData1 = async (controlConfig, materialsConfig, processConfig, colorConfig, dailyConfig, packConfig, extraState = {}, configMap) => { |
| 428 | const { currentId, slaveData, masterData } = this.props; /* 当前页签数据 */ | 428 | const { currentId, slaveData, masterData } = this.props; /* 当前页签数据 */ |
| 429 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 429 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 430 | const addStateControl = await this.props.handleGetDataSet({ | 430 | const addStateControl = await this.props.handleGetDataSet({ |
| 431 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, | 431 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, |
| 432 | }); | 432 | }); |
| @@ -703,7 +703,7 @@ class ProcessCardPackTableTree extends Component { | @@ -703,7 +703,7 @@ class ProcessCardPackTableTree extends Component { | ||
| 703 | /* 获取表数据 */ | 703 | /* 获取表数据 */ |
| 704 | handleGetData = async (controlConfig, materialsConfig, processConfig, colorConfig, dailyConfig, packConfig, extraState = {}, configMap) => { | 704 | handleGetData = async (controlConfig, materialsConfig, processConfig, colorConfig, dailyConfig, packConfig, extraState = {}, configMap) => { |
| 705 | const { currentId, slaveData } = this.props; /* 当前页签数据 */ | 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 | this.handleGetAllData(controlConfig, processConfig, sId, materialsConfig, colorConfig, dailyConfig, packConfig, extraState, configMap); | 708 | this.handleGetAllData(controlConfig, processConfig, sId, materialsConfig, colorConfig, dailyConfig, packConfig, extraState, configMap); |
| 709 | }; | 709 | }; |
| @@ -711,7 +711,7 @@ class ProcessCardPackTableTree extends Component { | @@ -711,7 +711,7 @@ class ProcessCardPackTableTree extends Component { | ||
| 711 | 711 | ||
| 712 | handleGetOtherData = async (tableList, childTableList, configMap) => { | 712 | handleGetOtherData = async (tableList, childTableList, configMap) => { |
| 713 | const { currentId, slaveData, sModelsType, masterData } = this.props; /* 当前页签数据 */ | 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 | if(commonUtils.isNotEmptyObject(configMap)){ | 715 | if(commonUtils.isNotEmptyObject(configMap)){ |
| 716 | for (const configName of Object.keys(configMap)) { | 716 | for (const configName of Object.keys(configMap)) { |
| 717 | const tableName = configName.replace('Config', '').trim(); | 717 | const tableName = configName.replace('Config', '').trim(); |
src/components/Manufacture/WorkOrder/WorkOrder.js
| @@ -100,7 +100,7 @@ class WorkOrder extends Component { | @@ -100,7 +100,7 @@ class WorkOrder extends Component { | ||
| 100 | } = nextProps; | 100 | } = nextProps; |
| 101 | const { formData, currentId } = nextProps; | 101 | const { formData, currentId } = nextProps; |
| 102 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { | 102 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { |
| 103 | - const sId = currentId !== undefined ? currentId : ''; | 103 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 104 | /* 数据Id */ | 104 | /* 数据Id */ |
| 105 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 105 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 106 | /* bGrd代表是否是表格 */ | 106 | /* bGrd代表是否是表格 */ |
| @@ -167,7 +167,7 @@ class WorkOrder extends Component { | @@ -167,7 +167,7 @@ class WorkOrder extends Component { | ||
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | // // 未清复制到时,产品ID需要再获取动态部件 | 169 | // // 未清复制到时,产品ID需要再获取动态部件 |
| 170 | - // const sId = currentId !== undefined ? currentId : ''; | 170 | + // const sId = currentId || nextProps.masterData?.sId || ''; |
| 171 | // if (sId === '' && commonUtils.isNotEmptyObject(this.props.masterData) && !this.props.bGetPartsData) { | 171 | // if (sId === '' && commonUtils.isNotEmptyObject(this.props.masterData) && !this.props.bGetPartsData) { |
| 172 | // const { sAllPartsName } = this.props.masterData; | 172 | // const { sAllPartsName } = this.props.masterData; |
| 173 | // if (sAllPartsName !== undefined) { | 173 | // if (sAllPartsName !== undefined) { |
| @@ -220,7 +220,7 @@ class WorkOrder extends Component { | @@ -220,7 +220,7 @@ class WorkOrder extends Component { | ||
| 220 | /* 获取表数据 */ | 220 | /* 获取表数据 */ |
| 221 | handleGetData = async (controlConfig, materialsConfig, processConfig, colorConfig, extraState = {}) => { | 221 | handleGetData = async (controlConfig, materialsConfig, processConfig, colorConfig, extraState = {}) => { |
| 222 | const { currentId } = this.props; /* 当前页签数据 */ | 222 | const { currentId } = this.props; /* 当前页签数据 */ |
| 223 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 223 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 224 | const addStateControl = await this.props.handleGetDataSet({ | 224 | const addStateControl = await this.props.handleGetDataSet({ |
| 225 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, | 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,7 +95,7 @@ class WorkOrderPack extends Component { | ||
| 95 | } = nextProps; | 95 | } = nextProps; |
| 96 | const { formData, currentId } = nextProps; | 96 | const { formData, currentId } = nextProps; |
| 97 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { | 97 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { |
| 98 | - const sId = currentId !== undefined ? currentId : ''; | 98 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 99 | /* 数据Id */ | 99 | /* 数据Id */ |
| 100 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 100 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 101 | /* bGrd代表是否是表格 */ | 101 | /* bGrd代表是否是表格 */ |
| @@ -300,7 +300,7 @@ class WorkOrderPack extends Component { | @@ -300,7 +300,7 @@ class WorkOrderPack extends Component { | ||
| 300 | /* 获取表数据 */ | 300 | /* 获取表数据 */ |
| 301 | handleGetData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig, extraState = {}) => { | 301 | handleGetData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig, extraState = {}) => { |
| 302 | const { currentId, slaveData, sModelsType } = this.props; /* 当前页签数据 */ | 302 | const { currentId, slaveData, sModelsType } = this.props; /* 当前页签数据 */ |
| 303 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 303 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 304 | const addStateControl = await this.props.handleGetDataSet({ | 304 | const addStateControl = await this.props.handleGetDataSet({ |
| 305 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, | 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,7 +140,7 @@ class WorkOrderPack extends Component { | ||
| 140 | } = nextProps; | 140 | } = nextProps; |
| 141 | const { formData, currentId, sModelsId } = nextProps; | 141 | const { formData, currentId, sModelsId } = nextProps; |
| 142 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { | 142 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { |
| 143 | - const sId = currentId !== undefined ? currentId : ''; | 143 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 144 | /* 数据Id */ | 144 | /* 数据Id */ |
| 145 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 145 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 146 | if(masterConfig && masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'bLayout')[0]) { | 146 | if(masterConfig && masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'bLayout')[0]) { |
| @@ -613,7 +613,7 @@ class WorkOrderPack extends Component { | @@ -613,7 +613,7 @@ class WorkOrderPack extends Component { | ||
| 613 | /* 获取表数据 */ | 613 | /* 获取表数据 */ |
| 614 | handleGetData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig, extraState = {}) => { | 614 | handleGetData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig, extraState = {}) => { |
| 615 | const { currentId, slaveData } = this.props; /* 当前页签数据 */ | 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 | this.handleGetAllData(controlConfig, processConfig, sId, materialsConfig, colorConfig, packConfig, extraState); | 618 | this.handleGetAllData(controlConfig, processConfig, sId, materialsConfig, colorConfig, packConfig, extraState); |
| 619 | }; | 619 | }; |
| @@ -621,7 +621,7 @@ class WorkOrderPack extends Component { | @@ -621,7 +621,7 @@ class WorkOrderPack extends Component { | ||
| 621 | 621 | ||
| 622 | handleGetOtherData = async (tableList, childTableList, configMap) => { | 622 | handleGetOtherData = async (tableList, childTableList, configMap) => { |
| 623 | const { currentId, slaveData, sModelsType, masterData } = this.props; /* 当前页签数据 */ | 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 | if(commonUtils.isNotEmptyObject(configMap)){ | 625 | if(commonUtils.isNotEmptyObject(configMap)){ |
| 626 | for (const configName of Object.keys(configMap)) { | 626 | for (const configName of Object.keys(configMap)) { |
| 627 | const tableName = configName.replace('Config', '').trim(); | 627 | const tableName = configName.replace('Config', '').trim(); |
src/components/Manufacture/WorkOrderPack/WorkOrderResearchTableTree.js
| @@ -117,7 +117,7 @@ class WorkOrderPack extends Component { | @@ -117,7 +117,7 @@ class WorkOrderPack extends Component { | ||
| 117 | } = nextProps; | 117 | } = nextProps; |
| 118 | const { formData, currentId, sModelsId } = nextProps; | 118 | const { formData, currentId, sModelsId } = nextProps; |
| 119 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { | 119 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { |
| 120 | - const sId = currentId !== undefined ? currentId : ''; | 120 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 121 | /* 数据Id */ | 121 | /* 数据Id */ |
| 122 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 122 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 123 | if(masterConfig && masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'bLayout')[0]) { | 123 | if(masterConfig && masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'bLayout')[0]) { |
| @@ -428,7 +428,7 @@ class WorkOrderPack extends Component { | @@ -428,7 +428,7 @@ class WorkOrderPack extends Component { | ||
| 428 | /* 获取表数据 */ | 428 | /* 获取表数据 */ |
| 429 | handleGetData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig, extraState = {}) => { | 429 | handleGetData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig, extraState = {}) => { |
| 430 | const { currentId, slaveData, sModelsType, masterData } = this.props; /* 当前页签数据 */ | 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 | const addStateControl = await this.props.handleGetDataSet({ | 432 | const addStateControl = await this.props.handleGetDataSet({ |
| 433 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, | 433 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, |
| 434 | }); | 434 | }); |
| @@ -540,7 +540,7 @@ class WorkOrderPack extends Component { | @@ -540,7 +540,7 @@ class WorkOrderPack extends Component { | ||
| 540 | 540 | ||
| 541 | handleGetOtherData = async (tableList, childTableList, configMap) => { | 541 | handleGetOtherData = async (tableList, childTableList, configMap) => { |
| 542 | const { currentId, slaveData, sModelsType, masterData } = this.props; /* 当前页签数据 */ | 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 | if(commonUtils.isNotEmptyObject(configMap)){ | 544 | if(commonUtils.isNotEmptyObject(configMap)){ |
| 545 | for (const configName of Object.keys(configMap)) { | 545 | for (const configName of Object.keys(configMap)) { |
| 546 | const tableName = configName.replace('Config', '').trim(); | 546 | const tableName = configName.replace('Config', '').trim(); |
| @@ -1524,8 +1524,12 @@ class WorkOrderPack extends Component { | @@ -1524,8 +1524,12 @@ class WorkOrderPack extends Component { | ||
| 1524 | /* 验证通过与不通过走不同的流程 */ | 1524 | /* 验证通过与不通过走不同的流程 */ |
| 1525 | if (err) { /* 验证失败 */ | 1525 | if (err) { /* 验证失败 */ |
| 1526 | /* 直接渲染显示错误提示 */ | 1526 | /* 直接渲染显示错误提示 */ |
| 1527 | + const language = this.props?.app?.userinfo?.sLanguage || 'sChinese'; // 默认简体中文 | ||
| 1528 | + const requiredText = language === 'sEnglish' ? 'is Required' : | ||
| 1529 | + (language === 'sBig5' ? '為必填項' : '为必填项'); | ||
| 1527 | for (const key of Object.keys(err)) { | 1530 | for (const key of Object.keys(err)) { |
| 1528 | - message.warning(err[key].errors[0].message); | 1531 | + const sContent = err[key].errors[0].message?.replace('为必填项', requiredText); |
| 1532 | + message.warning(sContent); | ||
| 1529 | } | 1533 | } |
| 1530 | this.props.onSaveState({ | 1534 | this.props.onSaveState({ |
| 1531 | loading: false, | 1535 | loading: false, |
| @@ -1543,6 +1547,7 @@ class WorkOrderPack extends Component { | @@ -1543,6 +1547,7 @@ class WorkOrderPack extends Component { | ||
| 1543 | }); | 1547 | }); |
| 1544 | return; | 1548 | return; |
| 1545 | } | 1549 | } |
| 1550 | + console.log('3332', 1111); | ||
| 1546 | if (!commonBusiness.validateTable(slaveConfig, slaveData, this.props) || !commonBusiness.validateTable(controlConfig, controlData, this.props) || | 1551 | if (!commonBusiness.validateTable(slaveConfig, slaveData, this.props) || !commonBusiness.validateTable(controlConfig, controlData, this.props) || |
| 1547 | (!commonBusiness.validateTable(materialsConfig, materialsData, this.props)) || !commonBusiness.validateTable(processConfig, processData, this.props) || | 1552 | (!commonBusiness.validateTable(materialsConfig, materialsData, this.props)) || !commonBusiness.validateTable(processConfig, processData, this.props) || |
| 1548 | !commonBusiness.validateTable(colorConfig, colorData, this.props)) { | 1553 | !commonBusiness.validateTable(colorConfig, colorData, this.props)) { |
src/components/Manufacture/WorkOrderPackTableTreeNew/index.js
| @@ -3213,14 +3213,21 @@ const controlProps = props => { | @@ -3213,14 +3213,21 @@ const controlProps = props => { | ||
| 3213 | const tableRow = controlData.find(item => item.sId === tableSelectedRowKeys[0]); | 3213 | const tableRow = controlData.find(item => item.sId === tableSelectedRowKeys[0]); |
| 3214 | let controlChildData = []; | 3214 | let controlChildData = []; |
| 3215 | if(commonUtils.isNotEmptyObject(tableRow)) { | 3215 | if(commonUtils.isNotEmptyObject(tableRow)) { |
| 3216 | - // 递归查找所有子节点 | 3216 | + // 使用Set来记录已处理节点,防止循环引用 |
| 3217 | + const processedNodes = new Set(); | ||
| 3218 | + | ||
| 3217 | const findChildren = (parentId, allNodes) => { | 3219 | const findChildren = (parentId, allNodes) => { |
| 3218 | - const children = allNodes.filter(node => node.sControlParentId === parentId); | ||
| 3219 | - let result = [...children]; | ||
| 3220 | - children.forEach(child => { | ||
| 3221 | - result = result.concat(findChildren(child.sNodeId, allNodes)); | ||
| 3222 | - }); | ||
| 3223 | - return result; | 3220 | + // 防止重复处理同一个父节点 |
| 3221 | + if (processedNodes.has(parentId)) return []; | ||
| 3222 | + processedNodes.add(parentId); | ||
| 3223 | + | ||
| 3224 | + const children = allNodes.filter(node => | ||
| 3225 | + node.sControlParentId === parentId && !processedNodes.has(node.sNodeId) | ||
| 3226 | + ); | ||
| 3227 | + | ||
| 3228 | + return children.concat( | ||
| 3229 | + ...children.map(child => findChildren(child.sNodeId, allNodes)) | ||
| 3230 | + ); | ||
| 3224 | }; | 3231 | }; |
| 3225 | 3232 | ||
| 3226 | controlChildData = findChildren(tableRow.sNodeId, controlData); | 3233 | controlChildData = findChildren(tableRow.sNodeId, controlData); |
src/components/ProductionReport/ProductionReport.js
| @@ -50,7 +50,7 @@ class ProductionReport extends Component { | @@ -50,7 +50,7 @@ class ProductionReport extends Component { | ||
| 50 | } = nextProps; | 50 | } = nextProps; |
| 51 | const { formData, currentId } = nextProps; | 51 | const { formData, currentId } = nextProps; |
| 52 | if (commonUtils.isEmptyArr(employeeColumn) && formData.length > 0) { | 52 | if (commonUtils.isEmptyArr(employeeColumn) && formData.length > 0) { |
| 53 | - const sId = currentId !== undefined ? currentId : ''; | 53 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 54 | /* 数据Id */ | 54 | /* 数据Id */ |
| 55 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 55 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 56 | /* bGrd代表是否是表格 */ | 56 | /* bGrd代表是否是表格 */ |
| @@ -115,7 +115,7 @@ class ProductionReport extends Component { | @@ -115,7 +115,7 @@ class ProductionReport extends Component { | ||
| 115 | /* 获取表数据 */ | 115 | /* 获取表数据 */ |
| 116 | handleGetData = (employeeConfig, extraState = {}) => { | 116 | handleGetData = (employeeConfig, extraState = {}) => { |
| 117 | const { currentId } = this.props; /* 当前页签数据 */ | 117 | const { currentId } = this.props; /* 当前页签数据 */ |
| 118 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 118 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 119 | this.props.handleGetDataSet({ | 119 | this.props.handleGetDataSet({ |
| 120 | name: 'employee', configData: employeeConfig, condition: { sSqlCondition: { sParentId: sId } }, | 120 | name: 'employee', configData: employeeConfig, condition: { sSqlCondition: { sParentId: sId } }, |
| 121 | }); | 121 | }); |
| @@ -364,7 +364,7 @@ class ProductionReport extends Component { | @@ -364,7 +364,7 @@ class ProductionReport extends Component { | ||
| 364 | /** 获取主表、从表、审核表、员工表数据 */ | 364 | /** 获取主表、从表、审核表、员工表数据 */ |
| 365 | handleGetTableData = (masterConfig, slaveConfig, checkConfig, employeeConfig) => { | 365 | handleGetTableData = (masterConfig, slaveConfig, checkConfig, employeeConfig) => { |
| 366 | const { currentId } = this.props; /* 当前页签数据 */ | 366 | const { currentId } = this.props; /* 当前页签数据 */ |
| 367 | - const sId = currentId !== undefined ? currentId : ''; | 367 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 368 | this.props.handleGetDataOne({ | 368 | this.props.handleGetDataOne({ |
| 369 | name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, | 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,7 +63,7 @@ class Quotation extends Component { | ||
| 63 | } = nextProps; | 63 | } = nextProps; |
| 64 | const { formData, currentId } = nextProps; | 64 | const { formData, currentId } = nextProps; |
| 65 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { | 65 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { |
| 66 | - const sId = currentId !== undefined ? currentId : ''; | 66 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 67 | /* 数据Id */ | 67 | /* 数据Id */ |
| 68 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 68 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 69 | /* bGrd代表是否是表格 */ | 69 | /* bGrd代表是否是表格 */ |
| @@ -177,7 +177,7 @@ class Quotation extends Component { | @@ -177,7 +177,7 @@ class Quotation extends Component { | ||
| 177 | /* 获取表数据 */ | 177 | /* 获取表数据 */ |
| 178 | handleGetData = async (controlConfig, materialsConfig, processConfig, manyqtysConfig, colorConfig, extraState = {}) => { | 178 | handleGetData = async (controlConfig, materialsConfig, processConfig, manyqtysConfig, colorConfig, extraState = {}) => { |
| 179 | const { currentId } = this.props; /* 当前页签数据 */ | 179 | const { currentId } = this.props; /* 当前页签数据 */ |
| 180 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 180 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 181 | const addStateControl = await this.props.handleGetDataSet({ | 181 | const addStateControl = await this.props.handleGetDataSet({ |
| 182 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, | 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,7 +80,7 @@ class QuotationPack extends Component { | ||
| 80 | } = nextProps; | 80 | } = nextProps; |
| 81 | const { formData, currentId } = nextProps; | 81 | const { formData, currentId } = nextProps; |
| 82 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { | 82 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { |
| 83 | - const sId = currentId !== undefined ? currentId : ''; | 83 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 84 | /* 数据Id */ | 84 | /* 数据Id */ |
| 85 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 85 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 86 | /* bGrd代表是否是表格 */ | 86 | /* bGrd代表是否是表格 */ |
| @@ -291,7 +291,7 @@ class QuotationPack extends Component { | @@ -291,7 +291,7 @@ class QuotationPack extends Component { | ||
| 291 | /* 获取表数据 */ | 291 | /* 获取表数据 */ |
| 292 | handleGetData = async (controlConfig, materialsConfig, processConfig, manyqtysConfig, colorConfig, packConfig, extraState = {}) => { | 292 | handleGetData = async (controlConfig, materialsConfig, processConfig, manyqtysConfig, colorConfig, packConfig, extraState = {}) => { |
| 293 | const { currentId, slaveData } = this.props; /* 当前页签数据 */ | 293 | const { currentId, slaveData } = this.props; /* 当前页签数据 */ |
| 294 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 294 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 295 | const addStateControl = await this.props.handleGetDataSet({ | 295 | const addStateControl = await this.props.handleGetDataSet({ |
| 296 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, | 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,7 +101,7 @@ class QuotationPackTableTree extends Component { | ||
| 101 | } = nextProps; | 101 | } = nextProps; |
| 102 | const { formData, currentId } = nextProps; | 102 | const { formData, currentId } = nextProps; |
| 103 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { | 103 | if (commonUtils.isEmptyArr(controlColumn) && formData.length > 0) { |
| 104 | - const sId = currentId !== undefined ? currentId : ''; | 104 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 105 | /* 数据Id */ | 105 | /* 数据Id */ |
| 106 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 106 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 107 | if(masterConfig && masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'bLayout')[0]) { | 107 | if(masterConfig && masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'bLayout')[0]) { |
| @@ -382,7 +382,7 @@ class QuotationPackTableTree extends Component { | @@ -382,7 +382,7 @@ class QuotationPackTableTree extends Component { | ||
| 382 | /* 获取表数据 */ | 382 | /* 获取表数据 */ |
| 383 | handleGetData = async (controlConfig, materialsConfig, processConfig, manyqtysConfig, colorConfig, packConfig, extraState = {}) => { | 383 | handleGetData = async (controlConfig, materialsConfig, processConfig, manyqtysConfig, colorConfig, packConfig, extraState = {}) => { |
| 384 | const { currentId, masterData, slaveData } = this.props; /* 当前页签数据 */ | 384 | const { currentId, masterData, slaveData } = this.props; /* 当前页签数据 */ |
| 385 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 385 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 386 | const addStateControl = await this.props.handleGetDataSet({ | 386 | const addStateControl = await this.props.handleGetDataSet({ |
| 387 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, | 387 | name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, |
| 388 | }); | 388 | }); |
| @@ -654,7 +654,7 @@ class QuotationPackTableTree extends Component { | @@ -654,7 +654,7 @@ class QuotationPackTableTree extends Component { | ||
| 654 | 654 | ||
| 655 | handleGetOtherData = async (tableList, childTableList, configMap) => { | 655 | handleGetOtherData = async (tableList, childTableList, configMap) => { |
| 656 | const { currentId, slaveData, sModelsType, masterData } = this.props; /* 当前页签数据 */ | 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 | if(commonUtils.isNotEmptyObject(configMap)){ | 658 | if(commonUtils.isNotEmptyObject(configMap)){ |
| 659 | for (const configName of Object.keys(configMap)) { | 659 | for (const configName of Object.keys(configMap)) { |
| 660 | const tableName = configName.replace('Config', '').trim(); | 660 | const tableName = configName.replace('Config', '').trim(); |
src/components/productionMainPlan/productionMainPlan.js
| @@ -561,6 +561,10 @@ const ProductionPlanComponent = Form.create({ | @@ -561,6 +561,10 @@ const ProductionPlanComponent = Form.create({ | ||
| 561 | }; | 561 | }; |
| 562 | } | 562 | } |
| 563 | 563 | ||
| 564 | + const WorkCenterMachinePlan = commonFunc.showLocalMessage(props, "WorkCenter&MachinePlan", "工作中心&机台计划"); | ||
| 565 | + | ||
| 566 | + const MPS = commonFunc.showLocalMessage(props, "MPS", "产品主计划"); | ||
| 567 | + | ||
| 564 | const machineCharProps = commonBusiness.getCharTypes('machineChar', charConfigArr, charConfigAndDataArr, props); | 568 | const machineCharProps = commonBusiness.getCharTypes('machineChar', charConfigArr, charConfigAndDataArr, props); |
| 565 | const setUp = commonFunc.showMessage(app.commonConst, 'setUp');/* 上移 */ | 569 | const setUp = commonFunc.showMessage(app.commonConst, 'setUp');/* 上移 */ |
| 566 | const setDown = commonFunc.showMessage(app.commonConst, 'setDown');/* 下移 */ | 570 | const setDown = commonFunc.showMessage(app.commonConst, 'setDown');/* 下移 */ |
| @@ -584,7 +588,7 @@ const ProductionPlanComponent = Form.create({ | @@ -584,7 +588,7 @@ const ProductionPlanComponent = Form.create({ | ||
| 584 | <Avatar src={props.imgSrc} /> | 588 | <Avatar src={props.imgSrc} /> |
| 585 | </div> | 589 | </div> |
| 586 | <Tabs className={styles.slaveTabs} tabBarStyle={{ marginLeft: 10, marginRight: 10 }}> | 590 | <Tabs className={styles.slaveTabs} tabBarStyle={{ marginLeft: 10, marginRight: 10 }}> |
| 587 | - <TabPane tab="产品主计划" key={2} > | 591 | + <TabPane tab={MPS} key={2} > |
| 588 | <div className={selfstyles.mainPlan} > | 592 | <div className={selfstyles.mainPlan} > |
| 589 | <Layout className="processList"> | 593 | <Layout className="processList"> |
| 590 | <Sider className="process"> | 594 | <Sider className="process"> |
| @@ -612,7 +616,7 @@ const ProductionPlanComponent = Form.create({ | @@ -612,7 +616,7 @@ const ProductionPlanComponent = Form.create({ | ||
| 612 | </Layout> | 616 | </Layout> |
| 613 | </div> | 617 | </div> |
| 614 | </TabPane> | 618 | </TabPane> |
| 615 | - <TabPane tab="工作中心&机台计划" key={3}> | 619 | + <TabPane tab={WorkCenterMachinePlan} key={3}> |
| 616 | <Content | 620 | <Content |
| 617 | className="xly-productionPlanInfo" | 621 | className="xly-productionPlanInfo" |
| 618 | style={{ maxHeight: 'calc( 100vh - 220px)', overflowY: 'auto' }} | 622 | style={{ maxHeight: 'calc( 100vh - 220px)', overflowY: 'auto' }} |
src/components/productionScheduleTree/productionScheduleTree.js
| @@ -1547,7 +1547,7 @@ const ProductionScheduleComponent = Form.create({ | @@ -1547,7 +1547,7 @@ const ProductionScheduleComponent = Form.create({ | ||
| 1547 | // okProps.disabled = !props.bChangeTimerEnable; | 1547 | // okProps.disabled = !props.bChangeTimerEnable; |
| 1548 | okProps.loading = props.loadingTimer; | 1548 | okProps.loading = props.loadingTimer; |
| 1549 | } | 1549 | } |
| 1550 | - | 1550 | + const WorkCenter = commonFunc.showLocalMessage(props, "WorkCenter", "工作中心"); |
| 1551 | return ( | 1551 | return ( |
| 1552 | <Form style={{ height: '100%' }}> | 1552 | <Form style={{ height: '100%' }}> |
| 1553 | <Layout style={{ height: '100%' }} className="xly-productionPlan-list productionScheduleTree"> | 1553 | <Layout style={{ height: '100%' }} className="xly-productionPlan-list productionScheduleTree"> |
| @@ -1563,7 +1563,7 @@ const ProductionScheduleComponent = Form.create({ | @@ -1563,7 +1563,7 @@ const ProductionScheduleComponent = Form.create({ | ||
| 1563 | <div className="resize-controller" onMouseDown={handleResizeLayout} /> | 1563 | <div className="resize-controller" onMouseDown={handleResizeLayout} /> |
| 1564 | <div className="productionScheduleTree-sider-title"> | 1564 | <div className="productionScheduleTree-sider-title"> |
| 1565 | <Icon type={expandAll ? 'minus-square' : 'plus-square'} className="control-icon" onClick={onTreeExpandChange} /> | 1565 | <Icon type={expandAll ? 'minus-square' : 'plus-square'} className="control-icon" onClick={onTreeExpandChange} /> |
| 1566 | - <span>工作中心</span> | 1566 | + <span>{WorkCenter}</span> |
| 1567 | </div> | 1567 | </div> |
| 1568 | <div className="productionScheduleTree-sider-content"> | 1568 | <div className="productionScheduleTree-sider-content"> |
| 1569 | { | 1569 | { |
src/mobile/common/CommobileBillEvent.js
| @@ -25,7 +25,7 @@ export default (ChildComponent) => { | @@ -25,7 +25,7 @@ export default (ChildComponent) => { | ||
| 25 | formData, currentId, masterConfig: masterConfigOld, sModelsId, | 25 | formData, currentId, masterConfig: masterConfigOld, sModelsId, |
| 26 | } = nextProps; | 26 | } = nextProps; |
| 27 | if (commonUtils.isEmptyObject(masterConfigOld) && formData.length > 0) { | 27 | if (commonUtils.isEmptyObject(masterConfigOld) && formData.length > 0) { |
| 28 | - const sId = currentId !== undefined ? currentId : ''; | 28 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 29 | /* 数据Id */ | 29 | /* 数据Id */ |
| 30 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 30 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 31 | const slaveConfig = formData.filter(item => item.bGrd)[0]; | 31 | const slaveConfig = formData.filter(item => item.bGrd)[0]; |
| @@ -777,7 +777,7 @@ export default (ChildComponent) => { | @@ -777,7 +777,7 @@ export default (ChildComponent) => { | ||
| 777 | /** 获取主表、从表、审核表数据 */ | 777 | /** 获取主表、从表、审核表数据 */ |
| 778 | handleGetData = async (masterConfig, slaveConfig) => { | 778 | handleGetData = async (masterConfig, slaveConfig) => { |
| 779 | const { currentId } = this.props; /* 当前页签数据 */ | 779 | const { currentId } = this.props; /* 当前页签数据 */ |
| 780 | - const sId = currentId !== undefined ? currentId : ''; | 780 | + const sId = currentId || this.props.masterData?.sId || ''; |
| 781 | await this.props.handleGetDataOne({ name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' } }); | 781 | await this.props.handleGetDataOne({ name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' } }); |
| 782 | if (!commonUtils.isEmptyObject(slaveConfig)) { | 782 | if (!commonUtils.isEmptyObject(slaveConfig)) { |
| 783 | this.props.handleGetDataSet({ | 783 | this.props.handleGetDataSet({ |
| @@ -788,7 +788,7 @@ export default (ChildComponent) => { | @@ -788,7 +788,7 @@ export default (ChildComponent) => { | ||
| 788 | 788 | ||
| 789 | handleGetMemoData = async (employeeConfig) => { | 789 | handleGetMemoData = async (employeeConfig) => { |
| 790 | const { currentId } = this.props; /* 当前页签数据 */ | 790 | const { currentId } = this.props; /* 当前页签数据 */ |
| 791 | - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ | 791 | + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ |
| 792 | this.props.handleGetDataSet({ | 792 | this.props.handleGetDataSet({ |
| 793 | name: 'employee', configData: employeeConfig, condition: { sSqlCondition: { sParentId: sId } }, | 793 | name: 'employee', configData: employeeConfig, condition: { sSqlCondition: { sParentId: sId } }, |
| 794 | }); | 794 | }); |
src/mobile/common/CommobileSubBillEvent.js
| @@ -25,7 +25,7 @@ export default (ChildComponent) => { | @@ -25,7 +25,7 @@ export default (ChildComponent) => { | ||
| 25 | formData, currentId, masterConfig: masterConfigOld, sModelsId, | 25 | formData, currentId, masterConfig: masterConfigOld, sModelsId, |
| 26 | } = nextProps; | 26 | } = nextProps; |
| 27 | if (commonUtils.isEmptyObject(masterConfigOld) && formData.length > 0) { | 27 | if (commonUtils.isEmptyObject(masterConfigOld) && formData.length > 0) { |
| 28 | - const sId = currentId !== undefined ? currentId : ''; | 28 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 29 | /* 数据Id */ | 29 | /* 数据Id */ |
| 30 | const masterConfig = formData.filter(item => !item.bGrd)[0]; | 30 | const masterConfig = formData.filter(item => !item.bGrd)[0]; |
| 31 | const slaveConfig = formData.filter(item => item.bGrd)[0]; | 31 | const slaveConfig = formData.filter(item => item.bGrd)[0]; |
src/mobile/common/ProcessReportMobile.js
| @@ -59,7 +59,7 @@ class ProcessReportMobileComponent extends React.Component { | @@ -59,7 +59,7 @@ class ProcessReportMobileComponent extends React.Component { | ||
| 59 | componentWillReceiveProps(nextProps) { | 59 | componentWillReceiveProps(nextProps) { |
| 60 | const { formData, employeeConfig, currentId } = nextProps; | 60 | const { formData, employeeConfig, currentId } = nextProps; |
| 61 | if (commonUtils.isEmptyObject(employeeConfig) && formData.length > 0) { | 61 | if (commonUtils.isEmptyObject(employeeConfig) && formData.length > 0) { |
| 62 | - const sId = currentId !== undefined ? currentId : ''; | 62 | + const sId = currentId || nextProps.masterData?.sId || ''; |
| 63 | const employeeConfig = formData.filter(item => item.sTbName.toUpperCase() === 'mftproductionreportemployee'.toUpperCase())[0]; | 63 | const employeeConfig = formData.filter(item => item.sTbName.toUpperCase() === 'mftproductionreportemployee'.toUpperCase())[0]; |
| 64 | const addState = {}; | 64 | const addState = {}; |
| 65 | if (sId === '') { | 65 | if (sId === '') { |