mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 10:49:36 +08:00
管理员功能
- 管理员进入系统 - 管理员进入会议室列表 - 管理员选择时间、占用会议、预约会议 - 管理员、普通人员权限
This commit is contained in:
parent
176d037238
commit
d397749fbf
@ -216,4 +216,21 @@ export function addStaff(data) {
|
||||
method: "post",
|
||||
data
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 提前占用会议室
|
||||
export function useRoom(data) {
|
||||
return request({
|
||||
url: '/app/mr/beforehand',
|
||||
method: "post",
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 会议室-获取所有单位
|
||||
export function getDep() {
|
||||
return request({
|
||||
url: '/app/mr/getOrg',
|
||||
method: "post",
|
||||
})
|
||||
}
|
||||
|
@ -77,6 +77,7 @@
|
||||
"pages/meeting/reservationRecord/exhibitionRecord/detail/detail",
|
||||
"pages/meeting/meetingRoom/meetingService/meetingService",
|
||||
"pages/meeting/meetingRoom/meetingStaff/meetingStaff",
|
||||
"pages/meeting/meetingRoom/meetingDep/meetingDep",
|
||||
"pages/reportRepair/index/index",
|
||||
"pages/reportRepair/report/report",
|
||||
"pages/reportRepair/query/record/record",
|
||||
|
@ -5,7 +5,6 @@ import {
|
||||
depLogin
|
||||
} from "../../../api/login/login.js"
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
@ -13,25 +12,25 @@ Page({
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
userDetail: {},
|
||||
menuList: [{
|
||||
type: "report",
|
||||
type: "reservation",
|
||||
name: "会议预约",
|
||||
img: "/profile/static/meeting/index/reservation.png",
|
||||
path: "/pages/meeting/meetingReservation/meetingReservation",
|
||||
visible: false
|
||||
}, {
|
||||
type: "query",
|
||||
type: "record",
|
||||
name: "预约记录",
|
||||
img: "/profile/static/meeting/index/record.png",
|
||||
path: "/pages/meeting/reservationRecord/meetingRecord/meetingRecord",
|
||||
visible: true
|
||||
}, {
|
||||
type: "assign",
|
||||
type: "approve",
|
||||
name: "会议审核",
|
||||
img: "/profile/static/meeting/index/examine.png",
|
||||
path: "/pages/meeting/reservationRecord/approve/approve",
|
||||
visible: true
|
||||
visible: false
|
||||
}, {
|
||||
type: "repair",
|
||||
type: "service",
|
||||
name: "会务服务",
|
||||
img: "/profile/static/meeting/index/serve.png",
|
||||
path: "/pages/meeting/reservationRecord/service/service",
|
||||
@ -84,11 +83,15 @@ Page({
|
||||
*/
|
||||
onLoad(options) {
|
||||
let _this = this
|
||||
// 获取一月后时间,默认只能选一个月之后
|
||||
let userDetail = wx.getStorageSync('user')
|
||||
// 获取一月后时间,默认只能选一个月之后,管理员可以选一年后的
|
||||
const today = new Date()
|
||||
const newDate = new Date(today)
|
||||
newDate.setMonth(newDate.getMonth() + 1)
|
||||
let userDetail = wx.getStorageSync('user')
|
||||
if (userDetail.roomRole == 5) {
|
||||
newDate.setFullYear(newDate.getFullYear() + 1)
|
||||
} else {
|
||||
newDate.setMonth(newDate.getMonth() + 1)
|
||||
}
|
||||
_this.setData({
|
||||
userDetail,
|
||||
maxDate: newDate.getTime()
|
||||
@ -124,10 +127,15 @@ Page({
|
||||
}
|
||||
} else {
|
||||
if (obj.name === '会议预约') {
|
||||
// 未授权
|
||||
this.setData({
|
||||
showLogin: true
|
||||
})
|
||||
if (this.data.userDetail.roomRole == 5) {
|
||||
// 管理员,不需要认证
|
||||
this.showTimePicker()
|
||||
} else {
|
||||
// 未授权
|
||||
this.setData({
|
||||
showLogin: true
|
||||
})
|
||||
}
|
||||
return
|
||||
// app.selfShowMsg('您暂无权限使用该功能,请联系机关事务局XXX(电话15888888888)进行赋权后使用')
|
||||
} else {
|
||||
@ -141,28 +149,34 @@ Page({
|
||||
visibleBlock() {
|
||||
let _this = this
|
||||
let userDetail = _this.data.userDetail
|
||||
let dataType = userDetail.dataType
|
||||
let userRole = userDetail.roomRole
|
||||
let menuList = _this.data.menuList
|
||||
// 角色类型 1.普通用户,3派单员,5维修工,7管理员 , 9楼层
|
||||
// if (dataType == 3 || dataType == 7) { // 展示-派单入口,仅有派单员、管理员能进
|
||||
// menuList = menuList.map(item => {
|
||||
// if (item.type == 'assign') {
|
||||
// item.visible = true
|
||||
// }
|
||||
// return item
|
||||
// })
|
||||
// }
|
||||
// if (dataType == 5) { // 展示-维修入口
|
||||
// menuList = menuList.map(item => {
|
||||
// if (item.type == 'repair') {
|
||||
// item.visible = true
|
||||
// }
|
||||
// return item
|
||||
// })
|
||||
// }
|
||||
// _this.setData({
|
||||
// menuList
|
||||
// })
|
||||
// 角色类型 1.普通用户,3.会务人员,5.管理员
|
||||
if (userRole == 3) {
|
||||
// 会务人员,会务服务允许访问
|
||||
menuList = menuList.map(item => {
|
||||
if (item.type == 'service') {
|
||||
item.visible = true
|
||||
}
|
||||
return item
|
||||
})
|
||||
}
|
||||
if (userRole == 5) {
|
||||
// 管理员,会务审核允许访问,且预约记录自动跳转到会议审核
|
||||
menuList = menuList.map(item => {
|
||||
if (item.type == 'approve') {
|
||||
item.visible = true
|
||||
}
|
||||
if (item.type == 'record') {
|
||||
item.path = '/pages/meeting/reservationRecord/approve/approve'
|
||||
item.visible = true
|
||||
}
|
||||
return item
|
||||
})
|
||||
}
|
||||
_this.setData({
|
||||
menuList
|
||||
})
|
||||
},
|
||||
|
||||
back() {
|
||||
|
@ -61,6 +61,7 @@ Page({
|
||||
*/
|
||||
onLoad(options) {
|
||||
// 页面初始化 options为页面跳转所带来的参数
|
||||
let userDetail = wx.getStorageSync('user')
|
||||
if (options.name) {
|
||||
wx.setNavigationBarTitle({
|
||||
title: options.name
|
||||
@ -93,8 +94,15 @@ Page({
|
||||
rId: options.rId,
|
||||
dep: options.dep,
|
||||
depId: options.depId,
|
||||
dateStr: _year + '-' + _month + '-' + _day
|
||||
dateStr: _year + '-' + _month + '-' + _day,
|
||||
userDetail: userDetail
|
||||
})
|
||||
if (userDetail.roomRole != 5 && options.depId == '') {
|
||||
// 非管理员必须认证单位
|
||||
Notify('非法操作!')
|
||||
wx.navigateBack()
|
||||
return
|
||||
}
|
||||
// 初始化数据
|
||||
this.initData();
|
||||
},
|
||||
|
@ -4,7 +4,7 @@
|
||||
<view class="queryView">
|
||||
<van-dropdown-menu active-color="#4e96f8">
|
||||
<!-- 时间范围 -->
|
||||
<van-dropdown-item value="{{ queryParam.timeRangeDict.value }}" options="{{ queryParam.timeRangeDict.list }}" bind:change="dictChange" data-type="timeRangeDict" />
|
||||
<van-dropdown-item wx:if="{{ userDetail.roomRole != 5 }}" value="{{ queryParam.timeRangeDict.value }}" options="{{ queryParam.timeRangeDict.list }}" bind:change="dictChange" data-type="timeRangeDict" />
|
||||
<!-- 字典-会议室 -->
|
||||
<van-dropdown-item value="{{ queryParam.meetingTypeDict.value }}" options="{{ queryParam.meetingTypeDict.list }}" bind:change="dictChange" data-type="meetingTypeDict" />
|
||||
<!-- 字典-人数 -->
|
||||
@ -26,7 +26,7 @@
|
||||
<view wx:for="{{roomDataList}}">
|
||||
<view class="roomType">{{item.name}}</view>
|
||||
<view class="meetingRoomItem" bind:tap="jumpMeetingRoom" wx:for="{{item.list}}" wx:for-item="room" wx:key="*this" data-id="{{room.id}}" data-status="{{room.status}}">
|
||||
<view class="content" wx:if="{{room.status === 0}}">
|
||||
<view class="content" wx:if="{{ room.status === 0 || userDetail.roomRole == 5 }}">
|
||||
<view class="title">{{room.roomNum}}</view>
|
||||
<view class="priceView">
|
||||
<view class="unit">
|
||||
@ -34,7 +34,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content disabled" wx:if="{{room.status === 1}}">
|
||||
<view class="content disabled" wx:if="{{ room.status === 1 && userDetail.roomRole != 5 }}">
|
||||
<view class="title">{{room.roomNum}}</view>
|
||||
<view class="priceView">
|
||||
<view class="unit">
|
||||
|
@ -4,22 +4,24 @@ import Notify from '@vant/weapp/notify/notify';
|
||||
|
||||
import {
|
||||
meetingRoomBookedRecordRq,
|
||||
selectFreeMeetingRoomRq
|
||||
selectFreeMeetingRoomRq,
|
||||
useRoom
|
||||
} from "../../../../api/meeting/meetingRoom.js"
|
||||
|
||||
import {
|
||||
selfFormatTimeReturnSecond59,
|
||||
selfFormatTimeYMDHMS,
|
||||
selfFormatTimeYMD,
|
||||
selfFormatTimeYMDH
|
||||
} from "../../../../utils/util.js"
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
userDetail: {},
|
||||
date: '',
|
||||
rId: '',
|
||||
dep: '',
|
||||
@ -136,13 +138,12 @@ Page({
|
||||
|
||||
// 预约时间
|
||||
reservationTime() {
|
||||
// this.setData({
|
||||
// showTime: true
|
||||
// })
|
||||
|
||||
},
|
||||
|
||||
// 确认时间
|
||||
confirmTime() {
|
||||
confirmTime(e) {
|
||||
let act = e.currentTarget.dataset.act
|
||||
let _this = this;
|
||||
let date = this.data.date
|
||||
let meetingRoomId = _this.data.meetingRoomId
|
||||
@ -159,41 +160,46 @@ Page({
|
||||
Notify('结束时间不能小于开始时间!')
|
||||
return
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: "/pages/meeting/meetingRoom/meetingOrder/meetingOrder" + paramUrl,
|
||||
})
|
||||
if (act == 'use') {
|
||||
// 提前占用
|
||||
console.log('占用!')
|
||||
// 获取当下
|
||||
let nowTime = selfFormatTimeYMD(_this.data.date)
|
||||
let data = {
|
||||
"mr": {
|
||||
"roomId": meetingRoomId,
|
||||
"start": selfFormatTimeYMDHMS(startTime),
|
||||
"end": selfFormatTimeYMDHMS(endTime),
|
||||
"mrdate": nowTime,
|
||||
"timeFormat": "0"
|
||||
}
|
||||
}
|
||||
useRoom(data).then(res => {
|
||||
console.log('占用结果', res)
|
||||
if (res.code == 0) {
|
||||
wx.reLaunch({
|
||||
url: '/pages/meeting/pay/waitComplete/waitComplete',
|
||||
})
|
||||
} else {
|
||||
// 错误提示
|
||||
Notify({
|
||||
type: 'danger',
|
||||
message: res.msg
|
||||
});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
// 下一步填写信息
|
||||
wx.navigateTo({
|
||||
url: "/pages/meeting/meetingRoom/meetingOrder/meetingOrder" + paramUrl,
|
||||
})
|
||||
}
|
||||
|
||||
// // 当前会议室是否可以预约
|
||||
// selectFreeMeetingRoomRq({
|
||||
// "roomContentId": meetingRoomId,
|
||||
// "startTime": selfFormatTimeYMDHMS(startTime),
|
||||
// "endDate": selfFormatTimeYMDHMS(endTime)
|
||||
// }).then(res => {
|
||||
// console.log('selectFreeMeetingRoomRq', res);
|
||||
// // 可以预约
|
||||
// if (!res.count) {
|
||||
// wx.navigateTo({
|
||||
// url: "/pages/meeting/meetingRoom/meetingOrder/meetingOrder" + paramUrl,
|
||||
// })
|
||||
// // _this.setData({
|
||||
// // showTime: false
|
||||
// // })
|
||||
// } else { // 不能预约
|
||||
// Notify({
|
||||
// type: 'danger',
|
||||
// message: res.msg,
|
||||
// duration: 1000,
|
||||
// selector: '#notify',
|
||||
// });
|
||||
// }
|
||||
// })
|
||||
},
|
||||
|
||||
// 取消时间
|
||||
cancelTime() {
|
||||
// this.setData({
|
||||
// showTime: false
|
||||
// })
|
||||
|
||||
},
|
||||
|
||||
// 初始化时间
|
||||
@ -229,6 +235,14 @@ Page({
|
||||
_minMintue = 30
|
||||
_maxMintue = 59
|
||||
}
|
||||
if (this.data.userDetail.roomRole == 5) {
|
||||
// 管理员全天可选
|
||||
_minTime = 8
|
||||
_maxTime = 23
|
||||
_startTime = '8:30'
|
||||
_minMintue = 30
|
||||
_maxMintue = 59
|
||||
}
|
||||
// let maxTime = new Date(_date)
|
||||
// maxTime.setFullYear(maxTime.getFullYear() + 3)
|
||||
this.setData({
|
||||
@ -281,6 +295,11 @@ Page({
|
||||
// 晚上,从17:30 - 24:00
|
||||
_endMaxTime = 23
|
||||
}
|
||||
if (this.data.userDetail.roomRole == 5) {
|
||||
// 管理员全天可选
|
||||
_endMaxTime = 23
|
||||
_endMaxMinute = 59
|
||||
}
|
||||
this.setData({
|
||||
endTime: _endMinTime,
|
||||
endMinTime: sTimeHour,
|
||||
@ -295,6 +314,7 @@ Page({
|
||||
*/
|
||||
onLoad(options) {
|
||||
console.log('onLoad', options);
|
||||
let userDetail = wx.getStorageSync('user')
|
||||
let time = options.time
|
||||
let _timeRange = options.timeRange
|
||||
let _rangeOp = []
|
||||
@ -316,6 +336,11 @@ Page({
|
||||
} else {
|
||||
_rangeOp = [_timeRangeText]
|
||||
}
|
||||
if (userDetail.roomRole == 5) {
|
||||
_timeRange = '4'
|
||||
_rangeOp = ['全天']
|
||||
_timeRangeText = '全天'
|
||||
}
|
||||
const _date = new Date(parseInt(time))
|
||||
const _year = _date.getFullYear()
|
||||
const _month = _date.getMonth() + 1 // 月份从0开始,需要+1
|
||||
@ -330,7 +355,8 @@ Page({
|
||||
dateText: _year + '年' + _month + '月' + _day + '日',
|
||||
timeRange: _timeRange,
|
||||
timeRangeText: _timeRangeText,
|
||||
rangeOp: _rangeOp
|
||||
rangeOp: _rangeOp,
|
||||
userDetail: userDetail
|
||||
})
|
||||
// minTime: null,
|
||||
// maxTime: null,
|
||||
|
@ -31,7 +31,9 @@
|
||||
</view>
|
||||
<van-datetime-picker type="time" visible-item-count="4" value="{{ endTime }}" min-hour="{{ endMinTime }}" max-hour="{{ endMaxTime }}" min-minute="{{ endMinMinute }}" max-minute="{{ endMaxMinute }}" bind:change="onInputEndTime" confirm-button-text="" cancel-button-text="" show-toolbar="{{false}}" filter="{{ filterTime }}" />
|
||||
</view>
|
||||
<view class="submitBtn" bind:tap="confirmTime">确认时间</view>
|
||||
<view wx:if="{{ userDetail.roomRole != 5 }}" data-act="confirm" class="submitBtn" bind:tap="confirmTime">确认时间</view>
|
||||
<view wx:if="{{ userDetail.roomRole == 5 }}" data-act="confirm" class="submitBtn" style="width: 40%;left: 28%;" bind:tap="confirmTime">填写信息</view>
|
||||
<view wx:if="{{ userDetail.roomRole == 5 }}" data-act="use" class="submitBtn" style="width: 40%;left: 72%;background: red;" bind:tap="confirmTime">提前占用</view>
|
||||
<van-popup show="{{ showRangePicker }}" bind:close="hideRange" position="bottom">
|
||||
<van-picker show-toolbar title="请选择会议时段" bind:cancel="hideRange" bind:confirm="rangePick" columns="{{ rangeOp }}" />
|
||||
</van-popup>
|
||||
|
136
miniprogram/pages/meeting/meetingRoom/meetingDep/meetingDep.js
Normal file
136
miniprogram/pages/meeting/meetingRoom/meetingDep/meetingDep.js
Normal file
@ -0,0 +1,136 @@
|
||||
const app = getApp()
|
||||
|
||||
import Notify from '@vant/weapp/notify/notify';
|
||||
import {
|
||||
pinyin
|
||||
} from 'pinyin-pro'
|
||||
|
||||
import {
|
||||
getDep,
|
||||
} from "../../../../api/meeting/meetingRoom.js"
|
||||
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
depId: '',
|
||||
depList: {}
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
console.log(options)
|
||||
let _this = this
|
||||
let depId = options.depId
|
||||
_this.setData({
|
||||
depId: depId
|
||||
})
|
||||
// 获取数据
|
||||
_this.getData()
|
||||
},
|
||||
|
||||
// 获取数据
|
||||
getData() {
|
||||
let _this = this
|
||||
// 获取单位列表
|
||||
getDep().then(res => {
|
||||
console.log('单位列表', res)
|
||||
let dep = res.data
|
||||
let depList = {}
|
||||
for (let key in dep) {
|
||||
let eachObj = dep[key]
|
||||
let depName = eachObj['orgName']
|
||||
let depPinYin = pinyin(depName, {
|
||||
pattern: 'first',
|
||||
type: 'array'
|
||||
})
|
||||
depPinYin = depPinYin[0]
|
||||
if (!depList.hasOwnProperty(depPinYin)) {
|
||||
depList[depPinYin] = []
|
||||
}
|
||||
depList[depPinYin].push({
|
||||
id: eachObj['orgId'],
|
||||
name: depName
|
||||
})
|
||||
}
|
||||
let newDepList = []
|
||||
for (let key in depList) {
|
||||
newDepList.push({
|
||||
first: key,
|
||||
dep: depList[key]
|
||||
})
|
||||
}
|
||||
_this.setData({
|
||||
depList: newDepList
|
||||
})
|
||||
})
|
||||
},
|
||||
// 选择单位方法
|
||||
chooseDep(e) {
|
||||
console.log(e)
|
||||
let id = e.currentTarget.dataset.id
|
||||
let name = e.currentTarget.dataset.name
|
||||
// 数据状态变更,向上个页面传递变更
|
||||
let pages = getCurrentPages() //获取page
|
||||
let prevPage = pages[pages.length - 2] //上一个页面(父页面)
|
||||
prevPage.setData({
|
||||
dep: name,
|
||||
depId: id,
|
||||
'detail.depName': name,
|
||||
'detail.depId': id,
|
||||
})
|
||||
wx.navigateBack()
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1,14 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"van-icon": "@vant/weapp/icon/index",
|
||||
"van-checkbox": "@vant/weapp/checkbox/index",
|
||||
"van-checkbox-group": "@vant/weapp/checkbox-group/index",
|
||||
"van-field": "@vant/weapp/field/index",
|
||||
"van-notify": "@vant/weapp/notify/index",
|
||||
"van-index-bar": "@vant/weapp/index-bar/index",
|
||||
"van-index-anchor": "@vant/weapp/index-anchor/index",
|
||||
"van-cell": "@vant/weapp/cell/index",
|
||||
"van-cell-group": "@vant/weapp/cell-group/index"
|
||||
},
|
||||
"navigationBarTitleText": "单位选择"
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
<van-index-bar>
|
||||
<view wx:for="{{depList}}" >
|
||||
<van-index-anchor index="{{item.first}}" />
|
||||
<van-cell wx:for="{{item.dep}}" size="large" wx:for-item="dep" title="{{dep.name}}" data-name="{{dep.name}}" data-id="{{dep.id}}" bind:click="chooseDep" />
|
||||
</view>
|
||||
</van-index-bar>
|
@ -0,0 +1,46 @@
|
||||
|
||||
.serviceView {
|
||||
margin-top: 80rpx;
|
||||
}
|
||||
|
||||
.serviceView .leftLineTitle {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.serviceView .serviceItemView {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.serviceView .serviceItemView .serviceItem {
|
||||
border-bottom: 1px solid rgb(126, 126, 126, 0.2);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
word-break: break-all;
|
||||
padding: 20rpx 20rpx;
|
||||
}
|
||||
|
||||
.serviceView .serviceItemView .serviceItem:first-of-type {
|
||||
border-top: 1px solid rgb(126, 126, 126, 0.2);
|
||||
}
|
||||
|
||||
.serviceView .serviceItem .name {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
margin-right: 20rpx;
|
||||
padding-left: 10rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.serviceView .serviceItem .content {
|
||||
color: red;
|
||||
font-size: 24rpx;
|
||||
max-width: 400rpx;
|
||||
}
|
||||
|
||||
.statementView {
|
||||
padding: 80rpx 40rpx;
|
||||
font-size: 24rpx;
|
||||
text-indent: 48rpx;
|
||||
color: gray;
|
||||
}
|
@ -224,8 +224,9 @@ Page({
|
||||
let value = e.detail
|
||||
let _data = _this.data.detail
|
||||
_data[name] = value
|
||||
let key = 'detail.' + name
|
||||
this.setData({
|
||||
..._data
|
||||
[key]: value
|
||||
})
|
||||
},
|
||||
|
||||
@ -331,7 +332,12 @@ Page({
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
chooseDep() {
|
||||
console.log(111)
|
||||
wx.navigateTo({
|
||||
url: '/pages/meeting/meetingRoom/meetingDep/meetingDep?depId=' + this.data.depId
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
@ -345,7 +351,7 @@ Page({
|
||||
onShow() {
|
||||
console.log('onShow');
|
||||
let _this = this
|
||||
|
||||
console.log(this.data)
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -62,7 +62,7 @@
|
||||
<view class="itemView">
|
||||
<view class="label">预约部门</view>
|
||||
<view class="content">
|
||||
<van-field value="{{ detail.depName }}" placeholder="" readonly clearable input-align="right" data-name="depName" />
|
||||
<van-field value="{{ detail.depName }}" placeholder="点击选择部门" readonly clearable bind:click-input="chooseDep" input-align="right" data-name="depName" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="itemView">
|
||||
@ -91,11 +91,11 @@
|
||||
</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 class="itemList">
|
||||
<view class="item" wx:for="{{serviceList}}" wx:key="*this" wx:if="{{item.isSelect}}">#{{item.serveName}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="itemView" bind:tap="jumpMeetingCoupon">
|
||||
<view class="label">优惠券</view>
|
||||
<view class="content">
|
||||
@ -112,18 +112,8 @@
|
||||
</view>
|
||||
|
||||
<view class="submitBtn" bind:tap="submitCase">提交预约</view>
|
||||
|
||||
<!-- 提示 -->
|
||||
<van-dialog id="van-dialog" />
|
||||
<van-dialog use-slot title="价格明细" show="{{ priceDialogShow }}">
|
||||
<view class="priceDialogView">
|
||||
<view class="content">{{room.money}}/小时({{room.duration}}小时起)</view>
|
||||
<view class="remark">
|
||||
<van-icon name="info-o" size="28rpx" />
|
||||
{{room.remake}}
|
||||
</view>
|
||||
</view>
|
||||
</van-dialog>
|
||||
<!-- 提示 -->
|
||||
<van-notify id="van-notify" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- 提示 -->
|
||||
<van-dialog id="van-dialog" />
|
||||
<!-- 提示 -->
|
||||
<van-notify id="van-notify" />
|
@ -30,18 +30,24 @@ Page({
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let _this = this;
|
||||
console.log('onLoad', options);
|
||||
let _this = this
|
||||
let userDetail = wx.getStorageSync('user')
|
||||
console.log('onLoad', options)
|
||||
let time = options.time
|
||||
let timeRange = options.timeRange
|
||||
let status = options.status
|
||||
if (userDetail.roomRole == 5) {
|
||||
// 管理员不受限制
|
||||
status = '0'
|
||||
}
|
||||
_this.setData({
|
||||
date: time,
|
||||
timeRange: timeRange,
|
||||
rId: options.rId,
|
||||
dep: options.dep,
|
||||
depId: options.depId,
|
||||
canRes: status === "1" ? false : true
|
||||
canRes: status == "1" ? false : true,
|
||||
userDetail: userDetail
|
||||
})
|
||||
let meetingRoomId = options.id;
|
||||
meetingRoomDetailRq({
|
||||
|
@ -4,24 +4,35 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
id: ''
|
||||
id: '',
|
||||
userDetail: {}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let _this = this;
|
||||
let _this = this
|
||||
let userDetail = wx.getStorageSync('user')
|
||||
_this.setData({
|
||||
...options
|
||||
...options,
|
||||
userDetail: userDetail
|
||||
})
|
||||
},
|
||||
|
||||
// 跳转-会议预约记录
|
||||
jumpMeetingRecord() {
|
||||
wx.reLaunch({
|
||||
url: "/pages/meeting/reservationRecord/meetingRecord/meetingRecord",
|
||||
})
|
||||
if (this.data.userDetail.roomRole == 5) {
|
||||
// 管理员,跳到审核列表
|
||||
wx.reLaunch({
|
||||
url: "/pages/meeting/reservationRecord/approve/approve",
|
||||
})
|
||||
} else {
|
||||
wx.reLaunch({
|
||||
url: "/pages/meeting/reservationRecord/meetingRecord/meetingRecord",
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -220,6 +220,12 @@ Page({
|
||||
reservationPageNum,
|
||||
reservationDataList,
|
||||
})
|
||||
// 超过总大小,则加载完成
|
||||
if (_this.data.reservationDataList.length >= res.total) {
|
||||
_this.setData({
|
||||
reservationIsDataAll: true
|
||||
})
|
||||
}
|
||||
} else {
|
||||
_this.setData({
|
||||
reservationIsDataAll: true
|
||||
@ -285,15 +291,15 @@ Page({
|
||||
if (statusValue == 3) {
|
||||
// 驳回,可以修改
|
||||
statusColor = "#333333"
|
||||
showCancel = true
|
||||
showEdit = true
|
||||
// showCancel = true
|
||||
// showEdit = true
|
||||
statusName = '已驳回'
|
||||
}
|
||||
if (statusValue == 4) {
|
||||
// 占用,可以修改,取消
|
||||
// 占用,可以修改
|
||||
showEdit = true
|
||||
showCancel = true
|
||||
showStaff = true
|
||||
// showCancel = true
|
||||
// showStaff = true
|
||||
statusName = '已占用'
|
||||
}
|
||||
if (statusValue == 5) {
|
||||
@ -301,13 +307,14 @@ Page({
|
||||
showEdit = true
|
||||
showCancel = true
|
||||
showApprove = true
|
||||
showStaff = true
|
||||
// showStaff = true
|
||||
statusName = '待审核'
|
||||
}
|
||||
if (statusValue == 7) {
|
||||
// 审核通过,可以取消,不允许修改
|
||||
showCancel = true
|
||||
// 审核通过,管理员可修改
|
||||
// showCancel = true
|
||||
showStaff = true
|
||||
showEdit = true
|
||||
statusName = '已通过'
|
||||
}
|
||||
if (statusValue == 11) {
|
||||
@ -331,6 +338,12 @@ Page({
|
||||
console.log(`JSON error : ${error}`);
|
||||
}
|
||||
}
|
||||
for (let key in item) {
|
||||
// null设置为空
|
||||
if (item[key] == null) {
|
||||
item[key] = ''
|
||||
}
|
||||
}
|
||||
return item
|
||||
})
|
||||
},
|
||||
|
@ -126,11 +126,13 @@ Page({
|
||||
let showApprove = false // 显示审批操作
|
||||
let statusName = ''
|
||||
// 预约状态,1 取消 3 驳回 4 占用 5 待审核 7 审核通过,待开始 9 进行中 11已结束
|
||||
let act = _this.data.act
|
||||
|
||||
if (statusValue == 1) {
|
||||
// 取消
|
||||
// 状态字体颜色
|
||||
if (_this.data.act == '') {
|
||||
// 已取消 用户可修改
|
||||
if (act == '') {
|
||||
// 普通用户通过预约列表查看
|
||||
showEdit = true
|
||||
}
|
||||
statusColor = "#333333"
|
||||
@ -138,16 +140,19 @@ Page({
|
||||
}
|
||||
if (statusValue == 3) {
|
||||
// 驳回,可以修改
|
||||
if (act == '') {
|
||||
// 普通用户通过预约列表查看
|
||||
showEdit = true
|
||||
}
|
||||
statusColor = "#333333"
|
||||
showCancel = true
|
||||
showEdit = true
|
||||
statusName = '已驳回'
|
||||
}
|
||||
if (statusValue == 4) {
|
||||
// 占用,可以修改,取消
|
||||
showEdit = true
|
||||
showCancel = true
|
||||
showSatff = true
|
||||
// 占用,管理员可以编辑
|
||||
if (act == 'approve') {
|
||||
// 管理员允许编辑
|
||||
showEdit = true
|
||||
}
|
||||
statusName = '已占用'
|
||||
}
|
||||
if (statusValue == 5) {
|
||||
@ -155,7 +160,7 @@ Page({
|
||||
if (_this.data.act == 'approve') {
|
||||
showEdit = true
|
||||
showApprove = true
|
||||
showSatff = true
|
||||
// showSatff = true
|
||||
} else {
|
||||
showCancel = true
|
||||
}
|
||||
@ -166,6 +171,7 @@ Page({
|
||||
// 审核通过,管理员可以修改
|
||||
if (_this.data.act == 'approve') {
|
||||
showEdit = true
|
||||
showCancel = true
|
||||
showSatff = true
|
||||
}
|
||||
statusName = '已通过'
|
||||
@ -235,6 +241,11 @@ Page({
|
||||
}
|
||||
}
|
||||
recordDetail.staff = staffArr
|
||||
for (let key in recordDetail) {
|
||||
if (recordDetail[key] == null) {
|
||||
recordDetail[key] = ''
|
||||
}
|
||||
}
|
||||
_this.setData({
|
||||
detail: recordDetail
|
||||
})
|
||||
|
@ -251,7 +251,14 @@ Page({
|
||||
reservationPageNum,
|
||||
reservationDataList,
|
||||
})
|
||||
// 超过总大小,则加载完成
|
||||
if (_this.data.reservationDataList.length >= res.total) {
|
||||
_this.setData({
|
||||
reservationIsDataAll: true
|
||||
})
|
||||
}
|
||||
} else {
|
||||
console.log('111')
|
||||
_this.setData({
|
||||
reservationIsDataAll: true
|
||||
})
|
||||
@ -328,13 +335,14 @@ Page({
|
||||
statusName = '已驳回'
|
||||
}
|
||||
if (statusValue == 4) {
|
||||
// 占用,可以修改,取消
|
||||
showEdit = true
|
||||
showCancel = true
|
||||
// 占用,普通人员不存在此情况
|
||||
// showEdit = true
|
||||
// showCancel = true
|
||||
statusName = '已占用'
|
||||
}
|
||||
if (statusValue == 5) {
|
||||
// 待审核,普通用户只能取消,管理员可以修改
|
||||
showCancel = true
|
||||
statusName = '待审核'
|
||||
}
|
||||
if (statusValue == 7) {
|
||||
@ -342,7 +350,7 @@ Page({
|
||||
statusName = '已通过'
|
||||
}
|
||||
if (statusValue == 9) {
|
||||
// 已结束
|
||||
// 进行中
|
||||
statusColor = "#333333"
|
||||
statusName = '进行中'
|
||||
}
|
||||
@ -365,6 +373,12 @@ Page({
|
||||
console.log(`JSON error : ${error}`);
|
||||
}
|
||||
}
|
||||
for (let key in item) {
|
||||
// null设置为空
|
||||
if (item[key] == null) {
|
||||
item[key] = ''
|
||||
}
|
||||
}
|
||||
return item
|
||||
})
|
||||
},
|
||||
|
@ -154,6 +154,12 @@ Page({
|
||||
reservationPageNum,
|
||||
reservationDataList,
|
||||
})
|
||||
// 超过总大小,则加载完成
|
||||
if (_this.data.reservationDataList.length >= res.total) {
|
||||
_this.setData({
|
||||
reservationIsDataAll: true
|
||||
})
|
||||
}
|
||||
} else {
|
||||
_this.setData({
|
||||
reservationIsDataAll: true
|
||||
|
8
package-lock.json
generated
8
package-lock.json
generated
@ -5,13 +5,19 @@
|
||||
"packages": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"@vant/weapp": "^1.11.4"
|
||||
"@vant/weapp": "^1.11.4",
|
||||
"pinyin-pro": "^3.25.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@vant/weapp": {
|
||||
"version": "1.11.4",
|
||||
"resolved": "https://registry.npmjs.org/@vant/weapp/-/weapp-1.11.4.tgz",
|
||||
"integrity": "sha512-egOsWO4hVMP1SQSqQ46jy8UD3WysvlnUecRzPM21Y3ovkOFZ6wlaO7oHQmTXRpwr+V41Qri1qEbtNjhVxFqdyw=="
|
||||
},
|
||||
"node_modules/pinyin-pro": {
|
||||
"version": "3.25.0",
|
||||
"resolved": "https://registry.npmmirror.com/pinyin-pro/-/pinyin-pro-3.25.0.tgz",
|
||||
"integrity": "sha512-MpwQPa9Ry+1vVHrsRgfJTvbtoMn0Gk529OZEWqN+O/iiSOqnd2dbKrDMaX87n7YvVPhy2W1/sKakK9zheYNWeg=="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"@vant/weapp": "^1.11.4"
|
||||
"@vant/weapp": "^1.11.4",
|
||||
"pinyin-pro": "^3.25.0"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user