admin.js 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. // +----------------------------------------------------------------------
  2. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  3. // +----------------------------------------------------------------------
  4. // | Copyright (c) 2016~2024 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", {}, { login: true });
  16. }
  17. /**
  18. * 订单月统计
  19. */
  20. export function getStatisticsMonth(where) {
  21. return request.get("admin/order/data", where, { login: true });
  22. }
  23. /**
  24. * 订单月统计
  25. */
  26. export function getAdminOrderList(where) {
  27. return request.get("admin/order/list", where, { login: true });
  28. }
  29. /**
  30. * 订单改价
  31. */
  32. export function setAdminOrderPrice(merId,id,data) {
  33. return request.post("admin/"+merId+"/price/"+id, data, { login: true });
  34. }
  35. /**
  36. * 订单备注
  37. */
  38. export function setAdminOrderRemark(merId,id,data) {
  39. return request.post("admin/"+merId+"/mark/" +id, data, { login: true });
  40. }
  41. /**
  42. * 订单详情
  43. */
  44. export function getAdminOrderDetail(merId, orderId) {
  45. return request.get("admin/"+merId+"/order/" + orderId, {}, { login: true });
  46. }
  47. /**
  48. * 订单发货信息获取
  49. */
  50. export function getAdminOrderDelivery(orderId) {
  51. return request.get( "admin/order/delivery/gain/" + orderId,{},{ login: true });
  52. }
  53. /**
  54. * 订单发货保存
  55. */
  56. export function setAdminOrderDelivery(merId,id,data) {
  57. return request.post("admin/"+merId+"/delivery/"+ id, data, { login: true });
  58. }
  59. /**
  60. * 订单统计图
  61. */
  62. export function getStatisticsTime(data) {
  63. return request.get("admin/order/time", data, { login: true });
  64. }
  65. /**
  66. * 线下付款订单确认付款
  67. */
  68. export function setOfflinePay(merId, data) {
  69. return request.post("admin/"+merId+"/order/offline", data, { login: true });
  70. }
  71. /**
  72. * 订单确认退款
  73. */
  74. export function setOrderRefund(merId,data) {
  75. return request.post("admin/"+merId+"/order/refund", data, { login: true });
  76. }
  77. /**
  78. * 获取快递公司
  79. * @returns {*}
  80. */
  81. export function getLogistics() {
  82. return request.get("logistics", {}, { login: false });
  83. }
  84. /**
  85. * 订单核销
  86. * @returns {*}
  87. */
  88. export function orderVerific(merId, id, data) {
  89. return request.post(`verifier/${merId}/${id}`,data);
  90. }
  91. /**
  92. * 核销订单详情
  93. * @returns {*}
  94. */
  95. export function verifierOrder(mer_id,code) {
  96. return request.get("verifier/"+mer_id+"/order/"+code);
  97. }
  98. /**
  99. * 订单统计数
  100. * @returns {*}
  101. */
  102. export function orderStatistics(mer_id) {
  103. return request.get("admin/"+mer_id+"/statistics");
  104. }
  105. /**
  106. * 每日成交额
  107. * @returns {*}
  108. */
  109. export function orderPrice(where, mer_id) {
  110. return request.get("admin/"+mer_id+"/order_price", where, { login: true });
  111. }
  112. /**
  113. * 订单列表
  114. * @returns {*}
  115. */
  116. export function getOrderList(where, merId) {
  117. return request.get(`admin/${merId}/order_list`, where, { login: true });
  118. }
  119. /**
  120. * 退款订单列表
  121. * @returns {*}
  122. */
  123. export function getRefundOrderList(where, merId) {
  124. return request.get(`server/${merId}/refund/lst`, where, { login: true });
  125. }
  126. /**
  127. * 营业额统计
  128. * @returns {*}
  129. */
  130. export function turnoverStatistics(where, merId) {
  131. return request.get(`admin/${merId}/pay_price`, where, { login: true });
  132. }
  133. /**
  134. * 订单统计
  135. * @returns {*}
  136. */
  137. export function orderNumberStatistics(where, merId) {
  138. return request.get(`admin/${merId}/pay_number`, where, { login: true });
  139. }
  140. /**
  141. * 获取订单打印默认配置
  142. * @returns {*}
  143. */
  144. export function orderDeliveryInfo(merId) {
  145. return request.get(`admin/${merId}/mer_form`);
  146. }
  147. /**
  148. * 获取电子面单列表
  149. * @returns {*}
  150. */
  151. export function orderExportTemp(data) {
  152. return request.get("store/expr/temps", data);
  153. }
  154. /**
  155. * 是否开始电子面单和同城配送
  156. * @returns {*}
  157. */
  158. export function getTempAndDelivery(merId) {
  159. return request.get(`admin/${merId}/delivery_config`);
  160. }
  161. /**
  162. * 获取同城配送门店列表
  163. * @returns {*}
  164. */
  165. export function getDeliveryStoreLst(merId) {
  166. return request.get(`admin/${merId}/delivery_options`);
  167. }
  168. /**
  169. * 退款订单信息
  170. * @returns {*}
  171. */
  172. export function getRefundOrderInfo(merId,id) {
  173. return request.get(`server/${merId}/refund/get/${id}`);
  174. }
  175. /**
  176. * 提交退款订单信息
  177. * @returns {*}
  178. */
  179. export function refundOrderSubmit(merId,id,data) {
  180. return request.post(`server/${merId}/refund/status/${id}`,data, { login: true });
  181. }
  182. /**
  183. * 退款单确认收货
  184. * @returns {*}
  185. */
  186. export function refundOrderReceive(merId,id) {
  187. return request.post(`server/${merId}/refund/confirm/${id}`,{}, { login: true });
  188. }
  189. /**
  190. * 退款单详情
  191. */
  192. export function getRefundOrderDetail(merId, orderId) {
  193. return request.get(`server/${merId}/refund/detail/${orderId}`,{}, { login: true });
  194. }
  195. /**
  196. * 添加退款单备注信息
  197. */
  198. export function setRefundMark(merId, orderId, data) {
  199. return request.post(`server/${merId}/refund/mark/${orderId}`,data, { login: true });
  200. }
  201. /**
  202. * 去核销
  203. * @param object data
  204. */
  205. export function orderCancellation(merId,id){
  206. return request.post(`admin/${merId}/verify/${id}`);
  207. }
  208. /**
  209. * 手动退款 -- 订单详情
  210. */
  211. export function getRefundOrderApi(merId, orderId) {
  212. return request.get(`server/${merId}/refund/check/${orderId}`,{}, { login: true });
  213. }
  214. /**
  215. * 手动退款 -- 确认退款
  216. */
  217. export function confirmRefundApi(merId, data) {
  218. return request.post(`server/${merId}/refund/create`,data, { login: true });
  219. }
  220. /**
  221. * 手动退款 -- 计算退款金额
  222. */
  223. export function computeRefundPrice(merId,data) {
  224. return request.post(`server/${merId}/refund/compute`,data, { login: true });
  225. }
  226. /**
  227. * 扫码上传 -- 上传图片
  228. */
  229. export function scanUpload(field,token,data) {
  230. return request.post(`scan_upload/image/${field}/${token}`,data, { login: true });
  231. }