feat(src/views/reagent/management): 添加设置为空功能

duizhaopin_ui
duan 2 years ago
parent a4ffc27d8a
commit 97cec9f440

@ -71,3 +71,12 @@ export function del(data) {
})
}
// /api/drug/set_drug_empty_bottle
export function set_drug_empty_bottle(data) {
return request({
url: '/api/drug/set_drug_empty_bottle',
method: 'post',
data
})
}

@ -12,7 +12,7 @@
</el-select>
<el-input v-model="name" placeholder="请输入试剂名称" />
<el-button type="primary" icon="el-icon-search" @click="getList"></el-button>
<el-button type="primary" plain><svg-icon icon-class="cup" /> 设为空瓶</el-button>
<el-button type="primary" plain @click="handleSetEmpty"><svg-icon icon-class="cup" /> 设为空瓶</el-button>
<el-button icon="el-icon-edit" @click="handleEdit"></el-button>
<el-button @click="showHistory"><svg-icon icon-class="" /> 查看流转记录</el-button>
<el-button icon="el-icon-user" @click="handleDisable"></el-button>
@ -341,7 +341,8 @@ import {
update,
user_ban_confirm,
user_ban_list,
user_ban_relieve
user_ban_relieve,
set_drug_empty_bottle
} from '@/api/reagent/management'
import stringify from '@/utils/stringify'
export default {
@ -514,6 +515,20 @@ export default {
this.getList()
})
},
//
handleSetEmpty() {
if (this.multipleSelection.length !== 1) {
this.$message.warning('请选择一个试剂!')
return
}
const data = {
medicament_id: this.multipleSelection[0].medicament_id
}
set_drug_empty_bottle(stringify(data)).then(res => {
this.$message.success(res.msg)
this.getList()
})
},
//
handleRefresh() {
this.getList()
@ -529,7 +544,7 @@ export default {
},
//
userPageChange(page) {
this.getUserList()
},
//
handleUserSelectionChange(val) {

Loading…
Cancel
Save