From 8cbe4929a302ec127ab9c37ec66aa74eb3341341 Mon Sep 17 00:00:00 2001 From: chenxt <10125295+chen-xintao97@user.noreply.gitee.com> Date: Fri, 12 Jun 2026 16:02:12 +0800 Subject: [PATCH] 生产领料详情弹窗 --- src/components/Common/CommonHooks/useCommonBase.js | 8 ++++---- src/mes/common/commonModelComponent/index.js | 16 ++++++++++------ src/mes/common/commonOperationBarComponent/index.js | 3 ++- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/components/Common/CommonHooks/useCommonBase.js b/src/components/Common/CommonHooks/useCommonBase.js index 459ee27..816262d 100644 --- a/src/components/Common/CommonHooks/useCommonBase.js +++ b/src/components/Common/CommonHooks/useCommonBase.js @@ -287,6 +287,7 @@ const useCommonBase = props => { clearSelectData, isPagination, // mes的通用列表需要真分页,所以增加isPagination参数控制是否分页 } = params; + const { token, sModelsId, @@ -385,11 +386,10 @@ const useCommonBase = props => { delete condition.sSqlCondition } if (name.includes('slave') && pageRoute.includes('indexPage/commonBill')) { - delete condition.sSqlCondition delete condition.sId - condition.sSqlCondition = { - sParentId: sId - } + // condition.sSqlCondition = { + // sParentId: sId + // } } // 只有弹窗没有不查询 if (name === 'master' && sId === '' && props.parentProps && pageRoute.includes('indexPage/commonBill')) return diff --git a/src/mes/common/commonModelComponent/index.js b/src/mes/common/commonModelComponent/index.js index 1afe368..b113c48 100644 --- a/src/mes/common/commonModelComponent/index.js +++ b/src/mes/common/commonModelComponent/index.js @@ -681,7 +681,7 @@ const useCommonModelEvent = props => { configData: config, condition: { sSqlCondition: { ...conditonValues, ...sFilterConditions }, - bFilter + bFilter, }, isWait: true }) || Promise.resolve({}); @@ -786,7 +786,9 @@ const useCommonModelEvent = props => { // 获取数据集 const handleGetData = async (tableList = [], isWait, bInit, copyTo) => { let addState = {}; - const currentIds = currentId ? currentId : props?.parentProps?.record?.sId + + const currentIds = currentId || props?.parentProps?.record?.sId; + for (let i = 0; i < tableList.length; i++) { const tableName = tableList[i]; const config = formData.find(item => item.sGrd === tableName); @@ -900,8 +902,9 @@ const useCommonModelEvent = props => { } const masterState = {}; + if (currentIds && tableName === 'master') { - masterState.sId = currentId; + masterState.sId = currentIds; } if (currentIds && tableName !== 'master') { conditonValues.sParentId = currentIds; @@ -913,14 +916,14 @@ const useCommonModelEvent = props => { isPagination = true } + const sSqlCondition = { ...sFilterConditions, ...conditonValues, } const result = (await props.onGetDataSet({ name: tableName, configData: config, condition: { ...masterState, - // sId: currentIds, - sSqlCondition: { ...conditonValues, ...sFilterConditions, }, + sSqlCondition, bFilter, pageNum: isPagination ? props?.mesPageNum || 1 : undefined, pageSize: isPagination ? props?.mesPageSize || 10 : undefined, @@ -983,7 +986,8 @@ const useCommonModelEvent = props => { } } - if (!commonUtils.isEmptyObject(copyTo)) { + + if (!commonUtils.isEmptyObject(copyTo) && copyTo?.isTmpinfobysql) { tableList.forEach((item, index) => { addState = { ...addState, diff --git a/src/mes/common/commonOperationBarComponent/index.js b/src/mes/common/commonOperationBarComponent/index.js index 6728214..d406319 100644 --- a/src/mes/common/commonOperationBarComponent/index.js +++ b/src/mes/common/commonOperationBarComponent/index.js @@ -627,7 +627,8 @@ const useCommonOperationBarComponentEvent = props => { const configName = copyToConfig[0].sControlName.split(".").pop(); copyTo = { ...copyTo, - ...allReturnMap + ...allReturnMap, + isTmpinfobysql: true } if (configName && allReturnMap[configName]) { copyTo.masterData = allReturnMap[configName] -- libgit2 0.22.2