wangfukang 1 month ago
parent
commit
1ad16fa70a
  1. 6
      src/api/app.js
  2. 182
      src/views/app/data-statistics/data-statistics.vue

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

182
src/views/app/data-statistics/data-statistics.vue

@ -54,7 +54,7 @@
</Card>
<Card v-if="tabName !== '3' && tabName !== '4'">
<Alert show-icon style="margin-bottom: 16px;">
统计口径订单按支付时间退款/售后按成功时间抽奖按开奖时间流水总金额=订单totalAmount总金额有效流水总金额=流水总金额-退款总金额-售后总金额微信手续费=有效流水总金额*0.006
统计口径订单按支付时间退款/售后按成功时间抽奖按开奖时间流水总金额=订单支付总金额有效流水总金额=流水总金额-退款总金额-售后总金额微信手续费=有效流水总金额*0.006
</Alert>
<div style="border-left: 5px solid rgb(70, 130, 180);height: 20px;line-height: 20px;font-size: 18px;font-weight: 700;margin-bottom: 20px;padding-left: 7px;">
订单数据
@ -91,7 +91,7 @@
<Tooltip transfer placement="top-start">
<Icon type="md-help-circle" size="14" />
<div slot="content" style="max-width: 320px; white-space: normal;">
订单totalAmount总金额
订单支付总金额
</div>
</Tooltip>
</div>
@ -232,13 +232,42 @@
</div>
</Col>
<Col span="6">
<div style="display:flex;">
<div style="display:flex;cursor:pointer;" @click="openWorkerPositiveBalanceModal">
<div style="width:50px;height:50px;background:#87CEFA;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;">
<Icon type="md-alarm" color="#fff" size="40" />
</div>
<div>
<div style="font-weight:700;font-size:22px;">{{ statistics.deliveryFeeAmount }}</div>
<div>配送费总额</div>
<div v-if="statistics.actualIncomeAvailable" style="font-weight:700;font-size:22px;">{{ statistics.deliveryFeeAmount }}</div>
<div v-else style="font-weight:700;font-size:22px;">--</div>
<div>
配送员可提现金额
<Tooltip transfer placement="top-start">
<Icon type="md-help-circle" size="14" />
<div slot="content" style="max-width: 320px; white-space: normal;">
统计所选日期范围内每日余额为正数的配送员金额为正余额累计包含配送奖励点击查看明细
</div>
</Tooltip>
</div>
</div>
</div>
</Col>
<Col span="6">
<div style="display:flex;cursor:pointer;" @click="openWorkerDebtModal">
<div style="width:50px;height:50px;background:#FF7F50;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;">
<Icon type="md-alert" color="#fff" size="40"/>
</div>
<div>
<div v-if="statistics.actualIncomeAvailable" style="font-weight:700;font-size:22px;">{{ statistics.workerDebtCount }}</div>
<div v-else style="font-weight:700;font-size:22px;">--</div>
<div>
昨日欠款配送员
<Tooltip transfer placement="top-start">
<Icon type="md-help-circle" size="14" />
<div slot="content" style="max-width: 320px; white-space: normal;">
统计所选日期范围内每日余额为负数的配送员点击查看明细
</div>
</Tooltip>
</div>
</div>
</div>
</Col>
@ -346,7 +375,7 @@
</div>
<div>
<div style="font-weight:700;font-size:22px;">{{ rewardTotalAmount }}</div>
<div>抽奖奖励排位奖励配送奖励</div>
<div>抽奖奖励游戏排位奖励</div>
</div>
</div>
</Col>
@ -379,6 +408,20 @@
</div>
</Col>
</Row>
<Modal v-model="workerDebtModalVisible" title="昨日欠款配送员" :width="1000" :footer-hide="true">
<Table border :columns="workerDebtColumns" :data="workerDebtList" :loading="workerDebtLoading"></Table>
<Row type="flex" justify="end" style="margin-top: 16px;">
<Page :current="workerDebtSearch.pageNumber" :page-size="workerDebtSearch.pageSize" :total="workerDebtTotal"
show-total show-elevator show-sizer @on-change="changeWorkerDebtPage" @on-page-size-change="changeWorkerDebtPageSize" />
</Row>
</Modal>
<Modal v-model="workerPositiveBalanceModalVisible" title="正余额配送员" :width="1000" :footer-hide="true">
<Table border :columns="workerPositiveBalanceColumns" :data="workerPositiveBalanceList" :loading="workerPositiveBalanceLoading"></Table>
<Row type="flex" justify="end" style="margin-top: 16px;">
<Page :current="workerPositiveBalanceSearch.pageNumber" :page-size="workerPositiveBalanceSearch.pageSize" :total="workerPositiveBalanceTotal"
show-total show-elevator show-sizer @on-change="changeWorkerPositiveBalancePage" @on-page-size-change="changeWorkerPositiveBalancePageSize" />
</Row>
</Modal>
</Card>
<Card v-else-if="tabName === '3'">
<div style="border-left: 5px solid rgb(70, 130, 180);height: 20px;line-height: 20px;font-size: 18px;font-weight: 700;margin-bottom: 20px;padding-left: 7px;">
@ -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
})

Loading…
Cancel
Save