会员、福利

This commit is contained in:
Paidax
2024-12-25 11:09:17 +08:00
parent d78b9bbc8d
commit 0f6787c0cd
14 changed files with 277 additions and 58 deletions
@@ -61,7 +61,7 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
}
// 是会员的人员类型
private final List<String> MEMBER_PERSON_TYPE = List.of("事业编制(员额)", "事业编制", "校聘编外", "同工同酬", "学校编制", "博士后(统招)", "下属公司人员");
private final List<String> MEMBER_PERSON_TYPE = List.of("事业编制(员额)", "事业编制", "校聘编外", "同工同酬", "学校编制", "博士后(统招)");
@Inject
private AsyncService asyncService;
@@ -148,18 +148,27 @@ public class SourceUserServiceImpl extends ViServiceImpl<UserSource> implements
source.setWelfareMember(null);
Sys_user user = userMap.get(source.getLoginname().toLowerCase());
if (MEMBER_PERSON_TYPE.contains(source.getPersonType()) && "在职".equals(source.getUserState())) {
if (StrUtil.isNotBlank(source.getPersonType())
&& MEMBER_PERSON_TYPE.contains(source.getPersonType())
&& "在职".equals(source.getUserState())) {
source.setMember(1);
source.setWelfareMember(1);
if (Lang.isNotEmpty(user) && user.getMember() == 1) {
} else {
addMemberUserIds.add(Lang.isNotEmpty(user) ? user.getId() : source.getId());
// 符合条件的这类人员 人员性质设为会员
source.setPreparedBy("会员");
if (user != null && user.getMember() != 1) {
addMemberUserIds.add(user.getId());
}
if (user == null) {
addMemberUserIds.add(source.getId());
}
} else {
source.setMember(0);
source.setWelfareMember(0);
deleteMemberUserIds.add(Lang.isNotEmpty(user) ? user.getId() : source.getId());
// 不符合条件的这类人员 人员性质设为教职工
source.setPreparedBy("教职工");
if (user != null && user.getMember() == 1) {
deleteMemberUserIds.add(user.getId());
}
}
Sys_user u = new Sys_user();
@@ -109,6 +109,7 @@ public class MemberChangeManageController {
@Param(value = "sex", required = false) String sex,
@Param(value = "personType", required = false) String personType,
@Param(value = "userState", required = false) String userState,
@Param(value = "preparedBy", required = false) String preparedBy,
@Param(value = "changeDate", required = false) String changeDate,
@Param(value = "changeType", required = false) String changeType,
@Param(value = "changeTypes", required = false) Integer[] changeTypes,
@@ -169,6 +170,7 @@ public class MemberChangeManageController {
cnd.andEX("u.sex", "=", sex);
cnd.andEX("u.personType", "=", personType);
cnd.andEX("u.userState", "=", userState);
cnd.andEX("u.preparedBy", "=", preparedBy);
if (StrUtil.isNotBlank(changeDateBefore) && StrUtil.isNotBlank(changeDateEnd)) {
cnd.and(new Static(String.format("Date(his.changeTime) >= '%s' and Date(his.changeTime) <= '%s'", changeDateBefore, changeDateEnd)));
@@ -363,7 +365,7 @@ public class MemberChangeManageController {
@Param(value = "memberSearchKeyWord", required = false) String memberSearchKeyWord,
@Param(value = "isAppendWelfareMember", required = false) Boolean isAppendWelfareMember) {
int yyyy = Calendar.getInstance().get(Calendar.YEAR);
Cnd cnd = MemberUtils.getCnd(pageForm, startDate, endDate, unionId, unitId, personTypes, userStates, memberTypes, sexTypes, age, null, roleIds, null, null, memberStatus, threeUnitId, unionGroupId, reverseSelection, null, null, campus);
Cnd cnd = MemberUtils.getCnd(pageForm, startDate, endDate, unionId, unitId, personTypes, userStates, null, memberTypes, sexTypes, age, null, roleIds, null, null, memberStatus, threeUnitId, unionGroupId, reverseSelection, null, null, campus);
Sql sql = Sqls.create("""
SELECT u.* from $table
LEFT JOIN sys_user_role sur ON sur.userid = u.id
@@ -71,6 +71,7 @@ public class MemberCheckUnionController {
@Param(value = "isMember", required = false) Integer isMember,
@Param(value = "unionGroupId", required = false) String unionGroupId,
@Param(value = "threeUnitId", required = false) String threeUnitId,
@Param(value = "preparedBy", required = false) String preparedBy,
@Param(value = "userStates", required = false) String[] userStates,
@Param(value = "personTypes", required = false) String[] personTypes,
@Param(value = "changeTypes", required = false) Integer[] changeTypes,
@@ -85,6 +86,7 @@ public class MemberCheckUnionController {
u.birthday,
u.personType,
u.userState,
u.preparedBy,
u.unionname,
u.unitname,
u.threeUnitName,
@@ -124,6 +126,7 @@ public class MemberCheckUnionController {
cnd.andEX("u.unitid", "=", unitId);
cnd.andEX("u.unionGroupId", "=", unionGroupId);
cnd.andEX("u.threeUnitId", "=", threeUnitId);
cnd.andEX("u.preparedBy", "=", preparedBy);
cnd.and(Cnd.likeEX("u." + pageForm.getSearchName(), pageForm.getSearchKeyword()));
cnd.andEX("u.member", "=", isMember);
@@ -71,7 +71,8 @@ public class MemberDataManageController {
@Param(value = "startLoginNames", required = false) String startLoginNames,
@Param(value = "endLoginNames", required = false) String endLoginNames,
@Param(value = "personTypes", required = false) String[] personTypes,
@Param(value = "userStates", required = false) String[] userStates
@Param(value = "userStates", required = false) String[] userStates,
@Param(value = "preparedBys", required = false) String[] preparedBys
) {
Sql sql = Sqls.create("""
SELECT
@@ -83,6 +84,7 @@ public class MemberDataManageController {
welfareMember,
personType,
userState,
preparedBy,
unioncode,
unionname,
unionid,
@@ -123,6 +125,7 @@ public class MemberDataManageController {
cnd.andEX("campusName", "=", campus);
cnd.andEX("personType", "in", personTypes);
cnd.andEX("userState", "in", userStates);
cnd.andEX("preparedBy", "in", preparedBys);
if (StrUtil.isNotBlank(startLoginNames)) {
String[] loginNames = startLoginNames.split(",");
@@ -315,6 +318,7 @@ public class MemberDataManageController {
@Param(value = "endLoginNames", required = false) String endLoginNames,
@Param(value = "confirm", required = false) Boolean confirm,
@Param(value = "personTypes", required = false) String[] personTypes,
@Param(value = "preparedBys", required = false) String[] preparedBys,
@Param(value = "userStates", required = false) String[] userStates) {
@@ -343,6 +347,7 @@ public class MemberDataManageController {
cnd.andEX("campusName", "=", campus);
cnd.andEX("personType", "in", personTypes);
cnd.andEX("userState", "in", userStates);
cnd.andEX("preparedBy", "in", preparedBys);
if (StrUtil.isNotBlank(startLoginNames)) {
String[] loginNames = startLoginNames.split(",");
@@ -80,6 +80,7 @@ public class MemberInquireIntegrateController {
@Param(value = "unionGroupId", required = false) String[] unionGroupId,
@Param(value = "personTypes", required = false) String[] personTypes,
@Param(value = "userStates", required = false) String[] userStates,
@Param(value = "preparedBys", required = false) String[] preparedBys,
@Param(value = "memberStatus", required = false) String[] memberStatus,
@Param(value = "campus", required = false) String campus,
@Param(value = "memberType", required = false) String memberType,
@@ -92,7 +93,7 @@ public class MemberInquireIntegrateController {
@Param(value = "memberSearchKeyWord", required = false) String memberSearchKeyWord) {
int yyyy = Calendar.getInstance().get(Calendar.YEAR);
Cnd cnd = MemberUtils.getCnd(pageForm, startDate, endDate, unionId, unitId, personTypes, userStates, memberTypes, sexTypes, age, null, roleIds, null, null, memberStatus, threeUnitId, unionGroupId, reverseSelection, null, null, campus);
Cnd cnd = MemberUtils.getCnd(pageForm, startDate, endDate, unionId, unitId, personTypes, userStates, preparedBys, memberTypes, sexTypes, age, null, roleIds, null, null, memberStatus, threeUnitId, unionGroupId, reverseSelection, null, null, campus);
Sql sql = Sqls.create("""
SELECT u.* from $table
@@ -443,6 +444,7 @@ public class MemberInquireIntegrateController {
@Param(value = "unionGroupId", required = false) String[] unionGroupId,
@Param(value = "personTypes", required = false) String[] personTypes,
@Param(value = "userStates", required = false) String[] userStates,
@Param(value = "preparedBys", required = false) String[] preparedBys,
@Param(value = "memberStatus", required = false) String[] memberStatus,
@Param(value = "campus", required = false) String campus,
@Param(value = "memberType", required = false) String memberType,
@@ -457,7 +459,7 @@ public class MemberInquireIntegrateController {
try {
int yyyy = Calendar.getInstance().get(Calendar.YEAR);
Cnd cnd = MemberUtils.getCnd(null, startDate, endDate, unionId, unitId, personTypes, userStates, memberTypes, sexTypes, age, null, roleIds, null, null, memberStatus, threeUnitId, unionGroupId, reverseSelection, null, null, campus);
Cnd cnd = MemberUtils.getCnd(null, startDate, endDate, unionId, unitId, personTypes, userStates, preparedBys, memberTypes, sexTypes, age, null, roleIds, null, null, memberStatus, threeUnitId, unionGroupId, reverseSelection, null, null, campus);
Sql sql = Sqls.create("""
SELECT u.* from $table
@@ -67,6 +67,7 @@ public class MemberUtils {
String[] unitId,
String[] personTypes,
String[] userStates,
String[] preparedBys,
String[] memberTypes,
String[] sexTypes,
String[] age,
@@ -164,6 +165,7 @@ public class MemberUtils {
cnd.andEX("u.campus", EQ_OR_NEQ_OP, campus);
cnd.andEX("u.personType", IN_OR_NIN_OP, personTypes);
cnd.andEX("u.userState", IN_OR_NIN_OP, userStates);
cnd.andEX("u.preparedBy", IN_OR_NIN_OP, preparedBys);
cnd.andEX("u.sex", IN_OR_NIN_OP, sexTypes);
cnd.andEX("sur.jdhid", EQ_OR_NEQ_OP, teacherMeetingId);
cnd.andEX("sur.roleid", IN_OR_NIN_OP, roleIds);
@@ -89,4 +89,7 @@ public class WelfareProjectSubjectOption extends BaseModel {
@Comment("简短备注")
@ColDefine(type = ColType.VARCHAR,width = 100)
private String simpleDesc;
private Integer rank;
private Long selectCount;
}
@@ -7,6 +7,8 @@ import io.v.nutz.base.service.impl.ViServiceImpl;
import io.v.nutz.web.commons.utils.ShiroUtil;
import io.v.nutz.zhgh.welfare.model.WelfareProject;
import io.v.nutz.zhgh.welfare.model.WelfareProjectSubject;
import io.v.nutz.zhgh.welfare.model.WelfareProjectSubjectOption;
import io.v.nutz.zhgh.welfare.model.WelfareUserSelection;
import io.v.nutz.zhgh.welfare.service.WelfareProjectService;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
@@ -19,7 +21,10 @@ import org.nutz.lang.Strings;
import org.nutz.lang.util.NutMap;
import org.nutz.plugins.wkcache.annotation.CacheDefaults;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
@@ -64,6 +69,44 @@ public class WelfareProjectServiceImpl extends ViServiceImpl<WelfareProject> imp
MatchConditionStructure conditionStructure = fetchLinks(dao().fetch(MatchConditionStructure.class, project.getConditionStructureId()), "conditions");
project.setConditionStructure(conditionStructure);
}
//获取用户选择数据
List<WelfareUserSelection> userSelections = dao().query(WelfareUserSelection.class, Cnd.where("welfareId", "=", projectId));
//统计每项选了多少个
Map<String, Long> selectCountMap = userSelections.stream().collect(Collectors.groupingBy(WelfareUserSelection::getSelectOptionId, Collectors.counting()))
.entrySet().stream()
.sorted(Map.Entry.<String, Long>comparingByValue().reversed()) // 根据选择的数量降序排序
.collect(Collectors.toMap(
Map.Entry::getKey,
Map.Entry::getValue,
(e1, e2) -> e1, LinkedHashMap::new));// 保持排序;
//排名
LinkedHashMap<String, Integer> sortMap = new LinkedHashMap<>();
int rank = 1;
//记录上一个的数量,如果相同,则排名相同
Long previousValue = null;
for (Map.Entry<String, Long> entry : selectCountMap.entrySet()) {
if (previousValue != null && !Objects.equals(previousValue, entry.getValue())) {
rank++;
}
sortMap.put(entry.getKey(), rank);
previousValue = entry.getValue();
}
if (Lang.isNotEmpty(welfareProjectSubjects)) {
fetchLinks(welfareProjectSubjects, "options", Cnd.NEW().asc("optionSort"));
welfareProjectSubjects.forEach(o -> {
List<WelfareProjectSubjectOption> options = o.getOptions();
options.forEach(op -> {
op.setSelectCount(selectCountMap.getOrDefault(op.getId(), 0L));
op.setRank(sortMap.getOrDefault(op.getId(), 0));
});
});
}
if (Strings.isNotBlank(project.getConditionStructureId())) {
MatchConditionStructure conditionStructure = fetchLinks(dao().fetch(MatchConditionStructure.class, project.getConditionStructureId()), "conditions");
project.setConditionStructure(conditionStructure);
}
return project;
}
@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1724636815799" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7439" width="32" height="32" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M908.195 44.544L795.462 272.71c-96.35-91.788-258.188-101.795-258.188-101.795l75.45-149.085C616.354 9.076 626.362 0 640 0h246.365c15.453 0 28.16 12.707 28.16 28.16a26.159 26.159 0 0 1-6.33 16.384z m3.63 581.818c0 219.09-178.176 397.266-398.196 397.266S116.364 846.383 116.364 626.362c0-219.09 178.176-397.265 398.196-397.265s397.265 178.176 397.265 397.265zM700.044 535.46l-108.219-15.453-48.174-98.211c-16.384-33.606-42.729-32.722-59.113 0l-48.174 97.28-109.103 16.384c-37.236 5.446-44.544 29.975-18.153 56.32l78.197 76.381-18.2 108.218c-6.376 37.237 15.454 51.805 47.244 34.537l97.28-50.92 97.28 50.92c33.652 17.268 53.62 1.815 47.29-34.537L640 668.16l78.196-77.265c27.276-26.345 18.153-50.875-18.152-55.436zM115.433 44.544a25.367 25.367 0 0 1-5.446-16.384C109.987 12.707 122.74 0 138.193 0H384.56c13.637 0 23.645 9.076 27.275 21.83l75.404 149.085S324.56 180.922 229.097 272.71L115.433 44.544z" fill="#FFC000" p-id="7440"></path></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@@ -132,6 +132,18 @@ layout("/mobile/platform.html"){
border: 1pt solid #000000 !important;
}
.top-text {
font-size: 19px;
width: inherit;
margin-top: -5px;
position: absolute;
font-family: "";
top: 0;
right: 0;
transform: rotate(23deg);
z-index: 1;
}
</style>
<div id="app" v-cloak>
@@ -149,38 +161,46 @@ layout("/mobile/platform.html"){
<!--基本信息-->
<van-cell-group class="van-cell-group--inset">
<van-cell>
<div style="font-weight: bold;font-size: 15px;display: flex;align-items: center">
福利信息
<div style="font-weight: bold;font-size: 15px;display: flex;align-items: center;justify-content: space-between">
<div>
<span>福利信息</span>
</div>
<div @click="clickUpOrDown=!clickUpOrDown">
<span>{{clickUpOrDown ? '点击收起' : '点击展开'}}</span>
<van-icon :name="clickUpOrDown?'arrow-up':'arrow-down'"></van-icon>
</div>
</div>
</van-cell>
<van-cell :border="false" :value="projectInfo.name" title="福利名称"></van-cell>
<van-cell :border="false" :value="projectInfo.festival" title="发放节日"></van-cell>
<van-cell :border="false" :value="projectInfo.gift" title="福利礼品"
v-if="!projectInfo.flexible"></van-cell>
<!--<van-cell :border="false" :value="projectInfo.provideAddress"
title="发放地点"></van-cell>-->
<van-cell :border="false" title="选择形式">
{{projectInfo.isCheckBox==='checkBox'?'多选':'单选'}}
</van-cell>
<van-cell :border="false" :value="projectInfo.multiSelectNum" title="最多选几个"
v-if="projectInfo.isCheckBox==='checkBox'"></van-cell>
<van-cell :border="false" title="发放形式">
<template>
{{welfareProvideMode.find(v=>v.code==projectInfo.provideMode) &&
welfareProvideMode.find(v=>v.code==projectInfo.provideMode).description}}
</template>
</van-cell>
<van-cell :border="false" title="签收形式">
<template>
{{welfareSignMode.find(v=>v.code==projectInfo.signMode) &&
welfareSignMode.find(v=>v.code==projectInfo.signMode).description}}
</template>
</van-cell>
<van-cell :border="false" title="选择时间">
<template #label>
{{projectInfo.choiceTimeStart + ' 至 ' + projectInfo.choiceTimeEnd}}
</template>
</van-cell>
<template v-if="clickUpOrDown">
<van-cell :border="false" :value="projectInfo.name" title="福利名称"></van-cell>
<van-cell :border="false" :value="projectInfo.festival" title="发放节日"></van-cell>
<van-cell :border="false" :value="projectInfo.gift" title="福利礼品"
v-if="!projectInfo.flexible"></van-cell>
<!--<van-cell :border="false" :value="projectInfo.provideAddress"
title="发放地点"></van-cell>-->
<van-cell :border="false" title="选择形式">
{{projectInfo.isCheckBox==='checkBox'?'多选':'单选'}}
</van-cell>
<van-cell :border="false" :value="projectInfo.multiSelectNum" title="最多选几个"
v-if="projectInfo.isCheckBox==='checkBox'"></van-cell>
<van-cell :border="false" title="发放形式">
<template>
{{welfareProvideMode.find(v=>v.code==projectInfo.provideMode) &&
welfareProvideMode.find(v=>v.code==projectInfo.provideMode).description}}
</template>
</van-cell>
<van-cell :border="false" title="签收形式">
<template>
{{welfareSignMode.find(v=>v.code==projectInfo.signMode) &&
welfareSignMode.find(v=>v.code==projectInfo.signMode).description}}
</template>
</van-cell>
<van-cell :border="false" title="选择时间">
<template #label>
{{projectInfo.choiceTimeStart + ' 至 ' + projectInfo.choiceTimeEnd}}
</template>
</van-cell>
</template>
</van-cell-group>
<!--礼品套餐-->
@@ -197,12 +217,17 @@ layout("/mobile/platform.html"){
<div class="selection" style="background: #FFF"
v-for="(subject,sidx) in projectInfo.welfareProjectSubjects">
<div style="display: flex;width: 100%;padding: 10px 0"
<div style="display: flex;width: 100%;padding: 10px 0;flex-wrap: wrap"
v-for="(option, oidx) in subject.options">
<div style="width: 120px;height: 100px;display: flex;justify-content: center;align-items: center">
<van-image :src="FILE_STREAM_PREVIEW_ADDRESS+'?id='+option.imgUrl"
<div style="width: 120px;height: 100px;display: flex;justify-content: center;align-items: center;position:relative;">
<div v-if="[1,2,3].includes(option.rank)">
<div class="top-text" :style="'color:' + getRankColor(option.rank)">TOP{{option.rank}}</div>
</div>
<van-image src="https://s21.ax1x.com/2024/12/24/pAjYEGT.png"
asrc="FILE_STREAM_PREVIEW_ADDRESS+'?id='+option.imgUrl"
fit="contain"
style="width: 100px;height: 100px;border-radius: 10px"></van-image>
<span style="position: absolute; bottom: 0;left: 10px;right: 10px;height: 20px;background: rgb(0 0 0 / 50%);text-align:center;color: #FFF;">{{option.selectCount}}人已选</span>
<!-- @click="vant.ImagePreview([CREATE_PREVIEW_URL(option.imgUrl)])"-->
</div>
@@ -219,7 +244,7 @@ layout("/mobile/platform.html"){
备注:{{option.simpleDesc}}
</div>
<div style="position: absolute;right: 10px;bottom: 0;left: 0;display: flex;justify-content: space-between">
<div style="width: 70px;font-size: 13px;color: #918a8a;text-align: right"
<div style="width: 70px;font-size: 13px;color: #918a8a;text-align: right;"
@click="openViewDesc(option.description)">
套餐详情
</div>
@@ -388,7 +413,9 @@ layout("/mobile/platform.html"){
selectAddress: null,
userSelection: [],
descPopup: false,
signData: null
signData: null,
clickUpOrDown: false
}
},
computed: {
@@ -404,7 +431,7 @@ layout("/mobile/platform.html"){
}
return false
},
selectTime(){
selectTime() {
if (this.userSelection && this.userSelection.length > 0) {
return this.userSelection[0].selectTime
}
@@ -426,11 +453,11 @@ layout("/mobile/platform.html"){
} else {
//已选择了不能再动了
if (this.isSelect) {
if(moment(this.selectTime).valueOf() > moment(choiceTimeEnd).valueOf() && now < moment(overdueChoiceTimeEnd).valueOf()){
if (moment(this.selectTime).valueOf() > moment(choiceTimeEnd).valueOf() && now < moment(overdueChoiceTimeEnd).valueOf()) {
return {text: '确定修改', disabled: false}
}
return {text: '选择已结束', disabled: true}
}else{
} else {
if (now > moment(choiceTimeStart).valueOf() && now < moment(overdueChoiceTimeEnd).valueOf()) {
return {text: this.isSelect ? '确定修改' : '确定选择', disabled: false}
} else if (now > moment(overdueChoiceTimeEnd).valueOf()) {
@@ -451,6 +478,19 @@ layout("/mobile/platform.html"){
}
},
methods: {
// top字体颜色
getRankColor(rank) {
switch(rank) {
case 1:
return 'red';
case 2:
return 'yellow';
case 3:
return 'blue';
default:
return 'transparent';
}
},
//数量更改
numChange(value, option, optionIndex) {
const {
@@ -550,6 +590,7 @@ layout("/mobile/platform.html"){
this.$modal.msgError(msg)
}
this.confirmPopup = false
await this.getProjectInfo()
},
//查看详情
@@ -571,7 +612,7 @@ layout("/mobile/platform.html"){
//地址管理
openAddressManage() {
pjaxReplace('/mobile/welfare/mine/address?projectId='+this.projectId)
pjaxReplace('/mobile/welfare/mine/address?projectId=' + this.projectId)
window.sessionStorage.setItem('welfareProjectId', this.projectId)
},
@@ -70,7 +70,6 @@ layout("/layouts/platform.html"){
<div class="search-item-option">
<dict-select v-model="pageForm.userStates"
style="width: 100%"
multiple
clearable
placeholder="在职状态"
code="userState"></dict-select>
@@ -82,13 +81,23 @@ layout("/layouts/platform.html"){
<div class="search-item-option">
<dict-select v-model="pageForm.personTypes"
style="width: 100%"
multiple
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.preparedBy"
style="width: 100%"
clearable
placeholder="人员类型"
code="PREPARED_BY"></dict-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">变更类型:</div>
<div class="search-item-option">
@@ -592,8 +601,9 @@ layout("/layouts/platform.html"){
{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: 'personType', label: '人员类型', sortable: true},
{prop: 'preparedBy', label: '人员性质', sortable: true},
{prop: 'unionname', label: '所属工会', sortable: true},
{prop: 'unitname', label: '所属单位', sortable: true},
// {prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
@@ -108,6 +108,17 @@ layout("/layouts/platform.html"){
</div>
</div>
<div class="search-item">
<div class="search-item-label">人员类型:</div>
<div class="search-item-option">
<dict-select v-model="pageForm.preparedBy"
style="width: 100%"
clearable
placeholder="人员类型"
code="PREPARED_BY"></dict-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">变更类型:</div>
<div class="search-item-option">
@@ -338,8 +349,9 @@ layout("/layouts/platform.html"){
{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: 'personType', label: '人员类型', sortable: true},
{prop: 'preparedBy', label: '人员性质', sortable: true},
{prop: 'unionname', label: '所属工会', sortable: true},
{prop: 'unitname', label: '所属单位', sortable: true},
// {prop: 'threeUnitName', label: '所在科室', sortable: true},
@@ -126,6 +126,16 @@ layout("/layouts/platform.html"){
</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">
@@ -210,6 +220,30 @@ layout("/layouts/platform.html"){
</div>
</div>
<div class="search-item" style="width: calc(100% - 160px)">
<div class="search-item-label">人员性质:</div>
<div class="search-item-option">
<el-tag
style="margin-right: 10px;margin-bottom: 10px;cursor: pointer"
v-for="item in preparedByOptions"
:key="item.code"
:type="item.name"
:effect="pageForm.preparedBys.includes(item.name)?'dark':'plain'"
@click="tagClick('preparedBys',item.name)">
{{ item.name }}
</el-tag>
<el-link type="danger"
v-if="preparedByOptions.length&&pageForm.preparedBys.length"
:underline="false"
@click="pageForm.preparedBys=[];doSearch()">清空
</el-link>
<el-link :underline="false"
@click="pageForm.preparedBys=preparedByOptions.map(p=>p.code);doSearch()"
type="success">全部
</el-link>
</div>
</div>
<div class="search-query" style="position:absolute;right: 0;bottom: 0">
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
</el-button>
@@ -323,6 +357,7 @@ layout("/layouts/platform.html"){
pageForm: {
userStates: [],
personTypes: [],
preparedBys: [],
},
userId: "",
@@ -333,8 +368,9 @@ layout("/layouts/platform.html"){
{prop: 'loginname', label: '工号'},
{prop: 'username', label: '姓名'},
{prop: 'sex', label: '性别'},
{prop: 'personType', label: '人员类型', sortable: true},
{prop: 'userState', label: '在职状态', sortable: true},
{prop: 'personType', label: '人员类型', sortable: true},
{prop: 'preparedBy', label: '人员性质', sortable: true},
{prop: 'unionname', label: '所属工会', sortable: true},
{prop: 'unitname', label: '所属单位', sortable: true},
{prop: 'threeUnitName', label: '所在科室', sortable: true, checked: 0},
@@ -348,6 +384,7 @@ layout("/layouts/platform.html"){
setMemberDialogVisible: false,
personTypeOptions: [],
userStateOptions: [],
preparedByOptions: [],
isThreeUnit: false
}
},
@@ -362,6 +399,7 @@ layout("/layouts/platform.html"){
const pageForm = clone(this.pageForm)
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
pageForm.userStates = JSON.stringify(pageForm.userStates)
pageForm.preparedBys = JSON.stringify(pageForm.preparedBys)
const {data, code, msg} = await $.post(loc() + '/pageData', pageForm)
this.tableLoading = false
sublime.closeLoadingbar()
@@ -424,6 +462,7 @@ layout("/layouts/platform.html"){
const pageForm = clone(this.pageForm)
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
pageForm.userStates = JSON.stringify(pageForm.userStates)
pageForm.preparedBys = JSON.stringify(pageForm.preparedBys)
pageForm.confirm = confirm
const resp = await $.post(loc() + "/setMemberByCnd", pageForm)
if (resp.code === 0) {
@@ -498,6 +537,7 @@ layout("/layouts/platform.html"){
this.pageData();
this.personTypeOptions = await getDictOptions("UserType")
this.userStateOptions = await getDictOptions("UserState")
this.preparedByOptions = await getDictOptions("PREPARED_BY")
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('SchoolUnionMemberAdmin')||@shiro.hasRole('H03')}" === 'true') {
this.unions = await getUnions(null, false)
} else {
@@ -261,6 +261,31 @@ layout("/layouts/platform.html"){
</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 preparedByOptions"
:key="item.code"
:type="item.name"
:effect="pageForm.preparedBys.includes(item.name)?'dark':'plain'"
@click="tagClick('preparedBys',item.name)">
{{ item.name }}
</el-tag>
<el-link type="danger"
v-if="preparedByOptions.length&&pageForm.preparedBys.length"
:underline="false"
@click="pageForm.preparedBys=[];doSearch()">清空
</el-link>
<el-link :underline="false"
@click="pageForm.preparedBys=preparedByOptions.map(p=>p.code);doSearch()"
type="success">全部
</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">
@@ -539,6 +564,7 @@ layout("/layouts/platform.html"){
searchName: "username",
personTypes: [],
userStates: [],
preparedBys: [],
memberStatus: [],
year: moment().format('YYYY'),
roleIds: [],
@@ -556,6 +582,7 @@ layout("/layouts/platform.html"){
personTypeOptions: [],
userStateOptions: [],
preparedByOptions: [],
memberStatusOptions: [],
userId: "",
@@ -575,8 +602,9 @@ layout("/layouts/platform.html"){
{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: 'personType', label: '人员类型', sortable: true},
{prop: 'preparedBy', label: '人员性质', sortable: true},
{prop: 'unionname', label: '所属工会', sortable: true},
{prop: 'unitname', label: '所属单位', sortable: true},
{prop: 'threeUnitName', label: '所在科室', sortable: true},
@@ -621,6 +649,7 @@ layout("/layouts/platform.html"){
pageForm.threeUnitId = JSON.stringify(pageForm.threeUnitId)
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
pageForm.userStates = JSON.stringify(pageForm.userStates)
pageForm.preparedBys = JSON.stringify(pageForm.preparedBys)
pageForm.memberStatus = JSON.stringify(pageForm.memberStatus)
pageForm.memberTypes = JSON.stringify(pageForm.memberTypes)
@@ -642,14 +671,19 @@ layout("/layouts/platform.html"){
const memberStatus = JSON.stringify(this.pageForm.memberStatus)
const personTypes = JSON.stringify(this.pageForm.personTypes)
const userStates = JSON.stringify(this.pageForm.userStates)
const preparedBys = JSON.stringify(this.pageForm.preparedBys)
window.location.href = loc() + "/doExport?unionId=" + this.pageForm.unionId + "&unitId=" + this.pageForm.unitId
+ "&year=" + this.pageForm.year
+ "&memberStatus=" + memberStatus + "&personTypes=" + personTypes + "&userStates=" + userStates
+ "&memberStatus=" + memberStatus
+ "&personTypes=" + personTypes
+ "&userStates=" + userStates
+ "&preparedBys=" + preparedBys
},
doExportByUnion() {
const memberStatus = JSON.stringify(this.pageForm.memberStatus)
const personTypes = JSON.stringify(this.pageForm.personTypes)
const userStates = JSON.stringify(this.pageForm.userStates)
const preparedBys = JSON.stringify(this.pageForm.preparedBys)
const unionId = JSON.stringify(this.pageForm.unionId)
const unitId = JSON.stringify(this.pageForm.unitId)
const unionGroupId = JSON.stringify(this.pageForm.unionGroupId)
@@ -680,7 +714,7 @@ layout("/layouts/platform.html"){
+ "&startDate=" + (startDate ? this.getDate(startDate) : '') + "&endDate=" + (endDate ? this.getDate(endDate) : '') + "&campus=" + (campus ? campus : '')
+ "&reverseSelection=" + (reverseSelection ? reverseSelection : '') + "&memberSearchName=" + (memberSearchName ? memberSearchName : '')
+ "&memberSearchKeyWord=" + (memberSearchKeyWord ? memberSearchKeyWord : '') + "&personTypes=" + personTypes
+ "&userStates=" + userStates + "&props=" + JSON.stringify(props)
+ "&userStates=" + userStates + "&preparedBys=" + preparedBys + "&props=" + JSON.stringify(props)
},
getDate(date) {
let year = date.getFullYear();
@@ -699,6 +733,15 @@ layout("/layouts/platform.html"){
}
this.doSearch()
},
checkPreparedByType(state) {
let idx = this.pageForm.preparedBys.indexOf(state)
if (idx != -1) {
this.pageForm.preparedBys.splice(idx, 1)
} else {
this.pageForm.preparedBys.push(state)
}
this.doSearch()
},
checkMemberStatusType(state) {
let idx = this.pageForm.memberStatus.indexOf(state)
if (idx !== -1) {
@@ -757,6 +800,7 @@ layout("/layouts/platform.html"){
pageForm.threeUnitId = JSON.stringify(pageForm.threeUnitId)
pageForm.personTypes = JSON.stringify(pageForm.personTypes)
pageForm.userStates = JSON.stringify(pageForm.userStates)
pageForm.preparedBys = JSON.stringify(pageForm.preparedBys)
pageForm.memberStatus = JSON.stringify(pageForm.memberStatus)
pageForm.memberTypes = JSON.stringify(pageForm.memberTypes)
@@ -804,6 +848,7 @@ layout("/layouts/platform.html"){
this.pageForm.sexTypes = []
this.pageForm.personTypes = []
this.pageForm.userStates = []
this.pageForm.preparedBys = []
this.pageForm.unionId = []
this.pageForm.unitId = []
this.pageForm.activityGroupId = []
@@ -858,6 +903,7 @@ layout("/layouts/platform.html"){
}
this.personTypeOptions = await getDictOptions("UserType")
this.userStateOptions = await getDictOptions("UserState")
this.preparedByOptions = await getDictOptions("PREPARED_BY")
this.memberStatusOptions = await getDictOptions("memberStatusText")
await this.getMenuOptions();
await this.getRolesAndUnion()