index.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import request from '@/config/axios'
  2. export interface CustomerLimitConfigVO {
  3. id?: number
  4. type?: number
  5. userIds?: string
  6. deptIds?: string
  7. maxCount?: number
  8. dealCountEnabled?: boolean
  9. }
  10. /**
  11. * 客户限制配置类型
  12. */
  13. export enum LimitConfType {
  14. /**
  15. * 拥有客户数限制
  16. */
  17. CUSTOMER_QUANTITY_LIMIT = 1,
  18. /**
  19. * 锁定客户数限制
  20. */
  21. CUSTOMER_LOCK_LIMIT = 2
  22. }
  23. // 查询客户限制配置列表
  24. export const getCustomerLimitConfigPage = async (params) => {
  25. return await request.get({ url: `/crm/customer-limit-config/page`, params })
  26. }
  27. // 查询客户限制配置详情
  28. export const getCustomerLimitConfig = async (id: number) => {
  29. return await request.get({ url: `/crm/customer-limit-config/get?id=` + id })
  30. }
  31. // 新增客户限制配置
  32. export const createCustomerLimitConfig = async (data: CustomerLimitConfigVO) => {
  33. return await request.post({ url: `/crm/customer-limit-config/create`, data })
  34. }
  35. // 修改客户限制配置
  36. export const updateCustomerLimitConfig = async (data: CustomerLimitConfigVO) => {
  37. return await request.put({ url: `/crm/customer-limit-config/update`, data })
  38. }
  39. // 删除客户限制配置
  40. export const deleteCustomerLimitConfig = async (id: number) => {
  41. return await request.delete({ url: `/crm/customer-limit-config/delete?id=` + id })
  42. }