From cd86c08e59512233f4dbfdde804525d18c1cac3f Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 18 Feb 2024 19:05:57 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=96=20ERP=EF=BC=9A=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=20ERP=20=E9=A6=96=E9=A1=B5=E7=9A=84=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/erp/statistics/purchase/index.ts | 28 ++++++ src/api/erp/statistics/sale/index.ts | 28 ++++++ src/views/erp/home/components/SummaryCard.vue | 21 +++++ .../erp/home/components/TimeSummaryChart.vue | 86 ++++++++++++++++++ src/views/erp/home/index.vue | 91 +++++++++++++++++++ 5 files changed, 254 insertions(+) create mode 100644 src/api/erp/statistics/purchase/index.ts create mode 100644 src/api/erp/statistics/sale/index.ts create mode 100644 src/views/erp/home/components/SummaryCard.vue create mode 100644 src/views/erp/home/components/TimeSummaryChart.vue create mode 100644 src/views/erp/home/index.vue diff --git a/src/api/erp/statistics/purchase/index.ts b/src/api/erp/statistics/purchase/index.ts new file mode 100644 index 00000000..80d907a0 --- /dev/null +++ b/src/api/erp/statistics/purchase/index.ts @@ -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 => { + return await request.get({ url: `/erp/purchase-statistics/summary` }) + }, + + // 获得采购时间段统计 + getPurchaseTimeSummary: async (): Promise => { + return await request.get({ url: `/erp/purchase-statistics/time-summary` }) + } +} diff --git a/src/api/erp/statistics/sale/index.ts b/src/api/erp/statistics/sale/index.ts new file mode 100644 index 00000000..09d85007 --- /dev/null +++ b/src/api/erp/statistics/sale/index.ts @@ -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 => { + return await request.get({ url: `/erp/sale-statistics/summary` }) + }, + + // 获得销售时间段统计 + getSaleTimeSummary: async (): Promise => { + return await request.get({ url: `/erp/sale-statistics/time-summary` }) + } +} diff --git a/src/views/erp/home/components/SummaryCard.vue b/src/views/erp/home/components/SummaryCard.vue new file mode 100644 index 00000000..21a02e27 --- /dev/null +++ b/src/views/erp/home/components/SummaryCard.vue @@ -0,0 +1,21 @@ + + diff --git a/src/views/erp/home/components/TimeSummaryChart.vue b/src/views/erp/home/components/TimeSummaryChart.vue new file mode 100644 index 00000000..127fa87b --- /dev/null +++ b/src/views/erp/home/components/TimeSummaryChart.vue @@ -0,0 +1,86 @@ + + diff --git a/src/views/erp/home/index.vue b/src/views/erp/home/index.vue new file mode 100644 index 00000000..93533304 --- /dev/null +++ b/src/views/erp/home/index.vue @@ -0,0 +1,91 @@ + + +