fix : 格式化金额显示

This commit is contained in:
2024-06-08 23:20:44 +08:00
parent 9a862f8cce
commit 29b8bad394
5 changed files with 65 additions and 9 deletions

View File

@@ -210,7 +210,10 @@ const tableConfig = reactive({
{
prop: 'economicEstimate',
label: '经济概算(元)',
align: 'center'
align: 'center',
currentRender:({row})=>{
return <span>{toThousands(row.economicEstimate)}</span>
}
},
{
prop: 'startTime',
@@ -298,7 +301,14 @@ const tableConfig = reactive({
{name: '生成分摊报表', key: '_export', color: '#DED0B2', auth: ''}
]
})
const toThousands=(num)=> {
if(num==undefined||num==null)return '--';
const options = {
style: 'currency',
currency: 'CNY',
};
return (num).toLocaleString('zh-CN', options)
}
const search = (val) => {
let obj = {...val}
if(obj.dateValue) {