admin.js 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431
  1. // +----------------------------------------------------------------------
  2. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  3. // +----------------------------------------------------------------------
  4. // | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
  5. // +----------------------------------------------------------------------
  6. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  7. // +----------------------------------------------------------------------
  8. // | Author: CRMEB Team <admin@crmeb.com>
  9. // +----------------------------------------------------------------------
  10. import request from "@/utils/request.js";
  11. /**
  12. * 统计数据
  13. */
  14. export function getStatisticsInfo() {
  15. return request.get("admin/order/statistics", {}, {
  16. login: true
  17. });
  18. }
  19. /**
  20. * 订单月统计
  21. */
  22. export function getStatisticsMonth(where) {
  23. return request.get("admin/order/data", where, {
  24. login: true
  25. });
  26. }
  27. /**
  28. * 订单月统计
  29. */
  30. export function getAdminOrderList(where) {
  31. return request.get("admin/order/list", where, {
  32. login: true
  33. });
  34. }
  35. /**
  36. * 订单改价
  37. */
  38. export function setAdminOrderPrice(data) {
  39. return request.post("admin/order/price", data, {
  40. login: true
  41. });
  42. }
  43. /**
  44. * 订单备注
  45. */
  46. export function setAdminOrderRemark(data) {
  47. return request.post("admin/order/remark", data, {
  48. login: true
  49. });
  50. }
  51. /**
  52. * 订单备注(退款)
  53. */
  54. export function setAdminRefundRemark(data) {
  55. return request.post("admin/refund_order/remark", data, {
  56. login: true
  57. });
  58. }
  59. /**
  60. * 订单详情
  61. */
  62. export function getAdminOrderDetail(orderId) {
  63. return request.get("admin/order/detail/" + orderId, {}, {
  64. login: true
  65. });
  66. }
  67. /**
  68. * 订单详情(退款)
  69. */
  70. export function getAdminRefundDetail(orderId) {
  71. return request.get("admin/refund_order/detail/" + orderId, {}, {
  72. login: true
  73. });
  74. }
  75. /**
  76. * 订单发货保存
  77. */
  78. export function setAdminOrderDelivery(id, data) {
  79. return request.post("admin/order/delivery/keep/" + id, data, {
  80. login: true
  81. });
  82. }
  83. /**
  84. * 订单统计图
  85. */
  86. export function getStatisticsTime(data) {
  87. return request.get("admin/order/time", data, {
  88. login: true
  89. });
  90. }
  91. /**
  92. * 线下付款订单确认付款
  93. */
  94. export function setOfflinePay(data) {
  95. return request.post("admin/order/offline", data, {
  96. login: true
  97. });
  98. }
  99. /**
  100. * 订单确认退款
  101. */
  102. export function setOrderRefund(data) {
  103. return request.post("admin/order/refund", data, {
  104. login: true
  105. });
  106. }
  107. /**
  108. * 获取快递公司
  109. * @returns {*}
  110. */
  111. export function getLogistics(data) {
  112. return request.get("logistics", data, {
  113. login: false
  114. });
  115. }
  116. /**
  117. * 订单核销
  118. * @returns {*}
  119. */
  120. export function orderVerific(verify_code, is_confirm) {
  121. return request.post("order/order_verific", {
  122. verify_code,
  123. is_confirm
  124. });
  125. }
  126. /**
  127. * 获取物流公司模板
  128. * @returns {*}
  129. */
  130. export function orderExportTemp(data) {
  131. return request.get("admin/order/export_temp", data);
  132. }
  133. /**
  134. * 获取订单打印默认配置
  135. * @returns {*}
  136. */
  137. export function orderDeliveryInfo(id) {
  138. return request.get("admin/order/delivery_info/"+id);
  139. }
  140. /**
  141. * 配送员列表
  142. * @returns {*}
  143. */
  144. export function orderOrderDelivery() {
  145. return request.get("admin/order/delivery");
  146. }
  147. // 门店
  148. /**
  149. * 用户信息
  150. */
  151. export function userInfo() {
  152. return request.get("store/staff/info");
  153. }
  154. /**
  155. * 门店中心-订单统计
  156. */
  157. export function orderInfo(data) {
  158. return request.get("store/order/statistics",data);
  159. }
  160. /**
  161. * 门店中心-统计菜单
  162. */
  163. export function statisticsMenuApi(data) {
  164. return request.get("store/staff/statistics",data);
  165. }
  166. /**
  167. * 门店中心-详细数据列表
  168. */
  169. export function getListApi(data) {
  170. return request.get("store/order/data",data);
  171. }
  172. /**
  173. * 门店中心-数据详情-列表
  174. */
  175. export function getStatisticsListApi(type,data) {
  176. return request.get("store/staff/data/"+type,data);
  177. }
  178. /**
  179. * 门店中心-订单管理列表
  180. */
  181. export function getOrderlistApi(data) {
  182. return request.get("store/order/list",data);
  183. }
  184. /**
  185. * 门店中心-订单管理列表(退款)
  186. */
  187. export function getRefundlistApi(data) {
  188. return request.get("store/refund/list",data);
  189. }
  190. /**
  191. * 门店中心-订单管理备注
  192. */
  193. export function getOrderreMarkApi(data) {
  194. return request.post("store/order/remark",data);
  195. }
  196. /**
  197. * 门店中心-订单管理备注(退款)
  198. */
  199. export function getRefundMarkApi(data) {
  200. return request.post("store/refund/remark",data);
  201. }
  202. /**
  203. * 门店中心-订单管理改价
  204. */
  205. export function getOrderPriceApi(data) {
  206. return request.post("store/order/price",data);
  207. }
  208. /**
  209. * 门店中心-订单管理确定付款
  210. */
  211. export function getOrderOfflineApi(data) {
  212. return request.post("store/order/offline",data);
  213. }
  214. /**
  215. * 门店中心-去发货-用户
  216. */
  217. export function getOrderDeliveryinfoApi(id) {
  218. return request.get("store/order/delivery_info/"+id);
  219. }
  220. /**
  221. * 门店中心-去发货-获取快递公司
  222. */
  223. export function getOrderExportApi(data) {
  224. return request.get("store/order/export_all", data, {
  225. login: false
  226. });
  227. }
  228. /**
  229. * 门店中心-去发货-获取物流公司模板
  230. * @returns {*}
  231. */
  232. export function getOrderExportTemp(data) {
  233. return request.get("store/order/export_temp", data);
  234. }
  235. /**
  236. * 门店中心-去发货-订单发货保存
  237. */
  238. export function setOrderDelivery(id, data) {
  239. return request.post("store/order/delivery/" + id, data, {
  240. login: true
  241. });
  242. }
  243. /**
  244. * 门店中心-去发货-获取配送员列表
  245. * @returns {*}
  246. */
  247. export function getOrderDelivery() {
  248. return request.get("store/delivery/list");
  249. }
  250. /**
  251. * 门店中心-订单确认退款
  252. */
  253. export function OrderRefund(data) {
  254. return request.post("store/order/refund", data, {
  255. login: true
  256. });
  257. }
  258. /**
  259. * 门店中心-订单详情
  260. */
  261. export function OrderDetail(id) {
  262. return request.get("store/order/detail/"+id);
  263. }
  264. /**
  265. * 门店中心-订单详情(退款)
  266. */
  267. export function refundDetail(id) {
  268. return request.get("store/refund/detail/"+id);
  269. }
  270. /**
  271. * 配送员-获取用户信息
  272. */
  273. export function deliveryInfo(id) {
  274. return request.get("store/delivery/info");
  275. }
  276. /**
  277. * 配送员-获取配送统计数据
  278. */
  279. export function deliveryStatistics(data) {
  280. return request.get("store/delivery/statistics",data);
  281. }
  282. /**
  283. * 配送员-获取配送统计数据列表
  284. */
  285. export function deliveryList(data) {
  286. return request.get("store/delivery/data",data);
  287. }
  288. /**
  289. * 配送员-获取订单列表数据列表
  290. */
  291. export function deliveryOrderList(data) {
  292. return request.get("store/delivery/order",data);
  293. }
  294. /**
  295. * 门店中心-订单取消、删除
  296. */
  297. export function OrderDel(id) {
  298. return request.delete("store/order/del/"+id);
  299. }
  300. /**
  301. * 门店中心-订单取消、取消
  302. */
  303. export function OrderCancel(id) {
  304. return request.post("store/order/cancel/"+id);
  305. }
  306. /**
  307. * 配送员-扫码核销获取订单信息
  308. */
  309. export function orderWriteoffInfo(type,data) {
  310. return request.get("store/order/writeoff_info/"+type,data);
  311. }
  312. /**
  313. * 配送员-核销订单获取商品信息
  314. */
  315. export function orderCartInfo(type,data) {
  316. return request.get("store/order/cart_info/"+type,data);
  317. }
  318. /**
  319. * 配送员-订单核销
  320. */
  321. export function orderWriteoff(type,data) {
  322. return request.post("store/order/writeoff/"+type,data);
  323. }
  324. /**
  325. * 统计管理-获取订单可拆分商品列表
  326. */
  327. export function orderSplitInfo(id) {
  328. return request.get("admin/order/split_cart_info/"+id);
  329. }
  330. /**
  331. * 统计管理-提交
  332. */
  333. export function orderSplitDelivery(id,data) {
  334. return request.put("admin/order/split_delivery/"+id,data);
  335. }
  336. /**
  337. * 统计管理-退货退款
  338. */
  339. export function orderRefundAgree(id) {
  340. return request.post("admin/order/refund_agree/"+id);
  341. }
  342. /**
  343. * 门店中心-获取订单可拆分商品列表
  344. */
  345. export function storeSplitInfo(id) {
  346. return request.get("store/order/split_cart_info/"+id);
  347. }
  348. /**
  349. * 门店中心-提交
  350. */
  351. export function storeSplitDelivery(id,data) {
  352. return request.put("store/order/split_delivery/"+id,data);
  353. }
  354. /**
  355. * 门店中心-退货退款
  356. */
  357. export function storeRefundAgree(id) {
  358. return request.post("store/order/refund_agree/"+id);
  359. }
  360. /**
  361. * 平台-退款列表
  362. */
  363. export function adminRefundList(data) {
  364. return request.get("admin/refund_order/list",data);
  365. }