From 6c9a3820e83628ff34686fcae522f16b70309c96 Mon Sep 17 00:00:00 2001 From: "pikachu1995@126.com" Date: Mon, 20 Jul 2026 09:10:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat(statistics):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=A8=A1=E5=9D=97=E5=8F=8A=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E8=A7=86=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manager/src/api/statistics.js | 116 +++++ manager/src/views/statistics/deposit.vue | 148 ++++++ manager/src/views/statistics/distribution.vue | 213 +++++++++ manager/src/views/statistics/goods.vue | 318 ++++++++++--- manager/src/views/statistics/marketing.vue | 171 +++++++ manager/src/views/statistics/member.vue | 446 +++++++++++++----- manager/src/views/statistics/overview.vue | 351 ++++++++++++++ manager/src/views/statistics/points.vue | 202 ++++++++ 8 files changed, 1778 insertions(+), 187 deletions(-) create mode 100644 manager/src/api/statistics.js create mode 100644 manager/src/views/statistics/deposit.vue create mode 100644 manager/src/views/statistics/distribution.vue create mode 100644 manager/src/views/statistics/marketing.vue create mode 100644 manager/src/views/statistics/overview.vue create mode 100644 manager/src/views/statistics/points.vue diff --git a/manager/src/api/statistics.js b/manager/src/api/statistics.js new file mode 100644 index 00000000..cf820242 --- /dev/null +++ b/manager/src/api/statistics.js @@ -0,0 +1,116 @@ +import { getRequest } from "@/libs/axios"; + +/** 营业概况 */ +export const getBusinessOverview = (params) => { + return getRequest("/statistics/overview", params); +}; + +/** 收款构成 */ +export const getBusinessSource = (params) => { + return getRequest("/statistics/overview/source", params); +}; + +/** 营业构成 */ +export const getBusinessComposition = (params) => { + return getRequest("/statistics/overview/businessComposition", params); +}; + +/** 商品概况 */ +export const getGoodsOverview = (params) => { + return getRequest("/statistics/goods/overview", params); +}; + +/** 退货排行榜 TOP10 */ +export const getGoodsRefundRank = (params) => { + return getRequest("/statistics/goods/rank/refund", params); +}; + +/** 畅销排行榜 TOP10 */ +export const getGoodsSalesRank = (params) => { + return getRequest("/statistics/goods/rank/sales", params); +}; + +/** 分类排行 */ +export const getGoodsCategoryRank = (params) => { + return getRequest("/statistics/goods/getCategoryByPage", params); +}; + +/** 会员概况 */ +export const getMemberOverview = (params) => { + return getRequest("/statistics/member/overview", params); +}; + +/** 会员新增人数趋势 */ +export const getMemberNewTrend = (params) => { + return getRequest("/statistics/member/trend", params); +}; + +/** 客户分析 */ +export const getMemberAnalysis = (params) => { + return getRequest("/statistics/member/analysis", params); +}; + +/** 性别分布 */ +export const getMemberGenderDistribution = (params) => { + return getRequest("/statistics/member/distribution/gender", params); +}; + +/** 地域分布 */ +export const getMemberRegionDistribution = (params) => { + return getRequest("/statistics/member/distribution/region", params); +}; + +/** 积分分析概览 */ +export const getPointsOverview = () => { + return getRequest("/statistics/points"); +}; + +/** 客户可用积分分布 */ +export const getPointsDistribution = () => { + return getRequest("/statistics/points/distribution"); +}; + +/** 积分累计分发分布 */ +export const getPointsSourceDistribution = () => { + return getRequest("/statistics/points/sourceDistribution"); +}; + +/** 客户身份积分累计统计 */ +export const getPointsIdentityStat = () => { + return getRequest("/statistics/points/identityStat"); +}; + +/** 储值余额分布 */ +export const getDepositBalanceDistribution = () => { + return getRequest("/statistics/deposit/balanceDistribution"); +}; + +/** 储值充值次数分布 */ +export const getDepositRechargeTimesDistribution = () => { + return getRequest("/statistics/deposit/rechargeTimesDistribution"); +}; + +/** 储值充值金额分布 */ +export const getDepositRechargeAmountDistribution = () => { + return getRequest("/statistics/deposit/rechargeAmountDistribution"); +}; + +/** 营销概况 */ +export const getMarketingOverview = (params) => { + return getRequest("/statistics/marketing", params); +}; + +/** 分销概况 */ +export const getDistributionOverview = (params) => { + return getRequest("/statistics/distribution", params); +}; + +/** TOP分销员 */ +export const getDistributionRankDistributor = (params) => { + return getRequest("/statistics/distribution/rank/distributor", params); +}; + +/** TOP分销商品 */ +export const getDistributionRankGoods = (params) => { + return getRequest("/statistics/distribution/rank/goods", params); +}; diff --git a/manager/src/views/statistics/deposit.vue b/manager/src/views/statistics/deposit.vue new file mode 100644 index 00000000..e9d7fca2 --- /dev/null +++ b/manager/src/views/statistics/deposit.vue @@ -0,0 +1,148 @@ + + + + + diff --git a/manager/src/views/statistics/distribution.vue b/manager/src/views/statistics/distribution.vue new file mode 100644 index 00000000..61d6be16 --- /dev/null +++ b/manager/src/views/statistics/distribution.vue @@ -0,0 +1,213 @@ + + + + + diff --git a/manager/src/views/statistics/goods.vue b/manager/src/views/statistics/goods.vue index 61dd4071..70113c80 100644 --- a/manager/src/views/statistics/goods.vue +++ b/manager/src/views/statistics/goods.vue @@ -1,107 +1,293 @@ + + diff --git a/manager/src/views/statistics/marketing.vue b/manager/src/views/statistics/marketing.vue new file mode 100644 index 00000000..a7199ab6 --- /dev/null +++ b/manager/src/views/statistics/marketing.vue @@ -0,0 +1,171 @@ + + + + + diff --git a/manager/src/views/statistics/member.vue b/manager/src/views/statistics/member.vue index 0e2d7da3..7e276ca5 100644 --- a/manager/src/views/statistics/member.vue +++ b/manager/src/views/statistics/member.vue @@ -2,167 +2,311 @@
- + -
-

