[新增功能](hyx_2024-9-29_tongbu)

人员信息同步
证件信息管理列表
人员证件信息列表
hyx_2024-9-29_tongbu
huangyuxuan 2024-10-12 09:12:54 +08:00
parent 5c7df2fe8d
commit fa07a7fb58
5 changed files with 754 additions and 2 deletions

View File

@ -0,0 +1,168 @@
<template>
<div class="app-container">
<div class="filter-container">
<el-form ref="form" v-model="form">
<el-row>
<el-col :span="5">
<el-form-item label="相关方单位名称:">
<el-input v-model="form.RELEVANT_UNIT_NAME" placeholder="搜索" class="filter-item" style="width: 200px;"/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery"></el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="reset"></el-button>
</el-col>
</el-row>
</el-form>
</div>
<div class="app-statistical">
<span>
培训合格总人数<i>{{ personCount }}</i>
</span>
<span>
培训合格人员证件即将过期人数<i>{{ expireSoonPersonCount }}</i>
</span>
<span>
培训合格人员证件已经过期人数<i>{{ expiredPersonCount }}</i>
</span>
</div>
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="varList"
:row-key="getRowKey"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
tooltip-effect="dark"
border
fit
highlight-current-row
>
<el-table-column
:reserve-selection="true"
type="selection"
width="55"
align="center"/>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="corpTypeName" label="集团单位" />
<el-table-column prop="RELEVANT_UNIT_NAME" label="相关方单位名称" />
<el-table-column label="属地">
<template slot-scope="{row}">
<span v-if="row.COMPANY_AREA">
{{ row.COMPANY_AREA.replaceAll(',',' ') }}
</span>
</template>
</el-table-column>
<el-table-column prop="MAIN_DEPARTMENT_NAME" label="股份主管部门" width="200" />
<el-table-column prop="SUPERVISE_CORPINFO_NAME" label="基层单位主管公司" width="200" />
<el-table-column prop="SUPERVISE_DEPARTMENT_NAME" label="基层单位主管部门" width="200" />
<el-table-column prop="userCount" label="人员数"/>
<el-table-column prop="trainingQualifiedCount" label="参与培训合格人员数"/>
<el-table-column prop="expireSoonCount" label="证件即将过期人员数"/>
<el-table-column prop="expiredCount" label="证件已过期人员数"/>
<el-table-column label="操作" align="left" width="110">
<template slot-scope="{row}">
<el-button type="success" icon="el-icon-view" size="mini" @click="handleEdit(row)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div>
</div>
</template>
<script>
import { requestFN } from '@/utils/request'
import Pagination from '@/components/Pagination' // el-pagination
export default{
components: {Pagination},
data() {
return{
listQuery: {
page: 1,
limit: 10
},
areaList: [], //
placeList: [],
listLoading: true,
varList: [],
total: 0,
title: '',
isShow: false,
form: {
RELEVANT_UNIT_NAME: '',
CREATE_TIME: '', //
CREATOR: '', //
OPERAT_TIME: '', //
OPERATOR: '', //
ISDELETE: '', //
CORPINFO_ID: '', // id
CLASS_NAME: '', //
OPENING_TIME: '', //
PLACE: '', //
TRAINING_TYPE: '', //
CLASS_SIZE: '', //
TRAINEES_NUM: '', //
CLASS_STATUS: ''// 0-1-2-
},
personCount: '',
expireSoonPersonCount: '',
expiredPersonCount: ''
}
},
created() {
this.getList()
},
methods: {
//
getQuery() {
this.$refs.multipleTable.clearSelection()
this.getList()
},
//
reset() {
this.form = {
CLASS_NAME: '', //
OPENING_TIME: '', //
PLACE: '', //
TRAINING_TYPE: '', //
CLASS_SIZE: '', //
TRAINEES_NUM: '', //
CLASS_STATUS: ''// 0-1-2-
}
this.getList()
},
//
handleEdit(row) {
this.$parent.activeName = 'corpUserList'
this.$parent.CORPINFO_ID = row.CORPINFO_ID
},
//
getList() {
this.listLoading = true
requestFN(
'/classMessage/cardOverdueList?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page, this.form
).then((data) => {
console.log(data)
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
this.personCount = data.personCount
this.expireSoonPersonCount = data.expireSoonPersonCount
this.expiredPersonCount = data.expiredPersonCount
this.hasButton()
this.pd = data.pd
}).catch((e) => {
this.listLoading = false
})
}
}
}
</script>

View File

