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

317 lines
14 KiB
HTML

<!--#
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-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="username"></el-option>
<el-option label="工号" value="loginname"></el-option>
</el-select>
</el-input>
</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"></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-column prop="userOnline" align="center" header-align="center" label="操作" fixed="right">
<template scope="{row}">
<el-button type="primary" @click="openEdit(row)" size="mini">编辑</el-button>
</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>
<el-dialog title="编辑" :visible.sync="dialogVisible" width="40%">
<el-form :model="formData" ref="addForm" :rules="formRules" label-width="80px">
<vi-title title="修改人员信息"></vi-title>
<el-form-item prop="loginname" label="工&emsp;号">
<el-input disabled v-model="formData.loginname" type="text"></el-input>
</el-form-item>
<el-form-item prop="username" label="姓&emsp;名">
<el-input disabled v-model="formData.username" type="text"></el-input>
</el-form-item>
<el-form-item prop="mobile" label="手机号">
<el-input v-model="formData.mobile" type="text"></el-input>
</el-form-item>
<el-form-item prop="idcard" label="身份证">
<el-input v-model="formData.idcard" type="text"></el-input>
</el-form-item>
<el-form-item prop="marriage" label="婚&emsp;否">
<el-radio-group v-model="formData.marriage">
<el-radio label="已婚" border></el-radio>
<el-radio label="未婚" border></el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="doEdit" :loading="editLoading" :disabled="editLoading">确 定</el-button>
</span>
</el-dialog>
</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')}",
editLoading: false,
dialogVisible: false,
campusOptions: [],
batchEditLoading: false,
batchEditVisible: false,
batchFormData: {},
pageForm: {
searchName: 'username',
},
tableColumns: physicalsCommonColumns,
unionOptions: [],
unitOptions: [],
userId: '',
source: 'sys_user',
sexOptions,
formRules: {},
welfareUnits:[],
unionGroups:[],
threeUnits:[],
units:[],
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue?v=1.0.0'),
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
'member': httpVueLoader('/components/member/MemberInfo.vue?v=1.0.4'),
'user-select': httpVueLoader('/components/plugins/UserTableSelect.vue?v=1.0.0'),
'enum-select': httpVueLoader('/components/plugins/EnumSelect.vue?v=1.0.0'),
},
methods: {
openEdit(row) {
this.formData = row
this.dialogVisible = true
},
async doEdit() {
this.editLoading = true
const resp = await $.post(loc() + "/doEdit", {user: JSON.stringify(this.formData)})
requestLaterMsgFun(this, resp, () => {
this.dialogVisible = false
this.pageData()
}, null, () => {
this.editLoading = false
})
},
openView({id}) {
this.userId = id
this.$refs.guava.view()
},
async unionChange(val) {
this.$set(this.pageForm, 'unitId', '')
this.unitOptions = await getComponentUnitPhysicals(val)
},
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.pageData();
this.unionOptions = await getWelfareUnitPhysicals()
this.campusOptions = await getCampus()
this.unitOptions = await getComponentUnitPhysicals(null)
this.changeWelfareUnit();
this.welfareUnits = await getWelfareUnit(!judgmentAuthority)
if (!judgmentAuthority) {
this.$set(this.pageForm, "welfareUnit", this.welfareUnits[0].welfareUnitId)
}
}
})
</script>
<!--#
}
#-->