index.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import request from '@/config/axios'
  2. export interface CustomerVO {
  3. id: number
  4. name: string
  5. followUpStatus: boolean
  6. lockStatus: boolean
  7. mobile: string
  8. telephone: string
  9. website: string
  10. remark: string
  11. ownerUserId: number
  12. roUserIds: string
  13. rwUserIds: string
  14. areaId: number
  15. detailAddress: string
  16. longitude: string
  17. latitude: string
  18. contactLastTime: Date
  19. contactNextTime: Date
  20. }
  21. // 查询客户列表
  22. export const getCustomerPage = async (params) => {
  23. return await request.get({ url: `/crm/customer/page`, params })
  24. }
  25. // 查询客户详情
  26. export const getCustomer = async (id: number) => {
  27. return await request.get({ url: `/crm/customer/get?id=` + id })
  28. }
  29. // 新增客户
  30. export const createCustomer = async (data: CustomerVO) => {
  31. return await request.post({ url: `/crm/customer/create`, data })
  32. }
  33. // 修改客户
  34. export const updateCustomer = async (data: CustomerVO) => {
  35. return await request.put({ url: `/crm/customer/update`, data })
  36. }
  37. // 删除客户
  38. export const deleteCustomer = async (id: number) => {
  39. return await request.delete({ url: `/crm/customer/delete?id=` + id })
  40. }
  41. // 导出客户 Excel
  42. export const exportCustomer = async (params) => {
  43. return await request.download({ url: `/crm/customer/export-excel`, params })
  44. }