Commit 8cbe4929a302ec127ab9c37ec66aa74eb3341341
1 parent
1237bc85
生产领料详情弹窗
Showing
3 changed files
with
16 additions
and
11 deletions
src/components/Common/CommonHooks/useCommonBase.js
| @@ -287,6 +287,7 @@ const useCommonBase = props => { | @@ -287,6 +287,7 @@ const useCommonBase = props => { | ||
| 287 | clearSelectData, | 287 | clearSelectData, |
| 288 | isPagination, // mes的通用列表需要真分页,所以增加isPagination参数控制是否分页 | 288 | isPagination, // mes的通用列表需要真分页,所以增加isPagination参数控制是否分页 |
| 289 | } = params; | 289 | } = params; |
| 290 | + | ||
| 290 | const { | 291 | const { |
| 291 | token, | 292 | token, |
| 292 | sModelsId, | 293 | sModelsId, |
| @@ -385,11 +386,10 @@ const useCommonBase = props => { | @@ -385,11 +386,10 @@ const useCommonBase = props => { | ||
| 385 | delete condition.sSqlCondition | 386 | delete condition.sSqlCondition |
| 386 | } | 387 | } |
| 387 | if (name.includes('slave') && pageRoute.includes('indexPage/commonBill')) { | 388 | if (name.includes('slave') && pageRoute.includes('indexPage/commonBill')) { |
| 388 | - delete condition.sSqlCondition | ||
| 389 | delete condition.sId | 389 | delete condition.sId |
| 390 | - condition.sSqlCondition = { | ||
| 391 | - sParentId: sId | ||
| 392 | - } | 390 | + // condition.sSqlCondition = { |
| 391 | + // sParentId: sId | ||
| 392 | + // } | ||
| 393 | } | 393 | } |
| 394 | // 只有弹窗没有不查询 | 394 | // 只有弹窗没有不查询 |
| 395 | if (name === 'master' && sId === '' && props.parentProps && pageRoute.includes('indexPage/commonBill')) return | 395 | if (name === 'master' && sId === '' && props.parentProps && pageRoute.includes('indexPage/commonBill')) return |
src/mes/common/commonModelComponent/index.js
| @@ -681,7 +681,7 @@ const useCommonModelEvent = props => { | @@ -681,7 +681,7 @@ const useCommonModelEvent = props => { | ||
| 681 | configData: config, | 681 | configData: config, |
| 682 | condition: { | 682 | condition: { |
| 683 | sSqlCondition: { ...conditonValues, ...sFilterConditions }, | 683 | sSqlCondition: { ...conditonValues, ...sFilterConditions }, |
| 684 | - bFilter | 684 | + bFilter, |
| 685 | }, | 685 | }, |
| 686 | isWait: true | 686 | isWait: true |
| 687 | }) || Promise.resolve({}); | 687 | }) || Promise.resolve({}); |
| @@ -786,7 +786,9 @@ const useCommonModelEvent = props => { | @@ -786,7 +786,9 @@ const useCommonModelEvent = props => { | ||
| 786 | // 获取数据集 | 786 | // 获取数据集 |
| 787 | const handleGetData = async (tableList = [], isWait, bInit, copyTo) => { | 787 | const handleGetData = async (tableList = [], isWait, bInit, copyTo) => { |
| 788 | let addState = {}; | 788 | let addState = {}; |
| 789 | - const currentIds = currentId ? currentId : props?.parentProps?.record?.sId | 789 | + |
| 790 | + const currentIds = currentId || props?.parentProps?.record?.sId; | ||
| 791 | + | ||
| 790 | for (let i = 0; i < tableList.length; i++) { | 792 | for (let i = 0; i < tableList.length; i++) { |
| 791 | const tableName = tableList[i]; | 793 | const tableName = tableList[i]; |
| 792 | const config = formData.find(item => item.sGrd === tableName); | 794 | const config = formData.find(item => item.sGrd === tableName); |
| @@ -900,8 +902,9 @@ const useCommonModelEvent = props => { | @@ -900,8 +902,9 @@ const useCommonModelEvent = props => { | ||
| 900 | } | 902 | } |
| 901 | 903 | ||
| 902 | const masterState = {}; | 904 | const masterState = {}; |
| 905 | + | ||
| 903 | if (currentIds && tableName === 'master') { | 906 | if (currentIds && tableName === 'master') { |
| 904 | - masterState.sId = currentId; | 907 | + masterState.sId = currentIds; |
| 905 | } | 908 | } |
| 906 | if (currentIds && tableName !== 'master') { | 909 | if (currentIds && tableName !== 'master') { |
| 907 | conditonValues.sParentId = currentIds; | 910 | conditonValues.sParentId = currentIds; |
| @@ -913,14 +916,14 @@ const useCommonModelEvent = props => { | @@ -913,14 +916,14 @@ const useCommonModelEvent = props => { | ||
| 913 | isPagination = true | 916 | isPagination = true |
| 914 | 917 | ||
| 915 | } | 918 | } |
| 919 | + const sSqlCondition = { ...sFilterConditions, ...conditonValues, } | ||
| 916 | const result = | 920 | const result = |
| 917 | (await props.onGetDataSet({ | 921 | (await props.onGetDataSet({ |
| 918 | name: tableName, | 922 | name: tableName, |
| 919 | configData: config, | 923 | configData: config, |
| 920 | condition: { | 924 | condition: { |
| 921 | ...masterState, | 925 | ...masterState, |
| 922 | - // sId: currentIds, | ||
| 923 | - sSqlCondition: { ...conditonValues, ...sFilterConditions, }, | 926 | + sSqlCondition, |
| 924 | bFilter, | 927 | bFilter, |
| 925 | pageNum: isPagination ? props?.mesPageNum || 1 : undefined, | 928 | pageNum: isPagination ? props?.mesPageNum || 1 : undefined, |
| 926 | pageSize: isPagination ? props?.mesPageSize || 10 : undefined, | 929 | pageSize: isPagination ? props?.mesPageSize || 10 : undefined, |
| @@ -983,7 +986,8 @@ const useCommonModelEvent = props => { | @@ -983,7 +986,8 @@ const useCommonModelEvent = props => { | ||
| 983 | } | 986 | } |
| 984 | 987 | ||
| 985 | } | 988 | } |
| 986 | - if (!commonUtils.isEmptyObject(copyTo)) { | 989 | + |
| 990 | + if (!commonUtils.isEmptyObject(copyTo) && copyTo?.isTmpinfobysql) { | ||
| 987 | tableList.forEach((item, index) => { | 991 | tableList.forEach((item, index) => { |
| 988 | addState = { | 992 | addState = { |
| 989 | ...addState, | 993 | ...addState, |
src/mes/common/commonOperationBarComponent/index.js
| @@ -627,7 +627,8 @@ const useCommonOperationBarComponentEvent = props => { | @@ -627,7 +627,8 @@ const useCommonOperationBarComponentEvent = props => { | ||
| 627 | const configName = copyToConfig[0].sControlName.split(".").pop(); | 627 | const configName = copyToConfig[0].sControlName.split(".").pop(); |
| 628 | copyTo = { | 628 | copyTo = { |
| 629 | ...copyTo, | 629 | ...copyTo, |
| 630 | - ...allReturnMap | 630 | + ...allReturnMap, |
| 631 | + isTmpinfobysql: true | ||
| 631 | } | 632 | } |
| 632 | if (configName && allReturnMap[configName]) { | 633 | if (configName && allReturnMap[configName]) { |
| 633 | copyTo.masterData = allReturnMap[configName] | 634 | copyTo.masterData = allReturnMap[configName] |