refactor(src/views/reagent/warehousing): 删除前询问是否删除

duizhaopin_ui
duan 2 years ago
parent 6b48b3cc5e
commit 40f04d1984

@ -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,6 +331,11 @@ export default {
//
handleDelTem() {
if (this.multipleSelection.length > 0) {
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) {
@ -336,6 +343,7 @@ export default {
}
}
)
})
} else {
this.$message.warning('请先选择模板')
}

Loading…
Cancel
Save