【修改】统计金额修改为千分位展示
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
export function formatMoney(money) {
|
||||
var num = (money || 0).toString(),
|
||||
re = /\d{3}$/,
|
||||
result = ''
|
||||
var point = ''
|
||||
if (num.indexOf('.') !== -1) {
|
||||
point = num.substring(num.indexOf('.'))
|
||||
num = parseInt(num)
|
||||
|
||||
}
|
||||
while (re.test(num)) {
|
||||
result = RegExp.lastMatch + result
|
||||
if (num !== RegExp.lastMatch) {
|
||||
result = ',' + result
|
||||
num = RegExp.leftContext
|
||||
} else {
|
||||
num = ''
|
||||
break
|
||||
}
|
||||
}
|
||||
if (num) {
|
||||
result = num + result
|
||||
}
|
||||
|
||||
function _(result) {
|
||||
return result.replace('-,', '-')
|
||||
}
|
||||
function __(result) {
|
||||
if (result[0] === ',') {
|
||||
result = result.substring(1)
|
||||
}
|
||||
return result
|
||||
}
|
||||
function ___(result) {
|
||||
if (result[0] === '.') {
|
||||
result = '0' + result
|
||||
}
|
||||
return result
|
||||
}
|
||||
return ___(__(_(result) + point))
|
||||
}
|
||||
@@ -138,6 +138,14 @@
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<template slot="allMoney" slot-scope="text">
|
||||
|
||||
<a-tooltip>
|
||||
<template slot="title">{{ formatMoney(text) }}</template>
|
||||
<div class="table-text">{{ formatMoney(text) }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<!-- 是否打包-->
|
||||
<template slot="pack" slot-scope="text, record">
|
||||
<status-slot :statu-obj="record" :status-no="text" :status-type="true"></status-slot>
|
||||
@@ -171,6 +179,14 @@
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<template slot="allMoney" slot-scope="text">
|
||||
|
||||
<a-tooltip>
|
||||
<template slot="title">{{ formatMoney(text) }}</template>
|
||||
<div class="table-text">{{ formatMoney(text) }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
</a-table>
|
||||
</template>
|
||||
|
||||
@@ -191,6 +207,7 @@ import { getAction } from '../../api/manage'
|
||||
import ProjectDetailModal from '../../components/ProjectDetailModal'
|
||||
import { downloadFile } from '../../api/manage'
|
||||
import StatusSlot from '../../components/tools/StatusSlot'
|
||||
import {formatMoney} from '@/utils/formatMoney'
|
||||
|
||||
export default {
|
||||
name: 'WholeInstituteStatisticsList',
|
||||
@@ -256,13 +273,13 @@ export default {
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'allMoney',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '实收金额',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'comeAllMoney',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '来款用途',
|
||||
align: 'center',
|
||||
@@ -311,13 +328,13 @@ export default {
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'allMoney',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '实收金额',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'comeAllMoney',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '来款用途',
|
||||
align: 'center',
|
||||
@@ -350,6 +367,7 @@ export default {
|
||||
this.setScroll()
|
||||
},
|
||||
methods: {
|
||||
formatMoney,
|
||||
/**
|
||||
* 同步表与footer滚动,保留底部滚动条
|
||||
*/
|
||||
|
||||
+26
-4
@@ -90,6 +90,14 @@
|
||||
<j-ellipsis :value="text" :length="18"></j-ellipsis>
|
||||
</template>
|
||||
|
||||
<template slot="allMoney" slot-scope="text">
|
||||
|
||||
<a-tooltip>
|
||||
<template slot="title">{{ formatMoney(text) }}</template>
|
||||
<div class="table-text">{{ formatMoney(text) }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<template slot="footer" v-if="dataSource.length > 0">
|
||||
|
||||
<a-table
|
||||
@@ -107,6 +115,14 @@
|
||||
<j-ellipsis :value="text" :length="18"></j-ellipsis>
|
||||
</template>
|
||||
|
||||
<template slot="allMoney" slot-scope="text">
|
||||
|
||||
<a-tooltip>
|
||||
<template slot="title">{{ formatMoney(text) }}</template>
|
||||
<div class="table-text">{{ formatMoney(text) }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
</a-table>
|
||||
</template>
|
||||
|
||||
@@ -124,6 +140,7 @@ import JYearDate from '../../../components/jero/JYearDate'
|
||||
import SelectPrincipal from '../../../components/company/SelectPrincipal'
|
||||
import { getAllDepartTreeList } from '../../../api/incomePaymentsApi'
|
||||
import { getAction } from '@api/manage'
|
||||
import {formatMoney} from '@/utils/formatMoney'
|
||||
|
||||
export default {
|
||||
name: 'IndividualPaymentStatisticsList',
|
||||
@@ -164,12 +181,14 @@ export default {
|
||||
title: '应收金额',
|
||||
align: 'center',
|
||||
width: 140,
|
||||
dataIndex: 'allMoney'
|
||||
dataIndex: 'allMoney',
|
||||
scopedSlots: {customRender: 'allMoney'}
|
||||
}, {
|
||||
title: '实收金额',
|
||||
align: 'center',
|
||||
width: 140,
|
||||
dataIndex: 'comeAllMoney'
|
||||
dataIndex: 'comeAllMoney',
|
||||
scopedSlots: {customRender: 'allMoney'}
|
||||
}, {
|
||||
title: '个人完成率',
|
||||
align: 'center',
|
||||
@@ -194,12 +213,14 @@ export default {
|
||||
title: '应收金额',
|
||||
align: 'center',
|
||||
width: 140,
|
||||
dataIndex: 'allMoney'
|
||||
dataIndex: 'allMoney',
|
||||
scopedSlots: {customRender: 'allMoney'}
|
||||
}, {
|
||||
title: '实收金额',
|
||||
align: 'center',
|
||||
width: 140,
|
||||
dataIndex: 'comeAllMoney'
|
||||
dataIndex: 'comeAllMoney',
|
||||
scopedSlots: {customRender: 'allMoney'}
|
||||
}, {
|
||||
title: '个人完成率',
|
||||
align: 'center',
|
||||
@@ -228,6 +249,7 @@ export default {
|
||||
this.setScroll()
|
||||
},
|
||||
methods: {
|
||||
formatMoney,
|
||||
// 同步表与footer滚动,保留底部滚动条
|
||||
setScroll() {
|
||||
if (this.dataSource.length === 0) {
|
||||
|
||||
@@ -110,6 +110,14 @@
|
||||
<status-slot :statu-obj="record" :status-no="text" :status-type="true"></status-slot>
|
||||
</template>
|
||||
|
||||
<template slot="allMoney" slot-scope="text">
|
||||
|
||||
<a-tooltip>
|
||||
<template slot="title">{{ formatMoney(text) }}</template>
|
||||
<div class="table-text">{{ formatMoney(text) }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<template slot="footer" v-if="dataSource.length > 0">
|
||||
<a-table
|
||||
size="middle"
|
||||
@@ -128,6 +136,14 @@
|
||||
@click="openDetailModal(record)"></j-ellipsis>
|
||||
</template>
|
||||
|
||||
<template slot="allMoney" slot-scope="text">
|
||||
|
||||
<a-tooltip>
|
||||
<template slot="title">{{ formatMoney(text) }}</template>
|
||||
<div class="table-text">{{ formatMoney(text) }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
|
||||
<template slot="text" slot-scope="text">
|
||||
<j-ellipsis :value="text" :length="18"></j-ellipsis>
|
||||
@@ -151,6 +167,7 @@ import SelectPrincipal from '@comp/company/SelectPrincipal'
|
||||
import { getAllDepartTreeList } from '../../../api/incomePaymentsApi'
|
||||
import ProjectDetailModal from '../../../components/ProjectDetailModal'
|
||||
import StatusSlot from '../../../components/tools/StatusSlot'
|
||||
import {formatMoney} from '@/utils/formatMoney'
|
||||
|
||||
export default {
|
||||
name: 'ProjectPaymentStatisticsList',
|
||||
@@ -210,13 +227,13 @@ export default {
|
||||
align: 'center',
|
||||
width: 160,
|
||||
dataIndex: 'allMoney',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '实收金额',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
dataIndex: 'comeAllMoney',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '来款用途',
|
||||
align: 'center',
|
||||
@@ -261,13 +278,13 @@ export default {
|
||||
align: 'center',
|
||||
width: 160,
|
||||
dataIndex: 'allMoney',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '实收金额',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
dataIndex: 'comeAllMoney',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '来款用途',
|
||||
align: 'center',
|
||||
@@ -298,6 +315,7 @@ export default {
|
||||
this.setScroll()
|
||||
},
|
||||
methods: {
|
||||
formatMoney,
|
||||
/**
|
||||
* 获取科室(部门)数据
|
||||
*/
|
||||
|
||||
+23
-5
@@ -92,6 +92,14 @@
|
||||
<status-slot :statu-obj="record" :status-no="text" :status-type="true"></status-slot>
|
||||
</template>
|
||||
|
||||
<template slot="allMoney" slot-scope="text">
|
||||
|
||||
<a-tooltip>
|
||||
<template slot="title">{{ formatMoney(text) }}</template>
|
||||
<div class="table-text">{{ formatMoney(text) }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<template slot="footer" v-if="dataSource.length > 0">
|
||||
|
||||
<a-table
|
||||
@@ -111,6 +119,14 @@
|
||||
@click="openDetailModal(record)"></j-ellipsis>
|
||||
</template>
|
||||
|
||||
<template slot="allMoney" slot-scope="text">
|
||||
|
||||
<a-tooltip>
|
||||
<template slot="title">{{ formatMoney(text) }}</template>
|
||||
<div class="table-text">{{ formatMoney(text) }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<template slot="text" slot-scope="text">
|
||||
<j-ellipsis :value="text" :length="18"></j-ellipsis>
|
||||
</template>
|
||||
@@ -132,6 +148,7 @@ import JYearDate from '../../../components/jero/JYearDate'
|
||||
import { getAction } from '@api/manage'
|
||||
import ProjectDetailModal from '../../../components/ProjectDetailModal'
|
||||
import StatusSlot from '../../../components/tools/StatusSlot'
|
||||
import {formatMoney} from '@/utils/formatMoney'
|
||||
|
||||
export default {
|
||||
name: 'EnterprisePaymentStatisticsDetail',
|
||||
@@ -173,7 +190,7 @@ export default {
|
||||
width: 300,
|
||||
dataIndex: 'chargeCompanyName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, , {
|
||||
}, {
|
||||
title: '是否打包',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
@@ -184,13 +201,13 @@ export default {
|
||||
align: 'center',
|
||||
width: 160,
|
||||
dataIndex: 'allMoney',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '实收金额',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
dataIndex: 'comeAllMoney',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '来款用途',
|
||||
align: 'center',
|
||||
@@ -229,13 +246,13 @@ export default {
|
||||
align: 'center',
|
||||
width: 160,
|
||||
dataIndex: 'allMoney',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '实收金额',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
dataIndex: 'comeAllMoney',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '来款用途',
|
||||
align: 'center',
|
||||
@@ -262,6 +279,7 @@ export default {
|
||||
this.setScroll()
|
||||
},
|
||||
methods: {
|
||||
formatMoney,
|
||||
// 同步表与footer滚动,保留底部滚动条
|
||||
setScroll() {
|
||||
if (this.dataSource.length === 0) {
|
||||
|
||||
+21
-4
@@ -81,6 +81,13 @@
|
||||
<div class="table-text">{{ text }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<template slot="allMoney" slot-scope="text">
|
||||
|
||||
<a-tooltip>
|
||||
<template slot="title">{{ formatMoney(text) }}</template>
|
||||
<div class="table-text">{{ formatMoney(text) }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||
<a @click="goDetail(record)" v-has="'companyPaymentStatistics:detail'">详情</a>
|
||||
@@ -109,6 +116,14 @@
|
||||
<j-ellipsis :value="text" :length="18"></j-ellipsis>
|
||||
</template>
|
||||
|
||||
<template slot="allMoney" slot-scope="text">
|
||||
|
||||
<a-tooltip>
|
||||
<template slot="title">{{ formatMoney(text) }}</template>
|
||||
<div class="table-text">{{ formatMoney(text) }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
</a-table>
|
||||
</template>
|
||||
|
||||
@@ -126,6 +141,7 @@ import JYearDate from '../../../components/jero/JYearDate'
|
||||
import { getAction } from '@api/manage'
|
||||
import CompanySelect from '@comp/company/CompanySelect'
|
||||
import { filterObj } from '../../../utils/util'
|
||||
import {formatMoney} from '@/utils/formatMoney'
|
||||
|
||||
export default {
|
||||
name: 'EnterprisePaymentStatisticsList',
|
||||
@@ -166,13 +182,13 @@ export default {
|
||||
align: 'center',
|
||||
width: 160,
|
||||
dataIndex: 'allMoney',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '实收总金额',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
dataIndex: 'comeAllMoney',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '到账率',
|
||||
align: 'center',
|
||||
@@ -205,13 +221,13 @@ export default {
|
||||
align: 'center',
|
||||
width: 160,
|
||||
dataIndex: 'allMoney',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '实收总金额',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
dataIndex: 'comeAllMoney',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '到账率',
|
||||
align: 'center',
|
||||
@@ -241,6 +257,7 @@ export default {
|
||||
this.setScroll()
|
||||
},
|
||||
methods: {
|
||||
formatMoney,
|
||||
goDetail(record) {
|
||||
this.$router.push({
|
||||
path: '/statisticalReport/enterprisePaymentStatistics/EnterprisePaymentStatisticsDetail',
|
||||
|
||||
+22
-4
@@ -99,6 +99,14 @@
|
||||
<j-ellipsis :value="text" :length="18"></j-ellipsis>
|
||||
</template>
|
||||
|
||||
<template slot="allMoney" slot-scope="text">
|
||||
|
||||
<a-tooltip>
|
||||
<template slot="title">{{ formatMoney(text) }}</template>
|
||||
<div class="table-text">{{ formatMoney(text) }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||
<a @click="goDetail(record.id)">详情</a>
|
||||
</span>
|
||||
@@ -127,6 +135,14 @@
|
||||
@click="openDetailModal(record)"></j-ellipsis>
|
||||
</template>
|
||||
|
||||
<template slot="allMoney" slot-scope="text">
|
||||
|
||||
<a-tooltip>
|
||||
<template slot="title">{{ formatMoney(text) }}</template>
|
||||
<div class="table-text">{{ formatMoney(text) }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<template slot="text" slot-scope="text">
|
||||
<j-ellipsis :value="text" :length="18"></j-ellipsis>
|
||||
</template>
|
||||
@@ -147,6 +163,7 @@ import SelectPrincipal from '../../../components/company/SelectPrincipal'
|
||||
import JYearDate from '../../../components/jero/JYearDate'
|
||||
import { getAction } from '../../../api/manage'
|
||||
import StatusSlot from '../../../components/tools/StatusSlot'
|
||||
import {formatMoney} from '@/utils/formatMoney'
|
||||
|
||||
export default {
|
||||
name: 'WorkingGroupPaymentStatisticsDetail',
|
||||
@@ -200,13 +217,13 @@ export default {
|
||||
align: 'center',
|
||||
width: 160,
|
||||
dataIndex: 'allMoney',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '实收金额',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
dataIndex: 'comeAllMoney',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '来款用途',
|
||||
align: 'center',
|
||||
@@ -253,13 +270,13 @@ export default {
|
||||
align: 'center',
|
||||
width: 160,
|
||||
dataIndex: 'allMoney',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '实收金额',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
dataIndex: 'comeAllMoney',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '来款用途',
|
||||
align: 'center',
|
||||
@@ -283,6 +300,7 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formatMoney,
|
||||
loadData(arg) {
|
||||
if (!this.url.list) {
|
||||
this.$message.error('请设置url.list属性!')
|
||||
|
||||
+23
-4
@@ -84,6 +84,14 @@
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<template slot="allMoney" slot-scope="text">
|
||||
|
||||
<a-tooltip>
|
||||
<template slot="title">{{ formatMoney(text) }}</template>
|
||||
<div class="table-text">{{ formatMoney(text) }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||
<a @click="goDetail(record.id)" v-has="'workingGroupPaymentStatistics:detail'">详情</a>
|
||||
</span>
|
||||
@@ -117,6 +125,15 @@
|
||||
<div class="table-text">{{ text }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
<template slot="allMoney" slot-scope="text">
|
||||
|
||||
<a-tooltip>
|
||||
<template slot="title">{{ formatMoney(text) }}</template>
|
||||
<div class="table-text">{{ formatMoney(text) }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
|
||||
</a-table>
|
||||
</template>
|
||||
|
||||
@@ -132,6 +149,7 @@ import PageHeaderTitle from '../../../components/layouts/PageHeaderTitle'
|
||||
import { JeroListMixin } from '../../../mixins/JeroListMixin'
|
||||
import JYearDate from '../../../components/jero/JYearDate'
|
||||
import { getAction } from '../../../api/manage'
|
||||
import {formatMoney} from '@/utils/formatMoney'
|
||||
|
||||
export default {
|
||||
name: 'WorkingGroupPaymentStatisticsList',
|
||||
@@ -172,13 +190,13 @@ export default {
|
||||
align: 'center',
|
||||
width: 160,
|
||||
dataIndex: 'allMoney',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '实收总金额',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
dataIndex: 'comeAllMoney',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '实收完成率',
|
||||
align: 'center',
|
||||
@@ -212,13 +230,13 @@ export default {
|
||||
align: 'center',
|
||||
width: 160,
|
||||
dataIndex: 'allMoney',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '实收总金额',
|
||||
align: 'center',
|
||||
width: 160,
|
||||
dataIndex: 'comeAllMoney',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
scopedSlots: { customRender: 'allMoney' }
|
||||
}, {
|
||||
title: '实收完成率',
|
||||
align: 'center',
|
||||
@@ -245,6 +263,7 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formatMoney,
|
||||
loadData(arg) {
|
||||
if (!this.url.list) {
|
||||
this.$message.error('请设置url.list属性!')
|
||||
|
||||
Reference in New Issue
Block a user