order.service.js 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. /**
  2. * 这是与购物有关的业务逻辑的服务
  3. */
  4. export default class OrderService {
  5. constructor(AjaxService) {
  6. Object.assign(this, { AjaxService })
  7. this.name = 'OrderService'
  8. }
  9. /* 查询订单列表 */
  10. QueryOrderList (data = {}) {
  11. return this.AjaxService.get({
  12. url:'/order/club/list',
  13. data,
  14. isLoading: false ,
  15. })
  16. }
  17. /* 查询订单详情 */
  18. QueryOrderDetails (data = {}) {
  19. return this.AjaxService.get({
  20. url:'/order/club/detail',
  21. data,
  22. isLoading: true ,
  23. })
  24. }
  25. /* 查询确认订单详情 */
  26. getShopOrderById (data = {}) {
  27. return this.AjaxService.get({
  28. url:'/order/club/getShopOrderById',
  29. data,
  30. isLoading: true ,
  31. })
  32. }
  33. /* 采购员下单的订单确认订单 */
  34. confirmShopOrder (data = {}) {
  35. return this.AjaxService.get({
  36. url:'/order/club/confirmShopOrder',
  37. data,
  38. isLoading: true ,
  39. })
  40. }
  41. /* 操作取消订单 */
  42. CancelOrder (data = {}) {
  43. return this.AjaxService.post({
  44. url:'/order/club/cancel',
  45. data,
  46. isLoading: true ,
  47. })
  48. }
  49. /* 操作删除订单 */
  50. DeleteOrder (data = {}) {
  51. return this.AjaxService.post({
  52. url:'/order/club/delete',
  53. data,
  54. isLoading: true ,
  55. })
  56. }
  57. /* 确认订单操作 */
  58. AffirmOrder (data = {}) {
  59. return this.AjaxService.post({
  60. url:'/order/club/confirm',
  61. data,
  62. isLoading: true ,
  63. })
  64. }
  65. /* 确认收货操作 */
  66. ConfirmReceipt (data = {}) {
  67. return this.AjaxService.post({
  68. url:'/order/club/receive',
  69. data,
  70. isLoading: true ,
  71. })
  72. }
  73. /* 订单物流信息 */
  74. QueryLogistics (data = {}) {
  75. return this.AjaxService.get({
  76. url:'/order/club/logistics',
  77. data,
  78. isLoading: true ,
  79. })
  80. }
  81. /**
  82. *获取订单分享码
  83. * @param orderID
  84. */
  85. QueryOrderShareCode (data = {}) {
  86. return this.AjaxService.get({
  87. url:'/order/club/share/code',
  88. data,
  89. isLoading: false ,
  90. })
  91. }
  92. /**
  93. *校验订单分享码
  94. * @param orderID
  95. */
  96. OrderShareCode (data = {}) {
  97. return this.AjaxService.get({
  98. url:'/order/club/share/code/check',
  99. data,
  100. isLoading: true,
  101. isStatus: true ,
  102. })
  103. }
  104. /**
  105. *订单分享权限初始化
  106. * @param orderID
  107. */
  108. OrderShareCodeIdentity (data = {}) {
  109. return this.AjaxService.get({
  110. url:'/order/club/share/code/identity',
  111. data,
  112. isLoading: false,
  113. isStatus: true ,
  114. })
  115. }
  116. /**
  117. *机构搜索订单
  118. *@param searchWord 关键词
  119. *@param userId 用户ID
  120. *@param pageNum 页码
  121. *@param pageSize 条数
  122. */
  123. SearchOrderInfo (data = {}) {
  124. return this.AjaxService.get({
  125. url:'/order/club/search',
  126. data,
  127. isLoading: true ,
  128. })
  129. }
  130. /**
  131. *搜索订单历史记录
  132. * @param orderID
  133. */
  134. SearchOrderHistory (data = {}) {
  135. return this.AjaxService.get({
  136. url:'/order/club/search/history',
  137. data,
  138. isLoading: false ,
  139. })
  140. }
  141. /**
  142. *清楚订单历史记录
  143. * @param orderID
  144. */
  145. ClearOrderHistory (data = {}) {
  146. return this.AjaxService.get({
  147. url:'/order/club/search/history/delete',
  148. data,
  149. isLoading: true ,
  150. })
  151. }
  152. /**
  153. *@机构-商品立即购买确认订单初始化数据
  154. *@param userId 用户ID
  155. *@param productCount 商品数量
  156. *@param productId 商品ID
  157. *@param source 来源
  158. */
  159. ProductCreateOrderInfo (data = {}) {
  160. return this.AjaxService.get({
  161. url:'/order/club/product/settlement',
  162. data,
  163. isLoading: true ,
  164. })
  165. }
  166. /**
  167. *@机构-购物车商品数量
  168. *@param userId 用户ID
  169. */
  170. ShoppingCartCount (data = {}) {
  171. return this.AjaxService.get({
  172. url:'/order/club/cart/organizeCount',
  173. data,
  174. isLoading: false ,
  175. })
  176. }
  177. /**
  178. *@机构-购物车去结算确认订单初始化数据
  179. *@param userId 用户ID
  180. *@param source 来源
  181. *@param productIds 商品IDs
  182. */
  183. CartCreateOrderInfo (data = {}) {
  184. return this.AjaxService.get({
  185. url:'/order/club/cart/settlement',
  186. data,
  187. isLoading: true ,
  188. })
  189. }
  190. /**
  191. *@确认订单-获取邮费信息
  192. *@param productIds 商品ID【”,”分割】
  193. *@param totalPrice 商品总额
  194. *@param userId 用户ID
  195. *@param townID 地址区ID
  196. */
  197. GetOrderPostage (data = {}) {
  198. return this.AjaxService.get({
  199. url:'/order/club/postage',
  200. data,
  201. isLoading: false ,
  202. })
  203. }
  204. /**
  205. *@确认订单-获取发票信息
  206. *@param userId 用户ID
  207. */
  208. GetFindInvoice (data = {}) {
  209. return this.AjaxService.get({
  210. url:'/order/club/invoice',
  211. data,
  212. isLoading: false ,
  213. })
  214. }
  215. /**
  216. *@确认订单-保存发票信息
  217. *@param userId 用户ID
  218. */
  219. updateOrganize (data = {}) {
  220. return this.AjaxService.post({
  221. url:'/order/club/invoice/updateOrganize',
  222. data,
  223. isLoading: true ,
  224. })
  225. }
  226. /* 提交订单 购买资质的验证 */
  227. createdOrderCerify (data = {}) {
  228. return this.AjaxService.post({
  229. url:'/order/submit/verify',
  230. data,
  231. isLoading: false ,
  232. })
  233. }
  234. /* 提交订单 orderId 订单ID */
  235. CreatedOrderSubmit (data = {}) {
  236. return this.AjaxService.post({
  237. url:'/order/submit/generate',
  238. data,
  239. isLoading: true ,
  240. })
  241. }
  242. /* 订单支付,效验付款规则 orderId 订单ID */
  243. OrderPaymentValidation (data = {}) {
  244. return this.AjaxService.get({
  245. url:'/order/pay/check',
  246. data,
  247. isLoading: false ,
  248. })
  249. }
  250. /* 余额抵扣 orderId 订单ID */
  251. OrderBalanceDeduction (data = {}) {
  252. return this.AjaxService.post({
  253. url:'/order/pay/balance/deduction',
  254. data,
  255. isLoading: false ,
  256. })
  257. }
  258. /* 分享订单初始化查询 orderId 订单ID */
  259. OrderCommodityData (data = {}) {
  260. return this.AjaxService.get({
  261. url:'/order/club/share/product',
  262. data,
  263. isLoading: true ,
  264. })
  265. }
  266. /*二手订单 打款供应商 */
  267. confirmpayment (data = {}) {
  268. return this.AjaxService.post({
  269. url:'/order/club/second/payment/confirm',
  270. data,
  271. isLoading: true ,
  272. })
  273. }
  274. /**
  275. * @组合商品多商品立即购买
  276. * @param:userId 用户ID(必填)
  277. * @param:productInfo 用户ID(必填)
  278. * @param:source 来源 1 WWW 2 小程序
  279. */
  280. OrderClubProductSupporting (data = {}) {
  281. return this.AjaxService.get({
  282. url:'/order/club/product/buynow',
  283. data,
  284. isLoading: true ,
  285. })
  286. }
  287. /**
  288. * @机构个人中心订单状态数量
  289. * @param:userId 用户ID(必填)
  290. */
  291. UserClubOrderCount (data = {}) {
  292. return this.AjaxService.get({
  293. url:'/order/club/count',
  294. data,
  295. isLoading: false ,
  296. })
  297. }
  298. /**
  299. * @订单保存支付凭证
  300. * @param:userId 用户ID(必填)
  301. */
  302. orderInsertVoucher (data = {}) {
  303. return this.AjaxService.post({
  304. url:'/order/club//insertVoucher',
  305. data,
  306. isLoading: false ,
  307. })
  308. }
  309. }