fix: 金额显示
This commit is contained in:
@@ -2,7 +2,7 @@ import type { VbenFormSchema } from '#/adapter/form';
|
||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
|
||||
import { useUserStore } from '@vben/stores';
|
||||
import { erpPriceMultiply, floatToFixed2 } from '@vben/utils';
|
||||
import { erpPriceInputFormatter, erpPriceMultiply } from '@vben/utils';
|
||||
|
||||
import { z } from '#/adapter/form';
|
||||
import { getSimpleBusinessList } from '#/api/crm/business';
|
||||
@@ -341,7 +341,9 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
field: 'unpaidPrice',
|
||||
minWidth: 150,
|
||||
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 {
|
||||
erpPriceInputFormatter,
|
||||
floatToFixed2,
|
||||
formatDateTime,
|
||||
} from '@vben/utils';
|
||||
import { erpPriceInputFormatter, formatDateTime } from '@vben/utils';
|
||||
|
||||
import { DictTag } from '#/components/dict-tag';
|
||||
import { DICT_TYPE } from '#/utils';
|
||||
@@ -148,7 +144,9 @@ export function useDetailListColumns(): VxeTableGridOptions['columns'] {
|
||||
field: 'unpaidPrice',
|
||||
minWidth: 150,
|
||||
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 { useUserStore } from '@vben/stores';
|
||||
import { floatToFixed2 } from '@vben/utils';
|
||||
import { erpPriceInputFormatter } from '@vben/utils';
|
||||
|
||||
import { getContractSimpleList } from '#/api/crm/contract';
|
||||
import { getCustomerSimpleList } from '#/api/crm/customer';
|
||||
@@ -254,9 +254,9 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
minWidth: 160,
|
||||
formatter: ({ row }) => {
|
||||
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);
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user