From 1ad16fa70a710fa4e446984436dafd5b33baad3a Mon Sep 17 00:00:00 2001 From: wangfukang <15630117759@163.com> Date: Tue, 18 Aug 2026 08:26:25 +0800 Subject: [PATCH] 1 --- src/api/app.js | 6 + .../app/data-statistics/data-statistics.vue | 182 +++++++++++++++++- 2 files changed, 182 insertions(+), 6 deletions(-) diff --git a/src/api/app.js b/src/api/app.js index e4e6a26..a4c9b20 100644 --- a/src/api/app.js +++ b/src/api/app.js @@ -202,6 +202,12 @@ export const getBillDetailList = (params) => { export const getDataStatisticsSummary = (params) => { return postBodyRequest('/mall/admin/dataStatistics/summary', params) } +export const getWorkerDebtPage = (params) => { + return postBodyRequest('/mall/admin/dataStatistics/workerDebtPage', params) +} +export const getWorkerPositiveBalancePage = (params) => { + return postBodyRequest('/mall/admin/dataStatistics/workerPositiveBalancePage', params) +} export const settlementConfirm = (params) => { return postBodyRequest('/mall/admin/settlement/confirmByShop', params) } diff --git a/src/views/app/data-statistics/data-statistics.vue b/src/views/app/data-statistics/data-statistics.vue index 55f389b..97e491f 100644 --- a/src/views/app/data-statistics/data-statistics.vue +++ b/src/views/app/data-statistics/data-statistics.vue @@ -54,7 +54,7 @@ - 统计口径:订单按支付时间,退款/售后按成功时间,抽奖按开奖时间;流水总金额=订单totalAmount总金额,有效流水总金额=流水总金额-退款总金额-售后总金额;微信手续费=有效流水总金额*0.006。 + 统计口径:订单按支付时间,退款/售后按成功时间,抽奖按开奖时间;流水总金额=订单支付总金额,有效流水总金额=流水总金额-退款总金额-售后总金额;微信手续费=有效流水总金额*0.006。
订单数据 @@ -91,7 +91,7 @@
- 订单totalAmount总金额 + 订单支付总金额
@@ -232,13 +232,42 @@ -
+
-
{{ statistics.deliveryFeeAmount }}
-
配送费总额(元)
+
{{ statistics.deliveryFeeAmount }}
+
--
+
+ 配送员可提现金额(元) + + +
+ 统计所选日期范围内每日余额为正数的配送员,金额为正余额累计(包含配送奖励),点击查看明细。 +
+
+
+
+
+ + +
+
+ +
+
+
{{ statistics.workerDebtCount }}
+
--
+
+ 昨日欠款配送员(人) + + +
+ 统计所选日期范围内每日余额为负数的配送员,点击查看明细。 +
+
+
@@ -346,7 +375,7 @@
{{ rewardTotalAmount }}
-
抽奖奖励、排位奖励、配送奖励(元)
+
抽奖奖励、游戏排位奖励(元)
@@ -379,6 +408,20 @@ + +
+ + + +
+ +
+ + + +
@@ -435,6 +478,8 @@ } from "@/api/index"; import { getDataStatisticsSummary, + getWorkerDebtPage, + getWorkerPositiveBalancePage, } from "@/api/app"; import { ieReportPage, @@ -456,6 +501,22 @@ return date && date.valueOf() > Date.now() } }, + workerDebtModalVisible: false, + workerDebtLoading: false, + workerDebtList: [], + workerDebtTotal: 0, + workerDebtSearch: { + pageNumber: 1, + pageSize: 10 + }, + workerPositiveBalanceModalVisible: false, + workerPositiveBalanceLoading: false, + workerPositiveBalanceList: [], + workerPositiveBalanceTotal: 0, + workerPositiveBalanceSearch: { + pageNumber: 1, + pageSize: 10 + }, ieReportLoading: false, ieReportList: [], ieReportTotal: 0, @@ -490,6 +551,30 @@ status: "", regionId: "" }, + workerDebtColumns: [ + { title: "日期", key: "balanceDate", width: 120 }, + { title: "姓名", key: "workerName", minWidth: 120 }, + { title: "手机号", key: "mobile", minWidth: 130 }, + { + title: "昨日佣金余额", + key: "dailyBalance", + minWidth: 130, + render: (h, params) => h("span", { style: { color: "#ed4014" } }, params.row.dailyBalance) + }, + { title: "变更后可提现余额", key: "availableBalanceAfter", minWidth: 150 } + ], + workerPositiveBalanceColumns: [ + { title: "日期", key: "balanceDate", width: 120 }, + { title: "姓名", key: "workerName", minWidth: 120 }, + { title: "手机号", key: "mobile", minWidth: 130 }, + { + title: "昨日佣金余额", + key: "dailyBalance", + minWidth: 130, + render: (h, params) => h("span", { style: { color: "#19be6b" } }, params.row.dailyBalance) + }, + { title: "变更后可提现余额", key: "availableBalanceAfter", minWidth: 150 } + ], ieReportColumns: [ { title: "ID", key: "id", width: 80 }, { title: "房间ID", key: "roomId", minWidth: 110 }, @@ -590,6 +675,7 @@ wechatReceiptAmount: "0.00", wechatFeeAmount: "0.00", deliveryFeeAmount: "0.00", + workerDebtCount: 0, smsCount: 0, contentAuditCount: 0, realNameAuthCount: 0, @@ -885,6 +971,84 @@ } return true }, + openWorkerDebtModal() { + if (!this.statistics.actualIncomeAvailable) { + this.$Message.warning("仅结束时间小于今天且范围不超过31天时可查看") + return + } + if (!this.validateStatisticsRange()) { + return + } + this.workerDebtSearch.pageNumber = 1 + this.workerDebtModalVisible = true + this.getWorkerDebtList() + }, + getWorkerDebtList() { + if (!this.validateStatisticsRange()) { + return + } + this.workerDebtLoading = true + const params = Object.assign({}, this.workerDebtSearch, { + startDate: this.searchForm.startDate, + endDate: this.searchForm.endDate, + regionId: this.resolveRegionId() + }) + getWorkerDebtPage(params).then(res => { + const data = res.result || res || {} + this.workerDebtList = data.records || [] + this.workerDebtTotal = data.total || 0 + }).finally(() => { + this.workerDebtLoading = false + }) + }, + changeWorkerDebtPage(page) { + this.workerDebtSearch.pageNumber = page + this.getWorkerDebtList() + }, + changeWorkerDebtPageSize(size) { + this.workerDebtSearch.pageSize = size + this.workerDebtSearch.pageNumber = 1 + this.getWorkerDebtList() + }, + openWorkerPositiveBalanceModal() { + if (!this.statistics.actualIncomeAvailable) { + this.$Message.warning("仅结束时间小于今天且范围不超过31天时可查看") + return + } + if (!this.validateStatisticsRange()) { + return + } + this.workerPositiveBalanceSearch.pageNumber = 1 + this.workerPositiveBalanceModalVisible = true + this.getWorkerPositiveBalanceList() + }, + getWorkerPositiveBalanceList() { + if (!this.validateStatisticsRange()) { + return + } + this.workerPositiveBalanceLoading = true + const params = Object.assign({}, this.workerPositiveBalanceSearch, { + startDate: this.searchForm.startDate, + endDate: this.searchForm.endDate, + regionId: this.resolveRegionId() + }) + getWorkerPositiveBalancePage(params).then(res => { + const data = res.result || res || {} + this.workerPositiveBalanceList = data.records || [] + this.workerPositiveBalanceTotal = data.total || 0 + }).finally(() => { + this.workerPositiveBalanceLoading = false + }) + }, + changeWorkerPositiveBalancePage(page) { + this.workerPositiveBalanceSearch.pageNumber = page + this.getWorkerPositiveBalanceList() + }, + changeWorkerPositiveBalancePageSize(size) { + this.workerPositiveBalanceSearch.pageSize = size + this.workerPositiveBalanceSearch.pageNumber = 1 + this.getWorkerPositiveBalanceList() + }, getDataList() { if (!this.validateStatisticsRange()) { return @@ -896,6 +1060,12 @@ getDataStatisticsSummary(params).then(res => { const data = res.result || res || {} this.statistics = Object.assign(this.defaultStatistics(), data) + if (this.workerDebtModalVisible) { + this.getWorkerDebtList() + } + if (this.workerPositiveBalanceModalVisible) { + this.getWorkerPositiveBalanceList() + } }).finally(() => { this.statisticsLoading = false })