order.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. import {
  2. myRequest
  3. } from './request.js'
  4. // 正向订单状态数
  5. export function getOrderStstusAmount(data) {
  6. return myRequest({
  7. url: 'order_service/orderService/getOrderStstusAmount',
  8. method: 'post',
  9. data
  10. })
  11. }
  12. // 正向订单列表
  13. export function orderList(data) {
  14. return myRequest({
  15. url: 'order_service/orderService/orderList',
  16. method: 'post',
  17. data
  18. })
  19. }
  20. // 订单详情页面
  21. export function getOrderDetails(data) {
  22. return myRequest({
  23. url: 'order_service/orderService/getOrderDetails',
  24. method: 'post',
  25. data
  26. })
  27. }
  28. const pre = ""
  29. const apiType = "php"
  30. // 订单状态数
  31. export function getOrderStatusNumber(data) {
  32. return myRequest({
  33. url: `${pre}mer/store/order/chart`,
  34. method: 'GET',
  35. data,
  36. apiType
  37. })
  38. }
  39. // 订单列表
  40. export function getOrderList(data) {
  41. return myRequest({
  42. url: `${pre}mer/store/order/lst`,
  43. method: 'GET',
  44. data,
  45. apiType
  46. })
  47. }
  48. // 订单列表产品
  49. export function getOrderListProduct(order_sn) {
  50. const data = {
  51. order_sn: order_sn,
  52. order_type: -1,
  53. distribution_mode: -1,
  54. keywords: order_sn,
  55. status: "",
  56. date: "",
  57. page: 1,
  58. limit: 20,
  59. type: 1,
  60. username: "",
  61. pay_type: -1,
  62. ylj_status: "",
  63. paid: "",
  64. }
  65. return myRequest({
  66. url: `${pre}mer/store/order/lst`,
  67. method: 'GET',
  68. data,
  69. apiType
  70. })
  71. }
  72. // filtter
  73. export function getOrderListFiltter(data) {
  74. return myRequest({
  75. url: `${pre}mer/store/order/filtter`,
  76. method: 'GET',
  77. data,
  78. apiType
  79. })
  80. }
  81. /**
  82. * @description 订单 -- 发货规则
  83. */
  84. export function orderDeliveryRuleApi(id) {
  85. return myRequest({
  86. url: `${pre}mer/store/order/delivery/${id}/form`,
  87. method: 'GET',
  88. apiType
  89. })
  90. }
  91. /**
  92. * @description 订单 -- 发货
  93. */
  94. export function orderDeliveryApi(id, data) {
  95. return myRequest({
  96. url: `${pre}/mer/store/order/delivery/${id}.html`,
  97. method: 'POST',
  98. data,
  99. apiType
  100. })
  101. }
  102. /**
  103. * @description 订单 -- 详情
  104. */
  105. export function orderDetailApi(id) {
  106. return myRequest({
  107. url: `${pre}mer/store/order/detail/${id}`,
  108. method: 'GET',
  109. apiType
  110. })
  111. }
  112. /**
  113. * @description 获取物流信息
  114. */
  115. export function getExpress(id) {
  116. return myRequest({
  117. url: `${pre}mer/store/order/express/${id}`,
  118. method: 'GET',
  119. apiType
  120. })
  121. }
  122. /**售后列表 */
  123. export function getAfterSaleList(data) {
  124. return myRequest({
  125. url: `${pre}mer/store/refundorder/lst`,
  126. method: 'GET',
  127. data,
  128. apiType
  129. })
  130. }
  131. /**
  132. * @description 退款单获取物流信息
  133. */
  134. export function refundorderExpressApi(id) {
  135. return myRequest({
  136. url: `${pre}mer/store/refundorder/express/${id}`,
  137. method: 'GET',
  138. apiType
  139. })
  140. }
  141. /**
  142. * @description 自提
  143. */
  144. export function takeProductApi(id, data) {
  145. return myRequest({
  146. url: `${pre}mer/store/order/carry/${id}`,
  147. method: 'GET',
  148. data,
  149. apiType
  150. })
  151. }
  152. /**
  153. * @description 退款订单 -- 详情
  154. */
  155. export function refundorderDetailApi(id) {
  156. return myRequest({
  157. url: `${pre}mer/store/refundorder/detail/${id}`,
  158. method: 'GET',
  159. apiType
  160. })
  161. }
  162. /**
  163. * @description 退款订单
  164. */
  165. export function confirmRefundOrderApi(id, data) {
  166. return myRequest({
  167. url: `${pre}mer/store/refundorder/status/${id}`,
  168. data,
  169. method: 'POST',
  170. apiType
  171. })
  172. }
  173. /**
  174. * @description 退款订单 -- 确认收货
  175. */
  176. export function confirmReceiptApi(id, data) {
  177. return myRequest({
  178. url: `${pre}mer/store/refundorder/refund/${id}`,
  179. data,
  180. method: 'POST',
  181. apiType
  182. })
  183. }