|
|
|
@ -176,10 +176,7 @@ export default class VirtualSummary extends BasePage {
|
|
|
|
|
// 检查
|
|
|
|
|
const firstRecord = model.summaryList[0];
|
|
|
|
|
if (firstRecord === undefined) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.LBWK') as string,
|
|
|
|
|
});
|
|
|
|
|
this.customToast(this.$t('message.LBWK') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
console.log('firstRecord', firstRecord);
|
|
|
|
@ -196,10 +193,7 @@ export default class VirtualSummary extends BasePage {
|
|
|
|
|
// 改数
|
|
|
|
|
const firstSelection = this.model.summaryList.find((_: any) => _.checked);
|
|
|
|
|
if (firstSelection === undefined) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.Pi_tip7') as string,
|
|
|
|
|
});
|
|
|
|
|
this.customToast(this.$t('message.Pi_tip7') as string);
|
|
|
|
|
} else {
|
|
|
|
|
const inputAmount = parseFloat(this.amountForm.amount); //本次交接数量
|
|
|
|
|
const totalHvAmount = firstSelection.totalHvAmount;
|
|
|
|
@ -207,10 +201,7 @@ export default class VirtualSummary extends BasePage {
|
|
|
|
|
const totalMoAmount = firstSelection.totalMoAmount; //累计拣配数量
|
|
|
|
|
console.log('2222', 2222222222222222222);
|
|
|
|
|
if (inputAmount + totalMoAmount > demand) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.Pi_tip14') as string,
|
|
|
|
|
});
|
|
|
|
|
this.customToast(this.$t('message.Pi_tip14') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
console.log(1);
|
|
|
|
@ -224,10 +215,7 @@ export default class VirtualSummary extends BasePage {
|
|
|
|
|
inputAmount <= 0
|
|
|
|
|
// inputAmount.toString().split(".")[1].length > 3
|
|
|
|
|
) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.Pi_tip2') as string,
|
|
|
|
|
});
|
|
|
|
|
this.customToast(this.$t('message.Pi_tip2') as string);
|
|
|
|
|
} else {
|
|
|
|
|
// model.updateSummaryItem({
|
|
|
|
|
// index: this.model.summaryList.findIndex((_: any) => _.checked),
|
|
|
|
@ -243,7 +231,7 @@ export default class VirtualSummary extends BasePage {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
icon: 'success',
|
|
|
|
|
title: this.$t('message.success') as string,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
@ -261,10 +249,7 @@ export default class VirtualSummary extends BasePage {
|
|
|
|
|
let selectsta = true;
|
|
|
|
|
console.log('qqq', model.summaryList);
|
|
|
|
|
if (model.summaryList.length === 0) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.Pi_tip4') as string,
|
|
|
|
|
});
|
|
|
|
|
this.customToast(this.$t('message.Pi_tip4') as string);
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
model.summaryList.map((item) => {
|
|
|
|
@ -279,17 +264,11 @@ export default class VirtualSummary extends BasePage {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if (selectsta) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.Pi_tip4') as string,
|
|
|
|
|
});
|
|
|
|
|
this.customToast(this.$t('message.Pi_tip4') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (qtyStase) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: this.$t('message.Summary_PleaseInputNumber') as string,
|
|
|
|
|
});
|
|
|
|
|
this.customToast(this.$t('message.Summary_PleaseInputNumber') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let res = await auth.checkPassword({
|
|
|
|
@ -350,10 +329,11 @@ export default class VirtualSummary extends BasePage {
|
|
|
|
|
orderOutIdList: model.proOrderResultList.map((_: any) => _.orderOutId),
|
|
|
|
|
});
|
|
|
|
|
} catch (e) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: 'none',
|
|
|
|
|
title: (this.$t('message.Summary_Tip') as string) + e.message,
|
|
|
|
|
});
|
|
|
|
|
this.customToast((this.$t('message.Summary_Tip') as string) + e.message);
|
|
|
|
|
// uni.showToast({
|
|
|
|
|
// icon: 'none',
|
|
|
|
|
// title: (this.$t('message.Summary_Tip') as string) + e.message,
|
|
|
|
|
// });
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|