customer.ts 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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. // 客户分析 API
  60. export const StatisticsCustomerApi = {
  61. // 1.1 客户总量分析(按日期)
  62. getCustomerSummaryByDate: (params: any) => {
  63. return request.get({
  64. url: '/crm/statistics-customer/get-customer-summary-by-date',
  65. params
  66. })
  67. },
  68. // 1.2 客户总量分析(按用户)
  69. getCustomerSummaryByUser: (params: any) => {
  70. return request.get({
  71. url: '/crm/statistics-customer/get-customer-summary-by-user',
  72. params
  73. })
  74. },
  75. // 2.1 客户跟进次数分析(按日期)
  76. getFollowUpSummaryByDate: (params: any) => {
  77. return request.get({
  78. url: '/crm/statistics-customer/get-follow-up-summary-by-date',
  79. params
  80. })
  81. },
  82. // 2.2 客户跟进次数分析(按用户)
  83. getFollowUpSummaryByUser: (params: any) => {
  84. return request.get({
  85. url: '/crm/statistics-customer/get-follow-up-summary-by-user',
  86. params
  87. })
  88. },
  89. // 3.1 获取客户跟进方式统计数
  90. getFollowUpSummaryByType: (params: any) => {
  91. return request.get({
  92. url: '/crm/statistics-customer/get-follow-up-summary-by-type',
  93. params
  94. })
  95. },
  96. // 4.1 合同摘要信息(客户转化率页面)
  97. getContractSummary: (params: any) => {
  98. return request.get({
  99. url: '/crm/statistics-customer/get-contract-summary',
  100. params
  101. })
  102. },
  103. // 5.1 获取客户公海分析(按日期)
  104. getPoolSummaryByDate: (param: any) => {
  105. return request.get({
  106. url: '/crm/statistics-customer/get-pool-summary-by-date',
  107. params: param
  108. })
  109. },
  110. // 5.2 获取客户公海分析(按用户)
  111. getPoolSummaryByUser: (param: any) => {
  112. return request.get({
  113. url: '/crm/statistics-customer/get-pool-summary-by-user',
  114. params: param
  115. })
  116. },
  117. // 6.1 获取客户成交周期(按日期)
  118. getCustomerDealCycleByDate: (params: any) => {
  119. return request.get({
  120. url: '/crm/statistics-customer/get-customer-deal-cycle-by-date',
  121. params
  122. })
  123. },
  124. // 6.2 获取客户成交周期(按用户)
  125. getCustomerDealCycleByUser: (params: any) => {
  126. return request.get({
  127. url: '/crm/statistics-customer/get-customer-deal-cycle-by-user',
  128. params
  129. })
  130. }
  131. }