feat: 会议室预约日期回显

This commit is contained in:
caoqianming 2025-10-17 16:53:20 +08:00
parent a760b02897
commit 0728951740
1 changed files with 12 additions and 8 deletions

View File

@ -1,7 +1,7 @@
<template>
<view class="container">
<scroll-view scroll-y style="padding-bottom: 180rpx;background-color: #fff;">
<uni-forms v-model="form" label-width="160rpx">
<uni-forms v-model="form" label-width="200rpx">
<ticketd :ticket_="form.ticket_"></ticketd>
<uni-forms-item label="会议名称" required>
<uni-easyinput v-model="form.title" placeholder="请输入会议名称" :disabled="mode=='show'"/>
@ -11,18 +11,20 @@
v-model="form.mroom"
:localdata="mroomList"
:disabled="mode=='show'"
@change="mdateChange"
></uni-data-select>
</uni-forms-item>
<uni-forms-item label="预约日期" required>
<uni-datetime-picker type="date" :clear-icon="false" v-model="form.mdate" @change="mdateChange"
v-if="mode!='show'"/>
<span v-else>{{form.mdate}}</span>
</uni-forms-item>
<uni-forms-item label="参加人数" required>
<uni-number-box v-model="form.participant_count" :disabled="mode=='show'"></uni-number-box>
</uni-forms-item>
<uni-forms-item label="参会领导">
<uni-easyinput v-model="form.key_participants" :disabled="mode=='show'"/>
</uni-forms-item>
<uni-forms-item label="预约日期" required>
<uni-datetime-picker type="date" :clear-icon="false" v-model="form.mdate" @change="mdateChange" v-if="mode!='show'"/>
<span v-else>{{form.mdate}}</span>
</uni-forms-item>
<uni-forms-item label="备注">
<uni-easyinput v-model="form.note" :disabled="mode=='show'"/>
</uni-forms-item>
@ -30,7 +32,7 @@
<span v-for="item in form.time_ranges" :key="item">{{item}}</span>
</uni-forms-item>
</uni-forms>
<view class="timeView" v-if="mode != 'show'">
<view class="timeView" v-show="mode != 'show'">
<view style="height: 70upx;line-height: 70upx;">
<text>凌晨</text>
<view class="iconsWrap" @click="showAmChange">
@ -163,6 +165,7 @@ import {actStateEnum} from "@/utils/enum.js"
}else{
that.mode = "show";
}
that.mdateChange()
}else{
that.form = uni.getStorageSync("currentBooking");
}
@ -247,7 +250,7 @@ import {actStateEnum} from "@/utils/enum.js"
}
},
mdateChange(){
if(this.form.mroom!==''&&this.form.mroom!==null){
if(this.form.mroom&&this.form.mdate){
this.getmRoomSlot();
}
},
@ -257,6 +260,7 @@ import {actStateEnum} from "@/utils/enum.js"
form.page = 0;
form.mroom = that.form.mroom;
form.mdate = that.form.mdate;
form.is_inuse = true;
that.timesListAm.forEach(slot=>{
slot.sloted = false;
})
@ -268,7 +272,7 @@ import {actStateEnum} from "@/utils/enum.js"
if(item.slot<12){
that.timesListAm[item.slot].sloted = true;
}else{
that.timesListPm[item.slot].sloted = true;
that.timesListPm[item.slot-12].sloted = true;
}
})