|
1 | 1 | import request from '@/config/axios'
|
2 | 2 |
|
3 |
| -export interface StatisticsCustomerRespVO { |
4 |
| - count: number |
5 |
| - cycle: number |
6 |
| - category: string |
| 3 | +export interface CrmStatisticsCustomerSummaryByDateRespVO { |
| 4 | + time: string |
| 5 | + customerCreateCount: number |
| 6 | + customerDealCount: number |
7 | 7 | }
|
8 | 8 |
|
9 |
| -// 客户总量分析 API |
| 9 | +export interface CrmStatisticsCustomerSummaryByUserRespVO { |
| 10 | + ownerUserName: string |
| 11 | + customerCreateCount: number |
| 12 | + customerDealCount: number |
| 13 | + contractPrice: number |
| 14 | + receivablePrice: number |
| 15 | +} |
| 16 | + |
| 17 | +export interface CrmStatisticsFollowupSummaryByDateRespVO { |
| 18 | + time: string |
| 19 | + followupRecordCount: number |
| 20 | + followupCustomerCount: number |
| 21 | +} |
| 22 | + |
| 23 | +export interface CrmStatisticsFollowupSummaryByUserRespVO { |
| 24 | + ownerUserName: string |
| 25 | + followupRecordCount: number |
| 26 | + followupCustomerCount: number |
| 27 | +} |
| 28 | + |
| 29 | +export interface CrmStatisticsFollowupSummaryByTypeRespVO { |
| 30 | + followupType: string |
| 31 | + followupRecordCount: number |
| 32 | +} |
| 33 | + |
| 34 | +export interface CrmStatisticsCustomerContractSummaryRespVO { |
| 35 | + customerName: string |
| 36 | + contractName: string |
| 37 | + totalPrice: number |
| 38 | + receivablePrice: number |
| 39 | + customerType: string |
| 40 | + customerSource: string |
| 41 | + ownerUserName: string |
| 42 | + creatorUserName: string |
| 43 | + createTime: Date |
| 44 | + orderDate: Date |
| 45 | +} |
| 46 | + |
| 47 | +export interface CrmStatisticsCustomerDealCycleByDateRespVO { |
| 48 | + time: string |
| 49 | + customerDealCycle: number |
| 50 | +} |
| 51 | + |
| 52 | +export interface CrmStatisticsCustomerDealCycleByUserRespVO { |
| 53 | + ownerUserName: string |
| 54 | + customerDealCycle: number |
| 55 | + customerDealCount: number |
| 56 | +} |
| 57 | + |
| 58 | +// 客户分析 API |
10 | 59 | export const StatisticsCustomerApi = {
|
11 |
| - // 客户总量(新建) |
12 |
| - getTotalCustomerCount: (params: any) => { |
| 60 | + // 1.1 客户总量分析(按日期) |
| 61 | + getCustomerSummaryByDate: (params: any) => { |
| 62 | + return request.get({ |
| 63 | + url: '/crm/statistics-customer/get-customer-summary-by-date', |
| 64 | + params |
| 65 | + }) |
| 66 | + }, |
| 67 | + // 1.2 客户总量分析(按用户) |
| 68 | + getCustomerSummaryByUser: (params: any) => { |
13 | 69 | return request.get({
|
14 |
| - url: '/crm/statistics-customer/get-total-customer-count', |
| 70 | + url: '/crm/statistics-customer/get-customer-summary-by-user', |
15 | 71 | params
|
16 | 72 | })
|
17 | 73 | },
|
18 |
| - // 客户总量(成交) |
19 |
| - getDealTotalCustomerCount: (params: any) => { |
| 74 | + // 2.1 客户跟进次数分析(按日期) |
| 75 | + getFollowupSummaryByDate: (params: any) => { |
20 | 76 | return request.get({
|
21 |
| - url: '/crm/statistics-customer/get-deal-total-customer-count', |
| 77 | + url: '/crm/statistics-customer/get-followup-summary-by-date', |
22 | 78 | params
|
23 | 79 | })
|
24 | 80 | },
|
25 |
| - // 获取客户跟进次数 |
26 |
| - getRecordCount: (params: any) => { |
| 81 | + // 2.2 客户跟进次数分析(按用户) |
| 82 | + getFollowupSummaryByUser: (params: any) => { |
27 | 83 | return request.get({
|
28 |
| - url: '/crm/statistics-customer/get-record-count', |
| 84 | + url: '/crm/statistics-customer/get-followup-summary-by-user', |
29 | 85 | params
|
30 | 86 | })
|
31 | 87 | },
|
32 |
| - // 获取客户跟进次数 |
33 |
| - getDistinctRecordCount: (params: any) => { |
| 88 | + // 3.1 获取客户跟进方式统计数 |
| 89 | + getFollowupSummaryByType: (params: any) => { |
34 | 90 | return request.get({
|
35 |
| - url: '/crm/statistics-customer/get-distinct-record-count', |
| 91 | + url: '/crm/statistics-customer/get-followup-summary-by-type', |
36 | 92 | params
|
37 | 93 | })
|
38 | 94 | },
|
39 |
| - // 获取客户跟进方式统计数 |
40 |
| - getRecordTypeCount: (params: any) => { |
| 95 | + // 4.1 合同摘要信息(客户转化率页面) |
| 96 | + getContractSummary: (params: any) => { |
41 | 97 | return request.get({
|
42 |
| - url: '/crm/statistics-customer/get-record-type-count', |
| 98 | + url: '/crm/statistics-customer/get-followup-summary-by-type', |
43 | 99 | params
|
44 | 100 | })
|
45 | 101 | },
|
46 |
| - // 获取客户成交周期 |
47 |
| - getCustomerCycle: (params: any) => { |
| 102 | + // 5.1 获取客户成交周期(按日期) |
| 103 | + getCustomerDealCycleByDate: (params: any) => { |
48 | 104 | return request.get({
|
49 |
| - url: '/crm/statistics-customer/get-customer-cycle', |
| 105 | + url: '/crm/statistics-customer/get-customer-deal-cycle-by-date', |
50 | 106 | params
|
51 | 107 | })
|
52 | 108 | },
|
| 109 | + // 5.2 获取客户成交周期(按用户) |
| 110 | + getCustomerDealCycleByUser: (params: any) => { |
| 111 | + return request.get({ |
| 112 | + url: '/crm/statistics-customer/get-customer-deal-cycle-by-user', |
| 113 | + params |
| 114 | + }) |
| 115 | + } |
53 | 116 | }
|
0 commit comments