customer.ts 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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 CrmStatisticsPoolSummaryByDateRespVO {
  41. time: string
  42. customerPutCount: number
  43. customerTakeCount: number
  44. }
  45. export interface CrmStatisticsPoolSummaryByUserRespVO {
  46. ownerUserName: string
  47. customerPutCount: number
  48. customerTakeCount: number
  49. }
  50. export interface CrmStatisticsCustomerDealCycleByDateRespVO {
  51. time: string
  52. customerDealCycle: number
  53. }
  54. export interface CrmStatisticsCustomerDealCycleByUserRespVO {
  55. ownerUserName: string
  56. customerDealCycle: number
  57. customerDealCount: number
  58. }
  59. export interface CrmStatisticsCustomerDealCycleByAreaRespVO {
  60. areaName: string
  61. customerDealCycle: number
  62. customerDealCount: number
  63. }
  64. export interface CrmStatisticsCustomerDealCycleByProductRespVO {
  65. productName: string
  66. customerDealCycle: number
  67. customerDealCount: number
  68. }
  69. // 客户分析 API
  70. export const StatisticsCustomerApi = {
  71. // 1.1 客户总量分析(按日期)
  72. getCustomerSummaryByDate: (params: any) => {
  73. return request.get({
  74. url: '/crm/statistics-customer/get-customer-summary-by-date',
  75. params
  76. })
  77. },
  78. // 1.2 客户总量分析(按用户)
  79. getCustomerSummaryByUser: (params: any) => {
  80. return request.get({
  81. url: '/crm/statistics-customer/get-customer-summary-by-user',
  82. params
  83. })
  84. },
  85. // 2.1 客户跟进次数分析(按日期)
  86. getFollowUpSummaryByDate: (params: any) => {
  87. return request.get({
  88. url: '/crm/statistics-customer/get-follow-up-summary-by-date',
  89. params
  90. })
  91. },
  92. // 2.2 客户跟进次数分析(按用户)
  93. getFollowUpSummaryByUser: (params: any) => {
  94. return request.get({
  95. url: '/crm/statistics-customer/get-follow-up-summary-by-user',
  96. params
  97. })
  98. },
  99. // 3.1 获取客户跟进方式统计数
  100. getFollowUpSummaryByType: (params: any) => {
  101. return request.get({
  102. url: '/crm/statistics-customer/get-follow-up-summary-by-type',
  103. params
  104. })
  105. },
  106. // 4.1 合同摘要信息(客户转化率页面)
  107. getContractSummary: (params: any) => {
  108. return request.get({
  109. url: '/crm/statistics-customer/get-contract-summary',
  110. params
  111. })
  112. },
  113. // 5.1 获取客户公海分析(按日期)
  114. getPoolSummaryByDate: (param: any) => {
  115. return request.get({
  116. url: '/crm/statistics-customer/get-pool-summary-by-date',
  117. params: param
  118. })
  119. },
  120. // 5.2 获取客户公海分析(按用户)
  121. getPoolSummaryByUser: (param: any) => {
  122. return request.get({
  123. url: '/crm/statistics-customer/get-pool-summary-by-user',
  124. params: param
  125. })
  126. },
  127. // 6.1 获取客户成交周期(按日期)
  128. getCustomerDealCycleByDate: (params: any) => {
  129. return request.get({
  130. url: '/crm/statistics-customer/get-customer-deal-cycle-by-date',
  131. params
  132. })
  133. },
  134. // 6.2 获取客户成交周期(按用户)
  135. getCustomerDealCycleByUser: (params: any) => {
  136. return request.get({
  137. url: '/crm/statistics-customer/get-customer-deal-cycle-by-user',
  138. params
  139. })
  140. },
  141. // 6.2 获取客户成交周期(按用户)
  142. getCustomerDealCycleByArea: (params: any) => {
  143. return request.get({
  144. url: '/crm/statistics-customer/get-customer-deal-cycle-by-area',
  145. params
  146. })
  147. },
  148. // 6.2 获取客户成交周期(按用户)
  149. getCustomerDealCycleByProduct: (params: any) => {
  150. return request.get({
  151. url: '/crm/statistics-customer/get-customer-deal-cycle-by-product',
  152. params
  153. })
  154. }
  155. }