diff --git a/src/components/site/order_modal/order_modal.vue b/src/components/site/order_modal/order_modal.vue index 7f365da..aca5f50 100644 --- a/src/components/site/order_modal/order_modal.vue +++ b/src/components/site/order_modal/order_modal.vue @@ -109,6 +109,7 @@ + 释放场地 订单详情 @@ -161,6 +162,38 @@ export default { this.getOrderInfo(); }, methods: { + releaseBtn(){ + util.showModal({ + title: '是否确认释放场地', + content: '释放场地仅是释放场地给其他人预订,如需退款请登录后台操作', + showCancel: true, + success: mRes =>{ + if(mRes.confirm)this.releaseReq(); + } + }) + }, + releaseReq(){ + util.showLoad(); + let { orderInfo } = this; + servers.get({ + url: API.venue.releaseVenue, + data: { + id: 0, // 后端:0就可以了 + brand_id: orderInfo.stadium_order.brand_id || '', + order_no: orderInfo.order_no || '' + }, + isDefaultGet: false, + }) + .then(res=>{ + util.hideLoad(); + if(res.data.code == 0){ + util.showNone(res.data.message || '操作成功!'); + setTimeout(_=>this.$emit('refresh'), 1200); + }else{ + util.showNone(res.data.message || '操作失败!'); + } + }) + }, fixedCancelOccupy: util.debounce(function(){ let { orderInfo, queryInfo } = this; util.showLoad(); diff --git a/src/js/api.js b/src/js/api.js index a531af7..555181e 100644 --- a/src/js/api.js +++ b/src/js/api.js @@ -105,6 +105,10 @@ API['venue'] = { // 20210806 FixedOccupyCancel: `${ORIGIN}/admin/VenueNumberFixedOccupy/cancel`, // 固定场取消订场 + // 20220921 + releaseVenue: `${ORIGIN}/admin/stadium/order/releaseVenue`, // 【1000995】释放场地 + + } // 2.1 核销