From 7de24e53c798500b1f065cd66ca34344021fc878 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 4 Mar 2024 08:34:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BA=93=E5=AD=98=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=92=A4=E9=94=80=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/model/inm.js | 8 ++++++++ src/views/inm/good.vue | 2 ++ src/views/inm/halfgood.vue | 2 ++ src/views/inm/halfgood_mio.vue | 16 ++++++++++++++++ src/views/inm/helpso.vue | 2 ++ src/views/inm/mainso.vue | 2 ++ 6 files changed, 32 insertions(+) diff --git a/src/api/model/inm.js b/src/api/model/inm.js index c4f8c30c..9c1aefaf 100644 --- a/src/api/model/inm.js +++ b/src/api/model/inm.js @@ -103,6 +103,14 @@ export default { ); } }, + revert: { + name: "撤销", + req: async function(id){ + return await http.post( + `${config.API_URL}/inm/mio/${id}/revert/`, + ); + } + } }, // 出入库明细 mioitem: { diff --git a/src/views/inm/good.vue b/src/views/inm/good.vue index 276fc757..d1bf1964 100644 --- a/src/views/inm/good.vue +++ b/src/views/inm/good.vue @@ -44,6 +44,8 @@ + + diff --git a/src/views/inm/halfgood.vue b/src/views/inm/halfgood.vue index 9fc61147..df5833b9 100644 --- a/src/views/inm/halfgood.vue +++ b/src/views/inm/halfgood.vue @@ -44,6 +44,8 @@ + + diff --git a/src/views/inm/halfgood_mio.vue b/src/views/inm/halfgood_mio.vue index c8b6c06d..13a9497b 100644 --- a/src/views/inm/halfgood_mio.vue +++ b/src/views/inm/halfgood_mio.vue @@ -53,6 +53,9 @@ v-if="scope.row.state == 10"> 删除 + + 撤销 + @@ -141,6 +144,19 @@ export default { }); }).catch(() => { }); }, + revert(row) { + this.$confirm(`确定撤销该操作吗?`, "提示", { + type: "warning", + }).then(() => { + this.$API.inm.mio.revert.req(row.id).then((res) => { + this.$message.success("撤销成功"); + this.$refs.table.refresh(); + return res; + }).catch((err) => { + return err; + }); + }).catch(() => { }); + }, table_submit(row) { this.$API.inm.mio.submit.req(row.id).then(res => { this.$message.success("提交成功"); diff --git a/src/views/inm/helpso.vue b/src/views/inm/helpso.vue index e76c79a1..2d0239da 100644 --- a/src/views/inm/helpso.vue +++ b/src/views/inm/helpso.vue @@ -30,6 +30,8 @@ + + diff --git a/src/views/inm/mainso.vue b/src/views/inm/mainso.vue index d0e5f9ab..c9da71d1 100644 --- a/src/views/inm/mainso.vue +++ b/src/views/inm/mainso.vue @@ -30,6 +30,8 @@ + +