first commit

This commit is contained in:
2026-09-09 09:14:28 +08:00
commit 5343198112
5199 changed files with 1052895 additions and 0 deletions
@@ -0,0 +1,189 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.v-body {
display: flex;
width: 100%;
height: 100%;
justify-content: center;
align-items: center;
background-color: #f0f2f5;
}
.v-card {
width: calc(100% - 0px);
height: calc(100% - 0px);
position: relative;
}
.transition-row {
width: 100%;
height: 100%;
}
.transition-item {
width: 100%;
height: 100%;
}
.demo-table-expand {
font-size: 0;
}
.demo-table-expand label {
color: #99a9bf;
}
</style>
<div id="app" v-cloak>
<guava ref="guava" style="width: 100%;height: 100%">
<template>
<div class="v-body">
<el-card class="v-card" shadow="never">
<el-tabs v-model="activeName">
<el-tab-pane label="申请入会" name="first">
<div style="display: flex;width: 100%;height: 100%;align-items: center;justify-content: center;position: relative;padding: 10px">
<el-card style="width: 500px">
<div slot="header" class="clearfix">
<h4>工会信息</h4>
</div>
<div v-loading="unionInfoLoading">
<el-form label-suffix=":" label-width="120px">
<el-form-item label="工会名称">{{unionInfo.unionname}}</el-form-item>
<el-form-item label="工会编码">{{unionInfo.unioncode}}</el-form-item>
<el-form-item label="工会负责人">{{unionInfo.manager}}</el-form-item>
<el-form-item label="联系电话">{{unionInfo.telephone}}</el-form-item>
</el-form>
<el-button :disabled="!(unionInfo.apply||unionInfo.reApply)"
type="primary"
@click="apply"
style="width: 70%;margin-left: 15%;margin-top: 20px">
<span v-if="unionInfo.apply||unionInfo.reApply">{{unionInfo.reApply?'重新申请':'申请变更'}}</span>
<span v-else-if="unionInfo.record">{{unionInfo.record.stateName}}</span>
<span v-else>非会员</span>
</el-button>
</div>
</el-card>
</div>
</el-tab-pane>
<el-tab-pane label="个人信息" name="second">
<div style="padding: 0 8%;padding-top: 50px">
<member ref="memberInfo" :id="'${@shiro.getPrincipalProperty('id')}'" view></member>
</div>
</el-tab-pane>
<el-tab-pane label="申请记录" name="third">
<mem-change-records v-model="unionInfo.records"></mem-change-records>
</el-tab-pane>
</el-tabs>
</el-card>
</div>
</template>
<template #edit>
<mem-change-apply ref="apply" :userid="userId" @submit="doSubmit"></mem-change-apply>
</template>
<template #view>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
activeName: 'first',
unionInfoLoading: true,
unionInfo: {},
changeTypeOptions: [],
changeType: {},
changeOriginOptions: [],
changeOrigin: {},
formData: {},
formRules: {
type: [{required: true, message: '必选', trigger: ['blur', 'change']}],
},
submitLoading: false,
userId: "${@shiro.getPrincipalProperty('id')}"
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue?v=1.0.0'),
'member': httpVueLoader('/components/member/MemberInfo.vue?v=1.0.3'),
'enum-select': httpVueLoader('/components/plugins/EnumSelect.vue?v=1.0.0'),
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
'mem-change-records': httpVueLoader('/components/member/MemChangeRecords.vue?v=1.0.0'),
'mem-change-apply': httpVueLoader('/components/member/MemChangeApply.vue?v=1.0.0'),
},
methods: {
async doSubmit(formData) {
const resp = await $.post(loc() + "/doApply", formData)
this.$refs.apply.closeLoading()
if(resp.code===0){
this.getUnionInfo()
this.$refs.guava.index()
}else{
this.notifyWarning(resp.msg)
}
},
apply() {
this.formData = {}
this.$refs.guava.edit()
if (this.$refs["form"])
this.$refs["form"].resetFields();
},
async getUnionInfo() {
this.unionInfoLoading = true
const resp = await $.get(loc() + "/unionInfo")
this.unionInfoLoading = false
if(resp.code===0){
this.unionInfo = resp.data
}else{
this.notifyWarning(resp.msg)
}
this.unionInfoLoading = false
if(resp.code===0){
this.unionInfo = resp.data
}else{
this.notifyWarning(resp.msg)
}
},
},
async created() {
this.getUnionInfo()
this.changeType = await member.getChangeType()
this.changeOrigin = await member.getChangeOrigin()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,933 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
</style>
<div id="app" v-cloak>
<guava ref="guava">
<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="u.username"></el-option>
<el-option label="工号" value="u.loginname"></el-option>
</el-select>
</el-input>
</div>
</div>
<div class="search-item"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}">
<div class="search-item-label">所属工会:</div>
<div class="search-item-option">
<el-select placeholder="所属工会" v-model="pageForm.unionId"
style="width: 100%;"
clearable="true"
@change="flushUnits" @clear="flushUnits"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname"
: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.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>
<div class="search-item">
<div class="search-item-label">更新日期:</div>
<div class="search-item-option">
<!-- <el-date-picker-->
<!-- style="width: 100%"-->
<!-- v-model="pageForm.changeDate"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="更新日期">-->
<!-- </el-date-picker>-->
<el-date-picker
style="width: 100%"
v-model="pageForm.changeDateRange"
@change="changeDateRangeChange"
type="datetimerange"
:picker-options="pickerOptions"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
align="right">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">异动类型:</div>
<div class="search-item-option">
<enum-select v-model="pageForm.changeType" value="code"
label="description"
style="width: 100%"
clearable placeholder="异动类型"
enum="UserChangeType"></enum-select>
</div>
</div>
<!--<div class="search-item">
<div class="search-item-label">是否异动:</div>
<div class="search-item-option">
<el-radio-group v-model="pageForm.changed" @change="doSearch">
<el-radio-button :label="true">是</el-radio-button>
<el-radio-button :label="false">否</el-radio-button>
</el-radio-group>
</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 #label_end>
<span class="text-danger ml10">提醒:小组长可以查看本小组之外的人员</span>
<!-- <span class="text-danger">(温馨提醒:异动类型为新增的教职工,需要新入职变更操作后才能成为工会会员!)</span>-->
</template>
<template #func>
<span class="text-danger">人员信息有无变化:</span>
<el-select v-model="pageForm.isMember" @change="doSearch()"
:clearable="false" size="small"
style="width: 200px;margin-right: 5px">
<el-option label="全部会员" value=""></el-option>
<el-option label="是会员" value="1"></el-option>
<el-option label="不是会员" value="0"></el-option>
</el-select>
<el-radio-group v-model="pageForm.changed" @change="doSearch" class="mr5"
size="small">
<el-radio-button label="">全部({{numData.userSumNum || 0}})
</el-radio-button>
<el-radio-button :label="1">有变化({{numData.changeNum || 0}})
</el-radio-button>
<el-radio-button :label="0">无变化({{numData.notChangeNum || 0}})
</el-radio-button>
</el-radio-group>
<!-- <span class="text-danger">是否会员:</span>
<el-radio-group v-model="pageForm.isMember" @change="doSearch" class="mr5"
size="small">
<el-radio-button label="">全部({{numData.userSumNum || 0}})
</el-radio-button>
<el-radio-button label="1">是({{numData.memberNum || 0}})
</el-radio-button>
<el-radio-button label="0">否({{numData.notMemberNum || 0}})
</el-radio-button>
</el-radio-group>-->
<!-- <el-popconfirm-->
<!-- v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"-->
<!-- title="确定要将所有会员设为福利会员吗?"-->
<!-- @confirm="allIsWelfareMember"-->
<!-- >-->
<!-- <el-button slot="reference"-->
<!-- type="primary" :loading="welfareMemberLoading" size="small">全部设置为福利会员-->
<!-- </el-button>-->
<!-- </el-popconfirm>-->
<el-dropdown style="margin: 0 10px" @command="pushDropdownCommand">
<el-button type="primary" size="small" icon="el-icon-plus">
添加
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'select'}">选择加入
</el-dropdown-item>
<el-dropdown-item :command="{type:'add'}">新增用户
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button :disabled="!checkUsers.length" type="primary" size="small"
icon="el-icon-edit"
@click="openBatchEdit" class="ml5">
设置校区
</el-button>
<el-button :disabled="!checkUsers.length" type="primary" size="small"
icon="el-icon-edit"
@click="openUnitMove" class="ml5">
单位调整
</el-button>
</template>
</table-tool>
<el-table ref="table" :data="tableData" style="width: 100%" row-key="id"
@sort-change="pageOrder"
v-loading="tableLoading" :size="tableSize" class="vi-table"
@selection-change="tableHandleSelectionChange">
<el-table-column type="selection" :reserve-selection="true"></el-table-column>
<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.id)">{{row.loginname}}
</el-link>
</template>
<template v-else-if="column.prop==='unitname'" scope="{row}">
{{isDisPlayCode?''+row.unitcode+'':null}}{{row.unitname}}
</template>
<template v-else-if="column.prop==='unionname'" scope="{row}">
{{isDisPlayCode?''+row.unioncode+'':null}}{{row.unionname}}
</template>
</el-table-column>
<el-table-column label="异动信息" header-align="center">
<el-table-column label="更新时间" prop="changeTime" min-width="145px"
header-align="center"
sortable
align="center" show-overflow-tooltip>
</el-table-column>
<el-table-column label="异动类型" prop="changeType" header-align="center"
align="center" show-overflow-tooltip sortable>
<template scope="{row}">
<span style="color: #0e78c5">{{changeType[row.changeType]}}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="会员" header-align="center" align="center" prop="member"
show-overflow-tooltip sortable>
<template scope="{row}">
<span v-if="row.member==1" class="text-success ">
<i class="fa fa-circle ml5"></i>
</span>
<span v-else class="text-danger">
<i class="fa fa-circle ml5"></i>
</span>
</template>
</el-table-column>
<el-table-column label="变更状态" header-align="center" align="center"
prop="welfareMember"
show-overflow-tooltip sortable>
<template scope="{row}">
<vi-table-state v-if="row.stateId" :state="row"></vi-table-state>
<vi-table-state v-else
:state="{stateColor:'#1890ff',stateName:'暂无'}"></vi-table-state>
</template>
</el-table-column>
<el-table-column prop="userOnline" align="center" header-align="center"
label="操作"
width="100px">
<template scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')||@shiro.hasRole('ghxzzz')}"
:disabled="!(row.apply||row.reApply)"
:command="{type:'change',data:row}">
变更
</el-dropdown-item>
<!--
<el-dropdown-item v-show="row.changeType===2"
:command="{type:'sendSms',data:row}">
通知入会
</el-dropdown-item>-->
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<mem-change-apply ref="apply" :userid="userId" @submit="doSubmit"
:welfare_member="true"></mem-change-apply>
</template>
<template #view>
<el-tabs v-model="active">
<el-tab-pane label="个人信息" name="info">
<member ref="memberInfo" :id="userId" view></member>
</el-tab-pane>
<el-tab-pane label="变更记录" name="changInfo">
<mem-change-records :userid="userId"></mem-change-records>
</el-tab-pane>
</el-tabs>
</template>
<template #public>
<member ref="member" :id="userId" @save="afterEdit"></member>
</template>
</guava>
<el-drawer
title="设置校区"
:visible.sync="batchEditVisible"
:before-close="handleClose" size="1000px">
<el-timeline style="margin-right: 40px">
<el-timeline-item timestamp="" placement="top">
<el-form ref="batchForm" :model="batchFormData" label-width="100px">
<el-row :gutter="60">
<el-col :span="12">
<el-form-item label="所属校区">
<el-select v-model="batchFormData.campus" style="width: 300px"
clearable
size="medium"
placeholder="请选择"
@change="checkUsers.map(v=>$set(v,'campusId',batchFormData.campus))">
<el-option
v-for="item in campusOptions"
:key="item.campus_id"
:label="item.campus_name"
:value="item.campus_id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-timeline-item>
<el-timeline-item timestamp="" placement="top">
<el-table :data="checkUsers" style="width: 100%" row-key="id" class="vi-table"
height="70vh">
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="loginname"
label="工号"></el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="username"
label="姓名"></el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="unitname"
label="所属单位"></el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="unionname"
label="所属工会"></el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="campusId"
label="所属校区" width="300px">
<template scope="{row}">
<el-select v-model="row.campusId" style="width: 200px" clearable
size="small"
placeholder="请选择">
<el-option
v-for="item in campusOptions"
:key="item.campus_id"
:label="item.campus_name"
:value="item.campus_id">
</el-option>
</el-select>
</template>
</el-table-column>
</el-table>
</el-timeline-item>
</el-timeline>
<span style="position: absolute;bottom: 20px;right: 20px">
<el-button @click="batchEditVisible = false"
:disabled="batchEditLoading">取 消</el-button>
<el-button type="primary" @click="doBatchEdit"
:loading="batchEditLoading">确定</el-button>
</span>
</el-drawer>
<el-drawer
title="单位调整"
:visible.sync="unitMoveVisibile"
:before-close="handleClose" size="70%">
<el-row class="text-primary p20">
选择新单位
</el-row>
<el-row type="flex" :gutter="20" class="pl20 pr20">
<el-col :span="12">
<el-select placeholder="请选择新工会" v-model="unitMoveFormData.unionId"
style="width: 100%;"
clearable="true"
@change="moveUnionsChange"
filterable="true">
<el-option v-for="item in unitMoveUnions" :label="item.unionname"
:value="item.id"></el-option>
</el-select>
</el-col>
<el-col :span="12">
<el-select v-model="unitMoveFormData.unitId" style="width: 100%" filterable
clearable
@change="moveUnitChange"
placeholder="请选择新单位">
<el-option
v-for="item in unitMoveUnits"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="12">
<el-select v-model="unitMoveFormData.threeUnitId" clearable filterable
placeholder="请选择新科室"
style="width: 100%" @change="threeUnitChange">
<el-option
v-for="item in threeUnits"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="12">
<el-input :value="unitMoveFormData.unionGroupName" disabled
placeholder="新工会小组"></el-input>
</el-col>
</el-row>
<el-row class="mt10">
<el-table :data="checkUsers" style="width: 100%;padding: 20px" class="vi-table"
border
height="70vh">
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="loginname"
width="120"
label="工号"></el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="username"
width="120"
label="姓名"></el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="threeUnitName"
label="当前科室"></el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="unitname"
label="当前单位"></el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
prop="unionname"
label="当前工会"></el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
label="新科室">
<template slot-scope="{row}">
<span>{{unitMoveFormData.threeUnitName}}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
label="新单位">
<template slot-scope="{row}">
<span>{{unitMoveFormData.unitName}}</span>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip align="center" header-align="center"
label="新分工会">
<template slot-scope="{row}">
<span>{{unitMoveFormData.unionName}}</span>
</template>
</el-table-column>
</el-table>
</el-row>
<span style="position: absolute;bottom: 20px;right: 20px">
<el-button @click="unitMoveVisibile = false">取 消</el-button>
<el-button type="primary" @click="doUnitMove">确定</el-button>
</span>
</el-drawer>
<el-drawer
title="添加会员"
:visible.sync="selectUserVisible"
:before-close="handleClose" size="1200px">
<member-user-select v-model="selectUsers" ref="userSelect" :page_size="10"
:sql_cnd="['(u.member is null or u.member = 0) and (c.taskId is null OR c.stateId=70)']"></member-user-select>
<span style="position: absolute;bottom: 20px;right: 20px">
<el-button @click="selectUserVisible = false"
:disabled="selectUserLoading">取 消</el-button>
<el-button type="primary" @click="doBatchJoinMember"
:loading="selectUserLoading">确定</el-button>
</span>
</el-drawer>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
checkUsers: [],
batchEditVisible: false,
batchEditLoading: false,
batchFormData: {},
unitMoveVisibile: false,
unitMoveUnions: [],
unitMoveUnits: [],
unitMoveFormData: {
unitId: '',
unionId: '',
unitName: '',
unionName: ''
},
active: 'info',
submitLoading: false,
formRules: {},
info: {},
userId: '',
formData: {},
pageForm: {
searchName: "u.username",
changed: '',
isMember: '1'
},
unions: [],
units: [],
unionGroups:[],
threeUnits:[],
tableColumns: [
{prop: 'loginname', label: '工号', sortable: true},
{prop: 'username', label: '姓名', sortable: true},
{prop: 'sex', label: '性别', sortable: true, width: '100px'},
{prop: 'birthday', label: '出生年月', sortable: true},
{prop: 'personType', label: '人员类型', sortable: true},
{prop: 'userState', label: '在职状态', sortable: true},
{prop: 'unionname', label: '所属工会', sortable: true},
{prop: 'unitname', label: '所属单位', sortable: true},
{prop: 'threeUnitName', label: '所在科室', sortable: true},
{prop: 'unionGroupName', label: '工会小组', sortable: true},
// {prop: 'campusName', label: '所属校区', sortable: true},
],
campusOptions: [],
changeType: {},
sexOptions: ['男', '女'],
welfareMemberLoading: false,
numData: {
changeNum: 0,
notChangeNum: 0,
userSumNum: 0,
memberNum: 0,
notMemberNum: 0,
},
threeUnits: [],
selectUserVisible: false,
selectUsers: [],
selectUserLoading: false,
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'member': httpVueLoader('/components/member/MemberInfo.vue?v=1.0.3'),
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
'mem-change-records': httpVueLoader('/components/member/MemChangeRecords.vue?v=1.0.2'),
'mem-change-apply': httpVueLoader('/components/member/MemChangeApply.vue?v=1.0.2'),
'enum-select': httpVueLoader('/components/plugins/EnumSelect.vue?v=1.0.0'),
'member-user-select': httpVueLoader('/components/plugins/MemberUserTableSelect.vue?v=1.0.0'),
},
methods: {
async afterEdit(memData) {
if (!this.userId) {
await $.post(" /platform/member/info/make/joinMemberFamily", memData)
}
this.userId = ''
this.pageData()
this.$refs.guava.index()
},
async doBatchJoinMember() {
if (!this.selectUsers.length) {
this.notifyWarning("请先勾选需要设置为会员的用户")
return
}
this.selectUserLoading = true
const resp = await $.post(loc() + "/joinWelfareMember", {userIds: JSON.stringify(this.selectUsers)});
this.selectUserLoading = false
if (resp.code === 0) {
this.pageData()
this.$refs.userSelect.init()
this.selectUserVisible = false
} else {
this.notifyWarning(resp.msg)
}
},
pushDropdownCommand({type}) {
if (type == 'select') {
this.selectUsers = []
this.selectUserVisible = true
this.$nextTick(() => {
this.$refs.userSelect.init()
})
} else if (type == 'add') {
this.userId = ""
this.$refs.guava.public()
if (!this.userId) {
this.$refs.member.id = null
this.$refs.member.getUserInfo()
}
}
},
async threeUnitChange(val) {
if (val) {
const threeUnit = this.threeUnits.find(v => v.id === val)
const groupName = threeUnit.groupname
this.$set(this.unitMoveFormData, 'threeUnitName', threeUnit.name)
this.$set(this.unitMoveFormData, 'unionGroupName', groupName)
} else {
this.$set(this.unitMoveFormData, 'unionGroupName', null)
}
},
async getThreeUnits(val) {
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(this.pageForm.unitId, this.pageForm.unionGroupId)
},
doSearch() {
this.pageForm.pageNumber = 1
this.pageData()
this.getNumData()
},
openUnitMove() {
this.unitMoveVisibile = true
this.unitMoveFormData = {
unitId: '',
unionId: '',
unitName: '',
unionName: ''
}
},
async moveUnionsChange(val) {
if (val) {
this.unitMoveUnits = await getUnits(val)
this.$set(this.unitMoveFormData, 'unionName', this.unitMoveUnions.find(v => v.id === val).unionname)
this.$set(this.unitMoveFormData, 'unitId', '')
this.$set(this.unitMoveFormData, 'unitName', '')
} else {
this.$set(this.unitMoveFormData, 'unitId', '')
this.$set(this.unitMoveFormData, 'unitName', '')
this.$set(this.unitMoveFormData, 'unionName', '')
this.unitMoveUnits = []
}
},
async moveUnitChange(val) {
if (val) {
this.$set(this.unitMoveFormData, 'unitName', this.unitMoveUnits.find(v => v.id === val).name)
} else {
this.$set(this.unitMoveFormData, 'unitName', '')
}
if (val) {
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(val, null)
}
},
async doUnitMove() {
if (this.unitMoveFormData.unitId === '') {
this.notifyWarning('请选择新单位!')
return
}
if (this.unitMoveFormData.threeUnitId === '') {
this.notifyWarning('请选择新科室!')
return
}
const params = {
unitId: this.unitMoveFormData.unitId,
threeUnitId: this.unitMoveFormData.threeUnitId,
userId: this.checkUsers.map(v => v.id)
}
const resp = await $.post(loc() + '/userUnitMove', params)
if (resp.code === 0) {
this.pageData()
this.getNumData()
this.$refs.table.clearSelection();
this.unitMoveVisibile = false
} else {
this.notifyWarning(resp.msg)
}
},
changeDateRangeChange(val) {
this.pageForm.changeDateBefore = val[0]
this.pageForm.changeDateEnd = val[1]
},
async doBatchEdit() {
const batch = this.checkUsers.map(v => {
return {id: v.id, campusId: v.campusId}
})
this.batchEditLoading = true
const resp = await $.post("/platform/welfare/member/mange/batchEdit", {users: JSON.stringify(batch)});
this.batchEditLoading = false
if (resp.code === 0) {
this.pageData()
this.getNumData()
this.$refs.table.clearSelection();
this.batchEditVisible = false
} else {
this.notifyWarning(resp.msg)
}
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => {
});
},
openBatchEdit() {
this.batchFormData = {}
this.batchEditVisible = true
},
tableHandleSelectionChange(val) {
this.checkUsers = val;
},
async sendSms(userid) {
const resp = await $.post(loc() + '/sendSms', {userid})
if (resp.code === 0) {
this.$notify({title: '成功', message: '发送成功!', type: 'success'});
}
},
async allIsWelfareMember() {
this.welfareMemberLoading = true
const resp = await $.post(loc() + "/allIsWelfareMember")
this.welfareMemberLoading = false
},
dropdownCommand(command) {
const {type, data} = command
if (type === 'view') {
this.openView(data.id)
} else if (type === 'change') {
this.openChange(data.id)
} else if (type === 'sendSms') {
this.sendSms(data.id)
}
},
openChange(userId) {
this.userId = userId
this.$refs.guava.edit()
},
async doSubmit(formData) {
const resp = await $.post(loc() + "/change", formData)
this.$refs.apply.closeLoading()
if (resp.code === 0) {
this.userId = ""
this.$refs.guava.index()
this.pageData()
this.getNumData()
} else {
this.notifyWarning(resp.msg)
}
},
openView(userId) {
this.userId = userId
this.$refs.guava.view()
},
async flushUnits() {
this.$set(this.pageForm, "unitId", null)
this.$set(this.pageForm, "unionGroupId", null)
this.$set(this.pageForm, "threeUnitId", null)
this.units = []
this.unionGroups = []
this.threeUnits = []
if (this.pageForm.unionId) {
this.units = await getUnits(this.pageForm.unionId)
this.unionGroups = await unionGroupsByUnionId(this.pageForm.unionId)
}
},
async getChangeType() {
const changeType = {}
const changeTypeOptions = await getEnumOptions("UserChangeType")
changeTypeOptions.forEach(v => {
changeType[v.code] = v.description
})
return changeType
},
async getNumData() {
const resp = await $.post(loc() + '/getButtonNum', this.pageForm)
if (resp.code === 0) {
this.numData = resp.data
} else {
this.notifyWarning(resp.msg)
}
}
},
async created() {
this.pageData();
this.getNumData()
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.unions = await getUnions(null, false)
} else {
this.unions = await getUnions(null, true)
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
this.flushUnits()
}
this.unitMoveUnions = clone(this.unions)
this.campusOptions = await getCampus()
this.changeType = await this.getChangeType()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,440 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
</style>
<div id="app" v-cloak>
<guava ref="guava">
<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"
style="width: 100%"
@keyup.enter.native="doSearch">
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
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">所属工会:</div>
<div class="search-item-option">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable
@change="flushUnits" @clear="flushUnits"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
filterable>
<el-option v-for="item in unions" :label="item.unionname" :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 placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
@change="getThreeUnits"
clearable
filterable>
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-row>
</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.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>
<div class="search-item">
<div class="search-item-label">人员类型:</div>
<div class="search-item-option">
<dict-select v-model="pageForm.userType" 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.changeType" style="width: 100%" clearable
placeholder="变更类型"
code="MemberChangeType"></dict-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">申请方式:</div>
<div class="search-item-option">
<enum-select enum="MemberChangeOrigin" v-model="pageForm.applyOrigin" value="code"
label="description"
style="width: 100%" clearable placeholder="申请方式"></enum-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"
v-loading="tableLoading" :size="tableSize" class="vi-table">
<el-table-column type="expand" width="40px">
<template slot-scope="{row}">
<el-form class="demo-table-expand" v-loading="row.loading"
label-position="right" label-suffix="" label-width="120px">
<vi-title title="变更信息"></vi-title>
<el-form-item label="变更原因">
{{ row.remark }}
</el-form-item>
<!--异动-->
<template v-if="row.type==1">
<vi-title title="异动信息"></vi-title>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="原科室">
<span>{{ row.originThreeUnitName }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="原单位">
<span>{{ row.originUnitName }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="原工会">
<span>{{ row.originUnionName }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="新科室">
<span>{{ row.currentThreeUnitName }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="新单位">
<span>{{ row.currentUnitName }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="新工会">
<span>{{ row.currentUnionName }}</span>
</el-form-item>
</el-col>
</el-row>
</template>
<vi-title title="分工会审核信息"></vi-title>
<el-row :gutter="20" v-if="row.unionAudit">
<el-col :span="12">
<el-form-item label="审核人员">
<span>{{ row.unionAudit.username }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间">
<span>{{ row.unionAudit.auditTime }}</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审核意见">
<span>{{ row.unionAudit.auditOpinion }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row v-else type="flex" justify="center">
<el-form-item label="暂无审核信息">
</el-form-item>
</el-row>
<vi-title title="校工会审核信息"></vi-title>
<el-row :gutter="20" v-if="row.schoolAudit">
<el-col :span="12">
<el-form-item label="审核人员">
<span>{{ row.schoolAudit.username }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间">
<span>{{ row.schoolAudit.auditTime }}</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审核意见">
<span>{{ row.schoolAudit.auditOpinion }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row v-else type="flex" justify="center">
<el-form-item label="暂无审核信息">
</el-form-item>
</el-row>
</el-form>
</template>
</el-table-column>
<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
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
>
<template v-if="column.prop=='type'" scope="{row:{type}}">
{{changeType[type]}}
</template>
<template v-else-if="column.prop=='applyOrigin'" scope="{row:{applyOrigin}}">
{{changeOrigin[applyOrigin]}}
</template>
<template v-else-if="column.prop=='stateId'" scope="{row}">
<vi-table-state v-if="row.stateId" :state="row"></vi-table-state>
<vi-table-state v-else :state="{stateColor:'#1890ff',stateName:'暂无'}"></vi-table-state>
</template>
<template v-else-if="column.prop==='unitname'" scope="{row}">
{{isDisPlayCode?''+row.unitcode+'':null}}{{row.unitname}}
</template>
<template v-else-if="column.prop==='unionname'" scope="{row}">
{{isDisPlayCode?''+row.unioncode+'':null}}{{row.unionname}}
</template>
</el-table-column>
<el-table-column label="变更人姓名">
<template slot-scope="{row}">
{{row.schoolAudit?row.schoolAudit.username:''}}
</template>
<!-- <template v-else-if="column.prop==='changePersonLoginname'" scope="{row}">-->
<!-- {{row.schoolAudit.loginname}}-->
<!-- </template>-->
<!-- <template v-else-if="column.prop==='changeTime'" scope="{row}">-->
<!-- {{row.schoolAudit.auditTime}}-->
<!-- </template>-->
</el-table-column>
<el-table-column label="变更人工号">
<template slot-scope="{row}">
{{row.schoolAudit?row.schoolAudit.loginname:''}}
</template>
</el-table-column>
<el-table-column label="变更时间" width="150">
<template slot-scope="{row}">
{{row.schoolAudit?row.schoolAudit.auditTime:''}}
</template>
</el-table-column>
<el-table-column prop="userOnline" align="center" header-align="center" label="操作"
width="100px" fixed="right">
<template scope="{row}">
<el-button size="small" :loading="row.loading" @click="openView(row.userId)">查看
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<mem-change-apply ref="apply" :userid="userId" @submit="doSubmit"></mem-change-apply>
</template>
<template #view>
<el-tabs v-model="active">
<el-tab-pane label="个人信息" name="info">
<member ref="memberInfo" :id="userId" view></member>
</el-tab-pane>
</el-tabs>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
active: 'info',
submitLoading: false,
formRules: {},
info: {},
userId: '',
formData: {},
pageForm: {
searchName: "u.username",
},
unions: [],
units: [],
unionGroups:[],
threeUnits:[],
changeOrigin: {},
changeType: {},
tableColumns: [
{prop: 'loginname', label: '工号'},
{prop: 'username', label: '姓名'},
{prop: 'unionname', label: '所属工会', sortable: true},
{prop: 'unitname', label: '所属单位', sortable: true},
{prop: 'threeUnitName', label: '所在科室', sortable: true},
{prop: 'unionGroupName', label: '工会小组', sortable: true},
{prop: 'type', label: '变更类型', sortable: true},
{prop: 'applyDate', label: '申请时间', sortable: true},
{prop: 'applyOrigin', label: '申请方式', sortable: true},
{prop: 'stateId', label: '状态', sortable: true}
],
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'member': httpVueLoader('/components/member/MemberInfo.vue?v=1.0.3'),
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
'mem-change-records': httpVueLoader('/components/member/MemChangeRecords.vue?v=1.0.2'),
'mem-change-apply': httpVueLoader('/components/member/MemChangeApply.vue?v=1.0.0'),
'enum-select': httpVueLoader('/components/plugins/EnumSelect.vue?v=1.0.0'),
},
methods: {
async onExpand(row, expandedRows) {
if (!expandedRows.includes(row)) {
return
}
this.$set(row, "loading", true)
const resp = await $.get("/platform/member/common/findChangeApplyInfo", {id: row.id})
this.$set(row, "loading", false)
if(resp.code===0){
this.$set(row, "info", data)
}else{
this.notifyWarning(resp.msg)
this.$set(row, "info", {})
}
},
openChange(userId) {
this.userId = userId
this.$refs.guava.edit()
},
async doSubmit(formData) {
const resp = await $.post(loc() + "/change", formData)
this.$refs.apply.closeLoading()
if(resp.code===0){
this.userId = ""
this.$refs.guava.index()
this.pageData()
}else{
this.notifyWarning(resp.msg)
}
},
openView(userId) {
this.userId = userId
this.$refs.guava.view()
},
async flushUnits() {
this.$set(this.pageForm, "unitId", null)
this.$set(this.pageForm, "unionGroupId", null)
this.$set(this.pageForm, "threeUnitId", null)
this.units = []
this.unionGroups = []
this.threeUnits = []
if (this.pageForm.unionId) {
this.units = await getUnits(this.pageForm.unionId)
this.unionGroups = await unionGroupsByUnionId(this.pageForm.unionId)
}
},
async getThreeUnits() {
this.$set(this.pageForm, "threeUnitId", null)
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(this.pageForm.unit, this.pageForm.unionGroupId)
}
},
async created() {
this.pageData();
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.unions = await getUnions(null, false)
} else {
this.unions = await getUnions(null, true)
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
this.flushUnits()
}
this.changeType = await member.getChangeType()
this.changeOrigin = await member.getChangeOrigin()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,547 @@
<style>
.el-tabs__content {
padding-top: 20px;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<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" placeholder="查询类型"
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">申请时间:</div>
<div class="search-item-option">
<el-date-picker
style="width: 100%"
v-model="pageForm.dateRange"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">变更类型:</div>
<div class="search-item-option">
<dict-select v-model="pageForm.type" style="width: 100%" clearable placeholder="变更类型"
code="MemberChangeType"></dict-select>
</div>
</div>
<template v-if="searchMore">
<div class="search-item">
<div class="search-item-label">所属工会:</div>
<div class="search-item-option">
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
clearable
filterable
@change="flushUnits" @clear="flushUnits">
<el-option v-for="item in unions" :label="item.unionname"
: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 placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
@change="getThreeUnits"
clearable
filterable>
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-row>
</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>
<div class="search-item">
<div class="search-item-label">会员状态:</div>
<div class="search-item-option">
<dict-select v-model="pageForm.memberStatus" style="width: 100%" clearable
placeholder="会员状态" code="memberStatusText"></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-radio-group v-model="pageForm.audit" @change="doSearch" size="small"
style="margin-bottom: -7.5px">
<el-radio-button :label="0">全部</el-radio-button>
<el-radio-button :label="1">已审核</el-radio-button>
<el-radio-button :label="2">未审核</el-radio-button>
</el-radio-group>
</template>
</table-tool>
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
v-loading="tableLoading" :size="tableSize" 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
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
>
<template v-if="column.prop=='type'" scope="{row:{type}}">
{{changeType[type]}}
</template>
<template v-else-if="column.prop=='applyOrigin'" scope="{row:{applyOrigin}}">
{{changeOrigin[applyOrigin]}}
</template>
<template v-else-if="column.prop=='stateId'" scope="{row}">
<vi-table-state :state="row"></vi-table-state>
</template>
<template v-else-if="column.prop==='unitname'" scope="{row}">
{{isDisPlayCode?''+row.unitcode+'':null}}{{row.unitname}}
</template>
<template v-else-if="column.prop==='unionname'" scope="{row}">
{{isDisPlayCode?''+row.unioncode+'':null}}{{row.unionname}}
</template>
</el-table-column>
<el-table-column prop="userOnline" align="center" header-align="center" label="操作"
width="100px">
<template scope="{row}">
<el-button size="mini" :loading="row.loading" v-if="row.audit" type="primary"
@click="openAudit(row,true)">审核
</el-button>
<el-button size="mini" :loading="row.loading" v-else @click="openAudit(row,false)">查看
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<el-tabs v-model="active">
<el-tab-pane label="个人信息" name="info">
<member ref="memberInfo" :id="info.userId" view></member>
</el-tab-pane>
<el-tab-pane label="变更记录" name="changInfo">
<mem-change-records :userid="info.userId"></mem-change-records>
</el-tab-pane>
<el-tab-pane label="院级工会审核" name="union">
<el-form :model="formData" ref="form" :rules="formRules"
label-width="120px" label-suffix="">
<vi-title title="审核信息"></vi-title>
<template v-if="!info.unionAudit&&source==1">
<template v-if="info.type==1">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="原单位">
<el-input :value="info.originUnit.name" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="原工会">
<el-input :value="info.originUnion.unionname" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="新单位">
<el-input :value="info.currentUnit.name" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="新工会">
<el-input :value="info.currentUnion.unionname" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
</template>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="username" label="审核人员">
<el-input v-model="formData.username"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="auditTime" label="审核时间">
<el-input v-model="formData.auditTime" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="opinion" label="审核意见">
<el-input type="textarea" v-model="formData.auditOpinion" rows="4" maxlength="500"
placeholder="请填写您的审核意见"></el-input>
</el-form-item>
<div style="float: right;margin: 20px 0">
<el-button @click="doAudit(false)" :loading="submitLoading">
</el-button>
<el-button type="primary" @click="doAudit(true)"
:loading="submitLoading">
</el-button>
</div>
</template>
<template v-else>
<el-row :gutter="20" v-if="info&&info.unionAudit">
<el-col :span="12">
<el-form-item label="审核人员">
<span>{{ info.unionAudit.username }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间">
<span>{{ info.unionAudit.auditTime }}</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审核意见">
<span>{{ info.unionAudit.auditOpinion }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row v-else type="flex" justify="center">
<el-form-item label="暂无审核信息">
</el-form-item>
</el-row>
</template>
</el-form>
</el-tab-pane>
<el-tab-pane label="校工会审核" name="school"
v-if="info.unionAudit">
<el-form class="demo-table-expand" :model="formData" ref="form" :rules="formRules"
label-width="120px" label-suffix="">
<vi-title title="审核信息"></vi-title>
<template v-if="!info.schoolAudit && source==2 && info.audit">
<template v-if="info.type==1">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="原单位">
<el-input :value="info.originUnit.name" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="原工会">
<el-input :value="info.originUnion.unionname" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="新单位">
<el-input :value="info.currentUnit.name" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="新工会">
<el-input :value="info.currentUnion.unionname" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
</template>
<el-row gutter="20">
<el-col :span="12">
<el-form-item prop="username" label="审核人员">
<el-input v-model="formData.username"
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item prop="auditTime" label="审核时间">
<el-input v-model="formData.auditTime" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item prop="opinion" label="审核意见">
<el-input type="textarea" v-model="formData.auditOpinion" rows="4" maxlength="500"
placeholder="请填写您的审核意见"></el-input>
</el-form-item>
<div style="float: right;margin: 20px 0">
<el-button @click="doAudit(false)" type="danger" :loading="submitLoading">
</el-button>
<el-button type="primary" @click="doAudit(true)"
:loading="submitLoading">
</el-button>
</div>
</template>
<template v-else>
<el-row :gutter="20" v-if="info&&info.schoolAudit">
<el-col :span="12">
<el-form-item label="审核人员">
<span>{{ info.schoolAudit.username }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间">
<span>{{ info.schoolAudit.auditTime }}</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="审核意见">
<span>{{ info.schoolAudit.auditOpinion }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row v-else type="flex" justify="center">
<el-form-item label="暂无审核信息">
</el-form-item>
</el-row>
</template>
</el-form>
</el-tab-pane>
</el-tabs>
</template>
<template #view>
</template>
</guava>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
active: 'info',
submitLoading: false,
formRules: {},
info: {
originUnion: {},
currentUnion: {}
},
formData: {},
pageForm: {
unionId: null,
unitId: null,
threeUnitId: null,
unionGroupId: null,
source: source,
searchName: "u.username",
audit: 2
},
units: [],
unions: [],
changeOrigin: {},
changeType: {},
tableColumns: [
{prop: 'loginname', label: '工号', checked: true},
{prop: 'username', label: '姓名'},
{prop: 'mobile', label: '联系电话'},
{prop: 'unionname', label: '所属工会', sortable: true},
{prop: 'unitname', label: '所属单位', sortable: true},
{prop: 'threeUnitName', label: '所在科室', sortable: true},
{prop: 'unionGroupName', label: '工会小组', sortable: true},
{prop: 'type', label: '变更类型', sortable: true},
{prop: 'applyDate', label: '申请时间', sortable: true},
{prop: 'applyOrigin', label: '申请方式', sortable: true},
{prop: 'stateId', label: '状态', sortable: true},
],
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'member': httpVueLoader('/components/member/MemberInfo.vue?v=1.0.3'),
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
'mem-change-records': httpVueLoader('/components/member/MemChangeRecords.vue?v=1.0.2'),
},
methods: {
async doAudit(pass) {
if (!pass) {
const confirm = await this.$confirm('您确定要拒绝吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if ('confirm' !== confirm) return
}
this.formData.auditPass = pass
this.submitLoading = true
const resp = await $.post("/platform/member/change/audit/doAudit", this.formData)
this.submitLoading = false
if(resp.code===0){
//更新用户信息
this.info.userId = ""
this.pageData()
this.$refs.guava.index()
this.notifySuccess(resp.msg)
}else{
this.notifyWarning(resp.msg)
}
},
async openAudit(row, audit) {
this.$set(row, "loading", true)
const resp = await $.get("/platform/member/common/findChangeApplyInfo", {id: row.id})
this.$set(row, "loading", false)
if(resp.code===0){
const data = resp.data
data.audit = audit
this.info = data
if (audit) {
if (this.pageForm.source === 1) {
this.active = 'union'
} else if (this.pageForm.source === 2) {
this.active = 'school'
}
} else {
this.active = 'info'
}
this.$refs.guava.edit()
if (this.$refs['form']) {
this.$refs['form'].resetFields()
}
this.formData = {
recordId: row.id,
username: "${@shiro.getPrincipalProperty('username')}",
auditTime: moment().format('YYYY-MM-DD'),
}
}else{
this.notifyWarning(resp.msg)
}
},
pageData() {
sublime.showLoadingbar();
this.tableLoading = true
this.pageForm.date = JSON.stringify(this.pageForm.dateRange)
$.post("/platform/member/change/audit/pageData", this.pageForm, (data) => {
sublime.closeLoadingbar();
this.tableLoading = false
if (data.code == 0) {
this.tableData = data.data.list;
this.pageForm.totalCount = data.data.totalCount;
} else {
this.$message.error(data.msg);
}
}, "json");
},
async flushUnits() {
debugger
this.$set(this.pageForm, "unitId", null)
this.$set(this.pageForm, "unionGroupId", null)
this.$set(this.pageForm, "threeUnitId", null)
this.units = []
this.unionGroups = []
this.threeUnits = []
if (this.pageForm.unionId) {
this.units = await getUnits(this.pageForm.unionId)
this.unionGroups = await unionGroupsByUnionId(this.pageForm.unionId)
}
}
},
async created() {
this.pageData();
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
this.unions = await getUnions(null, false)
} else {
this.unions = await getUnions(null, true)
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
this.flushUnits()
}
this.changeType = await member.getChangeType()
this.changeOrigin = await member.getChangeOrigin()
}
})
</script>
@@ -0,0 +1,12 @@
<!--#
layout("/layouts/platform.html"){
#-->
<script>
window.source = 2
</script>
<!--#include("/platform/member/change/audit/Layout.html"){}#-->
<!--#
}
#-->
@@ -0,0 +1,12 @@
<!--#
layout("/layouts/platform.html"){
#-->
<script>
window.source = 1
</script>
<!--#include("/platform/member/change/audit/Layout.html"){}#-->
<!--#
}
#-->
@@ -0,0 +1,19 @@
<script>
const getChangeType = async () => {
const changeType = {}
const changeTypeOptions = await getDictOptions("MemberChangeType")
changeTypeOptions.forEach(v => {
changeType[v.code] = v.name
})
return changeType
}
const getChangeOrigin = async () => {
const changeOrigin = {}
const changeOriginOptions = await getEnumOptions("MemberChangeOrigin")
changeOriginOptions.forEach(v => {
changeOrigin[v.code] = v.description
})
return changeOrigin
}
</script>