@ -0,0 +1,542 @@
<template>
<div class="icons-container">
<el-container>
<el-main>
<el-form label-width="180px">
<el-row>
<el-col :span="8">
<el-form-item label="用户名" prop="USERNAME">
<el-input v-model="searchForm.USERNAME" placeholder="用户名称"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="姓名" prop="NAME">
<el-input v-model="searchForm.NAME" placeholder="姓名"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="证件状态" prop="CARD_STATUS">
<el-select v-model="searchForm.CARD_STATUS" placeholder="请选择" style="width: 100%">
<el-option label="未过期" value="0" />
<el-option label="即将过期" value="2" />
<el-option label="已过期" value="1" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
搜索
</el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="varList"
:row-key="getRowKey"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
tooltip-effect="dark"
border
fit
highlight-current-row
>
<el-table-column
:reserve-selection="true"
type="selection"
width="55"
align="center"/>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="USERNAME" label="用户名" />
<el-table-column prop="NAME" label="姓名" />
<el-table-column prop="BELONG_TO_CORP_NAME" label="相关方名称" />
<el-table-column prop="DEPARTMENT_NAME" label="部门"/>
<el-table-column prop="CLASS_NO" label="人员编号"/>
<el-table-column prop="VALIDITY_PERIOD_END" label="证件到期日"/>
<el-table-column prop="VALIDITY_PERIOD_END" label="证件状态">
<template v-slot="{row}">
<span v-if="getCardStatus(row.VALIDITY_PERIOD_END) == 0" :style="{color: 'green'}"></span>
<span v-if="getCardStatus(row.VALIDITY_PERIOD_END) == 2" :style="{color: 'orange'}"></span>
<span v-if="getCardStatus(row.VALIDITY_PERIOD_END) == 1" :style="{color: 'red'}"></span>
</template>
</el-table-column>
<el-table-column label="操作" align="left" width="150">
<template slot-scope="{row}">
<el-button v-if="row.ACCOUNT_TYPE != 0" type="success" icon="el-icon-view" size="mini" @click="toUserDetail(row)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div>
</el-main>
</el-container>
<div class="heightt"/>
<div class="subdy-foot">
<el-row style="text-align: center">
<el-button @click="goBack"></el-button>
</el-row>
</div>
<UserBaseInfoView ref="userbaseinfoview" :base_info_url="baseInfourl"/>
</div>
</template>
<script>
import SelectTree from '@/components/SelectTree'
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves' // waves directive
import UserBaseInfoView from '@/components/UserBaseInfo/UserBaseInfoView'
export default {
components: { Pagination, SelectTree, UserBaseInfoView },
directives: { waves },
data() {
return {
userId: this.$parent.USER_ID_T,
baseInfourl: '/unitPersonManagement/getCorpUserDetail',
treeLoading: false,
listLoading: false,
add: true,
del: true,
edit: true,
readonly: true,
listQuery: {
page: 1,
limit: 20
},
searchForm: {
CARD_STATUS:'',
DEPARTMENT_ID: '',
USERNAME: '',
NAME: '',
DEPTNAME: '',
AUDIT_STATE: '',
ISFLOW: '',
DEPART_STATE: '',
AGE: '',
IS_SIGN_LABOR: '',
IS_INJURIES_PAY: '',
ISPAY: '',
IS_LEVEL_THREE: '',
IS_SAFETY_TELL: '',
IS_SPECIAL_JOB: ''
},
userForm: {
PARENT_ID: '',
USER_ID: '',
DEPARTMENT_ID: '',
DEPTNAME: '',
USERNAME: '',
NAME: ''
},
DEPARTMENT_ID: '',
total: 0,
PARENT_ID: '0', // ID
varList: [],
qyztList: [],
options: [{
value: '0',
label: '启用'
}, {
value: '1',
label: '禁用'
}],
STATE: [],
industryList: [],
countryList: [],
villageList: [],
treeData: [],
CITY_CODE: '',
COUNTRY: '',
VILLAGE: '',
config: config,
dialogFormEdit: false,
rules: {
DEPTNAME: [{ required: true, message: '分公司名称不能为空', trigger: 'blur' }],
USERNAME: [{ required: true, message: '用户名不能为空', trigger: 'blur' }],
NAME: [{ required: true, message: '姓名不能为空', trigger: 'blur' }]
},
defaultProps: {
value: 'id',
children: 'nodes',
label: 'name'
},
workTypeList: [] //
}
},
created() {
this.getDict()
this.getList()
this.getTreeList()
},
methods: {
getCardStatus(VALIDITY_PERIOD_END){
const nowDate = new Date()
const nextDate = new Date((new Date).getFullYear() + '-' + ((new Date).getMonth() + 3) + '-' + (new Date).getDate())
console.log('当前时间 ==>'+nowDate)
console.log('两个月后的时间 ==>'+nextDate)
console.log('证件到期日 ==>'+new Date(VALIDITY_PERIOD_END))
if (nowDate > new Date(VALIDITY_PERIOD_END)){
return 1
}else if (new Date(VALIDITY_PERIOD_END) > nowDate && new Date(VALIDITY_PERIOD_END) < nextDate){
return 2
}else {
return 0
}
},
filterNode(value, data) {
if (!value) return true
return data.name.indexOf(value) !== -1
},
handleNodeClick(node, data, value) {
this.searchForm.DEPARTMENT_ID = node.id
this.getList(node.id)
},
//
getDict() {
requestFN(
'dictionaries/getLevels',
{ DICTIONARIES_ID: '55484e491a5e442d839c4595380713ec' }
).then((data) => {
this.workTypeList = data.list
}).catch((e) => {
this.listLoading = false
})
},
//
getList() {
this.listLoading = true
requestFN(
'/classMessage/personList?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
CORPINFO_ID: this.$parent.CORPINFO_ID,
NAME: this.searchForm.NAME,
USERNAME: this.searchForm.USERNAME,
CARD_STATUS: this.searchForm.CARD_STATUS
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.page.totalResult
}).catch((e) => {
this.listLoading = false
})
},
getDeptList(DEPARTMENT_ID) {
this.listLoading = true
this.varList = []
this.DEPARTMENT_ID = DEPARTMENT_ID
requestFN(
'/department/findByDeptId?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
DEPARTMENT_ID: this.searchForm.DEPARTMENT_ID,
KEYWORDS: this.searchForm.KEYWORDS
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.form.PARENT_ID = data.PARENT_ID
this.total = data.page.totalResult
this.hasButton()
}).catch((e) => {
this.listLoading = false
})
},
getRowKey(row) {
return row.USER_ID
},
goReturn() {
this.$parent.activeName = 'CorpInfoList'
},
//
getQuery() {
this.getList()
},
getTreeList() {
this.treeLoading = true
requestFN(
'/xgf/department/listzTree',
{
CORPINFO_ID: this.$parent.CORPINFO_ID
}
).then((data) => {
this.treeLoading = false
this.treeData = JSON.parse(data.zTreeNodes)
}).catch((e) => {
this.treeLoading = false
})
},
getCountryList() {
requestFN(
'/dictionaries/getLevels',
{
DICTIONARIES_ID: this.CITY_CODE
}
).then((data) => {
this.countryList = data.list
}).catch((e) => {
})
},
getVillageList(value, id) {
this.COUNTRY = value
requestFN(
'/dictionaries/getLevels',
{
DICTIONARIES_ID: id
}
).then((data) => {
this.villageList = data.list
}).catch((e) => {
})
},
changeVillage(village) {
this.VILLAGE = village
},
//
toUserDetail(ROW) {
this.$refs.userbaseinfoview.openWindow(ROW.USER_ID, ROW.CORPINFO_ID)
},
userEdit() {
this.$refs.form.validate(valid => {
if (valid) {
this.listLoading = true
requestFN(
'/user/editCorpUser',
{
...this.userForm
}
).then((data) => {
this.$message.success('修改成功')
this.dialogFormEdit = false
this.getList()
}).catch((e) => { this.listLoading = false })
} else {
return false
}
})
},
handleDelete(id, name) {
this.$confirm('确定要删除[' + name + ']吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/user/deleteCorpUser',
{
USER_ID: id
}
).then((data) => {
if (data.result == 'success') {
this.listLoading = false
this.getList()
}
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
goBack() {
this.$parent.activeName = 'CardOverdueList'
},
enableORDisable(ISUSE, CORPINFO_ID) {
this.$confirm(ISUSE === '0' ? '确定要启用该账户吗?' : '确定要禁用该账户吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/corpinfo/editisuse',
{
CORPINFO_ID,
ISUSE
}
).then(() => {
this.$message({
message: ISUSE === '0' ? '启用成功' : '禁用成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {})
},
//
hasButton: function() {
var keys = 'corpinfo:add,corpinfo:del,corpinfo:edit,toExcel'
requestFN(
'/head/hasButton',
{
keys: keys
}
).then((data) => {
this.add = data.corpinfofhadminadd //
this.del = data.corpinfofhadmindel //
this.edit = data.corpinfofhadminedit //
}).catch((e) => {
this.listLoading = false
})
},
goKeyReset() {
this.searchForm = {
DEPARTMENT_ID: '',
USERNAME: '',
NAME: '',
DEPTNAME: '',
AUDIT_STATE: '',
ISFLOW: '',
DEPART_STATE: '',
AGE: '',
IS_SIGN_LABOR: '',
IS_INJURIES_PAY: '',
ISPAY: '',
IS_LEVEL_THREE: '',
IS_SAFETY_TELL: '',
IS_SPECIAL_JOB: ''
}
this.getList()
},
resetPwd(id) {
this.$confirm('确定要重置选中的密码吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/corpinfo/resetPwd',
{
CORPINFO_ID: id
}
).then(() => {
this.$message({
message: '重置成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
//
getDicList(list, DICTIONARIES_ID) {
requestFN(
'/dictionaries/getLevels',
{
DICTIONARIES_ID
}
).then((data) => {
this[list] = data.list
}).catch((e) => {
})
},
translate(list, id) {
for (let i = 0; i < list.length; i++) {
if (list[i].BIANMA === id || list[i].DICTIONARIES_ID === id) {
return list[i].NAME
}
}
},
showBranchName(CORPINFO_ID, CORP_NAME) {
this.$refs.form && this.$refs.form.resetFields()
this.dialogFormEdit = true
this.updateBranchNameForm.CORPINFO_ID = CORPINFO_ID
this.updateBranchNameForm.CORP_NAME = CORP_NAME
},
updateBranchName(ID) {
requestFN(
'/department/listTreeCorpInfo',
{
CORPINFO_ID: ID
}
).then((data) => {
this.treeData = JSON.parse(data.zTreeNodes)
}).catch((e) => {
})
},
//
formatLabel(row, type) {
if (type === '0') {
const special = row.IS_SPECIAL_JOB
if (special === '1') {
return '特殊工种'
} else if (special === '0') {
return '非特殊工种'
} else {
return special
}
} else if (type === '1') {
const flow = row.ISFLOW
if (flow === '1') {
return '流动人员'
} else if (flow === '0') {
return '非流动人员'
} else {
return flow
}
} else if (type === '2') {
const depart = row.DEPART_STATE
if (depart === '1') {
return '离职'
} else if (depart === '0') {
return '在职'
} else {
return depart
}
} else if (type === '3') {
const audit = row.AUDIT_STATE
if (audit === '0') {
return '已打回'
} else if (audit === '1') {
return '待审核'
} else if (audit === '2') {
return '审核通过'
} else {
return audit
}
} else if (type === '5') {
const train_status = row.STATUS
if (train_status == 0) {
return '未培训'
} else if (train_status === 1) {
return '培训中'
} else if (train_status === 2) {
return '培训通过'
} else if (train_status === -1) {
return '培训未通过'
} else {
return '未培训'
}
} else {
return ''
}
}
}
}
</script>

View File

@ -0,0 +1,25 @@
<template>
<component :is="activeName" />
</template>
<script>
import CardOverdueList from './components/cardOverdueList'
import CorpUserList from './components/corpUserList'
export default {
components: {
CardOverdueList: CardOverdueList,
CorpUserList: CorpUserList,
},
data() {
return {
activeName: 'CardOverdueList',
CORPINFO_ID: '',
USER_ID: '',
USER_ID_T: ''
}
}
}
</script>
<style scoped>
</style>

View File

@ -407,6 +407,22 @@ export default {
},
getShowPicture(row) {
return row.PHOTO && row.PHOTO !== ''
},
//
cardOverduePerson(e) {
this.loading = true
this.visible = true
requestFN(
'/classMessage/cardOverduePerson',
{
CORPINFO_ID : e.CORPINFO_ID
}
).then((data) => {
this.peopleList = data.varList
this.loading = false
}).catch((e) => {
this.loading = false
})
}
}
}

View File

@ -460,7 +460,7 @@ export default {
CARD_TYPE_NAME: '身份证',
NATION: row.NATION_NAME || '',
SEX: row.SEX === '0' ? '男' : '女',
USER_TYPE: '1',
USER_TYPE: '0',
ISDELETE: row.ISDELETE
}
).then((data) => {
@ -489,7 +489,8 @@ export default {
{
CARD_NO: this.pd.USER_ID_CARD,
USERNAME: this.pd.USERNAME,
USER_ID: this.pd.USER_ID || ''
USER_ID: this.pd.USER_ID || '',
PHONE: this.pd.PHONE
}
).then((data) => {
if (data.result === 'success') {