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.LocationList = [];
this.qty = ''; this.qty = '';
this.Barcode = ''; this.Barcode = '';
//
// //
// await this.model.queryItemLoc({ // await this.model.queryItemLoc({
// workArea: session.workareaCode, // workArea: session.workareaCode,
@ -207,10 +208,10 @@ 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;
} }
await this.model.searchBarcode({ factoryCode: session.factoryCode, loginName: session.loginName, barcode: this.Barcode, productCode: this.some.materialCode }); await this.model.searchBarcode({ factoryCode: session.factoryCode, loginName: session.loginName, barcode: this.Barcode, productCode: this.some.materialCode });
this.Container = this.model.ContainerCode; this.Container = this.model.ContainerCode;
@ -256,84 +257,87 @@ 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);
} }
allqty += parseFloat(item.qty); //qty
if (this.Barcode == item.barcode) {
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 = { // let arr = {
wlCode: this.wlCode.label, // wlCode: this.wlCode.label,
qty: this.qty, // qty: this.qty,
Code: this.wlCode.sendSpot, // Code: this.wlCode.sendSpot,
barcode: this.Barcode, // barcode: this.Barcode,
}; // };
this.LocationList.push(arr); // this.LocationList.push(arr);
let objString = JSON.stringify(this.some); // let objString = JSON.stringify(this.some);
let TEM = JSON.parse(objString); // let TEM = JSON.parse(objString);
TEM.wlList = null; // TEM.wlList = null;
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); // this.model.aggregateList[this.someIndex].wlList.push(TEM);
this.model.aggregateList[this.someIndex].currentAmount += parseFloat(this.qty); // this.model.aggregateList[this.someIndex].currentAmount += parseFloat(this.qty);
this.qty = ''; // this.qty = '';
// if (parseFloat(this.qty) + parseFloat(this.some.totalMoAmount) > parseFloat(this.some.amount)) { if (parseFloat(this.qty) + parseFloat(this.some.totalMoAmount) > parseFloat(this.some.amount)) {
// uni.showModal({ uni.showModal({
// title: 'Tip', title: 'Tip',
// content: this.$t('message.Pi_tip11') as string, content: this.$t('message.Pi_tip11') as string,
// confirmText: this.$t('message.workArea_Confirm') as string, confirmText: this.$t('message.workArea_Confirm') as string,
// cancelText: this.$t('message.Cancel') as string, cancelText: this.$t('message.Cancel') as string,
// showCancel: true, showCancel: true,
// success: (res) => { success: (res) => {
// if (res.confirm) { if (res.confirm) {
// let arr = { let arr = {
// wlCode: this.wlCode.label, wlCode: this.wlCode.label,
// qty: this.qty, qty: this.qty,
// Code: this.wlCode.sendSpot, Code: this.wlCode.sendSpot,
// xxxx: this.form.xxxx, barcode: this.Barcode,
// }; };
// this.LocationList.push(arr); this.LocationList.push(arr);
// let objString = JSON.stringify(this.some); let objString = JSON.stringify(this.some);
// let TEM = JSON.parse(objString); let TEM = JSON.parse(objString);
// TEM.wlList = null; TEM.wlList = null;
// TEM.wlCode = this.wlCode.label; TEM.wlCode = this.wlCode.label;
// TEM.qty = this.qty; TEM.qty = this.qty;
// TEM.xxxx = this.form.xxxx; TEM.barcode = this.Barcode;
// //add //add
// this.model.proOrderResultList[this.someIndex].wlList.push(TEM); this.model.proOrderResultList[this.someIndex].wlList.push(TEM);
// this.model.proOrderResultList[this.someIndex].currentAmount += parseFloat(this.qty); this.model.proOrderResultList[this.someIndex].currentAmount += parseFloat(this.qty);
// this.qty = ''; this.qty = '';
// this.form.xxxx = ''; }
// } },
// }, });
// }); } else {
// } else { let arr = {
// let arr = { wlCode: this.wlCode.label,
// wlCode: this.wlCode.label, qty: this.qty,
// qty: this.qty, Code: this.wlCode.sendSpot,
// Code: this.wlCode.sendSpot, barcode: this.Barcode,
// xxxx: this.form.xxxx, };
// }; this.LocationList.push(arr);
// this.LocationList.push(arr); let objString = JSON.stringify(this.some);
// let objString = JSON.stringify(this.some); let TEM = JSON.parse(objString);
// let TEM = JSON.parse(objString); TEM.wlList = null;
// TEM.wlList = null; TEM.wlCode = this.wlCode.label;
// TEM.wlCode = this.wlCode.label; TEM.qty = this.qty;
// TEM.qty = this.qty; TEM.barcode = this.Barcode;
// TEM.xxxx = this.form.xxxx; this.model.proOrderResultList[this.someIndex].wlList.push(TEM);
// this.model.proOrderResultList[this.someIndex].wlList.push(TEM); this.model.proOrderResultList[this.someIndex].currentAmount += parseFloat(this.qty);
// this.model.proOrderResultList[this.someIndex].currentAmount += parseFloat(this.qty); this.qty = '';
// this.qty = ''; }
// this.form.xxxx = '';
// }
} }
} }
deleteItem(index: any) { deleteItem(index: any) {

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save