From 1557053ce0b092030d6519cfe5b86b4258050619 Mon Sep 17 00:00:00 2001 From: pengm <674192343@qq.com> Date: Mon, 20 Oct 2025 17:25:00 +0800 Subject: [PATCH] 1.单价增加导入第三张表功能 --- src/components/Common/CommonNewBill.js | 13 ++++++++++--- src/components/Common/CommonSubBill.js | 10 +++++++--- src/components/Common/PersonCenter/PersonCenter.js | 2 +- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/components/Common/CommonNewBill.js b/src/components/Common/CommonNewBill.js index 802389a..601515f 100644 --- a/src/components/Common/CommonNewBill.js +++ b/src/components/Common/CommonNewBill.js @@ -1123,7 +1123,14 @@ class CommonNewBill extends Component { handleUploadChangeFile = async info => { const { file } = info; - const { masterData, sModelsId, app, token, sModelsType, slaveConfig, slaveData } = this.props; + const { formData = [] } = this.props; + + const templateData = formData.filter(item => item.sGrd === 'importTemplate'); + const name = commonUtils.isNotEmptyArr(templateData) ? templateData[0].sTableAlias : 'slave' + const { + masterData, sModelsId, app, token, sModelsType, + [`${name}Config`]: slaveConfig, [`${name}Data`]: slaveData + } = this.props; if (file.response) { if (file.response.code === 1) { if (file.response.dataset.rows.length > 1) { @@ -3422,11 +3429,11 @@ const CommonEffectEvent = props => { handleType: masterData.handleType || 'update', } }); - + }, [watchFields, masterData]); return null; -} +} // 工艺参数弹窗 const ModalComponent = props => { diff --git a/src/components/Common/CommonSubBill.js b/src/components/Common/CommonSubBill.js index 5e200e2..9996082 100644 --- a/src/components/Common/CommonSubBill.js +++ b/src/components/Common/CommonSubBill.js @@ -140,7 +140,7 @@ class CommonSubBill extends Component { handleUploadChangeFile = async (info) => { const { file } = info; const { - masterData, sModelsId, app, token, sModelsType, masterConfig, + masterData, sModelsId, app, token, sModelsType, masterConfig, formData, } = this.props; if (file.response) { if (file.response.code === 1) { @@ -151,9 +151,12 @@ class CommonSubBill extends Component { message.error(errorInfo[0].sReason); return; } + const templateData = formData.filter(item => item.sGrd === 'importTemplate'); - const name = masterConfig.gdsconfigformslave.find(item => item.sControlName.includes('ImportData') && item.bVisible)?.sControlName; - const temp = name?.split('_')[1] || 'slave'; + const temp = commonUtils.isNotEmptyArr(templateData) ? templateData[0].sTableAlias : 'slave' + + // const name = masterConfig.gdsconfigformslave.find(item => item.sControlName.includes('ImportData') && item.bVisible)?.sControlName; + // const temp = name?.split('_')[1] || 'slave'; /** * 按照slave处理 */ @@ -229,6 +232,7 @@ class CommonSubBill extends Component { } } }; + handleUploadPropsSales = () => { const { masterData, sModelsType } = this.props; if (commonUtils.isNotEmptyObject(masterData)) { diff --git a/src/components/Common/PersonCenter/PersonCenter.js b/src/components/Common/PersonCenter/PersonCenter.js index 86e0a46..7f01ce4 100644 --- a/src/components/Common/PersonCenter/PersonCenter.js +++ b/src/components/Common/PersonCenter/PersonCenter.js @@ -70,7 +70,7 @@ class PersonCenter extends Component { if (this.changePwd) { const changePwd = commonFunc.showLocalMessage(this.props, 'changePwd', '系统判断密码为初始密码,2请修改密码后再操作!'); - message.warn(changePwd, 10); + message.warning(changePwd, 10); } // 检查是否有公告数据需要显示 this.checkNoticeData(); -- libgit2 0.22.2