index.vue
10.3 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
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
<template>
<div>
<div class="scrm-sub-client-container">
<div class="pageContent">
<GLCombiForm :rowNumber="1" :formObj="searchForm" :formData="leadManageFormList" @handleOk="searchTable" @handleRest="resetTable"></GLCombiForm>
<!-- 线索分配 -->
<div class="leadList">
<div>
<span>线索列表</span>
<span @click="handleToggle()">功能介绍</span>
</div>
<GLButton fn="线索分配" size="small" @click="goAllocation">线索分配</GLButton>
</div>
<GLTable v-loading="loading" :hasNum="true" @setTableHeightEvent="setTableHeightEvent" @setTableFinishFun="setTableFinishFun" ref="leadManage" :getListApi="getListApi" :searchForm="searchForm" :pageConf="pageConf" :noDataImg="url" :tableParams="tableParams">
<!-- 线索类型 -->
<template slot="type" slot-scope="scope">
<span>{{ switchStaff(scope.scope.type) }}</span>
</template>
<!-- 线索状态 -->
<template slot="status" slot-scope="scope">
<span :class="{ circleStatusYellow: scope.scope.status == 0, circleStatusPurple: scope.scope.status == 1, circleStatusGreen: scope.scope.status == 2 }"></span>
<span>{{ scope.scope.status == 0 ? '待跟进' : scope.scope.status == 1 ? '跟进中' : scope.scope.status == 2 ? '已完成' : '' }}</span>
</template>
<!-- 跟进员工 -->
<template slot="userName" slot-scope="scope">
<el-tag type="info" :disable-transitions="false" v-if="scope.scope.userName">
<!-- <i class="el-icon-user-solid"></i> -->
<img class="headPortrait" src="@/assets/headPortrait.png" />
{{ scope.scope.userName }}
</el-tag>
</template>
<template slot="options" slot-scope="scope">
<GLButton class="blue-text" type="text" fn="线索详情" @click="goBasicInfo(scope.scope)">查看</GLButton>
</template>
</GLTable>
</div>
</div>
<!-- 功能介绍 -->
<GLDialog mode="big" :bigTitle="true" :visible.sync="showFuncIntro" :hasFooter="true">
<span slot="custombigtitle">功能介绍</span>
<div class="dialogEncircle ">
<span class="funcText">线索管理模块可查看客户在小程序端留存的售前售后线索,通过配置跟进员工,使线索展示在员工企微任务栏并推送消息提醒,员工跟进线索并输入跟进记录后完成线索跟进</span>
<div class="funcIro">
<div>
<div>
<img src="@/assets/leadManage/newInquiry.png" alt="" />
</div>
<p>客户在小程序留存售前售后线索</p>
</div>
<div>
<div>
<img src="@/assets/leadManage/group.png" alt="" />
</div>
<p>SCRM后台配置线索跟进员工</p>
</div>
<div>
<div>
<img src="@/assets/leadManage/myTodo.png" alt="" />
</div>
<p>线索展示在员工企微任务栏并推送消息提醒</p>
</div>
<div>
<div>
<img src="@/assets/leadManage/addRecord.png" alt="" />
</div>
<p>员工跟进线索并输入跟进记录</p>
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="showFuncIntro = false">关闭</el-button>
</span>
</GLDialog>
</div>
</template>
<script>
import { getTableList } from '@/api/modules/leadManage'
import url from '@/assets/clientDataOverview/nodata.png'
export default {
name: 'leadManage',
data() {
return {
loading: false,
url: url,
searchForm: {
status: '',
type: ''
},
leadManageFormList: [
{
type: 'input',
inputType: 'text',
name: 'keyword',
label: '关键字',
placeholder: '请输入客户名称/手机号'
},
{
type: 'select',
name: 'status',
label: '线索状态',
optionLabel: 'label',
optionId: 'value',
optionList: [
{
label: '全部',
value: ''
},
{
label: '待跟进',
value: 0
},
{
label: '跟进中',
value: 1
},
{
label: '已完成',
value: 2
}
],
placeholder: '请选择'
},
{
type: 'input',
inputType: 'text',
name: 'userName',
label: '跟进人',
placeholder: '请输入跟进人名称'
},
{
type: 'select',
name: 'type',
label: '线索类型',
optionLabel: 'label',
optionId: 'value',
optionList: [
{
label: '全部',
value: ''
},
// {
// label: '客户意见',
// value: 1
// },
// {
// label: '卖车询价',
// value: 2
// },
{
label: '救援服务',
value: 3
},
{
label: '新车询价',
value: 4
},
{
label: '试驾预约',
value: 5
},
{
label: '维保预约',
value: 6
}
],
placeholder: '请选择'
}
],
getListApi: getTableList,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
tableParams: {
listName: 'list',
tableColumns: [
{
label: '单号',
prop: 'orderNo',
minWidth: 180
},
{
label: '客户名称',
prop: 'name',
minWidth: 150
},
{
label: '手机号',
prop: 'phone',
minWidth: 150
},
{
label: '线索类型',
prop: 'type',
addHtml: 'type',
minWidth: 120
},
{
label: '线索状态',
prop: 'status',
addHtml: 'status',
minWidth: 120
},
{
label: '跟进人',
prop: 'userName',
addHtml: 'userName',
minWidth: 140
},
{
label: '创建时间',
prop: 'createdDate',
minWidth: 180
},
{
label: '操作',
prop: 'options',
fixed: 'right',
addHtml: 'options',
width: 70
}
]
},
showFuncIntro: true //功能介绍的显示与隐藏
}
},
created() {
if (window.__POWERED_BY_QIANKUN__) {
//运行在qiankun容器中
this.merchantModel = this.$globalState.session.merchantModel
this.accountLevel = this.$globalState.session.accountLevel
}
// 页面首次加载添加缓存
if (sessionStorage.getItem('isReload')) {
this.showFuncIntro = false
} else {
sessionStorage.setItem('isReload', true)
}
},
mounted() {
//没数据的时候要算高度
setTimeout(() => {
if (!this.$refs.leadManage.data.length) {
this.loading = true
this.$refs.leadManage.setTableHeightFun()
this.loading = false
}
}, 200)
},
methods: {
setTableFinishFun() {
this.$refs.leadManage.data.length ? (this.$refs.leadManage.tableHeightValues = '') : this.$refs.leadManage.setTableHeightFun()
},
setTableHeightEvent() {
this.$refs.leadManage.setTableHeightFun()
},
goAllocation() {
this.$router.push('./leadAllocation')
},
goBasicInfo(row) {
let id = row.id
let type = row.type
this.$router.push({
path: `/leadManage/leadBasicInfo/${id}/${type}`
})
},
handleToggle() {
this.showFuncIntro = !this.showFuncIntro
},
// 搜索表格
searchTable() {
this.$refs.leadManage.refreshTable()
},
//重置表格
resetTable() {
this.searchForm = {
status: '',
type: ''
}
this.$refs.leadManage.refreshTable()
},
// 跟进转换
switchStaff(num) {
switch (num) {
case '3':
return '救援服务'
case '4':
return '新车询价'
case '5':
return '试驾预约'
case '6':
return '维保预约'
default:
break
}
}
}
}
</script>
<style lang="scss" scoped>
.scrm-sub-client-container {
/deep/ .el-table .cell {
text-overflow: clip;
}
/deep/ .el-table .cell,
.el-table th div {
text-overflow: clip;
}
.pageContent {
padding: 20px 20px 30px;
// min-width: 1300px;
background-color: #fff;
/deep/ .el-icon-user-solid {
color: #75acff;
// margin-right: 3px;
font-size: 14px;
}
.leadList {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
div {
text-align: center;
span:nth-child(1) {
font-weight: 600;
font-size: 16px;
}
span:nth-child(2) {
font-size: 14px;
margin-left: 8px;
color: #5850ff;
border-bottom: 1px solid #5850ff;
cursor: pointer;
}
}
/deep/ .el-button {
color: #5850ff;
border: 1px solid #5850ff;
}
}
/deep/ .el-tag {
height: 26px;
line-height: 26px;
padding: 0 8px;
}
}
.blue-text {
color: #5850ff;
}
}
.dialogEncircle {
// width: 100%;
.funcText {
line-height: 20px;
color: #333;
font-weight: 600;
font-size: 14px;
}
.funcIro {
margin-top: 15px;
display: flex;
justify-content: space-between;
> div {
width: 23%;
div {
height: calc(100% - 65px);
display: flex;
align-items: center;
img {
width: 100%;
}
}
p {
margin-left: 5px;
margin-top: 22px;
color: #333;
line-height: 20px;
font-size: 14px;
}
}
}
}
</style>