刘翔宇-旅管家 3 years ago
parent 113381c87a
commit 38f2fb771a

@ -5,7 +5,7 @@
<view class="activityBox-top">
<image :src='item.cover_upload.url' style="width: 100%;height: 333rpx;"></image>
<view class="book-status">
{{item.status==0?"已结束":"活动进行中"}}
{{item.rate_name}}
</view>
<view class="book-num" v-if="item.orders_count>0">
<text class="book-num-y"> {{isUnde(item.orders_count)}} </text>
@ -20,7 +20,7 @@
<view class="tag tag_green">
<text>{{isUnde(item.target_name)}}</text>
</view>
<view v-if="isUnde(item.status)==1" class="activityBox-btn tag">
<view v-if="item.rate_name=='进行中'" class="activityBox-btn tag">
<text>立即报名</text>
</view>
</view>
@ -90,9 +90,14 @@
})
},
openInfo(obj) {
uni.navigateTo({
url: "info?id=" + obj.id
})
if (obj.rate_name == "进行中")
uni.navigateTo({
url: "info?id=" + obj.id
})
else {
this.util.toast("当前选择活动" + obj.rate_name + "不可报名");
}
},
loadActivity() {
var that = this;
@ -100,7 +105,7 @@
api: '/api/mobile/activity/index',
data: {
latitude: that.latitude,
longitude: that.longitude,
longitude: that.longitude
},
utilSuccess: function(res) {
that.list = res.data;
@ -118,8 +123,8 @@
}
},
getHm(val) {
if (val) {
return this.$moment(val).format("HH:mm")
if (val) {
return this.$moment(val).format("HH:mm")
} else return "";
}
}

