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 @@ + + + + +