fix: formatAmount 重复定义

pull/115/MERGE
xingyu4j 2025-05-26 17:29:34 +08:00
parent ae7b549879
commit 281a2ebae0
7 changed files with 14 additions and 15 deletions

View File

@ -68,4 +68,3 @@ export { initSetupVbenForm, useVbenForm, z };
export type VbenFormSchema = FormSchema<ComponentType>;
export type { VbenFormProps };
export type FormSchemaGetter = () => VbenFormSchema[];

View File

@ -268,7 +268,7 @@ setupVbenVxeTable({
// 这里可以自行扩展 vxe-table 的全局配置,比如自定义格式化
// vxeUI.formats.add
// add by 星语:数量格式化,例如说:金额
vxeUI.formats.add('formatAmount', {
vxeUI.formats.add('formatNumber', {
cellFormatMethod({ cellValue }, digits = 2) {
if (cellValue === null || cellValue === undefined) {
return '';

View File

@ -307,7 +307,7 @@ export function useContractColumns<T = CrmContractApi.Contract>(
field: 'price',
title: '合同金额(元)',
minWidth: 120,
formatter: 'formatAmount',
formatter: 'formatNumber',
},
{
field: 'orderDate',
@ -349,13 +349,13 @@ export function useContractColumns<T = CrmContractApi.Contract>(
field: 'totalReceivablePrice',
title: '已回款金额(元)',
minWidth: 140,
formatter: 'formatAmount',
formatter: 'formatNumber',
},
{
field: 'noReceivablePrice',
title: '未回款金额(元)',
minWidth: 120,
formatter: 'formatAmount',
formatter: 'formatNumber',
},
{
field: 'contactLastTime',
@ -670,7 +670,7 @@ export function useReceivableAuditColumns<T = CrmReceivableApi.Receivable>(
field: 'price',
title: '回款金额(元)',
minWidth: 140,
formatter: 'formatAmount',
formatter: 'formatNumber',
},
{
field: 'returnType',
@ -690,7 +690,7 @@ export function useReceivableAuditColumns<T = CrmReceivableApi.Receivable>(
field: 'contract.totalPrice',
title: '合同金额(元)',
minWidth: 140,
formatter: 'formatAmount',
formatter: 'formatNumber',
},
{
field: 'ownerUserName',
@ -801,7 +801,7 @@ export function useReceivablePlanRemindColumns<T = CrmReceivableApi.Receivable>(
field: 'price',
title: '计划回款金额(元)',
minWidth: 120,
formatter: 'formatAmount',
formatter: 'formatNumber',
},
{
field: 'returnTime',
@ -844,7 +844,7 @@ export function useReceivablePlanRemindColumns<T = CrmReceivableApi.Receivable>(
field: 'receivable.price',
title: '实际回款金额(元)',
minWidth: 160,
formatter: 'formatAmount',
formatter: 'formatNumber',
},
{
field: 'receivable.returnTime',

View File

@ -118,7 +118,7 @@ export function useGridColumns<T = CrmBusinessApi.Business>(
field: 'totalPrice',
title: '商机金额(元)',
minWidth: 140,
formatter: 'formatAmount',
formatter: 'formatNumber',
},
{
field: 'dealTime',

View File

@ -78,17 +78,17 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
{
title: '支付金额',
field: 'price',
formatter: 'formatAmount',
formatter: 'formatNumber',
},
{
title: '退款金额',
field: 'refundPrice',
formatter: 'formatAmount',
formatter: 'formatNumber',
},
{
title: '手续金额',
field: 'channelFeePrice',
formatter: 'formatAmount',
formatter: 'formatNumber',
},
{
title: '订单号',

View File

@ -263,7 +263,7 @@ setupVbenVxeTable({
});
// 添加数量格式化,例如金额
vxeUI.formats.add('formatAmount', {
vxeUI.formats.add('formatNumber', {
cellFormatMethod({ cellValue }, digits = 2) {
if (cellValue === null || cellValue === undefined) {
return '';

View File

@ -277,7 +277,7 @@ setupVbenVxeTable({
// 这里可以自行扩展 vxe-table 的全局配置,比如自定义格式化
// vxeUI.formats.add
// add by 星语:数量格式化,例如说:金额
vxeUI.formats.add('formatAmount', {
vxeUI.formats.add('formatNumber', {
cellFormatMethod({ cellValue }, digits = 2) {
if (cellValue === null || cellValue === undefined) {
return '';