From 6b48b3cc5ead5813bf53b2c4c08ea1b09f00f17c Mon Sep 17 00:00:00 2001 From: duan Date: Wed, 3 Aug 2022 16:06:05 +0800 Subject: [PATCH] =?UTF-8?q?feat(src/views/reagent/warehousing):=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BB=91=E5=AE=9A=E5=85=A5=E5=BA=93=E3=80=81?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=A8=A1=E6=9D=BF=E6=B7=BB=E5=8A=A0client=5F?= =?UTF-8?q?id=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/reagent/warehousing/index.vue | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/views/reagent/warehousing/index.vue b/src/views/reagent/warehousing/index.vue index ffa445f..87e2227 100644 --- a/src/views/reagent/warehousing/index.vue +++ b/src/views/reagent/warehousing/index.vue @@ -277,9 +277,14 @@ export default { // 扫码后提交后台并自动选择下一行 barCode: function(newCode, oldCode) { if (newCode) { + if (!this.client_id) { + this.$message.warning('请选择存储柜体!') + return + } bind_tmp_enter_warehouse(stringify({ 'tmplate_content': JSON.stringify(this.currentRow), - 'bar_code': newCode + 'bar_code': newCode, + 'client_id': this.client_id })).then(res => { if (res.status === 0) { let cindex = 0 // 记录成功后的下一个index @@ -436,7 +441,15 @@ export default { this.reagentAddTmpData = [] }, handleAddSave() { - const data = stringify({ 'template_name': this.reagentAddTmpName, 'template_content': JSON.stringify(this.reagentAddTmpData) }) + if (!this.reagentAddTmpName) { + this.$message.warning('请输入模板名称!') + return + } + if (!this.reagentAddClient) { + this.$message.warning('请选择存储柜体!') + return + } + const data = stringify({ 'template_name': this.reagentAddTmpName, 'template_content': JSON.stringify(this.reagentAddTmpData), 'client_id': this.reagentAddClient }) add_tmp(data).then( res => { if (res.status === 0) {