Compare commits

...

3 Commits

Author SHA1 Message Date
姜玉琦 ffc70cbe29 Merge branch 'dev_xd' of http://62.234.3.186:3000/jiangyq/YZProjectCloud into dev_xd 2025-01-05 23:27:41 +08:00
姜玉琦 757686d4fa 提交代码 2025-01-05 23:27:32 +08:00
姜玉琦 6cdfdf8da9 提交代码 2025-01-05 17:09:19 +08:00
40 changed files with 840 additions and 450 deletions

View File

@ -31,17 +31,7 @@ public interface RemoteProService
public R<Map<String,Object>> info(@PathVariable("id") Long id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); public R<Map<String,Object>> info(@PathVariable("id") Long id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
/** /**
* *
*
* @param userId
* @param source
* @return
*/
@GetMapping("/proProjectInfoUsers/projects/{userId}")
public R<List<Map<String, Object>>> getProjects(@PathVariable("userId") Long userId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
/**
*
* *
* @param busKey * @param busKey
* @param source * @param source
@ -49,4 +39,14 @@ public interface RemoteProService
*/ */
@GetMapping("/proProjectInfoSubdeptsUsers/approveSubDeptsUser/{busKey}") @GetMapping("/proProjectInfoSubdeptsUsers/approveSubDeptsUser/{busKey}")
public R<AjaxResult> approveSubDeptsUser(@PathVariable("busKey") Long busKey, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); 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

@ -4,11 +4,10 @@ import com.yanzhu.common.core.constant.SecurityConstants;
import com.yanzhu.common.core.constant.ServiceNameConstants; import com.yanzhu.common.core.constant.ServiceNameConstants;
import com.yanzhu.common.core.domain.R; import com.yanzhu.common.core.domain.R;
import com.yanzhu.system.api.domain.SysRole; import com.yanzhu.system.api.domain.SysRole;
import com.yanzhu.system.api.domain.SysUser;
import com.yanzhu.system.api.factory.RemoteUserFallbackFactory; import com.yanzhu.system.api.factory.RemoteUserFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;
/** /**
* *

View File

@ -110,6 +110,22 @@ public interface RemoteUserService
@PostMapping("/user/register") @PostMapping("/user/register")
public R<Long> registerUserInfo(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); public R<Long> registerUserInfo(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
/**
*
*
* @param sysUser
* @param source
* @return
*/
@PostMapping("/user/removeUserRoles")
public R<Long> removeUserRoles(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
/**
*
* @param sysUser
* @param source
* @return
*/
@PutMapping("/user") @PutMapping("/user")
public R<Long> updateUserInfo(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); public R<Long> updateUserInfo(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
} }

View File

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

View File

@ -33,17 +33,18 @@ public class RemoteProFallbackFactory implements FallbackFactory<RemoteProServic
return R.fail("查询项目失败:" + throwable.getMessage()); return R.fail("查询项目失败:" + throwable.getMessage());
} }
@Override
public R<List<Map<String, Object>>> getProjects(Long userId, String source)
{
return R.fail("获取用户项目信息失败:" + throwable.getMessage());
}
@Override @Override
public R<AjaxResult> approveSubDeptsUser(Long busKey, String source) public R<AjaxResult> approveSubDeptsUser(Long busKey, String source)
{ {
return R.fail("审批通过信息同步失败:" + throwable.getMessage()); return R.fail("审批通过信息同步失败:" + throwable.getMessage());
} }
@Override
public R<AjaxResult> syspushSubDeptsUser(Map<String, Object> data, String source)
{
return R.fail("项目系统人员同步失败:" + throwable.getMessage());
}
}; };
} }
} }

View File

@ -84,6 +84,12 @@ public class RemoteUserFallbackFactory implements FallbackFactory<RemoteUserServ
return R.fail("注册用户失败:" + throwable.getMessage()); return R.fail("注册用户失败:" + throwable.getMessage());
} }
@Override
public R<Long> removeUserRoles(SysUser sysUser, String source)
{
return R.fail("删除用户角色失败:" + throwable.getMessage());
}
@Override @Override
public R<Long> updateUserInfo(SysUser sysUser, String source) { public R<Long> updateUserInfo(SysUser sysUser, String source) {
return R.fail("修改用户失败:" + throwable.getMessage()); return R.fail("修改用户失败:" + throwable.getMessage());

View File

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

View File

@ -172,6 +172,9 @@ public class ProProjectInfoSubdeptsUsers extends BaseEntity
/** 进行步骤 */ /** 进行步骤 */
private Long subStep; private Long subStep;
/** 排序规则 */
private Long sortBy;
/** 删除标识 */ /** 删除标识 */
@Excel(name = "数据状态") @Excel(name = "数据状态")
private Long isDel; private Long isDel;
@ -512,6 +515,14 @@ public class ProProjectInfoSubdeptsUsers extends BaseEntity
this.userNation = userNation; this.userNation = userNation;
} }
public Long getSortBy() {
return sortBy;
}
public void setSortBy(Long sortBy) {
this.sortBy = sortBy;
}
@Override @Override
public String toString() { public String toString() {
return "ProProjectInfoSubdeptsUsers{" + return "ProProjectInfoSubdeptsUsers{" +

View File

@ -107,4 +107,12 @@ public interface ProProjectInfoSubdeptsUsersMapper
* @param subDeptGroupId * @param subDeptGroupId
*/ */
public void updateUseStatusByParams(@Param("subDeptId")Long subDeptId, @Param("subDeptGroupId")Long subDeptGroupId); public void updateUseStatusByParams(@Param("subDeptId")Long subDeptId, @Param("subDeptGroupId")Long subDeptGroupId);
/**
*
*
* @param id
* @return
*/
int editDefaultProjectById(Long id);
} }

View File

