diff --git a/miniprogram/app.wxss b/miniprogram/app.wxss index 69d4ba9..5a7db5b 100644 --- a/miniprogram/app.wxss +++ b/miniprogram/app.wxss @@ -366,18 +366,20 @@ image { .submitBtn { box-sizing: border-box; - position: fixed; - z-index: 10; + /* position: fixed; */ + /* z-index: 10; */ width: 600rpx; - left: 50%; - transform: translateX(-50%); - bottom: 120rpx; + /* left: 50%; */ + /* transform: translateX(-50%); */ + /* bottom: 120rpx; */ border-radius: 10rpx; padding: 20rpx; background: #4e96f8; color: white; font-size: 30rpx; text-align: center; + margin: 0px auto; + margin-top: 50rpx; } .ellipsisFont { diff --git a/miniprogram/pages/meeting/meetingRoom/meetingBooked/meetingBooked.js b/miniprogram/pages/meeting/meetingRoom/meetingBooked/meetingBooked.js index 3608597..d16aeaa 100644 --- a/miniprogram/pages/meeting/meetingRoom/meetingBooked/meetingBooked.js +++ b/miniprogram/pages/meeting/meetingRoom/meetingBooked/meetingBooked.js @@ -72,18 +72,23 @@ Page({ }, // 选择-开始时间 onInputStartTime(event) { + let valueArr = event.detail.getValues() + let detail = valueArr[0] + ':' + valueArr[1] this.setData({ - startTime: event.detail, + startTime: detail, }) - this.setEndMaxTime(event.detail) + console.log(detail) + this.setEndMaxTime(detail) }, // 选择-结束时间 onInputEndTime(event) { - let _this = this; + let valueArr = event.detail.getValues() + let detail = valueArr[0] + ':' + valueArr[1] + console.log(detail) this.setData({ - endTime: event.detail, - }); + endTime: detail, + }) }, // 预约时间 @@ -162,7 +167,7 @@ Page({ // 上午,从6:00 - 12:00 _minTime = 6 _maxTime = 11 - _startTime = '8:30' + _startTime = '9:00' } else if (_timeRange === 2) { // 下午,从12:00 - 18:00 _minTime = 12 @@ -177,12 +182,12 @@ Page({ // let maxTime = new Date(_date) // maxTime.setFullYear(maxTime.getFullYear() + 3) this.setData({ - // startTime: _startTime, + startTime: _startTime, minTime: _minTime, maxTime: _maxTime // maxTime: maxTime.getTime() }) - // this.setEndMaxTime(this.data.startTime) + this.setEndMaxTime(this.data.startTime) // 设置最小时间 // this.setMinTime() }, @@ -216,6 +221,7 @@ Page({ _endMaxTime = 23 } this.setData({ + endTime: _endMinTime + ':' + '00', endMinTime: _endMinTime, endMaxTime: _endMaxTime }) diff --git a/miniprogram/pages/meeting/meetingRoom/meetingBooked/meetingBooked.wxml b/miniprogram/pages/meeting/meetingRoom/meetingBooked/meetingBooked.wxml index 6e27d00..90bfed4 100644 --- a/miniprogram/pages/meeting/meetingRoom/meetingBooked/meetingBooked.wxml +++ b/miniprogram/pages/meeting/meetingRoom/meetingBooked/meetingBooked.wxml @@ -21,7 +21,7 @@ - + 请选择结束时间 @@ -29,7 +29,7 @@ - + 确认时间 diff --git a/miniprogram/pages/meeting/meetingRoom/meetingBooked/meetingBooked.wxss b/miniprogram/pages/meeting/meetingRoom/meetingBooked/meetingBooked.wxss index 9c82c32..40dd179 100644 --- a/miniprogram/pages/meeting/meetingRoom/meetingBooked/meetingBooked.wxss +++ b/miniprogram/pages/meeting/meetingRoom/meetingBooked/meetingBooked.wxss @@ -72,7 +72,21 @@ } .submitBtn { - z-index: 0; + box-sizing: border-box; + position: fixed; + z-index: 10; + width: 600rpx; + left: 50%; + transform: translateX(-50%); + bottom: 120rpx; + border-radius: 10rpx; + padding: 20rpx; + background: #4e96f8; + color: white; + font-size: 30rpx; + text-align: center; + margin: 0px auto; + margin-top: 50rpx; } .selfPop { diff --git a/miniprogram/pages/meeting/meetingRoom/meetingOrder/meetingOrder.js b/miniprogram/pages/meeting/meetingRoom/meetingOrder/meetingOrder.js index deb807e..200579d 100644 --- a/miniprogram/pages/meeting/meetingRoom/meetingOrder/meetingOrder.js +++ b/miniprogram/pages/meeting/meetingRoom/meetingOrder/meetingOrder.js @@ -4,196 +4,249 @@ import Dialog from '@vant/weapp/dialog/dialog'; import Notify from '@vant/weapp/notify/notify'; import { - meetingRoomDetailRq, - getCustomerTicketRq, - calculateMeetingRoomAmountRq, - saveMeetingRecordRq, - saveChangyangMeetingRecordRq + meetingRoomDetailRq, + getCustomerTicketRq, + calculateMeetingRoomAmountRq, + saveMeetingRecordRq, + saveChangyangMeetingRecordRq, + meetingRoomBookedRecordRq } from "../../../../api/meeting/meetingRoom.js" import { - selfFormatTimeYMD, - selfFormatTimeHM, - twoTimeInterval, - selfArrSum + selfFormatTimeYMD, + selfFormatTimeHM, + twoTimeInterval, + selfArrSum } from "../../../../utils/util.js" Page({ - /** - * 页面的初始数据 - */ - data: { - IMG_NAME: app.IMG_NAME, - meetingRoomId: null, - startTime: null, - endTime: null, - selectDay: null, - selectCountTime: null, - bannerList: [], - room: {}, - userData: {}, - serviceList: [], - title: '', - personNum: '', - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - console.log('onLoad', options); - let selectCountTime = selfFormatTimeHM(options.startTime) + "-" + selfFormatTimeHM(options.endTime) + ' 共计' + twoTimeInterval(options.startTime, options.endTime) - this.setData({ - ...options, - userData: wx.getStorageSync('user'), - selectDay: selfFormatTimeYMD(options.startTime), - selectCountTime - }) - // 详细信息 - this.getDetail(); - }, + /** + * 页面的初始数据 + */ + data: { + id: '', + IMG_NAME: app.IMG_NAME, + detail: {}, + meetingRoomId: null, + startTime: null, + endTime: null, + selectDay: null, + selectCountTime: null, + bannerList: [], + room: {}, + userData: {}, + serviceList: [], + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + console.log('onLoad', options); + let selectCountTime = selfFormatTimeHM(options.startTime) + "-" + selfFormatTimeHM(options.endTime) + ' 共计' + twoTimeInterval(options.startTime, options.endTime) + this.setData({ + ...options, + userData: wx.getStorageSync('user'), + selectDay: selfFormatTimeYMD(options.startTime), + selectCountTime + }) // 详细信息 - getDetail() { - let _this = this; - meetingRoomDetailRq(this.data.meetingRoomId).then(res => { - let detail = res.roomContent; - let bannerList = [] - if (detail.indoorPicUrl) { - try { - bannerList = JSON.parse(detail.indoorPicUrl).map(item => item.url) - } catch (error) { - console.log(`JSON error : ${error}`); - } - } - _this.setData({ - room: detail, - bannerList - }) - }) - }, + this.getDetail(); + }, - // input修改监听 - inputChange(e) { - console.log('input change', e); - let _this = this - let name = e.currentTarget.dataset.name - let value = e.detail - let data = _this.data - data[name] = value - this.setData({ - ...data - }) - }, - - // 跳转-空间设施 - jumpMeetingFacilities() { - let meetingRoomId = this.data.meetingRoomId; - let serviceListJsonStr = JSON.stringify(this.data.serviceList) - wx.navigateTo({ - url: `/pages/meeting/meetingRoom/meetingService/meetingService?meetingRoomId=${meetingRoomId}&serviceList=${serviceListJsonStr}` - }) - }, - - - // 提交订单 - submitCase() { - let _this = this - // 参数校验 - if (!_this.data.title) { - // 错误提示 - Notify({ - type: 'danger', - message: '请输入会议主题!' - }); - return; + // 详细信息 + getDetail() { + let _this = this; + let _dataId = _this.data.id + if (_dataId === '') { + // 为新增,新增的会议室id是传来的 + let _meetingRoomId = _this.data.meetingRoomId + _this.getRoomInfo(_meetingRoomId) + _this.setData({ + detail: { + orderUser: _this.data.userData.username, + orderTel: _this.data.userData.mobile, + title: '', + personNum: '', + leader: '', + depName: '', + remark: '' } - if (_this.data.personNum == '') { - // 错误提示 - Notify({ - type: 'danger', - message: '请输入参会人数!' - }); - return; - } - - saveChangyangMeetingRecordRq({ - "roomContentId": _this.data.meetingRoomId, - "userId": _this.data.userData.id, - "customerId": _this.data.userData.icsCustomerId, - "title": _this.data.title, - "personNum": _this.data.personNum, - "startTime": _this.data.startTime, - "endDate": _this.data.endTime, - "orderMoney": 0, - "reservationServes" : _this.data.serviceList, - }).then(res => { - console.log('saveMeetingRecordRq', res); - if (res.code == 0) { - wx.reLaunch({ - url: '/pages/meeting/pay/waitComplete/waitComplete', - }) - - } else { - // 错误提示 - Notify({ - type: 'danger', - message: res.msg - }); - } - }) - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - console.log('onShow'); - let _this = this - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - + }) + } else { + // 为编辑,此时根据id获取信息,获取信息后其中有roomId + meetingRoomBookedRecordRq(_dataId).then(res => { + console.log(res) + }) } + }, + + getRoomInfo(roomId) { + // 获取会议室详情 + let _this = this + meetingRoomDetailRq(this.data.meetingRoomId).then(res => { + let detail = res.roomContent; + let bannerList = [] + if (detail.indoorPicUrl) { + try { + bannerList = JSON.parse(detail.indoorPicUrl).map(item => item.url) + } catch (error) { + console.log(`JSON error : ${error}`); + } + } + _this.setData({ + room: detail, + bannerList + }) + }) + }, + + // input修改监听 + inputChange(e) { + console.log('input change', e); + let _this = this + let name = e.currentTarget.dataset.name + let value = e.detail + let data = _this.data + data['detail'][name] = value + this.setData({ + ...data + }) + }, + + // 跳转-空间设施 + jumpMeetingFacilities() { + let meetingRoomId = this.data.meetingRoomId; + let serviceListJsonStr = JSON.stringify(this.data.serviceList) + wx.navigateTo({ + url: `/pages/meeting/meetingRoom/meetingService/meetingService?meetingRoomId=${meetingRoomId}&serviceList=${serviceListJsonStr}` + }) + }, + + // 提交订单 + submitCase() { + let _this = this + // 参数校验 + if (!_this.data.detail.title) { + // 错误提示 + Notify({ + type: 'danger', + message: '请输入会议名称!' + }); + return; + } + if (_this.data.detail.personNum == '') { + // 错误提示 + Notify({ + type: 'danger', + message: '请输入参会人数!' + }); + return; + } + // if (_this.data.detail.orderName == '') { + // // 错误提示 + // Notify({ + // type: 'danger', + // message: '无队名单位!' + // }); + // return; + // } + if (_this.data.detail.orderUser == '') { + // 错误提示 + Notify({ + type: 'danger', + message: '请输入预约人!' + }); + return; + } + if (_this.data.detail.orderTel == '') { + // 错误提示 + Notify({ + type: 'danger', + message: '请输入联系方式!' + }); + return; + } + saveChangyangMeetingRecordRq({ + "roomContentId": _this.data.meetingRoomId, + "userId": _this.data.userData.id, + "customerId": _this.data.userData.icsCustomerId, + "title": _this.data.detail.title, + "personNum": _this.data.detail.personNum, + "startTime": _this.data.startTime, + "endDate": _this.data.endTime, + "orderMoney": 0, + "reservationServes": _this.data.serviceList, + "remark": _this.data.detail.remark, + "orderUser": _this.data.detail.orderUser, + "orderTel": _this.data.detail.orderTel, + "parkId": 25, // 写死,园区ID + }).then(res => { + console.log('saveMeetingRecordRq', res); + if (res.code == 0) { + wx.reLaunch({ + url: '/pages/meeting/pay/waitComplete/waitComplete?id=' + res.reservationId, + }) + } else { + // 错误提示 + Notify({ + type: 'danger', + message: res.msg + }); + } + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + console.log('onShow'); + let _this = this + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } }) \ No newline at end of file diff --git a/miniprogram/pages/meeting/meetingRoom/meetingOrder/meetingOrder.wxml b/miniprogram/pages/meeting/meetingRoom/meetingOrder/meetingOrder.wxml index 7ed4206..fd79746 100644 --- a/miniprogram/pages/meeting/meetingRoom/meetingOrder/meetingOrder.wxml +++ b/miniprogram/pages/meeting/meetingRoom/meetingOrder/meetingOrder.wxml @@ -34,24 +34,54 @@ {{selectCountTime}} - + - 会议主题 + 会议名称 - + 参会人数 - + + + + + 参会领导 + + + + + + 预约部门 + + + + + + 预约人 + + + + + + 联系方式 + + + + + + 备注(选填) + + diff --git a/miniprogram/pages/meeting/meetingRoom/meetingRoom.js b/miniprogram/pages/meeting/meetingRoom/meetingRoom.js index 80b5618..2765cce 100644 --- a/miniprogram/pages/meeting/meetingRoom/meetingRoom.js +++ b/miniprogram/pages/meeting/meetingRoom/meetingRoom.js @@ -1,168 +1,209 @@ const app = getApp() import { - meetingRoomDetailRq, - selectCoordinateRq + meetingRoomDetailRq, + selectCoordinateRq, + meetingRoomBookedRecordRq } from "../../../api/meeting/meetingRoom.js" Page({ - /** - * 页面的初始数据 - */ - data: { - IMG_NAME: app.IMG_NAME, - meetingRoomId: null, - date: '', - timeRange: '', - detail: {}, - bannerList: [], - mapData: {}, - resList: [{ - date: '2024年9月18日', - time: '14:00 - 17:30', - user: '王XX', - dep: '司法局', - tel: '15811111111' - },{ - date: '2024年9月19日', - time: '14:00 - 17:30', - user: '王XX', - dep: '司法局', - tel: '15811111111' - }], - canRes: true // 是否允许预约 - }, + /** + * 页面的初始数据 + */ + data: { + IMG_NAME: app.IMG_NAME, + meetingRoomId: null, + date: '', + timeRange: '', + detail: {}, + bannerList: [], + mapData: {}, + recordList: [{ + date: '2024年9月18日', + time: '14:00 - 17:30', + user: '王XX', + dep: '司法局', + tel: '15811111111' + }, { + date: '2024年9月19日', + time: '14:00 - 17:30', + user: '王XX', + dep: '司法局', + tel: '15811111111' + }], + canRes: true // 是否允许预约 + }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - let _this = this; - console.log('onLoad', options); - let time = options.time - let timeRange = options.timeRange - _this.setData({ - date: time, - timeRange: timeRange - }) - let meetingRoomId = options.id; - meetingRoomDetailRq(meetingRoomId).then(res => { - console.log('meetingRoomDetailRq', res); - let detail = res.roomContent; - let bannerList = [] - if (detail.indoorPicUrl) { - try { - bannerList = JSON.parse(detail.indoorPicUrl).map(item=>item.url) - } catch (error) { - console.log(`JSON error : ${error}`); - } - } - _this.setData({ - meetingRoomId, - detail, - bannerList - }) - }) - // 获取地址信息 - // _this.getAddress() - }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + let _this = this; + console.log('onLoad', options); + let time = options.time + let timeRange = options.timeRange + _this.setData({ + date: time, + timeRange: timeRange + }) + let meetingRoomId = options.id; + meetingRoomDetailRq(meetingRoomId).then(res => { + console.log('meetingRoomDetailRq', res); + let detail = res.roomContent; + let bannerList = [] + if (detail.indoorPicUrl) { + try { + bannerList = JSON.parse(detail.indoorPicUrl).map(item => item.url) + } catch (error) { + console.log(`JSON error : ${error}`); + } + } + _this.setData({ + meetingRoomId, + detail, + bannerList + }) + }) + meetingRoomBookedRecordRq(meetingRoomId).then(res => { + console.log('meetingRoomBookedRecordRq', res); + let _recordList = [] + for (let key in res.data) { + let eachObj = res.data[key] + let _date = eachObj['nowDate'] + let _dataList = eachObj['reservations'] + for (let i in _dataList) { + let dateObj = _dataList[i] + let _eachData = { + date: _date, + time: dateObj.startTime.substr(11, 5) + ' - ' + dateObj.endDate.substr(11, 5), + user: dateObj.userName, + dep: '暂无', + tel: dateObj.phone, + } + _recordList.push(_eachData) + } + } + _this.setData({ + recordList: _recordList + }) + // console.log(_recordList) + // let recordList = res.data; + // recordList.map(item => { + // item.nowDate = item.nowDate.substring(0, 10); + // item.reservations = item.reservations.map(record => { + // record.startTime = record.startTime.substring(11) + // record.endDate = record.endDate.substring(11) + // record.userName = record.userName.substring(0, 1) + "某" + // record.phone = record.phone.substring(0, 3) + "****" + record.phone.substring(7, record.phone.length) + // return record; + // }) + // return item + // }) + // _this.setData({ + // recordList + // }) + // console.log(_this.data.recordList) + }) + // 获取地址信息 + // _this.getAddress() + }, - // 获取地址信息(不需要地址) - getAddress() { - let _this = this; - selectCoordinateRq().then(res => { - _this.setData({ - address: res, - mapData: { - latitude: res.lat, - longitude: res.lng, - markers: [{ - id: 1, - latitude: res.lat, - longitude: res.lng, - title: res.address, - }] - }, - }) - }) - }, + // 获取地址信息(不需要地址) + getAddress() { + let _this = this; + selectCoordinateRq().then(res => { + _this.setData({ + address: res, + mapData: { + latitude: res.lat, + longitude: res.lng, + markers: [{ + id: 1, + latitude: res.lat, + longitude: res.lng, + title: res.address, + }] + }, + }) + }) + }, - // 打开地图 - openMap(e) { - console.log('openMap', e); - let _this = this; - wx.openLocation({ - name: _this.data.address.address, - latitude: _this.data.address.lat, - longitude: _this.data.address.lng, - }) - }, + // 打开地图,不需要地图 + openMap(e) { + console.log('openMap', e); + let _this = this; + wx.openLocation({ + name: _this.data.address.address, + latitude: _this.data.address.lat, + longitude: _this.data.address.lng, + }) + }, - // 跳转空间设施 - jumpMeetingFacilities() { - let meetingRoomId = this.data.meetingRoomId; - wx.navigateTo({ - url: '/pages/meeting/meetingRoom/meetingFacilities/meetingFacilities?meetingRoomId=' + meetingRoomId, - }) - }, + // 跳转空间设施,不需要 + jumpMeetingFacilities() { + let meetingRoomId = this.data.meetingRoomId; + wx.navigateTo({ + url: '/pages/meeting/meetingRoom/meetingFacilities/meetingFacilities?meetingRoomId=' + meetingRoomId, + }) + }, - // 跳转-会议室已预约 - jumpMeetingBooked() { - let meetingRoomId = this.data.meetingRoomId; - let time = this.data.date - let timeRange = this.data.timeRange - wx.navigateTo({ - url: "/pages/meeting/meetingRoom/meetingBooked/meetingBooked?meetingRoomId=" + meetingRoomId + '&time=' + time + '&timeRange=' + timeRange, - }) - }, + // 跳转-会议室已预约 + jumpMeetingBooked() { + let meetingRoomId = this.data.meetingRoomId; + let time = this.data.date + let timeRange = this.data.timeRange + wx.navigateTo({ + url: "/pages/meeting/meetingRoom/meetingBooked/meetingBooked?meetingRoomId=" + meetingRoomId + '&time=' + time + '&timeRange=' + timeRange, + }) + }, - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { - }, + }, - /** - * 生命周期函数--监听页面显示 - */ - onShow() { + /** + * 生命周期函数--监听页面显示 + */ + onShow() { - }, + }, - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { - }, + }, - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { - }, + }, - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { - }, + }, - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { - }, + }, - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { - } + } }) \ No newline at end of file diff --git a/miniprogram/pages/meeting/meetingRoom/meetingRoom.wxml b/miniprogram/pages/meeting/meetingRoom/meetingRoom.wxml index ff638d9..3723d70 100644 --- a/miniprogram/pages/meeting/meetingRoom/meetingRoom.wxml +++ b/miniprogram/pages/meeting/meetingRoom/meetingRoom.wxml @@ -27,7 +27,7 @@ 预约情况 - + diff --git a/miniprogram/pages/meeting/pay/waitComplete/waitComplete.js b/miniprogram/pages/meeting/pay/waitComplete/waitComplete.js index 6a6857b..b370455 100644 --- a/miniprogram/pages/meeting/pay/waitComplete/waitComplete.js +++ b/miniprogram/pages/meeting/pay/waitComplete/waitComplete.js @@ -1,75 +1,76 @@ Page({ - /** - * 页面的初始数据 - */ - data: { + /** + * 页面的初始数据 + */ + data: { + id: '' + }, - }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + let _this = this; + _this.setData({ + ...options + }) + }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - let _this = this; - _this.setData({ - ...options - }) - }, + // 跳转-会议预约记录 + jumpMeetingRecord() { + let _id = this.data.id + wx.reLaunch({ + url: "/pages/meeting/reservationRecord/meetingRecord/meetingRecord", + }) + }, - // 跳转-会议预约记录 - jumpMeetingRecord() { - wx.reLaunch({ - url: "/pages/meeting/reservationRecord/meetingRecord/meetingRecord", - }) - }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { + }, - }, + /** + * 生命周期函数--监听页面显示 + */ + onShow() { - /** - * 生命周期函数--监听页面显示 - */ - onShow() { + }, - }, + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { + }, - }, + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { + }, - }, + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { + }, - }, + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { + }, - }, + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } + } }) \ No newline at end of file diff --git a/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingDetail/meetingDetail.wxml b/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingDetail/meetingDetail.wxml index 3589cc0..e02cb54 100644 --- a/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingDetail/meetingDetail.wxml +++ b/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingDetail/meetingDetail.wxml @@ -4,8 +4,8 @@ - {{detail.roomContent.capacityNum}}人间 | {{detail.roomContent.roomName}} | {{detail.roomContent.buildingName}} - {{detail.title}} + {{detail.roomContent.buildingName}} | {{detail.roomContent.roomName}} | {{detail.roomContent.capacityNum}}人 | {{detail.roomContent.shape}} + {{detail.roomContent.meetingName}} {{detail.timeSlot}} + + 预约情况 + + 预约状态 + {{detail.statusName}} + + + 取消原因 + {{detail.cancelResaon}} + + + 基本信息 @@ -23,13 +35,21 @@ {{detail.timeSlot}} 共计{{detail.countTime}}小时 - 会议主题 + 会议名称 {{detail.title}} 参会人数 {{detail.personNum}} + + 参会领导 + {{detail.leader}} + + + 预约部门 + {{detail.depName}} + 会议预约人 {{detail.userName}} @@ -39,24 +59,16 @@ {{detail.phone}} - 预约状态 - {{detail.statusName}} + 备注 + {{detail.remark}} + - 空间设施 - - - - - - {{serviceItem.name}} - - + 会议室设备 + + {{item.name}} - - - 取消原因 - {{detail.cancelResaon}} + 会议服务 @@ -72,7 +84,7 @@ - + - 去邀请 + 取消预约 diff --git a/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.js b/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.js index 714c019..a8d7bbd 100644 --- a/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.js +++ b/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.js @@ -29,11 +29,11 @@ Page({ reservationPageSize: 10, reservationDataList: [], reservationIsDataAll: false, - // 参与记录参数 - participatePageNum: 1, - participatePageSize: 10, - participateDataList: [], - participateIsDataAll: false, + // 参与记录参数,不需要 + // participatePageNum: 1, + // participatePageSize: 10, + // participateDataList: [], + // participateIsDataAll: false, }, /** @@ -53,11 +53,11 @@ Page({ pageSize: _this.data.reservationPageSize, }) // 获取参与数据 - _this.getParticipateData({ - userId, - pageNum: _this.data.participatePageNum, - pageSize: _this.data.participatePageSize - }) + // _this.getParticipateData({ + // userId, + // pageNum: _this.data.participatePageNum, + // pageSize: _this.data.participatePageSize + // }) }, // 获取数据 @@ -69,24 +69,28 @@ Page({ let isDataAll = null let pageNum = null let pageSize = null - if (tabTitle == '预约记录') { - // 预约记录参数 - isDataAll = _this.data.reservationIsDataAll - pageNum = _this.data.reservationPageNum - pageSize = _this.data.reservationPageSize + // 预约记录参数,目前只保留预约记录,其余去掉 + isDataAll = _this.data.reservationIsDataAll + pageNum = _this.data.reservationPageNum + pageSize = _this.data.reservationPageSize + // if (tabTitle == '预约记录') { + // // 预约记录参数 + // isDataAll = _this.data.reservationIsDataAll + // pageNum = _this.data.reservationPageNum + // pageSize = _this.data.reservationPageSize - } else if (tabTitle == '预约记录') { - // 参与记录参数 - isDataAll = _this.data.participateIsDataAll - pageNum = _this.data.participatePageNum - pageSize = _this.data.participatePageSize - } else { - wx.showToast({ - title: `tab 切换错误(${tabTitle})`, - icon: 'none', - }); - return; - } + // } else if (tabTitle == '预约记录') { + // // 参与记录参数 + // isDataAll = _this.data.participateIsDataAll + // pageNum = _this.data.participatePageNum + // pageSize = _this.data.participatePageSize + // } else { + // wx.showToast({ + // title: `tab 切换错误(${tabTitle})`, + // icon: 'none', + // }); + // return; + // } // 判断数据是否已全部加载 if (isDataAll) { @@ -98,13 +102,14 @@ Page({ pageNum, pageSize } - if (tabTitle == '预约记录') { - // 获取预约数据 - _this.getReservationData(param) - } else if (tabTitle == '预约记录') { - // 获取参与数据 - _this.getParticipateData(param) - } + _this.getReservationData(param) + // if (tabTitle == '预约记录') { + // // 获取预约数据 + // _this.getReservationData(param) + // } else if (tabTitle == '预约记录') { + // // 获取参与数据 + // _this.getParticipateData(param) + // } }, // 获取预约数据 @@ -119,7 +124,8 @@ Page({ selectReservationListByUserIdRq({ pageNum, pageSize, - userId + userId, + parkId: 25, }).then(res => { console.log('selectReservationListByUserIdRq', res); // 判断数据是否全部查询 @@ -140,7 +146,7 @@ Page({ }) }, - // 获取参与数据 + // 获取参与数据,此处不需要 getParticipateData(param) { let _this = this; let { @@ -244,8 +250,9 @@ Page({ }, - // 跳转-支付 + // 跳转-支付,此处不需要 jumpPay(e) { + return console.log('jumpPay', e); wx.navigateTo({ url: "/pages/meeting/pay/waitPay/waitPay?id=" + e.currentTarget.dataset.id + "&type=meetingRoom" @@ -263,6 +270,7 @@ Page({ // 跳转-参与详情 jumpParticipateDetail(e) { + return console.log('jumpParticipateDetail', e); let id = e.currentTarget.dataset.id wx.navigateTo({ @@ -272,6 +280,7 @@ Page({ // tab 点击切换 tabClickSwitch(event) { + return console.log('tabClickSwitch', event); let _this = this; _this.setData({ @@ -345,9 +354,9 @@ Page({ reservationDataList: [], reservationIsDataAll: false, // 参与记录参数 - participatePageNum: 1, - participateDataList: [], - participateIsDataAll: false, + // participatePageNum: 1, + // participateDataList: [], + // participateIsDataAll: false, }) // 获取数据 @@ -359,11 +368,11 @@ Page({ pageSize: _this.data.reservationPageSize, }) // 获取参与数据 - _this.getParticipateData({ - userId, - pageNum: _this.data.participatePageNum, - pageSize: _this.data.participatePageSize - }) + // _this.getParticipateData({ + // userId, + // pageNum: _this.data.participatePageNum, + // pageSize: _this.data.participatePageSize + // }) } }, @@ -386,7 +395,6 @@ Page({ */ onPullDownRefresh() { console.log('onPullDownRefresh', '页面相关事件处理函数--监听用户下拉动作'); - }, /** diff --git a/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.json b/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.json index 81a5563..1661855 100644 --- a/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.json +++ b/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.json @@ -6,6 +6,6 @@ "van-dialog": "@vant/weapp/dialog/index", "van-notify": "@vant/weapp/notify/index" }, - "navigationBarTitleText": "会议预约记录", + "navigationBarTitleText": "预约记录", "onReachBottomDistance": 100 } \ No newline at end of file diff --git a/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.wxml b/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.wxml index 24cb317..98076f2 100644 --- a/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.wxml +++ b/miniprogram/pages/meeting/reservationRecord/meetingRecord/meetingRecord.wxml @@ -1,5 +1,5 @@ - + - 去邀请 @@ -54,11 +49,39 @@ 数据已全部加载 - + --> - - - - + + + {{item.title}} + {{item.statusName}} + + + + + {{item.roomContent.buildingName}} | {{item.roomContent.roomName}} | {{item.roomContent.capacityNum}} | {{item.roomContent.shape}} + 预约人: {{item.createBy}} + {{item.timeSlot}} + + + + 取消原因: {{item.cancelResaon}} + + + + 取消预约 + 查看详情 + + + + 数据已全部加载 + + + + + + \ No newline at end of file