From e96c1432bd14cf5e88ca87d454287d9b1773876a Mon Sep 17 00:00:00 2001 From: x_z Date: Thu, 8 Sep 2022 17:20:25 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=A2=9E=E5=8A=A0=E5=8D=95=E6=8D=AE=E5=9B=9E?= =?UTF-8?q?=E9=80=80=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/warehouse/stockOrder.js | 8 ++++++ src/views/warehouse/stockOrderDelSearch.vue | 31 ++++++++++++++++++--- src/views/warehouse/stockOrderSearch.vue | 25 ++++++++++++++++- 3 files changed, 59 insertions(+), 5 deletions(-) diff --git a/src/api/warehouse/stockOrder.js b/src/api/warehouse/stockOrder.js index 43d76fa..f773c86 100644 --- a/src/api/warehouse/stockOrder.js +++ b/src/api/warehouse/stockOrder.js @@ -287,6 +287,14 @@ export function findOrderByStockOrder(query) { }); } +export function rollbackOrder(params) { + return axios({ + url: "/udiwms/stock/order/rollback", + method: "get", + params: params + }); +} + diff --git a/src/views/warehouse/stockOrderDelSearch.vue b/src/views/warehouse/stockOrderDelSearch.vue index f245120..04cc6d2 100644 --- a/src/views/warehouse/stockOrderDelSearch.vue +++ b/src/views/warehouse/stockOrderDelSearch.vue @@ -138,6 +138,14 @@ + 回退 + + @@ -314,10 +322,9 @@ import { stockOrderList, stockOrderDetail, deleteStockOrderById, deleteStockOrderDetailById, - copyStockOrderDetail, submitStockOrder, - uploadStockOrderDetail, uploadStockOrderDetailCount, - generateStockOrderQRCodeText, supplementOrder, - updateStockOrderDetail + copyStockOrderDetail, uploadStockOrderDetail, + supplementOrder, updateStockOrderDetail, + rollbackOrder } from "../../api/warehouse/stockOrder"; import stockOrderDistribution from "./stockOrderDistribution"; import stockOrderQRCodeDetail from "./stockOrderQRCodeDetail"; @@ -899,6 +906,22 @@ export default { message: '取消补单' }); }); + }, + rollback(row) { + this.$confirm('此操作将回退单据, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + let param = {billNo: row.billNo}; + rollbackOrder(param).then((res) => { + if (res.code === 20000) { + this.$message.success("回退成功"); + } + }) + }).catch(() => { + this.$message.info('回退失败'); + }); } }, components: { diff --git a/src/views/warehouse/stockOrderSearch.vue b/src/views/warehouse/stockOrderSearch.vue index be23ce0..7c4fb65 100644 --- a/src/views/warehouse/stockOrderSearch.vue +++ b/src/views/warehouse/stockOrderSearch.vue @@ -133,6 +133,13 @@ + 回退 + + @@ -460,7 +467,7 @@ import { deleteStockOrderById, deleteStockOrderDetailById, copyStockOrderDetail, uploadStockOrderDetail, - updateStockOrderDetail, updateStatus + updateStockOrderDetail, updateStatus, rollbackOrder } from "../../api/warehouse/stockOrder"; import stockOrderDistribution from "./stockOrderDistribution"; import stockOrderQRCodeDetail from "./stockOrderQRCodeDetail"; @@ -1036,6 +1043,22 @@ export default { .catch(() => { }); }, + rollback(row) { + this.$confirm('此操作将回退单据, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + let param = {billNo: row.billNo}; + rollbackOrder(param).then((res) => { + if (res.code === 20000) { + this.$message.success("回退成功"); + } + }) + }).catch(() => { + this.$message.info('回退失败'); + }); + } } , components: {