|
|
|
|
@ -198,7 +198,7 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
});
|
|
|
|
|
this.every = this.material[0];
|
|
|
|
|
this.materialIndex = 0;
|
|
|
|
|
await this.QueryLoc();
|
|
|
|
|
// await this.QueryLoc();
|
|
|
|
|
}
|
|
|
|
|
//选择物料后触发的回调事件 本次数量:receiptAmount 需求数量:requestAmount
|
|
|
|
|
materialChoice(e: any) {
|
|
|
|
|
@ -207,7 +207,7 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
if (item.materialCode == e.pickerName.value) {
|
|
|
|
|
this.every = item;
|
|
|
|
|
this.materialIndex = index;
|
|
|
|
|
await this.QueryLoc();
|
|
|
|
|
// await this.QueryLoc();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
@ -232,8 +232,14 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
value: this.Container.locCode + '(' + this.Container.sendSpot + ')',
|
|
|
|
|
sendSpot: this.Container.sendSpot,
|
|
|
|
|
};
|
|
|
|
|
this.Loc = [];
|
|
|
|
|
this.Loc.push(arr);
|
|
|
|
|
this.wlCode = this.Loc[0];
|
|
|
|
|
if (this.Container.cpRef4 == null) {
|
|
|
|
|
this.nowAmount = this.Container.qty;
|
|
|
|
|
} else {
|
|
|
|
|
this.nowAmount = parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//点击添加
|
|
|
|
|
Add() {
|
|
|
|
|
@ -241,36 +247,36 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
this.customToast(this.$t('message.scanningContainer') as any);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// if (this.Container.cpRef4 == null) {
|
|
|
|
|
// if (parseFloat(this.nowAmount) > this.Container.qty) {
|
|
|
|
|
// this.customToast(this.$t('message.AppendMateriel3') as any);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// } else {
|
|
|
|
|
// if (parseFloat(this.nowAmount) > this.Container.qty - parseFloat(this.Container.cpRef4)) {
|
|
|
|
|
// this.customToast(this.$t('message.AppendMateriel3') as any);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// let codenum: number = 0;
|
|
|
|
|
// if (this.list.length != 0) {
|
|
|
|
|
// this.list.forEach((item: any) => {
|
|
|
|
|
// if (item.barCode == this.Container.barcode) {
|
|
|
|
|
// num += item.receiptAmount;
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
// if (this.Container.cpRef4 == null) {
|
|
|
|
|
// if (parseFloat(this.nowAmount) + codenum > this.Container.qty) {
|
|
|
|
|
// this.customToast(this.$t('message.AppendMateriel3') as any);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// } else {
|
|
|
|
|
// if (parseFloat(this.nowAmount) + codenum > this.Container.qty - parseFloat(this.Container.cpRef4)) {
|
|
|
|
|
// this.customToast(this.$t('message.AppendMateriel3') as any);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
if (this.Container.cpRef4 == null) {
|
|
|
|
|
if (parseFloat(this.nowAmount) > parseFloat(this.Container.qty)) {
|
|
|
|
|
this.customToast(this.$t('message.AppendMateriel3') as any);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (parseFloat(this.nowAmount) > parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4)) {
|
|
|
|
|
this.customToast(this.$t('message.AppendMateriel3') as any);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
let codenum = 0;
|
|
|
|
|
if (this.list.length != 0) {
|
|
|
|
|
this.list.forEach((item: any) => {
|
|
|
|
|
if (item.barCode == this.Container.barcode) {
|
|
|
|
|
num += parseFloat(item.nowAmount);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if (this.Container.cpRef4 == null) {
|
|
|
|
|
if (parseFloat(this.nowAmount) + codenum > this.Container.qty) {
|
|
|
|
|
this.customToast(this.$t('message.AppendMateriel3') as any);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (parseFloat(this.nowAmount) + codenum > this.Container.qty - parseFloat(this.Container.cpRef4)) {
|
|
|
|
|
this.customToast(this.$t('message.AppendMateriel3') as any);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!this.every) {
|
|
|
|
|
this.customToast(this.$t('message.Commission_tips6') as any);
|
|
|
|
|
return;
|
|
|
|
|
@ -317,8 +323,8 @@ export default class dnReceiptDom extends BasePage {
|
|
|
|
|
factoryCode: this.session.factoryCode,
|
|
|
|
|
wlCode: this.wlCode.label,
|
|
|
|
|
nowAmount: this.nowAmount,
|
|
|
|
|
// barCode: this.Container.barcode,
|
|
|
|
|
barCode: this.Barcode,
|
|
|
|
|
barCode: this.Container.barcode,
|
|
|
|
|
// barCode: this.Barcode,
|
|
|
|
|
};
|
|
|
|
|
this.list.push(arr);
|
|
|
|
|
this.material[this.materialIndex].outAmount += parseFloat(this.list[this.list.length - 1].nowAmount);
|
|
|
|
|
|