|
|
@ -109,6 +109,7 @@ |
|
|
|
</view> |
|
|
|
<!-- 小程序预定 --> |
|
|
|
<view class="om-btns" v-if="orderInfo.type == 'mini_program'"> |
|
|
|
<view class="ob-view red" @click="releaseBtn" v-if="orderInfo.pay_status == 1">释放场地</view> |
|
|
|
<view class="ob-view" @click="toOrderInfo">订单详情</view> |
|
|
|
<!-- <view class="ob-view red" @click="refundBtn">退款</view> --> |
|
|
|
</view> |
|
|
@ -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(); |
|
|
|