dn收货 优化

master
hou 3 years ago
parent 4017a218db
commit 1bb8a1a7f3

@ -348,15 +348,15 @@ export default class RawReceiptDetail extends BasePage {
console.log('this.model.blDetailList',this.model.blDetailList)
}
async onReady() {
let means: any = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);
let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any);
let content = {
loginName: means.session.user.loginName,
loginName: session.loginName,
sendSpot: sendSpot,
factoryCode: means.session.user.factoryCode,
factoryCode: session.factoryCode,
workArea: session.workareaCode,
};
let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content);
console.log('res>>>>>>>>>>>>>>>>>>>>>>',res)
res.forEach((item: any) => {
let pickerName: any = {};
pickerName.label = item.locationCode;
@ -369,6 +369,7 @@ export default class RawReceiptDetail extends BasePage {
item.wlQTyList = [];
});
this.model.blDetailList.length = 0
this.wlCode = this.Location[0]
}
async bill() {
if (this.some == {} || this.some.prdOrder == null) {

@ -162,14 +162,16 @@ export default class dnReceiptDom extends BasePage {
this.customToast(this.$t('message.Commission_tips1') as any);
return;
}
await this.model.ImportQueryOrderInfo(this.form.documentNo.trim());
await this.model.ImportQueryOrderInfo(this.form.documentNo);
if (model.code == '1') {
if(this.model.orderInInfoList.length == 0){
this.empty()
return
}
uni.showToast({
icon: 'success',
title: this.$t('message.successful') as any,
});
console.log('orderInInfoList', this.model.orderInInfoList);
}
let list: any = localStorage.getItem('list');
localStorage.removeItem('list');
this.material = JSON.parse(list);
@ -185,12 +187,12 @@ export default class dnReceiptDom extends BasePage {
item.value = item.poNo;
});
this.poList = arr;
//
this.poListChoice({
pickerName: this.poList.find(() => true),
});
}
}
//
// list valueKey
//
@ -352,6 +354,19 @@ export default class dnReceiptDom extends BasePage {
this.DNReceivingList = [];
await this.query();
}
empty() {
this.LocationList = [];
this.Location = [];
this.poNo = '';
this.poList = [];
this.wl = {
value: null,
};
this.every = {};
this.materialList = [];
this.receiptAmount = null;
this.DNReceivingList = [];
}
async onSubmit() {
if (this.LocationList.length === 0) {
this.customToast(this.$t('message.Commission_tips5') as any);

@ -165,12 +165,14 @@ export default class dnReceiptDom extends BasePage {
}
await this.model.queryOrderInInfo(this.form.documentNo);
if (model.code == '1') {
if(this.model.orderInInfoList.length == 0){
this.empty()
return
}
uni.showToast({
icon: 'success',
title: this.$t('message.successful') as any,
});
console.log('orderInInfoList', this.model.orderInInfoList);
}
let list: any = localStorage.getItem('list');
localStorage.removeItem('list');
this.material = JSON.parse(list);
@ -186,12 +188,12 @@ export default class dnReceiptDom extends BasePage {
item.value = item.poNo;
});
this.poList = arr;
//
this.poListChoice({
pickerName: this.poList.find(() => true),
});
}
}
//
// list valueKey
//
@ -353,6 +355,19 @@ export default class dnReceiptDom extends BasePage {
this.DNReceivingList = [];
await this.query();
}
empty() {
this.LocationList = [];
this.Location = [];
this.poNo = '';
this.poList = [];
this.wl = {
value: null,
};
this.every = {};
this.materialList = [];
this.receiptAmount = null;
this.DNReceivingList = [];
}
async onSubmit() {
if (this.LocationList.length === 0) {
this.customToast(this.$t('message.Commission_tips5') as any);

Loading…
Cancel
Save