index.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import request from '@/config/axios'
  2. import { TransferReqVO } from '@/api/crm/customer'
  3. export interface ClueVO {
  4. id: number
  5. transformStatus: boolean
  6. followUpStatus: boolean
  7. name: string
  8. customerId: number
  9. contactNextTime: Date
  10. telephone: string
  11. mobile: string
  12. address: string
  13. ownerUserId: number
  14. contactLastTime: Date
  15. remark: string
  16. }
  17. // 查询线索列表
  18. export const getCluePage = async (params) => {
  19. return await request.get({ url: `/crm/clue/page`, params })
  20. }
  21. // 查询线索详情
  22. export const getClue = async (id: number) => {
  23. return await request.get({ url: `/crm/clue/get?id=` + id })
  24. }
  25. // 新增线索
  26. export const createClue = async (data: ClueVO) => {
  27. return await request.post({ url: `/crm/clue/create`, data })
  28. }
  29. // 修改线索
  30. export const updateClue = async (data: ClueVO) => {
  31. return await request.put({ url: `/crm/clue/update`, data })
  32. }
  33. // 删除线索
  34. export const deleteClue = async (id: number) => {
  35. return await request.delete({ url: `/crm/clue/delete?id=` + id })
  36. }
  37. // 导出线索 Excel
  38. export const exportClue = async (params) => {
  39. return await request.download({ url: `/crm/clue/export-excel`, params })
  40. }
  41. // 线索转移
  42. export const transferClue = async (data: TransferReqVO) => {
  43. return await request.put({ url: '/crm/clue/transfer', data })
  44. }