customer.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. import request from '@/utils/request'
  2. export function listLineCustomer(query) {
  3. return request({
  4. url: '/crm/customer/lineList',
  5. method: 'get',
  6. params: query
  7. })
  8. }
  9. export function listCustomerAll(query) {
  10. return request({
  11. url: '/crm/customer/listAll',
  12. method: 'get',
  13. params: query
  14. })
  15. }
  16. export function getCustomerListByIds(query) {
  17. return request({
  18. url: '/crm/customer/getCustomerListByIds',
  19. method: 'get',
  20. params: query
  21. })
  22. }
  23. export function addLineCustomer(data) {
  24. return request({
  25. url: '/crm/customer/addLine',
  26. method: 'post',
  27. data: data
  28. })
  29. }
  30. // 修改客户
  31. export function updateLineCustomer(data) {
  32. return request({
  33. url: '/crm/customer/editLine',
  34. method: 'put',
  35. data: data
  36. })
  37. }
  38. export function updateCustomerSource(data) {
  39. return request({
  40. url: '/crm/customer/updateCustomerSource',
  41. method: 'post',
  42. data: data
  43. })
  44. }
  45. export function getCustomerDetails(query) {
  46. return request({
  47. url: '/crm/customer/getCustomerDetails/',
  48. method: 'get',
  49. params: query
  50. })
  51. }
  52. // 删除客户
  53. export function delLineCustomer(customerId) {
  54. return request({
  55. url: '/crm/customer/removeLine/' + customerId,
  56. method: 'delete'
  57. })
  58. }
  59. // 查询客户详细
  60. export function getLineCustomer(customerId) {
  61. return request({
  62. url: '/crm/customer/queryLine/' + customerId,
  63. method: 'get'
  64. })
  65. }
  66. // 导出客户
  67. export function exportLineCustomer(query) {
  68. return request({
  69. url: '/crm/customer/exportLine',
  70. method: 'get',
  71. params: query
  72. })
  73. }
  74. export function exportCustomer(query) {
  75. return request({
  76. url: '/crm/customer/export',
  77. method: 'get',
  78. params: query
  79. })
  80. }
  81. // 下载用户导入模板
  82. export function importLineTemplate() {
  83. return request({
  84. url: '/crm/customer/importLineTemplate',
  85. method: 'get'
  86. })
  87. }
  88. export function assignCustomer(data) {
  89. return request({
  90. url: '/crm/customer/assign',
  91. method: 'post',
  92. data: data
  93. })
  94. }
  95. export function assignCrmToCompany(data) {
  96. return request({
  97. url: '/crm/customer/assignCrmToCompany',
  98. method: 'post',
  99. data: data
  100. })
  101. }
  102. export function listCustomer(query) {
  103. return request({
  104. url: '/crm/customer/list',
  105. method: 'get',
  106. params: query
  107. })
  108. }
  109. export function getCustomer(customerId) {
  110. return request({
  111. url: '/crm/customer/query/' + customerId,
  112. method: 'get'
  113. })
  114. }
  115. export function addCustomer(data) {
  116. return request({
  117. url: '/crm/customer',
  118. method: 'post',
  119. data: data
  120. })
  121. }
  122. // 修改客户
  123. export function updateCustomer(data) {
  124. return request({
  125. url: '/crm/customer',
  126. method: 'put',
  127. data: data
  128. })
  129. }
  130. // 删除客户
  131. export function delCustomer(customerId) {
  132. return request({
  133. url: '/crm/customer/' + customerId,
  134. method: 'delete'
  135. })
  136. }