fix : 格式化金额显示
This commit is contained in:
@@ -130,7 +130,10 @@ const tableConfig = reactive({
|
||||
{
|
||||
prop: 'afterTax',
|
||||
label: '税后余额(元)',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
currentRender:({row})=>{
|
||||
return <span>{toThousands(row.afterTax)}</span>
|
||||
}
|
||||
}
|
||||
],
|
||||
api: '/workflow/mosr/expense/ledger',
|
||||
@@ -140,6 +143,14 @@ const search = (val) => {
|
||||
tableConfig.params = {...val}
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
const toThousands=(num)=> {
|
||||
if(num==undefined||num==null)return '--';
|
||||
const options = {
|
||||
style: 'currency',
|
||||
currency: 'CNY',
|
||||
};
|
||||
return (num).toLocaleString('zh-CN', options)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user