From d8d9fbf9149f9103757e9bc192d452564a5fa73c Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 27 Jun 2025 14:52:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=87=BA=E5=85=A5=E5=BA=93=E8=AE=B0?= =?UTF-8?q?=E5=BD=95do=5Fout=E3=80=81other=5Fin=E3=80=81pur=5Fin=E4=B8=ADm?= =?UTF-8?q?ioitem=E5=8F=AF=E4=BB=A5=E6=92=A4=E5=9B=9E=E5=B9=B6=E5=88=A0?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/model/inm.js | 7 +++++++ src/views/inm/mioitem.vue | 35 ++++++++++++++++++++++++++--------- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/src/api/model/inm.js b/src/api/model/inm.js index eb098823..497d2b2f 100644 --- a/src/api/model/inm.js +++ b/src/api/model/inm.js @@ -185,6 +185,13 @@ export default { data); } }, + revertDel:{ + name: "撤回并删除", + req: async function(id){ + return await http.post( + `${config.API_URL}/inm/mioitem/${id}/revert_and_del/`); + } + } }, // mioitemw mioitemw: { diff --git a/src/views/inm/mioitem.vue b/src/views/inm/mioitem.vue index 6eb5d4ac..482ffa35 100644 --- a/src/views/inm/mioitem.vue +++ b/src/views/inm/mioitem.vue @@ -170,13 +170,7 @@ link type="primary" @click="table_check(scope.row)" - v-if=" - scope.row.test_date == null && - mioObj.state == 20 && - (type == 'pur_in' || - type == 'do_in' || - type == 'other_in') - " + v-if="scope.row.test_date == null &&mioObj.state == 20 &&(type == 'pur_in' ||type == 'do_in' ||type == 'other_in')" v-auth="'mioitem.test'" > 检验 @@ -195,7 +189,7 @@ @click="check_reSet(scope.row)" v-if="scope.row.test_date !== null" > - 撤回 + 检验作废 物料标签 - + + 撤回 + @@ -405,6 +407,21 @@ export default { }); }).catch(() => {}); }, + //撤回并删除 + check_revert(row){ + let that = this; + that.$confirm(`该记录已提交,确定撤回吗?`, "提示", { + type: "warning", + }).then(() => { + console.log('确定删除'); + that.$API.inm.mioitem.revertDel.req(row.id).then((res) => { + that.$message.success("撤回成功"); + that.$refs.table.refresh(); + }).catch((err) => { + return err; + }); + }).catch(() => {}); + }, //检验 table_check(row) { this.mioitemId = row.id;