|
|
|
@ -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() {
|
|
|
|
|