details.vue
2.34 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
115
116
117
<template>
<div class="microStore">
<div class="wa-container">
<div class="big-title">查看详情</div>
<div class="details-content">
<div class="content" v-for="(item,index) in detailsList" :key="index">
<div class="list-text">
<span class="label">{{ item.label }}:</span>
<span class="prop" v-if="detailsRes">{{ detailsRes[item.prop] || '--' }}</span>
</div>
</div>
</div>
</div>
<el-button class="back-btn" @click="handleBack">返回</el-button>
</div>
</template>
<script>
export default {
name: "details",
data() {
return {
detailsList: [
{
label: '项目名称',
prop: 'bizRelName'
},
{
label: '消费积分',
prop: 'integralValue'
},
{
label: '客户昵称',
prop: 'customerWechatName'
},
{
label: '手机号',
prop: 'customerPhone'
},
{
label: '核销员工',
prop: 'verificationStaff'
},
{
label: '结算状态',
prop: 'settlementStatus'
},
{
label: '核销日期',
prop: 'verificationTime'
},
{
label: '订单编号',
prop: 'orderCode'
}
],
detailsRes: null
}
},
methods: {
getDetails(id) {
let params = {
id
}
this.$apis.pointWriteOff.pointWriteOffDetail(params).then(res => {
res.settlementStatus = res.settlementStatus == 0 ? '未结算' : '已结算'
this.detailsRes = res
})
},
handleBack() {
this.$router.back()
}
},
created() {
let id = this.$route.query.id || ''
this.getDetails(id)
}
}
</script>
<style lang="scss" scoped>
.wa-container {
background: #FFFFFF;
min-height: 80vh;
.big-title {
font-size: 16px;
font-weight: 600;
padding: 15px 20px;
color: #333;
border-bottom: 1px solid #E5E5E5;
}
.details-content {
padding: 50px 120px;
display: grid;
grid-template-columns: 33.3% 33.3% 33.3%;
.list-text {
margin-bottom: 20px;
font-size: 14px;
.label {
color: #666666;
}
.prop{
color: #333333;
}
}
}
}
.back-btn {
margin: 16px auto;
display: flex;
}
</style>