From 40f04d19841adbdf91579196e532a3ae37b8bd25 Mon Sep 17 00:00:00 2001 From: duan Date: Wed, 3 Aug 2022 17:07:21 +0800 Subject: [PATCH] =?UTF-8?q?refactor(src/views/reagent/warehousing):=20?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=89=8D=E8=AF=A2=E9=97=AE=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/reagent/warehousing/index.vue | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/views/reagent/warehousing/index.vue b/src/views/reagent/warehousing/index.vue index 87e2227..b6f5cc3 100644 --- a/src/views/reagent/warehousing/index.vue +++ b/src/views/reagent/warehousing/index.vue @@ -224,6 +224,8 @@ import Scanner from '@/components/Scannner/index' import { show_tmp, select_drug, bind_tmp_enter_warehouse, add_tmp, del_tmp } from '@/api/reagent/warehousing' import stringify from '@/utils/stringify' import { getClients } from '@/views/reagent/mixin/getClients' +import { MessageBox } from 'element-ui' +import store from '@/store' export default { name: 'Warehousing', @@ -329,13 +331,19 @@ export default { // 处理删除模板 handleDelTem() { if (this.multipleSelection.length > 0) { - del_tmp(stringify({ 'template_id_list': this.multipleSelection.map(item => item.template_id) })).then( - res => { - if (res.status === 0) { - this.$message.success('删除成功!') + this.$msgbox.confirm(`确定要删除模板${this.multipleSelection.map(item => item.template_name).join('、')}吗?`, '提示', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + del_tmp(stringify({ 'template_id_list': this.multipleSelection.map(item => item.template_id) })).then( + res => { + if (res.status === 0) { + this.$message.success('删除成功!') + } } - } - ) + ) + }) } else { this.$message.warning('请先选择模板') }