leadBasicInfo.vue
8.24 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
<template>
<div>
<div class="scrm-sub-client-container">
<div class="pageContent" :style="{ 'min-height': clientHeight + 'px' }">
<!-- 基本信息 -->
<div class="baseTitle">
<p class="title">基本信息</p>
<hr />
<!-- 救援服务 -->
<yl-descriptions v-if="leadType == 3" ref="ylDeacriptions" :tableModel="rescueDescriModel" :showData="leadBaseList" />
<!-- 新车询价 -->
<yl-descriptions v-if="leadType == 4" ref="ylDeacriptions" :tableModel="newcarDescriModel" :showData="leadBaseList" />
<!-- 试驾预约和维保预约 -->
<yl-descriptions v-if="leadType == 5 || leadType == 6" ref="ylDeacriptions" :tableModel="orderDescriModel" :showData="leadBaseList" />
</div>
<!-- 跟进记录 -->
<div class="baseTitle" >
<p class="title">跟进记录</p>
<hr />
<div class="timestamp" v-if="this.leadFollowRecord.length > 0">
<el-timeline>
<el-timeline-item v-for="(item, index) in leadFollowRecord" :key="index" :timestamp="item.followDate" placement="top" :color="index === 0 ? '#5850FF' : ''">
<p class="conductor">
处理人:
<span>{{ item.userName }}</span>
</p>
<p class="remark">{{ item.remark }}</p>
</el-timeline-item>
</el-timeline>
</div>
<div :style="{ 'height': clientHeight- 450 + 'px' }" class="noRecord" v-else>
<img src="@/assets/leadManage/noRecord.png" alt="" />
</div>
</div>
</div>
</div>
<GLFooter class="gl-footer">
<el-button @click="goback()" type="primary" size="small">返回</el-button>
</GLFooter>
</div>
</template>
<script>
import { getBaseInfo } from '@/api/modules/leadManage'
import ylDescriptions from '@/components/ylDescriptions'
export default {
name: 'leadBasicInfo',
components: { ylDescriptions },
data() {
return {
followRecord: [],
clientHeight: '',
leadId: '', //线索id
leadType: '', //线索类型
leadBaseList: {}, //线索详情基本信息
leadFollowRecord: [], //线索详情跟进记录
theSameDescri: [
{
colList: [
{ thColspan: 1, tdColspan: 2, label: '客户名称', name: 'name' },
{ thColspan: 1, tdColspan: 2, label: '客户手机号', name: 'phone' }
]
},
{
colList: [
{ thColspan: 1, tdColspan: 2, label: '单号', name: 'orderNo' },
{ thColspan: 1, tdColspan: 2, label: '线索类型', name: 'type' }
]
},
{
colList: [
{ thColspan: 1, tdColspan: 2, label: '线索状态', name: 'status', color: '#5850FF' },
{ thColspan: 1, tdColspan: 2, label: '创建时间', name: 'createdDate' }
]
},
{
colList: [{ thColspan: 1, tdColspan: 5, label: '跟进时长', name: 'followTime' }]
}
],
// 救援服务
rescueDescri: [
{
colList: [{ thColspan: 1, tdColspan: 5, label: '救援内容', name: 'rescueType' }]
},
{
colList: [{ thColspan: 1, tdColspan: 5, label: '救援地点', name: 'rescueAddress' }]
},
{
colList: [{ thColspan: 1, tdColspan: 5, label: '门店', name: 'merchantName' }]
}
],
// 新车询价
newcarDescri: [
{
colList: [{ thColspan: 1, tdColspan: 5, label: '车型', name: 'vehicleShapeName' }]
},
{
colList: [{ thColspan: 1, tdColspan: 5, label: '询价描述', name: 'comment' }]
},
{
colList: [{ thColspan: 1, tdColspan: 5, label: '门店', name: 'merchantName' }]
}
],
// 维保预约
orderDescri: [
{
colList: [
{ thColspan: 1, tdColspan: 2, label: '车牌号', name: 'plateNum' },
{ thColspan: 1, tdColspan: 2, label: '里程数(km)', name: 'mileage' }
]
},
{
colList: [{ thColspan: 1, tdColspan: 5, label: '门店', name: 'merchantName' }]
}
]
}
},
created() {
this.leadId = this.$route.params.id ? this.$route.params.id : ''
this.leadType = this.$route.params.type ? this.$route.params.type : ''
this.getBaseDetail()
},
mounted() {
this.clientHeight = document.documentElement.clientHeight - 140
},
computed: {
// 救援服务
rescueDescriModel() {
return this.theSameDescri.concat(this.rescueDescri)
},
// 新车询价
newcarDescriModel() {
return this.theSameDescri.concat(this.newcarDescri)
},
// 维保预约
orderDescriModel() {
return this.theSameDescri.concat(this.orderDescri)
}
},
methods: {
goback() {
this.$router.push('/leadManage/index')
},
getBaseDetail() {
let params = { id: this.leadId }
getBaseInfo(params).then(res => {
let dataObj = res
// 转换线索类型
if (dataObj['type']) {
switch (dataObj['type']) {
case '3':
dataObj['type'] = '救援服务'
break
case '4':
dataObj['type'] = '新车询价'
break
case '5':
dataObj['type'] = '试驾预约'
break
case '6':
dataObj['type'] = '维保预约'
}
}
// 转换线索状态
if (dataObj['status']) {
switch (dataObj['status']) {
case '0':
dataObj['status'] = '待跟进'
break
case '1':
dataObj['status'] = '跟进中'
break
case '2':
dataObj['status'] = '已完成'
}
}
// 转换救援内容
if (dataObj['rescueType']) {
switch (dataObj['rescueType']) {
case '0':
dataObj['rescueType'] = '紧急脱困'
break
case '1':
dataObj['rescueType'] = '拖车'
break
case '2':
dataObj['rescueType'] = '换胎'
break
case '3':
dataObj['rescueType'] = '送油'
break
case '4':
dataObj['rescueType'] = '搭电'
break
case '5':
dataObj['rescueType'] = '事故救援'
}
}
this.leadBaseList = dataObj
this.leadFollowRecord = res.followList
})
}
}
}
</script>
<style lang="scss" scoped>
.scrm-sub-client-container {
.pageContent {
// padding: 6px 0px 30px;
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
// min-width: 1300px;
background-color: #fff;
.leadAllocation {
width: 700px;
display: flex;
justify-content: space-between;
}
.baseTitle {
.title {
padding: 15px 30px 0px 20px;
font-size: 16px;
color: #333333;
font-weight: 600;
}
.timestamp {
margin: 25px 20px 30px 44px;
/deep/ .el-timeline-item__timestamp.is-top {
margin-bottom: 3px !important;
}
/deep/ .el-timeline-item__timestamp {
color: #1d2129;
font-size: 14px;
}
/deep/ .el-timeline-item {
padding-bottom: 30px;
}
/deep/ .el-timeline-item__tail {
left: 4px;
top: 15px;
height: 87%;
}
/deep/ .el-timeline-item__node {
background-color: #999999;
}
/deep/ .el-timeline-item__node--normal {
left: 1px;
width: 8px;
height: 8px;
top: 3px;
}
/deep/ .el-timeline-item__content {
p {
padding: 4px 0;
}
.conductor {
font-size: 14px;
> span {
padding-left: 4px;
}
}
.remark {
font-size: 13px;
color: #999999;
line-height: 18px;
}
}
}
.noRecord {
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;//img如果超出这个div会隐藏超出部分
}
}
}
}
</style>