|
|
|
|
@ -23,14 +23,17 @@
|
|
|
|
|
<u-form-item label="车牌" prop="plate">
|
|
|
|
|
<u-button size="mini" type="primary" @click="openPlate(-1)">新增</u-button>
|
|
|
|
|
<view v-for="(item,index) in plateList">
|
|
|
|
|
<view v-if="plateList[index]['show']" style="display: flex;justify-content: space-between;align-items: center;">
|
|
|
|
|
<u-input :placeholder="''" v-model="plateList[index]['plate']" :disabled="true" @click="openPlate(index)"/>
|
|
|
|
|
<view v-if="plateList[index]['show']"
|
|
|
|
|
style="display: flex;justify-content: space-between;align-items: center;">
|
|
|
|
|
<u-input :placeholder="''" v-model="plateList[index]['plate']" :disabled="true"
|
|
|
|
|
@click="openPlate(index)" />
|
|
|
|
|
<u-button size="mini" type="error" @click="delPlate(index)">删除</u-button>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<u-form-item label="同行人" prop="accompany">
|
|
|
|
|
<u-button size="mini" :disabled="isTotal" :type="isTotal?'':'primary'" @click="addAccompany">新增</u-button>
|
|
|
|
|
<u-button size="mini" :disabled="isTotal" :type="isTotal?'':'primary'"
|
|
|
|
|
@click="addAccompany">新增</u-button>
|
|
|
|
|
<text v-if="siteTotal && siteTotal>0">当前场地最多可预约{{siteTotal}}人</text>
|
|
|
|
|
<u-table>
|
|
|
|
|
<u-tr>
|
|
|
|
|
@ -55,9 +58,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<u-picker @confirm="dateConfirm" mode="time" v-model="dateShow" :params="dateParams"></u-picker>
|
|
|
|
|
<timeSlot ref="timeslot" :title="'选择时间段'"
|
|
|
|
|
:min="hMin" :max="hMax"
|
|
|
|
|
@confirm="confirmTime"></timeSlot>
|
|
|
|
|
<timeSlot ref="timeslot" :title="'选择时间段'" :min="hMin" :max="hMax" @confirm="confirmTime"></timeSlot>
|
|
|
|
|
<u-picker @confirm="siteConfirm" v-model="siteShow" :range="siteList" range-key="name"
|
|
|
|
|
mode="selector"></u-picker>
|
|
|
|
|
|
|
|
|
|
@ -66,7 +67,8 @@
|
|
|
|
|
<u-popup v-model="showPlate" mode="bottom">
|
|
|
|
|
<view class="modal-tip">车牌号</view>
|
|
|
|
|
<view class="modal-content" style="height:400rpx">
|
|
|
|
|
<plate ref="plates" @listenPlateChange="(val)=>{plateChange(val,index)}" :defaultPlate="plateNumber" />
|
|
|
|
|
<plate ref="plates" @listenPlateChange="(val)=>{plateChange(val,index)}"
|
|
|
|
|
:defaultPlate="plateNumber" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="form-btn" @click="confirmPlate">
|
|
|
|
|
<view type="primary">确认</view>
|
|
|
|
|
@ -91,6 +93,20 @@
|
|
|
|
|
</view>
|
|
|
|
|
</u-popup>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 预约须知 -->
|
|
|
|
|
<u-modal v-model="showTips" negative-top="400" :show-cancel-button="false" :show-confirm-button="false"
|
|
|
|
|
:show-title="false">
|
|
|
|
|
<view class="slot-content">
|
|
|
|
|
<view class="slot-content-title">预约须知</view>
|
|
|
|
|
<view class="slot-content-input">
|
|
|
|
|
<view>1、使用权限:仅限校友本人使用,不可代为预约,否则取消预约资格。</view>
|
|
|
|
|
<view>2、图书馆禁止饮食、抽烟。</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="slot-content-btn" style="padding-top:30rpx">
|
|
|
|
|
<view @click="confirmTips = true,showTips=false">我已知晓</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</u-modal>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@ -107,6 +123,8 @@
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
dateShow: false,
|
|
|
|
|
showTips: false,
|
|
|
|
|
confirmTips: false,
|
|
|
|
|
hMin: 0,
|
|
|
|
|
hMax: 24,
|
|
|
|
|
appoinementType: '',
|
|
|
|
|
@ -276,8 +294,8 @@
|
|
|
|
|
this.base.toast("请输入车牌号")
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if(this.base.isNull(this.plateList[this.plateIndex]['plate'])
|
|
|
|
|
|| this.plateList[this.plateIndex]['plate'].length<7){
|
|
|
|
|
if (this.base.isNull(this.plateList[this.plateIndex]['plate']) ||
|
|
|
|
|
this.plateList[this.plateIndex]['plate'].length < 7) {
|
|
|
|
|
this.base.toast("请输入正确的车牌号")
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
@ -340,6 +358,10 @@
|
|
|
|
|
// })
|
|
|
|
|
this.$refs.uForm.validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if(!this.confirmTips){
|
|
|
|
|
this.showTips = true
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
start_time = this.form.date + ' ' + this.form.start_time + ':00'
|
|
|
|
|
end_time = this.form.date + ' ' + this.form.end_time + ':00'
|
|
|
|
|
this.form.accompany_total = this.form.accompany.length
|
|
|
|
|
@ -382,12 +404,12 @@
|
|
|
|
|
if (res.subscriptionsSetting.itemSettings && res.subscriptionsSetting.itemSettings[
|
|
|
|
|
'0WMaFZ_0FOS5gtxEAi-fM3pFcYPySRMwYFNASz9oig0'] === 'accept') {
|
|
|
|
|
// 用户已经订阅该消息模板,执行相应操作
|
|
|
|
|
that.base.toast("预约已提交",2000,function(){
|
|
|
|
|
that.base.toast("预约已提交", 1500, function() {
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
uni.redirectTo({
|
|
|
|
|
url: '/packages/mybook/index'
|
|
|
|
|
})
|
|
|
|
|
},2000)
|
|
|
|
|
}, 1000)
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
// 用户没有订阅该消息模板,显示订阅弹窗
|
|
|
|
|
@ -401,31 +423,31 @@
|
|
|
|
|
'0WMaFZ_0FOS5gtxEAi-fM3pFcYPySRMwYFNASz9oig0',
|
|
|
|
|
],
|
|
|
|
|
success(res) {
|
|
|
|
|
that.base.toast("预约已提交",2000,function(){
|
|
|
|
|
that.base.toast("预约已提交", 1500, function() {
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
uni.redirectTo({
|
|
|
|
|
url: '/packages/mybook/index'
|
|
|
|
|
})
|
|
|
|
|
},2000)
|
|
|
|
|
}, 1000)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
fail(err) {
|
|
|
|
|
that.base.toast("预约已提交",2000,function(){
|
|
|
|
|
that.base.toast("预约已提交", 1500, function() {
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
uni.redirectTo({
|
|
|
|
|
url: '/packages/mybook/index'
|
|
|
|
|
})
|
|
|
|
|
},2000)
|
|
|
|
|
}, 1000)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
that.base.toast("预约已提交",2000,function(){
|
|
|
|
|
that.base.toast("预约已提交", 1500, function() {
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
uni.redirectTo({
|
|
|
|
|
url: '/packages/mybook/index'
|
|
|
|
|
})
|
|
|
|
|
},2000)
|
|
|
|
|
}, 1000)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -433,12 +455,12 @@
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
that.base.toast("预约已提交",2000,function(){
|
|
|
|
|
that.base.toast("预约已提交", 1500, function() {
|
|
|
|
|
setTimeout(function() {
|
|
|
|
|
uni.redirectTo({
|
|
|
|
|
url: '/packages/mybook/index'
|
|
|
|
|
})
|
|
|
|
|
},2000)
|
|
|
|
|
}, 1000)
|
|
|
|
|
})
|
|
|
|
|
// 用户尚未开启订阅消息总开关,建议提醒用户开启
|
|
|
|
|
}
|
|
|
|
|
@ -454,6 +476,7 @@
|
|
|
|
|
padding: 30rpx;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100vh;
|
|
|
|
|
|
|
|
|
|
.cbg {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0;
|
|
|
|
|
@ -461,6 +484,7 @@
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100vh;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.wrap {
|
|
|
|
|
background: #fff;
|
|
|
|
|
position: relative;
|
|
|
|
|
@ -470,10 +494,48 @@
|
|
|
|
|
height: 100%;
|
|
|
|
|
overflow: scroll;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.slot-content {
|
|
|
|
|
padding: 30rpx;
|
|
|
|
|
padding-top: 20rpx;
|
|
|
|
|
|
|
|
|
|
&>view {
|
|
|
|
|
padding-top: 20rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-title {
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-input {
|
|
|
|
|
height: 300rpx;
|
|
|
|
|
line-height: 1.6;
|
|
|
|
|
overflow: scroll;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&-btn {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
padding: 30rpx 0;
|
|
|
|
|
|
|
|
|
|
&>view {
|
|
|
|
|
width: 40%;
|
|
|
|
|
text-align: center;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
color: #fff;
|
|
|
|
|
background: linear-gradient(to right, #5e5fbc, #0d0398);
|
|
|
|
|
border-radius: 30rpx;
|
|
|
|
|
padding: 10rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.form-btn {
|
|
|
|
|
width: 100%;
|
|
|
|
|
position: relative;
|
|
|
|
|
padding: 60rpx 0;
|
|
|
|
|
|
|
|
|
|
// z-index:9999;
|
|
|
|
|
&>view {
|
|
|
|
|
width: 70%;
|
|
|
|
|
@ -485,6 +547,7 @@
|
|
|
|
|
padding: 20rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.modal {
|
|
|
|
|
::v-deep .u-drawer-bottom {
|
|
|
|
|
border-radius: 40rpx;
|
|
|
|
|
|