From ccc032c200fadbc2e43f8e331392f690bb0ad895 Mon Sep 17 00:00:00 2001 From: qb <1191961160@qq.com> Date: Thu, 15 Aug 2024 11:45:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=87=AA=E6=8F=90=E6=98=BE?= =?UTF-8?q?=E7=A4=BAloading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inventory/distrilbutionBillLadingList.vue | 53 +++++++++++-------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/src/views/distribution/inventory/distrilbutionBillLadingList.vue b/src/views/distribution/inventory/distrilbutionBillLadingList.vue index 3cef4b2d..8b9575cc 100644 --- a/src/views/distribution/inventory/distrilbutionBillLadingList.vue +++ b/src/views/distribution/inventory/distrilbutionBillLadingList.vue @@ -1108,26 +1108,34 @@ export default { let formattedDate = formatter.format(date); return formattedDate.replace(/\//g, '-'); }, - onLoad(page, params = {}) { - this.loading = true; - if (this.stockupDate.length > 0) { - let startDate = this.stockupDate[0]; - let entDate = this.stockupDate[1]; - 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); + async onLoad(page, params = {}) { + try { + this.loading = true; + if (this.stockupDate.length > 0) { + let startDate = this.stockupDate[0]; + let entDate = this.stockupDate[1]; + params.startDate = this.getTime(startDate.toString()); + params.entDate = this.getTime(entDate.toString()); } - }); - getListOwn(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { - const data = res.data.data; + 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); + } + }); + 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); this.page.total = data.total; this.data = data.records; @@ -1163,9 +1171,12 @@ export default { } }); console.log(this.data); - this.loading = false; this.selectionClear(); - }); + } catch (error) { + console.log('error :>> ', error); + } finally { + this.loading = false; + } }, }, activated() {