guoshuang 3 years ago
commit cad91590e2

@ -130,6 +130,28 @@ export default class dnReceiptDom extends BasePage {
//
requestAmount: number = null;
//
async onReady() {
await this.queryLoction();
}
async queryLoction() {
this.Location = [];
let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any);
let content = {
loginName: session.loginName,
sendSpot: sendSpot,
factoryCode: session.factoryCode,
workArea: session.workareaCode,
};
let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content);
res.forEach((item: LocationDetail) => {
let pickerName: any = {};
pickerName.label = item.locationCode;
pickerName.value = item.locationCode + '(' + item.sendSpot + ')';
pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName);
});
this.wl = this.Location[0];
}
//
async initLocation(condition): Promise<LocationDetail[]> {
console.log('condition>>>>>>>>>>>>>>>>>>.', condition);
@ -158,7 +180,7 @@ export default class dnReceiptDom extends BasePage {
}
//
async query() {
this.empty()
this.empty();
if (!this.form.documentNo) {
this.customToast(this.$t('message.Commission_tips1') as any);
return;
@ -166,8 +188,8 @@ export default class dnReceiptDom extends BasePage {
await this.model.ImportQueryOrderInfo(this.form.documentNo);
if (model.code == '1') {
if (this.model.orderInInfoList.length == 0) {
this.empty()
return
this.empty();
return;
}
uni.showToast({
icon: 'success',
@ -242,7 +264,9 @@ export default class dnReceiptDom extends BasePage {
this.Location = [];
//
this.Location = await this.initLocation(this.every);
if (this.Location.length == 0) {
await this.queryLoction();
}
//
this.LocationChoice({
pickerName: this.Location.find(() => true),

@ -131,6 +131,28 @@ export default class dnReceiptDom extends BasePage {
//
requestAmount: number = null;
//
async onReady() {
await this.queryLoction();
}
async queryLoction() {
this.Location = [];
let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any);
let content = {
loginName: session.loginName,
sendSpot: sendSpot,
factoryCode: session.factoryCode,
workArea: session.workareaCode,
};
let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content);
res.forEach((item: LocationDetail) => {
let pickerName: any = {};
pickerName.label = item.locationCode;
pickerName.value = item.locationCode + '(' + item.sendSpot + ')';
pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName);
});
this.wl = this.Location[0];
}
//
async initLocation(condition): Promise<LocationDetail[]> {
console.log('condition>>>>>>>>>>>>>>>>>>.', condition);
@ -159,7 +181,7 @@ export default class dnReceiptDom extends BasePage {
}
//
async query() {
this.empty()
this.empty();
if (!this.form.documentNo) {
this.customToast(this.$t('message.Commission_tips1') as any);
return;
@ -167,8 +189,8 @@ 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
this.empty();
return;
}
uni.showToast({
icon: 'success',
@ -243,7 +265,9 @@ export default class dnReceiptDom extends BasePage {
this.Location = [];
//
this.Location = await this.initLocation(this.every);
if (this.Location.length == 0) {
await this.queryLoction();
}
//
this.LocationChoice({
pickerName: this.Location.find(() => true),

Loading…
Cancel
Save