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',

View File

@@ -16,12 +16,12 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="6" v-if="route.query.id&&formData.specialFund">
<el-col :span="6" v-if="route.query.id&&formData.isSpecialFund">
<el-form-item label="专项资金" prop="specialFundId">
<span>{{ formData.specialFund }}</span>
</el-form-item>
</el-col>
<el-col :span="6" v-if="!route.query.id&&formData.isSpecialFund">
<el-col :span="6" v-if="!route.query.id">
<el-form-item label="专项资金" prop="specialFundId">
<el-select v-model="formData.specialFundId" placeholder="请选择专项资金" clearable filterable>
<el-option
@@ -213,13 +213,8 @@
<el-input-number v-model="formData.economicEstimate" placeholder="请输入经济概算" :controls="false"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="其中申请公司总部科技创新专项资金(元)" prop="specialFundAmount"
v-if="!route.query.id&&formData.isSpecialFund">
<el-input-number v-model="formData.specialFundAmount" placeholder="请输入专项资金" :controls="false"/>
</el-form-item>
<el-form-item label="其中申请公司总部科技创新专项资金(元)" prop="specialFundAmount"
v-if="route.query.id">
<el-col :span="12" v-if="formData.isSpecialFund!==false">
<el-form-item label="其中申请公司总部科技创新专项资金(元)" prop="specialFundAmount">
<el-input-number v-model="formData.specialFundAmount" placeholder="请输入专项资金" :controls="false"/>
</el-form-item>
</el-col>
@@ -486,7 +481,7 @@ const init = async () => {
specialFundOption.value = resFund.data
const res = await getSubCompOpt()
companyOption.value = res.data
getProcessInfo().then(res => {
getProcessInfo(formData.value.isSpecialFund).then(res => {
if (res.code === 1000) {
let data = res.data
deploymentId.value = data.deploymentId

View File

@@ -9,7 +9,7 @@
<script setup lang="jsx">
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import {reactive, shallowRef} from "vue";
import {toThousands} from '@/utils/changePrice.js'
const router = useRouter()
const shortcuts = [
@@ -265,14 +265,7 @@ 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) {

View File

@@ -9,7 +9,7 @@
<script setup lang="jsx">
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import {reactive, shallowRef} from "vue";
import {toThousands} from '@/utils/changePrice.js'
const router = useRouter()
const shortcuts = [
@@ -301,14 +301,7 @@ 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) {

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 shortcuts = [
{
@@ -264,14 +264,7 @@ 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) {

View File

@@ -12,7 +12,7 @@
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
import { ElNotification} from "element-plus";
import {deleteFund} from "@/api/special-fund";
import {toThousands} from '@/utils/changePrice.js'
const router = useRouter()
const searchConfig = reactive([
{
@@ -159,14 +159,6 @@ 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}