|
|
@ -5,7 +5,8 @@ |
|
|
|
<image class="om-close" @click="modalClose" mode="aspectFit" src="/static/images/icon/x_close.png"></image> |
|
|
|
<view class="om-name-line"> |
|
|
|
<view class="onl-view">{{ orderInfo.stadium_name || '-' }}</view> |
|
|
|
<!-- <view class="onl-view">待使用</view> --> |
|
|
|
<!-- 0、1、2、8 --> |
|
|
|
<view class="onl-view" v-if="isShowStatus">{{ getStatusTxt(orderInfo.pay_status) }}</view> |
|
|
|
</view> |
|
|
|
<view class="om-info-line"> |
|
|
|
<view class="oil-view">订单编号:</view> |
|
|
@ -85,26 +86,26 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="om-total" v-if="orderInfo.type != 'take_up_venue'" >实付款 ¥{{ orderInfo.amount || '0' }}</view> |
|
|
|
<view class="om-total" v-if="isShowTotalAmoutn" >实付款 ¥{{ orderInfo.amount || '0' }}</view> |
|
|
|
<!-- 管理员占用 --> |
|
|
|
<view class="om-btns" v-if="orderInfo.type == 'take_up_venue'"> |
|
|
|
<view class="ob-view">分享给朋友</view> |
|
|
|
<view class="ob-view" @click="toShare">分享给朋友</view> |
|
|
|
<view class="ob-view red" @click="cancelOccupy">取消占用</view> |
|
|
|
</view> |
|
|
|
<!-- 小程序预定 --> |
|
|
|
<view class="om-btns" v-if="orderInfo.type == 'mini_program'"> |
|
|
|
<view class="ob-view">订单详情</view> |
|
|
|
<view class="ob-view red">退款</view> |
|
|
|
<view class="ob-view" @click="toOrderInfo">订单详情</view> |
|
|
|
<view class="ob-view red" @click="refundBtn">退款</view> |
|
|
|
</view> |
|
|
|
<!-- 课程预定 --> |
|
|
|
<view class="om-btns" v-if="orderInfo.type == 'course_venue'"> |
|
|
|
<view class="ob-view">约课详情</view> |
|
|
|
<view class="ob-view" @click="toCouseInfo">约课详情</view> |
|
|
|
</view> |
|
|
|
<!-- 固定场 --> |
|
|
|
<view class="om-btns" v-if="orderInfo.type == 'fixed_venue'"> |
|
|
|
<view class="ob-view red">取消订场</view> |
|
|
|
<view class="ob-view">订单详情</view> |
|
|
|
<view class="ob-view red">退款</view> |
|
|
|
<view class="ob-view" @click="toOrderInfo">订单详情</view> |
|
|
|
<view class="ob-view red" @click="cancelOccupy">取消订场</view> |
|
|
|
<!-- <view class="ob-view red">退款</view> --> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -116,6 +117,19 @@ import { API } from '../../../js/api' |
|
|
|
import { servers } from '../../../js/server' |
|
|
|
import util from '../../../utils/util' |
|
|
|
export default { |
|
|
|
computed: { |
|
|
|
// 是否显示使用状态 |
|
|
|
isShowStatus(){ |
|
|
|
let { orderInfo } = this; |
|
|
|
return orderInfo.type == 'mini_program' || orderInfo.type == 'fixed_venue' |
|
|
|
}, |
|
|
|
|
|
|
|
isShowTotalAmoutn(){ |
|
|
|
let { orderInfo } = this; |
|
|
|
|
|
|
|
return orderInfo.type == 'mini_program' || orderInfo.type == 'course_venue' || orderInfo.type == 'fixed_venue' |
|
|
|
} |
|
|
|
}, |
|
|
|
props: { |
|
|
|
queryInfo: { |
|
|
|
type: Object, |
|
|
@ -132,6 +146,55 @@ export default { |
|
|
|
this.getOrderInfo(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
toCouseInfo(){ |
|
|
|
util.showNone('待开放') |
|
|
|
}, |
|
|
|
refundBtn: util.debounce(function(){ |
|
|
|
let { orderInfo, queryInfo } = this; |
|
|
|
servers.post({ |
|
|
|
url: API.venue.orderRefund, |
|
|
|
data: { |
|
|
|
brand_id: queryInfo.brand_id, |
|
|
|
order_no: orderInfo.order_no, |
|
|
|
}, |
|
|
|
isDefaultGet: false, |
|
|
|
}) |
|
|
|
.then(res=>{ |
|
|
|
if(res.data.code == 0){ |
|
|
|
util.showNone(res.data.message || '操作成功!'); |
|
|
|
setTimeout(_=>this.$emit('refresh'), 1200); |
|
|
|
}else{ |
|
|
|
util.showNone(res.data.message || '操作失败!'); |
|
|
|
} |
|
|
|
}) |
|
|
|
}, 300, true), |
|
|
|
toOrderInfo(){ |
|
|
|
let { orderInfo, queryInfo } = this; |
|
|
|
let _query = {} |
|
|
|
_query["stadium_id"] = queryInfo.stadium_id |
|
|
|
_query["order_no"] = orderInfo.order_no |
|
|
|
_query["order_type"] = 3 |
|
|
|
util.routeTo(`/subpackage/device/pages/order_details/order_details?query=${util.jsonStr(_query)}`,'nT'); |
|
|
|
}, |
|
|
|
toShare(){ |
|
|
|
let { orderInfo, queryInfo } = this; |
|
|
|
let _qyStr = `?brand_id=${queryInfo.brand_id}&order_no=${orderInfo.order_no}` |
|
|
|
util.routeTo(`/pages/site/occupy_share/occupy_share${_qyStr}`, 'nT'); |
|
|
|
}, |
|
|
|
|
|
|
|
getStatusTxt(status){ |
|
|
|
switch(status){ |
|
|
|
case 0: |
|
|
|
return '待扣款' |
|
|
|
case 1: |
|
|
|
return '使用中' |
|
|
|
case 2: |
|
|
|
return '已完成' |
|
|
|
case 8: |
|
|
|
return '使用中' |
|
|
|
default: return '-' |
|
|
|
} |
|
|
|
}, |
|
|
|
getTitle(type){ |
|
|
|
switch(type){ |
|
|
|
case 'no_price_venue': |
|
|
@ -144,13 +207,11 @@ export default { |
|
|
|
return '管理员占用' |
|
|
|
case 'course_venue': |
|
|
|
return '课程预定' |
|
|
|
case 'pay_venue': |
|
|
|
case 'play_venue': |
|
|
|
return '约玩占用' |
|
|
|
case 'fixed_venue': |
|
|
|
return '固定场锁定' |
|
|
|
default: return '-' |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
cancelOccupy: util.debounce(function(){ |
|
|
@ -165,7 +226,7 @@ export default { |
|
|
|
}) |
|
|
|
.then(res=>{ |
|
|
|
if(res.data.code == 0){ |
|
|
|
this.$emit('refresh'); |
|
|
|
setTimeout(_=>this.$emit('refresh'), 1200); |
|
|
|
util.showNone(res.data.message || '操作成功!'); |
|
|
|
}else{ |
|
|
|
util.showNone(res.data.message || '操作失败!'); |
|
|
|