From 7cf6c62fb85b6804f2cc021468544b31a77271df Mon Sep 17 00:00:00 2001 From: hou <1601990943@qq.com> Date: Fri, 8 Apr 2022 15:29:24 +0800 Subject: [PATCH] =?UTF-8?q?cosmoim-852=20fix=20=E6=88=90=E5=93=81=E4=B8=8B?= =?UTF-8?q?=E7=BA=BF=E5=A2=9E=E5=8A=A0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../product/inbound/finishProductOffline/index.vue | 11 ++++++++++- .../product/inbound/finishProductOffline/model.ts | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/pages/product/inbound/finishProductOffline/index.vue b/src/pages/product/inbound/finishProductOffline/index.vue index 0689aec..14441b4 100644 --- a/src/pages/product/inbound/finishProductOffline/index.vue +++ b/src/pages/product/inbound/finishProductOffline/index.vue @@ -145,6 +145,8 @@ export default class finishProductOfflineDom extends BasePage { // 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕 async onReady() { this.$form.setRules(this.rules); + await this.model.queryReturningTypeList(); + this.form.aimWl = model.firstLocation; } /** * 处理选择行 选中一条执行一次 @@ -240,9 +242,14 @@ export default class finishProductOfflineDom extends BasePage { this.customToast(this.$t('message.barcode') as string); return; } + if (this.model.searchCode == '') { + this.customToast(this.$t('message.barcode_PleaseScan') as string); + return; + } if (this.materielList.length == 0) { this.materielList.push(this.model.materielList[0]); this.materielList[this.materielList.length - 1].locCode = this.form.aimWl.label; + this.model.setSearchCode(); } else { let flag = 0; for (let i = 0; i < this.materielList.length; i++) { @@ -254,7 +261,9 @@ export default class finishProductOfflineDom extends BasePage { if (flag == 0) { this.materielList.push(this.model.materielList[0]); this.materielList[this.materielList.length - 1].locCode = this.form.aimWl.label; + this.model.setSearchCode(); } else { + this.model.setSearchCode(); this.customToast(this.$t('message.product_Tip7') as string); } } @@ -270,7 +279,7 @@ export default class finishProductOfflineDom extends BasePage { } await this.model.queryOrderInInfo(this.form); if (this.model.searchCode == '1') { - await this.model.queryTypeList(this.form.barCode); + await this.model.queryTypeList(this.model.materielList[0].productCode); this.form.aimWl = model.firstLocation; } } diff --git a/src/pages/product/inbound/finishProductOffline/model.ts b/src/pages/product/inbound/finishProductOffline/model.ts index efd0d47..daa37d8 100644 --- a/src/pages/product/inbound/finishProductOffline/model.ts +++ b/src/pages/product/inbound/finishProductOffline/model.ts @@ -105,6 +105,11 @@ export class PickingModule extends VuexModule { const materielList = materielList2; return { searchCode, materielList }; } + @MutationAction + async setSearchCode() { + const searchCode = ''; + return { searchCode }; + } /** * 确认按钮 * @param orderNo