customer.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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. // 删除客户
  46. export function delLineCustomer(customerId) {
  47. return request({
  48. url: '/crm/customer/removeLine/' + customerId,
  49. method: 'delete'
  50. })
  51. }
  52. // 查询客户详细
  53. export function getLineCustomer(customerId) {
  54. return request({
  55. url: '/crm/customer/queryLine/' + customerId,
  56. method: 'get'
  57. })
  58. }
  59. // 导出客户
  60. export function exportLineCustomer(query) {
  61. return request({
  62. url: '/crm/customer/exportLine',
  63. method: 'get',
  64. params: query
  65. })
  66. }
  67. export function exportCustomer(query) {
  68. return request({
  69. url: '/crm/customer/export',
  70. method: 'get',
  71. params: query
  72. })
  73. }
  74. // 下载用户导入模板
  75. export function importLineTemplate() {
  76. return request({
  77. url: '/crm/customer/importLineTemplate',
  78. method: 'get'
  79. })
  80. }
  81. export function assignCustomer(data) {
  82. return request({
  83. url: '/crm/customer/assign',
  84. method: 'post',
  85. data: data
  86. })
  87. }
  88. export function assignCrmToCompany(data) {
  89. return request({
  90. url: '/crm/customer/assignCrmToCompany',
  91. method: 'post',
  92. data: data
  93. })
  94. }
  95. export function listCustomer(query) {
  96. return request({
  97. url: '/crm/customer/list',
  98. method: 'get',
  99. params: query
  100. })
  101. }
  102. export function getCustomer(customerId) {
  103. return request({
  104. url: '/crm/customer/query/' + customerId,
  105. method: 'get'
  106. })
  107. }
  108. export function addCustomer(data) {
  109. return request({
  110. url: '/crm/customer',
  111. method: 'post',
  112. data: data
  113. })
  114. }
  115. // 修改客户
  116. export function updateCustomer(data) {
  117. return request({
  118. url: '/crm/customer',
  119. method: 'put',
  120. data: data
  121. })
  122. }
  123. // 删除客户
  124. export function delCustomer(customerId) {
  125. return request({
  126. url: '/crm/customer/' + customerId,
  127. method: 'delete'
  128. })
  129. }