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 @@ + +