eight
2024-08-16 124d2d5fb2fe95bf1503eab0389cf8a80458876d
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
import request from '@/config/axios'
 
// ERP 销售全局统计 VO
export interface ErpSaleSummaryRespVO {
  todayPrice: number // 今日销售金额
  yesterdayPrice: number // 昨日销售金额
  monthPrice: number // 本月销售金额
  yearPrice: number // 今年销售金额
}
 
// ERP 销售时间段统计 VO
export interface ErpSaleTimeSummaryRespVO {
  time: string // 时间
  price: number // 销售金额
}
 
// ERP 销售统计 API
export const SaleStatisticsApi = {
  // 获得销售统计
  getSaleSummary: async (): Promise<ErpSaleSummaryRespVO> => {
    return await request.get({ url: `/erp/sale-statistics/summary` })
  },
 
  // 获得销售时间段统计
  getSaleTimeSummary: async (): Promise<ErpSaleTimeSummaryRespVO[]> => {
    return await request.get({ url: `/erp/sale-statistics/time-summary` })
  }
}