index.data.js
7.52 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
/**
* 线索管理 - 搜索表单配置 & 表格列配置
*/
import { getShopMerchantList } from "@api/usedCarManagement";
/**
* 客户意向等级
*/
export const customerIntentLevelList = [
{ confId: "O", confValue: "O级:新车已定,旧车已签合同(客情回复,确认交车时间)" },
{ confId: "H", confValue: "H级:新车已定,旧车已评估报价,客户正在对比价格(1日内跟进)" },
{ confId: "A", confValue: "A级:客户新车基本看好,一周内会购车,旧车已评估报价(2日内跟进)" },
{ confId: "B", confValue: "B级:新车车型基本看好,预计一个月内会购车,旧车还未确定是否置换(5天内跟进)" },
{ confId: "C", confValue: "C级:客户新车还未确定车型,旧车未确定置换(10天内跟进)" },
{ confId: "D", confValue: "D级:新车未看具体车型,短期内不打算换车,旧车大概看看(20天跟进)" },
];
/**
* 客户意向等级完整描述映射
*/
export const customerIntentLevelMap = {
O: "客情回复,确认交车时间",
H: "1日内跟进",
A: "2日内跟进",
B: "5天内跟进",
C: "10天内跟进",
D: "20天跟进",
};
/**
* 线索状态
*/
export const cluesStatusList = [
{ confId: "1", confValue: "待跟进" },
{ confId: "2", confValue: "跟进中" },
{ confId: "3", confValue: "暂败" },
{ confId: "4", confValue: "成功收车" },
];
/**
* 跟进状态提示
*/
export const followTimeStatusList = [
{ confId: "1", confValue: "临期" },
{ confId: "2", confValue: "已超期" },
{ confId: "0", confValue: "正常" },
];
/**
* 录单人员类型
*/
export const enterTypeList = [
{ confId: "1", confValue: "销售" },
{ confId: "2", confValue: "评估师" },
];
/**
* 获取表格列配置
*/
export async function getTableSchema() {
return [
{
label: "线索 ID",
prop: "cluesNo",
width: "190",
formatter: (cellValue) => {
return cellValue.cluesNo || "-";
},
},
{
label: "录入时间",
prop: "enterTime",
width: "160",
formatter: (cellValue) => {
return cellValue.enterTime || "-";
},
},
{
label: "线索门店",
prop: "sellerMerchantName",
width: "180",
formatter: (cellValue) => {
return cellValue.sellerMerchantName || "-";
},
},
{
label: "推荐销售顾问",
prop: "sellerName",
width: "120",
formatter: (cellValue) => {
return cellValue.sellerName || "-";
},
},
{
label: "车主姓名",
prop: "carOwnerName",
width: "100",
formatter: (cellValue) => {
return cellValue.carOwnerName || "-";
},
},
{
label: "车主电话",
prop: "carOwnerPhone",
width: "120",
formatter: (cellValue) => {
return cellValue.carOwnerPhone || "-";
},
},
{
label: "评估品牌车型",
prop: "carBrand",
width: "180",
formatter: (cellValue) => {
const parts = [
cellValue.carBrand,
cellValue.carChildsBrandName,
cellValue.carSeriesName,
cellValue.carTypeName,
].filter(Boolean);
return parts.length > 0 ? parts.join("-") : "-";
},
},
{
label: "意向等级",
prop: "customerIntentLevel",
type: "slot",
addHtml: "customerIntentLevel",
width: "220",
},
{
label: "线索状态",
prop: "cluesStatus",
width: "100",
className: (cellValue) => {
return {
1: "c-blueSpot",
2: "greenSpot",
3: "redSpot",
4: "c-purpleSpot",
}[cellValue.cluesStatus];
},
formatter: (cellValue) => {
return {
1: "待跟进",
2: "跟进中",
3: "暂败",
4: "成功收车",
}[cellValue.cluesStatus];
},
},
{
label: "跟进状态",
prop: "followUpStatus",
width: "200",
formatter: (cellValue) => {
const statusMap = {
1: "临期",
2: "已超期",
};
return cellValue.followTimeStatus ? `${statusMap[cellValue.followTimeStatus]}` : "-";
},
className: (cellValue) => {
return {
2: "redSpot",
1: "yellowSpot",
}[cellValue.followTimeStatus];
},
},
{
label: "跟进内容",
prop: "followRecordList",
width: "200",
addHtml: "followRecordList",
},
{
label: "最后跟进时间",
prop: "latestFollowTime",
width: "160",
formatter: (cellValue) => {
return cellValue.latestFollowTime || "-";
},
},
{
label: "下一次跟进时间",
prop: "nextFollowTime",
width: "160",
formatter: (cellValue) => {
return cellValue.nextFollowTime || "-";
},
},
{
label: "录线索人员",
prop: "enterType",
width: "160",
formatter: (cellValue) => {
return cellValue.enterType == 1 ? "销售" : "评估师";
},
},
{
label: "评估师",
prop: "conversionName",
width: "120",
formatter: (cellValue) => {
return cellValue.conversionName || "-";
},
},
];
}
export async function getSearchFromSchema(_refreshTableFn) {
const refreshTableFn = typeof _refreshTableFn === "function" ? _refreshTableFn : () => {};
// 获取门店列表
const merchantRes = await getShopMerchantList({ currentPage: 1, pageSize: 9999 });
return [
{
label: "线索 ID",
name: "cluesNo",
type: "input",
isClear: true,
keyFn: refreshTableFn,
placeholder: "请输入线索ID",
},
{
label: "车主姓名",
name: "carOwnerName",
type: "input",
isClear: true,
keyFn: refreshTableFn,
placeholder: "请输入车主姓名",
},
{
label: "车主电话",
name: "carOwnerPhone",
type: "input",
isClear: true,
keyFn: refreshTableFn,
placeholder: "请输入车主电话",
},
{
label: "线索门店名称",
name: "sellerMerchantIdList",
type: "select",
optionList: merchantRes?.records || [],
optionId: "sellerMerchantId",
optionLabel: "sellerMerchantName",
optionsName: "merchantList",
multiple: true,
collapseTags: true,
},
{
label: "推荐销售顾问",
name: "sellerName",
type: "input",
isClear: true,
keyFn: refreshTableFn,
placeholder: "请输入推荐销售顾问",
},
{
label: "客户意向等级",
name: "customerIntentLevelList",
type: "select",
optionList: customerIntentLevelList,
optionId: "confId",
optionLabel: "confValue",
optionsName: "customerIntentLevelList",
multiple: true,
collapseTags: true,
},
// {
// label: "线索状态",
// name: "cluesStatusList",
// type: "select",
// optionList: cluesStatusList,
// optionId: "confId",
// optionLabel: "confValue",
// optionsName: "cluesStatusList",
// multiple: true,
// collapseTags: true,
// },
{
label: "跟进状态提示",
name: "followTimeStatusList",
type: "select",
optionList: followTimeStatusList,
optionId: "confId",
optionLabel: "confValue",
optionsName: "followTimeStatusList",
multiple: true,
collapseTags: true,
},
{
label: "创建时间",
name: "createTimeRange",
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions",
},
{
label: "最后跟进时间",
name: "lastFollowUpTimeRange",
type: "datePicker",
isClear: true,
pickerOptions: "rangePickerOptions",
},
{
label: "评估师姓名",
name: "conversionName",
type: "input",
isClear: true,
keyFn: refreshTableFn,
placeholder: "请输入评估师姓名",
},
{
label: "录线索人员",
name: "enterType",
type: "select",
optionList: enterTypeList,
optionId: "confId",
optionLabel: "confValue",
optionsName: "enterTypeList",
},
{
label: "评估品牌车型",
name: "carModel",
type: "input",
isClear: true,
keyFn: refreshTableFn,
placeholder: "请输入品牌车型关键词",
},
];
}