index.ts 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. import request from '@/config/axios'
  2. import { TransferReqVO } from '@/api/crm/customer'
  3. export interface ClueVO {
  4. id: number // 编号
  5. name: string // 线索名称
  6. followUpStatus: boolean // 跟进状态
  7. contactLastTime: Date // 最后跟进时间
  8. contactLastContent: string // 最后跟进内容
  9. contactNextTime: Date // 下次联系时间
  10. ownerUserId: number // 负责人的用户编号
  11. ownerUserName?: string // 负责人的用户名称
  12. ownerUserDept?: string // 负责人的部门名称
  13. transformStatus: boolean // 转化状态
  14. customerId: number // 客户编号
  15. customerName?: string // 客户名称
  16. mobile: string // 手机号
  17. telephone: string // 电话
  18. qq: string // QQ
  19. wechat: string // wechat
  20. email: string // email
  21. areaId: number // 所在地
  22. detailAddress: string // 详细地址
  23. industryId: number // 所属行业
  24. level: number // 客户等级
  25. source: number // 客户来源
  26. remark: string // 备注
  27. }
  28. // 查询线索列表
  29. export const getCluePage = async (params: any) => {
  30. return await request.get({ url: `/crm/clue/page`, params })
  31. }
  32. // 查询线索详情
  33. export const getClue = async (id: number) => {
  34. return await request.get({ url: `/crm/clue/get?id=` + id })
  35. }
  36. // 新增线索
  37. export const createClue = async (data: ClueVO) => {
  38. return await request.post({ url: `/crm/clue/create`, data })
  39. }
  40. // 修改线索
  41. export const updateClue = async (data: ClueVO) => {
  42. return await request.put({ url: `/crm/clue/update`, data })
  43. }
  44. // 删除线索
  45. export const deleteClue = async (id: number) => {
  46. return await request.delete({ url: `/crm/clue/delete?id=` + id })
  47. }
  48. // 导出线索 Excel
  49. export const exportClue = async (params) => {
  50. return await request.download({ url: `/crm/clue/export-excel`, params })
  51. }
  52. // 线索转移
  53. export const transferClue = async (data: TransferReqVO) => {
  54. return await request.put({ url: '/crm/clue/transfer', data })
  55. }