提交代码

dev_xd
姜玉琦 2025-01-05 23:27:05 +08:00
parent 6cdfdf8da9
commit 757686d4fa
23 changed files with 535 additions and 345 deletions

View File

@ -31,7 +31,7 @@ public interface RemoteProService
public R<Map<String,Object>> info(@PathVariable("id") Long id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
/**
*
*
*
* @param busKey
* @param source
@ -39,4 +39,14 @@ public interface RemoteProService
*/
@GetMapping("/proProjectInfoSubdeptsUsers/approveSubDeptsUser/{busKey}")
public R<AjaxResult> approveSubDeptsUser(@PathVariable("busKey") Long busKey, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
/**
*
*
* @param data
* @param source
* @return
*/
@PostMapping("/proProjectInfoSubdeptsUsers/syspushSubDeptsUser")
public R<AjaxResult> syspushSubDeptsUser(Map<String, Object> data, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}

View File

@ -40,37 +40,17 @@ public class SysUser extends BaseEntity
@Excel(name = "登录名称")
private String userName;
/** 用户昵称 */
@Excel(name = "用户名称")
private String nickName;
/** 用户类型 */
@Excel(name = "用户类型")
private String userType;
/** 证件类型 */
@Excel(name = "证件类型")
private String cardType;
/** 证件号码 */
@Excel(name = "证件号码")
private String cardCode;
/** 用户肖像 */
@Excel(name = "用户肖像")
private String userPicture;
/** 证件正面 */
@Excel(name = "证件正面")
private String cardImgPos;
/** 证件反面 */
@Excel(name = "证件反面")
private String cardImgInv;
/** 用户详情 */
@Excel(name = "用户详情")
private String userInfos;
/** 用户昵称 */
@Excel(name = "用户名称")
private String nickName;
/** 用户邮箱 */
@Excel(name = "用户邮箱")
@ -105,16 +85,6 @@ public class SysUser extends BaseEntity
@Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT)
private Date loginDate;
private String admitGuid;
public String getAdmitGuid() {
return admitGuid;
}
public void setAdmitGuid(String admitGuid) {
this.admitGuid = admitGuid;
}
/** 部门对象 */
@Excels({
@Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT),
@ -232,54 +202,6 @@ public class SysUser extends BaseEntity
this.userType = userType;
}
public String getCardType() {
return cardType;
}
public void setCardType(String cardType) {
this.cardType = cardType;
}
public String getCardCode() {
return cardCode;
}
public void setCardCode(String cardCode) {
this.cardCode = cardCode;
}
public String getUserPicture() {
return userPicture;
}
public void setUserPicture(String userPicture) {
this.userPicture = userPicture;
}
public String getCardImgPos() {
return cardImgPos;
}
public void setCardImgPos(String cardImgPos) {
this.cardImgPos = cardImgPos;
}
public String getCardImgInv() {
return cardImgInv;
}
public void setCardImgInv(String cardImgInv) {
this.cardImgInv = cardImgInv;
}
public String getUserInfos() {
return userInfos;
}
public void setUserInfos(String userInfos) {
this.userInfos = userInfos;
}
@Email(message = "邮箱格式不正确")
@Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
public String getEmail()
@ -423,6 +345,14 @@ public class SysUser extends BaseEntity
this.roleId = roleId;
}
public String getCardCode() {
return cardCode;
}
public void setCardCode(String cardCode) {
this.cardCode = cardCode;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -432,12 +362,6 @@ public class SysUser extends BaseEntity
.append("userName", getUserName())
.append("nickName", getNickName())
.append("userType", getUserType())
.append("cardType", getCardType())
.append("cardCode", getCardCode())
.append("userPicture", getUserPicture())
.append("cardImgPos", getCardImgPos())
.append("cardImgInv", getCardImgInv())
.append("userInfos", getUserInfos())
.append("email", getEmail())
.append("phonenumber", getPhonenumber())
.append("sex", getSex())

View File

@ -38,6 +38,13 @@ public class RemoteProFallbackFactory implements FallbackFactory<RemoteProServic
{
return R.fail("审批通过信息同步失败:" + throwable.getMessage());
}
@Override
public R<AjaxResult> syspushSubDeptsUser(Map<String, Object> data, String source)
{
return R.fail("项目系统人员同步失败:" + throwable.getMessage());
}
};
}
}

View File

