feat: use new desc comp
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import type { VbenFormSchema } from '#/adapter/form';
|
||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
import type { PayNotifyApi } from '#/api/pay/notify';
|
||||
import type { DescriptionItemSchema } from '#/components/description';
|
||||
|
||||
import { h } from 'vue';
|
||||
@@ -182,10 +181,10 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'type',
|
||||
label: '通知类型',
|
||||
content: (data: PayNotifyApi.NotifyTask) =>
|
||||
render: (val) =>
|
||||
h(DictTag, {
|
||||
type: DICT_TYPE.PAY_NOTIFY_TYPE,
|
||||
value: data?.type,
|
||||
value: val,
|
||||
}),
|
||||
},
|
||||
{
|
||||
@@ -195,10 +194,10 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'status',
|
||||
label: '通知状态',
|
||||
content: (data: PayNotifyApi.NotifyTask) =>
|
||||
render: (val) =>
|
||||
h(DictTag, {
|
||||
type: DICT_TYPE.PAY_NOTIFY_STATUS,
|
||||
value: data?.status,
|
||||
value: val,
|
||||
}),
|
||||
},
|
||||
{
|
||||
@@ -208,14 +207,12 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'lastExecuteTime',
|
||||
label: '最后通知时间',
|
||||
content: (data: PayNotifyApi.NotifyTask) =>
|
||||
formatDateTime(data?.lastExecuteTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'nextNotifyTime',
|
||||
label: '下次通知时间',
|
||||
content: (data: PayNotifyApi.NotifyTask) =>
|
||||
formatDateTime(data?.nextNotifyTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'notifyTimes',
|
||||
@@ -228,14 +225,12 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'createTime',
|
||||
label: '创建时间',
|
||||
content: (data: PayNotifyApi.NotifyTask) =>
|
||||
formatDateTime(data?.createTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
label: '更新时间',
|
||||
content: (data: PayNotifyApi.NotifyTask) =>
|
||||
formatDateTime(data?.updateTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
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';
|
||||
@@ -184,53 +183,46 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'status',
|
||||
label: '支付状态',
|
||||
content: (data: any) =>
|
||||
render: (val) =>
|
||||
h(DictTag, {
|
||||
type: DICT_TYPE.PAY_ORDER_STATUS,
|
||||
value: data?.status,
|
||||
value: val,
|
||||
}),
|
||||
},
|
||||
{
|
||||
field: 'price',
|
||||
label: '支付金额',
|
||||
content: (data: PayOrderApi.Order) =>
|
||||
`¥${erpPriceInputFormatter(data?.price)}`,
|
||||
render: (val) => `¥${erpPriceInputFormatter(val)}`,
|
||||
},
|
||||
{
|
||||
field: 'channelFeePrice',
|
||||
label: '手续费',
|
||||
content: (data: PayOrderApi.Order) =>
|
||||
`¥${erpPriceInputFormatter(data?.channelFeePrice)}`,
|
||||
render: (val) => `¥${erpPriceInputFormatter(val)}`,
|
||||
},
|
||||
{
|
||||
field: 'channelFeeRate',
|
||||
label: '手续费比例',
|
||||
content: (data: PayOrderApi.Order) =>
|
||||
`${erpPriceInputFormatter(data?.channelFeeRate)}%`,
|
||||
render: (val) => `${erpPriceInputFormatter(val)}%`,
|
||||
},
|
||||
{
|
||||
field: 'successTime',
|
||||
label: '支付时间',
|
||||
content: (data: PayOrderApi.Order) =>
|
||||
formatDateTime(data?.successTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'expireTime',
|
||||
label: '失效时间',
|
||||
content: (data: PayOrderApi.Order) =>
|
||||
formatDateTime(data?.expireTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
label: '创建时间',
|
||||
content: (data: PayOrderApi.Order) =>
|
||||
formatDateTime(data?.createTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
label: '更新时间',
|
||||
content: (data: PayOrderApi.Order) =>
|
||||
formatDateTime(data?.updateTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'subject',
|
||||
@@ -243,10 +235,10 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'channelCode',
|
||||
label: '支付渠道',
|
||||
content: (data: PayOrderApi.Order) =>
|
||||
render: (val) =>
|
||||
h(DictTag, {
|
||||
type: DICT_TYPE.PAY_CHANNEL_CODE,
|
||||
value: data?.channelCode,
|
||||
value: val,
|
||||
}),
|
||||
},
|
||||
{
|
||||
@@ -256,10 +248,7 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'channelOrderNo',
|
||||
label: '渠道单号',
|
||||
content: (data: PayOrderApi.Order) =>
|
||||
data?.channelOrderNo
|
||||
? h(Tag, { color: 'green' }, () => data.channelOrderNo)
|
||||
: '',
|
||||
render: (val) => (val ? h(Tag, { color: 'green' }, () => val) : ''),
|
||||
},
|
||||
{
|
||||
field: 'channelUserId',
|
||||
@@ -268,8 +257,7 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'refundPrice',
|
||||
label: '退款金额',
|
||||
content: (data: PayOrderApi.Order) =>
|
||||
`¥${erpPriceInputFormatter(data?.refundPrice)}`,
|
||||
render: (val) => `¥${erpPriceInputFormatter(val)}`,
|
||||
},
|
||||
{
|
||||
field: 'notifyUrl',
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import type { VbenFormSchema } from '#/adapter/form';
|
||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
import type { PayRefundApi } from '#/api/pay/refund';
|
||||
import type { DescriptionItemSchema } from '#/components/description';
|
||||
|
||||
import { h } from 'vue';
|
||||
@@ -173,26 +172,22 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'merchantRefundId',
|
||||
label: '商户退款单号',
|
||||
content: (data: PayRefundApi.Refund) =>
|
||||
h(Tag, {}, () => data?.merchantRefundId || '-'),
|
||||
render: (val) => h(Tag, {}, () => val || '-'),
|
||||
},
|
||||
{
|
||||
field: 'channelRefundNo',
|
||||
label: '渠道退款单号',
|
||||
content: (data: PayRefundApi.Refund) =>
|
||||
h(Tag, { color: 'success' }, () => data?.channelRefundNo || '-'),
|
||||
render: (val) => h(Tag, { color: 'success' }, () => val || '-'),
|
||||
},
|
||||
{
|
||||
field: 'merchantOrderId',
|
||||
label: '商户支付单号',
|
||||
content: (data: PayRefundApi.Refund) =>
|
||||
h(Tag, {}, () => data?.merchantOrderId || '-'),
|
||||
render: (val) => h(Tag, {}, () => val || '-'),
|
||||
},
|
||||
{
|
||||
field: 'channelOrderNo',
|
||||
label: '渠道支付单号',
|
||||
content: (data: PayRefundApi.Refund) =>
|
||||
h(Tag, { color: 'success' }, () => data?.channelOrderNo || '-'),
|
||||
render: (val) => h(Tag, { color: 'success' }, () => val || '-'),
|
||||
},
|
||||
{
|
||||
field: 'appId',
|
||||
@@ -205,58 +200,55 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'payPrice',
|
||||
label: '支付金额',
|
||||
content: (data: PayRefundApi.Refund) =>
|
||||
render: (val) =>
|
||||
h(
|
||||
Tag,
|
||||
{ color: 'success' },
|
||||
() => `¥${erpPriceInputFormatter(data?.payPrice || 0)}`,
|
||||
() => `¥${erpPriceInputFormatter(val || 0)}`,
|
||||
),
|
||||
},
|
||||
{
|
||||
field: 'refundPrice',
|
||||
label: '退款金额',
|
||||
content: (data: PayRefundApi.Refund) =>
|
||||
render: (val) =>
|
||||
h(
|
||||
Tag,
|
||||
{ color: 'danger' },
|
||||
() => `¥${erpPriceInputFormatter(data?.refundPrice || 0)}`,
|
||||
() => `¥${erpPriceInputFormatter(val || 0)}`,
|
||||
),
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
label: '退款状态',
|
||||
content: (data: any) =>
|
||||
render: (val) =>
|
||||
h(DictTag, {
|
||||
type: DICT_TYPE.PAY_REFUND_STATUS,
|
||||
value: data?.status,
|
||||
value: val,
|
||||
}),
|
||||
},
|
||||
{
|
||||
field: 'successTime',
|
||||
label: '退款时间',
|
||||
content: (data: PayRefundApi.Refund) =>
|
||||
formatDateTime(data?.successTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
label: '创建时间',
|
||||
content: (data: PayRefundApi.Refund) =>
|
||||
formatDateTime(data?.createTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
label: '更新时间',
|
||||
content: (data: PayRefundApi.Refund) =>
|
||||
formatDateTime(data?.updateTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
// 渠道信息部分
|
||||
{
|
||||
field: 'channelCode',
|
||||
label: '退款渠道',
|
||||
content: (data: PayRefundApi.Refund) =>
|
||||
render: (val) =>
|
||||
h(DictTag, {
|
||||
type: DICT_TYPE.PAY_CHANNEL_CODE,
|
||||
value: data?.channelCode,
|
||||
value: val,
|
||||
}),
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import type { VbenFormSchema } from '#/adapter/form';
|
||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
import type { PayTransferApi } from '#/api/pay/transfer';
|
||||
import type { DescriptionItemSchema } from '#/components/description';
|
||||
|
||||
import { h } from 'vue';
|
||||
@@ -191,14 +190,12 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'merchantTransferId',
|
||||
label: '商户单号',
|
||||
content: (data: PayTransferApi.Transfer) =>
|
||||
h(Tag, {}, () => data?.merchantTransferId),
|
||||
render: (val) => h(Tag, {}, () => val),
|
||||
},
|
||||
{
|
||||
field: 'no',
|
||||
label: '转账单号',
|
||||
content: (data: PayTransferApi.Transfer) =>
|
||||
h(Tag, { color: 'orange' }, () => data?.no),
|
||||
render: (val) => h(Tag, { color: 'orange' }, () => val),
|
||||
},
|
||||
{
|
||||
field: 'appId',
|
||||
@@ -207,33 +204,31 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'status',
|
||||
label: '转账状态',
|
||||
content: (data: any) =>
|
||||
render: (val) =>
|
||||
h(DictTag, {
|
||||
type: DICT_TYPE.PAY_TRANSFER_STATUS,
|
||||
value: data?.status,
|
||||
value: val,
|
||||
}),
|
||||
},
|
||||
{
|
||||
field: 'price',
|
||||
label: '转账金额',
|
||||
content: (data: PayTransferApi.Transfer) =>
|
||||
render: (val) =>
|
||||
h(
|
||||
Tag,
|
||||
{ color: 'success' },
|
||||
() => `¥${erpPriceInputFormatter(data?.price || 0)}`,
|
||||
() => `¥${erpPriceInputFormatter(val || 0)}`,
|
||||
),
|
||||
},
|
||||
{
|
||||
field: 'successTime',
|
||||
label: '转账时间',
|
||||
content: (data: PayTransferApi.Transfer) =>
|
||||
formatDateTime(data?.successTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
label: '创建时间',
|
||||
content: (data: PayTransferApi.Transfer) =>
|
||||
formatDateTime(data?.createTime) as string,
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'userName',
|
||||
@@ -246,10 +241,10 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'channelCode',
|
||||
label: '支付渠道',
|
||||
content: (data: PayTransferApi.Transfer) =>
|
||||
render: (val) =>
|
||||
h(DictTag, {
|
||||
type: DICT_TYPE.PAY_CHANNEL_CODE,
|
||||
value: data?.channelCode,
|
||||
value: val,
|
||||
}),
|
||||
},
|
||||
{
|
||||
@@ -259,10 +254,7 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'channelTransferNo',
|
||||
label: '渠道单号',
|
||||
content: (data: PayTransferApi.Transfer) =>
|
||||
data?.channelTransferNo
|
||||
? h(Tag, { color: 'success' }, () => data.channelTransferNo)
|
||||
: '',
|
||||
render: (val) => (val ? h(Tag, { color: 'success' }, () => val) : ''),
|
||||
},
|
||||
{
|
||||
field: 'notifyUrl',
|
||||
|
||||
Reference in New Issue
Block a user