company.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. import request from '@/utils/request'
  2. /* 获取公司列表 */
  3. export function getPage(params) {
  4. return request({
  5. url: '/admin/erp/company/getPage',
  6. method: 'get',
  7. loaidng: false,
  8. params
  9. })
  10. }
  11. /* 创建公司 */
  12. export function addCompany(parmas) {
  13. return request({
  14. url: `/admin/erp/company/createCompany`,
  15. method: 'post',
  16. headers: { 'Content-Type': 'application/json' },
  17. data: parmas
  18. })
  19. }
  20. /*编辑公司*/
  21. export function editCompany(id,parmas) {
  22. return request({
  23. url: `/admin/erp/company/updateCompany/${id}`,
  24. method: 'post',
  25. headers: { 'Content-Type': 'application/json' },
  26. data: parmas
  27. })
  28. }
  29. /* 套餐续费 */
  30. export function renewCompany(id,packageId) {
  31. return request({
  32. url: `/admin/erp/company/renewCompany/${id}/${packageId}`,
  33. method: 'post',
  34. headers: { 'Content-Type': 'application/json' },
  35. })
  36. }
  37. /* 计算差价 */
  38. export function difference(id,parmas) {
  39. return request({
  40. url: `/admin/erp/company/renewCompany/difference/${id}`,
  41. method: 'post',
  42. headers: { 'Content-Type': 'application/json' },
  43. data: parmas
  44. })
  45. }
  46. /* 获取套餐详情 */
  47. export function companyPackage(id) {
  48. return request({
  49. url: `/admin/erp/companyPackage/${id}`,
  50. method: 'get',
  51. loaidng: false,
  52. })
  53. }
  54. /* 获取公司详情 /admin/erp/company/getOne/{id} */
  55. export function getOne(id) {
  56. return request({
  57. url: `/admin/erp/company/getOne/${id}`,
  58. method: 'get',
  59. })
  60. }
  61. /* 校验营业执照 */
  62. export function checkLicense(parmas) {
  63. return request({
  64. url: `/admin/erp/company/checkLicense`,
  65. method: 'post',
  66. headers: { 'Content-Type': 'application/json' },
  67. data: parmas
  68. })
  69. }
  70. /* 校验身份证 */
  71. export function checkIdCardOpposite(parmas,type) {
  72. return request({
  73. url: `/admin/erp/company/checkIdCardOpposite/${type}`,
  74. method: 'post',
  75. headers: { 'Content-Type': 'application/json' },
  76. data: parmas
  77. })
  78. }
  79. /* 获取模版树状图 GET
  80. */
  81. export function getSendNumByCompany() {
  82. return request({
  83. url: `/admin/erp/SmsMailTemplate/getSendNumByCompany`,
  84. method: 'get',
  85. })
  86. }
  87. /* 选中的模版 */
  88. export function updateSelectMsg(parmas) {
  89. return request({
  90. url: `/admin/erp/SmsMailTemplate/updateSelectMsg`,
  91. method: 'post',
  92. headers: { 'Content-Type': 'application/json' },
  93. data: parmas
  94. })
  95. }
  96. /* 获取自己的所有消息 */
  97. export function getSysMsgByOwn(type) {
  98. return request({
  99. url: `/admin/erp/SmsMailTemplate/getSysMsgByOwn/${type}`,
  100. method: 'get'
  101. })
  102. }