feat:【antd】【ele】【pay 支付】pay/notify 迁移 ele 版本
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
<script lang="ts" setup>
|
||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
import type { PayNotifyApi } from '#/api/pay/notify';
|
||||
|
||||
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
|
||||
import { $t } from '@vben/locales';
|
||||
|
||||
import { ElTag } from 'element-plus';
|
||||
|
||||
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
import { getNotifyTaskPage } from '#/api/pay/notify';
|
||||
|
||||
@@ -16,12 +19,12 @@ const [DetailModal, detailModalApi] = useVbenModal({
|
||||
});
|
||||
|
||||
/** 刷新表格 */
|
||||
function onRefresh() {
|
||||
function handleRefresh() {
|
||||
gridApi.query();
|
||||
}
|
||||
|
||||
/** 查看详情 */
|
||||
function handleDetail(row: any) {
|
||||
function handleDetail(row: PayNotifyApi.NotifyTask) {
|
||||
detailModalApi.setData(row).open();
|
||||
}
|
||||
|
||||
@@ -30,6 +33,9 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
schema: useGridFormSchema(),
|
||||
},
|
||||
gridOptions: {
|
||||
cellConfig: {
|
||||
height: 80,
|
||||
},
|
||||
columns: useGridColumns(),
|
||||
height: 'auto',
|
||||
keepSource: true,
|
||||
@@ -46,12 +52,13 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
},
|
||||
rowConfig: {
|
||||
keyField: 'id',
|
||||
isHover: true,
|
||||
},
|
||||
toolbarConfig: {
|
||||
refresh: true,
|
||||
search: true,
|
||||
},
|
||||
} as VxeTableGridOptions<any>,
|
||||
} as VxeTableGridOptions<PayNotifyApi.NotifyTask>,
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
@@ -60,8 +67,24 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||
<DocAlert title="支付功能开启" url="https://doc.iocoder.cn/pay/build/" />
|
||||
</template>
|
||||
|
||||
<DetailModal @success="onRefresh" />
|
||||
<Grid table-title="支付通知列表">
|
||||
<DetailModal @success="handleRefresh" />
|
||||
<Grid table-title="通知列表">
|
||||
<template #merchantInfo="{ row }">
|
||||
<div class="flex flex-col gap-1 text-left">
|
||||
<p class="text-sm" v-if="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>
|
||||
{{ row.merchantRefundId }}
|
||||
</p>
|
||||
<p class="text-sm" v-if="row.merchantTransferId">
|
||||
<ElTag size="small" type="success">商户转账编号</ElTag>
|
||||
{{ row.merchantTransferId }}
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
<template #actions="{ row }">
|
||||
<TableAction
|
||||
:actions="[
|
||||
|
||||
Reference in New Issue
Block a user