mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 21:19:37 +08:00
会议预约功能完善
预约功能增删改查; 审核、会务列表页
This commit is contained in:
parent
84c9e6f7c4
commit
a7dcd25647
@ -62,6 +62,8 @@
|
||||
"pages/meeting/reservationRecord/reservationRecord",
|
||||
"pages/meeting/reservationRecord/meetingRecord/meetingRecord",
|
||||
"pages/meeting/reservationRecord/meetingRecord/meetingDetail/meetingDetail",
|
||||
"pages/meeting/reservationRecord/approve/approve",
|
||||
"pages/meeting/reservationRecord/service/service",
|
||||
"pages/meeting/invite/invite",
|
||||
"pages/meeting/visitorIinvitation/list/list",
|
||||
"pages/meeting/visitorIinvitation/add/add",
|
||||
@ -74,6 +76,7 @@
|
||||
"pages/meeting/reservationRecord/exhibitionRecord/list/list",
|
||||
"pages/meeting/reservationRecord/exhibitionRecord/detail/detail",
|
||||
"pages/meeting/meetingRoom/meetingService/meetingService",
|
||||
|
||||
"pages/reportRepair/index/index",
|
||||
"pages/reportRepair/report/report",
|
||||
"pages/reportRepair/query/record/record",
|
||||
|
@ -183,7 +183,7 @@
|
||||
}
|
||||
|
||||
.fixedbox {
|
||||
width: 100%;
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
margin-top: 70rpx;
|
||||
float: left;
|
||||
|
@ -26,14 +26,14 @@ Page({
|
||||
type: "assign",
|
||||
name: "会议审核",
|
||||
img: "/profile/static/repair/index/case.png",
|
||||
path: "/pages/meeting/visitorIinvitation/list/list",
|
||||
visible: false
|
||||
path: "/pages/meeting/reservationRecord/approve/approve",
|
||||
visible: true
|
||||
}, {
|
||||
type: "repair",
|
||||
name: "会务服务",
|
||||
img: "/profile/static/repair/index/repair.png",
|
||||
path: "/pages/reportRepair/repair/index/index",
|
||||
visible: false
|
||||
path: "/pages/meeting/reservationRecord/service/service",
|
||||
visible: true
|
||||
}],
|
||||
timeShow: false,
|
||||
currentDate: new Date().getTime(),
|
||||
|
@ -15,6 +15,7 @@ Page({
|
||||
data: {
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
roomDataList: {},
|
||||
rId: '',
|
||||
date: '',
|
||||
queryParam: {
|
||||
timeRangeDict: {
|
||||
@ -87,13 +88,18 @@ Page({
|
||||
title: options.name
|
||||
})
|
||||
}
|
||||
if (!options.rId) {
|
||||
// 首页过来会找不到rId,设为空,否则会报错
|
||||
options.rId = ''
|
||||
}
|
||||
const time = options.time
|
||||
if (!time || time === '') {
|
||||
app.selfShowMsg('请选择时间!', '/pages/meeting/index/index')
|
||||
return
|
||||
}
|
||||
this.setData({
|
||||
date: time
|
||||
date: time,
|
||||
rId: options.rId
|
||||
})
|
||||
const _date = new Date(parseInt(time))
|
||||
const _year = _date.getFullYear()
|
||||
@ -285,7 +291,7 @@ Page({
|
||||
timeRange = timeRange ? timeRange : 0
|
||||
// 跳转预约详情
|
||||
wx.navigateTo({
|
||||
url: "/pages/meeting/meetingRoom/meetingRoom?id=" + e.currentTarget.dataset.id + '&time=' + this.data.date + '&timeRange=' + timeRange,
|
||||
url: "/pages/meeting/meetingRoom/meetingRoom?id=" + e.currentTarget.dataset.id + '&time=' + this.data.date + '&timeRange=' + timeRange + '&rId=' + this.data.rId,
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -21,6 +21,7 @@ Page({
|
||||
data: {
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
date: '',
|
||||
rId: '',
|
||||
dateText: '',
|
||||
timeRange: '',
|
||||
timeRangeText: '',
|
||||
@ -110,7 +111,7 @@ Page({
|
||||
startTime = parseInt(date) + (parseInt(startTimeArr[0]) * 60 * 60 + parseInt(startTimeArr[1]) * 60) * 1000
|
||||
let endTimeArr = endTime.split(':')
|
||||
endTime = parseInt(date) + (parseInt(endTimeArr[0]) * 60 * 60 + parseInt(endTimeArr[1]) * 60) * 1000
|
||||
let paramUrl = "?meetingRoomId=" + meetingRoomId + "&startTime=" + selfFormatTimeYMDHMS(startTime) + "&endTime=" + selfFormatTimeYMDHMS(endTime);
|
||||
let paramUrl = "?meetingRoomId=" + meetingRoomId + "&startTime=" + selfFormatTimeYMDHMS(startTime) + "&endTime=" + selfFormatTimeYMDHMS(endTime) + '&rId=' + _this.data.rId;
|
||||
// 结束时间不能小于开始时间
|
||||
if (startTime >= endTime) {
|
||||
Notify('结束时间不能小于开始时间!')
|
||||
@ -261,6 +262,7 @@ Page({
|
||||
this.setData({
|
||||
meetingRoomId: options.meetingRoomId,
|
||||
date: time,
|
||||
rId: options.rId,
|
||||
dateText: _year + '年' + _month + '月' + _day + '日',
|
||||
timeRange: _timeRange,
|
||||
timeRangeText: _timeRangeText,
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
calculateMeetingRoomAmountRq,
|
||||
saveMeetingRecordRq,
|
||||
saveChangyangMeetingRecordRq,
|
||||
meetingRoomBookedRecordRq
|
||||
selectReservationByIdRq
|
||||
} from "../../../../api/meeting/meetingRoom.js"
|
||||
|
||||
import {
|
||||
@ -26,7 +26,7 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
id: '',
|
||||
rId: '',
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
detail: {},
|
||||
meetingRoomId: null,
|
||||
@ -45,22 +45,36 @@ Page({
|
||||
*/
|
||||
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
|
||||
// selectDay: selfFormatTimeYMD(options.startTime),
|
||||
// selectCountTime,
|
||||
})
|
||||
if (options.startTime && options.endTime) {
|
||||
this.getTimeDetail(options.startTime, options.endTime)
|
||||
}
|
||||
// 详细信息
|
||||
this.getDetail();
|
||||
},
|
||||
|
||||
/**
|
||||
* 计算并填充时间细节
|
||||
* @param {*} sTime 开始时间 2024-09-18 09:04:00
|
||||
* @param {*} eTime 结束时间 2024-09-18 10:04:00
|
||||
*/
|
||||
getTimeDetail(sTime, eTime) {
|
||||
let selectCountTime = selfFormatTimeHM(sTime) + "-" + selfFormatTimeHM(eTime) + ' 共计' + twoTimeInterval(sTime, eTime)
|
||||
this.setData({
|
||||
selectDay: selfFormatTimeYMD(sTime),
|
||||
selectCountTime,
|
||||
})
|
||||
},
|
||||
// 详细信息
|
||||
getDetail() {
|
||||
let _this = this;
|
||||
let _dataId = _this.data.id
|
||||
let _dataId = _this.data.rId
|
||||
if (_dataId === '') {
|
||||
console.log('新增预约')
|
||||
// 为新增,新增的会议室id是传来的
|
||||
let _meetingRoomId = _this.data.meetingRoomId
|
||||
_this.getRoomInfo(_meetingRoomId)
|
||||
@ -76,14 +90,52 @@ Page({
|
||||
}
|
||||
})
|
||||
} else {
|
||||
// 为编辑,此时根据id获取信息,获取信息后其中有roomId
|
||||
meetingRoomBookedRecordRq(_dataId).then(res => {
|
||||
console.log(res)
|
||||
// 为编辑,编辑有两种情况,一是重新选择会议室和时间,另一种是编辑基本信息
|
||||
// 1. 无时间和会议室id,此时根据id获取信息,获取信息后其中有roomId
|
||||
// 2. 有时间和会议室id,此时根据会议室id获取会议室信息即可
|
||||
let _meetingRoomId = _this.data.meetingRoomId
|
||||
if (_meetingRoomId !== null) {
|
||||
_this.getRoomInfo(_meetingRoomId)
|
||||
}
|
||||
selectReservationByIdRq(_dataId).then(res => {
|
||||
console.log('编辑,获取信息', res)
|
||||
if (_meetingRoomId === null) {
|
||||
_meetingRoomId = res.data.roomContentId
|
||||
_this.setData({
|
||||
meetingRoomId: _meetingRoomId,
|
||||
startTime: res.data.startTime,
|
||||
endTime: res.data.endDate
|
||||
})
|
||||
let serviceId = []
|
||||
for (let key in res.data.reservationServes) {
|
||||
let eachObj = res.data.reservationServes[key]
|
||||
serviceId.push(eachObj.serveId)
|
||||
}
|
||||
_this.getRoomInfo(_meetingRoomId, serviceId)
|
||||
// 计算日期和时间
|
||||
_this.getTimeDetail(res.data.startTime, res.data.endDate)
|
||||
}
|
||||
_this.setData({
|
||||
detail: {
|
||||
orderUser: res.data.orderUser,
|
||||
orderTel: res.data.orderTel,
|
||||
title: res.data.title,
|
||||
personNum: res.data.personNum,
|
||||
leader: res.data.leader,
|
||||
depName: res.data.depName,
|
||||
remark: res.data.remark,
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
getRoomInfo(roomId) {
|
||||
/**
|
||||
* 获取会议室基本信息
|
||||
* @param {*} roomId 会议室id
|
||||
* @param {*} serveId 提供服务id,用于编辑时默认勾选
|
||||
*/
|
||||
getRoomInfo(roomId, serveId) {
|
||||
serveId = serveId || []
|
||||
// 获取会议室详情
|
||||
let _this = this
|
||||
meetingRoomDetailRq(this.data.meetingRoomId).then(res => {
|
||||
@ -96,7 +148,22 @@ Page({
|
||||
console.log(`JSON error : ${error}`);
|
||||
}
|
||||
}
|
||||
// 提前处理服务,不需要进入页面后获取
|
||||
let serviceList = detail.roomServeList.map(item => {
|
||||
let isSel = false
|
||||
if (serveId.includes(item.id)) {
|
||||
isSel = true
|
||||
}
|
||||
return {
|
||||
serveId: item.id,
|
||||
serveName: item.serveName,
|
||||
isSelect: isSel,
|
||||
num: '',
|
||||
type: 'free'
|
||||
}
|
||||
})
|
||||
_this.setData({
|
||||
serviceList: serviceList,
|
||||
room: detail,
|
||||
bannerList
|
||||
})
|
||||
@ -153,15 +220,15 @@ Page({
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
if (_this.data.detail.orderUser == '') {
|
||||
if (!_this.data.detail.orderUser || _this.data.detail.orderUser === '') {
|
||||
// 错误提示
|
||||
Notify({
|
||||
type: 'danger',
|
||||
message: '请输入预约人!'
|
||||
});
|
||||
return;
|
||||
return
|
||||
}
|
||||
if (_this.data.detail.orderTel == '') {
|
||||
if (!_this.data.detail.orderUser || _this.data.detail.orderTel == '') {
|
||||
// 错误提示
|
||||
Notify({
|
||||
type: 'danger',
|
||||
@ -169,6 +236,19 @@ Page({
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 处理一下serviceList
|
||||
let service = []
|
||||
let serviceList = _this.data.serviceList
|
||||
// console.log(serviceList)
|
||||
for (let key in serviceList) {
|
||||
let eachObj = serviceList[key]
|
||||
console.log(eachObj)
|
||||
if (eachObj.isSelect === true) {
|
||||
service.push(eachObj)
|
||||
}
|
||||
}
|
||||
// console.log(service)
|
||||
// return
|
||||
saveChangyangMeetingRecordRq({
|
||||
"roomContentId": _this.data.meetingRoomId,
|
||||
"userId": _this.data.userData.id,
|
||||
@ -178,7 +258,7 @@ Page({
|
||||
"startTime": _this.data.startTime,
|
||||
"endDate": _this.data.endTime,
|
||||
"orderMoney": 0,
|
||||
"reservationServes": _this.data.serviceList,
|
||||
"reservationServes": service,
|
||||
"remark": _this.data.detail.remark,
|
||||
"orderUser": _this.data.detail.orderUser,
|
||||
"orderTel": _this.data.detail.orderTel,
|
||||
|
@ -90,6 +90,13 @@
|
||||
<van-icon name="arrow" size="44rpx" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="meetingDetailView" style="margin-top: 10rpx;">
|
||||
<view class="detailView">
|
||||
<view class="itemList">
|
||||
<view class="item" wx:for="{{serviceList}}" wx:key="*this" wx:if="{{item.isSelect}}">#{{item.serveName}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="itemView" bind:tap="jumpMeetingCoupon">
|
||||
<view class="label">优惠券</view>
|
||||
<view class="content">
|
||||
|
@ -14,24 +14,13 @@ Page({
|
||||
data: {
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
meetingRoomId: null,
|
||||
date: '',
|
||||
timeRange: '',
|
||||
date: '', // 选择的时间
|
||||
rId: '', // 预约id
|
||||
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'
|
||||
}],
|
||||
recordList: [],
|
||||
canRes: true // 是否允许预约
|
||||
},
|
||||
|
||||
@ -45,7 +34,8 @@ Page({
|
||||
let timeRange = options.timeRange
|
||||
_this.setData({
|
||||
date: time,
|
||||
timeRange: timeRange
|
||||
timeRange: timeRange,
|
||||
rId: options.rId
|
||||
})
|
||||
let meetingRoomId = options.id;
|
||||
meetingRoomDetailRq(meetingRoomId).then(res => {
|
||||
@ -154,7 +144,7 @@ Page({
|
||||
let time = this.data.date
|
||||
let timeRange = this.data.timeRange
|
||||
wx.navigateTo({
|
||||
url: "/pages/meeting/meetingRoom/meetingBooked/meetingBooked?meetingRoomId=" + meetingRoomId + '&time=' + time + '&timeRange=' + timeRange,
|
||||
url: "/pages/meeting/meetingRoom/meetingBooked/meetingBooked?meetingRoomId=" + meetingRoomId + '&time=' + time + '&timeRange=' + timeRange + '&rId=' + this.data.rId,
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -27,6 +27,7 @@ Page({
|
||||
onLoad(options) {
|
||||
let _this = this;
|
||||
let serviceList = JSON.parse(options.serviceList)
|
||||
// console.log(ser)
|
||||
_this.setData({
|
||||
...options,
|
||||
serviceList
|
||||
@ -67,22 +68,21 @@ Page({
|
||||
}
|
||||
|
||||
// 查询服务信息
|
||||
queryServiceMsgRq({
|
||||
"dictType": "server_info"
|
||||
}).then(res => {
|
||||
console.log('queryServiceMsgRq', res);
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
if (res.data[i].dictValue == app.tenantId) {
|
||||
_this.setData({
|
||||
msg: res.data[i].dictLabel
|
||||
})
|
||||
break;
|
||||
}
|
||||
}
|
||||
})
|
||||
// queryServiceMsgRq({
|
||||
// "dictType": "server_info"
|
||||
// }).then(res => {
|
||||
// console.log('queryServiceMsgRq', res);
|
||||
// for (let i = 0; i < res.data.length; i++) {
|
||||
// if (res.data[i].dictValue == app.tenantId) {
|
||||
// _this.setData({
|
||||
// msg: res.data[i].dictLabel
|
||||
// })
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
},
|
||||
|
||||
|
||||
// 服务选择
|
||||
checkBoxClick(e) {
|
||||
let _this = this;
|
||||
@ -138,6 +138,7 @@ Page({
|
||||
prevPage.setData({
|
||||
serviceList: _this.data.serviceList
|
||||
})
|
||||
console.log(_this.data.serviceList)
|
||||
wx.navigateBack();
|
||||
},
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<!-- 免费服务 -->
|
||||
<view class="serviceView">
|
||||
<view class="leftLineTitle">免费服务</view>
|
||||
<view class="leftLineTitle">服务</view>
|
||||
<view class="serviceItemView">
|
||||
<view class="serviceItem" wx:if="{{item.type == 'free'}}" wx:for="{{serviceList}}" wx:key="*this">
|
||||
<van-checkbox value="{{ item.isSelect }}" data-id="{{item.serveId}}" shape="square" bind:tap="checkBoxClick"></van-checkbox>
|
||||
@ -13,7 +13,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 增值服务 -->
|
||||
<view class="serviceView">
|
||||
<!-- <view class="serviceView">
|
||||
<view class="leftLineTitle">增值服务</view>
|
||||
<view class="serviceItemView">
|
||||
<view class="serviceItem" wx:if="{{item.type == 'increment'}}" wx:for="{{serviceList}}" wx:key="*this">
|
||||
@ -22,7 +22,7 @@
|
||||
<van-field style="width: 10rpx; visibility: hidden;" data-id="{{item.serveId}}" value="{{ item.num }}" type="number" clearable placeholder="请输入人数" border="{{ false }}" bind:change="inputChange" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 声明信息 -->
|
||||
<view class="statementView">
|
||||
|
610
miniprogram/pages/meeting/reservationRecord/approve/approve.js
Normal file
610
miniprogram/pages/meeting/reservationRecord/approve/approve.js
Normal file
@ -0,0 +1,610 @@
|
||||
const app = getApp()
|
||||
|
||||
import Dialog from '@vant/weapp/dialog/dialog';
|
||||
import Notify from '@vant/weapp/notify/notify';
|
||||
|
||||
import {
|
||||
selfFormatTimeYMD,
|
||||
selfFormatTimeHM
|
||||
} from "../../../../utils/util.js"
|
||||
|
||||
import {
|
||||
selectReservationListByUserIdRq,
|
||||
selectVisitorInvitationRecordRq,
|
||||
cancelOrderRq
|
||||
} from "../../../../api/meeting/meetingRoom.js"
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
userData: null,
|
||||
dataChange: false,
|
||||
tabTitle: '预约记录',
|
||||
// 预约记录参数
|
||||
reservationPageNum: 1,
|
||||
reservationPageSize: 10,
|
||||
reservationDataList: [],
|
||||
reservationIsDataAll: false,
|
||||
search: {
|
||||
title: {
|
||||
text: '会议名称',
|
||||
value: ''
|
||||
},
|
||||
status: {
|
||||
value: 1,
|
||||
option: [{
|
||||
text: '全部预约',
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
text: '待审核',
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
text: '待开始',
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
text: '已结束',
|
||||
value: 3
|
||||
},
|
||||
{
|
||||
text: '已取消',
|
||||
value: 4
|
||||
},
|
||||
{
|
||||
text: '已驳回',
|
||||
value: 5
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
showRejectReason: false, // 是否展示弹出层
|
||||
rejectlId: '', // 驳回预约会议id
|
||||
rejectReason: '', // 驳回预约原因
|
||||
beforeReject(action) {
|
||||
return new Promise(resolve => {
|
||||
if (action === 'confirm') {
|
||||
resolve(false)
|
||||
} else {
|
||||
resolve(true)
|
||||
}
|
||||
});
|
||||
}, // 弹出层点击确认不关闭,手动关
|
||||
// 会议重新预约需要参数
|
||||
editId: '',
|
||||
showEdit: false,
|
||||
editAction: [{
|
||||
name: '重新选择时间、会议室',
|
||||
type: 1
|
||||
},
|
||||
{
|
||||
name: '重新编辑会议信息',
|
||||
type: 2
|
||||
},
|
||||
],
|
||||
timeShow: false,
|
||||
currentDate: new Date().getTime(),
|
||||
minDate: new Date().getTime(),
|
||||
maxDate: '',
|
||||
formatter(type, value) {
|
||||
if (type === 'year') {
|
||||
return `${value}年`;
|
||||
}
|
||||
if (type === 'month') {
|
||||
return `${value}月`;
|
||||
}
|
||||
if (type === 'day') {
|
||||
return `${value}日`;
|
||||
}
|
||||
return value;
|
||||
},
|
||||
// 参与记录参数,不需要
|
||||
// participatePageNum: 1,
|
||||
// participatePageSize: 10,
|
||||
// participateDataList: [],
|
||||
// participateIsDataAll: false,
|
||||
},
|
||||
changeSearchTitle(e) {
|
||||
this.setData({
|
||||
['search.title.value']: e.detail,
|
||||
})
|
||||
},
|
||||
searchTitle() {
|
||||
// 刷新预约数据
|
||||
this.setData({
|
||||
reservationPageNum: 1,
|
||||
reservationDataList: [],
|
||||
reservationIsDataAll: false,
|
||||
})
|
||||
this.getDataList()
|
||||
this.selectComponent('#item').toggle()
|
||||
},
|
||||
changeSearchStatus(e) {
|
||||
// 刷新预约数据
|
||||
this.setData({
|
||||
reservationPageNum: 1,
|
||||
reservationDataList: [],
|
||||
reservationIsDataAll: false,
|
||||
['search.status.value']: e.detail
|
||||
})
|
||||
this.getDataList()
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let _this = this;
|
||||
_this.setData({
|
||||
userData: wx.getStorageSync('user'),
|
||||
})
|
||||
// 获取数据
|
||||
let userId = _this.data.userData.id
|
||||
// 获取预约数据
|
||||
_this.getReservationData({
|
||||
userId,
|
||||
pageNum: _this.data.reservationPageNum,
|
||||
pageSize: _this.data.reservationPageSize,
|
||||
})
|
||||
// 获取一月后时间,默认只能选一个月之后
|
||||
const today = new Date()
|
||||
const newDate = new Date(today)
|
||||
newDate.setMonth(newDate.getMonth() + 1)
|
||||
_this.setData({
|
||||
maxDate: newDate.getTime()
|
||||
})
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
getDataList() {
|
||||
// 获取参数
|
||||
let _this = this;
|
||||
let tabTitle = _this.data.tabTitle
|
||||
let userId = _this.data.userData.id
|
||||
let isDataAll = null
|
||||
let pageNum = null
|
||||
let pageSize = null
|
||||
// 预约记录参数,目前只保留预约记录,其余去掉
|
||||
isDataAll = _this.data.reservationIsDataAll
|
||||
pageNum = _this.data.reservationPageNum
|
||||
pageSize = _this.data.reservationPageSize
|
||||
|
||||
// 判断数据是否已全部加载
|
||||
if (isDataAll) {
|
||||
return;
|
||||
}
|
||||
// 传递参数
|
||||
let param = {
|
||||
userId,
|
||||
pageNum,
|
||||
pageSize
|
||||
}
|
||||
_this.getReservationData(param)
|
||||
},
|
||||
|
||||
// 获取预约数据
|
||||
getReservationData(param) {
|
||||
let _this = this;
|
||||
let {
|
||||
pageNum,
|
||||
pageSize,
|
||||
userId
|
||||
} = param
|
||||
// 查询数据
|
||||
selectReservationListByUserIdRq({
|
||||
pageNum,
|
||||
pageSize,
|
||||
userId,
|
||||
parkId: 25,
|
||||
title: _this.data.search.title.value,
|
||||
statusValue: _this.data.search.status.value
|
||||
}).then(res => {
|
||||
console.log('selectReservationListByUserIdRq', res);
|
||||
// 判断数据是否全部查询
|
||||
let queryDataList = res.page.records;
|
||||
if (queryDataList && queryDataList.length > 0) {
|
||||
// 更新参数
|
||||
let reservationDataList = _this.data.reservationDataList.concat(_this.formartData(queryDataList));
|
||||
let reservationPageNum = _this.data.reservationPageNum + 1;
|
||||
_this.setData({
|
||||
reservationPageNum,
|
||||
reservationDataList,
|
||||
})
|
||||
} else {
|
||||
_this.setData({
|
||||
reservationIsDataAll: true
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取参与数据,此处不需要
|
||||
getParticipateData(param) {
|
||||
let _this = this;
|
||||
let {
|
||||
pageNum,
|
||||
pageSize,
|
||||
userId
|
||||
} = param
|
||||
// 查询数据
|
||||
selectVisitorInvitationRecordRq({
|
||||
pageNum,
|
||||
pageSize,
|
||||
userId
|
||||
}).then(res => {
|
||||
console.log('selectVisitorInvitationRecordRq', res);
|
||||
// 判断数据是否全部查询
|
||||
let queryDataList = res.page.records;
|
||||
if (queryDataList && queryDataList.length > 0) {
|
||||
// 更新参数
|
||||
let participateDataList = _this.data.participateDataList.concat(_this.formartData(queryDataList));
|
||||
let participatePageNum = _this.data.participatePageNum + 1;
|
||||
_this.setData({
|
||||
participatePageNum,
|
||||
participateDataList,
|
||||
})
|
||||
} else {
|
||||
_this.setData({
|
||||
participateIsDataAll: true
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 格式化数据
|
||||
formartData(queryDataList) {
|
||||
// 格式化数据
|
||||
return queryDataList.map(item => {
|
||||
item.timeSlot = selfFormatTimeYMD(item.startTime) + ' ' + selfFormatTimeHM(item.startTime) + '~' + selfFormatTimeHM(item.endDate);
|
||||
// 状态字体颜色
|
||||
let statusColor = "#FFB119";
|
||||
// 按钮是否显示
|
||||
let statusValue = item.statusValue;
|
||||
let showPay = false;
|
||||
let showInvite = false;
|
||||
let showCancel = false;
|
||||
let showDetail = false;
|
||||
// 待支付 0 :去支付、取消订单、查看详情
|
||||
if (statusValue == 0) {
|
||||
showPay = true;
|
||||
showCancel = true;
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#FFB119";
|
||||
}
|
||||
// 待使用 1:去邀请、取消订单、查看详情
|
||||
if (statusValue == 1) {
|
||||
showInvite = true;
|
||||
showCancel = true;
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#3794FF";
|
||||
// 待使用 修改为 预约成功
|
||||
item.statusName = '预约成功'
|
||||
}
|
||||
// 进行中 2:去邀请、查看详情
|
||||
if (statusValue == 2) {
|
||||
showInvite = true;
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#FF4040";
|
||||
}
|
||||
// 已结束 3:查看详情
|
||||
if (statusValue == 3) {
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#333333";
|
||||
}
|
||||
// 已取消 4:查看详情
|
||||
if (statusValue == 4) {
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#7F7F7F";
|
||||
}
|
||||
//
|
||||
// 赋值
|
||||
item.showPay = showPay;
|
||||
item.showInvite = showInvite;
|
||||
item.showCancel = showCancel;
|
||||
item.showDetail = showDetail;
|
||||
// 状态字体颜色
|
||||
item.statusColor = statusColor;
|
||||
// 图片
|
||||
if (item.roomContent.indoorPicUrl) {
|
||||
try {
|
||||
item.roomContent.indoorPicUrlFirst = JSON.parse(item.roomContent.indoorPicUrl)[0].url
|
||||
} catch (error) {
|
||||
console.log(`JSON error : ${error}`);
|
||||
}
|
||||
}
|
||||
return item;
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
// 跳转-预约详情
|
||||
jumpMeetingDetail(e) {
|
||||
console.log('jumpMeetingDetail', e);
|
||||
let id = e.currentTarget.dataset.id
|
||||
wx.navigateTo({
|
||||
url: "/pages/meeting/reservationRecord/meetingRecord/meetingDetail/meetingDetail?id=" + id,
|
||||
})
|
||||
},
|
||||
|
||||
// 取消预约一系列方法
|
||||
cancelConfirm(e) {
|
||||
console.log('cancelConfirm', e);
|
||||
let _this = this;
|
||||
let id = e.currentTarget.dataset.id
|
||||
_this.setData({
|
||||
cancelId: id,
|
||||
showCancelReason: true,
|
||||
cancelReason: ''
|
||||
})
|
||||
},
|
||||
onCloseCancel(e) {
|
||||
let _this = this;
|
||||
_this.setData({
|
||||
cancelId: '',
|
||||
showCancelReason: false,
|
||||
cancelReason: ''
|
||||
})
|
||||
},
|
||||
onChangeCancelReason(e) {
|
||||
let _this = this;
|
||||
_this.setData({
|
||||
cancelReason: e.detail
|
||||
})
|
||||
},
|
||||
// 取消订单
|
||||
cancelOrder() {
|
||||
let _this = this;
|
||||
let id = _this.data.cancelId
|
||||
let reason = _this.data.cancelReason
|
||||
if (id === '') {
|
||||
return
|
||||
}
|
||||
if (reason === '') {
|
||||
Notify('请输入取消原因!')
|
||||
return
|
||||
}
|
||||
cancelOrderRq({
|
||||
id: id,
|
||||
cancelResaon: reason
|
||||
}).then(res => {
|
||||
console.log('cancelOrderRq', res);
|
||||
if (res.code == 0) {
|
||||
// 刷新预约数据
|
||||
_this.setData({
|
||||
reservationPageNum: 1,
|
||||
reservationDataList: [],
|
||||
reservationIsDataAll: false,
|
||||
showCancelReason: false
|
||||
})
|
||||
_this.getDataList()
|
||||
} else {
|
||||
// 危险通知
|
||||
Notify({
|
||||
type: 'danger',
|
||||
message: res.msg
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
editConfirm(e) {
|
||||
let id = e.currentTarget.dataset.id
|
||||
this.setData({
|
||||
editId: id,
|
||||
showEdit: true
|
||||
})
|
||||
},
|
||||
hideEdit() {
|
||||
this.setData({
|
||||
showEdit: false
|
||||
})
|
||||
},
|
||||
editMode(e) {
|
||||
let _this = this
|
||||
if (e.detail.type === 1) {
|
||||
// 重选时间会议室
|
||||
this.setData({
|
||||
showEdit: false,
|
||||
timeShow: true
|
||||
})
|
||||
} else {
|
||||
// 直接跳转
|
||||
console.log('重新编辑会议基本信息!')
|
||||
this.setData({
|
||||
showEdit: false,
|
||||
})
|
||||
wx.navigateTo({
|
||||
url: "/pages/meeting/meetingRoom/meetingOrder/meetingOrder?rId=" + _this.data.editId,
|
||||
})
|
||||
}
|
||||
},
|
||||
showTimePicker() {
|
||||
this.setData({
|
||||
timeShow: true
|
||||
});
|
||||
},
|
||||
hideTimePicker() {
|
||||
this.setData({
|
||||
timeShow: false
|
||||
});
|
||||
},
|
||||
// 跳转会议预约页面
|
||||
goRes(e) {
|
||||
let _this = this
|
||||
// 加入rId参数,为预约id,用于重新修改
|
||||
wx.navigateTo({
|
||||
url: '/pages/meeting/meetingReservation/meetingReservation?rId=' + _this.data.editId + '&time=' + e.detail,
|
||||
})
|
||||
},
|
||||
pass() {
|
||||
Dialog.confirm({
|
||||
title: '确认',
|
||||
message: '是否确认通过会议室申请?',
|
||||
})
|
||||
.then(() => {
|
||||
// on confirm
|
||||
console.log('已通过')
|
||||
// 重新加载数据
|
||||
this.getDataList()
|
||||
})
|
||||
.catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
},
|
||||
// 取消预约一系列方法
|
||||
rejectConfirm(e) {
|
||||
console.log('rejectConfirm', e);
|
||||
let _this = this;
|
||||
let id = e.currentTarget.dataset.id
|
||||
_this.setData({
|
||||
rejectId: id,
|
||||
showRejectReason: true,
|
||||
rejectReason: ''
|
||||
})
|
||||
},
|
||||
onCloseReject(e) {
|
||||
let _this = this;
|
||||
_this.setData({
|
||||
rejectId: '',
|
||||
showRejectReason: false,
|
||||
rejectReason: ''
|
||||
})
|
||||
},
|
||||
onChangeRejectReason(e) {
|
||||
let _this = this;
|
||||
_this.setData({
|
||||
rejectReason: e.detail
|
||||
})
|
||||
},
|
||||
// 取消订单
|
||||
rejectOrder() {
|
||||
let _this = this;
|
||||
let id = _this.data.rejectId
|
||||
let reason = _this.data.rejectReason
|
||||
if (id === '') {
|
||||
return
|
||||
}
|
||||
if (reason === '') {
|
||||
Notify('请输入驳回原因!')
|
||||
return
|
||||
}
|
||||
// 执行驳回方法
|
||||
console.log('驳回,原因为' + reason)
|
||||
return
|
||||
cancelOrderRq({
|
||||
id: id,
|
||||
cancelResaon: reason
|
||||
}).then(res => {
|
||||
console.log('rejectOrder', res);
|
||||
if (res.code == 0) {
|
||||
// 刷新预约数据
|
||||
_this.setData({
|
||||
reservationPageNum: 1,
|
||||
reservationDataList: [],
|
||||
reservationIsDataAll: false,
|
||||
showRejcctReason: false
|
||||
})
|
||||
_this.getDataList()
|
||||
} else {
|
||||
// 危险通知
|
||||
Notify({
|
||||
type: 'danger',
|
||||
message: res.msg
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
let _this = this;
|
||||
// 数据是否变化
|
||||
if (_this.data.dataChange) {
|
||||
// 刷新数据
|
||||
_this.setData({
|
||||
dataChange: false,
|
||||
// 预约记录参数
|
||||
reservationPageNum: 1,
|
||||
reservationDataList: [],
|
||||
reservationIsDataAll: false,
|
||||
// 搜索重置
|
||||
['search.title.value']: '',
|
||||
['search.status.value']: 0
|
||||
})
|
||||
|
||||
// 获取数据
|
||||
let userId = _this.data.userData.id
|
||||
// 获取预约数据
|
||||
_this.getReservationData({
|
||||
userId,
|
||||
pageNum: _this.data.reservationPageNum,
|
||||
pageSize: _this.data.reservationPageSize,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
console.log('onPullDownRefresh', '页面相关事件处理函数--监听用户下拉动作');
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
console.log('onReachBottom', '页面上拉触底事件的处理函数');
|
||||
let _this = this;
|
||||
// 获取数据
|
||||
_this.getDataList()
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage(e) {
|
||||
console.log('onShareAppMessage', e);
|
||||
let _this = this;
|
||||
let id = e.target.dataset.id;
|
||||
let detail = _this.data.reservationDataList.find(item => item.id == id)
|
||||
//
|
||||
let param = {
|
||||
title: detail.title,
|
||||
path: "/pages/meeting/invite/invite?id=" + id,
|
||||
imageUrl: app.IMG_NAME + detail.roomContent.indoorPicUrlFirst,
|
||||
}
|
||||
console.log('onShareAppMessage', param);
|
||||
return param;
|
||||
}
|
||||
})
|
@ -0,0 +1,18 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"van-tab": "@vant/weapp/tab/index",
|
||||
"van-tabs": "@vant/weapp/tabs/index",
|
||||
"van-divider": "@vant/weapp/divider/index",
|
||||
"van-dialog": "@vant/weapp/dialog/index",
|
||||
"van-notify": "@vant/weapp/notify/index",
|
||||
"van-dropdown-menu": "@vant/weapp/dropdown-menu/index",
|
||||
"van-dropdown-item": "@vant/weapp/dropdown-item/index",
|
||||
"van-field": "@vant/weapp/field/index",
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
|
||||
"van-popup": "@vant/weapp/popup/index",
|
||||
"van-action-sheet": "@vant/weapp/action-sheet/index"
|
||||
},
|
||||
"navigationBarTitleText": "会议审核",
|
||||
"onReachBottomDistance": 100
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
<view class="containerView public">
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item id="item" title="{{ search.title.text }}">
|
||||
<van-cell>
|
||||
<van-field clearable value="{{ search.title.value }}" placeholder="请输入会议名称模糊查询" bind:change="changeSearchTitle" />
|
||||
</van-cell>
|
||||
<view style="padding: 15px 16px;">
|
||||
<van-button type="info" size="small" block round bind:click="searchTitle">
|
||||
查询
|
||||
</van-button>
|
||||
</view>
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item value="{{ search.status.value }}" options="{{ search.status.option }}" bind:change="changeSearchStatus" />
|
||||
</van-dropdown-menu>
|
||||
<view class="itemView" wx:for="{{reservationDataList}}" wx:for-item="item" wx:key="*this">
|
||||
<view class="headView">
|
||||
<view class="number">{{item.title}}</view>
|
||||
<view class="status" style="color: {{item.statusColor}};">{{item.statusName}}</view>
|
||||
</view>
|
||||
<view class="contentView" bind:tap="jumpMeetingDetail" data-id="{{item.id}}">
|
||||
<image class="img" src="{{IMG_NAME + item.roomContent.indoorPicUrlFirst}}" mode="aspectFill"></image>
|
||||
<view class="msgView">
|
||||
<view class="title">{{item.roomContent.buildingName}} | {{item.roomContent.roomName}} | {{item.roomContent.capacityNum}} | {{item.roomContent.shape}}</view>
|
||||
<view class="name">预约人: {{item.createBy}}</view>
|
||||
<view class="time">{{item.timeSlot}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="priceView">
|
||||
<view class="cancelContent" wx:if="{{item.statusValue == 4 && item.cancelResaon}}">{{item.cancelResaon}}</view>
|
||||
</view>
|
||||
<view class="btnView">
|
||||
<!-- <view class="btn" wx:if="{{item.showInvite}}">去邀请
|
||||
<button class="shareBtn" open-type="share" data-id="{{item.id}}">转发</button>
|
||||
</view> -->
|
||||
<!-- <view class="btn" wx:if="{{item.showCancel}}" bind:tap="cancelConfirm" data-id="{{item.id}}">取消预约</view> -->
|
||||
<van-button style="margin-right: 10rpx;" size="small" plain type="info" wx:if="{{item.showCancel}}" bind:tap="editConfirm" data-id="{{item.id}}">修改信息</van-button>
|
||||
<van-button style="margin-right: 10rpx;" size="small" plain type="primary" bind:tap="pass" data-id="{{item.id}}">通过</van-button>
|
||||
<van-button style="margin-right: 10rpx;" size="small" plain type="danger" bind:tap="rejectConfirm" data-id="{{item.id}}">驳回</van-button>
|
||||
|
||||
<!-- <view class="btn" wx:if="{{item.showDetail}}" bind:tap="jumpMeetingDetail" data-id="{{item.id}}">查看详情</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="loadAllLine" wx:if="{{reservationIsDataAll}}">
|
||||
<van-divider class="van-divider" customStyle="font-size: 26rpx;" contentPosition="center">数据已全部加载</van-divider>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- 提示框 -->
|
||||
<van-dialog id="van-dialog" />
|
||||
<van-dialog use-slot title="驳回申请" show="{{ showRejectReason }}" show-cancel-button bind:close="onCloseRejct" bind:confirm="rejectOrder" beforeClose="{{ beforeReject }}" zIndex="109">
|
||||
<van-cell-group style="margin: 20px;">
|
||||
<van-field bind:change="onChangeRejectReason" value="{{ rejectReason }}" clearable label="" type="textarea" placeholder="请输入驳回原因" autosize />
|
||||
</van-cell-group>
|
||||
</van-dialog>
|
||||
<van-dialog use-slot title="取消预约" show="{{ showCancelReason }}" show-cancel-button bind:close="onCloseCancel" bind:confirm="cancelOrder" beforeClose="{{ beforeClose }}" zIndex="109">
|
||||
<van-cell-group style="margin: 20px;">
|
||||
<van-field bind:change="onChangeCancelReason" value="{{ cancelReason }}" clearable label="" type="textarea" placeholder="请输入取消预约原因" autosize />
|
||||
</van-cell-group>
|
||||
</van-dialog>
|
||||
<!-- 提示框 -->
|
||||
<van-notify id="van-notify" />
|
||||
<!-- 修改信息 -->
|
||||
<van-action-sheet show="{{ showEdit }}" actions="{{ editAction }}" cancel-text="取消" bind:cancel="hideEdit" bind:select="editMode" bind:close="hideEdit"/>
|
||||
|
||||
<van-popup show="{{ timeShow }}" bind:close="hideTimePicker" position="bottom" round="true">
|
||||
<van-datetime-picker title="请重新选择会议日期" type="date" value="{{ currentDate }}" min-date="{{ minDate }}" max-date="{{ maxDate }}" formatter="{{ formatter }}" bind:confirm="goRes" bind:cancel="hideTimePicker" />
|
||||
</van-popup>
|
136
miniprogram/pages/meeting/reservationRecord/approve/approve.wxss
Normal file
136
miniprogram/pages/meeting/reservationRecord/approve/approve.wxss
Normal file
@ -0,0 +1,136 @@
|
||||
.containerView.public {
|
||||
background: none;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.itemView {
|
||||
background: white;
|
||||
margin: 30rpx 20rpx;
|
||||
padding: 30rpx 20rpx;
|
||||
/* box-shadow: rgba(210,210,210,0.5) 0px 3.752px 3.752px 0px; */
|
||||
}
|
||||
|
||||
.itemView .headView {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.itemView .headView .number {
|
||||
flex: 1;
|
||||
margin-right: 30rpx;
|
||||
font-size: 26rpx;
|
||||
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
word-break: break-all;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.itemView .headView .status {
|
||||
font-size: 26rpx;
|
||||
color: #4e96f8;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.itemView .contentView {
|
||||
box-sizing: border-box;
|
||||
border-radius: 10rpx;
|
||||
width: 100%;
|
||||
margin-top: 20rpx;
|
||||
padding: 30rpx 20rpx;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
background: #f2f2f2;
|
||||
}
|
||||
|
||||
.itemView .contentView .img {
|
||||
border-radius: 10rpx;
|
||||
width: 200rpx;
|
||||
height: 110rpx;
|
||||
}
|
||||
|
||||
.itemView .contentView .msgView {
|
||||
flex: 1;
|
||||
margin-left: 20rpx;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.itemView .contentView .msgView .title {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.itemView .contentView .msgView .name,
|
||||
.itemView .contentView .msgView .time {
|
||||
font-size: 24rpx;
|
||||
color: gray;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
|
||||
.itemView .priceView {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
margin: 30rpx 0;
|
||||
}
|
||||
|
||||
.itemView .priceView .cancelContent {
|
||||
flex: 1;
|
||||
margin-right: 40rpx;
|
||||
font-size: 26rpx;
|
||||
color: #7F7F7F;
|
||||
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
word-break: break-all;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.itemView .priceView .priceContent {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.itemView .priceView .priceContent .name {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.itemView .priceView .priceContent .price {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.itemView .btnView {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
.itemView .btnView .btn {
|
||||
border: 1px solid #4e96f8;
|
||||
position: relative;
|
||||
border-radius: 10rpx;
|
||||
margin-left: 16rpx;
|
||||
padding: 10rpx 24rpx;
|
||||
font-size: 24rpx;
|
||||
color: #4e96f8;
|
||||
}
|
||||
|
||||
.shareBtn {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.loadAllLine {
|
||||
margin-top: 80rpx;
|
||||
}
|
@ -4,251 +4,363 @@ import Dialog from '@vant/weapp/dialog/dialog';
|
||||
import Notify from '@vant/weapp/notify/notify';
|
||||
|
||||
import {
|
||||
selfFormatTimeYMD,
|
||||
selfFormatTimeHM,
|
||||
twoTimeIntervalReturnHours
|
||||
selfFormatTimeYMD,
|
||||
selfFormatTimeHM,
|
||||
twoTimeIntervalReturnHours
|
||||
} from "../../../../../utils/util.js"
|
||||
|
||||
import {
|
||||
selectReservationByIdRq,
|
||||
cancelOrderRq,
|
||||
inviteRecordPersonListRq,
|
||||
getMeetingRoomServiceAndEquipmentRq,
|
||||
selectReservationByIdRq,
|
||||
cancelOrderRq,
|
||||
inviteRecordPersonListRq,
|
||||
getMeetingRoomServiceAndEquipmentRq,
|
||||
} from "../../../../../api/meeting/meetingRoom.js"
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
id: null,
|
||||
detail: null,
|
||||
facilities: {},
|
||||
joinPersonList: []
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let _this = this;
|
||||
_this.setData({
|
||||
...options
|
||||
})
|
||||
// 获取详情
|
||||
_this.getDetail();
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
id: null,
|
||||
detail: null,
|
||||
facilities: {},
|
||||
joinPersonList: [],
|
||||
showCancelReason: false, // 是否展示弹出层
|
||||
cancelId: '', // 取消预约会议id
|
||||
cancelReason: '', // 取消预约原因
|
||||
beforeClose(action) {
|
||||
return new Promise(resolve => {
|
||||
if (action === 'confirm') {
|
||||
resolve(false)
|
||||
} else {
|
||||
resolve(true)
|
||||
}
|
||||
});
|
||||
}, // 弹出层点击确认不关闭,手动关
|
||||
// 会议重新预约需要参数
|
||||
showEdit: false,
|
||||
editAction: [
|
||||
{
|
||||
name: '重新选择时间、会议室',
|
||||
type: 1
|
||||
},
|
||||
{
|
||||
name: '重新编辑会议信息',
|
||||
type: 2
|
||||
},
|
||||
],
|
||||
timeShow: false,
|
||||
currentDate: new Date().getTime(),
|
||||
minDate: new Date().getTime(),
|
||||
maxDate: '',
|
||||
formatter(type, value) {
|
||||
if (type === 'year') {
|
||||
return `${value}年`;
|
||||
}
|
||||
if (type === 'month') {
|
||||
return `${value}月`;
|
||||
}
|
||||
if (type === 'day') {
|
||||
return `${value}日`;
|
||||
}
|
||||
return value;
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let _this = this;
|
||||
_this.setData({
|
||||
...options
|
||||
})
|
||||
// 获取详情
|
||||
getDetail() {
|
||||
let _this = this;
|
||||
let id = _this.data.id;
|
||||
selectReservationByIdRq(id).then(res => {
|
||||
let detail = res.data;
|
||||
// 时间段
|
||||
detail.timeSlot = selfFormatTimeYMD(detail.startTime) + ' ' + selfFormatTimeHM(detail.startTime) + '~' + selfFormatTimeHM(detail.endDate);
|
||||
// 合计时间
|
||||
detail.countTime = twoTimeIntervalReturnHours(detail.startTime, detail.endDate)
|
||||
// 状态字体颜色
|
||||
let statusColor = "#FFB119";
|
||||
// 按钮是否显示
|
||||
let statusValue = detail.statusValue;
|
||||
let showPay = false;
|
||||
let showInvite = false;
|
||||
let showCancel = false;
|
||||
let showDetail = false;
|
||||
// 待支付 0 :去支付、取消订单、查看详情
|
||||
if (statusValue == 0) {
|
||||
showPay = true;
|
||||
showCancel = true;
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#FFB119";
|
||||
}
|
||||
// 待使用 1:去邀请、取消订单、查看详情
|
||||
if (statusValue == 1) {
|
||||
showInvite = true;
|
||||
showCancel = true;
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#3794FF";
|
||||
// 待使用 修改为 预约成功
|
||||
detail.statusName = '预约成功'
|
||||
}
|
||||
// 进行中 2:去邀请、查看详情
|
||||
if (statusValue == 2) {
|
||||
showInvite = true;
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#FF4040";
|
||||
}
|
||||
// 已结束 3:查看详情
|
||||
if (statusValue == 3) {
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#333333";
|
||||
}
|
||||
// 已取消 4:查看详情
|
||||
if (statusValue == 4) {
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#7F7F7F";
|
||||
}
|
||||
//
|
||||
// 赋值
|
||||
detail.showPay = showPay;
|
||||
detail.showInvite = showInvite;
|
||||
detail.showCancel = showCancel;
|
||||
detail.showDetail = showDetail;
|
||||
// 状态字体颜色
|
||||
detail.statusColor = statusColor;
|
||||
// 图片
|
||||
if (detail.roomContent.indoorPicUrl) {
|
||||
try {
|
||||
detail.roomContent.indoorPicUrlFirst = JSON.parse(detail.roomContent.indoorPicUrl)[0].url
|
||||
} catch (error) {
|
||||
console.log(`JSON error : ${error}`);
|
||||
}
|
||||
}
|
||||
_this.setData({
|
||||
detail
|
||||
})
|
||||
_this.getDetail();
|
||||
// 获取一月后时间,默认只能选一个月之后
|
||||
const today = new Date()
|
||||
const newDate = new Date(today)
|
||||
newDate.setMonth(newDate.getMonth() + 1)
|
||||
_this.setData({
|
||||
maxDate: newDate.getTime()
|
||||
})
|
||||
},
|
||||
|
||||
// 查询服务
|
||||
getMeetingRoomServiceAndEquipmentRq(_this.data.detail.roomContent.id).then(res => {
|
||||
_this.setData({
|
||||
facilities: res.data
|
||||
})
|
||||
})
|
||||
// 获取详情
|
||||
getDetail() {
|
||||
let _this = this;
|
||||
let id = _this.data.id;
|
||||
selectReservationByIdRq(id).then(res => {
|
||||
let detail = res.data;
|
||||
// 时间段
|
||||
detail.timeSlot = selfFormatTimeYMD(detail.startTime) + ' ' + selfFormatTimeHM(detail.startTime) + '~' + selfFormatTimeHM(detail.endDate);
|
||||
// 合计时间
|
||||
detail.countTime = twoTimeIntervalReturnHours(detail.startTime, detail.endDate)
|
||||
// 状态字体颜色
|
||||
let statusColor = "#FFB119";
|
||||
// 按钮是否显示
|
||||
let statusValue = detail.statusValue;
|
||||
let showPay = false;
|
||||
let showInvite = false;
|
||||
let showCancel = false;
|
||||
let showDetail = false;
|
||||
// 待支付 0 :去支付、取消订单、查看详情
|
||||
if (statusValue == 0) {
|
||||
showPay = true;
|
||||
showCancel = true;
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#FFB119";
|
||||
}
|
||||
// 待使用 1:去邀请、取消订单、查看详情
|
||||
if (statusValue == 1) {
|
||||
showInvite = true;
|
||||
showCancel = true;
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#3794FF";
|
||||
// 待使用 修改为 预约成功
|
||||
detail.statusName = '预约成功'
|
||||
}
|
||||
// 进行中 2:去邀请、查看详情
|
||||
if (statusValue == 2) {
|
||||
showInvite = true;
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#FF4040";
|
||||
}
|
||||
// 已结束 3:查看详情
|
||||
if (statusValue == 3) {
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#333333";
|
||||
}
|
||||
// 已取消 4:查看详情
|
||||
if (statusValue == 4) {
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#7F7F7F";
|
||||
}
|
||||
//
|
||||
// 赋值
|
||||
detail.showPay = showPay;
|
||||
detail.showInvite = showInvite;
|
||||
detail.showCancel = showCancel;
|
||||
detail.showDetail = showDetail;
|
||||
// 状态字体颜色
|
||||
detail.statusColor = statusColor;
|
||||
// 图片
|
||||
if (detail.roomContent.indoorPicUrl) {
|
||||
try {
|
||||
detail.roomContent.indoorPicUrlFirst = JSON.parse(detail.roomContent.indoorPicUrl)[0].url
|
||||
} catch (error) {
|
||||
console.log(`JSON error : ${error}`);
|
||||
}
|
||||
}
|
||||
_this.setData({
|
||||
detail
|
||||
})
|
||||
|
||||
// 查询服务
|
||||
getMeetingRoomServiceAndEquipmentRq(_this.data.detail.roomContent.id).then(res => {
|
||||
_this.setData({
|
||||
facilities: res.data
|
||||
})
|
||||
// 查询参与会议预约人员列表
|
||||
_this.getInviteRecordPersonList()
|
||||
},
|
||||
|
||||
})
|
||||
})
|
||||
// 查询参与会议预约人员列表
|
||||
getInviteRecordPersonList() {
|
||||
let _this = this;
|
||||
let id = _this.data.id;
|
||||
inviteRecordPersonListRq(id).then(res => {
|
||||
console.log('inviteRecordPersonListRq', res);
|
||||
_this.setData({
|
||||
joinPersonList: res.data
|
||||
})
|
||||
})
|
||||
},
|
||||
_this.getInviteRecordPersonList()
|
||||
},
|
||||
|
||||
// 取消订单
|
||||
cancelOrder(e) {
|
||||
console.log('cancelOrder', e);
|
||||
let _this = this;
|
||||
let id = e.currentTarget.dataset.id
|
||||
const beforeClose = (action) => {
|
||||
console.log('action', action);
|
||||
return new Promise((resolve) => {
|
||||
if (action === 'confirm') {
|
||||
cancelOrderRq({
|
||||
id,
|
||||
cancelResaon: ""
|
||||
}).then(res => {
|
||||
console.log('cancelOrderRq', res);
|
||||
if (res.code == 0) {
|
||||
// 刷新数据
|
||||
_this.getDetail();
|
||||
// 数据状态变更,向上个页面传递变更
|
||||
let pages = getCurrentPages(); //获取page
|
||||
let prevPage = pages[pages.length - 2]; //上一个页面(父页面)
|
||||
prevPage.setData({
|
||||
dataChange: true
|
||||
})
|
||||
} else {
|
||||
// 危险通知
|
||||
Notify({
|
||||
type: 'danger',
|
||||
message: res.msg
|
||||
});
|
||||
}
|
||||
resolve(true);
|
||||
})
|
||||
} else {
|
||||
// 拦截取消操作
|
||||
resolve(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '是否取消预约!',
|
||||
beforeClose,
|
||||
});
|
||||
},
|
||||
|
||||
// 跳转-支付
|
||||
jumpPay(e) {
|
||||
console.log('jumpPay', e);
|
||||
wx.navigateTo({
|
||||
url: "/pages/meeting/pay/waitPay/waitPay?id=" + e.currentTarget.dataset.id + "&type=meetingRoom"
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage(e) {
|
||||
console.log('onShareAppMessage', e);
|
||||
let _this = this;
|
||||
let id = e.target.dataset.id;
|
||||
let detail = _this.data.detail
|
||||
//
|
||||
let param = {
|
||||
title: detail.title,
|
||||
path: "/pages/meeting/invite/invite?id=" + id,
|
||||
imageUrl: app.IMG_NAME + detail.roomContent.indoorPicUrlFirst,
|
||||
}
|
||||
console.log('onShareAppMessage', param);
|
||||
return param;
|
||||
// 查询参与会议预约人员列表
|
||||
getInviteRecordPersonList() {
|
||||
let _this = this;
|
||||
let id = _this.data.id;
|
||||
inviteRecordPersonListRq(id).then(res => {
|
||||
console.log('inviteRecordPersonListRq', res);
|
||||
_this.setData({
|
||||
joinPersonList: res.data
|
||||
})
|
||||
})
|
||||
},
|
||||
// 取消预约一系列方法
|
||||
cancelConfirm(e) {
|
||||
console.log('cancelConfirm', e);
|
||||
let _this = this;
|
||||
let id = e.currentTarget.dataset.id
|
||||
_this.setData({
|
||||
cancelId: id,
|
||||
showCancelReason: true,
|
||||
cancelReason: ''
|
||||
})
|
||||
},
|
||||
onCloseCancel(e) {
|
||||
let _this = this;
|
||||
_this.setData({
|
||||
cancelId: '',
|
||||
showCancelReason: false,
|
||||
cancelReason: ''
|
||||
})
|
||||
},
|
||||
onChangeCancelReason(e) {
|
||||
let _this = this;
|
||||
_this.setData({
|
||||
cancelReason: e.detail
|
||||
})
|
||||
},
|
||||
// 取消订单
|
||||
cancelOrder() {
|
||||
let _this = this;
|
||||
let id = _this.data.cancelId
|
||||
let reason = _this.data.cancelReason
|
||||
if (id === '') {
|
||||
return
|
||||
}
|
||||
if (reason === '') {
|
||||
Notify('请输入取消原因!')
|
||||
return
|
||||
}
|
||||
cancelOrderRq({
|
||||
id: id,
|
||||
cancelResaon: reason
|
||||
}).then(res => {
|
||||
console.log('cancelOrderRq', res);
|
||||
if (res.code == 0) {
|
||||
_this.setData({
|
||||
showCancelReason: false
|
||||
})
|
||||
// 刷新数据
|
||||
_this.getDetail();
|
||||
// 数据状态变更,向上个页面传递变更
|
||||
let pages = getCurrentPages(); //获取page
|
||||
let prevPage = pages[pages.length - 2]; //上一个页面(父页面)
|
||||
prevPage.setData({
|
||||
dataChange: true
|
||||
})
|
||||
} else {
|
||||
// 危险通知
|
||||
Notify({
|
||||
type: 'danger',
|
||||
message: res.msg
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
editConfirm() {
|
||||
this.setData({
|
||||
showEdit: true
|
||||
})
|
||||
},
|
||||
hideEdit() {
|
||||
this.setData({
|
||||
showEdit: false
|
||||
})
|
||||
},
|
||||
editMode(e) {
|
||||
let _this = this
|
||||
if (e.detail.type === 1) {
|
||||
// 重选时间会议室
|
||||
this.setData({
|
||||
showEdit: false,
|
||||
timeShow: true
|
||||
})
|
||||
} else {
|
||||
// 直接跳转
|
||||
console.log('重新编辑会议基本信息!')
|
||||
this.setData({
|
||||
showEdit: false,
|
||||
})
|
||||
wx.navigateTo({
|
||||
url: "/pages/meeting/meetingRoom/meetingOrder/meetingOrder?rId=" + _this.data.detail.id,
|
||||
})
|
||||
}
|
||||
},
|
||||
showTimePicker() {
|
||||
this.setData({
|
||||
timeShow: true
|
||||
});
|
||||
},
|
||||
hideTimePicker() {
|
||||
this.setData({
|
||||
timeShow: false
|
||||
});
|
||||
},
|
||||
// 跳转会议预约页面
|
||||
goRes(e) {
|
||||
let _this = this
|
||||
// 加入rId参数,为预约id,用于重新修改
|
||||
wx.navigateTo({
|
||||
url: '/pages/meeting/meetingReservation/meetingReservation?rId=' + _this.data.detail.id + '&time=' + e.detail,
|
||||
})
|
||||
},
|
||||
|
||||
// 跳转-支付
|
||||
jumpPay(e) {
|
||||
console.log('jumpPay', e);
|
||||
wx.navigateTo({
|
||||
url: "/pages/meeting/pay/waitPay/waitPay?id=" + e.currentTarget.dataset.id + "&type=meetingRoom"
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage(e) {
|
||||
console.log('onShareAppMessage', e);
|
||||
let _this = this;
|
||||
let id = e.target.dataset.id;
|
||||
let detail = _this.data.detail
|
||||
//
|
||||
let param = {
|
||||
title: detail.title,
|
||||
path: "/pages/meeting/invite/invite?id=" + id,
|
||||
imageUrl: app.IMG_NAME + detail.roomContent.indoorPicUrlFirst,
|
||||
}
|
||||
console.log('onShareAppMessage', param);
|
||||
return param;
|
||||
}
|
||||
})
|
@ -1,7 +1,12 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"van-dialog": "@vant/weapp/dialog/index",
|
||||
"van-notify": "@vant/weapp/notify/index"
|
||||
"van-notify": "@vant/weapp/notify/index",
|
||||
"van-field": "@vant/weapp/field/index",
|
||||
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
|
||||
"van-popup": "@vant/weapp/popup/index",
|
||||
"van-action-sheet": "@vant/weapp/action-sheet/index",
|
||||
"van-button": "@vant/weapp/button/index"
|
||||
},
|
||||
"navigationBarTitleText": "会议预约详情"
|
||||
}
|
@ -1,90 +1,90 @@
|
||||
<view class="containerView public">
|
||||
<!-- 展示区域 -->
|
||||
<view class="itemView">
|
||||
<view class="contentView">
|
||||
<image class="img" src="{{IMG_NAME + detail.roomContent.indoorPicUrlFirst}}" mode="aspectFill"></image>
|
||||
<view class="msgView">
|
||||
<view class="title">{{detail.roomContent.buildingName}} | {{detail.roomContent.roomName}} | {{detail.roomContent.capacityNum}}人 | {{detail.roomContent.shape}}</view>
|
||||
<view class="name">{{detail.roomContent.meetingName}}</view>
|
||||
<view class="time">{{detail.timeSlot}}</view>
|
||||
</view>
|
||||
<!-- <view class="priceView">
|
||||
<!-- 展示区域 -->
|
||||
<view class="itemView">
|
||||
<view class="contentView">
|
||||
<image class="img" src="{{IMG_NAME + detail.roomContent.indoorPicUrlFirst}}" mode="aspectFill"></image>
|
||||
<view class="msgView">
|
||||
<view class="title">{{detail.roomContent.buildingName}} | {{detail.roomContent.roomName}} | {{detail.roomContent.capacityNum}}人 | {{detail.roomContent.shape}}</view>
|
||||
<view class="name">{{detail.roomContent.meetingName}}</view>
|
||||
<view class="time">{{detail.timeSlot}}</view>
|
||||
</view>
|
||||
<!-- <view class="priceView">
|
||||
<view class="price">¥{{detail.roomContent.money * detail.roomContent.duration}}</view>
|
||||
<view class="unit">/ {{detail.roomContent.duration}}小时 起</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 基本信息 -->
|
||||
<view class="basicView">
|
||||
<view class="labelTitle leftLineTitle">预约情况</view>
|
||||
<view class="cellView">
|
||||
<view class="label">预约状态</view>
|
||||
<view class="content status" style="color: {{detail.statusColor}};">{{detail.statusName}}</view>
|
||||
</view>
|
||||
<view class="cellView" wx:if="{{detail.statusValue == 4}}">
|
||||
<view class="label">取消原因</view>
|
||||
<view class="content status" style="color: {{detail.statusColor}};">{{detail.cancelResaon}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="basicView">
|
||||
<view class="labelTitle leftLineTitle">基本信息</view>
|
||||
<view class="cellView">
|
||||
<view class="label">会议时间</view>
|
||||
<view class="content">{{detail.timeSlot}} 共计{{detail.countTime}}小时</view>
|
||||
</view>
|
||||
<view class="cellView">
|
||||
<view class="label">会议名称</view>
|
||||
<view class="content">{{detail.title}}</view>
|
||||
</view>
|
||||
<view class="cellView">
|
||||
<view class="label">参会人数</view>
|
||||
<view class="content">{{detail.personNum}}</view>
|
||||
</view>
|
||||
<view class="cellView">
|
||||
<view class="label">参会领导</view>
|
||||
<view class="content">{{detail.leader}}</view>
|
||||
</view>
|
||||
<view class="cellView">
|
||||
<view class="label">预约部门</view>
|
||||
<view class="content">{{detail.depName}}</view>
|
||||
</view>
|
||||
<view class="cellView">
|
||||
<view class="label">会议预约人</view>
|
||||
<view class="content">{{detail.userName}}</view>
|
||||
</view>
|
||||
<view class="cellView">
|
||||
<view class="label">联系方式</view>
|
||||
<view class="content">{{detail.phone}}</view>
|
||||
</view>
|
||||
<view class="cellView">
|
||||
<view class="label">备注</view>
|
||||
<view class="content">{{detail.remark}}</view>
|
||||
</view>
|
||||
|
||||
<!-- 基本信息 -->
|
||||
<view class="basicView">
|
||||
<view class="labelTitle leftLineTitle">预约情况</view>
|
||||
<view class="cellView">
|
||||
<view class="label">预约状态</view>
|
||||
<view class="content status" style="color: {{detail.statusColor}};">{{detail.statusName}}</view>
|
||||
</view>
|
||||
<view class="cellView" wx:if="{{detail.statusValue == 4}}">
|
||||
<view class="label">取消原因</view>
|
||||
<view class="content status" style="color: {{detail.statusColor}};">{{detail.cancelResaon}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="basicView">
|
||||
<view class="labelTitle leftLineTitle">基本信息</view>
|
||||
<view class="cellView">
|
||||
<view class="label">会议时间</view>
|
||||
<view class="content">{{detail.timeSlot}} 共计{{detail.countTime}}小时</view>
|
||||
</view>
|
||||
<view class="cellView">
|
||||
<view class="label">会议名称</view>
|
||||
<view class="content">{{detail.title}}</view>
|
||||
</view>
|
||||
<view class="cellView">
|
||||
<view class="label">参会人数</view>
|
||||
<view class="content">{{detail.personNum}}</view>
|
||||
</view>
|
||||
<view class="cellView">
|
||||
<view class="label">参会领导</view>
|
||||
<view class="content">{{detail.leader}}</view>
|
||||
</view>
|
||||
<view class="cellView">
|
||||
<view class="label">预约部门</view>
|
||||
<view class="content">{{detail.depName}}</view>
|
||||
</view>
|
||||
<view class="cellView">
|
||||
<view class="label">会议预约人</view>
|
||||
<view class="content">{{detail.userName}}</view>
|
||||
</view>
|
||||
<view class="cellView">
|
||||
<view class="label">联系方式</view>
|
||||
<view class="content">{{detail.phone}}</view>
|
||||
</view>
|
||||
<view class="cellView">
|
||||
<view class="label">备注</view>
|
||||
<view class="content">{{detail.remark}}</view>
|
||||
</view>
|
||||
|
||||
<view class="serviceItemView">
|
||||
<view class="label">会议室设备</view>
|
||||
<view class="serviceItem" wx:for="{{facilities.roomItem}}" wx:key="*this">
|
||||
<view class="name">{{item.name}}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="serviceItemView">
|
||||
<view class="label">会议服务</view>
|
||||
<view class="serviceItem" wx:for="{{detail.reservationServes}}" wx:key="*this">
|
||||
<view class="name">{{item.serveName}}</view>
|
||||
<!-- <view class="name">{{item.num}}</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="cellView">
|
||||
<view class="label">创建时间</view>
|
||||
<view class="content">{{detail.createTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="serviceItemView">
|
||||
<view class="label">会议室设备</view>
|
||||
<view class="serviceItem" wx:for="{{facilities.roomItem}}" wx:key="*this">
|
||||
<view class="name">{{item.name}}</view>
|
||||
</view>
|
||||
|
||||
<!-- 参与人员 -->
|
||||
<!-- <view class="basicView">
|
||||
</view>
|
||||
<view class="serviceItemView">
|
||||
<view class="label">会议服务</view>
|
||||
<view class="serviceItem" wx:for="{{detail.reservationServes}}" wx:key="*this">
|
||||
<view class="name">{{item.serveName}}</view>
|
||||
<!-- <view class="name">{{item.num}}</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="cellView">
|
||||
<view class="label">创建时间</view>
|
||||
<view class="content">{{detail.createTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 参与人员 -->
|
||||
<!-- <view class="basicView">
|
||||
<view class="labelTitle leftLineTitle">参与人员({{joinPersonList.length}}/{{detail.personNum}})</view>
|
||||
<view class="cellView borderNone">
|
||||
<view class="joinView">
|
||||
@ -96,18 +96,31 @@
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 底部区域 -->
|
||||
<view class="bottomFix" wx:if="{{detail.showPay || detail.showInvite || detail.showCancel}}">
|
||||
<!-- <view class="btn" wx:if="{{detail.showPay}}" bind:tap="jumpPay" data-id="{{detail.id}}">去支付</view> -->
|
||||
<!-- <view class="btn" wx:if="{{detail.showInvite}}">去邀请
|
||||
<!-- 底部区域 -->
|
||||
<view class="bottomFix" wx:if="{{detail.showPay || detail.showInvite || detail.showCancel}}">
|
||||
<!-- <view class="btn" wx:if="{{detail.showPay}}" bind:tap="jumpPay" data-id="{{detail.id}}">去支付</view> -->
|
||||
<!-- <view class="btn" wx:if="{{detail.showInvite}}">去邀请
|
||||
<button class="shareBtn" open-type="share" data-id="{{detail.id}}">转发</button>
|
||||
</view> -->
|
||||
<view class="btn" wx:if="{{detail.showCancel}}" bind:tap="cancelOrder" data-id="{{detail.id}}">取消预约</view>
|
||||
</view>
|
||||
<van-button style="margin-right: 10rpx;" size="normal" plain type="warning" wx:if="{{detail.showCancel}}" bind:tap="cancelConfirm" data-id="{{detail.id}}">取消预约</van-button>
|
||||
<van-button style="margin-right: 10rpx;" size="normal" plain type="info" wx:if="{{detail.showCancel}}" bind:tap="editConfirm" data-id="{{detail.id}}">修改信息</van-button>
|
||||
<!-- <view class="btn" wx:if="{{detail.showCancel}}" bind:tap="cancelConfirm" data-id="{{detail.id}}">取消预约</view>
|
||||
<view class="btn" wx:if="{{detail.showCancel}}" bind:tap="editConfirm" data-id="{{detail.id}}">修改信息</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 提示框 -->
|
||||
<van-dialog id="van-dialog" />
|
||||
<!-- 提示框 -->
|
||||
<van-notify id="van-notify" />
|
||||
|
||||
</view>
|
||||
<!-- 提示框 -->
|
||||
<van-notify id="van-notify" />
|
||||
<van-dialog id="van-dialog" />
|
||||
<van-dialog use-slot title="取消预约" show="{{ showCancelReason }}" show-cancel-button bind:close="onCloseCancel" bind:confirm="cancelOrder" beforeClose="{{ beforeClose }}" zIndex="109">
|
||||
<van-cell-group style="margin: 20px;">
|
||||
<van-field bind:change="onChangeCancelReason" value="{{ cancelReason }}" clearable label="" type="textarea" placeholder="请输入取消预约原因" autosize />
|
||||
</van-cell-group>
|
||||
</van-dialog>
|
||||
<!-- 修改信息 -->
|
||||
<van-action-sheet show="{{ showEdit }}" actions="{{ editAction }}" cancel-text="取消" bind:cancel="hideEdit" bind:select="editMode" bind:close="hideEdit" />
|
||||
|
||||
<van-popup show="{{ timeShow }}" bind:close="hideTimePicker" position="bottom" round="true">
|
||||
<van-datetime-picker title="请重新选择会议日期" type="date" value="{{ currentDate }}" min-date="{{ minDate }}" max-date="{{ maxDate }}" formatter="{{ formatter }}" bind:confirm="goRes" bind:cancel="hideTimePicker" />
|
||||
</van-popup>
|
File diff suppressed because it is too large
Load Diff
@ -1,11 +1,18 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"van-tab": "@vant/weapp/tab/index",
|
||||
"van-tabs": "@vant/weapp/tabs/index",
|
||||
"van-divider": "@vant/weapp/divider/index",
|
||||
"van-dialog": "@vant/weapp/dialog/index",
|
||||
"van-notify": "@vant/weapp/notify/index"
|
||||
},
|
||||
"navigationBarTitleText": "预约记录",
|
||||
"onReachBottomDistance": 100
|
||||
"usingComponents": {
|
||||
"van-tab": "@vant/weapp/tab/index",
|
||||
"van-tabs": "@vant/weapp/tabs/index",
|
||||
"van-divider": "@vant/weapp/divider/index",
|
||||
"van-dialog": "@vant/weapp/dialog/index",
|
||||
"van-notify": "@vant/weapp/notify/index",
|
||||
"van-dropdown-menu": "@vant/weapp/dropdown-menu/index",
|
||||
"van-dropdown-item": "@vant/weapp/dropdown-item/index",
|
||||
"van-field": "@vant/weapp/field/index",
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
|
||||
"van-popup": "@vant/weapp/popup/index",
|
||||
"van-action-sheet": "@vant/weapp/action-sheet/index"
|
||||
},
|
||||
"navigationBarTitleText": "预约记录",
|
||||
"onReachBottomDistance": 100
|
||||
}
|
@ -50,7 +50,19 @@
|
||||
</view>
|
||||
</van-tab>
|
||||
</van-tabs> -->
|
||||
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item id="item" title="{{ search.title.text }}">
|
||||
<van-cell>
|
||||
<van-field clearable value="{{ search.title.value }}" placeholder="请输入会议名称模糊查询" bind:change="changeSearchTitle" />
|
||||
</van-cell>
|
||||
<view style="padding: 15px 16px;">
|
||||
<van-button type="info" size="small" block round bind:click="searchTitle">
|
||||
查询
|
||||
</van-button>
|
||||
</view>
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item value="{{ search.status.value }}" options="{{ search.status.option }}" bind:change="changeSearchStatus" />
|
||||
</van-dropdown-menu>
|
||||
<view class="itemView" wx:for="{{reservationDataList}}" wx:for-item="item" wx:key="*this">
|
||||
<view class="headView">
|
||||
<view class="number">{{item.title}}</view>
|
||||
@ -65,23 +77,35 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="priceView">
|
||||
<view class="cancelContent" wx:if="{{item.statusValue == 4 && item.cancelResaon}}">取消原因: {{item.cancelResaon}}</view>
|
||||
<view class="cancelContent" wx:if="{{item.statusValue == 4 && item.cancelResaon}}">{{item.cancelResaon}}</view>
|
||||
</view>
|
||||
<view class="btnView">
|
||||
<!-- <view class="btn" wx:if="{{item.showInvite}}">去邀请
|
||||
<button class="shareBtn" open-type="share" data-id="{{item.id}}">转发</button>
|
||||
</view> -->
|
||||
<view class="btn" wx:if="{{item.showCancel}}" bind:tap="cancelOrder" data-id="{{item.id}}">取消预约</view>
|
||||
<view class="btn" wx:if="{{item.showDetail}}" bind:tap="jumpMeetingDetail" data-id="{{item.id}}">查看详情</view>
|
||||
<van-button style="margin-right: 10rpx;" size="small" plain type="warning" wx:if="{{item.showCancel}}" bind:tap="cancelConfirm" data-id="{{item.id}}">取消预约</van-button>
|
||||
<van-button style="margin-right: 10rpx;" size="small" plain type="info" wx:if="{{item.showCancel}}" bind:tap="editConfirm" data-id="{{item.id}}">修改信息</van-button>
|
||||
<!-- <view class="btn" wx:if="{{item.showCancel}}" bind:tap="cancelConfirm" data-id="{{item.id}}">取消预约</view>
|
||||
<view class="btn" wx:if="{{item.showCancel}}" bind:tap="editConfirm" data-id="{{item.id}}">修改信息</view> -->
|
||||
<!-- <view class="btn" wx:if="{{item.showDetail}}" bind:tap="jumpMeetingDetail" data-id="{{item.id}}">查看详情</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="loadAllLine" wx:if="{{reservationIsDataAll}}">
|
||||
<van-divider class="van-divider" customStyle="font-size: 26rpx;" contentPosition="center">数据已全部加载</van-divider>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- 提示框 -->
|
||||
<van-dialog id="van-dialog" />
|
||||
<van-dialog use-slot title="取消预约" show="{{ showCancelReason }}" show-cancel-button bind:close="onCloseCancel" bind:confirm="cancelOrder" beforeClose="{{ beforeClose }}" zIndex="109">
|
||||
<van-cell-group style="margin: 20px;">
|
||||
<van-field bind:change="onChangeCancelReason" value="{{ cancelReason }}" clearable label="" type="textarea" placeholder="请输入取消预约原因" autosize />
|
||||
</van-cell-group>
|
||||
</van-dialog>
|
||||
<!-- 提示框 -->
|
||||
<van-notify id="van-notify" />
|
||||
<!-- 修改信息 -->
|
||||
<van-action-sheet show="{{ showEdit }}" actions="{{ editAction }}" cancel-text="取消" bind:cancel="hideEdit" bind:select="editMode" bind:close="hideEdit"/>
|
||||
|
||||
</view>
|
||||
<van-popup show="{{ timeShow }}" bind:close="hideTimePicker" position="bottom" round="true">
|
||||
<van-datetime-picker title="请重新选择会议日期" type="date" value="{{ currentDate }}" min-date="{{ minDate }}" max-date="{{ maxDate }}" formatter="{{ formatter }}" bind:confirm="goRes" bind:cancel="hideTimePicker" />
|
||||
</van-popup>
|
302
miniprogram/pages/meeting/reservationRecord/service/service.js
Normal file
302
miniprogram/pages/meeting/reservationRecord/service/service.js
Normal file
@ -0,0 +1,302 @@
|
||||
const app = getApp()
|
||||
|
||||
import Dialog from '@vant/weapp/dialog/dialog';
|
||||
import Notify from '@vant/weapp/notify/notify';
|
||||
|
||||
import {
|
||||
selfFormatTimeYMD,
|
||||
selfFormatTimeHM
|
||||
} from "../../../../utils/util.js"
|
||||
|
||||
import {
|
||||
selectReservationListByUserIdRq,
|
||||
selectVisitorInvitationRecordRq,
|
||||
cancelOrderRq
|
||||
} from "../../../../api/meeting/meetingRoom.js"
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
userData: null,
|
||||
dataChange: false,
|
||||
// 我的服务参数
|
||||
reservationPageNum: 1,
|
||||
reservationPageSize: 10,
|
||||
reservationDataList: [],
|
||||
reservationIsDataAll: false,
|
||||
search: {
|
||||
title: {
|
||||
text: '会议名称',
|
||||
value: ''
|
||||
},
|
||||
status: {
|
||||
value: 1,
|
||||
option: [{
|
||||
text: '全部会议',
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
text: '待开始',
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
text: '已结束',
|
||||
value: 2
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
},
|
||||
changeSearchTitle(e) {
|
||||
this.setData({
|
||||
['search.title.value']: e.detail,
|
||||
})
|
||||
},
|
||||
searchTitle() {
|
||||
// 刷新预约数据
|
||||
this.setData({
|
||||
reservationPageNum: 1,
|
||||
reservationDataList: [],
|
||||
reservationIsDataAll: false,
|
||||
})
|
||||
this.getDataList()
|
||||
this.selectComponent('#item').toggle()
|
||||
},
|
||||
changeSearchStatus(e) {
|
||||
// 刷新预约数据
|
||||
this.setData({
|
||||
reservationPageNum: 1,
|
||||
reservationDataList: [],
|
||||
reservationIsDataAll: false,
|
||||
['search.status.value']: e.detail
|
||||
})
|
||||
this.getDataList()
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let _this = this;
|
||||
_this.setData({
|
||||
userData: wx.getStorageSync('user'),
|
||||
})
|
||||
// 获取数据
|
||||
let userId = _this.data.userData.id
|
||||
// 获取预约数据
|
||||
_this.getReservationData({
|
||||
userId,
|
||||
pageNum: _this.data.reservationPageNum,
|
||||
pageSize: _this.data.reservationPageSize,
|
||||
})
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
getDataList() {
|
||||
// 获取参数
|
||||
let _this = this;
|
||||
let tabTitle = _this.data.tabTitle
|
||||
let userId = _this.data.userData.id
|
||||
let isDataAll = null
|
||||
let pageNum = null
|
||||
let pageSize = null
|
||||
// 预约记录参数,目前只保留预约记录,其余去掉
|
||||
isDataAll = _this.data.reservationIsDataAll
|
||||
pageNum = _this.data.reservationPageNum
|
||||
pageSize = _this.data.reservationPageSize
|
||||
|
||||
// 判断数据是否已全部加载
|
||||
if (isDataAll) {
|
||||
return;
|
||||
}
|
||||
// 传递参数
|
||||
let param = {
|
||||
userId,
|
||||
pageNum,
|
||||
pageSize
|
||||
}
|
||||
_this.getReservationData(param)
|
||||
},
|
||||
|
||||
// 获取会议数据
|
||||
getReservationData(param) {
|
||||
let _this = this;
|
||||
let {
|
||||
pageNum,
|
||||
pageSize,
|
||||
userId
|
||||
} = param
|
||||
// 查询数据
|
||||
selectReservationListByUserIdRq({
|
||||
pageNum,
|
||||
pageSize,
|
||||
userId,
|
||||
parkId: 25,
|
||||
title: _this.data.search.title.value,
|
||||
statusValue: _this.data.search.status.value
|
||||
}).then(res => {
|
||||
console.log('selectReservationListByUserIdRq', res);
|
||||
// 判断数据是否全部查询
|
||||
let queryDataList = res.page.records;
|
||||
if (queryDataList && queryDataList.length > 0) {
|
||||
// 更新参数
|
||||
let reservationDataList = _this.data.reservationDataList.concat(_this.formartData(queryDataList));
|
||||
let reservationPageNum = _this.data.reservationPageNum + 1;
|
||||
_this.setData({
|
||||
reservationPageNum,
|
||||
reservationDataList,
|
||||
})
|
||||
} else {
|
||||
_this.setData({
|
||||
reservationIsDataAll: true
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 格式化数据
|
||||
formartData(queryDataList) {
|
||||
// 格式化数据
|
||||
return queryDataList.map(item => {
|
||||
item.timeSlot = selfFormatTimeYMD(item.startTime) + ' ' + selfFormatTimeHM(item.startTime) + '~' + selfFormatTimeHM(item.endDate);
|
||||
// 状态字体颜色
|
||||
let statusColor = "#FFB119";
|
||||
// 按钮是否显示
|
||||
let statusValue = item.statusValue;
|
||||
let showPay = false;
|
||||
let showInvite = false;
|
||||
let showCancel = false;
|
||||
let showDetail = false;
|
||||
// 待支付 0 :去支付、取消订单、查看详情
|
||||
if (statusValue == 0) {
|
||||
showPay = true;
|
||||
showCancel = true;
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#FFB119";
|
||||
}
|
||||
// 待使用 1:去邀请、取消订单、查看详情
|
||||
if (statusValue == 1) {
|
||||
showInvite = true;
|
||||
showCancel = true;
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#3794FF";
|
||||
// 待使用 修改为 预约成功
|
||||
item.statusName = '预约成功'
|
||||
}
|
||||
// 进行中 2:去邀请、查看详情
|
||||
if (statusValue == 2) {
|
||||
showInvite = true;
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#FF4040";
|
||||
}
|
||||
// 已结束 3:查看详情
|
||||
if (statusValue == 3) {
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#333333";
|
||||
}
|
||||
// 已取消 4:查看详情
|
||||
if (statusValue == 4) {
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#7F7F7F";
|
||||
}
|
||||
//
|
||||
// 赋值
|
||||
item.showPay = showPay;
|
||||
item.showInvite = showInvite;
|
||||
item.showCancel = showCancel;
|
||||
item.showDetail = showDetail;
|
||||
// 状态字体颜色
|
||||
item.statusColor = statusColor;
|
||||
// 图片
|
||||
if (item.roomContent.indoorPicUrl) {
|
||||
try {
|
||||
item.roomContent.indoorPicUrlFirst = JSON.parse(item.roomContent.indoorPicUrl)[0].url
|
||||
} catch (error) {
|
||||
console.log(`JSON error : ${error}`);
|
||||
}
|
||||
}
|
||||
return item;
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
// 跳转-预约详情
|
||||
jumpMeetingDetail(e) {
|
||||
console.log('jumpMeetingDetail', e);
|
||||
let id = e.currentTarget.dataset.id
|
||||
wx.navigateTo({
|
||||
url: "/pages/meeting/reservationRecord/meetingRecord/meetingDetail/meetingDetail?id=" + id,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
let _this = this;
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
console.log('onPullDownRefresh', '页面相关事件处理函数--监听用户下拉动作');
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
console.log('onReachBottom', '页面上拉触底事件的处理函数');
|
||||
let _this = this;
|
||||
// 获取数据
|
||||
_this.getDataList()
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage(e) {
|
||||
console.log('onShareAppMessage', e);
|
||||
let _this = this;
|
||||
let id = e.target.dataset.id;
|
||||
let detail = _this.data.reservationDataList.find(item => item.id == id)
|
||||
//
|
||||
let param = {
|
||||
title: detail.title,
|
||||
path: "/pages/meeting/invite/invite?id=" + id,
|
||||
imageUrl: app.IMG_NAME + detail.roomContent.indoorPicUrlFirst,
|
||||
}
|
||||
console.log('onShareAppMessage', param);
|
||||
return param;
|
||||
}
|
||||
})
|
@ -0,0 +1,18 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"van-tab": "@vant/weapp/tab/index",
|
||||
"van-tabs": "@vant/weapp/tabs/index",
|
||||
"van-divider": "@vant/weapp/divider/index",
|
||||
"van-dialog": "@vant/weapp/dialog/index",
|
||||
"van-notify": "@vant/weapp/notify/index",
|
||||
"van-dropdown-menu": "@vant/weapp/dropdown-menu/index",
|
||||
"van-dropdown-item": "@vant/weapp/dropdown-item/index",
|
||||
"van-field": "@vant/weapp/field/index",
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
|
||||
"van-popup": "@vant/weapp/popup/index",
|
||||
"van-action-sheet": "@vant/weapp/action-sheet/index"
|
||||
},
|
||||
"navigationBarTitleText": "会务服务",
|
||||
"onReachBottomDistance": 100
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
<view class="containerView public">
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item id="item" title="{{ search.title.text }}">
|
||||
<van-cell>
|
||||
<van-field clearable value="{{ search.title.value }}" placeholder="请输入会议名称模糊查询" bind:change="changeSearchTitle" />
|
||||
</van-cell>
|
||||
<view style="padding: 15px 16px;">
|
||||
<van-button type="info" size="small" block round bind:click="searchTitle">
|
||||
查询
|
||||
</van-button>
|
||||
</view>
|
||||
</van-dropdown-item>
|
||||
<van-dropdown-item value="{{ search.status.value }}" options="{{ search.status.option }}" bind:change="changeSearchStatus" />
|
||||
</van-dropdown-menu>
|
||||
<view class="itemView" wx:for="{{reservationDataList}}" wx:for-item="item" wx:key="*this">
|
||||
<view class="headView">
|
||||
<view class="number">{{item.title}}</view>
|
||||
<view class="status" style="color: {{item.statusColor}};">{{item.statusName}}</view>
|
||||
</view>
|
||||
<view class="contentView" bind:tap="jumpMeetingDetail" data-id="{{item.id}}">
|
||||
<image class="img" src="{{IMG_NAME + item.roomContent.indoorPicUrlFirst}}" mode="aspectFill"></image>
|
||||
<view class="msgView">
|
||||
<view class="title">{{item.roomContent.buildingName}} | {{item.roomContent.roomName}} | {{item.roomContent.capacityNum}} | {{item.roomContent.shape}}</view>
|
||||
<view class="name">预约人: {{item.createBy}}</view>
|
||||
<view class="time">{{item.timeSlot}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="priceView">
|
||||
<view class="cancelContent" wx:if="{{item.statusValue == 4 && item.cancelResaon}}">{{item.cancelResaon}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="loadAllLine" wx:if="{{reservationIsDataAll}}">
|
||||
<van-divider class="van-divider" customStyle="font-size: 26rpx;" contentPosition="center">数据已全部加载</van-divider>
|
||||
</view>
|
||||
|
||||
</view>
|
136
miniprogram/pages/meeting/reservationRecord/service/service.wxss
Normal file
136
miniprogram/pages/meeting/reservationRecord/service/service.wxss
Normal file
@ -0,0 +1,136 @@
|
||||
.containerView.public {
|
||||
background: none;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.itemView {
|
||||
background: white;
|
||||
margin: 30rpx 20rpx;
|
||||
padding: 30rpx 20rpx;
|
||||
/* box-shadow: rgba(210,210,210,0.5) 0px 3.752px 3.752px 0px; */
|
||||
}
|
||||
|
||||
.itemView .headView {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.itemView .headView .number {
|
||||
flex: 1;
|
||||
margin-right: 30rpx;
|
||||
font-size: 26rpx;
|
||||
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
word-break: break-all;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.itemView .headView .status {
|
||||
font-size: 26rpx;
|
||||
color: #4e96f8;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.itemView .contentView {
|
||||
box-sizing: border-box;
|
||||
border-radius: 10rpx;
|
||||
width: 100%;
|
||||
margin-top: 20rpx;
|
||||
padding: 30rpx 20rpx;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
background: #f2f2f2;
|
||||
}
|
||||
|
||||
.itemView .contentView .img {
|
||||
border-radius: 10rpx;
|
||||
width: 200rpx;
|
||||
height: 110rpx;
|
||||
}
|
||||
|
||||
.itemView .contentView .msgView {
|
||||
flex: 1;
|
||||
margin-left: 20rpx;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.itemView .contentView .msgView .title {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.itemView .contentView .msgView .name,
|
||||
.itemView .contentView .msgView .time {
|
||||
font-size: 24rpx;
|
||||
color: gray;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
|
||||
.itemView .priceView {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
margin: 30rpx 0;
|
||||
}
|
||||
|
||||
.itemView .priceView .cancelContent {
|
||||
flex: 1;
|
||||
margin-right: 40rpx;
|
||||
font-size: 26rpx;
|
||||
color: #7F7F7F;
|
||||
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
word-break: break-all;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.itemView .priceView .priceContent {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.itemView .priceView .priceContent .name {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.itemView .priceView .priceContent .price {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.itemView .btnView {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
.itemView .btnView .btn {
|
||||
border: 1px solid #4e96f8;
|
||||
position: relative;
|
||||
border-radius: 10rpx;
|
||||
margin-left: 16rpx;
|
||||
padding: 10rpx 24rpx;
|
||||
font-size: 24rpx;
|
||||
color: #4e96f8;
|
||||
}
|
||||
|
||||
.shareBtn {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.loadAllLine {
|
||||
margin-top: 80rpx;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user