|
|
@ -181,6 +181,7 @@ export default class RawReceiptDetail extends BasePage {
|
|
|
|
this.LocationList = [];
|
|
|
|
this.LocationList = [];
|
|
|
|
this.qty = '';
|
|
|
|
this.qty = '';
|
|
|
|
this.Barcode = '';
|
|
|
|
this.Barcode = '';
|
|
|
|
|
|
|
|
//不在推荐库位,所以注掉
|
|
|
|
//根据选择一行数据查询库位
|
|
|
|
//根据选择一行数据查询库位
|
|
|
|
// await this.model.queryItemLoc({
|
|
|
|
// await this.model.queryItemLoc({
|
|
|
|
// workArea: session.workareaCode,
|
|
|
|
// workArea: session.workareaCode,
|
|
|
@ -207,8 +208,8 @@ export default class RawReceiptDetail extends BasePage {
|
|
|
|
this.customToast(this.$t('message.barcode') as string);
|
|
|
|
this.customToast(this.$t('message.barcode') as string);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!this.some) {
|
|
|
|
if (JSON.stringify(this.some) == '{}') {
|
|
|
|
this.customToast(this.$t('message.AppendMateriel6') as string);
|
|
|
|
this.customToast(this.$t('message.Commission_tips6') as any);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -256,19 +257,49 @@ export default class RawReceiptDetail extends BasePage {
|
|
|
|
this.customToast(this.$t('message.Commission_tips7') as any);
|
|
|
|
this.customToast(this.$t('message.Commission_tips7') as any);
|
|
|
|
return (isTrue = false);
|
|
|
|
return (isTrue = false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//本次输入容器码与下面容器码相同的所有qty的和,用于最大可添加数量校验
|
|
|
|
|
|
|
|
if (this.Barcode == item.barcode) {
|
|
|
|
allqty += parseFloat(item.qty);
|
|
|
|
allqty += parseFloat(item.qty);
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
//下面表格有数据情况下,添加一个时,最大可添加数量校验
|
|
|
|
if (allqty + parseFloat(this.qty) > parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4)) {
|
|
|
|
if (allqty + parseFloat(this.qty) > parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4)) {
|
|
|
|
this.customToast(this.$t('message.Pi_tip20') as any);
|
|
|
|
this.customToast(this.$t('message.Pi_tip20') as any);
|
|
|
|
return (isTrue = false);
|
|
|
|
return (isTrue = false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
//下面表格没数据时,添加一个时,最大可添加数量校验
|
|
|
|
if (parseFloat(this.qty) > parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4)) {
|
|
|
|
if (parseFloat(this.qty) > parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4)) {
|
|
|
|
this.customToast(this.$t('message.Pi_tip20') as any);
|
|
|
|
this.customToast(this.$t('message.Pi_tip20') as any);
|
|
|
|
return (isTrue = false);
|
|
|
|
return (isTrue = false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (isTrue == true) {
|
|
|
|
if (isTrue == true) {
|
|
|
|
|
|
|
|
// let arr = {
|
|
|
|
|
|
|
|
// wlCode: this.wlCode.label,
|
|
|
|
|
|
|
|
// qty: this.qty,
|
|
|
|
|
|
|
|
// Code: this.wlCode.sendSpot,
|
|
|
|
|
|
|
|
// barcode: this.Barcode,
|
|
|
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
// this.LocationList.push(arr);
|
|
|
|
|
|
|
|
// let objString = JSON.stringify(this.some);
|
|
|
|
|
|
|
|
// let TEM = JSON.parse(objString);
|
|
|
|
|
|
|
|
// TEM.wlList = null;
|
|
|
|
|
|
|
|
// TEM.wlCode = this.wlCode.label;
|
|
|
|
|
|
|
|
// TEM.qty = this.qty;
|
|
|
|
|
|
|
|
// TEM.barcode = this.Barcode;
|
|
|
|
|
|
|
|
// this.model.aggregateList[this.someIndex].wlList.push(TEM);
|
|
|
|
|
|
|
|
// this.model.aggregateList[this.someIndex].currentAmount += parseFloat(this.qty);
|
|
|
|
|
|
|
|
// this.qty = '';
|
|
|
|
|
|
|
|
if (parseFloat(this.qty) + parseFloat(this.some.totalMoAmount) > parseFloat(this.some.amount)) {
|
|
|
|
|
|
|
|
uni.showModal({
|
|
|
|
|
|
|
|
title: 'Tip',
|
|
|
|
|
|
|
|
content: this.$t('message.Pi_tip11') as string,
|
|
|
|
|
|
|
|
confirmText: this.$t('message.workArea_Confirm') as string,
|
|
|
|
|
|
|
|
cancelText: this.$t('message.Cancel') as string,
|
|
|
|
|
|
|
|
showCancel: true,
|
|
|
|
|
|
|
|
success: (res) => {
|
|
|
|
|
|
|
|
if (res.confirm) {
|
|
|
|
let arr = {
|
|
|
|
let arr = {
|
|
|
|
wlCode: this.wlCode.label,
|
|
|
|
wlCode: this.wlCode.label,
|
|
|
|
qty: this.qty,
|
|
|
|
qty: this.qty,
|
|
|
@ -282,58 +313,31 @@ export default class RawReceiptDetail extends BasePage {
|
|
|
|
TEM.wlCode = this.wlCode.label;
|
|
|
|
TEM.wlCode = this.wlCode.label;
|
|
|
|
TEM.qty = this.qty;
|
|
|
|
TEM.qty = this.qty;
|
|
|
|
TEM.barcode = this.Barcode;
|
|
|
|
TEM.barcode = this.Barcode;
|
|
|
|
this.model.aggregateList[this.someIndex].wlList.push(TEM);
|
|
|
|
//add之后有什么操作
|
|
|
|
this.model.aggregateList[this.someIndex].currentAmount += parseFloat(this.qty);
|
|
|
|
this.model.proOrderResultList[this.someIndex].wlList.push(TEM);
|
|
|
|
|
|
|
|
this.model.proOrderResultList[this.someIndex].currentAmount += parseFloat(this.qty);
|
|
|
|
this.qty = '';
|
|
|
|
this.qty = '';
|
|
|
|
// if (parseFloat(this.qty) + parseFloat(this.some.totalMoAmount) > parseFloat(this.some.amount)) {
|
|
|
|
}
|
|
|
|
// uni.showModal({
|
|
|
|
},
|
|
|
|
// title: 'Tip',
|
|
|
|
});
|
|
|
|
// content: this.$t('message.Pi_tip11') as string,
|
|
|
|
} else {
|
|
|
|
// confirmText: this.$t('message.workArea_Confirm') as string,
|
|
|
|
let arr = {
|
|
|
|
// cancelText: this.$t('message.Cancel') as string,
|
|
|
|
wlCode: this.wlCode.label,
|
|
|
|
// showCancel: true,
|
|
|
|
qty: this.qty,
|
|
|
|
// success: (res) => {
|
|
|
|
Code: this.wlCode.sendSpot,
|
|
|
|
// if (res.confirm) {
|
|
|
|
barcode: this.Barcode,
|
|
|
|
// let arr = {
|
|
|
|
};
|
|
|
|
// wlCode: this.wlCode.label,
|
|
|
|
this.LocationList.push(arr);
|
|
|
|
// qty: this.qty,
|
|
|
|
let objString = JSON.stringify(this.some);
|
|
|
|
// Code: this.wlCode.sendSpot,
|
|
|
|
let TEM = JSON.parse(objString);
|
|
|
|
// xxxx: this.form.xxxx,
|
|
|
|
TEM.wlList = null;
|
|
|
|
// };
|
|
|
|
TEM.wlCode = this.wlCode.label;
|
|
|
|
// this.LocationList.push(arr);
|
|
|
|
TEM.qty = this.qty;
|
|
|
|
// let objString = JSON.stringify(this.some);
|
|
|
|
TEM.barcode = this.Barcode;
|
|
|
|
// let TEM = JSON.parse(objString);
|
|
|
|
this.model.proOrderResultList[this.someIndex].wlList.push(TEM);
|
|
|
|
// TEM.wlList = null;
|
|
|
|
this.model.proOrderResultList[this.someIndex].currentAmount += parseFloat(this.qty);
|
|
|
|
// TEM.wlCode = this.wlCode.label;
|
|
|
|
this.qty = '';
|
|
|
|
// TEM.qty = this.qty;
|
|
|
|
}
|
|
|
|
// TEM.xxxx = this.form.xxxx;
|
|
|
|
|
|
|
|
// //add之后有什么操作
|
|
|
|
|
|
|
|
// this.model.proOrderResultList[this.someIndex].wlList.push(TEM);
|
|
|
|
|
|
|
|
// this.model.proOrderResultList[this.someIndex].currentAmount += parseFloat(this.qty);
|
|
|
|
|
|
|
|
// this.qty = '';
|
|
|
|
|
|
|
|
// this.form.xxxx = '';
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// let arr = {
|
|
|
|
|
|
|
|
// wlCode: this.wlCode.label,
|
|
|
|
|
|
|
|
// qty: this.qty,
|
|
|
|
|
|
|
|
// Code: this.wlCode.sendSpot,
|
|
|
|
|
|
|
|
// xxxx: this.form.xxxx,
|
|
|
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
// this.LocationList.push(arr);
|
|
|
|
|
|
|
|
// let objString = JSON.stringify(this.some);
|
|
|
|
|
|
|
|
// let TEM = JSON.parse(objString);
|
|
|
|
|
|
|
|
// TEM.wlList = null;
|
|
|
|
|
|
|
|
// TEM.wlCode = this.wlCode.label;
|
|
|
|
|
|
|
|
// TEM.qty = this.qty;
|
|
|
|
|
|
|
|
// TEM.xxxx = this.form.xxxx;
|
|
|
|
|
|
|
|
// this.model.proOrderResultList[this.someIndex].wlList.push(TEM);
|
|
|
|
|
|
|
|
// this.model.proOrderResultList[this.someIndex].currentAmount += parseFloat(this.qty);
|
|
|
|
|
|
|
|
// this.qty = '';
|
|
|
|
|
|
|
|
// this.form.xxxx = '';
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
deleteItem(index: any) {
|
|
|
|
deleteItem(index: any) {
|
|
|
|