customer.js 2.7 KB

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