|
@@ -31,10 +31,23 @@
|
|
|
{{ item.label }}:
|
|
|
<span
|
|
|
v-if="item.label === '盈亏' && statisticsData[item.prop] !== 0"
|
|
|
- >【{{ statisticsData[item.prop] > 0 ? "盈" : "亏" }}】</span
|
|
|
+ ><span
|
|
|
+ :style="
|
|
|
+ statisticsData[item.prop] > 0
|
|
|
+ ? 'color:rgb(99,93,247)'
|
|
|
+ : 'color:red'
|
|
|
+ "
|
|
|
+ >【{{ statisticsData[item.prop] > 0 ? "盈" : "亏" }}】</span
|
|
|
+ ></span
|
|
|
>
|
|
|
</h4>
|
|
|
- <p>{{ statisticsData[item.prop] }}{{ item.ch }}</p>
|
|
|
+ <p>
|
|
|
+ {{
|
|
|
+ item.ch === "元"
|
|
|
+ ? formatPrice(statisticsData[item.prop])
|
|
|
+ : statisticsData[item.prop]
|
|
|
+ }}{{ item.ch }}
|
|
|
+ </p>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -73,7 +86,15 @@
|
|
|
<div>成本(元):{{ props.scope.row["orderCost"] }}</div>
|
|
|
<div>盈亏(元):{{ props.scope.row["orderProfit"] }}</div>
|
|
|
<div v-if="props.scope.row['orderProfit']">
|
|
|
- 【{{ props.scope.row["orderProfit"] > 0 ? "盈" : "亏" }}】
|
|
|
+ <span
|
|
|
+ :style="
|
|
|
+ props.scope.row['orderProfit'] > 0
|
|
|
+ ? 'color:rgb(99,93,247)'
|
|
|
+ : 'color:red'
|
|
|
+ "
|
|
|
+ >
|
|
|
+ 【{{ props.scope.row["orderProfit"] > 0 ? "盈" : "亏" }}】</span
|
|
|
+ >
|
|
|
</div>
|
|
|
</template>
|
|
|
<template slot="statusRoles" slot-scope="props">
|
|
@@ -503,6 +524,12 @@ export default {
|
|
|
this.getStatistics();
|
|
|
},
|
|
|
methods: {
|
|
|
+ formatPrice(price) {
|
|
|
+ return price?.toLocaleString(
|
|
|
+ "zh-CN",
|
|
|
+ (undefined, { minimumFractionDigits: 2, maximumFractionDigits: 4 })
|
|
|
+ );
|
|
|
+ },
|
|
|
//退款状态
|
|
|
refundStatus(i) {
|
|
|
var str = "";
|