|
|
|
|
@ -48,7 +48,7 @@
|
|
|
|
|
|
|
|
|
|
<view class="book-box-timerow">
|
|
|
|
|
<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)">
|
|
|
|
|
<view class="book-box-row-timeitem-status" v-if="item.checked">
|
|
|
|
|
<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">
|
|
|
|
|
{{item.remain_count}}张
|
|
|
|
|
</view>
|
|
|
|
|
<view class="book-box-row-timeitem-txt" v-else>不可预约</view>
|
|
|
|
|
<view class="book-box-row-timeitem-txt" v-else>已约满</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
@ -1001,6 +1001,7 @@
|
|
|
|
|
},
|
|
|
|
|
loadDefaultTime(rules) {
|
|
|
|
|
var that = this;
|
|
|
|
|
var nt = new Date();
|
|
|
|
|
that.currentTime = {};
|
|
|
|
|
let isDefault = false;
|
|
|
|
|
for (var mod of rules) {
|
|
|
|
|
@ -1012,7 +1013,11 @@
|
|
|
|
|
that.currentTime = that.bcurrentTime;
|
|
|
|
|
}
|
|
|
|
|
} 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;
|
|
|
|
|
mod.checked = true;
|
|
|
|
|
that.currentTime = mod;
|
|
|
|
|
|