- 客户增长趋势 - - {{ enableShowMemberCount ? "关闭" : "显示" }}用户总人数 - -

-
+

会员概况

+
+
+
+ {{ item.label }} + + + +
+
+ + +
+
+ 环比 {{ rateText(item.metric) }} +
+
-
-

客户增长报表

- - - - - - +

会员人数趋势图

+
+ + + +

客户分析

+
+
+
活跃客户数
+
{{ analysis.activeMemberNum || 0 }}
+
+
+
复购率
+
{{ formatPercent(analysis.repurchaseRate) }}
+
+
+
新客占比
+
{{ formatPercent(analysis.newCustomerRatio) }}
+
+
+
老客占比
+
{{ formatPercent(analysis.oldCustomerRatio) }}
+
+ + +

客户分布

+ + +
性别分布
+ + + + + + + + + +
+ +
地域分布
+ + + + + + + +
+
+
+ + diff --git a/manager/src/views/statistics/overview.vue b/manager/src/views/statistics/overview.vue new file mode 100644 index 00000000..d8fc4a5b --- /dev/null +++ b/manager/src/views/statistics/overview.vue @@ -0,0 +1,351 @@ + + + + + diff --git a/manager/src/views/statistics/points.vue b/manager/src/views/statistics/points.vue new file mode 100644 index 00000000..361a295f --- /dev/null +++ b/manager/src/views/statistics/points.vue @@ -0,0 +1,202 @@ + + + + + From 3be9aa5c144d2dfe5403fb0249cc66b4500bd8a6 Mon Sep 17 00:00:00 2001 From: "pikachu1995@126.com" Date: Mon, 20 Jul 2026 15:31:41 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat(statistics):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=BA=97=E9=93=BA=E4=B8=9A=E7=BB=A9=E3=80=81=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=90=8C=E6=AF=94=E7=8E=AF=E6=AF=94=E3=80=81=E9=94=80=E5=94=AE?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=98=8E=E7=BB=86=E5=8F=8A=E5=95=86=E5=93=81?= =?UTF-8?q?=E9=94=80=E5=94=AE=E6=B1=87=E6=80=BB=E6=8A=A5=E8=A1=A8=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=E5=92=8C=E7=9B=B8=E5=85=B3=20API=20=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/public/index.html | 2 +- buyer/vue.config.js | 1 + im/vue.config.js | 2 +- manager/public/index.html | 4 +- manager/src/api/statistics.js | 36 +++ manager/src/components/editor/config.js | 2 +- manager/src/router/router.js | 28 ++ manager/src/views/statistics/data-report.vue | 161 ++++++++++ .../src/views/statistics/goods-comparison.vue | 287 ++++++++++++++++++ .../views/statistics/goods-sales-summary.vue | 160 ++++++++++ .../views/statistics/sales-order-detail.vue | 165 ++++++++++ .../views/statistics/store-performance.vue | 185 +++++++++++ manager/vue.config.js | 1 + seller/public/index.html | 4 +- seller/src/api/statistics.js | 33 ++ seller/src/libs/routerJson.js | 9 + seller/src/router/router.js | 28 ++ .../views/lili-components/editor/config.js | 2 +- seller/src/views/statistics/data-report.vue | 161 ++++++++++ .../src/views/statistics/goods-comparison.vue | 276 +++++++++++++++++ .../views/statistics/goods-sales-summary.vue | 147 +++++++++ .../views/statistics/sales-order-detail.vue | 151 +++++++++ .../views/statistics/store-performance.vue | 172 +++++++++++ seller/vue.config.js | 1 + 24 files changed, 2010 insertions(+), 8 deletions(-) create mode 100644 manager/src/views/statistics/data-report.vue create mode 100644 manager/src/views/statistics/goods-comparison.vue create mode 100644 manager/src/views/statistics/goods-sales-summary.vue create mode 100644 manager/src/views/statistics/sales-order-detail.vue create mode 100644 manager/src/views/statistics/store-performance.vue create mode 100644 seller/src/views/statistics/data-report.vue create mode 100644 seller/src/views/statistics/goods-comparison.vue create mode 100644 seller/src/views/statistics/goods-sales-summary.vue create mode 100644 seller/src/views/statistics/sales-order-detail.vue create mode 100644 seller/src/views/statistics/store-performance.vue diff --git a/buyer/public/index.html b/buyer/public/index.html index 1a632be6..99ba65cc 100644 --- a/buyer/public/index.html +++ b/buyer/public/index.html @@ -9,7 +9,7 @@ <%= htmlWebpackPlugin.options.title %> - + diff --git a/buyer/vue.config.js b/buyer/vue.config.js index 196d993f..8f937f61 100644 --- a/buyer/vue.config.js +++ b/buyer/vue.config.js @@ -6,6 +6,7 @@ const resolve = (dir) => path.join(__dirname, dir); const enableProduction = process.env.NODE_ENV === "production"; module.exports = { + publicPath: process.env.VUE_APP_PUBLIC_PATH || "/", outputDir: "dist", assetsDir: "static", css: { diff --git a/im/vue.config.js b/im/vue.config.js index 4e91e9d6..8c7b5faa 100644 --- a/im/vue.config.js +++ b/im/vue.config.js @@ -12,7 +12,7 @@ function resolve(dir) { // vue.config.js const vueConfig = { // 公共路径(必须有的) - publicPath: '/', + publicPath: process.env.VUE_APP_PUBLIC_PATH || '/', // 输出文件目录 outputDir: 'dist', // 静态资源存放的文件夹(相对于ouputDir) diff --git a/manager/public/index.html b/manager/public/index.html index 671140da..bb773a6e 100644 --- a/manager/public/index.html +++ b/manager/public/index.html @@ -72,8 +72,8 @@ <% for(var js of htmlWebpackPlugin.options.cdn.js) { %> <% } %> - - + +