From 26758e406a80f04a7dab115a0a1d76122b038f55 Mon Sep 17 00:00:00 2001 From: zhang_li Date: Wed, 16 Apr 2025 13:47:22 +0800 Subject: [PATCH] =?UTF-8?q?YT-2415=E4=B8=8D=E8=89=AF=E5=93=81=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E9=9A=94=E7=A6=BB=E8=BD=AC=E5=90=88=E6=A0=BC=E4=BB=8E?= =?UTF-8?q?=E4=BB=93=E5=BA=93=E6=94=B9=E6=88=90=E4=BB=8E=E5=BA=93=E4=BD=8D?= =?UTF-8?q?=EF=BC=8C=E6=98=8E=E7=BB=86=E6=A0=B9=E6=8D=AE=E5=BA=93=E4=BD=8D?= =?UTF-8?q?=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inventorymoveRequestMain.data.ts | 2 +- .../index.vue | 35 +++++------- .../inventorymoveRequestMain.data.ts | 55 ++++++++----------- 3 files changed, 38 insertions(+), 54 deletions(-) diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts index a72180e9a..60b77a22d 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts @@ -172,7 +172,7 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ componentProps: { enterSearch: true, isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择到库位代码', + searchListPlaceholder: '请选择从库位代码', searchField: 'code', searchTitle: '库位信息', searchAllSchemas: Location.allSchemas, diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOkTOHOLD/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOkTOHOLD/index.vue index e52174f0b..8bb146ff5 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOkTOHOLD/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOkTOHOLD/index.vue @@ -59,6 +59,7 @@ @tableSelectionDelete="tableSelectionDelete" @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" + @clearSearchInput="clearSearchInput" /> @@ -256,9 +257,9 @@ InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => { if (fromInventoryStatus.value) { item.tableForm.searchCondition = [ { - key:'fromWarehouseCode', - value:'fromWarehouseCode', - message: '请选择从仓库代码!', + key:'fromLocationCode', + value:'fromLocationCode', + message: '请选择从库位代码!', isMainValue: true }, { @@ -276,9 +277,9 @@ InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => { } else if (fromInventoryStatus.value == null) { item.tableForm.searchCondition = [ { - key:'fromWarehouseCode', - value:'fromWarehouseCode', - message: '请选择从仓库代码!', + key:'fromLocationCode', + value:'fromLocationCode', + message: '请选择从库位代码!', isMainValue: true }, { @@ -421,21 +422,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } } else { const setV = {} - if (formField == 'fromWarehouseCode') { - if(InventorymoveRequestDetail?.allSchemas?.tableFormColumns?.find(item => (item.field == 'itemCode'))?.tableForm?.searchCondition?.find(item => (item.key == 'warehouseCode')) == undefined){ - InventorymoveRequestDetail?.allSchemas?.tableFormColumns?.find(item => (item.field == 'itemCode'))?.tableForm?.searchCondition?.push({ - key: 'warehouseCode', - value: val[0]["code"], - isMainValue: false - }) - } else { - InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'itemCode')).tableForm.searchCondition.find(item => { - if (item.key == 'warehouseCode') { - item.value = val[0]["code"] - } - }) - } - + if (formField == 'fromLocationCode') { tableData.value = [] } setV[formField] = val[0][searchField] @@ -814,7 +801,11 @@ const submitForm = async (formType, submitData) => { formRef.value.formLoading = false } } - +const clearSearchInput=(field) => { + if (field=='fromLocationCode') { + tableData.value = [] + } +} /** 导入 */ const importFormRef = ref() const handleImport = () => { diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOkTOHOLD/inventorymoveRequestMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOkTOHOLD/inventorymoveRequestMain.data.ts index 43a448a29..b73ae51d2 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOkTOHOLD/inventorymoveRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOkTOHOLD/inventorymoveRequestMain.data.ts @@ -66,39 +66,32 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ } }, { - label: '从仓库代码', - field: 'fromWarehouseCode', + label: '从库位代码', + field: 'fromLocationCode', sort: 'custom', table: { width: 150 }, - tableForm: { - enterSearch: true, - isInpuFocusShow: true, // 开启查询弹窗 - searchListPlaceholder: '请选择从仓库代码', - searchField: 'code', - searchTitle: '仓库基础信息', - searchAllSchemas: Warehouse.allSchemas, - searchPage: WarehouseApi.pageBusinessTypeToWarehouse, - verificationParams: [{ - key: 'code', - action: '==', - value: '', - isMainValue: false, - isSearch: true, - isFormModel: true, - }], // 失去焦点校验参数 - }, - form: { + form: { // labelMessage: '信息提示说明!!!', componentProps: { enterSearch: true, - isSearchList: true, - searchListPlaceholder: '请选择从仓库代码', + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择从库位代码', searchField: 'code', - searchTitle: '仓库基础信息', - searchAllSchemas: Warehouse.allSchemas, - searchPage: WarehouseApi.pageBusinessTypeToWarehouse, + searchTitle: '库位信息', + searchAllSchemas: Location.allSchemas, + searchPage: LocationApi.selectBusinessTypeToLocation, + searchCondition: [ + { + key: 'businessType', + value: 'OkToHold', + isMainValue: false + },{ + key: 'isIn', + value: 'in', + isMainValue: false + }], verificationParams: [{ key: 'code', action: '==', @@ -569,9 +562,9 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( searchAllSchemas: BalancePopWindow.allSchemas, searchPage: BalanceApi.selectLocationTypeToBalance, searchCondition: [{ - key:'fromWarehouseCode', - value:'fromWarehouseCode', - message: '请选择从仓库代码!', + key:'fromLocationCode', + value:'fromLocationCode', + message: '请选择从库位代码!', isMainValue: true },{ key: 'available', @@ -589,9 +582,9 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( searchAllSchemas: BalancePopWindow.allSchemas, searchPage: BalanceApi.selectLocationTypeToBalance, searchCondition: [{ - key:'fromWarehouseCode', - value:'fromWarehouseCode', - message: '请选择从仓库代码!', + key:'fromLocationCode', + value:'fromLocationCode', + message: '请选择从库位代码!', isMainValue: true },{ key: 'available',