From 97cec9f440451cf8a8f8703a023dcc671f805f51 Mon Sep 17 00:00:00 2001 From: duan Date: Tue, 9 Aug 2022 09:41:34 +0800 Subject: [PATCH] =?UTF-8?q?feat(src/views/reagent/management):=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E8=AE=BE=E7=BD=AE=E4=B8=BA=E7=A9=BA=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/reagent/management.js | 9 +++++++++ src/views/reagent/management/index.vue | 21 ++++++++++++++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/api/reagent/management.js b/src/api/reagent/management.js index 14b2de9..34dce6c 100644 --- a/src/api/reagent/management.js +++ b/src/api/reagent/management.js @@ -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 + }) +} + diff --git a/src/views/reagent/management/index.vue b/src/views/reagent/management/index.vue index 4d1268d..27725df 100644 --- a/src/views/reagent/management/index.vue +++ b/src/views/reagent/management/index.vue @@ -12,7 +12,7 @@ 搜索 - 设为空瓶 + 设为空瓶 编辑试剂 查看流转记录 分配禁用用户 @@ -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) {