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 { show_tmp, select_drug, bind_tmp_enter_warehouse, add_tmp, del_tmp } from '@/api/reagent/warehousing'
import stringify from '@/utils/stringify' import stringify from '@/utils/stringify'
import { getClients } from '@/views/reagent/mixin/getClients' import { getClients } from '@/views/reagent/mixin/getClients'
import { MessageBox } from 'element-ui'
import store from '@/store'
export default { export default {
name: 'Warehousing', name: 'Warehousing',
@ -329,13 +331,19 @@ export default {
// //
handleDelTem() { handleDelTem() {
if (this.multipleSelection.length > 0) { if (this.multipleSelection.length > 0) {
del_tmp(stringify({ 'template_id_list': this.multipleSelection.map(item => item.template_id) })).then( this.$msgbox.confirm(`确定要删除模板${this.multipleSelection.map(item => item.template_name).join('、')}吗?`, '提示', {
res => { confirmButtonText: '确认',
if (res.status === 0) { cancelButtonText: '取消',
this.$message.success('删除成功!') 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 { } else {
this.$message.warning('请先选择模板') this.$message.warning('请先选择模板')
} }

Loading…
Cancel
Save