[新增功能](hyx_2024-11-15_temporary):

flowStep.vue
 - 临时访客详情页面
sendUtil.vue
 - 临时人员,车辆审核
hyx_2024-11-15_temporary
huangyuxuan 2024-11-22 17:39:28 +08:00
parent a89e3f9d71
commit bb1ead60a4
5 changed files with 372 additions and 19 deletions

View File

@ -40,28 +40,42 @@
<el-table-column prop="CORPINFO_NAME" label="企业名称"/> <el-table-column prop="CORPINFO_NAME" label="企业名称"/>
<el-table-column prop="DEPARTMENT_NAME" label="部门名称"/> <el-table-column prop="DEPARTMENT_NAME" label="部门名称"/>
<el-table-column prop="CAR_NO" label="车牌号"/> <el-table-column prop="CAR_NO" label="车牌号"/>
<el-table-column prop="CAR_PLANT_TYPE" label="车牌类型"/> <el-table-column label="车牌类型" align="center" width="120">
<el-table-column prop="CAR_TYPE" label="车辆类型"/> <template slot-scope="{row}">
{{ getCarPlantType(row.CAR_PLANT_TYPE) }}
</template>
</el-table-column>
<el-table-column label="车辆类型" align="center" width="120">
<template slot-scope="{row}">
{{ getCarType(row.CAR_TYPE) }}
</template>
</el-table-column>
<el-table-column prop="VISIT_START_TIME" label="访问起始时间"/> <el-table-column prop="VISIT_START_TIME" label="访问起始时间"/>
<el-table-column prop="VISIT_END_TIME" label="访问结束时间"/> <el-table-column prop="VISIT_END_TIME" label="访问结束时间"/>
<el-table-column prop="DOOR_NAME" label="访问口门名称"/> <el-table-column prop="DOOR_NAME" label="访问口门名称"/>
<!-- <el-table-column label="操作" align="left" width="110">--> <el-table-column label="操作" align="left" width="110">
<!-- <template slot-scope="{row}">--> <template slot-scope="{row}">
<!-- <el-button type="success" icon="el-icon-view" size="mini" @click="handleEdit(row)"></el-button>--> <el-button type="primary" icon="el-icon-view" size="mini" @click="getAuditInfo(row)"></el-button>
<!-- </template>--> <el-button v-if="showFirstButton(row.FIRST_AUDIT_USER_ID,row.AUDIT_TYPE)" type="success" icon="el-icon-view" size="mini" @click="approve(row)"></el-button>
<!-- </el-table-column>--> </template>
</el-table-column>
</el-table> </el-table>
<div class="page-btn-group"> <div class="page-btn-group">
<div/><div/>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div> </div>
<send-util ref="sendUtil" append-to-body @refresh="getList"/>
<flow-step ref="flowStep" append-to-body @refresh="getList"/>
</div> </div>
</template> </template>
<script> <script>
import Pagination from '@/components/Pagination' // el-pagination import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request' import { requestFN } from '@/utils/request'
import SendUtil from '../../person/components/sendUtil.vue'
import FlowStep from '../../person/components/flowStep.vue'
export default{ export default{
components: { Pagination }, components: { SendUtil, FlowStep, Pagination },
data() { data() {
return { return {
listQuery: { listQuery: {
@ -83,7 +97,8 @@ export default{
DEPARTMENT_NAME: '', DEPARTMENT_NAME: '',
VISIT_START_TIME: '', VISIT_START_TIME: '',
VISIT_END_TIME: '', VISIT_END_TIME: '',
DOOR_NAME: '' DOOR_NAME: '',
TEMPORARY_TYPE: '2'
} }
} }
}, },
@ -91,6 +106,34 @@ export default{
this.getList() this.getList()
}, },
methods: { methods: {
//
getCarPlantType(CAR_PLANT_TYPE) {
if (CAR_PLANT_TYPE === '0') {
return '白牌'
} else if (CAR_PLANT_TYPE === '1') {
return '蓝牌'
} else if (CAR_PLANT_TYPE === '2') {
return '黄牌'
} else if (CAR_PLANT_TYPE === '3') {
return '绿牌'
} else if (CAR_PLANT_TYPE === '4') {
return '黑牌'
}
},
getCarType(CAR_TYPE) {
if (CAR_TYPE === '0') {
return '货车'
} else if (CAR_TYPE === '1') {
return '轿车'
} else if (CAR_TYPE === '2') {
return '大巴客车'
}
},
//
showFirstButton(FIRST_AUDIT_USER_ID, AUDIT_TYPE) {
return FIRST_AUDIT_USER_ID === JSON.parse(sessionStorage.getItem('user')).USER_ID && AUDIT_TYPE === '1'
},
// //
getQuery() { getQuery() {
this.$refs.multipleTable.clearSelection() this.$refs.multipleTable.clearSelection()
@ -125,6 +168,12 @@ export default{
}).catch((e) => { }).catch((e) => {
this.listLoading = false this.listLoading = false
}) })
},
approve(row) {
this.$refs.sendUtil.init(row)
},
getAuditInfo(row) {
this.$refs.flowStep.init(row)
} }
} }

