📖 ERP:增加 ERP 首页的统计

This commit is contained in:
YunaiV
2024-02-18 19:05:57 +08:00
parent 71ac59f22e
commit cd86c08e59
5 changed files with 254 additions and 0 deletions

View File

@ -0,0 +1,28 @@
import request from '@/config/axios'
// ERP 采购全局统计 VO
export interface ErpPurchaseSummaryRespVO {
todayPrice: number // 今日采购金额
yesterdayPrice: number // 昨日采购金额
monthPrice: number // 本月采购金额
yearPrice: number // 今年采购金额
}
// ERP 采购时间段统计 VO
export interface ErpPurchaseTimeSummaryRespVO {
time: string // 时间
price: number // 采购金额
}
// ERP 采购统计 API
export const PurchaseStatisticsApi = {
// 获得采购统计
getPurchaseSummary: async (): Promise<ErpPurchaseSummaryRespVO> => {
return await request.get({ url: `/erp/purchase-statistics/summary` })
},
// 获得采购时间段统计
getPurchaseTimeSummary: async (): Promise<ErpPurchaseTimeSummaryRespVO[]> => {
return await request.get({ url: `/erp/purchase-statistics/time-summary` })
}
}

View File

@ -0,0 +1,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` })
}
}