index.ts 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * @Author: zyna
  3. * @Date: 2023-11-05 13:34:41
  4. * @LastEditTime: 2023-11-26 20:47:04
  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. wechat: string
  25. sex: number
  26. master: boolean
  27. creatorName: string
  28. updateTime?: Date
  29. createTime?: Date
  30. customerName: string,
  31. areaName: string,
  32. ownerUserName: string
  33. }
  34. // 查询crm联系人列表
  35. export const getContactPage = async (params) => {
  36. return await request.get({ url: `/crm/contact/page`, params })
  37. }
  38. // 查询crm联系人详情
  39. export const getContact = async (id: number) => {
  40. return await request.get({ url: `/crm/contact/get?id=` + id })
  41. }
  42. // 新增crm联系人
  43. export const createContact = async (data: ContactVO) => {
  44. return await request.post({ url: `/crm/contact/create`, data })
  45. }
  46. // 修改crm联系人
  47. export const updateContact = async (data: ContactVO) => {
  48. return await request.put({ url: `/crm/contact/update`, data })
  49. }
  50. // 删除crm联系人
  51. export const deleteContact = async (id: number) => {
  52. return await request.delete({ url: `/crm/contact/delete?id=` + id })
  53. }
  54. // 导出crm联系人 Excel
  55. export const exportContact = async (params) => {
  56. return await request.download({ url: `/crm/contact/export-excel`, params })
  57. }
  58. export const simpleAllList = async () => {
  59. return await request.get({ url: `/crm/contact/simple-all-list` })
  60. }