mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 15:29:37 +08:00
会务相关开发
开发会务负责人选择功能; 加入会务列表功能
This commit is contained in:
parent
e19302020f
commit
2f2594b3b3
@ -153,6 +153,16 @@ export function cancelOrderRq(data) {
|
||||
});
|
||||
}
|
||||
|
||||
// 会议室-预约审核
|
||||
export function approveOrderRq(data) {
|
||||
return request({
|
||||
// url: '/api/roomContent/cancelOrder',
|
||||
url: '/app/mr/handle',
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
// 会议室-支付订单
|
||||
export function meetingRoomPayOrderRq(data) {
|
||||
return request({
|
||||
@ -189,4 +199,21 @@ export function saveChangyangMeetingRecordRq(data) {
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 会议室-查询会务人员信息
|
||||
export function getStaff() {
|
||||
return request({
|
||||
url: '/app/mr/getWaiter',
|
||||
method: "post",
|
||||
})
|
||||
}
|
||||
|
||||
// 会议室-分配会务人员
|
||||
export function addStaff(data) {
|
||||
return request({
|
||||
url: '/app/mr/addWaiter',
|
||||
method: "post",
|
||||
data
|
||||
})
|
||||
}
|
@ -3,8 +3,9 @@ const app = getApp()
|
||||
import Notify from '@vant/weapp/notify/notify';
|
||||
|
||||
import {
|
||||
getMeetingRoomServiceAndEquipmentRq,
|
||||
queryServiceMsgRq
|
||||
getStaff,
|
||||
selectReservationByIdRq,
|
||||
addStaff
|
||||
} from "../../../../api/meeting/meetingRoom.js"
|
||||
|
||||
|
||||
@ -17,33 +18,18 @@ Page({
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
rId: '',
|
||||
checkUser: [],
|
||||
staffMusicList: [{
|
||||
id: 1,
|
||||
name: '张三',
|
||||
isSelect: false
|
||||
}, {
|
||||
id: 2,
|
||||
name: '李四',
|
||||
isSelect: false
|
||||
|
||||
}, {
|
||||
id: 3,
|
||||
name: '王五',
|
||||
isSelect: false
|
||||
}],
|
||||
staffServeList: [{
|
||||
id: 4,
|
||||
name: '赵六',
|
||||
isSelect: false
|
||||
}, {
|
||||
id: 5,
|
||||
name: '朱七',
|
||||
isSelect: false
|
||||
}, {
|
||||
id: 6,
|
||||
name: '冯八',
|
||||
isSelect: false
|
||||
}]
|
||||
// staffMusicList: [{
|
||||
// id: 1,
|
||||
// name: '张三',
|
||||
// isSelect: false
|
||||
// }],
|
||||
staffMusicList: [],
|
||||
// staffServeList: [{
|
||||
// id: 4,
|
||||
// name: '赵六',
|
||||
// isSelect: false
|
||||
// }],
|
||||
staffServeList: []
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
@ -62,9 +48,53 @@ Page({
|
||||
|
||||
// 获取数据
|
||||
getData() {
|
||||
let _this = this;
|
||||
let _this = this
|
||||
let id = _this.data.rId
|
||||
// 获取预约信息
|
||||
selectReservationByIdRq({
|
||||
id: id
|
||||
}).then(res => {
|
||||
console.log('预约信息:', res)
|
||||
let staffIdArr = []
|
||||
let staff = res.waiters
|
||||
for (let key in staff) {
|
||||
staffIdArr.push(staff[key].userId)
|
||||
}
|
||||
getStaff().then(resStaff => {
|
||||
console.log('会务人员:', resStaff)
|
||||
let musicList = []
|
||||
let serveList = []
|
||||
for (let key in resStaff.voiceWaiter) {
|
||||
let eachObj = resStaff.voiceWaiter[key]
|
||||
let isSel = false
|
||||
if (staffIdArr.includes(eachObj.id)) {
|
||||
isSel = true
|
||||
}
|
||||
musicList.push({
|
||||
id: eachObj.id,
|
||||
name: eachObj.username,
|
||||
isSelect: isSel
|
||||
})
|
||||
}
|
||||
for (let key in resStaff.serveWaiter) {
|
||||
let eachObj = resStaff.serveWaiter[key]
|
||||
let isSel = false
|
||||
if (staffIdArr.includes(eachObj.id)) {
|
||||
isSel = true
|
||||
}
|
||||
serveList.push({
|
||||
id: eachObj.id,
|
||||
name: eachObj.username,
|
||||
isSelect: isSel
|
||||
})
|
||||
}
|
||||
_this.setData({
|
||||
staffServeList: serveList,
|
||||
staffMusicList: musicList
|
||||
})
|
||||
})
|
||||
})
|
||||
// ajax获取当前预约的人员以及会务人员列表
|
||||
|
||||
},
|
||||
|
||||
// 服务选择
|
||||
@ -103,13 +133,47 @@ Page({
|
||||
// 提交
|
||||
console.log(_this.data.staffMusicList)
|
||||
console.log(_this.data.staffServeList)
|
||||
let staffMusicList = _this.data.staffMusicList
|
||||
let staffServeList = _this.data.staffServeList
|
||||
let musicId = ''
|
||||
for (let key in staffMusicList) {
|
||||
if (staffMusicList[key].isSelect) {
|
||||
musicId += staffMusicList[key].id + ','
|
||||
}
|
||||
}
|
||||
if (musicId != '') {
|
||||
// 去掉最后一个,
|
||||
musicId = musicId.substring(0, musicId.length - 1)
|
||||
}
|
||||
let serveId = ''
|
||||
for (let key in staffServeList) {
|
||||
if (staffServeList[key].isSelect) {
|
||||
serveId += staffServeList[key].id + ','
|
||||
}
|
||||
}
|
||||
if (serveId != '') {
|
||||
// 去掉最后一个,
|
||||
serveId = serveId.substring(0, serveId.length - 1)
|
||||
}
|
||||
addStaff({
|
||||
id: _this.data.rId,
|
||||
voiceWaiter: musicId,
|
||||
serveWaiter: serveId
|
||||
}).then(res => {
|
||||
Notify({
|
||||
type: 'success',
|
||||
message: '分配成功!'
|
||||
})
|
||||
wx.navigateBack()
|
||||
})
|
||||
|
||||
// let pages = getCurrentPages(); //获取page
|
||||
// let prevPage = pages[pages.length - 2]; //上一个页面(父页面)
|
||||
// prevPage.setData({
|
||||
// serviceList: _this.data.serviceList
|
||||
// })
|
||||
// console.log(_this.data.serviceList)
|
||||
wx.navigateBack()
|
||||
// wx.navigateBack()
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -11,7 +11,8 @@ import {
|
||||
import {
|
||||
selectReservationListByUserIdRq,
|
||||
selectVisitorInvitationRecordRq,
|
||||
cancelOrderRq
|
||||
cancelOrderRq,
|
||||
approveOrderRq
|
||||
} from "../../../../api/meeting/meetingRoom.js"
|
||||
|
||||
Page({
|
||||
@ -271,7 +272,7 @@ Page({
|
||||
let statusValue = item.status;
|
||||
let showCancel = false // 显示取消操作
|
||||
let showEdit = false // 显示编辑操作
|
||||
let showSatff = false // 显示会务人员
|
||||
let showStaff = false // 显示会务人员
|
||||
let showApprove = false // 显示审批操作
|
||||
let statusName = ''
|
||||
// 预约状态,1 取消 3 驳回 4 占用 5 待审核 7 审核通过,待开始 9 进行中 11已结束
|
||||
@ -292,7 +293,7 @@ Page({
|
||||
// 占用,可以修改,取消
|
||||
showEdit = true
|
||||
showCancel = true
|
||||
showSatff = true
|
||||
showStaff = true
|
||||
statusName = '已占用'
|
||||
}
|
||||
if (statusValue == 5) {
|
||||
@ -300,13 +301,13 @@ Page({
|
||||
showEdit = true
|
||||
showCancel = true
|
||||
showApprove = true
|
||||
showSatff = true
|
||||
showStaff = true
|
||||
statusName = '待审核'
|
||||
}
|
||||
if (statusValue == 7) {
|
||||
// 审核通过,可以取消,不允许修改
|
||||
showCancel = true
|
||||
showSatff = true
|
||||
showStaff = true
|
||||
statusName = '已通过'
|
||||
}
|
||||
if (statusValue == 11) {
|
||||
@ -318,7 +319,7 @@ Page({
|
||||
item.showCancel = showCancel
|
||||
item.showEdit = showEdit
|
||||
item.showApprove = showApprove
|
||||
item.showSatff = showSatff
|
||||
item.showStaff = showStaff
|
||||
item.statusName = statusName
|
||||
// 状态字体颜色
|
||||
item.statusColor = statusColor;
|
||||
@ -467,16 +468,42 @@ Page({
|
||||
url: '/pages/meeting/meetingReservation/meetingReservation?rId=' + _this.data.editId + '&time=' + chooseTimeStr,
|
||||
})
|
||||
},
|
||||
pass() {
|
||||
pass(e) {
|
||||
let _this = this;
|
||||
let id = e.currentTarget.dataset.id
|
||||
Dialog.confirm({
|
||||
title: '确认',
|
||||
message: '是否确认通过会议室申请?',
|
||||
})
|
||||
.then(() => {
|
||||
// on confirm
|
||||
console.log('已通过')
|
||||
// 重新加载数据
|
||||
this.getDataList()
|
||||
approveOrderRq({
|
||||
id: id,
|
||||
content: '审核通过',
|
||||
operate: 'PASS'
|
||||
}).then(res => {
|
||||
console.log('passOrder', res)
|
||||
if (res.code == 0) {
|
||||
// 刷新预约数据
|
||||
_this.setData({
|
||||
reservationPageNum: 1,
|
||||
reservationDataList: [],
|
||||
reservationIsDataAll: false,
|
||||
showRejectReason: false
|
||||
})
|
||||
Notify({
|
||||
type: 'success',
|
||||
message: '已通过该申请!'
|
||||
})
|
||||
_this.getDataList()
|
||||
} else {
|
||||
// 危险通知
|
||||
Notify({
|
||||
type: 'danger',
|
||||
message: res.msg
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// on cancel
|
||||
@ -521,10 +548,10 @@ Page({
|
||||
}
|
||||
// 执行驳回方法
|
||||
console.log('驳回,原因为' + reason)
|
||||
return
|
||||
cancelOrderRq({
|
||||
approveOrderRq({
|
||||
id: id,
|
||||
cancelResaon: reason
|
||||
content: reason,
|
||||
operate: 'REJECTED'
|
||||
}).then(res => {
|
||||
console.log('rejectOrder', res);
|
||||
if (res.code == 0) {
|
||||
@ -533,7 +560,11 @@ Page({
|
||||
reservationPageNum: 1,
|
||||
reservationDataList: [],
|
||||
reservationIsDataAll: false,
|
||||
showRejcctReason: false
|
||||
showRejectReason: false
|
||||
})
|
||||
Notify({
|
||||
type: 'danger',
|
||||
message: '已驳回该申请!'
|
||||
})
|
||||
_this.getDataList()
|
||||
} else {
|
||||
|
@ -27,6 +27,7 @@
|
||||
</view>
|
||||
<view class="priceView">
|
||||
<view class="cancelContent" wx:if="{{item.status == 1 && item.operate[0].content}}">取消原因:{{item.operate[0].content}}</view>
|
||||
<view class="cancelContent" wx:if="{{item.status == 3 && item.operate[0].content}}">驳回原因:{{item.operate[0].content}}</view>
|
||||
</view>
|
||||
<view class="btnView">
|
||||
<!-- <view class="btn" wx:if="{{item.showInvite}}">去邀请
|
||||
|
@ -14,6 +14,7 @@ import {
|
||||
cancelOrderRq,
|
||||
inviteRecordPersonListRq,
|
||||
getMeetingRoomServiceAndEquipmentRq,
|
||||
approveOrderRq
|
||||
} from "../../../../../api/meeting/meetingRoom.js"
|
||||
|
||||
Page({
|
||||
@ -41,8 +42,7 @@ Page({
|
||||
}, // 弹出层点击确认不关闭,手动关
|
||||
// 会议重新预约需要参数
|
||||
showEdit: false,
|
||||
editAction: [
|
||||
{
|
||||
editAction: [{
|
||||
name: '重新选择时间、会议室',
|
||||
type: 1
|
||||
},
|
||||
@ -106,7 +106,9 @@ Page({
|
||||
getDetail() {
|
||||
let _this = this;
|
||||
let id = _this.data.id;
|
||||
selectReservationByIdRq({id: id}).then(res => {
|
||||
selectReservationByIdRq({
|
||||
id: id
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
let recordDetail = res.mr
|
||||
// let detail = res.data
|
||||
@ -165,7 +167,7 @@ Page({
|
||||
if (_this.data.act == 'approve') {
|
||||
showEdit = true
|
||||
showSatff = true
|
||||
}
|
||||
}
|
||||
statusName = '已通过'
|
||||
}
|
||||
if (statusValue == 9) {
|
||||
@ -198,7 +200,7 @@ Page({
|
||||
}
|
||||
let device = recordDetail.room.device
|
||||
// 处理设备
|
||||
device = device.replaceAll(' ','')
|
||||
device = device.replaceAll(' ', '')
|
||||
let deviceArr = device.split('#')
|
||||
// 删除第一个,第一个为空
|
||||
deviceArr.shift()
|
||||
@ -207,11 +209,32 @@ Page({
|
||||
// 处理服务
|
||||
let serve = res.serve
|
||||
let serveArr = []
|
||||
for(let key in serve) {
|
||||
for (let key in serve) {
|
||||
serveArr.push(serve[key].name)
|
||||
}
|
||||
recordDetail.serve = serveArr
|
||||
console.log(recordDetail)
|
||||
// 处理会务人员
|
||||
let staff = res.waiters
|
||||
let staffArr = {
|
||||
music: [],
|
||||
serve: []
|
||||
}
|
||||
for (let key in staff) {
|
||||
if (staff[key].type == '1') {
|
||||
// 音控组
|
||||
staffArr.music.push({
|
||||
name: staff[key].username,
|
||||
tel: staff[key].phone
|
||||
})
|
||||
} else if (staff[key].type == '3') {
|
||||
// 服务组
|
||||
staffArr.serve.push({
|
||||
name: staff[key].username,
|
||||
tel: staff[key].phone
|
||||
})
|
||||
}
|
||||
}
|
||||
recordDetail.staff = staffArr
|
||||
_this.setData({
|
||||
detail: recordDetail
|
||||
})
|
||||
@ -229,16 +252,42 @@ Page({
|
||||
})
|
||||
})
|
||||
},
|
||||
pass() {
|
||||
pass(e) {
|
||||
let _this = this;
|
||||
let id = e.currentTarget.dataset.id
|
||||
Dialog.confirm({
|
||||
title: '确认',
|
||||
message: '是否确认通过会议室申请?',
|
||||
})
|
||||
.then(() => {
|
||||
// on confirm
|
||||
console.log('已通过')
|
||||
// 重新加载数据
|
||||
this.getDataList()
|
||||
approveOrderRq({
|
||||
id: id,
|
||||
content: '审核通过',
|
||||
operate: 'PASS'
|
||||
}).then(res => {
|
||||
console.log('passOrder', res)
|
||||
if (res.code == 0) {
|
||||
Notify({
|
||||
type: 'success',
|
||||
message: '已通过该申请!'
|
||||
})
|
||||
// 刷新数据
|
||||
_this.getDetail()
|
||||
// 数据状态变更,向上个页面传递变更
|
||||
let pages = getCurrentPages() //获取page
|
||||
let prevPage = pages[pages.length - 2] //上一个页面(父页面)
|
||||
prevPage.setData({
|
||||
dataChange: true
|
||||
})
|
||||
} else {
|
||||
// 危险通知
|
||||
Notify({
|
||||
type: 'danger',
|
||||
message: res.msg
|
||||
});
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
// on cancel
|
||||
@ -283,27 +332,34 @@ Page({
|
||||
}
|
||||
// 执行驳回方法
|
||||
console.log('驳回,原因为' + reason)
|
||||
return
|
||||
cancelOrderRq({
|
||||
approveOrderRq({
|
||||
id: id,
|
||||
cancelResaon: reason
|
||||
content: reason,
|
||||
operate: 'REJECTED'
|
||||
}).then(res => {
|
||||
console.log('rejectOrder', res);
|
||||
if (res.code == 0) {
|
||||
// 刷新预约数据
|
||||
_this.setData({
|
||||
reservationPageNum: 1,
|
||||
reservationDataList: [],
|
||||
reservationIsDataAll: false,
|
||||
showRejcctReason: false
|
||||
showRejectReason: false
|
||||
})
|
||||
Notify({
|
||||
type: 'danger',
|
||||
message: '已驳回该申请!'
|
||||
})
|
||||
// 刷新数据
|
||||
_this.getDetail()
|
||||
// 数据状态变更,向上个页面传递变更
|
||||
let pages = getCurrentPages() //获取page
|
||||
let prevPage = pages[pages.length - 2] //上一个页面(父页面)
|
||||
prevPage.setData({
|
||||
dataChange: true
|
||||
})
|
||||
_this.getDataList()
|
||||
} else {
|
||||
// 危险通知
|
||||
Notify({
|
||||
type: 'danger',
|
||||
message: res.msg
|
||||
});
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -26,6 +26,10 @@
|
||||
<view class="label">取消原因</view>
|
||||
<view class="content status" style="color: {{detail.statusColor}};">{{detail.operate[0].content}}</view>
|
||||
</view>
|
||||
<view class="cellView" wx:if="{{detail.status == 3}}">
|
||||
<view class="label">驳回原因</view>
|
||||
<view class="content status" style="color: {{detail.statusColor}};">{{detail.operate[0].content}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="basicView">
|
||||
@ -68,7 +72,6 @@
|
||||
<view class="serviceItem" wx:for="{{detail.roomDevice}}" wx:key="*this">
|
||||
<view class="name">{{item}}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="serviceItemView">
|
||||
<view class="label">会议服务</view>
|
||||
@ -77,14 +80,23 @@
|
||||
<!-- <view class="name">{{item.num}}</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="serviceItemView">
|
||||
<view class="label">会务人员</view>
|
||||
<view class="serviceItem" wx:for="{{detail.staff.music}}" wx:key="*this">
|
||||
<view class="name">(音控组){{item.name}}</view>
|
||||
</view>
|
||||
<view class="serviceItem" wx:for="{{detail.staff.serve}}" wx:key="*this">
|
||||
<view class="name">(会务服务组){{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cellView">
|
||||
<view class="label">创建时间</view>
|
||||
<view class="content">{{detail.createTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 底部区域 -->
|
||||
<view class="bottomFix" wx:if="{{detail.showEdit || detail.showCancel || detail.showApprove}}">
|
||||
<view class="bottomFix" wx:if="{{act != 'serve' && (detail.showEdit || detail.showCancel || detail.showApprove)}}">
|
||||
<!-- <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>
|
||||
|
@ -11,7 +11,8 @@ import {
|
||||
import {
|
||||
selectReservationListByUserIdRq,
|
||||
selectVisitorInvitationRecordRq,
|
||||
cancelOrderRq
|
||||
cancelOrderRq,
|
||||
approveOrderRq
|
||||
} from "../../../../api/meeting/meetingRoom.js"
|
||||
|
||||
Page({
|
||||
@ -23,7 +24,8 @@ Page({
|
||||
IMG_NAME: app.IMG_NAME,
|
||||
userData: null,
|
||||
dataChange: false,
|
||||
// 我的服务参数
|
||||
tabTitle: '会务服务',
|
||||
// 预约记录参数
|
||||
reservationPageNum: 1,
|
||||
reservationPageSize: 10,
|
||||
reservationDataList: [],
|
||||
@ -34,18 +36,22 @@ Page({
|
||||
value: ''
|
||||
},
|
||||
status: {
|
||||
value: 1,
|
||||
value: 7,
|
||||
option: [{
|
||||
text: '全部会议',
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
text: '待开始',
|
||||
value: 1
|
||||
value: 7
|
||||
},
|
||||
{
|
||||
text: '已结束',
|
||||
value: 2
|
||||
value: 11
|
||||
},
|
||||
{
|
||||
text: '进行中',
|
||||
value: 9
|
||||
},
|
||||
]
|
||||
}
|
||||
@ -121,7 +127,7 @@ Page({
|
||||
_this.getReservationData(param)
|
||||
},
|
||||
|
||||
// 获取会议数据
|
||||
// 获取预约数据
|
||||
getReservationData(param) {
|
||||
let _this = this;
|
||||
let {
|
||||
@ -131,17 +137,16 @@ Page({
|
||||
} = param
|
||||
// 查询数据
|
||||
selectReservationListByUserIdRq({
|
||||
role: 3, // 按不同角色去查询预约记录。1.普通用户, 3.会议服务人员 ,5.会议管理员
|
||||
pageNum,
|
||||
pageSize,
|
||||
userId,
|
||||
parkId: 25,
|
||||
title: _this.data.search.title.value,
|
||||
statusValue: _this.data.search.status.value
|
||||
status: _this.data.search.status.value
|
||||
}).then(res => {
|
||||
console.log('selectReservationListByUserIdRq', res);
|
||||
// 判断数据是否全部查询
|
||||
let queryDataList = res.page.records;
|
||||
if (queryDataList && queryDataList.length > 0) {
|
||||
let queryDataList = res.rows;
|
||||
if (_this.data.reservationDataList.length < res.total) {
|
||||
// 更新参数
|
||||
let reservationDataList = _this.data.reservationDataList.concat(_this.formartData(queryDataList));
|
||||
let reservationPageNum = _this.data.reservationPageNum + 1;
|
||||
@ -157,75 +162,111 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
// 获取参与数据,此处不需要
|
||||
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);
|
||||
item.timeSlot = selfFormatTimeYMD(item.start) + ' ' + selfFormatTimeHM(item.start) + '~' + selfFormatTimeHM(item.end);
|
||||
// 状态字体颜色
|
||||
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:去邀请、取消订单、查看详情
|
||||
let statusValue = item.status;
|
||||
let showCancel = false // 显示取消操作
|
||||
let showEdit = false // 显示编辑操作
|
||||
let showStaff = false // 显示会务人员
|
||||
let showApprove = false // 显示审批操作
|
||||
let statusName = ''
|
||||
// 预约状态,1 取消 3 驳回 4 占用 5 待审核 7 审核通过,待开始 9 进行中 11已结束
|
||||
if (statusValue == 1) {
|
||||
showInvite = true;
|
||||
showCancel = true;
|
||||
showDetail = true;
|
||||
// 取消
|
||||
// 状态字体颜色
|
||||
statusColor = "#3794FF";
|
||||
// 待使用 修改为 预约成功
|
||||
item.statusName = '预约成功'
|
||||
statusColor = "#333333"
|
||||
statusName = '已取消'
|
||||
}
|
||||
// 进行中 2:去邀请、查看详情
|
||||
if (statusValue == 2) {
|
||||
showInvite = true;
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#FF4040";
|
||||
}
|
||||
// 已结束 3:查看详情
|
||||
if (statusValue == 3) {
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#333333";
|
||||
// 驳回,可以修改
|
||||
statusColor = "#333333"
|
||||
showCancel = true
|
||||
showEdit = true
|
||||
statusName = '已驳回'
|
||||
}
|
||||
// 已取消 4:查看详情
|
||||
if (statusValue == 4) {
|
||||
showDetail = true;
|
||||
// 状态字体颜色
|
||||
statusColor = "#7F7F7F";
|
||||
// 占用,可以修改,取消
|
||||
showEdit = true
|
||||
showCancel = true
|
||||
showStaff = true
|
||||
statusName = '已占用'
|
||||
}
|
||||
if (statusValue == 5) {
|
||||
// 待审核,普通用户只能取消,管理员可以修改
|
||||
showEdit = true
|
||||
showCancel = true
|
||||
showApprove = true
|
||||
showStaff = true
|
||||
statusName = '待审核'
|
||||
}
|
||||
if (statusValue == 7) {
|
||||
// 审核通过,可以取消,不允许修改
|
||||
showCancel = true
|
||||
showStaff = true
|
||||
statusName = '已通过'
|
||||
}
|
||||
if (statusValue == 11) {
|
||||
// 已结束
|
||||
statusColor = "#333333"
|
||||
statusName = '已结束'
|
||||
}
|
||||
//
|
||||
// 赋值
|
||||
item.showPay = showPay;
|
||||
item.showInvite = showInvite;
|
||||
item.showCancel = showCancel;
|
||||
item.showDetail = showDetail;
|
||||
item.showCancel = false
|
||||
item.showEdit = false
|
||||
item.showApprove = false
|
||||
item.showStaff = false
|
||||
item.statusName = statusName
|
||||
// 状态字体颜色
|
||||
item.statusColor = statusColor;
|
||||
// 图片
|
||||
if (item.roomContent.indoorPicUrl) {
|
||||
if (item.imgs) {
|
||||
try {
|
||||
item.roomContent.indoorPicUrlFirst = JSON.parse(item.roomContent.indoorPicUrl)[0].url
|
||||
item.indoorPicUrlFirst = item.imgs[0].url
|
||||
} catch (error) {
|
||||
console.log(`JSON error : ${error}`);
|
||||
}
|
||||
}
|
||||
return item;
|
||||
return item
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
// 跳转-预约详情
|
||||
@ -233,10 +274,10 @@ Page({
|
||||
console.log('jumpMeetingDetail', e);
|
||||
let id = e.currentTarget.dataset.id
|
||||
wx.navigateTo({
|
||||
url: "/pages/meeting/reservationRecord/meetingRecord/meetingDetail/meetingDetail?id=" + id,
|
||||
url: "/pages/meeting/reservationRecord/meetingRecord/meetingDetail/meetingDetail?act=serve&id=" + id,
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
@ -249,6 +290,18 @@ Page({
|
||||
*/
|
||||
onShow() {
|
||||
let _this = this;
|
||||
// 数据是否变化
|
||||
if (_this.data.dataChange) {
|
||||
// 刷新数据
|
||||
_this.setData({
|
||||
dataChange: false,
|
||||
// 预约记录参数
|
||||
reservationPageNum: 1,
|
||||
reservationDataList: [],
|
||||
reservationIsDataAll: false,
|
||||
})
|
||||
_this.getDataList()
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -18,19 +18,24 @@
|
||||
<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>
|
||||
<image class="img" src="{{IMG_NAME + item.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="title">{{item.floor}} | {{item.roomNum}} | {{item.capacityNum}}人 | {{item.typeName}}</view>
|
||||
<view class="name">预约人: {{item.bookingUserName}}</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 class="cancelContent" wx:if="{{item.status == 1 && item.operate[0].content}}">取消原因:{{item.operate[0].content}}</view>
|
||||
<view class="cancelContent" wx:if="{{item.status == 3 && item.operate[0].content}}">驳回原因:{{item.operate[0].content}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="loadAllLine" wx:if="{{reservationIsDataAll}}">
|
||||
<van-divider class="van-divider" customStyle="font-size: 26rpx;" contentPosition="center">数据已全部加载</van-divider>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<!-- 提示框 -->
|
||||
<van-dialog id="van-dialog" />
|
||||
<!-- 提示框 -->
|
||||
<van-notify id="van-notify" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user