customer.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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 listCustomer(query) {
  82. return request({
  83. url: '/crm/customer/list',
  84. method: 'get',
  85. params: query
  86. })
  87. }
  88. export function getCustomer(customerId) {
  89. return request({
  90. url: '/crm/customer/query/' + customerId,
  91. method: 'get'
  92. })
  93. }
  94. export function addCustomer(data) {
  95. return request({
  96. url: '/crm/customer',
  97. method: 'post',
  98. data: data
  99. })
  100. }
  101. // 修改客户
  102. export function updateCustomer(data) {
  103. return request({
  104. url: '/crm/customer',
  105. method: 'put',
  106. data: data
  107. })
  108. }
  109. // 删除客户
  110. export function delCustomer(customerId) {
  111. return request({
  112. url: '/crm/customer/' + customerId,
  113. method: 'delete'
  114. })
  115. }