This commit is contained in:
@jyuhsin
2025-01-13 10:59:21 +08:00
parent 2047b44489
commit 6795c475df
10 changed files with 77 additions and 28 deletions
@@ -241,10 +241,14 @@ public class SysClubUserCon {
//暂时屏蔽了校工会审核
//int status = ShiroUtil.hasAnyRoles("sysadmin, A06, xxhgly") ? 5 : 3;
int status = 0;
if (ShiroUtil.hasAnyRoles("sysadmin, A06, xxhgly") || sf == 2) {
if(sf == 2) {
status = 5;
} else {
status = 3;
if(ShiroUtil.hasAnyRoles("sysadmin, A06, xxhgly")) {
status = 5;
} else {
status = 3;
}
}
//查询校协会管理员
@@ -15,6 +15,7 @@ import io.v.nutz.sys.constant.club.ClubRegistAuditState;
import io.v.nutz.sys.controllers.platform.sys.handler.ClubUserApplyToDoHandler;
import io.v.nutz.sys.models.Sys_club;
import io.v.nutz.sys.models.Sys_club_user;
import io.v.nutz.sys.models.Sys_user;
import io.v.nutz.sys.services.SysClubService;
import io.v.nutz.sys.services.SysClubUserService;
import io.v.nutz.web.commons.utils.ShiroUtil;
@@ -139,16 +140,36 @@ public class ClubApplyInController {
return sysClubService.listPage(pageNumber, pageSize, sql);
}
@At
@ViReturn
@RequiresPermissions("sys.club.sq")
@Aop(TransAop.READ_COMMITTED)
public Object validApply() {
//查询是否是会员
Sys_user sysUser = dao.fetch(Sys_user.class, ShiroUtil.getUserId());
if(sysUser.getMember() != 1) {
return Result.error("您当前不是会员,无法申请");
}
int count = dao.count(Sys_club_user.class, Cnd.where("userid", "=", ShiroUtil.getUserId()).and("isNormal", "=", true));
if(count >= 3) {
return Result.error("您已参与3个协会,无法申请");
}
return Result.success();
}
@At
@ViReturn
@RequiresPermissions("sys.club.sq")
@Aop(TransAop.READ_COMMITTED)
public Object submit(Sys_club_user sys_club_user) {
Sys_club sysClub = dao.fetch(Sys_club.class, sys_club_user.getClubid());
Sys_club_user sysClubUser = dao.fetch(Sys_club_user.class, Cnd.where("clubid", "=", sys_club_user.getClubid()).and("userid", "=", ShiroUtil.getUserId()));
sys_club_user.setInvite(sysClubUser.getInvite());
if(sysClubUser == null) {
sys_club_user.setInvite(false);
} else {
sys_club_user.setInvite(sysClubUser.getInvite());
}
sysClubUserService.clear(Cnd.where("clubid", "=", sys_club_user.getClubid()).and("userid", "=", ShiroUtil.getPrincipalProperty("id")));
boolean isInvite = sys_club_user.getInvite() && Objects.equals(sysClub.getState(), ClubRegistAuditState.NOT_SUBMIT);
@@ -133,7 +133,7 @@ layout("/mobile/platform.html"){
<div style="margin-top: 116px">
<van-list
v-model="loading"
:finished="finished" :immediate-check="false"
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
@load="onLoad">
@@ -369,7 +369,11 @@ layout("/mobile/platform.html"){
this.userTypeOptions.push({text: item.name, value: item.code})
})
this.userTypeOptions.unshift({text: '人员类型'})
this.onLoad()
}
})
window.addEventListener('pageshow', e => {
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
vue.onLoad()
}
})
</script>
@@ -174,7 +174,7 @@ layout("/mobile/platform.html"){
<div style="margin-top: 116px">
<van-list
v-model="loading"
:finished="finished" :immediate-check="false" @load="onLoad"
:finished="finished" @load="onLoad"
:finished-text="tableData.length>0?'没有更多了':''">
<div class="van-doc-card" v-for="o in tableData">
@@ -457,7 +457,10 @@ layout("/mobile/platform.html"){
provideServicesVisible: false,
playRoleVisible: false,
selfSkillVisible: false,
familyRelationVisible: false
familyRelationVisible: false,
pageForm: {
isjr: false
}
}
},
methods: {
@@ -513,9 +516,14 @@ layout("/mobile/platform.html"){
this.loading = false
})
},
openInfo(row, type) {
async openInfo(row, type) {
this.viewType = type
if(type === 'join') {
if (type === 'join') {
const resp = await $.post("/platform/sys/club/sq/validApply")
if (resp.code !== 0) {
vant.Toast(resp.msg)
return
}
this.formData = {
username: "${@shiro.getPrincipalProperty('username')}",
loginname: "${@shiro.getPrincipalProperty('loginname')}",
@@ -589,7 +597,11 @@ layout("/mobile/platform.html"){
this.$set(this.pageForm, "clubType", this.typeOptions[0].value)
this.$set(this.pageForm, "isjr", this.clubType[0].value)
this.pageForm.searchName = 'club.name'
this.onLoad()
}
})
window.addEventListener('pageshow', e => {
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
vue.onLoad()
}
})
</script>
@@ -158,13 +158,13 @@ layout("/layouts/platform.html"){
{{ formatAuditTime(scope.row) }}
</template>
</el-table-column>-->
<el-table-column align="center" header-align="center" label="是否缴费" prop="isjf"
<!--<el-table-column align="center" header-align="center" label="是否缴费" prop="isjf"
width="80">
<template scope="scope">
<span class="text-success" v-if="scope.row.isjf">已缴费</span>
<span class="text-danger" v-else>未缴费</span>
</template>
</el-table-column>
</el-table-column>-->
<el-table-column align="center" header-align="center" label="审核状态"
prop="status">
<template slot-scope="scope">
@@ -125,7 +125,11 @@ layout("/layouts/platform.html"){
sortable></el-table-column>
<el-table-column align="center" header-align="center" label="申请时间" prop="join_time"
show-overflow-tooltip
sortable></el-table-column>
sortable>
<template scope="scope">
{{ moment(scope.row.join_time).format('YYYY-MM-DD') }}
</template>
</el-table-column>
<!--<el-table-column align="center" header-align="center" label="审核时间" prop="join_time"
show-overflow-tooltip>
<template scope="scope">
@@ -584,8 +584,12 @@ layout("/layouts/platform.html"){
this.$refs.info.getInfo(id)
})
},
openApply(row) {
async openApply(row) {
const resp = await $.post("/platform/sys/club/sq/validApply")
if(resp.code !== 0) {
this.$message.warning(resp.msg)
return
}
this.$refs.guava.edit()
this.clickRow = row
this.formData = {
@@ -161,12 +161,12 @@ layout("/layouts/platform.html"){
<span class="text-danger" v-else>不拨付</span>
</template>
</el-table-column>
<el-table-column label="是否缴费" prop="isjf" show-overflow-tooltip>
<!--<el-table-column label="是否缴费" prop="isjf" show-overflow-tooltip>
<template slot-scope="scope">
<span class="text-success" v-if="scope.row.isjf">已缴费</span>
<span class="text-danger" v-else>未缴费</span>
</template>
</el-table-column>
</el-table-column>-->
<el-table-column label="职务" prop="sf" show-overflow-tooltip>
<template slot-scope="scope">
<el-lable v-if="scope.row.sf==1">会长</el-lable>
@@ -384,10 +384,10 @@ layout("/layouts/platform.html"){
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="updateJf(row)"
<!--<el-dropdown-item @click.native="updateJf(row)"
class="text-primary">
{{row.isjf === true ? '设置为未缴费' : '设置为缴费'}}
</el-dropdown-item>
</el-dropdown-item>-->
<el-dropdown-item @click.native="updateGive(row)"
class="text-primary">
{{row.givemoney === true ? '设置为不拨付' : '设置为拨付'}}
@@ -489,10 +489,10 @@ layout("/layouts/platform.html"){
</el-option>
</el-select>
</el-form-item>
<el-form-item class="is-required" label="是否缴费" prop="sf">
<!--<el-form-item class="is-required" label="是否缴费" prop="sf">
<el-radio :label="true" border v-model="userFormData.isjf">已缴费</el-radio>
<el-radio :label="false" border v-model="userFormData.isjf">未缴费</el-radio>
</el-form-item>
</el-form-item>-->
<el-form-item class="is-required" prop="sf" label="身&emsp;&emsp;份">
<el-radio-group v-model="userFormData.sf">
<el-radio-button v-if="!isCy" :label="1">会长</el-radio-button>
@@ -61,7 +61,7 @@ layout("/layouts/platform.html"){
prop="mobile"></el-table-column>
<el-table-column align="center" header-align="center" label="所属单位" prop="unitname"
sortable></el-table-column>
<el-table-column align="center" header-align="center" label="是否缴费" prop="isjf" sortable
<!--<el-table-column align="center" header-align="center" label="是否缴费" prop="isjf" sortable
width="150px">
<template slot-scope="scope">
<el-tooltip content="已缴费" placement="top" v-if="scope.row.isjf">
@@ -71,7 +71,7 @@ layout("/layouts/platform.html"){
<i class="fa fa-circle text-danger ml5"></i>
</el-tooltip>
</template>
</el-table-column>
</el-table-column>-->
<el-table-column align="center" header-align="center" label="人员身份" prop="sf">
<template slot-scope="scope">
@@ -93,12 +93,12 @@ layout("/layouts/platform.html"){
<el-dropdown-item :command="{type:'del',data:scope.row}" v-if="scope.row.sf==2">
移出协会
</el-dropdown-item>
<el-dropdown-item :command="{type:'jf',jf:true,data:scope.row}">
<!--<el-dropdown-item :command="{type:'jf',jf:true,data:scope.row}">
已缴费
</el-dropdown-item>
<el-dropdown-item :command="{type:'jf',jf:false,data:scope.row}">
未缴费
</el-dropdown-item>
</el-dropdown-item>-->
</el-dropdown-menu>
</el-dropdown>
</template>
@@ -143,12 +143,12 @@ layout("/layouts/platform.html"){
</el-option>
</el-select>
</el-form-item>
<el-form-item label="是否缴费" prop="isjf">
<!--<el-form-item label="是否缴费" prop="isjf">
<el-radio-group v-model="formData.isjf">
<el-radio border label="true">已缴费</el-radio>
<el-radio border label="false">未缴费</el-radio>
</el-radio-group>
</el-form-item>
</el-form-item>-->
</el-form>
<span class="dialog-footer" slot="footer">