feat:【antd】【ele】【pay 支付】order/refund/transfer 导出的缺失补全
This commit is contained in:
@@ -25,20 +25,16 @@ export namespace PayAppApi {
|
||||
status: number;
|
||||
}
|
||||
|
||||
export interface AppPageReq extends PageParam {
|
||||
export interface AppPageReqVO extends PageParam {
|
||||
name?: string;
|
||||
appKey?: string;
|
||||
status?: number;
|
||||
remark?: string;
|
||||
payNotifyUrl?: string;
|
||||
refundNotifyUrl?: string;
|
||||
transferNotifyUrl?: string;
|
||||
merchantName?: string;
|
||||
createTime?: Date[];
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询支付应用列表 */
|
||||
export function getAppPage(params: PayAppApi.AppPageReq) {
|
||||
export function getAppPage(params: PayAppApi.AppPageReqVO) {
|
||||
return requestClient.get<PageResult<PayAppApi.App>>('/pay/app/page', {
|
||||
params,
|
||||
});
|
||||
|
||||
@@ -40,60 +40,19 @@ export namespace PayOrderApi {
|
||||
}
|
||||
|
||||
/** 支付订单分页请求 */
|
||||
export interface OrderPageReq extends PageParam {
|
||||
merchantId?: number;
|
||||
export interface OrderPageReqVO extends PageParam {
|
||||
appId?: number;
|
||||
channelId?: number;
|
||||
channelCode?: string;
|
||||
merchantOrderId?: string;
|
||||
subject?: string;
|
||||
body?: string;
|
||||
notifyUrl?: string;
|
||||
notifyStatus?: number;
|
||||
amount?: number;
|
||||
channelFeeRate?: number;
|
||||
channelFeeAmount?: number;
|
||||
status?: number;
|
||||
expireTime?: Date[];
|
||||
successTime?: Date[];
|
||||
notifyTime?: Date[];
|
||||
successExtensionId?: number;
|
||||
refundStatus?: number;
|
||||
refundTimes?: number;
|
||||
channelUserId?: string;
|
||||
channelOrderNo?: string;
|
||||
createTime?: Date[];
|
||||
}
|
||||
|
||||
/** 支付订单导出请求 */
|
||||
export interface OrderExportReq {
|
||||
merchantId?: number;
|
||||
appId?: number;
|
||||
channelId?: number;
|
||||
channelCode?: string;
|
||||
merchantOrderId?: string;
|
||||
subject?: string;
|
||||
body?: string;
|
||||
notifyUrl?: string;
|
||||
notifyStatus?: number;
|
||||
amount?: number;
|
||||
channelFeeRate?: number;
|
||||
channelFeeAmount?: number;
|
||||
no?: string;
|
||||
status?: number;
|
||||
expireTime?: Date[];
|
||||
successTime?: Date[];
|
||||
notifyTime?: Date[];
|
||||
successExtensionId?: number;
|
||||
refundStatus?: number;
|
||||
refundTimes?: number;
|
||||
channelUserId?: string;
|
||||
channelOrderNo?: string;
|
||||
createTime?: Date[];
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询支付订单列表 */
|
||||
export function getOrderPage(params: PayOrderApi.OrderPageReq) {
|
||||
export function getOrderPage(params: PayOrderApi.OrderPageReqVO) {
|
||||
return requestClient.get<PageResult<PayOrderApi.Order>>('/pay/order/page', {
|
||||
params,
|
||||
});
|
||||
@@ -120,6 +79,6 @@ export function submitOrder(data: any) {
|
||||
}
|
||||
|
||||
/** 导出支付订单 */
|
||||
export function exportOrder(params: PayOrderApi.OrderExportReq) {
|
||||
export function exportOrder(params: any) {
|
||||
return requestClient.download('/pay/order/export-excel', { params });
|
||||
}
|
||||
|
||||
@@ -38,36 +38,7 @@ export namespace PayRefundApi {
|
||||
}
|
||||
|
||||
/** 退款订单分页请求 */
|
||||
export interface RefundPageReq extends PageParam {
|
||||
merchantId?: number;
|
||||
appId?: number;
|
||||
channelId?: number;
|
||||
channelCode?: string;
|
||||
orderId?: string;
|
||||
tradeNo?: string;
|
||||
merchantOrderId?: string;
|
||||
merchantRefundNo?: string;
|
||||
notifyUrl?: string;
|
||||
notifyStatus?: number;
|
||||
status?: number;
|
||||
type?: number;
|
||||
payAmount?: number;
|
||||
refundAmount?: number;
|
||||
reason?: string;
|
||||
userIp?: string;
|
||||
channelOrderNo?: string;
|
||||
channelRefundNo?: string;
|
||||
channelErrorCode?: string;
|
||||
channelErrorMsg?: string;
|
||||
channelExtras?: string;
|
||||
expireTime?: Date[];
|
||||
successTime?: Date[];
|
||||
notifyTime?: Date[];
|
||||
createTime?: Date[];
|
||||
}
|
||||
|
||||
/** 退款订单导出请求 */
|
||||
export interface RefundExportReq {
|
||||
export interface RefundPageReqVO extends PageParam {
|
||||
merchantId?: number;
|
||||
appId?: number;
|
||||
channelId?: number;
|
||||
@@ -97,7 +68,7 @@ export namespace PayRefundApi {
|
||||
}
|
||||
|
||||
/** 查询退款订单列表 */
|
||||
export function getRefundPage(params: PayRefundApi.RefundPageReq) {
|
||||
export function getRefundPage(params: PayRefundApi.RefundPageReqVO) {
|
||||
return requestClient.get<PageResult<PayRefundApi.Refund>>(
|
||||
'/pay/refund/page',
|
||||
{
|
||||
@@ -111,22 +82,7 @@ export function getRefund(id: number) {
|
||||
return requestClient.get<PayRefundApi.Refund>(`/pay/refund/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 创建退款订单 */
|
||||
export function createRefund(data: PayRefundApi.Refund) {
|
||||
return requestClient.post('/pay/refund/create', data);
|
||||
}
|
||||
|
||||
/** 更新退款订单 */
|
||||
export function updateRefund(data: PayRefundApi.Refund) {
|
||||
return requestClient.put('/pay/refund/update', data);
|
||||
}
|
||||
|
||||
/** 删除退款订单 */
|
||||
export function deleteRefund(id: number) {
|
||||
return requestClient.delete(`/pay/refund/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出退款订单 */
|
||||
export function exportRefund(params: PayRefundApi.RefundExportReq) {
|
||||
export function exportRefund(params: any) {
|
||||
return requestClient.download('/pay/refund/export-excel', { params });
|
||||
}
|
||||
|
||||
@@ -27,26 +27,21 @@ export namespace PayTransferApi {
|
||||
}
|
||||
|
||||
/** 转账单分页请求 */
|
||||
export interface TransferPageReq extends PageParam {
|
||||
export interface TransferPageReqVO extends PageParam {
|
||||
no?: string;
|
||||
appId?: number;
|
||||
channelId?: number;
|
||||
channelCode?: string;
|
||||
merchantTransferId?: string;
|
||||
channelTransferNo?: string;
|
||||
type?: number;
|
||||
price?: number;
|
||||
subject?: string;
|
||||
merchantOrderId?: string;
|
||||
status?: number;
|
||||
userName?: string;
|
||||
userAccount?: string;
|
||||
status?: number;
|
||||
successTime?: Date[];
|
||||
channelTransferNo?: string;
|
||||
createTime?: Date[];
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询转账单列表 */
|
||||
export function getTransferPage(params: PayTransferApi.TransferPageReq) {
|
||||
export function getTransferPage(params: PayTransferApi.TransferPageReqVO) {
|
||||
return requestClient.get<PageResult<PayTransferApi.Transfer>>(
|
||||
'/pay/transfer/page',
|
||||
{
|
||||
|
||||
@@ -3,11 +3,12 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
import type { PayOrderApi } from '#/api/pay/order';
|
||||
|
||||
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
|
||||
import { downloadFileFromBlobPart } from '@vben/utils';
|
||||
|
||||
import { Tag } from 'ant-design-vue';
|
||||
|
||||
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
import { getOrderPage } from '#/api/pay/order';
|
||||
import { exportOrder, getOrderPage } from '#/api/pay/order';
|
||||
import { $t } from '#/locales';
|
||||
|
||||
import { useGridColumns, useGridFormSchema } from './data';
|
||||
@@ -23,6 +24,12 @@ function handleRefresh() {
|
||||
gridApi.query();
|
||||
}
|
||||
|
||||
/** 导出支付订单 */
|
||||
async function handleExport() {
|
||||
const data = await exportOrder(await gridApi.formApi.getValues());
|
||||
downloadFileFromBlobPart({ fileName: '支付订单.xls', source: data });
|
||||
}
|
||||
|
||||
/** 查看详情 */
|
||||
function handleDetail(row: PayOrderApi.Order) {
|
||||
detailModalApi.setData(row).open();
|
||||
@@ -80,6 +87,19 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
</template>
|
||||
<DetailModal @success="handleRefresh" />
|
||||
<Grid table-title="支付订单列表">
|
||||
<template #toolbar-tools>
|
||||
<TableAction
|
||||
:actions="[
|
||||
{
|
||||
label: $t('ui.actionTitle.export', ['支付订单']),
|
||||
type: 'primary',
|
||||
icon: ACTION_ICON.DOWNLOAD,
|
||||
auth: ['pay:order:export'],
|
||||
onClick: handleExport,
|
||||
},
|
||||
]"
|
||||
/>
|
||||
</template>
|
||||
<template #actions="{ row }">
|
||||
<TableAction
|
||||
:actions="[
|
||||
|
||||
@@ -3,11 +3,12 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
import type { PayRefundApi } from '#/api/pay/refund';
|
||||
|
||||
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
|
||||
import { downloadFileFromBlobPart } from '@vben/utils';
|
||||
|
||||
import { Tag } from 'ant-design-vue';
|
||||
|
||||
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
import { getRefundPage } from '#/api/pay/refund';
|
||||
import { exportRefund, getRefundPage } from '#/api/pay/refund';
|
||||
import { $t } from '#/locales';
|
||||
|
||||
import { useGridColumns, useGridFormSchema } from './data';
|
||||
@@ -23,6 +24,12 @@ function handleRefresh() {
|
||||
gridApi.query();
|
||||
}
|
||||
|
||||
/** 导出退款订单 */
|
||||
async function handleExport() {
|
||||
const data = await exportRefund(await gridApi.formApi.getValues());
|
||||
downloadFileFromBlobPart({ fileName: '退款订单.xls', source: data });
|
||||
}
|
||||
|
||||
/** 查看详情 */
|
||||
function handleDetail(row: PayRefundApi.Refund) {
|
||||
detailModalApi.setData(row).open();
|
||||
@@ -71,6 +78,19 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
</template>
|
||||
<DetailModal @success="handleRefresh" />
|
||||
<Grid table-title="支付退款列表">
|
||||
<template #toolbar-tools>
|
||||
<TableAction
|
||||
:actions="[
|
||||
{
|
||||
label: $t('ui.actionTitle.export', ['退款订单']),
|
||||
type: 'primary',
|
||||
icon: ACTION_ICON.DOWNLOAD,
|
||||
auth: ['pay:refund:export'],
|
||||
onClick: handleExport,
|
||||
},
|
||||
]"
|
||||
/>
|
||||
</template>
|
||||
<template #actions="{ row }">
|
||||
<TableAction
|
||||
:actions="[
|
||||
|
||||
@@ -192,13 +192,13 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
field: 'merchantTransferId',
|
||||
label: '商户单号',
|
||||
content: (data: PayTransferApi.Transfer) =>
|
||||
h(Tag, {}, () => data?.merchantTransferId || '-'),
|
||||
h(Tag, {}, () => data?.merchantTransferId),
|
||||
},
|
||||
{
|
||||
field: 'no',
|
||||
label: '转账单号',
|
||||
content: (data: PayTransferApi.Transfer) =>
|
||||
h(Tag, { color: 'orange' }, () => data?.no || '-'),
|
||||
h(Tag, { color: 'orange' }, () => data?.no),
|
||||
},
|
||||
{
|
||||
field: 'appId',
|
||||
|
||||
@@ -3,11 +3,12 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
import type { PayTransferApi } from '#/api/pay/transfer';
|
||||
|
||||
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
|
||||
import { downloadFileFromBlobPart } from '@vben/utils';
|
||||
|
||||
import { Tag } from 'ant-design-vue';
|
||||
|
||||
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
import { getTransferPage } from '#/api/pay/transfer';
|
||||
import { exportTransfer, getTransferPage } from '#/api/pay/transfer';
|
||||
import { $t } from '#/locales';
|
||||
|
||||
import { useGridColumns, useGridFormSchema } from './data';
|
||||
@@ -23,6 +24,12 @@ function handleRefresh() {
|
||||
gridApi.query();
|
||||
}
|
||||
|
||||
/** 导出转账单 */
|
||||
async function handleExport() {
|
||||
const data = await exportTransfer(await gridApi.formApi.getValues());
|
||||
downloadFileFromBlobPart({ fileName: '转账单.xls', source: data });
|
||||
}
|
||||
|
||||
/** 查看转账详情 */
|
||||
function handleDetail(row: PayTransferApi.Transfer) {
|
||||
detailModalApi.setData(row).open();
|
||||
@@ -70,6 +77,19 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
|
||||
<DetailModal @success="handleRefresh" />
|
||||
<Grid table-title="转账单列表">
|
||||
<template #toolbar-tools>
|
||||
<TableAction
|
||||
:actions="[
|
||||
{
|
||||
label: $t('ui.actionTitle.export', ['转账单']),
|
||||
type: 'primary',
|
||||
icon: ACTION_ICON.DOWNLOAD,
|
||||
auth: ['pay:transfer:export'],
|
||||
onClick: handleExport,
|
||||
},
|
||||
]"
|
||||
/>
|
||||
</template>
|
||||
<template #actions="{ row }">
|
||||
<TableAction
|
||||
:actions="[
|
||||
|
||||
@@ -12,6 +12,15 @@ import { useDetailSchema } from '../data';
|
||||
|
||||
const formData = ref<PayTransferApi.Transfer>();
|
||||
|
||||
const [Descriptions] = useDescription({
|
||||
componentProps: {
|
||||
bordered: true,
|
||||
column: 2,
|
||||
class: 'mx-4',
|
||||
},
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
const [Modal, modalApi] = useVbenModal({
|
||||
async onOpenChange(isOpen: boolean) {
|
||||
if (!isOpen) {
|
||||
@@ -31,15 +40,6 @@ const [Modal, modalApi] = useVbenModal({
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
const [Descriptions] = useDescription({
|
||||
componentProps: {
|
||||
bordered: true,
|
||||
column: 2,
|
||||
class: 'mx-4',
|
||||
},
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -25,20 +25,16 @@ export namespace PayAppApi {
|
||||
status: number;
|
||||
}
|
||||
|
||||
export interface AppPageReq extends PageParam {
|
||||
export interface AppPageReqVO extends PageParam {
|
||||
name?: string;
|
||||
appKey?: string;
|
||||
status?: number;
|
||||
remark?: string;
|
||||
payNotifyUrl?: string;
|
||||
refundNotifyUrl?: string;
|
||||
transferNotifyUrl?: string;
|
||||
merchantName?: string;
|
||||
createTime?: Date[];
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询支付应用列表 */
|
||||
export function getAppPage(params: PayAppApi.AppPageReq) {
|
||||
export function getAppPage(params: PayAppApi.AppPageReqVO) {
|
||||
return requestClient.get<PageResult<PayAppApi.App>>('/pay/app/page', {
|
||||
params,
|
||||
});
|
||||
|
||||
@@ -40,60 +40,19 @@ export namespace PayOrderApi {
|
||||
}
|
||||
|
||||
/** 支付订单分页请求 */
|
||||
export interface OrderPageReq extends PageParam {
|
||||
merchantId?: number;
|
||||
export interface OrderPageReqVO extends PageParam {
|
||||
appId?: number;
|
||||
channelId?: number;
|
||||
channelCode?: string;
|
||||
merchantOrderId?: string;
|
||||
subject?: string;
|
||||
body?: string;
|
||||
notifyUrl?: string;
|
||||
notifyStatus?: number;
|
||||
amount?: number;
|
||||
channelFeeRate?: number;
|
||||
channelFeeAmount?: number;
|
||||
status?: number;
|
||||
expireTime?: Date[];
|
||||
successTime?: Date[];
|
||||
notifyTime?: Date[];
|
||||
successExtensionId?: number;
|
||||
refundStatus?: number;
|
||||
refundTimes?: number;
|
||||
channelUserId?: string;
|
||||
channelOrderNo?: string;
|
||||
createTime?: Date[];
|
||||
}
|
||||
|
||||
/** 支付订单导出请求 */
|
||||
export interface OrderExportReq {
|
||||
merchantId?: number;
|
||||
appId?: number;
|
||||
channelId?: number;
|
||||
channelCode?: string;
|
||||
merchantOrderId?: string;
|
||||
subject?: string;
|
||||
body?: string;
|
||||
notifyUrl?: string;
|
||||
notifyStatus?: number;
|
||||
amount?: number;
|
||||
channelFeeRate?: number;
|
||||
channelFeeAmount?: number;
|
||||
no?: string;
|
||||
status?: number;
|
||||
expireTime?: Date[];
|
||||
successTime?: Date[];
|
||||
notifyTime?: Date[];
|
||||
successExtensionId?: number;
|
||||
refundStatus?: number;
|
||||
refundTimes?: number;
|
||||
channelUserId?: string;
|
||||
channelOrderNo?: string;
|
||||
createTime?: Date[];
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询支付订单列表 */
|
||||
export function getOrderPage(params: PayOrderApi.OrderPageReq) {
|
||||
export function getOrderPage(params: PayOrderApi.OrderPageReqVO) {
|
||||
return requestClient.get<PageResult<PayOrderApi.Order>>('/pay/order/page', {
|
||||
params,
|
||||
});
|
||||
@@ -120,6 +79,6 @@ export function submitOrder(data: any) {
|
||||
}
|
||||
|
||||
/** 导出支付订单 */
|
||||
export function exportOrder(params: PayOrderApi.OrderExportReq) {
|
||||
export function exportOrder(params: any) {
|
||||
return requestClient.download('/pay/order/export-excel', { params });
|
||||
}
|
||||
|
||||
@@ -38,36 +38,7 @@ export namespace PayRefundApi {
|
||||
}
|
||||
|
||||
/** 退款订单分页请求 */
|
||||
export interface RefundPageReq extends PageParam {
|
||||
merchantId?: number;
|
||||
appId?: number;
|
||||
channelId?: number;
|
||||
channelCode?: string;
|
||||
orderId?: string;
|
||||
tradeNo?: string;
|
||||
merchantOrderId?: string;
|
||||
merchantRefundNo?: string;
|
||||
notifyUrl?: string;
|
||||
notifyStatus?: number;
|
||||
status?: number;
|
||||
type?: number;
|
||||
payAmount?: number;
|
||||
refundAmount?: number;
|
||||
reason?: string;
|
||||
userIp?: string;
|
||||
channelOrderNo?: string;
|
||||
channelRefundNo?: string;
|
||||
channelErrorCode?: string;
|
||||
channelErrorMsg?: string;
|
||||
channelExtras?: string;
|
||||
expireTime?: Date[];
|
||||
successTime?: Date[];
|
||||
notifyTime?: Date[];
|
||||
createTime?: Date[];
|
||||
}
|
||||
|
||||
/** 退款订单导出请求 */
|
||||
export interface RefundExportReq {
|
||||
export interface RefundPageReqVO extends PageParam {
|
||||
merchantId?: number;
|
||||
appId?: number;
|
||||
channelId?: number;
|
||||
@@ -97,7 +68,7 @@ export namespace PayRefundApi {
|
||||
}
|
||||
|
||||
/** 查询退款订单列表 */
|
||||
export function getRefundPage(params: PayRefundApi.RefundPageReq) {
|
||||
export function getRefundPage(params: PayRefundApi.RefundPageReqVO) {
|
||||
return requestClient.get<PageResult<PayRefundApi.Refund>>(
|
||||
'/pay/refund/page',
|
||||
{
|
||||
@@ -111,22 +82,7 @@ export function getRefund(id: number) {
|
||||
return requestClient.get<PayRefundApi.Refund>(`/pay/refund/get?id=${id}`);
|
||||
}
|
||||
|
||||
/** 创建退款订单 */
|
||||
export function createRefund(data: PayRefundApi.Refund) {
|
||||
return requestClient.post('/pay/refund/create', data);
|
||||
}
|
||||
|
||||
/** 更新退款订单 */
|
||||
export function updateRefund(data: PayRefundApi.Refund) {
|
||||
return requestClient.put('/pay/refund/update', data);
|
||||
}
|
||||
|
||||
/** 删除退款订单 */
|
||||
export function deleteRefund(id: number) {
|
||||
return requestClient.delete(`/pay/refund/delete?id=${id}`);
|
||||
}
|
||||
|
||||
/** 导出退款订单 */
|
||||
export function exportRefund(params: PayRefundApi.RefundExportReq) {
|
||||
export function exportRefund(params: any) {
|
||||
return requestClient.download('/pay/refund/export-excel', { params });
|
||||
}
|
||||
|
||||
@@ -6,37 +6,42 @@ export namespace PayTransferApi {
|
||||
/** 转账单信息 */
|
||||
export interface Transfer {
|
||||
id: number;
|
||||
no: string;
|
||||
appId: number;
|
||||
appName: string;
|
||||
channelId: number;
|
||||
channelCode: string;
|
||||
merchantTransferId: string;
|
||||
type: number;
|
||||
channelTransferNo: string;
|
||||
price: number;
|
||||
subject: string;
|
||||
userName: string;
|
||||
alipayLogonId: string;
|
||||
openid: string;
|
||||
userAccount: string;
|
||||
userIp: string;
|
||||
status: number;
|
||||
successTime: Date;
|
||||
createTime: Date;
|
||||
updateTime: Date;
|
||||
notifyUrl: string;
|
||||
channelNotifyData: string;
|
||||
}
|
||||
|
||||
/** 转账单分页请求 */
|
||||
export interface TransferPageReq extends PageParam {
|
||||
export interface TransferPageReqVO extends PageParam {
|
||||
no?: string;
|
||||
appId?: number;
|
||||
channelId?: number;
|
||||
channelCode?: string;
|
||||
merchantTransferId?: string;
|
||||
type?: number;
|
||||
price?: number;
|
||||
subject?: string;
|
||||
userName?: string;
|
||||
merchantOrderId?: string;
|
||||
status?: number;
|
||||
userName?: string;
|
||||
userAccount?: string;
|
||||
channelTransferNo?: string;
|
||||
createTime?: Date[];
|
||||
}
|
||||
}
|
||||
|
||||
/** 查询转账单列表 */
|
||||
export function getTransferPage(params: PayTransferApi.TransferPageReq) {
|
||||
export function getTransferPage(params: PayTransferApi.TransferPageReqVO) {
|
||||
return requestClient.get<PageResult<PayTransferApi.Transfer>>(
|
||||
'/pay/transfer/page',
|
||||
{
|
||||
|
||||
@@ -3,11 +3,12 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
import type { PayOrderApi } from '#/api/pay/order';
|
||||
|
||||
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
|
||||
import { downloadFileFromBlobPart } from '@vben/utils';
|
||||
|
||||
import { ElTag } from 'element-plus';
|
||||
|
||||
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
import { getOrderPage } from '#/api/pay/order';
|
||||
import { exportOrder, getOrderPage } from '#/api/pay/order';
|
||||
import { $t } from '#/locales';
|
||||
|
||||
import { useGridColumns, useGridFormSchema } from './data';
|
||||
@@ -23,6 +24,12 @@ function handleRefresh() {
|
||||
gridApi.query();
|
||||
}
|
||||
|
||||
/** 导出支付订单 */
|
||||
async function handleExport() {
|
||||
const data = await exportOrder(await gridApi.formApi.getValues());
|
||||
downloadFileFromBlobPart({ fileName: '支付订单.xls', source: data });
|
||||
}
|
||||
|
||||
/** 查看详情 */
|
||||
function handleDetail(row: PayOrderApi.Order) {
|
||||
detailModalApi.setData(row).open();
|
||||
@@ -80,6 +87,19 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
</template>
|
||||
<DetailModal @success="handleRefresh" />
|
||||
<Grid table-title="支付订单列表">
|
||||
<template #toolbar-tools>
|
||||
<TableAction
|
||||
:actions="[
|
||||
{
|
||||
label: $t('ui.actionTitle.export', ['支付订单']),
|
||||
type: 'primary',
|
||||
icon: ACTION_ICON.DOWNLOAD,
|
||||
auth: ['pay:order:export'],
|
||||
onClick: handleExport,
|
||||
},
|
||||
]"
|
||||
/>
|
||||
</template>
|
||||
<template #actions="{ row }">
|
||||
<TableAction
|
||||
:actions="[
|
||||
|
||||
@@ -3,11 +3,12 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
import type { PayRefundApi } from '#/api/pay/refund';
|
||||
|
||||
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
|
||||
import { downloadFileFromBlobPart } from '@vben/utils';
|
||||
|
||||
import { ElTag } from 'element-plus';
|
||||
|
||||
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
import { getRefundPage } from '#/api/pay/refund';
|
||||
import { exportRefund, getRefundPage } from '#/api/pay/refund';
|
||||
import { $t } from '#/locales';
|
||||
|
||||
import { useGridColumns, useGridFormSchema } from './data';
|
||||
@@ -23,6 +24,12 @@ function handleRefresh() {
|
||||
gridApi.query();
|
||||
}
|
||||
|
||||
/** 导出退款订单 */
|
||||
async function handleExport() {
|
||||
const data = await exportRefund(await gridApi.formApi.getValues());
|
||||
downloadFileFromBlobPart({ fileName: '退款订单.xls', source: data });
|
||||
}
|
||||
|
||||
/** 查看详情 */
|
||||
function handleDetail(row: PayRefundApi.Refund) {
|
||||
detailModalApi.setData(row).open();
|
||||
@@ -71,6 +78,19 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
</template>
|
||||
<DetailModal @success="handleRefresh" />
|
||||
<Grid table-title="支付退款列表">
|
||||
<template #toolbar-tools>
|
||||
<TableAction
|
||||
:actions="[
|
||||
{
|
||||
label: $t('ui.actionTitle.export', ['退款订单']),
|
||||
type: 'primary',
|
||||
icon: ACTION_ICON.DOWNLOAD,
|
||||
auth: ['pay:refund:export'],
|
||||
onClick: handleExport,
|
||||
},
|
||||
]"
|
||||
/>
|
||||
</template>
|
||||
<template #actions="{ row }">
|
||||
<TableAction
|
||||
:actions="[
|
||||
@@ -88,7 +108,8 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
<template #no="{ row }">
|
||||
<div class="flex flex-col gap-1 text-left">
|
||||
<p class="text-sm">
|
||||
<ElTag size="small" type="primary"> 商户</ElTag> {{ row.merchantOrderId }}
|
||||
<ElTag size="small" type="primary"> 商户</ElTag>
|
||||
{{ row.merchantOrderId }}
|
||||
</p>
|
||||
<p class="text-sm" v-if="row.merchantRefundId">
|
||||
<ElTag size="small" type="warning">退款</ElTag>
|
||||
|
||||
@@ -3,11 +3,12 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
import type { PayTransferApi } from '#/api/pay/transfer';
|
||||
|
||||
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
|
||||
import { downloadFileFromBlobPart } from '@vben/utils';
|
||||
|
||||
import { ElTag } from 'element-plus';
|
||||
|
||||
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
import { getTransferPage } from '#/api/pay/transfer';
|
||||
import { exportTransfer, getTransferPage } from '#/api/pay/transfer';
|
||||
import { $t } from '#/locales';
|
||||
|
||||
import { useGridColumns, useGridFormSchema } from './data';
|
||||
@@ -23,6 +24,12 @@ function handleRefresh() {
|
||||
gridApi.query();
|
||||
}
|
||||
|
||||
/** 导出转账单 */
|
||||
async function handleExport() {
|
||||
const data = await exportTransfer(await gridApi.formApi.getValues());
|
||||
downloadFileFromBlobPart({ fileName: '转账单.xls', source: data });
|
||||
}
|
||||
|
||||
/** 查看转账详情 */
|
||||
function handleDetail(row: PayTransferApi.Transfer) {
|
||||
detailModalApi.setData(row).open();
|
||||
@@ -70,6 +77,19 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
|
||||
<DetailModal @success="handleRefresh" />
|
||||
<Grid table-title="转账单列表">
|
||||
<template #toolbar-tools>
|
||||
<TableAction
|
||||
:actions="[
|
||||
{
|
||||
label: $t('ui.actionTitle.export', ['转账单']),
|
||||
type: 'primary',
|
||||
icon: ACTION_ICON.DOWNLOAD,
|
||||
auth: ['pay:transfer:export'],
|
||||
onClick: handleExport,
|
||||
},
|
||||
]"
|
||||
/>
|
||||
</template>
|
||||
<template #actions="{ row }">
|
||||
<TableAction
|
||||
:actions="[
|
||||
|
||||
Reference in New Issue
Block a user