feat:【antd】【ele】【pay 支付】order/refund/transfer 导出的缺失补全
This commit is contained in:
@@ -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="[
|
||||
|
||||
Reference in New Issue
Block a user