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