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;