fix : 金额格式化

This commit is contained in:
2024-06-09 17:50:49 +08:00
parent cafb0ef5bf
commit 4ed64339fa
11 changed files with 59 additions and 75 deletions

View File

@@ -9,7 +9,7 @@
<script setup lang="jsx">
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import {toThousands} from '@/utils/changePrice.js'
const router = useRouter()
const route = useRoute()
const searchConfig = reactive([
@@ -134,7 +134,19 @@ const tableConfig = reactive({
currentRender:({row})=>{
return <span>{toThousands(row.afterTax)}</span>
}
}
},
{
prop: 'source',
label: '来源',
align: 'center',
currentRender: ({row, index}) => {
if (row.source&&row.source !== null&&row.source!==undefined) {
return (<Tag dictType={'ledger_source'} value={row.source}/>)
} else {
return '--'
}
}
},
],
api: '/workflow/mosr/expense/ledger',
params: {}
@@ -143,14 +155,6 @@ 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>

View File

@@ -48,6 +48,7 @@
</template>
<script setup lang="jsx">
import {toThousands} from '@/utils/changePrice.js'
import OperationRender from '@/views/workflow/common/OperationRender.vue'
import ProcessDiagramViewer from '@/views/workflow/common/ProcessDiagramViewer.vue'
import {ElNotification} from "element-plus";
@@ -104,12 +105,10 @@ const tableConfig = reactive({
{
prop: 'afterTax',
label: '分摊金额',
align: 'center'
},
{
prop: 'digest',
label: '摘要',
align: 'center'
align: 'center',
currentRender:({row})=>{
return <span>{toThousands(row.specialFundAmount)}</span>
}
}
],
api:'/workflow/mosr/cost/allocation/collect',