import { fenToYuan } from '@/utils' import { TableColumnCtx } from 'element-plus' // 格式化金额【分转元】 export const fenToYuanFormat = ( row: any, column: TableColumnCtx, cellValue: any, index: number ) => { return `¥${fenToYuan(cellValue)}` } export const accountantFormart = (row, column, cellValue) => { cellValue = cellValue + '' || '' let x = cellValue.split('.') let x1 = x[0] let x2 = x.length > 1 ? '.' + x[1] : '' const reg = /(\d+)(\d{3})/ while(reg.test(x1)){ x1 = x1.replace(reg, '$1,$2') } return x1+x2 }