company.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. import request from '@/utils/request'
  2. // 查询企业列表
  3. export function listCompany(query) {
  4. return request({
  5. url: '/company/company/list',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. // 查询企业详细
  11. export function getCompany(companyId) {
  12. return request({
  13. url: '/company/company/' + companyId,
  14. method: 'get'
  15. })
  16. }
  17. // 新增企业
  18. export function addCompany(data) {
  19. return request({
  20. url: '/company/company',
  21. method: 'post',
  22. data: data
  23. })
  24. }
  25. export function resetPwd(companyId) {
  26. return request({
  27. url: '/company/company/resetPwd/'+companyId,
  28. method: 'post'
  29. })
  30. }
  31. // 修改企业
  32. export function updateCompany(data) {
  33. return request({
  34. url: '/company/company',
  35. method: 'put',
  36. data: data
  37. })
  38. }
  39. // 删除企业
  40. export function delCompany(companyId) {
  41. return request({
  42. url: '/company/company/' + companyId,
  43. method: 'delete'
  44. })
  45. }
  46. // 导出企业
  47. export function exportCompany(query) {
  48. return request({
  49. url: '/company/company/export',
  50. method: 'get',
  51. params: query
  52. })
  53. }
  54. export function getCompanyList() {
  55. return request({
  56. url: '/company/company/getCompanyList',
  57. method: 'get'
  58. })
  59. }
  60. export function recharge(data) {
  61. return request({
  62. url: '/company/company/recharge',
  63. method: 'post',
  64. data: data
  65. })
  66. }
  67. export function deduct(data) {
  68. return request({
  69. url: '/company/company/deduct',
  70. method: 'post',
  71. data: data
  72. })
  73. }
  74. // 查询企业列表
  75. export function crmDayCountlist(query) {
  76. return request({
  77. url: '/company/company/crmDayCountlist',
  78. method: 'get',
  79. params: query
  80. })
  81. }
  82. // export function allList(query) {
  83. // return request({
  84. // url: '/company/company/allList',
  85. // method: 'get',
  86. // params: query
  87. // })
  88. // }