提交代码
parent
3f24b7a5dd
commit
4bd3fdf5e3
|
@ -63,6 +63,6 @@ public interface RemoteUserService
|
|||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/user/register")
|
||||
public R<Boolean> registerUserInfo(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
public R<Long> registerUserInfo(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ public class RemoteUserFallbackFactory implements FallbackFactory<RemoteUserServ
|
|||
}
|
||||
|
||||
@Override
|
||||
public R<Boolean> registerUserInfo(SysUser sysUser, String source)
|
||||
public R<Long> registerUserInfo(SysUser sysUser, String source)
|
||||
{
|
||||
return R.fail("注册用户失败:" + throwable.getMessage());
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@ public class ProProjectInfoSubdepts extends BaseEntity
|
|||
private Long id;
|
||||
|
||||
/** 公司主键 */
|
||||
@Excel(name = "公司主键")
|
||||
private Long comId;
|
||||
|
||||
/** 公司名称 */
|
||||
|
@ -30,7 +29,6 @@ public class ProProjectInfoSubdepts extends BaseEntity
|
|||
private String comName;
|
||||
|
||||
/** 项目主键 */
|
||||
@Excel(name = "项目主键")
|
||||
private Long projectId;
|
||||
|
||||
/** 项目名称 */
|
||||
|
|
|
@ -19,11 +19,13 @@ public class ProProjectInfoSubdeptsGroup extends BaseEntity
|
|||
private Long id;
|
||||
|
||||
/** 公司主键 */
|
||||
@Excel(name = "公司主键")
|
||||
private Long comId;
|
||||
|
||||
/** 公司名称 */
|
||||
@Excel(name = "公司名称")
|
||||
private String comName;
|
||||
|
||||
/** 项目主键 */
|
||||
@Excel(name = "项目主键")
|
||||
private Long projectId;
|
||||
|
||||
/** 项目名称 */
|
||||
|
@ -90,6 +92,13 @@ public class ProProjectInfoSubdeptsGroup extends BaseEntity
|
|||
@Excel(name = "删除标识")
|
||||
private Long isDel;
|
||||
|
||||
/** 委托人正面照片 */
|
||||
private String groupLeaderCardImgPos;
|
||||
/** 委托人反面照片 */
|
||||
private String groupLeaderCardImgInv;
|
||||
/** 委托人半身照片 */
|
||||
private String groupLeaderUserPicture;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
|
@ -253,6 +262,14 @@ public class ProProjectInfoSubdeptsGroup extends BaseEntity
|
|||
return isDel;
|
||||
}
|
||||
|
||||
public String getComName() {
|
||||
return comName;
|
||||
}
|
||||
|
||||
public void setComName(String comName) {
|
||||
this.comName = comName;
|
||||
}
|
||||
|
||||
public String getProjectName() {
|
||||
return projectName;
|
||||
}
|
||||
|
@ -261,6 +278,30 @@ public class ProProjectInfoSubdeptsGroup extends BaseEntity
|
|||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
public String getGroupLeaderCardImgPos() {
|
||||
return groupLeaderCardImgPos;
|
||||
}
|
||||
|
||||
public void setGroupLeaderCardImgPos(String groupLeaderCardImgPos) {
|
||||
this.groupLeaderCardImgPos = groupLeaderCardImgPos;
|
||||
}
|
||||
|
||||
public String getGroupLeaderCardImgInv() {
|
||||
return groupLeaderCardImgInv;
|
||||
}
|
||||
|
||||
public void setGroupLeaderCardImgInv(String groupLeaderCardImgInv) {
|
||||
this.groupLeaderCardImgInv = groupLeaderCardImgInv;
|
||||
}
|
||||
|
||||
public String getGroupLeaderUserPicture() {
|
||||
return groupLeaderUserPicture;
|
||||
}
|
||||
|
||||
public void setGroupLeaderUserPicture(String groupLeaderUserPicture) {
|
||||
this.groupLeaderUserPicture = groupLeaderUserPicture;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
|
|
@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<resultMap type="ProProjectInfoSubdeptsGroup" id="ProProjectInfoSubdeptsGroupResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="comId" column="com_id" />
|
||||
<result property="comName" column="com_name" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="projectName" column="project_name" />
|
||||
<result property="subDeptId" column="sub_dept_id" />
|
||||
|
@ -32,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectProProjectInfoSubdeptsGroupVo">
|
||||
select psg.id, psg.com_id, psg.project_id, pi.project_name, psg.sub_dept_id, psg.sub_dept_type, psg.sub_dept_name, psg.sub_dept_code, psg.group_name, psg.group_code, psg.craft_type, psg.craft_post, psg.group_leader_name, psg.group_leader_code, psg.group_leader_phone, psg.use_status, psg.approve_status, psg.qr_code, psg.is_del, psg.create_by, psg.create_time, psg.update_by, psg.update_time, psg.remark from pro_project_info_subdepts_group psg
|
||||
select psg.id, psg.com_id, sd.dept_name as com_name, psg.project_id, pi.project_name, psg.sub_dept_id, psg.sub_dept_type, psg.sub_dept_name, psg.sub_dept_code, psg.group_name, psg.group_code, psg.craft_type, psg.craft_post, psg.group_leader_name, psg.group_leader_code, psg.group_leader_phone, psg.use_status, psg.approve_status, psg.qr_code, psg.is_del, psg.create_by, psg.create_time, psg.update_by, psg.update_time, psg.remark from pro_project_info_subdepts_group psg
|
||||
left join pro_project_info pi on pi.id = psg.project_id
|
||||
left join sys_dept sd on sd.dept_id = pi.com_id
|
||||
</sql>
|
||||
|
@ -40,24 +41,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="selectProProjectInfoSubdeptsGroupList" parameterType="ProProjectInfoSubdeptsGroup" resultMap="ProProjectInfoSubdeptsGroupResult">
|
||||
<include refid="selectProProjectInfoSubdeptsGroupVo"/>
|
||||
<where>
|
||||
psg.is_del = 0
|
||||
<if test="comId != null "> and psg.com_id = #{comId}</if>
|
||||
<if test="projectId != null "> and psg.project_id = #{projectId}</if>
|
||||
<if test="activeComId != null "> and psg.com_id = #{activeComId}</if>
|
||||
<if test="activeProjectId != null "> and psg.project_id = #{activeProjectId}</if>
|
||||
<if test="projectName != null and projectName != ''"> and pi.project_name like concat('%', #{projectName}, '%')</if>
|
||||
<if test="subDeptId != null "> and psg.sub_dept_id = #{subDeptId}</if>
|
||||
<if test="subDeptType != null and subDeptType != ''"> and psg.sub_dept_type = #{subDeptType}</if>
|
||||
<if test="subDeptName != null and subDeptName != ''"> and psg.sub_dept_name like concat('%', #{subDeptName}, '%')</if>
|
||||
<if test="subDeptCode != null and subDeptCode != ''"> and psg.sub_dept_code = #{subDeptCode}</if>
|
||||
<if test="groupName != null and groupName != ''"> and psg.group_name like concat('%', #{groupName}, '%')</if>
|
||||
<if test="groupCode != null and groupCode != ''"> and psg.group_code = #{groupCode}</if>
|
||||
<if test="craftType != null and craftType != ''"> and psg.craft_type = #{craftType}</if>
|
||||
<if test="craftPost != null and craftPost != ''"> and psg.craft_post = #{craftPost}</if>
|
||||
<if test="groupLeaderName != null and groupLeaderName != ''"> and psg.group_leader_name like concat('%', #{groupLeaderName}, '%')</if>
|
||||
<if test="groupLeaderCode != null and groupLeaderCode != ''"> and psg.group_leader_code = #{groupLeaderCode}</if>
|
||||
<if test="groupLeaderPhone != null and groupLeaderPhone != ''"> and psg.group_leader_phone = #{groupLeaderPhone}</if>
|
||||
<if test="useStatus != null and useStatus != ''"> and psg.use_status = #{useStatus}</if>
|
||||
<if test="approveStatus != null "> and psg.approve_status = #{approveStatus}</if>
|
||||
<if test="isDel != null "> and psg.is_del = #{isDel}</if>
|
||||
</where>
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
<select id="selectProProjectInfoSubdeptsGroupById" parameterType="Long" resultMap="ProProjectInfoSubdeptsGroupResult">
|
||||
|
@ -146,14 +144,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteProProjectInfoSubdeptsGroupById" parameterType="Long">
|
||||
delete from pro_project_info_subdepts_group where id = #{id}
|
||||
</delete>
|
||||
<update id="deleteProProjectInfoSubdeptsGroupById" parameterType="Long">
|
||||
update pro_project_info_subdepts_group set is_del=1 where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteProProjectInfoSubdeptsGroupByIds" parameterType="String">
|
||||
delete from pro_project_info_subdepts_group where id in
|
||||
<update id="deleteProProjectInfoSubdeptsGroupByIds" parameterType="String">
|
||||
update pro_project_info_subdepts_group set is_del=1 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</update>
|
||||
|
||||
</mapper>
|
|
@ -42,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="selectProProjectInfoSubdeptsList" parameterType="ProProjectInfoSubdepts" resultMap="ProProjectInfoSubdeptsResult">
|
||||
<include refid="selectProProjectInfoSubdeptsVo"/>
|
||||
<where>
|
||||
ps.is_del = 0
|
||||
<if test="comId != null "> and ps.com_id = #{comId}</if>
|
||||
<if test="projectId != null "> and ps.project_id = #{projectId}</if>
|
||||
<if test="activeComId != null "> and ps.com_id = #{activeComId}</if>
|
||||
|
@ -50,13 +51,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="subDeptType != null and subDeptType != ''"> and ps.sub_dept_type = #{subDeptType}</if>
|
||||
<if test="subDeptName != null and subDeptName != ''"> and ps.sub_dept_name like concat('%', #{subDeptName}, '%')</if>
|
||||
<if test="subDeptCode != null and subDeptCode != ''"> and ps.sub_dept_code = #{subDeptCode}</if>
|
||||
<if test="subDeptLeaderId != null "> and ps.sub_dept_leader_id = #{subDeptLeaderId}</if>
|
||||
<if test="subDeptLeaderName != null and subDeptLeaderName != ''"> and ps.sub_dept_leader_name like concat('%', #{subDeptLeaderName}, '%')</if>
|
||||
<if test="subDeptLeaderCode != null and subDeptLeaderCode != ''"> and ps.sub_dept_leader_code = #{subDeptLeaderCode}</if>
|
||||
<if test="subDeptLeaderPhone != null and subDeptLeaderPhone != ''"> and ps.sub_dept_leader_phone = #{subDeptLeaderPhone}</if>
|
||||
<if test="useStatus != null and useStatus != ''"> and ps.use_status = #{useStatus}</if>
|
||||
<if test="approveStatus != null "> and ps.approve_status = #{approveStatus}</if>
|
||||
<if test="isDel != null "> and ps.is_del = #{isDel}</if>
|
||||
</where>
|
||||
order by ps.id desc
|
||||
</select>
|
||||
|
@ -150,14 +146,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteProProjectInfoSubdeptsById" parameterType="Long">
|
||||
delete from pro_project_info_subdepts where id = #{id}
|
||||
</delete>
|
||||
<update id="deleteProProjectInfoSubdeptsById" parameterType="Long">
|
||||
update pro_project_info_subdepts set is_del=1 where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteProProjectInfoSubdeptsByIds" parameterType="String">
|
||||
delete from pro_project_info_subdepts where id in
|
||||
<update id="deleteProProjectInfoSubdeptsByIds" parameterType="String">
|
||||
update pro_project_info_subdepts set is_del=1 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,17 @@
|
|||
package com.yanzhu.manage.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 微信配置文件
|
||||
*/
|
||||
@Data
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "file")
|
||||
public class ProfileConfig {
|
||||
|
||||
private String path;
|
||||
|
||||
}
|
|
@ -1,8 +1,11 @@
|
|||
package com.yanzhu.manage.config;
|
||||
|
||||
import com.yanzhu.manage.service.impl.ProProjectInfoSubdeptsServiceImpl;
|
||||
import me.chanjar.weixin.mp.api.WxMpInMemoryConfigStorage;
|
||||
import me.chanjar.weixin.mp.api.WxMpService;
|
||||
import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
@ -16,9 +19,13 @@ public class WeChatConfig {
|
|||
@Autowired
|
||||
private WeChatProperties weChatProperties;
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(WeChatConfig.class);
|
||||
|
||||
@Bean
|
||||
public WxMpService wxMpService() {
|
||||
WxMpInMemoryConfigStorage config = new WxMpInMemoryConfigStorage();
|
||||
log.info("weChatProperties.wxAppId...{}",weChatProperties.getWxAppId());
|
||||
log.info("weChatProperties.wxAppSecret...{}",weChatProperties.getWxAppSecret());
|
||||
config.setAppId(weChatProperties.getWxAppId());
|
||||
config.setSecret(weChatProperties.getWxAppSecret());
|
||||
|
||||
|
|
|
@ -85,6 +85,17 @@ public class ProProjectInfoSubdeptsController extends BaseController
|
|||
return toAjax(proProjectInfoSubdeptsService.updateProProjectInfoSubdepts(proProjectInfoSubdepts));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改分包单位
|
||||
*/
|
||||
@RequiresPermissions("manage:proProjectInfoSubdepts:edit")
|
||||
@Log(title = "分包单位", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/editInfos")
|
||||
public AjaxResult editInfos(@RequestBody ProProjectInfoSubdepts proProjectInfoSubdepts)
|
||||
{
|
||||
return toAjax(proProjectInfoSubdeptsService.updateProProjectInfoSubdeptsEntity(proProjectInfoSubdepts));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除分包单位
|
||||
*/
|
||||
|
@ -95,4 +106,14 @@ public class ProProjectInfoSubdeptsController extends BaseController
|
|||
{
|
||||
return toAjax(proProjectInfoSubdeptsService.deleteProProjectInfoSubdeptsByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分包单位列表
|
||||
*/
|
||||
@GetMapping("/findAll")
|
||||
public AjaxResult findAll(ProProjectInfoSubdepts proProjectInfoSubdepts)
|
||||
{
|
||||
List<ProProjectInfoSubdepts> list = proProjectInfoSubdeptsService.selectProProjectInfoSubdeptsList(proProjectInfoSubdepts);
|
||||
return success(list);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,6 +43,14 @@ public interface IProProjectInfoSubdeptsService
|
|||
*/
|
||||
public int updateProProjectInfoSubdepts(ProProjectInfoSubdepts proProjectInfoSubdepts);
|
||||
|
||||
/**
|
||||
* 修改分包单位
|
||||
*
|
||||
* @param proProjectInfoSubdepts 分包单位
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProProjectInfoSubdeptsEntity(ProProjectInfoSubdepts proProjectInfoSubdepts);
|
||||
|
||||
/**
|
||||
* 批量删除分包单位
|
||||
*
|
||||
|
|
|
@ -1,13 +1,25 @@
|
|||
package com.yanzhu.manage.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.yanzhu.common.core.constant.SecurityConstants;
|
||||
import com.yanzhu.common.core.domain.R;
|
||||
import com.yanzhu.common.core.enums.CardTypeEnums;
|
||||
import com.yanzhu.common.core.enums.UserTypeEnums;
|
||||
import com.yanzhu.common.core.utils.DateUtils;
|
||||
import com.yanzhu.common.core.utils.StringUtils;
|
||||
import com.yanzhu.common.security.utils.SecurityUtils;
|
||||
import com.yanzhu.manage.domain.ProProjectInfoSubdepts;
|
||||
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsMapper;
|
||||
import com.yanzhu.system.api.RemoteUserService;
|
||||
import com.yanzhu.system.api.domain.SysUser;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsGroupMapper;
|
||||
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsGroup;
|
||||
import com.yanzhu.manage.service.IProProjectInfoSubdeptsGroupService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 分包单位班组Service业务层处理
|
||||
|
@ -18,6 +30,13 @@ import com.yanzhu.manage.service.IProProjectInfoSubdeptsGroupService;
|
|||
@Service
|
||||
public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSubdeptsGroupService
|
||||
{
|
||||
|
||||
@Autowired
|
||||
private RemoteUserService remoteUserService;
|
||||
|
||||
@Autowired
|
||||
private ProProjectInfoSubdeptsMapper proProjectInfoSubdeptsMapper;
|
||||
|
||||
@Autowired
|
||||
private ProProjectInfoSubdeptsGroupMapper proProjectInfoSubdeptsGroupMapper;
|
||||
|
||||
|
@ -42,6 +61,8 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
|
|||
@Override
|
||||
public List<ProProjectInfoSubdeptsGroup> selectProProjectInfoSubdeptsGroupList(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup)
|
||||
{
|
||||
proProjectInfoSubdeptsGroup.setActiveComId(SecurityUtils.getLoginUser().getProjectDeptId());
|
||||
proProjectInfoSubdeptsGroup.setActiveProjectId(SecurityUtils.getLoginUser().getProjectId());
|
||||
return proProjectInfoSubdeptsGroupMapper.selectProProjectInfoSubdeptsGroupList(proProjectInfoSubdeptsGroup);
|
||||
}
|
||||
|
||||
|
@ -52,8 +73,40 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int insertProProjectInfoSubdeptsGroup(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup)
|
||||
{
|
||||
ProProjectInfoSubdepts info = proProjectInfoSubdeptsMapper.selectProProjectInfoSubdeptsById(proProjectInfoSubdeptsGroup.getSubDeptId());
|
||||
if(Objects.nonNull(info)){
|
||||
proProjectInfoSubdeptsGroup.setComId(info.getComId());
|
||||
proProjectInfoSubdeptsGroup.setSubDeptName(info.getSubDeptName());
|
||||
proProjectInfoSubdeptsGroup.setSubDeptCode(info.getSubDeptCode());
|
||||
proProjectInfoSubdeptsGroup.setSubDeptType(info.getSubDeptType());
|
||||
}
|
||||
// 单位委托人信息
|
||||
if(StringUtils.isNotEmpty(proProjectInfoSubdeptsGroup.getGroupLeaderName()) && StringUtils.isNotEmpty(proProjectInfoSubdeptsGroup.getGroupLeaderCode()) && StringUtils.isNotEmpty(proProjectInfoSubdeptsGroup.getGroupLeaderPhone())){
|
||||
SysUser sysUser = new SysUser();
|
||||
sysUser.setUserName(proProjectInfoSubdeptsGroup.getGroupLeaderPhone());
|
||||
sysUser.setNickName(proProjectInfoSubdeptsGroup.getGroupLeaderName());
|
||||
sysUser.setUserType(UserTypeEnums.FBRY.getCode());
|
||||
sysUser.setCardType(CardTypeEnums.SFZ.getCode());
|
||||
sysUser.setCardCode(proProjectInfoSubdeptsGroup.getGroupLeaderCode());
|
||||
sysUser.setUserPicture(proProjectInfoSubdeptsGroup.getGroupLeaderUserPicture());
|
||||
sysUser.setCardImgPos(proProjectInfoSubdeptsGroup.getGroupLeaderCardImgPos());
|
||||
sysUser.setCardImgInv(proProjectInfoSubdeptsGroup.getGroupLeaderCardImgInv());
|
||||
sysUser.setSex(StringUtils.judgeGender(proProjectInfoSubdeptsGroup.getGroupLeaderCode()));
|
||||
sysUser.setCreateBy(SecurityUtils.getUsername());
|
||||
sysUser.setCreateTime(DateUtils.getNowDate());
|
||||
sysUser.setRemark(proProjectInfoSubdeptsGroup.getSubDeptName());
|
||||
try {
|
||||
remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
|
||||
}catch (Exception e){
|
||||
// 已注册账号!!忽略异常...
|
||||
}
|
||||
|
||||
// TODO:实名制接入
|
||||
}
|
||||
proProjectInfoSubdeptsGroup.setCreateBy(SecurityUtils.getUsername());
|
||||
proProjectInfoSubdeptsGroup.setCreateTime(DateUtils.getNowDate());
|
||||
return proProjectInfoSubdeptsGroupMapper.insertProProjectInfoSubdeptsGroup(proProjectInfoSubdeptsGroup);
|
||||
}
|
||||
|
@ -65,8 +118,33 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateProProjectInfoSubdeptsGroup(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup)
|
||||
{
|
||||
// 单位委托人信息
|
||||
if(StringUtils.isNotEmpty(proProjectInfoSubdeptsGroup.getGroupLeaderName()) && StringUtils.isNotEmpty(proProjectInfoSubdeptsGroup.getGroupLeaderCode()) && StringUtils.isNotEmpty(proProjectInfoSubdeptsGroup.getGroupLeaderPhone())){
|
||||
SysUser sysUser = new SysUser();
|
||||
sysUser.setUserName(proProjectInfoSubdeptsGroup.getGroupLeaderPhone());
|
||||
sysUser.setNickName(proProjectInfoSubdeptsGroup.getGroupLeaderName());
|
||||
sysUser.setUserType(UserTypeEnums.FBRY.getCode());
|
||||
sysUser.setCardType(CardTypeEnums.SFZ.getCode());
|
||||
sysUser.setCardCode(proProjectInfoSubdeptsGroup.getGroupLeaderCode());
|
||||
sysUser.setUserPicture(proProjectInfoSubdeptsGroup.getGroupLeaderUserPicture());
|
||||
sysUser.setCardImgPos(proProjectInfoSubdeptsGroup.getGroupLeaderCardImgPos());
|
||||
sysUser.setCardImgInv(proProjectInfoSubdeptsGroup.getGroupLeaderCardImgInv());
|
||||
sysUser.setSex(StringUtils.judgeGender(proProjectInfoSubdeptsGroup.getGroupLeaderCode()));
|
||||
sysUser.setCreateBy(SecurityUtils.getUsername());
|
||||
sysUser.setCreateTime(DateUtils.getNowDate());
|
||||
sysUser.setRemark(proProjectInfoSubdeptsGroup.getSubDeptName());
|
||||
try {
|
||||
remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
|
||||
}catch (Exception e){
|
||||
// 已注册账号!!忽略异常...
|
||||
}
|
||||
|
||||
// TODO:实名制接入
|
||||
}
|
||||
proProjectInfoSubdeptsGroup.setUpdateBy(SecurityUtils.getUsername());
|
||||
proProjectInfoSubdeptsGroup.setUpdateTime(DateUtils.getNowDate());
|
||||
return proProjectInfoSubdeptsGroupMapper.updateProProjectInfoSubdeptsGroup(proProjectInfoSubdeptsGroup);
|
||||
}
|
||||
|
|
|
@ -2,19 +2,24 @@ package com.yanzhu.manage.service.impl;
|
|||
|
||||
import com.yanzhu.common.core.constant.CacheConstants;
|
||||
import com.yanzhu.common.core.constant.SecurityConstants;
|
||||
import com.yanzhu.common.core.domain.R;
|
||||
import com.yanzhu.common.core.enums.CardTypeEnums;
|
||||
import com.yanzhu.common.core.enums.UserTypeEnums;
|
||||
import com.yanzhu.common.core.utils.DateUtils;
|
||||
import com.yanzhu.common.core.utils.StringUtils;
|
||||
import com.yanzhu.common.redis.service.RedisService;
|
||||
import com.yanzhu.common.security.utils.SecurityUtils;
|
||||
import com.yanzhu.manage.config.ProfileConfig;
|
||||
import com.yanzhu.manage.domain.ProProjectInfo;
|
||||
import com.yanzhu.manage.domain.ProProjectInfoSubdepts;
|
||||
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsMapper;
|
||||
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper;
|
||||
import com.yanzhu.manage.service.IProProjectInfoSubdeptsService;
|
||||
import com.yanzhu.manage.utils.WxQrCodeUtils;
|
||||
import com.yanzhu.system.api.RemoteUserService;
|
||||
import com.yanzhu.system.api.domain.SysUser;
|
||||
import me.chanjar.weixin.mp.api.WxMpService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
@ -31,17 +36,22 @@ import java.util.Objects;
|
|||
@Service
|
||||
public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdeptsService
|
||||
{
|
||||
@Autowired
|
||||
private WxMpService wxMpService;
|
||||
|
||||
@Autowired
|
||||
private RedisService redisService;
|
||||
|
||||
@Autowired
|
||||
private ProfileConfig profileConfig;
|
||||
|
||||
@Autowired
|
||||
private RemoteUserService remoteUserService;
|
||||
|
||||
@Autowired
|
||||
private ProProjectInfoSubdeptsMapper proProjectInfoSubdeptsMapper;
|
||||
|
||||
@Autowired
|
||||
private ProProjectInfoSubdeptsUsersMapper proProjectInfoSubdeptsUsersMapper;
|
||||
private static final Logger log = LoggerFactory.getLogger(ProProjectInfoSubdeptsServiceImpl.class);
|
||||
|
||||
/**
|
||||
* 查询分包单位
|
||||
|
@ -82,11 +92,18 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
|
|||
ProProjectInfo info = redisService.getCacheObject(CacheConstants.PRO_PROJECT+proProjectInfoSubdepts.getProjectId());
|
||||
proProjectInfoSubdepts.setComId(info.getComId());
|
||||
if(Objects.equals(proProjectInfoSubdepts.getSubDeptType(),"4") || Objects.equals(proProjectInfoSubdepts.getSubDeptType(),"4")){
|
||||
// TODO:生成二维码
|
||||
|
||||
try {
|
||||
String accessToken = wxMpService.getAccessToken();
|
||||
String imgPath = profileConfig.getPath()+"/"+System.currentTimeMillis()+".png";
|
||||
log.info("accessToken...{}",accessToken);
|
||||
WxQrCodeUtils.generateQrCode(imgPath, "pages/index/index", "aa=108&bb=2&cc=3", accessToken);
|
||||
// TODO:生成二维码
|
||||
//proProjectInfoSubdepts.setQrCode();
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
// 单位委托人信息
|
||||
if(StringUtils.isNotEmpty(proProjectInfoSubdepts.getSubDeptLeaderName()) && StringUtils.isNotEmpty(proProjectInfoSubdepts.getSubDeptLeaderCode()) && StringUtils.isNotEmpty(proProjectInfoSubdepts.getSubDeptLeaderPhone())){
|
||||
// 判断用户是否存在
|
||||
SysUser sysUser = new SysUser();
|
||||
sysUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone());
|
||||
sysUser.setNickName(proProjectInfoSubdepts.getSubDeptLeaderName());
|
||||
|
@ -101,7 +118,8 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
|
|||
sysUser.setCreateTime(DateUtils.getNowDate());
|
||||
sysUser.setRemark(proProjectInfoSubdepts.getSubDeptName());
|
||||
try {
|
||||
remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
|
||||
R<Long> userResult = remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
|
||||
proProjectInfoSubdepts.setSubDeptLeaderId(userResult.getData());
|
||||
}catch (Exception e){
|
||||
// 已注册账号!!忽略异常...
|
||||
}
|
||||
|
@ -121,6 +139,7 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateProProjectInfoSubdepts(ProProjectInfoSubdepts proProjectInfoSubdepts)
|
||||
{
|
||||
if(Objects.equals(proProjectInfoSubdepts.getSubDeptType(),"4") || Objects.equals(proProjectInfoSubdepts.getSubDeptType(),"4")){
|
||||
|
@ -129,7 +148,6 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
|
|||
|
||||
// 单位委托人信息
|
||||
if(StringUtils.isNotEmpty(proProjectInfoSubdepts.getSubDeptLeaderName()) && StringUtils.isNotEmpty(proProjectInfoSubdepts.getSubDeptLeaderCode()) && StringUtils.isNotEmpty(proProjectInfoSubdepts.getSubDeptLeaderPhone())){
|
||||
// 判断用户是否存在
|
||||
SysUser sysUser = new SysUser();
|
||||
sysUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone());
|
||||
sysUser.setNickName(proProjectInfoSubdepts.getSubDeptLeaderName());
|
||||
|
@ -144,7 +162,8 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
|
|||
sysUser.setCreateTime(DateUtils.getNowDate());
|
||||
sysUser.setRemark(proProjectInfoSubdepts.getSubDeptName());
|
||||
try {
|
||||
remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
|
||||
R<Long> userResult = remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
|
||||
proProjectInfoSubdepts.setSubDeptLeaderId(userResult.getData());
|
||||
}catch (Exception e){
|
||||
// 已注册账号!!忽略异常...
|
||||
}
|
||||
|
@ -158,6 +177,19 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
|
|||
return proProjectInfoSubdeptsMapper.updateProProjectInfoSubdepts(proProjectInfoSubdepts);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改分包单位
|
||||
*
|
||||
* @param proProjectInfoSubdepts 分包单位
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateProProjectInfoSubdeptsEntity(ProProjectInfoSubdepts proProjectInfoSubdepts){
|
||||
proProjectInfoSubdepts.setUpdateBy(SecurityUtils.getUsername());
|
||||
proProjectInfoSubdepts.setUpdateTime(DateUtils.getNowDate());
|
||||
return proProjectInfoSubdeptsMapper.updateProProjectInfoSubdepts(proProjectInfoSubdepts);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除分包单位
|
||||
*
|
||||
|
|
|
@ -189,16 +189,16 @@ public class SysUserController extends BaseController {
|
|||
*/
|
||||
@InnerAuth
|
||||
@PostMapping("/register")
|
||||
public R<Boolean> register(@RequestBody SysUser sysUser) {
|
||||
public R<Long> register(@RequestBody SysUser sysUser) {
|
||||
String username = sysUser.getUserName();
|
||||
if (Objects.isNull(sysUser.getUserType()) || Objects.equals(UserTypeEnums.ZSRY.getCode(), sysUser.getUserType())) {
|
||||
if (!("true".equals(configService.selectConfigByKey("sys.account.registerUser")))) {
|
||||
return R.fail("当前系统没有开启注册功能!");
|
||||
}
|
||||
}
|
||||
if (!userService.checkUserNameUnique(sysUser)) {
|
||||
/**if (!userService.checkUserNameUnique(sysUser)) {
|
||||
return R.fail("保存用户'" + username + "'失败,注册账号已存在");
|
||||
}
|
||||
}*/
|
||||
return R.ok(userService.registerUser(sysUser));
|
||||
}
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ public interface ISysUserService
|
|||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public boolean registerUser(SysUser user);
|
||||
public Long registerUser(SysUser user);
|
||||
|
||||
/**
|
||||
* 修改用户信息
|
||||
|
|
|
@ -319,9 +319,16 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean registerUser(SysUser user)
|
||||
public Long registerUser(SysUser user)
|
||||
{
|
||||
return userMapper.insertUser(user) > 0;
|
||||
SysUser info = userMapper.checkUserNameUnique(user.getUserName());
|
||||
if(Objects.nonNull(info)){
|
||||
user.setUserId(info.getUserId());
|
||||
userMapper.updateUser(user);
|
||||
}else{
|
||||
userMapper.insertUser(user);
|
||||
}
|
||||
return user.getUserId();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -175,7 +175,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
|
||||
<select id="checkUserNameUnique" parameterType="String" resultMap="SysUserResult">
|
||||
select user_id, user_name from sys_user where user_name = #{userName} and del_flag = '0' limit 1
|
||||
select * from sys_user where user_name = #{userName}
|
||||
</select>
|
||||
|
||||
<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询分包单位列表
|
||||
export function findAllProjectInfoSubdepts(query) {
|
||||
return request({
|
||||
url: '/manage/proProjectInfoSubdepts/findAll',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询分包单位列表
|
||||
export function listProProjectInfoSubdepts(query) {
|
||||
return request({
|
||||
|
@ -35,6 +44,15 @@ export function updateProProjectInfoSubdepts(data) {
|
|||
})
|
||||
}
|
||||
|
||||
// 修改分包单位
|
||||
export function updateProProjectInfoSubdeptsEntity(data) {
|
||||
return request({
|
||||
url: '/manage/proProjectInfoSubdepts/editInfos',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除分包单位
|
||||
export function delProProjectInfoSubdepts(id) {
|
||||
return request({
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<el-button type="primary" plain :icon="OfficeBuilding" @click="showProList">{{userStore.currentProId?userStore.currentProName:'所有项目'}}</el-button>
|
||||
|
||||
<!--选择项目-->
|
||||
<el-dialog v-model="dialogVisible" title="选择切换项目" width="800" custom-class="CurrentProjectDlg">
|
||||
<el-dialog v-model="dialogVisible" title="选择切换项目" width="800" modal-class="CurrentProjectDlg">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="68px">
|
||||
<el-form-item label="项目名称" prop="projectName">
|
||||
<el-input
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目名称" prop="projectName">
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentProId">
|
||||
<el-input
|
||||
v-model="queryParams.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
|
@ -19,6 +19,16 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="进场状态" prop="useStatus">
|
||||
<el-select v-model="queryParams.useStatus" placeholder="请选择进场状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in sys_use_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位名称" prop="subDeptName">
|
||||
<el-input
|
||||
v-model="queryParams.subDeptName"
|
||||
|
@ -75,16 +85,6 @@
|
|||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-tabs
|
||||
v-model="activeName"
|
||||
type="card"
|
||||
class="demo-tabs"
|
||||
@tab-click="getList"
|
||||
>
|
||||
<el-tab-pane :label="'全部('+tabs.all+')'" name="all"></el-tab-pane>
|
||||
<el-tab-pane :label="'已入场('+tabs.in+')'" name="in"></el-tab-pane>
|
||||
<el-tab-pane :label="'已退场('+tabs.out+')'" name="out"></el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-table v-loading="loading" :data="proProjectInfoSubdeptsList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="公司名称" align="center" prop="comName" />
|
||||
|
@ -107,7 +107,6 @@
|
|||
<dict-tag :options="sys_use_status" :value="scope.row.useStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建人" align="center" prop="createBy" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="120">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
|
@ -118,10 +117,11 @@
|
|||
<dict-tag :options="sys_approve_status" :value="scope.row.approveStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="150" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="操作" fixed="right" width="120" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['manage:proProjectInfoSubdepts:edit']">修改</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['manage:proProjectInfoSubdepts:remove']">删除</el-button>
|
||||
<el-button v-if="scope.row.useStatus=='1'" link type="primary" icon="Setting" @click="handleUseStatus(scope.row)" v-hasPermi="['manage:proProjectInfoSubdepts:remove']">离场</el-button>
|
||||
<el-button v-if="scope.row.useStatus=='2'" link type="primary" icon="Setting" @click="handleUseStatus(scope.row)" v-hasPermi="['manage:proProjectInfoSubdepts:remove']">进场</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -135,7 +135,7 @@
|
|||
/>
|
||||
|
||||
<!-- 添加或修改分包单位对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="680px" append-to-body custom-class="SubdeptsDlg">
|
||||
<el-dialog :title="title" v-model="open" width="680px" append-to-body modal-class="SubdeptsDlg">
|
||||
<el-form ref="proProjectInfoSubdeptsRef" :model="form" :rules="rules" label-width="88px">
|
||||
<el-tabs
|
||||
v-model="activeTabs"
|
||||
|
@ -206,7 +206,7 @@
|
|||
<el-input v-model="form.subDeptInfos.person" maxlength="10" show-word-limit placeholder="请输入企业联系人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人电话">
|
||||
<el-input v-model="form.subDeptInfos.personPhone" maxlength="10" show-word-limit placeholder="请输入联系人电话" />
|
||||
<el-input v-model="form.subDeptInfos.personPhone" maxlength="11" show-word-limit placeholder="请输入联系人电话" />
|
||||
</el-form-item>
|
||||
<el-form-item label="法定代表人">
|
||||
<el-input v-model="form.subDeptInfos.legalPerson" maxlength="10" show-word-limit placeholder="请输入法定代表人" />
|
||||
|
@ -222,10 +222,10 @@
|
|||
</el-form-item>
|
||||
<el-divider content-position="left" class="divider_title">银行卡信息</el-divider>
|
||||
<el-form-item label="支行名称">
|
||||
<el-input v-model="form.subDeptInfos.bankName" maxlength="64" show-word-limit placeholder="请输入支行名称" />
|
||||
<el-input v-model="form.subDeptInfos.bankName" maxlength="32" show-word-limit placeholder="请输入支行名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="银行卡号">
|
||||
<el-input v-model="form.subDeptInfos.bankNumber" maxlength="64" show-word-limit placeholder="请输入银行卡号" />
|
||||
<el-input v-model="form.subDeptInfos.bankNumber" maxlength="32" show-word-limit placeholder="请输入银行卡号" />
|
||||
</el-form-item>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="委托人信息" name="leader" v-if="form.subDeptType=='4' || form.subDeptType=='5'">
|
||||
|
@ -233,21 +233,21 @@
|
|||
<image-upload v-model="form.subDeptLeaderPowerPath" :limit="1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="委托人姓名" prop="subDeptLeaderName">
|
||||
<el-input v-model="form.subDeptLeaderName" placeholder="请输入委托人姓名" />
|
||||
<el-input v-model="form.subDeptLeaderName" placeholder="请输入委托人姓名" maxlength="10" show-word-limit/>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号码" prop="subDeptLeaderCode">
|
||||
<el-input v-model="form.subDeptLeaderCode" placeholder="请输入委托人身份证号码" />
|
||||
<el-input v-model="form.subDeptLeaderCode" placeholder="请输入委托人身份证号码" maxlength="18" show-word-limit/>
|
||||
</el-form-item>
|
||||
<el-form-item label="委托人电话" prop="subDeptLeaderPhone">
|
||||
<el-input v-model="form.subDeptLeaderPhone" placeholder="请输入委托人电话" />
|
||||
<el-input v-model="form.subDeptLeaderPhone" placeholder="请输入委托人电话" maxlength="11" show-word-limit/>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col span="12">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="身份证正面">
|
||||
<image-upload v-model="form.leaderCardImgPos" :limit="1" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="身份证反面">
|
||||
<image-upload v-model="form.leaderCardImgInv" :limit="1" />
|
||||
</el-form-item>
|
||||
|
@ -270,7 +270,7 @@
|
|||
</template>
|
||||
|
||||
<script setup name="ProProjectInfoSubdepts">
|
||||
import { listProProjectInfoSubdepts, getProProjectInfoSubdepts, delProProjectInfoSubdepts, addProProjectInfoSubdepts, updateProProjectInfoSubdepts } from "@/api/manage/proProjectInfoSubdepts";
|
||||
import { listProProjectInfoSubdepts, getProProjectInfoSubdepts, delProProjectInfoSubdepts, addProProjectInfoSubdepts, updateProProjectInfoSubdepts, updateProProjectInfoSubdeptsEntity } from "@/api/manage/proProjectInfoSubdepts";
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
@ -286,8 +286,6 @@ const single = ref(true);
|
|||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const tabs = ref({all:0,in:0,out:0});
|
||||
const activeName = ref("all");
|
||||
const activeTabs = ref("base");
|
||||
|
||||
const data = reactive({
|
||||
|
@ -297,20 +295,12 @@ const data = reactive({
|
|||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
deptId: null,
|
||||
projectId: null,
|
||||
subDeptId: null,
|
||||
projectName: null,
|
||||
subDeptType: null,
|
||||
subDeptName: null,
|
||||
subDeptCode: null,
|
||||
subDeptLeaderId: null,
|
||||
subDeptLeaderName: null,
|
||||
subDeptLeaderCode: null,
|
||||
subDeptLeaderPhone: null,
|
||||
useStatus: null,
|
||||
useStatus: '1',
|
||||
approveStatus: null,
|
||||
qrCode: null,
|
||||
isDel: null,
|
||||
},
|
||||
rules: {
|
||||
subDeptType: [{ required: true, message: "单位类型不能为空", trigger: "change" }],
|
||||
|
@ -359,7 +349,7 @@ function reset() {
|
|||
subDeptInfos: null,
|
||||
contractInfos: null,
|
||||
useDates: null,
|
||||
useStatus: null,
|
||||
useStatus: '1',
|
||||
approveStatus: null,
|
||||
qrCode: null,
|
||||
isDel: null,
|
||||
|
@ -443,7 +433,7 @@ function submitForm() {
|
|||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const _ids = row.id || ids.value;
|
||||
const _ids = row.id || ids.value
|
||||
proxy.$modal.confirm('是否确认删除分包单位编号为"' + _ids + '"的数据项?').then(function() {
|
||||
return delProProjectInfoSubdepts(_ids);
|
||||
}).then(() => {
|
||||
|
@ -452,6 +442,17 @@ function handleDelete(row) {
|
|||
}).catch(() => {});
|
||||
}
|
||||
|
||||
/** 进场/退场操作 */
|
||||
function handleUseStatus(row) {
|
||||
let state = row.useStatus=='1'?"离场":"进场";
|
||||
proxy.$modal.confirm('是否确认修改单位状态为"' + state + '"?').then(function() {
|
||||
return updateProProjectInfoSubdeptsEntity({'id':row.id,'useStatus':row.useStatus=='1'?"2":"1"});
|
||||
}).then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download('manage/proProjectInfoSubdepts/export', {
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目主键" prop="projectId">
|
||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentProId">
|
||||
<el-input
|
||||
v-model="queryParams.projectId"
|
||||
placeholder="请输入项目主键"
|
||||
v-model="queryParams.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="分包单位" prop="subDeptId">
|
||||
<el-form-item label="单位名称" prop="subDeptName">
|
||||
<el-input
|
||||
v-model="queryParams.subDeptId"
|
||||
placeholder="请输入分包单位"
|
||||
v-model="queryParams.subDeptName"
|
||||
placeholder="请输入单位名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="分包单位类型" prop="subDeptType">
|
||||
<el-select v-model="queryParams.subDeptType" placeholder="请选择分包单位类型" clearable>
|
||||
<el-form-item label="单位类型" prop="subDeptType">
|
||||
<el-select v-model="queryParams.subDeptType" placeholder="请选择单位类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in sub_dept_type"
|
||||
:key="dict.value"
|
||||
|
@ -27,22 +27,6 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="分包单位名称" prop="subDeptName">
|
||||
<el-input
|
||||
v-model="queryParams.subDeptName"
|
||||
placeholder="请输入分包单位名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="分包单位编号" prop="subDeptCode">
|
||||
<el-input
|
||||
v-model="queryParams.subDeptCode"
|
||||
placeholder="请输入分包单位编号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="班组名称" prop="groupName">
|
||||
<el-input
|
||||
v-model="queryParams.groupName"
|
||||
|
@ -51,14 +35,6 @@
|
|||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="班组编号" prop="groupCode">
|
||||
<el-input
|
||||
v-model="queryParams.groupCode"
|
||||
placeholder="请输入班组编号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工种类型" prop="craftType">
|
||||
<el-select v-model="queryParams.craftType" placeholder="请选择工种类型" clearable>
|
||||
<el-option
|
||||
|
@ -79,58 +55,6 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人姓名" prop="groupLeaderName">
|
||||
<el-input
|
||||
v-model="queryParams.groupLeaderName"
|
||||
placeholder="请输入负责人姓名"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人证件号码" prop="groupLeaderCode">
|
||||
<el-input
|
||||
v-model="queryParams.groupLeaderCode"
|
||||
placeholder="请输入负责人证件号码"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人电话" prop="groupLeaderPhone">
|
||||
<el-input
|
||||
v-model="queryParams.groupLeaderPhone"
|
||||
placeholder="请输入负责人电话"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="进场状态" prop="useStatus">
|
||||
<el-select v-model="queryParams.useStatus" placeholder="请选择进场状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in sys_use_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="二维码" prop="qrCode">
|
||||
<el-input
|
||||
v-model="queryParams.qrCode"
|
||||
placeholder="请输入二维码"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标识" prop="isDel">
|
||||
<el-select v-model="queryParams.isDel" placeholder="请选择删除标识" clearable>
|
||||
<el-option
|
||||
v-for="dict in sys_is_del"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
|
@ -181,18 +105,15 @@
|
|||
|
||||
<el-table v-loading="loading" :data="proProjectInfoSubdeptsGroupList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="项目主键" align="center" prop="projectId" />
|
||||
<el-table-column label="分包单位" align="center" prop="subDeptId" />
|
||||
<el-table-column label="分包单位类型" align="center" prop="subDeptType">
|
||||
<el-table-column label="公司名称" align="center" prop="comName" />
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" />
|
||||
<el-table-column label="单位名称" align="center" prop="subDeptName" />
|
||||
<el-table-column label="单位类型" align="center" prop="subDeptType">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="sub_dept_type" :value="scope.row.subDeptType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="分包单位名称" align="center" prop="subDeptName" />
|
||||
<el-table-column label="分包单位编号" align="center" prop="subDeptCode" />
|
||||
<el-table-column label="班组名称" align="center" prop="groupName" />
|
||||
<el-table-column label="班组编号" align="center" prop="groupCode" />
|
||||
<el-table-column label="工种类型" align="center" prop="craftType">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="pro_craft_type" :value="scope.row.craftType"/>
|
||||
|
@ -203,22 +124,18 @@
|
|||
<dict-tag :options="pro_craft_post" :value="scope.row.craftPost"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="负责人姓名" align="center" prop="groupLeaderName" />
|
||||
<el-table-column label="负责人证件号码" align="center" prop="groupLeaderCode" />
|
||||
<el-table-column label="负责人电话" align="center" prop="groupLeaderPhone" />
|
||||
<el-table-column label="进场状态" align="center" prop="useStatus">
|
||||
<el-table-column label="班组长" align="center" prop="groupLeaderName" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="120">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="sys_use_status" :value="scope.row.useStatus"/>
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批状态" align="center" prop="approveStatus" />
|
||||
<el-table-column label="二维码" align="center" prop="qrCode" />
|
||||
<el-table-column label="删除标识" align="center" prop="isDel">
|
||||
<el-table-column label="审批状态" align="center" prop="approveStatus" >
|
||||
<template #default="scope">
|
||||
<dict-tag :options="sys_is_del" :value="scope.row.isDel"/>
|
||||
<dict-tag :options="sys_approve_status" :value="scope.row.approveStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="操作" fixed="right" width="120" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['manage:proProjectInfoSubdeptsGroup:edit']">修改</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['manage:proProjectInfoSubdeptsGroup:remove']">删除</el-button>
|
||||
|
@ -234,39 +151,30 @@
|
|||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改分包单位班组对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
||||
<el-form ref="proProjectInfoSubdeptsGroupRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="项目主键" prop="projectId">
|
||||
<el-input v-model="form.projectId" placeholder="请输入项目主键" />
|
||||
<!-- 添加或修改单位班组对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="680px" append-to-body modal-class="SubdeptsGroupDlg">
|
||||
<el-form ref="proProjectInfoSubdeptsGroupRef" :model="form" :rules="rules" label-width="88px">
|
||||
<el-tabs
|
||||
v-model="activeTabs"
|
||||
type="card"
|
||||
class="demo-tabs"
|
||||
>
|
||||
<el-tab-pane label="基本信息" name="base">
|
||||
<el-form-item label="项目名称" v-if="form.projectId">
|
||||
<el-tag effect="plain">{{ form.projectName }}</el-tag>
|
||||
</el-form-item>
|
||||
<el-form-item label="分包单位" prop="subDeptId">
|
||||
<el-input v-model="form.subDeptId" placeholder="请输入分包单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="分包单位类型" prop="subDeptType">
|
||||
<el-select v-model="form.subDeptType" placeholder="请选择分包单位类型">
|
||||
<el-form-item label="所属单位" prop="subDeptId">
|
||||
<el-select v-model="form.subDeptId" placeholder="请选择所属单位" style="width:100%">
|
||||
<el-option
|
||||
v-for="dict in sub_dept_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
v-for="dept in subDeptOptions"
|
||||
:key="dept.id"
|
||||
:label="dept.subDeptName"
|
||||
:value="dept.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="分包单位名称" prop="subDeptName">
|
||||
<el-input v-model="form.subDeptName" placeholder="请输入分包单位名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="分包单位编号" prop="subDeptCode">
|
||||
<el-input v-model="form.subDeptCode" placeholder="请输入分包单位编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="班组名称" prop="groupName">
|
||||
<el-input v-model="form.groupName" placeholder="请输入班组名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="班组编号" prop="groupCode">
|
||||
<el-input v-model="form.groupCode" placeholder="请输入班组编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工种类型" prop="craftType">
|
||||
<el-select v-model="form.craftType" placeholder="请选择工种类型">
|
||||
<el-select v-model="form.craftType" placeholder="请选择工种类型" style="width:100%">
|
||||
<el-option
|
||||
v-for="dict in pro_craft_type"
|
||||
:key="dict.value"
|
||||
|
@ -276,7 +184,7 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工种岗位" prop="craftPost">
|
||||
<el-select v-model="form.craftPost" placeholder="请选择工种岗位">
|
||||
<el-select v-model="form.craftPost" placeholder="请选择工种岗位" style="width:100%">
|
||||
<el-option
|
||||
v-for="dict in pro_craft_post"
|
||||
:key="dict.value"
|
||||
|
@ -285,41 +193,37 @@
|
|||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人姓名" prop="groupLeaderName">
|
||||
<el-input v-model="form.groupLeaderName" placeholder="请输入负责人姓名" />
|
||||
<el-form-item label="班组名称" prop="groupName">
|
||||
<el-input v-model="form.groupName" placeholder="请输入班组名称" maxlength="32" show-word-limit/>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人证件号码" prop="groupLeaderCode">
|
||||
<el-input v-model="form.groupLeaderCode" placeholder="请输入负责人证件号码" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="班组长信息" name="groupLeader">
|
||||
<el-form-item label="班组长姓名" prop="groupLeaderName">
|
||||
<el-input v-model="form.groupLeaderName" placeholder="请输入班组长姓名" maxlength="10" show-word-limit/>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人电话" prop="groupLeaderPhone">
|
||||
<el-input v-model="form.groupLeaderPhone" placeholder="请输入负责人电话" />
|
||||
<el-form-item label="身份证号码" prop="groupLeaderCode">
|
||||
<el-input v-model="form.groupLeaderCode" placeholder="请输入班组长身份证号码" maxlength="18" show-word-limit/>
|
||||
</el-form-item>
|
||||
<el-form-item label="进场状态" prop="useStatus">
|
||||
<el-select v-model="form.useStatus" placeholder="请选择进场状态">
|
||||
<el-option
|
||||
v-for="dict in sys_use_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="二维码" prop="qrCode">
|
||||
<el-input v-model="form.qrCode" placeholder="请输入二维码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标识" prop="isDel">
|
||||
<el-select v-model="form.isDel" placeholder="请选择删除标识">
|
||||
<el-option
|
||||
v-for="dict in sys_is_del"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="parseInt(dict.value)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
<el-form-item label="班组长电话" prop="groupLeaderPhone">
|
||||
<el-input v-model="form.groupLeaderPhone" placeholder="请输入班组长电话" maxlength="11" show-word-limit/>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="身份证正面">
|
||||
<image-upload v-model="form.grouLeaderCardImgPos" :limit="1" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="身份证反面">
|
||||
<image-upload v-model="form.grouLeaderCardImgInv" :limit="1" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="班组长照片">
|
||||
<image-upload v-model="form.grouLeaderUserPicture" :limit="1" />
|
||||
</el-form-item>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
|
@ -332,11 +236,14 @@
|
|||
</template>
|
||||
|
||||
<script setup name="ProProjectInfoSubdeptsGroup">
|
||||
import { findAllProjectInfoSubdepts } from "@/api/manage/proProjectInfoSubdepts";
|
||||
import { listProProjectInfoSubdeptsGroup, getProProjectInfoSubdeptsGroup, delProProjectInfoSubdeptsGroup, addProProjectInfoSubdeptsGroup, updateProProjectInfoSubdeptsGroup } from "@/api/manage/proProjectInfoSubdeptsGroup";
|
||||
import useUserStore from '@/store/modules/user'
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_use_status, sub_dept_type, pro_craft_type, sys_is_del, pro_craft_post } = proxy.useDict('sys_use_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 } = proxy.useDict('sys_approve_status', 'sub_dept_type', 'pro_craft_type', 'sys_is_del', 'pro_craft_post');
|
||||
|
||||
const userStore = useUserStore()
|
||||
const proProjectInfoSubdeptsGroupList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
|
@ -346,36 +253,33 @@ const single = ref(true);
|
|||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const activeTabs = ref("base");
|
||||
const subDeptOptions = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: null,
|
||||
subDeptId: null,
|
||||
projectName: null,
|
||||
subDeptType: null,
|
||||
subDeptName: null,
|
||||
subDeptCode: null,
|
||||
groupName: null,
|
||||
groupCode: null,
|
||||
craftType: null,
|
||||
craftPost: null,
|
||||
groupLeaderName: null,
|
||||
groupLeaderCode: null,
|
||||
groupLeaderPhone: null,
|
||||
useStatus: null,
|
||||
approveStatus: null,
|
||||
qrCode: null,
|
||||
isDel: null,
|
||||
},
|
||||
rules: {
|
||||
subDeptId: [{ required: true, message: "所属单位不能为空", trigger: "change" }],
|
||||
craftType: [{ required: true, message: "工种类型不能为空", trigger: "change" }],
|
||||
craftPost: [{ required: true, message: "工种岗位不能为空", trigger: "change" }],
|
||||
groupName: [{ required: true, message: "班组名称不能为空", trigger: "blur" }],
|
||||
}
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
/** 查询分包单位班组列表 */
|
||||
/** 查询单位班组列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
listProProjectInfoSubdeptsGroup(queryParams.value).then(response => {
|
||||
|
@ -395,6 +299,7 @@ function cancel() {
|
|||
function reset() {
|
||||
form.value = {
|
||||
id: null,
|
||||
comId: null,
|
||||
projectId: null,
|
||||
subDeptId: null,
|
||||
subDeptType: null,
|
||||
|
@ -441,19 +346,28 @@ function handleSelectionChange(selection) {
|
|||
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
if(!userStore.currentProId){
|
||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
||||
return false;
|
||||
}
|
||||
reset();
|
||||
form.value.projectId = userStore.currentProId;
|
||||
form.value.projectName = userStore.currentProName;
|
||||
initSubDeptOptions(userStore.currentProId);
|
||||
activeTabs.value = "base";
|
||||
open.value = true;
|
||||
title.value = "添加分包单位班组";
|
||||
title.value = "添加单位班组";
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
initSubDeptOptions(row.projectId);
|
||||
const _id = row.id || ids.value
|
||||
getProProjectInfoSubdeptsGroup(_id).then(response => {
|
||||
form.value = response.data;
|
||||
open.value = true;
|
||||
title.value = "修改分包单位班组";
|
||||
title.value = "修改单位班组";
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -468,6 +382,7 @@ function submitForm() {
|
|||
getList();
|
||||
});
|
||||
} else {
|
||||
form.value.approveStatus = 101;
|
||||
addProProjectInfoSubdeptsGroup(form.value).then(response => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
|
@ -481,7 +396,7 @@ function submitForm() {
|
|||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const _ids = row.id || ids.value;
|
||||
proxy.$modal.confirm('是否确认删除分包单位班组编号为"' + _ids + '"的数据项?').then(function() {
|
||||
proxy.$modal.confirm('是否确认删除单位班组编号为"' + _ids + '"的数据项?').then(function() {
|
||||
return delProProjectInfoSubdeptsGroup(_ids);
|
||||
}).then(() => {
|
||||
getList();
|
||||
|
@ -496,5 +411,25 @@ function handleExport() {
|
|||
}, `proProjectInfoSubdeptsGroup_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
/** 初始化 */
|
||||
function initSubDeptOptions(value) {
|
||||
findAllProjectInfoSubdepts({'projectId':value}).then(res => {
|
||||
subDeptOptions.value = res.data;
|
||||
})
|
||||
}
|
||||
|
||||
getList();
|
||||
</script>
|
||||
<style lang="scss" scope>
|
||||
.el-divider__text{
|
||||
color: #409eff;
|
||||
font-weight: 800;
|
||||
}
|
||||
.SubdeptsDlg{
|
||||
.el-dialog__body{
|
||||
margin-top: -25px;
|
||||
overflow: auto;
|
||||
max-height: 680px;
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue