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>
|
||||
|
||||
@@ -192,7 +192,10 @@ const tableConfig = reactive({
|
||||
{
|
||||
prop: 'economicEstimate',
|
||||
label: '经济概算(元)',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
currentRender:({row})=>{
|
||||
return <span>{toThousands(row.economicEstimate)}</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
@@ -262,7 +265,14 @@ const tableConfig = reactive({
|
||||
api: '/workflow/mosr/project/filing',
|
||||
params: {},
|
||||
})
|
||||
|
||||
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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -191,7 +191,10 @@ const tableConfig = reactive({
|
||||
{
|
||||
prop: 'economicEstimate',
|
||||
label: '经济概算(元)',
|
||||
align: 'center'
|
||||
align: 'center',
|
||||
currentRender:({row})=>{
|
||||
return <span>{toThousands(row.economicEstimate)}</span>
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'startTime',
|
||||
@@ -261,7 +264,14 @@ const tableConfig = reactive({
|
||||
api: '/workflow/mosr/project/approval',
|
||||
params: {},
|
||||
})
|
||||
|
||||
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) {
|
||||
|
||||
@@ -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