Browse Source

add release btn 1000995

tags/v1.1.30
刘嘉炜 2 years ago
parent
commit
6593f0c4bc
  1. 33
      src/components/site/order_modal/order_modal.vue
  2. 4
      src/js/api.js

33
src/components/site/order_modal/order_modal.vue

@ -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();

4
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 核销

Loading…
Cancel
Save