diff --git a/src/components/AuditInformation/AuditInformation.js b/src/components/AuditInformation/AuditInformation.js index 32be17e..fa5495e 100644 --- a/src/components/AuditInformation/AuditInformation.js +++ b/src/components/AuditInformation/AuditInformation.js @@ -33,7 +33,7 @@ class AuditInformation extends Component { let { masterConfig, canSendMsg } = nextProps; const { userinfo } = app; if (commonUtils.isEmptyArr(masterConfig) && formData.length > 0) { - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ masterConfig = formData.filter(item => !item.bGrd)[0]; const checkConfig = formData.filter(item => item.bGrd && item.sTbName === 'sysbillcheckresult')[0]; @@ -58,7 +58,7 @@ class AuditInformation extends Component { /** 获取主表数据 */ handleGetData = async (masterConfig, checkConfig) => { const { currentId } = this.props; /* 当前页签数据 */ - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || this.props.masterData?.sId || ''; await this.props.handleGetDataOne({ name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' } }); const { masterData } = this.props; if (!commonUtils.isEmptyObject(checkConfig) && !commonUtils.isEmptyObject(masterData)) { diff --git a/src/components/Common/CommonBillDeliverEvent.js b/src/components/Common/CommonBillDeliverEvent.js index 04b5d17..3ccafe1 100644 --- a/src/components/Common/CommonBillDeliverEvent.js +++ b/src/components/Common/CommonBillDeliverEvent.js @@ -47,7 +47,7 @@ export default (ChildComponent) => { employeeConfig: employeeConfigOld, } = nextProps; 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)) { - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData.filter(item => !item.bGrd)[0]; const BtnDesignFunctionConfig = commonUtils.isNotEmptyObject(masterConfig) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'BtnBsOperation.BtnDesignFunction') : {}; @@ -274,7 +274,7 @@ export default (ChildComponent) => { }); } 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) { const config = {}; - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData.filter(item => !item.bGrd)[0]; let addState = {}; @@ -296,7 +296,7 @@ export default (ChildComponent) => { masterConfig, sId, pageLoading: false, ...addState, }); } else if (commonUtils.isEmptyObject(slaveConfigOld) && commonUtils.isEmptyObject(masterConfigOld) && formData.length === 2 && (sModelsType === 'quality/accident') && formRoute.indexOf('indexOee') === -1) { - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData.filter(item => !item.bGrd)[0]; const slaveConfig = formData.filter(item => item.bGrd && item.sTbName === 'mftqualityaccidentSlave')[0]; @@ -319,7 +319,7 @@ export default (ChildComponent) => { }); } else if (formRoute.indexOf('indexOee') > -1 && commonUtils.isEmptyObject(employeeConfigOld) && commonUtils.isEmptyObject(slaveConfigOld) && formData.length > 0) { if (formRoute === '/indexOee/labelPrint' && commonUtils.isEmpty(slaveConfigOld)) { /* 入库标签打印 */ - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData[0]; const slaveConfig = formData[0]; @@ -507,7 +507,7 @@ export default (ChildComponent) => { /** 获取主表、从表、审核表数据 */ handleGetData = async (masterConfig, slaveConfig, checkConfig, bEditClick) => { const { currentId } = this.props; /* 当前页签数据 */ - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || this.props.masterData?.sId || ''; await this.props.handleGetDataOne({ name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick, }); @@ -544,7 +544,7 @@ export default (ChildComponent) => { /* 获取表数据 */ handleGetMemoData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig) => { const { currentId, sModelsType } = this.props; /* 当前页签数据 */ - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ const addStateControl = await this.props.handleGetDataSet({ name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, }); @@ -597,7 +597,7 @@ export default (ChildComponent) => { /* 获取单张表数据 */ handleGetOneMemoData = (memoName, memoConfig) => { const { currentId } = this.props; /* 当前页签数据 */ - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ this.props.handleGetDataSet({ name: memoName, configData: memoConfig, condition: { sSqlCondition: { sParentId: sId } }, diff --git a/src/components/Common/CommonBillEvent.js b/src/components/Common/CommonBillEvent.js index 3fc2fd8..e8c6bfc 100644 --- a/src/components/Common/CommonBillEvent.js +++ b/src/components/Common/CommonBillEvent.js @@ -79,7 +79,7 @@ export default (ChildComponent) => { slaveInfoList: slaveInfoListOld, } = nextProps; 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')))) { - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData.filter(item => !item.bGrd)[0]; const BtnDesignFunctionConfig = commonUtils.isNotEmptyObject(masterConfig) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'BtnBsOperation.BtnDesignFunction') : {}; @@ -494,7 +494,7 @@ export default (ChildComponent) => { }); } 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) { const config = {}; - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData.filter(item => !item.bGrd)[0]; let addState = {}; @@ -516,7 +516,7 @@ export default (ChildComponent) => { masterConfig, sId, pageLoading: false, ...addState, }); } else if (commonUtils.isEmptyObject(slaveConfigOld) && commonUtils.isEmptyObject(masterConfigOld) && formData.length === 2 && (sModelsType === 'quality/accident') && formRoute.indexOf('indexOee') === -1) { - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData.filter(item => !item.bGrd)[0]; const slaveConfig = formData.filter(item => item.bGrd && item.sTbName === 'mftqualityaccidentSlave')[0]; @@ -551,7 +551,7 @@ export default (ChildComponent) => { // employeeConfig, employeeColumn, masterConfig, ...addState, // }); if (formRoute === '/indexOee/labelPrint' && commonUtils.isEmpty(slaveConfigOld)) { /* 入库标签打印 */ - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData[0]; const slaveConfig = formData[0]; @@ -801,7 +801,7 @@ export default (ChildComponent) => { /* 获取表数据 */ handleGetMemoData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig) => { const { currentId, sModelsType } = this.props; /* 当前页签数据 */ - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ const addStateControl = await this.props.handleGetDataSet({ name: 'control', configData: controlConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, }); @@ -860,7 +860,7 @@ export default (ChildComponent) => { /* 获取单张表数据 */ handleGetOneMemoData = (memoName, memoConfig) => { const { currentId } = this.props; /* 当前页签数据 */ - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ this.props.handleGetDataSet({ name: memoName, configData: memoConfig, condition: { sSqlCondition: { sParentId: sId } }, @@ -2290,8 +2290,6 @@ export default (ChildComponent) => { }, onCancel() { }, - okText: '保存', - cancelText: '不保存', }); this.props.onSaveState({ loading: false, @@ -2829,7 +2827,8 @@ export default (ChildComponent) => { /* 上一条、下一条、首条、末条 */ handleSearchData = async (handleType) => { const { - sModelsId, app, currentIndexFlag, currentPageNo, masterData, masterConfig, slaveConfig, checkConfig + sModelsId, app, currentIndexFlag, currentPageNo, masterData, masterConfig, slaveConfig, checkConfig, + sSrcModelsId, } = this.props; let { sBillIdsArray = []} = this.props; let { currentId } = this.props; @@ -2888,7 +2887,7 @@ export default (ChildComponent) => { if(!bExist) { const value = { sClientType: '1', sFilterOrderBy, bFilter, sListFormmasterId, currentPosition, handleType, iCountSum: pages.total, - sUpId: masterData?.sId, + sUpId: masterData?.sId, sParentModelId :sSrcModelsId, }; const url = `${commonConfig.server_host}business/getBusinessDataByIndex?sModelsId=${sModelsId}`; /* 接收返回值 */ diff --git a/src/components/Common/CommonCheckBillEvent.js b/src/components/Common/CommonCheckBillEvent.js index 6ab6158..d1ca1ed 100644 --- a/src/components/Common/CommonCheckBillEvent.js +++ b/src/components/Common/CommonCheckBillEvent.js @@ -72,7 +72,7 @@ export default (ChildComponent) => { employeeConfig: employeeConfigOld, } = nextProps; 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'))) { - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData.filter(item => !item.bGrd)[0]; const BtnDesignFunctionConfig = commonUtils.isNotEmptyObject(masterConfig) ? masterConfig.gdsconfigformslave.filter(item => item.sControlName === 'BtnBsOperation.BtnDesignFunction') : {}; @@ -373,7 +373,7 @@ export default (ChildComponent) => { }); } 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) { const config = {}; - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData.filter(item => !item.bGrd)[0]; let addState = {}; @@ -395,7 +395,7 @@ export default (ChildComponent) => { masterConfig, sId, pageLoading: false, ...addState, }); } else if (commonUtils.isEmptyObject(slaveConfigOld) && commonUtils.isEmptyObject(masterConfigOld) && formData.length === 2 && (sModelsType === 'quality/accident') && formRoute.indexOf('indexOee') === -1) { - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData.filter(item => !item.bGrd)[0]; const slaveConfig = formData.filter(item => item.bGrd && item.sTbName === 'mftqualityaccidentSlave')[0]; @@ -430,7 +430,7 @@ export default (ChildComponent) => { // employeeConfig, employeeColumn, masterConfig, ...addState, // }); if (formRoute === '/indexOee/labelPrint' && commonUtils.isEmpty(slaveConfigOld)) { /* 入库标签打印 */ - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData[0]; const slaveConfig = formData[0]; @@ -618,7 +618,7 @@ export default (ChildComponent) => { /** 获取主表、从表、审核表数据 */ handleGetData = async (masterConfig, slaveConfig, checkConfig, bEditClick) => { const { currentId } = this.props; /* 当前页签数据 */ - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || this.props.masterData?.sId || ''; const addStateMaster = await this.props.handleGetDataOne({ name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, isWait: true, bEditClick, }); @@ -669,7 +669,7 @@ export default (ChildComponent) => { /* 获取表数据 */ handleGetMemoData = async (controlConfig, materialsConfig, processConfig, colorConfig, packConfig) => { const { currentId, sModelsType } = this.props; /* 当前页签数据 */ - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ let addStateControl = {}; if (commonUtils.isNotEmptyObject(controlConfig)) { addStateControl = await this.props.handleGetDataSet({ @@ -732,7 +732,7 @@ export default (ChildComponent) => { /* 获取单张表数据 */ handleGetOneMemoData = (memoName, memoConfig) => { const { currentId } = this.props; /* 当前页签数据 */ - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ this.props.handleGetDataSet({ name: memoName, configData: memoConfig, condition: { sSqlCondition: { sParentId: sId } }, diff --git a/src/components/Common/CommonComponent/index.js b/src/components/Common/CommonComponent/index.js index 356ca1b..c270fe7 100644 --- a/src/components/Common/CommonComponent/index.js +++ b/src/components/Common/CommonComponent/index.js @@ -2758,15 +2758,17 @@ export default class CommonComponent extends Component { */ floatNumberCheck = (num) => { const dNetPrice = this.props.app?.decimals?.dNetPrice; + const Maximum = commonFunc.showLocalMessage(this.props, 'Maximum', '最多输入${digit}位小数'); const { showConfig } = this.props; const { sName, showName } = showConfig; const digit = sName.includes('Price') && dNetPrice ? dNetPrice : 6; + const Maximun = Maximum.replace('${digit}', digit); if (typeof num === 'string') { num = num.replace('*', ''); } const checkRule = new RegExp(`^(-?\\d+)(\\.?)(\\d{1,${digit}})?$`); if (!checkRule.test(num) && num && num !== '-' && num !== '.') { - message.warning(`【${showName}】【${sName}】最多输入${digit}位小数!`); + message.warning(`【${showName}】【${sName}】${Maximun}`); return undefined; } else { return num; diff --git a/src/components/Common/CommonCostomTabBill.js b/src/components/Common/CommonCostomTabBill.js index 57db879..500eb53 100644 --- a/src/components/Common/CommonCostomTabBill.js +++ b/src/components/Common/CommonCostomTabBill.js @@ -2371,6 +2371,8 @@ class CommonNewBill extends Component { slave6Child1Config, slave6Child1InfoConfig, } = this.props; + const confirmSetting = commonFunc.showLocalMessage(this.props, 'confirmSetting', '请配置按钮的存储过程'); + const confirmSettingParam = commonFunc.showLocalMessage(this.props, 'confirmSettingParam', '请先操作参数运算'); const iIndex = commonUtils.isNotEmptyObject(tableSelectedRowKeys) && commonUtils.isNotEmptyArr(tableData) @@ -2388,7 +2390,7 @@ class CommonNewBill extends Component { showConfig.sControlName.includes("BtnCustom.dSplitworkQty") ) { if (masterData.bFirstCalc !== 1) { - message.error("请先操作参数运算!"); + message.error(confirmSettingParam); return; } this.props.onSaveState({ pageLoading: true }); @@ -2435,7 +2437,7 @@ class CommonNewBill extends Component { }); } } else { - message.error("请正确配置存储过程名称!"); + message.error(confirmSetting); } } else if ( commonUtils.isNotEmptyObject(showConfig) && @@ -2523,7 +2525,7 @@ class CommonNewBill extends Component { }); } } else { - message.error("请正确配置存储过程名称!"); + message.error(confirmSetting); } } }; @@ -2554,7 +2556,7 @@ class CommonNewBill extends Component { // 刷新工单交期 handleRefreshGdjq = async() => { const { currentId, slave2Child0Config, slave2Child0InfoConfig } = this.props; - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || this.props.masterData?.sId || ''; const conditonValues1 = this.props.onGetSqlConditionValues(slave2Child0Config); let returnData1 = await this.props.handleGetDataSet({ name: "slave2Child0", diff --git a/src/components/Common/CommonElementEvent.js b/src/components/Common/CommonElementEvent.js index a2cc6ca..bb48a59 100644 --- a/src/components/Common/CommonElementEvent.js +++ b/src/components/Common/CommonElementEvent.js @@ -35,7 +35,7 @@ export default (ChildComponent) => { eleknifemouldproductConfig: eleknifemouldOldproductConfig, eleteststandarditemConfig: eleteststandardOlditemConfig, } = nextProps; if (commonUtils.isEmptyObject(contactOldConfig) && (sModelsType === 'element/supplyInfo' || sModelsType === 'element/customerInfo') && formData.length > 0) { - const sId = currentId || this.props.masterData?.sId || ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData.filter(item => !item.bGrd)[0]; if (sModelsType === 'element/customerInfo') { @@ -91,7 +91,7 @@ export default (ChildComponent) => { } } if (commonUtils.isEmptyObject(supplyOldConfig) && formData.length > 0 && sModelsType === 'element/materialsInfo') { - const sId = currentId || this.props.masterData?.sId || ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData.filter(item => !item.bGrd)[0]; /* bGrd代表是否是表格 */ @@ -122,7 +122,7 @@ export default (ChildComponent) => { } /* 印件分类 */ if (commonUtils.isEmptyObject(sisproductclassifyProcessClassifyConfig) && formData.length > 0 && sModelsType === 'element/sisproductclassify') { - const sId = currentId || this.props.masterData?.sId || ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData.filter(item => !item.bGrd)[0]; /* bGrd代表是否是表格 */ @@ -147,7 +147,7 @@ export default (ChildComponent) => { }); } if (commonUtils.isEmptyObject(masterConfig) && formData.length > 0 && sModelsType === 'element/processInfo') { - const sId = currentId || this.props.masterData?.sId || ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData.filter(item => !item.bGrd)[0]; /* bGrd代表是否是表格 */ @@ -214,7 +214,7 @@ export default (ChildComponent) => { }); } if (commonUtils.isEmptyObject(picFileOldConfig) && formData.length > 0 && sModelsType === 'element/printInfo') { - const sId = currentId || this.props.masterData?.sId || ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData.filter(item => !item.bGrd)[0]; /* bGrd代表是否是表格 */ @@ -250,7 +250,7 @@ export default (ChildComponent) => { } // 常用规格信息 commonUtils.isEmptyArr(siscommonstyleproductclassifyColumn) if (commonUtils.isEmptyObject(siscommonstyleproductclassifyConfig) && formData.length > 0 && sModelsType === 'element/siscommonstyle') { - const sId = currentId || this.props.masterData?.sId || ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData.filter(item => !item.bGrd)[0]; /* bGrd代表是否是表格 */ @@ -276,7 +276,7 @@ export default (ChildComponent) => { } // 班组信息 if (commonUtils.isEmptyObject(eleemployeeOldConfig) && formData.length > 0 && sModelsType === 'element/teamInfo') { - const sId = currentId || this.props.masterData?.sId || ''; + const sId = currentId || nextProps.masterData?.sId || ''; const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'eleteam')[0]; const eleemployeeConfig = formData.filter(item => item.bGrd && item.sTbName === 'eleteamemployee')[0]; const eleemployeeColumn = commonFunc.getHeaderConfig(eleemployeeConfig); @@ -306,7 +306,7 @@ export default (ChildComponent) => { }); } if (commonUtils.isEmptyObject(jurgroupOldConfig) && formData.length > 0 && sModelsType === 'element/sftloginInfo') { - const sId = currentId || this.props.masterData?.sId || ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData.filter(item => !item.bGrd)[0]; /* bGrd代表是否是表格 */ @@ -382,7 +382,7 @@ export default (ChildComponent) => { }); } if ((bReceived === undefined || !bReceived) && formData.length > 0 && sModelsType === 'system/sisformulaInfo') { - const sId = currentId || this.props.masterData?.sId || ''; + const sId = currentId || nextProps.masterData?.sId || ''; const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'sisformula')[0]; const paramConfig = formData.filter(item => item.bGrd && item.sTbName === 'sisformulaparam')[0]; 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) => { }); } if ((bReceived === undefined || !bReceived) && formData.length > 0 && sModelsType === 'element/machineInfo') { - const sId = currentId || this.props.masterData?.sId || ''; + const sId = currentId || nextProps.masterData?.sId || ''; const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'elemachine')[0]; let addState = {}; let slaveConfig = {}; @@ -627,7 +627,7 @@ export default (ChildComponent) => { }); } if (commonUtils.isEmptyObject(userOldConfig) && formData.length > 0 && sModelsType === 'element/checkModelInfo') { - const sId = currentId || this.props.masterData?.sId || ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'elecheckmodel')[0]; /* bGrd代表是否是表格 */ @@ -662,7 +662,7 @@ export default (ChildComponent) => { }); } if (commonUtils.isEmptyObject(sischeckphaselogininfoOldConfig) && formData.length > 0 && sModelsType === 'element/checkPhaseInfo') { - const sId = currentId || this.props.masterData?.sId || ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'sischeckphase')[0]; /* bGrd代表是否是表格 */ @@ -687,7 +687,7 @@ export default (ChildComponent) => { }); } if ((bReceived === undefined || !bReceived) && formData.length > 0 && sModelsType === 'sis/paymentTerms') { - const sId = currentId || this.props.masterData?.sId || ''; + const sId = currentId || nextProps.masterData?.sId || ''; const masterConfig = formData.filter(item => !item.bGrd && item.sTbName === 'sispayment')[0]; const firstRow = masterConfig.gdsconfigformslave.filter(item => item.bVisible && item.sName === 'sName'); @@ -713,7 +713,7 @@ export default (ChildComponent) => { }); } if (commonUtils.isEmptyObject(employeeConfig) && formData.length > 0 && sModelsType === 'element/employeeInfo') { - const sId = currentId || this.props.masterData?.sId || ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData.filter(item => !item.bGrd)[0]; /* bGrd代表是否是表格 */ @@ -735,7 +735,7 @@ export default (ChildComponent) => { }); } if (formData.length > 0 && commonUtils.isEmptyObject(sysmsguserOldConfig) && sModelsType === 'smg/sendMailMsg') { - const sId = currentId || this.props.masterData?.sId || ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData.filter(item => !item.bGrd)[0]; @@ -762,7 +762,7 @@ export default (ChildComponent) => { }); } if (formData.length > 0 && commonUtils.isEmptyObject(masterConfig) && sModelsType === 'sis/monthEndingClosing') { - const sId = currentId || this.props.masterData?.sId || ''; + const sId = currentId || nextProps.masterData?.sId || ''; masterConfig = formData.filter(item => !item.bGrd)[0]; const firstRow = masterConfig.gdsconfigformslave[0]; @@ -784,7 +784,7 @@ export default (ChildComponent) => { } /* 刀模信息 */ if (commonUtils.isEmptyObject(eleknifemouldOldproductConfig) && formData.length > 0 && sModelsType === 'element/knifemouldInfo') { - const sId = currentId || this.props.masterData?.sId || ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData.filter(item => !item.bGrd)[0]; /* bGrd代表是否是表格 */ @@ -821,7 +821,7 @@ export default (ChildComponent) => { } /* 检验标准 */ if (commonUtils.isEmptyObject(eleteststandardOlditemConfig) && formData.length > 0 && sModelsType === 'element/eleteststandInfo') { - const sId = currentId || this.props.masterData?.sId || ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const masterConfig = formData.filter(item => !item.bGrd)[0]; /* bGrd代表是否是表格 */ diff --git a/src/components/Common/CommonGroupBillEvent.js b/src/components/Common/CommonGroupBillEvent.js index b82c688..dc151c7 100644 --- a/src/components/Common/CommonGroupBillEvent.js +++ b/src/components/Common/CommonGroupBillEvent.js @@ -64,7 +64,7 @@ export default (ChildComponent) => { } = nextProps; const { masterConfig: masterConfigOld, app } = nextProps; if (commonUtils.isEmptyObject(masterConfigOld) && formData.length > 0) { - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || nextProps.masterData?.sId || ''; const masterConfig = formData.filter(item => !item.bGrd)[0]; const sReasonTitle = commonUtils.isNotEmptyObject(commonFunc.showMessage(app.commonConst, 'sReason'))? @@ -360,7 +360,7 @@ export default (ChildComponent) => { /** 获取主表、从表、审核表数据 */ handleGetData = async (masterConfig, slaveConfig, slave0Config, slave1Config, slave2Config, slave3Config, slave4Config, bEditClick, slave5Config, slave6Config, slave7Config, slave8Config, slave9Config, slave10Config) => { const { currentId, app } = this.props; /* 当前页签数据 */ - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || this.props.masterData?.sId || ''; const { sModelsId, masterData, sModelsType, slaveSelectedRowKeys } = this.props; await this.props.handleGetDataOne({ name: 'master', configData: masterConfig, condition: { sId, pageSize: '', pageNum: '' }, bEditClick }); let addStateSlave = {}; @@ -530,7 +530,7 @@ export default (ChildComponent) => { /* 获取表数据 */ handleGetMemoData = async (slaveConfig, slave0Config, slave1Config, slave2Config, slave3Config, slave4Config) => { const { currentId } = this.props; /* 当前页签数据 */ - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ const addStateSlave = slaveConfig ? await this.props.handleGetDataSet({ name: 'slave', configData: slaveConfig, condition: { sSqlCondition: { sParentId: sId } }, isWait: true, }) : ''; @@ -564,7 +564,7 @@ export default (ChildComponent) => { /* 获取单张表数据 */ handleGetOneMemoData = (memoName, memoConfig) => { const { currentId } = this.props; /* 当前页签数据 */ - const sId = currentId !== undefined ? currentId : ''; /* 数据Id */ + const sId = currentId || this.props.masterData?.sId || ''; /* 数据Id */ if (commonUtils.isNotEmptyObject(sId)) { /* 解决detail数据没有问题 */ this.props.handleGetDataSet({ name: memoName, configData: memoConfig, condition: { sSqlCondition: { sParentId: sId } }, diff --git a/src/components/Common/CommonJurisdictionEvent.js b/src/components/Common/CommonJurisdictionEvent.js index bdfdea8..3cce5a9 100644 --- a/src/components/Common/CommonJurisdictionEvent.js +++ b/src/components/Common/CommonJurisdictionEvent.js @@ -22,7 +22,7 @@ export default (ChildComponent) => { formData, currentId, groupConfig, treeData, } = nextProps; let { bReceived } = nextProps; - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || nextProps.masterData?.sId || ''; if (commonUtils.isEmptyObject(groupConfig) && bReceived === undefined) { const masterConfig = formData.filter(item => !item.bGrd)[0]; @@ -199,7 +199,7 @@ export default (ChildComponent) => { handleGetSlaveData = (getType, sName, currConfig) => { const { currentId } = this.props; /* 当前页签数据 */ - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || this.props.masterData?.sId || ''; if (getType === 'One') { this.props.handleGetDataOne({ name: 'master', configData: currConfig, condition: { sId, pageSize: '', pageNum: '' }, diff --git a/src/components/Common/CommonJurisdictionNewEvent.js b/src/components/Common/CommonJurisdictionNewEvent.js index 4ca92ed..d8ca7fe 100644 --- a/src/components/Common/CommonJurisdictionNewEvent.js +++ b/src/components/Common/CommonJurisdictionNewEvent.js @@ -23,7 +23,7 @@ export default (ChildComponent) => { formData, currentId, groupConfig, treeData, formRoute, } = nextProps; let { bReceived } = nextProps; - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || nextProps.masterData?.sId || ''; if (commonUtils.isEmptyObject(groupConfig) && bReceived === undefined) { const masterConfig = formData.filter(item => !item.bGrd)[0]; @@ -228,7 +228,7 @@ export default (ChildComponent) => { handleGetSlaveData = (getType, sName, currConfig) => { const { currentId } = this.props; /* 当前页签数据 */ - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || this.props.masterData?.sId || ''; if (getType === 'One') { this.props.handleGetDataOne({ name: 'master', configData: currConfig, condition: { sId, pageSize: '', pageNum: '' }, diff --git a/src/components/Common/CommonListEditEvent.js b/src/components/Common/CommonListEditEvent.js index d7dac24..cbee204 100644 --- a/src/components/Common/CommonListEditEvent.js +++ b/src/components/Common/CommonListEditEvent.js @@ -65,7 +65,7 @@ export default (ChildComponent) => { } } if (commonUtils.isEmptyObject(slaveConfigOld) && formData.length > 0 && (formRoute.indexOf('/indexOee') > -1 || searchSolution !== undefined)) { - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const slaveConfig = formData[0]; let addState = {}; diff --git a/src/components/Common/CommonListEvent.js b/src/components/Common/CommonListEvent.js index 72d485c..a361722 100644 --- a/src/components/Common/CommonListEvent.js +++ b/src/components/Common/CommonListEvent.js @@ -65,7 +65,7 @@ export default (ChildComponent) => { } } if (commonUtils.isEmptyObject(slaveConfigOld) && formData.length > 0 && (formRoute.indexOf('/indexOee') > -1 || searchSolution !== undefined)) { - const sId = currentId !== undefined ? currentId : ''; + const sId = currentId || nextProps.masterData?.sId || ''; /* 数据Id */ const slaveConfig = formData[0]; let addState = {}; diff --git a/src/components/Common/CommonListSelectFlex/index.js b/src/components/Common/CommonListSelectFlex/index.js index 1d544ab..3c37748 100644 --- a/src/components/Common/CommonListSelectFlex/index.js +++ b/src/components/Common/CommonListSelectFlex/index.js @@ -501,8 +501,8 @@ const CommonListComponent = Form.create({ const sProcessParams = commonFunc.showMessage(app.commonConst, 'sProcessParams');/* 选择工艺参数标题 */ const displayLeft = (sModelsType !== 'search/sisColor' && sModelsType !== 'search/commonPopup'); - const BtnSure = commonFunc.showLocalMessage(this.props, 'BtnSure', '确定'); - const BtnCancel = commonFunc.showLocalMessage(this.props, 'BtnCancel', '取消'); + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确定'); + const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); return (