|
|
|
|
@ -464,10 +464,7 @@
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
title: res
|
|
|
|
|
})
|
|
|
|
|
that.util.toast(res);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
@ -535,8 +532,10 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
that.form.details_list.push(that.formUser);
|
|
|
|
|
that.addUserAfter();
|
|
|
|
|
that.showAdd = false;
|
|
|
|
|
}).catch(errors => {
|
|
|
|
|
}).catch(errors => {
|
|
|
|
|
console.log(errors)
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
title: "观众信息提交不正确"
|
|
|
|
|
@ -549,11 +548,17 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
addUserAfter() {
|
|
|
|
|
if (this.type == "user") {
|
|
|
|
|
var user = this.form.details_list[0];
|
|
|
|
|
this.form.leader = user.name;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
closecalendar() {
|
|
|
|
|
this.showCalendar = false;
|
|
|
|
|
},
|
|
|
|
|
handleSelectDate(e) {
|
|
|
|
|
if (this.showCalendar && e.length != 0 ) {
|
|
|
|
|
if (this.showCalendar && e.length != 0) {
|
|
|
|
|
this.load3Day(e[0]);
|
|
|
|
|
this.showCalendar = false;
|
|
|
|
|
}
|
|
|
|
|
@ -605,7 +610,7 @@
|
|
|
|
|
m.checked = false;
|
|
|
|
|
}
|
|
|
|
|
cdate.checked = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.loadDefaultTime(cdate.rules);
|
|
|
|
|
|
|
|
|
|
this.currentDate = cdate;
|
|
|
|
|
@ -613,16 +618,16 @@
|
|
|
|
|
this.$forceUpdate();
|
|
|
|
|
},
|
|
|
|
|
handleSelectTime(index) {
|
|
|
|
|
var mod = this.currentDate.rules[index];
|
|
|
|
|
if (mod.remain_count == 0) {
|
|
|
|
|
this.util.toast("该时段已售罄");
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
for (var m of this.currentDate.rules) {
|
|
|
|
|
m.checked = false;
|
|
|
|
|
}
|
|
|
|
|
mod.checked = true;
|
|
|
|
|
this.currentTime = mod;
|
|
|
|
|
var mod = this.currentDate.rules[index];
|
|
|
|
|
if (mod.remain_count == 0) {
|
|
|
|
|
this.util.toast("该时段已售罄");
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
for (var m of this.currentDate.rules) {
|
|
|
|
|
m.checked = false;
|
|
|
|
|
}
|
|
|
|
|
mod.checked = true;
|
|
|
|
|
this.currentTime = mod;
|
|
|
|
|
this.$forceUpdate();
|
|
|
|
|
},
|
|
|
|
|
load3Day(sdate) { //加载7天数据
|
|
|
|
|
@ -654,25 +659,25 @@
|
|
|
|
|
m.week = week;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (m.date == selectDate) {
|
|
|
|
|
if (m.is_open == 1) {
|
|
|
|
|
m.checked = true;
|
|
|
|
|
that.currentDate = m;
|
|
|
|
|
that.currentIndex = i;
|
|
|
|
|
that.loadDefaultTime(m.rules);
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
title: selectDate + "不可以预约",
|
|
|
|
|
complete() {
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
that.load3Day(that.$moment(selectDate).add('days', 1)
|
|
|
|
|
.format("yyyy-MM-DD"))
|
|
|
|
|
}, 2000)
|
|
|
|
|
}
|
|
|
|
|
}, 2000)
|
|
|
|
|
}
|
|
|
|
|
if (m.date == selectDate) {
|
|
|
|
|
if (m.is_open == 1) {
|
|
|
|
|
m.checked = true;
|
|
|
|
|
that.currentDate = m;
|
|
|
|
|
that.currentIndex = i;
|
|
|
|
|
that.loadDefaultTime(m.rules);
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
title: selectDate + "不可以预约",
|
|
|
|
|
complete() {
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
that.load3Day(that.$moment(selectDate).add('days', 1)
|
|
|
|
|
.format("yyyy-MM-DD"))
|
|
|
|
|
}, 2000)
|
|
|
|
|
}
|
|
|
|
|
}, 2000)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
i++;
|
|
|
|
|
}
|
|
|
|
|
@ -734,6 +739,7 @@
|
|
|
|
|
.timeitem-none {
|
|
|
|
|
color: #ccc;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.box-visitor-item {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|