gaoluyang
2026-06-29 27cd042df9aca0383a49f3514bc21958dd890912
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { requestClient } from '#/api/request';
 
export namespace ErpSaleStatisticsApi {
  /** 销售全局统计 */
  export interface SaleSummaryRespVO {
    todayPrice: number; // 今日销售金额
    yesterdayPrice: number; // 昨日销售金额
    monthPrice: number; // 本月销售金额
    yearPrice: number; // 今年销售金额
  }
 
  /** 销售时间段统计 */
  export interface SaleTimeSummaryRespVO {
    time: string; // 时间
    price: number; // 销售金额
  }
}
 
/** 获得销售统计 */
export function getSaleSummary() {
  return requestClient.get<ErpSaleStatisticsApi.SaleSummaryRespVO>(
    '/erp/sale-statistics/summary',
  );
}
 
/** 获得销售时间段统计 */
export function getSaleTimeSummary() {
  return requestClient.get<ErpSaleStatisticsApi.SaleTimeSummaryRespVO[]>(
    '/erp/sale-statistics/time-summary',
  );
}