This commit is contained in:
那些花儿
2025-07-31 10:36:25 +08:00
32 changed files with 2444 additions and 409 deletions
@@ -28,6 +28,7 @@ RoleConstant {
SCHOOL_UNION_ARTICLE_CLUB_ADMIN("校工会协会新闻审批管理员"),
SCHOOL_UNION_ARTICLE_FGH_ADMIN("校工会分工会新闻审批管理员"),
SCHOOL_UNION_ARTICLE_ADMIN("校工会新闻审批管理员"),
SCHOOL_OUTLAY_ADMIN("校工会经费管理员"),
BRANCH_UNION_ADMIN("分工会管理员"),
BRANCH_UNION_CHAIRMAN("分工会主席"),
@@ -1,29 +0,0 @@
package com.budwk.app.zhgh.dayofficework.condolence.controller;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
import io.swagger.annotations.Api;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
/**
* @ClassName CondolenceApplyController
* @Author JyuHsin
* @Date 2025/7/28 11:06
* @Version 1.0
* @Description TODO
*/
@IocBean
@At("/platform/condolence/apply")
@Api("新闻投稿统计分析")
@Ok("json:full")
public class CondolenceApplyController {
@At("/form")
@Ok("beetl:/platform/zhgh/dayofficework/condolence/apply/index.html")
@SaCheckLogin
public void index() {}
}
@@ -1,26 +0,0 @@
package com.budwk.app.zhgh.dayofficework.condolence.controller;
import cn.dev33.satoken.annotation.SaCheckLogin;
import io.swagger.annotations.Api;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
/**
* @ClassName CondolenceUnionAuditController
* @Author JyuHsin
* @Date 2025/7/28 11:33
* @Version 1.0
* @Description TODO
*/
@IocBean
@At("/platform/condolence/unionAudit")
@Api("新闻投稿统计分析")
@Ok("json:full")
public class CondolenceUnionAuditController {
@At("/form")
@Ok("beetl:/platform/zhgh/dayofficework/condolence/unionAudit/index.html")
@SaCheckLogin
public void index() {}
}
@@ -1,83 +0,0 @@
package com.budwk.app.zhgh.dayofficework.condolence.model;
import cn.hutool.json.JSONObject;
import com.budwk.app.base.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import org.nutz.dao.interceptor.annotation.PrevUpdate;
import java.util.Date;
import java.util.List;
/**
* @ClassName Condolence
* @Author JyuHsin
* @Date 2025/7/28 11:03
* @Version 1.0
* @Description TODO
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Table("condolence")
@TableMeta("{'mysql-charset':'utf8mb4'}")
@Comment("职工慰问")
public class Condolence extends BaseModel {
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("说明")
@ColDefine(type = ColType.VARCHAR,width = 500)
private String excerpt;
@Column
@Comment("稿件")
@ColDefine(type = ColType.MYSQL_JSON)
private List<JSONObject> files;
@Column
@Comment("投稿人ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String userId;
@Column
@Comment("投稿人姓名")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String userName;
@Column
@Comment("投稿人工号")
@ColDefine(type = ColType.VARCHAR, width = 120)
private String loginName;
@Column
@Comment("投稿人分工会ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String unionId;
@Column
@Comment("投稿人分工会")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String unionName;
@Column
@Comment("投稿人单位ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String unitId;
@Column
@Comment("投稿人单位")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String unitName;
@Column
@Comment("类型")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String origin;
}
@@ -0,0 +1,157 @@
package com.budwk.app.zhgh.staffbenefit.condolence.controller;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.annotation.SLog;
import com.budwk.app.base.constant.RoleConstant;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.param.PageForm;
import com.budwk.app.base.result.Result;
import com.budwk.app.sys.views.View_user;
import com.budwk.app.web.commons.auth.utils.AuthUtil;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.dayofficework.article.models.Article;
import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence;
import com.budwk.app.zhgh.staffbenefit.condolence.model.CondolenceType;
import com.budwk.app.zhgh.staffbenefit.condolence.service.CondolenceService;
import com.budwk.app.zhgh.staffbenefit.psychology.model.PsychologyDoctor;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.nutz.dao.Cnd;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import javax.validation.Valid;
import java.util.List;
/**
* @ClassName CondolenceApplyController
* @Author JyuHsin
* @Date 2025/7/28 11:06
* @Version 1.0
* @Description TODO
*/
@IocBean
@At("/platform/condolence/apply")
@Api("职工慰问申请")
@Ok("json:full")
public class CondolenceApplyController {
@Inject
private CondolenceService condolenceService;
@At("")
@Ok("beetl:/platform/zhgh/staffbenefit/condolence/apply/index.html")
@SaCheckLogin
public void index() {}
@At("/form")
@Ok("beetl:/platform/zhgh/staffbenefit/condolence/apply/form.html")
@SaCheckLogin
public void form() {}
@At
@ApiOperation("分页查询")
@SaCheckPermission("condolence.apply")
public Result pageData(PageForm pageForm,
@Param(value = "year") Integer year,
@Param(value = "type") String type) {
Sql sql = Sqls.create("""
SELECT
info.*,
type.name as typeName,
ins.id AS instanceId,
ins.businessNo,
ins.state instanceState,
ins.variable instanceVariale,
t.id taskId,
t.taskName AS taskKey,
t.displayName taskName,
t.taskType,
t.performType taskPerformType,
t.taskState,
t.finishTime,
t.taskParentId,
t.variable taskVariale
FROM
condolence info
LEFT JOIN condolence_type type ON info.type = type.id
LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id
LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
$condition
""");
Cnd cnd = Cnd.NEW();
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.or(Condolence::getHelpUserName, "like", "%" + pageForm.getSearchKeyword() + "%");
seg.or(Condolence::getHelpLoginName, "like", "%" + pageForm.getSearchKeyword() + "%");
cnd.and(seg);
}
cnd.andEX("year(info.createTime)", "=", year);
cnd.andEX("info.type", "=", type);
cnd.and("info.createdBy", "=", SecurityUtil.getUserId());
cnd.desc("info.createTime");
sql.setCondition(cnd);
Pagination<NutMap> pagination = condolenceService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pagination);
}
@At
@ApiOperation("查询用户")
@SaCheckPermission("condolence.apply")
@SLog(type = "condolence", tag = "查询用户", msg = "查询用户")
public Object listUser(String keyword) {
Sql sql = Sqls.create("""
select
id,
username as userName,
loginname as loginName,
sex,
mobile,
technicalTitle,
IFNULL(unitname, '暂无') as unitName,
unitid as unitId,
unionid as unionId,
unionname as unionName
from
vw_user
$condition
""");
Cnd cnd = Cnd.NEW();
if (StrUtil.isNotBlank(keyword)) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.or(View_user::getLoginname, "like", "%" + keyword + "%");
seg.or(View_user::getUsername, "like", "%" + keyword + "%");
cnd.and(seg);
}
if(!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
if(AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_ADMIN.name(), RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
cnd.and(View_user::getUnionId, "=", SecurityUtil.getUnionId());
} else {
cnd.and(View_user::getId, "=", SecurityUtil.getUserId());
}
}
sql.setCondition(cnd);
Pagination pagination = condolenceService.listPageMap(1, 50, sql);
return Result.success(pagination.getList());
}
@At
@SaCheckPermission("condolence.apply")
@ApiOperation("职工慰问详情")
public Result fetchOne(@Valid String id) {
Condolence condolence = condolenceService.fetch(id);
return Result.success(condolence);
}
}
@@ -0,0 +1,107 @@
package com.budwk.app.zhgh.staffbenefit.condolence.controller;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.param.PageForm;
import com.budwk.app.base.result.Result;
import com.budwk.app.base.utils.PageUtil;
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.staffbenefit.condolence.service.CondolenceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.nutz.dao.Cnd;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import java.util.List;
/**
* @ClassName CondolenceBranchUnionApprovalController
* @Author JyuHsin
* @Date 2025/7/28 11:33
* @Version 1.0
* @Description TODO
*/
@IocBean
@At("/platform/condolence/branchUnionApproval")
@Api("职工慰问分工会审核")
@Ok("json:full")
public class CondolenceBranchUnionApprovalController {
@Inject
private CondolenceService condolenceService;
@At("")
@Ok("beetl:/platform/zhgh/staffbenefit/condolence/branchUnionApproval/index.html")
@SaCheckLogin
public void index() {}
@At("/form")
@Ok("beetl:/platform/zhgh/staffbenefit/condolence/branchUnionApproval/form.html")
@SaCheckLogin
public void form() {}
@At
@ApiOperation("分页查询")
@SaCheckPermission("condolence.branchUnionApproval")
public Result pageData(PageForm pageForm,
@Param(value = "year") Integer year,
@Param(value = "type") String type,
@Param(value = "approval") Boolean approval) {
Sql sql = Sqls.create("""
SELECT
info.*,
type.name as typeName,
ins.id AS instanceId,
ins.businessNo,
ins.state instanceState,
ins.variable instanceVariable,
t.id taskId,
t.taskName AS taskKey,
t.displayName taskName,
t.taskType,
t.performType taskPerformType,
t.taskState,
t.finishTime,
t.taskParentId,
t.variable taskVariable
FROM
wf_process_task t
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
LEFT JOIN condolence info ON info.id = ins.businessNo
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
LEFT JOIN condolence_type type ON info.type = type.id
$condition
""");
Cnd cnd = Cnd.NEW();
cnd.andEX("info.type", "=", type);
cnd.andEX("YEAR(info.createTime)", "=", year);
cnd.and("t.taskName", "=", "4dad0bef-3cf2-4a7d-bba3-35020b9b216d");
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
if (approval) {
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
} else {
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
}
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
cnd.desc("info.createTime");
} else {
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
}
sql.setCondition(cnd);
Pagination<NutMap> pageVO = condolenceService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pageVO);
}
}
@@ -0,0 +1,176 @@
package com.budwk.app.zhgh.staffbenefit.condolence.controller;
import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.constant.RoleConstant;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.param.PageForm;
import com.budwk.app.base.result.Result;
import com.budwk.app.base.utils.CommonDownloadUtil;
import com.budwk.app.base.utils.PageUtil;
import com.budwk.app.flow.entity.ProcessInstance;
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
import com.budwk.app.sys.param.SysMsgSummaryPageForm;
import com.budwk.app.web.commons.auth.utils.AuthUtil;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence;
import com.budwk.app.zhgh.staffbenefit.condolence.service.CondolenceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.Workbook;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.List;
/**
* @ClassName CondolenceReadController
* @Author JyuHsin
* @Date 2025/7/29 16:25
* @Version 1.0
* @Description TODO
*/
@Slf4j
@IocBean
@Ok("json:full")
@Api(tags = "职工慰问阅览")
@At("/platform/condolence/read")
public class CondolenceReadController {
@Inject
private CondolenceService condolenceService;
@At("")
@SaCheckPermission("condolence.read")
@Ok("beetl:/platform/zhgh/staffbenefit/condolence/read/index.html")
public void index() {
}
@At
@ApiOperation("分页查询")
@SaCheckPermission("condolence.read")
public Result pageData(PageForm pageForm,
@Param(value = "year") Integer year,
@Param(value = "type") String type,
@Param(value = "unionId") String unionId,
@Param(value = "unitId") String unitId) {
Sql sql = Sqls.create("""
SELECT
info.*,
ins.id AS instanceId,
type.name as typeName,
ins.state instanceState,
t.displayName taskName
FROM
condolence info
LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id
LEFT JOIN (
SELECT
processInstanceId,
displayName,
createdAt,
ROW_NUMBER() OVER (PARTITION BY processInstanceId ORDER BY createdAt DESC) AS rn
FROM wf_process_task
) t ON t.processInstanceId = ins.id AND t.rn = 1
LEFT JOIN condolence_type type ON info.type = type.id
$condition
""");
Cnd cnd = Cnd.NEW();
cnd.andEX("info.type", "=", type);
cnd.andEX("YEAR(info.createTime)", "=", year);
cnd.andEX("info.applyUnionId", "=", unionId);
cnd.andEX("info.applyUnitId", "=", unitId);
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.or("info.helpUserName", "like", "%" + pageForm.getSearchKeyword() + "%");
seg.or("info.helpLoginName", "like", "%" + pageForm.getSearchKeyword() + "%");
cnd.and(seg);
}
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
cnd.and("info.applyUnionId", "=", SecurityUtil.getUnionId());
}
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
cnd.desc("info.createTime");
} else {
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
}
sql.setCondition(cnd);
Pagination<NutMap> pageVO = condolenceService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pageVO);
}
@At
@Ok("void")
@SaCheckPermission("condolence.read")
@ApiOperation("导出职工慰问汇总表")
public void onExport(PageForm pageForm,
@Param(value = "year") Integer year,
@Param(value = "type") String type,
@Param(value = "unionId") String unionId,
@Param(value = "unitId") String unitId,
HttpServletResponse response) {
//查询审核通过的数据
Sql sql = Sqls.create("""
select
con.*,
type.name as typeName
from
condolence con
left join wf_process_instance ins on ins.businessNo = con.id
left join condolence_type type on type.id = con.type
$condition
""");
Cnd cnd = Cnd.NEW();
cnd.and(ProcessInstance::getState, "=", ProcessTaskStateEnum.FINISHED.getCode());
cnd.andEX("con.type", "=", type);
cnd.andEX("YEAR(info.createTime)", "=", year);
cnd.andEX("con.applyUnionId", "=", unionId);
cnd.andEX("con.applyUnitId", "=", unitId);
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.or("info.helpUserName", "like", "%" + pageForm.getSearchKeyword() + "%");
seg.or("info.helpLoginName", "like", "%" + pageForm.getSearchKeyword() + "%");
cnd.and(seg);
}
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
cnd.and("con.applyUnionId", "=", SecurityUtil.getUnionId());
}
sql.setCondition(cnd);
List<NutMap> list = condolenceService.listMap(sql);
List<ExcelExportEntity> exportEntities = new ArrayList<>();
exportEntities.add(new ExcelExportEntity("慰问对象", "helpUserName", 20));
exportEntities.add(new ExcelExportEntity("慰问对象工号", "helpLoginName", 20));
exportEntities.add(new ExcelExportEntity("申请人", "applyUserName", 20));
exportEntities.add(new ExcelExportEntity("所在工会", "helpUnionName", 20));
exportEntities.add(new ExcelExportEntity("所在单位", "helpUnitName", 20));
exportEntities.add(new ExcelExportEntity("慰问类型", "typeName", 20));
exportEntities.add(new ExcelExportEntity("拟补贴金额", "money", 20));
exportEntities.add(new ExcelExportEntity("申请理由", "remark", 20));
ExportParams exportParams = new ExportParams();
exportParams.setType(ExcelType.XSSF);
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, list);
CommonDownloadUtil.download("申报人汇总.xlsx", workbook, response);
}
}
@@ -0,0 +1,111 @@
package com.budwk.app.zhgh.staffbenefit.condolence.controller;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.param.PageForm;
import com.budwk.app.base.result.Result;
import com.budwk.app.base.utils.PageUtil;
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.staffbenefit.condolence.service.CondolenceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.nutz.dao.Cnd;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import java.util.List;
/**
* @ClassName CondolenceSchoolUnionApprovalController
* @Author JyuHsin
* @Date 2025/7/29 16:23
* @Version 1.0
* @Description TODO
*/
@IocBean
@At("/platform/condolence/schoolUnionApproval")
@Api("职工慰问校工会审核")
@Ok("json:full")
public class CondolenceSchoolUnionApprovalController {
@Inject
private CondolenceService condolenceService;
@At("")
@Ok("beetl:/platform/zhgh/staffbenefit/condolence/schoolUnionApproval/index.html")
@SaCheckLogin
public void index() {}
@At("/form")
@Ok("beetl:/platform/zhgh/staffbenefit/condolence/schoolUnionApproval/form.html")
@SaCheckLogin
public void form() {}
@At
@ApiOperation("分页查询")
@SaCheckPermission("condolence.schoolUnionApproval")
public Result pageData(PageForm pageForm,
@Param(value = "year") Integer year,
@Param(value = "type") String type,
@Param(value = "unionId") String unionId,
@Param(value = "unitId") String unitId,
@Param(value = "approval") Boolean approval) {
Sql sql = Sqls.create("""
SELECT
info.*,
type.name as typeName,
ins.id AS instanceId,
ins.businessNo,
ins.state instanceState,
ins.variable instanceVariable,
t.id taskId,
t.taskName AS taskKey,
t.displayName taskName,
t.taskType,
t.performType taskPerformType,
t.taskState,
t.finishTime,
t.taskParentId,
t.variable taskVariable
FROM
wf_process_task t
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
LEFT JOIN condolence info ON info.id = ins.businessNo
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
LEFT JOIN condolence_type type ON info.type = type.id
$condition
""");
Cnd cnd = Cnd.NEW();
cnd.andEX("info.type", "=", type);
cnd.andEX("YEAR(info.createTime)", "=", year);
cnd.andEX("info.applyUnionId", "=", unionId);
cnd.andEX("info.applyUnitId", "=", unitId);
cnd.and("t.taskName", "=", "ecdaef3b-edf4-4143-9a96-887dd5921711");
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
if (approval) {
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
} else {
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
}
if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
cnd.desc("info.createTime");
} else {
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
}
sql.setCondition(cnd);
Pagination<NutMap> pageVO = condolenceService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
return Result.success(pageVO);
}
}
@@ -0,0 +1,46 @@
package com.budwk.app.zhgh.staffbenefit.condolence.controller;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.budwk.app.base.param.PageForm;
import com.budwk.app.base.result.Result;
import com.budwk.app.zhgh.staffbenefit.condolence.service.CondolenceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
/**
* @ClassName CondolenceStatisticsController
* @Author JyuHsin
* @Date 2025/7/30 14:51
* @Version 1.0
* @Description TODO
*/
@IocBean
@At("/platform/condolence/statistics")
@Api("职工慰问统计")
@Ok("json:full")
public class CondolenceStatisticsController {
@Inject
private CondolenceService condolenceService;
@At("")
@Ok("beetl:/platform/zhgh/staffbenefit/condolence/statistics/index.html")
@SaCheckLogin
public void index() {}
@At
@ApiOperation("分页查询")
@SaCheckPermission("condolence.statistics")
public Result pageData(PageForm pageForm,
@Param(value = "year") Integer year,
@Param(value = "type") String type) {
return null;
}
}
@@ -0,0 +1,90 @@
package com.budwk.app.zhgh.staffbenefit.condolence.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.annotation.SLog;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.param.PageForm;
import com.budwk.app.base.result.Result;
import com.budwk.app.zhgh.staffbenefit.condolence.model.CondolenceType;
import com.budwk.app.zhgh.staffbenefit.condolence.service.CondolenceTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import java.util.List;
/**
* @ClassName CondolenceTypeController
* @Author JyuHsin
* @Date 2025/7/29 10:00
* @Version 1.0
* @Description TODO
*/
@Slf4j
@IocBean
@Ok("json:full")
@Api(tags = "职工慰问类型")
@At("/platform/condolence/type")
public class CondolenceTypeController {
@Inject
private Dao dao;
@Inject
private CondolenceTypeService typeService;
@At("")
@SaCheckPermission("condolence.type")
@Ok("beetl:/platform/zhgh/staffbenefit/condolence/type/index.html")
public void index() {
}
@At
@ApiOperation("分页查询")
@SaCheckPermission("condolence.type")
public Result pageData(PageForm pageForm) {
Cnd cnd = Cnd.NEW();
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
SqlExpressionGroup seg = new SqlExpressionGroup();
seg.or(CondolenceType::getName, "like", "%" + pageForm.getSearchKeyword() + "%");
seg.or(CondolenceType::getCode, "like", "%" + pageForm.getSearchKeyword() + "%");
cnd.and(seg);
}
cnd.asc("code");
Pagination pagination = typeService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), cnd);
return Result.success(pagination);
}
@At
@ApiOperation("新增/修改职工慰问类型")
@SaCheckPermission("condolence.type")
@SLog(type = "condolence", tag = "新增/修改职工慰问类型", msg = "新增/修改职工慰问类型")
public Object onSubmit(CondolenceType type) {
typeService.insertOrUpdate(type);
return Result.success();
}
@At
@ApiOperation("删除职工慰问类型")
@SaCheckPermission("condolence.type")
@SLog(type = "condolence", tag = "删除职工慰问类型", msg = "删除职工慰问类型")
public Object onDelete(String id) {
typeService.delete(id);
return Result.success();
}
@At
@ApiOperation("查询职工慰问类型")
@SaCheckPermission("condolence.type")
public Result queryCondolenceType() {
List<CondolenceType> list = typeService.query(Cnd.NEW().desc(CondolenceType::getCode));
return Result.success(list);
}
}
@@ -0,0 +1,50 @@
package com.budwk.app.zhgh.staffbenefit.condolence.controller;
import cn.dev33.satoken.annotation.SaCheckLogin;
import com.budwk.app.base.result.Result;
import com.budwk.app.zhgh.democratic.suggestionBox.models.SuggestionBox;
import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence;
import com.budwk.app.zhgh.staffbenefit.condolence.model.CondolenceType;
import io.swagger.annotations.Api;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.Lang;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
/**
* @ClassName CondolenceViewController
* @Author JyuHsin
* @Date 2025/7/30 10:46
* @Version 1.0
* @Description TODO
*/
@IocBean
@At("/platform/condolence/view")
@Api("职工慰问查看")
@Ok("json:full")
public class CondolenceViewController {
@Inject
private Dao dao;
@At("/index")
@Ok("beetl:/platform/zhgh/staffbenefit/condolence/view/index.html")
@SaCheckLogin
public void index() {
}
@At("/info")
@SaCheckLogin
public Result info(String id) {
Condolence condolence = dao.fetch(Condolence.class, id);
CondolenceType type = dao.fetch(CondolenceType.class, Cnd.where(CondolenceType::getId, "=", condolence.getType()));
NutMap nutMap = Lang.obj2nutmap(condolence);
nutMap.put("typeName", type.getName());
return Result.success(nutMap);
}
}
@@ -1,11 +1,14 @@
package com.budwk.app.zhgh.dayofficework.condolence.interceptor;
package com.budwk.app.zhgh.staffbenefit.condolence.interceptor;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.flow.constant.FlowConst;
import com.budwk.app.flow.engine.FlowInterceptor;
import com.budwk.app.flow.engine.core.Execution;
import com.budwk.app.flow.engine.core.ServiceContext;
import com.budwk.app.flow.entity.ProcessInstance;
import com.budwk.app.zhgh.dayofficework.article.models.Article;
import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence;
import org.nutz.dao.Chain;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
@@ -22,19 +25,19 @@ public class CondolenceSaveInterceptor implements FlowInterceptor {
@Override
public void intercept(Execution execution) {
System.out.println("..................");
String formDataStr = execution.getArgs().getStr(FlowConst.FORM_DATA);
Article article = Json.fromJson(Article.class, formDataStr);
Condolence condolence = Json.fromJson(Condolence.class, formDataStr);
if(StrUtil.isBlank(condolence.getId())) condolence.setCreateTime(DateUtil.now());
Dao dao = ServiceContext.find(Dao.class);
dao.insertOrUpdate(article);
dao.insertOrUpdate(condolence);
// 设置流程变量
execution.getArgs().set("origin", article.getOrigin());
execution.getArgs().set("origin", condolence.getOrigin());
int instanceId = execution.getArgs().getInt(FlowConst.PROCESS_INSTANCE_ID_KEY);
dao.update(ProcessInstance.class, Chain.make("businessNo", article.getId()), Cnd.where(ProcessInstance::getId, "=", instanceId));
dao.update(ProcessInstance.class, Chain.make("businessNo", condolence.getId()), Cnd.where(ProcessInstance::getId, "=", instanceId));
System.out.println(execution);
}
}
@@ -0,0 +1,188 @@
package com.budwk.app.zhgh.staffbenefit.condolence.model;
import cn.hutool.json.JSONObject;
import com.budwk.app.base.model.BaseModel;
import com.budwk.app.sys.models.Sys_file;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import java.util.List;
/**
* @ClassName Condolence
* @Author JyuHsin
* @Date 2025/7/28 11:03
* @Version 1.0
* @Description TODO
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Table("condolence")
@TableMeta("{'mysql-charset':'utf8mb4'}")
@Comment("职工慰问")
public class Condolence extends BaseModel {
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("申请人ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String applyUserId;
@Column
@Comment("申请人姓名")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String applyUserName;
@Column
@Comment("申请人工号")
@ColDefine(type = ColType.VARCHAR, width = 120)
private String applyLoginName;
@Column
@Comment("申请人分工会ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String applyUnionId;
@Column
@Comment("申请人分工会")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String applyUnionName;
@Column
@Comment("申请人单位ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String applyUnitId;
@Column
@Comment("申请人单位")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String applyUnitName;
@Column
@Comment("补助人ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String helpUserId;
@Column
@Comment("补助人姓名")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String helpUserName;
@Column
@Comment("补助人工号")
@ColDefine(type = ColType.VARCHAR, width = 120)
private String helpLoginName;
@Column
@Comment("补助人分工会ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String helpUnionId;
@Column
@Comment("补助人分工会")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String helpUnionName;
@Column
@Comment("补助人单位ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String helpUnitId;
@Column
@Comment("补助人单位")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String helpUnitName;
@Column
@Comment("类型")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String origin;
@Column
@Comment("收款人")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String payUserId;
@Column
@Comment("收款人姓名")
@ColDefine(type = ColType.VARCHAR, width = 30)
private String payUserName;
@Column
@Comment("收款人工号")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String payLoginName;
@Column
@Comment("慰问类型")
@ColDefine(type = ColType.VARCHAR, width = 32)
private String type;
@Column
@Comment("慰问方式")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String way;
@Column
@Comment("慰问金额")
@ColDefine(type = ColType.FLOAT, width = 10, precision = 2)
private Double money;
@Column
@Comment("发生时间")
@ColDefine(type = ColType.VARCHAR, width = 30)
private String occurTime;
@Column
@Comment("生育几孩(孩次)")
@ColDefine(type = ColType.VARCHAR, width = 10)
private String child;
@Column
@Comment("所在医院")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String hospital;
@Column
@Comment("病房床号")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String hospitalHouseNum;
@Column
@Comment("病房床号")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String hospitalHouseBedNum;
@Column
@Comment("住院病由")
@ColDefine(type = ColType.VARCHAR, width = 100)
private String hospitalBy;
@Column
@Comment("备注")
@ColDefine(type = ColType.VARCHAR, width = 500)
private String remark;
@Column
@Comment("附件")
@ColDefine(type = ColType.MYSQL_JSON)
private List<JSONObject> files;
@Comment("签字")
@ColDefine(type = ColType.VARCHAR, width = 255)
@Column(hump = true)
private String signature;
@Column
@Comment("申请时间")
@ColDefine(type = ColType.VARCHAR, width = 30)
private String createTime;
}
@@ -0,0 +1,83 @@
package com.budwk.app.zhgh.staffbenefit.condolence.model;
import com.budwk.app.base.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.DB;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
/**
* @ClassName CondolenceType
* @Author JyuHsin
* @Date 2025/7/29 9:59
* @Version 1.0
* @Description TODO
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Table("condolence_type")
@TableMeta("{'mysql-charset':'utf8mb4'}")
@Comment("职工慰问类型")
public class CondolenceType extends BaseModel {
@Name
@Comment("ID")
@ColDefine(type = ColType.VARCHAR, width = 32)
@PrevInsert(uu32 = true)
private String id;
@Column
@Comment("编码")
@ColDefine(type = ColType.VARCHAR, width = 30)
private String code;
@Column
@Comment("名称")
@ColDefine(type = ColType.VARCHAR, width = 50)
private String name;
@Column
@Comment("费用")
@ColDefine(type = ColType.FLOAT, width = 10, precision = 2)
private Double money;
@Column
@Comment("慰问方式")
@ColDefine(type = ColType.VARCHAR, width = 20)
private String way;
@Column
@Comment("是否禁用")
@ColDefine(type = ColType.BOOLEAN)
private Boolean isDisabled;
@Column
@Comment("是否上传附件")
@ColDefine(type = ColType.BOOLEAN)
private Boolean isUploadFile;
@Column
@Comment("上传附件说明")
@ColDefine(type = ColType.VARCHAR,width = 50)
private String uploadFileDesc;
@Column
@Comment("排序字段")
@Prev({
@SQL(db = DB.MYSQL, value = "SELECT IFNULL(MAX(location),0)+1 FROM Condolence_Type"),
@SQL(db = DB.ORACLE, value = "SELECT COALESCE(MAX(location),0)+1 FROM Condolence_Type")
})
private Integer location;
@Column
@Comment("排序")
@ColDefine(type = ColType.INT)
private int sortNum;
@Column
@Comment("上传会议纪要")
@Default("0")
@ColDefine(type = ColType.BOOLEAN)
private Boolean uploadMeetingRecord;
}
@@ -0,0 +1,14 @@
package com.budwk.app.zhgh.staffbenefit.condolence.service;
import com.budwk.app.base.service.BaseService;
import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence;
/**
* @ClassName CondolenceService
* @Author JyuHsin
* @Date 2025/7/29 11:21
* @Version 1.0
* @Description TODO
*/
public interface CondolenceService extends BaseService<Condolence> {
}
@@ -0,0 +1,14 @@
package com.budwk.app.zhgh.staffbenefit.condolence.service;
import com.budwk.app.base.service.BaseService;
import com.budwk.app.zhgh.staffbenefit.condolence.model.CondolenceType;
/**
* @ClassName CondolenceTypeService
* @Author JyuHsin
* @Date 2025/7/29 10:03
* @Version 1.0
* @Description TODO
*/
public interface CondolenceTypeService extends BaseService<CondolenceType> {
}
@@ -0,0 +1,24 @@
package com.budwk.app.zhgh.staffbenefit.condolence.service.impl;
import com.budwk.app.base.service.impl.BaseServiceImpl;
import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence;
import com.budwk.app.zhgh.staffbenefit.condolence.service.CondolenceService;
import lombok.extern.slf4j.Slf4j;
import org.nutz.dao.Dao;
import org.nutz.ioc.loader.annotation.IocBean;
/**
* @ClassName CondolenceServiceImpl
* @Author JyuHsin
* @Date 2025/7/29 11:22
* @Version 1.0
* @Description TODO
*/
@Slf4j
@IocBean(args = {"refer:dao"})
public class CondolenceServiceImpl extends BaseServiceImpl<Condolence> implements CondolenceService {
public CondolenceServiceImpl(Dao dao) {
super(dao);
}
}
@@ -0,0 +1,24 @@
package com.budwk.app.zhgh.staffbenefit.condolence.service.impl;
import com.budwk.app.base.service.impl.BaseServiceImpl;
import com.budwk.app.zhgh.staffbenefit.condolence.model.CondolenceType;
import com.budwk.app.zhgh.staffbenefit.condolence.service.CondolenceTypeService;
import lombok.extern.slf4j.Slf4j;
import org.nutz.dao.Dao;
import org.nutz.ioc.loader.annotation.IocBean;
/**
* @ClassName CondolenceTypeServiceImpl
* @Author JyuHsin
* @Date 2025/7/29 10:03
* @Version 1.0
* @Description TODO
*/
@Slf4j
@IocBean(args = {"refer:dao"})
public class CondolenceTypeServiceImpl extends BaseServiceImpl<CondolenceType> implements CondolenceTypeService {
public CondolenceTypeServiceImpl(Dao dao) {
super(dao);
}
}
@@ -71,7 +71,7 @@
<script src="${base!}/assets/platform/plugins/form-create/form-create.min.js"></script>
<script src="${base!}/assets/platform/plugins/form-create/index.umd.js"></script>
<!-- <script src="${base!}/assets/platform/plugins/snaker/SnakerflowDesigner.umd.min.js"></script>-->
<!-- <script src="${base!}/assets/platform/plugins/snaker/SnakerflowDesigner.umd.min.js"></script>-->
<script src="${base!}/components/plugins/sysDict/DictData.js"></script>
<script src="${base!}/assets/platform/js/util/commonUtil.js"></script>
@@ -101,11 +101,6 @@
Vue.use(FcDesigner.formCreate)
</script>
<!--广播频道-->
<script type="text/javascript">
window.GlobalBroadcastChannel = new BroadcastChannel("zhgh-global-channel")
</script>
<!--ws-->
<script type="text/javascript">
class WebSocketPubSub {
@@ -339,17 +334,12 @@
Vue.component("excel-import", httpVueLoader("/components/plugins/sysImport/excelImport.vue?v=" + new Date().getTime()))
Vue.component("flow-form-button", httpVueLoader("/components/plugins/flowable/formButton.vue?v=" + new Date().getTime()))
Vue.component("snaker-flow", httpVueLoader("/components/plugins/snaker/snakerFlow.vue?v=" + new Date().getTime()))
Vue.component(
"snaker-flow-task-form-action",
httpVueLoader("/components/plugins/snaker/snakerFlowTaskFormAction.vue?v=" + new Date().getTime())
)
Vue.component(
"snaker-flow-history-approval",
httpVueLoader("/components/plugins/snaker/snakerFlowHisApproval.vue?v=" + new Date().getTime())
)
Vue.component("snaker-flow-task-form-action", httpVueLoader("/components/plugins/snaker/snakerFlowTaskFormAction.vue?v=" + new Date().getTime()))
Vue.component("snaker-flow-history-approval", httpVueLoader("/components/plugins/snaker/snakerFlowHisApproval.vue?v=" + new Date().getTime()))
</script>
<style>
.v4-header {
background-color: rgb(0, 109, 185);
box-shadow: 0 2px 10px rgba(0, 109, 185, 0.3);
@@ -565,10 +555,6 @@
<i class="fa fa-th-large"></i>
应用中心
</a>
<a href="/platform/v4/serv" data-pjax class="v4-nav-item">
<i class="fa fa-th-large"></i>
服务中心
</a>
<a href="/flow/todoCenter" data-pjax class="v4-nav-item">
<i class="fa fa-th-large"></i>
待办中心
@@ -84,8 +84,7 @@ layout("/layouts/platform.html"){
<el-input v-model="formData.h5InstanceViewUrl" placeholder="请输入手机端发起地址"></el-input>
</el-form-item>
<el-form-item label="图标" prop="icon">
<el-input maxlength="100" placeholder="图标" v-model="formData.icon"></el-input>
<i :class="formData.icon" v-if="formData.icon"></i>
<el-input v-model="formData.icon" placeholder="请输入图标"></el-input>
</el-form-item>
<el-form-item label="说明" prop="description">
<text-editor v-model="formData.description"></text-editor>
@@ -205,11 +204,11 @@ layout("/layouts/platform.html"){
},
listCategory() {
this.$axios.post("/flow/category/list").then((res) => {
if (res.code === 0) {
this.categoryOptions = res.data
}
})
// this.$axios.get("/platform/warmFlow/category/list").then((res) => {
// if (res.code === 0) {
// this.categoryOptions = res.data
// }
// })
}
},
created() {
@@ -1,183 +0,0 @@
<div id="condolence_apply">
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix="" class="flow-task-form">
<el-descriptions :column="2" border>
<el-descriptions-item label="投稿人姓名">{{formData.userName}}</el-descriptions-item>
<el-descriptions-item label="投稿人工号">{{formData.loginName}}</el-descriptions-item>
<el-descriptions-item label="投稿人单位">{{formData.unitName}}</el-descriptions-item>
<el-descriptions-item label="投稿人工会">{{formData.unionName}}</el-descriptions-item>
<el-descriptions-item label="投稿来源" :span="2">
<el-form-item prop="origin" label="投稿来源" label-width="0">
<el-radio-group v-model="formData.origin" size="small">
<el-radio border v-for="item in origins" :label="item.code" :key="item.code">{{item.name}}</el-radio>
</el-radio-group>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="投稿人协会" v-if="formData.origin === 'ARTICLE_ORIGIN_CLUB'">
<el-form-item prop="clubId" label="投稿人协会" v-if="formData.origin === 'ARTICLE_ORIGIN_CLUB'">
<el-select v-model="formData.clubId" placeholder="请选择" style="width: 100%">
<el-option v-for="item in permission?.clubs" :key="item.id" :label="item.clubName" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="投稿人联系方式" :span="2">
<el-form-item prop="title" label="投稿标题">
<el-input v-model="formData.title" maxlength="100" show-word-limit placeholder="请输入标题"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="投稿人联系方式" :span="2">
<el-form-item prop="mobile" label="投稿人联系方式">
<el-input v-model="formData.mobile" placeholder="请输入投稿人联系方式"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="修改人联系方式" :span="2">
<el-form-item prop="mobile2" label="修改人联系方式">
<el-input v-model="formData.mobile2" placeholder="请输入修改人联系方式"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="投稿说明" :span="2">
<el-form-item prop="excerpt" label="投稿说明">
<el-input v-model="formData.excerpt" type="textarea" maxlength="500" show-word-limit placeholder="请输入投稿说明"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="稿件" :span="2">
<file-upload
:value.sync="formData.files"
:upload_number="5"
upload_result_category="array"
complete_result
upload_mode="drag"
></file-upload>
</el-descriptions-item>
</el-descriptions>
</el-form>
<snaker-flow-task-form-action @task-action="handleTaskAction" @save-draft="handleSaveDraft" @cancel="handleCancel"></snaker-flow-task-form-action>
</div>
<script>
new Vue({
el: "#condolence_apply",
store,
dicts: ["ARTICLE_ORIGIN"],
computed: {
origins() {
if (this.dict?.type?.ARTICLE_ORIGIN && this.permission && this.permission.roles) {
return this.dict.type.ARTICLE_ORIGIN.filter((item) => this.permission && this.permission.roles.includes(item.code))
}
return []
}
},
data() {
return {
id: GetQueryString("businessId"),
taskId: GetQueryString("taskId"),
instanceId: GetQueryString("instanceId"),
formData: {},
formRules: {
title: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
excerpt: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
clubId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
files: [{ required: false, message: "必填", trigger: ["change", "blur"] }],
origin: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
mobile: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
mobile2: [{ required: true, message: "必填", trigger: ["change", "blur"] }]
},
permission: {}
}
},
methods: {
init() {
if (this.id) {
this.$axios.post("/platform/article/write/get", { id: this.id }).then((res) => {
if (res.code === 0) {
this.formData = res.data
}
})
} else {
const { username, loginname, id, unit, union, mobile } = this.$store.state.user
this.formData = {
userName: username,
loginName: loginname,
userId: id,
unitId: unit?.id,
unitName: unit?.name,
unionId: union?.id,
unionName: union?.name,
mobile: mobile,
mobile2: mobile
}
}
},
checkPermission() {
this.$axios.post("/platform/article/write/checkPermission").then((res) => {
if (res.code === 0) {
this.permission = res.data
}
})
},
handleTaskAction(val) {
console.log(val)
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$axios
.post("/flow/common/startInstanceAndExecute", {
...val,
bizData: JSON.stringify(this.formData)
})
.then((res) => {
if (res.code === 0) {
this.$message.success("操作成功")
// 发送完成消息
window.parent.postMessage(
{
type: "task-complete"
},
"*"
)
}
})
}
})
},
handleSaveDraft(val) {
this.$message.success("保存成功")
this.$refs.formRef.validateField(["title"], (errMsg) => {
if (errMsg) {
this.$message.warning("请填写标题")
return
}
this.$axios
.post("/flow/common/startInstance", {
...val,
bizData: JSON.stringify(this.formData)
})
.then((res) => {
if (res.code === 0) {
this.$message.success("操作成功")
// 发送完成消息
window.parent.postMessage(
{
type: "task-complete"
},
"*"
)
}
})
})
},
handleCancel() {}
},
created() {
this.init()
this.checkPermission()
}
})
</script>
@@ -1,56 +0,0 @@
<div id="condolence_audit">
<el-form :model="formData" ref="approvalFormRef" label-position="left" label-width="80px">
<el-form-item label="审批意见" prop="approvalOpinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.approvalOpinion"></user-opinion-textarea>
</el-form-item>
<!-- <el-form-item label="电子签名" prop="approvalSignature" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">-->
<!-- <pc-signature v-model="formData.approvalSignature"></pc-signature>-->
<!-- </el-form-item>-->
</el-form>
<snaker-flow-task-form-action @task-action="handleTaskAction"
@cancel="handleCancel">
</snaker-flow-task-form-action>
</div>
<script>
new Vue({
el: "#condolence_audit",
store,
data() {
return {
id: GetQueryString("businessId"),
taskId: GetQueryString("taskId"),
instanceId: GetQueryString("instanceId"),
formData: {}
}
},
methods: {
handleTaskAction(val) {
console.log(val)
const param = {
...val,
"tf_data": this.formData
}
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify(param)
}).then(res => {
if (res.code === 0) {
this.$message.success("操作成功")
// 发送完成消息
window.parent.postMessage({
type: "task-complete"
}, "*")
}
})
},
handleCancel() {
}
},
created() {
}
})
</script>
@@ -0,0 +1,340 @@
<div id="condolence-apply-form">
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix="" class="flow-task-form">
<el-descriptions :column="2" border>
<el-descriptions-item label="申请人姓名">{{formData.applyUserName}}</el-descriptions-item>
<el-descriptions-item label="申请人工号">{{formData.applyLoginName}}</el-descriptions-item>
<el-descriptions-item label="申请人单位">{{formData.applyUnitName}}</el-descriptions-item>
<el-descriptions-item label="申请人工会">{{formData.applyUnionName}}</el-descriptions-item>
<el-descriptions-item label="慰问对象">
<el-form-item prop="helpUserId" label="慰问对象">
<el-select
style="width: 100%"
v-model="formData.helpUserId"
filterable
clearable
remote
reserve-keyword
placeholder="请输入姓名或工号查询"
:remote-method="createRemoteMethod(helpUserOptions)"
@change="helpUserChange">
<el-option
v-for="item in helpUserOptions"
:key="item.id"
:label="item.userName+''+item.loginName+''+''+item.unitName+''+''+item.sex+''"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="收款人">
<el-form-item prop="payUserId" label="慰问对象">
<el-select
style="width: 100%"
v-model="formData.payUserId"
filterable
clearable
remote
reserve-keyword
placeholder="请输入姓名或工号查询"
:remote-method="createRemoteMethod(payUserOptions)"
@change="payUserChange">
<el-option
v-for="item in payUserOptions"
:key="item.id"
:label="item.userName+''+item.loginName+''+''+item.unitName+''+''+item.sex+''"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="慰问类型">
<el-select v-model="formData.type" @change="typeChange" style="width: 100%"
placeholder="请选择慰问类型">
<el-option v-for="item in typeOptions"
:value="item.id"
:key="item.id"
:disabled="item.isDisabled"
:label="item.name"></el-option>
</el-select>
</el-descriptions-item>
<el-descriptions-item label="慰问方式">
<el-form-item prop="way" label="慰问方式">
<el-select v-model="formData.way"
placeholder="选择慰问类型自动匹配慰问方式"
style="width: 100%"
clearable
disabled>
<el-option label="慰问金 (A)" value="1"></el-option>
<el-option label="提货券 (B)" value="2"></el-option>
<el-option label="慰问品 (C)" value="3"></el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="慰问金额">
<el-form-item prop="money" label="慰问金额">
<el-input style="width: 100%" v-model="formData.money"
controls-position="right"
:controls="false"
precision="2"
placeholder="选择慰问类型自动匹配金额"
:min="0"
:max="10000"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="慰问时间">
<el-form-item label="慰问时间" prop="occurTime">
<el-date-picker
clearable
style="width: 100%"
v-model="formData.occurTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择慰问时间">
</el-date-picker>
</el-form-item>
</el-descriptions-item>
<template v-if="['2'].includes(formData.type)">
<el-descriptions-item label="孩次">
<el-form-item prop="child" label="孩次">
<el-select v-model="formData.child" placeholder="请选择孩次"
style="width: 100%"
clearable>
<el-option label="一孩" value="一孩"></el-option>
<el-option label="二孩" value="二孩"></el-option>
<el-option label="三孩" value="三孩"></el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
</template>
<template v-if="['3','4'].includes(formData.type)">
<el-descriptions-item label="治疗医院">
<el-form-item prop="hospital" label="治疗医院">
<el-input v-model="formData.hospital" maxlength="50" placeholder="请填写治疗医院"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="病房号">
<el-form-item prop="hospitalHouseNum" label="病房号">
<el-input v-model="formData.hospitalHouseNum" maxlength="50" placeholder="请填写病房号" type="number"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="床号">
<el-form-item prop="hospitalHouseBedNum" label="床号">
<el-input v-model="formData.hospitalHouseBedNum" maxlength="50" placeholder="请填写床号" type="number"></el-input>
</el-form-item>
</el-descriptions-item>
</template>
<template v-if="['4'].includes(formData.type)">
<el-descriptions-item label="患病病种">
<el-form-item prop="hospitalBy" label="患病病种">
<el-input v-model="formData.hospitalBy" maxlength="50" placeholder="请填写患病病种"></el-input>
</el-form-item>
</el-descriptions-item>
</template>
<template v-if="['6'].includes(formData.type)">
<el-descriptions-item label="直系亲属">
<el-form-item prop="deadImmediateFamily" label="直系亲属">
<el-select v-model="formData.deadImmediateFamily">
<el-option label="配偶" value="配偶"></el-option>
<el-option label="父亲" value="父亲"></el-option>
<el-option label="母亲" value="母亲"></el-option>
<el-option label="子女" value="子女"></el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
</template>
<el-descriptions-item label="申请事由" :span="2">
<el-form-item prop="remark" label="申请事由">
<el-input maxlength="500" v-model="formData.remark" placeholder="请填写申请事由"
type="textarea" :autosize="{ minRows: 4, maxRows: 8}"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :span="2" v-if="chooseType.isUploadFile === true">
<template slot="label">
附件
<el-tooltip class="item" effect="dark" :content="'上传附件说明:' + chooseType.uploadFileDesc"
placement="top-start"
v-if="chooseType.isUploadFile && chooseType.uploadFileDesc">
<i class="el-icon-question"></i>
</el-tooltip>
</template>
<el-form-item prop="files" label="附件">
<file-upload
:value.sync="formData.files"
:upload_number="5"
upload_result_category="array"
complete_result
upload_mode="drag"
></file-upload>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="签字" :span="2">
<el-form-item prop="signature" label="签字">
<pc-signature v-model="formData.signature"></pc-signature>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
</el-form>
<snaker-flow-task-form-action @task-action="handleTaskAction" @save-draft="handleSaveDraft" @cancel="handleCancel"></snaker-flow-task-form-action>
</div>
<script>
new Vue({
el: "#condolence-apply-form",
store,
data() {
return {
id: GetQueryString("businessId"),
taskId: GetQueryString("taskId"),
instanceId: GetQueryString("instanceId"),
formData: {},
formRules: {
helpUserId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
payUserId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
type: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
way: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
money: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
occurTime: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
child: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
hospital: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
hospitalHouseNum: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
hospitalHouseBedNum: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
hospitalBy: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
deadImmediateFamily: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
remark: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
files: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
signature: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
},
chooseType: {},
payUserOptions: [],
helpUserOptions: [],
typeOptions: [],
}
},
methods: {
createRemoteMethod(options) {
return (keyword) => {
this.selectQueryUser(keyword, options)
}
},
selectQueryUser(keyword, options) {
options.length = 0
this.$axios.post("/platform/condolence/apply/listUser", { keyword: keyword }).then((res) => {
if (res.code === 0) {
options.push(...res.data)
}
})
},
helpUserChange(val) {
const user = this.helpUserOptions.find(o => o.id === val)
if(user) {
const { userName, loginName, unitId, unitName, unionId, unionName } = user
this.$set(this.formData, "helpUserName", userName)
this.$set(this.formData, "helpLoginName", loginName)
this.$set(this.formData, "helpUnitId", unitId)
this.$set(this.formData, "helpUnitName", unitName)
this.$set(this.formData, "helpUnionId", unionId)
this.$set(this.formData, "helpUnionName", unionName)
}
},
payUserChange(val) {
const user = this.payUserOptions.find(o => o.id === val)
if(user) {
const { userName, loginName } = user
this.$set(this.formData, "payUserName", userName)
this.$set(this.formData, "payLoginName", loginName)
}
},
typeChange(id) {
this.chooseType = this.typeOptions.find(o => o.id === id)
if (this.chooseType) {
this.$set(this.formData, "money", this.chooseType.money)
this.$set(this.formData, "way", this.chooseType.way)
}
},
init() {
if (this.id) {
this.$axios.post("/platform/condolence/view/info", { id: this.id }).then((res) => {
if (res.code === 0) {
this.formData = res.data
}
})
} else {
const { username, loginname, id, unit, union, mobile } = this.$store.state.user
this.formData = {
applyUserName: username,
applyLoginName: loginname,
applyUserId: id,
applyUnitId: unit?.id,
applyUnitName: unit?.name,
applyUnionId: union?.id,
applyUnionName: union?.name,
}
}
},
handleTaskAction(val) {
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$axios
.post("/flow/common/startInstanceAndExecute", {
...val,
bizData: JSON.stringify(this.formData)
})
.then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
// 发送完成消息
window.parent.postMessage(
{
type: "task-complete"
},
"*"
)
}
})
}
})
},
handleSaveDraft(val) {
this.$refs.formRef.validateField(["helpUserId"], (errMsg) => {
if (errMsg) {
this.$message.warning("请选择慰问对象")
return
}
this.$axios
.post("/flow/common/startInstance", {
...val,
bizData: JSON.stringify(this.formData)
})
.then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
// 发送完成消息
window.parent.postMessage(
{
type: "task-complete"
},
"*"
)
}
})
})
},
handleCancel() {window.close()},
queryCondolenceType() {
this.$axios.post('/platform/condolence/type/queryCondolenceType')
.then((resp) => {
this.typeOptions = resp.data
})
},
},
created() {
this.queryCondolenceType()
this.init()
}
})
</script>
@@ -0,0 +1,139 @@
<!--#
layout("/layouts/platform.html"){
#-->
<guava ref="guava">
<div id="app">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker
v-model="pageForm.year"
ype="year"
value-format="yyyy"
placeholder="年度"
style="width: 100%"
@change="doSearch"
></el-date-picker>
</search-item>
<search-item label="姓名/工号">
<el-input placeholder="请输入慰问对象姓名或工号查询" clearable v-model="pageForm.searchKeyword"
@keyup.enter.native="doSearch">
</el-input>
</search-item>
<search-item label="慰问类型">
<el-select v-model="pageForm.type" @change="doSearch" style="width: 100%"
placeholder="请选择慰问类型">
<el-option v-for="item in typeOptions"
:value="item.id"
:key="item.id"
:label="item.name"
></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<table-tool label="申请列表">
<el-button type="primary" size="small" @click="onAdd">
<i class="ti-plus"></i>
新增申请
</el-button>
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.prop"
:width="column.width"
:sortable="column.sortable"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template v-slot="{ row }" v-if="column.prop === 'instanceState'">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="300px">
<template slot-scope="{row}">
<el-button @click="onOpen(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskKey === 'apply' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
<el-button v-if="['waiting'].includes(row.flow_status)" size="mini" type="danger" @click="onRevoke(row.id)">撤销</el-button>
<el-button v-if="row.taskKey === 'apply' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">
删除
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</div>
</guava>
<script>
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
typeOptions: [],
tableColumns: [
{prop: 'helpUserName', label: '慰问对象'},
{prop: 'helpLoginName', label: '慰问对象工号'},
{prop: 'applyUserName', label: '申请人'},
{prop: 'applyUnionName', label: '所属工会'},
{prop: 'applyUnitName', label: '所属单位'},
{prop: 'typeName', label: '慰问类型'},
{prop: 'taskName', label: '当前节点'},
{prop: 'instanceState', label: '流程状态'},
],
}
},
methods: {
onAdd() {
window.open("/flow/common/approval/form?defineKey=ZGWW")
},
onOpen(row) {
window.open(
"/flow/common/approval/form?instanceId=" +
(row.instanceId || "") +
"&businessId=" +
row.id +
"&defineKey=ZGWW"
)
},
onEdit(row) {
window.open(
"/flow/common/approval/form?taskId=" +
(row.taskId || "") +
"&instanceId=" +
(row.instanceId || "") +
"&businessId=" +
row.id +
"&defineKey=ZGWW"
)
},
onRevoke(id) {},
onDelete(id) {},
queryCondolenceType() {
this.$axios.post('/platform/condolence/type/queryCondolenceType')
.then((resp) => {
this.typeOptions = resp.data
})
},
},
created() {
this.queryCondolenceType()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,46 @@
<div id="condolence-apply-form" v-cloak>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix="" class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
</el-form>
<snaker-flow-task-form-action @task-action="handleTaskAction" @cancel="handleCancel"></snaker-flow-task-form-action>
</div>
<script>
new Vue({
el: "#condolence-apply-form",
store,
data() {
return {
businessId: GetQueryString("businessId"),
formData: {},
formRules: {}
}
},
methods: {
handleTaskAction(val) {
this.$axios
.post("/flow/common/executeTask", {
data: JSON.stringify({
...val,
...this.formData
})
})
.then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
// 发送完成消息
window.parent.postMessage(
{
type: "task-complete"
},
"*"
)
}
})
},
handleCancel(val) {}
}
})
</script>
@@ -0,0 +1,125 @@
<!--#
layout("/layouts/platform.html"){
#-->
<guava ref="guava">
<div id="app">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker
v-model="pageForm.year"
type="year"
value-format="yyyy"
placeholder="年度"
style="width: 100%"
@change="doSearch"
></el-date-picker>
</search-item>
<search-item label="姓名/工号">
<el-input placeholder="请输入慰问对象姓名或工号查询" clearable v-model="pageForm.searchKeyword"
@keyup.enter.native="doSearch">
</el-input>
</search-item>
<search-item label="慰问类型">
<el-select v-model="pageForm.type" @change="doSearch" style="width: 100%"
placeholder="请选择慰问类型">
<el-option v-for="item in typeOptions"
:value="item.id"
:key="item.id"
:label="item.name"
></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<table-tool label="申请列表">
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
<el-radio-button :label="true">已审核</el-radio-button>
<el-radio-button :label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.prop"
:width="column.width"
:sortable="column.sortable"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template v-slot="{ row }" v-if="column.prop === 'instanceState'">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="300px">
<template slot-scope="{row}">
<el-button @click="onOpen(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskState === 10" @click="openApproval(row)" size="mini" type="primary">审核</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</div>
</guava>
<script>
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
pageForm: {
approval: false
},
typeOptions: [],
tableColumns: [
{prop: 'helpUserName', label: '慰问对象'},
{prop: 'helpLoginName', label: '慰问对象工号'},
{prop: 'applyUserName', label: '申请人'},
{prop: 'applyUnionName', label: '所属工会'},
{prop: 'applyUnitName', label: '所属单位'},
{prop: 'typeName', label: '慰问类型'},
{prop: 'taskName', label: '当前节点'},
{prop: 'instanceState', label: '流程状态'},
],
}
},
methods: {
onOpen(row) {
window.open(
"/flow/common/approval/form?instanceId=" +
(row.instanceId || "") +
"&businessId=" +
row.id +
"&defineKey=ZGWW"
)
},
openApproval(row) {
window.open("/flow/common/approval/form?taskId=" + row.taskId + "&instanceId=" + row.instanceId + "&businessId=" + row.businessNo)
},
queryCondolenceType() {
this.$axios.post('/platform/condolence/type/queryCondolenceType')
.then((resp) => {
this.typeOptions = resp.data
})
},
},
created() {
this.queryCondolenceType()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,141 @@
<!--#
layout("/layouts/platform.html"){
#-->
<guava ref="guava">
<div id="app">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker
v-model="pageForm.year"
type="year"
value-format="yyyy"
placeholder="年度"
style="width: 100%"
@change="doSearch"
></el-date-picker>
</search-item>
<search-item label="姓名/工号">
<el-input placeholder="请输入慰问对象姓名或工号查询" clearable v-model="pageForm.searchKeyword"
@keyup.enter.native="doSearch">
</el-input>
</search-item>
<search-item label="慰问类型">
<el-select v-model="pageForm.type" @change="doSearch" style="width: 100%"
placeholder="请选择慰问类型">
<el-option v-for="item in typeOptions"
:value="item.id"
:key="item.id"
:label="item.name"
></el-option>
</el-select>
</search-item>
<search-item label="所属工会:">
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable
@change="doSearch" style="width: 100%">
<el-option
v-for="item in unionList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</search-item>
<search-item label="所属单位:">
<el-select @change="doSearch"
clearable
filterable
placeholder="请选择单位" style="width: 100%" v-model="pageForm.unitId">
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unitList"></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<table-tool label="申请列表">
<el-button @click="onExport" icon="el-icon-s-promotion" type="primary" size="small">导出</el-button>
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.prop"
:width="column.width"
:sortable="column.sortable"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template v-slot="{ row }" v-if="column.prop === 'instanceState'">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="100">
<template slot-scope="{row}">
<el-button @click="onOpen(row)" size="mini" type="primary">查看</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</div>
</guava>
<script>
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
typeOptions: [],
tableColumns: [
{prop: 'helpUserName', label: '慰问对象'},
{prop: 'helpLoginName', label: '慰问对象工号'},
{prop: 'applyUserName', label: '申请人'},
{prop: 'applyUnionName', label: '所属工会'},
{prop: 'applyUnitName', label: '所属单位'},
{prop: 'typeName', label: '慰问类型'},
{prop: 'taskName', label: '当前节点'},
{prop: 'instanceState', label: '流程状态'},
],
unionList: [],
unitList: [],
}
},
methods: {
onExport() {
this.$downLoad(loc() + '/onExport', this.pageForm)
},
onOpen(row) {
window.open(
"/flow/common/approval/form?instanceId=" +
(row.instanceId || "") +
"&businessId=" +
row.id +
"&defineKey=ZGWW"
)
},
queryCondolenceType() {
this.$axios.post('/platform/condolence/type/queryCondolenceType')
.then((resp) => {
this.typeOptions = resp.data
})
},
},
async created() {
this.unionList = await this.$businessTool.listUnion()
this.unitList = await this.$businessTool.listUnit()
this.queryCondolenceType()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,46 @@
<div id="condolence-apply-form" v-cloak>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix="" class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
</el-form>
<snaker-flow-task-form-action @task-action="handleTaskAction" @cancel="handleCancel"></snaker-flow-task-form-action>
</div>
<script>
new Vue({
el: "#condolence-apply-form",
store,
data() {
return {
businessId: GetQueryString("businessId"),
formData: {},
formRules: {}
}
},
methods: {
handleTaskAction(val) {
this.$axios
.post("/flow/common/executeTask", {
data: JSON.stringify({
...val,
...this.formData
})
})
.then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
// 发送完成消息
window.parent.postMessage(
{
type: "task-complete"
},
"*"
)
}
})
},
handleCancel(val) {}
}
})
</script>
@@ -0,0 +1,148 @@
<!--#
layout("/layouts/platform.html"){
#-->
<guava ref="guava">
<div id="app">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker
v-model="pageForm.year"
type="year"
value-format="yyyy"
placeholder="年度"
style="width: 100%"
@change="doSearch"
></el-date-picker>
</search-item>
<search-item label="姓名/工号">
<el-input placeholder="请输入慰问对象姓名或工号查询" clearable v-model="pageForm.searchKeyword"
@keyup.enter.native="doSearch">
</el-input>
</search-item>
<search-item label="慰问类型">
<el-select v-model="pageForm.type" @change="doSearch" style="width: 100%"
placeholder="请选择慰问类型">
<el-option v-for="item in typeOptions"
:value="item.id"
:key="item.id"
:label="item.name"
></el-option>
</el-select>
</search-item>
<search-item label="所属工会:">
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable
@change="doSearch" style="width: 100%">
<el-option
v-for="item in unionList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</search-item>
<search-item label="所属单位:">
<el-select @change="doSearch"
clearable
filterable
placeholder="请选择单位" style="width: 100%" v-model="pageForm.unitId">
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unitList"></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<table-tool label="申请列表">
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
<el-radio-button :label="true">已审核</el-radio-button>
<el-radio-button :label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.prop"
:width="column.width"
:sortable="column.sortable"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template v-slot="{ row }" v-if="column.prop === 'instanceState'">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="300px">
<template slot-scope="{row}">
<el-button @click="onOpen(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskState === 10" @click="openApproval(row)" size="mini" type="primary">审核</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</div>
</guava>
<script>
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
data() {
return {
pageForm: {
approval: false
},
typeOptions: [],
tableColumns: [
{prop: 'helpUserName', label: '慰问对象'},
{prop: 'helpLoginName', label: '慰问对象工号'},
{prop: 'applyUserName', label: '申请人'},
{prop: 'applyUnionName', label: '所属工会'},
{prop: 'applyUnitName', label: '所属单位'},
{prop: 'typeName', label: '慰问类型'},
{prop: 'taskName', label: '当前节点'},
{prop: 'instanceState', label: '流程状态'},
],
unionList: [],
unitList: [],
}
},
methods: {
onOpen(row) {
window.open(
"/flow/common/approval/form?instanceId=" +
(row.instanceId || "") +
"&businessId=" +
row.id +
"&defineKey=ZGWW"
)
},
openApproval(row) {
window.open("/flow/common/approval/form?taskId=" + row.taskId + "&instanceId=" + row.instanceId + "&businessId=" + row.businessNo)
},
queryCondolenceType() {
this.$axios.post('/platform/condolence/type/queryCondolenceType')
.then((resp) => {
this.typeOptions = resp.data
})
},
},
async created() {
this.unionList = await this.$businessTool.listUnion()
this.unitList = await this.$businessTool.listUnit()
this.queryCondolenceType()
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,99 @@
const basicForm = {
template: /*language=HTML*/ `
<div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="110px" label-position="left">
<el-form-item label="类型编码" prop="code">
<el-input type="text" v-model="formData.code" maxlength="50"
placeholder="请填写类型编码"></el-input>
</el-form-item>
<el-form-item label="类型名称" prop="name">
<el-input type="text" v-model="formData.name" maxlength="50"
placeholder="请填写类型名称"></el-input>
</el-form-item>
<el-form-item label="慰问费用" prop="money">
<el-input-number style="width: 100%" v-model="formData.money"
placeholder="请填写慰问费用" controls-position="right" :controls="false"
precision="2"
:min="0"
:max="10000"></el-input-number>
</el-form-item>
<el-form-item label="慰问方式" prop="way">
<el-radio-group v-model="formData.way">
<el-radio-button label="慰问金 (A)" border>慰问金 (A)</el-radio-button>
<el-radio-button label="提货券 (B)" border>提货券 (B)</el-radio-button>
<el-radio-button label="慰问品 (C)" border>慰问品 (C)</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="是否禁用" prop="isDisabled">
<el-switch
v-model="formData.isDisabled"
active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
</el-form-item>
<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 label="是否上传附件" prop="isUploadFile">
<el-radio-group v-model="formData.isUploadFile">
<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 label="上传附件说明" prop="uploadFileDesc" v-if="formData.isUploadFile">
<el-input v-model="formData.uploadFileDesc" maxlength="50" clearable placeholder="请填写上传附件说明"></el-input>
</el-form-item>
</el-form>
<el-row class="mt10" justify="end" type="flex">
<el-button @click="$emit('refresh')">取消</el-button>
<el-button @click="onSubmit" type="primary">提交</el-button>
</el-row>
</div>
`,
data() {
return {
formData: {},
formRules: {
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
money: [{required: true, message: '必填', trigger: ['blur', 'change']}],
way: [{required: true, message: '必填', trigger: ['blur', 'change']}],
code: [{required: true, message: '必填', trigger: ['blur', 'change']}],
isUploadFile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
}
},
methods: {
onOpen(row) {
if(row && row.id) {
this.formData = clone(row)
}
},
onSubmit() {
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(async () => {
const resp = await this.$axios.post("/platform/condolence/type/onSubmit", this.formData)
if (resp.code === 0) {
this.$message.success(resp.msg)
this.$emit('refresh')
} else {
this.$message.warning(resp.msg)
}
})
}
})
},
},
style: /*language=CSS*/ `
.el-input-number .el-input__inner {
text-align: left;
}
`
}
@@ -0,0 +1,148 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
</style>
<div id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<search @search="doSearch">
<search-item label="名称/编码:">
<el-input placeholder="请输入名称或编码查询" clearable v-model="pageForm.searchKeyword"
@keyup.enter.native="doSearch">
</el-input>
</search-item>
</search>
</el-card>
<el-card shadow="never" class="mt20">
<table-tool label="类型列表">
<el-button type="primary" size="small" @click="onAdd">
<i class="ti-plus"></i>
新增类型
</el-button>
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" :size="tableSize">
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.prop"
:width="column.width"
:sortable="column.sortable"
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template v-slot="{ row }" v-if="column.prop === 'isUploadFile'">
<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'">
<el-switch
@change="switchChange(row)"
v-model="row.isDisabled"
active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
</template>
</el-table-column>
<el-table-column label="操作" width="230">
<template v-slot="{ row }">
<el-button @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
<el-button @click="onDelete(row)" size="mini" type="danger">删除</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #edit>
<basic-form ref="basicFormRef" @refresh="refresh"></basic-form>
</template>
</guava>
</div>
<script>
<!--#include('basicForm.js'){}#-->
const vue = new Vue({
el: "#app",
mixins: [initTableMixins],
components: {
"basic-form": basicForm,
},
data() {
return {
tableColumns: [
{prop: 'code', label: '类型编码'},
{prop: 'name', label: '类型名称'},
{prop: 'money', label: '金额'},
{prop: 'way', label: '慰问方式'},
{prop: 'isUploadFile', label: '是否上传附件'},
{prop: 'isDisabled', label: '是否禁用'},
],
}
},
methods: {
refresh() {
this.doSearch()
this.$refs.guava.index()
},
onAdd() {
this.$refs.guava.edit(() => {
this.$refs.basicFormRef.onOpen()
})
},
onEdit(row) {
this.$refs.guava.edit(() => {
this.$refs.basicFormRef.onOpen(row)
})
},
onDelete(row) {
this.$confirm("您确定要删除吗, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.$axios.post("/platform/condolence/type/onDelete", { id: row.id }).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.pageData()
}
})
})
.catch(() => {})
},
switchChange(row) {
this.$axios.post("/platform/condolence/type/onSubmit", row).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.pageData()
}
})
},
pageData() {
this.$axios.post(loc() + "/pageData", this.pageForm).then((res) => {
if (res.code === 0) {
this.tableData = res.data.list
this.pageForm.totalCount = res.data.totalCount
}
})
},
},
async created() {
this.pageData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,107 @@
<div id="condolence-view">
<el-descriptions :column="2" border>
<el-descriptions-item label="申请人姓名">{{ viewData.applyUserName }}</el-descriptions-item>
<el-descriptions-item label="申请人工号">{{ viewData.applyLoginName }}</el-descriptions-item>
<el-descriptions-item label="申请人单位">{{ viewData.applyUnitName }}</el-descriptions-item>
<el-descriptions-item label="申请人工会">{{ viewData.applyUnionName }}</el-descriptions-item>
<el-descriptions-item label="慰问对象">{{ viewData.helpUserName }}</el-descriptions-item>
<el-descriptions-item label="收款人">{{ viewData.payUserName }}</el-descriptions-item>
<el-descriptions-item label="慰问类型">{{ viewData.typeName }}</el-descriptions-item>
<el-descriptions-item label="慰问方式">{{ viewData.way }}</el-descriptions-item>
<el-descriptions-item label="慰问金额">{{ viewData.money }}</el-descriptions-item>
<el-descriptions-item label="慰问时间">{{ viewData.occurTime }}</el-descriptions-item>
<el-descriptions-item v-if="['2'].includes(viewData.type)" label="孩次">{{ viewData.child }}</el-descriptions-item>
<el-descriptions-item v-if="['3','4'].includes(viewData.type)" label="治疗医院">{{ viewData.hospital }}</el-descriptions-item>
<el-descriptions-item v-if="['3','4'].includes(viewData.type)" label="病房号">{{ viewData.hospitalHouseNum }}</el-descriptions-item>
<el-descriptions-item v-if="['3','4'].includes(viewData.type)" label="床号">{{ viewData.hospitalHouseBedNum }}</el-descriptions-item>
<el-descriptions-item v-if="['4'].includes(viewData.type)" label="患病病种">{{ viewData.hospitalBy }}</el-descriptions-item>
<el-descriptions-item v-if="['6'].includes(viewData.type)" label="直系亲属">{{ viewData.deadImmediateFamily }}</el-descriptions-item>
<el-descriptions-item label="申请事由" :span="2">{{ viewData.remark }}</el-descriptions-item>
<el-descriptions-item label="附件" :span="2">
<file-preview v-if="viewData.files && viewData.files.length > 0" :files="viewData.files" complete_result></file-preview>
<span v-else>暂无附件</span>
</el-descriptions-item>
<el-descriptions-item label="签字" :span="2">
<el-image :src="viewData.signature"
v-if="viewData.signature"
class="signature-image"></el-image>
<span v-else>暂无签字</span>
</el-descriptions-item>
</el-descriptions>
<template v-for="task in doneTasks">
<div class="task-panel mt10">
<div class="task-panel-header">{{ task.displayName }}</div>
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-if="task.ext.isFirstTaskNode">
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName }}({{task.ext.initiatorAccount}})</el-descriptions-item>
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
<el-descriptions-item label="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE" :value="task.ext.submitType"></dict-tag>
</el-descriptions-item>
</el-descriptions>
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName }}({{task.taskFormData.loginName}})</el-descriptions-item>
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
<el-descriptions-item label="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE" :value="task.ext.submitType"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{ task.taskFormData.opinion }}</el-descriptions-item>
</el-descriptions>
</div>
</template>
</div>
<script>
new Vue({
el: "#condolence-view",
store,
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
data() {
return {
businessId: GetQueryString("businessId"),
instanceId: GetQueryString("instanceId"),
viewData: {},
doneTasks: []
}
},
methods: {
info() {
this.$axios.post("/platform/condolence/view/info", { id: this.businessId }).then((res) => {
if (res.code === 0) {
this.viewData = res.data
}
})
},
getDoneTasks() {
this.$axios.post("/flow/common/doneTasks", { instanceId: this.instanceId }).then((res) => {
if (res.code === 0) {
this.doneTasks = res.data
}
})
}
},
created() {
this.info()
this.getDoneTasks()
}
})
</script>
<style>
.task-panel {
background: white;
border-radius: 4px;
overflow: hidden;
}
.task-panel-header {
background: rgb(250, 250, 250);
border: 1px solid rgb(228, 231, 237);
border-bottom: none;
padding: 12px 16px;
display: flex;
justify-content: space-between;
align-items: center;
}
</style>