|
|
@ -24,7 +24,7 @@ |
|
|
|
<view>预定场次:</view> |
|
|
|
<view> |
|
|
|
<block v-for="(e, i) in occupyInfo.venueList" :key="i"> |
|
|
|
<view>{{e.parentObj.venue_name || '-'}} {{e.durations || '-'}} (¥{{e.price || '-'}})</view> |
|
|
|
<view>{{e.venue_name || '-'}} {{e.duration || '-'}} (¥{{e.price || '-'}})</view> |
|
|
|
</block> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -34,13 +34,20 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="sc-switch"> |
|
|
|
<view><view><text>*</text>是否联动开灯</view><switch @change="switchChange" color="#009874"></switch></view> |
|
|
|
<view> |
|
|
|
<view><text>*</text>是否联动开灯</view> |
|
|
|
<switch |
|
|
|
:disabled="isOrder" |
|
|
|
v-model="light_up" |
|
|
|
color="#009874" |
|
|
|
></switch> |
|
|
|
</view> |
|
|
|
<view>联动开灯开启后,会根据占用时间自动开灯</view> |
|
|
|
</view> |
|
|
|
<view class="sc-ipt"> |
|
|
|
<view class="si-price"> |
|
|
|
<view class="si-tit"><text>* </text>收取金额</view> |
|
|
|
<view class="sp-frame"><text>¥</text><input v-model="ocPrice" type="digit" /></view> |
|
|
|
<view class="sp-frame"><text>¥</text><input :disabled="isOrder" v-model="ocPrice" type="digit" /></view> |
|
|
|
</view> |
|
|
|
<view class="si-usage"> |
|
|
|
<view class="su-line"> |
|
|
@ -52,19 +59,6 @@ |
|
|
|
<image v-if="e.type == ocUsage" mode="aspectFit" src='/static/images/icon/selected_tag.png'></image> |
|
|
|
</view> |
|
|
|
</block> |
|
|
|
<!-- <view :class="[ocUsage == 1 ? 'active' : '']" @click="ocUsage = 1"> |
|
|
|
<text>客户订场</text> |
|
|
|
<image v-if="ocUsage == 1" mode="aspectFit" src='/static/images/icon/selected_tag.png'></image> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view :class="[ocUsage == 2 ? 'active' : '']" @click="ocUsage = 2"> |
|
|
|
<text>散客</text> |
|
|
|
<image v-if="ocUsage == 2" mode="aspectFit" src='/static/images/icon/selected_tag.png'></image> |
|
|
|
</view> |
|
|
|
<view :class="[ocUsage == 3 ? 'active' : '']" @click="ocUsage = 3"> |
|
|
|
<text>锁场</text> |
|
|
|
<image v-if="ocUsage == 3" mode="aspectFit" src='/static/images/icon/selected_tag.png'></image> |
|
|
|
</view> --> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="su-tip">注:占用用途如选择“散客”,用户端次卡列表将会显示该占用场次为散客时间</view> |
|
|
@ -72,7 +66,7 @@ |
|
|
|
<view class="si-reason"> |
|
|
|
<view class="si-tit">占用原因</view> |
|
|
|
<view class="sr-frame"> |
|
|
|
<textarea placeholder="多行输入…" v-model="ocReaon"></textarea> |
|
|
|
<textarea :disabled="isOrder" placeholder="多行输入…" v-model="ocReaon"></textarea> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -101,14 +95,17 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
isOrder(){ |
|
|
|
return !!this?.occupyInfo?.orderInfo?.order_no; |
|
|
|
}, |
|
|
|
...mapState([ 'occupyInfo' ]), |
|
|
|
totalPrice(){ |
|
|
|
let { occupyInfo } = this; |
|
|
|
if(occupyInfo?.orderInfo?.amount)return occupyInfo.orderInfo.amount; |
|
|
|
let _list = occupyInfo.venueList || []; |
|
|
|
if(!_list.length)return 0; |
|
|
|
let _price = 0; |
|
|
|
_list.forEach(e=>_price += +e.price); |
|
|
|
console.warn(_price) |
|
|
|
return _price.toFixed(2); |
|
|
|
} |
|
|
|
}, |
|
|
@ -116,8 +113,8 @@ export default { |
|
|
|
console.log(this.occupyInfo) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
switchChange(e){ |
|
|
|
this.light_up = e.detail.value |
|
|
|
initOrderPage(){ |
|
|
|
let { occupyInfo, isOrder }= this; |
|
|
|
}, |
|
|
|
confirmOccupy: util.debounce(function(){ |
|
|
|
let { storeInfo, dateInfo, venueList, typeInfo} = this.occupyInfo; |
|
|
@ -132,14 +129,7 @@ export default { |
|
|
|
group: storeInfo.id, |
|
|
|
date: dateInfo.dateStr, |
|
|
|
take_up_use: ocUsage, |
|
|
|
items: venueList.map(el=>{ |
|
|
|
return { |
|
|
|
venue_id: el.parentObj.venue_id, |
|
|
|
venue_name: el.parentObj.venue_name, |
|
|
|
duration: el.durations, |
|
|
|
price: el.price, |
|
|
|
} |
|
|
|
}), |
|
|
|
items: venueList, |
|
|
|
light_up, |
|
|
|
}, |
|
|
|
isDefaultGet: false |
|
|
@ -152,13 +142,6 @@ export default { |
|
|
|
let _res = res.data.data || {}; |
|
|
|
let _qrStr = `?brand_id=${_res.brand_id}&order_no=${_res.order_no}` |
|
|
|
util.routeTo(`/pages/site/occupy_success/occupy_success${_qrStr}`, 'rT'); |
|
|
|
// setTimeout(_=>{ |
|
|
|
// util.routeTo(); |
|
|
|
// util.previousPageFunction({ // 刷新占用列表 |
|
|
|
// fnName: 'refreshList', |
|
|
|
// query: null |
|
|
|
// }) |
|
|
|
// }, 1200) |
|
|
|
}else{ |
|
|
|
util.showNone(res.data.message || '操作失败!'); |
|
|
|
} |
|
|
|