fix: 金额显示
parent
20922aec14
commit
0e5ef6e546
|
@ -2,7 +2,7 @@ import type { VbenFormSchema } from '#/adapter/form';
|
||||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
|
|
||||||
import { useUserStore } from '@vben/stores';
|
import { useUserStore } from '@vben/stores';
|
||||||
import { erpPriceMultiply, floatToFixed2 } from '@vben/utils';
|
import { erpPriceInputFormatter, erpPriceMultiply } from '@vben/utils';
|
||||||
|
|
||||||
import { z } from '#/adapter/form';
|
import { z } from '#/adapter/form';
|
||||||
import { getSimpleBusinessList } from '#/api/crm/business';
|
import { getSimpleBusinessList } from '#/api/crm/business';
|
||||||
|
@ -341,7 +341,9 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||||
field: 'unpaidPrice',
|
field: 'unpaidPrice',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
formatter: ({ row }) => {
|
formatter: ({ row }) => {
|
||||||
return floatToFixed2(row.totalPrice - row.totalReceivablePrice);
|
return erpPriceInputFormatter(
|
||||||
|
row.totalPrice - row.totalReceivablePrice,
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,11 +3,7 @@ import type { DescriptionItemSchema } from '#/components/description';
|
||||||
|
|
||||||
import { h } from 'vue';
|
import { h } from 'vue';
|
||||||
|
|
||||||
import {
|
import { erpPriceInputFormatter, formatDateTime } from '@vben/utils';
|
||||||
erpPriceInputFormatter,
|
|
||||||
floatToFixed2,
|
|
||||||
formatDateTime,
|
|
||||||
} from '@vben/utils';
|
|
||||||
|
|
||||||
import { DictTag } from '#/components/dict-tag';
|
import { DictTag } from '#/components/dict-tag';
|
||||||
import { DICT_TYPE } from '#/utils';
|
import { DICT_TYPE } from '#/utils';
|
||||||
|
@ -148,7 +144,9 @@ export function useDetailListColumns(): VxeTableGridOptions['columns'] {
|
||||||
field: 'unpaidPrice',
|
field: 'unpaidPrice',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
formatter: ({ row }) => {
|
formatter: ({ row }) => {
|
||||||
return floatToFixed2(row.totalPrice - row.totalReceivablePrice);
|
return erpPriceInputFormatter(
|
||||||
|
row.totalPrice - row.totalReceivablePrice,
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,7 @@ import type { VbenFormSchema } from '#/adapter/form';
|
||||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
|
|
||||||
import { useUserStore } from '@vben/stores';
|
import { useUserStore } from '@vben/stores';
|
||||||
import { floatToFixed2 } from '@vben/utils';
|
import { erpPriceInputFormatter } from '@vben/utils';
|
||||||
|
|
||||||
import { getContractSimpleList } from '#/api/crm/contract';
|
import { getContractSimpleList } from '#/api/crm/contract';
|
||||||
import { getCustomerSimpleList } from '#/api/crm/customer';
|
import { getCustomerSimpleList } from '#/api/crm/customer';
|
||||||
|
@ -254,9 +254,9 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||||
minWidth: 160,
|
minWidth: 160,
|
||||||
formatter: ({ row }) => {
|
formatter: ({ row }) => {
|
||||||
if (row.receivable) {
|
if (row.receivable) {
|
||||||
return floatToFixed2(row.price - row.receivable.price);
|
return erpPriceInputFormatter(row.price - row.receivable.price);
|
||||||
}
|
}
|
||||||
return floatToFixed2(row.price);
|
return erpPriceInputFormatter(row.price);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,7 +3,7 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
import type { DemoWithdrawApi } from '#/api/pay/demo/withdraw';
|
import type { DemoWithdrawApi } from '#/api/pay/demo/withdraw';
|
||||||
|
|
||||||
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
|
import { DocAlert, Page, useVbenModal } from '@vben/common-ui';
|
||||||
import { floatToFixed2 } from '@vben/utils';
|
import { erpPriceInputFormatter } from '@vben/utils';
|
||||||
|
|
||||||
import { message, Tag } from 'ant-design-vue';
|
import { message, Tag } from 'ant-design-vue';
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
<Tag v-else-if="row.type === 3">钱包余额</Tag>
|
<Tag v-else-if="row.type === 3">钱包余额</Tag>
|
||||||
</template>
|
</template>
|
||||||
<template #price="{ row }">
|
<template #price="{ row }">
|
||||||
<span>¥{{ floatToFixed2(row.price) }}</span>
|
<span>¥{{ erpPriceInputFormatter(row.price) }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #status="{ row }">
|
<template #status="{ row }">
|
||||||
<Tag v-if="row.status === 0 && !row.payTransferId" type="warning">
|
<Tag v-if="row.status === 0 && !row.payTransferId" type="warning">
|
||||||
|
|
|
@ -4,7 +4,7 @@ import type { DescriptionItemSchema } from '#/components/description';
|
||||||
|
|
||||||
import { h } from 'vue';
|
import { h } from 'vue';
|
||||||
|
|
||||||
import { floatToFixed2, formatDateTime } from '@vben/utils';
|
import { erpPriceInputFormatter, formatDateTime } from '@vben/utils';
|
||||||
|
|
||||||
import { Tag } from 'ant-design-vue';
|
import { Tag } from 'ant-design-vue';
|
||||||
|
|
||||||
|
@ -174,17 +174,17 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||||
{
|
{
|
||||||
field: 'price',
|
field: 'price',
|
||||||
label: '支付金额',
|
label: '支付金额',
|
||||||
content: (data) => `¥${floatToFixed2(data?.price)}`,
|
content: (data) => `¥${erpPriceInputFormatter(data?.price)}`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'channelFeePrice',
|
field: 'channelFeePrice',
|
||||||
label: '手续费',
|
label: '手续费',
|
||||||
content: (data) => `¥${floatToFixed2(data?.channelFeePrice)}`,
|
content: (data) => `¥${erpPriceInputFormatter(data?.channelFeePrice)}`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'channelFeeRate',
|
field: 'channelFeeRate',
|
||||||
label: '手续费比例',
|
label: '手续费比例',
|
||||||
content: (data) => `${floatToFixed2(data?.channelFeeRate)}%`,
|
content: (data) => `${erpPriceInputFormatter(data?.channelFeeRate)}%`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'successTime',
|
field: 'successTime',
|
||||||
|
@ -240,7 +240,7 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||||
{
|
{
|
||||||
field: 'refundPrice',
|
field: 'refundPrice',
|
||||||
label: '退款金额',
|
label: '退款金额',
|
||||||
content: (data) => `¥${floatToFixed2(data?.refundPrice)}`,
|
content: (data) => `¥${erpPriceInputFormatter(data?.refundPrice)}`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'notifyUrl',
|
field: 'notifyUrl',
|
||||||
|
|
|
@ -4,7 +4,7 @@ import type { DescriptionItemSchema } from '#/components/description';
|
||||||
|
|
||||||
import { h } from 'vue';
|
import { h } from 'vue';
|
||||||
|
|
||||||
import { floatToFixed2, formatDateTime } from '@vben/utils';
|
import { erpPriceInputFormatter, formatDateTime } from '@vben/utils';
|
||||||
|
|
||||||
import { Tag } from 'ant-design-vue';
|
import { Tag } from 'ant-design-vue';
|
||||||
|
|
||||||
|
@ -217,7 +217,7 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||||
content: (data) => {
|
content: (data) => {
|
||||||
return h(Tag, {
|
return h(Tag, {
|
||||||
color: 'blue',
|
color: 'blue',
|
||||||
content: `¥${floatToFixed2(data?.price)}`,
|
content: `¥${erpPriceInputFormatter(data?.price)}`,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue