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
c2e42c7c6e
commit
a087367c62
@ -21,6 +21,14 @@ export function getVisitorPersonId(id) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getRecordByReservationId(id) {
|
||||||
|
return axios({
|
||||||
|
url: api.visitorPerson + '/getRecordByReservationId/' + id,
|
||||||
|
method: 'get',
|
||||||
|
params: {}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export function saveVisitorPerson(parameter) {
|
export function saveVisitorPerson(parameter) {
|
||||||
return axios({
|
return axios({
|
||||||
|
@ -13,93 +13,79 @@
|
|||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span='10'>
|
<a-col :span='10'>
|
||||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='被访人员'>
|
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='被访人员'>
|
||||||
{{ form.title }}
|
{{ form.userName }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span='10'>
|
<a-col :span='10'>
|
||||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='被访人联系方式'>
|
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='被访人联系方式'>
|
||||||
{{ form.roomContent.meetingName }}
|
{{ form.userPhone }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span='10'>
|
<a-col :span='10'>
|
||||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='被访单位'>
|
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='被访单位'>
|
||||||
{{ form.userName }}
|
{{ form.customerName }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
|
||||||
<a-row>
|
|
||||||
<a-col :span='10'>
|
<a-col :span='10'>
|
||||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='来访人照片'>
|
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='来访人照片'>
|
||||||
{{ form.userName }}
|
<img :src='baseUrl + form.photo' style='max-width: 80px; max-height: 80px'>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span='10'>
|
<a-col :span='10'>
|
||||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='来访人姓名'>
|
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='来访人姓名'>
|
||||||
{{ form.phone }}
|
{{ form.name }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span='10'>
|
|
||||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='来访人单位'>
|
|
||||||
{{ form.customerName }}
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
<a-row>
|
|
||||||
<a-col :span='10'>
|
<a-col :span='10'>
|
||||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='来访人联系方式'>
|
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='来访人联系方式'>
|
||||||
{{ form.phone }}
|
{{ form.phone }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span='10'>
|
|
||||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='性别'>
|
|
||||||
{{ form.customerName }}
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span='10'>
|
<a-col :span='10'>
|
||||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='预约开始时间'>
|
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='到访时间'>
|
||||||
{{ form.phone }}
|
{{ form.visitTime }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span='10'>
|
<a-col :span='10'>
|
||||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='身份证类型'>
|
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='身份证类型'>
|
||||||
{{ form.customerName }}
|
{{ form.cardType }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span='10'>
|
<a-col :span='10'>
|
||||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='预约结束时间'>
|
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='离开时间'>
|
||||||
{{ form.phone }}
|
{{ form.leaveTime }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span='10'>
|
<a-col :span='10'>
|
||||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='身份证号'>
|
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='身份证号'>
|
||||||
{{ form.customerName }}
|
{{ form.cardNo }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span='10'>
|
<a-col :span='10'>
|
||||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='来访事由'>
|
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='来访事由'>
|
||||||
{{ form.phone }}
|
{{ form.visitContent }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span='10'>
|
<a-col :span='10'>
|
||||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='审批人'>
|
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='审核人'>
|
||||||
{{ form.phone }}
|
{{ form.reviewers }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span='10'>
|
<a-col :span='10'>
|
||||||
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='审批时间'>
|
<a-form-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='审批时间'>
|
||||||
{{ form.customerName }}
|
{{ form.reviewersTime }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@ -108,22 +94,22 @@
|
|||||||
<span style='width: 20px;display: block;font-size: 25px;color: #1890ff;font-weight: bold;'>|</span>
|
<span style='width: 20px;display: block;font-size: 25px;color: #1890ff;font-weight: bold;'>|</span>
|
||||||
<span style='display: block;margin-top: 11px;font-size: 15px'>进出记录</span>
|
<span style='display: block;margin-top: 11px;font-size: 15px'>进出记录</span>
|
||||||
</div>
|
</div>
|
||||||
<s-table
|
<a-table
|
||||||
class='dataTable'
|
class='dataTable'
|
||||||
:columns='columns'
|
:columns='columns'
|
||||||
:data='loadData'
|
:data-source='recordList'
|
||||||
size='default'
|
size='default'
|
||||||
ref='table'
|
ref='table'
|
||||||
bordered
|
bordered
|
||||||
>
|
>
|
||||||
</s-table>
|
</a-table>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { STable } from '@/components'
|
import { STable } from '@/components'
|
||||||
import { get, personList } from '@/api/admin/meeting/reservation'
|
import { get, personList } from '@/api/admin/meeting/reservation'
|
||||||
import { getVisitorPersonId } from '@/api/admin/meeting/visitorPerson'
|
import { getVisitorPersonId,getRecordByReservationId } from '@/api/admin/meeting/visitorPerson'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -135,8 +121,9 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
baseUrl: process.env.VUE_APP_API_BASE_URL,
|
||||||
labelCol: { span: 12 },
|
labelCol: { span: 12 },
|
||||||
wrapperCol: { span: 8 },
|
wrapperCol: { span: 10 },
|
||||||
form: {
|
form: {
|
||||||
roomContent: {}
|
roomContent: {}
|
||||||
},
|
},
|
||||||
@ -146,17 +133,18 @@ export default {
|
|||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '姓名',
|
title: '姓名',
|
||||||
dataIndex: 'participantName'
|
dataIndex: 'userName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '联系方式',
|
title: '联系方式',
|
||||||
dataIndex: 'participantPhone'
|
dataIndex: 'userPhone'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '进场时间',
|
title: '进场时间',
|
||||||
dataIndex: 'userName'
|
dataIndex: 'createTime'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
recordList:[],
|
||||||
dataList: [
|
dataList: [
|
||||||
{
|
{
|
||||||
name: 'wqc'
|
name: 'wqc'
|
||||||
@ -172,6 +160,7 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getDetail()
|
this.getDetail()
|
||||||
|
this.getRecordByReservationId()
|
||||||
personList({
|
personList({
|
||||||
reservationId: this.$route.query.id
|
reservationId: this.$route.query.id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
@ -180,10 +169,17 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getRecordByReservationId(){
|
||||||
|
getRecordByReservationId(this.$route.query.id).then(res => {
|
||||||
|
this.recordList = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
getDetail() {
|
getDetail() {
|
||||||
getVisitorPersonId(this.$route.query.id).then(res => {
|
getVisitorPersonId(this.$route.query.id).then(res => {
|
||||||
console.log('getDetail', res)
|
console.log('getDetail', res)
|
||||||
this.form = res
|
this.form = res
|
||||||
|
console.log(this.form)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
backPage() {
|
backPage() {
|
||||||
|
@ -31,6 +31,17 @@
|
|||||||
:columns='columns'
|
:columns='columns'
|
||||||
:data='loadData'
|
:data='loadData'
|
||||||
>
|
>
|
||||||
|
<span slot='status' slot-scope='text, record'>
|
||||||
|
<a-tag v-if='record.status == 0' color="orange">
|
||||||
|
未审核
|
||||||
|
</a-tag>
|
||||||
|
<a-tag v-if='record.status == 1' color="green">
|
||||||
|
审核通过
|
||||||
|
</a-tag>
|
||||||
|
<a-tag v-if='record.status == 2' color="red">
|
||||||
|
审核驳回
|
||||||
|
</a-tag>
|
||||||
|
</span>
|
||||||
<span slot='photo' slot-scope='text, record'>
|
<span slot='photo' slot-scope='text, record'>
|
||||||
<img :src='baseUrl + record.photo' style='max-width: 100px; max-height: 120px'>
|
<img :src='baseUrl + record.photo' style='max-width: 100px; max-height: 120px'>
|
||||||
</span>
|
</span>
|
||||||
@ -40,16 +51,36 @@
|
|||||||
<a v-if='editEnabel' @click='handleEdit(record)'>编辑</a>
|
<a v-if='editEnabel' @click='handleEdit(record)'>编辑</a>
|
||||||
<a-divider type='vertical' />
|
<a-divider type='vertical' />
|
||||||
<a v-if='removeEnable' @click='delByIds([record.id])'>删除</a>
|
<a v-if='removeEnable' @click='delByIds([record.id])'>删除</a>
|
||||||
|
<a-divider type='vertical' />
|
||||||
|
<a-tag @click='verifySuccess(record.id)' v-if='record.status == 0' color='green'>通过</a-tag>
|
||||||
|
<a-tag @click='verifyReject(record.id)' v-if='record.status == 0 || record.status == 1'
|
||||||
|
color='volcano'>驳回</a-tag>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
</s-table>
|
</s-table>
|
||||||
<visitorPerson-modal ref='modal' @ok='handleOk' />
|
<visitorPerson-modal ref='modal' @ok='handleOk' />
|
||||||
|
|
||||||
|
<a-modal
|
||||||
|
title='驳回'
|
||||||
|
:visible='rejectModalVisible'
|
||||||
|
:confirm-loading='rejectConfirmLoading'
|
||||||
|
@ok='rejectHandleOk'
|
||||||
|
@cancel='rejectHandleCancel'
|
||||||
|
cancelText='取消'
|
||||||
|
okText='确认'
|
||||||
|
>
|
||||||
|
<div class='rejectView'>
|
||||||
|
<div class='label'>驳回原因</div>
|
||||||
|
<a-input class='content' v-model='rejectContent' placeholder='请输入驳回原因' />
|
||||||
|
</div>
|
||||||
|
</a-modal>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { STable } from '@/components'
|
import { STable } from '@/components'
|
||||||
|
|
||||||
import { delVisitorPerson, getVisitorPersonList } from '@/api/admin/meeting/visitorPerson'
|
import { delVisitorPerson, getVisitorPersonList,saveVisitorPerson } from '@/api/admin/meeting/visitorPerson'
|
||||||
import VisitorPersonModal from './modules/VisitorPersonModal.vue'
|
import VisitorPersonModal from './modules/VisitorPersonModal.vue'
|
||||||
import { checkPermission } from '@/utils/permissions'
|
import { checkPermission } from '@/utils/permissions'
|
||||||
|
|
||||||
@ -76,6 +107,10 @@ export default {
|
|||||||
advanced: false,
|
advanced: false,
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParam: {},
|
queryParam: {},
|
||||||
|
rejectModalId: null,
|
||||||
|
rejectContent: null,
|
||||||
|
rejectModalVisible: false,
|
||||||
|
rejectConfirmLoading: false,
|
||||||
// 表头
|
// 表头
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
@ -98,7 +133,8 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '状态',
|
||||||
dataIndex: 'status'
|
dataIndex: 'status',
|
||||||
|
scopedSlots: {customRender: 'status'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '照片',
|
title: '照片',
|
||||||
@ -127,6 +163,59 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
verifySuccess(id){
|
||||||
|
console.log(id)
|
||||||
|
saveVisitorPerson({
|
||||||
|
id,
|
||||||
|
status: 1
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success('审核通过')
|
||||||
|
this.handleOk()
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.msg)
|
||||||
|
}
|
||||||
|
this.selectedRowKeys = []
|
||||||
|
})
|
||||||
|
},
|
||||||
|
verifyReject(id) {
|
||||||
|
this.rejectModalId = id
|
||||||
|
this.rejectModalVisible = true
|
||||||
|
},
|
||||||
|
rejectHandleOk() {
|
||||||
|
console.log('rejectHandleOk', this.rejectContent)
|
||||||
|
let id = this.rejectModalId
|
||||||
|
let cancelResaon = this.rejectContent
|
||||||
|
// 校验必填
|
||||||
|
if (!this.rejectContent) {
|
||||||
|
this.$message.error('驳回原因不能为空!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 设置确认加载状态
|
||||||
|
this.rejectConfirmLoading = true
|
||||||
|
// 调用接口
|
||||||
|
saveVisitorPerson({
|
||||||
|
id,
|
||||||
|
status: 2,
|
||||||
|
rejectContent:this.rejectContent,
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success('操作成功')
|
||||||
|
this.rejectHandleCancel()
|
||||||
|
this.handleOk()
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.msg)
|
||||||
|
}
|
||||||
|
this.selectedRowKeys = []
|
||||||
|
})
|
||||||
|
},
|
||||||
|
rejectHandleCancel() {
|
||||||
|
this.rejectModalId = null
|
||||||
|
this.rejectModalVisible = false
|
||||||
|
this.rejectConfirmLoading = false
|
||||||
|
this.rejectContent = null
|
||||||
|
},
|
||||||
|
|
||||||
onSelectChange(selectedRowKeys, selectedRows) {
|
onSelectChange(selectedRowKeys, selectedRows) {
|
||||||
this.selectedRowKeys = selectedRowKeys
|
this.selectedRowKeys = selectedRowKeys
|
||||||
this.selectedRows = selectedRows
|
this.selectedRows = selectedRows
|
||||||
|
Loading…
x
Reference in New Issue
Block a user