View File

@ -0,0 +1,106 @@
<template>
<el-dialog
v-if="visible"
:visible.sync="visible"
:v-loading="loading"
:before-close="handleClose"
:append-to-body="true"
:title="title"
width="60%">
<el-steps :space="200" :active="step" direction="vertical" finish-status="success">
<el-step v-for="item in list" :key="item.INDEX" :value="item.INDEX" :title="item.INDEX">
<template slot="description">
<el-card class="box-card" style="width: 900px;">
<div slot="header" class="clearfix">
<span>审批信息</span>
</div>
<div>
<el-row>
<el-col>
审批人{{ item.FIRST_AUDIT_USER_NAME }}
</el-col>
<el-col>
审批人公司{{ item.FIRST_AUDIT_COMPANY_NAME }}
</el-col>
<el-col>
审批人部门{{ item.FIRST_AUDIT_DEPARTMENT_NAME }}
</el-col>
<el-col>
审批状态{{ getAuditType(item.AUDIT_TYPE) }}
</el-col>
<el-col v-if="item.AUDIT_TYPE === '2'">
审批时间{{ item.FIRST_AUDIT_TIME }}
</el-col>
<el-col v-if="item.AUDIT_TYPE === '0'">
审批意见{{ item.REASON }}
</el-col>
</el-row>
</div>
</el-card>
</template>
</el-step>
</el-steps>
<div slot="footer" class="dialog-footer">
<el-button @click="closeWindow"> </el-button>
</div>
</el-dialog>
</template>
<script>
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import { requestFN } from '@/utils/request'
export default {
props: {
corpInfo: {
type: String,
default: ''
}
},
data() {
return {
visible: false,
loading: false,
list: [],
title: '审批详情',
form: {
TEMPORARY_ID: ''
},
step: 0
}
},
methods: {
init(e) {
this.form.TEMPORARY_ID = e.TEMPORARY_ID
this.getInfo()
},
getAuditType(AUDIT_TYPE) {
if (AUDIT_TYPE === '0') {
return '不通过'
} else if (AUDIT_TYPE === '1') {
return '审核中'
} else if (AUDIT_TYPE === '2') {
return '通过'
}
},
getInfo() {
requestFN(
'/temporary/access/getAuditInfo', this.form
).then((data) => {
this.list = data.auditIndo
this.visible = true
this.loading = false
}).catch((e) => {
console.log(e)
})
},
handleClose() {
this.visible = false
this.$emit('refresh', '')
},
closeWindow() {
this.handleClose()
}
}
}
</script>

View File

@ -43,23 +43,36 @@
<el-table-column prop="VISIT_START_TIME" label="访问起始时间"/> <el-table-column prop="VISIT_START_TIME" label="访问起始时间"/>
<el-table-column prop="VISIT_END_TIME" label="访问结束时间"/> <el-table-column prop="VISIT_END_TIME" label="访问结束时间"/>
<el-table-column prop="DOOR_NAME" label="访问口门名称"/> <el-table-column prop="DOOR_NAME" label="访问口门名称"/>
<!-- <el-table-column label="操作" align="left" width="110">--> <el-table-column label="审核状态" align="center" width="120">
<!-- <template slot-scope="{row}">--> <template slot-scope="{row}">
<!-- <el-button type="success" icon="el-icon-view" size="mini" @click="handleEdit(row)"></el-button>--> {{ getType(row.AUDIT_TYPE) }}
<!-- </template>--> </template>
<!-- </el-table-column>--> </el-table-column>
<el-table-column label="操作" align="left" width="110">
<template slot-scope="{row}">
<el-button type="primary" icon="el-icon-view" size="mini" @click="getAuditInfo(row)"></el-button>
<el-button v-if="showFirstButton(row.FIRST_AUDIT_USER_ID,row.AUDIT_TYPE)" type="success" icon="el-icon-view" size="mini" @click="approve(row)"></el-button>
</template>
</el-table-column>
</el-table> </el-table>
<div class="page-btn-group"> <div class="page-btn-group">
<div/><div/>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div> </div>
<send-util ref="sendUtil" append-to-body @refresh="getList"/>
<flow-step ref="flowStep" append-to-body @refresh="getList"/>
</div> </div>
</template> </template>
<script> <script>
import Pagination from '@/components/Pagination' // el-pagination import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request' import { requestFN } from '@/utils/request'
import SendUtil from '../components/sendUtil.vue'
import FlowStep from '../components/flowStep.vue'
import waves from '@/directive/waves' // waves directive
export default{ export default{
components: { Pagination }, components: { SendUtil, FlowStep, Pagination },
directives: { waves },
data() { data() {
return { return {
listQuery: { listQuery: {
@ -81,14 +94,36 @@ export default{
DEPARTMENT_NAME: '', DEPARTMENT_NAME: '',
VISIT_START_TIME: '', VISIT_START_TIME: '',
VISIT_END_TIME: '', VISIT_END_TIME: '',
DOOR_NAME: '' DOOR_NAME: '',
} TEMPORARY_TYPE: '1'
},
TEMPORARY_ID: ''
} }
}, },
created() { created() {
this.getList() this.getList()
}, },
methods: { methods: {
getRowKey(row) {
return row.TEMPORARY_ID
},
//
getType(AUDIT_TYPE) {
if (AUDIT_TYPE === '0') {
return '不通过'
} else if (AUDIT_TYPE === '1') {
return '审核中'
} else if (AUDIT_TYPE === '2') {
return '通过'
}
},
//
showFirstButton(FIRST_AUDIT_USER_ID, AUDIT_TYPE) {
return FIRST_AUDIT_USER_ID === JSON.parse(sessionStorage.getItem('user')).USER_ID && AUDIT_TYPE === '1'
},
// showSecondButton(SECOND_AUDIT_USER_ID, AUDIT_TYPE) {
// return SECOND_AUDIT_USER_ID === JSON.parse(sessionStorage.getItem('user')).USER_ID && AUDIT_TYPE === 2
// },
// //
getQuery() { getQuery() {
this.$refs.multipleTable.clearSelection() this.$refs.multipleTable.clearSelection()
@ -123,6 +158,12 @@ export default{
}).catch((e) => { }).catch((e) => {
this.listLoading = false this.listLoading = false
}) })
},
approve(row) {
this.$refs.sendUtil.init(row)
},
getAuditInfo(row) {
this.$refs.flowStep.init(row)
} }
} }

View File

