Commit 12f67d86 by zhangxw

线索管理需求开发

1 parent 8e1f8e15
...@@ -7,19 +7,25 @@ import RequestMethods from "./request.methods"; ...@@ -7,19 +7,25 @@ import RequestMethods from "./request.methods";
function scrmCarlifeRopUrl() { function scrmCarlifeRopUrl() {
const b = baseConfig || {}; const b = baseConfig || {};
if (b.axios2CarlifeRouter) return b.axios2CarlifeRouter; if (b.axios2CarlifeRouter) {
return b.axios2CarlifeRouter;
}
const ax2 = b.axios2 && b.axios2.baseURL; const ax2 = b.axios2 && b.axios2.baseURL;
if (ax2 && /shopmall/i.test(ax2)) if (ax2 && /shopmall/i.test(ax2)) {
return ax2.replace(/rop-scrm-shopmall/gi, "rop-scrm-carlife"); return ax2.replace(/rop-scrm-shopmall/gi, "rop-scrm-carlife");
}
return "https://scrm.glsx.com.cn/rop-scrm-carlife/router"; return "https://scrm.glsx.com.cn/rop-scrm-carlife/router";
} }
function djPadRopUrl() { function djPadRopUrl() {
const b = baseConfig || {}; const b = baseConfig || {};
if (b.djPadRouter) return b.djPadRouter; if (b.djPadRouter) {
return b.djPadRouter;
}
const ax = b.axios && b.axios.baseURL; const ax = b.axios && b.axios.baseURL;
if (ax && /rop-dj-smartcarlife/i.test(ax)) if (ax && /rop-dj-smartcarlife/i.test(ax)) {
return ax.replace(/rop-dj-smartcarlife/gi, "rop-dj-pad"); return ax.replace(/rop-dj-smartcarlife/gi, "rop-dj-pad");
}
return "https://dj.glsx.com.cn/rop-dj-pad/router"; return "https://dj.glsx.com.cn/rop-dj-pad/router";
} }
...@@ -373,7 +379,7 @@ export function exportContractImageZipAsync(data = {}) { ...@@ -373,7 +379,7 @@ export function exportContractImageZipAsync(data = {}) {
data, data,
{ {
timeout: 30000, timeout: 30000,
} },
); );
} }
/** /**
...@@ -603,3 +609,50 @@ export function deleteStoreConfig(data) { ...@@ -603,3 +609,50 @@ export function deleteStoreConfig(data) {
returnAll: true, returnAll: true,
}); });
} }
/**
* 线索管理 - 分页查询线索列表
*/
export function getClueManagePage(data = {}) {
return gscPost("/clues/page", data);
}
/**
* 线索管理 - 分页获取线索门店列表数据
*/
export function getShopMerchantList(data = {}) {
return gscPost("/clues/merchantPage", data);
}
/**
* 线索管理 - 获取线索状态统计数据
*/
export function getClueManageStats(data = {}) {
return gscPost("/clues/statusCount", data);
}
/**
* 线索管理 - 获取跟进状态统计数据
*/
export function getClueManageFollowUpStats(data = {}) {
return gscPost("/clues/followTimeStatusCount", data);
}
/**
* 线索管理 - 查询线索详情
*/
export function getClueManageDetail(data = {}) {
return gscPost("/clues/detail", data);
}
/**
* 线索管理 - 获取跟进记录列表
*/
export function getClueManageFollowRecordList(data = {}) {
return gscPost("/clues/followRecord/list", data);
}
/**
* 线索管理 - 获取线索操作日志列表
*/
export function getClueManageLogList(data = {}) {
return gscPost("/clues/operationLog/list", data);
}
import auth from "@/store/modules/d2admin/modules/auth";
// eslint-disable-next-line // eslint-disable-next-line
const _import = require("@/libs/util.import." + (process.env.NODE_ENV || "development")); const _import = require("@/libs/util.import." + (process.env.NODE_ENV || "development"));
export const routerName = { export const routerName = {
...@@ -308,53 +310,53 @@ export const routerName = { ...@@ -308,53 +310,53 @@ export const routerName = {
component: _import("usedCarManagement/vehicleManagement/detail"), component: _import("usedCarManagement/vehicleManagement/detail"),
}, },
// //
92005: { // 92005: {
path: "/deliveryOrderManagement", // path: "/deliveryOrderManagement",
name: "deliveryOrderManagement", // name: "deliveryOrderManagement",
meta: { // meta: {
title: "交付单管理", // title: "交付单管理",
authId: "92005", // authId: "92005",
parentId: "920", // parentId: "920",
cache: false, // cache: false,
}, // },
auth: [ // auth: [
{ // {
authId: "9200504", // authId: "9200504",
parentId: "92005", // parentId: "92005",
label: "详情", // label: "详情",
handle: "handleDetail", // handle: "handleDetail",
addRoutePath: [ // addRoutePath: [
{ // {
authId: "9200502", // authId: "9200502",
name: "交付单详情", // name: "交付单详情",
parentId: "92005", // parentId: "92005",
}, // },
], // ],
}, // },
{ // {
authId: "9200503", // authId: "9200503",
parentId: "92005", // parentId: "92005",
label: "导出", // label: "导出",
category: "Button", // category: "Button",
type: "primary", // type: "primary",
handle: "handleExport", // handle: "handleExport",
}, // },
], // ],
component: _import("usedCarManagement/deliveryOrderManagement/index"), // component: _import("usedCarManagement/deliveryOrderManagement/index"),
}, // },
9200502: { // 9200502: {
path: "/deliveryOrderManagementDetail", // path: "/deliveryOrderManagementDetail",
name: "deliveryOrderManagementDetail", // name: "deliveryOrderManagementDetail",
meta: { // meta: {
title: "交付单详情", // title: "交付单详情",
authId: "9200502", // authId: "9200502",
parentId: "92005", // parentId: "92005",
activePath: "/deliveryOrderManagement", // 缓存页面 // activePath: "/deliveryOrderManagement", // 缓存页面
cache: false, // cache: false,
}, // },
auth: [], // auth: [],
component: _import("usedCarManagement/deliveryOrderManagement/detail"), // component: _import("usedCarManagement/deliveryOrderManagement/detail"),
}, // },
92006: { 92006: {
path: "/vehicleLedger", path: "/vehicleLedger",
name: "vehicleLedger", name: "vehicleLedger",
...@@ -543,7 +545,7 @@ export const routerName = { ...@@ -543,7 +545,7 @@ export const routerName = {
parentId: "92010", parentId: "92010",
label: "修改配置", label: "修改配置",
handle: "handleEditConfig", handle: "handleEditConfig",
} },
], ],
component: _import("usedCarManagement/oneCustomerOneGroup/index"), component: _import("usedCarManagement/oneCustomerOneGroup/index"),
}, },
...@@ -560,4 +562,52 @@ export const routerName = { ...@@ -560,4 +562,52 @@ export const routerName = {
auth: [], auth: [],
component: _import("usedCarManagement/oneCustomerOneGroup/createGroupCode"), component: _import("usedCarManagement/oneCustomerOneGroup/createGroupCode"),
}, },
92011: {
path: "/clueManage",
name: "clueManage",
meta: {
title: "线索管理",
authId: "92011",
parentId: "920",
cache: false,
},
auth: [
{
authId: "9201101",
parentId: "92011",
label: "查看详情",
handle: "handleDetail",
addRoutePath: [
{
authId: "9201103",
name: "查看详情",
parentId: "92011",
},
],
},
{
authId: "9201102",
parentId: "92011",
label: "导出",
category: "Button",
type: "primary",
handle: "handleExport",
},
],
component: _import("usedCarManagement/clueManage/index"),
},
9201103: {
path: "/clueDetail",
name: "clueDetail",
meta: {
title: "查看详情",
authId: "9201103",
parentId: "92011",
cache: false,
sideHidden: false,
activePath: "/clueManage",
},
auth: [],
component: _import("usedCarManagement/clueManage/clueDetail"),
},
}; };
/**
* 线索管理 - 搜索表单配置 & 表格列配置
*/
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: "请输入品牌车型关键词",
},
];
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!