diff --git a/src/api/wms/balance/index.ts b/src/api/wms/balance/index.ts index adf8ab856..f7031e48a 100644 --- a/src/api/wms/balance/index.ts +++ b/src/api/wms/balance/index.ts @@ -82,3 +82,8 @@ export const exportBalance = async (params) => { export const importTemplate = () => { return request.download({ url: '/wms/balance/get-import-template' }) } + +// 获得库位代码筛选出的库存余额分页 +export const selectLocationTypeToBalance = async (params) => { + return request.get({ url: '/wms/balance/pageLocationCodeToBalance', params}) +} diff --git a/src/api/wms/location/index.ts b/src/api/wms/location/index.ts index f7d2e19d8..2165af0e6 100644 --- a/src/api/wms/location/index.ts +++ b/src/api/wms/location/index.ts @@ -73,4 +73,8 @@ export const exportLocation = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/location/get-import-template' }) +} + +export const selectBusinessTypeToLocation = async (params) => { + return request.get({ url: `/wms/location/pageBusinessTypeToLocation`, params }) } \ No newline at end of file diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue index c26bf5022..496447b0d 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue @@ -93,7 +93,7 @@ const route = useRoute() // 路由信息 const routeName = ref() routeName.value = route.name const tableColumns = ref(InventorymoveRequestMain.allSchemas.tableColumns) - +const businessType = ref() console.log(99 , routeName.value) const fromInventoryStatus = ref() @@ -114,6 +114,7 @@ const { tableObject, tableMethods } = useTable({ } fromInventoryStatus.value = 'OK' toInventoryStatus.value = "HOLD" + businessType.value = 'OkToHoldRequest' } else if ( routeName.value == 'HoldtookRequestMain') { tableObject.params = { fromInventoryStatus: 'HOLD', @@ -121,6 +122,7 @@ const { tableObject, tableMethods } = useTable({ } fromInventoryStatus.value = 'HOLD' toInventoryStatus.value = "OK" + businessType.value = 'HoldToOkRequest' } else if ( routeName.value == 'HoldtoscrapRequestMain') { tableObject.params = { fromInventoryStatus: 'HOLD', @@ -128,6 +130,7 @@ const { tableObject, tableMethods } = useTable({ } fromInventoryStatus.value = 'HOLD' toInventoryStatus.value = "SCRAP" + businessType.value = 'HoldToScrapRequest' } else if ( routeName.value == 'OktoscrapRequestMain') { tableObject.params = { fromInventoryStatus: 'OK', @@ -135,6 +138,7 @@ const { tableObject, tableMethods } = useTable({ } fromInventoryStatus.value = 'OK' toInventoryStatus.value = "SCRAP" + businessType.value = 'OkToScrapRequest' } else if ( routeName.value == 'ScraptoholdRequestMain') { tableObject.params = { fromInventoryStatus: 'SCRAP', @@ -142,20 +146,23 @@ const { tableObject, tableMethods } = useTable({ } fromInventoryStatus.value = 'SCRAP' toInventoryStatus.value = "HOLD" + businessType.value = 'ScrapToHoldRequest' } else { console.log(146 , fromInventoryStatus.value) fromInventoryStatus.value = null + businessType.value = 'InventoryMoveRequest' } // 修改 tableform 属性 InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => { if(item.field == 'fromPackingNumber') { if (fromInventoryStatus.value) { - item.tableForm.searchCondition = [{ - key: 'inventoryStatus', - value: fromInventoryStatus.value, + item.tableForm.searchCondition = [ + { + key: 'businessType', + value: businessType.value , isMainValue: false - }] + },] } else { delete item.tableForm.searchCondition } @@ -168,36 +175,14 @@ InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => { } } if(item.field == "toLocationCode"){ - if (toInventoryStatus.value == 'HOLD') { - item.tableForm.searchCondition = [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }, + if (toInventoryStatus.value) { + item.tableForm.searchCondition = [ { - key: 'type', - value: 'HOLD', + key: 'businessType', + value: businessType.value, isMainValue: false }] } - if (toInventoryStatus.value == 'SCRAP') { - item.tableForm.searchCondition = [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }, - { - key: 'type', - value: 'SCRAP', - isMainValue: false - }] - }else { - item.tableForm.searchCondition = { - key: 'available', - value: 'TRUE', - isMainValue: false - } - } } }) diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts index 030cf8b62..0728dd5c0 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts @@ -546,7 +546,12 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( searchField: 'packingNumber', searchTitle: '库存余额信息', searchAllSchemas: Balance.allSchemas, - searchPage: BalanceApi.getBalancePage + searchPage: BalanceApi.selectLocationTypeToBalance, + searchCondition: [{ + key: 'locationCode', + value: 'businessType', + isMainValue: true + }] }, form: { // labelMessage: '信息提示说明!!!', @@ -556,7 +561,7 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( searchField: 'packingNumber', searchTitle: '库存余额信息', searchAllSchemas: Balance.allSchemas, - searchPage: BalanceApi.getBalancePage + searchPage: BalanceApi.selectLocationTypeToBalance } } }, @@ -649,11 +654,12 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( searchField: 'code', searchTitle: '库位信息', searchAllSchemas: Location.allSchemas, - searchPage: LocationApi.getLocationPage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false + searchPage: LocationApi.selectBusinessTypeToLocation, + searchCondition: [ + { + key: 'type', + value: 'businessType', + isMainValue: true }] }, form: { @@ -664,12 +670,7 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( searchField: 'code', searchTitle: '库位信息', searchAllSchemas: Location.allSchemas, - searchPage: LocationApi.getLocationPage, - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] + searchPage: LocationApi.selectBusinessTypeToLocation, } } },