mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-22 01:59:36 +08:00
加入排序条件
This commit is contained in:
parent
84947c9b12
commit
2ab1044ae9
@ -92,46 +92,46 @@ Page({
|
|||||||
bannerList
|
bannerList
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
meetingRoomBookedRecordRq(meetingRoomId).then(res => {
|
// meetingRoomBookedRecordRq(meetingRoomId).then(res => {
|
||||||
console.log('meetingRoomBookedRecordRq', res);
|
// console.log('meetingRoomBookedRecordRq', res);
|
||||||
let _recordList = []
|
// let _recordList = []
|
||||||
for (let key in res.data) {
|
// for (let key in res.data) {
|
||||||
let eachObj = res.data[key]
|
// let eachObj = res.data[key]
|
||||||
let _date = eachObj['nowDate']
|
// let _date = eachObj['nowDate']
|
||||||
let _dataList = eachObj['reservations']
|
// let _dataList = eachObj['reservations']
|
||||||
for (let i in _dataList) {
|
// for (let i in _dataList) {
|
||||||
let dateObj = _dataList[i]
|
// let dateObj = _dataList[i]
|
||||||
let _eachData = {
|
// let _eachData = {
|
||||||
date: _date,
|
// date: _date,
|
||||||
time: dateObj.startTime.substr(11, 5) + ' - ' + dateObj.endDate.substr(11, 5),
|
// time: dateObj.startTime.substr(11, 5) + ' - ' + dateObj.endDate.substr(11, 5),
|
||||||
user: dateObj.userName,
|
// user: dateObj.userName,
|
||||||
dep: '暂无',
|
// dep: '暂无',
|
||||||
tel: dateObj.phone,
|
// tel: dateObj.phone,
|
||||||
}
|
// }
|
||||||
_recordList.push(_eachData)
|
// _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({
|
// _this.setData({
|
||||||
// recordList
|
// 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)
|
||||||
// })
|
// })
|
||||||
// console.log(_this.data.recordList)
|
|
||||||
})
|
|
||||||
// 获取地址信息
|
// 获取地址信息
|
||||||
// _this.getAddress()
|
// _this.getAddress()
|
||||||
},
|
},
|
||||||
|
@ -68,6 +68,22 @@ Page({
|
|||||||
value: 9
|
value: 9
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
sort: {
|
||||||
|
value: '',
|
||||||
|
option: [{
|
||||||
|
text: '排序方式',
|
||||||
|
value: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '会议开始时间',
|
||||||
|
value: 'start'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '创建时间',
|
||||||
|
value: 'create'
|
||||||
|
},
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showRejectReason: false, // 是否展示弹出层
|
showRejectReason: false, // 是否展示弹出层
|
||||||
@ -141,6 +157,16 @@ Page({
|
|||||||
})
|
})
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
},
|
},
|
||||||
|
changeSearchSort(e) {
|
||||||
|
// 刷新预约数据
|
||||||
|
this.setData({
|
||||||
|
reservationPageNum: 1,
|
||||||
|
reservationDataList: [],
|
||||||
|
reservationIsDataAll: false,
|
||||||
|
['search.sort.value']: e.detail
|
||||||
|
})
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
@ -221,7 +247,8 @@ Page({
|
|||||||
pageNum,
|
pageNum,
|
||||||
pageSize,
|
pageSize,
|
||||||
title: _this.data.search.title.value,
|
title: _this.data.search.title.value,
|
||||||
status: _this.data.search.status.value
|
status: _this.data.search.status.value,
|
||||||
|
sort: _this.data.search.sort.value, // 排序
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log('selectReservationListByUserIdRq', res);
|
console.log('selectReservationListByUserIdRq', res);
|
||||||
// 判断数据是否全部查询
|
// 判断数据是否全部查询
|
||||||
@ -319,17 +346,17 @@ Page({
|
|||||||
if (statusValue == 5) {
|
if (statusValue == 5) {
|
||||||
// 待审核,普通用户只能取消,管理员可以修改
|
// 待审核,普通用户只能取消,管理员可以修改
|
||||||
showEdit = true
|
showEdit = true
|
||||||
showCancel = true
|
// showCancel = true
|
||||||
showApprove = true
|
showApprove = true
|
||||||
// showStaff = true
|
// showStaff = true
|
||||||
statusName = '待审核'
|
statusName = '待审核'
|
||||||
}
|
}
|
||||||
if (statusValue == 7) {
|
if (statusValue == 7) {
|
||||||
// 审核通过,管理员可修改
|
// 审核通过,管理员可修改
|
||||||
// showCancel = true
|
showCancel = true
|
||||||
showStaff = true
|
showStaff = true
|
||||||
showEdit = true
|
showEdit = true
|
||||||
statusName = '已通过'
|
statusName = '待开始'
|
||||||
}
|
}
|
||||||
if (statusValue == 11) {
|
if (statusValue == 11) {
|
||||||
// 已结束
|
// 已结束
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</van-dropdown-item>
|
</van-dropdown-item>
|
||||||
<van-dropdown-item value="{{ search.status.value }}" options="{{ search.status.option }}" bind:change="changeSearchStatus" />
|
<van-dropdown-item value="{{ search.status.value }}" options="{{ search.status.option }}" bind:change="changeSearchStatus" />
|
||||||
|
<van-dropdown-item value="{{ search.sort.value }}" options="{{ search.sort.option }}" bind:change="changeSearchSort" />
|
||||||
</van-dropdown-menu>
|
</van-dropdown-menu>
|
||||||
<view class="itemView" wx:for="{{reservationDataList}}" wx:for-item="item" wx:key="*this">
|
<view class="itemView" wx:for="{{reservationDataList}}" wx:for-item="item" wx:key="*this">
|
||||||
<view class="headView">
|
<view class="headView">
|
||||||
@ -33,7 +34,7 @@
|
|||||||
<!-- <view class="btn" wx:if="{{item.showInvite}}">去邀请
|
<!-- <view class="btn" wx:if="{{item.showInvite}}">去邀请
|
||||||
<button class="shareBtn" open-type="share" data-id="{{item.id}}">转发</button>
|
<button class="shareBtn" open-type="share" data-id="{{item.id}}">转发</button>
|
||||||
</view> -->
|
</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="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.showEdit}}" bind:tap="editConfirm" data-id="{{item.id}}">修改信息</van-button>
|
<van-button style="margin-right: 10rpx;" size="small" plain type="info" wx:if="{{item.showEdit}}" bind:tap="editConfirm" data-id="{{item.id}}">修改信息</van-button>
|
||||||
<van-button style="margin-right: 10rpx;" size="small" plain type="warning" wx:if="{{item.showStaff}}" bind:tap="goStaff" data-id="{{item.id}}">会务负责人</van-button>
|
<van-button style="margin-right: 10rpx;" size="small" plain type="warning" wx:if="{{item.showStaff}}" bind:tap="goStaff" data-id="{{item.id}}">会务负责人</van-button>
|
||||||
<van-button style="margin-right: 10rpx;" size="small" plain type="primary" wx:if="{{item.showApprove}}" bind:tap="pass" data-id="{{item.id}}">通过</van-button>
|
<van-button style="margin-right: 10rpx;" size="small" plain type="primary" wx:if="{{item.showApprove}}" bind:tap="pass" data-id="{{item.id}}">通过</van-button>
|
||||||
|
@ -168,13 +168,13 @@ Page({
|
|||||||
statusName = '待审核'
|
statusName = '待审核'
|
||||||
}
|
}
|
||||||
if (statusValue == 7) {
|
if (statusValue == 7) {
|
||||||
// 审核通过,管理员可以修改
|
// 审核通过,管理员可以修改、取消
|
||||||
if (_this.data.act == 'approve') {
|
if (_this.data.act == 'approve') {
|
||||||
showEdit = true
|
showEdit = true
|
||||||
showCancel = true
|
showCancel = true
|
||||||
showSatff = true
|
showSatff = true
|
||||||
}
|
}
|
||||||
statusName = '已通过'
|
statusName = '待开始'
|
||||||
}
|
}
|
||||||
if (statusValue == 9) {
|
if (statusValue == 9) {
|
||||||
// 进行中
|
// 进行中
|
||||||
|
@ -67,6 +67,22 @@ Page({
|
|||||||
value: 9
|
value: 9
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
sort: {
|
||||||
|
value: '',
|
||||||
|
option: [{
|
||||||
|
text: '排序方式',
|
||||||
|
value: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '会议开始时间',
|
||||||
|
value: 'start'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '创建时间',
|
||||||
|
value: 'create'
|
||||||
|
},
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showCancelReason: false, // 是否展示弹出层
|
showCancelReason: false, // 是否展示弹出层
|
||||||
@ -140,6 +156,16 @@ Page({
|
|||||||
})
|
})
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
},
|
},
|
||||||
|
changeSearchSort(e) {
|
||||||
|
// 刷新预约数据
|
||||||
|
this.setData({
|
||||||
|
reservationPageNum: 1,
|
||||||
|
reservationDataList: [],
|
||||||
|
reservationIsDataAll: false,
|
||||||
|
['search.sort.value']: e.detail
|
||||||
|
})
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
@ -244,7 +270,8 @@ Page({
|
|||||||
// userId,
|
// userId,
|
||||||
// parkId: 25,
|
// parkId: 25,
|
||||||
title: _this.data.search.title.value, // 会议名称
|
title: _this.data.search.title.value, // 会议名称
|
||||||
status: _this.data.search.status.value // 预约状态
|
status: _this.data.search.status.value, // 预约状态
|
||||||
|
sort: _this.data.search.sort.value, // 排序
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log('selectReservationListByUserIdRq', res);
|
console.log('selectReservationListByUserIdRq', res);
|
||||||
// 判断数据是否全部查询
|
// 判断数据是否全部查询
|
||||||
@ -352,8 +379,9 @@ Page({
|
|||||||
statusName = '待审核'
|
statusName = '待审核'
|
||||||
}
|
}
|
||||||
if (statusValue == 7) {
|
if (statusValue == 7) {
|
||||||
// 审核通过,不允许修改
|
// 审核通过,不允许修改,允许取消
|
||||||
statusName = '已通过'
|
statusName = '已通过'
|
||||||
|
showCancel = true
|
||||||
}
|
}
|
||||||
if (statusValue == 9) {
|
if (statusValue == 9) {
|
||||||
// 进行中
|
// 进行中
|
||||||
|
@ -62,6 +62,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</van-dropdown-item>
|
</van-dropdown-item>
|
||||||
<van-dropdown-item value="{{ search.status.value }}" options="{{ search.status.option }}" bind:change="changeSearchStatus" />
|
<van-dropdown-item value="{{ search.status.value }}" options="{{ search.status.option }}" bind:change="changeSearchStatus" />
|
||||||
|
<van-dropdown-item value="{{ search.sort.value }}" options="{{ search.sort.option }}" bind:change="changeSearchSort" />
|
||||||
</van-dropdown-menu>
|
</van-dropdown-menu>
|
||||||
<view class="itemView" wx:for="{{reservationDataList}}" wx:for-item="item" wx:key="*this">
|
<view class="itemView" wx:for="{{reservationDataList}}" wx:for-item="item" wx:key="*this">
|
||||||
<view class="headView">
|
<view class="headView">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user