大车位下午

master
lion 1 week ago
parent b47816a4b4
commit 0c587f2e58

@ -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>

@ -38,7 +38,7 @@
<view class="parkbox-content flex-row justify-around">
<view class="parkbox-item flex-row align-center" style="margin-right: 10rpx;padding: 28rpx 20rpx;"
@click="handleSelectPark(2)" :class="(currentPark==2?'parkbox-item-on':'')"
v-if="remain_big_park>0">
v-if="remain_big_park>0 || remain_big_park2>0">
<view class="parkbox-item-status" v-if="currentPark==2">
<u-icon name="checkmark" color="#fff" size="20rpx"></u-icon>
</view>
@ -86,7 +86,7 @@
</view>
<view class="parkbox-item flex-row align-center" style=""
v-if="remain_special_park<=0&&remain_big_park<=0&&remain_small_park<=0">
v-if="remain_special_park<=0&&remain_big_park<=0&&remain_big_park2<=0&&remain_small_park<=0">
<text class="iconfont icon-tingchechang1" style="font-size: 28rpx;"></text>
<view>
@ -138,7 +138,7 @@
<view class="parkbox-content flex-row justify-around">
<view class="parkbox-item flex-row align-center" style="margin-right: 10rpx;padding: 28rpx 20rpx;"
@click="handleSelectPark(2)" :class="(currentPark==2?'parkbox-item-on':'')"
v-if="remain_big_park>0">
v-if="remain_big_park>0 || remain_big_park2>0">
<view class="parkbox-item-status" v-if="currentPark==2">
<u-icon name="checkmark" color="#fff" size="20rpx"></u-icon>
</view>
@ -186,7 +186,7 @@
</view>
<view class="parkbox-item flex-row align-center" style=""
v-if="remain_special_park<=0&&remain_big_park<=0&&remain_small_park<=0">
v-if="remain_special_park<=0&&remain_big_park<=0&&remain_big_park2<=0&&remain_small_park<=0">
<text class="iconfont icon-tingchechang1" style="font-size: 28rpx;"></text>
<view>

Loading…
Cancel
Save