@ -72,7 +72,8 @@
api: '/api/mobile/activity/index',
data: {
latitude: that.latitude,
longitude: that.longitude
longitude: that.longitude,
time_type: 2
},
utilSuccess: function(res) {
for (var m of res.data) {

@ -46,11 +46,16 @@
<view class="book-box-row-date">
<block v-for="(item,index) in listDatePrice" :key="index">
<view class="book-box-row-dateitem" :class="{'book-box-row-dateitem-on':item.checked,
'book-box-row-dateitem-none':item.is_open==0}" @click="handleDate(index)">
'book-box-row-dateitem-none':item.is_open==0,
'book-box-row-dateitem-none':item.remain_count==0}" @click="handleDate(index)">
<view class="book-box-row-dateitem-status">
<u-icon name="checkmark" color="#fff" size="20rpx" v-if="item.checked">
</u-icon>
<text v-else>{{item.is_open==1?'':""}}</text>
<view v-else>
<text
v-if="item.is_open==1">{{item.remain_count==0?"售罄":"余票"}}</text>
<text v-else></text>
</view>
</view>
<view>{{item.week}}</view>
<view>{{item.datef}}</view>
@ -202,14 +207,20 @@
if (e.length != 0) {
var date = e[0]
this.load3Day(date, function(isCanbook) {
if (isCanbook) {
that.showCalendar = false;
} else {
that.util.toast("您选择的日期已经闭馆")
}
});
var mod = this.listCalendar.filter((p) => {
return p.is_open == 1 && p.remain_count != 0 && p.date == date;
})
if (mod.length != 0) {
this.load3Day(date, function(isCanbook) {
if (isCanbook) {
that.showCalendar = false;
} else {
that.util.toast("您选择的日期不可预约")
}
});
} else {
that.util.toast("您选择的日期不可预约")
}
}
},
openCalendar() {
@ -226,7 +237,11 @@
let date = this.$moment(day.date).format("yyyy-MM-DD");
if (date == m.date) {
if (m.is_open == 1)
day.bottomInfo = '余票'
if (m.remain_count == 0) {
day.bottomInfo = '售罄'
} else {
day.bottomInfo = '余票'
}
else {
day.bottomInfo = '闭馆'
}
@ -243,12 +258,20 @@
return;
}
if (cdate.is_open === 0) {
uni.showToast({
icon: "none",
title: "该日期已经闭馆"
})
return;
}
if (cdate.remain_count === 0) {
uni.showToast({
icon: "none",
title: "该日期已经售罄"
})
return;
}
for (var m of list) {
m.checked = false;
}
@ -318,6 +341,8 @@
},
openBook() {
var that = this;
this.currentTime = this.currentDate = {};
var sdate = that.$moment().format("yyyy-MM-DD");
that.showBook = true;
that.load3Day(sdate)
@ -399,7 +424,7 @@
m.week = week;
}
if (m.date == selectDate) {
if (m.is_open == 1) {
if (m.is_open == 1 && m.remain_count > 0) {
m.checked = true;
that.currentDate = m;
that.currentIndex = i;

@ -71,7 +71,7 @@
</view>
<view class="orderBoxTitle flex-row">
<text
class="orderBoxInfoRowTxt">预约时需要个人姓名联系方式和参观时间等信息预约成功后生成预约二维码可于个人中心查看当天凭有效身份证件或预约二维码核销入场</text>
class="orderBoxInfoRowTxt">{{info.type==1?vinfo.person_notice:vinfo.team_notice}}</text>
</view>
</view>
</view>
@ -82,10 +82,12 @@
export default {
data() {
return {
info: {}
info: {},
vinfo: {}
}
},
onLoad(options) {
onLoad(options) {
this.loadIntroduce();
if (!this.util.isNull(options.id)) {
this.loadInfo(options.id);
}
@ -107,6 +109,19 @@
}
})
},
loadIntroduce() {
var that = this;
this.util.request({
api: '/api/mobile/visit/introduce',
utilSuccess: function(res) {
that.vinfo = res;
},
utilFail: function(res) {
}
})
},
loadInfo(id) {
var that = this;
this.util.request({

@ -2,9 +2,8 @@
<view>
<view class="box-content">
<view class="box-card">
<view class="box-tip justify-between" @click="openselectorder">
<view class="box-tip justify-between">
<text class="box-tiptxt">已选{{selectInfo}}</text>
<view class="box-tipbtn">选择已预约的参观 > </view>
</view>
<u--form labelPosition="top" labelWidth="120px" :model="form" ref="form">
<u-form-item label="预约入场时间" labelPosition="top" borderBottom>
@ -27,13 +26,27 @@
<view class="box-tip box-tipgray flex-row align-center" @click="handleChange">
<u-icon :name="(form.checkUser?'checkmark-circle-fill':'checkmark-circle')" color="#828282">
</u-icon>
<view class="box-tiptxt" style="margin-left: 10rpx;">请认真阅读知悉并遵守实训基地预约停车须知</view>
<view class="box-tiptxt" style="margin-left: 10rpx;">请认真阅读知悉并遵守<text @click.stop="openNotice"
style="color: #EF9525;">本馆停车须知</text></view>
</view>
</view>
</view>
<view class="page-bottom">
<u-button type="primary" @click="submitOrder"></u-button>
</view>
<u-popup :show="showInfo" mode="bottom" @close="closeInfo" :round="10" closeable>
<view class="mpopup">
<view class="mpopup-title">
{{notice.name}}
</view>
<view class="mpopup-content" style="margin-top: 60rpx;">
<rich-text :nodes="notice.value"></rich-text>
<view style="margin-top: 80px;"></view>
<u-button type="primary" @click="closeInfo"></u-button>
</view>
</view>
</u-popup>
<u-popup :show="showSelectorder" mode="bottom" :closeOnClickOverlay="false" @close="closeorder" :round="10">
<view class="mpopup">
<view class="mpopup-title">
@ -68,7 +81,7 @@
color="#EF9525">
</u-icon>
<view class="box-tiptxt" style="margin-left: 10rpx;">
活动时间{{item.activity.start_time}}
活动时间{{item.activity.start_time}}
报名数量{{item.total}}</text>
</view>
</view>
@ -92,7 +105,8 @@
},
data() {
return {
showSelectorder: true,
showInfo: false,
showSelectorder: false,
selectInfo: "--",
showSelecttime: false,
plateNumber: ['苏', 'E', '', '', '', '', ''],
@ -111,7 +125,9 @@
listOrder: [],
listActivtyOrder: [],
orderType: 1,
orderid: 0,
orderid: "",
bookinfo: {},
notice: {}
}
},
onLoad(options) {
@ -122,9 +138,21 @@
if (!that.util.isNull(options.currentPark)) {
this.form.type = options.currentPark;
}
this.loadOrder(function() {
that.loadactivityOrder(function() {})
});
if (!that.util.isNull(options.bookinfo)) {
let bookinfo = JSON.parse(unescape(options.bookinfo));
this.bookinfo = bookinfo;
this.form.time = bookinfo.time;
this.selectInfo = bookinfo.info;
if (this.orderType == 2)
this.form.activity_order_id = bookinfo.orderid
else
this.form.visit_order_id = bookinfo.orderid
this.orderid = bookinfo.orderid
}
that.loadConfigInfo();
that.util.getUserInfo(function(r) {
that.form.mobile = r.mobile;
}, true);
@ -133,6 +161,31 @@
},
methods: {
loadConfigInfo() {
var that = this;
this.util.request({
api: '/api/mobile/other/config-show',
data: {
tag: "car_park_notice"
},
utilSuccess: function(res) {
that.notice = res;
},
utilFail: function(res) {
uni.showToast({
icon: "none",
title: res,
duration: 2000
})
}
})
},
openNotice() {
this.showInfo = true;
},
closeInfo() {
this.showInfo = false;
},
handleConfirmOrder() {
if (this.orderid === 0) {
this.util.toast("请选择预约的活动或者预约的参观");
@ -157,9 +210,10 @@
} else {
this.listActivtyOrder[index].checked = true
this.selectInfo = this.$moment(this.listActivtyOrder[index].activity.start_time).format("MM月DD日 hh:mm")
this.form.time = this.$moment(this.listActivtyOrder[index].activity.start_time).format("YYYY-MM-DD hh:mm:ss");
this.selectInfo = this.$moment(this.listActivtyOrder[index].activity.start_time).format("MM月DD日 hh:mm")
this.form.time = this.$moment(this.listActivtyOrder[index].activity.start_time).format(
"YYYY-MM-DD hh:mm:ss");
this.form.activity_order_id = this.orderid = this.listActivtyOrder[index].id;
}
this.orderType = type;

@ -7,22 +7,21 @@
<view class="book-box">
<view class="activityBox-content flex-col">
<view class="activityBox-row" style="margin-bottom: 56rpx;">
<text class="activityBox-title">{{info.name}}</text>
<text class="activityBox-title">{{info.name||""}}</text>
</view>
<view class="activityBox-row">
<text class="icon-shijian iconfont"></text>
<text>预约可入场时间段{{info.start_time}}-{{info.end_time}}</text>
<text>可入场时间段{{info.start_time||""}}-{{info.end_time||""}}</text>
</view>
<view class="activityBox-row">
<text class="icon-huodong iconfont"></text>
<text>地址{{info.address}}</text>
<text>地址{{info.address||""}}</text>
</view>
<view class="activityBox-row flex-row align-center" style="margin-bottom: 0rpx;"
@click="openlocation">
<text class="icon-ditu-dibiao iconfont"></text>
<text>距离11.3km</text>
<text>距离{{distance||"0"}}km</text>
<view class="tomap">
<text class="icon-daohang1 iconfont" style="margin-right: 0;"></text>
</view>
@ -31,31 +30,35 @@
<view class="parkbox-title">可预约车位</view>
<view class="parkbox-content flex-row justify-around">
<view class="parkbox-item flex-row align-center" style="margin-right: 15rpx;"
@click="handleSelectPark(2)" :class="(currentPark==2?'parkbox-item-on':'')">
@click="handleSelectPark(2)" :class="(currentPark==2?'parkbox-item-on':'')"
v-if="remain_big_park>0">
<view class="parkbox-item-status" v-if="currentPark==2">
<u-icon name="checkmark" color="#fff" size="20rpx"></u-icon>
</view>
<text class="iconfont icon-tingchechang1" style="font-size: 28rpx;"></text>
<view>
<text>大中{{info.big_park_total}}</text>
<text>大中{{remain_big_park}}</text>
</view>
</view>
<view class="parkbox-item flex-col align-center"
:class="(currentPark==1?'parkbox-item-on':'')" @click="handleSelectPark(1)"
style="margin-left: 15rpx;">
style="margin-left: 15rpx;" v-if="remain_small_park>0">
<view class="parkbox-item-status" v-if="currentPark==1">
<u-icon name="checkmark" color="#fff" size="20rpx"></u-icon>
</view>
<view class="flex-row align-center">
<text class="iconfont icon-tingchechang1"
style="font-size: 28rpx;"></text><text>小车{{info.small_park_total}}</text>
style="font-size: 28rpx;"></text><text>小车{{remain_small_park}}</text>
</view>
<text
style="font-size: 24rpx;color: #828282;">充电桩空闲{{info.charge_total}}</text>
<text style="font-size: 24rpx;color: #828282;">充电桩空闲0</text>
</view>
</view>
</view>
<view class="activityBox-row" style="margin-top: 20rpx;color: #EF9525;" @click="showSelectorder=true">
<text>选择信息{{selectInfo.info||"暂未选择"}}</text>
</view>
</view>
</view>
@ -65,6 +68,52 @@
</map>
</view>
</view>
<u-popup :show="showSelectorder" mode="bottom" :closeOnClickOverlay="false" @close="closeorder" :round="10">
<view class="mpopup">
<view class="mpopup-title">
选择预约的活动或者预约的参观
</view>
<view class="mpopup-content" style="padding: 40rpx 20rpx;">
<view v-if="listOrder.length!=0">
<view class="mpopup-title" style="text-align: left;padding: 20rpx 0;font-size: 14px;">
预约的参观
</view>
<block v-for="(item,index) in listOrder" :key="index">
<view class="box-tip flex-row align-center" @click="handleSelectOrder(index,1)"
style="margin-bottom: 20rpx;">
<u-icon :name="(item.checked?'checkmark-circle-fill':'checkmark-circle')"
color="#EF9525">
</u-icon>
<view class="box-tiptxt" style="margin-left: 10rpx;">
{{$u.timeFormat(new Date(item.date), 'mm月dd日')}}
{{item.time}}{{item.details_count}} 位观众</text>
</view>
</view>
</block>
</view>
<view v-if="listActivtyOrder.length!=0">
<view class="mpopup-title" style="text-align: left;padding: 20rpx 0;font-size: 14px;">
预约的活动
</view>
<block v-for="(item,index) in listActivtyOrder" :key="index">
<view class="box-tip flex-row align-center" @click="handleSelectOrder(index,2)"
style="margin-bottom: 20rpx;">
<u-icon :name="(item.checked?'checkmark-circle-fill':'checkmark-circle')"
color="#EF9525">
</u-icon>
<view class="box-tiptxt" style="margin-left: 10rpx;">
活动时间{{item.activity.start_time}}
报名数量{{item.total}}</text>
</view>
</view>
</block>
</view>
<u-button type="primary" @click="handleConfirmOrder"></u-button>
</view>
</view>
</u-popup>
</view>
</template>
@ -74,27 +123,90 @@
return {
latitude: 31.299893,
longitude: 120.626022,
userlatitude: 31.299893,
userlongitude: 120.626022,
distance: 0,
info: {},
covers: [],
currentPark: 1,
btnDisabled: false
btnDisabled: false,
showSelectorder: false,
listOrder: [],
listActivtyOrder: [],
selectInfo: {
info: "",
orderType: 1,
orderid: 0,
userlatitude: 31.299893,
userlongitude: 120.626022
},
remain_big_park: 0,
remain_small_park: 0
}
},
onLoad() {
var that = this;
this.loadInfo();
this.loadOrder(function(res) {
that.loadactivityOrder(function(r) {
if (res.length + r.length == 0) {
that.util.toast("请先预约活动或参观")
that.btnDisabled = true;
} else {
that.btnDisabled = false;
}
})
wx.getLocation({
success(res) {
that.userlatitude = res.latitude;
that.userlongitude = res.longitude;
that.loadOrder(function(res) {
that.loadactivityOrder(function(r) {
if (res.length + r.length == 0) {
that.util.toast("您需要预约参观或者预约活动才可以停车");
that.btnDisabled = true;
} else {
that.btnDisabled = false;
that.showSelectorder = true;
}
})
});
}
})
},
methods: {
handleConfirmOrder() {
if (this.selectInfo.orderid === 0) {
this.util.toast("请选择预约的活动或者预约的参观");
return false;
}
this.showSelectorder = false;
},
handleSelectOrder(index, type) {
for (var m of this.listActivtyOrder) {
m.checked = false;
}
for (var m of this.listOrder) {
m.checked = false;
}
if (type == 1) {
this.listOrder[index].checked = true;
this.selectInfo.info = this.$moment(this.listOrder[index].date).format("MM月DD日") + " " + this
.listOrder[
index].time
this.selectInfo.time = this.$moment(this.listOrder[index].date + " " + this.listOrder[
index].time.split("-")[0]).format("YYYY-MM-DD hh:mm:ss");
this.selectInfo.orderid = this.orderid = this.listOrder[index].id;
} else {
this.listActivtyOrder[index].checked = true
this.selectInfo.info = this.$moment(this.listActivtyOrder[index].activity.start_time).format(
"MM月DD日 hh:mm")
this.selectInfo.time = this.$moment(this.listActivtyOrder[index].activity.start_time).format(
"YYYY-MM-DD hh:mm:ss");
this.selectInfo.orderid = this.orderid = this.listActivtyOrder[index].id;
}
this.orderType = type;
this.selectInfo.orderType = type;
this.loadInfo();
},
openselectorder() {
this.showSelectorder = true;
},
closeorder() {
this.showSelectorder = false;
},
loadOrder(cb) {
var that = this;
this.util.request({
@ -103,6 +215,10 @@
status: 1
},
utilSuccess: function(res) {
for (var mod of res) {
mod.checked = false;
}
that.listOrder = res;
cb(res)
},
utilFail: function(res) {
@ -118,6 +234,10 @@
status: 1
},
utilSuccess: function(res) {
for (var mod of res) {
mod.checked = false;
}
that.listActivtyOrder = res;
cb(res);
},
utilFail: function(res) {
@ -125,6 +245,7 @@
}
})
},
handleSelectPark(type) {
this.currentPark = type;
},
@ -136,24 +257,31 @@
address: this.info.address
});
},
loadInfo(cb) {
loadInfo() {
var that = this;
this.util.request({
api: '/api/mobile/carpark/index',
utilSuccess: function(r) {
var res = r[0];
res.latitude = parseFloat(res.latitude);
res.longitude = parseFloat(res.longitude);
that.info = res;
api: '/api/mobile/carpark/show',
data: {
date: that.selectInfo.time,
latitude: that.userlatitude,
longitude: that.userlongitude
},
utilSuccess: function(res) {
that.info = res.detail;
that.distance = res.distance;
that.info.latitude = parseFloat(res.detail.latitude);
that.info.longitude = parseFloat(res.detail.longitude);
that.remain_big_park = res.remain_big_park;
that.remain_small_park = res.remain_small_park;
var mod = {
latitude: res.latitude,
longitude: res.longitude,
latitude: that.info.latitude,
longitude: that.info.longitude,
width: 70,
height: 70,
iconPath: '/static/img/location.png'
iconPath: '/static/img/location.png',
id: 1
}
that.covers.push(mod);
cb(res);
},
utilFail: function(res) {
@ -164,9 +292,16 @@
uni.$u.throttle(this.tobook, 500)
},
tobook() {
uni.navigateTo({
url: "book?id=" + this.info.id + "&currentPark=" + this.currentPark
})
if (this.selectInfo.orderid === 0) {
this.util.toast("请选择预约的活动或者预约的参观");
return false;
} else {
var json = escape(JSON.stringify(this.selectInfo));
uni.navigateTo({
url: "book?bookinfo=" + json + "&id=" + this.info.id + "&currentPark=" + this.currentPark
})
}
}
}
}

@ -19,7 +19,11 @@
<view class="book-box-row-dateitem-status">
<u-icon name="checkmark" color="#fff" size="20rpx" v-if="item.checked">
</u-icon>
<text v-else>{{item.is_open==1?'':""}}</text>
<view v-else>
<text
v-if="item.is_open==1">{{item.remain_count==0?"售罄":"余票"}}</text>
<text v-else></text>
</view>
</view>
<view>{{item.week}}</view>
<view>{{item.datef}}</view>
@ -107,7 +111,7 @@
<view class="box-footer">
<view class="box-footer-left">
<view class="box-button" @click="openAdd">
<view class="box-button" @click="openAdd()">
<u-icon name="plus" color="#EF9525"></u-icon>
<text class="box-button-txt">添加观众</text>
</view>
@ -182,7 +186,7 @@
<u-form-item label="证件号码" labelWidth="80" prop="idcard" ref="idcard" required>
<u-input placeholder="请输入证件号码" v-model="formUser.idcard"></u-input>
</u-form-item>
<u-form-item label="手机号" labelWidth="80" prop="from.mobile" ref="mobile">
<u-form-item label="手机号" labelWidth="80" prop="from.mobile" ref="mobile" required>
<u-input placeholder="请输入手机号" v-model="formUser.mobile"></u-input>
</u-form-item>
</u--form>
@ -286,6 +290,7 @@
maxCount: 1,
config: {},
info: {},
editIndex: -1,
cardList: [{
idx: 1,
name: '身份证'
@ -421,7 +426,7 @@
}
if (this.form.card_type == 1) {
if (!uni.$u.test.idCard(this.form.idcard)) {
if (!that.util.isValidCardID(that.form.idcard)) {
uni.showToast({
icon: "none",
title: "请正确输入身份证号"
@ -522,7 +527,8 @@
try {
this.$refs.formUser.validate().then(res => {
if (that.formUser.card_type == 1) {
if (!uni.$u.test.idCard(that.formUser.idcard)) {
that.formUser.idcard = that.formUser.idcard.toUpperCase();
if (!that.util.isValidCardID(that.formUser.idcard)) {
uni.showToast({
icon: "none",
title: "请正确输入身份证号"
@ -530,12 +536,27 @@
return false;
}
}
that.form.details_list.push(that.formUser);
if (this.util.isNull(this.formUser.mobile)) {
uni.showToast({
icon: "none",
title: "请填写手机号"
})
return false;
} else if (!uni.$u.test.mobile(this.formUser.mobile)) {
uni.showToast({
icon: "none",
title: "请正确填写手机号"
})
return false;
}
//
if (that.editIndex != -1) {
that.form.details_list.splice(that.editIndex, 1, that.formUser)
} else
that.form.details_list.push(that.formUser);
that.addUserAfter();
that.showAdd = false;
}).catch(errors => {
console.log(errors)
}).catch(errors => {
uni.showToast({
icon: "none",
title: "观众信息提交不正确"
@ -551,19 +572,33 @@
addUserAfter() {
if (this.type == "user") {
var user = this.form.details_list[0];
this.form.leader = user.name;
if (this.form.leader != "")
this.form.leader = user.name;
}
},
closecalendar() {
this.showCalendar = false;
},
handleSelectDate(e) {
if (this.showCalendar && e.length != 0) {
this.load3Day(e[0]);
this.showCalendar = false;
let that = this;
if (e.length != 0) {
var date = e[0]
var mod = this.listCalendar.filter((p) => {
return p.is_open == 1 && p.remain_count != 0 && p.date == date;
})
if (mod.length != 0) {
this.load3Day(date, function(isCanbook) {
if (isCanbook) {
that.showCalendar = false;
} else {
that.util.toast("您选择的日期不可预约")
}
});
} else {
that.util.toast("您选择的日期不可预约")
}
}
},
openCalendar() {
var that = this;
@ -578,10 +613,14 @@
for (var m of this.listCalendar) {
let date = this.$moment(day.date).format("yyyy-MM-DD");
if (date == m.date) {
if (m.is_open == 1)
day.bottomInfo = '余票'
else {
day.bottomInfo = '售罄'
if (m.is_open == 1) {
if (m.remain_count == 0) {
day.bottomInfo = '售罄'
} else {
day.bottomInfo = '余票'
}
} else {
day.bottomInfo = '闭馆'
}
}
}
@ -598,14 +637,23 @@
})
return;
}
console.log("cdate", cdate)
if (cdate.is_open === 0) {
uni.showToast({
icon: "none",
title: "该日期已经闭馆"
})
return;
}
if (cdate.remain_count === 0) {
uni.showToast({
icon: "none",
title: "该日期已经售罄"
})
return;
}
for (var m of list) {
m.checked = false;
}
@ -630,21 +678,19 @@
this.currentTime = mod;
this.$forceUpdate();
},
load3Day(sdate) { //7
load3Day(sdate, callbak) { //7
var that = this;
that.listDatePrice = [];
var nt = this.$moment().format("yyyy-MM-DD");
sdate = sdate == "" ? nt : sdate;
var edate = this.$moment(sdate).add('days', 2).format("yyyy-MM-DD");
var ndate = this.$moment(sdate).add('days', 1).format("yyyy-MM-DD")
var nt = this.$moment().format("yyyy-MM-DD");
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;
var i = 0;
let isOpenDate = false;
for (var m of that.listDatePrice) {
m.checked = false;
m.datef = that.$moment(m.date).format("MM月DD日");
@ -658,16 +704,16 @@
} else {
m.week = week;
}
if (m.date == selectDate) {
if (m.is_open == 1) {
if (m.is_open == 1 && m.remain_count > 0) {
m.checked = true;
that.currentDate = m;
that.currentIndex = i;
that.loadDefaultTime(m.rules);
isOpenDate = true;
} else {
uni.showToast({
isOpenDate = false;
/* uni.showToast({
icon: "none",
title: selectDate + "不可以预约",
complete() {
@ -676,13 +722,19 @@
.format("yyyy-MM-DD"))
}, 2000)
}
}, 2000)
}, 2000) */
}
}
i++;
}
if (callbak)
callbak(isOpenDate);
})
},
loadCalendar(sdate, edate, cb) {
var that = this;
this.util.request({
@ -719,10 +771,12 @@
},
openAdd(index) {
this.formUser = this.$options.data().formUser;
console.log(index)
if (index || index == 0) {
console.log(index)
this.editIndex = index;
let r = Object.assign(this.formUser, this.form.details_list[index]);
}
} else
this.editIndex = -1;
this.showAdd = true
},
delUser(index) {

@ -551,5 +551,7 @@ module.exports = {
auditStatusDic: auditStatusDic,
getUserProfile: getUserProfile,
getUserInfo: getUserInfo,
toast: toast
toast: toast,
isValidCardID:isValidCardID
};

Loading…
Cancel
Save