refactor: 优化代码格式,调整导入顺序和内容对齐
parent
95f2d1c9bb
commit
361ae581ae
|
@ -10,7 +10,13 @@ import {
|
|||
setupVbenVxeTable,
|
||||
useVbenVxeGrid,
|
||||
} from '@vben/plugins/vxe-table';
|
||||
import { erpCountInputFormatter, erpNumberFormatter, formatPast2, isFunction, isString } from '@vben/utils';
|
||||
import {
|
||||
erpCountInputFormatter,
|
||||
erpNumberFormatter,
|
||||
formatPast2,
|
||||
isFunction,
|
||||
isString,
|
||||
} from '@vben/utils';
|
||||
|
||||
import { ElButton, ElImage, ElPopconfirm, ElSwitch } from 'element-plus';
|
||||
|
||||
|
@ -285,7 +291,6 @@ setupVbenVxeTable({
|
|||
return `${erpNumberFormatter(cellValue, digits)}元`;
|
||||
},
|
||||
});
|
||||
|
||||
},
|
||||
useVbenForm,
|
||||
});
|
||||
|
|
|
@ -53,8 +53,8 @@ const Description = defineComponent({
|
|||
{...props}
|
||||
border={props.componentProps?.border}
|
||||
column={props.componentProps?.column}
|
||||
extra={props.componentProps?.extra}
|
||||
direction={props.componentProps?.direction}
|
||||
extra={props.componentProps?.extra}
|
||||
size={props.componentProps?.size}
|
||||
title={props.componentProps?.title}
|
||||
>
|
||||
|
|
|
@ -12,9 +12,9 @@ import {
|
|||
ElButton,
|
||||
ElCard,
|
||||
ElDescriptions,
|
||||
ElImage,
|
||||
ElInput,
|
||||
ElMessage,
|
||||
ElImage,
|
||||
} from 'element-plus';
|
||||
|
||||
import { getOrder, submitOrder } from '#/api/pay/order';
|
||||
|
|
|
@ -7,7 +7,7 @@ import { useRouter } from 'vue-router';
|
|||
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
|
||||
import { formatDateTime } from '@vben/utils';
|
||||
|
||||
import { ElMessage, ElLoading } from 'element-plus';
|
||||
import { ElLoading, ElMessage } from 'element-plus';
|
||||
|
||||
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
import { getDemoOrderPage, refundDemoOrder } from '#/api/pay/demo/order';
|
||||
|
|
|
@ -5,7 +5,7 @@ import type { DemoWithdrawApi } from '#/api/pay/demo/withdraw';
|
|||
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
|
||||
import { erpPriceInputFormatter } from '@vben/utils';
|
||||
|
||||
import { ElMessage, ElLoading, ElTag } from 'element-plus';
|
||||
import { ElLoading, ElMessage, ElTag } from 'element-plus';
|
||||
|
||||
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
import {
|
||||
|
|
|
@ -4,7 +4,13 @@ import { ref } from 'vue';
|
|||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { formatDateTime } from '@vben/utils';
|
||||
|
||||
import { ElDescriptions, ElDescriptionsItem, ElDivider, ElTable, ElTag } from 'element-plus';
|
||||
import {
|
||||
ElDescriptions,
|
||||
ElDescriptionsItem,
|
||||
ElDivider,
|
||||
ElTable,
|
||||
ElTag,
|
||||
} from 'element-plus';
|
||||
|
||||
import { getNotifyTaskDetail } from '#/api/pay/notify';
|
||||
import { DictTag } from '#/components/dict-tag';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import type { VbenFormSchema } from '#/adapter/form';
|
||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
import type { DescriptionItemSchema } from '#/components/description';
|
||||
import type { PayOrderApi } from '#/api/pay/order';
|
||||
import type { DescriptionItemSchema } from '#/components/description';
|
||||
|
||||
import { h } from 'vue';
|
||||
|
||||
|
@ -175,37 +175,44 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
|||
{
|
||||
field: 'price',
|
||||
label: '支付金额',
|
||||
content: (data: PayOrderApi.Order) => `¥${erpPriceInputFormatter(data?.price)}`,
|
||||
content: (data: PayOrderApi.Order) =>
|
||||
`¥${erpPriceInputFormatter(data?.price)}`,
|
||||
},
|
||||
{
|
||||
field: 'channelFeePrice',
|
||||
label: '手续费',
|
||||
content: (data: PayOrderApi.Order) => `¥${erpPriceInputFormatter(data?.channelFeePrice)}`,
|
||||
content: (data: PayOrderApi.Order) =>
|
||||
`¥${erpPriceInputFormatter(data?.channelFeePrice)}`,
|
||||
},
|
||||
{
|
||||
field: 'channelFeeRate',
|
||||
label: '手续费比例',
|
||||
content: (data: PayOrderApi.Order) => `${erpPriceInputFormatter(data?.channelFeeRate)}%`,
|
||||
content: (data: PayOrderApi.Order) =>
|
||||
`${erpPriceInputFormatter(data?.channelFeeRate)}%`,
|
||||
},
|
||||
{
|
||||
field: 'successTime',
|
||||
label: '支付时间',
|
||||
content: (data: PayOrderApi.Order) => formatDateTime(data?.successTime) as string,
|
||||
content: (data: PayOrderApi.Order) =>
|
||||
formatDateTime(data?.successTime) as string,
|
||||
},
|
||||
{
|
||||
field: 'expireTime',
|
||||
label: '失效时间',
|
||||
content: (data: PayOrderApi.Order) => formatDateTime(data?.expireTime) as string,
|
||||
content: (data: PayOrderApi.Order) =>
|
||||
formatDateTime(data?.expireTime) as string,
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
label: '创建时间',
|
||||
content: (data: PayOrderApi.Order) => formatDateTime(data?.createTime) as string,
|
||||
content: (data: PayOrderApi.Order) =>
|
||||
formatDateTime(data?.createTime) as string,
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
label: '更新时间',
|
||||
content: (data: PayOrderApi.Order) => formatDateTime(data?.updateTime) as string,
|
||||
content: (data: PayOrderApi.Order) =>
|
||||
formatDateTime(data?.updateTime) as string,
|
||||
},
|
||||
{
|
||||
field: 'subject',
|
||||
|
@ -241,7 +248,8 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
|||
{
|
||||
field: 'refundPrice',
|
||||
label: '退款金额',
|
||||
content: (data: PayOrderApi.Order) => `¥${erpPriceInputFormatter(data?.refundPrice)}`,
|
||||
content: (data: PayOrderApi.Order) =>
|
||||
`¥${erpPriceInputFormatter(data?.refundPrice)}`,
|
||||
},
|
||||
{
|
||||
field: 'notifyUrl',
|
||||
|
|
|
@ -99,7 +99,8 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
|||
<template #no="{ row }">
|
||||
<div class="flex flex-col gap-1 text-left">
|
||||
<p class="text-sm">
|
||||
<ElTag size="small" type="primary"> 商户</ElTag> {{ row.merchantOrderId }}
|
||||
<ElTag size="small" type="primary"> 商户</ElTag>
|
||||
{{ row.merchantOrderId }}
|
||||
</p>
|
||||
<p class="text-sm" v-if="row.no">
|
||||
<ElTag size="small" type="warning">支付</ElTag> {{ row.no }}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import type { PayOrderApi } from '#/api/pay/order';
|
||||
|
||||
import { ref, } from 'vue';
|
||||
import { ref } from 'vue';
|
||||
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
|
||||
|
|
Loading…
Reference in New Issue