Files
UNION_HUTB/target/classes/views/platform/physicals/PhysicalsRoster.html
T
2026-09-09 09:14:28 +08:00

317 lines
15 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.el-table .auditing-row {
background: oldlace;
}
.el-table .audit-error-row {
background: #fa465926;
}
</style>
<div id="app" class="platform" v-cloak>
<guava ref="guava" padding="0 5%">
<template>
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">年度:</div>
<div class="search-item-option">
<el-date-picker
:clearable="false"
@change="yearChange"
placeholder="选择年"
type="year"
style="width: 100%"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">体检项目:</div>
<div class="search-item-option">
<el-select @change="doSearch" v-model="pageForm.projectId" style="width: 100%">
<el-option :key="item.id" :label="item.name" :value="item.id"
v-for="item in projectSelectOptions"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">职工信息:</div>
<div class="search-item-option">
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
@keyup.enter.native="doSearch" style="width: 100%">
<el-select v-model="pageForm.searchName" slot="prepend" style="width: 80px;">
<el-option label="姓名" value="u.username"></el-option>
<el-option label="工号" value="u.loginname"></el-option>
</el-select>
</el-input>
</div>
</div>
<!--<div class="search-item">
<div class="search-item-label">{{unitMode[physicalsUnitMode].name}}</div>
<div class="search-item-option">
<el-select v-model="pageForm.unionId" style="width: 100%" filterable clearable
placeholder="请选择" @change="unionChange">
<el-option
v-for="item in unionOptions"
:key="item.welfareUnitId"
:label="item.welfareUnitName"
:value="item.welfareUnitId">
</el-option>
</el-select>
</div>
</div>-->
<div class="search-item">
<div class="search-item-label">所属工会:</div>
<div class="search-item-option">
<el-select v-model="pageForm.unionId" style="width: 100%" filterable
clearable
placeholder="请选择" @change="changeWelfareUnit">
<el-option
v-for="item in welfareUnits"
:key="item.welfareUnitId"
:label="item.welfareUnitName"
:value="item.welfareUnitId">
</el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">组成单位:</div>
<div class="search-item-option">
<el-select v-model="pageForm.unitId" style="width: 100%" filterable
clearable
@change="getThreeUnits"
placeholder="请选择">
<el-option
v-for="item in units"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">工会小组:</div>
<div class="search-item-option">
<el-select v-model="pageForm.unionGroupId" style="width: 100%"
filterable
clearable
@change="getThreeUnits"
placeholder="请选择">
<el-option
v-for="item in unionGroups"
:key="item.id"
:label="item.groupName"
:value="item.id">
</el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">组成科室:</div>
<div class="search-item-option">
<el-select v-model="pageForm.threeUnitId" style="width: 100%" filterable
clearable
placeholder="请选择">
<el-option
v-for="item in threeUnits"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</div>
</div>
<template v-if="searchMore">
<div class="search-item">
<div class="search-item-label">所属校区:</div>
<div class="search-item-option">
<el-select v-model="pageForm.campus" style="width: 100%" clearable
placeholder="请选择">
<el-option
v-for="item in campusOptions"
:key="item.campus_id"
:label="item.campus_name"
:value="item.campus_id">
</el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">&emsp;&emsp;别:</div>
<div class="search-item-option">
<el-select v-model="pageForm.sex" style="width: 100%" clearable
placeholder="请选择">
<el-option v-for="sex in sexOptions" :label="sex" :value="sex"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">人员类型:</div>
<div class="search-item-option">
<dict-select v-model="pageForm.personType" style="width: 100%" clearable
placeholder="人员类型"
code="UserType"></dict-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">在职状态:</div>
<div class="search-item-option">
<dict-select v-model="pageForm.userState" style="width: 100%" clearable
placeholder="在职状态"
code="userState"></dict-select>
</div>
</div>
</template>
<div class="search-query">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
<more v-model="searchMore"></more>
</div>
</div>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool label="人员列表" :app="this">
<template #func>
<el-button :disabled="!pageForm.projectId" type="primary" size="small" icon="el-icon-download"
@click="exportPhysicalsList(pageForm.projectId)">
导出
</el-button>
</template>
</table-tool>
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder" :size="tableSize"
v-loading="tableLoading" ref="table" class="vi-table">
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号"
width="80px"></el-table-column>
<el-table-column
align="center"
header-align="center"
v-for="column in tableColumns"
show-overflow-tooltip
:sortable="column.sortable"
:label="column.label"
:prop="column.prop" :width="column.width" min-width="100px">
<template v-if="column.prop==='loginname'" scope="{row}">
<el-link type="primary" @click="openView(row)">{{row.loginname}}</el-link>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<member ref="memberInfo" :id="userId" :source="source" view></member>
</template>
</guava>
</div>
<script>
<!--#include("/platform/welfare/include/common.js"){}#-->
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
unitMode: {
UNIT: {
name: '福利单位'
},
UNION: {
name: '所属工会'
}
},
physicalsUnitMode: "${getSysConfig('PhysicalsUnitMode')}",
projectOptions: [],
pageForm: {
year:moment().format('YYYY'),
searchName: 'u.username',
},
tableColumns: physicalsCommonColumns,
unionOptions: [],
unitOptions: [],
userId: '',
sexOptions,
source: 'sys_user',
projectSelectOptions:[],
welfareUnits:[],
unionGroups:[],
threeUnits:[],
units:[],
campusOptions: [],
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue?v=1.0.0'),
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
'enum-select': httpVueLoader('/components/plugins/EnumSelect.vue?v=1.0.0'),
'member': httpVueLoader('/components/member/MemberInfo.vue?v=1.0.4'),
},
methods: {
yearChange(){
this.getProjectByYear()
},
exportPhysicalsList,
openView({id}) {
this.userId = id
this.$refs.guava.view()
},
async unionChange(val) {
this.$set(this.pageForm, 'unitId', '')
this.unitOptions = await getComponentUnitPhysicals(val)
},
projectOptionChange(val) {
this.pageForm.projectId = val[1]
this.doSearch()
},
async getProjectByYear(){
const resp = await $.post('/platform/physicals/roster/getProjectByYear',{year:this.pageForm.year})
if (resp.code === 0){
this.projectSelectOptions = resp.data
this.pageForm.projectId = this.projectSelectOptions[0].id
}
this.pageData();
},
async changeWelfareUnit() {
this.$set(this.pageForm, 'unitId', '')
this.units = await getComponentUnit(this.pageForm.unionId)
this.unionGroups = await unionGroupsByUnionId(this.pageForm.unionId)
},
async getThreeUnits() {
this.$set(this.pageForm, "threeUnitId", null)
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(this.pageForm.unitId, this.pageForm.unionGroupId)
}
},
async created() {
this.projectOptions = await getPhysicalsProjects()
this.unionOptions = await getWelfareUnitPhysicals()
this.unitOptions = await getComponentUnitPhysicals(null)
await this.getProjectByYear();
this.campusOptions = await getCampus()
this.changeWelfareUnit();
this.welfareUnits = await getWelfareUnit(!judgmentAuthority)
if (!judgmentAuthority) {
this.$set(this.pageForm, "welfareUnit", this.welfareUnits[0].welfareUnitId)
}
}
})
</script>
<!--#
}
#-->