From 154cf6081b0cc93c20f5cf3bd7dbcd7c293872d0 Mon Sep 17 00:00:00 2001 From: liufumingren Date: Sat, 22 Aug 2026 01:56:05 +0800 Subject: [PATCH] =?UTF-8?q?feat(storage/inventory):=20=E6=89=B9=E6=AC=A1/?= =?UTF-8?q?=E6=B1=87=E6=80=BB=E6=9F=A5=E8=AF=A2=E5=BA=93=E4=BD=8D=E5=88=97?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E4=B8=8E=E6=98=8E=E7=BB=86=E5=8F=8C=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E7=A7=BB=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 批次查询主列表新增库位列并映射 batch_no - 查询条件改为 stock_query(参考订单查询),移除商品ID选择器 - 汇总模式主列表库位通过 listByStockId 按商品批量补全(单库位显示库位名,多库位显示n个库位) - 明细面板支持按明细/按库位汇总双视图(group_by_space),按视图显示对应移库按钮 - 明细表格动态高度可滚动,勾选行驱动按库存记录/按商品移库 - 明细面板默认高度占比调整,新增刷新按钮 --- src/api/storage.inventory/inventory.ts | 15 ++ .../inventory/component/panelstockdetail.vue | 223 +++++++++++++++--- src/views/storage/inventory/index.vue | 135 +++++------ .../storage/inventory/inventory-config.ts | 10 +- 4 files changed, 274 insertions(+), 109 deletions(-) diff --git a/src/api/storage.inventory/inventory.ts b/src/api/storage.inventory/inventory.ts index 7df96180..5a1c5fca 100644 --- a/src/api/storage.inventory/inventory.ts +++ b/src/api/storage.inventory/inventory.ts @@ -17,6 +17,21 @@ export function getInventoryList(data: any): Promise { } as any) } +/** 按商品查询库存明细:group_by_space=false 返回 quantity > 1 的 wms_storage 明细行(按 id 倒序);group_by_space=true 按库位汇总 */ +export function getInventoryListByStockId(data: { stock_id: number; group_by_space?: boolean }): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'storage.inventory.listByStockId', + v, + timestamp: new Date().getTime() + }, + data, + isSystemApi: true + } as any) +} + export function quickPutaway(data: { receiving_id: number; id?: number }): Promise { const body: Record = { ...data } if (body.receiving_id === undefined && body.id != null) { diff --git a/src/views/storage/inventory/component/panelstockdetail.vue b/src/views/storage/inventory/component/panelstockdetail.vue index 6661d39a..c98ced12 100644 --- a/src/views/storage/inventory/component/panelstockdetail.vue +++ b/src/views/storage/inventory/component/panelstockdetail.vue @@ -4,11 +4,12 @@
+ + 按明细 + 按库位汇总 + + + 刷新 +
- - - +
+ + + + +