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

@ -162,34 +162,36 @@ export default class dnReceiptDom extends BasePage {
this.customToast(this.$t('message.Commission_tips1') as any); this.customToast(this.$t('message.Commission_tips1') as any);
return; return;
} }
await this.model.ImportQueryOrderInfo(this.form.documentNo.trim()); await this.model.ImportQueryOrderInfo(this.form.documentNo);
if (model.code == '1') { if (model.code == '1') {
if(this.model.orderInInfoList.length == 0){
this.empty()
return
}
uni.showToast({ uni.showToast({
icon: 'success', icon: 'success',
title: this.$t('message.successful') as any, 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);
this.DNReceivingList = JSON.parse(list);
this.DNReceivingList.forEach((item: any) => {
item.wllist = [];
});
this.poList = [...this.DNReceivingList]; //
let arr = this.removeDuplicates(this.poList, 'poNo');
//
arr.forEach((item: any) => {
item.label = item.poNo;
item.value = item.poNo;
});
this.poList = arr;
//
this.poListChoice({
pickerName: this.poList.find(() => true),
});
} }
let list: any = localStorage.getItem('list');
localStorage.removeItem('list');
this.material = JSON.parse(list);
this.DNReceivingList = JSON.parse(list);
this.DNReceivingList.forEach((item: any) => {
item.wllist = [];
});
this.poList = [...this.DNReceivingList]; //
let arr = this.removeDuplicates(this.poList, 'poNo');
//
arr.forEach((item: any) => {
item.label = item.poNo;
item.value = item.poNo;
});
this.poList = arr;
//
this.poListChoice({
pickerName: this.poList.find(() => true),
});
} }
// //
// list valueKey // list valueKey
@ -352,6 +354,19 @@ export default class dnReceiptDom extends BasePage {
this.DNReceivingList = []; this.DNReceivingList = [];
await this.query(); 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() { async onSubmit() {
if (this.LocationList.length === 0) { if (this.LocationList.length === 0) {
this.customToast(this.$t('message.Commission_tips5') as any); this.customToast(this.$t('message.Commission_tips5') as any);

@ -165,32 +165,34 @@ export default class dnReceiptDom extends BasePage {
} }
await this.model.queryOrderInInfo(this.form.documentNo); await this.model.queryOrderInInfo(this.form.documentNo);
if (model.code == '1') { if (model.code == '1') {
if(this.model.orderInInfoList.length == 0){
this.empty()
return
}
uni.showToast({ uni.showToast({
icon: 'success', icon: 'success',
title: this.$t('message.successful') as any, title: this.$t('message.successful') as any,
}); });
console.log('orderInInfoList', this.model.orderInInfoList); let list: any = localStorage.getItem('list');
} localStorage.removeItem('list');
let list: any = localStorage.getItem('list'); this.material = JSON.parse(list);
localStorage.removeItem('list'); this.DNReceivingList = JSON.parse(list);
this.material = JSON.parse(list); this.DNReceivingList.forEach((item: any) => {
this.DNReceivingList = JSON.parse(list);
this.DNReceivingList.forEach((item: any) => {
item.wllist = []; item.wllist = [];
}); });
this.poList = [...this.DNReceivingList]; // this.poList = [...this.DNReceivingList]; //
let arr = this.removeDuplicates(this.poList, 'poNo'); let arr = this.removeDuplicates(this.poList, 'poNo');
// //
arr.forEach((item: any) => { arr.forEach((item: any) => {
item.label = item.poNo; item.label = item.poNo;
item.value = item.poNo; item.value = item.poNo;
}); });
this.poList = arr; this.poList = arr;
//
// this.poListChoice({
this.poListChoice({ pickerName: this.poList.find(() => true),
pickerName: this.poList.find(() => true), });
}); }
} }
// //
// list valueKey // list valueKey
@ -353,6 +355,19 @@ export default class dnReceiptDom extends BasePage {
this.DNReceivingList = []; this.DNReceivingList = [];
await this.query(); 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() { async onSubmit() {
if (this.LocationList.length === 0) { if (this.LocationList.length === 0) {
this.customToast(this.$t('message.Commission_tips5') as any); this.customToast(this.$t('message.Commission_tips5') as any);

Loading…
Cancel
Save