This commit is contained in:
@jyuhsin
2025-08-28 14:51:47 +08:00
parent 4367d3882f
commit 48cc8a448c
12 changed files with 34 additions and 42 deletions
@@ -96,14 +96,10 @@ public class ClubUserJoinApprovalController {
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
cnd.andEX("YEAR(info.applyDate)","=",pageForm.getYear());
cnd.and(Cnd.likeEX("info.userName", pageForm.getUserName()));
cnd.and(Cnd.likeEX("info.loginName", pageForm.getLoginName()));
cnd.andEX("info.unionId","=",pageForm.getUnionId());
cnd.andEX("info.unitId","=",pageForm.getUnitId());
if(!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())){
cnd.and(new Static("JSON_CONTAINS( task.assignments, '\"%s\"' )".formatted(SecurityUtil.getUserLoginname())));
}
cnd.and(Cnd.likeEX("u.userName", pageForm.getUserName()));
cnd.and(Cnd.likeEX("u.loginName", pageForm.getLoginName()));
cnd.andEX("u.unionId","=",pageForm.getUnionId());
cnd.andEX("u.unitId","=",pageForm.getUnitId());
if (approval) {
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
@@ -102,14 +102,10 @@ public class ClubUserJoinSchoolApprovalController {
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
cnd.andEX("YEAR(info.applyDate)", "=", pageForm.getYear());
cnd.and(Cnd.likeEX("info.userName", pageForm.getUserName()));
cnd.and(Cnd.likeEX("info.loginName", pageForm.getLoginName()));
cnd.andEX("info.unionId", "=", pageForm.getUnionId());
cnd.andEX("info.unitId", "=", pageForm.getUnitId());
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
cnd.and(new Static("JSON_CONTAINS( task.assignments, '\"%s\"' )".formatted(SecurityUtil.getUserLoginname())));
}
cnd.and(Cnd.likeEX("u.userName", pageForm.getUserName()));
cnd.and(Cnd.likeEX("u.loginName", pageForm.getLoginName()));
cnd.andEX("u.unionId", "=", pageForm.getUnionId());
cnd.andEX("u.unitId", "=", pageForm.getUnitId());
if (approval) {
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
@@ -42,6 +42,6 @@ public class ClubUserJoinPageVo{
private String taskParentId;
private String taskVariable;
private String curTaskName;
private Boolean canRevoke;
private Integer canRevoke;
private String startTaskId;
}
@@ -85,7 +85,7 @@ public class CondolenceTypeController {
@ApiOperation("查询职工慰问类型")
@SaCheckLogin
public Result queryCondolenceType() {
List<CondolenceType> list = typeService.query(Cnd.NEW().desc(CondolenceType::getCode));
List<CondolenceType> list = typeService.query(Cnd.where(CondolenceType::getEnable, "=", true).desc(CondolenceType::getCode));
return Result.success(list);
}
}
@@ -48,9 +48,10 @@ public class CondolenceType extends BaseModel {
private String way;
@Column
@Comment("是否")
@Comment("是否")
@ColDefine(type = ColType.BOOLEAN)
private Boolean isDisabled;
@Default("1")
private Boolean enable;
@Column
@Comment("是否上传附件")
@@ -132,7 +132,7 @@ layout("/layouts/platform.html"){
store,
data() {
return {
id: GetQueryString("bizId"),
bizId: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
formData: {},
formRules: {
@@ -195,7 +195,7 @@ layout("/layouts/platform.html"){
this.$message.warning("请先阅读并同意协议")
return
}
this.$axios.post('/platform/club/join/apply/submit/submitAgain', {
this.$axios.post('/platform/club/join/apply/submitAgain', {
data: JSON.stringify(this.formData),
taskId: GetQueryString("taskId")
}).then(res => {
@@ -225,12 +225,12 @@ layout("/layouts/platform.html"){
})
},
init() {
this.id = GetQueryString("id")
this.bizId = GetQueryString("bizId")
if (GetQueryString("clubId")) {
this.$set(this.formData, "clubId", GetQueryString("clubId"))
}
if (this.id) {
this.$axios.post("/platform/club/join/apply/info", { id: this.id }).then((res) => {
if (this.bizId) {
this.$axios.post("/platform/club/join/apply/info", { id: this.bizId }).then((res) => {
if (res.code === 0) {
this.formData = res.data
this.isAgree = true
@@ -44,10 +44,7 @@ layout("/layouts/platform.html"){
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
<el-button v-if="row.canRevoke" size="mini" type="danger" @click="onRevoke(row)">撤回</el-button>
<el-button v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')" @click="onDelete(row.id)" size="mini" type="danger">
删除
</el-button>
<el-button v-else-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
删除
</el-button>
</template>
@@ -95,7 +92,7 @@ layout("/layouts/platform.html"){
})
},
onEdit(row) {
location.href = '/platform/club/join/apply?id=' + row.id
location.href = '/platform/club/join/apply?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id
},
onDelete(id) {
this.$confirm("确定要删除此申请吗?", "提示", {
@@ -181,6 +181,11 @@ layout("/layouts/platform.html"){
await this.userRemoteMethod(resp.data.concatPerson)
let formData = resp.data
if (resp.data.clubUser.length > 0) {
resp.data.clubUser.forEach(item => {
if(item.roleCode) {
item.roleCode = JSON.parse(item.roleCode)[0]
}
})
resp.data.clubUser = resp.data.clubUser.filter((o) => o.roleCode !== "CLUB_MEMBER")
}
this.$refs.clubManagerRef.managePerson = clone(resp.data.clubUser)
@@ -58,10 +58,7 @@ layout("/layouts/platform.html"){
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
<el-button v-if="row.canRevoke" size="mini" type="danger" @click="onRevoke(row)">撤回</el-button>
<el-button v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')" @click="onDelete(row.id)" size="mini" type="danger">
删除
</el-button>
<el-button v-else-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
删除
</el-button>
</template>
@@ -60,7 +60,7 @@ layout("/layouts/platform.html"){
<el-option v-for="item in typeOptions"
:value="item.id"
:key="item.id"
:disabled="item.isDisabled"
:disabled="!item.enable"
:label="item.name"></el-option>
</el-select>
</el-descriptions-item>
@@ -24,19 +24,19 @@ const basicForm = {
<el-radio-button label="慰问品 (C)" border>慰问品 (C)</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="是否用" prop="isDisabled">
<el-form-item label="是否用" prop="enable">
<el-switch
v-model="formData.isDisabled"
v-model="formData.enable"
active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
</el-form-item>
<el-form-item label="上传会议纪要" prop="uploadMeetingRecord">
<!--<el-form-item label="上传会议纪要" prop="uploadMeetingRecord">
<el-radio-group v-model="formData.uploadMeetingRecord">
<el-radio-button :label="true">上传</el-radio-button>
<el-radio-button :label="false">不上传</el-radio-button>
</el-radio-group>
</el-form-item>
</el-form-item>-->
<el-form-item label="是否上传附件" prop="isUploadFile">
<el-radio-group v-model="formData.isUploadFile">
<el-radio-button :label="true">是</el-radio-button>
@@ -43,10 +43,10 @@ layout("/layouts/platform.html"){
<span v-if="row.isUploadFile" class="text-success"></span>
<span v-else class="text-danger"></span>
</template>
<template v-slot="{ row }" v-else-if="column.prop === 'isDisabled'">
<template v-slot="{ row }" v-else-if="column.prop === 'enable'">
<el-switch
@change="switchChange(row)"
v-model="row.isDisabled"
v-model="row.enable"
active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
@@ -86,7 +86,7 @@ layout("/layouts/platform.html"){
{prop: 'money', label: '金额'},
{prop: 'way', label: '慰问方式'},
{prop: 'isUploadFile', label: '是否上传附件'},
{prop: 'isDisabled', label: '是否用'},
{prop: 'enable', label: '是否用'},
],
}
},