@@ -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
})