nxdt-web/src/views/pro/supervisor/exit/index.vue

526 lines
17 KiB
Vue
Raw Normal View History

2025-05-27 13:23:56 +08:00
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
<el-form-item label="监理人员" prop="consName">
<el-input
v-model="queryParams.consName"
placeholder="请输入监理人员姓名"
v-no-whitespace
maxlength="20"
show-word-limit
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="审批状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择审批状态" clearable>
<el-option v-for="dict in statusDict" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item> -->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" v-hasPermi="['system:addPersonnel:query']">
批量审核
</el-button>
</el-col>
</el-row>
<el-table :data="supervisorList">
<el-table-column
label="序号"
type="index"
width="55"
align="center"
:index="indexContinuous(queryParams.pageNum, queryParams.pageSize)"
border
/>
<el-table-column label="姓名" align="center" prop="name" />
<el-table-column label="岗位" align="center" prop="postName" />
<el-table-column label="体检文件" width="100" align="center">
<template slot-scope="scope">
<el-button size="mini" @click="handleShow(scope.row, 1)">查看</el-button>
</template>
</el-table-column>
<el-table-column label="保险文件" width="100" align="center">
<template slot-scope="scope">
<el-button size="mini" @click="handleShow(scope.row, 2)">查看</el-button>
</template>
</el-table-column>
<el-table-column label="其他文件" width="100" align="center">
<template slot-scope="scope">
<el-button size="mini" @click="handleShow(scope.row, 4)">查看</el-button>
</template>
</el-table-column>
<el-table-column label="性别" align="center" prop="sex" />
<el-table-column label="年龄" align="center" prop="age" />
<el-table-column label="联系方式" width="120" align="center">
<template slot-scope="scope">
<!-- 检查是否存在身份证号 -->
<span v-if="scope.row.phone">{{ hideSensitiveInfo(scope.row.phone) }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="人脸照片" align="center" prop="faceUrl">
<template slot-scope="scope">
<el-popover placement="right" title="" trigger="hover">
<img
:src="`${scope.row.faceUrl ? lookFaceFile + scope.row.faceUrl : ''}`"
:min-width="300"
:height="300"
alt="照片"
/>
<img
slot="reference"
:src="`${scope.row.faceUrl ? lookFaceFile + scope.row.faceUrl : ''}`"
style="max-height: 50px; max-width: 50px"
:alt="`${scope.row.faceUrl ? lookFaceFile + scope.row.faceUrl : ''}`"
/>
</el-popover>
</template>
</el-table-column>
<el-table-column label="审核状态" align="center">
<template slot-scope="scope">
<el-tag size="mini" v-if="scope.row.outStatus == 0" type="primary">待提交</el-tag>
<el-tag size="mini" v-if="scope.row.outStatus == 1" type="warning">待审核</el-tag>
<el-tag size="mini" v-if="scope.row.outStatus == 2" type="warning">审核中</el-tag>
<el-tag size="mini" v-if="scope.row.outStatus == 3" type="success">通过</el-tag>
<el-tag size="mini" v-if="scope.row.outStatus == 4" type="danger">驳回</el-tag>
<el-tag size="mini" v-if="scope.row.outStatus == 5" type="warning">撤回</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="onHandleAuditing(scope.row)"
2025-05-30 13:18:20 +08:00
v-hasPermi="['out:audit:supervisor:person']"
v-if="scope.row.outStatus == 1 || scope.row.outStatus == 2"
>
审核
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<bns-person-approval-tabs
:items="personQueryParams"
v-on:pass="approval"
v-on:turnDown="turnDown"
v-on:finalInstance="finalInstance"
/>
<el-dialog title="文件查看" :visible.sync="document" width="80%" top="5vh" append-to-body>
<div style="width: 100%; height: 720px">
<bns-file-list-tabs :items="fileList" />
</div>
</el-dialog>
<el-dialog title="文件查看" :visible.sync="documentPreview" width="80%" top="5vh" append-to-body>
<div style="width: 100%; height: 720px">
<bns-kkFile-preview :items="kkFilePreview"></bns-kkFile-preview>
</div>
</el-dialog>
<!-- 批量审核弹框 -->
<el-dialog title="批量审核" :visible.sync="batchAuditing" width="40%" append-to-body>
<el-form :model="batchAuditingForm" ref="batchAuditingRef" size="small" label-width="auto">
<el-form-item label="审核结果" prop="name">
<el-radio v-model="batchAuditingForm.isResult" :label="1">通过</el-radio>
<el-radio v-model="batchAuditingForm.isResult" :label="2">驳回</el-radio>
</el-form-item>
<el-form-item label="审核意见" prop="name">
<el-input
type="textarea"
maxlength="100"
show-word-limit
placeholder="请输入审核意见"
:autosize="{ minRows: 2, maxRows: 4 }"
v-model="batchAuditingForm.isOpinion"
></el-input>
</el-form-item>
</el-form>
2025-05-27 13:23:56 +08:00
<el-row style="text-align: right">
<el-button size="mini" @click="onCancelBatchAuditing">取消</el-button>
<el-button size="mini" type="primary" @click="onSubmitBatchAuditing">确定</el-button>
</el-row>
</el-dialog>
</div>
</template>
2025-05-27 13:23:56 +08:00
<script>
import { hideSensitiveInfo, indexContinuous, lookFaceFile } from '@/utils/bonus'
import bnsConsPersonDetailsTabs from '@/components/pro-tabs/bns-cons-person-details-tabs.vue'
import bnsGenerateWorkCardTabs from '@/components/pro-tabs/bns-generate-work-card-tabs.vue'
import {
getProOptions,
getConsOptions,
getSubOptions,
getList,
batchAuditingApi,
} from '@/api/pro/subManagement/approval/personApproval'
import { submitApprovalNewApi } from '@/api/pro/supervisor-person-manage'
import BnsPersonApprovalTabs from '@/components/pro-tabs/bns-person-approval-tabs.vue'
import { dictTableOption, selectFile } from '@/api/tool/select'
import { encryptCBC } from '@/utils/aescbc'
import bnsFileListTabs from '@/components/pro-tabs/bns-file-list-tabs.vue'
import bnsKkFilePreview from '@/components/pro-tabs/bns-kkFile-preview.vue'
2025-05-27 13:23:56 +08:00
export default {
components: {
bnsKkFilePreview,
bnsFileListTabs,
BnsPersonApprovalTabs,
bnsConsPersonDetailsTabs,
bnsGenerateWorkCardTabs,
},
2025-05-27 13:23:56 +08:00
data() {
return {
personQueryParams: {
pageNum: 1,
pageSize: 10,
name: undefined,
status: '1',
proName: undefined,
consName: undefined,
},
queryParams: {
pageNum: 1,
pageSize: 10,
type: '出场',
proId: this.$store.state.user.thisIds.proId,
supUuid: this.$store.state.user.thisIds.supUuid,
// contUuid: this.$store.state.user.thisIds.contUuid,
// subUuid: this.$store.state.user.thisIds.subUuid,
userType: '',
// consName: undefined,
status: 1,
},
personList: [],
supervisorList: [],
proOptions: [], //工程下拉选项
consOptions: [], //承包商下拉选项
//审核类型下拉选
statusDict: [],
personTotal: 0,
loading: true,
constructionPersonnelOpen: false,
document: false,
documentPreview: false,
fileList: [],
kkFilePreview: {
filePreviewUrl: '',
fileName: '',
showDownloadButton: false,
},
auditStatusDict: {
1: '待审批',
2: '审批中',
3: '已通过',
4: '已驳回',
5: '已撤销',
},
lookFaceFile: '',
// 批量审核选择的数据源
selectList: [],
batchAuditing: false,
batchAuditingForm: {
isResult: 1, // 审核结果
isOpinion: '', // 审核意见
},
}
},
created() {
this.lookFaceFile = lookFaceFile()
this.getProOption()
this.getConsOption()
this.getStatus()
this.getList()
},
methods: {
indexContinuous,
updateStatus(status) {
return this.auditStatusDict[status]
},
hideSensitiveInfo,
/** 文件查看按钮操作 */
handleShow(row, informationType) {
this.loading = true
const arr = {
1: '体检文件',
2: '保险文件',
3: '特殊工种文件',
4: '其他文件',
}
selectFile({
classification: 9,
uuid: row.uuid,
informationType: informationType,
2025-06-18 16:30:21 +08:00
fromType: 3,
}).then(response => {
console.log(response)
if (response.data.length === 0) {
this.fileList = []
this.$message.warning(arr[informationType] + '暂无')
} else if (response.data.length === 1) {
this.kkFilePreview = {
filePreviewUrl: response.data[0].filePath,
fileName: response.data[0].fileName,
showDownloadButton: false,
}
this.documentPreview = true
} else {
this.fileList = response.data
this.document = true
}
this.loading = false
})
},
finalInstance(e) {},
turnDown(e) {},
approval(e) {
console.log('============================')
// console.log("tongg")
// console.log(JSON.stringify(e))
// console.log(JSON.stringify(this.paramsData))
// const param = {
// reason:e,
// ...this.paramsData
// }
// submitPersonApproval(param).then(response => {
// if (response.code === 200) {
// this.$message({
// message: '新建成功',
// type: 'success'
// })
// } else {
// this.$message({
// message: response.msg,
// type: 'error'
// })
// }
// })
},
//获取工程下拉选项
getProOption() {
const params = {
id: '',
}
getProOptions(params).then(res => {
this.proOptions = res.data
})
},
//获取承包商下拉选项
getConsOption() {
const params = {
id: '',
}
getConsOptions(params).then(res => {
this.consOptions = res.data
})
},
//获取审核类型下拉选
getStatus() {
const params = {
dictType: 'sys_approval_state',
dictValue: '',
}
dictTableOption(params).then(response => {
this.statusDict = response.data
})
},
/** 人员入场查询 */
getList() {
// const proId = this.$store.state.user.thisIds.proId
// const consUuid = this.$store.state.user.thisIds.consUuid
// const supUuid = this.$store.state.user.thisIds.supUuid
// let userType = this.$store.state.user.userType
// if (userType === '' || userType === 'null' || userType === undefined) {
// userType = '00'
// }
// const params = {
// proId: proId,
// consUuid: consUuid,
// supUuid: supUuid,
// userType: userType,
// type: '入场',
// ...this.personQueryParams,
// }
// console.log('人员入场查询==' + JSON.stringify(params))
// getList(params).then(res => {
// console.log('人员入场查询==' + res)
// this.personList = res.rows
// this.personTotal = res.total
// this.loading = false
// })
this.queryParams.userType = this.$store.state.user.userType
submitApprovalNewApi(this.queryParams).then(response => {
console.log(response, 'response')
this.supervisorList = response.rows
this.total = response.total
this.loading = false
})
},
handleQueryPerson() {
this.loading = true
// this.personQueryParams.pageNum = 1
this.queryParams.pageNum = 1
this.getList()
},
handleQuery() {
this.loading = true
// this.personQueryParams.pageNum = 1
this.queryParams.pageNum = 1
this.getList()
},
//重置按钮
resetQueryPerson() {
this.loading = true
this.resetForm('personQueryForm')
this.handleQueryPerson()
},
//重置按钮
resetQuery() {
this.loading = true
2025-06-19 15:13:49 +08:00
this.resetForm('queryForm')
this.handleQuery()
},
//审核
handleApprove(row) {
console.log('审核++' + JSON.stringify(row))
this.$router.push(
'/system/subManagement-personApproval-auth/personApproval/' +
encryptCBC(
JSON.stringify({
uuid: row.uuid,
taskId: row.taskId,
procInstId: row.procInsId,
contUuid: row.contUuid,
showType: 2,
isExamine: true,
btnShow: true,
finalCheck: row.finalCheck,
})
)
)
},
onHandleAuditing(row) {
console.log('审核--')
this.$router.push(
'/project/supervisorPersonManage/personApproval/' +
encryptCBC(
JSON.stringify({
uuid: row.uuid,
taskId: row.taskId,
procInstId: row.procInsId,
// contUuid: row.contUuid,
id: row.id,
proId: row.proId,
uuid: row.uuid,
supUuid: row.supUuid,
showType: 2,
isExamine: true,
btnShow: true,
// finalCheck: row.finalCheck,
})
)
)
},
//查看
handleView(row) {
this.$router.push(
'/system/subManagement-personApproval-auth/personApproval/' +
encryptCBC(
JSON.stringify({
uuid: row.uuid,
taskId: row.taskId,
procInstId: row.procInsId,
contUuid: row.contUuid,
showType: 1,
isExamine: false,
btnShow: false,
finalCheck: row.finalCheck,
})
)
)
},
//审核记录
handleAuditRecord(row) {
this.$router.push(
'/flow/auditRecord/' +
encryptCBC(
JSON.stringify({
taskId: row.taskId,
checkType: '2',
})
)
)
},
// 列表复选框选择事件
handleSelectionChange(list) {
this.selectList = list
},
// 批量审核按钮
async onHandleBatchAuditing() {
if (this.selectList.length < 1) {
this.$modal.msgError('请勾选需要审核的数据!')
return
}
this.batchAuditing = true
console.log(this.selectList, 'this.selectList')
// const res = batchAuditingApi()
},
// 批量审核弹框取消按钮
async onCancelBatchAuditing() {
this.batchAuditingForm.isResult = 1
this.batchAuditingForm.isOpinion = ''
},
// 批量审核弹框确定按钮
async onSubmitBatchAuditing() {
const batchAuditingParams = this.selectList.map(e => {
return {
reason: this.batchAuditingForm.isOpinion,
agree: this.batchAuditingForm.isResult + '',
uuid: e.uuid,
taskId: e.taskId,
procInstId: e.procInsId,
contUuid: e.contUuid,
showType: 2,
isExamine: true,
btnShow: true,
finalCheck: e.finalCheck,
}
})
const res = await batchAuditingApi(batchAuditingParams)
if (res.code === 200) {
this.$modal.msgSuccess('审核成功!')
this.getList()
this.batchAuditingForm.isOpinion = ''
this.batchAuditingForm.isResult = 1
}
},
2025-05-27 13:23:56 +08:00
},
}
</script>