eight
2024-08-13 b10adc8a3fd000901836e2219fa83462694e9866
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
import request from '@/config/axios'
import { TransferReqVO } from '@/api/crm/permission'
 
export interface ClueVO {
  id: number // 编号
  name: string // 线索名称
  followUpStatus: boolean // 跟进状态
  contactLastTime: Date // 最后跟进时间
  contactLastContent: string // 最后跟进内容
  contactNextTime: Date // 下次联系时间
  ownerUserId: number // 负责人的用户编号
  ownerUserName?: string // 负责人的用户名称
  ownerUserDept?: string // 负责人的部门名称
  transformStatus: boolean // 转化状态
  customerId: number // 客户编号
  customerName?: string // 客户名称
  mobile: string // 手机号
  telephone: string // 电话
  qq: string // QQ
  wechat: string // wechat
  email: string // email
  areaId: number // 所在地
  areaName?: string // 所在地名称
  detailAddress: string // 详细地址
  industryId: number // 所属行业
  level: number // 客户等级
  source: number // 客户来源
  remark: string // 备注
  creator: string // 创建人
  creatorName?: string // 创建人名称
  createTime: Date // 创建时间
  updateTime: Date // 更新时间
}
 
// 查询线索列表
export const getCluePage = async (params: any) => {
  return await request.get({ url: `/crm/clue/page`, params })
}
 
// 查询线索详情
export const getClue = async (id: number) => {
  return await request.get({ url: `/crm/clue/get?id=` + id })
}
 
// 新增线索
export const createClue = async (data: ClueVO) => {
  return await request.post({ url: `/crm/clue/create`, data })
}
 
// 修改线索
export const updateClue = async (data: ClueVO) => {
  return await request.put({ url: `/crm/clue/update`, data })
}
 
// 删除线索
export const deleteClue = async (id: number) => {
  return await request.delete({ url: `/crm/clue/delete?id=` + id })
}
 
// 导出线索 Excel
export const exportClue = async (params) => {
  return await request.download({ url: `/crm/clue/export-excel`, params })
}
 
// 线索转移
export const transferClue = async (data: TransferReqVO) => {
  return await request.put({ url: '/crm/clue/transfer', data })
}
 
// 线索转化为客户
export const transformClue = async (id: number) => {
  return await request.put({ url: '/crm/clue/transform', params: { id } })
}
 
// 获得分配给我的、待跟进的线索数量
export const getFollowClueCount = async () => {
  return await request.get({ url: '/crm/clue/follow-count' })
}