feat:【antd】【ele】【pay 支付】pay/order 在 ele 代码优化

This commit is contained in:
YunaiV
2025-10-05 21:12:25 +08:00
parent 73e64b468a
commit 112a7dfb93
5 changed files with 71 additions and 50 deletions

View File

@@ -1,5 +1,6 @@
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { PayOrderApi } from '#/api/pay/order';
import type { DescriptionItemSchema } from '#/components/description';
import { h } from 'vue';
@@ -192,39 +193,44 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{
field: 'price',
label: '支付金额',
content: (data: any) => `${erpPriceInputFormatter(data?.price)}`,
content: (data: PayOrderApi.Order) =>
`${erpPriceInputFormatter(data?.price)}`,
},
{
field: 'channelFeePrice',
label: '手续费',
content: (data: any) =>
content: (data: PayOrderApi.Order) =>
`${erpPriceInputFormatter(data?.channelFeePrice)}`,
},
{
field: 'channelFeeRate',
label: '手续费比例',
content: (data: any) =>
content: (data: PayOrderApi.Order) =>
`${erpPriceInputFormatter(data?.channelFeeRate)}%`,
},
{
field: 'successTime',
label: '支付时间',
content: (data: any) => formatDateTime(data?.successTime || '') as string,
content: (data: PayOrderApi.Order) =>
formatDateTime(data?.successTime) as string,
},
{
field: 'expireTime',
label: '失效时间',
content: (data: any) => formatDateTime(data?.expireTime || '') as string,
content: (data: PayOrderApi.Order) =>
formatDateTime(data?.expireTime) as string,
},
{
field: 'createTime',
label: '创建时间',
content: (data: any) => formatDateTime(data?.createTime || '') as string,
content: (data: PayOrderApi.Order) =>
formatDateTime(data?.createTime) as string,
},
{
field: 'updateTime',
label: '更新时间',
content: (data: any) => formatDateTime(data?.updateTime || '') as string,
content: (data: PayOrderApi.Order) =>
formatDateTime(data?.updateTime) as string,
},
{
field: 'subject',
@@ -237,7 +243,7 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{
field: 'channelCode',
label: '支付渠道',
content: (data: any) =>
content: (data: PayOrderApi.Order) =>
h(DictTag, {
type: DICT_TYPE.PAY_CHANNEL_CODE,
value: data?.channelCode,
@@ -250,7 +256,7 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{
field: 'channelOrderNo',
label: '渠道单号',
content: (data: any) =>
content: (data: PayOrderApi.Order) =>
h(Tag, { color: 'green' }, () => data?.channelOrderNo || ''),
},
{
@@ -260,7 +266,8 @@ export function useDetailSchema(): DescriptionItemSchema[] {
{
field: 'refundPrice',
label: '退款金额',
content: (data: any) => `${erpPriceInputFormatter(data?.refundPrice)}`,
content: (data: PayOrderApi.Order) =>
`${erpPriceInputFormatter(data?.refundPrice)}`,
},
{
field: 'notifyUrl',

View File

@@ -35,7 +35,6 @@ const [Grid, gridApi] = useVbenVxeGrid({
gridOptions: {
cellConfig: {
height: 80,
},
columns: useGridColumns(),
height: 'auto',