diff --git a/src/components/Common/CommonHooks/useCommonBase.js b/src/components/Common/CommonHooks/useCommonBase.js index d5a0698..4fb0b6e 100644 --- a/src/components/Common/CommonHooks/useCommonBase.js +++ b/src/components/Common/CommonHooks/useCommonBase.js @@ -388,7 +388,7 @@ const useCommonBase = props => { delete condition.sSqlCondition delete condition.sId condition.sSqlCondition = { - sParentId: sId + sParentId: condition?.sSqlCondition?.sParentId } } // 只有弹窗没有不查询 diff --git a/src/mes/common/commonModelComponent/index.js b/src/mes/common/commonModelComponent/index.js index 0fe6dd8..1a92365 100644 --- a/src/mes/common/commonModelComponent/index.js +++ b/src/mes/common/commonModelComponent/index.js @@ -787,6 +787,7 @@ const useCommonModelEvent = props => { // 获取数据集 const handleGetData = async (tableList = [], isWait, bInit) => { let addState = {}; + const { currentId } = props const currentIds = currentId ? currentId : props?.parentProps?.record?.sId for (let i = 0; i < tableList.length; i++) { const tableName = tableList[i]; @@ -902,7 +903,7 @@ const useCommonModelEvent = props => { const masterState = {}; if (currentIds && tableName === 'master') { - masterState.sId = currentId; + masterState.sId = currentIds; } if (currentIds && tableName !== 'master') { conditonValues.sParentId = currentIds;