mirror of
https://gitee.com/bootx/dax-pay-ui
synced 2026-08-12 23:45:39 +08:00
feat 支付订单和退款订单页面添加实时金额汇总展示
This commit is contained in:
@@ -98,7 +98,7 @@ export interface AllocationOrder extends BaseEntity {
|
||||
title?: string
|
||||
// 网关支付订单号
|
||||
gatewayPayOrderNo?: string
|
||||
// 外部分账号
|
||||
// 通道分账号
|
||||
outAllocationNo?: string
|
||||
// 分账单号
|
||||
allocationNo?: string
|
||||
|
||||
@@ -62,6 +62,16 @@ export function allocationById(id) {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取汇总金额
|
||||
*/
|
||||
export function getTotalAmount(param) {
|
||||
return defHttp.get<Result<number>>({
|
||||
url: '/order/pay/getTotalAmount',
|
||||
params: param,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 支付记录
|
||||
*/
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="m-3 p-3 bg-white">
|
||||
<vxe-toolbar ref="xToolbar" custom :refresh="{ queryMethod: queryPage }">
|
||||
<template #buttons>
|
||||
<span>收款金额: {{}}元</span>
|
||||
<span>收款金额: {{ totalAmount ? (totalAmount / 100).toFixed(2) : 0 }}元</span>
|
||||
</template>
|
||||
</vxe-toolbar>
|
||||
<vxe-table
|
||||
@@ -94,7 +94,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted } from 'vue'
|
||||
import { $ref } from 'vue/macros'
|
||||
import { allocationById, close, page, syncByOrderNo } from './PayOrder.api'
|
||||
import { allocationById, close, getTotalAmount, page, syncByOrderNo } from './PayOrder.api'
|
||||
import useTablePage from '/@/hooks/bootx/useTablePage'
|
||||
import PayOrderInfo from './PayOrderInfo.vue'
|
||||
import RefundModel from './RefundModel.vue'
|
||||
@@ -122,7 +122,7 @@
|
||||
return [
|
||||
{ field: 'orderNo', type: STRING, name: '订单号', placeholder: '请输入支付订单号' },
|
||||
{ field: 'bizOrderNo', type: STRING, name: '商户订单号', placeholder: '请输入商户订单号' },
|
||||
{ field: 'outOrderNo', type: STRING, name: '外部订单号', placeholder: '请输入外部三方支付系统中的订单号' },
|
||||
{ field: 'outOrderNo', type: STRING, name: '通道订单号', placeholder: '请输入外部三方支付系统中的订单号' },
|
||||
{ field: 'title', type: STRING, name: '标题', placeholder: '请输入标题' },
|
||||
{
|
||||
field: 'allocation',
|
||||
@@ -144,6 +144,7 @@
|
||||
const xToolbar = $ref<VxeToolbarInstance>()
|
||||
const payOrderInfo = $ref<any>()
|
||||
const refundModel = $ref<any>()
|
||||
let totalAmount = $ref<number>(0.0)
|
||||
|
||||
onMounted(() => {
|
||||
initData()
|
||||
@@ -167,6 +168,7 @@
|
||||
*/
|
||||
function queryPage() {
|
||||
loading.value = true
|
||||
// 查询列表
|
||||
page({
|
||||
...model.queryParam,
|
||||
...pages,
|
||||
@@ -174,6 +176,13 @@
|
||||
}).then(({ data }) => {
|
||||
pageQueryResHandel(data)
|
||||
})
|
||||
// 汇总数据
|
||||
getTotalAmount({
|
||||
...model.queryParam,
|
||||
}).then(({ data }) => {
|
||||
totalAmount = data
|
||||
})
|
||||
return Promise.resolve()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,6 +21,7 @@ export function get(id) {
|
||||
params: { id },
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单条
|
||||
*/
|
||||
@@ -71,6 +72,16 @@ export function resetRefund(id) {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取汇总金额
|
||||
*/
|
||||
export function getTotalAmount(param) {
|
||||
return defHttp.get<Result<number>>({
|
||||
url: '/order/refund/getTotalAmount',
|
||||
params: param,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 退款记录
|
||||
*/
|
||||
@@ -87,7 +98,7 @@ export interface RefundOrder extends BaseEntity {
|
||||
refundNo?: string
|
||||
// 商户退款号
|
||||
bizRefundNo?: string
|
||||
// 外部退款号
|
||||
// 通道退款号
|
||||
outRefundNo?: string
|
||||
// 订单金额
|
||||
orderAmount?: number
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<div class="m-3 p-3 bg-white">
|
||||
<vxe-toolbar ref="xToolbar" custom :refresh="{ queryMethod: queryPage }">
|
||||
<template #buttons>
|
||||
<span>退款金额: {{}}元</span>
|
||||
<span>退款金额: {{ totalAmount ? (totalAmount / 100).toFixed(2) : 0 }}元</span>
|
||||
</template>
|
||||
</vxe-toolbar>
|
||||
<vxe-table
|
||||
@@ -79,10 +79,10 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted } from 'vue'
|
||||
import { $ref } from 'vue/macros'
|
||||
import { page, resetRefund, syncByRefundNo } from './RefundOrder.api'
|
||||
import { getTotalAmount, page, resetRefund, syncByRefundNo } from './RefundOrder.api'
|
||||
import useTablePage from '/@/hooks/bootx/useTablePage'
|
||||
import RefundOrderInfo from './RefundOrderInfo.vue'
|
||||
import { VxeTable, VxeTableInstance, VxeToolbar, VxeToolbarInstance } from "vxe-table";
|
||||
import { VxeTable, VxeTableInstance, VxeToolbar, VxeToolbarInstance } from 'vxe-table'
|
||||
import BQuery from '/@/components/Bootx/Query/BQuery.vue'
|
||||
import { useMessage } from '/@/hooks/web/useMessage'
|
||||
import { LIST, QueryField, STRING } from '/@/components/Bootx/Query/Query'
|
||||
@@ -99,16 +99,17 @@
|
||||
|
||||
let channelList = $ref<LabeledValue[]>([])
|
||||
let refundStatusList = $ref<LabeledValue[]>([])
|
||||
let totalAmount = $ref<number>(0.0)
|
||||
|
||||
// 查询条件
|
||||
const fields = computed(() => {
|
||||
return [
|
||||
{ field: 'bizRefundNo', type: STRING, name: '商户退款号', placeholder: '请输入商户退款号' },
|
||||
{ field: 'refundNo', type: STRING, name: '退款号', placeholder: '请输入退款号' },
|
||||
{ field: 'outRefundNo', type: STRING, name: '外部退款号', placeholder: '请输入外部退款号' },
|
||||
{ field: 'outRefundNo', type: STRING, name: '通道退款号', placeholder: '请输入通道退款号' },
|
||||
{ field: 'bizOrderNo', type: STRING, name: '商户订单号', placeholder: '请输入商户支付订单号' },
|
||||
{ field: 'orderNo', type: STRING, name: '订单号', placeholder: '请输入支付订单号' },
|
||||
{ field: 'outOrderNo', type: STRING, name: '外部订单号', placeholder: '请输入三方支付的外部订单号' },
|
||||
{ field: 'outOrderNo', type: STRING, name: '通道订单号', placeholder: '请输入三方支付的通道订单号' },
|
||||
{ field: 'title', type: STRING, name: '原支付标题', placeholder: '请输入原支付标题' },
|
||||
{ field: 'errorCode', name: '错误码', type: STRING },
|
||||
{
|
||||
@@ -156,6 +157,12 @@
|
||||
}).then(({ data }) => {
|
||||
pageQueryResHandel(data)
|
||||
})
|
||||
// 汇总数据
|
||||
getTotalAmount({
|
||||
...model.queryParam,
|
||||
}).then(({ data }) => {
|
||||
totalAmount = data
|
||||
})
|
||||
return Promise.resolve()
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ export interface ReconcileDetail extends BaseEntity {
|
||||
paymentId?: string
|
||||
// 订单id
|
||||
refundId?: string
|
||||
// 外部订单号
|
||||
// 通道订单号
|
||||
gatewayOrderNo?: string
|
||||
// 交易金额
|
||||
amount?: string
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<a-descriptions-item label="本地订单ID">
|
||||
{{ form.orderId }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="外部订单号">
|
||||
<a-descriptions-item label="通道订单号">
|
||||
{{ form.gatewayOrderNo }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="交易类型">
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<template #default="{ row }"> {{ row.amount ? (row.amount / 100).toFixed(2) : 0 }} </template>
|
||||
</vxe-column>
|
||||
<vxe-column field="orderId" title="本地订单ID" />
|
||||
<vxe-column field="gatewayOrderNo" title="外部订单号" />
|
||||
<vxe-column field="gatewayOrderNo" title="通道订单号" />
|
||||
<vxe-column field="repairType" title="交易类型">
|
||||
<template #default="{ row }">
|
||||
<a-tag>{{ dictConvert('ReconcileTrade', row.type) }}</a-tag>
|
||||
@@ -72,7 +72,7 @@
|
||||
{ field: 'title', type: STRING, name: '订单名称', placeholder: '请输入订单名称' },
|
||||
{ field: 'type', type: LIST, name: '交易类型', placeholder: '请选择交易类型', selectList: reconcileTradeList },
|
||||
{ field: 'orderId', type: STRING, name: '本地订单', placeholder: '请输入本地订单ID' },
|
||||
{ field: 'gatewayOrderNo', type: STRING, name: '外部订单号', placeholder: '请输入外部订单号' },
|
||||
{ field: 'gatewayOrderNo', type: STRING, name: '通道订单号', placeholder: '请输入通道订单号' },
|
||||
] as QueryField[]
|
||||
})
|
||||
let visible = $ref(false)
|
||||
|
||||
@@ -38,13 +38,13 @@ export interface ReconcileDiff extends BaseEntity {
|
||||
tradeType?: string
|
||||
// 本地交易号
|
||||
tradeNo?: string
|
||||
// 外部交易号
|
||||
// 通道交易号
|
||||
outTradeNo?: string
|
||||
// 交易时间
|
||||
tradeTime?: string
|
||||
// 交易金额
|
||||
amount?: number
|
||||
// 外部交易金额
|
||||
// 通道交易金额
|
||||
outAmount?: number
|
||||
// 差异类型
|
||||
diffType?: string
|
||||
|
||||
@@ -21,16 +21,16 @@
|
||||
<a-descriptions-item label="本地交易号">
|
||||
{{ form.tradeNo }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="外部交易号">
|
||||
<a-descriptions-item label="通道交易号">
|
||||
{{ form.outTradeNo }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="外部交易号">
|
||||
<a-descriptions-item label="通道交易号">
|
||||
{{ form.tradeTime }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="交易金额">
|
||||
{{ form.amount ? (form.amount / 100).toFixed(2) : '无' }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="外部交易金额">
|
||||
<a-descriptions-item label="通道交易金额">
|
||||
{{ form.outAmount ? (form.outAmount / 100).toFixed(2) : '无' }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="交易类型">
|
||||
|
||||
@@ -27,11 +27,11 @@
|
||||
</vxe-column>
|
||||
<vxe-column field="reconcileDate" title="对账日期" sortable min-width="120" />
|
||||
<vxe-column field="tradeNo" title="本地交易号" min-width="180" />
|
||||
<vxe-column field="outTradeNo" title="外部交易号" min-width="220" />
|
||||
<vxe-column field="outTradeNo" title="通道交易号" min-width="220" />
|
||||
<vxe-column field="amount" title="交易金额(元)" sortable min-width="120">
|
||||
<template #default="{ row }"> {{ row.amount ? (row.amount / 100).toFixed(2) : '无' }} </template>
|
||||
</vxe-column>
|
||||
<vxe-column field="outAmount" title="外部交易金额(元)" sortable min-width="120">
|
||||
<vxe-column field="outAmount" title="通道交易金额(元)" sortable min-width="120">
|
||||
<template #default="{ row }"> {{ row.outAmount ? (row.outAmount / 100).toFixed(2) : '无' }} </template>
|
||||
</vxe-column>
|
||||
<vxe-column field="tradeTime" title="交易时间" sortable min-width="150" />
|
||||
@@ -92,7 +92,7 @@
|
||||
{ field: 'diffType', type: LIST, name: '差异类型', placeholder: '请选择差异类型', selectList: diffTypeList },
|
||||
{ field: 'channel', type: LIST, name: '对账通道', placeholder: '请选择对账', selectList: payChannelList },
|
||||
{ field: 'tradeNo', type: STRING, name: '本地交易号', placeholder: '请输入本地交易号' },
|
||||
{ field: 'outOrderNo', type: STRING, name: '外部交易号', placeholder: '请输入外部交易号' },
|
||||
{ field: 'outOrderNo', type: STRING, name: '通道交易号', placeholder: '请输入通道交易号' },
|
||||
] as QueryField[]
|
||||
})
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
<a-link @click="downOriginalFile(row)">原始对账单</a-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a-link @click="downOriginalTransferFile(row)">外部对账单</a-link>
|
||||
<a-link @click="downOriginalTransferFile(row)">通道对账单</a-link>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a-link @click="downReconcileFile(row)">系统对账单</a-link>
|
||||
|
||||
@@ -28,7 +28,7 @@ export function get(id) {
|
||||
export interface PayCallbackRecord extends BaseEntity {
|
||||
// 交易号
|
||||
tradeNo?: string
|
||||
// 外部交易号
|
||||
// 通道交易号
|
||||
outTradeNo?: string
|
||||
// 支付通道
|
||||
channel?: string
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<a-descriptions-item label="本地交易号">
|
||||
{{ form.tradeNo }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="外部交易号">
|
||||
<a-descriptions-item label="通道交易号">
|
||||
{{ form.outTradeNo }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="支付通道">
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
const fields = computed(() => {
|
||||
return [
|
||||
{ field: 'tradeNo', type: STRING, name: '本地交易号', placeholder: '请输入本地交易号' },
|
||||
{ field: 'outTradeNo', type: STRING, name: '外部交易号', placeholder: '请输入外部交易号' },
|
||||
{ field: 'outTradeNo', type: STRING, name: '通道交易号', placeholder: '请输入通道交易号' },
|
||||
{
|
||||
field: 'channel',
|
||||
type: LIST,
|
||||
|
||||
@@ -30,7 +30,7 @@ export interface SyncRecord extends BaseEntity {
|
||||
tradeNo?: string
|
||||
// 商户交易号
|
||||
bizTradeNo?: string
|
||||
// 外部交易号
|
||||
// 通道交易号
|
||||
outTradeNo?: string
|
||||
// 同步类型
|
||||
syncType?: string
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<a-descriptions-item label="本地交易号">
|
||||
{{ form.bizTradeNo }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="外部交易号">
|
||||
<a-descriptions-item label="通道交易号">
|
||||
{{ form.outTradeNo || '无' }}
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="同步类型">
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
return [
|
||||
{ field: 'tradeNo', type: STRING, name: '本地交易号', placeholder: '请输入本地交易号' },
|
||||
{ field: 'bizTradeNo', type: STRING, name: '商户交易号', placeholder: '请输入商户交易号' },
|
||||
{ field: 'bizTradeNo', type: STRING, name: '外部交易号', placeholder: '请输入外部交易号' },
|
||||
{ field: 'bizTradeNo', type: STRING, name: '通道交易号', placeholder: '请输入通道交易号' },
|
||||
{
|
||||
field: 'syncType',
|
||||
type: LIST,
|
||||
|
||||
Reference in New Issue
Block a user