刘翔宇-旅管家 3 years ago
parent 0fa8f492ae
commit cc53604f84

@ -91,7 +91,7 @@
<view class="book-box-row-timeitem-txt" v-if="item.remain_count>0"> <view class="book-box-row-timeitem-txt" v-if="item.remain_count>0">
{{item.remain_count}} {{item.remain_count}}
</view> </view>
<view class="book-box-row-timeitem-txt" v-else></view> <view class="book-box-row-timeitem-txt" v-else></view>
</block> </block>
<block v-else> <block v-else>
<view class="book-box-row-timeitem-txt" >不可预约</view> <view class="book-box-row-timeitem-txt" >不可预约</view>
@ -301,7 +301,7 @@
return false return false
} }
if (mod.remain_count == 0) { if (mod.remain_count == 0) {
this.util.toast("该时段已不可预约"); this.util.toast("该时段已满了");
return false return false
} }
for (var m of this.currentDate.rules) { for (var m of this.currentDate.rules) {

@ -8,7 +8,7 @@
<u--form labelPosition="top" labelWidth="120px" :model="form" ref="form"> <u--form labelPosition="top" labelWidth="120px" :model="form" ref="form">
<u-form-item label="预约入场时间" labelPosition="top" borderBottom> <u-form-item label="预约入场时间" labelPosition="top" borderBottom>
<view @click="handleSelectTime" style="color: #EF9525;font-size: 24rpx;"> <view style="color: #EF9525;font-size: 24rpx;">
{{(form.time?$u.timeFormat(_formTime, 'yyyy年mm月dd日 hh:MM'):'请选择入场时间>')}} {{(form.time?$u.timeFormat(_formTime, 'yyyy年mm月dd日 hh:MM'):'请选择入场时间>')}}
</view> </view>
<u-datetime-picker :show="showSelecttime" closeOnClickOverlay @close="cancelTime" <u-datetime-picker :show="showSelecttime" closeOnClickOverlay @close="cancelTime"

@ -64,6 +64,15 @@
<text>残疾人车位{{remain_special_park}}</text> <text>残疾人车位{{remain_special_park}}</text>
</view> </view>
</view> </view>
<view class="parkbox-item flex-row align-center" style=""
v-if="remain_special_park<=0&&remain_big_park<=0&&remain_small_park<=0">
<text class="iconfont icon-tingchechang1" style="font-size: 28rpx;"></text>
<view>
<text>暂无可选停车位</text>
</view>
</view>
</view> </view>
</view> </view>
@ -140,7 +149,7 @@
distance: 0, distance: 0,
info: {}, info: {},
covers: [], covers: [],
currentPark: 1, currentPark: 0,
btnDisabled: false, btnDisabled: false,
showSelectorder: false, showSelectorder: false,
listOrder: [], listOrder: [],
@ -154,7 +163,7 @@
}, },
remain_big_park: 0, remain_big_park: 0,
remain_small_park: 0, remain_small_park: 0,
remain_special_park:0 remain_special_park: 0
} }
}, },
onLoad() { onLoad() {
@ -309,6 +318,9 @@
if (this.selectInfo.orderid === 0) { if (this.selectInfo.orderid === 0) {
this.util.toast("请选择预约的活动或者预约的参观"); this.util.toast("请选择预约的活动或者预约的参观");
return false; return false;
} else if (this.currentPark === 0) {
this.util.toast("请选择停车位");
return false;
} else { } else {
var json = escape(JSON.stringify(this.selectInfo)); var json = escape(JSON.stringify(this.selectInfo));
uni.navigateTo({ uni.navigateTo({

@ -48,7 +48,7 @@
<view class="book-box-timerow"> <view class="book-box-timerow">
<view class="book-box-row-timeitem" v-for="(item,index) in currentDate.rules" <view class="book-box-row-timeitem" v-for="(item,index) in currentDate.rules"
:class="{'book-box-row-timeitem-on':item.checked,'timeitem-none':item.remain_count==0}" :class="{'book-box-row-timeitem-on':item.checked,'timeitem-none':item.remain_count==0,'timeitem-none':item.isCanbook==false}"
:key="index" @click="handleSelectTime(index)"> :key="index" @click="handleSelectTime(index)">
<view class="book-box-row-timeitem-status" v-if="item.checked"> <view class="book-box-row-timeitem-status" v-if="item.checked">
<u-icon name="checkmark" color="#fff" size="20rpx"></u-icon> <u-icon name="checkmark" color="#fff" size="20rpx"></u-icon>
@ -57,7 +57,7 @@
<view class="book-box-row-timeitem-txt" v-if="item.remain_count>0"> <view class="book-box-row-timeitem-txt" v-if="item.remain_count>0">
{{item.remain_count}} {{item.remain_count}}
</view> </view>
<view class="book-box-row-timeitem-txt" v-else></view> <view class="book-box-row-timeitem-txt" v-else></view>
</view> </view>
</view> </view>
</view> </view>
@ -1001,6 +1001,7 @@
}, },
loadDefaultTime(rules) { loadDefaultTime(rules) {
var that = this; var that = this;
var nt = new Date();
that.currentTime = {}; that.currentTime = {};
let isDefault = false; let isDefault = false;
for (var mod of rules) { for (var mod of rules) {
@ -1012,7 +1013,11 @@
that.currentTime = that.bcurrentTime; that.currentTime = that.bcurrentTime;
} }
} else { } else {
if (!isDefault && mod.remain_count > 0) {
mod.endtime = that.currentDate.date + " " + mod.end_time;
var isCanbook = that.$moment(nt).isBefore(mod.endtime);
mod.isCanbook = isCanbook;
if (!isDefault && mod.remain_count > 0 && isCanbook) {
isDefault = true; isDefault = true;
mod.checked = true; mod.checked = true;
that.currentTime = mod; that.currentTime = mod;

Loading…
Cancel
Save