customerPool.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. import request from '@/utils/request'
  2. // 查询客户公海信息列表
  3. export function listPool(query) {
  4. return request({
  5. url: '/customer/customerPool/customerList',
  6. method: 'get',
  7. params: {
  8. ...query,
  9. isHighSeas: 'true'
  10. }
  11. })
  12. }
  13. // 查询有效客户信息列表
  14. export function listValidCustomer(query) {
  15. return request({
  16. url: '/customer/customerPool/list',
  17. method: 'get',
  18. params: {
  19. ...query,
  20. isHighSeas: 'false'
  21. }
  22. })
  23. }
  24. // 公海客户认领
  25. export function claimPool(data) {
  26. return request({
  27. url: '/customer/customerPool/claimPool',
  28. method: 'put',
  29. data: data
  30. })
  31. }
  32. // 退回到公海池(支持批量)
  33. export function releaseToPool(customerIds, reason = '') {
  34. const ids = Array.isArray(customerIds) ? customerIds : [customerIds];
  35. return request({
  36. url: '/customer/customerPool/releaseToPool',
  37. method: 'post',
  38. data: { customerIds: ids, reason }
  39. })
  40. }
  41. // 转移业务人员
  42. export function transferSalesPerson(data) {
  43. return request({
  44. url: '/customer/customerPool/transferSalesPerson',
  45. method: 'put',
  46. data: data
  47. })
  48. }
  49. // 转移客服人员
  50. export function transferServiceStaff(data) {
  51. return request({
  52. url: '/customer/customerPool/transferServiceStaff',
  53. method: 'put',
  54. data: data
  55. })
  56. }
  57. // 获取详情接口 (公海使用)
  58. export function getPool(id) {
  59. return request({
  60. url: `/customer/customerPool/${id}`,
  61. method: 'get'
  62. })
  63. }
  64. // 获取有效客户信息详细 (有效客户使用)
  65. export function getCustomerInfo(id) {
  66. return request({
  67. url: '/customer/customerPool/' + id,
  68. method: 'get'
  69. });
  70. }
  71. // 新增客户公海
  72. export function addPool(data) {
  73. return request({
  74. url: '/customer/customerPool',
  75. method: 'post',
  76. data: data
  77. })
  78. }
  79. // 修改客户公海
  80. export function updatePool(data) {
  81. return request({
  82. url: '/customer/customerPool',
  83. method: 'put',
  84. data: data
  85. })
  86. }
  87. // 新增客户信息
  88. export function addCustomerInfo(data) {
  89. return request({
  90. url: '/customer/customerPool',
  91. method: 'post',
  92. data: data
  93. });
  94. }
  95. // 修改客户信息
  96. export function updateCustomerInfo(data) {
  97. return request({
  98. url: '/customer/customerPool',
  99. method: 'put',
  100. data: data
  101. });
  102. }
  103. // 获取公司下拉列表
  104. export function listCompanyOption() {
  105. return request({
  106. url: '/customer/customerPool/companyOptionList',
  107. method: 'get'
  108. })
  109. }
  110. // 获取等级下拉列表
  111. export function listLevelOption() {
  112. return request({
  113. url: '/customer/customerPool/levelOptionList',
  114. method: 'get'
  115. })
  116. }