|
|
@ -1,7 +1,7 @@ |
|
|
|
<template> |
|
|
|
<view class="fixed-mask" @click="modalClose"> |
|
|
|
<view class="order-modal" @click.stop="_=>false"> |
|
|
|
<view class="om-title">{{ queryInfo.venueInfo.zh_text || '-' }}</view> |
|
|
|
<view class="om-title">{{ getTitle(queryInfo.venueInfo.type) }}</view> |
|
|
|
<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> |
|
|
@ -13,25 +13,53 @@ |
|
|
|
<view class="ov-view">{{ orderInfo.order_no || '-' }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="om-info-line"> |
|
|
|
<view class="om-info-line" v-if="orderInfo.type != 'take_up_venue'"> |
|
|
|
<view class="oil-view">创建时间:</view> |
|
|
|
<view class="oil-view"> |
|
|
|
<view class="ov-view">{{ orderInfo.create_at || '-' }}</view> |
|
|
|
<view class="ov-view">{{ orderInfo.created_at || '-' }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="om-info-line"> |
|
|
|
<view class="oil-view">手机号码:</view> |
|
|
|
<view class="om-info-line" v-if="orderInfo.type != 'take_up_venue'"> |
|
|
|
<view class="oil-view">验证码:</view> |
|
|
|
<view class="oil-view"> |
|
|
|
<view class="ov-view">{{ orderInfo.phone || '-' }}</view> |
|
|
|
<view class="ov-view">{{ orderInfo.verifyt_code || '-' }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="om-info-line"> |
|
|
|
<view class="oil-view">验证码:</view> |
|
|
|
<view class="om-info-line" v-if="orderInfo.type == 'mini_program'"> |
|
|
|
<view class="oil-view">手机号码:</view> |
|
|
|
<view class="oil-view"> |
|
|
|
<view class="ov-view">{{ orderInfo.verify_code || '-' }}</view> |
|
|
|
<view class="ov-view">{{ orderInfo.mobile || '-' }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<block v-if="orderInfo.type == 'take_up_venue'" > |
|
|
|
<view class="om-info-line"> |
|
|
|
<view class="oil-view">是否联动开灯:</view> |
|
|
|
<view class="oil-view"> |
|
|
|
<view class="ov-view">{{ orderInfo.light_up?'是':'否'}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="om-info-line"> |
|
|
|
<view class="oil-view">收取金额:</view> |
|
|
|
<view class="oil-view"> |
|
|
|
<view class="ov-view">{{ orderInfo.amount || '0' }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="om-info-line"> |
|
|
|
<view class="oil-view">占用原因:</view> |
|
|
|
<view class="oil-view"> |
|
|
|
<view class="ov-view">{{ orderInfo.reason || '-' }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="om-info-line"> |
|
|
|
<view class="oil-view">操作人:</view> |
|
|
|
<view class="oil-view"> |
|
|
|
<view class="ov-view">{{ orderInfo.operator || '-' }}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</block> |
|
|
|
|
|
|
|
|
|
|
|
<view class="om-border"></view> |
|
|
|
|
|
|
|
<view class="om-name-line"> |
|
|
@ -57,10 +85,26 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="om-total">实付款 ¥{{ orderInfo.amount || '0' }}</view> |
|
|
|
<view class="om-btns" v-if="false"> |
|
|
|
<view class="om-total" v-if="orderInfo.type != 'take_up_venue'" >实付款 ¥{{ orderInfo.amount || '0' }}</view> |
|
|
|
<!-- 管理员占用 --> |
|
|
|
<view class="om-btns" v-if="orderInfo.type == 'take_up_venue'"> |
|
|
|
<view class="ob-view">分享给朋友</view> |
|
|
|
<view class="ob-view">取消占用</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> |
|
|
|
<!-- 课程预定 --> |
|
|
|
<view class="om-btns" v-if="orderInfo.type == 'course_venue'"> |
|
|
|
<view class="ob-view">约课详情</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> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -88,14 +132,61 @@ export default { |
|
|
|
this.getOrderInfo(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getTitle(type){ |
|
|
|
switch(type){ |
|
|
|
case 'no_price_venue': |
|
|
|
return '无法订场' |
|
|
|
case 'empty_venue': |
|
|
|
return '-' |
|
|
|
case 'mini_program': |
|
|
|
return '小程序订场' |
|
|
|
case 'take_up_venue': |
|
|
|
return '管理员占用' |
|
|
|
case 'course_venue': |
|
|
|
return '课程预定' |
|
|
|
case 'pay_venue': |
|
|
|
return '约玩占用' |
|
|
|
case 'fixed_venue': |
|
|
|
return '固定场锁定' |
|
|
|
default: return '-' |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
cancelOccupy: util.debounce(function(){ |
|
|
|
let { orderInfo, queryInfo } = this; |
|
|
|
servers.get({ |
|
|
|
url: API.venue.takeUpCancel, |
|
|
|
data: { |
|
|
|
brand_id: queryInfo.brand_id, |
|
|
|
order_no: orderInfo.order_no, |
|
|
|
}, |
|
|
|
isDefaultGet: false, |
|
|
|
}) |
|
|
|
.then(res=>{ |
|
|
|
if(res.data.code == 0){ |
|
|
|
this.$emit('refresh'); |
|
|
|
util.showNone(res.data.message || '操作成功!'); |
|
|
|
}else{ |
|
|
|
util.showNone(res.data.message || '操作失败!'); |
|
|
|
} |
|
|
|
}) |
|
|
|
}, 300, true), |
|
|
|
modalClose(){ |
|
|
|
this.$emit('close'); |
|
|
|
}, |
|
|
|
getOrderInfo(){ |
|
|
|
util.showLoad(); |
|
|
|
servers.get({ |
|
|
|
let { queryInfo } = this; |
|
|
|
servers.post({ |
|
|
|
url: API.venue.dashboardInfo, |
|
|
|
data: this.queryInfo, |
|
|
|
data: { |
|
|
|
brand_id: queryInfo.brand_id, |
|
|
|
stadium_id: queryInfo.stadium_id, |
|
|
|
venue_id: queryInfo.venue_id, |
|
|
|
date: queryInfo.date, |
|
|
|
duration: queryInfo.duration, |
|
|
|
}, |
|
|
|
isDefaultGet: false, |
|
|
|
}) |
|
|
|
.then(res=>{ |
|
|
@ -212,6 +303,7 @@ export default { |
|
|
|
color: #1a1a1a; |
|
|
|
} |
|
|
|
.om-btns{ |
|
|
|
margin-top: 40upx; |
|
|
|
margin-bottom: 10upx; |
|
|
|
@include centerFlex(flex-end); |
|
|
|
.ob-view{ |
|
|
@ -225,6 +317,10 @@ export default { |
|
|
|
font-size: 32upx; |
|
|
|
font-weight: 500; |
|
|
|
color: $themeColor; |
|
|
|
&.red{ |
|
|
|
border-color: #EA5061; |
|
|
|
color: #EA5061; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |