fetch.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. import { $http } from "./config";
  2. export default {
  3. // 员工登录
  4. staffLogin(data) {
  5. return $http("post", "staff/backstage/login", data);
  6. },
  7. // 获取用户列表 货主/船东
  8. getUserList(data) {
  9. return $http("post", "user/backstage/list", data);
  10. },
  11. // 添加用户
  12. addUser(data) {
  13. return $http("post", "user/backstage/add", data);
  14. },
  15. // 获取用户详情
  16. getUserDetail(data) {
  17. return $http("post", "user/backstage/details", data);
  18. },
  19. // 更新用户详情
  20. updateUserDetail(data) {
  21. return $http("post", "/user/backstage/update", data);
  22. },
  23. // 获取航次列表
  24. getVoyageList(data) {
  25. return $http("post", "voyage/list", data);
  26. },
  27. // 获取航次详情
  28. getVoyageDetail(data) {
  29. return $http("post", "/voyage/detail", data);
  30. },
  31. // 更新航次
  32. updateVoyage(data) {
  33. return $http("post", "/voyage/backstage/update", data);
  34. },
  35. // 完成航次
  36. finishVoyage(data) {
  37. return $http("post", "/voyage/backstage/finish", data);
  38. },
  39. // 根据船名/MMSI/船东手机号获取船舶用户信息(员工端添加航次选择船)
  40. getUserInfoAndShipInfo(data) {
  41. return $http("post", "ship/backstage/userShipInfo", data);
  42. },
  43. // 添加航次
  44. addVoyage(data) {
  45. return $http("post", "voyage/backstage/add", data);
  46. },
  47. // 获取媒体列表
  48. getMediaList(data) {
  49. return $http("post", "/media/backstage/list", data);
  50. },
  51. // 审核媒体文件
  52. auditMedia(data) {
  53. return $http("post", "/media/backstage/audit", data);
  54. },
  55. // 模糊搜索用户
  56. seachUser(data) {
  57. return $http("post", "/user/backstage/search", data);
  58. },
  59. // 获取船舶列表
  60. getShipList(data) {
  61. return $http("post", "/ship/backstage/list", data);
  62. },
  63. // 更新船舶信息
  64. updateShip(data) {
  65. return $http("post", "/ship/backstage/update", data);
  66. },
  67. // 更新船东信息
  68. updateShipOwner(data) {
  69. return $http("post", "/user/backstage/update", data);
  70. },
  71. // 获取船舶详情
  72. getShipDetail(data) {
  73. return $http("post", "/ship/backstage/detail", data);
  74. },
  75. // 船舶查询
  76. searchShip(data) {
  77. return $http("post", "ship/backstage/search", data);
  78. },
  79. // 根据shipId获取船东列表
  80. getShipOwnerListByShipId(data) {
  81. return $http("post", "/user/backstage/shopOwnerlist", data);
  82. },
  83. // 添加卸货记录
  84. addDischarge(data) {
  85. return $http("post", "/voyage/addDischarge", data);
  86. },
  87. // 删除卸货记录
  88. deleteDischarge(data) {
  89. return $http("post", "/voyage/deleteDischarge", data);
  90. },
  91. // 导出excel
  92. exportExcel(data) {
  93. return $http("post", "/voyage/exportExcel", data);
  94. },
  95. // 获取卸货列表
  96. getDischargeList(data) {
  97. return $http("post", "/voyage/getDischargeList", data);
  98. },
  99. // 修改卸货记录
  100. updateDischarge(data) {
  101. return $http("post", "/voyage/updateDischarge", data);
  102. },
  103. // 获取未拍照航次
  104. getUnphotographNotice() {
  105. return $http("get", "/voyage/backstage/notice");
  106. },
  107. // 计算预计到港时间
  108. calExpectedArrivalTime(data) {
  109. return $http("post", "/voyage/calExpectedArrivalTime", data);
  110. },
  111. // 删除运单
  112. deleteWaybill(data) {
  113. return $http("post", "/voyage/deleteWaybill", data);
  114. },
  115. // 上传运单
  116. updateVoyageWaybill(data) {
  117. return $http("post", "/voyage/updateVoyageWaybill", data);
  118. },
  119. };