fix: 金额显示问题 && utils 引用路径
This commit is contained in:
@@ -167,7 +167,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
{
|
||||
field: 'totalPrice',
|
||||
title: '商机金额(元)',
|
||||
formatter: 'formatNumber',
|
||||
formatter: 'formatAmount2',
|
||||
},
|
||||
{
|
||||
field: 'dealTime',
|
||||
|
||||
@@ -97,7 +97,7 @@ export function useDetailListColumns(): VxeTableGridOptions['columns'] {
|
||||
{
|
||||
field: 'totalPrice',
|
||||
title: '商机金额(元)',
|
||||
formatter: 'formatNumber',
|
||||
formatter: 'formatAmount2',
|
||||
},
|
||||
{
|
||||
field: 'dealTime',
|
||||
|
||||
@@ -6,8 +6,7 @@ import { getSimpleBusinessList } from '#/api/crm/business';
|
||||
import { getSimpleContactList } from '#/api/crm/contact';
|
||||
import { getCustomerSimpleList } from '#/api/crm/customer';
|
||||
import { getSimpleUserList } from '#/api/system/user';
|
||||
import { erpPriceMultiply, floatToFixed2 } from '#/utils';
|
||||
import { DICT_TYPE } from '#/utils/dict';
|
||||
import { DICT_TYPE, erpPriceMultiply, floatToFixed2 } from '#/utils';
|
||||
|
||||
/** 新增/修改的表单 */
|
||||
export function useFormSchema(): VbenFormSchema[] {
|
||||
@@ -242,7 +241,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
title: '合同金额(元)',
|
||||
field: 'totalPrice',
|
||||
minWidth: 150,
|
||||
formatter: 'formatNumber',
|
||||
formatter: 'formatAmount2',
|
||||
},
|
||||
{
|
||||
title: '下单时间',
|
||||
@@ -277,7 +276,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
title: '已回款金额(元)',
|
||||
field: 'totalReceivablePrice',
|
||||
minWidth: 150,
|
||||
formatter: 'formatNumber',
|
||||
formatter: 'formatAmount2',
|
||||
},
|
||||
{
|
||||
title: '未回款金额(元)',
|
||||
|
||||
@@ -120,7 +120,7 @@ export function useDetailListColumns(): VxeTableGridOptions['columns'] {
|
||||
title: '合同金额(元)',
|
||||
field: 'totalPrice',
|
||||
minWidth: 150,
|
||||
formatter: 'formatNumber',
|
||||
formatter: 'formatAmount2',
|
||||
},
|
||||
{
|
||||
title: '合同开始时间',
|
||||
@@ -138,7 +138,7 @@ export function useDetailListColumns(): VxeTableGridOptions['columns'] {
|
||||
title: '已回款金额(元)',
|
||||
field: 'totalReceivablePrice',
|
||||
minWidth: 150,
|
||||
formatter: 'formatNumber',
|
||||
formatter: 'formatAmount2',
|
||||
},
|
||||
{
|
||||
title: '未回款金额(元)',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { VbenFormSchema } from '#/adapter/form';
|
||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
|
||||
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
||||
import { DICT_TYPE, getDictOptions } from '#/utils';
|
||||
|
||||
/** 列表的搜索表单 */
|
||||
export function useGridFormSchema(): VbenFormSchema[] {
|
||||
|
||||
@@ -134,7 +134,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
{
|
||||
field: 'price',
|
||||
title: '价格(元)',
|
||||
formatter: 'formatNumber',
|
||||
formatter: 'formatAmount2',
|
||||
},
|
||||
{
|
||||
field: 'description',
|
||||
@@ -203,7 +203,7 @@ export function useProductEditTableColumns(): VxeTableGridOptions['columns'] {
|
||||
field: 'productPrice',
|
||||
title: '价格(元)',
|
||||
minWidth: 100,
|
||||
formatter: 'formatNumber',
|
||||
formatter: 'formatAmount2',
|
||||
},
|
||||
{
|
||||
field: 'sellingPrice',
|
||||
@@ -221,7 +221,7 @@ export function useProductEditTableColumns(): VxeTableGridOptions['columns'] {
|
||||
field: 'totalPrice',
|
||||
title: '合计',
|
||||
minWidth: 100,
|
||||
formatter: 'formatNumber',
|
||||
formatter: 'formatAmount2',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
|
||||
@@ -94,12 +94,12 @@ export function useDetailListColumns(
|
||||
{
|
||||
field: 'productPrice',
|
||||
title: '产品价格(元)',
|
||||
formatter: 'formatNumber',
|
||||
formatter: 'formatAmount2',
|
||||
},
|
||||
{
|
||||
field: 'businessPrice',
|
||||
title: '商机价格(元)',
|
||||
formatter: 'formatNumber',
|
||||
formatter: 'formatAmount2',
|
||||
visible: showBussinePrice,
|
||||
},
|
||||
{
|
||||
@@ -110,7 +110,7 @@ export function useDetailListColumns(
|
||||
{
|
||||
field: 'totalPrice',
|
||||
title: '合计金额(元)',
|
||||
formatter: 'formatNumber',
|
||||
formatter: 'formatAmount2',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import { getContractSimpleList } from '#/api/crm/contract';
|
||||
import { getCustomerSimpleList } from '#/api/crm/customer';
|
||||
import { getReceivablePlanSimpleList } from '#/api/crm/receivable/plan';
|
||||
import { getSimpleUserList } from '#/api/system/user';
|
||||
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
||||
import { DICT_TYPE, getDictOptions } from '#/utils';
|
||||
|
||||
/** 新增/修改的表单 */
|
||||
export function useFormSchema(): VbenFormSchema[] {
|
||||
@@ -199,7 +199,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
title: '回款金额(元)',
|
||||
field: 'price',
|
||||
minWidth: 150,
|
||||
formatter: 'formatNumber',
|
||||
formatter: 'formatAmount2',
|
||||
},
|
||||
{
|
||||
title: '回款方式',
|
||||
@@ -219,7 +219,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
title: '合同金额(元)',
|
||||
field: 'contract.totalPrice',
|
||||
minWidth: 150,
|
||||
formatter: 'formatNumber',
|
||||
formatter: 'formatAmount2',
|
||||
},
|
||||
{
|
||||
title: '负责人',
|
||||
|
||||
@@ -108,7 +108,7 @@ export function useDetailListColumns(): VxeTableGridOptions['columns'] {
|
||||
title: '回款金额(元)',
|
||||
field: 'price',
|
||||
minWidth: 150,
|
||||
formatter: 'formatNumber',
|
||||
formatter: 'formatAmount2',
|
||||
},
|
||||
{
|
||||
title: '回款方式',
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { VbenFormSchema } from '#/adapter/form';
|
||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
|
||||
import { getCustomerSimpleList } from '#/api/crm/customer';
|
||||
import { DICT_TYPE, getDictOptions } from '#/utils/dict';
|
||||
import { DICT_TYPE, floatToFixed2, getDictOptions } from '#/utils';
|
||||
|
||||
/** 新增/修改的表单 */
|
||||
export function useFormSchema(): VbenFormSchema[] {
|
||||
@@ -141,7 +141,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
title: '计划回款金额(元)',
|
||||
field: 'price',
|
||||
minWidth: 160,
|
||||
formatter: 'formatNumber',
|
||||
formatter: 'formatAmount2',
|
||||
},
|
||||
{
|
||||
title: '计划回款日期',
|
||||
@@ -183,7 +183,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
title: '实际回款金额(元)',
|
||||
field: 'receivable.price',
|
||||
minWidth: 160,
|
||||
formatter: 'formatNumber',
|
||||
formatter: 'formatAmount2',
|
||||
},
|
||||
{
|
||||
title: '实际回款日期',
|
||||
@@ -197,9 +197,9 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
||||
minWidth: 160,
|
||||
formatter: ({ row }) => {
|
||||
if (row.receivable) {
|
||||
return row.price - row.receivable.price;
|
||||
return floatToFixed2(row.price - row.receivable.price);
|
||||
}
|
||||
return row.price;
|
||||
return floatToFixed2(row.price);
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -101,7 +101,7 @@ export function useDetailListColumns(): VxeTableGridOptions['columns'] {
|
||||
title: '计划回款(元)',
|
||||
field: 'price',
|
||||
minWidth: 150,
|
||||
formatter: 'formatNumber',
|
||||
formatter: 'formatAmount2',
|
||||
},
|
||||
{
|
||||
title: '计划回款日期',
|
||||
|
||||
Reference in New Issue
Block a user