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

master
hou 3 years ago
parent ae0879f2f8
commit 534cc882e8

@ -398,28 +398,43 @@ 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;
} }
await this.model.submitOrderInEnter(this.DNReceivingList); let isTrue = true;
if (this.model.SubmitCode == '1') { this.DNReceivingList.forEach((item: any) => {
const ServeUrl = JSON.parse(uni.getStorageSync('__GWMS_APP_STATE_DATA__')); if (item.wllist.length != 0) {
uni.request({ let num = 0;
url: ServeUrl.server.address + url.material.DNorderin.subcDnInfo, item.wllist.forEach((item: any) => {
method: 'POST', num += parseFloat(item.receiptAmount);
data: { });
dnNo: this.form.documentNo, if (num != parseFloat(item.requestAmount)) {
factoryCode: session.factoryCode, this.customToast(this.$t('message.Pi_tip15') as any);
loginName: session.loginName, return (isTrue = false);
}, }
success: (res: any) => { }
console.log(res.data); });
if (res.data.code != '0' && res.data.list != null) { if (isTrue) {
// this.empty(); await this.model.submitOrderInEnter(this.DNReceivingList);
this.resetForm(); if (this.model.SubmitCode == '1') {
} else if (res.data.code == '0' && res.data.list == null) { const ServeUrl = JSON.parse(uni.getStorageSync('__GWMS_APP_STATE_DATA__'));
this.empty(); uni.request({
this.form.documentNo = ''; 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() { async bill() {

@ -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