diff --git a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/beans/TeamGroupBean.java b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/beans/TeamGroupBean.java index cdc3863..2f5a74f 100644 --- a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/beans/TeamGroupBean.java +++ b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/beans/TeamGroupBean.java @@ -39,6 +39,7 @@ public class TeamGroupBean { // 信息评审表 private String infoFileUrl; private String applyMan; + private String applyManName; private String createTime; private String level; private String tableSource; diff --git a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/controller/OrganizationalController.java b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/controller/OrganizationalController.java index bb51bb2..e9b901c 100644 --- a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/controller/OrganizationalController.java +++ b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/controller/OrganizationalController.java @@ -392,11 +392,10 @@ public class OrganizationalController extends BaseController { AjaxRes ar = getAjaxRes(); Integer i = service.revokeRegisterTeamGroup(bean); if (i > 0) { - ar.success("撤回成功"); + return ar.success("撤回成功"); } else { - ar.error("撤回失败"); + return ar.error("撤回失败"); } - return ar; } @PostMapping("/uploadFaceImg") diff --git a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/dao/OutsourcerEvaluateDao.java b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/dao/OutsourcerEvaluateDao.java index d829f55..33759c7 100644 --- a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/dao/OutsourcerEvaluateDao.java +++ b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/dao/OutsourcerEvaluateDao.java @@ -162,5 +162,5 @@ public interface OutsourcerEvaluateDao { Integer getExaminePerson(ExamineBean o); - List getAuditPersonByDeptAndRoleName(String applyMan ); + List getAuditPersonByDeptAndRoleName(String applyMan ); } diff --git a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/service/TeamGroupServiceImpl.java b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/service/TeamGroupServiceImpl.java index ee56db6..7cc6060 100644 --- a/src/main/java/com/bonus/gs/sub/evaluate/evaluate/service/TeamGroupServiceImpl.java +++ b/src/main/java/com/bonus/gs/sub/evaluate/evaluate/service/TeamGroupServiceImpl.java @@ -270,11 +270,11 @@ public class TeamGroupServiceImpl implements TeamGroupService { public List auditRegisterList(TeamGroupBean teamGroupBean) { List list = new ArrayList<>(); List registerList = teamGroupDao.getRegisterList(teamGroupBean); - if (teamGroupBean.getAuditType() == 1) { + if (teamGroupBean.getAuditType() != null && teamGroupBean.getAuditType() == 1) { // 各事业部审核人 for (TeamGroupBean groupBean : registerList) { // 获取申请人的部门审核人 - List stringList = dao.getAuditPersonByDeptAndRoleName(groupBean.getApplyMan()); + List stringList = dao.getAuditPersonByDeptAndRoleName(groupBean.getApplyMan()); if (stringList != null && !stringList.isEmpty() && stringList.contains(UserUtil.getLoginUser().getId())) { list.add(groupBean); } @@ -298,9 +298,13 @@ public class TeamGroupServiceImpl implements TeamGroupService { // 班长姓名 groupBean.setTeamLeader(teamLeader.getName()); // 班长手机号 - groupBean.setPhone(teamLeader.getPhone()); + if (StringUtils.isNotBlank(teamLeader.getPhone())){ + groupBean.setPhone(AesCbcUtils.encrypt(teamLeader.getPhone())); + } // 班长身份证号 - groupBean.setIdCard(teamLeader.getIdCard()); + if (StringUtils.isNotBlank(teamLeader.getIdCard())){ + groupBean.setIdCard(AesCbcUtils.encrypt(teamLeader.getIdCard())); + } // 注册骨干人员数量 groupBean.setPersonNum(teamLeader.getPersonNum()); } diff --git a/src/main/resources/mappers/evaluate/OutsourcerEvaluateMapper.xml b/src/main/resources/mappers/evaluate/OutsourcerEvaluateMapper.xml index d3bffd2..18be466 100644 --- a/src/main/resources/mappers/evaluate/OutsourcerEvaluateMapper.xml +++ b/src/main/resources/mappers/evaluate/OutsourcerEvaluateMapper.xml @@ -868,7 +868,7 @@ AND evaluate_node = #{evaluateNode} - SELECT userId FROM diff --git a/src/main/resources/mappers/evaluate/TeamGroupMapper.xml b/src/main/resources/mappers/evaluate/TeamGroupMapper.xml index 4726bb3..da93ea3 100644 --- a/src/main/resources/mappers/evaluate/TeamGroupMapper.xml +++ b/src/main/resources/mappers/evaluate/TeamGroupMapper.xml @@ -201,7 +201,8 @@ poi.create_time createTime, poi.info_file_url infoFileUrl, poi.audit_status auditStatus, - su.username applyMan, + su.id applyMan, + su.username applyManName, CASE WHEN poi.audit_status = 0 THEN '草稿' WHEN poi.audit_status = 1 THEN '待事业部审核' @@ -234,6 +235,7 @@ tp.name AS name, tp.phone AS phone, tp.id_card AS idCard, + poi.apply_man AS applyMan, team_stats.personNum FROM pm_org_info poi diff --git a/src/main/resources/static/js/evaluate/teamGroup/auditRegisterTeamGroup.js b/src/main/resources/static/js/evaluate/teamGroup/auditRegisterTeamGroup.js new file mode 100644 index 0000000..8f47cec --- /dev/null +++ b/src/main/resources/static/js/evaluate/teamGroup/auditRegisterTeamGroup.js @@ -0,0 +1,257 @@ +// 专责审批 js文件 +let layer, laydate, table, form, loginUser; +$(function () { + layui.use(["layer", "laydate", "table", "form"], function () { + layer = layui.layer; + laydate = layui.laydate; + form = layui.form; + table = layui.table; + initLayDate(laydate); + loginUser = JSON.parse(localStorage.getItem("loginUser")); + laydate.render({ + elem: "#startDate", + type: "month", + format: "yyyy-MM", + }); + initTable(); + }); +}); + +function search(type) { + if (type === 1) { + } else { + $("#keyWord").val(""); + $("#status").val(""); + $("#startDate").val(""); + $("#endDate").val(""); + + form.render("select"); + } + table.reload("baseTable", { + url: ctxPath + "/teamGroup/auditRegisterList", + page: { + curr: 1, + }, + where: { + type: "audit", + auditType: 1, + keyWord: $("#keyWord").val(), + status: $("#status").val(), + startDate: $("#startDate").val(), + endDate: $("#endDate").val(), + }, + }); +} + +function initTable() { + //渲染表格 + table.render({ + elem: "#baseTable", + url: ctxPath + "/teamGroup/auditRegisterList", //数据接口 + method: "get", //方式默认是get + toolbar: "default", //开启工具栏,此处显示默认图标,可以自定义模板,详见文档 + where: { + type: "audit", + auditType: 1, + }, //post请求必须加where ,post请求需要的参数 + cellMinWidth: 80, + cols: [ + [ + //表头 + { + field: "number", + width: 80, + title: "序号", + align: "center", + type: "numbers", + }, + {field: "teamGroupName", align: "center", title: "注册班组名称"}, + {field: "teamLeader", align: "center", title: "班组长姓名"}, + { + field: 'phone', title: '班长联系电话', width: '15%', align: "center", + templet: function (d) { + if (d.phone) { + let phone = decryptCBC(d.phone); + return maskSensitiveInfo(phone, "phone"); + } else { + return ""; + } + } + }, + { + field: 'idCard', title: '身份证号码', width: '15%', align: "center", + templet: function (d) { + let idCard = decryptCBC(d.idCard); + return maskSensitiveInfo(idCard, "idCard"); + } + }, + {field: "personNum", align: "center", title: "注册骨干人员数量"}, + { + field: "infoFileUrl", + align: "center", + title: "信息评审表", + templet: function (d) { + return '查看'; + } + }, + {field: "createTime", align: "center", title: "申请时间"}, + {field: "applyManName", align: "center", title: "申请人"}, + {field: "auditStatusName", align: "center", title: "审核状态"}, + { + fixed: "right", + width: 180, + title: "操作", + align: "center", + templet: (d) => { + let text = ""; + text += + '查看'; + if (d.auditStatus == 1) { + text += + '审核'; + } + return text; + }, + }, + ], + ], + id: "baseTable", + page: true, //开启分页 + loading: true, //数据加载中。。。 + limits: [10, 20, 100], //一页选择显示3,5或10条数据 + limit: 10, //一页显示5条数据 + response: { + statusCode: 200, //规定成功的状态码,默认:0 + }, + parseData: function (res) { + //将原始数据解析成 table 组件所规定的数据,res为从url中get到的数据 + let result; + if (res.data !== "" && res.data != null && res.data !== "null") { + if (this.page.curr) { + result = res.data.slice( + this.limit * (this.page.curr - 1), + this.limit * this.page.curr + ); + } else { + result = res.data.slice(0, this.limit); + } + } + return { + code: res.code, //解析接口状态 + msg: res.msg, //解析提示文本 + count: res.count, //解析数据长度 + data: result, //解析数据列表 + }; + }, + toolbar: "#toolbar", + }); + + table.on("tool(test)", function (obj) { + const data = obj.data; //当前行数据 + const rowIndex = obj.index; + const layEvent = obj.event; //当前点击的事件名 + switch (layEvent) { + case "view": + ViewReviews(data, "查看"); + break; + case "audit": + AuditReviews(data, "审核"); + break; + default: + console.warn(`未知事件: ${layEvent}`); + } + }); + + + //查看 + function ViewReviews(data, title) { + localStorage.setItem("teamGroupData", data); + try { + layer.open({ + type: 2, + title: title, + shade: 0.3, + area: ["98%", "98%"], + scrollbar: true, + move: true, + anim: 2, + shadeClose: false, + content: + "./registerEdit.html", + success: function (layero, index) { + let iframeWin = window["layui-layer-iframe" + index]; + iframeWin.setParams(data.id, index, title); + }, + }); + } catch (error) { + console.error("ViewReviews 错误:", error); + } + } +} + +//审核 +function AuditReviews(data, title) { + try { + layer.confirm('是否通过?', { + title: title || '提示', + icon: 3, + shade: 0.3, + btn: ['通过', '驳回'] // 左边是“通过”,右边是“驳回” + }, function (index) { + // 点击“通过”按钮 + let item = { + id: data.id, + auditStatus: 2 // 通过 + }; + submitAudit(item, index); + }, function (index) { + // 点击“驳回”按钮 + let item = { + id: data.id, + auditStatus: 5 // 驳回 + }; + submitAudit(item, index); + }); + } catch (error) { + console.error("AuditReviews 错误:", error); + layer.msg("发生异常,请查看控制台", {icon: 2}); + } + + // 封装提交逻辑,避免重复代码 + function submitAudit(item, index) { + $.ajax({ + url: `${ctxPath}/teamGroup/auditRegister`, + type: "POST", + data: JSON.stringify(item), + dataType: "json", + contentType: "application/json", + success: function (res) { + if (res.res === 1) { + layer.msg("审核成功", {icon: 1}); + // 可以在这里刷新列表或更新状态 + } else { + layer.msg("操作失败:" + (res.resMsg || "未知错误"), {icon: 2}); + } + layer.close(index); // 关闭弹窗 + search(1); + }, + error: function () { + layer.msg("服务异常,请稍后重试", { + icon: 2, + time: 2000 + }); + layer.close(index); + } + }); + } +} + +//班组人员列表 +function openTeamMemberPage(data) { + const filePath = ctxPath + "/statics/" + data.split('/upload/')[1] + window.open(filePath) +} diff --git a/src/main/resources/static/js/evaluate/teamGroup/auditRegisterTeamGroup2.js b/src/main/resources/static/js/evaluate/teamGroup/auditRegisterTeamGroup2.js new file mode 100644 index 0000000..3b90c88 --- /dev/null +++ b/src/main/resources/static/js/evaluate/teamGroup/auditRegisterTeamGroup2.js @@ -0,0 +1,256 @@ +// 专责审批 js文件 +let layer, laydate, table, form, loginUser; +$(function () { + layui.use(["layer", "laydate", "table", "form"], function () { + layer = layui.layer; + laydate = layui.laydate; + form = layui.form; + table = layui.table; + initLayDate(laydate); + loginUser = JSON.parse(localStorage.getItem("loginUser")); + laydate.render({ + elem: "#startDate", + type: "month", + format: "yyyy-MM", + }); + initTable(); + }); +}); + +function search(type) { + if (type === 1) { + } else { + $("#keyWord").val(""); + $("#status").val(""); + $("#startDate").val(""); + $("#endDate").val(""); + + form.render("select"); + } + table.reload("baseTable", { + url: ctxPath + "/teamGroup/auditRegisterList", + page: { + curr: 1, + }, + where: { + type: "audit", + keyWord: $("#keyWord").val(), + status: $("#status").val(), + startDate: $("#startDate").val(), + endDate: $("#endDate").val(), + }, + }); +} + +function initTable() { + //渲染表格 + table.render({ + elem: "#baseTable", + url: ctxPath + "/teamGroup/auditRegisterList", //数据接口 + method: "get", //方式默认是get + toolbar: "default", //开启工具栏,此处显示默认图标,可以自定义模板,详见文档 + where: { + type: "audit" + }, //post请求必须加where ,post请求需要的参数 + cellMinWidth: 80, + cols: [ + [ + //表头 + { + field: "number", + width: 80, + title: "序号", + align: "center", + type: "numbers", + }, + {field: "department", align: "center", title: "所属事业部"}, + {field: "teamGroupName", align: "center", title: "注册班组名称"}, + {field: "teamLeader", align: "center", title: "班组长姓名"}, + { + field: 'phone', title: '班长联系电话', width: '15%', align: "center", + templet: function (d) { + if (d.phone) { + let phone = decryptCBC(d.phone); + return maskSensitiveInfo(phone, "phone"); + } else { + return ""; + } + } + }, + { + field: 'idCard', title: '身份证号码', width: '15%', align: "center", + templet: function (d) { + let idCard = decryptCBC(d.idCard); + return maskSensitiveInfo(idCard, "idCard"); + } + }, + {field: "personNum", align: "center", title: "注册骨干人员数量"}, + { + field: "infoFileUrl", + align: "center", + title: "信息评审表", + templet: function (d) { + return '查看'; + } + }, + {field: "createTime", align: "center", title: "申请时间"}, + {field: "applyManName", align: "center", title: "申请人"}, + {field: "auditStatusName", align: "center", title: "审核状态"}, + { + fixed: "right", + width: 180, + title: "操作", + align: "center", + templet: (d) => { + let text = ""; + text += + '查看'; + if (d.auditStatus == 2) { + text += + '审核'; + } + return text; + }, + }, + ], + ], + id: "baseTable", + page: true, //开启分页 + loading: true, //数据加载中。。。 + limits: [10, 20, 100], //一页选择显示3,5或10条数据 + limit: 10, //一页显示5条数据 + response: { + statusCode: 200, //规定成功的状态码,默认:0 + }, + parseData: function (res) { + //将原始数据解析成 table 组件所规定的数据,res为从url中get到的数据 + let result; + if (res.data !== "" && res.data != null && res.data !== "null") { + if (this.page.curr) { + result = res.data.slice( + this.limit * (this.page.curr - 1), + this.limit * this.page.curr + ); + } else { + result = res.data.slice(0, this.limit); + } + } + return { + code: res.code, //解析接口状态 + msg: res.msg, //解析提示文本 + count: res.count, //解析数据长度 + data: result, //解析数据列表 + }; + }, + toolbar: "#toolbar", + }); + + table.on("tool(test)", function (obj) { + const data = obj.data; //当前行数据 + const rowIndex = obj.index; + const layEvent = obj.event; //当前点击的事件名 + switch (layEvent) { + case "view": + ViewReviews(data, "查看"); + break; + case "audit": + AuditReviews(data, "审核"); + break; + default: + console.warn(`未知事件: ${layEvent}`); + } + }); + + + //查看 + function ViewReviews(data, title) { + localStorage.setItem("teamGroupData", data); + try { + layer.open({ + type: 2, + title: title, + shade: 0.3, + area: ["98%", "98%"], + scrollbar: true, + move: true, + anim: 2, + shadeClose: false, + content: + "./registerEdit.html", + success: function (layero, index) { + let iframeWin = window["layui-layer-iframe" + index]; + iframeWin.setParams(data.id, index, title); + }, + }); + } catch (error) { + console.error("ViewReviews 错误:", error); + } + } +} + +//审核 +function AuditReviews(data, title) { + try { + layer.confirm('是否通过?', { + title: title || '提示', + icon: 3, + shade: 0.3, + btn: ['通过', '驳回'] // 左边是“通过”,右边是“驳回” + }, function (index) { + // 点击“通过”按钮 + let item = { + id: data.id, + auditStatus: 3 // 通过 + }; + submitAudit(item, index); + }, function (index) { + // 点击“驳回”按钮 + let item = { + id: data.id, + auditStatus: 5 // 驳回 + }; + submitAudit(item, index); + }); + } catch (error) { + console.error("AuditReviews 错误:", error); + layer.msg("发生异常,请查看控制台", {icon: 2}); + } + + // 封装提交逻辑,避免重复代码 + function submitAudit(item, index) { + $.ajax({ + url: `${ctxPath}/teamGroup/auditRegister`, + type: "POST", + data: JSON.stringify(item), + dataType: "json", + contentType: "application/json", + success: function (res) { + if (res.res === 1) { + layer.msg("审核成功", {icon: 1}); + // 可以在这里刷新列表或更新状态 + } else { + layer.msg("操作失败:" + (res.resMsg || "未知错误"), {icon: 2}); + } + layer.close(index); // 关闭弹窗 + search(1); + }, + error: function () { + layer.msg("服务异常,请稍后重试", { + icon: 2, + time: 2000 + }); + layer.close(index); + } + }); + } +} + +//班组人员列表 +function openTeamMemberPage(data) { + const filePath = ctxPath + "/statics/" + data.split('/upload/')[1] + window.open(filePath) +} diff --git a/src/main/resources/static/js/evaluate/teamGroup/auditRegisterTeamGroup3.js b/src/main/resources/static/js/evaluate/teamGroup/auditRegisterTeamGroup3.js new file mode 100644 index 0000000..a2efe3e --- /dev/null +++ b/src/main/resources/static/js/evaluate/teamGroup/auditRegisterTeamGroup3.js @@ -0,0 +1,256 @@ +// 专责审批 js文件 +let layer, laydate, table, form, loginUser; +$(function () { + layui.use(["layer", "laydate", "table", "form"], function () { + layer = layui.layer; + laydate = layui.laydate; + form = layui.form; + table = layui.table; + initLayDate(laydate); + loginUser = JSON.parse(localStorage.getItem("loginUser")); + laydate.render({ + elem: "#startDate", + type: "month", + format: "yyyy-MM", + }); + initTable(); + }); +}); + +function search(type) { + if (type === 1) { + } else { + $("#keyWord").val(""); + $("#status").val(""); + $("#startDate").val(""); + $("#endDate").val(""); + + form.render("select"); + } + table.reload("baseTable", { + url: ctxPath + "/teamGroup/auditRegisterList", + page: { + curr: 1, + }, + where: { + type: "audit", + keyWord: $("#keyWord").val(), + status: $("#status").val(), + startDate: $("#startDate").val(), + endDate: $("#endDate").val(), + }, + }); +} + +function initTable() { + //渲染表格 + table.render({ + elem: "#baseTable", + url: ctxPath + "/teamGroup/auditRegisterList", //数据接口 + method: "get", //方式默认是get + toolbar: "default", //开启工具栏,此处显示默认图标,可以自定义模板,详见文档 + where: { + type: "audit" + }, //post请求必须加where ,post请求需要的参数 + cellMinWidth: 80, + cols: [ + [ + //表头 + { + field: "number", + width: 80, + title: "序号", + align: "center", + type: "numbers", + }, + {field: "department", align: "center", title: "所属事业部"}, + {field: "teamGroupName", align: "center", title: "注册班组名称"}, + {field: "teamLeader", align: "center", title: "班组长姓名"}, + { + field: 'phone', title: '班长联系电话', width: '15%', align: "center", + templet: function (d) { + if (d.phone) { + let phone = decryptCBC(d.phone); + return maskSensitiveInfo(phone, "phone"); + } else { + return ""; + } + } + }, + { + field: 'idCard', title: '身份证号码', width: '15%', align: "center", + templet: function (d) { + let idCard = decryptCBC(d.idCard); + return maskSensitiveInfo(idCard, "idCard"); + } + }, + {field: "personNum", align: "center", title: "注册骨干人员数量"}, + { + field: "infoFileUrl", + align: "center", + title: "信息评审表", + templet: function (d) { + return '查看'; + } + }, + {field: "createTime", align: "center", title: "申请时间"}, + {field: "applyManName", align: "center", title: "申请人"}, + {field: "auditStatusName", align: "center", title: "审核状态"}, + { + fixed: "right", + width: 180, + title: "操作", + align: "center", + templet: (d) => { + let text = ""; + text += + '查看'; + if (d.auditStatus == 3) { + text += + '审核'; + } + return text; + }, + }, + ], + ], + id: "baseTable", + page: true, //开启分页 + loading: true, //数据加载中。。。 + limits: [10, 20, 100], //一页选择显示3,5或10条数据 + limit: 10, //一页显示5条数据 + response: { + statusCode: 200, //规定成功的状态码,默认:0 + }, + parseData: function (res) { + //将原始数据解析成 table 组件所规定的数据,res为从url中get到的数据 + let result; + if (res.data !== "" && res.data != null && res.data !== "null") { + if (this.page.curr) { + result = res.data.slice( + this.limit * (this.page.curr - 1), + this.limit * this.page.curr + ); + } else { + result = res.data.slice(0, this.limit); + } + } + return { + code: res.code, //解析接口状态 + msg: res.msg, //解析提示文本 + count: res.count, //解析数据长度 + data: result, //解析数据列表 + }; + }, + toolbar: "#toolbar", + }); + + table.on("tool(test)", function (obj) { + const data = obj.data; //当前行数据 + const rowIndex = obj.index; + const layEvent = obj.event; //当前点击的事件名 + switch (layEvent) { + case "view": + ViewReviews(data, "查看"); + break; + case "audit": + AuditReviews(data, "审核"); + break; + default: + console.warn(`未知事件: ${layEvent}`); + } + }); + + + //查看 + function ViewReviews(data, title) { + localStorage.setItem("teamGroupData", data); + try { + layer.open({ + type: 2, + title: title, + shade: 0.3, + area: ["98%", "98%"], + scrollbar: true, + move: true, + anim: 2, + shadeClose: false, + content: + "./registerEdit.html", + success: function (layero, index) { + let iframeWin = window["layui-layer-iframe" + index]; + iframeWin.setParams(data.id, index, title); + }, + }); + } catch (error) { + console.error("ViewReviews 错误:", error); + } + } +} + +//审核 +function AuditReviews(data, title) { + try { + layer.confirm('是否通过?', { + title: title || '提示', + icon: 3, + shade: 0.3, + btn: ['通过', '驳回'] + }, function (index) { + // 点击“通过”按钮 + let item = { + id: data.id, + auditStatus: 4 // 通过 + }; + submitAudit(item, index); + }, function (index) { + // 点击“驳回”按钮 + let item = { + id: data.id, + auditStatus: 5 // 驳回 + }; + submitAudit(item, index); + }); + } catch (error) { + console.error("AuditReviews 错误:", error); + layer.msg("发生异常,请查看控制台", {icon: 2}); + } + + // 封装提交逻辑,避免重复代码 + function submitAudit(item, index) { + $.ajax({ + url: `${ctxPath}/teamGroup/auditRegister`, + type: "POST", + data: JSON.stringify(item), + dataType: "json", + contentType: "application/json", + success: function (res) { + if (res.res === 1) { + layer.msg("审核成功", {icon: 1}); + // 可以在这里刷新列表或更新状态 + } else { + layer.msg("操作失败:" + (res.resMsg || "未知错误"), {icon: 2}); + } + layer.close(index); // 关闭弹窗 + search(1); + }, + error: function () { + layer.msg("服务异常,请稍后重试", { + icon: 2, + time: 2000 + }); + layer.close(index); + } + }); + } +} + +//班组人员列表 +function openTeamMemberPage(data) { + const filePath = ctxPath + "/statics/" + data.split('/upload/')[1] + window.open(filePath) +} diff --git a/src/main/resources/static/js/evaluate/teamGroup/registerEdit.js b/src/main/resources/static/js/evaluate/teamGroup/registerEdit.js index 683fac5..aeb687e 100644 --- a/src/main/resources/static/js/evaluate/teamGroup/registerEdit.js +++ b/src/main/resources/static/js/evaluate/teamGroup/registerEdit.js @@ -27,12 +27,24 @@ let memberInfoList = [ }, ]; -function setParams(id,index){ +function setParams(id,index,title){ layui.use(["table", "form", "upload", "tree"], function () { const $ = layui.$; form = layui.form; upload = layui.upload; table = layui.table; + if (title === "查看") { + layui.$(".submit").css("display", "none"); + layui.$("#addMemberBtn").css("display", "none"); + layui.$("#uploadBtn").css("display", "none"); + layui.$("#uploadBtn1").css("display", "none"); + // 如果按钮是异步加载的,需要等待一段时间 + setTimeout(function() { + layui.$('[id^="deleteMemberBtn-"]').hide(); + layui.$('[id^="uploadBtn-"]').hide(); + }, 100); + } + form.verify({ idCard: function (value, item) { if (!checkPsidno(value)) { diff --git a/src/main/resources/static/js/evaluate/teamGroup/teamGroupRegister.js b/src/main/resources/static/js/evaluate/teamGroup/teamGroupRegister.js index 270c822..bc10471 100644 --- a/src/main/resources/static/js/evaluate/teamGroup/teamGroupRegister.js +++ b/src/main/resources/static/js/evaluate/teamGroup/teamGroupRegister.js @@ -76,7 +76,8 @@ function initTable() { } } }, - { field: 'idCard', title: '身份证号码', width: '15%', align: "center", + { + field: 'idCard', title: '身份证号码', width: '15%', align: "center", templet: function (d) { let idCard = decryptCBC(d.idCard); return maskSensitiveInfo(idCard, "idCard"); @@ -92,7 +93,7 @@ function initTable() { } }, {field: "createTime", align: "center", title: "申请时间"}, - {field: "applyMan", align: "center", title: "申请人"}, + {field: "applyManName", align: "center", title: "申请人"}, {field: "auditStatusName", align: "center", title: "审核状态"}, { fixed: "right", @@ -102,20 +103,27 @@ function initTable() { templet: (d) => { let text = ""; let auditStatus = d.auditStatus; - if(auditStatus ==0 || auditStatus == 5){ + if (auditStatus == 0 || auditStatus == 5) { text += - '编辑'; - } - text += - '删除'; - if (d.status == 1 && loginUser.id === d.userId) { - text += - '退场'; + ' id="edit">编辑'; + text += + '删除'; + } + if (auditStatus == 1) { + text += + '撤回'; + } + if (auditStatus == 1 || auditStatus == 2 || auditStatus == 5) { + text += + '查看'; } return text; }, @@ -161,11 +169,14 @@ function initTable() { case "edit": ViewReviews(data, "编辑"); break; + case "view": + ViewReviews(data, "查看"); + break; case "del": DelReviews(data, "删除"); break; - case "exit": - ExitReviews(data, "退场"); + case "revoke": + ExitReviews(data, "撤回"); break; default: console.warn(`未知事件: ${layEvent}`); @@ -186,12 +197,10 @@ function initTable() { anim: 2, name: "editTeamGroup", shadeClose: false, - // content: - // './editForm.html', - content:'./registerEdit.html', + content: './registerEdit.html', success: function (layero, index) { let iframeWin = window["layui-layer-iframe" + index]; - iframeWin.setParams(data.id, index); + iframeWin.setParams(data.id, index, title); }, }); } catch (error) { @@ -254,45 +263,38 @@ function initTable() { } } - //退场 + //撤回 function ExitReviews(data, title) { console.log("data", data) try { - layer.confirm('是否确认退场?', { + layer.confirm('是否撤回?', { title: title || '提示', icon: 3, shade: 0.3, btn: ['确定', '取消'] }, function (index) { - - // 禁用按钮防止重复提交 - $(".save").addClass("layui-btn-disabled").attr("disabled", true); - $(".cancel").addClass("layui-btn-disabled").attr("disabled", true); let item = { - id: data.id + id: data.id, + auditStatus: 0 }; $.ajax({ - url: `${ctxPath}` + '/organizational/userOutData', + url: `${ctxPath}` + '/organizational/revokeRegisterTeamGroup', type: "POST", data: JSON.stringify(item), dataType: "json", contentType: "application/json", success: function (res) { - $(".save").removeClass("layui-btn-disabled").attr("disabled", false); - $(".cancel").removeClass("layui-btn-disabled").attr("disabled", false); - - if (res.res === 1) { - openEvaluatePage(res.obj) + if (res.code === 200) { + layer.msg("撤回成功", {icon: 1}); } else { - layer.msg("删除失败:" + (res.resMsg || "未知错误"), {icon: 2}); + layer.msg("撤回失败:" + (res.resMsg || "未知错误"), {icon: 2}); } layer.close(index); // 关闭弹窗 + search(1); }, error: function () { layer.close(loadingMsg); - $(".save").removeClass("layui-btn-disabled").attr("disabled", false); - $(".cancel").removeClass("layui-btn-disabled").attr("disabled", false); layer.msg("服务异常,请稍后重试", { icon: 2, time: 2000 @@ -304,7 +306,7 @@ function initTable() { layer.close(index); }); } catch (error) { - console.error("DelReviews 错误:", error); + console.error("ExitReviews 错误:", error); layer.msg("发生异常,请查看控制台", {icon: 2}); } } @@ -312,7 +314,7 @@ function initTable() { //班组人员列表 function openTeamMemberPage(data) { - const filePath = ctxPath +"/statics/"+ data.split('/upload/')[1] + const filePath = ctxPath + "/statics/" + data.split('/upload/')[1] window.open(filePath) } diff --git a/src/main/resources/static/pages/evaluate/teamGroup/auditRegisterTeamGroup.html b/src/main/resources/static/pages/evaluate/teamGroup/auditRegisterTeamGroup.html new file mode 100644 index 0000000..da04e08 --- /dev/null +++ b/src/main/resources/static/pages/evaluate/teamGroup/auditRegisterTeamGroup.html @@ -0,0 +1,87 @@ + + + + 外包企业管理 + + + + +
+
+
+
+ + + + +
+
+ +
+ - +
+ +
+
+ + +
+
+
+
+
+
+
+ + + + + + + + + + + + diff --git a/src/main/resources/static/pages/evaluate/teamGroup/auditRegisterTeamGroup2.html b/src/main/resources/static/pages/evaluate/teamGroup/auditRegisterTeamGroup2.html new file mode 100644 index 0000000..967cc7a --- /dev/null +++ b/src/main/resources/static/pages/evaluate/teamGroup/auditRegisterTeamGroup2.html @@ -0,0 +1,87 @@ + + + + 外包企业管理 + + + + +
+
+
+
+ + + + +
+
+ +
+ - +
+ +
+
+ + +
+
+
+
+
+
+
+ + + + + + + + + + + + diff --git a/src/main/resources/static/pages/evaluate/teamGroup/auditRegisterTeamGroup3.html b/src/main/resources/static/pages/evaluate/teamGroup/auditRegisterTeamGroup3.html new file mode 100644 index 0000000..4b05592 --- /dev/null +++ b/src/main/resources/static/pages/evaluate/teamGroup/auditRegisterTeamGroup3.html @@ -0,0 +1,87 @@ + + + + 外包企业管理 + + + + +
+
+
+
+ + + + +
+
+ +
+ - +
+ +
+
+ + +
+
+
+
+
+
+
+ + + + + + + + + + + +