mirror of
https://gitee.com/elegant_wings/dbd-meeting-html.git
synced 2025-06-21 10:19:36 +08:00
预约列表、审核、分配会务
去掉冗余功能
This commit is contained in:
parent
bdd0e8e3eb
commit
3647205419
@ -95,4 +95,42 @@ export function getOrderInfo(parameter) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 提前占用会议室
|
||||||
|
export function useRoom(parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.meetingReservation + '/beforehand',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 会议室-取消预约
|
||||||
|
export function approveOrder(parameter) {
|
||||||
|
return axios({
|
||||||
|
// url: '/api/roomContent/cancelOrder',
|
||||||
|
url: api.meetingReservation + '/handle',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取会务人员
|
||||||
|
export function getStaff() {
|
||||||
|
return axios({
|
||||||
|
// url: '/api/roomContent/cancelOrder',
|
||||||
|
url: api.meetingReservation + '/getWaiter',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分配会务
|
||||||
|
export function addStaff(parameter) {
|
||||||
|
return axios({
|
||||||
|
// url: '/api/roomContent/cancelOrder',
|
||||||
|
url: api.meetingReservation + '/addWaiter',
|
||||||
|
method: 'post',
|
||||||
|
data: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export const meetingReservationExport = api.meetingReservation + '/export'
|
export const meetingReservationExport = api.meetingReservation + '/export'
|
||||||
|
@ -86,39 +86,3 @@ export function millsToTime (mills) {
|
|||||||
const year = month / 12
|
const year = month / 12
|
||||||
return year.toFixed(0) + ' 年'
|
return year.toFixed(0) + ' 年'
|
||||||
};
|
};
|
||||||
|
|
||||||
const formatNumber = n => {
|
|
||||||
n = n.toString()
|
|
||||||
return n[1] ? n : '0' + n
|
|
||||||
}
|
|
||||||
|
|
||||||
//返回 例 2017-12-12
|
|
||||||
export function selfFormatTimeYMD(time) {
|
|
||||||
if (typeof time === "string" && time.includes('-')) {
|
|
||||||
time = time.replaceAll('-', '/')
|
|
||||||
}
|
|
||||||
let date = new Date(time)
|
|
||||||
let year = date.getFullYear()
|
|
||||||
let month = date.getMonth() + 1
|
|
||||||
let day = date.getDate()
|
|
||||||
let hour = date.getHours()
|
|
||||||
let minute = date.getMinutes()
|
|
||||||
let second = date.getSeconds()
|
|
||||||
return [year, month, day].map(formatNumber).join('-')
|
|
||||||
}
|
|
||||||
|
|
||||||
//返回 12:30
|
|
||||||
export function selfFormatTimeHM(time) {
|
|
||||||
if (typeof time === "string" && time.includes('-')) {
|
|
||||||
time = time.replaceAll('-', '/')
|
|
||||||
}
|
|
||||||
let date = new Date(time);
|
|
||||||
let year = date.getFullYear()
|
|
||||||
let month = date.getMonth() + 1
|
|
||||||
let day = date.getDate()
|
|
||||||
let hour = date.getHours()
|
|
||||||
let minute = date.getMinutes()
|
|
||||||
let second = date.getSeconds()
|
|
||||||
|
|
||||||
return [hour, minute].map(formatNumber).join(':')
|
|
||||||
}
|
|
||||||
|
@ -120,6 +120,7 @@ import { getMeetingDict, saveRoomContent } from '@/api/admin/meeting/roomContent
|
|||||||
|
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import RoomOrderModal from '@/views/admin/meeting/modules/RoomOrderModal.vue'
|
import RoomOrderModal from '@/views/admin/meeting/modules/RoomOrderModal.vue'
|
||||||
|
import { checkPermission } from '@/utils/permissions'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MeetingMangerList',
|
name: 'MeetingMangerList',
|
||||||
@ -153,7 +154,8 @@ export default {
|
|||||||
showDepForm: true,
|
showDepForm: true,
|
||||||
depId: '',
|
depId: '',
|
||||||
dep: '',
|
dep: '',
|
||||||
rId: '' // 预约id,不为空,则为编辑
|
rId: '', // 预约id,不为空,则为编辑
|
||||||
|
isAdmin: checkPermission('meeting:admin')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -180,6 +182,10 @@ export default {
|
|||||||
this.showDepForm = false
|
this.showDepForm = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 会议管理员,不需要认证
|
||||||
|
if (this.isAdmin) {
|
||||||
|
this.showDepForm = false
|
||||||
|
}
|
||||||
this.getDict()
|
this.getDict()
|
||||||
this.getAllRoomList()
|
this.getAllRoomList()
|
||||||
},
|
},
|
||||||
@ -188,7 +194,13 @@ export default {
|
|||||||
this.nowDate = dateString
|
this.nowDate = dateString
|
||||||
},
|
},
|
||||||
disabledDate(current) {
|
disabledDate(current) {
|
||||||
return current < moment().startOf('day') || current > moment().add(14, 'days')
|
if (this.isAdmin) {
|
||||||
|
// 管理员可以选择一年后的
|
||||||
|
return current < moment().startOf('day') || current > moment().add(1, 'year')
|
||||||
|
} else {
|
||||||
|
// 普通人员只能选择14天后
|
||||||
|
return current < moment().startOf('day') || current > moment().add(14, 'days')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 获取查询参数
|
// 获取查询参数
|
||||||
getDict() {
|
getDict() {
|
||||||
@ -277,7 +289,9 @@ export default {
|
|||||||
const valueObj = res.data
|
const valueObj = res.data
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
for (const key in valueObj) {
|
for (const key in valueObj) {
|
||||||
|
|
||||||
const eachObj = valueObj[key]
|
const eachObj = valueObj[key]
|
||||||
|
|
||||||
if (eachObj['floorId'] in roomArr) {
|
if (eachObj['floorId'] in roomArr) {
|
||||||
} else {
|
} else {
|
||||||
roomArr[eachObj['floorId']] = {
|
roomArr[eachObj['floorId']] = {
|
||||||
@ -285,6 +299,12 @@ export default {
|
|||||||
list: []
|
list: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (this.isAdmin) {
|
||||||
|
// 所有都可以选
|
||||||
|
eachObj.am = 0
|
||||||
|
eachObj.pm = 0
|
||||||
|
eachObj.night = 0
|
||||||
|
}
|
||||||
roomArr[eachObj['floorId']]['list'].push(eachObj)
|
roomArr[eachObj['floorId']]['list'].push(eachObj)
|
||||||
}
|
}
|
||||||
this.roomList = roomArr
|
this.roomList = roomArr
|
||||||
@ -316,6 +336,10 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
goOrder(id, timeRange, status) {
|
goOrder(id, timeRange, status) {
|
||||||
|
if (this.isAdmin) {
|
||||||
|
// 管理员任意选择时间
|
||||||
|
timeRange = 4
|
||||||
|
}
|
||||||
let data = {
|
let data = {
|
||||||
date: this.nowDate,
|
date: this.nowDate,
|
||||||
timeRange: timeRange,
|
timeRange: timeRange,
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
<a-col :md='8' :sm='24'>
|
<a-col :md='8' :sm='24'>
|
||||||
<span class='table-page-search-submitButtons'>
|
<span class='table-page-search-submitButtons'>
|
||||||
<a-button type='primary' @click='$refs.table.refresh(true)'>查询</a-button>
|
<a-button type='primary' @click='$refs.table.refresh(true)'>查询</a-button>
|
||||||
<a-button style='margin-left: 8px' @click='() => queryParam = {}'>重置</a-button>
|
<a-button style='margin-left: 8px' @click='reset'>重置</a-button>
|
||||||
<a-dropdown v-if='removeEnable&&selectedRowKeys.length > 0'>
|
<a-dropdown v-if='removeEnable&&selectedRowKeys.length > 0'>
|
||||||
<a-button style='margin-left: 8px' type='danger' icon='delete'
|
<a-button style='margin-left: 8px' type='danger' icon='delete'
|
||||||
@click='delByIds(selectedRowKeys)'>删除</a-button>
|
@click='delByIds(selectedRowKeys)'>删除</a-button>
|
||||||
@ -76,7 +76,6 @@
|
|||||||
showPagination='true'
|
showPagination='true'
|
||||||
ref='table'
|
ref='table'
|
||||||
rowKey='id'
|
rowKey='id'
|
||||||
:rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
|
|
||||||
:columns='columns'
|
:columns='columns'
|
||||||
:data='loadData'
|
:data='loadData'
|
||||||
>
|
>
|
||||||
@ -106,9 +105,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<span slot='action' slot-scope='text, record'>
|
<span slot='action' slot-scope='text, record'>
|
||||||
<a @click='handleShow(record.id)'>查看</a>
|
<a @click='handleShow(record.id)'>查看</a>
|
||||||
<a-divider v-if='record.canCancel || record.canEdit' type='vertical' />
|
<a v-if='record.canCancel' @click='cancelConfirm(record.id)' style='margin-left: 5px'>取消预约</a>
|
||||||
<a v-if='record.canCancel' @click='cancelConfirm(record.id)'>取消预约</a>
|
|
||||||
<a-divider v-if='record.canCancel && record.canEdit' type='vertical' />
|
|
||||||
<a-dropdown :trigger="['click']" v-if='record.canEdit'>
|
<a-dropdown :trigger="['click']" v-if='record.canEdit'>
|
||||||
<a class='ant-dropdown-link' @click='e => e.preventDefault()'>
|
<a class='ant-dropdown-link' @click='e => e.preventDefault()'>
|
||||||
修改信息
|
修改信息
|
||||||
@ -122,10 +119,14 @@
|
|||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
</a-menu>
|
</a-menu>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
|
<a v-if='record.canApprove' @click='approve(record.id, 1)' style='margin-left: 5px'>通过</a>
|
||||||
|
<a v-if='record.canApprove' @click='approve(record.id, 2)' style='margin-left: 5px'>驳回</a>
|
||||||
|
<a v-if='record.canStaff' @click='staff(record.id)' style='margin-left: 5px'>分配会务</a>
|
||||||
</span>
|
</span>
|
||||||
</s-table>
|
</s-table>
|
||||||
<RoomOrder-modal ref='modal' @ok='handleOk' />
|
<RoomOrder-modal ref='modal' @ok='handleOk' />
|
||||||
<RoomOrderDetail-modal ref='detailModal' />
|
<RoomOrderDetail-modal ref='detailModal' />
|
||||||
|
<RoomOrderStaff-modal ref='staffModal' />
|
||||||
<a-modal
|
<a-modal
|
||||||
title='取消预约'
|
title='取消预约'
|
||||||
:visible='showCancelReason'
|
:visible='showCancelReason'
|
||||||
@ -133,8 +134,20 @@
|
|||||||
@cancel='onCloseCancel'
|
@cancel='onCloseCancel'
|
||||||
>
|
>
|
||||||
<a-textarea
|
<a-textarea
|
||||||
v-model='cancelReason'
|
v-model='rejectReason'
|
||||||
placeholder='请输入取消预约原因'
|
placeholder='请输入驳回原因'
|
||||||
|
:auto-size='{ minRows: 3, maxRows: 5 }'
|
||||||
|
/>
|
||||||
|
</a-modal>
|
||||||
|
<a-modal
|
||||||
|
title='驳回预约'
|
||||||
|
:visible='showRejectReason'
|
||||||
|
@ok='handleReject'
|
||||||
|
@cancel='onCloseReject'
|
||||||
|
>
|
||||||
|
<a-textarea
|
||||||
|
v-model='rejectReason'
|
||||||
|
placeholder='请输入驳回原因'
|
||||||
:auto-size='{ minRows: 3, maxRows: 5 }'
|
:auto-size='{ minRows: 3, maxRows: 5 }'
|
||||||
/>
|
/>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
@ -144,20 +157,22 @@
|
|||||||
<script>
|
<script>
|
||||||
import { STable } from '@/components'
|
import { STable } from '@/components'
|
||||||
|
|
||||||
import { getMeetingReservationList, cancelOrder } from '@/api/admin/meeting/meetingReservation'
|
import { getMeetingReservationList, cancelOrder, approveOrder } from '@/api/admin/meeting/meetingReservation'
|
||||||
import { checkPermission } from '@/utils/permissions'
|
import { checkPermission } from '@/utils/permissions'
|
||||||
import { getRoomServeList } from '@/api/admin/meeting/roomServe'
|
|
||||||
import { delRoomContent } from '@/api/admin/meeting/roomContent'
|
import moment from 'moment'
|
||||||
import { selfFormatTimeYMD, selfFormatTimeHM } from '@/utils/util'
|
|
||||||
|
|
||||||
import RoomOrderModal from '@/views/admin/meeting/modules/RoomOrderModal.vue'
|
import RoomOrderModal from '@/views/admin/meeting/modules/RoomOrderModal.vue'
|
||||||
import RoomOrderDetailModal from '@/views/admin/meeting/modules/RoomOrderDetailModal.vue'
|
import RoomOrderDetailModal from '@/views/admin/meeting/modules/RoomOrderDetailModal.vue'
|
||||||
|
import RoomOrderStaffModal from '@/views/admin/meeting/modules/RoomOrderStaffModal.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TableList',
|
name: 'TableList',
|
||||||
components: {
|
components: {
|
||||||
STable,
|
STable,
|
||||||
RoomOrderModal,
|
RoomOrderModal,
|
||||||
RoomOrderDetailModal
|
RoomOrderDetailModal,
|
||||||
|
RoomOrderStaffModal
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -174,7 +189,9 @@ export default {
|
|||||||
// 高级搜索 展开/关闭
|
// 高级搜索 展开/关闭
|
||||||
advanced: false,
|
advanced: false,
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParam: {},
|
queryParam: {
|
||||||
|
status: ''
|
||||||
|
},
|
||||||
// 表头
|
// 表头
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
@ -225,63 +242,103 @@ export default {
|
|||||||
for (let key in res.rows) {
|
for (let key in res.rows) {
|
||||||
let startTime = res.rows[key].start
|
let startTime = res.rows[key].start
|
||||||
let endTime = res.rows[key].end
|
let endTime = res.rows[key].end
|
||||||
res.rows[key].timeSlot = selfFormatTimeYMD(startTime) + ' ' + selfFormatTimeHM(startTime) + '~' + selfFormatTimeHM(endTime)
|
res.rows[key].timeSlot = moment(startTime).format('YYYY-MM-DD HH:MM') + '~' + moment(endTime).format('HH:MM')
|
||||||
// 处理状态
|
// 处理状态
|
||||||
// 预约状态,1 取消 3 驳回 4 占用 5 待审核 7 审核通过,待开始 9 进行中 11已结束
|
// 预约状态,1 取消 3 驳回 4 占用 5 待审核 7 审核通过,待开始 9 进行中 11已结束
|
||||||
let statusValue = res.rows[key].status
|
let statusValue = res.rows[key].status
|
||||||
let showCancel = false // 显示取消操作
|
let showCancel = false // 显示取消操作
|
||||||
let showEdit = false // 显示编辑操作
|
let showEdit = false // 显示编辑操作
|
||||||
if (statusValue == 1) {
|
let showStaff = false // 显示会务人员
|
||||||
// 取消
|
let showApprove = false // 显示审批操作
|
||||||
showEdit = true
|
if (this.isAdmin) {
|
||||||
}
|
// 预约状态,1 取消 3 驳回 4 占用 5 待审核 7 审核通过,待开始 9 进行中 11已结束
|
||||||
if (statusValue == 3) {
|
if (statusValue == 1) {
|
||||||
// showCancel = true
|
// 取消
|
||||||
showEdit = true
|
}
|
||||||
}
|
if (statusValue == 3) {
|
||||||
if (statusValue == 4) {
|
// 驳回
|
||||||
// 占用,普通人员不存在此情况
|
}
|
||||||
}
|
if (statusValue == 4) {
|
||||||
if (statusValue == 5) {
|
// 占用,可以修改
|
||||||
// 待审核,普通用户只能取消,管理员可以修改
|
showEdit = true
|
||||||
showCancel = true
|
// showCancel = true
|
||||||
}
|
// showStaff = true
|
||||||
if (statusValue == 7) {
|
}
|
||||||
// 审核通过,不允许修改,允许取消
|
if (statusValue == 5) {
|
||||||
showCancel = true
|
// 待审核,普通用户只能取消,管理员可以修改
|
||||||
}
|
showEdit = true
|
||||||
if (statusValue == 9) {
|
// showCancel = true
|
||||||
// 进行中
|
showApprove = true
|
||||||
}
|
// showStaff = true
|
||||||
if (statusValue == 11) {
|
}
|
||||||
// 已结束
|
if (statusValue == 7) {
|
||||||
|
// 审核通过,管理员可修改
|
||||||
|
showCancel = true
|
||||||
|
showStaff = true
|
||||||
|
showEdit = true
|
||||||
|
}
|
||||||
|
if (statusValue == 11) {
|
||||||
|
// 已结束
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 非管理员
|
||||||
|
if (statusValue == 1) {
|
||||||
|
// 取消
|
||||||
|
showEdit = true
|
||||||
|
}
|
||||||
|
if (statusValue == 3) {
|
||||||
|
// showCancel = true
|
||||||
|
showEdit = true
|
||||||
|
}
|
||||||
|
if (statusValue == 4) {
|
||||||
|
// 占用,普通人员不存在此情况
|
||||||
|
}
|
||||||
|
if (statusValue == 5) {
|
||||||
|
// 待审核,普通用户只能取消,管理员可以修改
|
||||||
|
showCancel = true
|
||||||
|
}
|
||||||
|
if (statusValue == 7) {
|
||||||
|
// 审核通过,不允许修改,允许取消
|
||||||
|
showCancel = true
|
||||||
|
}
|
||||||
|
if (statusValue == 9) {
|
||||||
|
// 进行中
|
||||||
|
}
|
||||||
|
if (statusValue == 11) {
|
||||||
|
// 已结束
|
||||||
|
}
|
||||||
}
|
}
|
||||||
res.rows[key].canCancel = showCancel
|
res.rows[key].canCancel = showCancel
|
||||||
res.rows[key].canEdit = showEdit
|
res.rows[key].canEdit = showEdit
|
||||||
|
res.rows[key].canApprove = showApprove
|
||||||
|
res.rows[key].canStaff = showStaff
|
||||||
}
|
}
|
||||||
console.log(res)
|
|
||||||
return res
|
return res
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
selectedRows: [],
|
selectedRows: [],
|
||||||
|
// 取消参数
|
||||||
showCancelReason: false,
|
showCancelReason: false,
|
||||||
cancelReason: '',
|
cancelReason: '',
|
||||||
cancelId: ''
|
cancelId: '',
|
||||||
|
// 驳回参数
|
||||||
|
showRejectReason: false,
|
||||||
|
rejectReason: '',
|
||||||
|
rejectId: '',
|
||||||
|
isAdmin: checkPermission('meeting:admin')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
filters: {},
|
filters: {},
|
||||||
created() {
|
created() {
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
reset() {
|
reset() {
|
||||||
this.queryParam = {}
|
this.queryParam = { status: '' }
|
||||||
this.$refs.table.refresh(true)
|
this.$refs.table.refresh(true)
|
||||||
},
|
},
|
||||||
onSelectChange(selectedRowKeys, selectedRows) {
|
|
||||||
this.selectedRowKeys = selectedRowKeys
|
|
||||||
this.selectedRows = selectedRows
|
|
||||||
},
|
|
||||||
// 编辑
|
// 编辑
|
||||||
handleEdit(id, type) {
|
handleEdit(id, type) {
|
||||||
if (type == 1) {
|
if (type == 1) {
|
||||||
@ -315,6 +372,11 @@ export default {
|
|||||||
this.showCancelReason = false
|
this.showCancelReason = false
|
||||||
this.cancelReason = ''
|
this.cancelReason = ''
|
||||||
},
|
},
|
||||||
|
onCloseReject() {
|
||||||
|
this.rejectId = ''
|
||||||
|
this.showRejectReason = false
|
||||||
|
this.rejectReason = ''
|
||||||
|
},
|
||||||
cancelOrderSub() {
|
cancelOrderSub() {
|
||||||
if (this.cancelReason == '') {
|
if (this.cancelReason == '') {
|
||||||
this.$message.error('请输入取消预约原因!')
|
this.$message.error('请输入取消预约原因!')
|
||||||
@ -337,6 +399,63 @@ export default {
|
|||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
// this.confirmLoading = false
|
// this.confirmLoading = false
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
approve(id, status) {
|
||||||
|
if (status == 1) {
|
||||||
|
this.handlePass(id)
|
||||||
|
} else {
|
||||||
|
this.rejectId = id
|
||||||
|
this.showRejectReason = true
|
||||||
|
this.rejectReason = ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handlePass(id) {
|
||||||
|
let _this = this
|
||||||
|
this.$confirm({
|
||||||
|
title: '确认',
|
||||||
|
content: '是否通过该预约?',
|
||||||
|
okText: '是',
|
||||||
|
okType: 'success',
|
||||||
|
cancelText: '否',
|
||||||
|
onOk() {
|
||||||
|
approveOrder({
|
||||||
|
id: id,
|
||||||
|
content: '审核通过',
|
||||||
|
operate: 'PASS'
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
_this.$message.success('已审核!')
|
||||||
|
_this.handleOk()
|
||||||
|
} else {
|
||||||
|
_this.$message.error(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onCancel() {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleReject() {
|
||||||
|
if (this.rejectReason == '' || this.rejectId == '') {
|
||||||
|
this.$message.error('请输入驳回原因!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
approveOrder({
|
||||||
|
id: this.rejectId,
|
||||||
|
content: this.rejectReason,
|
||||||
|
operate: 'REJECTED'
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success('已审核!')
|
||||||
|
this.handleOk()
|
||||||
|
this.showRejectReason = false
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
staff(id) {
|
||||||
|
this.$refs.staffModal.add(id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -7,6 +7,13 @@
|
|||||||
:ok-button-props='{style:{display:"none"}}'
|
:ok-button-props='{style:{display:"none"}}'
|
||||||
@ok='handleSubmit'
|
@ok='handleSubmit'
|
||||||
>
|
>
|
||||||
|
<a-alert v-if='order.status == 7' message="预约成功,待开始" type="success" show-icon style='margin-bottom: 10px' />
|
||||||
|
<a-alert v-if='order.status == 1' message="已取消" :description='order.operate[order.operate.length - 1].content' type="info" show-icon style='margin-bottom: 10px' />
|
||||||
|
<a-alert v-if='order.status == 3' message="已驳回" :description='order.operate[order.operate.length - 1].content' type="error" show-icon style='margin-bottom: 10px' />
|
||||||
|
<a-alert v-if='order.status == 4' message="占用" type="info" show-icon style='margin-bottom: 10px' />
|
||||||
|
<a-alert v-if='order.status == 5' message="待审核" type="info" show-icon style='margin-bottom: 10px' />
|
||||||
|
<a-alert v-if='order.status == 9' message="进行中" type="success" show-icon style='margin-bottom: 10px' />
|
||||||
|
<a-alert v-if='order.status == 11' message="已结束" type="warning" show-icon style='margin-bottom: 10px' />
|
||||||
<a-card title='会议室情况'>
|
<a-card title='会议室情况'>
|
||||||
<a-tabs default-active-key='1' @change='callback'>
|
<a-tabs default-active-key='1' @change='callback'>
|
||||||
<a-tab-pane key='1' tab='会议室详情'>
|
<a-tab-pane key='1' tab='会议室详情'>
|
||||||
@ -67,6 +74,9 @@
|
|||||||
{{ order.service }}
|
{{ order.service }}
|
||||||
</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
<a-descriptions-item label='会务人员' :span='3'>
|
<a-descriptions-item label='会务人员' :span='3'>
|
||||||
|
音控组:{{ order.staff.music }}
|
||||||
|
<br />
|
||||||
|
会务服务组:{{ order.staff.serve }}
|
||||||
</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
</a-descriptions>
|
</a-descriptions>
|
||||||
</a-card>
|
</a-card>
|
||||||
@ -130,19 +140,42 @@ export default {
|
|||||||
this.rId = id
|
this.rId = id
|
||||||
getOrderInfo({ id: this.rId }).then((res) => {
|
getOrderInfo({ id: this.rId }).then((res) => {
|
||||||
this.id = res.mr.roomId
|
this.id = res.mr.roomId
|
||||||
|
// 获取会议室信息
|
||||||
this.getRoomInfo()
|
this.getRoomInfo()
|
||||||
|
// 处理会议时间
|
||||||
let sTime = res.mr.start
|
let sTime = res.mr.start
|
||||||
let eTime = res.mr.end
|
let eTime = res.mr.end
|
||||||
res.mr.timeSlot = moment(sTime).format('YYYY-MM-DD HH:mm') + '~' + moment(eTime).format('HH:mm')
|
res.mr.timeSlot = moment(sTime).format('YYYY-MM-DD HH:mm') + '~' + moment(eTime).format('HH:mm')
|
||||||
|
|
||||||
// 处理会议服务
|
// 处理会议服务
|
||||||
let service = ''
|
let service = ''
|
||||||
for (let key in res.serve) {
|
for (let key in res.serve) {
|
||||||
service += '#' + res.serve[key]['name'] + ' '
|
service += '#' + res.serve[key]['name'] + ' '
|
||||||
}
|
}
|
||||||
res.mr.service = service
|
res.mr.service = service
|
||||||
|
// 处理会务人员
|
||||||
|
let staff = {
|
||||||
|
music: '',
|
||||||
|
serve: ''
|
||||||
|
}
|
||||||
|
for (let key in res.waiters) {
|
||||||
|
if (res.waiters[key].type == '1') {
|
||||||
|
// 音控组
|
||||||
|
staff.music += '#' + res.waiters[key].username + ' '
|
||||||
|
}
|
||||||
|
if (res.waiters[key].type == '3') {
|
||||||
|
// 会务服务组
|
||||||
|
staff.serve += '#' + res.waiters[key].username + ' '
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (staff.music == '') {
|
||||||
|
staff.music = '无'
|
||||||
|
}
|
||||||
|
if (staff.serve == '') {
|
||||||
|
staff.serve = '无'
|
||||||
|
}
|
||||||
|
res.mr.staff = staff
|
||||||
this.order = res.mr
|
this.order = res.mr
|
||||||
|
|
||||||
})
|
})
|
||||||
this.visible = true
|
this.visible = true
|
||||||
},
|
},
|
||||||
|
@ -46,15 +46,21 @@
|
|||||||
<a-input v-decorator="['id']" />
|
<a-input v-decorator="['id']" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span='10'>
|
<a-col :span='20'>
|
||||||
<a-form-item label='预约时间' :labelCol='labelCol' :wrapperCol='wrapperCol'>
|
<a-form-item label='预约时间' :labelCol='{xs: { span: 24 }, sm: { span: 4 }}' :wrapperCol='wrapperCol'>
|
||||||
<a-time-picker :disabled='disabledTime' v-decorator="['start',{rules: [{ required: true, message: '选择会议时间' }]}]"
|
<a-time-picker :disabled='disabledTime'
|
||||||
|
v-decorator="['start',{rules: [{ required: true, message: '选择会议时间' }]}]"
|
||||||
format='HH:mm' :disabledHours='disabledHours' :disabledMinutes='disabledMinutes'
|
format='HH:mm' :disabledHours='disabledHours' :disabledMinutes='disabledMinutes'
|
||||||
hideDisabledOptions='true' />
|
hideDisabledOptions='true' />
|
||||||
<a-time-picker :disabled='disabledTime' v-decorator="['end',{rules: [{ required: true, message: '选择会议时间' }]}]"
|
<a-time-picker :disabled='disabledTime'
|
||||||
|
v-decorator="['end',{rules: [{ required: true, message: '选择会议时间' }]}]"
|
||||||
style='margin-left: 10px' format='HH:mm' :disabledHours='disabledHours'
|
style='margin-left: 10px' format='HH:mm' :disabledHours='disabledHours'
|
||||||
:disabledMinutes='disabledMinutes' hideDisabledOptions='true' />
|
:disabledMinutes='disabledMinutes' hideDisabledOptions='true' />
|
||||||
|
<a-button type='danger' v-if='isAdmin' style='margin-left: 20px' @click='handleUse'>
|
||||||
|
提前占用
|
||||||
|
</a-button>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row>
|
<a-row>
|
||||||
@ -81,7 +87,7 @@
|
|||||||
<a-col :span='10'>
|
<a-col :span='10'>
|
||||||
<a-form-item label='预约部门' :labelCol='labelCol' :wrapperCol='wrapperCol'>
|
<a-form-item label='预约部门' :labelCol='labelCol' :wrapperCol='wrapperCol'>
|
||||||
<a-select show-search v-decorator="['userOrgId',{rules: [{ required: true, message: '选择预约部门' }]}]"
|
<a-select show-search v-decorator="['userOrgId',{rules: [{ required: true, message: '选择预约部门' }]}]"
|
||||||
placeholder='预约部门'>
|
placeholder='请选择预约部门'>
|
||||||
<a-select-option v-for='item in depList' :value='item.id'>
|
<a-select-option v-for='item in depList' :value='item.id'>
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
@ -129,13 +135,14 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
meetingRoomDetail, getDep, saveMeetingReservation, getOrderInfo
|
meetingRoomDetail, getDep, saveMeetingReservation, getOrderInfo, useRoom
|
||||||
} from '@/api/admin/meeting/meetingReservation'
|
} from '@/api/admin/meeting/meetingReservation'
|
||||||
import pick from 'lodash.pick'
|
import pick from 'lodash.pick'
|
||||||
import storage from 'store'
|
import storage from 'store'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||||
import { getMeetingDict } from '@/api/admin/meeting/roomContent'
|
import { getMeetingDict } from '@/api/admin/meeting/roomContent'
|
||||||
|
import { checkPermission } from '@/utils/permissions'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RoomOrderModal',
|
name: 'RoomOrderModal',
|
||||||
@ -181,7 +188,8 @@ export default {
|
|||||||
serviceMap: {},
|
serviceMap: {},
|
||||||
disabledConfirm: false,
|
disabledConfirm: false,
|
||||||
depList: [],
|
depList: [],
|
||||||
disabledTime: false
|
disabledTime: false,
|
||||||
|
isAdmin: checkPermission('meeting:admin')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeCreate() {
|
beforeCreate() {
|
||||||
@ -227,6 +235,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
add(data) {
|
add(data) {
|
||||||
|
console.log(data)
|
||||||
this.id = data.id
|
this.id = data.id
|
||||||
this.timeRange = data.timeRange
|
this.timeRange = data.timeRange
|
||||||
if (this.timeRange == 1) {
|
if (this.timeRange == 1) {
|
||||||
@ -289,7 +298,7 @@ export default {
|
|||||||
this.dep = data.dep
|
this.dep = data.dep
|
||||||
// 直接获取会议室信息
|
// 直接获取会议室信息
|
||||||
this.getRoomInfo()
|
this.getRoomInfo()
|
||||||
} else if(act == 2) {
|
} else if (act == 2) {
|
||||||
// 重新编辑信息
|
// 重新编辑信息
|
||||||
this.disabledTime = true
|
this.disabledTime = true
|
||||||
console.log('编辑信息')
|
console.log('编辑信息')
|
||||||
@ -402,7 +411,10 @@ export default {
|
|||||||
}
|
}
|
||||||
values.mrdate = this.date
|
values.mrdate = this.date
|
||||||
values.timeFormat = this.timeRange
|
values.timeFormat = this.timeRange
|
||||||
|
if (values.timeFormat == 4) {
|
||||||
|
// 全天,设置为0
|
||||||
|
values.timeFormat = 0
|
||||||
|
}
|
||||||
// 处理获取orgName
|
// 处理获取orgName
|
||||||
for (let key in this.depList) {
|
for (let key in this.depList) {
|
||||||
if (this.depList[key]['id'] == values.userOrgId) {
|
if (this.depList[key]['id'] == values.userOrgId) {
|
||||||
@ -432,29 +444,54 @@ export default {
|
|||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
// this.confirmLoading = false
|
// this.confirmLoading = false
|
||||||
})
|
})
|
||||||
// 存到ext1里
|
|
||||||
// values.ext1 = serviceStr
|
|
||||||
// values.floorId = this.typeMap[values.floor]
|
|
||||||
// values.typeId = this.shapeMap[values.typeName]
|
|
||||||
// saveRoomContent(values, files)
|
|
||||||
// .then((res) => {
|
|
||||||
// if (res.code === 0) {
|
|
||||||
// // this.$message.success('保存成功')
|
|
||||||
// // this.$emit('ok')
|
|
||||||
// this.visible = false
|
|
||||||
// } else {
|
|
||||||
// this.$message.error(res.msg)
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// .catch(() => {
|
|
||||||
// this.$message.error('系统错误,请稍后再试')
|
|
||||||
// })
|
|
||||||
// .finally(() => {
|
|
||||||
// // this.confirmLoading = false
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 提前占用方法
|
||||||
|
handleUse() {
|
||||||
|
// 提前占用,获取时间范围
|
||||||
|
let sTime = this.form.getFieldValue('start')
|
||||||
|
let eTime = this.form.getFieldValue('end')
|
||||||
|
if (sTime && eTime) {
|
||||||
|
// 处理开始结束时间
|
||||||
|
let data = {
|
||||||
|
'mr': {
|
||||||
|
'roomId': this.id,
|
||||||
|
'start': sTime.format(this.date + ' HH:mm:00'),
|
||||||
|
'end': eTime.format(this.date + ' HH:mm:00'),
|
||||||
|
'mrdate': this.date,
|
||||||
|
'timeFormat': '0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 计算一下时间差
|
||||||
|
var a = moment(data.mr.start)
|
||||||
|
var b = moment(data.mr.end)
|
||||||
|
var c = moment() // 当前时间
|
||||||
|
var timeDiff = b.diff(a)
|
||||||
|
var timeDiffNow = c.diff(a)
|
||||||
|
if (timeDiff < 0) {
|
||||||
|
// 异常
|
||||||
|
this.$message.error('结束时间不能小于开始时间!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (timeDiffNow > 0) {
|
||||||
|
// 异常
|
||||||
|
this.$message.error('开始时间请大于当前时间!!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
useRoom(data).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success('占用成功!')
|
||||||
|
this.$emit('ok')
|
||||||
|
this.visible = false
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.error('请选择占用时间!')
|
||||||
|
}
|
||||||
|
},
|
||||||
getRoomInfo() {
|
getRoomInfo() {
|
||||||
meetingRoomDetail({
|
meetingRoomDetail({
|
||||||
roomId: this.id
|
roomId: this.id
|
||||||
|
178
src/views/admin/meeting/modules/RoomOrderStaffModal.vue
Normal file
178
src/views/admin/meeting/modules/RoomOrderStaffModal.vue
Normal file
@ -0,0 +1,178 @@
|
|||||||
|
<template>
|
||||||
|
<a-modal
|
||||||
|
title='会务人员'
|
||||||
|
style='top: 20px'
|
||||||
|
width='800px'
|
||||||
|
v-model='visible'
|
||||||
|
@ok='handleSubmit'
|
||||||
|
>
|
||||||
|
<a-card title='音控组'>
|
||||||
|
<div>
|
||||||
|
<div :style="{ borderBottom: '1px solid #E9E9E9' }">
|
||||||
|
<a-checkbox :indeterminate='indeterminateMusic' :checked='checkAllMusic' @change='onCheckAllMusic'>
|
||||||
|
全选
|
||||||
|
</a-checkbox>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<a-checkbox-group v-model='musicChecked' :options='musicOp' @change='onChangeMusic' />
|
||||||
|
</div>
|
||||||
|
</a-card>
|
||||||
|
<a-card title='会务服务组'>
|
||||||
|
<div>
|
||||||
|
<div :style="{ borderBottom: '1px solid #E9E9E9' }">
|
||||||
|
<a-checkbox :indeterminate='indeterminateServe' :checked='checkAllServe' @change='onCheckAllServe'>
|
||||||
|
全选
|
||||||
|
</a-checkbox>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<a-checkbox-group v-model='serveChecked' :options='serveOp' @change='onChangeServe' />
|
||||||
|
</div>
|
||||||
|
</a-card>
|
||||||
|
</a-modal>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getOrderInfo, getStaff, addStaff
|
||||||
|
} from '@/api/admin/meeting/meetingReservation'
|
||||||
|
import pick from 'lodash.pick'
|
||||||
|
import moment from 'moment'
|
||||||
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'RoomOrderStaffModal',
|
||||||
|
props: {},
|
||||||
|
components: {},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
rId: '', // 预约id
|
||||||
|
musicOp: [],
|
||||||
|
musicChecked: [],
|
||||||
|
indeterminateMusic: true,
|
||||||
|
checkAllMusic: false,
|
||||||
|
serveOp: [],
|
||||||
|
serveChecked: [],
|
||||||
|
indeterminateServe: true,
|
||||||
|
checkAllServe: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beforeCreate() {
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
// this.getDict()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add(id) {
|
||||||
|
this.rId = id
|
||||||
|
// 获取预约信息
|
||||||
|
getOrderInfo({ id: id }).then(res => {
|
||||||
|
let staffMusicIdArr = []
|
||||||
|
let staffServeIdArr = []
|
||||||
|
let staff = res.waiters
|
||||||
|
for (let key in staff) {
|
||||||
|
if (staff[key].type == '1') {
|
||||||
|
staffMusicIdArr.push(staff[key].userId)
|
||||||
|
}
|
||||||
|
if (staff[key].type == '3') {
|
||||||
|
staffServeIdArr.push(staff[key].userId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.musicChecked = staffMusicIdArr
|
||||||
|
this.serveChecked = staffServeIdArr
|
||||||
|
getStaff().then(resStaff => {
|
||||||
|
let musicList = []
|
||||||
|
let serveList = []
|
||||||
|
for (let key in resStaff.voiceWaiter) {
|
||||||
|
let eachObj = resStaff.voiceWaiter[key]
|
||||||
|
musicList.push({
|
||||||
|
value: eachObj.id,
|
||||||
|
label: eachObj.username
|
||||||
|
})
|
||||||
|
}
|
||||||
|
for (let key in resStaff.serveWaiter) {
|
||||||
|
let eachObj = resStaff.serveWaiter[key]
|
||||||
|
serveList.push({
|
||||||
|
value: eachObj.id,
|
||||||
|
label: eachObj.username
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.musicOp = musicList
|
||||||
|
this.serveOp = serveList
|
||||||
|
this.onChangeServe()
|
||||||
|
this.onChangeMusic()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.visible = true
|
||||||
|
},
|
||||||
|
onChangeMusic() {
|
||||||
|
this.indeterminateMusic = !!this.musicChecked.length && this.musicChecked.length < this.musicOp.length
|
||||||
|
this.checkAllMusic = this.musicChecked.length === this.musicOp.length
|
||||||
|
},
|
||||||
|
onCheckAllMusic(e) {
|
||||||
|
let allMusicOpValue = []
|
||||||
|
for (let key in this.musicOp) {
|
||||||
|
allMusicOpValue.push(this.musicOp[key].value)
|
||||||
|
}
|
||||||
|
Object.assign(this, {
|
||||||
|
musicChecked: e.target.checked ? allMusicOpValue : [],
|
||||||
|
indeterminateMusic: false,
|
||||||
|
checkAllMusic: e.target.checked
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onChangeServe() {
|
||||||
|
this.indeterminateServe = !!this.serveChecked.length && this.serveChecked.length < this.serveOp.length
|
||||||
|
this.checkAllServe = this.serveChecked.length === this.serveOp.length
|
||||||
|
},
|
||||||
|
onCheckAllServe(e) {
|
||||||
|
let allServeOpValue = []
|
||||||
|
for (let key in this.serveOp) {
|
||||||
|
allServeOpValue.push(this.serveOp[key].value)
|
||||||
|
}
|
||||||
|
Object.assign(this, {
|
||||||
|
serveChecked: e.target.checked ? allServeOpValue : [],
|
||||||
|
indeterminateServe: false,
|
||||||
|
checkAllServe: e.target.checked
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSubmit(e) {
|
||||||
|
e.preventDefault()
|
||||||
|
let staffMusicList = this.musicChecked
|
||||||
|
let staffServeList = this.serveChecked
|
||||||
|
let musicId = ''
|
||||||
|
for (let key in staffMusicList) {
|
||||||
|
musicId += staffMusicList[key] + ','
|
||||||
|
}
|
||||||
|
if (musicId != '') {
|
||||||
|
// 去掉最后一个,
|
||||||
|
musicId = musicId.substring(0, musicId.length - 1)
|
||||||
|
}
|
||||||
|
let serveId = ''
|
||||||
|
for (let key in staffServeList) {
|
||||||
|
serveId += staffServeList[key] + ','
|
||||||
|
}
|
||||||
|
if (serveId != '') {
|
||||||
|
// 去掉最后一个,
|
||||||
|
serveId = serveId.substring(0, serveId.length - 1)
|
||||||
|
}
|
||||||
|
addStaff({
|
||||||
|
id: this.rId,
|
||||||
|
voiceWaiter: musicId,
|
||||||
|
serveWaiter: serveId
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message.success('已分配会务人员!')
|
||||||
|
this.visible = false
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
Loading…
x
Reference in New Issue
Block a user