@ -88,13 +88,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectProProjectInfoList" parameterType="ProProjectInfo" resultMap="ProProjectInfoResult"> <select id="selectProProjectInfoList" parameterType="ProProjectInfo" resultMap="ProProjectInfoResult">
<include refid="selectProProjectInfoVo"/> <include refid="selectProProjectInfoVo"/>
<if test="currentUserId != null "> left join pro_project_info_users pu on pu.project_id = pi.id </if>
<if test="currentUserId != null "> left join pro_project_info_subdepts_users psu on psu.project_id = pi.id </if> <if test="currentUserId != null "> left join pro_project_info_subdepts_users psu on psu.project_id = pi.id </if>
<where> <where>
<if test="comId != null "> and pi.com_id = #{comId}</if> <if test="comId != null "> and pi.com_id = #{comId}</if>
<if test="disDeptId != null "> and pi.dis_dept_id = #{disDeptId}</if> <if test="disDeptId != null "> and pi.dis_dept_id = #{disDeptId}</if>
<if test="activeComId != null "> and pi.com_id = #{activeComId}</if> <if test="activeComId != null "> and pi.com_id = #{activeComId}</if>
<if test="currentUserId != null"> and ((pu.user_id = #{currentUserId} and pu.use_status='1' and pu.is_del=0) or (psu.user_id = #{currentUserId} and approve_status <![CDATA[ >= ]]> 100 and psu.user_id = #{currentUserId} and psu.use_status='1' and psu.is_del=0))</if> <if test="currentUserId != null"> and psu.user_id = #{currentUserId} and psu.approve_status <![CDATA[ >= ]]> 100 and psu.user_id = #{currentUserId} and psu.use_status='0' and psu.is_del=0</if>
<if test="projectName != null and projectName != ''"> and pi.project_name like concat('%', #{projectName}, '%')</if> <if test="projectName != null and projectName != ''"> and pi.project_name like concat('%', #{projectName}, '%')</if>
<if test="projectCode != null and projectCode != ''"> and pi.project_code = #{projectCode}</if> <if test="projectCode != null and projectCode != ''"> and pi.project_code = #{projectCode}</if>
<if test="simpleName != null and simpleName != ''"> and pi.simple_name like concat('%', #{simpleName}, '%')</if> <if test="simpleName != null and simpleName != ''"> and pi.simple_name like concat('%', #{simpleName}, '%')</if>
@ -357,13 +356,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from pro_project_info pi from pro_project_info pi
left join pro_project_info_setting ps on pi.id=ps.project_id left join pro_project_info_setting ps on pi.id=ps.project_id
left join sys_dict_data sdd1 on sdd1.dict_value = pi.project_type and sdd1.dict_type='pro_project_type' left join sys_dict_data sdd1 on sdd1.dict_value = pi.project_type and sdd1.dict_type='pro_project_type'
<if test="currentUserId != null "> left join pro_project_info_users pu on pu.project_id = pi.id </if>
<if test="currentUserId != null "> left join pro_project_info_subdepts_users psu on psu.project_id = pi.id </if> <if test="currentUserId != null "> left join pro_project_info_subdepts_users psu on psu.project_id = pi.id </if>
<where> <where>
<if test="comId != null "> and pi.com_id = #{comId}</if> <if test="comId != null "> and pi.com_id = #{comId}</if>
<if test="disDeptId != null "> and pi.dis_dept_id = #{disDeptId}</if> <if test="disDeptId != null "> and pi.dis_dept_id = #{disDeptId}</if>
<if test="activeComId != null "> and pi.com_id = #{activeComId}</if> <if test="activeComId != null "> and pi.com_id = #{activeComId}</if>
<if test="currentUserId != null"> and ((pu.user_id = #{currentUserId} and pu.use_status='1' and pu.is_del=0) or (psu.user_id = #{currentUserId} and approve_status <![CDATA[ >= ]]> 100 and psu.user_id = #{currentUserId} and psu.use_status='1' and psu.is_del=0))</if> <if test="currentUserId != null"> and psu.user_id = #{currentUserId} and psu.approve_status <![CDATA[ >= ]]> 100 and psu.user_id = #{currentUserId} and psu.use_status='0' and psu.is_del=0</if>
<if test="projectName != null and projectName != ''"> and pi.project_name like concat('%', #{projectName}, '%')</if> <if test="projectName != null and projectName != ''"> and pi.project_name like concat('%', #{projectName}, '%')</if>
<if test="projectCode != null and projectCode != ''"> and pi.project_code = #{projectCode}</if> <if test="projectCode != null and projectCode != ''"> and pi.project_code = #{projectCode}</if>
<if test="simpleName != null and simpleName != ''"> and pi.simple_name like concat('%', #{simpleName}, '%')</if> <if test="simpleName != null and simpleName != ''"> and pi.simple_name like concat('%', #{simpleName}, '%')</if>

View File

@ -92,6 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="illnessStatus != null "> and psu.illness_status = #{illnessStatus}</if> <if test="illnessStatus != null "> and psu.illness_status = #{illnessStatus}</if>
<if test="supIllnessStatus != null "> and psu.sup_illness_status = #{supIllnessStatus}</if> <if test="supIllnessStatus != null "> and psu.sup_illness_status = #{supIllnessStatus}</if>
<if test="userPhone != null and userPhone != ''"> and psu.user_phone = #{userPhone}</if> <if test="userPhone != null and userPhone != ''"> and psu.user_phone = #{userPhone}</if>
<if test='activeTags == "finished"'> and psu.approve_status <![CDATA[ >= ]]> 100 </if>
<if test="isDel != null "> and psu.is_del = #{isDel}</if> <if test="isDel != null "> and psu.is_del = #{isDel}</if>
and psu.is_del != 2 and psu.is_del != 2
</where> </where>
@ -230,6 +231,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="subStep != null">sub_step = #{subStep},</if> <if test="subStep != null">sub_step = #{subStep},</if>
<if test="illnessStatus != null">illness_status = #{illnessStatus},</if> <if test="illnessStatus != null">illness_status = #{illnessStatus},</if>
<if test="supIllnessStatus != null">sup_illness_status = #{supIllnessStatus},</if> <if test="supIllnessStatus != null">sup_illness_status = #{supIllnessStatus},</if>
<if test="sortBy != null">sort_by = #{sortBy},</if>
<if test="isDel != null">is_del = #{isDel},</if> <if test="isDel != null">is_del = #{isDel},</if>
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
@ -331,10 +333,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<update id="updateUseStatusByParams"> <update id="updateUseStatusByParams">
update pro_project_info_subdepts_group set use_status = 2 update pro_project_info_subdepts_users set use_status = 2
where 1=1 where 1=1
<if test="subDeptId != null "> and sub_dept_id = #{subDeptId}</if> <if test="subDeptId != null "> and sub_dept_id = #{subDeptId}</if>
<if test="subDeptGroupId != null "> and u.sub_dept_group = #{subDeptGroupId}</if> <if test="subDeptGroupId != null "> and sub_dept_group = #{subDeptGroupId}</if>
</update>
<update id="editDefaultProjectById">
update pro_project_info_subdepts_group set sort_by = project_id where user_id = #{userId}
</update> </update>
</mapper> </mapper>

View File

@ -11,13 +11,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="deptId" column="dept_id" /> <result property="deptId" column="dept_id" />
<result property="userName" column="user_name" /> <result property="userName" column="user_name" />
<result property="nickName" column="nick_name" /> <result property="nickName" column="nick_name" />
<result property="userType" column="user_type" /> <result property="userType" column="user_type" />
<result property="cardType" column="card_type" /> <result property="cardCode" column="card_code" />
<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="email" column="email" /> <result property="email" column="email" />
<result property="phonenumber" column="phonenumber" /> <result property="phonenumber" column="phonenumber" />
<result property="sex" column="sex" /> <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="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="admitGuid" column="admitGuid"/>
<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult" /> <association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult" />
<association property="comp" column="com_id" javaType="SysDept" resultMap="compResult" /> <association property="comp" column="com_id" javaType="SysDept" resultMap="compResult" />
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" /> <collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
@ -66,9 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectUserVo"> <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, 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,
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,
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, 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 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 from sys_user u
@ -79,9 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql> </sql>
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult"> <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, 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
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
left join sys_dept d on u.dept_id = d.dept_id left join sys_dept d on u.dept_id = d.dept_id
where u.del_flag = '0' where u.del_flag = '0'
<if test="userId != null and userId != 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 != ''"> <if test="userName != null and userName != ''">
AND u.user_name like concat('%', #{userName}, '%') AND u.user_name like concat('%', #{userName}, '%')
</if> </if>
<if test="admitGuid != null and admitGuid != ''">
AND u.admitGuid =#{admitGuid}
</if>
<if test="userName != null and userName != ''"> <if test="userName != null and userName != ''">
AND u.user_name like concat('%', #{userName}, '%') AND u.user_name like concat('%', #{userName}, '%')
</if> </if>
<if test="nickName != null and nickName != ''"> <if test="nickName != null and nickName != ''">
AND u.nick_name = #{nickName} AND u.nick_name = #{nickName}
</if> </if>
<if test="cardCode != null and cardCode != ''">
AND u.card_code like concat('%', #{cardCode}, '%')
</if>
<if test="status != null and status != ''"> <if test="status != null and status != ''">
AND u.status = #{status} AND u.status = #{status}
</if> </if>
@ -122,8 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult"> <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, 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
u.user_type, u.card_type, u.card_code, u.email, u.phonenumber, u.status, u.create_time
from sys_user u from sys_user u
left join sys_dept d on u.dept_id = d.dept_id 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 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>
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult"> <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, 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
u.card_type, u.card_code, u.email, u.phonenumber, u.status, u.create_time
from sys_user u from sys_user u
left join sys_dept d on u.dept_id = d.dept_id 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 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="userName != null and userName != ''">user_name,</if>
<if test="nickName != null and nickName != ''">nick_name,</if> <if test="nickName != null and nickName != ''">nick_name,</if>
<if test="userType != null and userType != ''">user_type,</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="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="email != null and email != ''">email,</if>
<if test="avatar != null and avatar != ''">avatar,</if> <if test="avatar != null and avatar != ''">avatar,</if>
<if test="phonenumber != null and phonenumber != ''">phonenumber,</if> <if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
<if test="sex != null and sex != ''">sex,</if> <if test="sex != null and sex != ''">sex,</if>
<if test="password != null and password != ''">password,</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="status != null and status != ''">status,</if>
<if test="createBy != null and createBy != ''">create_by,</if> <if test="createBy != null and createBy != ''">create_by,</if>
<if test="remark != null and remark != ''">remark,</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="userName != null and userName != ''">#{userName},</if>
<if test="nickName != null and nickName != ''">#{nickName},</if> <if test="nickName != null and nickName != ''">#{nickName},</if>
<if test="userType != null and userType != ''">#{userType},</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="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="email != null and email != ''">#{email},</if>
<if test="avatar != null and avatar != ''">#{avatar},</if> <if test="avatar != null and avatar != ''">#{avatar},</if>
<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if> <if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
<if test="sex != null and sex != ''">#{sex},</if> <if test="sex != null and sex != ''">#{sex},</if>
<if test="password != null and password != ''">#{password},</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="status != null and status != ''">#{status},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if> <if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="remark != null and remark != ''">#{remark},</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="deptId != null and deptId != 0">dept_id = #{deptId},</if>
<if test="userName != null and userName != ''">user_name = #{userName},</if> <if test="userName != null and userName != ''">user_name = #{userName},</if>
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if> <if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
<if test="userType != null and userType != ''">user_type = #{userType},</if> <if test="userType != null ">userType = #{userType},</if>
<if test="cardType != null and cardType != ''">card_type = #{cardType},</if> <if test="cardCode != null ">cardCode = #{cardCode},</if>
<if test="cardCode != null and cardCode != ''">card_code = #{cardCode},</if> <if test="email != null ">email = #{email},</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="phonenumber != null ">phonenumber = #{phonenumber},</if> <if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
<if test="sex != null and sex != ''">sex = #{sex},</if> <if test="sex != null and sex != ''">sex = #{sex},</if>
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if> <if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
<if test="password != null and password != ''">password = #{password},</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="status != null and status != ''">status = #{status},</if>
<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if> <if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
<if test="loginDate != null">login_date = #{loginDate},</if> <if test="loginDate != null">login_date = #{loginDate},</if>
@ -299,10 +263,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--根据用户编号查询入场项目信息--> <!--根据用户编号查询入场项目信息-->
<select id="selectProjectsByUserId" parameterType="Long" resultType="Map"> <select id="selectProjectsByUserId" parameterType="Long" resultType="Map">
select pi.com_id, sd.dept_name as com_name, pu.project_id, pi.project_name from pro_project_info_users pu select pi.com_id, sd.dept_name as com_name, pu.project_id, pi.project_name from pro_project_info_subdepts_users pu
left join pro_project_info pi on pi.id = pu.project_id left join pro_project_info pi on pi.id = pu.project_id
left join sys_dept sd on sd.dept_id = pi.com_id left join sys_dept sd on sd.dept_id = pi.com_id
where pu.user_id=#{userId} and pu.is_del=0 and pu.use_status=1 order by pu.sort_by asc where pu.user_id=#{userId} and pu.approve_status <![CDATA[ >= ]]> 100 and pu.is_del=0 and pu.use_status=0 order by pu.sort_by asc
</select> </select>
</mapper> </mapper>

View File

@ -1,5 +1,6 @@
package com.yanzhu.manage.controller; package com.yanzhu.manage.controller;
import com.yanzhu.common.core.text.Convert;
import com.yanzhu.common.core.utils.poi.ExcelUtil; import com.yanzhu.common.core.utils.poi.ExcelUtil;
import com.yanzhu.common.core.web.controller.BaseController; import com.yanzhu.common.core.web.controller.BaseController;
import com.yanzhu.common.core.web.domain.AjaxResult; import com.yanzhu.common.core.web.domain.AjaxResult;
@ -8,12 +9,14 @@ import com.yanzhu.common.log.annotation.Log;
import com.yanzhu.common.log.enums.BusinessType; import com.yanzhu.common.log.enums.BusinessType;
import com.yanzhu.common.security.annotation.RequiresPermissions; import com.yanzhu.common.security.annotation.RequiresPermissions;
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsGroup; import com.yanzhu.manage.domain.ProProjectInfoSubdeptsGroup;
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers;
import com.yanzhu.manage.service.IProProjectInfoSubdeptsGroupService; import com.yanzhu.manage.service.IProProjectInfoSubdeptsGroupService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
import java.util.Objects;
/** /**
* Controller * Controller
@ -85,6 +88,17 @@ public class ProProjectInfoSubdeptsGroupController extends BaseController
return toAjax(proProjectInfoSubdeptsGroupService.updateProProjectInfoSubdeptsGroup(proProjectInfoSubdeptsGroup)); return toAjax(proProjectInfoSubdeptsGroupService.updateProProjectInfoSubdeptsGroup(proProjectInfoSubdeptsGroup));
} }
/**
*
* @param proProjectInfoSubdeptsGroup
* @return
*/
@RequiresPermissions("manage:proProjectInfoSubdeptsGroup:edit")
@PostMapping("/updateGroupLeader")
public AjaxResult updateGroupLeader(@RequestBody ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup){
return toAjax(proProjectInfoSubdeptsGroupService.updateGroupLeader(proProjectInfoSubdeptsGroup));
}
/** /**
* / * /
*/ */

View File

@ -1,6 +1,7 @@
package com.yanzhu.manage.controller; package com.yanzhu.manage.controller;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.yanzhu.common.core.domain.R;
import com.yanzhu.common.core.text.Convert; import com.yanzhu.common.core.text.Convert;
import com.yanzhu.common.core.utils.DateUtils; import com.yanzhu.common.core.utils.DateUtils;
import com.yanzhu.common.core.utils.poi.ExcelUtil; import com.yanzhu.common.core.utils.poi.ExcelUtil;
@ -20,6 +21,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Objects; import java.util.Objects;
/** /**
@ -145,13 +147,25 @@ public class ProProjectInfoSubdeptsUsersController extends BaseController
return success(); return success();
} }
/**
*
*/
@InnerAuth
@PostMapping("/syspushSubDeptsUser")
public AjaxResult syspushSubDeptsUser(@RequestBody ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers)
{
proProjectInfoSubdeptsUsersService.pushSubdeptsUsers(proProjectInfoSubdeptsUsers);
return success();
}
/** /**
* *
* @param ids * @param ids
* @param state * @param state
* @return * @return
*/ */
@RequiresPermissions("manage:proProjectInfoSubdeptsUsers:remove") @RequiresPermissions("manage:proProjectInfoSubdeptsUsers:edit")
@PostMapping("/enterState/{state}") @PostMapping("/enterState/{state}")
public AjaxResult updateEnterState(@RequestBody List<Long> ids,@PathVariable int state){ public AjaxResult updateEnterState(@RequestBody List<Long> ids,@PathVariable int state){
try { try {
@ -197,4 +211,14 @@ public class ProProjectInfoSubdeptsUsersController extends BaseController
List<ProProjectInfoSubdeptsUsers> list = proProjectInfoSubdeptsUsersService.findAllProSubDeptsUser(proProjectInfoSubdeptsUsers); List<ProProjectInfoSubdeptsUsers> list = proProjectInfoSubdeptsUsersService.findAllProSubDeptsUser(proProjectInfoSubdeptsUsers);
return success(list); return success(list);
} }
/**
*
*/
@GetMapping("/changeDefaultProject/{id}")
public AjaxResult changeDefaultProject(@PathVariable("id") Long id)
{
return toAjax(proProjectInfoSubdeptsUsersService.editDefaultProjectById(id));
}
} }

View File

@ -8,7 +8,16 @@ public enum UserPostEnums {
WTDL("1", "委托代理"), WTDL("1", "委托代理"),
XMJL("2", "项目经理"), XMJL("2", "项目经理"),
BZZ("3", "班组长"), 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 code;
private final String info; private final String info;

View File

@ -43,6 +43,13 @@ public interface IProProjectInfoSubdeptsGroupService
*/ */
public int updateProProjectInfoSubdeptsGroup(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup); public int updateProProjectInfoSubdeptsGroup(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup);
/**
*
* @param proProjectInfoSubdeptsGroup
* @return
*/
public int updateGroupLeader(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup);
/** /**
* *
* @param id * @param id

View File

@ -88,7 +88,6 @@ public interface IProProjectInfoSubdeptsUsersService
public int deleteProProjectInfoSubdeptsUsersById(Long id); public int deleteProProjectInfoSubdeptsUsersById(Long id);
/** /**
<<<<<<< HEAD
* *
* @param proId * @param proId
* @param phoneNumber * @param phoneNumber
@ -113,6 +112,14 @@ public interface IProProjectInfoSubdeptsUsersService
*/ */
public void approveSubDeptsUser(Long id); public void approveSubDeptsUser(Long id);
/**
*
*
* @param proProjectInfoSubdeptsUsers
* @return
*/
public void pushSubdeptsUsers(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers);
/** /**
* -- * --
* @param proProjectInfoSubdeptsUsers * @param proProjectInfoSubdeptsUsers
@ -132,4 +139,12 @@ public interface IProProjectInfoSubdeptsUsersService
* @param proId * @param proId
*/ */
List<Map<String,Object>> statsSubDeptsUsersByProId(Long proId); List<Map<String,Object>> statsSubDeptsUsersByProId(Long proId);
/**
*
*
* @param id
* @return
*/
int editDefaultProjectById(Long id);
} }

View File

@ -1,6 +1,7 @@
package com.yanzhu.manage.service.impl; package com.yanzhu.manage.service.impl;
import cn.binarywang.wx.miniapp.api.WxMaService; import cn.binarywang.wx.miniapp.api.WxMaService;
import com.yanzhu.common.core.annotation.Excel;
import com.yanzhu.common.core.constant.SecurityConstants; import com.yanzhu.common.core.constant.SecurityConstants;
import com.yanzhu.common.core.enums.*; import com.yanzhu.common.core.enums.*;
import com.yanzhu.common.core.exception.ServiceException; import com.yanzhu.common.core.exception.ServiceException;
@ -147,7 +148,7 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
subdeptsUser.setCraftType(proProjectInfoSubdeptsGroup.getCraftType()); subdeptsUser.setCraftType(proProjectInfoSubdeptsGroup.getCraftType());
subdeptsUser.setCraftPost(proProjectInfoSubdeptsGroup.getCraftPost()); subdeptsUser.setCraftPost(proProjectInfoSubdeptsGroup.getCraftPost());
subdeptsUser.setEduStatus(ShiFouEnums.FOU.getCodeStr()); subdeptsUser.setEduStatus(ShiFouEnums.FOU.getCodeStr());
subdeptsUser.setSubStep(1L); subdeptsUser.setSubStep(2L);
subdeptsUser.setUseStatus(UseStateEnums.IN.getCode()); subdeptsUser.setUseStatus(UseStateEnums.IN.getCode());
subdeptsUser.setCreateBy(SecurityUtils.getUsername()); subdeptsUser.setCreateBy(SecurityUtils.getUsername());
subdeptsUser.setApproveStatus(ApproveStatus.passed.getCode()); subdeptsUser.setApproveStatus(ApproveStatus.passed.getCode());
@ -253,7 +254,7 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
subdeptsUser.setCraftPost(proProjectInfoSubdeptsGroup.getCraftPost()); subdeptsUser.setCraftPost(proProjectInfoSubdeptsGroup.getCraftPost());
subdeptsUser.setDegreeGrade(proProjectInfoSubdeptsGroup.getGroupLeaderDegreeGrade()); subdeptsUser.setDegreeGrade(proProjectInfoSubdeptsGroup.getGroupLeaderDegreeGrade());
subdeptsUser.setEduStatus(ShiFouEnums.FOU.getCodeStr()); subdeptsUser.setEduStatus(ShiFouEnums.FOU.getCodeStr());
subdeptsUser.setSubStep(1L); subdeptsUser.setSubStep(2L);
subdeptsUser.setCreateBy(SecurityUtils.getUsername()); subdeptsUser.setCreateBy(SecurityUtils.getUsername());
subdeptsUser.setApproveStatus(ApproveStatus.passed.getCode()); subdeptsUser.setApproveStatus(ApproveStatus.passed.getCode());
subdeptsUser.setCreateTime(DateUtils.getNowDate()); subdeptsUser.setCreateTime(DateUtils.getNowDate());
@ -304,13 +305,93 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
} }
} }
} }
return res; return res;
} }
} }
return res; return res;
} }
/**
*
* @param proProjectInfoSubdeptsGroup
* @return
*/
@Override
@Transactional
public int updateGroupLeader(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup){
int res = 1;
ProProjectInfoSubdeptsGroup entiry = proProjectInfoSubdeptsGroupMapper.selectProProjectInfoSubdeptsGroupById(proProjectInfoSubdeptsGroup.getId());
if(StringUtils.isEmpty(entiry.getGroupLeaderPhone()) || !Objects.equals(entiry.getGroupLeaderPhone(),proProjectInfoSubdeptsGroup.getGroupLeaderPhone())){
// 删除旧班组长角色信息
if(StringUtils.isNotEmpty(entiry.getGroupLeaderPhone())){
ProProjectInfoSubdeptsUsers oldQuery = new ProProjectInfoSubdeptsUsers();
oldQuery.setProjectId(entiry.getProjectId());
oldQuery.setSubDeptId(entiry.getSubDeptId());
oldQuery.setUserPhone(entiry.getGroupLeaderPhone());
List<ProProjectInfoSubdeptsUsers> dataList = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(oldQuery);
ProProjectInfoSubdeptsUsers oldUser = dataList.get(0);
oldUser.setUserPost(UserPostEnums.LWGR.getCode());
oldUser.setQrCode("");
proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(oldUser);
try {
SysUser sysUser = new SysUser();
sysUser.setUserName(entiry.getGroupLeaderPhone());
sysUser.setActiveProjectId(proProjectInfoSubdeptsGroup.getProjectId());
remoteUserService.removeUserRoles(sysUser, SecurityConstants.INNER);
}catch (Exception e){
e.printStackTrace();
}
}
ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers();
query.setProjectId(proProjectInfoSubdeptsGroup.getProjectId());
query.setSubDeptId(proProjectInfoSubdeptsGroup.getSubDeptId());
query.setUserPhone(proProjectInfoSubdeptsGroup.getGroupLeaderPhone());
List<ProProjectInfoSubdeptsUsers> dataList = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(query);
ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers = dataList.get(0);
entiry.setGroupLeaderName(proProjectInfoSubdeptsUsers.getUserName());
entiry.setGroupLeaderCode(proProjectInfoSubdeptsUsers.getCardCode());
entiry.setGroupLeaderPhone(proProjectInfoSubdeptsUsers.getUserPhone());
entiry.setUpdateBy(SecurityUtils.getUsername());
entiry.setUpdateTime(DateUtils.getNowDate());
res = proProjectInfoSubdeptsGroupMapper.updateProProjectInfoSubdeptsGroup(entiry);
if(res > 0){
proProjectInfoSubdeptsUsers.setUserPost(UserPostEnums.BZZ.getCode());
proProjectInfoSubdeptsUsers.setSubDeptGroup(entiry.getId());
proProjectInfoSubdeptsUsers.setSubDeptGroupName(entiry.getGroupName());
// 设置班组长二维码信息...
try {
String accessToken = wxMaService.getAccessToken();
String filePath = DateUtils.datePath()+"/"+System.currentTimeMillis()+".png";
String savePath = ProfileConfig.profilePath+"/"+filePath;
String profilePath = ProfileConfig.profile+"/"+filePath;
// 生成二维码
File file = wxMaService.getQrcodeService().createQrcode("pages/project_qr/index?SIGID=4&QRPID="+proProjectInfoSubdeptsUsers.getProjectId()+"&PARID="+proProjectInfoSubdeptsUsers.getId(),280);
FileUtil.copyFile(file,new File(savePath));
proProjectInfoSubdeptsUsers.setQrCode(profilePath);
proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
}catch (Exception e){
log.error(e.getMessage());
}
// 修改用户角色信息
try {
SysUser sysUser = new SysUser();
sysUser.setUserName(entiry.getGroupLeaderPhone());
sysUser.setUserType(UserTypeEnums.FBBZZZ.getCode());
sysUser.setNickName(entiry.getGroupLeaderName());
sysUser.setPhonenumber(entiry.getGroupLeaderPhone());
sysUser.setUpdateBy(SecurityUtils.getUsername());
sysUser.setUpdateTime(DateUtils.getNowDate());
sysUser.setRemark(entiry.getSubDeptName());
sysUser.setActiveProjectId(entiry.getProjectId());
remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
}catch (Exception e){
e.printStackTrace();
}
}
}
return res;
}
/** /**
* *
* @param id * @param id
@ -318,6 +399,7 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
* @return * @return
*/ */
@Override @Override
@Transactional
public int updateUseStatus(Long id, String status){ public int updateUseStatus(Long id, String status){
if(StringUtils.isNotEmpty(status)){ if(StringUtils.isNotEmpty(status)){
ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup = proProjectInfoSubdeptsGroupMapper.selectProProjectInfoSubdeptsGroupById(id); ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup = proProjectInfoSubdeptsGroupMapper.selectProProjectInfoSubdeptsGroupById(id);

View File

@ -174,7 +174,7 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
subdeptsUser.setCraftType(CraftTypeEnums.GLRY.getCode()); subdeptsUser.setCraftType(CraftTypeEnums.GLRY.getCode());
subdeptsUser.setCraftPost(CraftPostEnums.WTDL.getCode()); subdeptsUser.setCraftPost(CraftPostEnums.WTDL.getCode());
subdeptsUser.setEduStatus(ShiFouEnums.FOU.getCodeStr()); subdeptsUser.setEduStatus(ShiFouEnums.FOU.getCodeStr());
subdeptsUser.setSubStep(1L); subdeptsUser.setSubStep(2L);
subdeptsUser.setCreateBy(SecurityUtils.getUsername()); subdeptsUser.setCreateBy(SecurityUtils.getUsername());
subdeptsUser.setApproveStatus(ApproveStatus.passed.getCode()); subdeptsUser.setApproveStatus(ApproveStatus.passed.getCode());
subdeptsUser.setCreateTime(DateUtils.getNowDate()); subdeptsUser.setCreateTime(DateUtils.getNowDate());
@ -224,6 +224,7 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
SysUser sysUser = new SysUser(); SysUser sysUser = new SysUser();
sysUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone()); sysUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone());
sysUser.setNickName(proProjectInfoSubdepts.getSubDeptLeaderName()); sysUser.setNickName(proProjectInfoSubdepts.getSubDeptLeaderName());
sysUser.setUserType(UserTypeEnums.FBWTDL.getCode());
sysUser.setPhonenumber(proProjectInfoSubdepts.getSubDeptLeaderPhone()); sysUser.setPhonenumber(proProjectInfoSubdepts.getSubDeptLeaderPhone());
sysUser.setUpdateBy(DataSourceEnuns.APP.getInfo()); sysUser.setUpdateBy(DataSourceEnuns.APP.getInfo());
sysUser.setUpdateTime(DateUtils.getNowDate()); sysUser.setUpdateTime(DateUtils.getNowDate());
@ -278,7 +279,7 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
subdeptsUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode()); subdeptsUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode());
subdeptsUser.setUserPhone(proProjectInfoSubdepts.getSubDeptLeaderPhone()); subdeptsUser.setUserPhone(proProjectInfoSubdepts.getSubDeptLeaderPhone());
subdeptsUser.setUserPicture(proProjectInfoSubdepts.getLeaderUserPicture()); subdeptsUser.setUserPicture(proProjectInfoSubdepts.getLeaderUserPicture());
subdeptsUser.setUserSex(StringUtils.judgeGender(proProjectInfoSubdepts.getSubDeptLeaderCode())); subdeptsUser.setUserSex(StringUtils.judgeGenderText(proProjectInfoSubdepts.getSubDeptLeaderCode()));
subdeptsUser.setDegreeGrade(proProjectInfoSubdepts.getLeaderDegreeGrade()); subdeptsUser.setDegreeGrade(proProjectInfoSubdepts.getLeaderDegreeGrade());
subdeptsUser.setUserInfos(proProjectInfoSubdepts.getLeaderUserInfos()); subdeptsUser.setUserInfos(proProjectInfoSubdepts.getLeaderUserInfos());
subdeptsUser.setCraftType(CraftTypeEnums.GLRY.getCode()); subdeptsUser.setCraftType(CraftTypeEnums.GLRY.getCode());
@ -462,6 +463,7 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
* @return * @return
*/ */
@Override @Override
@Transactional
public int updateUseStatus(Long id, String status){ public int updateUseStatus(Long id, String status){
if(StringUtils.isNotEmpty(status)){ if(StringUtils.isNotEmpty(status)){
ProProjectInfoSubdepts proProjectInfoSubdepts = proProjectInfoSubdeptsMapper.selectProProjectInfoSubdeptsById(id); ProProjectInfoSubdepts proProjectInfoSubdepts = proProjectInfoSubdeptsMapper.selectProProjectInfoSubdeptsById(id);

View File

@ -11,10 +11,7 @@ import com.yanzhu.common.core.utils.StringUtils;
import com.yanzhu.common.security.utils.SecurityUtils; import com.yanzhu.common.security.utils.SecurityUtils;
import com.yanzhu.manage.config.ProfileConfig; import com.yanzhu.manage.config.ProfileConfig;
import com.yanzhu.manage.domain.*; import com.yanzhu.manage.domain.*;
import com.yanzhu.manage.enums.CraftPostEnums; import com.yanzhu.manage.enums.*;
import com.yanzhu.manage.enums.CraftTypeEnums;
import com.yanzhu.manage.enums.SignetKeyEnums;
import com.yanzhu.manage.enums.UserPostEnums;
import com.yanzhu.manage.mapper.*; import com.yanzhu.manage.mapper.*;
import com.yanzhu.manage.service.IProProjectInfoSubdeptsUsersService; import com.yanzhu.manage.service.IProProjectInfoSubdeptsUsersService;
import com.yanzhu.manage.service.IUniService; import com.yanzhu.manage.service.IUniService;
@ -119,18 +116,10 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
@Override @Override
public int insertProProjectInfoSubdeptsUsers(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers) 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.setUseStatus(UseStateEnums.IN.getCode());
proProjectInfoSubdeptsUsers.setCreateBy(SecurityUtils.getUsername()); proProjectInfoSubdeptsUsers.setCreateBy(SecurityUtils.getUsername());
proProjectInfoSubdeptsUsers.setCreateTime(DateUtils.getNowDate()); proProjectInfoSubdeptsUsers.setCreateTime(DateUtils.getNowDate());
proProjectInfoSubdeptsUsers.setSubStep(1L); proProjectInfoSubdeptsUsers.setSubStep(2L);
proProjectInfoSubdeptsUsers.setApproveStatus(ApproveStatus.passed.getCode()); proProjectInfoSubdeptsUsers.setApproveStatus(ApproveStatus.passed.getCode());
SysUser sysUser = new SysUser(); SysUser sysUser = new SysUser();
@ -141,7 +130,51 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
sysUser.setUpdateTime(DateUtils.getNowDate()); sysUser.setUpdateTime(DateUtils.getNowDate());
sysUser.setComId(proProjectInfoSubdeptsUsers.getComId()); sysUser.setComId(proProjectInfoSubdeptsUsers.getComId());
sysUser.setDeptId(proProjectInfoSubdeptsUsers.getProjectId()); 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()); sysUser.setActiveProjectId(proProjectInfoSubdeptsUsers.getProjectId());
R<Long> obj= remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER); R<Long> obj= remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
Long userId= obj.getData(); Long userId= obj.getData();
@ -149,7 +182,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
proProjectInfoSubdeptsUsers.setUserId(userId); proProjectInfoSubdeptsUsers.setUserId(userId);
int res = proProjectInfoSubdeptsUsersMapper.insertProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers); int res = proProjectInfoSubdeptsUsersMapper.insertProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
uniService.syncUniUser(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 { try {
String accessToken = wxMaService.getAccessToken(); String accessToken = wxMaService.getAccessToken();
@ -174,6 +207,71 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
return res; 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.setSubDeptId(parUsers.getSubDeptId());
proProjectInfoSubdeptsUsers.setSubDeptName(parUsers.getSubDeptName()); proProjectInfoSubdeptsUsers.setSubDeptName(parUsers.getSubDeptName());
proProjectInfoSubdeptsUsers.setSubDeptType(parUsers.getSubDeptType()); proProjectInfoSubdeptsUsers.setSubDeptType(parUsers.getSubDeptType());
proProjectInfoSubdeptsUsers.setCardType(CardTypeEnums.SFZ.getCode());
proProjectInfoSubdeptsUsers.setUserSex(StringUtils.judgeGenderText(proProjectInfoSubdeptsUsers.getCardCode()));
proProjectInfoSubdeptsUsers.setUseStatus(UseStateEnums.AW.getCode()); proProjectInfoSubdeptsUsers.setUseStatus(UseStateEnums.AW.getCode());
proProjectInfoSubdeptsUsers.setCreateBy(DataSourceEnuns.APP.getInfo()); proProjectInfoSubdeptsUsers.setCreateBy(DataSourceEnuns.APP.getInfo());
proProjectInfoSubdeptsUsers.setCreateTime(DateUtils.getNowDate()); proProjectInfoSubdeptsUsers.setCreateTime(DateUtils.getNowDate());
proProjectInfoSubdeptsUsers.setSubStep(1L); proProjectInfoSubdeptsUsers.setSubStep(1L);
proProjectInfoSubdeptsUsers.setApproveStatus(ApproveStatus.await.getCode()); proProjectInfoSubdeptsUsers.setApproveStatus(ApproveStatus.await.getCode());
// 完善人员信息...
SysUser sysUser = new SysUser();
// 班组信息处理 // 班组信息处理
if(Objects.nonNull(proProjectInfoSubdeptsUsers.getUserPost())){ if(Objects.nonNull(proProjectInfoSubdeptsUsers.getUserPost())){
// 班组长新增班组 if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(), UserPostEnums.XMJL.getCode())){
if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(), UserPostEnums.BZZ.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(); ProProjectInfoSubdeptsGroup query = new ProProjectInfoSubdeptsGroup();
query.setProjectId(proProjectInfoSubdeptsUsers.getProjectId()); query.setProjectId(proProjectInfoSubdeptsUsers.getProjectId());
query.setSubDeptId(proProjectInfoSubdeptsUsers.getSubDeptId()); query.setSubDeptId(proProjectInfoSubdeptsUsers.getSubDeptId());
@ -229,14 +348,17 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
proProjectInfoSubdeptsGroupMapper.insertProProjectInfoSubdeptsGroup(proSubdeptsGroup); proProjectInfoSubdeptsGroupMapper.insertProProjectInfoSubdeptsGroup(proSubdeptsGroup);
proProjectInfoSubdeptsUsers.setSubDeptGroup(proSubdeptsGroup.getId()); proProjectInfoSubdeptsUsers.setSubDeptGroup(proSubdeptsGroup.getId());
proProjectInfoSubdeptsUsers.setSubDeptGroupName(proSubdeptsGroup.getGroupName()); proProjectInfoSubdeptsUsers.setSubDeptGroupName(proSubdeptsGroup.getGroupName());
sysUser.setUserType(UserTypeEnums.FBBZZZ.getCode());
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(), UserPostEnums.LWGR.getCode())){ }else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(), UserPostEnums.LWGR.getCode())){
// 劳务人员绑定班组信息 // 劳务人员绑定班组信息
proProjectInfoSubdeptsUsers.setSubDeptGroup(parUsers.getSubDeptGroup()); proProjectInfoSubdeptsUsers.setSubDeptGroup(parUsers.getSubDeptGroup());
proProjectInfoSubdeptsUsers.setSubDeptGroupName(parUsers.getSubDeptGroupName()); proProjectInfoSubdeptsUsers.setSubDeptGroupName(parUsers.getSubDeptGroupName());
sysUser.setUserType(UserTypeEnums.FBLWRY.getCode());
} }
} }
// 完善人员信息...
SysUser sysUser = new SysUser();
sysUser.setUserName(proProjectInfoSubdeptsUsers.getUserPhone()); sysUser.setUserName(proProjectInfoSubdeptsUsers.getUserPhone());
sysUser.setNickName(proProjectInfoSubdeptsUsers.getUserName()); sysUser.setNickName(proProjectInfoSubdeptsUsers.getUserName());
sysUser.setPhonenumber(proProjectInfoSubdeptsUsers.getUserPhone()); sysUser.setPhonenumber(proProjectInfoSubdeptsUsers.getUserPhone());
@ -300,10 +422,28 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
if(Objects.isNull(proProjectInfoSubdeptsUsers.getApproveStatus())){ if(Objects.isNull(proProjectInfoSubdeptsUsers.getApproveStatus())){
proProjectInfoSubdeptsUsers.setApproveStatus(ApproveStatus.await.getCode()); proProjectInfoSubdeptsUsers.setApproveStatus(ApproveStatus.await.getCode());
} }
// 完善人员信息...
SysUser sysUser = new SysUser();
// 班组信息处理 // 班组信息处理
if(Objects.nonNull(proProjectInfoSubdeptsUsers.getUserPost())){ 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(); ProProjectInfoSubdeptsGroup query = new ProProjectInfoSubdeptsGroup();
query.setProjectId(proProjectInfoSubdeptsUsers.getProjectId()); query.setProjectId(proProjectInfoSubdeptsUsers.getProjectId());
query.setSubDeptId(proProjectInfoSubdeptsUsers.getSubDeptId()); query.setSubDeptId(proProjectInfoSubdeptsUsers.getSubDeptId());
@ -373,12 +513,22 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
proProjectInfoSubdeptsUsers.setSubDeptGroup(proSubdeptsGroup.getId()); proProjectInfoSubdeptsUsers.setSubDeptGroup(proSubdeptsGroup.getId());
proProjectInfoSubdeptsUsers.setSubDeptGroupName(proSubdeptsGroup.getGroupName()); proProjectInfoSubdeptsUsers.setSubDeptGroupName(proSubdeptsGroup.getGroupName());
} }
sysUser.setUserType(UserTypeEnums.FBBZZZ.getCode());
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(), UserPostEnums.LWGR.getCode())){ }else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(), UserPostEnums.LWGR.getCode())){
// 劳务人员绑定班组信息 // 劳务人员绑定班组信息
proProjectInfoSubdeptsUsers.setSubDeptGroup(parUsers.getSubDeptGroup()); proProjectInfoSubdeptsUsers.setSubDeptGroup(parUsers.getSubDeptGroup());
proProjectInfoSubdeptsUsers.setSubDeptGroupName(parUsers.getSubDeptGroupName()); 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); proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
return proProjectInfoSubdeptsUsers; return proProjectInfoSubdeptsUsers;
@ -625,7 +775,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
private Map<String, Object> getUserDataMap(ProProjectInfoSubdeptsUsers proSubdeptsUser,String signPath){ private Map<String, Object> getUserDataMap(ProProjectInfoSubdeptsUsers proSubdeptsUser,String signPath){
Map<String, Object> dataMap = new HashMap<>(); Map<String, Object> dataMap = new HashMap<>();
dataMap.put("fName",proSubdeptsUser.getUserName()); 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("fAge",StringUtils.getAgeFromIdCard(proSubdeptsUser.getCardCode()));
dataMap.put("fCode",proSubdeptsUser.getCardCode()); dataMap.put("fCode",proSubdeptsUser.getCardCode());
dataMap.put("fIllnessStatus",Objects.equals(ShiFouEnums.FOU.getCode(),proSubdeptsUser.getIllnessStatus())?"无":"有"); dataMap.put("fIllnessStatus",Objects.equals(ShiFouEnums.FOU.getCode(),proSubdeptsUser.getIllnessStatus())?"无":"有");
@ -683,4 +833,22 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
return proProjectInfoSubdeptsUsersMapper.statsSubDeptsUsersByProId(query); return proProjectInfoSubdeptsUsersMapper.statsSubDeptsUsersByProId(query);
} }
/**
*
*
* @param id
* @return
*/
@Override
@Transactional
public int editDefaultProjectById(Long id){
int res = proProjectInfoSubdeptsUsersMapper.editDefaultProjectById(SecurityUtils.getUserId());
if(res>0){
ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersById(id);
proProjectInfoSubdeptsUsers.setSortBy(0L);
res = proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
}
return res;
}
} }

