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,10 +301,18 @@ 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') {
await this.model.queryTypeList(this.model.materielList[0].productCode); if (session.factoryCode == '9A61' || session.factoryCode == '9A62') {
this.form.aimWl = model.firstLocation; 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 { } else {
if (this.form.barCode.length < 20) { if (this.form.barCode.length < 20) {
@ -314,29 +323,59 @@ 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 (this.materielList.length == 0) { if (session.factoryCode == '9A61' || session.factoryCode == '9A62') {
this.materielList.push(this.model.materielList[0]); await this.model.queryTypeListVN(this.model.materielList);
this.materielList[this.materielList.length - 1].locCode = this.form.aimWl.label; this.form.aimWl = model.firstLocation;
this.materielList[this.materielList.length - 1].index = this.materielList.length; //console.log("this.form.aimWl:"+JSON.stringify(this.form.aimWl));
this.model.setSearchCode(); // console.log("this.materielList:"+JSON.stringify(this.materielList));
} else { //this.materielList.length0
let flag = 0; if (this.materielList.length == 0) {
for (let i = 0; i < this.materielList.length; i++) { this.materielList.push(this.model.materielList[0]);
if (this.form.barCode == this.materielList[i].barcode) { //this.materielList[this.materielList.length - 1].locCode = this.form.aimWl.label;
flag = 1; //this.materielList[this.materielList.length - 1].index = this.materielList.length;
break; } 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.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;
this.materielList[this.materielList.length - 1].index = this.materielList.length; this.materielList[this.materielList.length - 1].index = this.materielList.length;
this.model.setSearchCode(); this.model.setSearchCode();
} else { } else {
this.model.setSearchCode(); let flag = 0;
this.customToast(this.$t('message.product_Tip7') as string); 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]; 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