..
This commit is contained in:
@@ -207,4 +207,7 @@ public class View_user {
|
||||
|
||||
@Column
|
||||
private String clubIds;
|
||||
|
||||
@Column
|
||||
private Boolean aidFundMember;
|
||||
}
|
||||
|
||||
-83
@@ -1,83 +0,0 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.controller;
|
||||
|
||||
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.zhgh.dayofficework.fund.service.FundMemberService;
|
||||
import io.swagger.annotations.Api;
|
||||
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.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/fundMember/query")
|
||||
@Ok("json:full")
|
||||
@Api(tags = "基金会员-查询")
|
||||
public class FundMemberQueryController {
|
||||
|
||||
@Inject
|
||||
private FundMemberService fundMemberService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fundMember/query/index.html")
|
||||
@SaCheckPermission("fundMember.query")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.query")
|
||||
public Result pageData(PageForm pageForm, Integer year) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
ins.variable instanceVariable,
|
||||
ins.processDefineId instanceProcessDefineId,
|
||||
t.id taskId,
|
||||
t.taskName AS taskKey,
|
||||
t.displayName taskName,
|
||||
t.taskType,
|
||||
t.performType taskPerformType,
|
||||
t.taskState,
|
||||
t.finishTime,
|
||||
t.taskParentId
|
||||
FROM
|
||||
fund_member info
|
||||
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.orLike("info.userName", pageForm.getSearchKeyword());
|
||||
seg.orLike("info.loginName", pageForm.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
cnd.andEX("YEAR(info.submitTime)", "=", year);
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = fundMemberService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.query")
|
||||
@Ok("void")
|
||||
public void exportExcel(Integer year, HttpServletResponse response) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.ExcelImportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.ImportParams;
|
||||
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.annotation.SLog;
|
||||
import com.budwk.app.base.model.ExcelImportRes;
|
||||
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.sys.models.Sys_user;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.mode.FundMemberImportExcelMode;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberChangeRecordService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.nutz.dao.Chain;
|
||||
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.mvc.annotation.AdaptBy;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
import org.nutz.mvc.upload.TempFile;
|
||||
import org.nutz.mvc.upload.UploadAdaptor;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/fundMember/batchJoin")
|
||||
@Ok("json:full")
|
||||
@Api("基金会员-批量加入")
|
||||
public class FundMemberBatchJoinController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FundMemberService fundMemberService;
|
||||
@Inject
|
||||
private FundMemberChangeRecordService fundMemberChangeRecordService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fund/member/batchJoin/index.html")
|
||||
@SaCheckPermission("fundMember.batchJoin")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.batchJoin")
|
||||
public Result pageData(PageForm pageForm, String unionId, String unitId, String userState) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
id,
|
||||
username,
|
||||
loginname,
|
||||
sex,
|
||||
userState,
|
||||
unitName,
|
||||
unionName
|
||||
FROM
|
||||
vw_user
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("aidFundMember", "!=", 1);
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("username", pageForm.getSearchKeyword());
|
||||
seg.orLike("loginname", pageForm.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
|
||||
cnd.andEX("unionId", "=", unionId);
|
||||
cnd.andEX("unitId", "=", unitId);
|
||||
cnd.andEX("userState", "=", userState);
|
||||
cnd.asc("unionName").asc("unitName").asc("id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = fundMemberService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.batchJoin")
|
||||
@ApiOperation("批量加入")
|
||||
@SLog(tag = "基金会员-批量加入", msg = "批量加入")
|
||||
public Result confirm(@Param("loginNames") String[] loginNames) {
|
||||
dao.update(Sys_user.class, Chain.make("aidFundMember", 1), Cnd.where("id", "in", loginNames));
|
||||
for (String loginName : loginNames) {
|
||||
fundMemberChangeRecordService.insertRecord(loginName, true, "批量加入");
|
||||
}
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.batchJoin")
|
||||
@ApiOperation("批量导入")
|
||||
@SLog(tag = "基金会员-批量导入", msg = "批量导入")
|
||||
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
|
||||
public Result batchImport(@Param("file") TempFile file) {
|
||||
// 读取
|
||||
List<FundMemberImportExcelMode> importMembers = ExcelImportUtil.importExcel(file.getFile(), FundMemberImportExcelMode.class, new ImportParams());
|
||||
// 创建结果集
|
||||
ExcelImportRes<FundMemberImportExcelMode> excelImportRes = new ExcelImportRes<>();
|
||||
excelImportRes.setTotalRecords(importMembers.size());
|
||||
|
||||
for (int i = 0; i < importMembers.size(); i++) {
|
||||
FundMemberImportExcelMode member = importMembers.get(i);
|
||||
|
||||
if (StrUtil.isBlank(member.getLoginName())) {
|
||||
member.setErrInfo("工号为空", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
int count = dao.count(Sys_user.class, Cnd.where(Sys_user::getLoginname, "=", member.getLoginName()));
|
||||
if (count == 0) {
|
||||
member.setErrInfo("系统中查询不到该用户", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
dao.update(Sys_user.class, Chain.make("aidFundMember", 1), Cnd.where(Sys_user::getLoginname, "=", member.getLoginName()));
|
||||
fundMemberChangeRecordService.insertRecord(member.getLoginName(), true, "批量导入");
|
||||
}
|
||||
|
||||
// 添加错误记录
|
||||
excelImportRes.setErrorDetails(importMembers.stream().filter(s -> StrUtil.isNotBlank(s.getErrMsg())).collect(Collectors.toList()));
|
||||
excelImportRes.setFailedCount(excelImportRes.getErrorDetails().size());
|
||||
excelImportRes.setSuccessCount(Math.max(importMembers.size() - excelImportRes.getFailedCount(), 0));
|
||||
return Result.success(excelImportRes);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.batchJoin")
|
||||
@Ok("void")
|
||||
public void downLoadTemplate(HttpServletResponse response) {
|
||||
List<ExcelExportEntity> entities = new ArrayList<>();
|
||||
entities.add(new ExcelExportEntity("工号", "loginName", 20));
|
||||
entities.add(new ExcelExportEntity("姓名", "userName", 20));
|
||||
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entities, Collections.emptyList());
|
||||
CommonDownloadUtil.download("基金会员导入模板.xlsx", workbook, response);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+6
-8
@@ -1,4 +1,4 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.controller;
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -6,12 +6,10 @@ 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.PageUtil;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.models.FundMember;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.service.FundMemberService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
@@ -34,7 +32,7 @@ public class FundMemberBranchUnionApprovalController {
|
||||
private FundMemberService fundMemberService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fundMember/branchUnionApproval/index.html")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fund/member/branchUnionApproval/index.html")
|
||||
@SaCheckPermission("fundMember.branchUnionApproval")
|
||||
public void index() {
|
||||
|
||||
@@ -65,15 +63,15 @@ public class FundMemberBranchUnionApprovalController {
|
||||
FROM
|
||||
wf_process_task t
|
||||
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||
LEFT JOIN fund_member info ON info.id = ins.businessNo
|
||||
LEFT JOIN fund_member_apply info ON info.id = ins.businessNo
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("t.taskName", "=", "fgh");
|
||||
if(!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())){
|
||||
cnd.and("t.taskName", "in", List.of("fgh", "ltx"));
|
||||
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
|
||||
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
|
||||
}
|
||||
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.controller;
|
||||
|
||||
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.zhgh.dayofficework.fund.member.models.FundMemberChangeRecord;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberChangeRecordService;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.nutz.dao.Cnd;
|
||||
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;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/fundMember/changeRecord")
|
||||
@Ok("json:full")
|
||||
@Api(tags = "基金会员变更记录")
|
||||
public class FundMemberChangeRecordController {
|
||||
|
||||
@Inject
|
||||
private FundMemberChangeRecordService fundMemberChangeRecordService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fund/member/changeRecord/index.html")
|
||||
@SaCheckPermission("fundMember.changeRecord")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.changeRecord")
|
||||
public Result pageData(PageForm pageForm, Integer year, String unionId, String unitId, String userState, Boolean isJoin) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("YEAR(changeTime)", "=", year);
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("loginName", pageForm.getSearchKeyword());
|
||||
seg.orLike("userName", pageForm.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
cnd.andEX(FundMemberChangeRecord::getUnionId, "=", unionId);
|
||||
cnd.andEX(FundMemberChangeRecord::getUserState, "=", userState);
|
||||
cnd.andEX(FundMemberChangeRecord::getIsJoin, "=", isJoin);
|
||||
|
||||
if (StrUtil.isAllNotBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) {
|
||||
cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
} else {
|
||||
cnd.desc(FundMemberChangeRecord::getChangeTime);
|
||||
}
|
||||
Pagination pagination = fundMemberChangeRecordService.listPage(pageForm.getPageNumber(), pageForm.getPageSize(), cnd);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
}
|
||||
+5
-5
@@ -1,4 +1,4 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.controller;
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
@@ -10,8 +10,8 @@ import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.vo.ProcessTaskVO;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.models.FundMember;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.service.FundMemberService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberApply;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -51,7 +51,7 @@ public class FundMemberCommonController {
|
||||
@At
|
||||
@SaCheckPermission("fundMember")
|
||||
public Result info(@Valid String id) {
|
||||
FundMember fundMember = fundMemberService.fetch(id);
|
||||
FundMemberApply fundMember = fundMemberService.fetch(id);
|
||||
return Result.success(fundMember);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class FundMemberCommonController {
|
||||
@Ok("void")
|
||||
@ApiOperation("导出申请表")
|
||||
public void exportDocx(@Valid String id, HttpServletResponse response) {
|
||||
FundMember fundMember = dao.fetch(FundMember.class, id);
|
||||
FundMemberApply fundMember = dao.fetch(FundMemberApply.class, id);
|
||||
Map<String, Object> docData = BeanUtil.beanToMap(fundMember);
|
||||
|
||||
docData.put("birthday", DateUtil.format(fundMember.getBirthday(), "yyyy年MM月dd日"));
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.controller;
|
||||
|
||||
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.zhgh.dayofficework.fund.member.service.FundMemberService;
|
||||
import io.swagger.annotations.Api;
|
||||
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.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/fundMember/his")
|
||||
@Ok("json:full")
|
||||
@Api(tags = "基金会员-历史")
|
||||
public class FundMemberHisController {
|
||||
|
||||
@Inject
|
||||
private FundMemberService fundMemberService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fund/member/his/index.html")
|
||||
@SaCheckPermission("fundMember.his")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.his")
|
||||
public Result pageData(PageForm pageForm, Integer year, String unionId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
his.*,
|
||||
(SELECT changeTime FROM fund_member_change_record WHERE loginName = his.loginName AND isJoin = 1 ORDER BY changeTime DESC) joinTime
|
||||
FROM
|
||||
fund_member_his his
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("username", pageForm.getSearchKeyword());
|
||||
seg.orLike("loginname", pageForm.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
cnd.andEX("year", "=", year);
|
||||
cnd.andEX("unionId", "=", unionId);
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = fundMemberService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+6
-7
@@ -1,14 +1,13 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.controller;
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.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.result.Result;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.models.FundMember;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.service.FundMemberService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberApply;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
@@ -39,7 +38,7 @@ public class FundMemberMineController {
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fundMember/mine/index.html")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fund/member/mine/index.html")
|
||||
@SaCheckPermission("fundMember.mine")
|
||||
public void index() {
|
||||
|
||||
@@ -68,7 +67,7 @@ public class FundMemberMineController {
|
||||
IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke,
|
||||
(select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask' AND taskState in (10,20)) AS startTaskId
|
||||
FROM
|
||||
fund_member info
|
||||
fund_member_apply info
|
||||
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
|
||||
@@ -87,7 +86,7 @@ public class FundMemberMineController {
|
||||
@ApiOperation("删除")
|
||||
@SLog(tag = "基金会员-我的申请", msg = "删除")
|
||||
public Result delete(@Param("id") String id) {
|
||||
dao.delete(FundMember.class, id);
|
||||
dao.delete(FundMemberApply.class, id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
return Result.success();
|
||||
}
|
||||
+235
@@ -0,0 +1,235 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.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.date.DateUtil;
|
||||
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.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.sys.models.Sys_user;
|
||||
import com.budwk.app.sys.views.View_user;
|
||||
import com.budwk.app.web.commons.base.Globals;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberApply;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberHis;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberChangeRecordService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Chain;
|
||||
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.aop.Aop;
|
||||
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 javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/fundMember/query")
|
||||
@Ok("json:full")
|
||||
@Api(tags = "基金会员-查询")
|
||||
public class FundMemberQueryController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FundMemberService fundMemberService;
|
||||
@Inject
|
||||
private FundMemberChangeRecordService fundMemberChangeRecordService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fund/member/query/index.html")
|
||||
@SaCheckPermission("fundMember.query")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.query")
|
||||
public Result pageData(PageForm pageForm, Integer year, String unionId) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
u.id,
|
||||
u.username AS userName,
|
||||
u.loginname AS loginName,
|
||||
u.sex,
|
||||
u.birthday,
|
||||
u.userState,
|
||||
u.unitName,
|
||||
u.unionName,
|
||||
(SELECT changeTime FROM fund_member_change_record WHERE loginName = u.loginName AND isJoin = 1 ORDER BY changeTime DESC) joinTime
|
||||
FROM
|
||||
vw_user u
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("u.aidFundMember", "=", 1);
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("u.username", pageForm.getSearchKeyword());
|
||||
seg.orLike("u.loginname", pageForm.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
cnd.andEX("u.unionId", "=", unionId);
|
||||
sql.setCondition(cnd);
|
||||
Pagination pagination = fundMemberService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.query")
|
||||
@Ok("void")
|
||||
@ApiOperation("导出登记汇总Excel")
|
||||
public void exportExcel(Integer year, String unionId, HttpServletResponse response) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("YEAR(submitTime)", "=", year);
|
||||
cnd.andEX("unionId", "=", unionId);
|
||||
cnd.andEX(FundMemberApply::getIsJoin, "=", 1);
|
||||
cnd.asc("unionId");
|
||||
List<FundMemberApply> list = fundMemberService.query(cnd);
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
list.get(i).setIndex(i + 1);
|
||||
}
|
||||
|
||||
List<ExcelExportEntity> exportEntities = new ArrayList<>();
|
||||
exportEntities.add(new ExcelExportEntity("序号", "index", 10));
|
||||
exportEntities.add(new ExcelExportEntity("工号", "loginName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("姓名", "userName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("分工会", "unionName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("性别", "sex", 10));
|
||||
|
||||
ExcelExportEntity birthEntity = new ExcelExportEntity("出生年月", "birthday", 20);
|
||||
birthEntity.setFormat("yyyy-MM-dd");
|
||||
exportEntities.add(birthEntity);
|
||||
|
||||
ExcelExportEntity joinWorkEntity = new ExcelExportEntity("入校工作时间", "joinWorkTime", 20);
|
||||
joinWorkEntity.setFormat("yyyy-MM-dd");
|
||||
exportEntities.add(joinWorkEntity);
|
||||
|
||||
ExcelExportEntity retireEntity = new ExcelExportEntity("退休时间", "retireTime", 20);
|
||||
retireEntity.setFormat("yyyy-MM-dd");
|
||||
exportEntities.add(retireEntity);
|
||||
|
||||
exportEntities.add(new ExcelExportEntity("身份证号码", "idCard", 20));
|
||||
exportEntities.add(new ExcelExportEntity("家庭住址", "address", 30));
|
||||
exportEntities.add(new ExcelExportEntity("联系电话", "mobile", 20));
|
||||
|
||||
String title = Globals.AppName + "教职工医疗互助“爱心”基金入会登记表";
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
exportParams.setTitle(title);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, list);
|
||||
CommonDownloadUtil.download(title + ".xlsx", workbook, response);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.query")
|
||||
@Ok("void")
|
||||
@ApiOperation("导出新会员Excel")
|
||||
public void exportNewMemberExcel(HttpServletResponse response) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
r.*
|
||||
FROM
|
||||
fund_member_change_record r
|
||||
LEFT JOIN sys_user u ON u.loginname = r.loginName
|
||||
WHERE
|
||||
r.isJoin = 1
|
||||
AND YEAR(r.changeTime) = @year
|
||||
AND u.aidFundMember = 1
|
||||
""");
|
||||
sql.setParam("year", DateUtil.thisYear());
|
||||
List<NutMap> list = fundMemberService.listMap(sql);
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
list.get(i).put("index", i + 1);
|
||||
}
|
||||
|
||||
List<ExcelExportEntity> exportEntities = new ArrayList<>();
|
||||
exportEntities.add(new ExcelExportEntity("序号", "index", 10));
|
||||
exportEntities.add(new ExcelExportEntity("工号", "loginName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("姓名", "userName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("分工会", "unionName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("性别", "sex", 10));
|
||||
|
||||
ExcelExportEntity birthEntity = new ExcelExportEntity("出生年月", "birthday", 20);
|
||||
birthEntity.setFormat("yyyy-MM-dd");
|
||||
exportEntities.add(birthEntity);
|
||||
|
||||
ExcelExportEntity joinWorkEntity = new ExcelExportEntity("入校工作时间", "joinWorkTime", 20);
|
||||
joinWorkEntity.setFormat("yyyy-MM-dd");
|
||||
exportEntities.add(joinWorkEntity);
|
||||
|
||||
ExcelExportEntity retireEntity = new ExcelExportEntity("退休时间", "retireTime", 20);
|
||||
retireEntity.setFormat("yyyy-MM-dd");
|
||||
exportEntities.add(retireEntity);
|
||||
|
||||
exportEntities.add(new ExcelExportEntity("身份证号码", "idCard", 20));
|
||||
exportEntities.add(new ExcelExportEntity("家庭住址", "address", 30));
|
||||
exportEntities.add(new ExcelExportEntity("联系电话", "mobile", 20));
|
||||
|
||||
String title = Globals.AppName + "医疗互助“爱心”基金" + DateUtil.thisYear() + "年新入会教职工";
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
exportParams.setTitle(title);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, list);
|
||||
CommonDownloadUtil.download(title + ".xlsx", workbook, response);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.query")
|
||||
@ApiOperation("退出基金")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Result quit(@Valid String loginName) {
|
||||
// 修改user表
|
||||
dao.update(Sys_user.class, Chain.make("aidFundMember", 0), Cnd.where(Sys_user::getLoginname, "=", loginName));
|
||||
// 添加变更记录
|
||||
fundMemberChangeRecordService.insertRecord(loginName, false, "台账管理-退会");
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundMember.query")
|
||||
@ApiOperation("备份")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "基金会员-备份", msg = "备份")
|
||||
public Result backup(Integer year) {
|
||||
dao.clear(FundMemberHis.class, Cnd.where(FundMemberHis::getYear, "=", year));
|
||||
List<View_user> list = dao.query(View_user.class, Cnd.where(View_user::getAidFundMember, "=", 1));
|
||||
|
||||
List<FundMemberHis> fundMemberHisList = list.stream().map(user -> {
|
||||
FundMemberHis his = new FundMemberHis();
|
||||
his.setYear(year);
|
||||
his.setLoginName(user.getLoginname());
|
||||
his.setUserName(user.getUsername());
|
||||
his.setSex(user.getSex());
|
||||
his.setBirthday(user.getBirthday());
|
||||
his.setIdCard(user.getIdCard());
|
||||
his.setMobile(user.getMobile());
|
||||
his.setUnionId(user.getUnionId());
|
||||
his.setUnionName(user.getUnionName());
|
||||
his.setUserState(user.getUserState());
|
||||
return his;
|
||||
}).toList();
|
||||
|
||||
dao.insert(fundMemberHisList);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
}
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.controller;
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -9,7 +9,7 @@ import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.service.FundMemberService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
@@ -32,7 +32,7 @@ public class FundMemberSchoolUnionApprovalController {
|
||||
private FundMemberService fundMemberService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fundMember/schoolUnionApproval/index.html")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fund/member/schoolUnionApproval/index.html")
|
||||
@SaCheckPermission("fundMember.schoolUnionApproval")
|
||||
public void index() {
|
||||
|
||||
@@ -63,7 +63,7 @@ public class FundMemberSchoolUnionApprovalController {
|
||||
FROM
|
||||
wf_process_task t
|
||||
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
|
||||
LEFT JOIN fund_member info ON info.id = ins.businessNo
|
||||
LEFT JOIN fund_member_apply info ON info.id = ins.businessNo
|
||||
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
|
||||
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
|
||||
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
|
||||
+8
-9
@@ -1,7 +1,6 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.controller;
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.result.Result;
|
||||
@@ -12,8 +11,7 @@ import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||
import com.budwk.app.flow.service.FlowCommonService;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.models.FundMember;
|
||||
import com.budwk.app.zhgh.democratic.suggestionBox.models.SuggestionBox;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberApply;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
@@ -42,7 +40,7 @@ public class FundMemberWriteController {
|
||||
private FlowCommonService flowCommonService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fundMember/write/index.html")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fund/member/write/index.html")
|
||||
@SaCheckPermission("fundMember.write")
|
||||
public void index() {
|
||||
|
||||
@@ -52,7 +50,7 @@ public class FundMemberWriteController {
|
||||
@SaCheckPermission("fundMember.write")
|
||||
@ApiOperation("保存申请")
|
||||
@SLog(tag = "建言献策-填写申请", msg = "保存申请")
|
||||
public Result save(@Param("data") FundMember fundMember) {
|
||||
public Result save(@Param("data") FundMemberApply fundMember) {
|
||||
dao.insertOrUpdate(fundMember);
|
||||
return Result.success();
|
||||
}
|
||||
@@ -63,8 +61,9 @@ public class FundMemberWriteController {
|
||||
@ApiOperation("提交申请")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "基金会员-填写申请", msg = "提交申请")
|
||||
public Result submit(@Param("data") FundMember fundMember) {
|
||||
public Result submit(@Param("data") FundMemberApply fundMember) {
|
||||
fundMember.setSubmitTime(new Date());
|
||||
fundMember.setIsJoin(true);
|
||||
dao.insertOrUpdate(fundMember);
|
||||
// 开启流程实例
|
||||
Dict args = Dict.create();
|
||||
@@ -85,7 +84,7 @@ public class FundMemberWriteController {
|
||||
@ApiOperation("重新提交申请")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(tag = "基金会员-填写申请", msg = "重新提交申请")
|
||||
public Result submitAgain(@Param("data") FundMember fundMember, @Param("taskId") Long taskId) {
|
||||
public Result submitAgain(@Param("data") FundMemberApply fundMember, @Param("taskId") Long taskId) {
|
||||
dao.insertOrUpdate(fundMember);
|
||||
|
||||
Dict dict = Dict.create();
|
||||
@@ -99,7 +98,7 @@ public class FundMemberWriteController {
|
||||
@SaCheckPermission("fundMember.write")
|
||||
@ApiOperation("获取申请信息")
|
||||
public Result info(@Param("id") String id) {
|
||||
FundMember box = dao.fetch(FundMember.class, id);
|
||||
FundMemberApply box = dao.fetch(FundMemberApply.class, id);
|
||||
return Result.success(box);
|
||||
}
|
||||
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.interceptor;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
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.sys.models.Sys_user;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberApply;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberChangeRecord;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.json.Json;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 基金会员审核通过拦截器
|
||||
*/
|
||||
public class FundMemberPassInterceptor implements FlowInterceptor {
|
||||
@Override
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public void intercept(Execution execution) {
|
||||
Dao dao = ServiceContext.find(Dao.class);
|
||||
FundMemberApply fundMemberApply = Json.fromJson(FundMemberApply.class, execution.getArgs().getStr("f_data"));
|
||||
// 修改基金会员状态
|
||||
dao.update(Sys_user.class, Chain.make("aidFundMember", 1), Cnd.where(Sys_user::getLoginname, "=", fundMemberApply.getLoginName()));
|
||||
// 添加到变更记录
|
||||
FundMemberChangeRecord record = BeanUtil.copyProperties(fundMemberApply, FundMemberChangeRecord.class, "id");
|
||||
record.setId(null);
|
||||
record.setChangeOrigin("流程申请");
|
||||
record.setChangeTime(new Date());
|
||||
dao.insert(record);
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.mode;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.budwk.app.base.model.ExcelImportError;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class FundMemberImportExcelMode extends ExcelImportError {
|
||||
|
||||
@Excel(name = "工号")
|
||||
private String loginName;
|
||||
|
||||
@Excel(name = "姓名")
|
||||
private String userName;
|
||||
|
||||
}
|
||||
+27
-8
@@ -1,5 +1,6 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.models;
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.models;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -9,11 +10,11 @@ import org.nutz.dao.interceptor.annotation.PrevInsert;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Table("fund_member")
|
||||
@Table("fund_member_apply")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("基金会员")
|
||||
public class FundMember extends BaseModel {
|
||||
public class FundMemberApply extends BaseModel {
|
||||
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@@ -21,16 +22,16 @@ public class FundMember extends BaseModel {
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("工号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String loginName;
|
||||
|
||||
@Column
|
||||
@Comment("姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String userName;
|
||||
|
||||
@Column
|
||||
@Comment("工资号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String loginName;
|
||||
|
||||
@Column
|
||||
@Comment("性别")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
@@ -76,6 +77,21 @@ public class FundMember extends BaseModel {
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String avatar;
|
||||
|
||||
@Column
|
||||
@Comment("分工会ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String unionId;
|
||||
|
||||
@Column
|
||||
@Comment("分工会名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String unionName;
|
||||
|
||||
@Column
|
||||
@Comment("用户状态")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String userState;
|
||||
|
||||
@Column
|
||||
@Comment("加入、退出")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
@@ -87,4 +103,7 @@ public class FundMember extends BaseModel {
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date submitTime;
|
||||
|
||||
@Excel(name = "序号")
|
||||
private Integer index;
|
||||
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.models;
|
||||
|
||||
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 java.util.Date;
|
||||
|
||||
@Data
|
||||
@Table("fund_member_change_record")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("基金会员变更记录")
|
||||
public class FundMemberChangeRecord extends BaseModel {
|
||||
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("工号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String loginName;
|
||||
|
||||
@Column
|
||||
@Comment("姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String userName;
|
||||
|
||||
@Column
|
||||
@Comment("性别")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String sex;
|
||||
|
||||
@Column
|
||||
@Comment("出生日期")
|
||||
@ColDefine(type = ColType.DATE)
|
||||
private Date birthday;
|
||||
|
||||
@Column
|
||||
@Comment("身份证号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String idCard;
|
||||
|
||||
@Column
|
||||
@Comment("参加工作时间")
|
||||
@ColDefine(type = ColType.DATE)
|
||||
private Date joinWorkTime;
|
||||
|
||||
@Column
|
||||
@Comment("退休时间")
|
||||
@ColDefine(type = ColType.DATE)
|
||||
private Date retireTime;
|
||||
|
||||
@Column
|
||||
@Comment("家庭住址")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String address;
|
||||
|
||||
@Column
|
||||
@Comment("手机号码")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String mobile;
|
||||
|
||||
@Column
|
||||
@Comment("住宅号码")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String homePhone;
|
||||
|
||||
@Column
|
||||
@Comment("照片")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String avatar;
|
||||
|
||||
@Column
|
||||
@Comment("分工会ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String unionId;
|
||||
|
||||
@Column
|
||||
@Comment("分工会名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String unionName;
|
||||
|
||||
@Column
|
||||
@Comment("用户状态")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String userState;
|
||||
|
||||
@Column
|
||||
@Comment("加入、退出")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
@Default("1")
|
||||
private Boolean isJoin;
|
||||
|
||||
@Column
|
||||
@Comment("变更来源")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String changeOrigin;
|
||||
|
||||
@Column
|
||||
@Comment("变更时间")
|
||||
@ColDefine(type = ColType.DATETIME)
|
||||
private Date changeTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.models;
|
||||
|
||||
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 java.util.Date;
|
||||
|
||||
@Data
|
||||
@Table("fund_member_his")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Comment("基金会员历史台账")
|
||||
@TableIndexes(value = {
|
||||
@Index(name = "IDX_FUND_MEMBER_HIS_YEAR", fields = {"year"}, unique = false),
|
||||
@Index(name = "IDX_FUND_MEMBER_HIS_LOGIN_NAME", fields = {"loginName"}, unique = false)
|
||||
})
|
||||
public class FundMemberHis extends BaseModel {
|
||||
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("年度")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer year;
|
||||
|
||||
@Column
|
||||
@Comment("工号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String loginName;
|
||||
|
||||
@Column
|
||||
@Comment("姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String userName;
|
||||
|
||||
@Column
|
||||
@Comment("性别")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String sex;
|
||||
|
||||
@Column
|
||||
@Comment("出生日期")
|
||||
@ColDefine(type = ColType.DATE)
|
||||
private Date birthday;
|
||||
|
||||
@Column
|
||||
@Comment("身份证号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String idCard;
|
||||
|
||||
@Column
|
||||
@Comment("参加工作时间")
|
||||
@ColDefine(type = ColType.DATE)
|
||||
private Date joinWorkTime;
|
||||
|
||||
@Column
|
||||
@Comment("退休时间")
|
||||
@ColDefine(type = ColType.DATE)
|
||||
private Date retireTime;
|
||||
|
||||
@Column
|
||||
@Comment("家庭住址")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String address;
|
||||
|
||||
@Column
|
||||
@Comment("手机号码")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String mobile;
|
||||
|
||||
@Column
|
||||
@Comment("住宅号码")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String homePhone;
|
||||
|
||||
@Column
|
||||
@Comment("照片")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String avatar;
|
||||
|
||||
@Column
|
||||
@Comment("分工会ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String unionId;
|
||||
|
||||
@Column
|
||||
@Comment("分工会名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String unionName;
|
||||
|
||||
@Column
|
||||
@Comment("用户状态")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String userState;
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberChangeRecord;
|
||||
|
||||
public interface FundMemberChangeRecordService extends BaseService<FundMemberChangeRecord> {
|
||||
|
||||
/**
|
||||
* 插入一条记录
|
||||
* @param loginName 工号
|
||||
* @param isJoin 加入\退出
|
||||
* @param changeOrigin 来源
|
||||
*/
|
||||
void insertRecord(String loginName, boolean isJoin, String changeOrigin);
|
||||
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberApply;
|
||||
|
||||
public interface FundMemberService extends BaseService<FundMemberApply> {
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.service.impl;
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.sys.views.View_user;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberChangeRecord;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberChangeRecordService;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class FundMemberChangeRecordServiceImpl extends BaseServiceImpl<FundMemberChangeRecord> implements FundMemberChangeRecordService {
|
||||
public FundMemberChangeRecordServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void insertRecord(String loginName, boolean isJoin, String changeOrigin) {
|
||||
View_user user = dao().fetch(View_user.class, Cnd.where(View_user::getLoginname, "=", loginName));
|
||||
|
||||
FundMemberChangeRecord record = new FundMemberChangeRecord();
|
||||
record.setLoginName(user.getLoginname());
|
||||
record.setUserName(user.getUsername());
|
||||
record.setSex(user.getSex());
|
||||
record.setBirthday(user.getBirthday());
|
||||
record.setIdCard(user.getIdCard());
|
||||
// record.setJoinWorkTime(user.getArrivalAtSchoolDate());
|
||||
// record.setRetireTime(user.getRetireTime());
|
||||
record.setUnionId(user.getUnionId());
|
||||
record.setUnionName(user.getUnionName());
|
||||
record.setUserState(user.getUserState());
|
||||
record.setIsJoin(isJoin);
|
||||
record.setChangeOrigin(changeOrigin);
|
||||
record.setChangeTime(new Date());
|
||||
insert(record);
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -1,13 +1,13 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.service.impl;
|
||||
package com.budwk.app.zhgh.dayofficework.fund.member.service.impl;
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.models.FundMember;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.service.FundMemberService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.models.FundMemberApply;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class FundMemberServiceImpl extends BaseServiceImpl<FundMember> implements FundMemberService {
|
||||
public class FundMemberServiceImpl extends BaseServiceImpl<FundMemberApply> implements FundMemberService {
|
||||
public FundMemberServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.models.FundMember;
|
||||
|
||||
public interface FundMemberService extends BaseService<FundMember> {
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.subsidy.controller;
|
||||
|
||||
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;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/fundSubsidy/analysis")
|
||||
@Ok("json:full")
|
||||
@Api(tags = "基金会员补助-分析")
|
||||
public class FundSubsidyAnalysisController {
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fund/subsidy/analysis/index.html")
|
||||
@SaCheckPermission("fundSubsidy.analysis")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+240
@@ -0,0 +1,240 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.subsidy.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.ExcelImportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.ImportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.TemplateExportParams;
|
||||
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.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.model.ExcelImportRes;
|
||||
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.SysOfficeTemplateUtil;
|
||||
import com.budwk.app.sys.models.Sys_user;
|
||||
import com.budwk.app.sys.views.View_user;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.subsidy.mode.FundSubsidyBasicExcelMode;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.subsidy.mode.FundSubsidyExcelMode;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.subsidy.models.FundSubsidy;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.subsidy.service.FundSubsidyService;
|
||||
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.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.AdaptBy;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
import org.nutz.mvc.upload.TempFile;
|
||||
import org.nutz.mvc.upload.UploadAdaptor;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/fundSubsidy/query")
|
||||
@Ok("json:full")
|
||||
@Api(tags = "基金会员补助-查询")
|
||||
@Slf4j
|
||||
public class FundSubsidyQueryController {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
@Inject
|
||||
private FundSubsidyService fundSubsidyService;
|
||||
@Inject
|
||||
private SysOfficeTemplateUtil sysOfficeTemplateUtil;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/fund/subsidy/query/index.html")
|
||||
@SaCheckPermission("fundSubsidy.query")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundSubsidy.query")
|
||||
public Result pageData(PageForm pageForm, Integer year, String unionId, String unitId) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX(FundSubsidy::getYear, "=", year);
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.orLike("loginName", pageForm.getSearchKeyword());
|
||||
seg.orLike("userName", pageForm.getSearchKeyword());
|
||||
cnd.and(seg);
|
||||
}
|
||||
cnd.andEX(FundSubsidy::getUnionId, "=", unionId);
|
||||
List<FundSubsidy> list = fundSubsidyService.query(cnd);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundSubsidy.query")
|
||||
@Ok("void")
|
||||
public void exportExcel(Integer year, HttpServletResponse response) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX(FundSubsidy::getYear, "=", year);
|
||||
List<FundSubsidy> list = fundSubsidyService.query(cnd);
|
||||
|
||||
List<ExcelExportEntity> exportEntities = new ArrayList<>();
|
||||
exportEntities.add(new ExcelExportEntity("序号", "index", 10));
|
||||
exportEntities.add(new ExcelExportEntity("单位", "unitName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("工号", "loginName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("姓名", "userName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("门诊费用", "outpatientCost", 20));
|
||||
exportEntities.add(new ExcelExportEntity("住院费用", "hospitalCost", 20));
|
||||
exportEntities.add(new ExcelExportEntity("合计", "totalCost", 20));
|
||||
exportEntities.add(new ExcelExportEntity("不予补助金额", "noSubsidyCost", 20));
|
||||
exportEntities.add(new ExcelExportEntity("门诊医保已报金额", "outpatientMedicalInsuranceReportedCost", 20));
|
||||
exportEntities.add(new ExcelExportEntity("住院医保已报金额", "hospitalMedicalInsuranceReportedCost", 20));
|
||||
exportEntities.add(new ExcelExportEntity("自费金额", "selfCost", 20));
|
||||
exportEntities.add(new ExcelExportEntity("补助金额", "subsidyCost", 20));
|
||||
|
||||
HashMap<String, Object> excelData = new HashMap<>();
|
||||
excelData.put("list", list);
|
||||
|
||||
// 合计补助金额
|
||||
list.stream().map(FundSubsidy::getSubsidyCost).reduce(BigDecimal::add).ifPresent(total -> {
|
||||
excelData.put("totalSubsidyCost", total);
|
||||
});
|
||||
|
||||
|
||||
try {
|
||||
InputStream is = sysOfficeTemplateUtil.getTemplate("fundSubsidy");
|
||||
TemplateExportParams exportParams = new TemplateExportParams(is, null);
|
||||
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, excelData);
|
||||
CommonDownloadUtil.download(year + "医疗互助“爱心”基金补助申请公示表.xlsx", workbook, response);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error("导出基金会员补助失败,{}", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundSubsidy.query")
|
||||
@ApiOperation("导入")
|
||||
@SLog(tag = "爱心补助-导入", msg = "导入")
|
||||
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
|
||||
public Result importExcel(@Param("file") TempFile file) {
|
||||
// 读取
|
||||
List<FundSubsidyExcelMode> importMembers = ExcelImportUtil.importExcel(file.getFile(), FundSubsidyExcelMode.class, new ImportParams());
|
||||
// 创建结果集
|
||||
ExcelImportRes<FundSubsidyExcelMode> excelImportRes = new ExcelImportRes<>();
|
||||
excelImportRes.setTotalRecords(importMembers.size());
|
||||
|
||||
for (int i = 0; i < importMembers.size(); i++) {
|
||||
FundSubsidyExcelMode subsidy = importMembers.get(i);
|
||||
|
||||
if (subsidy.getYear() == null) {
|
||||
subsidy.setErrInfo("请填写年度", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (StrUtil.isBlank(subsidy.getLoginName())) {
|
||||
subsidy.setErrInfo("工号为空", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (StrUtil.isBlank(subsidy.getUserName())) {
|
||||
subsidy.setErrInfo("姓名为空", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (StrUtil.isBlank(subsidy.getUnitName())) {
|
||||
subsidy.setErrInfo("单位为空", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (subsidy.getOutpatientCost() == null) {
|
||||
subsidy.setErrInfo("门诊费用为空", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (subsidy.getHospitalCost() == null) {
|
||||
subsidy.setErrInfo("住院费用为空", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (subsidy.getTotalCost() == null) {
|
||||
subsidy.setErrInfo("合计为空", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (subsidy.getNoSubsidyCost() == null) {
|
||||
subsidy.setErrInfo("不予补助金额为空", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (subsidy.getOutpatientMedicalInsuranceReportedCost() == null) {
|
||||
subsidy.setErrInfo("门诊医保已报金额为空", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (subsidy.getHospitalMedicalInsuranceReportedCost() == null) {
|
||||
subsidy.setErrInfo("住院医保已报金额为空", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (subsidy.getSelfCost() == null) {
|
||||
subsidy.setErrInfo("自费金额为空", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (subsidy.getSubsidyCost() == null) {
|
||||
subsidy.setErrInfo("补助金额为空", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
View_user user = dao.fetch(View_user.class, Cnd.where(Sys_user::getLoginname, "=", subsidy.getLoginName()));
|
||||
if (user == null) {
|
||||
subsidy.setErrInfo("系统中查询不到该用户", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
FundSubsidy fundSubsidy = BeanUtil.copyProperties(subsidy, FundSubsidy.class);
|
||||
|
||||
fundSubsidy.setUnitId(user.getUnitId());
|
||||
fundSubsidy.setUnionId(user.getUnionId());
|
||||
fundSubsidy.setUnitName(user.getUnitName());
|
||||
fundSubsidy.setUnionName(user.getUnionName());
|
||||
dao.insert(fundSubsidy);
|
||||
}
|
||||
|
||||
// 添加错误记录
|
||||
excelImportRes.setErrorDetails(importMembers.stream().filter(s -> StrUtil.isNotBlank(s.getErrMsg())).collect(Collectors.toList()));
|
||||
excelImportRes.setFailedCount(excelImportRes.getErrorDetails().size());
|
||||
excelImportRes.setSuccessCount(Math.max(importMembers.size() - excelImportRes.getFailedCount(), 0));
|
||||
return Result.success(excelImportRes);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("fundSubsidy.query")
|
||||
@Ok("void")
|
||||
public void downloadTemplate(HttpServletResponse response) {
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
List<FundSubsidyBasicExcelMode> list = new ArrayList<>();
|
||||
list.add(new FundSubsidyBasicExcelMode());
|
||||
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, FundSubsidyBasicExcelMode.class, list);
|
||||
CommonDownloadUtil.download("医疗互助“爱心”基金补助导入模板.xlsx", workbook, response);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.subsidy.mode;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class FundSubsidyBasicExcelMode {
|
||||
|
||||
@Excel(name = "年度", orderNum = "1", width = 20)
|
||||
private Integer year;
|
||||
|
||||
@Excel(name = "工号", orderNum = "2", width = 20)
|
||||
private String loginName;
|
||||
|
||||
@Excel(name = "姓名", orderNum = "3", width = 20)
|
||||
private String userName;
|
||||
|
||||
@Excel(name = "单位", orderNum = "4", width = 20)
|
||||
private String unitName;
|
||||
|
||||
@Excel(name = "门诊费用", orderNum = "5", numFormat = "0.00", width = 20)
|
||||
private BigDecimal outpatientCost;
|
||||
|
||||
@Excel(name = "住院费用", orderNum = "6", numFormat = "0.00", width = 20)
|
||||
private BigDecimal hospitalCost;
|
||||
|
||||
@Excel(name = "合计", orderNum = "7", numFormat = "0.00", width = 20)
|
||||
private BigDecimal totalCost;
|
||||
|
||||
@Excel(name = "不予补助金额", orderNum = "8", numFormat = "0.00", width = 20)
|
||||
private BigDecimal noSubsidyCost;
|
||||
|
||||
@Excel(name = "门诊医保已报金额", orderNum = "9", numFormat = "0.00", width = 20)
|
||||
private BigDecimal outpatientMedicalInsuranceReportedCost;
|
||||
|
||||
@Excel(name = "住院医保已报金额", orderNum = "10", numFormat = "0.00", width = 20)
|
||||
private BigDecimal hospitalMedicalInsuranceReportedCost;
|
||||
|
||||
@Excel(name = "自费金额", orderNum = "11", numFormat = "0.00", width = 20)
|
||||
private BigDecimal selfCost;
|
||||
|
||||
@Excel(name = "补助金额", orderNum = "12", numFormat = "0.00", width = 20)
|
||||
private BigDecimal subsidyCost;
|
||||
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.subsidy.mode;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import com.budwk.app.base.model.ExcelImportError;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class FundSubsidyExcelMode extends ExcelImportError {
|
||||
|
||||
@Excel(name = "年度", orderNum = "1")
|
||||
private Integer year;
|
||||
|
||||
@Excel(name = "工号", orderNum = "2")
|
||||
private String loginName;
|
||||
|
||||
@Excel(name = "姓名", orderNum = "3")
|
||||
private String userName;
|
||||
|
||||
@Excel(name = "单位", orderNum = "4")
|
||||
private String unitName;
|
||||
|
||||
@Excel(name = "门诊费用", orderNum = "5",numFormat = "0.00")
|
||||
private BigDecimal outpatientCost;
|
||||
|
||||
@Excel(name = "住院费用", orderNum = "6",numFormat = "0.00")
|
||||
private BigDecimal hospitalCost;
|
||||
|
||||
@Excel(name = "合计", orderNum = "7",numFormat = "0.00")
|
||||
private BigDecimal totalCost;
|
||||
|
||||
@Excel(name = "不予补助金额", orderNum = "8",numFormat = "0.00")
|
||||
private BigDecimal noSubsidyCost;
|
||||
|
||||
@Excel(name = "门诊医保已报金额", orderNum = "9",numFormat = "0.00")
|
||||
private BigDecimal outpatientMedicalInsuranceReportedCost;
|
||||
|
||||
@Excel(name = "住院医保已报金额", orderNum = "10",numFormat = "0.00")
|
||||
private BigDecimal hospitalMedicalInsuranceReportedCost;
|
||||
|
||||
@Excel(name = "自费金额", orderNum = "11",numFormat = "0.00")
|
||||
private BigDecimal selfCost;
|
||||
|
||||
@Excel(name = "补助金额", orderNum = "12",numFormat = "0.00")
|
||||
private BigDecimal subsidyCost;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.subsidy.models;
|
||||
|
||||
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 java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableMeta("{'mysql-charset':'utf8mb4'}")
|
||||
@Table("fund_subsidy")
|
||||
@Comment("基金会员补助")
|
||||
public class FundSubsidy extends BaseModel {
|
||||
|
||||
@Name
|
||||
@Comment("ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@PrevInsert(uu32 = true)
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("年度")
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer year;
|
||||
|
||||
@Column
|
||||
@Comment("工号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String loginName;
|
||||
|
||||
@Column
|
||||
@Comment("姓名")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String userName;
|
||||
|
||||
@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("分工会ID")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String unionId;
|
||||
|
||||
@Column
|
||||
@Comment("分工会")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String unionName;
|
||||
|
||||
@Column
|
||||
@Comment("门诊费用")
|
||||
@ColDefine(customType = "decimal(10,2)")
|
||||
private BigDecimal outpatientCost;
|
||||
|
||||
@Column
|
||||
@Comment("住院费用")
|
||||
@ColDefine(customType = "decimal(10,2)")
|
||||
private BigDecimal hospitalCost;
|
||||
|
||||
@Column
|
||||
@Comment("门诊+住院费用")
|
||||
@ColDefine(customType = "decimal(10,2)")
|
||||
private BigDecimal totalCost;
|
||||
|
||||
@Column
|
||||
@Comment("不予补助金额")
|
||||
@ColDefine(customType = "decimal(10,2)")
|
||||
private BigDecimal noSubsidyCost;
|
||||
|
||||
@Column
|
||||
@Comment("门诊医保已报金额")
|
||||
@ColDefine(customType = "decimal(10,2)")
|
||||
private BigDecimal outpatientMedicalInsuranceReportedCost;
|
||||
|
||||
@Column
|
||||
@Comment("住院医保已报金额")
|
||||
@ColDefine(customType = "decimal(10,2)")
|
||||
private BigDecimal hospitalMedicalInsuranceReportedCost;
|
||||
|
||||
@Column
|
||||
@Comment("自费金额")
|
||||
@ColDefine(customType = "decimal(10,2)")
|
||||
private BigDecimal selfCost;
|
||||
|
||||
@Column
|
||||
@Comment("补助金额")
|
||||
@ColDefine(customType = "decimal(10,2)")
|
||||
private BigDecimal subsidyCost;
|
||||
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.subsidy.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.subsidy.models.FundSubsidy;
|
||||
|
||||
public interface FundSubsidyService extends BaseService<FundSubsidy> {
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.budwk.app.zhgh.dayofficework.fund.subsidy.service.impl;
|
||||
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.subsidy.models.FundSubsidy;
|
||||
import com.budwk.app.zhgh.dayofficework.fund.subsidy.service.FundSubsidyService;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
@IocBean(args = {"refer:dao"})
|
||||
public class FundSubsidyServiceImpl extends BaseServiceImpl<FundSubsidy> implements FundSubsidyService {
|
||||
public FundSubsidyServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
}
|
||||
+7
@@ -43,6 +43,13 @@ public class ProposalCommissionerController {
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/democratic/proposal/transact/commissioner/index.html")
|
||||
@SaCheckPermission("proposal.commissioner")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission("proposal.commissioner")
|
||||
public Result pageData(@Valid ProposalSearchParam pageForm, boolean approval) {
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<logger name="java" additivity="false" />
|
||||
<logger name="org.eclipse.jetty" level="INFO"/>
|
||||
<logger name="org.quartz" level="INFO"/>
|
||||
<logger name="org.nutz" level="INFO"/>
|
||||
<logger name="org.nutz" level="DEBUG"/>
|
||||
|
||||
<!-- 日志级别和appender的关联 -->
|
||||
<root level="DEBUG">
|
||||
|
||||
+3
@@ -64,6 +64,9 @@
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
.el-table th.el-table__cell{
|
||||
background: #FAFAFA;
|
||||
}
|
||||
|
||||
.el-card {
|
||||
border: none;
|
||||
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="工号/姓名">
|
||||
<el-input v-model="pageForm.searchKeyword" placeholder="请输入工号或者姓名查询"
|
||||
clearable></el-input>
|
||||
</search-item>
|
||||
<search-item label="分工会">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择分工会" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
<el-button size="small" type="primary" @click="batchJoin">批量设置</el-button>
|
||||
<el-button size="small" type="primary" @click="showImportDialog = true">批量导入</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" ref="tableRef" row-key="id" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="selection" fixed="left"></el-table-column>
|
||||
<el-table-column label="序号" width="50" type="index" :index="indexMethod"
|
||||
fixed="left"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.key"
|
||||
:min-width="column.width"
|
||||
:fixed="column.fixed"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
v-if="column.visible !== false"
|
||||
>
|
||||
<template v-if="column.prop === 'instanceState'" scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</guava>
|
||||
|
||||
<excel-import
|
||||
ref="excelImportRef"
|
||||
url="/platform/fundMember/batchJoin/batchImport"
|
||||
template_url="/platform/fundMember/batchJoin/downloadTemplate"
|
||||
:visible.sync="showImportDialog"
|
||||
title="导入基金会员数据"
|
||||
width="700px"
|
||||
@import-success="doSearch"
|
||||
:extra_params="{}"
|
||||
></excel-import>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../info.js'){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"fund-member-info": fundMemberInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
{label: "工号", prop: "loginname"},
|
||||
{label: "姓名", prop: "username"},
|
||||
{label: "性别", prop: "sex"},
|
||||
{label: "出生年月", prop: "birthday"},
|
||||
{label: "在职状态", prop: "userState"},
|
||||
{label: "所属单位", prop: "unitName"},
|
||||
{label: "所属工会", prop: "unionName"},
|
||||
],
|
||||
unionOptions: [],
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
formData: {},
|
||||
showImportDialog: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
batchJoin() {
|
||||
const selection = this.$refs.tableRef.selection
|
||||
if (selection.length === 0) {
|
||||
this.$message.error("请选择要批量加入的人员")
|
||||
return
|
||||
}
|
||||
|
||||
this.$confirm("您确定要将勾选的用户批量加入基金会员吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/fundMember/batchJoin/confirm', {
|
||||
loginNames: JSON.stringify(selection.map(item => item.loginname))
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("批量加入成功")
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+9
-2
@@ -9,8 +9,8 @@ layout("/layouts/platform.html"){
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="标题">
|
||||
<el-input v-model="pageForm.searchKeyword" placeholder="标题" clearable></el-input>
|
||||
<search-item label="工号/姓名">
|
||||
<el-input v-model="pageForm.searchKeyword" placeholder="请输入工号或者姓名查询" clearable></el-input>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
@@ -25,6 +25,13 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||
<el-table-column prop="userName" label="姓名"></el-table-column>
|
||||
<el-table-column prop="isJoin" label="申请类型">
|
||||
<template slot-scope="{row}">
|
||||
<el-tag v-if="row.isJoin" size="small">加入</el-tag>
|
||||
<el-tag v-else size="small" type="danger">退出</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="submitTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<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%"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="工号/姓名">
|
||||
<el-input v-model="pageForm.searchKeyword" placeholder="请输入工号或者姓名查询"
|
||||
clearable></el-input>
|
||||
</search-item>
|
||||
<search-item label="分工会">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择分工会" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="变更类型">
|
||||
<el-select v-model="pageForm.isJoin" style="width: 100%">
|
||||
<el-option label="全部" :value="null"></el-option>
|
||||
<el-option label="加入" :value="true"></el-option>
|
||||
<el-option label="退出" :value="false"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool :columns.sync="tableColumns">
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column label="序号" width="50" type="index" :index="indexMethod"
|
||||
fixed="left"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.key"
|
||||
:min-width="column.width"
|
||||
:fixed="column.fixed"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
v-if="column.visible !== false"
|
||||
>
|
||||
<template v-if="column.prop === 'isJoin'" scope="{row}">
|
||||
<el-tag v-if="row.isJoin" size="small">加入</el-tag>
|
||||
<el-tag v-else size="small" type="danger">退出</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../info.js'){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"fund-member-info": fundMemberInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
{label: "工号", prop: "loginName"},
|
||||
{label: "姓名", prop: "userName"},
|
||||
{label: "性别", prop: "sex"},
|
||||
{label: "出生年月", prop: "birthday"},
|
||||
{label: "参加工作日期", prop: "joinWorkTime"},
|
||||
{label: "退休日期", prop: "retireTime"},
|
||||
{label: "所属工会", prop: "unionName"},
|
||||
{label: "变更类型", prop: "isJoin"},
|
||||
{label: "变更来源", prop: "changeOrigin"},
|
||||
{label: "变更时间", prop: "changeTime"}
|
||||
],
|
||||
unionOptions: [],
|
||||
pageForm: {
|
||||
approval: false,
|
||||
isJoin: null
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.fundMemberInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
exportExcel() {
|
||||
if (!this.pageForm.year) {
|
||||
this.$message.error('请选择年度再导出')
|
||||
return
|
||||
}
|
||||
this.$downLoad('/platform/fundMember/query/exportExcel', {
|
||||
year: this.pageForm.year,
|
||||
unionId: this.pageForm.unionId
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,110 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<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%"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="工号/姓名">
|
||||
<el-input v-model="pageForm.searchKeyword" placeholder="请输入工号或者姓名查询"
|
||||
clearable></el-input>
|
||||
</search-item>
|
||||
<search-item label="分工会">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择分工会" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column label="序号" width="50" type="index" :index="indexMethod"
|
||||
fixed="left"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.key"
|
||||
:min-width="column.width"
|
||||
:fixed="column.fixed"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
v-if="column.visible !== false"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #edit>
|
||||
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../info.js'){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"fund-member-info": fundMemberInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
{label: "年度", prop: "year"},
|
||||
{label: "工号", prop: "loginName"},
|
||||
{label: "姓名", prop: "userName"},
|
||||
{label: "性别", prop: "sex"},
|
||||
{label: "出生年月", prop: "birthday"},
|
||||
{label: "在职状态", prop: "userState"},
|
||||
{label: "所属工会", prop: "unionName"},
|
||||
{label: "加入时间", prop: "joinTime"},
|
||||
],
|
||||
unionOptions: [],
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.fundMemberInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
exportExcel() {
|
||||
if (!this.pageForm.year) {
|
||||
this.$message.error('请选择年度再导出')
|
||||
return
|
||||
}
|
||||
this.$downLoad('/platform/fundMember/query/exportExcel', {
|
||||
year: this.pageForm.year,
|
||||
unionId: this.pageForm.unionId
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+9
-1
@@ -20,6 +20,13 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||
<el-table-column prop="userName" label="姓名"></el-table-column>
|
||||
<el-table-column prop="isJoin" label="申请类型">
|
||||
<template slot-scope="{row}">
|
||||
<el-tag v-if="row.isJoin" size="small">加入</el-tag>
|
||||
<el-tag v-else size="small" type="danger">退出</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="submitTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
@@ -37,7 +44,8 @@ layout("/layouts/platform.html"){
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
<el-button @click="onDelete(row.id)" v-if="row.taskKey === 'startTask' || !row.instanceId"
|
||||
<!-- v-if="row.taskKey === 'startTask' || !row.instanceId"-->
|
||||
<el-button @click="onDelete(row.id)"
|
||||
size="mini" type="danger">删除
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -0,0 +1,171 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<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%"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="工号/姓名">
|
||||
<el-input v-model="pageForm.searchKeyword" placeholder="请输入工号或者姓名查询"
|
||||
clearable></el-input>
|
||||
</search-item>
|
||||
<search-item label="分工会">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择分工会" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
<el-button size="small" type="primary" @click="backup">备份会员名单</el-button>
|
||||
|
||||
<el-button size="small" type="primary" @click="exportExcel">导出登记汇总表</el-button>
|
||||
|
||||
<el-button size="small" type="primary" @click="exportNewMemberExcel">导出本年新会员名单</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column label="序号" width="50" type="index" :index="indexMethod"
|
||||
fixed="left"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.key"
|
||||
:min-width="column.width"
|
||||
:fixed="column.fixed"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
v-if="column.visible !== false"
|
||||
>
|
||||
<template v-if="column.prop === 'instanceState'" scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
<template v-else-if="column.prop === 'isJoin'" scope="{row}">
|
||||
<el-tag v-if="row.isJoin" size="small">加入</el-tag>
|
||||
<el-tag v-else size="small" type="danger">退出</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="200px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="onQuit(row)" size="mini" type="danger">退会</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #edit>
|
||||
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../info.js'){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"fund-member-info": fundMemberInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
{label: "工号", prop: "loginName"},
|
||||
{label: "姓名", prop: "userName"},
|
||||
{label: "性别", prop: "sex"},
|
||||
{label: "出生年月", prop: "birthday"},
|
||||
{label: "在职状态", prop: "userState"},
|
||||
{label: "所属工会", prop: "unionName"},
|
||||
{label: "加入时间", prop: "joinTime"},
|
||||
],
|
||||
unionOptions: [],
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.fundMemberInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
// 退会
|
||||
onQuit(row) {
|
||||
this.$confirm('您确定要将' + row.userName + '退会吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/fundMember/query/quit', {
|
||||
loginName: row.loginName
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success('退会成功')
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 备份会员
|
||||
backup() {
|
||||
// 此处需要选择年份
|
||||
this.$prompt('请输入备份会员至哪个年度', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputPattern: /^[0-9]{4}$/,
|
||||
inputErrorMessage: '请输入4位数的年份'
|
||||
}).then(({value}) => {
|
||||
this.$axios.post('/platform/fundMember/query/backup', {
|
||||
year: value
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success('备份成功')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 导出登记汇总表
|
||||
exportExcel() {
|
||||
if (!this.pageForm.year) {
|
||||
this.$message.error('请选择年度再导出')
|
||||
return
|
||||
}
|
||||
this.$downLoad('/platform/fundMember/query/exportExcel', {
|
||||
year: this.pageForm.year,
|
||||
unionId: this.pageForm.unionId
|
||||
})
|
||||
},
|
||||
|
||||
// 导出本年新会员名单
|
||||
exportNewMemberExcel(){
|
||||
this.$downLoad('/platform/fundMember/query/exportNewMemberExcel')
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+8
@@ -25,6 +25,14 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||
<el-table-column prop="userName" label="姓名"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="isJoin" label="申请类型">
|
||||
<template slot-scope="{row}">
|
||||
<el-tag v-if="row.isJoin" size="small">加入</el-tag>
|
||||
<el-tag v-else size="small" type="danger">退出</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="submitTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
+7
-4
@@ -152,12 +152,13 @@ layout("/layouts/platform.html"){
|
||||
message: '请输入正确的手机号码',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
homePhone: [{required: true, message: '请输入住宅号码', trigger: 'blur'},
|
||||
homePhone: [
|
||||
/*{required: true, message: '请输入住宅号码', trigger: 'blur'},
|
||||
{
|
||||
pattern: /^(0\d{2,3}-?)?\d{7,8}$/,
|
||||
message: '请输入正确的住宅号码',
|
||||
trigger: 'blur'
|
||||
}
|
||||
}*/
|
||||
],
|
||||
avatar: [{required: false, message: '请上传照片', trigger: 'blur'}]
|
||||
},
|
||||
@@ -234,13 +235,15 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const {username, loginname, sex, birthday, mobile} = this.$store.state.user
|
||||
const {username, loginname, sex, birthday, mobile, union} = this.$store.state.user
|
||||
this.formData = {
|
||||
userName: username,
|
||||
loginName: loginname,
|
||||
sex: sex,
|
||||
birthday: birthday,
|
||||
mobile: mobile
|
||||
mobile: mobile,
|
||||
unionId: union?.id,
|
||||
unionName: union?.name
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<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%"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="工号/姓名">
|
||||
<el-input v-model="pageForm.searchKeyword" placeholder="请输入工号或者姓名查询"
|
||||
clearable></el-input>
|
||||
</search-item>
|
||||
<search-item label="分工会">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择分工会" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
<el-button size="small" type="primary" @click="showImportDialog = true">导入补助数据</el-button>
|
||||
<el-button size="small" type="primary" @click="exportExcel">导出补助公示表</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%" show-summary
|
||||
:summary-method="getSummaries">
|
||||
<el-table-column label="序号" width="50" type="index" :index="indexMethod"
|
||||
fixed="left"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.key"
|
||||
:min-width="column.width"
|
||||
:fixed="column.fixed"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
v-if="column.visible !== false"
|
||||
>
|
||||
<template v-if="column.prop === 'instanceState'" scope="{row}">
|
||||
<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="200px">-->
|
||||
<!-- <template slot-scope="{row}">-->
|
||||
<!-- <el-button @click="openView(row)" size="mini" type="primary">查看</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
</el-card>
|
||||
<template #view>
|
||||
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<excel-import
|
||||
ref="excelImportRef"
|
||||
url="/platform/fundSubsidy/query/importExcel"
|
||||
template_url="/platform/fundSubsidy/query/downloadTemplate"
|
||||
:visible.sync="showImportDialog"
|
||||
title="导入数据"
|
||||
width="700px"
|
||||
@import-success="doSearch"
|
||||
:extra_params="{}"
|
||||
></excel-import>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
{label: "工号", prop: "loginName"},
|
||||
{label: "姓名", prop: "userName"},
|
||||
{label: "门诊费用", prop: "outpatientCost"},
|
||||
{label: "住院费用", prop: "hospitalCost"},
|
||||
{label: "合计", prop: "totalCost"},
|
||||
{label: "不予补助金额", prop: "noSubsidyCost"},
|
||||
{label: "门诊医保已报金额", prop: "outpatientMedicalInsuranceReportedCost"},
|
||||
{label: "住院医保已报金额", prop: "hospitalMedicalInsuranceReportedCost"},
|
||||
{label: "自费金额", prop: "selfCost"},
|
||||
{label: "补助金额", prop: "subsidyCost"},
|
||||
],
|
||||
unionOptions: [],
|
||||
pageForm: {},
|
||||
showImportDialog: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
this.$axios.post(loc() + "/pageData", this.pageForm).then((res) => {
|
||||
this.tableLoading = false
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getSummaries(param) {
|
||||
const {columns, data} = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计';
|
||||
}else if (index === 1) {
|
||||
sums[index] = '';
|
||||
}else if(index === columns.length - 1){
|
||||
const values = data.map(item => Number(item[column.property]));
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] += ' 元';
|
||||
} else {
|
||||
sums[index] = 'N/A';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return sums;
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
|
||||
})
|
||||
},
|
||||
exportExcel() {
|
||||
if (!this.pageForm.year) {
|
||||
this.$message.error('请选择年度再导出')
|
||||
return
|
||||
}
|
||||
this.$downLoad('/platform/fundSubsidy/query/exportExcel', {
|
||||
year: this.pageForm.year,
|
||||
unionId: this.pageForm.unionId
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,166 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<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%"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="工号/姓名">
|
||||
<el-input v-model="pageForm.searchKeyword" placeholder="请输入工号或者姓名查询" clearable></el-input>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool></table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column label="序号" width="50" type="index" :index="indexMethod"
|
||||
fixed="left"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.key"
|
||||
:min-width="column.width"
|
||||
:fixed="column.fixed"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
v-if="column.visible !== false"
|
||||
>
|
||||
<template v-if="column.prop === 'instanceState'" scope="{row}">
|
||||
<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="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #edit>
|
||||
<fund-member-info ref="fundMemberInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<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>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</fund-member-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../info.js'){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"fund-member-info": fundMemberInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
{label: "工号", prop: "loginName"},
|
||||
{label: "姓名", prop: "userName"},
|
||||
{label: "性别", prop: "sex"},
|
||||
{label: "出生年月", prop: "birthday"},
|
||||
{label: "当前节点", prop: "taskName"},
|
||||
{label: "流程状态", prop: "instanceState"}
|
||||
],
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.fundMemberInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.fundMemberInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate(valid => {
|
||||
if (!valid) return
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -112,7 +112,7 @@ const PROPOSAL_INFO = {
|
||||
:value="task.ext.caseFilingResult"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="主办单位">{{ task.ext.tf_hostUnitName }}</van-cell>
|
||||
<van-cell title="协办单位">{{ task?.ext?.tf_helpUnitNames.join('、') }}</van-cell>
|
||||
<van-cell title="协办单位">{{ task?.ext?.tf_helpUnitNames?.join('、') }}</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group :title="task.displayName" v-else>
|
||||
|
||||
+232
@@ -0,0 +1,232 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="委员会成员意见" placeholder
|
||||
fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
v-model="pageForm.name"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
placeholder="请输入提案名称搜索"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
<van-tabs v-model="pageForm.approvalText"
|
||||
@change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/proposal/commissioner/pageData" :page_form.sync="pageForm" @ready="onReady"
|
||||
ref="tableListRef"
|
||||
title="name">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="提案编号">{{row.code}}</table-column>
|
||||
<table-column label="提案类别">{{row.typeName}}</table-column>
|
||||
<table-column label="提案人">{{row.createUserName}}</table-column>
|
||||
<table-column label="代表团">{{row.delegationName}}</table-column>
|
||||
<table-column label="当前节点">{{row.taskName}}</table-column>
|
||||
<table-column label="委员意见">
|
||||
<van-tag type="primary">立案:{{row.CONFIRM_FILING_COUNT}}</van-tag>
|
||||
<van-tag type="warning">建议:{{row.SUGGESTION_COUNT}}</van-tag>
|
||||
<van-tag>不予立案:{{row.NOT_COUNT}}</van-tag>
|
||||
</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="!row.pcoId" @click="onApproval(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<proposal-info ref="proposalInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">提案委员会成员意见</div>
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
v-model="formData.caseFilingResultName"
|
||||
name="caseFilingResultName"
|
||||
label="立案结果"
|
||||
placeholder="请选择立案结果"
|
||||
:rules="[{ required: true, message: '请选择立案结果' }]"
|
||||
required
|
||||
is-link
|
||||
@click="showCaseFilingResultPicker = true"
|
||||
></van-field>
|
||||
<van-popup v-model="showCaseFilingResultPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="dict.type.PROPOSAL_CASE_FILING_RESULT.map(item => ({text: item.label, value: item.code}))"
|
||||
@confirm="onCaseFilingResultConfirm"
|
||||
@cancel="showCaseFilingResultPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<template v-if="['CONFIRM_FILING'].includes(formData.caseFilingResult)">
|
||||
<van-field
|
||||
v-model="formData.caseFilingTypeName"
|
||||
name="caseFilingTypeName"
|
||||
label="立案结果"
|
||||
placeholder="请选择立案类型"
|
||||
:rules="[{ required: true, message: '请选择立案类型' }]"
|
||||
required
|
||||
is-link
|
||||
@click="showCaseFilingTypePicker = true"
|
||||
></van-field>
|
||||
<van-popup v-model="showCaseFilingTypePicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="dict.type.PROPOSAL_CASE_FILING_TYPE.map(item => ({text: item.label, value: item.code}))"
|
||||
@confirm="onCaseFilingTypeConfirm"
|
||||
@cancel="showCaseFilingTypePicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
</template>
|
||||
|
||||
<van-field
|
||||
v-model="formData.opinion"
|
||||
name="opinion"
|
||||
label="审批意见"
|
||||
placeholder="请输入审批意见"
|
||||
:rules="[{ required: true, message: '请填写审批意见' }]"
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button block @click="$refs.proposalInfoRef.onClose()">取消</van-button>
|
||||
<van-button type="primary" block @click="doSubmit">提交</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</proposal-info>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: ["PROPOSAL_CASE_FILING_RESULT", "PROPOSAL_CASE_FILING_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
name: null,
|
||||
sessionId: null,
|
||||
approvalText: "0",
|
||||
approval: false
|
||||
},
|
||||
|
||||
sessionOptions: [],
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
|
||||
showCaseFilingResultPicker: false,
|
||||
showCaseFilingTypePicker: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
},
|
||||
methods: {
|
||||
onReady() {
|
||||
this.listSession()
|
||||
},
|
||||
listSession() {
|
||||
this.$axios.post("/platform/proposal/common/listSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = [
|
||||
{
|
||||
text: "全部届次",
|
||||
value: null
|
||||
}
|
||||
].concat(res.data.map((v) => ({text: v.fullName, value: v.id})))
|
||||
if (this.sessionOptions.length > 0) {
|
||||
this.pageForm.sessionId = this.sessionOptions[0].value
|
||||
this.doSearch()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
},
|
||||
|
||||
// 确定立案类型
|
||||
onCaseFilingResultConfirm(value) {
|
||||
this.$set(this.formData, "caseFilingResultName", value.text)
|
||||
this.$set(this.formData, "caseFilingResult", value.value)
|
||||
this.showCaseFilingResultPicker = false
|
||||
},
|
||||
|
||||
// 确定立案类型
|
||||
onCaseFilingTypeConfirm(value) {
|
||||
this.$set(this.formData, "caseFilingTypeName", value.text)
|
||||
this.$set(this.formData, "caseFilingType", value.value)
|
||||
this.showCaseFilingTypePicker = false
|
||||
},
|
||||
|
||||
onApproval(row) {
|
||||
this.showApprovalForm = true
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
this.formData = {
|
||||
proposalId: row.id,
|
||||
caseFilingResult: null,
|
||||
caseFilingType: null,
|
||||
opinion: null
|
||||
}
|
||||
},
|
||||
|
||||
async doSubmit() {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: "您确定要提交吗?",
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/proposal/commissioner/doApproval', this.formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+19
-4
@@ -17,7 +17,7 @@ const PROPOSAL_INVITE_SECONDER_COMPONENT = {
|
||||
<van-cell
|
||||
v-for="(item, index) in tableData"
|
||||
clickable
|
||||
:key="pageForm.isInvite +':'+ item.loginName"
|
||||
:key="item.loginName"
|
||||
@click="tableRowToggle(index)"
|
||||
>
|
||||
<span slot="title">
|
||||
@@ -29,7 +29,7 @@ const PROPOSAL_INVITE_SECONDER_COMPONENT = {
|
||||
</span>
|
||||
<van-checkbox
|
||||
:name="item"
|
||||
ref="checkboxes"
|
||||
:ref="'checkboxes'+item.loginName"
|
||||
slot="right-icon"
|
||||
v-if="!pageForm.isInvite"></van-checkbox>
|
||||
</van-cell>
|
||||
@@ -82,8 +82,10 @@ const PROPOSAL_INVITE_SECONDER_COMPONENT = {
|
||||
return
|
||||
}
|
||||
|
||||
const loginNames = this.tableSelection.map((s) => s.loginName)
|
||||
const userName = this.tableSelection.map((s) => s.userName)
|
||||
const loginNames = [...new Set(this.tableSelection.map((s) => s.loginName))]
|
||||
const userName = [...new Set(this.tableSelection.map((s) => s.userName))]
|
||||
|
||||
console.log(this.tableSelection)
|
||||
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
@@ -115,10 +117,23 @@ const PROPOSAL_INVITE_SECONDER_COMPONENT = {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
this.echoCheckBox()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 翻页回显勾选
|
||||
echoCheckBox() {
|
||||
this.$nextTick(() => {
|
||||
this.tableData.forEach((item) => {
|
||||
const checkboxRef = this.$refs['checkboxes' + item.loginName]
|
||||
if (checkboxRef && this.tableSelection.map((s) => s.loginName).includes(item.loginName)) {
|
||||
checkboxRef[0].toggle()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
|
||||
+23
-6
@@ -32,7 +32,8 @@ layout("/layouts/platform_h5.html"){
|
||||
<table-column label="提案类别">{{row.typeName}}</table-column>
|
||||
<table-column label="提案人">{{row.createUserName}}</table-column>
|
||||
<table-column label="代表团">{{row.delegationName}}</table-column>
|
||||
<table-column label="承办单位">{{row.taskUnitName}}({{row.taskIsMaster ? '主办' : '协办'}})</table-column>
|
||||
<table-column label="承办单位">{{row.underTakeName}}({{row.underTakeIsMaster ? '主办' : '协办'}})
|
||||
</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
@@ -48,6 +49,13 @@ layout("/layouts/platform_h5.html"){
|
||||
<i class="fa fa-reply"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
|
||||
<!--承办单位领导、超级管理员才能转办-->
|
||||
<div class="action-btn" v-if="!pageForm.approval && $auth.hasRoleOr('SYSADMIN,PROPOSAL_UNIT_LEADER')"
|
||||
@click="openTransfer(row)">
|
||||
<i class="fa fa-arrow-right"></i>
|
||||
<span>转办</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
@@ -55,7 +63,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.taskName}}</div>
|
||||
<van-form ref="formRef">
|
||||
<van-field :value="formData.taskUnitName"
|
||||
<van-field :value="formData.underTakeName"
|
||||
label="承办单位"
|
||||
readonly></van-field>
|
||||
|
||||
@@ -90,7 +98,7 @@ layout("/layouts/platform_h5.html"){
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
v-if="supportCandidate && formData.taskIsMaster"
|
||||
v-if="supportCandidate && formData.underTakeIsMaster"
|
||||
v-model="formData.tf_nextNodeOperatorName"
|
||||
name="tf_nextNodeOperatorName"
|
||||
label="校领导"
|
||||
@@ -117,9 +125,11 @@ layout("/layouts/platform_h5.html"){
|
||||
</div>
|
||||
</proposal-info>
|
||||
|
||||
<transfer ref="transferRef"></transfer>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
<!--#include("transfer.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
@@ -145,12 +155,13 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
supportCandidate: false,
|
||||
candidates: [],
|
||||
showCandidatesPicker: false
|
||||
showCandidatesPicker: false,
|
||||
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
"proposal-info": PROPOSAL_INFO,
|
||||
"transfer": transfer
|
||||
},
|
||||
methods: {
|
||||
onReady() {
|
||||
@@ -187,6 +198,7 @@ layout("/layouts/platform_h5.html"){
|
||||
processTaskId: row.taskId,
|
||||
taskKey: row.taskKey,
|
||||
taskName: row.taskName,
|
||||
proposalId: row.id,
|
||||
underTakeName: row.underTakeName,
|
||||
underTakeIsMaster: row.underTakeIsMaster
|
||||
}
|
||||
@@ -243,7 +255,7 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
},
|
||||
|
||||
onRevoke(row){
|
||||
onRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤回吗?"
|
||||
@@ -257,6 +269,11 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
},
|
||||
|
||||
// 打开转办
|
||||
openTransfer(row){
|
||||
this.$refs.transferRef.openTransfer(row)
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
|
||||
+147
@@ -0,0 +1,147 @@
|
||||
const transfer = {
|
||||
template: /*language=HTML*/ `
|
||||
<van-action-sheet v-model="showTransferDialog" title="提案转办">
|
||||
<div class="transfer-dialog">
|
||||
<!-- 提案信息 -->
|
||||
<div class="proposal-info-card">
|
||||
<div class="info-item"><label>提案编号:</label><span>{{transferForm.code}}</span></div>
|
||||
<div class="info-item"><label>提案名称:</label><span>{{transferForm.name}}</span></div>
|
||||
<div class="info-item"><label>代表团:</label><span>{{transferForm.delegationName}}</span></div>
|
||||
</div>
|
||||
|
||||
<!-- 用户选择 -->
|
||||
<van-field v-model="searchKeyword" label="转交给" placeholder="搜索用户" required readonly @click="showUserList=true"></van-field>
|
||||
<van-popup v-model="showUserList" position="bottom">
|
||||
<van-search v-model="keyword" placeholder="搜索用户" @search="selectTransferUser(keyword)" @cancel="showUserList=false"></van-search>
|
||||
<van-empty v-if="transferUserOptions.length === 0" class="empty-tip">请搜索需要转办的用户</van-empty>
|
||||
<van-cell v-for="item in transferUserOptions" :key="item.id" :title="item.username" @click="selectUser(item)"></van-cell>
|
||||
</van-popup>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<div class="button-group">
|
||||
<van-button block plain @click="showTransferDialog = false" class="cancel-btn">取消</van-button>
|
||||
<van-button block type="info" @click="handleTransfer" class="submit-btn">提交</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
showTransferDialog: false,
|
||||
transferForm: {},
|
||||
transferUserOptions: [],
|
||||
searchKeyword: '',
|
||||
showUserList: false,
|
||||
keyword: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openTransfer(row) {
|
||||
this.showTransferDialog = true
|
||||
this.transferForm = { taskId: row.taskId, name: row.name, code: row.code, delegationName: row.delegationName }
|
||||
this.searchKeyword = ''
|
||||
},
|
||||
selectUser(item) {
|
||||
this.transferForm.userId = item.id
|
||||
this.searchKeyword = item.username
|
||||
this.showUserList = false
|
||||
},
|
||||
selectTransferUser(keyword) {
|
||||
this.$axios.post("/platform/proposal/unitReply/selectViceUser", {keyword}).then(res => {
|
||||
if (res.code === 0) this.transferUserOptions = res.data
|
||||
})
|
||||
},
|
||||
|
||||
// 转办
|
||||
handleTransfer() {
|
||||
if (!this.transferForm.userId) {
|
||||
this.$toast('请选择转交用户')
|
||||
return
|
||||
}
|
||||
|
||||
const transferUserName = this.transferUserOptions.find(item => item.id === this.transferForm.userId)?.username
|
||||
const name = this.transferForm.name
|
||||
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: `您确定要将` + name + `提案转交给` + transferUserName + `办理吗?`,
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/proposal/unitReply/transfer', this.transferForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.showTransferDialog = false
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
// 取消操作
|
||||
})
|
||||
}
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
.transfer-dialog {
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
padding: 16px 16px 65px;
|
||||
}
|
||||
|
||||
.proposal-info-card {
|
||||
background: #f8f9fa;
|
||||
border-radius: 8px;
|
||||
padding: 16px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.proposal-info-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.info-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.info-item label {
|
||||
font-size: 12px;
|
||||
color: #969799;
|
||||
}
|
||||
|
||||
.info-item span {
|
||||
font-size: 14px;
|
||||
color: #323233;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.button-group {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: 16px;
|
||||
background: #fff;
|
||||
border-top: 1px solid #ebedf0;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
column-gap: 10px;
|
||||
padding: 10px
|
||||
}
|
||||
|
||||
.cancel-btn,
|
||||
.submit-btn {
|
||||
|
||||
}
|
||||
|
||||
.empty-tip {
|
||||
text-align: center;
|
||||
padding: 50px 16px;
|
||||
color: #969799;
|
||||
font-size: 14px;
|
||||
}
|
||||
`
|
||||
}
|
||||
+6
-6
@@ -16,14 +16,14 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
<van-tabs v-model="pageForm.approvalText"
|
||||
@change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
<!-- <van-tabs v-model="pageForm.approvalText"-->
|
||||
<!-- @change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">-->
|
||||
<!-- <van-tab title="已审核" name="1"></van-tab>-->
|
||||
<!-- <van-tab title="未审核" name="0"></van-tab>-->
|
||||
<!-- </van-tabs>-->
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/proposal/delegation/pageData" :page_form.sync="pageForm" @ready="onReady"
|
||||
<table-list api="/platform/proposal/vice/delegation/pageData" :page_form.sync="pageForm" @ready="onReady"
|
||||
ref="tableListRef"
|
||||
title="name">
|
||||
<template v-slot="{index,row}">
|
||||
|
||||
Reference in New Issue
Block a user