View File

@ -208,6 +208,15 @@ public class SysUserController extends BaseController {
return R.ok(userService.registerUser(sysUser)); return R.ok(userService.registerUser(sysUser));
} }
/**
*
*/
@InnerAuth
@PostMapping("/removeUserRoles")
public R<Long> removeUserRoles(@RequestBody SysUser sysUser) {
return R.ok(userService.removeUserRoles(sysUser));
}
/** /**
* *
*/ */

View File

@ -149,6 +149,13 @@ public interface ISysUserService
*/ */
public Long registerUser(SysUser user); public Long registerUser(SysUser user);
/**
*
* @param user
* @return
*/
public Long removeUserRoles(SysUser user);
/** /**
* *
* *

View File

@ -1,15 +1,15 @@
package com.yanzhu.system.service.impl; package com.yanzhu.system.service.impl;
import java.util.ArrayList; import java.util.*;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.validation.Validator; import javax.validation.Validator;
import com.yanzhu.common.core.constant.SecurityConstants;
import com.yanzhu.common.core.enums.ShiFouEnums; import com.yanzhu.common.core.enums.ShiFouEnums;
import com.yanzhu.common.core.enums.UserTypeEnums; import com.yanzhu.common.core.enums.UserTypeEnums;
import com.yanzhu.common.core.utils.DateUtils; 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.SysDept;
import com.yanzhu.system.api.domain.SysRoleDept; import com.yanzhu.system.api.domain.SysRoleDept;
import com.yanzhu.system.domain.SysPost; import com.yanzhu.system.domain.SysPost;
@ -72,6 +72,9 @@ public class SysUserServiceImpl implements ISysUserService
@Autowired @Autowired
private SysRoleDeptMapper roleDeptMapper; private SysRoleDeptMapper roleDeptMapper;
@Autowired
private RemoteProService remoteProService;
@Autowired @Autowired
protected Validator validator; protected Validator validator;
@ -317,9 +320,44 @@ public class SysUserServiceImpl implements ISysUserService
insertUserPost(user); insertUserPost(user);
// 新增用户与角色管理 // 新增用户与角色管理
insertUserRole(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; 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 @Override
public Long registerUser(SysUser user) public Long registerUser(SysUser user)
{ {
SysUser info = userMapper.checkUserNameUnique(user.getUserName()); SysUser sysUser = userMapper.checkUserNameUnique(user.getUserName());
if(Objects.nonNull(info)){ if(Objects.nonNull(sysUser)){
user.setUserId(info.getUserId()); user.setUserId(sysUser.getUserId());
userMapper.updateUser(user); 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{ }else{
user.setCreateBy(user.getUpdateBy());
user.setCreateTime(user.getUpdateTime());
user.setUserType("99");
userMapper.insertUser(user); userMapper.insertUser(user);
} }
Long userId = user.getUserId(); Long userId = user.getUserId();
@ -344,7 +391,6 @@ public class SysUserServiceImpl implements ISysUserService
userRole.setUserId(userId); userRole.setUserId(userId);
userRole.setDeptId(user.getActiveProjectId()); userRole.setDeptId(user.getActiveProjectId());
userRoleMapper.deleteUserRoleByUserRole(userRole); userRoleMapper.deleteUserRoleByUserRole(userRole);
if(Objects.equals(user.getUserType(), UserTypeEnums.FBWTDL.getCode())){ if(Objects.equals(user.getUserType(), UserTypeEnums.FBWTDL.getCode())){
List<SysRole> list = roleMapper.findDeptRoleListByDeptIdAndKey(user.getActiveProjectId(),UserTypeEnums.FBWTDL.getKeys()+"_"+user.getActiveProjectId()); List<SysRole> list = roleMapper.findDeptRoleListByDeptIdAndKey(user.getActiveProjectId(),UserTypeEnums.FBWTDL.getKeys()+"_"+user.getActiveProjectId());
if(StringUtils.isEmpty(list)){ if(StringUtils.isEmpty(list)){
@ -378,11 +424,44 @@ public class SysUserServiceImpl implements ISysUserService
} }
sysUserRoleList.add(userRole); sysUserRoleList.add(userRole);
userRoleMapper.batchUserRole(sysUserRoleList); 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; return userId;
} }
/**
*
* @param user
* @return
*/
@Override
public Long removeUserRoles(SysUser user){
SysUser info = userMapper.checkUserNameUnique(user.getUserName());
SysUserRole userRole = new SysUserRole();
userRole.setUserId(info.getUserId());
userRole.setDeptId(user.getActiveProjectId());
userRoleMapper.deleteUserRoleByUserRole(userRole);
return info.getUserId();
}
/** /**
* ... * ...
* @param roleName * @param roleName
@ -438,6 +517,19 @@ public class SysUserServiceImpl implements ISysUserService
throw new ServiceException("所属单位选择异常,必须选择子公司及下属单位"); throw new ServiceException("所属单位选择异常,必须选择子公司及下属单位");
} }
user.setComId(dept.getComId()); 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); return userMapper.updateUser(user);
} }

View File

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

View File

@ -144,28 +144,10 @@ Page({
}); });
//项目基本信息 //项目基本信息
this.getProjectInfo(app.globalData.useProjectId); this.getProjectInfo(app.globalData.useProjectId);
//用户项目信息
this.getProSubDeptsUserInfo(app.globalData.useProjectId);
//项目单位信息 //项目单位信息
//this.getProjectDepts(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);
}
} else { } else {
console.log("未查询到Token...{}...准备重新登录") console.log("未查询到Token...{}...准备重新登录")
wx.redirectTo({ wx.redirectTo({
@ -373,6 +355,22 @@ Page({
this.setData({ this.setData({
subDeptUserInfo: res.data[0] 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> <view>
<image src="/images/s_7.png"></image>计划竣工日期:<text>{{projectInfo.plannedCompletionTime}}</text> <image src="/images/s_7.png"></image>计划竣工日期:<text>{{projectInfo.plannedCompletionTime}}</text>
</view> </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> <image src="/images/s_8.png"></image>总工期:<text>{{projectInfo.projectTimeLimit + ' 天'}}</text>
</view> </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> <image src="/images/s_10.png"></image>项目负责人:<text>{{projectInfo.projectPerson}}</text>
</view> </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> <image src="/images/s_11.png"></image>负责人手机号:<text>{{projectInfo.projectPersonPhone}}</text>
</view> </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> <image src="/images/s_15.png"></image>项目概述:<text>{{projectInfo.projectSummarize}}</text>
</view> </view>
</view> </view>
</van-collapse-item> </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" wx:for="{{projectDeptsList}}" wx:key="unique">
<view class="construction_unit_image"> <view class="construction_unit_image">
<image src="{{item.iconSrc}}"></image> <image src="{{item.iconSrc}}"></image>
@ -78,7 +78,7 @@
</van-collapse> </van-collapse>
</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="echarts_min">
<view class="eharts_title module_title_flex"> <view class="eharts_title module_title_flex">
劳务人员 劳务人员
@ -114,7 +114,7 @@
</view> </view>
</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="echarts_min">
<view class="eharts_title module_title_flex"> <view class="eharts_title module_title_flex">
今日出勤 今日出勤
@ -143,8 +143,7 @@
</view> </view>
</view> </view>
</view> </view>
{{subDeptUserInfo.qrCode+'------------------'}} <view class="echarts_max bt30" wx:if="{{(subDeptUserInfo.subDeptType=='4' || subDeptUserInfo.subDeptType=='5') && subDeptUserInfo.userPost!='4'}}">
<view class="echarts_max bt30" wx:if="{{userData.userType=='80' || userData.userType=='79' || userData.userType=='78'}}">
<view class="echarts_min"> <view class="echarts_min">
<view class="eharts_title module_title_flex"> <view class="eharts_title module_title_flex">
我的二维码 我的二维码
@ -155,16 +154,16 @@
<image src="{{imgBaseUrl+subDeptUserInfo.qrCode}}"></image> <image src="{{imgBaseUrl+subDeptUserInfo.qrCode}}"></image>
</van-col> </van-col>
<van-col span="14"> <van-col span="14">
<view wx:if="{{userData.userType=='80'}}" class="qrtext"><text class="zz">项目经理 </text>扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。</view> <view wx:if="{{subDeptUserInfo.userPost=='1'}}" class="qrtext"><text class="zz">项目经理 </text>扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。</view>
<view wx:if="{{userData.userType=='79'}}" class="qrtext"><text class="zz">班组组长 </text>扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。</view> <view wx:if="{{subDeptUserInfo.userPost=='2'}}" 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=='3'}}" class="qrtext"><text class="zz">劳务人员 </text>扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。</view>
</van-col> </van-col>
</van-row> </van-row>
</view> </view>
</view> </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="echarts_min">
<view class="eharts_title module_title_flex"> <view class="eharts_title module_title_flex">
最近出勤 最近出勤
@ -178,7 +177,7 @@
</view> </view>
</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="echarts_min">
<view class="eharts_title module_title_flex"> <view class="eharts_title module_title_flex">
最近出勤 最近出勤
@ -236,28 +235,28 @@
</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> <van-tabbar-item>
<image slot="icon" src="/images/footer_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" /> <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;" /> <image slot="icon-active" src="/images/foot_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
项目概况 项目概况
</van-tabbar-item> </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" 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;" /> <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> <span class="tabNum" wx:if="{{aq>0}}">{{aq}}</span>
</van-tabbar-item> </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" 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;" /> <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> <span class="tabNum" wx:if="{{approveDb>0}}">{{approveDb}}</span>
</van-tabbar-item> </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" 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;" /> <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, active: 4,
projectId: '', projectId: '',
projectName: '', projectName: '',
subDeptUserInfo:{},
loginName: '', loginName: '',
remark: '', remark: '',
roleId: '', roleId: '',
@ -55,6 +56,8 @@ Page({
}); });
//用户权限菜单 //用户权限菜单
this.getUserMenuList(app.globalData.useProjectId); this.getUserMenuList(app.globalData.useProjectId);
//用户项目信息
this.getProSubDeptsUserInfo(app.globalData.useProjectId);
this.awaitTask(); this.awaitTask();
} else { } else {
console.log("未查询到Token...{}...准备重新登录") 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) { goMenu: function (event) {
wx.redirectTo({ wx.redirectTo({
url: event.currentTarget.dataset.url url: event.currentTarget.dataset.url

View File

@ -33,7 +33,7 @@
</view> </view>
</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"> <van-tabbar-item bindtap="XMGK">
<image <image
slot="icon" slot="icon"
@ -50,7 +50,7 @@
项目概况 项目概况
</van-tabbar-item> </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 <image
slot="icon" slot="icon"
src="/images/footer_7.png" src="/images/footer_7.png"
@ -67,7 +67,7 @@
<span class="tabNum" wx:if="{{aq>0}}">{{aq}}</span> <span class="tabNum" wx:if="{{aq>0}}">{{aq}}</span>
</van-tabbar-item> </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 <image
slot="icon" slot="icon"
src="/images/footer_5.png" src="/images/footer_5.png"
@ -84,7 +84,7 @@
<span class="tabNum" wx:if="{{ad>0}}">{{ad}}</span> <span class="tabNum" wx:if="{{ad>0}}">{{ad}}</span>
</van-tabbar-item> </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 <image
slot="icon" slot="icon"
src="/images/footer_6.png" src="/images/footer_6.png"

View File

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

View File

@ -201,14 +201,14 @@
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">个人身份证正面 <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">个人身份证正面
</view> </view>
<view class="inspect_info_content"> <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> </view>
</van-col> </van-col>
<van-col span="12"> <van-col span="12">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">个人身份证反面 <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">个人身份证反面
</view> </view>
<view class="inspect_info_content"> <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> </view>
</van-col> </van-col>
</van-row> </van-row>
@ -218,7 +218,7 @@
<text style="font-size: small; color: antiquewhite;">[进场扫脸,请上传清晰照片]</text> <text style="font-size: small; color: antiquewhite;">[进场扫脸,请上传清晰照片]</text>
</view> </view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
@ -232,43 +232,43 @@
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">项目经理姓名</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">项目经理姓名</view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">项目经理身份证号</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">项目经理身份证号</view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">项目经理联系电话</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">项目经理联系电话</view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">籍贯民族</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">籍贯民族</view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">籍贯地址</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">籍贯地址</view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">紧急联系人</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">紧急联系人</view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">紧急联系人电话</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">紧急联系人电话</view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
@ -337,14 +337,14 @@
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">个人身份证正面 <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">个人身份证正面
</view> </view>
<view class="inspect_info_content"> <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> </view>
</van-col> </van-col>
<van-col span="12"> <van-col span="12">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">个人身份证反面 <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">个人身份证反面
</view> </view>
<view class="inspect_info_content"> <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> </view>
</van-col> </van-col>
</van-row> </van-row>
@ -354,7 +354,7 @@
<text style="font-size: small; color: antiquewhite;">[进场扫脸,请上传清晰照片]</text> <text style="font-size: small; color: antiquewhite;">[进场扫脸,请上传清晰照片]</text>
</view> </view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
@ -368,43 +368,43 @@
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">姓名</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">姓名</view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">身份证号</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">身份证号</view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">联系电话</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">联系电话</view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">籍贯民族</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">籍贯民族</view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">籍贯地址</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">籍贯地址</view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">紧急联系人</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">紧急联系人</view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">紧急联系人电话</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">紧急联系人电话</view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
@ -446,7 +446,7 @@
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">班组长姓名</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">班组长姓名</view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
@ -455,14 +455,14 @@
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">个人身份证正面 <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">个人身份证正面
</view> </view>
<view class="inspect_info_content"> <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> </view>
</van-col> </van-col>
<van-col span="12"> <van-col span="12">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">个人身份证反面 <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">个人身份证反面
</view> </view>
<view class="inspect_info_content"> <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> </view>
</van-col> </van-col>
</van-row> </van-row>
@ -472,55 +472,55 @@
<text style="font-size: small; color: antiquewhite;">[进场扫脸,请上传清晰照片]</text> <text style="font-size: small; color: antiquewhite;">[进场扫脸,请上传清晰照片]</text>
</view> </view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">姓名</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">姓名</view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">身份证号</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">身份证号</view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">联系电话</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">联系电话</view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">籍贯民族</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">籍贯民族</view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">籍贯地址</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">籍贯地址</view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">紧急联系人</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">紧急联系人</view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">紧急联系人电话</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">紧急联系人电话</view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">开户银行名称</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">开户银行名称</view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
@ -528,13 +528,13 @@
<text style="font-size: small; color: antiquewhite;">[开户银行地址]</text> <text style="font-size: small; color: antiquewhite;">[开户银行地址]</text>
</view> </view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">工资银行卡号</view> <view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">工资银行卡号</view>
<view class="inspect_info_content"> <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> </view>
<view class="inspect_info_list"> <view class="inspect_info_list">

View File

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

View File

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

View File

@ -43,6 +43,15 @@ export function editUseStatus(id,status) {
}) })
} }
// 修改分包单位班组
export function updateGroupLeader(data) {
return request({
url: '/manage/proProjectInfoSubdeptsGroup/updateGroupLeader',
method: 'post',
data: data
})
}
// 删除分包单位班组 // 删除分包单位班组
export function delProProjectInfoSubdeptsGroup(id) { export function delProProjectInfoSubdeptsGroup(id) {
return request({ return request({

View File

@ -9,6 +9,15 @@ export function listProProjectInfoSubdeptsUsers(query) {
}) })
} }
// 查询分包单位工人列表
export function findAllProSubDeptsUser(query) {
return request({
url: '/manage/proProjectInfoSubdeptsUsers/findAllProSubDeptsUser',
method: 'get',
params: query
})
}
// 查询分包单位工人详细 // 查询分包单位工人详细
export function getProProjectInfoSubdeptsUsers(id) { export function getProProjectInfoSubdeptsUsers(id) {
return request({ return request({
@ -51,3 +60,11 @@ export function updateEnterState(ids,state) {
data: ids data: ids
}) })
} }
// 修改项目排序
export function changeDefaultProject(id) {
return request({
url: '/manage/proProjectInfoSubdeptsUsers/changeDefaultProject/' + id,
method: 'get'
})
}

View File

@ -1,52 +0,0 @@
import request from '@/utils/request'
// 查询项目人员列表
export function listProProjectInfoUsers(query) {
return request({
url: '/manage/proProjectInfoUsers/list',
method: 'get',
params: query
})
}
// 查询项目人员详细
export function getProProjectInfoUsers(id) {
return request({
url: '/manage/proProjectInfoUsers/' + id,
method: 'get'
})
}
// 新增项目人员
export function addProProjectInfoUsers(data) {
return request({
url: '/manage/proProjectInfoUsers',
method: 'post',
data: data
})
}
// 修改项目人员
export function updateProProjectInfoUsers(data) {
return request({
url: '/manage/proProjectInfoUsers',
method: 'put',
data: data
})
}
// 删除项目人员
export function delProProjectInfoUsers(id) {
return request({
url: '/manage/proProjectInfoUsers/' + id,
method: 'delete'
})
}
// 改变项目排序
export function changeDefaultProject(id) {
return request({
url: '/manage/proProjectInfoUsers/changeDefaultProject/' + id,
method: 'get'
})
}

View File

@ -62,7 +62,7 @@
import { OfficeBuilding } from '@element-plus/icons-vue' import { OfficeBuilding } from '@element-plus/icons-vue'
import { findMyProjectList } from "@/api/publics"; import { findMyProjectList } from "@/api/publics";
import { switchProject, cancelProject } from '@/api/login' import { switchProject, cancelProject } from '@/api/login'
import { changeDefaultProject } from "@/api/manage/proProjectInfoUsers"; import { changeDefaultProject } from "@/api/manage/proProjectInfoSubdeptsUsers";
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'

View File

@ -61,7 +61,7 @@
<span v-if="!scope.row.qrCode">-</span> <span v-if="!scope.row.qrCode">-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="进场状态" align="center" prop="useStatus"> <el-table-column label="进场状态" align="center" prop="useStatus" width="80">
<template #default="scope"> <template #default="scope">
<dict-tag :options="sys_use_status" :value="scope.row.useStatus" /> <dict-tag :options="sys_use_status" :value="scope.row.useStatus" />
</template> </template>
@ -76,7 +76,7 @@
<dict-tag :options="sys_approve_status" :value="scope.row.approveStatus" /> <dict-tag :options="sys_approve_status" :value="scope.row.approveStatus" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="数据状态" align="center" prop="isDel" width="80"> <el-table-column label="数据状态" align="center" prop="isDel" width="80" v-if="false">
<template #default="scope"> <template #default="scope">
<dict-tag :options="sys_is_del" :value="scope.row.isDel" /> <dict-tag :options="sys_is_del" :value="scope.row.isDel" />
</template> </template>

View File

@ -72,7 +72,7 @@
<dict-tag :options="pro_craft_post" :value="scope.row.craftPost" /> <dict-tag :options="pro_craft_post" :value="scope.row.craftPost" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="班组长" align="center" prop="groupLeaderName" > <el-table-column label="班组长" align="center" prop="groupLeaderName" width="120">
<template #default="scope"> <template #default="scope">
<el-button link v-if="scope.row.groupLeaderName" type="primary" icon="UserFilled" <el-button link v-if="scope.row.groupLeaderName" type="primary" icon="UserFilled"
@click="handleUpdateGroupLeader(scope.row)">{{scope.row.groupLeaderName}}</el-button> @click="handleUpdateGroupLeader(scope.row)">{{scope.row.groupLeaderName}}</el-button>
@ -80,6 +80,11 @@
@click="handleUpdateGroupLeader(scope.row)"> - </el-button> @click="handleUpdateGroupLeader(scope.row)"> - </el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="进场状态" align="center" prop="useStatus" width="80">
<template #default="scope">
<dict-tag :options="sys_use_status" :value="scope.row.useStatus" />
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="120"> <el-table-column label="创建时间" align="center" prop="createTime" width="120">
<template #default="scope"> <template #default="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
@ -90,7 +95,7 @@
<dict-tag :options="sys_approve_status" :value="scope.row.approveStatus" /> <dict-tag :options="sys_approve_status" :value="scope.row.approveStatus" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="数据状态" align="center" prop="isDel" width="80"> <el-table-column label="数据状态" align="center" prop="isDel" width="80" v-if="false">
<template #default="scope"> <template #default="scope">
<dict-tag :options="sys_is_del" :value="scope.row.isDel" /> <dict-tag :options="sys_is_del" :value="scope.row.isDel" />
</template> </template>
@ -141,13 +146,13 @@
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="open = false"> </el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
<!-- 添加或修改单位班组对话框 --> <!-- 添加或修改单位班组对话框 -->
<el-dialog :title="title" v-model="open" width="680px" append-to-body modal-class="SubdeptsGroupDlg"> <el-dialog :title="leaderTitle" v-model="leaderOpen" width="680px" append-to-body modal-class="SubdeptsGroupDlg">
<el-form ref="proProjectInfoSubdeptsGroupRef" :model="leaderForm" :rules="leaderRules" label-width="88px"> <el-form ref="proProjectInfoSubdeptsGroupRef" :model="leaderForm" :rules="leaderRules" label-width="88px">
<el-form-item label="项目名称"> <el-form-item label="项目名称">
<el-tag effect="plain">{{ leaderForm.projectName }}</el-tag> <el-tag effect="plain">{{ leaderForm.projectName }}</el-tag>
@ -163,16 +168,16 @@
{{leaderForm.groupName}} {{leaderForm.groupName}}
</el-form-item> </el-form-item>
<el-form-item label="班组组长" prop="groupLeaderPhone"> <el-form-item label="班组组长" prop="groupLeaderPhone">
<el-select v-model="form.groupLeaderPhone" placeholder="请选择班组组长" style="width:100%"> <el-select v-model="leaderForm.groupLeaderPhone" placeholder="请选择班组组长" style="width:100%">
<el-option v-for="dict in pro_craft_post" :key="dict.value" :label="dict.label" <el-option v-for="option in groupLeaderOptions" :key="option.userPhone" :label="option.userName"
:value="dict.value"></el-option> :value="option.userPhone"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitLeaderForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="leaderOpen = false"> </el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
@ -180,12 +185,14 @@
</template> </template>
<script setup name="ProProjectInfoSubdeptsGroup"> <script setup name="ProProjectInfoSubdeptsGroup">
import auth from '@/plugins/auth'
import { findAllProjectInfoSubdepts } from "@/api/manage/proProjectInfoSubdepts"; import { findAllProjectInfoSubdepts } from "@/api/manage/proProjectInfoSubdepts";
import { listProProjectInfoSubdeptsGroup, getProProjectInfoSubdeptsGroup, delProProjectInfoSubdeptsGroup, addProProjectInfoSubdeptsGroup, updateProProjectInfoSubdeptsGroup, editUseStatus } from "@/api/manage/proProjectInfoSubdeptsGroup"; import { findAllProSubDeptsUser } from "@/api/manage/proProjectInfoSubdeptsUsers";
import { listProProjectInfoSubdeptsGroup, getProProjectInfoSubdeptsGroup, delProProjectInfoSubdeptsGroup, addProProjectInfoSubdeptsGroup, updateProProjectInfoSubdeptsGroup, editUseStatus, updateGroupLeader } from "@/api/manage/proProjectInfoSubdeptsGroup";
import useUserStore from '@/store/modules/user' import useUserStore from '@/store/modules/user'
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const { sys_approve_status, sub_dept_type, pro_craft_type, sys_is_del, pro_craft_post } = proxy.useDict('sys_approve_status', 'sub_dept_type', 'pro_craft_type', 'sys_is_del', 'pro_craft_post'); const { sys_approve_status, sub_dept_type, pro_craft_type, sys_is_del, pro_craft_post, sys_use_status } = proxy.useDict('sys_approve_status', 'sub_dept_type', 'pro_craft_type', 'sys_is_del', 'pro_craft_post', 'sys_use_status');
const userStore = useUserStore() const userStore = useUserStore()
const proProjectInfoSubdeptsGroupList = ref([]); const proProjectInfoSubdeptsGroupList = ref([]);
@ -228,7 +235,7 @@ const data = reactive({
} }
}); });
const { queryParams, form, rules, leaderForm } = toRefs(data); const { queryParams, form, rules, leaderForm, leaderRules } = toRefs(data);
/** 查询单位班组列表 */ /** 查询单位班组列表 */
function getList() { function getList() {
@ -324,15 +331,20 @@ function handleUpdate(row) {
/** 修改班组长按钮操作 */ /** 修改班组长按钮操作 */
function handleUpdateGroupLeader(row) { function handleUpdateGroupLeader(row) {
open.value = true; let param = {
title.value = "修改单位班组长"; projectId: row.projectId,
reset(); subDeptId: row.subDeptId,
initSubDeptOptions(row.projectId); craftPost: row.craftPost,
const _id = row.id || ids.value activeTags: 'finished'
getProProjectInfoSubdeptsGroup(_id).then(response => { }
form.value = response.data; if(auth.hasPermi('manage:proProjectInfoSubdeptsGroup:edit')){
leaderForm.value = row;
}); findAllProSubDeptsUser(param).then(res => {
leaderOpen.value = true;
leaderTitle.value = "修改单位班组长";
groupLeaderOptions.value = res.data;
});
}
} }
/** 提交按钮 */ /** 提交按钮 */
@ -357,6 +369,19 @@ function submitForm() {
}); });
} }
/** 变更按钮 */
function submitLeaderForm() {
proxy.$refs["proProjectInfoSubdeptsGroupRef"].validate(valid => {
if (valid) {
updateGroupLeader(leaderForm.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
leaderOpen.value = false;
getList();
});
}
});
}
/** 删除按钮操作 */ /** 删除按钮操作 */
function handleDelete(row) { function handleDelete(row) {
const _ids = row.id || ids.value; const _ids = row.id || ids.value;

View File

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

View File

@ -118,7 +118,7 @@
</el-row> </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-form :model="form" :rules="rules" ref="userRef" label-width="88px">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
@ -185,6 +185,16 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </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-row>
</el-form> </el-form>
<template #footer> <template #footer>
@ -295,6 +305,8 @@ const data = reactive({
userType: [{ required: true, message: "用户类型不能为空", trigger: "change" }], userType: [{ required: true, message: "用户类型不能为空", trigger: "change" }],
password: [{ required: true, message: "用户密码不能为空", trigger: "blur" }, { min: 5, max: 20, message: "用户密码长度必须介于 5 和 20 之间", trigger: "blur" }], 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" }] 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" }],
} }
}); });