刘翔宇-旅管家 4 years ago
parent ef936a7eca
commit efd0c3fc05

@ -75,12 +75,13 @@
<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}" :key="index" @click="handleSelectTime(index)">
:class="{'book-box-row-timeitem-on':item.checked}" :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>
</view>
<view class="book-box-row-timeitem-txt">{{item.start_time+'-'+item.end_time}}</view>
<view class="book-box-row-timeitem-txt">{{item.total}}</view>
<view class="book-box-row-timeitem-txt">{{item.remain_count}}</view>
</view>
</view>
</view>
@ -230,6 +231,13 @@
this.util.toast("请提前一天预约");
return;
}
if (cdate.is_open === 0) {
uni.showToast({
icon: "none",
title: "该日期已经售罄"
})
return;
}
for (var m of list) {
m.checked = false;
}
@ -371,6 +379,7 @@
} else {
m.week = week;
}
if (m.date == selectDate ) {
m.checked = true;
that.currentDate = m;

@ -49,7 +49,7 @@
<u-icon name="checkmark" color="#fff" size="20rpx"></u-icon>
</view>
<view class="book-box-row-timeitem-txt">{{item.start_time+'-'+item.end_time}}</view>
<view class="book-box-row-timeitem-txt">{{item.total}}</view>
<view class="book-box-row-timeitem-txt">{{item.remain_count}}</view>
</view>
</view>
</view>
@ -316,7 +316,6 @@
title: (options.from == 'user' ? "个人预约" : "团队预约")
})
this.form.total = this.minCount; //= (type == 'user' ? 1 : 8);
//this.maxCount = (type == 'user' ? 5 : 50);
var that = this;
that.util.getUserInfo(function(r) {
@ -342,6 +341,8 @@
that.maxCount = res.team_max_count;
that.minCount = res.team_min_count;
}
that.form.total = that.minCount;
},
utilFail: function(res) {
@ -548,10 +549,12 @@
this.showCalendar = false;
},
handleSelectDate(e) {
if (e.length != 0 && (e[0] != this.currentDate.date)) {
if (this.showCalendar && e.length != 0 && e[0] != this.currentDate.date) {
this.load3Day(e[0]);
this.showCalendar = false;
}
},
openCalendar() {
var that = this;
@ -586,6 +589,14 @@
})
return;
}
console.log("cdate", cdate)
if (cdate.is_open === 0) {
uni.showToast({
icon: "none",
title: "该日期已经售罄"
})
return;
}
for (var m of list) {
m.checked = false;
}
@ -623,6 +634,7 @@
var mt = this.$moment().add('days', 1).format("yyyy-MM-DD");
var ht = this.$moment().add('days', 2).format("yyyy-MM-DD");
var selectDate = (nt == sdate) ? ndate : sdate;
this.loadCalendar(sdate, edate, function(res) {
that.listDatePrice = res;
@ -640,7 +652,8 @@
} else {
m.week = week;
}
if (m.date == selectDate) {
if (m.date == selectDate && m.is_open == 1) {
m.checked = true;
that.currentDate = m;
that.currentIndex = i;
@ -648,8 +661,6 @@
for (var mod of m.rules) {
mod.checked = false;
if (that.bcurrentTime) {
console.log(that.bcurrentTime)
console.log("mod", mod)
if (mod.id == that.bcurrentTime.id)
mod.checked = true;
that.currentTime = that.bcurrentTime;
@ -661,6 +672,8 @@
}
idx++;
}
} else {
selectDate = that.$moment(selectDate).add('days', 1).format("yyyy-MM-DD");
}
i++;
}

Loading…
Cancel
Save