index.ts 1.1 KB

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