123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336 |
- /**
- * 这是与购物有关的业务逻辑的服务
- */
- export default class OrderService {
- constructor(AjaxService) {
- Object.assign(this, { AjaxService })
- this.name = 'OrderService'
- }
- /* 查询订单列表 */
- QueryOrderList (data = {}) {
- return this.AjaxService.get({
- url:'/order/club/list',
- data,
- isLoading: false ,
- })
- }
- /* 查询订单详情 */
- QueryOrderDetails (data = {}) {
- return this.AjaxService.get({
- url:'/order/club/detail',
- data,
- isLoading: true ,
-
- })
- }
- /* 查询确认订单详情 */
- getShopOrderById (data = {}) {
- return this.AjaxService.get({
- url:'/order/club/getShopOrderById',
- data,
- isLoading: true ,
-
- })
- }
- /* 采购员下单的订单确认订单 */
- confirmShopOrder (data = {}) {
- return this.AjaxService.get({
- url:'/order/club/confirmShopOrder',
- data,
- isLoading: true ,
- })
- }
- /* 操作取消订单 */
- CancelOrder (data = {}) {
- return this.AjaxService.post({
- url:'/order/club/cancel',
- data,
- isLoading: true ,
-
- })
- }
- /* 操作删除订单 */
- DeleteOrder (data = {}) {
- return this.AjaxService.post({
- url:'/order/club/delete',
- data,
- isLoading: true ,
-
- })
- }
- /* 确认订单操作 */
- AffirmOrder (data = {}) {
- return this.AjaxService.post({
- url:'/order/club/confirm',
- data,
- isLoading: true ,
-
- })
- }
- /* 确认收货操作 */
- ConfirmReceipt (data = {}) {
- return this.AjaxService.post({
- url:'/order/club/receive',
- data,
- isLoading: true ,
-
- })
- }
- /* 订单物流信息 */
- QueryLogistics (data = {}) {
- return this.AjaxService.get({
- url:'/order/club/logistics',
- data,
- isLoading: true ,
-
- })
- }
- /**
- *获取订单分享码
- * @param orderID
- */
- QueryOrderShareCode (data = {}) {
- return this.AjaxService.get({
- url:'/order/club/share/code',
- data,
- isLoading: false ,
-
- })
- }
- /**
- *校验订单分享码
- * @param orderID
- */
- OrderShareCode (data = {}) {
- return this.AjaxService.get({
- url:'/order/club/share/code/check',
- data,
- isLoading: true,
- isStatus: true ,
-
- })
- }
- /**
- *订单分享权限初始化
- * @param orderID
- */
- OrderShareCodeIdentity (data = {}) {
- return this.AjaxService.get({
- url:'/order/club/share/code/identity',
- data,
- isLoading: false,
- isStatus: true ,
- })
- }
- /**
- *机构搜索订单
- *@param searchWord 关键词
- *@param userId 用户ID
- *@param pageNum 页码
- *@param pageSize 条数
- */
- SearchOrderInfo (data = {}) {
- return this.AjaxService.get({
- url:'/order/club/search',
- data,
- isLoading: true ,
-
- })
- }
- /**
- *搜索订单历史记录
- * @param orderID
- */
- SearchOrderHistory (data = {}) {
- return this.AjaxService.get({
- url:'/order/club/search/history',
- data,
- isLoading: false ,
-
- })
- }
- /**
- *清楚订单历史记录
- * @param orderID
- */
- ClearOrderHistory (data = {}) {
- return this.AjaxService.get({
- url:'/order/club/search/history/delete',
- data,
- isLoading: true ,
-
- })
- }
- /**
- *@机构-商品立即购买确认订单初始化数据
- *@param userId 用户ID
- *@param productCount 商品数量
- *@param productId 商品ID
- *@param source 来源
- */
- ProductCreateOrderInfo (data = {}) {
- return this.AjaxService.get({
- url:'/order/club/product/settlement',
- data,
- isLoading: true ,
-
- })
- }
- /**
- *@机构-购物车商品数量
- *@param userId 用户ID
- */
- ShoppingCartCount (data = {}) {
- return this.AjaxService.get({
- url:'/order/club/cart/organizeCount',
- data,
- isLoading: false ,
-
- })
- }
- /**
- *@机构-购物车去结算确认订单初始化数据
- *@param userId 用户ID
- *@param source 来源
- *@param productIds 商品IDs
- */
- CartCreateOrderInfo (data = {}) {
- return this.AjaxService.get({
- url:'/order/club/cart/settlement',
- data,
- isLoading: true ,
-
- })
- }
- /**
- *@确认订单-获取邮费信息
- *@param productIds 商品ID【”,”分割】
- *@param totalPrice 商品总额
- *@param userId 用户ID
- *@param townID 地址区ID
- */
- GetOrderPostage (data = {}) {
- return this.AjaxService.get({
- url:'/order/club/postage',
- data,
- isLoading: false ,
-
- })
- }
- /**
- *@确认订单-获取发票信息
- *@param userId 用户ID
- */
- GetFindInvoice (data = {}) {
- return this.AjaxService.get({
- url:'/order/club/invoice',
- data,
- isLoading: false ,
-
- })
- }
- /**
- *@确认订单-保存发票信息
- *@param userId 用户ID
- */
- updateOrganize (data = {}) {
- return this.AjaxService.post({
- url:'/order/club/invoice/updateOrganize',
- data,
- isLoading: true ,
-
- })
- }
- /* 提交订单 购买资质的验证 */
- createdOrderCerify (data = {}) {
- return this.AjaxService.post({
- url:'/order/submit/verify',
- data,
- isLoading: false ,
-
- })
- }
- /* 提交订单 orderId 订单ID */
- CreatedOrderSubmit (data = {}) {
- return this.AjaxService.post({
- url:'/order/submit/generate',
- data,
- isLoading: true ,
-
- })
- }
- /* 订单支付,效验付款规则 orderId 订单ID */
- OrderPaymentValidation (data = {}) {
- return this.AjaxService.get({
- url:'/order/pay/check',
- data,
- isLoading: false ,
-
- })
- }
- /* 余额抵扣 orderId 订单ID */
- OrderBalanceDeduction (data = {}) {
- return this.AjaxService.post({
- url:'/order/pay/balance/deduction',
- data,
- isLoading: false ,
-
- })
- }
- /* 分享订单初始化查询 orderId 订单ID */
- OrderCommodityData (data = {}) {
- return this.AjaxService.get({
- url:'/order/club/share/product',
- data,
- isLoading: true ,
-
- })
- }
- /*二手订单 打款供应商 */
- confirmpayment (data = {}) {
- return this.AjaxService.post({
- url:'/order/club/second/payment/confirm',
- data,
- isLoading: true ,
-
- })
- }
- /**
- * @组合商品多商品立即购买
- * @param:userId 用户ID(必填)
- * @param:productInfo 用户ID(必填)
- * @param:source 来源 1 WWW 2 小程序
- */
- OrderClubProductSupporting (data = {}) {
- return this.AjaxService.get({
- url:'/order/club/product/buynow',
- data,
- isLoading: true ,
-
- })
- }
- /**
- * @机构个人中心订单状态数量
- * @param:userId 用户ID(必填)
- */
- UserClubOrderCount (data = {}) {
- return this.AjaxService.get({
- url:'/order/club/count',
- data,
- isLoading: false ,
-
- })
- }
- /**
- * @订单保存支付凭证
- * @param:userId 用户ID(必填)
- */
- orderInsertVoucher (data = {}) {
- return this.AjaxService.post({
- url:'/order/club//insertVoucher',
- data,
- isLoading: false ,
-
- })
- }
- }
|