班组注册功能开发
This commit is contained in:
parent
8c6b3a6a55
commit
b3a098bb7a
|
|
@ -254,6 +254,9 @@ public class TeamGroupServiceImpl implements TeamGroupService {
|
||||||
List<TeamGroupBean> registerList = teamGroupDao.getRegisterList(teamGroupBean);
|
List<TeamGroupBean> registerList = teamGroupDao.getRegisterList(teamGroupBean);
|
||||||
for (TeamGroupBean groupBean : registerList) {
|
for (TeamGroupBean groupBean : registerList) {
|
||||||
TeamGroupBean teamLeader = teamGroupDao.getTeamLeader(groupBean);
|
TeamGroupBean teamLeader = teamGroupDao.getTeamLeader(groupBean);
|
||||||
|
if (StringUtils.isNotBlank(teamLeader.getName())){
|
||||||
|
groupBean.setTeamLeader(teamLeader.getName());
|
||||||
|
}
|
||||||
groupBean.setTeamLeader(teamLeader.getName());
|
groupBean.setTeamLeader(teamLeader.getName());
|
||||||
if (StringUtils.isNotBlank(teamLeader.getPhone())) {
|
if (StringUtils.isNotBlank(teamLeader.getPhone())) {
|
||||||
groupBean.setPhone(AesCbcUtils.encrypt(teamLeader.getPhone()));
|
groupBean.setPhone(AesCbcUtils.encrypt(teamLeader.getPhone()));
|
||||||
|
|
|
||||||
|
|
@ -141,28 +141,4 @@ public class SecurityHandlerConfig {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* @Configuration
|
|
||||||
public class SecurityConfig {
|
|
||||||
@Bean
|
|
||||||
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
|
|
||||||
http.headers(headers -> headers
|
|
||||||
.contentSecurityPolicy(csp -> csp
|
|
||||||
.policyDirectives(
|
|
||||||
"default-src 'self'; " +
|
|
||||||
"script-src 'self' 'unsafe-inline' 'unsafe-eval'; " +
|
|
||||||
"style-src 'self' 'unsafe-inline'; " +
|
|
||||||
"img-src 'self' data: https:; " +
|
|
||||||
"font-src 'self'; " +
|
|
||||||
"connect-src 'self'; " +
|
|
||||||
"frame-src 'none'; " +
|
|
||||||
"object-src 'none'; " +
|
|
||||||
"base-uri 'self'; " +
|
|
||||||
"form-action 'self';"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
return http.build();
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ package com.bonus.gs.sub.evaluate.manager.filter;
|
||||||
|
|
||||||
import javax.servlet.*;
|
import javax.servlet.*;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class DecryptionFilter implements Filter {
|
public class DecryptionFilter implements Filter {
|
||||||
|
|
@ -16,6 +17,19 @@ public class DecryptionFilter implements Filter {
|
||||||
throws IOException, ServletException {
|
throws IOException, ServletException {
|
||||||
|
|
||||||
HttpServletRequest httpRequest = (HttpServletRequest) request;
|
HttpServletRequest httpRequest = (HttpServletRequest) request;
|
||||||
|
HttpServletResponse httpResponse = (HttpServletResponse) response;
|
||||||
|
// 防止点击劫持:禁止被 iframe 嵌套
|
||||||
|
httpResponse.setHeader("X-Frame-Options", "SAMEORIGIN");
|
||||||
|
httpResponse.setHeader("Content-Security-Policy",
|
||||||
|
"default-src 'self'; " +
|
||||||
|
"script-src 'self' 'unsafe-inline' 'unsafe-eval'; " +
|
||||||
|
"style-src 'self' 'unsafe-inline'; " +
|
||||||
|
"img-src 'self' data:; " +
|
||||||
|
"font-src 'self'; " +
|
||||||
|
"connect-src 'self'; " +
|
||||||
|
"form-action 'self'; " +
|
||||||
|
"object-src 'none'; " +
|
||||||
|
"base-uri 'self';");
|
||||||
|
|
||||||
if (httpRequest.getRequestURI().endsWith("/login")
|
if (httpRequest.getRequestURI().endsWith("/login")
|
||||||
&& "POST".equalsIgnoreCase(httpRequest.getMethod())) {
|
&& "POST".equalsIgnoreCase(httpRequest.getMethod())) {
|
||||||
|
|
|
||||||
|
|
@ -258,8 +258,15 @@
|
||||||
|
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insetTeamGroupType">
|
<insert id="insetTeamGroupType">
|
||||||
insert into team_group_type(team_group_id,team_type)
|
INSERT INTO team_group_type
|
||||||
values (#{id}, #{teamType})
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">team_group_id,</if>
|
||||||
|
<if test="teamType != null and teamType != ''">team_type,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">#{id},</if>
|
||||||
|
<if test="teamType != null and teamType != ''">#{teamType},</if>
|
||||||
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insetTeamPerson">
|
<insert id="insetTeamPerson">
|
||||||
insert into team_person(team_id, name, id_card, phone,sex,work_type,face_url,is_team_leader)
|
insert into team_person(team_id, name, id_card, phone,sex,work_type,face_url,is_team_leader)
|
||||||
|
|
@ -304,7 +311,7 @@
|
||||||
<if test="teamGroupName != null and teamGroupName != ''">name,</if>
|
<if test="teamGroupName != null and teamGroupName != ''">name,</if>
|
||||||
<if test="level != null">level,</if>
|
<if test="level != null">level,</if>
|
||||||
<if test="name != null and name !=''">user_name,</if>
|
<if test="name != null and name !=''">user_name,</if>
|
||||||
<if test="idCard != null">id_card,</if>
|
<if test="idCard != null and idCard != ''">id_card,</if>
|
||||||
<if test="sex != null">sex,</if>
|
<if test="sex != null">sex,</if>
|
||||||
<if test="phone != null and phone != ''">user_phone,</if>
|
<if test="phone != null and phone != ''">user_phone,</if>
|
||||||
<if test="tableSource != null">table_source,</if>
|
<if test="tableSource != null">table_source,</if>
|
||||||
|
|
@ -313,7 +320,7 @@
|
||||||
<if test="infoFileUrl != null">info_file_url,</if>
|
<if test="infoFileUrl != null">info_file_url,</if>
|
||||||
<if test="applyMan != null">apply_man,</if>
|
<if test="applyMan != null">apply_man,</if>
|
||||||
create_time,
|
create_time,
|
||||||
status,
|
status
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="teamGroupName != null and teamGroupName != ''">#{teamGroupName},</if>
|
<if test="teamGroupName != null and teamGroupName != ''">#{teamGroupName},</if>
|
||||||
|
|
@ -332,12 +339,50 @@
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insetTeamPersonLeader">
|
<insert id="insetTeamPersonLeader">
|
||||||
insert into team_person(team_id, name, id_card, phone,sex,work_type,face_url,is_team_leader)
|
INSERT INTO team_person
|
||||||
values (#{id}, #{name},#{idCard}, #{phone}, #{sex}, #{workType}, #{faceUrl}, #{isTeamLeader})
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">team_id,</if>
|
||||||
|
<if test="name != null and name != ''">name,</if>
|
||||||
|
<if test="idCard != null and idCard != ''">id_card,</if>
|
||||||
|
<if test="phone != null and phone != ''">phone,</if>
|
||||||
|
<if test="sex != null">sex,</if>
|
||||||
|
<if test="workType != null and workType != ''">work_type,</if>
|
||||||
|
<if test="faceUrl != null and faceUrl != ''">face_url,</if>
|
||||||
|
<if test="isTeamLeader != null">is_team_leader,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">#{id},</if>
|
||||||
|
<if test="name != null and name != ''">#{name},</if>
|
||||||
|
<if test="idCard != null and idCard != ''">#{idCard},</if>
|
||||||
|
<if test="phone != null and phone != ''">#{phone},</if>
|
||||||
|
<if test="sex != null">#{sex},</if>
|
||||||
|
<if test="workType != null and workType != ''">#{workType},</if>
|
||||||
|
<if test="faceUrl != null and faceUrl != ''">#{faceUrl},</if>
|
||||||
|
<if test="isTeamLeader != null">#{isTeamLeader},</if>
|
||||||
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insetTeamPersonOthers">
|
<insert id="insetTeamPersonOthers">
|
||||||
insert into team_person(team_id, name, id_card, phone,sex,work_type,face_url,is_team_leader)
|
INSERT INTO team_person
|
||||||
values (#{id}, #{name},#{idCard}, #{phone}, #{sex}, #{workType}, #{faceUrl}, #{isTeamLeader})
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">team_id,</if>
|
||||||
|
<if test="name != null and name != ''">name,</if>
|
||||||
|
<if test="idCard != null and idCard != ''">id_card,</if>
|
||||||
|
<if test="phone != null and phone != ''">phone,</if>
|
||||||
|
<if test="sex != null">sex,</if>
|
||||||
|
<if test="workType != null and workType != ''">work_type,</if>
|
||||||
|
<if test="faceUrl != null and faceUrl != ''">face_url,</if>
|
||||||
|
<if test="isTeamLeader != null">is_team_leader,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">#{id},</if>
|
||||||
|
<if test="name != null and name != ''">#{name},</if>
|
||||||
|
<if test="idCard != null and idCard != ''">#{idCard},</if>
|
||||||
|
<if test="phone != null and phone != ''">#{phone},</if>
|
||||||
|
<if test="sex != null">#{sex},</if>
|
||||||
|
<if test="workType != null and workType != ''">#{workType},</if>
|
||||||
|
<if test="faceUrl != null and faceUrl != ''">#{faceUrl},</if>
|
||||||
|
<if test="isTeamLeader != null">#{isTeamLeader},</if>
|
||||||
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<select id="getUserList" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.OrganizationalBean">
|
<select id="getUserList" resultType="com.bonus.gs.sub.evaluate.evaluate.beans.OrganizationalBean">
|
||||||
select NAME userName, LOGIN_NAME idCard, SEX, TELPHONE userPhone, dept_id tableId
|
select NAME userName, LOGIN_NAME idCard, SEX, TELPHONE userPhone, dept_id tableId
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@
|
||||||
poi3.user_id as userId,
|
poi3.user_id as userId,
|
||||||
poi.NAME teamGroupName,
|
poi.NAME teamGroupName,
|
||||||
poi.id as id,
|
poi.id as id,
|
||||||
|
poi.audit_status as auditStatus,
|
||||||
poi.parent_id as parentId,
|
poi.parent_id as parentId,
|
||||||
poi.p_parent_id as pParentId,
|
poi.p_parent_id as pParentId,
|
||||||
poi.status as status,
|
poi.status as status,
|
||||||
|
|
@ -75,6 +76,7 @@
|
||||||
left join team_person tp on poi.id = tp.team_id
|
left join team_person tp on poi.id = tp.team_id
|
||||||
WHERE
|
WHERE
|
||||||
poi.`level` = 5
|
poi.`level` = 5
|
||||||
|
and poi.`audit_status` is null or poi.`audit_status` = 4
|
||||||
<if test="userId != null ">
|
<if test="userId != null ">
|
||||||
and poi3.user_id = #{userId}
|
and poi3.user_id = #{userId}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
|
|
@ -34,15 +34,7 @@ function setParams(id,index,title){
|
||||||
upload = layui.upload;
|
upload = layui.upload;
|
||||||
table = layui.table;
|
table = layui.table;
|
||||||
if (title === "查看") {
|
if (title === "查看") {
|
||||||
layui.$(".submit").css("display", "none");
|
$(".submit, #addMemberBtn, #uploadBtn, #uploadBtn1").hide();
|
||||||
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({
|
form.verify({
|
||||||
|
|
@ -75,7 +67,6 @@ function setParams(id,index,title){
|
||||||
}, 300);
|
}, 300);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//回显数据
|
//回显数据
|
||||||
function setFormData(data) {
|
function setFormData(data) {
|
||||||
if (!data) return
|
if (!data) return
|
||||||
|
|
@ -92,11 +83,11 @@ function setParams(id,index,title){
|
||||||
// 设置文件URL
|
// 设置文件URL
|
||||||
if (data.faceUrl) {
|
if (data.faceUrl) {
|
||||||
faceUrl = data.faceUrl
|
faceUrl = data.faceUrl
|
||||||
$("#fileInfo").html("已上传文件")
|
$("#fileInfo").html(faceUrl.replace(/.*upload[\\/]/, ''))
|
||||||
}
|
}
|
||||||
if (data.infoFileUrl) {
|
if (data.infoFileUrl) {
|
||||||
infoFileUrl = data.infoFileUrl
|
infoFileUrl = data.infoFileUrl
|
||||||
$("#fileInfo1").html("已上传文件")
|
$("#fileInfo1").html(infoFileUrl.replace(/.*upload[\\/]/, ''))
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理班组成员信息
|
// 处理班组成员信息
|
||||||
|
|
@ -118,6 +109,23 @@ function setParams(id,index,title){
|
||||||
})
|
})
|
||||||
|
|
||||||
// 构建成员信息UI
|
// 构建成员信息UI
|
||||||
|
if (title === "查看") {
|
||||||
|
constructMemberInfoView(index).then(() => {
|
||||||
|
// 填充成员数据
|
||||||
|
$(`#name-${index}`).val(member.name || "")
|
||||||
|
$(`#phone-${index}`).val(member.phone || "")
|
||||||
|
$(`#idCard-${index}`).val(member.idCard || "")
|
||||||
|
$(`#workType-${index}`).val(member.workType || "")
|
||||||
|
$(`#sex-${index}`).val(member.sex || "")
|
||||||
|
|
||||||
|
if (member.faceUrl) {
|
||||||
|
$(`#fileInfo-${index}`).html(member.faceUrl.replace(/.*upload[\\/]/, ''))
|
||||||
|
}
|
||||||
|
|
||||||
|
// 重新渲染表单
|
||||||
|
form.render()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
constructMemberInfo(index).then(() => {
|
constructMemberInfo(index).then(() => {
|
||||||
// 填充成员数据
|
// 填充成员数据
|
||||||
$(`#name-${index}`).val(member.name || "")
|
$(`#name-${index}`).val(member.name || "")
|
||||||
|
|
@ -127,12 +135,14 @@ function setParams(id,index,title){
|
||||||
$(`#sex-${index}`).val(member.sex || "")
|
$(`#sex-${index}`).val(member.sex || "")
|
||||||
|
|
||||||
if (member.faceUrl) {
|
if (member.faceUrl) {
|
||||||
$(`#fileInfo-${index}`).html("已上传文件")
|
$(`#fileInfo-${index}`).html(member.faceUrl.replace(/.*upload[\\/]/, ''))
|
||||||
}
|
}
|
||||||
|
|
||||||
// 重新渲染表单
|
// 重新渲染表单
|
||||||
form.render()
|
form.render()
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -216,7 +226,6 @@ function setParams(id,index,title){
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 文件选择后的回调处理
|
// 文件选择后的回调处理
|
||||||
$("#fileInput").on("change", function () {
|
$("#fileInput").on("change", function () {
|
||||||
const file = $("#fileInput")[0].files[0];
|
const file = $("#fileInput")[0].files[0];
|
||||||
|
|
@ -625,6 +634,87 @@ function setParams(id,index,title){
|
||||||
setSelectValue(sexList, `sex-${index}`);
|
setSelectValue(sexList, `sex-${index}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function constructMemberInfoView(index) {
|
||||||
|
$("#memberInfo").append(`
|
||||||
|
<div id="memberInfo-${index}" class="memberInfoItem">
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-md6" style="float: left;width: 50%;margin-top: 1%">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label"><span class="required_icon">*</span>姓名</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" required lay-verify="required" id="name-${index}" name="name-${index}"
|
||||||
|
autocomplete="off" class="layui-input">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md6" style="float: left;width: 50%;margin-top: 1%">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label"><span class="required_icon">*</span>联系方式</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" required lay-verify="required|phone" id="phone-${index}" name="phone-${index}"
|
||||||
|
autocomplete="off" class="layui-input">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-md6" style="float: left;width: 50%;margin-top: 1%">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label"><span
|
||||||
|
class="required_icon">*</span>身份证号码</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" required lay-verify="required|idCard" id="idCard-${index}" name="idCard-${index}"
|
||||||
|
autocomplete="off" class="layui-input">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md6" style="float: left;width: 50%;margin-top: 1%">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label"><span class="required_icon">*</span>工种</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<select id="workType-${index}" name="workType-${index}" class="layui-select" lay-search
|
||||||
|
lay-verify="required" style="height: 36px;">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-md6" style="float: left;width: 50%;margin-top: 1%">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label"><span class="required_icon">*</span>性别</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<select id="sex-${index}" name="sex-${index}" class="layui-select" lay-search
|
||||||
|
lay-verify="required" style="height: 36px;">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-md6" style="float: left;width: 50%;margin-top: 1%">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label"><span class="required_icon"></span>人脸照片</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="file" id="fileInput-${index}" name="file-${index}" accept=".jpg,.png"
|
||||||
|
style="display: none;">
|
||||||
|
<div id="fileInfo-${index}"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`);
|
||||||
|
|
||||||
|
if (workTypeList.length < 1) {
|
||||||
|
await getWorkTypeNew();
|
||||||
|
}
|
||||||
|
|
||||||
|
setSelectValue(workTypeList, `workType-${index}`);
|
||||||
|
|
||||||
|
setSelectValue(sexList, `sex-${index}`);
|
||||||
|
}
|
||||||
|
|
||||||
initMemberInfo();
|
initMemberInfo();
|
||||||
|
|
||||||
// 删除操作
|
// 删除操作
|
||||||
|
|
@ -679,7 +769,7 @@ function setParams(id,index,title){
|
||||||
$(`#sex-${i}`).val(member.sex || "");
|
$(`#sex-${i}`).val(member.sex || "");
|
||||||
|
|
||||||
if (member.faceUrl) {
|
if (member.faceUrl) {
|
||||||
$(`#fileInfo-${i}`).html("已上传文件");
|
$(`#fileInfo-${i}`).html(member.faceUrl.replace(/.*upload[\\/]/, ''));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ function initTable() {
|
||||||
align: "center",
|
align: "center",
|
||||||
title: "班组人数",
|
title: "班组人数",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
return '<a onclick="openTeamMemberPage(' + d.id + ')" style="color: #1E9FFF; cursor: pointer;">' + d.teamPersonNum + '</a>';
|
return '<a onclick="openTeamMemberPage(' + d.id +","+ d.auditStatus + ')" style="color: #1E9FFF; cursor: pointer;">' + d.teamPersonNum + '</a>';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -335,7 +335,7 @@ function initTable() {
|
||||||
}
|
}
|
||||||
|
|
||||||
//班组人员列表
|
//班组人员列表
|
||||||
function openTeamMemberPage(data) {
|
function openTeamMemberPage(id, auditStatus) {
|
||||||
try {
|
try {
|
||||||
const layerIndex = layer.open({
|
const layerIndex = layer.open({
|
||||||
type: 2,
|
type: 2,
|
||||||
|
|
@ -350,7 +350,7 @@ function openTeamMemberPage(data) {
|
||||||
'./teamMemBer.html',
|
'./teamMemBer.html',
|
||||||
success: function (layero, index) {
|
success: function (layero, index) {
|
||||||
let iframeWin = window["layui-layer-iframe" + index];
|
let iframeWin = window["layui-layer-iframe" + index];
|
||||||
iframeWin.setParams(JSON.stringify(data), index);
|
iframeWin.setParams(JSON.stringify(id),JSON.stringify(auditStatus), index);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
||||||
|
|
@ -79,8 +79,12 @@ function initTable() {
|
||||||
{
|
{
|
||||||
field: 'idCard', title: '身份证号码', width: '15%', align: "center",
|
field: 'idCard', title: '身份证号码', width: '15%', align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
|
if (d.idCard) {
|
||||||
let idCard = decryptCBC(d.idCard);
|
let idCard = decryptCBC(d.idCard);
|
||||||
return maskSensitiveInfo(idCard, "idCard");
|
return maskSensitiveInfo(idCard, "idCard");
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: "personNum", align: "center", title: "注册骨干人员数量"},
|
{field: "personNum", align: "center", title: "注册骨干人员数量"},
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
// 专责审批 js文件
|
// 专责审批 js文件
|
||||||
let layer, laydate, table, form, id;
|
let layer, laydate, table, form, id, auditStatus;
|
||||||
let fileList = [];
|
let fileList = [];
|
||||||
function setParams(obj, layerIndex) {
|
|
||||||
objParam = JSON.parse(obj);
|
function setParams(obj,obj1, layerIndex) {
|
||||||
id = objParam;
|
id = JSON.parse(obj);
|
||||||
|
auditStatus = JSON.parse(obj1);
|
||||||
$(function () {
|
$(function () {
|
||||||
layui.use(["layer", "laydate", "table", "form"], function () {
|
layui.use(["layer", "laydate", "table", "form"], function () {
|
||||||
layer = layui.layer;
|
layer = layui.layer;
|
||||||
|
|
@ -86,13 +87,15 @@ function initTable() {
|
||||||
type: "numbers",
|
type: "numbers",
|
||||||
},
|
},
|
||||||
{field: "name", align: "center", title: "姓名"},
|
{field: "name", align: "center", title: "姓名"},
|
||||||
{ field: 'idCard', title: '身份证', width: '15%', align: "center",
|
{
|
||||||
|
field: 'idCard', title: '身份证', width: '15%', align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
let idCard = decryptCBC(d.idCard);
|
let idCard = decryptCBC(d.idCard);
|
||||||
return maskSensitiveInfo(idCard, "idCard");
|
return maskSensitiveInfo(idCard, "idCard");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'phone', title: '电话', width: '15%', align: "center",
|
{
|
||||||
|
field: 'phone', title: '电话', width: '15%', align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
let phone = decryptCBC(d.phone);
|
let phone = decryptCBC(d.phone);
|
||||||
return maskSensitiveInfo(phone, "phone");
|
return maskSensitiveInfo(phone, "phone");
|
||||||
|
|
@ -120,9 +123,12 @@ function initTable() {
|
||||||
align: "center",
|
align: "center",
|
||||||
templet: (d) => {
|
templet: (d) => {
|
||||||
let text = "";
|
let text = "";
|
||||||
|
// 通过注册成功的班组,不可修改班长
|
||||||
|
if (auditStatus == null) {
|
||||||
text +=
|
text +=
|
||||||
'<a lay-event="edit" style="color: #009688;cursor: pointer;font-size: 15px"' +
|
'<a lay-event="edit" style="color: #009688;cursor: pointer;font-size: 15px"' +
|
||||||
' id="edit">编辑</a>';
|
' id="edit">编辑</a>';
|
||||||
|
}
|
||||||
if (d.isTeamLeader == '否') {
|
if (d.isTeamLeader == '否') {
|
||||||
text +=
|
text +=
|
||||||
'<a lay-event="del" style="color: #009688;cursor: pointer;font-size:' +
|
'<a lay-event="del" style="color: #009688;cursor: pointer;font-size:' +
|
||||||
|
|
@ -259,11 +265,13 @@ function initTable() {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 预览文件
|
// 预览文件
|
||||||
function openFaceUrlPage(id) {
|
function openFaceUrlPage(id) {
|
||||||
const filePath = ctxPath + "/statics/" + fileList.filter(item => item.id == id)[0].faceUrl
|
const filePath = ctxPath + "/statics/" + fileList.filter(item => item.id == id)[0].faceUrl
|
||||||
window.open(filePath)
|
window.open(filePath)
|
||||||
}
|
}
|
||||||
|
|
||||||
function addPerson() {
|
function addPerson() {
|
||||||
layer.open({
|
layer.open({
|
||||||
type: 2, // iframe 模式
|
type: 2, // iframe 模式
|
||||||
|
|
@ -285,6 +293,7 @@ function importTemplate() {
|
||||||
let token = localStorage.getItem("token");
|
let token = localStorage.getItem("token");
|
||||||
window.location.href = ctxPath + "/backstage/download?filename=班组人员导入模版.xls&token=" + token;
|
window.location.href = ctxPath + "/backstage/download?filename=班组人员导入模版.xls&token=" + token;
|
||||||
}
|
}
|
||||||
|
|
||||||
function importData() {
|
function importData() {
|
||||||
var formData = new FormData($('form')[0]);
|
var formData = new FormData($('form')[0]);
|
||||||
var name = $("#articleImageFile").val();
|
var name = $("#articleImageFile").val();
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -34,7 +34,7 @@
|
||||||
<script src="js/libs/jquery-2.1.1.min.js"></script>
|
<script src="js/libs/jquery-2.1.1.min.js"></script>
|
||||||
<script src="js/publicJs.js"></script>
|
<script src="js/publicJs.js"></script>
|
||||||
<script src="layui/layui.js"></script>
|
<script src="layui/layui.js"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js"></script>
|
<script src="layui/crypto-js.min.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
// if (top != self) {
|
// if (top != self) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue