customer.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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 getCustomerDetails(query) {
  38. return request({
  39. url: '/crm/customer/getCustomerDetails/',
  40. method: 'get',
  41. params: query
  42. })
  43. }
  44. export function getCustomerListBySearch(query) {
  45. return request({
  46. url: '/crm/customer/getCustomerListBySearch',
  47. method: 'get',
  48. params: query
  49. })
  50. }
  51. export function exportCustomer(query) {
  52. return request({
  53. url: '/crm/customer/export',
  54. method: 'get',
  55. params: query
  56. })
  57. }
  58. export function assignToUser(data) {
  59. return request({
  60. url: '/crm/customer/assignToUser',
  61. method: 'post',
  62. data: data
  63. })
  64. }
  65. export function assignUser(data) {
  66. return request({
  67. url: '/crm/customer/assignUser',
  68. method: 'post',
  69. data: data
  70. })
  71. }
  72. export function receive(data) {
  73. return request({
  74. url: '/crm/customer/receive',
  75. method: 'post',
  76. data: data
  77. })
  78. }
  79. export function recover(data) {
  80. return request({
  81. url: '/crm/customer/recover',
  82. method: 'post',
  83. data: data
  84. })
  85. }
  86. // 下载用户导入模板
  87. export function importLineTemplate() {
  88. return request({
  89. url: '/crm/customer/importLineTemplate',
  90. method: 'get'
  91. })
  92. }
  93. export function addCustomer(data) {
  94. return request({
  95. url: '/crm/customer/add',
  96. method: 'post',
  97. data: data
  98. })
  99. }
  100. export function addMyCustomer(data) {
  101. return request({
  102. url: '/crm/customer/addMyCustomer',
  103. method: 'post',
  104. data: data
  105. })
  106. }
  107. // 修改客户
  108. export function updateCustomer(data) {
  109. return request({
  110. url: '/crm/customer/edit',
  111. method: 'put',
  112. data: data
  113. })
  114. }
  115. export function updateCustomerSource(data) {
  116. return request({
  117. url: '/crm/customer/updateCustomerSource',
  118. method: 'post',
  119. data: data
  120. })
  121. }