index.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * @Author: zyna
  3. * @Date: 2023-11-05 13:34:41
  4. * @LastEditTime: 2023-11-11 16:20:19
  5. * @FilePath: \yudao-ui-admin-vue3\src\api\crm\contact\index.ts
  6. * @Description:
  7. */
  8. import request from '@/config/axios'
  9. export interface ContactVO {
  10. name: string
  11. nextTime: Date
  12. mobile: string
  13. telephone: string
  14. email: string
  15. post: string
  16. customerId: number
  17. address: string
  18. remark: string
  19. ownerUserId: string
  20. lastTime: Date
  21. id: number
  22. parentId: number
  23. qq: number
  24. webchat: string
  25. sex: number
  26. policyMakers: boolean
  27. creatorName: string
  28. updateTime?: Date
  29. createTime?: Date
  30. customerName: string
  31. }
  32. // 查询crm联系人列表
  33. export const getContactPage = async (params) => {
  34. return await request.get({ url: `/crm/contact/page`, params })
  35. }
  36. // 查询crm联系人详情
  37. export const getContact = async (id: number) => {
  38. return await request.get({ url: `/crm/contact/get?id=` + id })
  39. }
  40. // 新增crm联系人
  41. export const createContact = async (data: ContactVO) => {
  42. return await request.post({ url: `/crm/contact/create`, data })
  43. }
  44. // 修改crm联系人
  45. export const updateContact = async (data: ContactVO) => {
  46. return await request.put({ url: `/crm/contact/update`, data })
  47. }
  48. // 删除crm联系人
  49. export const deleteContact = async (id: number) => {
  50. return await request.delete({ url: `/crm/contact/delete?id=` + id })
  51. }
  52. // 导出crm联系人 Excel
  53. export const exportContact = async (params) => {
  54. return await request.download({ url: `/crm/contact/export-excel`, params })
  55. }
  56. export const simpleAlllist = async () => {
  57. return await request.get({ url: `/crm/contact/simpleAlllist` })
  58. }