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()
}
async getBarcode() {
//openlock
if (this.open == false) {
if (this.form.barCode.length < 20) {
this.customToast(this.$t('message.barCodeLength') as string);
@ -300,10 +301,18 @@ export default class finishProductOfflineDom extends BasePage {
this.customToast(this.$t('message.standard') as string);
return;
}
//wmspda/product/finished/show-info
await this.model.queryOrderInInfo(this.form);
if (this.model.searchCode == '1') {
await this.model.queryTypeList(this.model.materielList[0].productCode);
this.form.aimWl = model.firstLocation;
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);
this.form.aimWl = model.firstLocation;
}
}
} else {
if (this.form.barCode.length < 20) {
@ -314,29 +323,59 @@ export default class finishProductOfflineDom extends BasePage {
this.customToast(this.$t('message.standard') as string);
return;
}
//this.model.materielList
await this.model.queryOrderInInfo(this.form);
if (this.model.searchCode == '1') {
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;
this.model.setSearchCode();
} 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 (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);
}
}
if (flag == 0) {
} else {
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;
this.model.setSearchCode();
} else {
this.model.setSearchCode();
this.customToast(this.$t('message.product_Tip7') as string);
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;
this.model.setSearchCode();
} else {
this.model.setSearchCode();
this.customToast(this.$t('message.product_Tip7') as string);
}
}
}
}

@ -80,6 +80,18 @@ export class PickingModule extends VuexModule {
const firstLocation = returningTypeList[0];
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

Loading…
Cancel
Save