order.service.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. /**
  2. * 这是与购物有关的业务逻辑的服务
  3. */
  4. export default class OrderService {
  5. constructor(AjaxService) {
  6. Object.assign(this, { AjaxService })
  7. this.name = 'OrderService'
  8. }
  9. /* 订单结算初始化 */
  10. QueryOrderConfirm (data = {}) {
  11. return this.AjaxService.get({
  12. url:'/order/confirm',
  13. data,
  14. isLoading: true ,
  15. })
  16. }
  17. /* 提交订单 */
  18. QueryOrderSubmit (data = {}) {
  19. return this.AjaxService.get({
  20. url:'/order/submit',
  21. data,
  22. isLoading: true ,
  23. })
  24. }
  25. /* 订单列表 */
  26. QueryOrderList (data = {}) {
  27. return this.AjaxService.get({
  28. url:'/order/list',
  29. data,
  30. isLoading: true ,
  31. })
  32. }
  33. /* 查询订单详情 */
  34. QueryOrderDetails (data = {}) {
  35. return this.AjaxService.get({
  36. url:'/order/detail',
  37. data,
  38. isLoading: true ,
  39. })
  40. }
  41. /* 操作取消订单 */
  42. CancelOrder (data = {}) {
  43. return this.AjaxService.get({
  44. url:'/order/cancel',
  45. data,
  46. isLoading: true ,
  47. })
  48. }
  49. /* 操作删除订单 */
  50. DeleteOrder (data = {}) {
  51. return this.AjaxService.get({
  52. url:'/order/delete',
  53. data,
  54. isLoading: true ,
  55. })
  56. }
  57. /* 确认收货操作 */
  58. ConfirmReceipt (data = {}) {
  59. return this.AjaxService.get({
  60. url:'/order/affirm',
  61. data,
  62. isLoading: true ,
  63. })
  64. }
  65. /* 查询物流 */
  66. QueryLogistics (data = {}) {
  67. return this.AjaxService.get({
  68. url:'/order/logistics',
  69. data,
  70. isLoading: true ,
  71. })
  72. }
  73. /**
  74. *获取订单分享码
  75. * @param orderID
  76. */
  77. QueryOrderShareCode (data = {}) {
  78. return this.AjaxService.get({
  79. url:'/order/share',
  80. data,
  81. isLoading: false ,
  82. })
  83. }
  84. /**
  85. *获取订单分享码
  86. * @param orderID
  87. */
  88. OrderShareCode (data = {}) {
  89. return this.AjaxService.get({
  90. url:'/order/shareCode',
  91. data, isLoading: true,
  92. isStatus: true ,
  93. })
  94. }
  95. /**
  96. *机构搜索订单
  97. *@param searchWord 关键词
  98. *@param userId 用户ID
  99. *@param pageNum 页码
  100. *@param pageSize 条数
  101. */
  102. SearchOrderInfo (data = {}) {
  103. return this.AjaxService.get({
  104. url:'/order/search',
  105. data,
  106. isLoading: true ,
  107. })
  108. }
  109. /**
  110. *搜索订单历史记录
  111. *@param organizeId 用户ID
  112. */
  113. SearchOrderHistory (data = {}) {
  114. return this.AjaxService.get({
  115. url:'/order/searchHistory',
  116. data,
  117. isLoading: false ,
  118. })
  119. }
  120. /**
  121. *清楚订单历史记录
  122. *@param organizeId 用户ID
  123. */
  124. ClearOrderHistory (data = {}) {
  125. return this.AjaxService.get({
  126. url:'/order/searchHistory/delete',
  127. data,
  128. isLoading: true ,
  129. })
  130. }
  131. /**
  132. *@机构-确认订单初始化数据
  133. *@param userId 用户ID
  134. *@param count 商品数量
  135. *@param productIds 商品IDs
  136. */
  137. CreateOrderInfo (data = {}) {
  138. return this.AjaxService.get({ url:'/order/confirm', data, isLoading: true })
  139. }
  140. /**
  141. *@确认订单-获取邮费信息
  142. *@param productIds 商品ID【”,”分割】
  143. *@param totalPrice 商品总额
  144. *@param userId 用户ID
  145. *@param townID 地址区ID
  146. */
  147. GetOrderPostage (data = {}) {
  148. return this.AjaxService.get({
  149. url:'/order/postage',
  150. data,
  151. isLoading: false ,
  152. })
  153. }
  154. /**
  155. *@确认订单-获取发票信息
  156. *@param userId 用户ID
  157. */
  158. GetFindInvoice (data = {}) {
  159. return this.AjaxService.get({
  160. url:'/other/findInvoice',
  161. data,
  162. isLoading: false ,
  163. })
  164. }
  165. /**
  166. *@确认订单-保存发票信息
  167. *@param userId 用户ID
  168. */
  169. UpdateInvoice (data = {}) {
  170. return this.AjaxService.post({
  171. url:'/other/invoice',
  172. data,
  173. isLoading: true ,
  174. })
  175. }
  176. /* 提交订单 orderId 订单ID */
  177. CreatedOrderSubmit (data = {}) {
  178. return this.AjaxService.post({
  179. url:'/order/submit',
  180. data,
  181. isLoading: true ,
  182. })
  183. }
  184. /* 订单支付,效验付款规则 orderId 订单ID */
  185. OrderPaymentValidation (data = {}) {
  186. return this.AjaxService.get({ url:'/order/paymentValidation', data, isLoading: false })
  187. }
  188. /* 余额抵扣 orderId 订单ID */
  189. OrderBalanceDeduction (data = {}) {
  190. return this.AjaxService.get({ url:'/order/balanceDeduction', data, isLoading: false })
  191. }
  192. /* 分享订单初始化查询 orderId 订单ID */
  193. OrderCommodityData (data = {}) {
  194. return this.AjaxService.get({ url:'/order/commodityData', data, isLoading: true })
  195. }
  196. /*二手订单 打款供应商 */
  197. confirmpayment (data = {}) {
  198. return this.AjaxService.post({ url:'/order/affirm/payment', data, isLoading: true })
  199. }
  200. }