Commit 5333bf8537dca5f9105258862b98bf31e3c9d121
1 parent
1584952f
保存后刷新数据
Showing
7 changed files
with
24 additions
and
10 deletions
src/components/Common/CommonHooks/useCommonBase.js
| ... | ... | @@ -245,7 +245,7 @@ const useCommonBase = props => { |
| 245 | 245 | } else { |
| 246 | 246 | getServiceError(configReturn); |
| 247 | 247 | } |
| 248 | - const configReturnModelData = configReturnModel.dataset.rows[0] | |
| 248 | + const configReturnModelData = configReturnModel?.dataset?.rows?.[0] | |
| 249 | 249 | if (configReturnModelData) { |
| 250 | 250 | formData.forEach(item => { |
| 251 | 251 | item.sModelType = configReturnModelData?.sModelType | ... | ... |
src/components/Common/CommonInstructSet.js
| ... | ... | @@ -2395,9 +2395,10 @@ const utils = { |
| 2395 | 2395 | } |
| 2396 | 2396 | if (returnData.code === 1) { |
| 2397 | 2397 | props.onSaveState({ |
| 2398 | - enabled: false, | |
| 2398 | + enabled: true, | |
| 2399 | 2399 | currentId: masterData.sId, |
| 2400 | - loading: false | |
| 2400 | + loading: false, | |
| 2401 | + isRefresh: true | |
| 2401 | 2402 | }); |
| 2402 | 2403 | } |
| 2403 | 2404 | props.onSendSocketMessage( | ... | ... |
src/components/Common/commonBusiness.js
| ... | ... | @@ -906,7 +906,6 @@ export function getKeyUpEvent(name, sFieldName, tableConfig, masterData, tableDa |
| 906 | 906 | newCopyTo.master = masterData; |
| 907 | 907 | // eslint-disable-next-line prefer-destructuring |
| 908 | 908 | const sAssignField = tableConfig.gdsconfigformslave[iConfigIndex].sOnChangeAssignField; |
| 909 | - console.log('sAssignField:', sAssignField); | |
| 910 | 909 | /* keyUp联动其他表 */ |
| 911 | 910 | if (commonUtils.isNotEmptyObject(sAssignField) && sAssignField.includes('_')) { |
| 912 | 911 | const addState = {}; | ... | ... |
src/mes/common/commonModelComponent/index.js
| ... | ... | @@ -32,6 +32,7 @@ const useCommonModelEvent = props => { |
| 32 | 32 | sFilterConditions, // 父页面过滤条件 |
| 33 | 33 | noGetData, // 不要加载数据,根据另一张表选中行加载时用 |
| 34 | 34 | currentId, |
| 35 | + isRefresh | |
| 35 | 36 | } = props; |
| 36 | 37 | let formData = |
| 37 | 38 | props.parentProps?.btnConfig?.sActiveId === "12710101117087374661080" |
| ... | ... | @@ -327,7 +328,8 @@ const useCommonModelEvent = props => { |
| 327 | 328 | // 如果有自定义列,合并自定义列 |
| 328 | 329 | addState = { |
| 329 | 330 | ...addState, |
| 330 | - ...handleMergeCustomColumn(addState, tableList) | |
| 331 | + ...handleMergeCustomColumn(addState, tableList), | |
| 332 | + isRefresh: false | |
| 331 | 333 | }; |
| 332 | 334 | |
| 333 | 335 | props.onSaveState(addState); |
| ... | ... | @@ -336,7 +338,7 @@ const useCommonModelEvent = props => { |
| 336 | 338 | }, |
| 337 | 339 | [ |
| 338 | 340 | formData.length, |
| 339 | - ['production/productionReport', 'commonBill'].includes(sModelType) ? enabled : refreshCount, | |
| 341 | + ['production/productionReport', 'commonBill'].includes(sModelType) ? isRefresh : refreshCount, | |
| 340 | 342 | noGetData, |
| 341 | 343 | JSON.stringify(sFilterConditions) |
| 342 | 344 | ] |
| ... | ... | @@ -1160,6 +1162,7 @@ const useCommonModelEvent = props => { |
| 1160 | 1162 | props.onSaveState({ |
| 1161 | 1163 | loading: false, |
| 1162 | 1164 | }); |
| 1165 | + handleRefresh() | |
| 1163 | 1166 | if (flag === 1) { |
| 1164 | 1167 | /* 审核 */ |
| 1165 | 1168 | if (clearFlag && (sModelsType.includes('sales/salesOrder') || sModelsType.includes('manufacture/workOrder'))) { | ... | ... |
src/mes/common/commonOperationBarComponent/MesToolbar.js
src/mes/common/commonOperationBarComponent/index.js
| ... | ... | @@ -624,7 +624,7 @@ const useCommonOperationBarComponentEvent = props => { |
| 624 | 624 | const delayedOvertime = commonFunc.showLocalMessage(props, 'delayedOvertime', '延迟加班'); |
| 625 | 625 | const cancelDelayedOvertime = commonFunc.showLocalMessage(props, 'cancelDelayedOvertime', '取消延迟加班'); |
| 626 | 626 | const { masterData = {} } = props |
| 627 | - let { bCheck , bSubmit} = masterData | |
| 627 | + let { bCheck, bSubmit } = masterData | |
| 628 | 628 | // 根据sDefault配置控制按钮是否可以操作 |
| 629 | 629 | if (sDefault && sDefault.includes("${")) { |
| 630 | 630 | // 当前页面全部数据 |
| ... | ... | @@ -739,9 +739,11 @@ const useCommonOperationBarComponentEvent = props => { |
| 739 | 739 | } else if (props.bMesBill) { |
| 740 | 740 | const btnName = sControlName.replace('BtnLeft.', '').replace('BtnRight.', '').toLowerCase(); |
| 741 | 741 | if (props.enabled) { |
| 742 | - if (["btnupd", 'btnevent', 'btnsubmit', 'btnsubmitcancel'].includes(btnName)) { | |
| 742 | + if (["btnupd", 'btnevent', 'btnsubmit', 'btnsubmitcancel', 'btnexamine', 'btncancelexamine'].includes(btnName)) { | |
| 743 | 743 | defaultProps.disabled = true; |
| 744 | 744 | } |
| 745 | + console.log(btnName, 'btnName'); | |
| 746 | + | |
| 745 | 747 | } else { |
| 746 | 748 | if (["btnsave", "btnscanface"].includes(btnName)) { |
| 747 | 749 | defaultProps.disabled = true; |
| ... | ... | @@ -755,6 +757,15 @@ const useCommonOperationBarComponentEvent = props => { |
| 755 | 757 | defaultProps.disabled = true; |
| 756 | 758 | } |
| 757 | 759 | } |
| 760 | + if (!bCheck) { | |
| 761 | + if (["btncancelexamine"].includes(btnName)) { | |
| 762 | + defaultProps.disabled = true; | |
| 763 | + } | |
| 764 | + } else { | |
| 765 | + if (["btnexamine"].includes(btnName)) { | |
| 766 | + defaultProps.disabled = true; | |
| 767 | + } | |
| 768 | + } | |
| 758 | 769 | } |
| 759 | 770 | } |
| 760 | 771 | ... | ... |
src/utils/config.js
| ... | ... | @@ -6,7 +6,7 @@ export const webSite = { |
| 6 | 6 | // faceAddress: isDev ? '//192.168.11.22:8080/xlyFace' : '//' + location.host + '/xlyFace', |
| 7 | 7 | fileAddress: isDev ? '//km5cjx.gnway.cc:43920/xlyReport/' : '//' + location.host + '/xlyReport/', // 接口地址 |
| 8 | 8 | faceAddress: isDev ? '//km5cjx.gnway.cc:43920/xlyFace' : '//' + location.host + '/xlyFace', |
| 9 | - ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//km5cjx.gnway.cc:43920/xlyEntry/' : '//' + location.host + '/xlyEntry/', | |
| 9 | + ipAddress: localStorage.ipAddress ? localStorage.ipAddress : isDev ? '//km5cjx.gnway.cc:47400/xlyEntry/' : '//' + location.host + '/xlyEntry/', | |
| 10 | 10 | interfaceAddress: isDev ? '//km5cjx.gnway.cc:43920/xlyApi/' : '//' + location.host + '/xlyApi/', // 接口地址 |
| 11 | 11 | // ipAddress: isDev ? '//ebc.jinjia.com:8091/xlyEntry/' : '//' + location.host + '/xlyEntry/', |
| 12 | 12 | // interfaceAddress: isDev ? '//ebc.jinjia.com:8091/xlyApi/' : '//' + location.host + '/xlyApi/', // 接口地址 | ... | ... |