|
|
@@ -27,7 +27,7 @@
|
|
|
</Poptip>
|
|
|
</div>
|
|
|
<div class="top-card-money">
|
|
|
- <span class="top-card-money-num">¥{{ profit.profit?.toThousandth() || 0 }}</span>
|
|
|
+ <span class="top-card-money-num">¥{{ toFixAndToLocaleString(profit.profit || 0) }}</span>
|
|
|
</div>
|
|
|
<div style="clear: both;"/>
|
|
|
</div>
|
|
|
@@ -46,14 +46,14 @@
|
|
|
<div class="top-card">
|
|
|
<div class="top-card-bottom-text">
|
|
|
<div class="top-card-bottom-text-title">销售总额</div>
|
|
|
- <span class="top-card-bottom-text-num">¥{{ profit.outbound?.toThousandth() || 0 }}</span>
|
|
|
+ <span class="top-card-bottom-text-num">¥{{ toFixAndToLocaleString(profit.outbound || 0) }}</span>
|
|
|
<div style="clear: both;"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="top-card">
|
|
|
<div class="top-card-bottom-text">
|
|
|
<div class="top-card-bottom-text-title">成本总额</div>
|
|
|
- <span class="top-card-bottom-text-num">¥{{ profit.inbound?.toThousandth() || 0 }}</span>
|
|
|
+ <span class="top-card-bottom-text-num">¥{{ toFixAndToLocaleString(profit.inbound || 0) }}</span>
|
|
|
<div style="clear: both;"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -212,7 +212,7 @@ export default {
|
|
|
color: '#41be92',
|
|
|
tooltip: {
|
|
|
valueFormatter: function (value) {
|
|
|
- return '¥' + value.toThousandth()
|
|
|
+ return '¥' + _self.toFixAndToLocaleString(value)
|
|
|
}
|
|
|
},
|
|
|
data: []
|
|
|
@@ -288,7 +288,7 @@ export default {
|
|
|
fontSize: '14'
|
|
|
},
|
|
|
formatter: (value) => {
|
|
|
- return '¥ ' + value.toThousandth()
|
|
|
+ return '¥ ' + _self.toFixAndToLocaleString(value)
|
|
|
},
|
|
|
},
|
|
|
data: []
|
|
|
@@ -413,7 +413,18 @@ export default {
|
|
|
let chart = echarts.getInstanceByDom(document.getElementById(id))
|
|
|
if (chart) chart.dispose()
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ toFixAndToLocaleString(number){
|
|
|
+ if(!number){
|
|
|
+ return '0.00'
|
|
|
+ }
|
|
|
+ let arr = number.toString().split('.')
|
|
|
+ if(arr.length>1){
|
|
|
+ return parseInt(arr[0]).toLocaleString()+(parseFloat('.'+arr[1]).toFixed(2).slice(1,4))
|
|
|
+ }else{
|
|
|
+ return parseInt(arr[0]).toLocaleString()+'.00'
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
created() {
|
|
|
this.getSaleProfit()
|