customer.ts 3.0 KB

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