Commit 8cbe4929a302ec127ab9c37ec66aa74eb3341341

Authored by chenxt
1 parent 1237bc85

生产领料详情弹窗

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