diff --git a/src/pages/raw/commission/entrant/index.vue b/src/pages/raw/commission/entrant/index.vue index 92461d4..648f926 100644 --- a/src/pages/raw/commission/entrant/index.vue +++ b/src/pages/raw/commission/entrant/index.vue @@ -398,28 +398,43 @@ export default class dnReceiptDom extends BasePage { this.customToast(this.$t('message.Commission_tips5') as any); return null; } - await this.model.submitOrderInEnter(this.DNReceivingList); - if (this.model.SubmitCode == '1') { - const ServeUrl = JSON.parse(uni.getStorageSync('__GWMS_APP_STATE_DATA__')); - uni.request({ - url: ServeUrl.server.address + url.material.DNorderin.subcDnInfo, - method: 'POST', - data: { - dnNo: this.form.documentNo, - factoryCode: session.factoryCode, - loginName: session.loginName, - }, - success: (res: any) => { - console.log(res.data); - if (res.data.code != '0' && res.data.list != null) { - // this.empty(); - this.resetForm(); - } else if (res.data.code == '0' && res.data.list == null) { - this.empty(); - this.form.documentNo = ''; - } - }, - }); + 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); + if (this.model.SubmitCode == '1') { + const ServeUrl = JSON.parse(uni.getStorageSync('__GWMS_APP_STATE_DATA__')); + uni.request({ + url: ServeUrl.server.address + url.material.DNorderin.subcDnInfo, + method: 'POST', + data: { + dnNo: this.form.documentNo, + factoryCode: session.factoryCode, + loginName: session.loginName, + }, + success: (res: any) => { + console.log(res.data); + if (res.data.code != '0' && res.data.list != null) { + // this.empty(); + this.resetForm(); + } else if (res.data.code == '0' && res.data.list == null) { + this.empty(); + this.form.documentNo = ''; + } + }, + }); + } } } async bill() { diff --git a/src/pages/raw/ingoods/dnReceipt/ImportPOReceive.vue b/src/pages/raw/ingoods/dnReceipt/ImportPOReceive.vue index 0002b34..e5796f0 100644 --- a/src/pages/raw/ingoods/dnReceipt/ImportPOReceive.vue +++ b/src/pages/raw/ingoods/dnReceipt/ImportPOReceive.vue @@ -109,12 +109,12 @@ export default class dnReceiptDom extends BasePage { } current = 0; items = [this.$t('message.POPlan'), this.$t('message.WPMInformation')]; - onClickItem(e: any) { + onClickItem(e: any): void { if (this.current != e.currentIndex) { this.current = e.currentIndex; } } - async Submit() { + async Submit(): Promise { if (!this.containerCode) { this.customToast(this.$t('message.Commission_tips1') as any); return;