@ -0,0 +1,152 @@
<template>
<div>
<el-dialog
v-loading="loading"
:visible.sync="visible"
:append-to-body="appendToBody"
:before-close="beforeClose"
title="审批"
width="1200px"
destroy-on-close>
<el-form ref="form" :model="form" :rules="rules" label-width="200px" label-position="right" type="flex">
<el-row :gutter="12">
<el-col :span="12">
<el-form-item prop="STATUS" label="是否通过: ">
<el-select v-model="form.STATUS" filterable style="width: 300px" placeholder="请选择" @change="clearInfo">
<el-option label="是" value="1"/>
<el-option label="否" value="0"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col v-if="form.STATUS === '0'" :span="24">
<el-form-item v-if="form.STATUS === '0'" prop="OPINION" label="打回原因:">
<el-input v-model="form.OPINION" :rows="2" type="textarea" placeholder="填写审批意见"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="handleClose"> </el-button>
<el-button type="primary" @click="sendMessage"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import vueQr from 'vue-qr'
import Treeselect from '@riophae/vue-treeselect'
import uploadFile from '../../../util/uploadFile/index.vue'
import { requestFN } from '@/utils/request'
export default {
components: { uploadFile, Treeselect, vueQr },
props: {
appendToBody: {
type: Boolean,
default: false
}
},
data() {
return {
visible: false,
loading: false,
form: {
STATUS: null,
APPOINT_CORP_ID: '',
APPOINT_CORP_NAME: '',
APPOINT_DEPARTMENT_ID: null,
APPOINT_DEPARTMENT_NAME: '',
APPOINT_USER_ID: null,
APPOINT_USER_NAME: '',
OPINION: '',
APPOINT_ANNEX: [],
user: '',
tm: new Date().getTime(),
list: [],
isShow: true,
info: {},
BACK_NAME: '',
BACK_STEP: ''
},
rules: {
STATUS: [
{ required: true, message: '请选择是否通过', trigger: 'change' }
],
OPINION: [
{ required: true, message: '请填写打回原因', trigger: 'change' }
]
},
heirloom: {},
normalizer(node) {
return {
id: node.id,
label: node.name,
children: node.nodes
}
},
departmentTree: [],
peopleList: [],
corpFlag: false,
menu: {
department: '',
user: '',
uploadFile: '',
limitFlag: ''
},
step: 0,
list: [],
ACCESS_AUDIT_ID: ''
}
},
methods: {
async init(e) {
this.loading = true
this.visible = true
this.ACCESS_AUDIT_ID = e.ACCESS_AUDIT_ID
console.log(this.ACCESS_AUDIT_ID)
console.log(e.ACCESS_AUDIT_ID)
this.loading = false
},
handleClose() {
this.form = {
STATUS: '',
APPOINT_DEPARTMENT_ID: null,
APPOINT_DEPARTMENT_NAME: '',
APPOINT_USER_ID: '',
APPOINT_USER_NAME: '',
OPINION: '',
user: '',
list: [],
tm: new Date().getTime()
}
this.visible = false
},
goDetail() {
this.$parent.activeName = 'List'
},
sendMessage() {
requestFN(
'/temporary/access/audit',
{
FIRST_AUDIT_USER_ID: JSON.parse(sessionStorage.getItem('user')).USER_ID,
STATUS: this.form.STATUS,
ACCESS_AUDIT_ID: this.ACCESS_AUDIT_ID,
REASON: this.form.OPINION
}
).then((data) => {
this.visible = false
this.$emit('refresh', '')
}).catch((e) => {
this.loading = false
})
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -1,12 +1,17 @@
<template> <template>
<component :is="activeName" /> <div>
<List v-show="activeName==='List'" ref="list" />
<SendUtil v-if="activeName==='SendUtil'" />
</div>
</template> </template>
<script> <script>
import List from './components/list' import List from './components/list'
import SendUtil from './components/sendUtil.vue'
export default { export default {
components: { components: {
List: List List: List,
SendUtil: SendUtil
}, },
data() { data() {
return { return {