支付对账更新

This commit is contained in:
磷叶 2025-05-12 16:45:32 +08:00
parent 71e591b18a
commit a4807d524a
7 changed files with 122 additions and 13 deletions

View File

@ -42,3 +42,30 @@ export function delReconciliationDate(id) {
method: 'delete'
})
}
// 按渠道分组查询渠道对账列表
export function listReconciliationDateGroupByChannel(query) {
return request({
url: '/bst/reconciliationDate/listGroupByChannel',
method: 'get',
params: query
})
}
// 按运营区分组查询渠道对账列表
export function listReconciliationDateGroupByArea(query) {
return request({
url: '/bst/reconciliationDate/listGroupByArea',
method: 'get',
params: query
})
}
// 按运营区分组查询渠道对账列表
export function listReconciliationDateGroupByDate(query) {
return request({
url: '/bst/reconciliationDate/listGroupByDate',
method: 'get',
params: query
})
}

View File

@ -8,7 +8,7 @@ import store from './store'
NProgress.configure({ showSpinner: false })
const whiteList = ['/login', '/register', '/liveness']
const whiteList = ['/login', '/register', '/liveness', '/ext']
router.beforeEach((to, from, next) => {
NProgress.start()

View File

@ -80,6 +80,13 @@ export const constantRoutes = [
path: '/liveness',
component: () => import('@/views/mobile/liveness/index')
},
/**
* 外部站点
*/
{
path: '/ext',
component: () => import('@/views/mobile/ext/index')
},
/**
* 编辑页
*/

View File

@ -305,17 +305,18 @@ export const WithdrawStatus = {
// 分成状态
export const BonusStatus = {
INVALID: "INVALID", // 未出账
VALID: "VALID", // 已出账
WAIT_DIVIDE: "WAIT_DIVIDE", // 待分成
DIVIDEND: "DIVIDEND", // 已分成
// 有效的分成状态列表
valid() {
return [this.WAIT_DIVIDE, this.DIVIDEND];
return [this.VALID, this.WAIT_DIVIDE, this.DIVIDEND];
},
// 可打款的分成状态列表
canPay() {
return [this.WAIT_DIVIDE];
return [this.VALID, this.WAIT_DIVIDE];
}
}

View File

@ -1,4 +1,4 @@
import { views } from '@/utils/constants'
import { views } from '@/utils/constants';
// 视图
export const $view = {
@ -86,6 +86,15 @@ export const $showColumns = {
})
}
},
// 展示列
showColumn(columns) {
if (this.columns != null) {
this.columns.filter(item => columns.includes(item.key))
.forEach(item => {
item.visible = true;
})
}
},
// 删除列
removeColumn(columns) {
if (columns != null) {

View File

@ -1,7 +1,13 @@
<template>
<div class="app-container">
<el-tabs v-model="activeTab" @tab-click="handleTabClick">
<el-tab-pane label="日期统计" name="date"/>
<el-tab-pane label="渠道统计" name="channel"/>
<el-tab-pane label="运营区统计" name="area"/>
</el-tabs>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="日期" prop="date">
<el-form-item label="日期" prop="dateRange">
<el-date-picker clearable
v-model="queryParams.dateRange"
type="daterange"
@ -95,7 +101,7 @@
</template>
<script>
import { listReconciliationDate, getReconciliationDate, delReconciliationDate, addReconciliationDate, updateReconciliationDate } from "@/api/bst/reconciliationDate";
import { listReconciliationDateGroupByChannel, listReconciliationDateGroupByArea, listReconciliationDateGroupByDate, getReconciliationDate, delReconciliationDate, addReconciliationDate, updateReconciliationDate } from "@/api/bst/reconciliationDate";
import { $showColumns } from '@/utils/mixins';
import FormCol from "@/components/FormCol/index.vue";
import AreaRemoteSelect from '@/components/Business/Area/AreaRemoteSelect.vue'
@ -113,13 +119,14 @@ export default {
components: {FormCol, AreaRemoteSelect, ChannelSelect},
data() {
return {
activeTab: 'date',
span: 24,
//
columns: [
{key: 'id', visible: false, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"},
{key: 'date', visible: true, label: '日期', minWidth: null, sortable: false, overflow: false, align: 'center', width: "100"},
{key: 'channelName', visible: true, label: '渠道', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'areaName', visible: true, label: '运营区', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'channelName', visible: false, label: '渠道', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'areaName', visible: false, label: '运营区', minWidth: null, sortable: true, overflow: false, align: 'center', width: null},
{key: 'orderPayAmount', visible: false, label: '骑行支付', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'orderRefundAmount', visible: false, label: '骑行退款', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
{key: 'orderActualAmount', visible: false, label: '骑行实收', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
@ -187,6 +194,18 @@ export default {
this.getList();
},
methods: {
handleTabClick(e) {
if (this.activeTab === 'channel') {
this.hideColumn(['areaName'])
this.showColumn(['channelName'])
} else if (this.activeTab === 'area') {
this.hideColumn(['channelName'])
this.showColumn(['areaName'])
} else if (this.activeTab === 'date') {
this.hideColumn(['channelName', 'areaName'])
}
this.getList();
},
/** 当排序按钮被点击时触发 **/
onSortChange(column) {
if (column.order == null) {
@ -201,11 +220,26 @@ export default {
/** 查询渠道对账列表 */
getList() {
this.loading = true;
listReconciliationDate(this.queryParams).then(response => {
this.reconciliationDateList = response.rows;
this.total = response.total;
this.loading = false;
});
if (this.activeTab === 'channel') {
listReconciliationDateGroupByChannel(this.queryParams).then(response => {
this.reconciliationDateList = response.rows;
this.total = response.total;
this.loading = false;
});
} else if (this.activeTab === "area") {
listReconciliationDateGroupByArea(this.queryParams).then(response => {
this.reconciliationDateList = response.rows;
this.total = response.total;
this.loading = false;
});
} else if (this.activeTab === "date") {
listReconciliationDateGroupByDate(this.queryParams).then(response => {
this.reconciliationDateList = response.rows;
this.total = response.total;
this.loading = false;
});
}
},
//
cancel() {

View File

@ -0,0 +1,31 @@
<template>
<div>
<iframe class="ext-iframe" :src="url" width="100%" height="100%"></iframe>
</div>
</template>
<script>
export default {
name: 'Ext',
data() {
return {
url: null,
}
},
created() {
this.url = this.$route.query.url;
}
}
</script>
<style lang="scss" scoped>
.ext-iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: none;
}
</style>