fix : 格式化金额显示
This commit is contained in:
@@ -75,12 +75,18 @@ const tableConfig = reactive({
|
||||
{
|
||||
prop: 'fundAmount',
|
||||
label: '资金金额(元)',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
currentRender:({row})=>{
|
||||
return <span>{toThousands(row.fundAmount)}</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'residualAmount',
|
||||
label: '剩余金额(元)',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
currentRender:({row})=>{
|
||||
return <span>{toThousands(row.residualAmount)}</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'projectNumber',
|
||||
@@ -153,6 +159,15 @@ const tableConfig = reactive({
|
||||
]
|
||||
})
|
||||
const tableIns = ref()
|
||||
const toThousands=(num)=> {
|
||||
if(num==undefined||num==null)return '--';
|
||||
const options = {
|
||||
style: 'currency',
|
||||
currency: 'CNY',
|
||||
};
|
||||
return (num).toLocaleString('zh-CN', options)
|
||||
}
|
||||
|
||||
const search = (val) => {
|
||||
tableConfig.params = {...val}
|
||||
tableIns.value.refresh()
|
||||
|
||||
Reference in New Issue
Block a user