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