From 2caccfb91cdee4f7f3c9bbadf8fd9c3814fd0699 Mon Sep 17 00:00:00 2001 From: wanghao Date: Tue, 20 Jan 2026 11:22:15 +0800 Subject: [PATCH] =?UTF-8?q?feat(wms):=20=E5=BA=93=E5=AD=98=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=99=A8=E5=A2=9E=E5=8A=A0=E7=BB=9F=E8=AE=A1=E6=9C=AA?= =?UTF-8?q?=E5=87=BA=E5=BA=93=E7=9A=84=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/oa/erp/projectInfo/index.ts | 3 +++ src/api/wms/outStockDetails/index.ts | 8 +++++++ src/components/WmsInventorySelect/index.vue | 18 +++++++++++++++ src/views/wms/outStockBill/index.vue | 25 +++++++++++++++++---- 4 files changed, 50 insertions(+), 4 deletions(-) diff --git a/src/api/oa/erp/projectInfo/index.ts b/src/api/oa/erp/projectInfo/index.ts index 3c68c65..6676c7b 100644 --- a/src/api/oa/erp/projectInfo/index.ts +++ b/src/api/oa/erp/projectInfo/index.ts @@ -86,3 +86,6 @@ export function getErpProjectInfoList(query) { params: query }); } + + + diff --git a/src/api/wms/outStockDetails/index.ts b/src/api/wms/outStockDetails/index.ts index 45f5372..6f9fc8c 100644 --- a/src/api/wms/outStockDetails/index.ts +++ b/src/api/wms/outStockDetails/index.ts @@ -74,3 +74,11 @@ export function getWmsOutStockDetailsList(query) { params: query }); } + +export function countUnOutStockDetails(query) { + return request({ + url: '/wms/outStockDetails/countUnOutStockDetails', + method: 'get', + params: query + }); +} diff --git a/src/components/WmsInventorySelect/index.vue b/src/components/WmsInventorySelect/index.vue index b3df78a..2dbc3ac 100644 --- a/src/components/WmsInventorySelect/index.vue +++ b/src/components/WmsInventorySelect/index.vue @@ -81,6 +81,11 @@ + + + @@ -111,6 +116,7 @@ import { VxeTableInstance } from 'vxe-table'; import useDialog from '@/hooks/useDialog'; import { computed, getCurrentInstance, nextTick, ref, watch } from 'vue'; import { getErpProjectInfoList } from '@/api/oa/erp/projectInfo'; +import { countUnOutStockDetails } from '@/api/wms/outStockDetails'; interface PropType { modelValue?: InventoryDetailsVO[] | InventoryDetailsVO | undefined; @@ -184,6 +190,18 @@ const getList = async () => { try { const res = await listInventoryDetails(queryParams.value); inventoryDetailsList.value = res.rows; + // 查询每个物料的锁定库存数量 + for (const item of inventoryDetailsList.value) { + try { + const lockRes = await countUnOutStockDetails({ + inventoryDetailsId: item.inventoryDetailsId + }); + item.lockedAmount = lockRes.data?.outStockAmount || 0; + } catch (error) { + console.error('查询锁定库存失败:', error); + item.lockedAmount = 0; + } + } total.value = res.total; } catch (error) { console.error('查询库存明细列表失败:', error); diff --git a/src/views/wms/outStockBill/index.vue b/src/views/wms/outStockBill/index.vue index 06a2579..9ff65bb 100644 --- a/src/views/wms/outStockBill/index.vue +++ b/src/views/wms/outStockBill/index.vue @@ -81,7 +81,9 @@ + + + +