cosmoim-852 fix 俄罗斯拣配代码逻辑修改以及添加注释

master
guoshuang 3 years ago
parent e5d7f6b191
commit af89e8740c

@ -181,6 +181,7 @@ export default class RawReceiptDetail extends BasePage {
this.LocationList = [];
this.qty = '';
this.Barcode = '';
//
//
// await this.model.queryItemLoc({
// workArea: session.workareaCode,
@ -207,8 +208,8 @@ export default class RawReceiptDetail extends BasePage {
this.customToast(this.$t('message.barcode') as string);
return;
}
if (!this.some) {
this.customToast(this.$t('message.AppendMateriel6') as string);
if (JSON.stringify(this.some) == '{}') {
this.customToast(this.$t('message.Commission_tips6') as any);
return;
}
@ -256,19 +257,49 @@ export default class RawReceiptDetail extends BasePage {
this.customToast(this.$t('message.Commission_tips7') as any);
return (isTrue = false);
}
//qty
if (this.Barcode == item.barcode) {
allqty += parseFloat(item.qty);
}
});
//
if (allqty + parseFloat(this.qty) > parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4)) {
this.customToast(this.$t('message.Pi_tip20') as any);
return (isTrue = false);
}
} else {
//
if (parseFloat(this.qty) > parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4)) {
this.customToast(this.$t('message.Pi_tip20') as any);
return (isTrue = false);
}
}
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 = {
wlCode: this.wlCode.label,
qty: this.qty,
@ -282,58 +313,31 @@ export default class RawReceiptDetail extends BasePage {
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);
//add
this.model.proOrderResultList[this.someIndex].wlList.push(TEM);
this.model.proOrderResultList[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 = {
// 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;
// //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 = '';
// }
}
},
});
} else {
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.proOrderResultList[this.someIndex].wlList.push(TEM);
this.model.proOrderResultList[this.someIndex].currentAmount += parseFloat(this.qty);
this.qty = '';
}
}
}
deleteItem(index: any) {

@ -199,8 +199,8 @@ export default class RawReceiptDetail extends BasePage {
this.customToast(this.$t('message.barcode') as string);
return;
}
if (!this.some) {
this.customToast(this.$t('message.AppendMateriel6') as string);
if (JSON.stringify(this.some) == '{}') {
this.customToast(this.$t('message.Commission_tips6') as any);
return;
}
//
@ -249,7 +249,9 @@ export default class RawReceiptDetail extends BasePage {
this.customToast(this.$t('message.Commission_tips7') as any);
return (isTrue = false);
}
if (this.Barcode == item.barcode) {
allqty += parseFloat(item.qty);
}
});
if (allqty + parseFloat(this.qty) > parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4)) {
this.customToast(this.$t('message.Pi_tip20') as any);
@ -301,11 +303,10 @@ export default class RawReceiptDetail extends BasePage {
TEM.wlCode = this.wlCode.label;
TEM.qty = this.qty;
//
TEM.xxxx = this.form.xxxx;
TEM.barcode = this.Barcode;
this.model.aggregateList[this.someIndex].wlList.push(TEM);
this.model.aggregateList[this.someIndex].currentAmount += parseFloat(this.qty);
this.qty = '';
this.form.xxxx = '';
}
},
});
@ -323,11 +324,10 @@ export default class RawReceiptDetail extends BasePage {
TEM.wlCode = this.wlCode.label;
TEM.qty = this.qty;
///
TEM.xxxx = this.form.xxxx;
TEM.barcode = this.Barcode;
this.model.aggregateList[this.someIndex].wlList.push(TEM);
this.model.aggregateList[this.someIndex].currentAmount += parseFloat(this.qty);
this.qty = '';
this.form.xxxx = '';
}
}
}

Loading…
Cancel
Save