|
|
|
|
@ -8,14 +8,14 @@
|
|
|
|
|
<u--form labelPosition="top" labelWidth="120px" :model="form" ref="form">
|
|
|
|
|
<u-form-item label="预约入场时间" labelPosition="top" borderBottom>
|
|
|
|
|
|
|
|
|
|
<view style="color: #EF9525;font-size: 24rpx;display: flex;" @click="showSelecttime=true">
|
|
|
|
|
<!-- {{selectInfo}} -->
|
|
|
|
|
<view style="color: #EF9525;font-size: 24rpx;display: flex;" @click="showSelecttime=true">
|
|
|
|
|
<!-- {{selectInfo}} -->
|
|
|
|
|
<text>{{(form.time?timeFormat(formTime, 'yyyy年MM月DD日 HH:mm'):'请选择入场时间>')}}</text>
|
|
|
|
|
<u-icon name="arrow-down" color="#000"></u-icon>
|
|
|
|
|
</view>
|
|
|
|
|
<u-datetime-picker
|
|
|
|
|
:minDate="minDate"
|
|
|
|
|
:maxDate="maxDate"
|
|
|
|
|
<u-datetime-picker
|
|
|
|
|
:minDate="minDate"
|
|
|
|
|
:maxDate="maxDate"
|
|
|
|
|
:show="showSelecttime" closeOnClickOverlay @close="cancelTime"
|
|
|
|
|
@cancel="cancelTime" @confirm="confirmTime" v-model="form.time" mode="datetime">
|
|
|
|
|
</u-datetime-picker>
|
|
|
|
|
@ -150,8 +150,8 @@
|
|
|
|
|
activity_order_id: "",
|
|
|
|
|
visit_order_id: ""
|
|
|
|
|
},
|
|
|
|
|
formTime: Number(new Date()),
|
|
|
|
|
minDate:'',
|
|
|
|
|
formTime: Number(new Date()),
|
|
|
|
|
minDate:'',
|
|
|
|
|
maxDate:'',
|
|
|
|
|
listOrder: [],
|
|
|
|
|
listActivtyOrder: [],
|
|
|
|
|
@ -162,7 +162,7 @@
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onLoad(options) {
|
|
|
|
|
let that = this;
|
|
|
|
|
let that = this;
|
|
|
|
|
|
|
|
|
|
that.showInfo = true;
|
|
|
|
|
if (!that.util.isNull(options.id)) {
|
|
|
|
|
@ -184,12 +184,12 @@
|
|
|
|
|
// else
|
|
|
|
|
// this.form.visit_order_id = bookinfo.orderid
|
|
|
|
|
// this.orderid = bookinfo.orderid
|
|
|
|
|
// }
|
|
|
|
|
that.form.time = this.$moment(this.$moment().format('YYYY-MM-DD HH:mm:ss')).valueOf()
|
|
|
|
|
that.formTime = this.$moment(this.$moment().format('YYYY-MM-DD HH:mm:ss')).valueOf()
|
|
|
|
|
console.log(that.form.time)
|
|
|
|
|
this.minDate = this.$moment(this.$moment().format('YYYY-MM-DD HH:mm:ss')).valueOf()
|
|
|
|
|
this.maxDate = this.$moment(this.$moment().add('days',6).format('YYYY-MM-DD') + ' 16:00:00').valueOf()
|
|
|
|
|
// }
|
|
|
|
|
that.form.time = this.$moment(this.$moment().format('YYYY-MM-DD HH:mm:ss')).valueOf()
|
|
|
|
|
that.formTime = this.$moment(this.$moment().format('YYYY-MM-DD HH:mm:ss')).valueOf()
|
|
|
|
|
console.log(that.form.time)
|
|
|
|
|
this.minDate = this.$moment(this.$moment().format('YYYY-MM-DD HH:mm:ss')).valueOf()
|
|
|
|
|
this.maxDate = this.$moment(this.$moment().add('days',6).format('YYYY-MM-DD') + ' 16:00:00').valueOf()
|
|
|
|
|
console.log("this.minDate",this.minDate,this.maxDate)
|
|
|
|
|
that.loadConfigInfo();
|
|
|
|
|
|
|
|
|
|
@ -326,16 +326,16 @@
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
confirmTime(e) {
|
|
|
|
|
console.log(e)
|
|
|
|
|
this.form.time = e.value
|
|
|
|
|
this.formTime = e.value
|
|
|
|
|
let choosetime = parseInt(this.$moment(this.form.time).format("HH"))
|
|
|
|
|
let chooseMin = parseInt(this.$moment(this.form.time).format("mm"))
|
|
|
|
|
// let nowtime = parseInt(this.$moment().format("HH"))
|
|
|
|
|
// console.log(chooseMin)
|
|
|
|
|
if(choosetime<9 || choosetime>16 || (choosetime==16 && chooseMin>0)){
|
|
|
|
|
this.util.toast("请选择正确的入场时间");
|
|
|
|
|
return false;
|
|
|
|
|
console.log(e)
|
|
|
|
|
this.form.time = e.value
|
|
|
|
|
this.formTime = e.value
|
|
|
|
|
let choosetime = parseInt(this.$moment(this.form.time).format("HH"))
|
|
|
|
|
let chooseMin = parseInt(this.$moment(this.form.time).format("mm"))
|
|
|
|
|
// let nowtime = parseInt(this.$moment().format("HH"))
|
|
|
|
|
// console.log(chooseMin)
|
|
|
|
|
if(choosetime<9 || choosetime>16 || (choosetime==16 && chooseMin>0)){
|
|
|
|
|
this.util.toast("请选择正确的入场时间");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
this.showSelecttime = false;
|
|
|
|
|
},
|
|
|
|
|
@ -350,16 +350,29 @@
|
|
|
|
|
},
|
|
|
|
|
handleSelectTime() {
|
|
|
|
|
this.showSelecttime = true;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
submitOrder() {
|
|
|
|
|
// if (this.util.isNull(this.orderid)) {
|
|
|
|
|
// this.util.toast("请选择参观预约或者活动预约");
|
|
|
|
|
// return false;
|
|
|
|
|
// }
|
|
|
|
|
if(this.$moment(this.form.time).format("HH")<9 || this.$moment(this.form.time).format("HH")>16){
|
|
|
|
|
this.util.toast("请选择正确的入场时间");
|
|
|
|
|
return false;
|
|
|
|
|
// }
|
|
|
|
|
if(this.$moment(this.form.time).format("HH")<9 || this.$moment(this.form.time).format("HH")>16){
|
|
|
|
|
this.util.toast("请选择正确的入场时间");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
// 大中型车按入场时间区分上午(type=2)/下午(type=4)
|
|
|
|
|
if (this.form.type == 2 || this.form.type == 4 || this.form.type == '2' || this.form.type == '4') {
|
|
|
|
|
const hour = parseInt(this.$moment(this.form.time).format('HH'))
|
|
|
|
|
const minute = parseInt(this.$moment(this.form.time).format('mm'))
|
|
|
|
|
if (hour >= 13) {
|
|
|
|
|
this.form.type = 4
|
|
|
|
|
} else if (hour < 12 || (hour === 12 && minute === 0)) {
|
|
|
|
|
this.form.type = 2
|
|
|
|
|
} else {
|
|
|
|
|
this.util.toast("12:00-13:00 为非入场时段,请选择上午或下午时间");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (this.form.plate.length != 7 && this.form.plate.length != 8) {
|
|
|
|
|
this.util.toast("请正确填写车牌号");
|
|
|
|
|
@ -382,10 +395,10 @@
|
|
|
|
|
if (!this.form.checkUser) {
|
|
|
|
|
this.util.toast("请阅读预约通知");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.form.time = this.timeFormat(this.form.time, 'yyyy-MM-DD HH:mm')
|
|
|
|
|
console.log(this.form.time)
|
|
|
|
|
this.form.time = this.timeFormat(this.form.time, 'yyyy-MM-DD HH:mm')
|
|
|
|
|
console.log(this.form.time)
|
|
|
|
|
// return
|
|
|
|
|
var that = this;
|
|
|
|
|
this.util.request({
|
|
|
|
|
@ -515,4 +528,4 @@
|
|
|
|
|
.richp {
|
|
|
|
|
margin-bottom: 10rpx
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
</style>
|
|
|
|
|
|