From 43e8b89fc95aca4dcb037f665a13c5a6c97493e3 Mon Sep 17 00:00:00 2001 From: 13507605001 Date: Fri, 9 Dec 2022 18:02:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E5=AD=98=E5=88=A4=E6=96=AD=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/reagent/drugStock.js | 46 +++ src/components/ReagentForm/index.vue | 26 +- src/views/reagent/client/index.vue | 19 +- src/views/reagent/inventory/index.vue | 315 +++++++++++--------- src/views/reagent/management/data/index.vue | 25 -- 5 files changed, 259 insertions(+), 172 deletions(-) create mode 100644 src/api/reagent/drugStock.js diff --git a/src/api/reagent/drugStock.js b/src/api/reagent/drugStock.js new file mode 100644 index 0000000..0ecb3ec --- /dev/null +++ b/src/api/reagent/drugStock.js @@ -0,0 +1,46 @@ +import request from '@/utils/request' + +// /api/stock/getlist +export function get_list(data) { + return request({ + url: '/api/stock/getlist', + method: 'post', + data + }) +} + +// /api/stock/get_drug_list +export function get_drug_list(data) { + return request({ + url: '/api/stock/get_drug_list', + method: 'post', + data + }) +} + +// /api/stock/set_stock +export function set_stock(data) { + return request({ + url: '/api/stock/set_stock', + method: 'post', + data + }) +} + +// /api/stock/get_stock_info +export function get_stock_info(data) { + return request({ + url: '/api/stock/get_stock_info', + method: 'post', + data + }) +} + +// /api/stock/del_stock +export function del_stock(data) { + return request({ + url: '/api/stock/del_stock', + method: 'post', + data + }) +} diff --git a/src/components/ReagentForm/index.vue b/src/components/ReagentForm/index.vue index 52fe145..c3f8b61 100644 --- a/src/components/ReagentForm/index.vue +++ b/src/components/ReagentForm/index.vue @@ -172,8 +172,16 @@ export default { trigger: 'blur', type: 'number' }], - production_date: [], - expiration_date: [], + production_date: [{ + required: true, + message: '请输入生产日期', + trigger: 'blur' + }], + expiration_date: [{ + required: true, + message: '请输入过期日期', + trigger: 'blur' + }], manufacturer: [], distributor: [], speci: [{ @@ -181,7 +189,17 @@ export default { message: '请输入规格', trigger: 'blur' }], - total: [] + total: [{ + required: true, + message: '请输入单位', + trigger: 'blur' + }], + net_weight_unit: [{ + required: true, + message: '请输入预估质量', + trigger: 'blur' + } + ] }, extra_form: [] } @@ -219,7 +237,7 @@ export default { }, createStateFilter(queryString) { return (state) => { - return (state.name.toLowerCase().indexOf(queryString.toLowerCase()) >= 0) + return (state.value.toLowerCase().indexOf(queryString.toLowerCase()) >= 1) } }, handleSelect(item) { diff --git a/src/views/reagent/client/index.vue b/src/views/reagent/client/index.vue index d04305d..8cfeeae 100644 --- a/src/views/reagent/client/index.vue +++ b/src/views/reagent/client/index.vue @@ -377,15 +377,18 @@ export default { }, destroyed() { // 更新client数据供后续使用 - client_list().then( - res => { - const cls = this.$store.getters.clientOptions - cls[this.$store.getters.classification] = res.data.data_list - this.$store.commit('app/SET_COPTS', cls) - } - ) + this.get_client_list() }, methods: { + get_client_list() { + client_list().then( + res => { + const cls = this.$store.getters.clientOptions + cls[this.$store.getters.classification] = res.data.data_list + this.$store.commit('app/SET_COPTS', cls) + } + ) + }, handleDisUser() { if (this.multipleUserSelection.length !== 1) { this.$message.warning('请选择一个用户!') @@ -602,6 +605,8 @@ export default { }) } ) + this.getList() + this.get_client_list() }).catch(() => { this.$message({ type: 'info', diff --git a/src/views/reagent/inventory/index.vue b/src/views/reagent/inventory/index.vue index c0ceb04..3ab2a39 100644 --- a/src/views/reagent/inventory/index.vue +++ b/src/views/reagent/inventory/index.vue @@ -4,17 +4,21 @@
+ v-for="item in $store.getters.currentOptions" + :key="item.id" + :label="item.client_name" + :value="item.client_id" + /> 录入库存 - 提交校验 -
+ 查看盘点 + +
+ +
- - - - - - - - - + + + + + +
-
-
{{ `${item.name} (${item.purity})` }}
- +
+ + +
+ + + + + +
+
+
取消 确定
- + - - - - - - - - - - - - - + 搜索
-
- - - - - - - - - - - -
- +
--> + +
+ + + + + + + + + + + +