customer.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. import request from '@/utils/request'
  2. export function getFullCustomerList(query) {
  3. return request({
  4. url: '/crm/customer/getFullCustomerList',
  5. method: 'get',
  6. params: query
  7. })
  8. }
  9. export function getLineCustomerList(query) {
  10. return request({
  11. url: '/crm/customer/getLineCustomerList',
  12. method: 'get',
  13. params: query
  14. })
  15. }
  16. export function getCustomerList(query) {
  17. return request({
  18. url: '/crm/customer/getCustomerList',
  19. method: 'get',
  20. params: query
  21. })
  22. }
  23. export function getCustomerListByIds(query) {
  24. return request({
  25. url: '/crm/customer/getCustomerListByIds',
  26. method: 'get',
  27. params: query
  28. })
  29. }
  30. export function getMyCustomerList(query) {
  31. return request({
  32. url: '/crm/customer/getMyCustomerList',
  33. method: 'get',
  34. params: query
  35. })
  36. }
  37. export function getMyAssistList(query) {
  38. return request({
  39. url: '/crm/customer/getMyAssistList',
  40. method: 'get',
  41. params: query
  42. })
  43. }
  44. export function getCustomerDetails(query) {
  45. return request({
  46. url: '/crm/customer/getCustomerDetails/',
  47. method: 'get',
  48. params: query
  49. })
  50. }
  51. export function getCustomerDetails1(query) {
  52. return request({
  53. url: '/crm/customer/getCustomerDetails1/',
  54. method: 'get',
  55. params: query
  56. })
  57. }
  58. export function getLineCustomerDetails(query) {
  59. return request({
  60. url: '/crm/customer/getLineCustomerDetails/',
  61. method: 'get',
  62. params: query
  63. })
  64. }
  65. export function getCustomer1(customerId) {
  66. return request({
  67. url: '/crm/customer/query1/' + customerId,
  68. method: 'get'
  69. })
  70. }
  71. export function getCustomerListBySearch(query) {
  72. return request({
  73. url: '/crm/customer/getCustomerListBySearch',
  74. method: 'get',
  75. params: query
  76. })
  77. }
  78. export function exportCustomer(query) {
  79. return request({
  80. url: '/crm/customer/export',
  81. method: 'get',
  82. params: query
  83. })
  84. }
  85. export function exportCustomerByIds(customerId) {
  86. return request({
  87. url: '/crm/customer/'+ customerId,
  88. method: 'post',
  89. })
  90. }
  91. export function assignToUser(data) {
  92. return request({
  93. url: '/crm/customer/assignToUser',
  94. method: 'post',
  95. data: data
  96. })
  97. }
  98. export function assistToUser(data) {
  99. return request({
  100. url: '/crm/customer/assistToUser',
  101. method: 'post',
  102. data: data
  103. })
  104. }
  105. export function assignUser(data) {
  106. return request({
  107. url: '/crm/customer/assignUser',
  108. method: 'post',
  109. data: data
  110. })
  111. }
  112. export function receive(data) {
  113. return request({
  114. url: '/crm/customer/receive',
  115. method: 'post',
  116. data: data
  117. })
  118. }
  119. export function recover(data) {
  120. return request({
  121. url: '/crm/customer/recover',
  122. method: 'post',
  123. data: data
  124. })
  125. }
  126. // 下载用户导入模板
  127. export function importLineTemplate() {
  128. return request({
  129. url: '/crm/customer/importLineTemplate',
  130. method: 'get'
  131. })
  132. }
  133. // 下载用户导入模板
  134. export function importVisitTemplate() {
  135. return request({
  136. url: '/crm/customer/importVisitTemplate',
  137. method: 'get'
  138. })
  139. }
  140. export function addCustomer(data) {
  141. return request({
  142. url: '/crm/customer/add',
  143. method: 'post',
  144. data: data
  145. })
  146. }
  147. export function addMyCustomer(data) {
  148. return request({
  149. url: '/crm/customer/addMyCustomer',
  150. method: 'post',
  151. data: data
  152. })
  153. }
  154. // 修改客户
  155. export function updateCustomer(data) {
  156. return request({
  157. url: '/crm/customer/edit',
  158. method: 'put',
  159. data: data
  160. })
  161. }
  162. export function updateCustomerSource(data) {
  163. return request({
  164. url: '/crm/customer/updateCustomerSource',
  165. method: 'post',
  166. data: data
  167. })
  168. }