pointDetailDialog.vue
8.77 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
<template>
<baseDialog
:is-show.sync="dialogShow"
:config="dialogConfig.setting"
:dialog-config="dialogConfig.config"
@closeDialog="handleDetailClose"
>
<div class="detail-content">
<div class="form_div">
<el-form class="edit-sub-block" label-width="110px" :inline="true">
<template>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="积分类型:">
{{ detailInfo.infoName ? detailInfo.infoName : "-" }}
</el-form-item></el-col
>
<el-col :span="12">
<el-form-item label="积分明细:" class="halfItem">
{{
detailInfo.rewardScore
? (detailInfo.type == 0 ? "+" : "-") +
detailInfo.rewardScore
: "--"
}}
</el-form-item></el-col
>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="客户名称:">
{{ detailInfo.customerName ? detailInfo.customerName : "-" }}
</el-form-item></el-col
>
<el-col :span="12">
<el-form-item label="客户手机号:" class="halfItem">
{{
detailInfo.customerPhone ? detailInfo.customerPhone : "-"
}}
</el-form-item></el-col
>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="订单编号:">
{{ detailInfo.orderCode ? detailInfo.orderCode : "-" }}
</el-form-item></el-col
>
<el-col :span="12">
<el-form-item
:label="
detailInfo.sceneType == 7 ? '车辆类型:' : '商品名称:'
"
class="halfItem"
>
<template v-if="detailInfo.sceneType == 7">{{
detailInfo.goodsId
? detailInfo.goodsId == 1
? "置换车"
: "报废车"
: "-"
}}</template>
<template v-else>
{{
detailInfo.goodsName ? detailInfo.goodsName : "-"
}}</template
>
</el-form-item></el-col
>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="积分变化时间:">
{{ detailInfo.updatedTime ? detailInfo.updatedTime : "-" }}
</el-form-item></el-col
>
<el-col :span="12">
<el-form-item label="员工名称:" class="halfItem">
{{ detailInfo.staffName ? detailInfo.staffName : "-" }}
</el-form-item></el-col
>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="员工手机号:" class="halfItem">
{{ detailInfo.staffPhone ? detailInfo.staffPhone : "-" }}
</el-form-item></el-col
>
<el-col :span="12">
<el-form-item label="门店名称:" class="halfItem">
{{ detailInfo.merchantName ? detailInfo.merchantName : "-" }}
</el-form-item></el-col
>
</el-row>
<el-row>
<el-col :span="12">
<template
v-if="
detailInfo.infoName == '积分兑换' ||
detailInfo.infoName == '积分返还'
"
>
<el-form-item label="兑换时间:" class="halfItem">
{{
detailInfo.withdrawalTime
? detailInfo.withdrawalTime
: "-"
}}
</el-form-item>
</template>
<template v-if="detailInfo.infoName == '退款抵扣'">
<el-form-item label="退款时间:" class="halfItem">
{{ detailInfo.failTime ? detailInfo.failTime : "-" }}
</el-form-item></template
>
<template v-if="detailInfo.infoName == '错单抵扣'">
<el-form-item label="错单时间:" class="halfItem">
{{ detailInfo.failTime ? detailInfo.failTime : "-" }}
</el-form-item>
</template>
<template v-if="detailInfo.infoName == '撤单抵扣'">
<el-form-item label="撤单时间:" class="halfItem">
{{ detailInfo.failTime ? detailInfo.failTime : "-" }}
</el-form-item>
</template>
</el-col>
<template v-if="detailInfo.infoName == '撤销抵扣'">
<el-col :span="12" v-if="detailInfo.relationRemark">
<el-form-item label="备注:" class="halfItem">
{{
detailInfo.relationRemark
? detailInfo.relationRemark
: "-"
}}
</el-form-item>
</el-col>
</template>
<template v-else-if="detailInfo.infoName == '手动抵扣'">
<el-col :span="12" v-if="detailInfo.remark">
<el-form-item label="备注:" class="halfItem">
{{ detailInfo.remark ? detailInfo.remark : "-" }}
</el-form-item>
</el-col>
</template>
<template v-if="detailInfo.infoName == '撤销抵扣'">
<el-col :span="12" v-if="detailInfo.remark">
<el-form-item label="撤销原因:" class="halfItem">
{{ detailInfo.remark ? detailInfo.remark : "-" }}
</el-form-item></el-col
>
</template>
</el-row>
</template>
</el-form>
</div>
</div>
</baseDialog>
</template>
<script>
import { Util, deepClone } from "@/common/util"
import { getScoreDetail } from "@api/point"
export default {
name: "DetailDialog",
props: {
visible: {
type: Boolean,
default: false
},
id: {
type: Number,
default: ""
}
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(val) {
this.$emit("update:visible", val)
}
}
},
watch: {
id(val) {
if (val) this.getDetail()
}
},
mounted() {
this.getDetail()
},
data() {
return {
dialogConfig: {
setting: {
showClose: true,
appendToBody: false,
btnList: []
},
config: {
title: "查看详情",
width: "1080px"
}
},
detailInfo: {}
}
},
methods: {
handleDetailClose() {
this.dialogShow = false
},
getDetail() {
getScoreDetail({ id: this.id }).then((res) => {
if (res) {
res.updatedTime = res.updatedTime
? Util.dateFormate(res.updatedTime, "YYYY-MM-DD HH:mm:ss")
: "--"
res.withdrawalTime = res.withdrawalTime
? Util.dateFormate(res.withdrawalTime, "YYYY-MM-DD HH:mm:ss")
: "--"
res.refundTime = res.refundTime
? Util.dateFormate(res.refundTime, "YYYY-MM-DD HH:mm:ss")
: "--"
res.failTime = res.failTime
? Util.dateFormate(res.failTime, "YYYY-MM-DD HH:mm:ss")
: "--"
res.revokeTime = res.revokeTime
? Util.dateFormate(res.revokeTime, "YYYY-MM-DD HH:mm:ss")
: "--"
this.detailInfo = res
}
})
}
}
}
</script>
<style lang="scss" scoped>
.form_div {
color: #333333;
padding: 20px 30px;
// border-bottom: 1px solid #eee;
// .edit-sub-title {
// font-weight: bold;
// margin-bottom: 10px;
// }
.edit-sub-block {
// padding: 0 10px;
.el-form-item {
width: 100%;
margin-bottom: 0px;
}
.itemDiv {
display: flex;
.halfItem {
width: 50%;
}
}
.detail-txt {
display: inline-block;
width: 200px;
vertical-align: bottom;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .el-form-item__content {
max-width: calc(100% - 110px);
word-break: break-all;
}
}
.edit-sub-block-two {
.el-form-item {
// width: 300px;
margin-bottom: 0px;
}
}
}
</style>