Files
UNION_HUTB/target/classes/views/platform/member/inquire/Integrate.html
T
2026-09-09 09:14:28 +08:00

522 lines
24 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>
.query-row {
height: 70px;
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
}
.query-row:not(:last-child) {
border-bottom: 1px dashed rgb(230, 230, 230);
}
/*.query-row:not(:last-child,:first-child) {*/
/* height: 70px;*/
/*}*/
.query-row-title {
width: 120px;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<el-row type="flex" align="middle" class="query-row">
<el-col class="query-row-title">&emsp;&emsp;度:</el-col>
<el-col class="query-row-content">
<el-row>
<el-col :span="8">
<el-date-picker @change="doSearch()"
style="width: 200px"
:picker-options="pickerOptions"
v-model="pageForm.year"
type="year"
value-format="yyyy"
placeholder="选择年" :clearable="false">
</el-date-picker>
<el-link type="primary" style="margin-left: 10px"
:underline="false"
@click="pageForm.year=moment().format('YYYY');doSearch()">
本年
</el-link>
</el-col>
<el-col :span="16">
<el-input placeholder="请输入内容" clearable
v-model="pageForm.searchKeyword"
style="width: 600px"
@keyup.enter.native="doSearch">
<el-select v-model="pageForm.searchName" slot="prepend"
placeholder="查询类型"
style="width: 80px;">
<el-option label="姓名" value="username"></el-option>
<el-option label="工号" value="loginname"></el-option>
</el-select>
<el-button slot="append" @click="doSearch">搜索</el-button>
</el-input>
</el-col>
</el-row>
</el-col>
</el-row>
<el-row type="flex" justify="center">
</el-row>
</el-card>
<el-card shadow="never" style="margin-top: 10px">
<el-row type="flex" align="middle" class="query-row">
<el-col class="query-row-title">所属工会:</el-col>
<el-col class="query-row-content">
<el-row>
<el-col :span="6">
<el-select placeholder="所属工会" v-model="pageForm.unionId"
clearable="true"
@change="flushUnits();doSearch()"
@clear="flushUnits();doSearch()"
filterable="true">
<el-option v-for="item in unions" :label="item.unionname"
:value="item.id"></el-option>
</el-select>
</el-col>
<el-col :span="6">
<span>所属单位:</span>
<el-select placeholder="所属单位" v-model="pageForm.unitId"
@change="getThreeUnits"
clearable
filterable>
<el-option v-for="item in units" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-col>
<el-col :span="6">
<span>工会小组:</span>
<el-select v-model="pageForm.unionGroupId"
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>
</el-col>
<el-col :span="6">
<span>组成科室:</span>
<el-select v-model="pageForm.threeUnitId" filterable
clearable
placeholder="请选择">
<el-option
v-for="item in threeUnits"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-col>
</el-row>
</el-col>
</el-row>
<el-row type="flex" align="middle" class="query-row">
<el-col class="query-row-title">会员状态:</el-col>
<el-col class="query-row-content">
<el-tag
style="margin-right: 10px;cursor: pointer"
v-for="item in memberStatusOptions"
:key="item.code"
:type="item.name"
:effect="pageForm.memberStatus.includes(item.code)?'dark':'plain'"
@click="checkMemberStatusType(item.code)">
{{ item.name }}
</el-tag>
<el-link type="danger"
v-if="memberStatusOptions.length&&pageForm.memberStatus.length"
:underline="false"
@click="pageForm.memberStatus=[];doSearch()">清空
</el-link>
</el-col>
</el-row>
<el-row type="flex" align="middle" class="query-row">
<el-col class="query-row-title">人员类型:</el-col>
<el-col class="query-row-content">
<el-tag
style="margin-right: 10px;cursor: pointer"
v-for="item in personTypeOptions"
:key="item.code"
:type="item.name"
:effect="pageForm.personTypes.includes(item.name)?'dark':'plain'"
@click="checkPersonType(item.name)">
{{ item.name }}
</el-tag>
<el-link type="danger"
v-if="personTypeOptions.length&&pageForm.personTypes.length"
:underline="false"
@click="pageForm.personTypes=[];doSearch()">清空
</el-link>
</el-col>
</el-row>
<el-row type="flex" align="middle" class="query-row">
<el-col class="query-row-title">在职状态:</el-col>
<el-col class="query-row-content">
<el-tag
style="margin-right: 10px;cursor: pointer"
v-for="item in userStateOptions"
:key="item.code"
:type="item.name"
:effect="pageForm.userStates.includes(item.name)?'dark':'plain'"
@click="checkUserStateType(item.name)">
{{ item.name }}
</el-tag>
<el-link type="danger"
v-if="userStateOptions.length&&pageForm.userStates.length"
:underline="false"
@click="pageForm.userStates=[];doSearch()">清空
</el-link>
</el-col>
</el-row>
<el-row type="flex" align="middle" class="query-row">
<el-col class="query-row-title">模糊查询:</el-col>
<el-col class="query-row-content">
<member-cnd @cnd="(v)=>pageForm={...pageForm,...v}"></member-cnd>
</el-col>
</el-row>
</el-card>
<el-card shadow="never" style="margin-top: 10px">
<table-tool :label="pageForm.year==moment().format('YYYY')?'本年会员':'历史会员'"
:app="this">
<template #func>
<el-button slot="reference"
@click="allIsWelfareMember"
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
type="primary" :loading="welfareMemberLoading" size="medium">
全部设置为福利会员
</el-button>
<!-- <el-popconfirm-->
<!-- v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"-->
<!-- title="确定要将所有会员设为福利会员吗?"-->
<!-- @confirm="allIsWelfareMember"-->
<!-- >-->
<!-- </el-popconfirm>-->
<!-- <el-button v-if="${@shiro.hasRole('sysadmin')}" icon="el-icon-printer" class="m10"-->
<!-- type="primary"-->
<!-- style="float: right"-->
<!-- size="medium" @click="doExport">导出全部字段内容-->
<!-- </el-button>-->
<el-button icon="el-icon-printer" class="m10" type="primary"
style="float: right"
size="medium" @click="doExportByUnion">导出
</el-button>
</template>
</table-tool>
<el-table :data="tableData" style="width: 100%" stripe border
:header-cell-style="{background:'#FAFAFA'}" row-key="id"
@sort-change="pageOrder"
v-loading="tableLoading">
<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==='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>
<template v-else-if="column.prop==='memberJoinTime'" scope="{row}">
{{moment(row.memberJoinTime).format('YYYY-MM-DD')}}
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" width="100px">
<template scope="{row:{id}}">
<el-button size="small" @click="openView(id)">查看</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</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="change">
<mem-change-records :userid="userId"></mem-change-records>
</el-tab-pane>
</el-tabs>
</template>
</guava>
<el-dialog
:title="welfareTitle"
:visible.sync="addWelfareDialogVisible"
width="30%">
<el-form>
<el-form-item label="添加模式">
<el-radio-group v-model="isAppendWelfareMember">
<el-radio-button :label="true">数据追加</el-radio-button>
<el-radio-button :label="false">清空更新</el-radio-button>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="addWelfareDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="addWelfare">确 定</el-button>
</div>
</el-dialog>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
isAppendWelfareMember: true,
welfareTitle: '',
memberCnd: null,
addWelfareDialogVisible: false,
active: 'info',
submitLoading: false,
pageForm: {
unionId: "",
unitId: "",
searchName: "username",
personTypes: [],
userStates: [],
memberStatus: [],
year: moment().format('YYYY')
},
personTypeOptions: [],
userStateOptions: [],
memberStatusOptions: [],
unionGroups:[],
threeUnits:[],
userId: "",
unions: [],
units: [],
pickerOptions: {
disabledDate: time => {
return time.getTime() > Date.now();
}
},
tableColumns: [
{prop: 'loginname', label: '工号'},
{prop: 'username', label: '姓名'},
{prop: 'sex', label: '性别'},
{prop: 'birthday', label: '出生年月', sortable: true},
{prop: 'mobile', label: '联系电话'},
{prop: 'idcard', label: '身份证号', width: 170},
{prop: 'position', label: '职务', sortable: true, checked: 0},
{prop: 'jobTitle', label: '职称', sortable: true, checked: 0},
{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, checked: 0},
{prop: 'marriage', label: '婚否', checked: 0},
{prop: 'education', label: '学历', checked: 0},
{prop: 'hometown', label: '籍贯', checked: 0},
{prop: 'nation', label: '民族', checked: 0},
{prop: 'political', label: '政治面貌', checked: 0},
{prop: 'memberJoinTime', label: '入会时间', checked: 0},
{prop: 'memberNumber', label: '会员号', checked: 0},
],
welfareMemberLoading: 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.1'),
'mem-change-records': httpVueLoader('/components/member/MemChangeRecords.vue?v=1.0.2'),
'member-cnd': httpVueLoader('/components/member/MemberCnd.vue'),
},
methods: {
async allIsWelfareMember() {
if (this.pageForm.personTypes.length === 0) {
this.$message.warning('请选择要设为福利会员的人员类型!')
return
}
const tips = this.pageForm.personTypes.join(",")
this.welfareTitle = "提醒:您将【" + tips + "】会员设置为福利会员"
this.addWelfareDialogVisible = true
},
addWelfare() {
const tips = this.pageForm.personTypes.join(",")
this.$confirm('请确认是否将' + tips + "设为福利会员?", '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const resp = await $.post("/platform/member/change/mange/allIsWelfareMember", {
personTypes: this.pageForm.personTypes,
isAppendWelfareMember: this.isAppendWelfareMember
})
}).catch(() => {
});
},
doExport() {
const memberStatus = JSON.stringify(this.pageForm.memberStatus)
const personTypes = JSON.stringify(this.pageForm.personTypes)
const userStates = JSON.stringify(this.pageForm.userStates)
window.location.href = loc() + "/doExport?unionId=" + this.pageForm.unionId + "&unitId=" + this.pageForm.unitId
+ "&year=" + this.pageForm.year
+ "&memberStatus=" + memberStatus + "&personTypes=" + personTypes + "&userStates=" + userStates
},
doExportByUnion() {
const memberStatus = JSON.stringify(this.pageForm.memberStatus)
const personTypes = JSON.stringify(this.pageForm.personTypes)
const userStates = JSON.stringify(this.pageForm.userStates)
let props = {}
this.tableColumns.forEach(v => {
props[v.prop] = v.label
})
window.location.href = loc() + "/doExportByUnion?=unitId=" + this.pageForm.unitId
+ "&unionId=" + this.pageForm.unionId
+ "&year=" + this.pageForm.year
+ "&memberStatus=" + memberStatus + "&personTypes=" + personTypes + "&userStates=" + userStates
+ "&props=" + JSON.stringify(props)
},
checkUserStateType(state) {
let idx = this.pageForm.userStates.indexOf(state)
if (idx != -1) {
this.pageForm.userStates.splice(idx, 1)
} else {
this.pageForm.userStates.push(state)
}
this.doSearch()
},
checkMemberStatusType(state) {
let idx = this.pageForm.memberStatus.indexOf(state)
if (idx !== -1) {
this.pageForm.memberStatus.splice(idx, 1)
} else {
this.pageForm.memberStatus.push(state)
}
this.doSearch()
},
checkPersonType(type) {
let idx = this.pageForm.personTypes.indexOf(type)
if (idx != -1) {
this.pageForm.personTypes.splice(idx, 1)
} else {
this.pageForm.personTypes.push(type)
}
this.doSearch()
},
openView(userId) {
this.active = 'info'
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)
},
pageData() {
sublime.showLoadingbar();
this.tableLoading = true
const pageForm = clone(this.pageForm)
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
pageForm.userStates = JSON.stringify(pageForm.userStates)
pageForm.memberStatus = JSON.stringify(pageForm.memberStatus)
$.post(loc() + "/pageData", 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 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.personTypeOptions = await getDictOptions("UserType")
this.userStateOptions = await getDictOptions("UserState")
this.memberStatusOptions = await getDictOptions("memberStatusText")
}
})
</script>
<!--#
}
#-->