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