mirror of
https://gitee.com/bootx/dax-pay-ui.git
synced 2026-01-13 06:03:51 +08:00
style: 分账页面调整
This commit is contained in:
@@ -32,6 +32,10 @@ export function getConfig(appId) {
|
||||
export interface AllocConfig extends MchEntity {
|
||||
/** 是否自动分账 */
|
||||
autoAlloc?: boolean
|
||||
/** 自动完结 */
|
||||
autoFinish?: boolean
|
||||
/** 大于多少开启分账 */
|
||||
minAmount?: number
|
||||
/** 分账延迟时长(分钟) */
|
||||
DelayTime?: number
|
||||
}
|
||||
|
||||
@@ -8,46 +8,51 @@
|
||||
@close="visible = false"
|
||||
>
|
||||
<vxe-toolbar ref="xToolbar" custom :refresh="{ queryMethod: queryPage }" />
|
||||
<vxe-table
|
||||
keyField="id"
|
||||
ref="xTable"
|
||||
:data="records"
|
||||
:loading="loading"
|
||||
:cell-style="cellStyle"
|
||||
>
|
||||
<vxe-column type="seq" width="60" />
|
||||
<vxe-column field="receiverNo" title="接收方编号" :min-width="120" />
|
||||
<vxe-column field="name" title="接收方名称" :min-width="120" />
|
||||
<vxe-column field="receiverName" title="接收方姓名" :min-width="100" />
|
||||
<vxe-column field="receiverType" title="接收方类型" :min-width="100">
|
||||
<template #default="{ row }">
|
||||
{{ dictConvert('alloc_receiver_type', row.receiverType) }}
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="rate" title="分账比例" :min-width="100">
|
||||
<template #default="{ row }"> {{ row.rate }}% </template>
|
||||
</vxe-column>
|
||||
<vxe-column field="amount" title="分账金额" :min-width="100">
|
||||
<template #default="{ row }"> {{ row.amount }} 元 </template>
|
||||
</vxe-column>
|
||||
<vxe-column field="result" title="分账结果" :min-width="130">
|
||||
<template #default="{ row }"> {{ dictConvert('alloc_detail_result', row.result) }} </template>
|
||||
</vxe-column>
|
||||
<vxe-column field="errorMsg" title="错误原因" :min-width="160">
|
||||
<template #default="{ row }"> {{ row.errorMsg }} </template>
|
||||
</vxe-column>
|
||||
<vxe-column field="finishTime" title="完成时间" :min-width="160">
|
||||
<template #default="{ row }"> {{ row.finishTime }} </template>
|
||||
</vxe-column>
|
||||
<vxe-column fixed="right" :min-width="60" :showOverflow="false" title="操作">
|
||||
<template #default="{ row }">
|
||||
<span>
|
||||
<a href="javascript:" @click="show(row)">查看</a>
|
||||
</span>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
<alloc-detail-info ref="allocDetailInfo" />
|
||||
<div class="h-80vh">
|
||||
<vxe-table
|
||||
keyField="id"
|
||||
height="auto"
|
||||
ref="xTable"
|
||||
:data="records"
|
||||
:loading="loading"
|
||||
:cell-style="cellStyle"
|
||||
>
|
||||
<vxe-column type="seq" width="60" />
|
||||
<vxe-column field="receiverNo" title="接收方编号" :min-width="120" />
|
||||
<vxe-column field="name" title="接收方名称" :min-width="120" />
|
||||
<vxe-column field="receiverName" title="接收方姓名" :min-width="100" />
|
||||
<vxe-column field="receiverType" title="接收方类型" :min-width="100">
|
||||
<template #default="{ row }">
|
||||
{{ dictConvert('alloc_receiver_type', row.receiverType) }}
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="rate" title="分账比例" :min-width="100">
|
||||
<template #default="{ row }"> {{ row.rate }}% </template>
|
||||
</vxe-column>
|
||||
<vxe-column field="amount" title="分账金额" :min-width="100">
|
||||
<template #default="{ row }"> {{ row.amount }} 元 </template>
|
||||
</vxe-column>
|
||||
<vxe-column field="result" title="分账结果" :min-width="130">
|
||||
<template #default="{ row }">
|
||||
{{ dictConvert('alloc_detail_result', row.result) }}
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="errorMsg" title="错误原因" :min-width="160">
|
||||
<template #default="{ row }"> {{ row.errorMsg }} </template>
|
||||
</vxe-column>
|
||||
<vxe-column field="finishTime" title="完成时间" :min-width="160">
|
||||
<template #default="{ row }"> {{ row.finishTime }} </template>
|
||||
</vxe-column>
|
||||
<vxe-column fixed="right" :min-width="60" :showOverflow="false" title="操作">
|
||||
<template #default="{ row }">
|
||||
<span>
|
||||
<a href="javascript:" @click="show(row)">查看</a>
|
||||
</span>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
<AllocDetailInfo ref="allocDetailInfo" />
|
||||
</basic-drawer>
|
||||
</template>
|
||||
|
||||
@@ -58,7 +63,7 @@
|
||||
import BasicDrawer from '@/components/Drawer/src/BasicDrawer.vue'
|
||||
import { useDict } from '@/hooks/bootx/useDict'
|
||||
import { AllocOrder, AllocDetail, detailList } from './AllocationOrder.api'
|
||||
import AllocDetailInfo from "./AllocDetailInfo.vue";
|
||||
import AllocDetailInfo from './AllocDetailInfo.vue'
|
||||
// 使用hooks
|
||||
const { loading } = useTablePage(queryPage)
|
||||
const { dictConvert } = useDict()
|
||||
|
||||
@@ -11,86 +11,89 @@
|
||||
</div>
|
||||
<div class="m-3 p-3 bg-white">
|
||||
<vxe-toolbar ref="xToolbar" custom :refresh="{ queryMethod: queryPage }" />
|
||||
<vxe-table
|
||||
keyField="id"
|
||||
ref="xTable"
|
||||
:data="pagination.records"
|
||||
:loading="loading"
|
||||
:sort-config="{ remote: true, trigger: 'cell' }"
|
||||
@sort-change="sortChange"
|
||||
>
|
||||
<vxe-column type="seq" title="序号" width="60" />
|
||||
<vxe-column field="allocNo" title="分账单号" :min-width="230">
|
||||
<template #default="{ row }">
|
||||
<a @click="show(row)">
|
||||
{{ row.allocNo }}
|
||||
</a>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="title" title="订单标题" :min-width="150" />
|
||||
<vxe-column field="orderNo" title="支付订单号" :min-width="230">
|
||||
<template #default="{ row }">
|
||||
<a @click="showPayOrder(row)">
|
||||
{{ row.orderNo }}
|
||||
</a>
|
||||
</template>
|
||||
</vxe-column>
|
||||
|
||||
<vxe-column field="channel" title="所属通道" align="center" :min-width="150">
|
||||
<template #default="{ row }">
|
||||
<a-tag>{{ dictConvert('channel', row.channel) }}</a-tag>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="amount" title="总分账金额(元)" :min-width="120">
|
||||
<template #default="{ row }">
|
||||
{{ row.amount }}
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="status" title="状态" :min-width="120">
|
||||
<template #default="{ row }">
|
||||
<a-tag>{{ dictConvert('allocation_status', row.status) }}</a-tag>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="result" title="分账结果" :min-width="100">
|
||||
<template #default="{ row }">
|
||||
{{ dictConvert('allocation_result', row.result) }}
|
||||
</template> </vxe-column
|
||||
><vxe-column field="errorMsg" title="错误原因" :min-width="160" />
|
||||
<vxe-column field="createTime" title="创建时间" :min-width="160" />
|
||||
<vxe-column fixed="right" :min-width="200" :showOverflow="false" title="操作">
|
||||
<template #default="{ row }">
|
||||
<a-link @click="show(row)">查看</a-link>
|
||||
<a-divider type="vertical" />
|
||||
<a-link @click="showDetail(row)">明细列表</a-link>
|
||||
<a-divider type="vertical" />
|
||||
<a-dropdown>
|
||||
<a>
|
||||
更多
|
||||
<icon icon="ant-design:down-outlined" :size="12" />
|
||||
<div class="h-60vh">
|
||||
<vxe-table
|
||||
keyField="id"
|
||||
height="auto"
|
||||
ref="xTable"
|
||||
:data="pagination.records"
|
||||
:loading="loading"
|
||||
:sort-config="{ remote: true, trigger: 'cell' }"
|
||||
@sort-change="sortChange"
|
||||
>
|
||||
<vxe-column type="seq" title="序号" width="60" />
|
||||
<vxe-column field="allocNo" title="分账单号" :min-width="230">
|
||||
<template #default="{ row }">
|
||||
<a @click="show(row)">
|
||||
{{ row.allocNo }}
|
||||
</a>
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item
|
||||
v-if="
|
||||
['allocation_processing', 'allocation_end', 'allocation_failed'].includes(
|
||||
row.status,
|
||||
)
|
||||
"
|
||||
>
|
||||
<a-link @click="retryInfo(row)">重试</a-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a-link @click="syncInfo(row)">同步</a-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item v-if="['allocation_end', 'finish_failed'].includes(row.status)">
|
||||
<a-link @click="finishInfo(row)">完结</a-link>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="title" title="订单标题" :min-width="150" />
|
||||
<vxe-column field="orderNo" title="支付订单号" :min-width="230">
|
||||
<template #default="{ row }">
|
||||
<a @click="showPayOrder(row)">
|
||||
{{ row.orderNo }}
|
||||
</a>
|
||||
</template>
|
||||
</vxe-column>
|
||||
|
||||
<vxe-column field="channel" title="所属通道" align="center" :min-width="150">
|
||||
<template #default="{ row }">
|
||||
<a-tag>{{ dictConvert('channel', row.channel) }}</a-tag>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="amount" title="总分账金额(元)" :min-width="120">
|
||||
<template #default="{ row }">
|
||||
{{ row.amount }}
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="status" title="状态" :min-width="120">
|
||||
<template #default="{ row }">
|
||||
<a-tag>{{ dictConvert('allocation_status', row.status) }}</a-tag>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="result" title="分账结果" :min-width="100">
|
||||
<template #default="{ row }">
|
||||
{{ dictConvert('allocation_result', row.result) }}
|
||||
</template> </vxe-column
|
||||
><vxe-column field="errorMsg" title="错误原因" :min-width="160" />
|
||||
<vxe-column field="createTime" title="创建时间" :min-width="160" />
|
||||
<vxe-column fixed="right" :min-width="200" :showOverflow="false" title="操作">
|
||||
<template #default="{ row }">
|
||||
<a-link @click="show(row)">查看</a-link>
|
||||
<a-divider type="vertical" />
|
||||
<a-link @click="showDetail(row)">明细列表</a-link>
|
||||
<a-divider type="vertical" />
|
||||
<a-dropdown>
|
||||
<a>
|
||||
更多
|
||||
<icon icon="ant-design:down-outlined" :size="12" />
|
||||
</a>
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item
|
||||
v-if="
|
||||
['allocation_processing', 'allocation_end', 'allocation_failed'].includes(
|
||||
row.status,
|
||||
)
|
||||
"
|
||||
>
|
||||
<a-link @click="retryInfo(row)">重试</a-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a-link @click="syncInfo(row)">同步</a-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item v-if="['alloc_end', 'finish_failed'].includes(row.status)">
|
||||
<a-link @click="finishInfo(row)">完结</a-link>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
<vxe-pager
|
||||
size="medium"
|
||||
:loading="loading"
|
||||
@@ -119,8 +122,8 @@
|
||||
import { LabeledValue } from 'ant-design-vue/lib/select'
|
||||
import AllocDetailList from './AllocDetailList.vue'
|
||||
import { Icon } from '@/components/Icon'
|
||||
import AllocOrderInfo from "./AllocOrderInfo.vue";
|
||||
import PayOrderInfo from "@/views/daxpay/common/order/pay/PayOrderInfo.vue";
|
||||
import AllocOrderInfo from './AllocOrderInfo.vue'
|
||||
import PayOrderInfo from '@/views/daxpay/common/order/pay/PayOrderInfo.vue'
|
||||
|
||||
// 使用hooks
|
||||
const {
|
||||
@@ -212,7 +215,7 @@
|
||||
title: '同步分账状态',
|
||||
content: '确定同步分账状态吗?',
|
||||
onOk: () => {
|
||||
sync(record.allocNo).then(() => {
|
||||
sync(record.id).then(() => {
|
||||
createMessage.success('同步成功')
|
||||
queryPage()
|
||||
})
|
||||
@@ -226,10 +229,10 @@
|
||||
function retryInfo(record) {
|
||||
createConfirm({
|
||||
iconType: 'info',
|
||||
title: '分账重试',
|
||||
content: '确定分账重试吗?',
|
||||
title: '重试分账',
|
||||
content: '确定重试分账吗?',
|
||||
onOk: () => {
|
||||
retry(record.bizAllocNo).then(() => {
|
||||
retry(record.id).then(() => {
|
||||
createMessage.success('分账重试请求发送成功')
|
||||
queryPage()
|
||||
})
|
||||
@@ -246,7 +249,7 @@
|
||||
title: '完结分账',
|
||||
content: '确定完结分账吗?',
|
||||
onOk: () => {
|
||||
finish(record.allocNo).then(() => {
|
||||
finish(record.id).then(() => {
|
||||
createMessage.success('完结请求发送成功')
|
||||
queryPage()
|
||||
})
|
||||
|
||||
@@ -22,26 +22,6 @@ export function get(id) {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单详细信息
|
||||
*/
|
||||
export function getOrderByAllocNo(allocNo: string) {
|
||||
return defHttp.get<Result>({
|
||||
url: '/allocation/order/findByAllocNo',
|
||||
params: { allocNo },
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 扩展信息
|
||||
*/
|
||||
export function getExtra(id) {
|
||||
return defHttp.get<Result<AllocOrder>>({
|
||||
url: '/allocation/order/findById',
|
||||
params: { id },
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 明细列表
|
||||
*/
|
||||
@@ -65,30 +45,30 @@ export function detail(id) {
|
||||
/**
|
||||
* 分账完结
|
||||
*/
|
||||
export function finish(allocNo) {
|
||||
export function finish(id) {
|
||||
return defHttp.post<Result<AllocOrder>>({
|
||||
url: '/allocation/order/finish',
|
||||
params: { allocNo },
|
||||
params: { id },
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 分账完结
|
||||
* 分账重试
|
||||
*/
|
||||
export function retry(bizAllocNo) {
|
||||
export function retry(id) {
|
||||
return defHttp.post<Result<AllocOrder>>({
|
||||
url: '/allocation/order/retry',
|
||||
params: { bizAllocNo },
|
||||
params: { id },
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分账结果
|
||||
* 同步分账结果
|
||||
*/
|
||||
export function sync(allocNo) {
|
||||
export function sync(id) {
|
||||
return defHttp.post<Result<AllocOrder>>({
|
||||
url: '/allocation/order/sync',
|
||||
params: { allocNo },
|
||||
params: { id },
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user