|
|
|
@ -302,26 +302,14 @@ export default class RawReceiptDetail extends BasePage {
|
|
|
|
|
}
|
|
|
|
|
Add() {
|
|
|
|
|
if (this.qty == '' || this.wlCode == '') {
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
// title: this.$t('message.AppendMateriel1') as string,
|
|
|
|
|
// });
|
|
|
|
|
this.customToast(this.$t('message.AppendMateriel1') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (parseFloat(this.qty) <= 0) {
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
// title: this.$t('message.AppendMateriel2') as string,
|
|
|
|
|
// });
|
|
|
|
|
this.customToast(this.$t('message.AppendMateriel2') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (parseFloat(this.qty) > model.blDetailList[this.someIndex].amount) {
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
// title: this.$t('message.AppendMateriel3') as string,
|
|
|
|
|
// });
|
|
|
|
|
this.customToast(this.$t('message.AppendMateriel3') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -330,10 +318,6 @@ export default class RawReceiptDetail extends BasePage {
|
|
|
|
|
num += parseFloat(item.qty);
|
|
|
|
|
});
|
|
|
|
|
if (num > this.model.blDetailList[this.someIndex].amount) {
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
// title: this.$t('message.AppendMateriel3') as string,
|
|
|
|
|
// });
|
|
|
|
|
this.customToast(this.$t('message.AppendMateriel3') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -341,20 +325,12 @@ export default class RawReceiptDetail extends BasePage {
|
|
|
|
|
if (this.LocationList.length != 0) {
|
|
|
|
|
this.model.blDetailList[this.someIndex].wlList.forEach((item: any) => {
|
|
|
|
|
if (this.wlCode.sendSpot != item.Code) {
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
// title: this.$t('message.AppendMateriel4') as string,
|
|
|
|
|
// });
|
|
|
|
|
this.customToast(this.$t('message.AppendMateriel4') as string);
|
|
|
|
|
return (isTrue = false);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if (this.some == {}) {
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
// title: this.$t('message.AppendMateriel5') as string,
|
|
|
|
|
// });
|
|
|
|
|
this.customToast(this.$t('message.AppendMateriel5') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|