EquityOrder.vue
2.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<template>
<div class='business-desc-wrap' v-if='orderList'>
<div class='business-top flex'>
<div class='business-border'>
<div class='business-title'>订单总量</div>
<div class='business-number'>{{ toThousands(orderList.totalNum) }}</div>
</div>
<div class='business-border'>
<div class='business-title'>订单总金额</div>
<div class='business-number'>{{ toThousands(orderList.totalMoney) }}</div>
</div>
<div class='business-border'>
<div class='business-title'>今年订单量</div>
<div class='business-number'>{{ toThousands(orderList.thisyear) }}</div>
</div>
<div class='business-border'>
<div class='business-title'>今年订单金额</div>
<div class='business-number'>{{ toThousands(orderList.thisyearMoney) }}</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'EquityOrder',
props: {
orderList: {
type: Object,
default: () => {
}
}
},
data() {
return {}
},
methods: {
toThousands(n) {
// return (num || 0).toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,')
return n.toString().replace(/\d+/, function(m) {
return m.replace(/(\d)(?=(\d{3})+$)/g, function(y) {
return y + ','
})
})
}
}
}
</script>
<style scoped lang='scss'>
.business-desc-wrap {
.business-top {
//justify-content: space-between;
justify-content: space-around;
//text-align: center;
.business-border {
height: 6.71vh;
width: 10vw;
padding: 0.4vh 1.11vw;
box-sizing: border-box;
background: #0b0e31;
.business-title {
font-weight: 400;
font-size: 12px;
color: #e8e8e8;
}
.business-number {
font-weight: 700;
font-size: 20px;
line-height: 30px;
color: #6578ff;
}
.business-time {
font-weight: 700;
font-size: 20px;
line-height: 30px;
color: #6578ff;
}
}
}
.business-bottom {
margin-top: 0.5vh;
height: 6.71vh;
width: 100%;
padding: 0.4vh 1.11vw;
box-sizing: border-box;
background: #0b0e31;
.business-border {
&:first-child {
width: 12vw;
}
}
.business-title {
font-weight: 400;
font-size: 12px;
color: #e8e8e8;
}
.business-number {
font-weight: 700;
font-size: 24px;
line-height: 30px;
color: #6578ff;
}
}
}
</style>