cosmoim-852 fix 成品下线增加校验

master
hou 3 years ago
parent fbf6fd42fb
commit 7cf6c62fb8

@ -145,6 +145,8 @@ export default class finishProductOfflineDom extends BasePage {
// onReadyonLoad
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;
}
}

@ -105,6 +105,11 @@ export class PickingModule extends VuexModule {
const materielList = materielList2;
return { searchCode, materielList };
}
@MutationAction
async setSearchCode() {
const searchCode = '';
return { searchCode };
}
/**
*
* @param orderNo

Loading…
Cancel
Save