commit
This commit is contained in:
+4
-2
@@ -1,6 +1,7 @@
|
||||
package com.budwk.app.zhgh.staffmanage.member.controller.apply;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
@@ -64,7 +65,7 @@ public class MemberApplyBranchUnionApprovalController {
|
||||
|
||||
@At
|
||||
@ApiOperation("会员入会申请分工会审核列表")
|
||||
@SaCheckPermission("member.apply.branchUnionApproval")
|
||||
@SaCheckPermission(value = {"member.apply.branchUnionApproval", "h5.member.apply.branchUnionApproval"}, mode = SaMode.OR)
|
||||
public Result pageData(MemberApplyPageForm pageForm) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
@@ -78,6 +79,7 @@ public class MemberApplyBranchUnionApprovalController {
|
||||
info.personType,
|
||||
info.applyDateTime,
|
||||
info.sign,
|
||||
info.nativePlace,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
@@ -125,7 +127,7 @@ public class MemberApplyBranchUnionApprovalController {
|
||||
} else {
|
||||
cnd.orderBy("info." + pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
}
|
||||
cnd.groupBy("t.id");
|
||||
cnd.groupBy("info.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = memberApplyRecordService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
|
||||
+53
-6
@@ -1,6 +1,7 @@
|
||||
package com.budwk.app.zhgh.staffmanage.member.controller.apply;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
@@ -14,6 +15,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.sys.models.Sys_union_group;
|
||||
import com.budwk.app.sys.models.Sys_user;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.sys.views.View_user;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
@@ -70,7 +72,8 @@ public class MemberApplyController {
|
||||
|
||||
@At
|
||||
@ApiOperation("保存申请")
|
||||
@SaCheckPermission("member.apply.submit")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission(value = {"member.apply.submit", "h5.member.apply.submit"}, mode = SaMode.OR)
|
||||
@SLog(tag = "会员入会申请", msg = "保存申请,申请人: ${args[0].username}")
|
||||
public Result save(@Param("data") MemberApplyRecord memberApplyRecord) {
|
||||
if (StrUtil.isBlank(memberApplyRecord.getId())) {
|
||||
@@ -84,7 +87,7 @@ public class MemberApplyController {
|
||||
@At
|
||||
@ApiOperation("提交申请")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("member.apply.submit")
|
||||
@SaCheckPermission(value = {"member.apply.submit", "h5.member.apply.submit"}, mode = SaMode.OR)
|
||||
@SLog(tag = "会员入会申请", msg = "提交申请,申请人: ${args[0].username}")
|
||||
public Result submit(@Param("data") MemberApplyRecord memberApplyRecord){
|
||||
if (StrUtil.isBlank(memberApplyRecord.getId())) {
|
||||
@@ -123,7 +126,7 @@ public class MemberApplyController {
|
||||
@At
|
||||
@ApiOperation("重新提交申请")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("member.apply.submit")
|
||||
@SaCheckPermission(value = {"member.apply.submit", "h5.member.apply.submit"}, mode = SaMode.OR)
|
||||
@SLog(tag = "会员入会申请", msg = "重新提交申请,申请人: ${args[0].username}")
|
||||
public Result submitAgain(@Param("data") MemberApplyRecord memberApplyRecord, @Param("taskId") Long taskId) {
|
||||
if (StrUtil.isBlank(memberApplyRecord.getId())) {
|
||||
@@ -159,14 +162,58 @@ public class MemberApplyController {
|
||||
*/
|
||||
@At
|
||||
@ApiOperation("根据id查询申请记录")
|
||||
@SaCheckPermission("member.apply.submit")
|
||||
@SaCheckPermission(value = {"member.apply.submit", "h5.member.apply.submit"}, mode = SaMode.OR)
|
||||
public Result findApplyById(String id) {
|
||||
return Result.success(dao.fetch(MemberApplyRecord.class,id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户id判断是否允许发起入会申请。
|
||||
*
|
||||
* @param id 用户id;前端选择代申请人员时传入该人员id,个人申请时传当前登录用户id
|
||||
* @return Dict,包含 canApply 是否允许申请、msg 不允许时的提示信息,以及用户基础信息
|
||||
*/
|
||||
@At
|
||||
@ApiOperation("根据 userid 查询是否能申请入会")
|
||||
@SaCheckPermission(value = {"member.apply.submit", "h5.member.apply.submit"}, mode = SaMode.OR)
|
||||
public Result findOne(String id) {
|
||||
Sys_user user = dao.fetch(Sys_user.class, Cnd.where("id", "=", id));
|
||||
if (user == null) {
|
||||
return Result.error("用户不存在");
|
||||
}
|
||||
|
||||
Dict result = Dict.create();
|
||||
result.set("id", user.getId());
|
||||
result.set("username", user.getUsername());
|
||||
result.set("loginname", user.getLoginname());
|
||||
|
||||
boolean isAlreadyMember = Boolean.TRUE.equals(user.getMember());
|
||||
if (isAlreadyMember) {
|
||||
result.set("canApply", false);
|
||||
result.set("msg", "您已是工会会员,无需重复申请");
|
||||
return Result.success(result);
|
||||
}
|
||||
|
||||
long doingProcessCount = dao.count(ProcessInstance.class,
|
||||
Cnd.where("businessNo", "in",
|
||||
Sqls.create("SELECT id FROM member_apply_record WHERE userId = @userId")
|
||||
.setParam("userId", id)
|
||||
).and("state", "=", 10)
|
||||
);
|
||||
|
||||
if (doingProcessCount > 0) {
|
||||
result.set("canApply", false);
|
||||
result.set("msg", "您有一份入会申请流程正在审批中,请勿重复提交");
|
||||
return Result.success(result);
|
||||
}
|
||||
|
||||
result.set("canApply", true);
|
||||
return Result.success(result);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@SaCheckPermission("member.apply.submit")
|
||||
@SaCheckPermission(value = {"member.apply.submit", "h5.member.apply.submit"}, mode = SaMode.OR)
|
||||
public Result getApplyUserByUnionOperate(@Valid String keyWord){
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
@@ -195,7 +242,7 @@ public class MemberApplyController {
|
||||
*/
|
||||
@At
|
||||
@ApiOperation("获取当前登录用户信息")
|
||||
@SaCheckPermission("member.apply.submit")
|
||||
@SaCheckPermission(value = {"member.apply.submit", "h5.member.apply.submit"}, mode = SaMode.OR)
|
||||
public Result getSelfUserInfo() {
|
||||
return Result.success(dao.fetch(View_user.class, Cnd.where("id", "=", SecurityUtil.getUserId())));
|
||||
}
|
||||
|
||||
+21
-4
@@ -27,6 +27,7 @@ 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;
|
||||
|
||||
/**
|
||||
@@ -62,7 +63,7 @@ public class MemberApplyMineController {
|
||||
|
||||
@At
|
||||
@ApiOperation("会员入会申请,我的申请列表")
|
||||
@SaCheckPermission("member.apply.mine")
|
||||
@SaCheckPermission(value = {"member.apply.mine", "h5.member.apply.mine"}, mode = SaMode.OR)
|
||||
public Result pageData(MemberApplyPageForm pageForm) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
@@ -76,6 +77,8 @@ public class MemberApplyMineController {
|
||||
info.personType,
|
||||
info.applyDateTime,
|
||||
info.sign,
|
||||
info.nativePlace,
|
||||
info.jobCategory,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
@@ -90,6 +93,7 @@ public class MemberApplyMineController {
|
||||
t.finishTime,
|
||||
t.taskParentId,
|
||||
t.variable taskVariable,
|
||||
GROUP_CONCAT(DISTINCT ta.actorName, '(', ta.actorAccount, ')' ) AS auditUser,
|
||||
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
|
||||
@@ -113,7 +117,7 @@ public class MemberApplyMineController {
|
||||
} else {
|
||||
cnd.orderBy("info." + pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
}
|
||||
cnd.groupBy("t.id");
|
||||
cnd.groupBy("info.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = memberCommonService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success().addData(pagination);
|
||||
@@ -123,7 +127,7 @@ public class MemberApplyMineController {
|
||||
@At
|
||||
@ApiOperation("删除入会申请")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("member.apply.mine")
|
||||
@SaCheckPermission(value = {"member.apply.mine", "h5.member.apply.mine"}, mode = SaMode.OR)
|
||||
@SLog(tag = "会员入会申请", msg = "删除入会申请id: ${args[0]}")
|
||||
public Result onDelete(@Valid String id) {
|
||||
dao.clear(MemberApplyRecord.class, Cnd.where("id", "=", id));
|
||||
@@ -140,9 +144,22 @@ public class MemberApplyMineController {
|
||||
*/
|
||||
@At
|
||||
@ApiOperation("获取申请信息")
|
||||
@SaCheckPermission(value = {"member.apply.mine", "member.apply.branchUnionApproval", "member.apply.branchUnionApproval", "member.apply.statistics"}, mode = SaMode.OR)
|
||||
@SaCheckPermission(value = {"member.apply.mine", "h5.member.apply.mine", "member.apply.query", "member.apply.branchUnionApproval", "h5.member.apply.branchUnionApproval", "member.apply.schoolUnionApproval", "h5.member.apply.schoolunionapproval", "member.apply.unionGroupApproval", "h5.member.apply.uniongroupapproval"}, mode = SaMode.OR)
|
||||
public Result findMemberApplyRecord(@Valid String id) {
|
||||
MemberApplyRecord record = dao.fetch(MemberApplyRecord.class, id);
|
||||
return Result.success().addData(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出入会申请表。
|
||||
*
|
||||
* @param id 入会申请记录id
|
||||
* @param response docx 文件下载响应
|
||||
*/
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckPermission(value = {"member.apply.mine", "h5.member.apply.mine", "member.apply.query", "member.apply.branchUnionApproval", "h5.member.apply.branchUnionApproval", "member.apply.schoolUnionApproval", "h5.member.apply.schoolunionapproval", "member.apply.unionGroupApproval", "h5.member.apply.uniongroupapproval"}, mode = SaMode.OR)
|
||||
public void exportApplyDocx(String id, HttpServletResponse response) {
|
||||
memberCommonService.exportApplyDocx(id, response);
|
||||
}
|
||||
}
|
||||
|
||||
+4
-2
@@ -1,6 +1,7 @@
|
||||
package com.budwk.app.zhgh.staffmanage.member.controller.apply;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
@@ -78,7 +79,7 @@ public class MemberApplySchoolUnionApprovalController {
|
||||
|
||||
@At
|
||||
@ApiOperation("会员入会校工会审核列表")
|
||||
@SaCheckPermission("member.apply.schoolUnionApproval")
|
||||
@SaCheckPermission(value = {"member.apply.schoolUnionApproval", "h5.member.apply.schoolunionapproval"}, mode = SaMode.OR)
|
||||
public Result pageData(MemberApplyPageForm pageForm) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
@@ -93,6 +94,7 @@ public class MemberApplySchoolUnionApprovalController {
|
||||
info.origin,
|
||||
info.applyDateTime,
|
||||
info.sign,
|
||||
info.nativePlace,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
@@ -138,7 +140,7 @@ public class MemberApplySchoolUnionApprovalController {
|
||||
} else {
|
||||
cnd.orderBy("info." + pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
}
|
||||
cnd.groupBy("t.id");
|
||||
cnd.groupBy("info.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = memberApplyRecordService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success(pagination);
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
package com.budwk.app.zhgh.staffmanage.member.controller.apply;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
@@ -53,7 +54,7 @@ public class MemberApplyUnionGroupApprovalController {
|
||||
|
||||
@At
|
||||
@ApiOperation("会员入会申请工会小组审核列表")
|
||||
@SaCheckPermission("member.apply.unionGroupApproval")
|
||||
@SaCheckPermission(value = {"member.apply.unionGroupApproval", "h5.member.apply.uniongroupapproval"}, mode = SaMode.OR)
|
||||
public Result pageData(MemberApplyPageForm pageForm) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
|
||||
-205
@@ -1,205 +0,0 @@
|
||||
package com.budwk.app.zhgh.staffmanage.member.controller.statistics;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.staffmanage.member.param.pageform.MemberApplyRecordStatisticsPageForm;
|
||||
import com.budwk.app.zhgh.staffmanage.member.service.MemberApplyRecordService;
|
||||
import com.budwk.app.zhgh.staffmanage.member.vo.MemberApplyRecordStatisticsVO;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 会员申请记录查询统计。
|
||||
*/
|
||||
@At("/platform/member/apply/statistics")
|
||||
@Ok("json:full")
|
||||
@IocBean
|
||||
public class MemberApplyRecordStatisticsController {
|
||||
|
||||
private static final Map<String, String> ORDER_COLUMN_MAP;
|
||||
|
||||
static {
|
||||
Map<String, String> orderColumnMap = new HashMap<>();
|
||||
orderColumnMap.put("loginName", "info.loginName");
|
||||
orderColumnMap.put("userName", "info.userName");
|
||||
orderColumnMap.put("unitName", "info.unitName");
|
||||
orderColumnMap.put("unionName", "info.unionName");
|
||||
orderColumnMap.put("userState", "info.userState");
|
||||
orderColumnMap.put("preparedBy", "info.preparedBy");
|
||||
orderColumnMap.put("personType", "info.personType");
|
||||
orderColumnMap.put("origin", "info.origin");
|
||||
orderColumnMap.put("applyDateTime", "info.applyDateTime");
|
||||
orderColumnMap.put("instanceState", "ins.state");
|
||||
ORDER_COLUMN_MAP = Collections.unmodifiableMap(orderColumnMap);
|
||||
}
|
||||
|
||||
@Inject
|
||||
private MemberApplyRecordService memberApplyRecordService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/staffmanage/member/statistics/applyRecord/index.html")
|
||||
@SaCheckPermission("member.apply.statistics")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询会员申请记录统计。
|
||||
*
|
||||
* @param pageForm 查询参数:searchKeyword 传姓名/工号关键字,unionId/unitId 传工会和单位ID数组,
|
||||
* userStates/personTypes/preparedBys 传人员字典值数组,instanceStates 传流程状态 code 数组,
|
||||
* startApplyDate/endApplyDate 传申请日期范围;分页和排序使用 PageForm 公共字段
|
||||
* @return Result 包装的 Pagination<MemberApplyRecordStatisticsVO>,list 为申请记录,totalCount 为总条数
|
||||
*/
|
||||
@At
|
||||
@SaCheckPermission("member.apply.statistics")
|
||||
public Result pageData(MemberApplyRecordStatisticsPageForm pageForm) {
|
||||
Sql sql = getApplyRecordSql(pageForm);
|
||||
Pagination<MemberApplyRecordStatisticsVO> pagination = memberApplyRecordService.listPageVO(
|
||||
pageForm, sql, MemberApplyRecordStatisticsVO.class
|
||||
);
|
||||
return Result.success(pagination);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出会员申请记录统计。
|
||||
*
|
||||
* @param pageForm 查询和导出参数:columns 为前端选择的导出列,prop 对应 MemberApplyRecordStatisticsVO 属性,
|
||||
* label 为 Excel 表头;其他筛选参数与 pageData 保持一致
|
||||
* @param response 文件下载响应,返回 xlsx 格式 Excel 文件
|
||||
*/
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckPermission("member.apply.statistics")
|
||||
public void doExport(MemberApplyRecordStatisticsPageForm pageForm, HttpServletResponse response) {
|
||||
Sql sql = getApplyRecordSql(pageForm);
|
||||
List<MemberApplyRecordStatisticsVO> list = memberApplyRecordService.listVO(sql, MemberApplyRecordStatisticsVO.class);
|
||||
try {
|
||||
List<ExcelExportEntity> exportEntities = buildExportColumns(pageForm);
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, list);
|
||||
CommonDownloadUtil.download("会员申请记录统计.xlsx", workbook, response);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建申请记录统计 SQL,当前节点先在子查询中合并,避免一个申请存在多个待办时重复展示。
|
||||
*/
|
||||
private Sql getApplyRecordSql(MemberApplyRecordStatisticsPageForm pageForm) {
|
||||
Sql sql = Sqls.create("SELECT " +
|
||||
"info.id, " +
|
||||
"info.userName, " +
|
||||
"info.loginName, " +
|
||||
"info.unitName, " +
|
||||
"info.unionName, " +
|
||||
"info.userState, " +
|
||||
"info.preparedBy, " +
|
||||
"info.personType, " +
|
||||
"info.origin, " +
|
||||
"info.applyDateTime, " +
|
||||
"CASE WHEN info.sign IS NOT NULL AND info.sign != '' THEN '已签字' ELSE '未签字' END signState, " +
|
||||
"ins.id AS instanceId, " +
|
||||
"ins.businessNo, " +
|
||||
"ins.state AS instanceState, " +
|
||||
"CASE ins.state " +
|
||||
"WHEN 10 THEN '进行中' " +
|
||||
"WHEN 20 THEN '已完成' " +
|
||||
"WHEN 30 THEN '已撤回' " +
|
||||
"WHEN 40 THEN '强行终止' " +
|
||||
"WHEN 45 THEN '已拒绝' " +
|
||||
"WHEN 50 THEN '挂起' " +
|
||||
"WHEN 99 THEN '已废弃' " +
|
||||
"ELSE '未知' END AS instanceStateName, " +
|
||||
"ins.processDefineId AS instanceProcessDefineId, " +
|
||||
"IFNULL(nt.curTaskName, '结束') AS curTaskName " +
|
||||
"FROM member_apply_record info " +
|
||||
"LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id " +
|
||||
"LEFT JOIN (SELECT processInstanceId, GROUP_CONCAT(DISTINCT displayName) AS curTaskName " +
|
||||
"FROM wf_process_task WHERE taskState = 10 GROUP BY processInstanceId) nt ON nt.processInstanceId = ins.id " +
|
||||
"$condition");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
MemberApplyRecordStatisticsPageForm.buildSearch(cnd, pageForm);
|
||||
buildDataScope(cnd);
|
||||
buildOrder(cnd, pageForm);
|
||||
sql.setCondition(cnd);
|
||||
return sql;
|
||||
}
|
||||
|
||||
/**
|
||||
* 按当前登录人的角色补充数据范围,避免普通用户通过统计入口看到无权限的申请记录。
|
||||
*/
|
||||
private void buildDataScope(Cnd cnd) {
|
||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_MEMBER_ADMIN.name())) {
|
||||
if (AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
|
||||
cnd.and("info.unionId", "=", SecurityUtil.getUnionId());
|
||||
} else {
|
||||
cnd.and("info.userId", "=", SecurityUtil.getUserId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 仅允许前端按白名单字段排序,避免页面排序字段被拼接成非预期 SQL。
|
||||
*/
|
||||
private void buildOrder(Cnd cnd, MemberApplyRecordStatisticsPageForm pageForm) {
|
||||
if (StrUtil.isAllNotBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())
|
||||
&& ORDER_COLUMN_MAP.containsKey(pageForm.getPageOrderName())) {
|
||||
cnd.orderBy(ORDER_COLUMN_MAP.get(pageForm.getPageOrderName()), PageUtil.getOrder(pageForm.getPageOrderBy()));
|
||||
} else {
|
||||
cnd.desc("info.applyDateTime");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成导出列;前端未传列设置时,使用申请记录统计的默认核心字段。
|
||||
*/
|
||||
private List<ExcelExportEntity> buildExportColumns(MemberApplyRecordStatisticsPageForm pageForm) {
|
||||
List<ExcelExportEntity> exportEntities = new ArrayList<>();
|
||||
if (Lang.isNotEmpty(pageForm.getColumns())) {
|
||||
pageForm.getColumns().forEach(column -> {
|
||||
exportEntities.add(new ExcelExportEntity(column.get("label"), column.get("prop"), 20));
|
||||
});
|
||||
return exportEntities;
|
||||
}
|
||||
exportEntities.add(new ExcelExportEntity("工号", "loginName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("姓名", "userName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("所属工会", "unionName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("所属单位", "unitName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("在职状态", "userState", 20));
|
||||
exportEntities.add(new ExcelExportEntity("教职工类别", "personType", 20));
|
||||
exportEntities.add(new ExcelExportEntity("编制类别", "preparedBy", 20));
|
||||
exportEntities.add(new ExcelExportEntity("来源", "origin", 20));
|
||||
exportEntities.add(new ExcelExportEntity("申请时间", "applyDateTime", 25));
|
||||
exportEntities.add(new ExcelExportEntity("签字状态", "signState", 20));
|
||||
exportEntities.add(new ExcelExportEntity("当前节点", "curTaskName", 20));
|
||||
exportEntities.add(new ExcelExportEntity("流程状态", "instanceStateName", 20));
|
||||
return exportEntities;
|
||||
}
|
||||
}
|
||||
@@ -182,6 +182,16 @@ public class MemberApplyRecord extends BaseModel {
|
||||
@ColDefine(type = ColType.VARCHAR, customType = "text")
|
||||
private String personalData;
|
||||
|
||||
@Column
|
||||
@Comment("特长及获奖情况")
|
||||
@ColDefine(type = ColType.VARCHAR, customType = "text")
|
||||
private String specialty;
|
||||
|
||||
@Column
|
||||
@Comment("婚姻状况")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String marriage;
|
||||
|
||||
@Column
|
||||
@Comment("备注")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 255)
|
||||
@@ -223,8 +233,33 @@ public class MemberApplyRecord extends BaseModel {
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String sign;
|
||||
|
||||
@Column
|
||||
@Comment("照片")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 500)
|
||||
private String photo;
|
||||
|
||||
@Column
|
||||
@Comment("来源,高校编码")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String origin;
|
||||
|
||||
@Column
|
||||
@Comment("家庭住址")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String homeAddress;
|
||||
|
||||
@Column
|
||||
@Comment("来校时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String arrivalAtSchoolDate;
|
||||
|
||||
@Column
|
||||
@Comment("籍贯")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String nativePlace;
|
||||
|
||||
@Column
|
||||
@Comment("岗位名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String jobCategory;
|
||||
}
|
||||
|
||||
-74
@@ -1,74 +0,0 @@
|
||||
package com.budwk.app.zhgh.staffmanage.member.param.pageform;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 会员申请记录统计查询参数。
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class MemberApplyRecordStatisticsPageForm extends PageForm {
|
||||
|
||||
@ApiModelProperty("所属工会ID,多个值由前端数组提交")
|
||||
private List<String> unionId;
|
||||
|
||||
@ApiModelProperty("所属单位ID,多个值由前端数组提交")
|
||||
private List<String> unitId;
|
||||
|
||||
@ApiModelProperty("在职状态字典值,多个值由前端数组提交")
|
||||
private List<String> userStates;
|
||||
|
||||
@ApiModelProperty("教职工类别字典值,多个值由前端数组提交")
|
||||
private List<String> personTypes;
|
||||
|
||||
@ApiModelProperty("编制类别字典值,多个值由前端数组提交")
|
||||
private List<String> preparedBys;
|
||||
|
||||
@ApiModelProperty("流程实例状态,使用 ProcessInstanceStateEnum 的 code")
|
||||
private List<Integer> instanceStates;
|
||||
|
||||
@ApiModelProperty("申请开始时间,格式 yyyy-MM-dd")
|
||||
private String startApplyDate;
|
||||
|
||||
@ApiModelProperty("申请结束时间,格式 yyyy-MM-dd")
|
||||
private String endApplyDate;
|
||||
|
||||
@ApiModelProperty("导出列,字段 prop 对应 VO 属性,label 为 Excel 表头")
|
||||
private List<Map<String, String>> columns;
|
||||
|
||||
/**
|
||||
* 组装申请记录统计的公共查询条件。
|
||||
*
|
||||
* @param cnd SQL 条件对象,由调用方继续追加权限、排序等条件
|
||||
* @param pageForm 查询参数,包含姓名/工号关键字、工会、单位、人员类别、申请时间和流程状态
|
||||
*/
|
||||
public static void buildSearch(Cnd cnd, MemberApplyRecordStatisticsPageForm pageForm) {
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
seg.or("info.loginName", "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
seg.or("info.username", "like", "%" + pageForm.getSearchKeyword() + "%");
|
||||
cnd.and(seg);
|
||||
}
|
||||
cnd.andEX("info.unionId", "in", pageForm.getUnionId());
|
||||
cnd.andEX("info.unitId", "in", pageForm.getUnitId());
|
||||
cnd.andEX("info.userState", "in", pageForm.getUserStates());
|
||||
cnd.andEX("info.personType", "in", pageForm.getPersonTypes());
|
||||
cnd.andEX("info.preparedBy", "in", pageForm.getPreparedBys());
|
||||
cnd.andEX("ins.state", "in", pageForm.getInstanceStates());
|
||||
if (StrUtil.isNotBlank(pageForm.getStartApplyDate())) {
|
||||
cnd.and("info.applyDateTime", ">=", pageForm.getStartApplyDate() + " 00:00:00");
|
||||
}
|
||||
if (StrUtil.isNotBlank(pageForm.getEndApplyDate())) {
|
||||
cnd.and("info.applyDateTime", "<=", pageForm.getEndApplyDate() + " 23:59:59");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import com.budwk.app.zhgh.staffmanage.member.param.pageform.MemberManagePageForm
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -115,4 +116,12 @@ public interface MemberCommonService extends BaseService<Sys_user> {
|
||||
* @param type 类型: apply or change
|
||||
*/
|
||||
void validateApplyOrChangeIsDoing(String userId, String type);
|
||||
|
||||
/**
|
||||
* 导出会员入会申请表。
|
||||
*
|
||||
* @param id 入会申请记录id
|
||||
* @param response docx 文件下载响应
|
||||
*/
|
||||
void exportApplyDocx(String id, HttpServletResponse response);
|
||||
}
|
||||
|
||||
+236
@@ -3,6 +3,7 @@ package com.budwk.app.zhgh.staffmanage.member.service.impl;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HtmlUtil;
|
||||
@@ -10,9 +11,12 @@ import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.exception.BaseException;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.base.utils.SysOfficeTemplateUtil;
|
||||
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.enums.ProcessTaskStateEnum;
|
||||
import com.budwk.app.flow.vo.ProcessTaskVO;
|
||||
import com.budwk.app.sys.models.*;
|
||||
import com.budwk.app.sys.services.SysDictService;
|
||||
import com.budwk.app.sys.services.SysRoleService;
|
||||
@@ -29,7 +33,19 @@ import com.budwk.app.zhgh.staffmanage.member.param.pageform.MemberManagePageForm
|
||||
import com.budwk.app.zhgh.staffmanage.member.service.MemberCommonService;
|
||||
import com.budwk.app.zhgh.staffmanage.specialstaff.model.SpecialStaff;
|
||||
import com.budwk.app.zhgh.welfare.model.WelfareList;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.util.Units;
|
||||
import org.apache.poi.xwpf.usermodel.LineSpacingRule;
|
||||
import org.apache.poi.xwpf.usermodel.ParagraphAlignment;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFParagraph;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFRun;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFTable;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFTableCell;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFTableRow;
|
||||
import org.ddr.poi.html.HtmlRenderPolicy;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
@@ -45,7 +61,12 @@ import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.random.R;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.CTInline;
|
||||
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTDrawing;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -61,12 +82,23 @@ import java.util.stream.Collectors;
|
||||
@Slf4j
|
||||
public class MemberManageServiceImpl extends BaseServiceImpl<Sys_user> implements MemberCommonService {
|
||||
|
||||
private static final int MEMBER_APPLY_PHOTO_WIDTH_PIXEL = 100;
|
||||
private static final int MEMBER_APPLY_PHOTO_HEIGHT_PIXEL = 140;
|
||||
private static final int MEMBER_APPLY_PHOTO_WIDTH_EMU = Units.pixelToEMU(MEMBER_APPLY_PHOTO_WIDTH_PIXEL);
|
||||
private static final int MEMBER_APPLY_PHOTO_HEIGHT_EMU = Units.pixelToEMU(MEMBER_APPLY_PHOTO_HEIGHT_PIXEL);
|
||||
private static final int MEMBER_APPLY_PHOTO_SIZE_TOLERANCE_EMU = Units.pixelToEMU(2);
|
||||
private static final double MEMBER_APPLY_PHOTO_PARAGRAPH_LINE_POINT = MEMBER_APPLY_PHOTO_HEIGHT_PIXEL * 0.75D;
|
||||
|
||||
@Inject
|
||||
private SysDictService sysDictService;
|
||||
@Inject
|
||||
private SysRoleService sysRoleService;
|
||||
@Inject
|
||||
private SysUserService sysUserService;
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
@Inject
|
||||
private SysOfficeTemplateUtil sysOfficeTemplateUtil;
|
||||
|
||||
public MemberManageServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
@@ -566,4 +598,208 @@ public class MemberManageServiceImpl extends BaseServiceImpl<Sys_user> implement
|
||||
}
|
||||
return value.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportApplyDocx(String id, HttpServletResponse response) {
|
||||
MemberApplyRecord member = dao().fetch(MemberApplyRecord.class, Cnd.where("id", "=", id));
|
||||
if (member == null) {
|
||||
throw new RuntimeException("会员申请记录不存在");
|
||||
}
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
info.*,
|
||||
ins.id AS instanceId
|
||||
FROM
|
||||
`member_apply_record` info
|
||||
LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id
|
||||
WHERE
|
||||
info.id = @id
|
||||
""").setParam("id", id);
|
||||
sql.setCallback(Sqls.callback.map());
|
||||
dao().execute(sql);
|
||||
NutMap info = (NutMap) sql.getResult();
|
||||
|
||||
HashMap<String, Object> docData = new HashMap<>();
|
||||
docData.put("unitName", member.getUnitName());
|
||||
docData.put("time", DateUtil.format(new Date(), "yyyy年MM月dd日"));
|
||||
docData.put("username", member.getUsername());
|
||||
docData.put("sex", member.getSex());
|
||||
docData.put("birthday", StrUtil.isNotBlank(member.getBirthday()) ? DateUtil.parse(member.getBirthday()).toString("yyyy-MM-dd") : "");
|
||||
docData.put("political", member.getPolitical());
|
||||
docData.put("nation", member.getNation());
|
||||
docData.put("education", member.getEducation());
|
||||
docData.put("nativePlace", member.getNativePlace());
|
||||
docData.put("marriage", member.getMarriage());
|
||||
docData.put("specialty", buildMemberApplyDocHtml(member.getSpecialty()));
|
||||
docData.put("jobCategory", member.getJobCategory());
|
||||
docData.put("idCard", member.getIdCard());
|
||||
docData.put("mobile", member.getMobile());
|
||||
docData.put("arrivalAtSchoolDate", StrUtil.isNotBlank(member.getArrivalAtSchoolDate()) ? DateUtil.parse(member.getArrivalAtSchoolDate()).toString("yyyy-MM-dd") : "");
|
||||
docData.put("homeAddress", member.getHomeAddress());
|
||||
docData.put("personalData", buildMemberApplyDocHtml(member.getPersonalData()));
|
||||
docData.put("photo", sysOfficeTemplateUtil.createPictureRenderData(MEMBER_APPLY_PHOTO_WIDTH_PIXEL, MEMBER_APPLY_PHOTO_HEIGHT_PIXEL, member.getPhoto()));
|
||||
docData.put("sign", sysOfficeTemplateUtil.createPictureRenderData(member.getSign()));
|
||||
docData.put("applyDateTime", member.getApplyDateTime() != null ? DateUtil.format(member.getApplyDateTime(), "yyyy年MM月dd日") : "");
|
||||
|
||||
// 将家庭成员数组合并为模板中的多行文本。
|
||||
if (member.getFamilies() != null && !member.getFamilies().isEmpty()) {
|
||||
StringBuilder familyStr = new StringBuilder();
|
||||
for (int i = 0; i < member.getFamilies().size(); i++) {
|
||||
NutMap fam = NutMap.WRAP(member.getFamilies().get(i));
|
||||
familyStr.append((i + 1)).append(". ")
|
||||
.append("关系:").append(StrUtil.nullToDefault(fam.getString("relation"), "无")).append(", ")
|
||||
.append("姓名:").append(StrUtil.nullToDefault(fam.getString("name"), "无")).append(", ")
|
||||
.append("单位:").append(StrUtil.nullToDefault(fam.getString("unit"), "无")).append(", ")
|
||||
.append("备注:").append(StrUtil.nullToDefault(fam.getString("remark"), "无")).append("\n");
|
||||
}
|
||||
docData.put("familiesStr", familyStr.toString());
|
||||
} else {
|
||||
docData.put("familiesStr", "无");
|
||||
}
|
||||
|
||||
List<ProcessTaskVO> doneTaskVos = new ArrayList<>();
|
||||
Long instanceId = info.getLong("instanceId");
|
||||
if (instanceId != null) {
|
||||
List<ProcessTask> doneTaskList = flowEngine.processTaskService().getDoneTaskList(instanceId, null);
|
||||
for (ProcessTask doneTask : doneTaskList) {
|
||||
ProcessTaskVO taskVO = flowEngine.processTaskService().findById(doneTask.getId());
|
||||
doneTaskVos.add(taskVO);
|
||||
}
|
||||
}
|
||||
|
||||
// 提取分工会和校工会最后一次审核意见,填充到申请表模板对应区块。
|
||||
doneTaskVos.stream().filter(task -> "分工会审核".equals(task.getDisplayName()))
|
||||
.max(Comparator.comparing(ProcessTaskVO::getCreatedAt))
|
||||
.ifPresent(v -> putMemberApplyApproval(docData, "fgh", v));
|
||||
doneTaskVos.stream().filter(task -> "校工会审核".equals(task.getDisplayName()))
|
||||
.max(Comparator.comparing(ProcessTaskVO::getCreatedAt))
|
||||
.ifPresent(v -> putMemberApplyApproval(docData, "xgh", v));
|
||||
|
||||
String fileName = "会员入会申请表_" + member.getUsername() + "_" + DateUtil.format(new Date(), "yyyyMMdd") + ".docx";
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.wordprocessingml.document");
|
||||
response.setHeader("content-disposition", "attachment;filename=" + URLEncoder.encode(fileName, StandardCharsets.UTF_8));
|
||||
|
||||
HtmlRenderPolicy htmlRenderPolicy = new HtmlRenderPolicy();
|
||||
htmlRenderPolicy.getConfig().setShowDefaultTableBorderInTableCell(true);
|
||||
Configure config = Configure.builder()
|
||||
.bind("personalData", htmlRenderPolicy)
|
||||
.bind("specialty", htmlRenderPolicy)
|
||||
.build();
|
||||
try {
|
||||
XWPFTemplate template = XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate("member_apply_form"), config)
|
||||
.render(docData);
|
||||
resizeMemberApplyPhotoRow(template.getXWPFDocument());
|
||||
template.write(response.getOutputStream());
|
||||
} catch (Exception e) {
|
||||
log.error("导出会员入会申请表失败,ID: {}, 错误信息: {}", id, e.getMessage());
|
||||
throw new RuntimeException("导出文件失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将流程办理意见转换为模板可渲染的审核信息。
|
||||
*/
|
||||
private void putMemberApplyApproval(HashMap<String, Object> docData, String key, ProcessTaskVO taskVO) {
|
||||
Dict taskFormData = taskVO.getTaskFormData();
|
||||
HashMap<String, Object> approval = new HashMap<>();
|
||||
approval.put("date", taskVO.getFinishTime() != null ? DateUtil.format(taskVO.getFinishTime(), "yyyy年MM月dd日") : "");
|
||||
approval.put("user", taskFormData != null ? taskFormData.getStr("tf_userName") : "");
|
||||
if (taskFormData != null && StrUtil.isNotBlank(taskFormData.getStr("tf_sign"))) {
|
||||
approval.put("sign", sysOfficeTemplateUtil.createPictureRenderData(taskFormData.getStr("tf_sign")));
|
||||
}
|
||||
approval.put("opinion", taskFormData != null ? taskFormData.getStr("tf_opinion") : "");
|
||||
docData.put(key, approval);
|
||||
}
|
||||
|
||||
/**
|
||||
* 入会申请导出时统一转为 HTML 片段,历史富文本保留样式,普通文本保留换行。
|
||||
*/
|
||||
private String buildMemberApplyDocHtml(String text) {
|
||||
if (StrUtil.isBlank(text)) {
|
||||
return "";
|
||||
}
|
||||
String docText = sysOfficeTemplateUtil.convertRichTextToDocText(text);
|
||||
if (containsHtmlTag(docText)) {
|
||||
return docText;
|
||||
}
|
||||
String escapeText = HtmlUtil.escape(docText)
|
||||
.replace("\r\n", "\n")
|
||||
.replace("\r", "\n")
|
||||
.replace("\n", "<br/>");
|
||||
return "<p>" + escapeText + "</p>";
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断内容是否包含 HTML 标签,避免把历史富文本当普通文本转义。
|
||||
*/
|
||||
private boolean containsHtmlTag(String text) {
|
||||
return StrUtil.isNotBlank(text) && text.matches("(?s).*<\\s*[a-zA-Z][^>]*>.*");
|
||||
}
|
||||
|
||||
/**
|
||||
* 保证导出的会员照片行足够高,避免 Word 裁剪默认内联图片。
|
||||
*/
|
||||
private void resizeMemberApplyPhotoRow(XWPFDocument document) {
|
||||
if (document == null) {
|
||||
return;
|
||||
}
|
||||
for (XWPFTable table : document.getTables()) {
|
||||
for (XWPFTableRow row : table.getRows()) {
|
||||
adjustMemberApplyPhotoParagraph(row);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 只匹配会员照片尺寸,避免影响签字图片。
|
||||
*/
|
||||
private boolean adjustMemberApplyPhotoParagraph(XWPFTableRow row) {
|
||||
if (row == null) {
|
||||
return false;
|
||||
}
|
||||
boolean found = false;
|
||||
for (XWPFTableCell cell : row.getTableCells()) {
|
||||
for (XWPFParagraph paragraph : cell.getParagraphs()) {
|
||||
for (XWPFRun run : paragraph.getRuns()) {
|
||||
if (runContainsMemberApplyPhoto(run)) {
|
||||
adjustMemberApplyPhotoParagraphStyle(paragraph);
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
/**
|
||||
* 调整照片所在段落,确保图片在合并单元格中完整可见。
|
||||
*/
|
||||
private void adjustMemberApplyPhotoParagraphStyle(XWPFParagraph paragraph) {
|
||||
paragraph.setAlignment(ParagraphAlignment.CENTER);
|
||||
paragraph.setSpacingBefore(0);
|
||||
paragraph.setSpacingAfter(0);
|
||||
paragraph.setSpacingBeforeLines(0);
|
||||
paragraph.setSpacingAfterLines(0);
|
||||
paragraph.setSpacingBetween(MEMBER_APPLY_PHOTO_PARAGRAPH_LINE_POINT, LineSpacingRule.AT_LEAST);
|
||||
}
|
||||
|
||||
private boolean runContainsMemberApplyPhoto(XWPFRun run) {
|
||||
if (run == null || run.getCTR() == null) {
|
||||
return false;
|
||||
}
|
||||
for (CTDrawing drawing : run.getCTR().getDrawingArray()) {
|
||||
for (CTInline inline : drawing.getInlineArray()) {
|
||||
if (inline.getExtent() != null && isMemberApplyPhotoSize(inline.getExtent().getCx(), inline.getExtent().getCy())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean isMemberApplyPhotoSize(long widthEmu, long heightEmu) {
|
||||
return Math.abs(widthEmu - MEMBER_APPLY_PHOTO_WIDTH_EMU) <= MEMBER_APPLY_PHOTO_SIZE_TOLERANCE_EMU
|
||||
&& Math.abs(heightEmu - MEMBER_APPLY_PHOTO_HEIGHT_EMU) <= MEMBER_APPLY_PHOTO_SIZE_TOLERANCE_EMU;
|
||||
}
|
||||
}
|
||||
|
||||
-46
@@ -1,46 +0,0 @@
|
||||
package com.budwk.app.zhgh.staffmanage.member.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 会员申请记录统计返回数据。
|
||||
*/
|
||||
@Data
|
||||
public class MemberApplyRecordStatisticsVO {
|
||||
|
||||
private String id;
|
||||
|
||||
private String userName;
|
||||
|
||||
private String loginName;
|
||||
|
||||
private String unitName;
|
||||
|
||||
private String unionName;
|
||||
|
||||
private String userState;
|
||||
|
||||
private String preparedBy;
|
||||
|
||||
private String personType;
|
||||
|
||||
private String origin;
|
||||
|
||||
private Date applyDateTime;
|
||||
|
||||
private String signState;
|
||||
|
||||
private String instanceId;
|
||||
|
||||
private String businessNo;
|
||||
|
||||
private Integer instanceState;
|
||||
|
||||
private String instanceStateName;
|
||||
|
||||
private String instanceProcessDefineId;
|
||||
|
||||
private String curTaskName;
|
||||
}
|
||||
+163
-153
@@ -2,93 +2,98 @@
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<common-query ref="commonQueryRef" @search="search"></common-query>
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="申请列表">
|
||||
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
|
||||
<el-radio-button label="true">已审核</el-radio-button>
|
||||
<el-radio-button label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column
|
||||
:index="indexMethod"
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
header-align="center"
|
||||
min-width="100px"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='loginname'">
|
||||
<el-link @click="openView(row)" type="primary">{{row.loginname}}</el-link>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='sign'">
|
||||
<el-image v-if="row.sign" :src="row.sign" style="height: 60px"></el-image>
|
||||
<el-tag type="warning" v-else>暂无</el-tag>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='instanceState'">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="200px">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="openView(row)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openApproval(row)" size="mini" type="primary">
|
||||
审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="openRevoke(row)" size="mini" type="danger">
|
||||
撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<common-query ref="commonQueryRef" @search="search"></common-query>
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="申请列表">
|
||||
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
|
||||
<el-radio-button label="true">已审核</el-radio-button>
|
||||
<el-radio-button label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
:index="indexMethod"
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
header-align="center"
|
||||
min-width="100px"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='loginname'">
|
||||
<el-link @click="openView(row)" type="primary">{{row.loginname}}</el-link>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='sign'">
|
||||
<el-image v-if="row.sign" :src="row.sign" style="height: 60px"></el-image>
|
||||
<el-tag type="warning" v-else>暂无</el-tag>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='instanceState'">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="200px">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="openView(row)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openApproval(row)" size="mini" type="primary">
|
||||
审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="openRevoke(row)" size="mini" type="danger">
|
||||
撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #edit>
|
||||
<info ref="infoRef">
|
||||
<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>
|
||||
</info>
|
||||
</template>
|
||||
<template #edit>
|
||||
<info ref="infoRef">
|
||||
<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-item prop="tf_sign"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<pc-signature v-model="formData.tf_sign"></pc-signature>
|
||||
</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>
|
||||
</info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</guava>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
<!--#include("../common/commonQuery.js"){}#-->
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
<!--#include("../common/commonQuery.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
@@ -102,89 +107,94 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "loginName", label: "工号", sortable: true },
|
||||
{ prop: "userName", label: "姓名", sortable: true },
|
||||
{ prop: "userState", label: "在职状态", sortable: true },
|
||||
{ prop: "personType", label: "教职工类别", sortable: true },
|
||||
{ prop: "preparedBy", label: "编制类别", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
// { prop: "personType", label: "教职工类别", sortable: true },
|
||||
{ prop: "nativePlace", label: "籍贯", sortable: true },
|
||||
// { prop: "preparedBy", label: "编制类别", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "sign", label: "签字" },
|
||||
{ prop: "curTaskName", label: "当前节点" },
|
||||
{ prop: "instanceState", label: "流程状态" }
|
||||
// { prop: "sign", label: "签字" },
|
||||
{ prop: "curTaskName", label: "当前节点" },
|
||||
{ prop: "instanceState", label: "流程状态" }
|
||||
],
|
||||
|
||||
// 审核相关
|
||||
showApprovalForm: false,
|
||||
formData: {
|
||||
tf_opinion: ""
|
||||
},
|
||||
// 审核相关
|
||||
showApprovalForm: false,
|
||||
formData: {
|
||||
tf_opinion: ""
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'info': INFO,
|
||||
'common-query': COMMON_QUERY,
|
||||
"info": INFO,
|
||||
"common-query": COMMON_QUERY
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
openView(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openApproval(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
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()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
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()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
openRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(()=>{
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post("/flow/common/revokeTask", { taskId: row.taskId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
search(pageForm){
|
||||
if (pageForm) {
|
||||
this.pageForm = {...this.pageForm, ...pageForm}
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
search(pageForm) {
|
||||
if (pageForm) {
|
||||
this.pageForm = { ...this.pageForm, ...pageForm }
|
||||
}
|
||||
this.doSearch()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
|
||||
+6
-4
@@ -62,7 +62,7 @@ const COMMON_QUERY = {
|
||||
pageForm.preparedBys = JSON.stringify(this.pageForm.preparedBys)
|
||||
this.$emit('search', pageForm)
|
||||
},
|
||||
async initData(){
|
||||
initData(){
|
||||
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
|
||||
this.$businessTool.listUnion(this.pageForm.unionId).then((data) => {
|
||||
this.unions = data
|
||||
@@ -79,15 +79,17 @@ const COMMON_QUERY = {
|
||||
})
|
||||
}
|
||||
},
|
||||
async flushUnits(){
|
||||
flushUnits(){
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.units = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
|
||||
this.$businessTool.listUnit(this.pageForm.unionId).then((data) => {
|
||||
this.units = data
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
created() {
|
||||
this.initData()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,21 +16,27 @@ const INFO = {
|
||||
|
||||
<el-descriptions-item label="学历">{{ viewData.education }}</el-descriptions-item>
|
||||
<el-descriptions-item label="学位">{{ viewData.academicDegree }}</el-descriptions-item>
|
||||
<el-descriptions-item label="党政职务">{{ viewData.position }}</el-descriptions-item>
|
||||
<el-descriptions-item label="籍贯">{{ viewData.nativePlace }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="工作单位">{{ viewData.unitName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="所属工会">{{ viewData.unionName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="所属校区">{{ viewData.campus }}</el-descriptions-item>
|
||||
<el-descriptions-item label="岗位名称">{{ viewData.jobCategory }}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="所属校区">{{ viewData.campus }}</el-descriptions-item>-->
|
||||
|
||||
<el-descriptions-item label="身份证号码">{{ viewData.idCard }}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系电话">{{ viewData.mobile }}</el-descriptions-item>
|
||||
<el-descriptions-item label="电子邮箱">{{ viewData.email }}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="电子邮箱">{{ viewData.email }}</el-descriptions-item>-->
|
||||
|
||||
<el-descriptions-item label="在职状态">{{ viewData.userState }}</el-descriptions-item>
|
||||
<el-descriptions-item label="教职工类别">{{ viewData.personType }}</el-descriptions-item>
|
||||
<el-descriptions-item label="编制类别">{{ viewData.preparedBy }}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="在职状态">{{ viewData.userState }}</el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="教职工类别">{{ viewData.personType }}</el-descriptions-item>-->
|
||||
<!-- <el-descriptions-item label="编制类别">{{ viewData.preparedBy }}</el-descriptions-item>-->
|
||||
<el-descriptions-item label="婚姻状况">{{ viewData.marriage }}</el-descriptions-item>
|
||||
<el-descriptions-item label="入职时间">{{ viewData.arrivalAtSchoolDate }}</el-descriptions-item>
|
||||
<el-descriptions-item label="家庭住址" :span="3">{{ viewData.homeAddress }}</el-descriptions-item>
|
||||
|
||||
|
||||
<template v-if="viewData.loginname == $store.state.user.loginname">
|
||||
</template>
|
||||
<el-descriptions-item label="家庭主要成员" :span="3">
|
||||
<el-table v-if="viewData.families&&viewData.families.length"
|
||||
:data="viewData.families" size="mini" border
|
||||
@@ -47,11 +53,20 @@ const INFO = {
|
||||
</el-table>
|
||||
<el-empty v-else :image-size="50" description="暂无家庭成员信息"></el-empty>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="个人简况" :span="3">
|
||||
<div v-if="viewData.personalData" class="text-left" v-html="viewData.personalData"></div>
|
||||
<el-descriptions-item label="个人学习及工作经历" :span="3">
|
||||
<div v-if="viewData.personalData" class="text-left w-e-text member-apply-rich-text" style="white-space: pre-wrap; word-break: break-all;" v-html="viewData.personalData"></div>
|
||||
<el-tag type="warning" v-else>暂无</el-tag>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
<el-descriptions-item label="特长及获奖情况" :span="3">
|
||||
<div v-if="viewData.specialty" class="text-left w-e-text member-apply-rich-text" style="white-space: pre-wrap; word-break: break-all;" v-html="viewData.specialty"></div>
|
||||
<el-tag type="warning" v-else>暂无</el-tag>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="照片" :span="3" v-if="viewData.photo">
|
||||
<el-image :src="viewData.photo"
|
||||
style="width: 120px;height: 150px"
|
||||
fit="cover"></el-image>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="签字信息" :span="3" v-if="viewData.sign">
|
||||
<el-image :src="viewData.sign"
|
||||
@@ -91,8 +106,12 @@ const INFO = {
|
||||
</template>
|
||||
|
||||
<el-descriptions-item label="办理意见" :span="3" v-if="!task.ext.isFirstTaskNode">{{
|
||||
task.taskFormData.opinion }}
|
||||
task.taskFormData.tf_opinion }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="签字信息" :span="3" v-if="!task.ext.isFirstTaskNode">
|
||||
<el-image :src="task.taskFormData.tf_sign"
|
||||
class="signature-image"></el-image>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
+15
-11
@@ -111,17 +111,21 @@ const MEMBER_APPLY_AUDIT_INFO = {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onOpen(id){
|
||||
const resp = await $.post('/platform/member/apply/mine/findMemberApplyRecord', {id})
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data
|
||||
this.$emit('union-name', this.viewData.userUnionName)
|
||||
if (this.viewData.families) {
|
||||
this.viewData.families = JSON.parse(this.viewData.families)
|
||||
} else {
|
||||
this.viewData.families = []
|
||||
}
|
||||
}
|
||||
onOpen(id){
|
||||
$.post("/platform/member/apply/mine/findMemberApplyRecord", {id})
|
||||
.then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.viewData = resp.data
|
||||
this.$emit('union-name', this.viewData.userUnionName)
|
||||
if (this.viewData.families) {
|
||||
this.viewData.families = JSON.parse(this.viewData.families)
|
||||
} else {
|
||||
this.viewData.families = []
|
||||
}
|
||||
}
|
||||
})
|
||||
.always(() => {
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,12 +42,23 @@ layout("/layouts/platform.html"){
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
|
||||
<template scope="{row}" v-else-if="column.prop=='taskName'">
|
||||
{{row.taskName}}
|
||||
<template v-if="row.auditUser">
|
||||
-{{row.auditUser}}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="220" fixed="right">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button v-if="row.instanceState === 20"
|
||||
@click="exportApplyDocx(row.id)" size="mini" type="primary">
|
||||
导出申请表
|
||||
</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId"
|
||||
@click="onEdit(row)" size="mini" type="primary">
|
||||
编辑
|
||||
@@ -85,11 +96,11 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "loginName", label: "工号", sortable: true },
|
||||
{ prop: "userName", label: "姓名", sortable: true },
|
||||
{ prop: "userState", label: "在职状态", sortable: true },
|
||||
{ prop: "personType", label: "教职工类别", sortable: true },
|
||||
{ prop: "preparedBy", label: "编制类别", sortable: true },
|
||||
// { prop: "personType", label: "教职工类别", sortable: true },
|
||||
{ prop: "nativePlace", label: "籍贯", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "sign", label: "签字" },
|
||||
// { prop: "sign", label: "签字" },
|
||||
{ prop: "taskName", label: "当前节点"},
|
||||
{ prop: "instanceState", label: "流程状态"}
|
||||
],
|
||||
@@ -102,6 +113,9 @@ layout("/layouts/platform.html"){
|
||||
'common-query': COMMON_QUERY,
|
||||
},
|
||||
methods: {
|
||||
exportApplyDocx(id) {
|
||||
this.$downLoad("/platform/member/apply/mine/exportApplyDocx", { id })
|
||||
},
|
||||
onApply() {
|
||||
commonUtil.pjaxPush('/platform/member/apply/submit')
|
||||
},
|
||||
|
||||
+180
-170
@@ -2,111 +2,116 @@
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<common-query ref="commonQueryRef" @search="search"></common-query>
|
||||
</el-card>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<common-query ref="commonQueryRef" @search="search"></common-query>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="申请列表">
|
||||
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
|
||||
<el-radio-button label="true">已审核</el-radio-button>
|
||||
<el-radio-button label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column
|
||||
:index="indexMethod"
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
header-align="center"
|
||||
min-width="100px"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='loginname'">
|
||||
<el-link @click="openView(row)" type="primary">{{row.loginname}}</el-link>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='sign'">
|
||||
<el-image v-if="row.sign" :src="row.sign" style="height: 60px"></el-image>
|
||||
<el-tag type="warning" v-else>暂无</el-tag>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='instanceState'">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="200px">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="openView(row)">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openApproval(row)" size="mini" type="primary">
|
||||
审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="openRevoke(row)" size="mini" type="danger">
|
||||
撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="申请列表">
|
||||
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
|
||||
<el-radio-button label="true">已审核</el-radio-button>
|
||||
<el-radio-button label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" ref="table" row-key="id"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
:index="indexMethod"
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="80px"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
header-align="center"
|
||||
min-width="100px"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='loginname'">
|
||||
<el-link @click="openView(row)" type="primary">{{row.loginname}}</el-link>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='sign'">
|
||||
<el-image v-if="row.sign" :src="row.sign" style="height: 60px"></el-image>
|
||||
<el-tag type="warning" v-else>暂无</el-tag>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='instanceState'">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="200px">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="openView(row)">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openApproval(row)" size="mini" type="primary">
|
||||
审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="openRevoke(row.taskId)" size="mini" type="danger">
|
||||
撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #edit>
|
||||
<info ref="infoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="130px" label-suffix=":">
|
||||
<el-row :gutter="20" v-if="formData.origin === 'HMC'">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="分配工会关系" prop="tf_allocation_unionId"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-select clearable filterable placeholder="请选择工会" style="width: 100%;"
|
||||
@change="assignmentUnionName"
|
||||
v-model="formData.tf_allocation_unionId">
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<template #edit>
|
||||
<info ref="infoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="130px" label-suffix=":">
|
||||
<el-row :gutter="20" v-if="formData.origin === 'HMC'">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="分配工会关系" prop="tf_allocation_unionId"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-select clearable filterable placeholder="请选择工会" style="width: 100%;"
|
||||
@change="assignmentUnionName"
|
||||
v-model="formData.tf_allocation_unionId">
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="当前所在工会" prop="tf_self_unionName">
|
||||
<el-input v-model="formData.tf_self_unionName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="当前所在工会" prop="tf_self_unionName">
|
||||
<el-input v-model="formData.tf_self_unionName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<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>
|
||||
</info>
|
||||
</template>
|
||||
<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-item prop="tf_sign" label="签字"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<pc-signature v-model="formData.tf_sign"></pc-signature>
|
||||
</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>
|
||||
</info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</guava>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
<!--#include("../common/commonQuery.js"){}#-->
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
<!--#include("../common/commonQuery.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
@@ -120,78 +125,83 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "loginName", label: "工号", sortable: true },
|
||||
{ prop: "userName", label: "姓名", sortable: true },
|
||||
{ prop: "userState", label: "在职状态", sortable: true },
|
||||
{ prop: "personType", label: "教职工类别", sortable: true },
|
||||
{ prop: "preparedBy", label: "编制类别", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "nativePlace", label: "籍贯", sortable: true },
|
||||
// { prop: "personType", label: "教职工类别", sortable: true },
|
||||
// { prop: "preparedBy", label: "编制类别", sortable: true },
|
||||
{ prop: "unionName", label: "所属工会", sortable: true },
|
||||
{ prop: "unitName", label: "所属单位", sortable: true },
|
||||
{ prop: "sign", label: "签字" },
|
||||
// { prop: "sign", label: "签字" },
|
||||
{ prop: "curTaskName", label: "当前节点" },
|
||||
{ prop: "instanceState", label: "流程状态" }
|
||||
{ prop: "instanceState", label: "流程状态" }
|
||||
],
|
||||
|
||||
// 审核相关
|
||||
showApprovalForm: false,
|
||||
formData: {
|
||||
tf_opinion: ""
|
||||
},
|
||||
unions: [],
|
||||
// 审核相关
|
||||
showApprovalForm: false,
|
||||
formData: {
|
||||
tf_opinion: ""
|
||||
},
|
||||
unions: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'info': INFO,
|
||||
'common-query': COMMON_QUERY,
|
||||
"info": INFO,
|
||||
"common-query": COMMON_QUERY
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openApproval(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
origin: row.origin,
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
if (row.origin === "HMC") {
|
||||
this.$set(this.formData, "tf_self_unionName", this.$store.state.user.union.name)
|
||||
}
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
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()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openApproval(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
origin: row.origin,
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
if (row.origin === "HMC") {
|
||||
this.$set(this.formData, "tf_self_unionName", this.$store.state.user.union.name)
|
||||
}
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
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()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
openRevoke(taskId) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
const loading = createLoading()
|
||||
this.$axios.post("/flow/common/revokeTask", { taskId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
@@ -202,23 +212,23 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
})
|
||||
},
|
||||
search(pageForm){
|
||||
if (pageForm) {
|
||||
this.pageForm = {...this.pageForm, ...pageForm}
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
// 分配工会名称
|
||||
assignmentUnionName(val) {
|
||||
const union = this.unions.find(item => item.id === val)
|
||||
this.$set(this.formData, "tf_allocation_unionName", union.name)
|
||||
},
|
||||
search(pageForm) {
|
||||
if (pageForm) {
|
||||
this.pageForm = { ...this.pageForm, ...pageForm }
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
// 分配工会名称
|
||||
assignmentUnionName(val) {
|
||||
const union = this.unions.find(item => item.id === val)
|
||||
this.$set(this.formData, "tf_allocation_unionName", union.name)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
this.$businessTool.listUnion().then(data => {
|
||||
this.unions = data
|
||||
})
|
||||
this.pageData()
|
||||
this.$businessTool.listUnion().then(data => {
|
||||
this.unions = data
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -174,12 +174,7 @@
|
||||
v-model="formData.isVoluntary">
|
||||
<div>
|
||||
<span style="flex: 1; word-wrap: break-word; word-break: break-all; white-space: normal;">
|
||||
我自愿申请加入学校工会,并委托学校按规定代为扣缴工会会员会费。
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span style="flex: 1; word-wrap: break-word; word-break: break-all; white-space: normal;">
|
||||
我将严格遵守工会章程,认真执行工会决议,积极参与工会活动,主动融入“学校健康幸福家”建设,为营造温暖、和谐、奋进的校园氛围贡献力量,以实际行动助力学校各项事业发展。
|
||||
我自愿加入中华全国总工会,遵守工会章程,执行工会决议,积极参加工会活动,为把我国建设成为富强、民主、文明的社会主义国家而努力奋斗。
|
||||
</span>
|
||||
</div>
|
||||
</el-checkbox>
|
||||
@@ -367,26 +362,83 @@
|
||||
handleCancel() {
|
||||
|
||||
},
|
||||
async validateApply() {
|
||||
validateApply() {
|
||||
if (this.formData.id) {
|
||||
return
|
||||
}
|
||||
// const resp = await $.post('/platform/member/apply/submit/validateApply')
|
||||
// if (resp.code === 0 && resp.data > 0) {
|
||||
// this.$confirm("您有其他入会流程正在进行中,请勿重复申请,如需查看详情,可前往我的申请界面,是否前往?", "提示", { type: "warning" })
|
||||
// .then(() => {
|
||||
// this.member = true
|
||||
// this.$store.dispatch("pjaxRoute", "/platform/member/apply/mine")
|
||||
// })
|
||||
// .catch(() => {
|
||||
// this.member = true
|
||||
// })
|
||||
// }
|
||||
},
|
||||
async init() {
|
||||
init() {
|
||||
let user
|
||||
const resp = await $.post('/platform/member/apply/submit/getSelfUserInfo')
|
||||
if (resp.code === 0) {
|
||||
$.post("/platform/member/apply/submit/getSelfUserInfo", {})
|
||||
.then((resp) => {
|
||||
if (resp.code === 0 && resp.data) {
|
||||
user = resp.data
|
||||
} else {
|
||||
user = this.$store.state.user
|
||||
}
|
||||
this.member = user.member
|
||||
if (this.id) {
|
||||
this.$axios.post("/platform/member/apply/submit/findApplyById", { id: this.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
const {
|
||||
id,
|
||||
username,
|
||||
loginname,
|
||||
sex,
|
||||
nation,
|
||||
birthday,
|
||||
political,
|
||||
education,
|
||||
academicDegree,
|
||||
position,
|
||||
unitId,
|
||||
unitName,
|
||||
unit,
|
||||
unionId,
|
||||
unionName,
|
||||
union,
|
||||
campus,
|
||||
userState,
|
||||
personType,
|
||||
idCard,
|
||||
mobile,
|
||||
email,
|
||||
families,
|
||||
personalData
|
||||
} = user
|
||||
|
||||
this.$set(this.formData, "userId", id)
|
||||
this.$set(this.formData, "username", username)
|
||||
this.$set(this.formData, "loginname", loginname)
|
||||
this.$set(this.formData, "birthday", birthday)
|
||||
this.$set(this.formData, "sex", sex)
|
||||
this.$set(this.formData, "idCard", idCard)
|
||||
this.$set(this.formData, "nation", nation)
|
||||
this.$set(this.formData, "political", political)
|
||||
this.$set(this.formData, "position", position)
|
||||
this.$set(this.formData, "education", education)
|
||||
this.$set(this.formData, "academicDegree", academicDegree)
|
||||
this.$set(this.formData, "campus", campus)
|
||||
this.$set(this.formData, "userState", userState)
|
||||
this.$set(this.formData, "personType", personType)
|
||||
this.$set(this.formData, "unitName", unit ? unit.name : unitName)
|
||||
this.$set(this.formData, "unitId", unit ? unit.id : unitId)
|
||||
this.$set(this.formData, "unionName", union ? union.name : unionName)
|
||||
this.$set(this.formData, "unionId", union ? union.id : unionId)
|
||||
|
||||
this.$set(this.formData, "mobile", mobile)
|
||||
this.$set(this.formData, "email", email)
|
||||
this.$set(this.formData, "families", families ? families : [])
|
||||
this.$set(this.formData, "personalData", personalData)
|
||||
})
|
||||
.always(() => {
|
||||
})
|
||||
/*if (resp.code === 0) {
|
||||
if (!resp.data) {
|
||||
user = this.$store.state.user
|
||||
} else {
|
||||
@@ -455,12 +507,15 @@
|
||||
this.$set(this.formData, "families", families ? families : [])
|
||||
this.$set(this.formData, "personalData", personalData)
|
||||
}
|
||||
*/
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
created() {
|
||||
this.init()
|
||||
this.units = await this.$businessTool.listUnit()
|
||||
await this.validateApply()
|
||||
this.$businessTool.listUnit().then((data) => {
|
||||
this.units = data
|
||||
})
|
||||
this.validateApply()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+512
-415
@@ -2,439 +2,536 @@
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<el-card shadow="never">
|
||||
<snaker-start slot="header" label="入会申请" define_key="HYRH"></snaker-start>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":" class="flow-task-form">
|
||||
<el-descriptions :column="3" border>
|
||||
<el-descriptions-item label="工号">
|
||||
<el-form-item prop="loginname">
|
||||
<el-input v-model="formData.loginname" readonly size="small"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="姓名">
|
||||
<el-form-item prop="username">
|
||||
<el-input v-model="formData.username" readonly size="small"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">
|
||||
<el-form-item prop="sex">
|
||||
<el-radio-group v-model="formData.sex" size="small">
|
||||
<el-radio border label="男">男</el-radio>
|
||||
<el-radio border label="女">女</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-card shadow="never">
|
||||
<snaker-start slot="header" label="入会申请" define_key="HYRH"></snaker-start>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-descriptions :column="3" border>
|
||||
<el-descriptions-item label="工号">
|
||||
<el-form-item prop="loginname">
|
||||
<el-input v-model="formData.loginname" readonly size="small"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="姓名">
|
||||
<el-form-item prop="username">
|
||||
<el-input v-model="formData.username" readonly size="small"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">
|
||||
<el-form-item prop="sex">
|
||||
<el-radio-group v-model="formData.sex" size="small">
|
||||
<el-radio border label="男性">男性</el-radio>
|
||||
<el-radio border label="女性">女性</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="民族">
|
||||
<el-form-item prop="nation">
|
||||
<dict-select style="width: 100%" placeholder="请选择民族" v-model="formData.nation"
|
||||
code="USER_NATION"></dict-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="出生日期">
|
||||
<el-form-item prop="birthday">
|
||||
<el-date-picker v-model="formData.birthday" type="date"
|
||||
placeholder="请选择出生日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="政治面貌">
|
||||
<el-form-item prop="political">
|
||||
<dict-select style="width: 100%" placeholder="请选择政治面貌" v-model="formData.political"
|
||||
code="USER_POLITICAL"></dict-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="民族">
|
||||
<el-form-item prop="nation">
|
||||
<dict-select style="width: 100%" placeholder="请选择民族" v-model="formData.nation"
|
||||
code="USER_NATION"></dict-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="出生日期">
|
||||
<el-form-item prop="birthday">
|
||||
<el-date-picker v-model="formData.birthday" type="date"
|
||||
placeholder="请选择出生日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="政治面貌">
|
||||
<el-form-item prop="political">
|
||||
<dict-select style="width: 100%" placeholder="请选择政治面貌" v-model="formData.political"
|
||||
code="USER_POLITICAL"></dict-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="学历">
|
||||
<el-form-item prop="education">
|
||||
<dict-select style="width: 100%" placeholder="请选择学历" v-model="formData.education"
|
||||
code="USER_EDUCATION"></dict-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="学位">
|
||||
<el-form-item prop="academicDegree">
|
||||
<dict-select style="width: 100%" placeholder="请选择学位" v-model="formData.academicDegree"
|
||||
code="USER_ACADEMIC_DEGREE"></dict-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="党政职务">
|
||||
<el-form-item prop="position">
|
||||
<el-input v-model="formData.position" placeholder="请输入党政职务"
|
||||
maxlength="50"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="学历">
|
||||
<el-form-item prop="education">
|
||||
<dict-select style="width: 100%" placeholder="请选择学历" v-model="formData.education"
|
||||
code="USER_EDUCATION"></dict-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="学位">
|
||||
<el-form-item prop="academicDegree">
|
||||
<dict-select style="width: 100%" placeholder="请选择学位" v-model="formData.academicDegree"
|
||||
code="USER_ACADEMIC_DEGREE"></dict-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="籍贯">
|
||||
<el-form-item prop="nativePlace">
|
||||
<el-input v-model="formData.nativePlace" placeholder="请输入籍贯"
|
||||
maxlength="50"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="工作单位">
|
||||
<el-form-item prop="unitId">
|
||||
<el-select clearable filterable placeholder="请选择工作单位" style="width: 100%"
|
||||
disabled @change="getUnionName(formData.unitId)"
|
||||
v-model="formData.unitId">
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所属工会">
|
||||
<el-form-item prop="unionName">
|
||||
<el-input v-model="formData.unionName" disabled placeholder="请输入所属工会"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所属校区">
|
||||
<el-form-item prop="campus">
|
||||
<dict-select style="width: 100%" placeholder="请选择所属校区" v-model="formData.campus"
|
||||
code="USER_CAMPUS"></dict-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="工作单位">
|
||||
<el-form-item prop="unitId">
|
||||
<el-select clearable filterable placeholder="请选择工作单位" style="width: 100%"
|
||||
disabled @change="getUnionName(formData.unitId)"
|
||||
v-model="formData.unitId">
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所属工会">
|
||||
<el-form-item prop="unionName">
|
||||
<el-input v-model="formData.unionName" disabled placeholder="请输入所属工会"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="所属校区">
|
||||
<el-form-item prop="campus">
|
||||
<dict-select style="width: 100%" placeholder="请选择所属校区" v-model="formData.campus"
|
||||
code="USER_CAMPUS"></dict-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>-->
|
||||
|
||||
|
||||
<el-descriptions-item label="在职状态">
|
||||
<el-form-item prop="userState">
|
||||
<dict-select v-model="formData.userState" code="USER_STATE"
|
||||
disabled style="width: 100%"></dict-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="教职工类别">
|
||||
<el-form-item prop="personType">
|
||||
<dict-select v-model="formData.personType" code="USER_PERSON_TYPE"
|
||||
disabled style="width: 100%"></dict-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="编制类别">
|
||||
<el-form-item prop="preparedBy">
|
||||
<dict-select v-model="formData.preparedBy" code="USER_PREPARED_BY_TYPE"
|
||||
disabled style="width: 100%"></dict-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="岗位名称">
|
||||
<el-form-item prop="jobCategory">
|
||||
<el-input v-model="formData.jobCategory" placeholder="请输入岗位名称"
|
||||
maxlength="50"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="身份证号码">
|
||||
<el-form-item prop="idCard">
|
||||
<el-input v-model="formData.idCard" disabled placeholder="请输入身份证号码" maxlength="18"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系电话">
|
||||
<el-form-item prop="mobile">
|
||||
<el-input v-model="formData.mobile" disabled placeholder="请输入联系电话" maxlength="32"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="电子邮箱">
|
||||
<el-form-item prop="email">
|
||||
<el-input v-model="formData.email" placeholder="请输入电子邮箱" maxlength="50"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="在职状态">
|
||||
<el-form-item prop="userState">
|
||||
<dict-select v-model="formData.userState" code="USER_STATE"
|
||||
disabled style="width: 100%"></dict-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>-->
|
||||
<!--<el-descriptions-item label="教职工类别">
|
||||
<el-form-item prop="personType">
|
||||
<dict-select v-model="formData.personType" code="USER_PERSON_TYPE"
|
||||
style="width: 100%"></dict-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>-->
|
||||
<!--<el-descriptions-item label="编制类别">
|
||||
<el-form-item prop="preparedBy">
|
||||
<dict-select v-model="formData.preparedBy" code="USER_PREPARED_BY_TYPE"
|
||||
disabled style="width: 100%"></dict-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>-->
|
||||
<el-descriptions-item label="婚姻状况">
|
||||
<el-form-item prop="marriage" label="婚姻状况">
|
||||
<dict-select v-model="formData.marriage" code="USER_MARRIAGE"
|
||||
style="width: 100%"></dict-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="身份证号码">
|
||||
<el-form-item prop="idCard">
|
||||
<el-input v-model="formData.idCard" disabled placeholder="请输入身份证号码"
|
||||
maxlength="18"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系电话">
|
||||
<el-form-item prop="mobile">
|
||||
<el-input v-model="formData.mobile" disabled placeholder="请输入联系电话"
|
||||
maxlength="32"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="入职时间">
|
||||
<el-form-item prop="arrivalAtSchoolDate">
|
||||
<el-input v-model="formData.arrivalAtSchoolDate" placeholder="请输入入职时间"
|
||||
disabled maxlength="50"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="家庭住址" :span="3">
|
||||
<el-form-item prop="homeAddress" label="家庭住址">
|
||||
<el-input v-model="formData.homeAddress" placeholder="请输入家庭住址" maxlength="90"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="家庭主要成员" :span="3">
|
||||
<el-form-item prop="families">
|
||||
<el-table :data="formData.families" border size="small">
|
||||
<el-table-column label="关系" prop="relation">
|
||||
<template slot-scope="{row}">
|
||||
<el-input v-model="row.relation" maxlength="50"
|
||||
placeholder="请输入与本人关系"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="姓名" prop="name">
|
||||
<template slot-scope="{row}">
|
||||
<el-input v-model="row.name" maxlength="50" placeholder="请输入姓名"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作单位" prop="unit">
|
||||
<template slot-scope="{row}">
|
||||
<el-input v-model="row.unit" maxlength="100"
|
||||
placeholder="请输入工作单位"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" prop="remark">
|
||||
<template slot-scope="{row}">
|
||||
<el-input v-model="row.remark" maxlength="100" placeholder="请输入备注"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100px">
|
||||
<template slot="header" slot-scope="scope">
|
||||
<el-button type="primary" size="mini"
|
||||
@click="formData.families.push({})">添加
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="formData.families.length===0"
|
||||
@click="formData.families.splice(scope.$index,1)"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="家庭主要成员" :span="3">
|
||||
<el-form-item prop="families">
|
||||
<el-table :data="formData.families" border size="small">
|
||||
<el-table-column label="关系" prop="relation">
|
||||
<template slot-scope="{row}">
|
||||
<el-input v-model="row.relation" maxlength="50"
|
||||
placeholder="请输入与本人关系"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="姓名" prop="name">
|
||||
<template slot-scope="{row}">
|
||||
<el-input v-model="row.name" maxlength="50" placeholder="请输入姓名"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作单位" prop="unit">
|
||||
<template slot-scope="{row}">
|
||||
<el-input v-model="row.unit" maxlength="100"
|
||||
placeholder="请输入工作单位"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" prop="remark">
|
||||
<template slot-scope="{row}">
|
||||
<el-input v-model="row.remark" maxlength="100" placeholder="请输入备注"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100px">
|
||||
<template slot="header" slot-scope="scope">
|
||||
<el-button type="primary" size="mini"
|
||||
@click="formData.families.push({})">添加
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="formData.families.length===0"
|
||||
@click="formData.families.splice(scope.$index,1)"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="个人简况" :span="3">
|
||||
<el-form-item prop="personalData">
|
||||
<text-editor v-model="formData.personalData"></text-editor>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="个人学习及工作经历" :span="3">
|
||||
<el-form-item prop="personalData" label="个人学习及工作经历">
|
||||
<el-input type="textarea" :rows="4" v-model="formData.personalData"
|
||||
placeholder="请输入个人学习及工作经历"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="入会意愿" :span="3">
|
||||
<el-form-item prop="isVoluntary">
|
||||
<el-checkbox
|
||||
size="medium"
|
||||
style="width: 95%; color: #F56C6C; display: flex; align-items: center;"
|
||||
v-model="formData.isVoluntary">
|
||||
<div>
|
||||
<span style="flex: 1; word-wrap: break-word; word-break: break-all; white-space: normal;">
|
||||
我自愿申请加入学校工会,并委托学校按规定代为扣缴工会会员会费。
|
||||
<el-descriptions-item label="特长及获奖情况" :span="3">
|
||||
<el-form-item prop="specialty" label="特长及获奖情况">
|
||||
<el-input type="textarea" :rows="4" v-model="formData.specialty"
|
||||
maxlength="100" show-word-limit
|
||||
placeholder="请输入特长及获奖情况"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="照片" :span="3">
|
||||
<el-form-item prop="photo" label="照片">
|
||||
<file-upload
|
||||
:value.sync="formData.photo"
|
||||
:upload_number="1"
|
||||
upload_mode="image"
|
||||
upload_result_category="interval"
|
||||
upload_result_type="url"
|
||||
></file-upload>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="签字" :span="3">
|
||||
<el-form-item prop="sign">
|
||||
<pc-signature v-model="formData.sign"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="入会意愿" :span="3">
|
||||
<el-form-item prop="isVoluntary">
|
||||
<el-checkbox
|
||||
size="medium"
|
||||
style="width: 95%; color: #F56C6C; display: flex; align-items: center;"
|
||||
v-model="formData.isVoluntary">
|
||||
|
||||
<div>
|
||||
<span
|
||||
style="flex: 1; word-wrap: break-word; word-break: break-all; white-space: normal;">
|
||||
我自愿加入中华全国总工会,遵守工会章程,执行工会决议,积极参加工会活动,为把我国建设成为富强、民主、文明的社会主义国家而努力奋斗。
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span style="flex: 1; word-wrap: break-word; word-break: break-all; white-space: normal;">
|
||||
我将严格遵守工会章程,认真执行工会决议,积极参与工会活动,主动融入“学校健康幸福家”建设,为营造温暖、和谐、奋进的校园氛围贡献力量,以实际行动助力学校各项事业发展。
|
||||
</span>
|
||||
</div>
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<!-- <el-descriptions-item label="签字" :span="3">-->
|
||||
<!-- <el-form-item prop="sign">-->
|
||||
<!-- <pc-signature v-model="formData.sign"></pc-signature>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-descriptions-item>-->
|
||||
</el-descriptions>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end" class="mt20">
|
||||
<el-button type="primary" plain @click="onSave">保存</el-button>
|
||||
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
|
||||
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end" class="mt20">
|
||||
<el-button type="primary" plain @click="onSave" v-if="!taskId"
|
||||
:disabled="!canApply"
|
||||
:title="applyDisableMsg">保存</el-button>
|
||||
<el-button type="primary" @click="onSubmit" v-if="!taskId" v-if="!taskId"
|
||||
:disabled="!canApply"
|
||||
:title="applyDisableMsg">提交</el-button>
|
||||
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
id: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
units: [],
|
||||
formData: {
|
||||
families: []
|
||||
},
|
||||
formRules: {
|
||||
username: [{required: false, message: "必填", trigger: ["change", "blur"]}],
|
||||
sex: [{required: false, message: "必填", trigger: ["change", "blur"]}],
|
||||
isVoluntary: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||
sign: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||
/*email: [
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback();
|
||||
} else if (/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(value)) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error("邮箱格式错误"));
|
||||
}
|
||||
},
|
||||
trigger: ["change", "blur"]
|
||||
}
|
||||
],
|
||||
idCard: [
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (!value) {
|
||||
// 如果值为空,直接通过校验
|
||||
callback();
|
||||
} else if (/^[1-9]\d{5}(18|19|20)?\d{2}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}(\d|[Xx])$/.test(value)) {
|
||||
// 18位身份证号码格式正确
|
||||
callback();
|
||||
} else if (/^[1-9]\d{7}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/.test(value)) {
|
||||
// 15位身份证号码格式正确
|
||||
callback();
|
||||
} else if (/^[1-9]\d{5}(18|19|20)?\d{2}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/.test(value)) {
|
||||
// 外国人身份证号码格式正确(18位)
|
||||
callback();
|
||||
} else if (/^[1-9]\d{7}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/.test(value)) {
|
||||
// 外国人身份证号码格式正确(15位)
|
||||
callback();
|
||||
} else {
|
||||
// 格式错误,返回错误信息
|
||||
callback(new Error("身份证号码格式错误"));
|
||||
}
|
||||
},
|
||||
trigger: ["change", "blur"]
|
||||
}
|
||||
],
|
||||
mobile: [
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (!value) {
|
||||
// 如果值为空,直接通过校验
|
||||
callback();
|
||||
} else if (/^[1][345789][0-9]{9}$/.test(value)) {
|
||||
// 手机号格式正确
|
||||
callback();
|
||||
} else if (/^\d+-\d+$/.test(value) && value.length <= 16) {
|
||||
// 座机号格式正确
|
||||
callback();
|
||||
} else {
|
||||
// 格式错误,返回错误信息
|
||||
callback(new Error(value.includes('-') ? '座机号码格式错误' : '手机号码格式错误'));
|
||||
}
|
||||
},
|
||||
trigger: ["change", "blur"]
|
||||
}
|
||||
]*/
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSave() {
|
||||
this.$confirm("您确定保存吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post('/platform/member/apply/submit/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
commonUtil.pjaxPush('/platform/member/apply/mine')
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post('/platform/member/apply/submit/submit', {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
commonUtil.pjaxPush('/platform/member/apply/mine')
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
onFinishTask() {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post('/platform/member/apply/submit/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: this.taskId,
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
commonUtil.pjaxPush('/platform/member/apply/mine')
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
async init() {
|
||||
let user
|
||||
const resp = await $.post('/platform/member/apply/submit/getSelfUserInfo')
|
||||
if (resp.code === 0) {
|
||||
if (!resp.data) {
|
||||
user = this.$store.state.user
|
||||
} else {
|
||||
user = resp.data
|
||||
}
|
||||
} else {
|
||||
user = this.$store.state.user
|
||||
}
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
id: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
units: [],
|
||||
formData: {
|
||||
families: []
|
||||
},
|
||||
canApply: true,
|
||||
applyDisableMsg: '',
|
||||
formRules: {
|
||||
username: [{ required: false, message: "必填", trigger: ["change", "blur"] }],
|
||||
sex: [{ required: false, message: "必填", trigger: ["change", "blur"] }],
|
||||
isVoluntary: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
sign: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
photo: [{ required: true, message: "请上传照片", trigger: ["change", "blur"] }],
|
||||
homeAddress: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
families: [{
|
||||
validator: (rule, value, callback) => {
|
||||
// 提交时家庭主要成员至少填写一条,并校验核心成员信息。
|
||||
if (!value || value.length === 0) {
|
||||
callback(new Error("请添加家庭主要成员"))
|
||||
return
|
||||
}
|
||||
const hasIncomplete = value.some(item => {
|
||||
item = item || {}
|
||||
return !String(item.relation || "").trim()
|
||||
|| !String(item.name || "").trim()
|
||||
|| !String(item.unit || "").trim()
|
||||
})
|
||||
if (hasIncomplete) {
|
||||
callback(new Error("请完善家庭主要成员的关系、姓名、工作单位"))
|
||||
return
|
||||
}
|
||||
callback()
|
||||
},
|
||||
trigger: ["change", "blur"]
|
||||
}],
|
||||
personalData: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
specialty: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
marriage: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
arrivalAtSchoolDate: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
nativePlace: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
jobCategory: [{ required: true, message: "必填", trigger: ["change", "blur"] }]
|
||||
/*email: [
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback();
|
||||
} else if (/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(value)) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error("邮箱格式错误"));
|
||||
}
|
||||
},
|
||||
trigger: ["change", "blur"]
|
||||
}
|
||||
],
|
||||
idCard: [
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (!value) {
|
||||
// 如果值为空,直接通过校验
|
||||
callback();
|
||||
} else if (/^[1-9]\d{5}(18|19|20)?\d{2}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}(\d|[Xx])$/.test(value)) {
|
||||
// 18位身份证号码格式正确
|
||||
callback();
|
||||
} else if (/^[1-9]\d{7}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/.test(value)) {
|
||||
// 15位身份证号码格式正确
|
||||
callback();
|
||||
} else if (/^[1-9]\d{5}(18|19|20)?\d{2}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/.test(value)) {
|
||||
// 外国人身份证号码格式正确(18位)
|
||||
callback();
|
||||
} else if (/^[1-9]\d{7}((0[1-9])|(10|11|12))(([0|1|2][0-9])|10|20|30|31)\d{3}$/.test(value)) {
|
||||
// 外国人身份证号码格式正确(15位)
|
||||
callback();
|
||||
} else {
|
||||
// 格式错误,返回错误信息
|
||||
callback(new Error("身份证号码格式错误"));
|
||||
}
|
||||
},
|
||||
trigger: ["change", "blur"]
|
||||
}
|
||||
],
|
||||
mobile: [
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (!value) {
|
||||
// 如果值为空,直接通过校验
|
||||
callback();
|
||||
} else if (/^[1][345789][0-9]{9}$/.test(value)) {
|
||||
// 手机号格式正确
|
||||
callback();
|
||||
} else if (/^\d+-\d+$/.test(value) && value.length <= 16) {
|
||||
// 座机号格式正确
|
||||
callback();
|
||||
} else {
|
||||
// 格式错误,返回错误信息
|
||||
callback(new Error(value.includes('-') ? '座机号码格式错误' : '手机号码格式错误'));
|
||||
}
|
||||
},
|
||||
trigger: ["change", "blur"]
|
||||
}
|
||||
]*/
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
checkApplyPermission() {
|
||||
if (this.id || this.taskId) {
|
||||
this.canApply = true;
|
||||
this.applyDisableMsg = '';
|
||||
return;
|
||||
}
|
||||
this.$axios.post("/platform/member/apply/submit/findOne", { id: this.formData.userId }).then(res => {
|
||||
if (res.code === 0 && res.data) {
|
||||
this.canApply = res.data.canApply;
|
||||
this.applyDisableMsg = res.data.msg || '';
|
||||
|
||||
if (this.id) {
|
||||
const res = await this.$axios.post("/platform/member/apply/submit/findApplyById", { id: this.id })
|
||||
debugger
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
}
|
||||
} else {
|
||||
const {
|
||||
id,
|
||||
username,
|
||||
loginname,
|
||||
sex,
|
||||
nation,
|
||||
birthday,
|
||||
political,
|
||||
education,
|
||||
academicDegree,
|
||||
position,
|
||||
unitId,
|
||||
unitName,
|
||||
unit,
|
||||
unionId,
|
||||
unionName,
|
||||
union,
|
||||
campus,
|
||||
userState,
|
||||
personType,
|
||||
preparedBy,
|
||||
idCard,
|
||||
mobile,
|
||||
email,
|
||||
families,
|
||||
personalData
|
||||
} = user
|
||||
if (!this.canApply) {
|
||||
this.$message.warning(this.applyDisableMsg);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
onSave() {
|
||||
this.$confirm("您确定保存吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post("/platform/member/apply/submit/save", { data: JSON.stringify(this.formData) }).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
commonUtil.pjaxPush("/platform/member/apply/mine")
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post("/platform/member/apply/submit/submit", {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
commonUtil.pjaxPush("/platform/member/apply/mine")
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
onFinishTask() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const loading = createLoading()
|
||||
this.$axios.post("/platform/member/apply/submit/submitAgain", {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: this.taskId
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
commonUtil.pjaxPush("/platform/member/apply/mine")
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
init() {
|
||||
let user
|
||||
$.post("/platform/member/apply/submit/getSelfUserInfo", {})
|
||||
.then((resp) => {
|
||||
if (resp.code === 0 && resp.data) {
|
||||
user = resp.data
|
||||
} else {
|
||||
user = this.$store.state.user
|
||||
}
|
||||
if (this.id) {
|
||||
this.$axios.post("/platform/member/apply/submit/findApplyById", { id: this.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
const {
|
||||
id,
|
||||
username,
|
||||
loginname,
|
||||
sex,
|
||||
nation,
|
||||
birthday,
|
||||
political,
|
||||
education,
|
||||
academicDegree,
|
||||
arrivalAtSchoolDate,
|
||||
position,
|
||||
unitId,
|
||||
unitName,
|
||||
unit,
|
||||
unionId,
|
||||
unionName,
|
||||
union,
|
||||
campus,
|
||||
userState,
|
||||
personType,
|
||||
preparedBy,
|
||||
idCard,
|
||||
mobile,
|
||||
email,
|
||||
families,
|
||||
personalData
|
||||
} = user
|
||||
|
||||
this.$set(this.formData, "userId", id)
|
||||
this.$set(this.formData, "username", username)
|
||||
this.$set(this.formData, "loginname", loginname)
|
||||
this.$set(this.formData, "birthday", birthday)
|
||||
this.$set(this.formData, "sex", sex)
|
||||
this.$set(this.formData, "idCard", idCard)
|
||||
this.$set(this.formData, "nation", nation)
|
||||
this.$set(this.formData, "political", political)
|
||||
this.$set(this.formData, "position", position)
|
||||
this.$set(this.formData, "education", education)
|
||||
this.$set(this.formData, "academicDegree", academicDegree)
|
||||
this.$set(this.formData, "campus", campus)
|
||||
this.$set(this.formData, "userState", userState)
|
||||
this.$set(this.formData, "personType", personType)
|
||||
this.$set(this.formData, "preparedBy", preparedBy)
|
||||
this.$set(this.formData, "unitName", unit ? unit.name : unitName)
|
||||
this.$set(this.formData, "unitId", unit ? unit.id : unitId)
|
||||
this.$set(this.formData, "unionName", union ? union.name : unionName)
|
||||
this.$set(this.formData, "unionId", union ? union.id : unionId)
|
||||
this.$set(this.formData, "userId", id)
|
||||
this.$set(this.formData, "username", username)
|
||||
this.$set(this.formData, "loginname", loginname)
|
||||
this.$set(this.formData, "birthday", birthday)
|
||||
this.$set(this.formData, "sex", sex)
|
||||
this.$set(this.formData, "idCard", idCard)
|
||||
this.$set(this.formData, "nation", nation)
|
||||
this.$set(this.formData, "political", political)
|
||||
this.$set(this.formData, "position", position)
|
||||
this.$set(this.formData, "education", education)
|
||||
this.$set(this.formData, "academicDegree", academicDegree)
|
||||
this.$set(this.formData, "campus", campus)
|
||||
this.$set(this.formData, "userState", userState)
|
||||
this.$set(this.formData, "personType", personType)
|
||||
this.$set(this.formData, "preparedBy", preparedBy)
|
||||
this.$set(this.formData, "unitName", unit ? unit.name : unitName)
|
||||
this.$set(this.formData, "unitId", unit ? unit.id : unitId)
|
||||
this.$set(this.formData, "unionName", union ? union.name : unionName)
|
||||
this.$set(this.formData, "unionId", union ? union.id : unionId)
|
||||
|
||||
this.$set(this.formData, "mobile", mobile)
|
||||
this.$set(this.formData, "email", email)
|
||||
this.$set(this.formData, "families", families ? families : [])
|
||||
this.$set(this.formData, "personalData", personalData)
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
this.$businessTool.listUnit().then((data) => {
|
||||
this.units = data
|
||||
})
|
||||
}
|
||||
})
|
||||
this.$set(this.formData, "mobile", mobile)
|
||||
this.$set(this.formData, "email", email)
|
||||
this.$set(this.formData, "families", families ? families : [])
|
||||
this.$set(this.formData, "personalData", personalData)
|
||||
this.$set(this.formData, "arrivalAtSchoolDate", arrivalAtSchoolDate ? this.$moment(arrivalAtSchoolDate).format('YYYY-MM-DD') : "")
|
||||
this.checkApplyPermission()
|
||||
})
|
||||
.always(() => {
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
this.$businessTool.listUnit().then((data) => {
|
||||
this.units = data
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
|
||||
-12
@@ -51,14 +51,6 @@ layout("/layouts/platform.html"){
|
||||
multiple
|
||||
placeholder="请选择教职工类别"></dict-select>
|
||||
</search-item>
|
||||
<search-item label="编制类别">
|
||||
<dict-select
|
||||
v-model="pageForm.preparedBys"
|
||||
code="USER_PREPARED_BY_TYPE"
|
||||
collapse-tags
|
||||
multiple
|
||||
placeholder="请选择编制类别"></dict-select>
|
||||
</search-item>
|
||||
<search-item label="流程状态">
|
||||
<el-select
|
||||
v-model="pageForm.instanceStates"
|
||||
@@ -179,7 +171,6 @@ layout("/layouts/platform.html"){
|
||||
unitId: [],
|
||||
userStates: [],
|
||||
personTypes: [],
|
||||
preparedBys: [],
|
||||
instanceStates: [],
|
||||
applyDateRange: []
|
||||
},
|
||||
@@ -202,8 +193,6 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "unitName", label: "所属单位", width: 180, sortable: true },
|
||||
{ prop: "userState", label: "在职状态", width: 120, sortable: true },
|
||||
{ prop: "personType", label: "教职工类别", width: 140, sortable: true },
|
||||
{ prop: "preparedBy", label: "编制类别", width: 120, sortable: true },
|
||||
{ prop: "origin", label: "来源", width: 100, sortable: true },
|
||||
{ prop: "applyDateTime", label: "申请时间", width: 160, sortable: true },
|
||||
{ prop: "signState", label: "签字状态", width: 110 },
|
||||
{ prop: "curTaskName", label: "当前节点", width: 160 },
|
||||
@@ -231,7 +220,6 @@ layout("/layouts/platform.html"){
|
||||
pageForm.unitId = JSON.stringify(this.pageForm.unitId)
|
||||
pageForm.userStates = JSON.stringify(this.pageForm.userStates)
|
||||
pageForm.personTypes = JSON.stringify(this.pageForm.personTypes)
|
||||
pageForm.preparedBys = JSON.stringify(this.pageForm.preparedBys)
|
||||
pageForm.instanceStates = JSON.stringify(this.pageForm.instanceStates)
|
||||
if (this.pageForm.applyDateRange && this.pageForm.applyDateRange.length > 0) {
|
||||
pageForm.startApplyDate = this.pageForm.applyDateRange[0]
|
||||
|
||||
+39
-32
@@ -59,6 +59,11 @@ layout("/layouts/platform_h5.html"){
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
<van-field class="more-text" name="tf_sign" label="" required>
|
||||
<template #input>
|
||||
<h5-signature v-model="formData.tf_sign" slot="input"></h5-signature>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
|
||||
@@ -127,33 +132,34 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
},
|
||||
|
||||
async handleTaskAction(val) {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
const loading = this.$toast.loading({
|
||||
message: "加载中...",
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.infoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
const loading = this.$toast.loading({
|
||||
message: "加载中...",
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.infoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 撤回
|
||||
@@ -182,7 +188,7 @@ layout("/layouts/platform_h5.html"){
|
||||
initUnion() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? null : this.$store.state.user.union.id
|
||||
this.$businessTool.listUnion(unionId).then((data) => {
|
||||
return this.$businessTool.listUnion(unionId).then((data) => {
|
||||
this.unionList = data
|
||||
this.unionList.forEach((v) => {
|
||||
v.text = v.name
|
||||
@@ -199,7 +205,7 @@ layout("/layouts/platform_h5.html"){
|
||||
flushUnits() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
|
||||
this.$businessTool.listUnit(unionId).then((data) => {
|
||||
return this.$businessTool.listUnit(unionId).then((data) => {
|
||||
this.unitList = data
|
||||
this.unitList.forEach((v) => {
|
||||
v.text = v.name
|
||||
@@ -212,9 +218,10 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
created() {
|
||||
this.initUnion().then(() => {
|
||||
this.flushUnits()
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -32,7 +32,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<table-column label="所属工会">{{row.unionName}}</table-column>
|
||||
<table-column label="工作单位">{{row.unitName}}</table-column>
|
||||
<table-column label="填报时间">{{row.applyDateTime}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
<table-column label="当前节点">{{row.taskName}}<span v-if="row.auditUser">-{{row.auditUser}}</span></table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
@@ -149,38 +149,43 @@ layout("/layouts/platform_h5.html"){
|
||||
this.flushUnits()
|
||||
this.doSearch()
|
||||
},
|
||||
async initUnion() {
|
||||
initUnion() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? null : this.$store.state.user.union.id
|
||||
this.unionList = await this.$businessTool.listUnion(unionId)
|
||||
this.unionList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (hasAdmin) {
|
||||
this.unionList.unshift({ text: "全部工会", value: null })
|
||||
}
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
return this.$businessTool.listUnion(unionId).then((data) => {
|
||||
this.unionList = data
|
||||
this.unionList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (hasAdmin) {
|
||||
this.unionList.unshift({ text: "全部工会", value: null })
|
||||
}
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
})
|
||||
},
|
||||
async flushUnits() {
|
||||
flushUnits() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
|
||||
this.unitList = await this.$businessTool.listUnit(unionId)
|
||||
this.unitList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
this.unitList.unshift({ text: "全部单位", value: null })
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
return this.$businessTool.listUnit(unionId).then((data) => {
|
||||
this.unitList = data
|
||||
this.unitList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
this.unitList.unshift({ text: "全部单位", value: null })
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
created() {
|
||||
this.initUnion().then(() => {
|
||||
this.flushUnits()
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+46
-39
@@ -59,6 +59,11 @@ layout("/layouts/platform_h5.html"){
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
<van-field class="more-text" name="tf_sign" label="" required>
|
||||
<template #input>
|
||||
<h5-signature v-model="formData.tf_sign" slot="input"></h5-signature>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
|
||||
@@ -127,33 +132,34 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
},
|
||||
|
||||
async handleTaskAction(val) {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
const loading = this.$toast.loading({
|
||||
message: "加载中...",
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.infoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
const loading = this.$toast.loading({
|
||||
message: "加载中...",
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.infoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 撤回
|
||||
@@ -168,7 +174,7 @@ layout("/layouts/platform_h5.html"){
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
this.$axios.post('/flow/common/revokeTask', {taskId: row.startTaskId}).then(res => {
|
||||
this.$axios.post('/flow/common/revokeTask', {taskId: row.taskId}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('撤回成功');
|
||||
this.doSearch();
|
||||
@@ -179,10 +185,10 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
},
|
||||
|
||||
initUnion() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? null : this.$store.state.user.union.id
|
||||
this.$businessTool.listUnion(unionId).then((data) => {
|
||||
initUnion() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? null : this.$store.state.user.union.id
|
||||
return this.$businessTool.listUnion(unionId).then((data) => {
|
||||
this.unionList = data
|
||||
this.unionList.forEach((v) => {
|
||||
v.text = v.name
|
||||
@@ -196,10 +202,10 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
})
|
||||
},
|
||||
flushUnits() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
|
||||
this.$businessTool.listUnit(unionId).then((data) => {
|
||||
flushUnits() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
|
||||
return this.$businessTool.listUnit(unionId).then((data) => {
|
||||
this.unitList = data
|
||||
this.unitList.forEach((v) => {
|
||||
v.text = v.name
|
||||
@@ -212,9 +218,10 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
created() {
|
||||
this.initUnion().then(() => {
|
||||
this.flushUnits()
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+693
-489
File diff suppressed because it is too large
Load Diff
+40
-38
@@ -127,33 +127,34 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
},
|
||||
|
||||
async handleTaskAction(val) {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
const loading = this.$toast.loading({
|
||||
message: "加载中...",
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.infoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
const loading = this.$toast.loading({
|
||||
message: "加载中...",
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.infoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
loading.close()
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 撤回
|
||||
@@ -180,10 +181,10 @@ layout("/layouts/platform_h5.html"){
|
||||
});
|
||||
},
|
||||
|
||||
initUnion() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? null : this.$store.state.user.union.id
|
||||
this.$businessTool.listUnion(unionId).then((data) => {
|
||||
initUnion() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? null : this.$store.state.user.union.id
|
||||
return this.$businessTool.listUnion(unionId).then((data) => {
|
||||
this.unionList = data
|
||||
this.unionList.forEach((v) => {
|
||||
v.text = v.name
|
||||
@@ -197,10 +198,10 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
})
|
||||
},
|
||||
flushUnits() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
|
||||
this.$businessTool.listUnit(unionId).then((data) => {
|
||||
flushUnits() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
|
||||
return this.$businessTool.listUnit(unionId).then((data) => {
|
||||
this.unitList = data
|
||||
this.unitList.forEach((v) => {
|
||||
v.text = v.name
|
||||
@@ -213,9 +214,10 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
created() {
|
||||
this.initUnion().then(() => {
|
||||
this.flushUnits()
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user