cosmoim-852 fix 委外入库逻辑调整

master
hou 3 years ago
parent ae0879f2f8
commit 534cc882e8

@ -398,6 +398,20 @@ export default class dnReceiptDom extends BasePage {
this.customToast(this.$t('message.Commission_tips5') as any); this.customToast(this.$t('message.Commission_tips5') as any);
return null; return null;
} }
let isTrue = true;
this.DNReceivingList.forEach((item: any) => {
if (item.wllist.length != 0) {
let num = 0;
item.wllist.forEach((item: any) => {
num += parseFloat(item.receiptAmount);
});
if (num != parseFloat(item.requestAmount)) {
this.customToast(this.$t('message.Pi_tip15') as any);
return (isTrue = false);
}
}
});
if (isTrue) {
await this.model.submitOrderInEnter(this.DNReceivingList); await this.model.submitOrderInEnter(this.DNReceivingList);
if (this.model.SubmitCode == '1') { if (this.model.SubmitCode == '1') {
const ServeUrl = JSON.parse(uni.getStorageSync('__GWMS_APP_STATE_DATA__')); const ServeUrl = JSON.parse(uni.getStorageSync('__GWMS_APP_STATE_DATA__'));
@ -422,6 +436,7 @@ export default class dnReceiptDom extends BasePage {
}); });
} }
} }
}
async bill() { async bill() {
if (this.form.documentNo == '') { if (this.form.documentNo == '') {
this.customToast(this.$t('message._tips6') as any); this.customToast(this.$t('message._tips6') as any);

@ -109,12 +109,12 @@ export default class dnReceiptDom extends BasePage {
} }
current = 0; current = 0;
items = [this.$t('message.POPlan'), this.$t('message.WPMInformation')]; items = [this.$t('message.POPlan'), this.$t('message.WPMInformation')];
onClickItem(e: any) { onClickItem(e: any): void {
if (this.current != e.currentIndex) { if (this.current != e.currentIndex) {
this.current = e.currentIndex; this.current = e.currentIndex;
} }
} }
async Submit() { async Submit(): Promise<void> {
if (!this.containerCode) { if (!this.containerCode) {
this.customToast(this.$t('message.Commission_tips1') as any); this.customToast(this.$t('message.Commission_tips1') as any);
return; return;

Loading…
Cancel
Save