Browse Source

修复自提显示loading

dev-xx
qb 8 months ago
parent
commit
ccc032c200
  1. 53
      src/views/distribution/inventory/distrilbutionBillLadingList.vue

53
src/views/distribution/inventory/distrilbutionBillLadingList.vue

@ -1108,26 +1108,34 @@ export default {
let formattedDate = formatter.format(date); let formattedDate = formatter.format(date);
return formattedDate.replace(/\//g, '-'); return formattedDate.replace(/\//g, '-');
}, },
onLoad(page, params = {}) { async onLoad(page, params = {}) {
this.loading = true; try {
if (this.stockupDate.length > 0) { this.loading = true;
let startDate = this.stockupDate[0]; if (this.stockupDate.length > 0) {
let entDate = this.stockupDate[1]; let startDate = this.stockupDate[0];
params.startDate = this.getTime(startDate.toString()); let entDate = this.stockupDate[1];
params.entDate = this.getTime(entDate.toString()); params.startDate = this.getTime(startDate.toString());
} params.entDate = this.getTime(entDate.toString());
getListOwnNUm(params).then(res => {
console.log('查询数量!!!', res.data.data);
if (!!res.data.data) {
this.treatNum = !res.data.data.treatNum ? 0 : parseInt(res.data.data.treatNum);
this.stopNum = !res.data.data.stopNum ? 0 : res.data.data.stopNum;
this.signedFor = parseInt(res.data.data.signedFor); //
this.sumTotal = parseInt(res.data.data.sumTotal); //
console.log(',.,.已签收', this.signedFor, '全部', this.sumTotal);
} }
}); getListOwnNUm(params).then(res => {
getListOwn(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { console.log('查询数量!!!', res.data.data);
const data = res.data.data; if (!!res.data.data) {
this.treatNum = !res.data.data.treatNum ? 0 : parseInt(res.data.data.treatNum);
this.stopNum = !res.data.data.stopNum ? 0 : res.data.data.stopNum;
this.signedFor = parseInt(res.data.data.signedFor); //
this.sumTotal = parseInt(res.data.data.sumTotal); //
console.log(',.,.已签收', this.signedFor, '全部', this.sumTotal);
}
});
const res = await getListOwn(
page.currentPage,
page.pageSize,
Object.assign(params, this.query)
);
const { code, data } = res.data;
if (code !== 200 || !data) return;
console.log('???????', data); console.log('???????', data);
this.page.total = data.total; this.page.total = data.total;
this.data = data.records; this.data = data.records;
@ -1163,9 +1171,12 @@ export default {
} }
}); });
console.log(this.data); console.log(this.data);
this.loading = false;
this.selectionClear(); this.selectionClear();
}); } catch (error) {
console.log('error :>> ', error);
} finally {
this.loading = false;
}
}, },
}, },
activated() { activated() {

Loading…
Cancel
Save