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