diff --git a/src/mes/common/commonModelComponent/index.js b/src/mes/common/commonModelComponent/index.js index f7168e3..96bd93d 100644 --- a/src/mes/common/commonModelComponent/index.js +++ b/src/mes/common/commonModelComponent/index.js @@ -575,12 +575,12 @@ const useCommonModelEvent = props => { conditonValues.sSReserve1 = props.sSReserve1; } - if (currentId) { - if (tableName === 'master') { - conditonValues.sId = currentId; - } else { - conditonValues.sParentId = currentId; - } + const masterState = {}; + if (currentId && tableName === 'master') { + masterState.sId = currentId; + } + if (currentId && tableName !== 'master') { + conditonValues.sParentId = currentId; } const result = @@ -588,6 +588,7 @@ const useCommonModelEvent = props => { name: tableName, configData: config, condition: { + ...masterState, sSqlCondition: { ...conditonValues, ...sFilterConditions }, bFilter },