Compare commits
2 Commits
9988754739
...
e88f802800
Author | SHA1 | Date |
---|---|---|
|
e88f802800 | |
|
2bd827b5d2 |
|
@ -5,12 +5,21 @@ package com.yanzhu.common.core.enums;
|
||||||
*/
|
*/
|
||||||
public enum UserTypeEnums {
|
public enum UserTypeEnums {
|
||||||
|
|
||||||
ZSRY("00", "正式人员",""),
|
ZSRY("00", "正式人员","key"),
|
||||||
LSRY("08", "临时人员",""),
|
LSRY("08", "临时人员","key"),
|
||||||
FBWTDL("80", "分包代理人","fbwtdl"),
|
FBWTDL("80", "分包代理人","fbwtdl"),
|
||||||
FBXMJL("79", "分包项目经理","fbxmjl"),
|
FBXMJL("79", "分包项目经理","fbxmjl"),
|
||||||
FBBZZZ("78", "分包班组组长","fbbzzz"),
|
FBBZZZ("78", "分包班组组长","fbbzzz"),
|
||||||
FBLWRY("77", "分包劳务人员","");
|
FBLWRY("77", "分包劳务人员","key"),
|
||||||
|
JSDWRY("69", "建设单位人员","jsdw"),
|
||||||
|
JLDWRY("68", "监理单位人员","jldw"),
|
||||||
|
SGDWRY("67", "施工单位人员","sgdw"),
|
||||||
|
CLFBRY("66", "材料分包人员","clfb"),
|
||||||
|
HQFBRY("65", "后勤分包人员","hqfb"),
|
||||||
|
TSSBRY("64", "特殊设备人员","tssb"),
|
||||||
|
KTDWRY("63", "勘探单位人员","ktdw"),
|
||||||
|
SJDWRY("62", "设计单位人员","sjdw"),
|
||||||
|
OTHER("59", "其它单位人员","other");
|
||||||
|
|
||||||
private final String code;
|
private final String code;
|
||||||
private final String info;
|
private final String info;
|
||||||
|
|
|
@ -59,4 +59,9 @@ public interface ProProjectInfoSubdeptsGroupMapper
|
||||||
*/
|
*/
|
||||||
public int deleteProProjectInfoSubdeptsGroupByIds(Long[] ids);
|
public int deleteProProjectInfoSubdeptsGroupByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位班组离场
|
||||||
|
* @param subDeptId
|
||||||
|
*/
|
||||||
|
public void updateUseStatusByParams(Long subDeptId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,4 +100,11 @@ public interface ProProjectInfoSubdeptsUsersMapper
|
||||||
* 统计分包单位在岗人员
|
* 统计分包单位在岗人员
|
||||||
*/
|
*/
|
||||||
public List<Map<String, Object>> statsSubDeptsUsersByProId(ProProjectInfoSubdeptsUsers where);
|
public List<Map<String, Object>> statsSubDeptsUsersByProId(ProProjectInfoSubdeptsUsers where);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位人员离场
|
||||||
|
* @param subDeptId 单位主键
|
||||||
|
* @param subDeptGroupId 班组主键
|
||||||
|
*/
|
||||||
|
public void updateUseStatusByParams(@Param("subDeptId")Long subDeptId, @Param("subDeptGroupId")Long subDeptGroupId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="selectProProjectInfoSubdeptsGroupList" parameterType="ProProjectInfoSubdeptsGroup" resultMap="ProProjectInfoSubdeptsGroupResult">
|
<select id="selectProProjectInfoSubdeptsGroupList" parameterType="ProProjectInfoSubdeptsGroup" resultMap="ProProjectInfoSubdeptsGroupResult">
|
||||||
<include refid="selectProProjectInfoSubdeptsGroupVo"/>
|
<include refid="selectProProjectInfoSubdeptsGroupVo"/>
|
||||||
<where>
|
<where>
|
||||||
psg.is_del != 2
|
|
||||||
<if test="comId != null "> and psg.com_id = #{comId}</if>
|
<if test="comId != null "> and psg.com_id = #{comId}</if>
|
||||||
<if test="projectId != null "> and psg.project_id = #{projectId}</if>
|
<if test="projectId != null "> and psg.project_id = #{projectId}</if>
|
||||||
<if test="activeComId != null "> and psg.com_id = #{activeComId}</if>
|
<if test="activeComId != null "> and psg.com_id = #{activeComId}</if>
|
||||||
|
@ -55,6 +54,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="groupName != null and groupName != ''"> and psg.group_name like concat('%', #{groupName}, '%')</if>
|
<if test="groupName != null and groupName != ''"> and psg.group_name like concat('%', #{groupName}, '%')</if>
|
||||||
<if test="craftType != null and craftType != ''"> and psg.craft_type = #{craftType}</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="craftPost != null and craftPost != ''"> and psg.craft_post = #{craftPost}</if>
|
||||||
|
<if test="useStatus != null and useStatus != ''"> and psg.use_status = #{useStatus}</if>
|
||||||
|
and psg.is_del != 2
|
||||||
</where>
|
</where>
|
||||||
order by psg.id desc
|
order by psg.id desc
|
||||||
</select>
|
</select>
|
||||||
|
@ -146,14 +147,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="deleteProProjectInfoSubdeptsGroupById" parameterType="Long">
|
<update id="deleteProProjectInfoSubdeptsGroupById" parameterType="Long">
|
||||||
update pro_project_info_subdepts_group set is_del=1 where id = #{id}
|
update pro_project_info_subdepts_group set is_del = 2 where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="deleteProProjectInfoSubdeptsGroupByIds" parameterType="String">
|
<update id="deleteProProjectInfoSubdeptsGroupByIds" parameterType="String">
|
||||||
update pro_project_info_subdepts_group set is_del=1 where id in
|
update pro_project_info_subdepts_group set is_del = 2 where id in
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="updateUseStatusByParams" parameterType="Long">
|
||||||
|
update pro_project_info_subdepts_group set use_status = 2 where id sub_dept_id = #{subDeptId}
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -45,7 +45,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="selectProProjectInfoSubdeptsList" parameterType="ProProjectInfoSubdepts" resultMap="ProProjectInfoSubdeptsResult">
|
<select id="selectProProjectInfoSubdeptsList" parameterType="ProProjectInfoSubdepts" resultMap="ProProjectInfoSubdeptsResult">
|
||||||
<include refid="selectProProjectInfoSubdeptsVo"/>
|
<include refid="selectProProjectInfoSubdeptsVo"/>
|
||||||
<where>
|
<where>
|
||||||
ps.is_del = 0
|
|
||||||
<if test="comId != null "> and ps.com_id = #{comId}</if>
|
<if test="comId != null "> and ps.com_id = #{comId}</if>
|
||||||
<if test="projectId != null "> and ps.project_id = #{projectId}</if>
|
<if test="projectId != null "> and ps.project_id = #{projectId}</if>
|
||||||
<if test="activeComId != null "> and ps.com_id = #{activeComId}</if>
|
<if test="activeComId != null "> and ps.com_id = #{activeComId}</if>
|
||||||
|
@ -57,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="useStatus != null and useStatus != ''"> and ps.use_status = #{useStatus}</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="approveStatus != null "> and ps.approve_status = #{approveStatus}</if>
|
||||||
<if test="subDeptLeaderPhone != null and subDeptLeaderPhone != ''"> and ps.sub_dept_leader_phone = #{subDeptLeaderPhone}</if>
|
<if test="subDeptLeaderPhone != null and subDeptLeaderPhone != ''"> and ps.sub_dept_leader_phone = #{subDeptLeaderPhone}</if>
|
||||||
|
and ps.is_del = 0
|
||||||
</where>
|
</where>
|
||||||
order by ps.id desc
|
order by ps.id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -70,7 +70,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="selectProProjectInfoSubdeptsUsersList" parameterType="ProProjectInfoSubdeptsUsers" resultMap="ProProjectInfoSubdeptsUsersResult">
|
<select id="selectProProjectInfoSubdeptsUsersList" parameterType="ProProjectInfoSubdeptsUsers" resultMap="ProProjectInfoSubdeptsUsersResult">
|
||||||
<include refid="selectProProjectInfoSubdeptsUsersVo"/>
|
<include refid="selectProProjectInfoSubdeptsUsersVo"/>
|
||||||
<where>
|
<where>
|
||||||
and psu.is_del != 2
|
|
||||||
<if test="comId != null "> and psu.com_id = #{comId}</if>
|
<if test="comId != null "> and psu.com_id = #{comId}</if>
|
||||||
<if test="parId != null "> and psu.par_id = #{parId}</if>
|
<if test="parId != null "> and psu.par_id = #{parId}</if>
|
||||||
<if test="projectId != null "> and psu.project_id = #{projectId}</if>
|
<if test="projectId != null "> and psu.project_id = #{projectId}</if>
|
||||||
|
@ -94,6 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<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="isDel != null "> and psu.is_del = #{isDel}</if>
|
<if test="isDel != null "> and psu.is_del = #{isDel}</if>
|
||||||
|
and psu.is_del != 2
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -330,4 +330,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
group by u.craft_type,u.use_status
|
group by u.craft_type,u.use_status
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="updateUseStatusByParams">
|
||||||
|
update pro_project_info_subdepts_group set use_status = 2
|
||||||
|
where 1=1
|
||||||
|
<if test="subDeptId != null "> and sub_dept_id = #{subDeptId}</if>
|
||||||
|
<if test="subDeptGroupId != null "> and u.sub_dept_group = #{subDeptGroupId}</if>
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -16,7 +16,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分包单位Controller
|
* 参建单位Controller
|
||||||
*
|
*
|
||||||
* @author JiangYuQi
|
* @author JiangYuQi
|
||||||
* @date 2024-08-25
|
* @date 2024-08-25
|
||||||
|
@ -29,7 +29,7 @@ public class ProProjectInfoSubdeptsController extends BaseController
|
||||||
private IProProjectInfoSubdeptsService proProjectInfoSubdeptsService;
|
private IProProjectInfoSubdeptsService proProjectInfoSubdeptsService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询分包单位列表
|
* 查询参建单位列表
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("manage:proProjectInfoSubdepts:list")
|
@RequiresPermissions("manage:proProjectInfoSubdepts:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
|
@ -41,20 +41,20 @@ public class ProProjectInfoSubdeptsController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出分包单位列表
|
* 导出参建单位列表
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("manage:proProjectInfoSubdepts:export")
|
@RequiresPermissions("manage:proProjectInfoSubdepts:export")
|
||||||
@Log(title = "分包单位", businessType = BusinessType.EXPORT)
|
@Log(title = "参建单位", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, ProProjectInfoSubdepts proProjectInfoSubdepts)
|
public void export(HttpServletResponse response, ProProjectInfoSubdepts proProjectInfoSubdepts)
|
||||||
{
|
{
|
||||||
List<ProProjectInfoSubdepts> list = proProjectInfoSubdeptsService.selectProProjectInfoSubdeptsList(proProjectInfoSubdepts);
|
List<ProProjectInfoSubdepts> list = proProjectInfoSubdeptsService.selectProProjectInfoSubdeptsList(proProjectInfoSubdepts);
|
||||||
ExcelUtil<ProProjectInfoSubdepts> util = new ExcelUtil<ProProjectInfoSubdepts>(ProProjectInfoSubdepts.class);
|
ExcelUtil<ProProjectInfoSubdepts> util = new ExcelUtil<ProProjectInfoSubdepts>(ProProjectInfoSubdepts.class);
|
||||||
util.exportExcel(response, list, "分包单位数据");
|
util.exportExcel(response, list, "参建单位数据");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取分包单位详细信息
|
* 获取参建单位详细信息
|
||||||
* @RequiresPermissions("manage:proProjectInfoSubdepts:query")
|
* @RequiresPermissions("manage:proProjectInfoSubdepts:query")
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
|
@ -64,10 +64,10 @@ public class ProProjectInfoSubdeptsController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增分包单位
|
* 新增参建单位
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("manage:proProjectInfoSubdepts:add")
|
@RequiresPermissions("manage:proProjectInfoSubdepts:add")
|
||||||
@Log(title = "分包单位", businessType = BusinessType.INSERT)
|
@Log(title = "参建单位", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody ProProjectInfoSubdepts proProjectInfoSubdepts)
|
public AjaxResult add(@RequestBody ProProjectInfoSubdepts proProjectInfoSubdepts)
|
||||||
{
|
{
|
||||||
|
@ -75,10 +75,10 @@ public class ProProjectInfoSubdeptsController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改分包单位
|
* 修改参建单位
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("manage:proProjectInfoSubdepts:edit")
|
@RequiresPermissions("manage:proProjectInfoSubdepts:edit")
|
||||||
@Log(title = "分包单位", businessType = BusinessType.UPDATE)
|
@Log(title = "参建单位", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody ProProjectInfoSubdepts proProjectInfoSubdepts)
|
public AjaxResult edit(@RequestBody ProProjectInfoSubdepts proProjectInfoSubdepts)
|
||||||
{
|
{
|
||||||
|
@ -86,21 +86,32 @@ public class ProProjectInfoSubdeptsController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改分包单位
|
* 修改参建单位
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("manage:proProjectInfoSubdepts:edit")
|
@RequiresPermissions("manage:proProjectInfoSubdepts:edit")
|
||||||
@Log(title = "分包单位", businessType = BusinessType.UPDATE)
|
@Log(title = "参建单位", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping("/editInfos")
|
@PostMapping("/editInfos")
|
||||||
public AjaxResult editInfos(@RequestBody ProProjectInfoSubdepts proProjectInfoSubdepts)
|
public AjaxResult editInfos(@RequestBody ProProjectInfoSubdepts proProjectInfoSubdepts)
|
||||||
{
|
{
|
||||||
return toAjax(proProjectInfoSubdeptsService.updateProProjectInfoSubdeptsEntity(proProjectInfoSubdepts));
|
return toAjax(proProjectInfoSubdeptsService.updateProProjectInfoSubdeptsEntity(proProjectInfoSubdepts));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除分包单位
|
* 参建单位入场/离场
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("manage:proProjectInfoSubdepts:edit")
|
||||||
|
@Log(title = "单位离场", businessType = BusinessType.UPDATE)
|
||||||
|
@GetMapping("/editUseStatus/{id}")
|
||||||
|
public AjaxResult editUseStatus(@PathVariable("id") Long id, String status)
|
||||||
|
{
|
||||||
|
return toAjax(proProjectInfoSubdeptsService.updateUseStatus(id,status));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除参建单位
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("manage:proProjectInfoSubdepts:remove")
|
@RequiresPermissions("manage:proProjectInfoSubdepts:remove")
|
||||||
@Log(title = "分包单位", businessType = BusinessType.DELETE)
|
@Log(title = "参建单位", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
{
|
{
|
||||||
|
@ -108,7 +119,7 @@ public class ProProjectInfoSubdeptsController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询分包单位列表
|
* 查询参建单位列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/findAll")
|
@GetMapping("/findAll")
|
||||||
public AjaxResult findAll(ProProjectInfoSubdepts proProjectInfoSubdepts)
|
public AjaxResult findAll(ProProjectInfoSubdepts proProjectInfoSubdepts)
|
||||||
|
|
|
@ -16,7 +16,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分包单位班组Controller
|
* 单位班组Controller
|
||||||
*
|
*
|
||||||
* @author JiangYuqi
|
* @author JiangYuqi
|
||||||
* @date 2024-08-25
|
* @date 2024-08-25
|
||||||
|
@ -29,7 +29,7 @@ public class ProProjectInfoSubdeptsGroupController extends BaseController
|
||||||
private IProProjectInfoSubdeptsGroupService proProjectInfoSubdeptsGroupService;
|
private IProProjectInfoSubdeptsGroupService proProjectInfoSubdeptsGroupService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询分包单位班组列表
|
* 查询单位班组列表
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("manage:proProjectInfoSubdeptsGroup:list")
|
@RequiresPermissions("manage:proProjectInfoSubdeptsGroup:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
|
@ -41,20 +41,20 @@ public class ProProjectInfoSubdeptsGroupController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出分包单位班组列表
|
* 导出单位班组列表
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("manage:proProjectInfoSubdeptsGroup:export")
|
@RequiresPermissions("manage:proProjectInfoSubdeptsGroup:export")
|
||||||
@Log(title = "分包单位班组", businessType = BusinessType.EXPORT)
|
@Log(title = "单位班组", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup)
|
public void export(HttpServletResponse response, ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup)
|
||||||
{
|
{
|
||||||
List<ProProjectInfoSubdeptsGroup> list = proProjectInfoSubdeptsGroupService.selectProProjectInfoSubdeptsGroupList(proProjectInfoSubdeptsGroup);
|
List<ProProjectInfoSubdeptsGroup> list = proProjectInfoSubdeptsGroupService.selectProProjectInfoSubdeptsGroupList(proProjectInfoSubdeptsGroup);
|
||||||
ExcelUtil<ProProjectInfoSubdeptsGroup> util = new ExcelUtil<ProProjectInfoSubdeptsGroup>(ProProjectInfoSubdeptsGroup.class);
|
ExcelUtil<ProProjectInfoSubdeptsGroup> util = new ExcelUtil<ProProjectInfoSubdeptsGroup>(ProProjectInfoSubdeptsGroup.class);
|
||||||
util.exportExcel(response, list, "分包单位班组数据");
|
util.exportExcel(response, list, "单位班组数据");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取分包单位班组详细信息
|
* 获取单位班组详细信息
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("manage:proProjectInfoSubdeptsGroup:query")
|
@RequiresPermissions("manage:proProjectInfoSubdeptsGroup:query")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
|
@ -64,10 +64,10 @@ public class ProProjectInfoSubdeptsGroupController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增分包单位班组
|
* 新增单位班组
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("manage:proProjectInfoSubdeptsGroup:add")
|
@RequiresPermissions("manage:proProjectInfoSubdeptsGroup:add")
|
||||||
@Log(title = "分包单位班组", businessType = BusinessType.INSERT)
|
@Log(title = "单位班组", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup)
|
public AjaxResult add(@RequestBody ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup)
|
||||||
{
|
{
|
||||||
|
@ -75,10 +75,10 @@ public class ProProjectInfoSubdeptsGroupController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改分包单位班组
|
* 修改单位班组
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("manage:proProjectInfoSubdeptsGroup:edit")
|
@RequiresPermissions("manage:proProjectInfoSubdeptsGroup:edit")
|
||||||
@Log(title = "分包单位班组", businessType = BusinessType.UPDATE)
|
@Log(title = "单位班组", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup)
|
public AjaxResult edit(@RequestBody ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup)
|
||||||
{
|
{
|
||||||
|
@ -86,10 +86,21 @@ public class ProProjectInfoSubdeptsGroupController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除分包单位班组
|
* 单位班组入场/离场
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("manage:proProjectInfoSubdeptsGroup:edit")
|
||||||
|
@Log(title = "班组离场", businessType = BusinessType.UPDATE)
|
||||||
|
@GetMapping("/editUseStatus/{id}")
|
||||||
|
public AjaxResult editUseStatus(@PathVariable("id") Long id, String status)
|
||||||
|
{
|
||||||
|
return toAjax(proProjectInfoSubdeptsGroupService.updateUseStatus(id,status));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除单位班组
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("manage:proProjectInfoSubdeptsGroup:remove")
|
@RequiresPermissions("manage:proProjectInfoSubdeptsGroup:remove")
|
||||||
@Log(title = "分包单位班组", businessType = BusinessType.DELETE)
|
@Log(title = "单位班组", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
{
|
{
|
||||||
|
|
|
@ -186,4 +186,15 @@ public class ProProjectInfoSubdeptsUsersController extends BaseController
|
||||||
List<ProProjectInfoSubdeptsUsers> list = proProjectInfoSubdeptsUsersService.selectProProjectInfoSubdeptsUsersList(query);
|
List<ProProjectInfoSubdeptsUsers> list = proProjectInfoSubdeptsUsersService.selectProProjectInfoSubdeptsUsersList(query);
|
||||||
return success(list);
|
return success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询分包单位人员
|
||||||
|
* @param proProjectInfoSubdeptsUsers 人员信息
|
||||||
|
*/
|
||||||
|
@GetMapping("/findAllProSubDeptsUser")
|
||||||
|
public AjaxResult findAllProSubDeptsUser(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers)
|
||||||
|
{
|
||||||
|
List<ProProjectInfoSubdeptsUsers> list = proProjectInfoSubdeptsUsersService.findAllProSubDeptsUser(proProjectInfoSubdeptsUsers);
|
||||||
|
return success(list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,14 @@ public interface IProProjectInfoSubdeptsGroupService
|
||||||
*/
|
*/
|
||||||
public int updateProProjectInfoSubdeptsGroup(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup);
|
public int updateProProjectInfoSubdeptsGroup(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改班组状态
|
||||||
|
* @param id 班组主键
|
||||||
|
* @param status 班组状态
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int updateUseStatus(Long id, String status);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除分包单位班组
|
* 批量删除分包单位班组
|
||||||
*
|
*
|
||||||
|
|
|
@ -70,6 +70,14 @@ public interface IProProjectInfoSubdeptsService
|
||||||
*/
|
*/
|
||||||
public int updateProProjectInfoSubdeptsEntity(ProProjectInfoSubdepts proProjectInfoSubdepts);
|
public int updateProProjectInfoSubdeptsEntity(ProProjectInfoSubdepts proProjectInfoSubdepts);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改单位状态
|
||||||
|
* @param id 单位主键
|
||||||
|
* @param status 单位状态
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int updateUseStatus(Long id, String status);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除分包单位
|
* 批量删除分包单位
|
||||||
*
|
*
|
||||||
|
|
|
@ -31,6 +31,14 @@ public interface IProProjectInfoSubdeptsUsersService
|
||||||
*/
|
*/
|
||||||
public List<ProProjectInfoSubdeptsUsers> selectProProjectInfoSubdeptsUsersList(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers);
|
public List<ProProjectInfoSubdeptsUsers> selectProProjectInfoSubdeptsUsersList(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询分包单位工人列表
|
||||||
|
*
|
||||||
|
* @param proProjectInfoSubdeptsUsers 分包单位工人
|
||||||
|
* @return 分包单位工人集合
|
||||||
|
*/
|
||||||
|
public List<ProProjectInfoSubdeptsUsers> findAllProSubDeptsUser(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增分包单位工人
|
* 新增分包单位工人
|
||||||
*
|
*
|
||||||
|
|
|
@ -2,10 +2,7 @@ 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.constant.SecurityConstants;
|
import com.yanzhu.common.core.constant.SecurityConstants;
|
||||||
import com.yanzhu.common.core.enums.ApproveStatus;
|
import com.yanzhu.common.core.enums.*;
|
||||||
import com.yanzhu.common.core.enums.CardTypeEnums;
|
|
||||||
import com.yanzhu.common.core.enums.ShiFouEnums;
|
|
||||||
import com.yanzhu.common.core.enums.UseStateEnums;
|
|
||||||
import com.yanzhu.common.core.exception.ServiceException;
|
import com.yanzhu.common.core.exception.ServiceException;
|
||||||
import com.yanzhu.common.core.utils.DateUtils;
|
import com.yanzhu.common.core.utils.DateUtils;
|
||||||
import com.yanzhu.common.core.utils.StringUtils;
|
import com.yanzhu.common.core.utils.StringUtils;
|
||||||
|
@ -314,6 +311,29 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改班组状态
|
||||||
|
* @param id 班组主键
|
||||||
|
* @param status 班组状态
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateUseStatus(Long id, String status){
|
||||||
|
if(StringUtils.isNotEmpty(status)){
|
||||||
|
ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup = proProjectInfoSubdeptsGroupMapper.selectProProjectInfoSubdeptsGroupById(id);
|
||||||
|
proProjectInfoSubdeptsGroup.setUseStatus(status);
|
||||||
|
proProjectInfoSubdeptsGroup.setUpdateBy(SecurityUtils.getUsername());
|
||||||
|
proProjectInfoSubdeptsGroup.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
// 离场时所有人员全部离场
|
||||||
|
if(Objects.equals(UseStateEnums.OUT.getCode(), status)){
|
||||||
|
proProjectInfoSubdeptsUsersMapper.updateUseStatusByParams(proProjectInfoSubdeptsGroup.getSubDeptId(),proProjectInfoSubdeptsGroup.getId());
|
||||||
|
}
|
||||||
|
return proProjectInfoSubdeptsGroupMapper.updateProProjectInfoSubdeptsGroup(proProjectInfoSubdeptsGroup);
|
||||||
|
}else{
|
||||||
|
throw new ServiceException("参数异常");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除分包单位班组
|
* 批量删除分包单位班组
|
||||||
*
|
*
|
||||||
|
|
|
@ -455,6 +455,30 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
|
||||||
return proProjectInfoSubdeptsMapper.updateProProjectInfoSubdepts(proProjectInfoSubdepts);
|
return proProjectInfoSubdeptsMapper.updateProProjectInfoSubdepts(proProjectInfoSubdepts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改单位状态
|
||||||
|
* @param id 单位主键
|
||||||
|
* @param status 单位状态
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateUseStatus(Long id, String status){
|
||||||
|
if(StringUtils.isNotEmpty(status)){
|
||||||
|
ProProjectInfoSubdepts proProjectInfoSubdepts = proProjectInfoSubdeptsMapper.selectProProjectInfoSubdeptsById(id);
|
||||||
|
proProjectInfoSubdepts.setUseStatus(status);
|
||||||
|
proProjectInfoSubdepts.setUpdateBy(SecurityUtils.getUsername());
|
||||||
|
proProjectInfoSubdepts.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
// 离场时所有班组/人员全部离场
|
||||||
|
if(Objects.equals(UseStateEnums.OUT.getCode(), status)){
|
||||||
|
proProjectInfoSubdeptsGroupMapper.updateUseStatusByParams(proProjectInfoSubdepts.getId());
|
||||||
|
proProjectInfoSubdeptsUsersMapper.updateUseStatusByParams(proProjectInfoSubdepts.getId(),null);
|
||||||
|
}
|
||||||
|
return proProjectInfoSubdeptsMapper.updateProProjectInfoSubdepts(proProjectInfoSubdepts);
|
||||||
|
}else{
|
||||||
|
throw new ServiceException("参数异常");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除分包单位
|
* 批量删除分包单位
|
||||||
*
|
*
|
||||||
|
|
|
@ -98,6 +98,18 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
|
||||||
return proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(proProjectInfoSubdeptsUsers);
|
return proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(proProjectInfoSubdeptsUsers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询分包单位工人列表
|
||||||
|
*
|
||||||
|
* @param proProjectInfoSubdeptsUsers 分包单位工人
|
||||||
|
* @return 分包单位工人
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ProProjectInfoSubdeptsUsers> findAllProSubDeptsUser(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers)
|
||||||
|
{
|
||||||
|
return proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(proProjectInfoSubdeptsUsers);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增分包单位工人
|
* 新增分包单位工人
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 查询分包单位列表
|
// 查询参建单位列表
|
||||||
export function findAllProjectInfoSubdepts(query) {
|
export function findAllProjectInfoSubdepts(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/manage/proProjectInfoSubdepts/findAll',
|
url: '/manage/proProjectInfoSubdepts/findAll',
|
||||||
|
@ -9,7 +9,7 @@ export function findAllProjectInfoSubdepts(query) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询分包单位列表
|
// 查询参建单位列表
|
||||||
export function listProProjectInfoSubdepts(query) {
|
export function listProProjectInfoSubdepts(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/manage/proProjectInfoSubdepts/list',
|
url: '/manage/proProjectInfoSubdepts/list',
|
||||||
|
@ -18,7 +18,7 @@ export function listProProjectInfoSubdepts(query) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询分包单位详细
|
// 查询参建单位详细
|
||||||
export function getProProjectInfoSubdepts(id) {
|
export function getProProjectInfoSubdepts(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/manage/proProjectInfoSubdepts/' + id,
|
url: '/manage/proProjectInfoSubdepts/' + id,
|
||||||
|
@ -26,7 +26,7 @@ export function getProProjectInfoSubdepts(id) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增分包单位
|
// 新增参建单位
|
||||||
export function addProProjectInfoSubdepts(data) {
|
export function addProProjectInfoSubdepts(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/manage/proProjectInfoSubdepts',
|
url: '/manage/proProjectInfoSubdepts',
|
||||||
|
@ -35,7 +35,7 @@ export function addProProjectInfoSubdepts(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改分包单位
|
// 修改参建单位
|
||||||
export function updateProProjectInfoSubdepts(data) {
|
export function updateProProjectInfoSubdepts(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/manage/proProjectInfoSubdepts',
|
url: '/manage/proProjectInfoSubdepts',
|
||||||
|
@ -44,16 +44,24 @@ export function updateProProjectInfoSubdepts(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改分包单位
|
// 修改参建单位
|
||||||
export function updateProProjectInfoSubdeptsEntity(data) {
|
export function updateProProjectInfoSubdeptsEntity(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/manage/proProjectInfoSubdepts/editInfos',
|
url: '/manage/proProjectInfoSubdepts/editInfos',
|
||||||
method: 'put',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除分包单位
|
// 修改参建单位
|
||||||
|
export function editUseStatus(id,status) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/proProjectInfoSubdepts/editUseStatus/'+id+'?status='+status,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除参建单位
|
||||||
export function delProProjectInfoSubdepts(id) {
|
export function delProProjectInfoSubdepts(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/manage/proProjectInfoSubdepts/' + id,
|
url: '/manage/proProjectInfoSubdepts/' + id,
|
||||||
|
|
|
@ -35,6 +35,14 @@ export function updateProProjectInfoSubdeptsGroup(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 修改分包单位班组
|
||||||
|
export function editUseStatus(id,status) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/proProjectInfoSubdeptsGroup/editUseStatus/'+id+'?status='+status,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 删除分包单位班组
|
// 删除分包单位班组
|
||||||
export function delProProjectInfoSubdeptsGroup(id) {
|
export function delProProjectInfoSubdeptsGroup(id) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
@ -4,20 +4,20 @@
|
||||||
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentPrjId">
|
<el-form-item label="项目名称" prop="projectName" v-if="!userStore.currentPrjId">
|
||||||
<el-input v-model="queryParams.projectName" placeholder="请输入项目名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.projectName" placeholder="请输入项目名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</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="subDeptType">
|
<el-form-item label="单位类型" prop="subDeptType">
|
||||||
<el-select v-model="queryParams.subDeptType" placeholder="请选择参建单位类型" clearable style="width:150px;">
|
<el-select v-model="queryParams.subDeptType" placeholder="请选择参建单位类型" clearable>
|
||||||
<el-option v-for="dict in sub_dept_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
<el-option v-for="dict in sub_dept_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="进场状态" prop="useStatus">
|
<el-form-item label="进场状态" prop="useStatus">
|
||||||
<el-select v-model="queryParams.useStatus" placeholder="请选择进场状态" clearable style="width:150px;">
|
<el-select v-model="queryParams.useStatus" placeholder="请选择进场状态" clearable>
|
||||||
<el-option v-for="dict in sys_use_status" :key="dict.value" :label="dict.label"
|
<el-option v-for="dict in sys_use_status" :key="dict.value" :label="dict.label"
|
||||||
:value="dict.value"></el-option>
|
:value="dict.value"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</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>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
@ -71,19 +71,24 @@
|
||||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="审批状态" align="center" prop="approveStatus">
|
<el-table-column label="审批状态" align="center" prop="approveStatus" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<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">
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :options="sys_is_del" :value="scope.row.isDel" />
|
||||||
|
</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="150" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['manage:proProjectInfoSubdepts:edit']">修改</el-button>
|
v-hasPermi="['manage:proProjectInfoSubdepts:edit']">修改</el-button>
|
||||||
<el-button v-if="scope.row.useStatus == '1'" link type="primary" icon="Setting"
|
<el-button v-if="scope.row.useStatus == '1'" link type="primary" icon="Setting"
|
||||||
@click="handleUseStatus(scope.row)" v-hasPermi="['manage:proProjectInfoSubdepts:remove']">离场</el-button>
|
@click="handleUseStatus(scope.row)" v-hasPermi="['manage:proProjectInfoSubdepts:edit']">离场</el-button>
|
||||||
<el-button v-if="scope.row.useStatus == '2'" link type="primary" icon="Setting"
|
<el-button v-if="scope.row.useStatus == '2'" link type="primary" icon="Setting"
|
||||||
@click="handleUseStatus(scope.row)" v-hasPermi="['manage:proProjectInfoSubdepts:remove']">进场</el-button>
|
@click="handleUseStatus(scope.row)" v-hasPermi="['manage:proProjectInfoSubdepts:edit']">进场</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -114,6 +119,12 @@
|
||||||
<el-form-item label="进场时间" prop="useDates">
|
<el-form-item label="进场时间" prop="useDates">
|
||||||
<el-date-picker v-model="form.useDates" type="date" placeholder="请选择进场时间" style="width:100%" />
|
<el-date-picker v-model="form.useDates" type="date" placeholder="请选择进场时间" style="width:100%" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="开工时间" prop="startWorkDates" v-if="form.subDeptType == '4' || form.subDeptType == '5'">
|
||||||
|
<el-date-picker v-model="form.startWorkDates" type="date" placeholder="请选择计划开工时间" style="width:100%" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="完工时间" prop="endWorkDates" v-if="form.subDeptType == '4' || form.subDeptType == '5'">
|
||||||
|
<el-date-picker v-model="form.endWorkDates" type="date" placeholder="请选择计划完工时间" style="width:100%" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="进场状态" prop="useStatus">
|
<el-form-item label="进场状态" prop="useStatus">
|
||||||
<el-select v-model="form.useStatus" placeholder="请选择进场状态" style="width:100%">
|
<el-select v-model="form.useStatus" placeholder="请选择进场状态" style="width:100%">
|
||||||
<el-option v-for="dict in sys_use_status" :key="dict.value" :label="dict.label"
|
<el-option v-for="dict in sys_use_status" :key="dict.value" :label="dict.label"
|
||||||
|
@ -124,12 +135,6 @@
|
||||||
<el-input v-model="form.contractInfos" maxlength="2000" show-word-limit type="textarea" rows="4"
|
<el-input v-model="form.contractInfos" maxlength="2000" show-word-limit type="textarea" rows="4"
|
||||||
placeholder="请输入承包范围" />
|
placeholder="请输入承包范围" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="计划开工时间" v-if="form.subDeptType == '4' || form.subDeptType == '5'">
|
|
||||||
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="计划完工时间" v-if="form.subDeptType == '4' || form.subDeptType == '5'">
|
|
||||||
|
|
||||||
</el-form-item>
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="单位信息" name="infos">
|
<el-tab-pane label="单位信息" name="infos">
|
||||||
<el-form-item label="经营范围">
|
<el-form-item label="经营范围">
|
||||||
|
@ -217,11 +222,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="ProProjectInfoSubdepts">
|
<script setup name="ProProjectInfoSubdepts">
|
||||||
import { listProProjectInfoSubdepts, getProProjectInfoSubdepts, delProProjectInfoSubdepts, addProProjectInfoSubdepts, updateProProjectInfoSubdepts, updateProProjectInfoSubdeptsEntity } from "@/api/manage/proProjectInfoSubdepts";
|
import { listProProjectInfoSubdepts, getProProjectInfoSubdepts, delProProjectInfoSubdepts, addProProjectInfoSubdepts, updateProProjectInfoSubdepts, editUseStatus } from "@/api/manage/proProjectInfoSubdepts";
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const { sys_use_status, sub_dept_type, sys_approve_status } = proxy.useDict('sys_use_status', 'sub_dept_type', 'sys_approve_status');
|
const { sys_use_status, sub_dept_type, sys_approve_status, sys_is_del } = proxy.useDict('sys_use_status', 'sub_dept_type', 'sys_approve_status', 'sys_is_del');
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const proProjectInfoSubdeptsList = ref([]);
|
const proProjectInfoSubdeptsList = ref([]);
|
||||||
|
@ -254,6 +259,8 @@ const data = reactive({
|
||||||
subDeptName: [{ required: true, message: "单位名称不能为空", trigger: "blur" }],
|
subDeptName: [{ required: true, message: "单位名称不能为空", trigger: "blur" }],
|
||||||
subDeptCode: [{ required: true, message: "信用代码不能为空", trigger: "blur" }],
|
subDeptCode: [{ required: true, message: "信用代码不能为空", trigger: "blur" }],
|
||||||
useDates: [{ required: true, message: "进场时间不能为空", trigger: "change" }],
|
useDates: [{ required: true, message: "进场时间不能为空", trigger: "change" }],
|
||||||
|
startWorkDates: [{ required: true, message: "计划开工时间不能为空", trigger: "change" }],
|
||||||
|
endWorkDates: [{ required: true, message: "计划完工时间不能为空", trigger: "change" }],
|
||||||
useStatus: [{ required: true, message: "进场状态不能为空", trigger: "change" }],
|
useStatus: [{ required: true, message: "进场状态不能为空", trigger: "change" }],
|
||||||
contractInfos: [{ required: true, message: "合同承包范围不能为空", trigger: "blur" }]
|
contractInfos: [{ required: true, message: "合同承包范围不能为空", trigger: "blur" }]
|
||||||
}
|
}
|
||||||
|
@ -391,9 +398,10 @@ function handleDelete(row) {
|
||||||
|
|
||||||
/** 进场/退场操作 */
|
/** 进场/退场操作 */
|
||||||
function handleUseStatus(row) {
|
function handleUseStatus(row) {
|
||||||
let state = row.useStatus == '1' ? "离场" : "进场";
|
let state = row.useStatus == '1' ? "2" : "1"
|
||||||
proxy.$modal.confirm('是否确认修改单位状态为"' + state + '"?').then(function () {
|
let stateMsg = row.useStatus == '1' ? "离场" : "进场";
|
||||||
return updateProProjectInfoSubdeptsEntity({ 'id': row.id, 'useStatus': row.useStatus == '1' ? "2" : "1" });
|
proxy.$modal.confirm('是否确认修改单位状态为"' + stateMsg + '"?').then(function () {
|
||||||
|
return editUseStatus(row.id,state);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
getList();
|
getList();
|
||||||
proxy.$modal.msgSuccess("修改成功");
|
proxy.$modal.msgSuccess("修改成功");
|
||||||
|
@ -417,7 +425,6 @@ getList();
|
||||||
|
|
||||||
.SubdeptsDlg {
|
.SubdeptsDlg {
|
||||||
.el-dialog__body {
|
.el-dialog__body {
|
||||||
margin-top: -25px;
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
max-height: 680px;
|
max-height: 680px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<el-input v-model="queryParams.subDeptName" placeholder="请输入单位名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.subDeptName" placeholder="请输入单位名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="单位类型" prop="subDeptType">
|
<el-form-item label="单位类型" prop="subDeptType">
|
||||||
<el-select v-model="queryParams.subDeptType" placeholder="请选择单位类型" clearable style="width:150px;">
|
<el-select v-model="queryParams.subDeptType" placeholder="请选择单位类型" clearable>
|
||||||
<el-option v-for="dict in sub_dept_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
<el-option v-for="dict in sub_dept_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -16,12 +16,12 @@
|
||||||
<el-input v-model="queryParams.groupName" placeholder="请输入班组名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.groupName" placeholder="请输入班组名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="工种类型" prop="craftType">
|
<el-form-item label="工种类型" prop="craftType">
|
||||||
<el-select v-model="queryParams.craftType" placeholder="请选择工种类型" clearable style="width:150px;">
|
<el-select v-model="queryParams.craftType" placeholder="请选择工种类型" clearable>
|
||||||
<el-option v-for="dict in pro_craft_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
<el-option v-for="dict in pro_craft_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="工种岗位" prop="craftPost">
|
<el-form-item label="工种岗位" prop="craftPost">
|
||||||
<el-select v-model="queryParams.craftPost" placeholder="请选择工种岗位" clearable style="width:150px;">
|
<el-select v-model="queryParams.craftPost" placeholder="请选择工种岗位" clearable>
|
||||||
<el-option v-for="dict in pro_craft_post" :key="dict.value" :label="dict.label" :value="dict.value" />
|
<el-option v-for="dict in pro_craft_post" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -72,21 +72,37 @@
|
||||||
<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" >
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button link v-if="scope.row.groupLeaderName" type="primary" icon="UserFilled"
|
||||||
|
@click="handleUpdateGroupLeader(scope.row)">{{scope.row.groupLeaderName}}</el-button>
|
||||||
|
<el-button link v-if="!scope.row.groupLeaderName" type="warning" icon="UserFilled"
|
||||||
|
@click="handleUpdateGroupLeader(scope.row)"> - </el-button>
|
||||||
|
</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>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="审批状态" align="center" prop="approveStatus">
|
<el-table-column label="审批状态" align="center" prop="approveStatus" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<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="操作" fixed="right" width="120" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="数据状态" align="center" prop="isDel" width="80">
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :options="sys_is_del" :value="scope.row.isDel" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" fixed="right" width="150" align="center" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['manage:proProjectInfoSubdeptsGroup:edit']">修改</el-button>
|
v-hasPermi="['manage:proProjectInfoSubdeptsGroup:edit']">修改</el-button>
|
||||||
|
<el-button v-if="scope.row.useStatus == '1'" link type="primary" icon="Setting"
|
||||||
|
@click="handleUseStatus(scope.row)" v-hasPermi="['manage:proProjectInfoSubdeptsGroup:edit']">离场</el-button>
|
||||||
|
<el-button v-if="scope.row.useStatus == '2'" link type="primary" icon="Setting"
|
||||||
|
@click="handleUseStatus(scope.row)" v-hasPermi="['manage:proProjectInfoSubdeptsGroup:edit']">进场</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -97,60 +113,61 @@
|
||||||
<!-- 添加或修改单位班组对话框 -->
|
<!-- 添加或修改单位班组对话框 -->
|
||||||
<el-dialog :title="title" v-model="open" width="680px" append-to-body modal-class="SubdeptsGroupDlg">
|
<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-form ref="proProjectInfoSubdeptsGroupRef" :model="form" :rules="rules" label-width="88px">
|
||||||
<el-tabs v-model="activeTabs" type="card" class="demo-tabs">
|
<el-form-item label="项目名称" v-if="form.projectId">
|
||||||
<el-tab-pane label="基本信息" name="base">
|
<el-tag effect="plain">{{ form.projectName }}</el-tag>
|
||||||
<el-form-item label="项目名称" v-if="form.projectId">
|
</el-form-item>
|
||||||
<el-tag effect="plain">{{ form.projectName }}</el-tag>
|
<el-form-item label="所属单位" prop="subDeptId">
|
||||||
</el-form-item>
|
<el-select v-model="form.subDeptId" placeholder="请选择所属单位" style="width:100%">
|
||||||
<el-form-item label="所属单位" prop="subDeptId">
|
<el-option v-for="dept in subDeptOptions" :key="dept.id" :label="dept.subDeptName"
|
||||||
<el-select v-model="form.subDeptId" placeholder="请选择所属单位" style="width:100%">
|
:value="dept.id"></el-option>
|
||||||
<el-option v-for="dept in subDeptOptions" :key="dept.id" :label="dept.subDeptName"
|
</el-select>
|
||||||
:value="dept.id"></el-option>
|
</el-form-item>
|
||||||
</el-select>
|
<el-form-item label="工种类型" prop="craftType">
|
||||||
</el-form-item>
|
<el-select v-model="form.craftType" placeholder="请选择工种类型" style="width:100%">
|
||||||
<el-form-item label="工种类型" prop="craftType">
|
<el-option v-for="dict in pro_craft_type" :key="dict.value" :label="dict.label"
|
||||||
<el-select v-model="form.craftType" placeholder="请选择工种类型" style="width:100%">
|
:value="dict.value"></el-option>
|
||||||
<el-option v-for="dict in pro_craft_type" :key="dict.value" :label="dict.label"
|
</el-select>
|
||||||
:value="dict.value"></el-option>
|
</el-form-item>
|
||||||
</el-select>
|
<el-form-item label="工种岗位" prop="craftPost">
|
||||||
</el-form-item>
|
<el-select v-model="form.craftPost" placeholder="请选择工种岗位" style="width:100%">
|
||||||
<el-form-item label="工种岗位" prop="craftPost">
|
<el-option v-for="dict in pro_craft_post" :key="dict.value" :label="dict.label"
|
||||||
<el-select v-model="form.craftPost" placeholder="请选择工种岗位" style="width:100%">
|
:value="dict.value"></el-option>
|
||||||
<el-option v-for="dict in pro_craft_post" :key="dict.value" :label="dict.label"
|
</el-select>
|
||||||
:value="dict.value"></el-option>
|
</el-form-item>
|
||||||
</el-select>
|
<el-form-item label="班组名称" prop="groupName">
|
||||||
</el-form-item>
|
<el-input v-model="form.groupName" placeholder="请输入班组名称" maxlength="32" show-word-limit />
|
||||||
<el-form-item label="班组名称" prop="groupName">
|
</el-form-item>
|
||||||
<el-input v-model="form.groupName" placeholder="请输入班组名称" maxlength="32" show-word-limit />
|
</el-form>
|
||||||
</el-form-item>
|
<template #footer>
|
||||||
</el-tab-pane>
|
<div class="dialog-footer">
|
||||||
<el-tab-pane label="班组长信息" name="groupLeader">
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-form-item label="班组长姓名" prop="groupLeaderName">
|
<el-button @click="cancel">取 消</el-button>
|
||||||
<el-input v-model="form.groupLeaderName" placeholder="请输入班组长姓名" maxlength="10" show-word-limit />
|
</div>
|
||||||
</el-form-item>
|
</template>
|
||||||
<el-form-item label="身份证号码" prop="groupLeaderCode">
|
</el-dialog>
|
||||||
<el-input v-model="form.groupLeaderCode" placeholder="请输入班组长身份证号码" maxlength="18" show-word-limit />
|
|
||||||
</el-form-item>
|
<!-- 添加或修改单位班组对话框 -->
|
||||||
<el-form-item label="班组长电话" prop="groupLeaderPhone">
|
<el-dialog :title="title" v-model="open" width="680px" append-to-body modal-class="SubdeptsGroupDlg">
|
||||||
<el-input v-model="form.groupLeaderPhone" placeholder="请输入班组长电话" maxlength="11" show-word-limit />
|
<el-form ref="proProjectInfoSubdeptsGroupRef" :model="leaderForm" :rules="leaderRules" label-width="88px">
|
||||||
</el-form-item>
|
<el-form-item label="项目名称">
|
||||||
<el-row>
|
<el-tag effect="plain">{{ leaderForm.projectName }}</el-tag>
|
||||||
<el-col :span="12">
|
</el-form-item>
|
||||||
<el-form-item label="身份证正面">
|
<el-form-item label="参建单位">
|
||||||
<image-upload v-model="form.grouLeaderCardImgPos" :limit="1" />
|
{{leaderForm.subDeptName}}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
<el-form-item label="班组类型">
|
||||||
<el-col :span="12">
|
<span v-if="leaderForm.craftType!=3">{{leaderForm.craftType=='1'?'特殊':'普通'}} {{leaderForm.craftPostName}} 班组</span>
|
||||||
<el-form-item label="身份证反面">
|
<span v-if="leaderForm.craftType==3">管理班组</span>
|
||||||
<image-upload v-model="form.grouLeaderCardImgInv" :limit="1" />
|
</el-form-item>
|
||||||
</el-form-item>
|
<el-form-item label="班组名称">
|
||||||
</el-col>
|
{{leaderForm.groupName}}
|
||||||
</el-row>
|
</el-form-item>
|
||||||
<el-form-item label="班组长照片">
|
<el-form-item label="班组组长" prop="groupLeaderPhone">
|
||||||
<image-upload v-model="form.grouLeaderUserPicture" :limit="1" />
|
<el-select v-model="form.groupLeaderPhone" placeholder="请选择班组组长" style="width:100%">
|
||||||
</el-form-item>
|
<el-option v-for="dict in pro_craft_post" :key="dict.value" :label="dict.label"
|
||||||
</el-tab-pane>
|
:value="dict.value"></el-option>
|
||||||
</el-tabs>
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
|
@ -164,7 +181,7 @@
|
||||||
|
|
||||||
<script setup name="ProProjectInfoSubdeptsGroup">
|
<script setup name="ProProjectInfoSubdeptsGroup">
|
||||||
import { findAllProjectInfoSubdepts } from "@/api/manage/proProjectInfoSubdepts";
|
import { findAllProjectInfoSubdepts } from "@/api/manage/proProjectInfoSubdepts";
|
||||||
import { listProProjectInfoSubdeptsGroup, getProProjectInfoSubdeptsGroup, delProProjectInfoSubdeptsGroup, addProProjectInfoSubdeptsGroup, updateProProjectInfoSubdeptsGroup } from "@/api/manage/proProjectInfoSubdeptsGroup";
|
import { listProProjectInfoSubdeptsGroup, getProProjectInfoSubdeptsGroup, delProProjectInfoSubdeptsGroup, addProProjectInfoSubdeptsGroup, updateProProjectInfoSubdeptsGroup, editUseStatus } from "@/api/manage/proProjectInfoSubdeptsGroup";
|
||||||
import useUserStore from '@/store/modules/user'
|
import useUserStore from '@/store/modules/user'
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
|
@ -173,6 +190,7 @@ const { sys_approve_status, sub_dept_type, pro_craft_type, sys_is_del, pro_craft
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const proProjectInfoSubdeptsGroupList = ref([]);
|
const proProjectInfoSubdeptsGroupList = ref([]);
|
||||||
const open = ref(false);
|
const open = ref(false);
|
||||||
|
const leaderOpen = ref(false);
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
const showSearch = ref(true);
|
const showSearch = ref(true);
|
||||||
const ids = ref([]);
|
const ids = ref([]);
|
||||||
|
@ -180,11 +198,14 @@ const single = ref(true);
|
||||||
const multiple = ref(true);
|
const multiple = ref(true);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const title = ref("");
|
const title = ref("");
|
||||||
|
const leaderTitle = ref("");
|
||||||
const activeTabs = ref("base");
|
const activeTabs = ref("base");
|
||||||
const subDeptOptions = ref([]);
|
const subDeptOptions = ref([]);
|
||||||
|
const groupLeaderOptions = ref([]);
|
||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {},
|
form: {},
|
||||||
|
leaderForm: {},
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
@ -201,10 +222,13 @@ const data = reactive({
|
||||||
craftType: [{ required: true, message: "工种类型不能为空", trigger: "change" }],
|
craftType: [{ required: true, message: "工种类型不能为空", trigger: "change" }],
|
||||||
craftPost: [{ required: true, message: "工种岗位不能为空", trigger: "change" }],
|
craftPost: [{ required: true, message: "工种岗位不能为空", trigger: "change" }],
|
||||||
groupName: [{ required: true, message: "班组名称不能为空", trigger: "blur" }],
|
groupName: [{ required: true, message: "班组名称不能为空", trigger: "blur" }],
|
||||||
|
},
|
||||||
|
leaderRules: {
|
||||||
|
groupLeaderPhone: [{ required: true, message: "班组组长不能为空", trigger: "change" }]
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const { queryParams, form, rules } = toRefs(data);
|
const { queryParams, form, rules, leaderForm } = toRefs(data);
|
||||||
|
|
||||||
/** 查询单位班组列表 */
|
/** 查询单位班组列表 */
|
||||||
function getList() {
|
function getList() {
|
||||||
|
@ -298,6 +322,19 @@ function handleUpdate(row) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 修改班组长按钮操作 */
|
||||||
|
function handleUpdateGroupLeader(row) {
|
||||||
|
open.value = true;
|
||||||
|
title.value = "修改单位班组长";
|
||||||
|
reset();
|
||||||
|
initSubDeptOptions(row.projectId);
|
||||||
|
const _id = row.id || ids.value
|
||||||
|
getProProjectInfoSubdeptsGroup(_id).then(response => {
|
||||||
|
form.value = response.data;
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
function submitForm() {
|
function submitForm() {
|
||||||
proxy.$refs["proProjectInfoSubdeptsGroupRef"].validate(valid => {
|
proxy.$refs["proProjectInfoSubdeptsGroupRef"].validate(valid => {
|
||||||
|
@ -331,6 +368,18 @@ function handleDelete(row) {
|
||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 进场/退场操作 */
|
||||||
|
function handleUseStatus(row) {
|
||||||
|
let state = row.useStatus == '1' ? "2" : "1"
|
||||||
|
let stateMsg = row.useStatus == '1' ? "离场" : "进场";
|
||||||
|
proxy.$modal.confirm('是否确认修改班组状态为"' + stateMsg + '"?').then(function () {
|
||||||
|
return editUseStatus(row.id,state);
|
||||||
|
}).then(() => {
|
||||||
|
getList();
|
||||||
|
proxy.$modal.msgSuccess("修改成功");
|
||||||
|
}).catch(() => { });
|
||||||
|
}
|
||||||
|
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
function handleExport() {
|
function handleExport() {
|
||||||
proxy.download('manage/proProjectInfoSubdeptsGroup/export', {
|
proxy.download('manage/proProjectInfoSubdeptsGroup/export', {
|
||||||
|
|
|
@ -1,360 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
|
||||||
<el-form-item label="单位主键" prop="deptId">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.deptId"
|
|
||||||
placeholder="请输入单位主键"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="项目主键" prop="projectId">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.projectId"
|
|
||||||
placeholder="请输入项目主键"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="用户主键" prop="userId">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.userId"
|
|
||||||
placeholder="请输入用户主键"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="用户姓名" prop="userName">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.userName"
|
|
||||||
placeholder="请输入用户姓名"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="用户编号" prop="userCode">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.userCode"
|
|
||||||
placeholder="请输入用户编号"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="用户电话" prop="userPhone">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.userPhone"
|
|
||||||
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="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>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="Plus"
|
|
||||||
@click="handleAdd"
|
|
||||||
v-hasPermi="['manage:proProjectInfoUsers:add']"
|
|
||||||
>新增</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="Edit"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['manage:proProjectInfoUsers:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="Delete"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['manage:proProjectInfoUsers:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="Download"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['manage:proProjectInfoUsers:export']"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="proProjectInfoUsersList" @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="deptId" />
|
|
||||||
<el-table-column label="项目主键" align="center" prop="projectId" />
|
|
||||||
<el-table-column label="用户主键" align="center" prop="userId" />
|
|
||||||
<el-table-column label="用户姓名" align="center" prop="userName" />
|
|
||||||
<el-table-column label="用户编号" align="center" prop="userCode" />
|
|
||||||
<el-table-column label="用户电话" align="center" prop="userPhone" />
|
|
||||||
<el-table-column label="进场状态" align="center" prop="useStatus">
|
|
||||||
<template #default="scope">
|
|
||||||
<dict-tag :options="sys_use_status" :value="scope.row.useStatus"/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="删除标识" align="center" prop="isDel">
|
|
||||||
<template #default="scope">
|
|
||||||
<dict-tag :options="sys_is_del" :value="scope.row.isDel"/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" 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:proProjectInfoUsers:edit']">修改</el-button>
|
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['manage:proProjectInfoUsers:remove']">删除</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
v-model:page="queryParams.pageNum"
|
|
||||||
v-model:limit="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或修改项目人员对话框 -->
|
|
||||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
|
||||||
<el-form ref="proProjectInfoUsersRef" :model="form" :rules="rules" label-width="80px">
|
|
||||||
<el-form-item label="单位主键" prop="deptId">
|
|
||||||
<el-input v-model="form.deptId" placeholder="请输入单位主键" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="项目主键" prop="projectId">
|
|
||||||
<el-input v-model="form.projectId" placeholder="请输入项目主键" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="用户主键" prop="userId">
|
|
||||||
<el-input v-model="form.userId" placeholder="请输入用户主键" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="用户姓名" prop="userName">
|
|
||||||
<el-input v-model="form.userName" placeholder="请输入用户姓名" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="用户编号" prop="userCode">
|
|
||||||
<el-input v-model="form.userCode" placeholder="请输入用户编号" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="用户电话" prop="userPhone">
|
|
||||||
<el-input v-model="form.userPhone" placeholder="请输入用户电话" />
|
|
||||||
</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="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>
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<div class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup name="ProProjectInfoUsers">
|
|
||||||
import { listProProjectInfoUsers, getProProjectInfoUsers, delProProjectInfoUsers, addProProjectInfoUsers, updateProProjectInfoUsers } from "@/api/manage/proProjectInfoUsers";
|
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance();
|
|
||||||
const { sys_use_status, sys_is_del } = proxy.useDict('sys_use_status', 'sys_is_del');
|
|
||||||
|
|
||||||
const proProjectInfoUsersList = ref([]);
|
|
||||||
const open = ref(false);
|
|
||||||
const loading = ref(true);
|
|
||||||
const showSearch = ref(true);
|
|
||||||
const ids = ref([]);
|
|
||||||
const single = ref(true);
|
|
||||||
const multiple = ref(true);
|
|
||||||
const total = ref(0);
|
|
||||||
const title = ref("");
|
|
||||||
|
|
||||||
const data = reactive({
|
|
||||||
form: {},
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
deptId: null,
|
|
||||||
projectId: null,
|
|
||||||
userId: null,
|
|
||||||
userName: null,
|
|
||||||
userCode: null,
|
|
||||||
userPhone: null,
|
|
||||||
useStatus: null,
|
|
||||||
isDel: null,
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const { queryParams, form, rules } = toRefs(data);
|
|
||||||
|
|
||||||
/** 查询项目人员列表 */
|
|
||||||
function getList() {
|
|
||||||
loading.value = true;
|
|
||||||
listProProjectInfoUsers(queryParams.value).then(response => {
|
|
||||||
proProjectInfoUsersList.value = response.rows;
|
|
||||||
total.value = response.total;
|
|
||||||
loading.value = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 取消按钮
|
|
||||||
function cancel() {
|
|
||||||
open.value = false;
|
|
||||||
reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 表单重置
|
|
||||||
function reset() {
|
|
||||||
form.value = {
|
|
||||||
id: null,
|
|
||||||
deptId: null,
|
|
||||||
projectId: null,
|
|
||||||
userId: null,
|
|
||||||
userName: null,
|
|
||||||
userCode: null,
|
|
||||||
userPhone: null,
|
|
||||||
useStatus: null,
|
|
||||||
isDel: null,
|
|
||||||
createBy: null,
|
|
||||||
createTime: null,
|
|
||||||
updateBy: null,
|
|
||||||
updateTime: null,
|
|
||||||
remark: null
|
|
||||||
};
|
|
||||||
proxy.resetForm("proProjectInfoUsersRef");
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
function handleQuery() {
|
|
||||||
queryParams.value.pageNum = 1;
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
function resetQuery() {
|
|
||||||
proxy.resetForm("queryRef");
|
|
||||||
handleQuery();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 多选框选中数据
|
|
||||||
function handleSelectionChange(selection) {
|
|
||||||
ids.value = selection.map(item => item.id);
|
|
||||||
single.value = selection.length != 1;
|
|
||||||
multiple.value = !selection.length;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
function handleAdd() {
|
|
||||||
reset();
|
|
||||||
open.value = true;
|
|
||||||
title.value = "添加项目人员";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
function handleUpdate(row) {
|
|
||||||
reset();
|
|
||||||
const _id = row.id || ids.value
|
|
||||||
getProProjectInfoUsers(_id).then(response => {
|
|
||||||
form.value = response.data;
|
|
||||||
open.value = true;
|
|
||||||
title.value = "修改项目人员";
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 提交按钮 */
|
|
||||||
function submitForm() {
|
|
||||||
proxy.$refs["proProjectInfoUsersRef"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
if (form.value.id != null) {
|
|
||||||
updateProProjectInfoUsers(form.value).then(response => {
|
|
||||||
proxy.$modal.msgSuccess("修改成功");
|
|
||||||
open.value = false;
|
|
||||||
getList();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addProProjectInfoUsers(form.value).then(response => {
|
|
||||||
proxy.$modal.msgSuccess("新增成功");
|
|
||||||
open.value = false;
|
|
||||||
getList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
function handleDelete(row) {
|
|
||||||
const _ids = row.id || ids.value;
|
|
||||||
proxy.$modal.confirm('是否确认删除项目人员编号为"' + _ids + '"的数据项?').then(function() {
|
|
||||||
return delProProjectInfoUsers(_ids);
|
|
||||||
}).then(() => {
|
|
||||||
getList();
|
|
||||||
proxy.$modal.msgSuccess("删除成功");
|
|
||||||
}).catch(() => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
function handleExport() {
|
|
||||||
proxy.download('manage/proProjectInfoUsers/export', {
|
|
||||||
...queryParams.value
|
|
||||||
}, `proProjectInfoUsers_${new Date().getTime()}.xlsx`)
|
|
||||||
}
|
|
||||||
|
|
||||||
getList();
|
|
||||||
</script>
|
|
Loading…
Reference in New Issue