overseamom-253 feat 成品下线入库仓库固定

master
suiwei 2 years ago
parent 50d7e65975
commit d5bd8cee8f

@ -291,6 +291,7 @@ export default class finishProductOfflineDom extends BasePage {
// this.$refs.BarCodeSearch.focus() // this.$refs.BarCodeSearch.focus()
} }
async getBarcode() { async getBarcode() {
//openlock
if (this.open == false) { if (this.open == false) {
if (this.form.barCode.length < 20) { if (this.form.barCode.length < 20) {
this.customToast(this.$t('message.barCodeLength') as string); this.customToast(this.$t('message.barCodeLength') as string);
@ -300,11 +301,19 @@ export default class finishProductOfflineDom extends BasePage {
this.customToast(this.$t('message.standard') as string); this.customToast(this.$t('message.standard') as string);
return; return;
} }
//wmspda/product/finished/show-info
await this.model.queryOrderInInfo(this.form); await this.model.queryOrderInInfo(this.form);
if (this.model.searchCode == '1') { if (this.model.searchCode == '1') {
if (session.factoryCode == '9A61' || session.factoryCode == '9A62') {
await this.model.queryTypeListVN(this.model.materielList);
this.form.aimWl = model.firstLocation;
} else {
///wmspda/fg/getMdLocationProd
await this.model.queryTypeList(this.model.materielList[0].productCode); await this.model.queryTypeList(this.model.materielList[0].productCode);
this.form.aimWl = model.firstLocation; this.form.aimWl = model.firstLocation;
} }
}
} else { } else {
if (this.form.barCode.length < 20) { if (this.form.barCode.length < 20) {
this.customToast(this.$t('message.barCodeLength') as string); this.customToast(this.$t('message.barCodeLength') as string);
@ -314,8 +323,37 @@ export default class finishProductOfflineDom extends BasePage {
this.customToast(this.$t('message.standard') as string); this.customToast(this.$t('message.standard') as string);
return; return;
} }
//this.model.materielList
await this.model.queryOrderInInfo(this.form); await this.model.queryOrderInInfo(this.form);
if (this.model.searchCode == '1') { if (this.model.searchCode == '1') {
if (session.factoryCode == '9A61' || session.factoryCode == '9A62') {
await this.model.queryTypeListVN(this.model.materielList);
this.form.aimWl = model.firstLocation;
//console.log("this.form.aimWl:"+JSON.stringify(this.form.aimWl));
// console.log("this.materielList:"+JSON.stringify(this.materielList));
//this.materielList.length0
if (this.materielList.length == 0) {
this.materielList.push(this.model.materielList[0]);
//this.materielList[this.materielList.length - 1].locCode = this.form.aimWl.label;
//this.materielList[this.materielList.length - 1].index = this.materielList.length;
} else {
//
let flag = 0;
for (let i = 0; i < this.materielList.length; i++) {
if (this.form.barCode == this.materielList[i].barcode) {
flag = 1;
break;
}
}
if (flag == 0) {
this.materielList.push(this.model.materielList[0]);
//this.materielList[this.materielList.length - 1].locCode = this.form.aimWl.label;
// this.materielList[this.materielList.length - 1].index = this.materielList.length;
} else {
this.customToast(this.$t('message.product_Tip7') as string);
}
}
} else {
if (this.materielList.length == 0) { if (this.materielList.length == 0) {
this.materielList.push(this.model.materielList[0]); this.materielList.push(this.model.materielList[0]);
this.materielList[this.materielList.length - 1].locCode = this.form.aimWl.label; this.materielList[this.materielList.length - 1].locCode = this.form.aimWl.label;
@ -341,6 +379,7 @@ export default class finishProductOfflineDom extends BasePage {
} }
} }
} }
}
if (this.open == true) { if (this.open == true) {
this.form.barCode = ''; this.form.barCode = '';
this.firstFocus = true; this.firstFocus = true;

@ -80,6 +80,18 @@ export class PickingModule extends VuexModule {
const firstLocation = returningTypeList[0]; const firstLocation = returningTypeList[0];
return { returningTypeList, firstLocation }; return { returningTypeList, firstLocation };
} }
@MutationAction
async queryTypeListVN(materielList: any) {
const returningTypeList = [
{
label: materielList[0].locCode,
value: materielList[0].locCode + '(' + materielList[0].sendSpot + ')',
areaCode: materielList[0].areaCode,
},
];
const firstLocation = returningTypeList[0];
return { returningTypeList, firstLocation };
}
/** /**
* *
* @param orderNo * @param orderNo

Loading…
Cancel
Save