From 0ad3f3f3c859538b5cf4c313da6d655d33136e75 Mon Sep 17 00:00:00 2001 From: Joshi <3040996759@qq.com> Date: Sat, 19 Jul 2025 10:49:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E7=8B=AC=E4=BF=AE=E6=94=B9=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- klp-ui/src/api/wms/stockIo.js | 39 +++++ klp-ui/src/views/wms/stockIo/index.vue | 14 +- .../src/views/wms/stockIo/panels/detail.vue | 140 +++++++++++++++--- .../klp/controller/WmsStockIoController.java | 10 ++ .../com/klp/service/IWmsStockIoService.java | 5 + .../service/impl/WmsStockIoServiceImpl.java | 29 ++++ 6 files changed, 217 insertions(+), 20 deletions(-) diff --git a/klp-ui/src/api/wms/stockIo.js b/klp-ui/src/api/wms/stockIo.js index 41ddaa36..f0d4092f 100644 --- a/klp-ui/src/api/wms/stockIo.js +++ b/klp-ui/src/api/wms/stockIo.js @@ -42,3 +42,42 @@ export function delStockIo(stockIoId) { method: 'delete' }) } + +// 审核出入库单 +export function auditStockIo(stockIoId) { + return request({ + url: '/wms/stockIo/audit/' + stockIoId, + method: 'post' + }) +} + +// 撤销出入库单 +export function cancelStockIo(stockIoId) { + return request({ + url: '/wms/stockIo/cancel/' + stockIoId, + method: 'post' + }) +} + +// 根据类型和ID查询明细 +export function detailByTypeAndId(ioType, stockIoId) { + return request({ + url: '/wms/stockIo/detailByTypeAndId', + method: 'get', + params: { + ioType, + stockIoId + } + }) +} + +// 更新出入库单状态 +export function updateStockIoStatus(stockIoId, status) { + return request({ + url: '/wms/stockIo/updateStatus/' + stockIoId, + method: 'post', + params: { + status + } + }) +} diff --git a/klp-ui/src/views/wms/stockIo/index.vue b/klp-ui/src/views/wms/stockIo/index.vue index 112b5b0c..ea5adb2a 100644 --- a/klp-ui/src/views/wms/stockIo/index.vue +++ b/klp-ui/src/views/wms/stockIo/index.vue @@ -191,7 +191,10 @@ append-to-body @close="onDetailClosed" > - + @@ -390,6 +393,15 @@ export default { }, onDetailClosed() { this.getList(); + }, + onStatusChanged(updatedStockIo) { + // 更新主表中的对应记录状态 + const index = this.stockIoList.findIndex(item => item.stockIoId === updatedStockIo.stockIoId); + if (index !== -1) { + this.$set(this.stockIoList, index, updatedStockIo); + } + // 刷新列表 + this.getList(); } } }; diff --git a/klp-ui/src/views/wms/stockIo/panels/detail.vue b/klp-ui/src/views/wms/stockIo/panels/detail.vue index 39583d12..c13d0382 100644 --- a/klp-ui/src/views/wms/stockIo/panels/detail.vue +++ b/klp-ui/src/views/wms/stockIo/panels/detail.vue @@ -63,7 +63,12 @@ - + @@ -96,29 +101,45 @@ :limit.sync="queryParams.pageSize" @pagination="getList" /> - +
+ {{ getStatusButtonText() }} + + + 确认入库/审核 + >审核
- + - - + + - - + + - + + + + @@ -150,9 +171,14 @@