portrait.ts 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import request from '@/config/axios'
  2. export interface CrmStatisticCustomerBaseRespVO {
  3. customerCount: number
  4. dealCount: number
  5. dealPortion: string | number
  6. }
  7. export interface CrmStatisticCustomerIndustryRespVO extends CrmStatisticCustomerBaseRespVO {
  8. industryId: number
  9. industryPortion: string | number
  10. }
  11. export interface CrmStatisticCustomerSourceRespVO extends CrmStatisticCustomerBaseRespVO {
  12. source: number
  13. sourcePortion: string | number
  14. }
  15. export interface CrmStatisticCustomerLevelRespVO extends CrmStatisticCustomerBaseRespVO {
  16. level: number
  17. levelPortion: string | number
  18. }
  19. export interface CrmStatisticCustomerAreaRespVO extends CrmStatisticCustomerBaseRespVO {
  20. areaId: number
  21. areaName: string
  22. areaPortion: string | number
  23. }
  24. // 客户分析 API
  25. export const StatisticsPortraitApi = {
  26. // 1. 获取客户行业统计数据
  27. getCustomerIndustry: (params: any) => {
  28. return request.get({
  29. url: '/crm/statistics-portrait/get-customer-industry-summary',
  30. params
  31. })
  32. },
  33. // 2. 获取客户来源统计数据
  34. getCustomerSource: (params: any) => {
  35. return request.get({
  36. url: '/crm/statistics-portrait/get-customer-source-summary',
  37. params
  38. })
  39. },
  40. // 3. 获取客户级别统计数据
  41. getCustomerLevel: (params: any) => {
  42. return request.get({
  43. url: '/crm/statistics-portrait/get-customer-level-summary',
  44. params
  45. })
  46. },
  47. // 4. 获取客户地区统计数据
  48. getCustomerArea: (params: any) => {
  49. return request.get({
  50. url: '/crm/statistics-portrait/get-customer-area-summary',
  51. params
  52. })
  53. }
  54. }