支付对账更新

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' 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 }) NProgress.configure({ showSpinner: false })
const whiteList = ['/login', '/register', '/liveness'] const whiteList = ['/login', '/register', '/liveness', '/ext']
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
NProgress.start() NProgress.start()

View File

@ -80,6 +80,13 @@ export const constantRoutes = [
path: '/liveness', path: '/liveness',
component: () => import('@/views/mobile/liveness/index') 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 = { export const BonusStatus = {
INVALID: "INVALID", // 未出账 INVALID: "INVALID", // 未出账
VALID: "VALID", // 已出账
WAIT_DIVIDE: "WAIT_DIVIDE", // 待分成 WAIT_DIVIDE: "WAIT_DIVIDE", // 待分成
DIVIDEND: "DIVIDEND", // 已分成 DIVIDEND: "DIVIDEND", // 已分成
// 有效的分成状态列表 // 有效的分成状态列表
valid() { valid() {
return [this.WAIT_DIVIDE, this.DIVIDEND]; return [this.VALID, this.WAIT_DIVIDE, this.DIVIDEND];
}, },
// 可打款的分成状态列表 // 可打款的分成状态列表
canPay() { 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 = { 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) { removeColumn(columns) {
if (columns != null) { if (columns != null) {

View File

@ -1,7 +1,13 @@
<template> <template>
<div class="app-container"> <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 :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 <el-date-picker clearable
v-model="queryParams.dateRange" v-model="queryParams.dateRange"
type="daterange" type="daterange"
@ -95,7 +101,7 @@
</template> </template>
<script> <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 { $showColumns } from '@/utils/mixins';
import FormCol from "@/components/FormCol/index.vue"; import FormCol from "@/components/FormCol/index.vue";
import AreaRemoteSelect from '@/components/Business/Area/AreaRemoteSelect.vue' import AreaRemoteSelect from '@/components/Business/Area/AreaRemoteSelect.vue'
@ -113,13 +119,14 @@ export default {
components: {FormCol, AreaRemoteSelect, ChannelSelect}, components: {FormCol, AreaRemoteSelect, ChannelSelect},
data() { data() {
return { return {
activeTab: 'date',
span: 24, span: 24,
// //
columns: [ columns: [
{key: 'id', visible: false, label: 'ID', minWidth: null, sortable: true, overflow: false, align: 'center', width: "80"}, {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: '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: 'channelName', visible: false, 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: '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: '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: '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}, {key: 'orderActualAmount', visible: false, label: '骑行实收', minWidth: null, sortable: true, overflow: false, align: 'right', width: null},
@ -187,6 +194,18 @@ export default {
this.getList(); this.getList();
}, },
methods: { 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) { onSortChange(column) {
if (column.order == null) { if (column.order == null) {
@ -201,11 +220,26 @@ export default {
/** 查询渠道对账列表 */ /** 查询渠道对账列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listReconciliationDate(this.queryParams).then(response => {
this.reconciliationDateList = response.rows; if (this.activeTab === 'channel') {
this.total = response.total; listReconciliationDateGroupByChannel(this.queryParams).then(response => {
this.loading = false; 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() { 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>