mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-07 01:56:44 +08:00
利益展示页面关于年度红利展示以及累计红利展示四舍五入展示2位小数
This commit is contained in:
@@ -199,7 +199,11 @@
|
||||
<div class="text-left" style="width: 75%;">
|
||||
<span>{{ moneyItem.contentLabel }}</span>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<div class="text-right" v-if="moneyItem.content == 'currentBonus_M' || moneyItem.content == 'riskAC_M'">
|
||||
<span class="color_3A81F6">{{ moneyItem.value | numFormat2 }}</span
|
||||
>{{ moneyItem.content | productRateUnit }}
|
||||
</div>
|
||||
<div class="text-right" v-else>
|
||||
<span class="color_3A81F6">{{ moneyItem.value | numFormatNo }}</span
|
||||
>{{ moneyItem.content | productRateUnit }}
|
||||
</div>
|
||||
@@ -395,6 +399,13 @@ export default {
|
||||
numFormat(str) {
|
||||
return str.replace(/\.00/, '')
|
||||
},
|
||||
numFormat2(str) {
|
||||
if (str) {
|
||||
return Number(str.replace(/,/g, '')).toFixed(2)
|
||||
} else {
|
||||
return '-'
|
||||
}
|
||||
},
|
||||
numFormatNo(str) {
|
||||
if (str) {
|
||||
return Number(str.replace(/,/g, '')).toFixed(0)
|
||||
|
||||
Reference in New Issue
Block a user