fix:1、登录密码校验注释;2、工会报销-我的报销查询数据范围修复;3、工会报销数据接口权限范围和菜单权限范围保持一致;4、工会管理表格高度固定内部滚动
This commit is contained in:
@@ -360,9 +360,9 @@ public class SysUserServiceImpl extends BaseServiceImpl<Sys_user> implements Sys
|
|||||||
String decodePwd = Base64Decoder.decodeStr(passowrd);
|
String decodePwd = Base64Decoder.decodeStr(passowrd);
|
||||||
String hashedPassword = PwdUtil.getPassword(decodePwd, user.getSalt());
|
String hashedPassword = PwdUtil.getPassword(decodePwd, user.getSalt());
|
||||||
if (!Strings.sNull(hashedPassword).equalsIgnoreCase(user.getPassword())) {
|
if (!Strings.sNull(hashedPassword).equalsIgnoreCase(user.getPassword())) {
|
||||||
if (Globals.sso) {
|
// if (Globals.sso) {
|
||||||
throw new BaseException("用户名或者密码不正确");
|
// throw new BaseException("用户名或者密码不正确");
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
user = this.fetchLinks(user, "unit");
|
user = this.fetchLinks(user, "unit");
|
||||||
if (Lang.isNotEmpty(user.getUnit()) && StrUtil.isNotBlank(user.getUnit().getUnionId())) {
|
if (Lang.isNotEmpty(user.getUnit()) && StrUtil.isNotBlank(user.getUnit().getUnionId())) {
|
||||||
|
|||||||
+1
-1
@@ -127,7 +127,7 @@ public class UnionReimburseMineController {
|
|||||||
cnd.and(seg);
|
cnd.and(seg);
|
||||||
}
|
}
|
||||||
applyListSort(cnd, pageForm);
|
applyListSort(cnd, pageForm);
|
||||||
// cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
Pagination<NutMap> pagination = unionReimburseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
Pagination<NutMap> pagination = unionReimburseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||||
return Result.success(pagination);
|
return Result.success(pagination);
|
||||||
|
|||||||
+1
-23
@@ -502,13 +502,10 @@ public class UnionReimburseServiceImpl extends BaseServiceImpl<UnionReimburse> i
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 按经费来源统一查询当前可用余额,未分配或权限不匹配时直接拦截。
|
* 按经费来源统一查询当前可用余额,经费来源权限由前端按钮控制。
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Result getBudgetBalance(String reimburseFundSource, String clubId, String unionId) {
|
public Result getBudgetBalance(String reimburseFundSource, String clubId, String unionId) {
|
||||||
if (!canApplyFundSource(reimburseFundSource)) {
|
|
||||||
return Result.error("当前角色无权使用该经费来源");
|
|
||||||
}
|
|
||||||
if ("UNION_REIMBURSE_FUND_SOURCE_3".equals(reimburseFundSource)
|
if ("UNION_REIMBURSE_FUND_SOURCE_3".equals(reimburseFundSource)
|
||||||
&& listReimburseClubs().stream().noneMatch(club -> Objects.equals(clubId, club.getString("id")))) {
|
&& listReimburseClubs().stream().noneMatch(club -> Objects.equals(clubId, club.getString("id")))) {
|
||||||
return Result.error("请选择有效的社团");
|
return Result.error("请选择有效的社团");
|
||||||
@@ -1321,26 +1318,7 @@ public class UnionReimburseServiceImpl extends BaseServiceImpl<UnionReimburse> i
|
|||||||
return listMap(sql);
|
return listMap(sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 社团经费按菜单权限授权,其他经费保留原申请角色判断。
|
|
||||||
private boolean canApplyFundSource(String source) {
|
|
||||||
if (StrUtil.isBlank(source)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
boolean branchRole = AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_CHAIRMAN.name(), RoleConstant.BRANCH_UNION_ADMIN.name());
|
|
||||||
boolean clubRole = AuthUtil.hasRoleOr(RoleConstant.CLUB_MANAGER.name(), RoleConstant.CLUB_PRESIDENT.name());
|
|
||||||
return switch (source) {
|
|
||||||
case "UNION_REIMBURSE_FUND_SOURCE_1" -> isAdmin()
|
|
||||||
|| (!branchRole && !clubRole && AuthUtil.hasRoleOr(RoleConstant.SCHOOL_OUTLAY_ADMIN.name()));
|
|
||||||
case "UNION_REIMBURSE_FUND_SOURCE_2" -> isAdmin() || branchRole;
|
|
||||||
case "UNION_REIMBURSE_FUND_SOURCE_3" -> AuthUtil.hasPermission("unionReimburse.club");
|
|
||||||
default -> false;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private Result validateApplicantFundSource(UnionReimburse form) {
|
private Result validateApplicantFundSource(UnionReimburse form) {
|
||||||
if (!canApplyFundSource(form.getReimburseFundSource())) {
|
|
||||||
return Result.error("当前角色无权使用该经费来源");
|
|
||||||
}
|
|
||||||
if ("UNION_REIMBURSE_FUND_SOURCE_3".equals(form.getReimburseFundSource())) {
|
if ("UNION_REIMBURSE_FUND_SOURCE_3".equals(form.getReimburseFundSource())) {
|
||||||
if (!"UNION_REIMBURSE_PROJECT_5".equals(form.getReimburseProject())) {
|
if (!"UNION_REIMBURSE_PROJECT_5".equals(form.getReimburseProject())) {
|
||||||
return Result.error("社团经费请选择社团活动");
|
return Result.error("社团经费请选择社团活动");
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
const branchUnionManage = {
|
const branchUnionManage = {
|
||||||
template: `
|
template: `
|
||||||
<div>
|
<div class="branch-union-list">
|
||||||
<el-card shadow="never" style="border: 1px solid var(--border-color-lighter); margin-top: 10px">
|
<el-card class="branch-union-search-card" shadow="never" style="border: 1px solid var(--border-color-lighter); margin-top: 10px">
|
||||||
<el-row :gutter="10" type="flex">
|
<el-row :gutter="10" type="flex">
|
||||||
<el-input placeholder="请输入分工会名称" clearable size="small" style="width: 300px" v-model="pageForm.searchKeyword"></el-input>
|
<el-input placeholder="请输入分工会名称" clearable size="small" style="width: 300px" v-model="pageForm.searchKeyword"></el-input>
|
||||||
|
|
||||||
@@ -10,8 +10,9 @@ const branchUnionManage = {
|
|||||||
<el-button @click="openAdd" icon="ti-plus" type="primary" size="small" v-if="$auth.hasPermission('sys.manager.union.add')">新建分工会</el-button>
|
<el-button @click="openAdd" icon="ti-plus" type="primary" size="small" v-if="$auth.hasPermission('sys.manager.union.add')">新建分工会</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card shadow="never" style="border: 1px solid var(--border-color-lighter); margin-top: 10px">
|
<el-card class="branch-union-table-card" shadow="never" style="border: 1px solid var(--border-color-lighter); margin-top: 10px">
|
||||||
<el-table :data="tableData" border>
|
<div class="branch-union-table-wrapper">
|
||||||
|
<el-table :data="tableData" border height="100%">
|
||||||
<el-table-column label="序号" type="index" width="50" :index="indexMethod"></el-table-column>
|
<el-table-column label="序号" type="index" width="50" :index="indexMethod"></el-table-column>
|
||||||
<el-table-column prop="name" label="工会名称" show-overflow-tooltip></el-table-column>
|
<el-table-column prop="name" label="工会名称" show-overflow-tooltip></el-table-column>
|
||||||
<el-table-column prop="unionCode" label="工会编码"></el-table-column>
|
<el-table-column prop="unionCode" label="工会编码"></el-table-column>
|
||||||
@@ -25,6 +26,7 @@ const branchUnionManage = {
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
</div>
|
||||||
<el-row class="el-pagination-container mt20">
|
<el-row class="el-pagination-container mt20">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="pageSizeChange"
|
@size-change="pageSizeChange"
|
||||||
|
|||||||
@@ -2,10 +2,59 @@
|
|||||||
layout("/layouts/platform.html"){
|
layout("/layouts/platform.html"){
|
||||||
#-->
|
#-->
|
||||||
|
|
||||||
|
<style>
|
||||||
|
/* 分工会列表占满可用高度,分页固定在底部,数据在表格内滚动。 */
|
||||||
|
.union-branch-list-panel,
|
||||||
|
.union-branch-list-panel > .el-card__body,
|
||||||
|
.union-branch-list-panel .el-tabs,
|
||||||
|
.union-branch-list-panel .el-tabs__content,
|
||||||
|
.union-branch-list-panel .el-tab-pane {
|
||||||
|
height: 100%;
|
||||||
|
min-height: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.union-branch-list-panel .el-tabs {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.union-branch-list-panel .el-tabs__header {
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.union-branch-list-panel .el-tabs__content {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
.union-branch-list-panel .branch-union-list {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
.union-branch-list-panel .branch-union-search-card {
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.union-branch-list-panel .branch-union-table-card {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
.union-branch-list-panel .branch-union-table-card > .el-card__body {
|
||||||
|
height: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.union-branch-list-panel .branch-union-table-wrapper {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
.union-branch-list-panel .el-pagination-container {
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
<guava ref="guava">
|
<guava ref="guava">
|
||||||
<template>
|
<template>
|
||||||
<el-row type="flex" :gutter="20" style="height: calc(100vh - 126px)">
|
<el-row type="flex" :gutter="20" style="height: calc(100vh - 94px)">
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-card shadow="never" style="height: 100%" body-style="{ height: '100%' }">
|
<el-card shadow="never" style="height: 100%" body-style="{ height: '100%' }">
|
||||||
<el-input placeholder="输入关键字进行查找" v-model="filterText" clearable></el-input>
|
<el-input placeholder="输入关键字进行查找" v-model="filterText" clearable></el-input>
|
||||||
@@ -35,7 +84,7 @@ layout("/layouts/platform.html"){
|
|||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="19">
|
<el-col :span="19">
|
||||||
<el-card shadow="never">
|
<el-card shadow="never" :class="{'union-branch-list-panel': (!currentTreeNode || currentTreeNode.level===1) && schoolUnionTabActive==='branchUnionManage'}">
|
||||||
<el-tabs v-model="schoolUnionTabActive" type="card" v-if="currentTreeNode==null || currentTreeNode.level===1">
|
<el-tabs v-model="schoolUnionTabActive" type="card" v-if="currentTreeNode==null || currentTreeNode.level===1">
|
||||||
<el-tab-pane name="branchUnionManage">
|
<el-tab-pane name="branchUnionManage">
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
|
|||||||
+7
-6
@@ -1984,12 +1984,12 @@ layout("/layouts/platform.html"){
|
|||||||
const project = this.descOptions.find(item => item.reimburseProject === projectCode);
|
const project = this.descOptions.find(item => item.reimburseProject === projectCode);
|
||||||
return project ? project.projectTip : '';
|
return project ? project.projectTip : '';
|
||||||
},
|
},
|
||||||
// 默认来源与角色允许的按钮一致,社团负责人默认进入社团活动申请。
|
// 默认来源按按钮菜单权限选择,保持分工会、协会、校工会的优先顺序。
|
||||||
getDefaultFundSource() {
|
getDefaultFundSource() {
|
||||||
const option = this.budgetTypeOption.find(item => item.code === "UNION_REIMBURSE_FUND_SOURCE_2")
|
if (this.$auth.hasPermission("unionReimburse.fgh")) return "UNION_REIMBURSE_FUND_SOURCE_2"
|
||||||
|| this.budgetTypeOption.find(item => item.code === "UNION_REIMBURSE_FUND_SOURCE_3")
|
if (this.$auth.hasPermission("unionReimburse.club")) return "UNION_REIMBURSE_FUND_SOURCE_3"
|
||||||
|| (this.$auth.hasPermission("unionReimburse.xgh") && this.budgetTypeOption[0])
|
if (this.$auth.hasPermission("unionReimburse.xgh")) return "UNION_REIMBURSE_FUND_SOURCE_1"
|
||||||
return option ? option.code : ""
|
return ""
|
||||||
},
|
},
|
||||||
selectFundSource(code) {
|
selectFundSource(code) {
|
||||||
this.$set(this.formData, "reimburseFundSource", code)
|
this.$set(this.formData, "reimburseFundSource", code)
|
||||||
@@ -2116,7 +2116,8 @@ layout("/layouts/platform.html"){
|
|||||||
item.code !== "UNION_REIMBURSE_FUND_SOURCE_3"
|
item.code !== "UNION_REIMBURSE_FUND_SOURCE_3"
|
||||||
|| this.$auth.hasPermission("unionReimburse.club"))
|
|| this.$auth.hasPermission("unionReimburse.club"))
|
||||||
this.reimburseProjectList = await this.$businessTool.getDictOptions("UNION_REIMBURSE_PROJECT")
|
this.reimburseProjectList = await this.$businessTool.getDictOptions("UNION_REIMBURSE_PROJECT")
|
||||||
if (this.budgetTypeOption.some(item => item.code === "UNION_REIMBURSE_FUND_SOURCE_3")) {
|
// 与协会经费按钮的显示条件一致,不依赖经费字典列表是否包含该项。
|
||||||
|
if (this.$auth.hasPermission("unionReimburse.club")) {
|
||||||
const clubs = await this.$axios.post("/platform/unionReimburse/apply/listReimburseClubs")
|
const clubs = await this.$axios.post("/platform/unionReimburse/apply/listReimburseClubs")
|
||||||
this.clubOptions = clubs.data || []
|
this.clubOptions = clubs.data || []
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user