From fafdc131bf3828ce85cbcc446c5d8e1f75a29733 Mon Sep 17 00:00:00 2001 From: aihe <961836564@qq.com> Date: Tue, 18 Jun 2024 16:43:27 +0800 Subject: [PATCH] uu --- common/api/order.js | 6 ++++++ common/api/url.js | 2 ++ pages/tabBar/order/order.vue | 40 +++++++++++++++--------------------- 3 files changed, 25 insertions(+), 23 deletions(-) diff --git a/common/api/order.js b/common/api/order.js index 57682f3..18e914d 100644 --- a/common/api/order.js +++ b/common/api/order.js @@ -106,6 +106,12 @@ export const getOrderList = (data = {})=> { return coreRequest(url.getOrderList, data, {}, "GET") } +// 订单列表 +export const getWaybillStatMap = (data = {})=> { + return coreRequest(url.getWaybillStatMap, data, {}, "GET") +} + + // 订单详情 export const getOrderDetail = (data = {})=> { return coreRequest(url.getOrderDetail, data, {}, "GET") diff --git a/common/api/url.js b/common/api/url.js index 7c6ab11..69c3ad9 100644 --- a/common/api/url.js +++ b/common/api/url.js @@ -38,6 +38,7 @@ export default { calcVolumeWeight: `/emis/emisWaybill/calcVolumeWeight`, // 体积重量计算 warehouseInList: `/emis/emisWarehouseIn/listSimple`, // 下单-进仓单列表 getOrderList: `/emis/emisWaybill/listSimple`, // 订单列表 + getWaybillStatMap: `/emis/emisWaybill/getWaybillStatMap`, // 运单统计数据 getOrderDetail: `/emis/emisWaybill/getWaybillDetail`, // 订单详情 scanRecord: `/emis/emisTmsScanRecord/scan`, // 扫描- 揽收 getRealGetWaybillPrintData: `/emis/emisWaybill/realGetPrintList`, // 运单 打印数据 @@ -54,5 +55,6 @@ export default { queryScanWaybillList: `/emis/emisWaybill/queryScanWaybillList`, // 1-发件清单 2-到件清单 3-派件清单 uploadWaybillAttach: `/emis/emisWaybillAttachment/uploadWaybillAttach`, // 运单附件上传 getPackNo: `/emis/common/getPackNo`, // 生成合包号 + } diff --git a/pages/tabBar/order/order.vue b/pages/tabBar/order/order.vue index 0354e90..dfdef2d 100644 --- a/pages/tabBar/order/order.vue +++ b/pages/tabBar/order/order.vue @@ -6,24 +6,6 @@ 订单概况 - - - - - - - - 统计- - - - - - - - - @@ -53,7 +35,7 @@ @tabchange="(val)=> { handleSearchParamChange() }" v-slot="curOrdTab" > - ({{curOrdTab.item.val}}) + ({{ staticInfo.orderStat[curOrdTab.item.val] || 0 }}) @@ -112,8 +94,8 @@ staticDataList(){ let { commStat } = this.staticInfo let list = [ - { title: '待处理订单', subTitle: commStat.estMoney || 0, url: '', code: authCodeEnum.dingDanGaiKuang }, - { title: '累计处理订单', subTitle: commStat.waitPay || 0, url: '', code: authCodeEnum.dingDanGaiKuang } + { title: '待处理订单', subTitle: commStat.waitDoNum || 0, url: '', code: authCodeEnum.dingDanGaiKuang }, + { title: '累计处理订单', subTitle: commStat.hasDoNum || 0, url: '', code: authCodeEnum.dingDanGaiKuang } ] list = getAuthList({ list, _thisPage: this }) return list @@ -126,7 +108,8 @@ authCodeEnum, ...JSON.parse(JSON.stringify({ dateRangeList })), searchParam: { - date: dateRangeList[0].val, + billCode: '', + _date: [], waybillStatType: dicData?.emis_waybill_stat_type?.[0]?.val, }, queryOption: { @@ -149,6 +132,7 @@ }, onShow(){ this?.$refs?.listRef?.getDataList?.(true) // 重置到第一页数据 + this.initData() }, onLoad(option) { this.queryOption = option @@ -159,7 +143,17 @@ methods: { getListFun: apiService.getOrderList, initData(){ - + this.getStaticData() + }, + async getStaticData(){ + const staRes = await apiService.getWaybillStatMap() + let { hasDoNum, waitDoNum, statNumList } = staRes.data + this.staticInfo.commStat = { hasDoNum, waitDoNum } + let orderStat = {} + statNumList.map(t=> { + orderStat[t.statType] = t.statNum + }) + this.staticInfo.orderStat = orderStat }, async handleDealItem(item, deal = { type: '1' }) { let itemQuery = `?billCode=${item.billCode || ''}&orderSn=${item.orderSn || ''}`