@ -11,15 +11,15 @@ public enum UserTypeEnums {
FBXMJL("79", "分包项目经理","fbxmjl"),
FBBZZZ("78", "分包班组组长","fbbzzz"),
FBLWRY("77", "分包劳务人员","key"),
JSDWRY("69", "建设单位人员","jsdw"),
JLDWRY("68", "监理单位人员","jldw"),
SGDWRY("67", "施工单位人员","sgdw"),
CLFBRY("66", "材料分包人员","clfb"),
HQFBRY("65", "后勤分包人员","hqfb"),
TSSBRY("64", "特殊设备人员","tssb"),
KTDWRY("63", "勘探单位人员","ktdw"),
SJDWRY("62", "设计单位人员","sjdw"),
OTHER("59", "其它单位人员","other");
JSDWRY("66", "建设单位人员","jsdw"),
JLDWRY("81", "监理单位人员","jldw"),
SGDWRY("82", "施工单位人员","sgdw"),
CLFBRY("83", "材料分包人员","clfb"),
HQFBRY("84", "后勤分包人员","hqfb"),
TSSBRY("85", "特殊设备人员","tssb"),
KTDWRY("86", "勘探单位人员","ktdw"),
SJDWRY("87", "设计单位人员","sjdw"),
OTHERS("88", "其它单位人员","other");
private final String code;
private final String info;

View File

@ -11,13 +11,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="deptId" column="dept_id" />
<result property="userName" column="user_name" />
<result property="nickName" column="nick_name" />
<result property="userType" column="user_type" />
<result property="cardType" column="card_type" />
<result property="cardCode" column="card_code" />
<result property="userPicture" column="user_picture" />
<result property="cardImgPos" column="card_img_pos" />
<result property="cardImgInv" column="card_img_inv" />
<result property="userInfos" column="user_infos" />
<result property="userType" column="user_type" />
<result property="cardCode" column="card_code" />
<result property="email" column="email" />
<result property="phonenumber" column="phonenumber" />
<result property="sex" column="sex" />
@ -32,7 +27,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="admitGuid" column="admitGuid"/>
<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult" />
<association property="comp" column="com_id" javaType="SysDept" resultMap="compResult" />
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
@ -66,9 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectUserVo">
select u.user_id, u.com_id, com.dept_name as com_name, u.dept_id, u.user_name, u.nick_name, u.user_type, u.card_type,
u.admitGuid,
u.card_code, u.user_picture, u.card_img_pos, u.card_img_inv, u.user_infos, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
select u.user_id, u.com_id, com.dept_name as com_name, u.dept_id, u.user_name, u.nick_name, u.user_type, u.card_code, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.dept_short_name, d.dept_code, d.dept_type, d.order_num, d.leader, d.status as dept_status,
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,com.dept_name com_dept_name
from sys_user u
@ -79,9 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
select u.user_id, u.com_id, u.dept_id, u.nick_name, u.user_name, u.user_type, u.card_type,
u.admitGuid,
u.card_code, u.user_picture, u.card_img_pos, u.card_img_inv, u.user_infos, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
select u.user_id, u.com_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
where u.del_flag = '0'
<if test="userId != null and userId != 0">
@ -90,18 +80,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userName != null and userName != ''">
AND u.user_name like concat('%', #{userName}, '%')
</if>
<if test="admitGuid != null and admitGuid != ''">
AND u.admitGuid =#{admitGuid}
</if>
<if test="userName != null and userName != ''">
AND u.user_name like concat('%', #{userName}, '%')
</if>
<if test="nickName != null and nickName != ''">
AND u.nick_name = #{nickName}
</if>
<if test="cardCode != null and cardCode != ''">
AND u.card_code like concat('%', #{cardCode}, '%')
</if>
<if test="status != null and status != ''">
AND u.status = #{status}
</if>
@ -122,8 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
select distinct u.user_id, u.com_id, u.dept_id, u.user_name, u.nick_name,u.admitGuid,
u.user_type, u.card_type, u.card_code, u.email, u.phonenumber, u.status, u.create_time
select distinct u.user_id, u.com_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id
@ -140,8 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
select distinct u.user_id, u.com_id, u.dept_id, u.user_name, u.nick_name, u.user_type,u.admitGuid,
u.card_type, u.card_code, u.email, u.phonenumber, u.status, u.create_time
select distinct u.user_id, u.com_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id
@ -203,18 +185,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userName != null and userName != ''">user_name,</if>
<if test="nickName != null and nickName != ''">nick_name,</if>
<if test="userType != null and userType != ''">user_type,</if>
<if test="cardType != null and cardType != ''">card_type,</if>
<if test="cardCode != null and cardCode != ''">card_code,</if>
<if test="userPicture != null and userPicture != ''">user_picture,</if>
<if test="cardImgPos != null and cardImgPos != ''">card_img_pos,</if>
<if test="cardImgInv != null and cardImgInv != ''">card_img_inv,</if>
<if test="userInfos != null and userInfos != ''">user_infos,</if>
<if test="email != null and email != ''">email,</if>
<if test="avatar != null and avatar != ''">avatar,</if>
<if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
<if test="sex != null and sex != ''">sex,</if>
<if test="password != null and password != ''">password,</if>
<if test="admitGuid != null and admitGuid != ''">admitGuid,</if>
<if test="status != null and status != ''">status,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="remark != null and remark != ''">remark,</if>
@ -225,18 +201,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userName != null and userName != ''">#{userName},</if>
<if test="nickName != null and nickName != ''">#{nickName},</if>
<if test="userType != null and userType != ''">#{userType},</if>
<if test="cardType != null and cardType != ''">#{cardType},</if>
<if test="cardCode != null and cardCode != ''">#{cardCode},</if>
<if test="userPicture != null and userPicture != ''">#{userPicture},</if>
<if test="cardImgPos != null and cardImgPos != ''">#{cardImgPos},</if>
<if test="cardImgInv != null and cardImgInv != ''">#{cardImgInv},</if>
<if test="userInfos != null and userInfos != ''">#{userInfos},</if>
<if test="email != null and email != ''">#{email},</if>
<if test="avatar != null and avatar != ''">#{avatar},</if>
<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
<if test="sex != null and sex != ''">#{sex},</if>
<if test="password != null and password != ''">#{password},</if>
<if test="admitGuid != null and admitGuid != ''">#{admitGuid},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="remark != null and remark != ''">#{remark},</if>
@ -251,19 +221,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
<if test="userName != null and userName != ''">user_name = #{userName},</if>
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
<if test="userType != null and userType != ''">user_type = #{userType},</if>
<if test="cardType != null and cardType != ''">card_type = #{cardType},</if>
<if test="cardCode != null and cardCode != ''">card_code = #{cardCode},</if>
<if test="userPicture != null and userPicture != ''">user_picture = #{userPicture},</if>
<if test="cardImgPos != null and cardImgPos != ''">card_img_pos = #{cardImgPos},</if>
<if test="cardImgInv != null and cardImgInv != ''">card_img_inv = #{cardImgInv},</if>
<if test="userInfos != null and userInfos != ''">user_infos = #{userInfos},</if>
<if test="email != null ">email = #{email},</if>
<if test="userType != null ">userType = #{userType},</if>
<if test="cardCode != null ">cardCode = #{cardCode},</if>
<if test="email != null ">email = #{email},</if>
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
<if test="sex != null and sex != ''">sex = #{sex},</if>
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
<if test="password != null and password != ''">password = #{password},</if>
<if test="admitGuid != null and admitGuid != ''">admitGuid = #{admitGuid},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
<if test="loginDate != null">login_date = #{loginDate},</if>

View File

@ -147,6 +147,18 @@ public class ProProjectInfoSubdeptsUsersController extends BaseController
return success();
}
/**
*
*/
@InnerAuth
@PostMapping("/syspushSubDeptsUser")
public AjaxResult syspushSubDeptsUser(@RequestBody ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers)
{
proProjectInfoSubdeptsUsersService.pushSubdeptsUsers(proProjectInfoSubdeptsUsers);
return success();
}
/**
*
* @param ids

View File

@ -8,7 +8,16 @@ public enum UserPostEnums {
WTDL("1", "委托代理"),
XMJL("2", "项目经理"),
BZZ("3", "班组长"),
LWGR("4", "劳务工人");
LWGR("4", "劳务工人"),
JSDWGL("66", "建设单位管理"),
JLDWGL("71", "监理单位管理"),
SGDWGL("72", "施工单位管理"),
CLFBGL("73", "材料分包管理"),
HQFBGL("74", "后勤分包管理"),
TSSBGL("75", "特殊设备管理"),
KTDWGL("76", "勘探单位管理"),
SJDWGL("77", "设计单位管理"),
QTDWGL("78", "其它单位管理");
private final String code;
private final String info;

View File

@ -88,7 +88,6 @@ public interface IProProjectInfoSubdeptsUsersService
public int deleteProProjectInfoSubdeptsUsersById(Long id);
/**
<<<<<<< HEAD
*
* @param proId
* @param phoneNumber
@ -113,6 +112,14 @@ public interface IProProjectInfoSubdeptsUsersService
*/
public void approveSubDeptsUser(Long id);
/**
*
*
* @param proProjectInfoSubdeptsUsers
* @return
*/
public void pushSubdeptsUsers(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers);
/**
* --
* @param proProjectInfoSubdeptsUsers

View File

@ -148,7 +148,7 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
subdeptsUser.setCraftType(proProjectInfoSubdeptsGroup.getCraftType());
subdeptsUser.setCraftPost(proProjectInfoSubdeptsGroup.getCraftPost());
subdeptsUser.setEduStatus(ShiFouEnums.FOU.getCodeStr());
subdeptsUser.setSubStep(1L);
subdeptsUser.setSubStep(2L);
subdeptsUser.setUseStatus(UseStateEnums.IN.getCode());
subdeptsUser.setCreateBy(SecurityUtils.getUsername());
subdeptsUser.setApproveStatus(ApproveStatus.passed.getCode());
@ -254,7 +254,7 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
subdeptsUser.setCraftPost(proProjectInfoSubdeptsGroup.getCraftPost());
subdeptsUser.setDegreeGrade(proProjectInfoSubdeptsGroup.getGroupLeaderDegreeGrade());
subdeptsUser.setEduStatus(ShiFouEnums.FOU.getCodeStr());
subdeptsUser.setSubStep(1L);
subdeptsUser.setSubStep(2L);
subdeptsUser.setCreateBy(SecurityUtils.getUsername());
subdeptsUser.setApproveStatus(ApproveStatus.passed.getCode());
subdeptsUser.setCreateTime(DateUtils.getNowDate());

View File

@ -174,7 +174,7 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
subdeptsUser.setCraftType(CraftTypeEnums.GLRY.getCode());
subdeptsUser.setCraftPost(CraftPostEnums.WTDL.getCode());
subdeptsUser.setEduStatus(ShiFouEnums.FOU.getCodeStr());
subdeptsUser.setSubStep(1L);
subdeptsUser.setSubStep(2L);
subdeptsUser.setCreateBy(SecurityUtils.getUsername());
subdeptsUser.setApproveStatus(ApproveStatus.passed.getCode());
subdeptsUser.setCreateTime(DateUtils.getNowDate());
@ -224,6 +224,7 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
SysUser sysUser = new SysUser();
sysUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone());
sysUser.setNickName(proProjectInfoSubdepts.getSubDeptLeaderName());
sysUser.setUserType(UserTypeEnums.FBWTDL.getCode());
sysUser.setPhonenumber(proProjectInfoSubdepts.getSubDeptLeaderPhone());
sysUser.setUpdateBy(DataSourceEnuns.APP.getInfo());
sysUser.setUpdateTime(DateUtils.getNowDate());
@ -278,7 +279,7 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
subdeptsUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode());
subdeptsUser.setUserPhone(proProjectInfoSubdepts.getSubDeptLeaderPhone());
subdeptsUser.setUserPicture(proProjectInfoSubdepts.getLeaderUserPicture());
subdeptsUser.setUserSex(StringUtils.judgeGender(proProjectInfoSubdepts.getSubDeptLeaderCode()));
subdeptsUser.setUserSex(StringUtils.judgeGenderText(proProjectInfoSubdepts.getSubDeptLeaderCode()));
subdeptsUser.setDegreeGrade(proProjectInfoSubdepts.getLeaderDegreeGrade());
subdeptsUser.setUserInfos(proProjectInfoSubdepts.getLeaderUserInfos());
subdeptsUser.setCraftType(CraftTypeEnums.GLRY.getCode());

View File

@ -11,10 +11,7 @@ import com.yanzhu.common.core.utils.StringUtils;
import com.yanzhu.common.security.utils.SecurityUtils;
import com.yanzhu.manage.config.ProfileConfig;
import com.yanzhu.manage.domain.*;
import com.yanzhu.manage.enums.CraftPostEnums;
import com.yanzhu.manage.enums.CraftTypeEnums;
import com.yanzhu.manage.enums.SignetKeyEnums;
import com.yanzhu.manage.enums.UserPostEnums;
import com.yanzhu.manage.enums.*;
import com.yanzhu.manage.mapper.*;
import com.yanzhu.manage.service.IProProjectInfoSubdeptsUsersService;
import com.yanzhu.manage.service.IUniService;
@ -119,18 +116,10 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
@Override
public int insertProProjectInfoSubdeptsUsers(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers)
{
//判断工种岗位设置用户岗位...PC需要单独设置
if(Objects.equals(proProjectInfoSubdeptsUsers.getCraftPost(), CraftPostEnums.WTDL.getCode())){
proProjectInfoSubdeptsUsers.setUserPost(UserPostEnums.WTDL.getCode());
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getCraftPost(), CraftPostEnums.XMJL.getCode())){
proProjectInfoSubdeptsUsers.setUserPost(UserPostEnums.XMJL.getCode());
}else{
proProjectInfoSubdeptsUsers.setUserPost(UserPostEnums.LWGR.getCode());
}
proProjectInfoSubdeptsUsers.setUseStatus(UseStateEnums.IN.getCode());
proProjectInfoSubdeptsUsers.setCreateBy(SecurityUtils.getUsername());
proProjectInfoSubdeptsUsers.setCreateTime(DateUtils.getNowDate());
proProjectInfoSubdeptsUsers.setSubStep(1L);
proProjectInfoSubdeptsUsers.setSubStep(2L);
proProjectInfoSubdeptsUsers.setApproveStatus(ApproveStatus.passed.getCode());
SysUser sysUser = new SysUser();
@ -141,7 +130,51 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
sysUser.setUpdateTime(DateUtils.getNowDate());
sysUser.setComId(proProjectInfoSubdeptsUsers.getComId());
sysUser.setDeptId(proProjectInfoSubdeptsUsers.getProjectId());
sysUser.setUserType("xx");
String subDeptType = proProjectInfoSubdeptsUsers.getSubDeptType();
// 判断单位类型
if(Objects.nonNull(subDeptType)){
if(Objects.equals(SubDeptsEnums.JSDW.getCode(),subDeptType)){
sysUser.setUserType(UserTypeEnums.JSDWRY.getCode());
proProjectInfoSubdeptsUsers.setUserPost(UserPostEnums.JSDWGL.getCode());
}else if(Objects.equals(SubDeptsEnums.JLDW.getCode(),subDeptType)){
sysUser.setUserType(UserTypeEnums.JLDWRY.getCode());
proProjectInfoSubdeptsUsers.setUserPost(UserPostEnums.JLDWGL.getCode());
}else if(Objects.equals(SubDeptsEnums.SGDW.getCode(),subDeptType)){
sysUser.setUserType(UserTypeEnums.SGDWRY.getCode());
proProjectInfoSubdeptsUsers.setUserPost(UserPostEnums.SGDWGL.getCode());
}else if(Objects.equals(SubDeptsEnums.ZYFB.getCode(),subDeptType) || Objects.equals(SubDeptsEnums.LWFB.getCode(),subDeptType)){
//判断工种岗位设置用户岗位...PC需要单独设置
if(Objects.equals(proProjectInfoSubdeptsUsers.getCraftPost(), CraftPostEnums.WTDL.getCode())){
sysUser.setUserType(UserTypeEnums.FBWTDL.getCode());
proProjectInfoSubdeptsUsers.setUserPost(UserPostEnums.WTDL.getCode());
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getCraftPost(), CraftPostEnums.XMJL.getCode())){
sysUser.setUserType(UserTypeEnums.FBXMJL.getCode());
proProjectInfoSubdeptsUsers.setUserPost(UserPostEnums.XMJL.getCode());
}else{
sysUser.setUserType(UserTypeEnums.FBLWRY.getCode());
proProjectInfoSubdeptsUsers.setUserPost(UserPostEnums.LWGR.getCode());
}
}else if(Objects.equals(SubDeptsEnums.CLFB.getCode(),subDeptType)){
sysUser.setUserType(UserTypeEnums.CLFBRY.getCode());
proProjectInfoSubdeptsUsers.setUserPost(UserPostEnums.CLFBGL.getCode());
}else if(Objects.equals(SubDeptsEnums.HQFB.getCode(),subDeptType)){
sysUser.setUserType(UserTypeEnums.HQFBRY.getCode());
proProjectInfoSubdeptsUsers.setUserPost(UserPostEnums.HQFBGL.getCode());
}else if(Objects.equals(SubDeptsEnums.TSSB.getCode(),subDeptType)){
sysUser.setUserType(UserTypeEnums.TSSBRY.getCode());
proProjectInfoSubdeptsUsers.setUserPost(UserPostEnums.TSSBGL.getCode());
}else if(Objects.equals(SubDeptsEnums.KTDW.getCode(),subDeptType)){
sysUser.setUserType(UserTypeEnums.KTDWRY.getCode());
proProjectInfoSubdeptsUsers.setUserPost(UserPostEnums.KTDWGL.getCode());
}else if(Objects.equals(SubDeptsEnums.SJDW.getCode(),subDeptType)){
sysUser.setUserType(UserTypeEnums.SJDWRY.getCode());
proProjectInfoSubdeptsUsers.setUserPost(UserPostEnums.SJDWGL.getCode());
}else if(Objects.equals(SubDeptsEnums.QTDW.getCode(),subDeptType)){
sysUser.setUserType(UserTypeEnums.OTHERS.getCode());
proProjectInfoSubdeptsUsers.setUserPost(UserPostEnums.QTDWGL.getCode());
}
}
sysUser.setActiveProjectId(proProjectInfoSubdeptsUsers.getProjectId());
R<Long> obj= remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
Long userId= obj.getData();
@ -149,7 +182,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
proProjectInfoSubdeptsUsers.setUserId(userId);
int res = proProjectInfoSubdeptsUsersMapper.insertProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
uniService.syncUniUser(proProjectInfoSubdeptsUsers);
if(res>0 && Objects.nonNull(proProjectInfoSubdeptsUsers.getUserPost())){
if(res>0 && (Objects.equals(SubDeptsEnums.ZYFB.getCode(),subDeptType) || Objects.equals(SubDeptsEnums.LWFB.getCode(),subDeptType)) && Objects.nonNull(proProjectInfoSubdeptsUsers.getUserPost())){
// 生成二维码
try {
String accessToken = wxMaService.getAccessToken();
@ -174,6 +207,71 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
return res;
}
/**
*
*
* @param proProjectInfoSubdeptsUsers
* @return
*/
@Override
public void pushSubdeptsUsers(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers)
{
// 查询用户是否存在...
ProProjectInfoSubdeptsUsers userQuery = new ProProjectInfoSubdeptsUsers();
userQuery.setUserId(proProjectInfoSubdeptsUsers.getUserId());
userQuery.setProjectId(proProjectInfoSubdeptsUsers.getProjectId());
List<ProProjectInfoSubdeptsUsers> users = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(userQuery);
if(StringUtils.isEmpty(users)){
proProjectInfoSubdeptsUsers.setUserPost(UserPostEnums.JSDWGL.getCode());
proProjectInfoSubdeptsUsers.setUseStatus(UseStateEnums.IN.getCode());
proProjectInfoSubdeptsUsers.setCreateBy(SecurityUtils.getUsername());
proProjectInfoSubdeptsUsers.setCreateTime(DateUtils.getNowDate());
proProjectInfoSubdeptsUsers.setSubStep(2L);
proProjectInfoSubdeptsUsers.setApproveStatus(ApproveStatus.passed.getCode());
proProjectInfoSubdeptsUsers.setUserPost(UserPostEnums.JSDWGL.getCode());
//查询管理班组
ProProjectInfoSubdeptsGroup query = new ProProjectInfoSubdeptsGroup();
query.setProjectId(proProjectInfoSubdeptsUsers.getProjectId());
query.setSubDeptId(proProjectInfoSubdeptsUsers.getId());
query.setGroupCode(DeptGroupEnums.MANAGE.getCode());
List<ProProjectInfoSubdeptsGroup> groups = proProjectInfoSubdeptsGroupMapper.selectProProjectInfoSubdeptsGroupList(query);
ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup;
if(StringUtils.isNotEmpty(groups)){
proProjectInfoSubdeptsGroup = groups.get(0);
}else{
proProjectInfoSubdeptsGroup = new ProProjectInfoSubdeptsGroup();
proProjectInfoSubdeptsGroup.setComId(proProjectInfoSubdeptsUsers.getComId());
proProjectInfoSubdeptsGroup.setProjectId(proProjectInfoSubdeptsUsers.getProjectId());
proProjectInfoSubdeptsGroup.setSubDeptId(proProjectInfoSubdeptsUsers.getId());
proProjectInfoSubdeptsGroup.setSubDeptType(proProjectInfoSubdeptsUsers.getSubDeptType());
proProjectInfoSubdeptsGroup.setSubDeptName(proProjectInfoSubdeptsUsers.getSubDeptName());
proProjectInfoSubdeptsGroup.setGroupName(DeptGroupEnums.MANAGE.getInfo());
proProjectInfoSubdeptsGroup.setGroupCode(DeptGroupEnums.MANAGE.getCode());
proProjectInfoSubdeptsGroup.setCraftType(CraftTypeEnums.GLRY.getCode());
proProjectInfoSubdeptsGroup.setApproveStatus(proProjectInfoSubdeptsUsers.getApproveStatus());
proProjectInfoSubdeptsGroup.setUseStatus(proProjectInfoSubdeptsUsers.getUseStatus());
proProjectInfoSubdeptsGroup.setCreateBy(SecurityUtils.getUsername());
proProjectInfoSubdeptsGroup.setCreateTime(DateUtils.getNowDate());
proProjectInfoSubdeptsGroupMapper.insertProProjectInfoSubdeptsGroup(proProjectInfoSubdeptsGroup);
}
proProjectInfoSubdeptsUsers.setSubDeptGroup(proProjectInfoSubdeptsGroup.getId());
proProjectInfoSubdeptsUsers.setSubDeptGroupName(proProjectInfoSubdeptsGroup.getGroupName());
proProjectInfoSubdeptsUsersMapper.insertProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
uniService.syncUniUser(proProjectInfoSubdeptsUsers);
}else {
ProProjectInfoSubdeptsUsers deptUser = users.get(0);
deptUser.setUserName(proProjectInfoSubdeptsUsers.getUserName());
deptUser.setUserPhone(proProjectInfoSubdeptsUsers.getUserPhone());
deptUser.setCardCode(proProjectInfoSubdeptsUsers.getCardCode());
deptUser.setUserPicture(proProjectInfoSubdeptsUsers.getUserPicture());
deptUser.setUpdateBy(SecurityUtils.getUsername());
deptUser.setUpdateTime(DateUtils.getNowDate());
proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(deptUser);
uniService.syncUniUser(deptUser);
}
}
/**
*
*
@ -193,15 +291,36 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
proProjectInfoSubdeptsUsers.setSubDeptId(parUsers.getSubDeptId());
proProjectInfoSubdeptsUsers.setSubDeptName(parUsers.getSubDeptName());
proProjectInfoSubdeptsUsers.setSubDeptType(parUsers.getSubDeptType());
proProjectInfoSubdeptsUsers.setCardType(CardTypeEnums.SFZ.getCode());
proProjectInfoSubdeptsUsers.setUserSex(StringUtils.judgeGenderText(proProjectInfoSubdeptsUsers.getCardCode()));
proProjectInfoSubdeptsUsers.setUseStatus(UseStateEnums.AW.getCode());
proProjectInfoSubdeptsUsers.setCreateBy(DataSourceEnuns.APP.getInfo());
proProjectInfoSubdeptsUsers.setCreateTime(DateUtils.getNowDate());
proProjectInfoSubdeptsUsers.setSubStep(1L);
proProjectInfoSubdeptsUsers.setApproveStatus(ApproveStatus.await.getCode());
// 完善人员信息...
SysUser sysUser = new SysUser();
// 班组信息处理
if(Objects.nonNull(proProjectInfoSubdeptsUsers.getUserPost())){
// 班组长新增班组
if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(), UserPostEnums.BZZ.getCode())){
if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(), UserPostEnums.XMJL.getCode())){
//查询管理班组
ProProjectInfoSubdeptsGroup query = new ProProjectInfoSubdeptsGroup();
query.setProjectId(parUsers.getProjectId());
query.setSubDeptId(parUsers.getSubDeptId());
query.setGroupCode(DeptGroupEnums.MANAGE.getCode());
List<ProProjectInfoSubdeptsGroup> groups = proProjectInfoSubdeptsGroupMapper.selectProProjectInfoSubdeptsGroupList(query);
if(Objects.nonNull(groups) && groups.size()>0){
proProjectInfoSubdeptsUsers.setSubDeptGroup(groups.get(0).getId());
proProjectInfoSubdeptsUsers.setSubDeptGroupName(groups.get(0).getGroupName());
}
proProjectInfoSubdeptsUsers.setCraftType(CraftTypeEnums.GLRY.getCode());
proProjectInfoSubdeptsUsers.setCraftPost(CraftPostEnums.XMJL.getCode());
sysUser.setUserType(UserTypeEnums.FBXMJL.getCode());
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(), UserPostEnums.BZZ.getCode())){
// 班组长新增班组
ProProjectInfoSubdeptsGroup query = new ProProjectInfoSubdeptsGroup();
query.setProjectId(proProjectInfoSubdeptsUsers.getProjectId());
query.setSubDeptId(proProjectInfoSubdeptsUsers.getSubDeptId());
@ -229,14 +348,17 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
proProjectInfoSubdeptsGroupMapper.insertProProjectInfoSubdeptsGroup(proSubdeptsGroup);
proProjectInfoSubdeptsUsers.setSubDeptGroup(proSubdeptsGroup.getId());
proProjectInfoSubdeptsUsers.setSubDeptGroupName(proSubdeptsGroup.getGroupName());
sysUser.setUserType(UserTypeEnums.FBBZZZ.getCode());
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(), UserPostEnums.LWGR.getCode())){
// 劳务人员绑定班组信息
proProjectInfoSubdeptsUsers.setSubDeptGroup(parUsers.getSubDeptGroup());
proProjectInfoSubdeptsUsers.setSubDeptGroupName(parUsers.getSubDeptGroupName());
sysUser.setUserType(UserTypeEnums.FBLWRY.getCode());
}
}
// 完善人员信息...
SysUser sysUser = new SysUser();
sysUser.setUserName(proProjectInfoSubdeptsUsers.getUserPhone());
sysUser.setNickName(proProjectInfoSubdeptsUsers.getUserName());
sysUser.setPhonenumber(proProjectInfoSubdeptsUsers.getUserPhone());
@ -300,10 +422,28 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
if(Objects.isNull(proProjectInfoSubdeptsUsers.getApproveStatus())){
proProjectInfoSubdeptsUsers.setApproveStatus(ApproveStatus.await.getCode());
}
// 完善人员信息...
SysUser sysUser = new SysUser();
// 班组信息处理
if(Objects.nonNull(proProjectInfoSubdeptsUsers.getUserPost())){
// 班组长新增班组
if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(), UserPostEnums.BZZ.getCode())){
if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(), UserPostEnums.XMJL.getCode())){
//查询管理班组
ProProjectInfoSubdeptsGroup query = new ProProjectInfoSubdeptsGroup();
query.setProjectId(parUsers.getProjectId());
query.setSubDeptId(parUsers.getSubDeptId());
query.setGroupCode(DeptGroupEnums.MANAGE.getCode());
List<ProProjectInfoSubdeptsGroup> groups = proProjectInfoSubdeptsGroupMapper.selectProProjectInfoSubdeptsGroupList(query);
if(Objects.nonNull(groups) && groups.size()>0){
proProjectInfoSubdeptsUsers.setSubDeptGroup(groups.get(0).getId());
proProjectInfoSubdeptsUsers.setSubDeptGroupName(groups.get(0).getGroupName());
}
proProjectInfoSubdeptsUsers.setCraftType(CraftTypeEnums.GLRY.getCode());
proProjectInfoSubdeptsUsers.setCraftPost(CraftPostEnums.XMJL.getCode());
sysUser.setUserType(UserTypeEnums.FBXMJL.getCode());
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(), UserPostEnums.BZZ.getCode())){
ProProjectInfoSubdeptsGroup query = new ProProjectInfoSubdeptsGroup();
query.setProjectId(proProjectInfoSubdeptsUsers.getProjectId());
query.setSubDeptId(proProjectInfoSubdeptsUsers.getSubDeptId());
@ -373,12 +513,22 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
proProjectInfoSubdeptsUsers.setSubDeptGroup(proSubdeptsGroup.getId());
proProjectInfoSubdeptsUsers.setSubDeptGroupName(proSubdeptsGroup.getGroupName());
}
sysUser.setUserType(UserTypeEnums.FBBZZZ.getCode());
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(), UserPostEnums.LWGR.getCode())){
// 劳务人员绑定班组信息
proProjectInfoSubdeptsUsers.setSubDeptGroup(parUsers.getSubDeptGroup());
proProjectInfoSubdeptsUsers.setSubDeptGroupName(parUsers.getSubDeptGroupName());
sysUser.setUserType(UserTypeEnums.FBLWRY.getCode());
}
}
sysUser.setUserName(proProjectInfoSubdeptsUsers.getUserPhone());
sysUser.setNickName(proProjectInfoSubdeptsUsers.getUserName());
sysUser.setPhonenumber(proProjectInfoSubdeptsUsers.getUserPhone());
sysUser.setUpdateBy(SecurityUtils.getUsername());
sysUser.setUpdateTime(DateUtils.getNowDate());
sysUser.setRemark(proProjectInfoSubdeptsUsers.getSubDeptName());
sysUser.setActiveProjectId(proProjectInfoSubdeptsUsers.getProjectId());
remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
return proProjectInfoSubdeptsUsers;
@ -625,7 +775,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
private Map<String, Object> getUserDataMap(ProProjectInfoSubdeptsUsers proSubdeptsUser,String signPath){
Map<String, Object> dataMap = new HashMap<>();
dataMap.put("fName",proSubdeptsUser.getUserName());
dataMap.put("fSex",StringUtils.judgeGenderText(proSubdeptsUser.getCardCode()));
dataMap.put("fSex",proSubdeptsUser.getUserSex());
dataMap.put("fAge",StringUtils.getAgeFromIdCard(proSubdeptsUser.getCardCode()));
dataMap.put("fCode",proSubdeptsUser.getCardCode());
dataMap.put("fIllnessStatus",Objects.equals(ShiFouEnums.FOU.getCode(),proSubdeptsUser.getIllnessStatus())?"无":"有");

View File

@ -1,15 +1,15 @@
package com.yanzhu.system.service.impl;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.*;
import java.util.stream.Collectors;
import javax.validation.Validator;
import com.yanzhu.common.core.constant.SecurityConstants;
import com.yanzhu.common.core.enums.ShiFouEnums;
import com.yanzhu.common.core.enums.UserTypeEnums;
import com.yanzhu.common.core.utils.DateUtils;
import com.yanzhu.system.api.RemoteProService;
import com.yanzhu.system.api.RemoteUserService;
import com.yanzhu.system.api.domain.SysDept;
import com.yanzhu.system.api.domain.SysRoleDept;
import com.yanzhu.system.domain.SysPost;
@ -72,6 +72,9 @@ public class SysUserServiceImpl implements ISysUserService
@Autowired
private SysRoleDeptMapper roleDeptMapper;
@Autowired
private RemoteProService remoteProService;
@Autowired
protected Validator validator;
@ -317,9 +320,44 @@ public class SysUserServiceImpl implements ISysUserService
insertUserPost(user);
// 新增用户与角色管理
insertUserRole(user);
try {
if(Objects.equals(user.getUserType(),"99")){
// 根据单位递归查询项目信息
SysDept sysDept = deptMapper.selectDeptById(user.getDeptId());
// 是项目单位时,将人员信息加入到花名册
if(StringUtils.isNotEmpty(sysDept.getDeptType()) && Objects.equals(sysDept.getDeptType(),"4")){
Map<String, Object> data = packageSubDeptUsers(user,sysDept);
remoteProService.syspushSubDeptsUser(data, SecurityConstants.INNER);
}
}
}catch (Exception e){
e.printStackTrace();
}
return rows;
}
/**
*
* @param user
* @return
*/
private Map<String, Object> packageSubDeptUsers(SysUser user,SysDept dept){
Map<String, Object> data = new HashMap<>();
data.put("comId",dept.getComId());
data.put("projectId",dept.getDeptId());
data.put("subDeptId",dept.getDeptId());
data.put("subDeptType","1");
data.put("subDeptName",dept.getDeptName());
data.put("userId",user.getUserId());
data.put("userName",user.getNickName());
data.put("cardType","1");
data.put("cardCode",user.getCardCode());
data.put("userSex",StringUtils.judgeGenderText(user.getCardCode()));
data.put("userPicture",user.getAvatar());
data.put("userPhone",user.getPhonenumber());
return data;
}
/**
*
*
@ -329,11 +367,20 @@ public class SysUserServiceImpl implements ISysUserService
@Override
public Long registerUser(SysUser user)
{
SysUser info = userMapper.checkUserNameUnique(user.getUserName());
if(Objects.nonNull(info)){
user.setUserId(info.getUserId());
userMapper.updateUser(user);
SysUser sysUser = userMapper.checkUserNameUnique(user.getUserName());
if(Objects.nonNull(sysUser)){
user.setUserId(sysUser.getUserId());
sysUser.setUserName(user.getUserName());
sysUser.setPhonenumber(user.getUserName());
sysUser.setNickName(user.getNickName());
sysUser.setUpdateBy(user.getUpdateBy());
sysUser.setUpdateTime(user.getUpdateTime());
sysUser.setPassword(user.getPassword());
userMapper.updateUser(sysUser);
}else{
user.setCreateBy(user.getUpdateBy());
user.setCreateTime(user.getUpdateTime());
user.setUserType("99");
userMapper.insertUser(user);
}
Long userId = user.getUserId();
@ -344,7 +391,6 @@ public class SysUserServiceImpl implements ISysUserService
userRole.setUserId(userId);
userRole.setDeptId(user.getActiveProjectId());
userRoleMapper.deleteUserRoleByUserRole(userRole);
if(Objects.equals(user.getUserType(), UserTypeEnums.FBWTDL.getCode())){
List<SysRole> list = roleMapper.findDeptRoleListByDeptIdAndKey(user.getActiveProjectId(),UserTypeEnums.FBWTDL.getKeys()+"_"+user.getActiveProjectId());
if(StringUtils.isEmpty(list)){
@ -378,6 +424,24 @@ public class SysUserServiceImpl implements ISysUserService
}
sysUserRoleList.add(userRole);
userRoleMapper.batchUserRole(sysUserRoleList);
}else if(Objects.equals(user.getUserType(), UserTypeEnums.JSDWRY.getCode())){
}else if(Objects.equals(user.getUserType(), UserTypeEnums.JLDWRY.getCode())){
}else if(Objects.equals(user.getUserType(), UserTypeEnums.SGDWRY.getCode())){
}else if(Objects.equals(user.getUserType(), UserTypeEnums.CLFBRY.getCode())){
}else if(Objects.equals(user.getUserType(), UserTypeEnums.HQFBRY.getCode())){
}else if(Objects.equals(user.getUserType(), UserTypeEnums.TSSBRY.getCode())){
}else if(Objects.equals(user.getUserType(), UserTypeEnums.KTDWRY.getCode())){
}else if(Objects.equals(user.getUserType(), UserTypeEnums.SJDWRY.getCode())){
}else if(Objects.equals(user.getUserType(), UserTypeEnums.OTHERS.getCode())){
}
}
return userId;
@ -453,6 +517,19 @@ public class SysUserServiceImpl implements ISysUserService
throw new ServiceException("所属单位选择异常,必须选择子公司及下属单位");
}
user.setComId(dept.getComId());
try {
if(Objects.equals(user.getUserType(),"99")){
// 根据单位递归查询项目信息
SysDept sysDept = deptMapper.selectDeptById(user.getDeptId());
// 是项目单位时,将人员信息加入到花名册
if(StringUtils.isNotEmpty(sysDept.getDeptType()) && Objects.equals(sysDept.getDeptType(),"4")){
Map<String, Object> data = packageSubDeptUsers(user,sysDept);
remoteProService.syspushSubDeptsUser(data, SecurityConstants.INNER);
}
}
}catch (Exception e){
e.printStackTrace();
}
return userMapper.updateUser(user);
}

View File

@ -26,6 +26,7 @@ import {
App({
globalData: {
userData: null,
useProData: null,
subDeptUserData: null,
useProjectId: '',
useProjectName: '',

View File

@ -144,28 +144,10 @@ Page({
});
//项目基本信息
this.getProjectInfo(app.globalData.useProjectId);
//用户项目信息
this.getProSubDeptsUserInfo(app.globalData.useProjectId);
//项目单位信息
//this.getProjectDepts(app.globalData.useProjectId);
//劳务人员信息
if (app.globalData.userData.userType != '77') {
//统计劳务人员信息
this.getSubDeptsUsers(app.globalData.useProjectId);
this.initSubDeptDaysCharts(app.globalData.useProjectId);
this.awaitTask();
}
//今日出勤信息
if (app.globalData.userData.userType != '80' && app.globalData.userData.userType != '79' && app.globalData.userData.userType != '78' && app.globalData.userData.userType != '77') {
this.getSubDeptsAttendanceView(app.globalData.useProjectId);
}
//人员出勤信息
if (app.globalData.userData.userType == '77') {
//统计劳务人员信息
this.getUsersAttendanceView(app.globalData.useProjectId);
}
//初始化二维码
if (app.globalData.userData.userType == '80' || app.globalData.userData.userType == '79' || app.globalData.userData.userType == '78') {
this.getProSubDeptsUserInfo(app.globalData.useProjectId);
}
this.getProjectDepts(app.globalData.useProjectId);
} else {
console.log("未查询到Token...{}...准备重新登录")
wx.redirectTo({
@ -373,6 +355,22 @@ Page({
this.setData({
subDeptUserInfo: res.data[0]
});
//劳务人员信息
if ((app.globalData.subDeptUserData.subDeptType=='1' || app.globalData.subDeptUserData.subDeptType=='4' || app.globalData.subDeptUserData.subDeptType=='5') && app.globalData.subDeptUserData.userPost != '4') {
//统计劳务人员信息
this.getSubDeptsUsers(app.globalData.useProjectId);
this.initSubDeptDaysCharts(app.globalData.useProjectId);
this.awaitTask();
}
//今日出勤信息
if (app.globalData.subDeptUserData.subDeptType=='1') {
this.getSubDeptsAttendanceView(app.globalData.useProjectId);
}
//人员出勤信息
if (app.globalData.subDeptUserData.userPost == '4') {
//统计劳务人员信息
this.getUsersAttendanceView(app.globalData.useProjectId);
}
});
},

View File

@ -49,21 +49,21 @@
<view>
<image src="/images/s_7.png"></image>计划竣工日期:<text>{{projectInfo.plannedCompletionTime}}</text>
</view>
<view wx:if="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78' && userData.userType!='77'}}">
<view wx:if="{{subDeptUserInfo.subDeptType=='1'}}">
<image src="/images/s_8.png"></image>总工期:<text>{{projectInfo.projectTimeLimit + ' 天'}}</text>
</view>
<view wx:if="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78' && userData.userType!='77'}}">
<view wx:if="{{subDeptUserInfo.subDeptType=='1'}}">
<image src="/images/s_10.png"></image>项目负责人:<text>{{projectInfo.projectPerson}}</text>
</view>
<view wx:if="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78' && userData.userType!='77'}}">
<view wx:if="{{subDeptUserInfo.subDeptType=='1'}}">
<image src="/images/s_11.png"></image>负责人手机号:<text>{{projectInfo.projectPersonPhone}}</text>
</view>
<view wx:if="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78' && userData.userType!='77'}}">
<view wx:if="{{subDeptUserInfo.subDeptType=='1'}}">
<image src="/images/s_15.png"></image>项目概述:<text>{{projectInfo.projectSummarize}}</text>
</view>
</view>
</van-collapse-item>
<van-collapse-item wx:if="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78' && userData.userType!='77'}}" title="建设及管理单位信息" name="dept">
<van-collapse-item wx:if="{{subDeptUserInfo.subDeptType=='1'}}" title="建设及管理单位信息" name="dept">
<view class="construction_unit" wx:for="{{projectDeptsList}}" wx:key="unique">
<view class="construction_unit_image">
<image src="{{item.iconSrc}}"></image>
@ -78,7 +78,7 @@
</van-collapse>
</view>
<view class="echarts_max" wx:if="{{userData.userType=='80' || userData.userType=='79' || userData.userType=='78'}}">
<view class="echarts_max" wx:if="{{(subDeptUserInfo.subDeptType=='1' || subDeptUserInfo.subDeptType=='4' || subDeptUserInfo.subDeptType=='5') && subDeptUserInfo.userPost!='4'}}">
<view class="echarts_min">
<view class="eharts_title module_title_flex">
劳务人员
@ -114,7 +114,7 @@
</view>
</view>
<view class="echarts_max" wx:if="{{userData.userType=='80' || userData.userType=='79' || userData.userType=='78'}}">
<view class="echarts_max" wx:if="{{(subDeptUserInfo.subDeptType=='1' || subDeptUserInfo.subDeptType=='4' || subDeptUserInfo.subDeptType=='5') && subDeptUserInfo.userPost!='4'}}">
<view class="echarts_min">
<view class="eharts_title module_title_flex">
今日出勤
@ -143,8 +143,7 @@
</view>
</view>
</view>
{{subDeptUserInfo.qrCode+'------------------'}}
<view class="echarts_max bt30" wx:if="{{userData.userType=='80' || userData.userType=='79' || userData.userType=='78'}}">
<view class="echarts_max bt30" wx:if="{{(subDeptUserInfo.subDeptType=='4' || subDeptUserInfo.subDeptType=='5') && subDeptUserInfo.userPost!='4'}}">
<view class="echarts_min">
<view class="eharts_title module_title_flex">
我的二维码
@ -155,16 +154,16 @@
<image src="{{imgBaseUrl+subDeptUserInfo.qrCode}}"></image>
</van-col>
<van-col span="14">
<view wx:if="{{userData.userType=='80'}}" class="qrtext"><text class="zz">项目经理 </text>扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。</view>
<view wx:if="{{userData.userType=='79'}}" class="qrtext"><text class="zz">班组组长 </text>扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。</view>
<view wx:if="{{userData.userType=='78'}}" class="qrtext"><text class="zz">劳务人员 </text>扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。</view>
<view wx:if="{{subDeptUserInfo.userPost=='1'}}" class="qrtext"><text class="zz">项目经理 </text>扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。</view>
<view wx:if="{{subDeptUserInfo.userPost=='2'}}" class="qrtext"><text class="zz">班组组长 </text>扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。</view>
<view wx:if="{{subDeptUserInfo.userPost=='3'}}" class="qrtext"><text class="zz">劳务人员 </text>扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。</view>
</van-col>
</van-row>
</view>
</view>
</view>
<view class="echarts_max" wx:if="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78' && userData.userType!='77'}}">
<view class="echarts_max" wx:if="{{subDeptUserInfo.subDeptType=='1'}}">
<view class="echarts_min">
<view class="eharts_title module_title_flex">
最近出勤
@ -178,7 +177,7 @@
</view>
</view>
<view class="echarts_max" wx:if="{{userData.userType=='77'}}">
<view class="echarts_max" wx:if="{{subDeptUserInfo.userPost=='4'}}">
<view class="echarts_min">
<view class="eharts_title module_title_flex">
最近出勤
@ -236,28 +235,28 @@
</view>
<!-- 底部导航 -->
<van-tabbar wx:if="{{userData.userType!='77'}}" active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6">
<van-tabbar wx:if="{{subDeptUserInfo.userPost!='4'}}" active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6">
<van-tabbar-item>
<image slot="icon" src="/images/footer_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
项目概况
</van-tabbar-item>
<van-tabbar-item wx:if="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78' && userData.userType!='77'}}" bindtap="XMSP">
<van-tabbar-item wx:if="{{subDeptUserInfo.subDeptType=='1'}}" bindtap="XMSP">
<image slot="icon" src="/images/footer_7.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_7.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
安全管理
<span class="tabNum" wx:if="{{aq>0}}">{{aq}}</span>
</van-tabbar-item>
<van-tabbar-item wx:if="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78' && userData.userType!='77'}}" bindtap="ZLGL">
<van-tabbar-item wx:if="{{subDeptUserInfo.subDeptType=='1'}}" bindtap="ZLGL">
<image slot="icon" src="/images/footer_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
质量管理
<span class="tabNum" wx:if="{{approveDb>0}}">{{approveDb}}</span>
</van-tabbar-item>
<van-tabbar-item wx:if="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78' && userData.userType!='77'}}" bindtap="JDGL2">
<van-tabbar-item wx:if="{{subDeptUserInfo.subDeptType=='1'}}" bindtap="JDGL2">
<image slot="icon" src="/images/footer_6.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_6.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
进度管理

View File

@ -17,6 +17,7 @@ Page({
active: 4,
projectId: '',
projectName: '',
subDeptUserInfo:{},
loginName: '',
remark: '',
roleId: '',
@ -55,6 +56,8 @@ Page({
});
//用户权限菜单
this.getUserMenuList(app.globalData.useProjectId);
//用户项目信息
this.getProSubDeptsUserInfo(app.globalData.useProjectId);
this.awaitTask();
} else {
console.log("未查询到Token...{}...准备重新登录")
@ -78,6 +81,19 @@ Page({
});
},
/**
* 查询单位人员信息
* @param {*} proId
*/
getProSubDeptsUserInfo(proId) {
findProSubDeptsUserByParams(proId).then(res => {
app.globalData.subDeptUserData = res.data;
this.setData({
subDeptUserInfo: res.data[0]
});
});
},
goMenu: function (event) {
wx.redirectTo({
url: event.currentTarget.dataset.url

View File

@ -33,7 +33,7 @@
</view>
</view>
<van-tabbar wx:if="{{userData.userType!='77'}}" active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6">
<van-tabbar wx:if="{{subDeptUserInfo.userPost!='4'}}" active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6">
<van-tabbar-item bindtap="XMGK">
<image
slot="icon"
@ -50,7 +50,7 @@
项目概况
</van-tabbar-item>
<van-tabbar-item wx:if="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78' && userData.userType!='77'}}" bindtap="AQGL">
<van-tabbar-item wx:if="{{subDeptUserInfo.subDeptType=='1'}}" bindtap="AQGL">
<image
slot="icon"
src="/images/footer_7.png"
@ -67,7 +67,7 @@
<span class="tabNum" wx:if="{{aq>0}}">{{aq}}</span>
</van-tabbar-item>
<van-tabbar-item wx:if="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78' && userData.userType!='77'}}" bindtap="ZLGL">
<van-tabbar-item wx:if="{{subDeptUserInfo.subDeptType=='1'}}" bindtap="ZLGL">
<image
slot="icon"
src="/images/footer_5.png"
@ -84,7 +84,7 @@
<span class="tabNum" wx:if="{{ad>0}}">{{ad}}</span>
</van-tabbar-item>
<van-tabbar-item wx:if="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78' && userData.userType!='77'}}" bindtap="JDGL2">
<van-tabbar-item wx:if="{{subDeptUserInfo.subDeptType=='1'}}" bindtap="JDGL2">
<image
slot="icon"
src="/images/footer_6.png"

View File

@ -43,8 +43,8 @@ Page({
subDeptType: null,
craftType: null,
craftPost: null,
user: {},
leaderDegreeGrade: null,
userInfos:{},
degreeGrade: null
},
parForm: {},
@ -114,7 +114,7 @@ Page({
timeStr: '',
isPapers: false,
fileForm: {},
signTime: 180,
signTime: 120,
signTimer: null,
signPath: '',
youWuList: [{
@ -173,6 +173,7 @@ Page({
}
this.setData({
title,
active:0,
proId: options.QRPID,
userPost: options.SIGID,
"form.userPost": options.SIGID,
@ -289,6 +290,9 @@ Page({
deptRes.data.eduFilePath = deptRes.data.proProjectInfoSubdeptsUsers.eduFilePath;
deptRes.data.subStep = deptRes.data.proProjectInfoSubdeptsUsers.subStep;
}
if (deptRes.data.businessLicensePath) {
deptRes.data.businessLicensePath = (this.data.imgBase + deptRes.data.businessLicensePath).split(',');
}
if (deptRes.data.subDeptInfos) {
let subDeptInfosJSON = JSON.parse(deptRes.data.subDeptInfos);
deptRes.data.subDeptInfos = subDeptInfosJSON;
@ -299,23 +303,22 @@ Page({
deptRes.data.subDeptInfos.legalPersonCardImgInv = (this.data.imgBase + deptRes.data.subDeptInfos.legalPersonCardImgInv).split(',');
}
}
if (deptRes.data.proProjectInfoSubdeptsUsers && deptRes.data.proProjectInfoSubdeptsUsers.user) {
if (deptRes.data.proProjectInfoSubdeptsUsers.user.cardImgPos) {
deptRes.data.leaderCardImgPos = (this.data.imgBase + deptRes.data.proProjectInfoSubdeptsUsers.user.cardImgPos).split(',');
if(deptRes.data.proProjectInfoSubdeptsUsers.userInfos){
let userInfosJSON = JSON.parse(deptRes.data.proProjectInfoSubdeptsUsers.userInfos);
deptRes.data.proProjectInfoSubdeptsUsers.userInfos = userInfosJSON;
if(deptRes.data.proProjectInfoSubdeptsUsers.userInfos.cardImgPos){
deptRes.data.leaderCardImgPos = (this.data.imgBase + deptRes.data.proProjectInfoSubdeptsUsers.userInfos.cardImgPos).split(',');
}
if (deptRes.data.proProjectInfoSubdeptsUsers.user.cardImgInv) {
deptRes.data.leaderCardImgInv = (this.data.imgBase + deptRes.data.proProjectInfoSubdeptsUsers.user.cardImgInv).split(',');
}
if (deptRes.data.proProjectInfoSubdeptsUsers.user.userPicture) {
deptRes.data.leaderUserPicture = (this.data.imgBase + deptRes.data.proProjectInfoSubdeptsUsers.user.userPicture).split(',');
}
if (deptRes.data.proProjectInfoSubdeptsUsers.subDeptPowerPath) {
deptRes.data.subDeptLeaderPowerPath = (this.data.imgBase + deptRes.data.proProjectInfoSubdeptsUsers.subDeptPowerPath).split(',');
}
if (deptRes.data.businessLicensePath) {
deptRes.data.businessLicensePath = (this.data.imgBase + deptRes.data.businessLicensePath).split(',');
if(deptRes.data.proProjectInfoSubdeptsUsers.userInfos.cardImgInv){
deptRes.data.leaderCardImgInv = (this.data.imgBase + deptRes.data.proProjectInfoSubdeptsUsers.userInfos.cardImgInv).split(',');
}
}
if(deptRes.data.proProjectInfoSubdeptsUsers.userPicture){
deptRes.data.leaderUserPicture = (this.data.imgBase + deptRes.data.proProjectInfoSubdeptsUsers.userPicture).split(',');
}
if (deptRes.data.proProjectInfoSubdeptsUsers.subDeptPowerPath) {
deptRes.data.subDeptLeaderPowerPath = (this.data.imgBase + deptRes.data.proProjectInfoSubdeptsUsers.subDeptPowerPath).split(',');
}
this.setData({
form: deptRes.data,
userPhoneNumber: phoneNumber,
@ -338,35 +341,32 @@ Page({
} else {
findProSubDeptsUser(this.data.proId, phoneNumber).then(userRes => {
if (userRes.code == 200 && userRes.data) {
if (userRes.data.user) {
if (userRes.data.user.userInfos) {
let userInfosJSON = JSON.parse(userRes.data.user.userInfos);
userRes.data.user.phonenumber = userInfosJSON.phoneNumber;
userRes.data.user.nativePlace = userInfosJSON.nativePlace;
userRes.data.user.address = userInfosJSON.address;
userRes.data.user.emergencyContact = userInfosJSON.emergencyContact;
userRes.data.user.contactPhone = userInfosJSON.contactPhone;
userRes.data.user.bankName = userInfosJSON.bankName;
userRes.data.user.bankOffice = userInfosJSON.bankOffice;
userRes.data.user.bankCardNo = userInfosJSON.bankCardNo;
if (userRes.data.userInfos) {
let userInfosJSON = JSON.parse(userRes.data.userInfos);
userRes.data.nativePlace = userInfosJSON.nativePlace;
userRes.data.address = userInfosJSON.address;
userRes.data.emergencyContact = userInfosJSON.emergencyContact;
userRes.data.contactPhone = userInfosJSON.contactPhone;
userRes.data.bankName = userInfosJSON.bankName;
userRes.data.bankOffice = userInfosJSON.bankOffice;
userRes.data.bankCardNo = userInfosJSON.bankCardNo;
}
if (userRes.data.user.cardImgPos) {
userRes.data.user.cardImgPos = (this.data.imgBase + userRes.data.user.cardImgPos).split(',');
if (userRes.data.cardImgPos) {
userRes.data.cardImgPos = (this.data.imgBase + userRes.data.cardImgPos).split(',');
}
if (userRes.data.user.cardImgInv) {
userRes.data.user.cardImgInv = (this.data.imgBase + userRes.data.user.cardImgInv).split(',');
if (userRes.data.cardImgInv) {
userRes.data.cardImgInv = (this.data.imgBase + userRes.data.cardImgInv).split(',');
}
if (userRes.data.user.userPicture) {
userRes.data.user.userPicture = (this.data.imgBase + userRes.data.user.userPicture).split(',');
if (userRes.data.userPicture) {
userRes.data.userPicture = (this.data.imgBase + userRes.data.userPicture).split(',');
}
if (userRes.data.subDeptPowerPath) {
userRes.data.subDeptPowerPath = (this.data.imgBase + userRes.data.subDeptPowerPath).split(',');
}
}
this.setData({
form: userRes.data,
userPhoneNumber: phoneNumber,
"form.phoneNumber": phoneNumber,
"form.userPhone": phoneNumber,
active: userRes.data.subStep
});
if (userRes.data.subStep == 1) {
@ -639,6 +639,7 @@ Page({
startSignFile(skip) {
let _fileForm = {};
let currDate = new Date().toLocaleString().substring(0, 10).split("/");
currDate[2] = currDate[2].replace("上午","").replace("下午","");
if (this.data.userPost == 1) {
_fileForm.fName = this.data.form.subDeptLeaderName;
_fileForm.fCardId = this.data.form.subDeptLeaderCode;
@ -646,9 +647,9 @@ Page({
_fileForm.fPost = "委托人";
_fileForm.fDate = currDate[0] + "年" + currDate[1] + "月" + currDate[2] + "日";
} else {
_fileForm.fName = this.data.form.user.nickName;
_fileForm.fCardId = this.data.form.user.cardCode;
_fileForm.fSex = this.getGenderFromIdCard(this.data.form.user.cardCode);
_fileForm.fName = this.data.form.nickName;
_fileForm.fCardId = this.data.form.cardCode;
_fileForm.fSex = this.getGenderFromIdCard(this.data.form.cardCode);
this.data.craftPostAllOrginList.forEach(item => {
if (this.data.form.craftPost == item.dictValue) {
_fileForm.fPost = item.dictLabel;
@ -659,7 +660,7 @@ Page({
this.setData({
active: skip ? (this.data.active + 1) : this.data.active,
fileForm: _fileForm,
signTime: 180
signTime: 120
})
clearInterval(this.data.signTimer);
this.startSignCountdown();
@ -1052,7 +1053,6 @@ Page({
onChageCraftType(e) {
//设置工种岗位
let craftPostList = [];
console.log("this.data.craftPostAllOrginList", this.data.craftPostAllOrginList)
this.data.craftPostAllOrginList.forEach(item => {
if (item.remark == e.detail.id) {
craftPostList.push({
@ -1085,7 +1085,7 @@ Page({
fileUploadCardImgPos(options) {
let file = options.detail;
this.setData({
"form.user.cardImgPos": file
"form.cardImgPos": file
});
},
@ -1096,7 +1096,7 @@ Page({
fileUploadCardImgInv(options) {
let file = options.detail;
this.setData({
"form.user.cardImgInv": file
"form.cardImgInv": file
});
},
@ -1107,7 +1107,7 @@ Page({
fileUploadUserPicture(options) {
let file = options.detail;
this.setData({
"form.user.userPicture": file
"form.userPicture": file
});
},
@ -1128,7 +1128,7 @@ Page({
*/
inputUserName(e) {
this.setData({
"form.user.nickName": e.detail.value
"form.userName": e.detail.value
})
},
@ -1138,7 +1138,7 @@ Page({
*/
inputUserCode(e) {
this.setData({
"form.user.cardCode": e.detail.value
"form.cardCode": e.detail.value
})
},
@ -1148,7 +1148,7 @@ Page({
*/
inputOriginNative(e) {
this.setData({
"form.user.nativePlace": e.detail.value
"form.nativePlace": e.detail.value
})
},
/**
@ -1157,7 +1157,7 @@ Page({
*/
inputOriginAddress(e) {
this.setData({
"form.user.address": e.detail.value
"form.address": e.detail.value
})
},
@ -1167,7 +1167,7 @@ Page({
*/
inputUrgentUser(e) {
this.setData({
"form.user.emergencyContact": e.detail.value
"form.emergencyContact": e.detail.value
})
},
@ -1177,7 +1177,7 @@ Page({
*/
inputUrgentUserPhone(e) {
this.setData({
"form.user.contactPhone": e.detail.value
"form.contactPhone": e.detail.value
})
},
@ -1197,7 +1197,7 @@ Page({
*/
inputBankName(e) {
this.setData({
"form.user.bankName": e.detail.value
"form.bankName": e.detail.value
})
},
@ -1207,7 +1207,7 @@ Page({
*/
inputBankOffice(e) {
this.setData({
"form.user.bankOffice": e.detail.value
"form.bankOffice": e.detail.value
})
},
@ -1217,7 +1217,7 @@ Page({
*/
inputBankCardNo(e) {
this.setData({
"form.user.bankCardNo": e.detail.value
"form.bankCardNo": e.detail.value
})
},
@ -1420,6 +1420,13 @@ Page({
//验证图片上传完毕
if (uploads.length == uploadFiles.length) {
_form.subDeptInfos = JSON.stringify(subDeptInfos);
let leaderUserInfos = {};
leaderUserInfos.cardImgPos = _form.leaderCardImgPos;
leaderUserInfos.cardImgInv = _form.leaderCardImgInv;
_form.leaderUserInfos = JSON.stringify(leaderUserInfos);
if(_form.proProjectInfoSubdeptsUsers && _form.proProjectInfoSubdeptsUsers.userInfos){
_form.proProjectInfoSubdeptsUsers.userInfos = JSON.stringify(_form.proProjectInfoSubdeptsUsers.userInfos);
}
wx.showLoading({mask: true,title: '正在处理'});
registerSubDepts(_form).then(res => {
wx.hideLoading({success: (res) => {}});
@ -1456,15 +1463,15 @@ Page({
return false;
}
}
if (!form.user.cardImgPos || form.user.cardImgPos.length == 0) {
if (!form.cardImgPos || form.cardImgPos.length == 0) {
app.toast("请上传身份证正面照!");
return false;
}
if (!form.user.cardImgInv || form.user.cardImgInv.length == 0) {
if (!form.cardImgInv || form.cardImgInv.length == 0) {
app.toast("请上传身份证反面照!");
return false;
}
if (!form.user.userPicture || form.user.userPicture.length == 0) {
if (!form.userPicture || form.userPicture.length == 0) {
app.toast("请上传进场半身近照!");
return false;
}
@ -1473,11 +1480,11 @@ Page({
app.toast("请上传委托人单位委托书!");
return false;
}
if (!form.user.nickName) {
if (!form.userName) {
app.toast("请填写姓名!");
return false;
}
if (!form.user.cardCode) {
if (!form.cardCode) {
app.toast("请填写身份证号!");
return false;
}
@ -1485,19 +1492,19 @@ Page({
app.toast("请填写联系电话!");
return false;
}
if (!form.user.nativePlace) {
if (!form.nativePlace) {
app.toast("请填写籍贯民族!");
return false;
}
if (!form.user.address) {
if (!form.address) {
app.toast("请填写籍贯地址!");
return false;
}
if (!form.user.emergencyContact) {
if (!form.emergencyContact) {
app.toast("请填写紧急联系人!");
return false;
}
if (!form.user.contactPhone) {
if (!form.contactPhone) {
app.toast("请填写紧急联系人电话!");
return false;
}
@ -1506,11 +1513,11 @@ Page({
return false;
}
if (userPost == '4') {
if (!form.user.bankName) {
if (!form.bankName) {
app.toast("请填写开户银行名称!");
return false;
}
if (!form.user.bankOffice) {
if (!form.bankOffice) {
app.toast("请填写开户银行网点!");
return false;
}
@ -1539,26 +1546,23 @@ Page({
let _form = {
...this.data.form
};
let userModel = {
..._form.user
};
let uploadFiles = [];
if (userModel.cardImgPos && userModel.cardImgPos.length > 0) {
if (_form.cardImgPos && _form.cardImgPos.length > 0) {
uploadFiles.push({
type: 'cardImgPos',
path: userModel.cardImgPos[0]
path: _form.cardImgPos[0]
});
}
if (userModel.cardImgInv && userModel.cardImgInv.length > 0) {
if (_form.cardImgInv && _form.cardImgInv.length > 0) {
uploadFiles.push({
type: 'cardImgInv',
path: userModel.cardImgInv[0]
path: _form.cardImgInv[0]
});
}
if (userModel.userPicture && userModel.userPicture.length > 0) {
if (_form.userPicture && _form.userPicture.length > 0) {
uploadFiles.push({
type: 'userPicture',
path: userModel.userPicture[0]
path: _form.userPicture[0]
});
}
if (_form.subDeptPowerPath && _form.subDeptPowerPath.length > 0) {
@ -1584,13 +1588,13 @@ Page({
obj = await that.syncUploadImage(item.path);
}
if (item.type == "cardImgPos") {
userModel.cardImgPos = obj.data.data.url;
_form.cardImgPos = obj.data.data.url;
}
if (item.type == "cardImgInv") {
userModel.cardImgInv = obj.data.data.url;
_form.cardImgInv = obj.data.data.url;
}
if (item.type == "userPicture") {
userModel.userPicture = obj.data.data.url;
_form.userPicture = obj.data.data.url;
}
if (item.type == "subDeptPowerPath") {
_form.subDeptPowerPath = obj.data.data.url;
@ -1600,15 +1604,14 @@ Page({
if (uploads.length == uploadFiles.length) {
let userInfos = {};
userInfos.phonenumber = _form.phoneNumber;
userInfos.nativePlace = userModel.nativePlace;
userInfos.address = userModel.address;
userInfos.emergencyContact = userModel.emergencyContact;
userInfos.contactPhone = userModel.contactPhone;
userInfos.bankName = userModel.bankName;
userInfos.bankOffice = userModel.bankOffice;
userInfos.bankCardNo = userModel.bankCardNo;
userModel.userInfos = JSON.stringify(userInfos);
_form.user = userModel;
userInfos.nativePlace = _form.nativePlace;
userInfos.address = _form.address;
userInfos.emergencyContact = _form.emergencyContact;
userInfos.contactPhone = _form.contactPhone;
userInfos.bankName = _form.bankName;
userInfos.bankOffice = _form.bankOffice;
userInfos.bankCardNo = _form.bankCardNo;
_form.userInfos = JSON.stringify(userInfos);
wx.showLoading({mask: true,title: '正在处理'});
registerSubDeptsUsers(_form).then(res => {
wx.hideLoading({success: (res) => {}});

View File

@ -201,14 +201,14 @@
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">个人身份证正面
</view>
<view class="inspect_info_content">
<file-uploader bindimages="fileUploadCardImgPos" iconClass="in-zcard-click" limit="{{limit}}" fileUrlArray="{{form.user.cardImgPos}}"></file-uploader>
<file-uploader bindimages="fileUploadCardImgPos" iconClass="in-zcard-click" limit="{{limit}}" fileUrlArray="{{form.cardImgPos}}"></file-uploader>
</view>
</van-col>
<van-col span="12">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">个人身份证反面
</view>
<view class="inspect_info_content">
<file-uploader bindimages="fileUploadCardImgInv" iconClass="in-fcard-click" limit="{{limit}}" fileUrlArray="{{form.user.cardImgInv}}"></file-uploader>
<file-uploader bindimages="fileUploadCardImgInv" iconClass="in-fcard-click" limit="{{limit}}" fileUrlArray="{{form.cardImgInv}}"></file-uploader>
</view>
</van-col>
</van-row>
@ -218,7 +218,7 @@
<text style="font-size: small; color: antiquewhite;">[进场扫脸,请上传清晰照片]</text>
</view>
<view class="inspect_info_content">
<file-uploader bindimages="fileUploadUserPicture" limit="{{limit}}" fileUrlArray="{{form.user.userPicture}}"></file-uploader>
<file-uploader bindimages="fileUploadUserPicture" limit="{{limit}}" fileUrlArray="{{form.userPicture}}"></file-uploader>
</view>
</view>
<view class="inspect_info_list">
@ -232,43 +232,43 @@
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">项目经理姓名</view>
<view class="inspect_info_content">
<input placeholder="请填写项目经理姓名" placeholder-style="color:#6777aa;" bindinput="inputUserName" class="inspect_input_fill_in" maxlength="30" model:value="{{form.user.nickName}}" />
<input placeholder="请填写项目经理姓名" placeholder-style="color:#6777aa;" bindinput="inputUserName" class="inspect_input_fill_in" maxlength="30" model:value="{{form.userName}}" />
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">项目经理身份证号</view>
<view class="inspect_info_content">
<input placeholder="请填写项目经理身份证号" placeholder-style="color:#6777aa;" bindinput="inputUserCode" class="inspect_input_fill_in" maxlength="30" model:value="{{form.user.cardCode}}" />
<input placeholder="请填写项目经理身份证号" placeholder-style="color:#6777aa;" bindinput="inputUserCode" class="inspect_input_fill_in" maxlength="30" model:value="{{form.cardCode}}" />
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">项目经理联系电话</view>
<view class="inspect_info_content">
<input placeholder="请填写项目经理联系电话" placeholder-style="color:#6777aa;" model:value="{{form.phoneNumber}}" disabled class="inspect_input_fill_in" maxlength="30" />
<input placeholder="请填写项目经理联系电话" placeholder-style="color:#6777aa;" model:value="{{form.userPhone}}" disabled class="inspect_input_fill_in" maxlength="30" />
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">籍贯民族</view>
<view class="inspect_info_content">
<input placeholder="请填写籍贯民族" placeholder-style="color:#6777aa;" bindinput="inputOriginNative" class="inspect_input_fill_in" maxlength="30" model:value="{{form.user.nativePlace}}" />
<input placeholder="请填写籍贯民族" placeholder-style="color:#6777aa;" bindinput="inputOriginNative" class="inspect_input_fill_in" maxlength="30" model:value="{{form.nativePlace}}" />
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">籍贯地址</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写籍贯地址" placeholder-style="color:#6777aa;" maxlength="64" bindblur="inputOriginAddress" model:value="{{form.user.address}}" />
<textarea class="add_textarea" placeholder="请填写籍贯地址" placeholder-style="color:#6777aa;" maxlength="64" bindblur="inputOriginAddress" model:value="{{form.address}}" />
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">紧急联系人</view>
<view class="inspect_info_content">
<input placeholder="请填写紧急联系人" placeholder-style="color:#6777aa;" bindinput="inputUrgentUser" class="inspect_input_fill_in" model:value="{{form.user.emergencyContact}}" maxlength="30" />
<input placeholder="请填写紧急联系人" placeholder-style="color:#6777aa;" bindinput="inputUrgentUser" class="inspect_input_fill_in" model:value="{{form.emergencyContact}}" maxlength="30" />
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">紧急联系人电话</view>
<view class="inspect_info_content">
<input placeholder="请填写紧急联系人电话" placeholder-style="color:#6777aa;" bindinput="inputUrgentUserPhone" class="inspect_input_fill_in" model:value="{{form.user.contactPhone}}" maxlength="30" />
<input placeholder="请填写紧急联系人电话" placeholder-style="color:#6777aa;" bindinput="inputUrgentUserPhone" class="inspect_input_fill_in" model:value="{{form.contactPhone}}" maxlength="30" />
</view>
</view>
<view class="inspect_info_list">
@ -337,14 +337,14 @@
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">个人身份证正面
</view>
<view class="inspect_info_content">
<file-uploader bindimages="fileUploadCardImgPos" iconClass="in-zcard-click" limit="{{limit}}" fileUrlArray="{{form.user.cardImgPos}}"></file-uploader>
<file-uploader bindimages="fileUploadCardImgPos" iconClass="in-zcard-click" limit="{{limit}}" fileUrlArray="{{form.cardImgPos}}"></file-uploader>
</view>
</van-col>
<van-col span="12">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">个人身份证反面
</view>
<view class="inspect_info_content">
<file-uploader bindimages="fileUploadCardImgInv" iconClass="in-fcard-click" limit="{{limit}}" fileUrlArray="{{form.user.cardImgInv}}"></file-uploader>
<file-uploader bindimages="fileUploadCardImgInv" iconClass="in-fcard-click" limit="{{limit}}" fileUrlArray="{{form.cardImgInv}}"></file-uploader>
</view>
</van-col>
</van-row>
@ -354,7 +354,7 @@
<text style="font-size: small; color: antiquewhite;">[进场扫脸,请上传清晰照片]</text>
</view>
<view class="inspect_info_content">
<file-uploader bindimages="fileUploadUserPicture" limit="{{limit}}" fileUrlArray="{{form.user.userPicture}}"></file-uploader>
<file-uploader bindimages="fileUploadUserPicture" limit="{{limit}}" fileUrlArray="{{form.userPicture}}"></file-uploader>
</view>
</view>
<view class="inspect_info_list">
@ -368,43 +368,43 @@
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">姓名</view>
<view class="inspect_info_content">
<input placeholder="请填写姓名" placeholder-style="color:#6777aa;" bindinput="inputUserName" class="inspect_input_fill_in" maxlength="30" model:value="{{form.user.nickName}}" />
<input placeholder="请填写姓名" placeholder-style="color:#6777aa;" bindinput="inputUserName" class="inspect_input_fill_in" maxlength="30" model:value="{{form.userName}}" />
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">身份证号</view>
<view class="inspect_info_content">
<input placeholder="请填写身份证号" placeholder-style="color:#6777aa;" bindinput="inputUserCode" class="inspect_input_fill_in" maxlength="30" model:value="{{form.user.cardCode}}" />
<input placeholder="请填写身份证号" placeholder-style="color:#6777aa;" bindinput="inputUserCode" class="inspect_input_fill_in" maxlength="30" model:value="{{form.cardCode}}" />
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">联系电话</view>
<view class="inspect_info_content">
<input placeholder="请填写联系电话" placeholder-style="color:#6777aa;" model:value="{{form.phoneNumber}}" disabled class="inspect_input_fill_in" maxlength="30" />
<input placeholder="请填写联系电话" placeholder-style="color:#6777aa;" model:value="{{form.userPhone}}" disabled class="inspect_input_fill_in" maxlength="30" />
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">籍贯民族</view>
<view class="inspect_info_content">
<input placeholder="请填写籍贯民族" placeholder-style="color:#6777aa;" bindinput="inputOriginNative" class="inspect_input_fill_in" maxlength="30" model:value="{{form.user.nativePlace}}" />
<input placeholder="请填写籍贯民族" placeholder-style="color:#6777aa;" bindinput="inputOriginNative" class="inspect_input_fill_in" maxlength="30" model:value="{{form.nativePlace}}" />
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">籍贯地址</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写籍贯地址" placeholder-style="color:#6777aa;" maxlength="64" bindblur="inputOriginAddress" model:value="{{form.user.address}}" />
<textarea class="add_textarea" placeholder="请填写籍贯地址" placeholder-style="color:#6777aa;" maxlength="64" bindblur="inputOriginAddress" model:value="{{form.address}}" />
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">紧急联系人</view>
<view class="inspect_info_content">
<input placeholder="请填写紧急联系人" placeholder-style="color:#6777aa;" bindinput="inputUrgentUser" class="inspect_input_fill_in" model:value="{{form.user.emergencyContact}}" maxlength="30" />
<input placeholder="请填写紧急联系人" placeholder-style="color:#6777aa;" bindinput="inputUrgentUser" class="inspect_input_fill_in" model:value="{{form.emergencyContact}}" maxlength="30" />
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">紧急联系人电话</view>
<view class="inspect_info_content">
<input placeholder="请填写紧急联系人电话" placeholder-style="color:#6777aa;" bindinput="inputUrgentUserPhone" class="inspect_input_fill_in" maxlength="30" model:value="{{form.user.contactPhone}}" />
<input placeholder="请填写紧急联系人电话" placeholder-style="color:#6777aa;" bindinput="inputUrgentUserPhone" class="inspect_input_fill_in" maxlength="30" model:value="{{form.contactPhone}}" />
</view>
</view>
<view class="inspect_info_list">
@ -446,7 +446,7 @@
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">班组长姓名</view>
<view class="inspect_info_content">
<input placeholder="请填写班组长姓名" placeholder-style="color:#6777aa;" model:value="{{parForm.user.nickName}}" class="inspect_input_fill_in" disabled maxlength="30" />
<input placeholder="请填写班组长姓名" placeholder-style="color:#6777aa;" model:value="{{parForm.userName}}" class="inspect_input_fill_in" disabled maxlength="30" />
</view>
</view>
<view class="inspect_info_list">
@ -455,14 +455,14 @@
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">个人身份证正面
</view>
<view class="inspect_info_content">
<file-uploader bindimages="fileUploadCardImgPos" iconClass="in-zcard-click" limit="{{limit}}" fileUrlArray="{{form.user.cardImgPos}}"></file-uploader>
<file-uploader bindimages="fileUploadCardImgPos" iconClass="in-zcard-click" limit="{{limit}}" fileUrlArray="{{form.cardImgPos}}"></file-uploader>
</view>
</van-col>
<van-col span="12">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">个人身份证反面
</view>
<view class="inspect_info_content">
<file-uploader bindimages="fileUploadCardImgInv" iconClass="in-fcard-click" limit="{{limit}}" fileUrlArray="{{form.user.cardImgInv}}"></file-uploader>
<file-uploader bindimages="fileUploadCardImgInv" iconClass="in-fcard-click" limit="{{limit}}" fileUrlArray="{{form.cardImgInv}}"></file-uploader>
</view>
</van-col>
</van-row>
@ -472,55 +472,55 @@
<text style="font-size: small; color: antiquewhite;">[进场扫脸,请上传清晰照片]</text>
</view>
<view class="inspect_info_content">
<file-uploader bindimages="fileUploadUserPicture" limit="{{limit}}" fileUrlArray="{{form.user.userPicture}}"></file-uploader>
<file-uploader bindimages="fileUploadUserPicture" limit="{{limit}}" fileUrlArray="{{form.userPicture}}"></file-uploader>
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">姓名</view>
<view class="inspect_info_content">
<input placeholder="请填写姓名" placeholder-style="color:#6777aa;" bindinput="inputUserName" class="inspect_input_fill_in" maxlength="30" model:value="{{form.user.nickName}}" />
<input placeholder="请填写姓名" placeholder-style="color:#6777aa;" bindinput="inputUserName" class="inspect_input_fill_in" maxlength="30" model:value="{{form.userName}}" />
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">身份证号</view>
<view class="inspect_info_content">
<input placeholder="请填写身份证号" placeholder-style="color:#6777aa;" bindinput="inputUserCode" class="inspect_input_fill_in" maxlength="30" model:value="{{form.user.cardCode}}" />
<input placeholder="请填写身份证号" placeholder-style="color:#6777aa;" bindinput="inputUserCode" class="inspect_input_fill_in" maxlength="30" model:value="{{form.cardCode}}" />
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">联系电话</view>
<view class="inspect_info_content">
<input placeholder="请填写联系电话" placeholder-style="color:#6777aa;" model:value="{{form.phoneNumber}}" disabled class="inspect_input_fill_in" maxlength="30" />
<input placeholder="请填写联系电话" placeholder-style="color:#6777aa;" model:value="{{form.userPhone}}" disabled class="inspect_input_fill_in" maxlength="30" />
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">籍贯民族</view>
<view class="inspect_info_content">
<input placeholder="请填写籍贯民族" placeholder-style="color:#6777aa;" bindinput="inputOriginNative" class="inspect_input_fill_in" maxlength="30" model:value="{{form.user.nativePlace}}" />
<input placeholder="请填写籍贯民族" placeholder-style="color:#6777aa;" bindinput="inputOriginNative" class="inspect_input_fill_in" maxlength="30" model:value="{{form.nativePlace}}" />
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">籍贯地址</view>
<view class="inspect_info_content">
<textarea class="add_textarea" placeholder="请填写籍贯地址" placeholder-style="color:#6777aa;" maxlength="64" bindblur="inputOriginAddress" model:value="{{form.user.address}}" />
<textarea class="add_textarea" placeholder="请填写籍贯地址" placeholder-style="color:#6777aa;" maxlength="64" bindblur="inputOriginAddress" model:value="{{form.address}}" />
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">紧急联系人</view>
<view class="inspect_info_content">
<input placeholder="请填写紧急联系人" placeholder-style="color:#6777aa;" bindinput="inputUrgentUser" class="inspect_input_fill_in" maxlength="30" model:value="{{form.user.emergencyContact}}" />
<input placeholder="请填写紧急联系人" placeholder-style="color:#6777aa;" bindinput="inputUrgentUser" class="inspect_input_fill_in" maxlength="30" model:value="{{form.emergencyContact}}" />
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">紧急联系人电话</view>
<view class="inspect_info_content">
<input placeholder="请填写紧急联系人电话" placeholder-style="color:#6777aa;" bindinput="inputUrgentUserPhone" class="inspect_input_fill_in" maxlength="30" model:value="{{form.user.contactPhone}}" />
<input placeholder="请填写紧急联系人电话" placeholder-style="color:#6777aa;" bindinput="inputUrgentUserPhone" class="inspect_input_fill_in" maxlength="30" model:value="{{form.contactPhone}}" />
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">开户银行名称</view>
<view class="inspect_info_content">
<input placeholder="请填写开户银行名称" placeholder-style="color:#6777aa;" bindinput="inputBankName" class="inspect_input_fill_in" maxlength="30" model:value="{{form.user.bankName}}" />
<input placeholder="请填写开户银行名称" placeholder-style="color:#6777aa;" bindinput="inputBankName" class="inspect_input_fill_in" maxlength="30" model:value="{{form.bankName}}" />
</view>
</view>
<view class="inspect_info_list">
@ -528,13 +528,13 @@
<text style="font-size: small; color: antiquewhite;">[开户银行地址]</text>
</view>
<view class="inspect_info_content">
<input placeholder="请填写开户银行网点" placeholder-style="color:#6777aa;" bindinput="inputBankOffice" class="inspect_input_fill_in" maxlength="30" model:value="{{form.user.bankOffice}}" />
<input placeholder="请填写开户银行网点" placeholder-style="color:#6777aa;" bindinput="inputBankOffice" class="inspect_input_fill_in" maxlength="30" model:value="{{form.bankOffice}}" />
</view>
</view>
<view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">工资银行卡号</view>
<view class="inspect_info_content">
<input placeholder="请填写工资银行卡号" placeholder-style="color:#6777aa;" bindinput="inputBankCardNo" class="inspect_input_fill_in" maxlength="30" model:value="{{form.user.bankCardNo}}" />
<input placeholder="请填写工资银行卡号" placeholder-style="color:#6777aa;" bindinput="inputBankCardNo" class="inspect_input_fill_in" maxlength="30" model:value="{{form.bankCardNo}}" />
</view>
</view>
<view class="inspect_info_list">

View File

@ -263,7 +263,7 @@
}
.doc .foot {
margin-left: 35%;
margin-left: 30%;
font-size: 15px;
padding: 15rpx;
}

View File

@ -11,7 +11,7 @@
{
"name": "pages/project_qr/index",
"pathName": "pages/project_qr/index",
"query": "QRPID=116&SIGID=1",
"query": "QRPID=116&SIGID=2&PARID=10",
"launchMode": "default",
"scene": null
},

View File

@ -111,7 +111,7 @@
<el-select v-model="form.deptType" placeholder="请选择部门类型" style="width: 100%">
<el-option
v-for="dict in sys_dept_type"
v-show="dict.value!='4'"
v-if="dict.value!='4'"
:key="dict.value"
:label="dict.label"
:value="dict.value"
@ -122,7 +122,7 @@
<el-select v-model="form.deptType" placeholder="请选择部门类型" style="width: 100%">
<el-option
v-for="dict in sys_dept_type"
v-show="dict.value!='4' && dict.value!='2'"
v-if="dict.value!='4' && dict.value!='2'"
:key="dict.value"
:label="dict.label"
:value="dict.value"

View File

@ -118,7 +118,7 @@
</el-row>
<!-- 添加或修改用户配置对话框 -->
<el-dialog :title="title" v-model="open" width="680px" append-to-body>
<el-dialog :title="title" v-model="open" width="880px" append-to-body>
<el-form :model="form" :rules="rules" ref="userRef" label-width="88px">
<el-row>
<el-col :span="24">
@ -185,6 +185,16 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="24" v-if="form.userType=='99'">
<el-form-item label="证件号码" prop="cardCode">
<el-input v-model="form.cardCode" placeholder="请输入手机号码" maxlength="18" />
</el-form-item>
</el-col>
<el-col :span="24" v-if="form.userType=='99'">
<el-form-item label="入场近照" prop="avatar">
<image-upload v-model="form.avatar" :limit="1" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
@ -295,6 +305,8 @@ const data = reactive({
userType: [{ required: true, message: "用户类型不能为空", trigger: "change" }],
password: [{ required: true, message: "用户密码不能为空", trigger: "blur" }, { min: 5, max: 20, message: "用户密码长度必须介于 5 和 20 之间", trigger: "blur" }],
phonenumber: [{ required: true, message: "手机号码不能为空", trigger: "blur" }, { pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: "请输入正确的手机号码", trigger: "blur" }]
cardCode: [{ required: true, message: "用户名称不能为空", trigger: "blur" }],
avatar: [{ required: true, message: "入场近照不能为空", trigger: "change" }],
}
});