fetch.js 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. import { $http } from "./config";
  2. export default {
  3. // 货主登录
  4. staffLogin(data) {
  5. return $http("user/cargo/login", data);
  6. },
  7. // 获取航次列表
  8. getVoyageList(data) {
  9. return $http("voyage/list", data);
  10. },
  11. // 获取航次详情
  12. getVoyageDetail(data) {
  13. return $http("/voyage/wx/detail", data);
  14. },
  15. // 更新航次
  16. updateVoyage(data) {
  17. return $http("/voyage/update", data);
  18. },
  19. // 完成航次
  20. finishVoyage(data) {
  21. return $http("/voyage/finish", data);
  22. },
  23. // 添加航次
  24. addVoyage(data) {
  25. return $http("voyage/add", data);
  26. },
  27. // 获取媒体列表
  28. getMediaList(data) {
  29. return $http("/media/list", data);
  30. },
  31. // 导出excel
  32. exportExcel(data) {
  33. return $http("/voyage/exportExcel", data);
  34. },
  35. // 获取卸货列表
  36. getDischargeList(data) {
  37. return $http("/voyage/getDischargeList", data);
  38. },
  39. // 获取汽车装货记录
  40. getTruckLoadRecord(data) {
  41. return $http("/voyage/getCarLoadRecordList", data);
  42. },
  43. // 添加职位
  44. addRole(data) {
  45. return $http("/role/permission/addRole", data);
  46. },
  47. // 获取权限数据
  48. getPermisiionData(data) {
  49. return $http("/role/permission/getPermisiionData", data);
  50. },
  51. // 获取角色列表
  52. getRoleList(data) {
  53. return $http("/role/permission/list", data);
  54. },
  55. // 获取角色下拉列表
  56. getRoleSelect(data) {
  57. return $http("/role/permission/getRoleSelect", data);
  58. },
  59. // 修改角色信息
  60. updateRole(data) {
  61. return $http("/role/permission/updateRole", data);
  62. },
  63. // 获取代理列表
  64. getAgencyList(data) {
  65. return $http("/user/cargo/proxy/list", data);
  66. },
  67. // 添加代理
  68. addAgency(data) {
  69. return $http("/user/cargo/add/proxy", data);
  70. },
  71. // 获取货主子账户列表
  72. getSubAccountList(data) {
  73. return $http("/user/cargo/account/list", data);
  74. },
  75. // 添加货主子账户
  76. addSubAccount(data) {
  77. return $http("/user/cargo/add/loginAccount", data);
  78. },
  79. // 修改货主子账户
  80. updateSubAccount(data) {
  81. return $http("/user/cargo/update/loginAccount", data);
  82. },
  83. // 获取角色详情
  84. getRoleDetail(data) {
  85. return $http("/role/permission/getRoleDetail", data);
  86. },
  87. // 获取登录人权限
  88. getPermissionByUserId(data) {
  89. return $http("/role/permission/getPermissionByUserId", data);
  90. },
  91. // 添加部门
  92. addDepartment(data) {
  93. return $http("/department/add", data);
  94. },
  95. // 获取部门列表
  96. getDepartmentList(data) {
  97. return $http("/department/list", data);
  98. },
  99. // 获取部门下拉
  100. getDepartmentSelect(data) {
  101. return $http("/department/select", data);
  102. },
  103. // 修改部门
  104. updateDepartment(data) {
  105. return $http("/department/update", data);
  106. },
  107. // 获取FYDI指数下载链接
  108. getFYFIDownloadUrl(data) {
  109. return $http("/fydi/getLastest", data);
  110. },
  111. // 获取提货单列表
  112. getLabList(data) {
  113. return $http("/voyage/getLabList", data);
  114. },
  115. // 获取港口天气列表
  116. getPortWeatherList(data) {
  117. return $http("/voyage/getPortWeatherList", data);
  118. },
  119. // 获取超期航次提醒
  120. getLongDaysInPort(data) {
  121. return $http("/voyage/cargo/longDaysInPort", data);
  122. },
  123. // 获取客户列表
  124. getClientList(data) {
  125. return $http("/client/account/list", data);
  126. },
  127. // 添加客户
  128. addClient(data) {
  129. return $http("/client/account/add", data);
  130. },
  131. // 修改客户
  132. updateClient(data) {
  133. return $http("/client/account/update", data);
  134. },
  135. // 获取港口列表
  136. getCol(data) {
  137. return $http("/port/getCol", data);
  138. },
  139. // 获取货种下拉
  140. getCargoSelect(data) {
  141. return $http("/cargo/select", data);
  142. },
  143. // 启用/禁用货种
  144. updateCargoStatus(data) {
  145. return $http("/cargo/active", data);
  146. },
  147. // 添加货种
  148. addCargo(data) {
  149. return $http("/cargo/add", data);
  150. },
  151. // 货种列表
  152. getCargoList(data) {
  153. return $http("/cargo/list", data);
  154. },
  155. // 获取 代理公司select
  156. getAgencySelect(data) {
  157. return $http("/cargo/proxy/select", data);
  158. },
  159. // 获取 已选择代理公司select
  160. getAgencySelected(data) {
  161. return $http("/cargo/proxy/selected", data);
  162. },
  163. // 更新 货种
  164. updateCargo(data) {
  165. return $http("/cargo/update", data);
  166. },
  167. // 获取首页数据
  168. getIndexData(data) {
  169. return $http("/pc/index", data);
  170. },
  171. // 获取首页select
  172. getIndexSelect(data) {
  173. return $http("/pc/index/select", data);
  174. },
  175. // 合并航次
  176. mergeVoyage(data) {
  177. return $http("/voyage/merge", data);
  178. },
  179. // 解除合并
  180. unmergeVoyage(data) {
  181. return $http("/voyage/merge/lift", data);
  182. },
  183. };