From 885d9c80b0c0150ff1e1297c7a43fcb1f014a419 Mon Sep 17 00:00:00 2001 From: yangmf_0726 <13243152557@163.com> Date: Fri, 29 Aug 2025 16:04:57 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E8=AE=A2=E5=8D=95=E9=94=80?= =?UTF-8?q?=E5=94=AE=E7=BB=9F=E8=AE=A1=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trade/order/salesStatisticsdetails.ts | 62 +++ src/views/mall/trade/statistics/index.vue | 401 ++++++++++++------ 2 files changed, 334 insertions(+), 129 deletions(-) create mode 100644 src/api/mall/trade/order/salesStatisticsdetails.ts diff --git a/src/api/mall/trade/order/salesStatisticsdetails.ts b/src/api/mall/trade/order/salesStatisticsdetails.ts new file mode 100644 index 00000000..e3e31c19 --- /dev/null +++ b/src/api/mall/trade/order/salesStatisticsdetails.ts @@ -0,0 +1,62 @@ +import request from '@/config/axios' + +export interface GetStatisticsDetailRes { + code: number; + data: { + list: { + id: number; + userId: number; + orderId: number; + spuId: number; + spuName: string; + skuId: number; + deviceId: string; + barCode: string; + cabinetChannel: string; + picUrl: string; + count: number; + price: number; + discountPrice: number; + payPrice: number; + orderPartPrice: number; + orderDividePrice: number; + afterSaleStatus: number; + no: string; + createTime: string; // 修改为正确的类型 + }[]; + total: number; + }; +} + +// 查询参数接口 +export interface StatisticsDetailPageReqVO { + pageNo?: number + pageSize?: number + no?: string // 改为no参数,类型为string + spuId?: number + spuName?: string + userId?: number + deviceId?: string + barCode?: string + createTime?: string[] + afterSaleStatus?: number +} + +// 销售统计详情API +export const SalesStatisticsDetailsApi = { + // 查询销售统计详情分页 + getStatisticsDetailPage: async (params: StatisticsDetailPageReqVO) => { + return await request.get({ + url: '/trade/order/statistics-detail', + params + }) + }, + + // 导出销售统计详情 Excel + exportStatisticsDetail: async (params: StatisticsDetailPageReqVO) => { + return await request.download({ + url: '/trade/order/export-excel', + params + }) + } +} diff --git a/src/views/mall/trade/statistics/index.vue b/src/views/mall/trade/statistics/index.vue index e196403b..d326a4fe 100644 --- a/src/views/mall/trade/statistics/index.vue +++ b/src/views/mall/trade/statistics/index.vue @@ -1,168 +1,311 @@ + +