fix:优化库位获取逻辑、优化提交后表单重置逻辑;

master
zhoulei 4 years ago
parent 60af1f19fd
commit 31b98f80ba

@ -78,7 +78,6 @@ export default {
handler() {
this.selByValKey();
},
deep: true,
},
},
mounted() {

@ -134,8 +134,13 @@ export default class dnReceiptDom extends BasePage {
poNo: any = null;
//
requestAmount: number = null;
//
async onReady() {
// this.initLocation();
}
//
//
async initLocation() {
//
let means: any = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);
let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any);
@ -156,13 +161,15 @@ export default class dnReceiptDom extends BasePage {
}
//
async query() {
if (this.form.documentNo == '') {
if (!this.form.documentNo) {
uni.showToast({
icon: 'none',
title: this.$t('message.Commission_tips1') as any,
});
return;
}
//
this.initLocation();
await this.model.queryOrderInInfo(this.form.documentNo);
let list: any = localStorage.getItem('list');
localStorage.removeItem('list');
@ -264,21 +271,29 @@ export default class dnReceiptDom extends BasePage {
}
//
resetForm() {
this.form.documentNo = '';
// add table
this.LocationList = [];
//
this.Location = [];
this.poNo = '';
this.poList = [];
//
this.wl = {
value: null,
};
//
this.every = {};
//
// this.material = [];
//
this.materialList = [];
//
this.receiptAmount = null;
}
async onSubmit() {
this.resetForm();
if (this.LocationList.length === 0) {
uni.showToast({
icon: 'none',
@ -287,6 +302,7 @@ export default class dnReceiptDom extends BasePage {
return null;
}
this.every.wllist = this.LocationList;
console.log('new this.every :::: ', this.every);
await this.model.submitOrderInEnter([this.every]);
this.resetForm();
}

Loading…
Cancel
Save