Compare commits
2 Commits
5880a4c36b
...
0c4a9f260d
Author | SHA1 | Date |
---|---|---|
|
0c4a9f260d | |
|
e2dd163efc |
|
@ -1,6 +1,8 @@
|
|||
package com.yanzhu.manage.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsGroup;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
@ -28,6 +30,14 @@ public interface ProProjectInfoSubdeptsGroupMapper
|
|||
*/
|
||||
public List<ProProjectInfoSubdeptsGroup> selectProProjectInfoSubdeptsGroupList(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup);
|
||||
|
||||
/**
|
||||
* 统计分包单位班组信息
|
||||
*
|
||||
* @param proProjectInfoSubdeptsGroup 分包单位班组
|
||||
* @return 分包单位班组集合
|
||||
*/
|
||||
public List<Map<String, Object>> findProProjectInfoSubdeptsGroupCount(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup);
|
||||
|
||||
/**
|
||||
* 新增分包单位班组
|
||||
*
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.yanzhu.manage.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.yanzhu.manage.domain.ProProjectInfoSubdepts;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
@ -28,6 +30,14 @@ public interface ProProjectInfoSubdeptsMapper
|
|||
*/
|
||||
public List<ProProjectInfoSubdepts> selectProProjectInfoSubdeptsList(ProProjectInfoSubdepts proProjectInfoSubdepts);
|
||||
|
||||
/**
|
||||
* 统计分包单位信息
|
||||
*
|
||||
* @param proProjectInfoSubdepts 分包单位
|
||||
* @return 分包单位集合
|
||||
*/
|
||||
public List<Map<String, Object>> findProProjectInfoSubdeptsCount(ProProjectInfoSubdepts proProjectInfoSubdepts);
|
||||
|
||||
/**
|
||||
* 新增分包单位
|
||||
*
|
||||
|
|
|
@ -39,6 +39,14 @@ public interface ProProjectInfoSubdeptsUsersMapper
|
|||
*/
|
||||
public List<ProProjectInfoSubdeptsUsers> selectProProjectInfoSubdeptsUsersList(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers);
|
||||
|
||||
/**
|
||||
* 统计分包单位工人列表
|
||||
*
|
||||
* @param proProjectInfoSubdeptsUsers 分包单位工人
|
||||
* @return 分包单位工人集合
|
||||
*/
|
||||
public List<Map<String, Object>> findProProjectInfoSubdeptsUsersCount(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers);
|
||||
|
||||
/**
|
||||
* 新增分包单位工人
|
||||
*
|
||||
|
|
|
@ -60,6 +60,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
order by psg.id desc
|
||||
</select>
|
||||
|
||||
<select id="findProProjectInfoSubdeptsGroupCount" parameterType="ProProjectInfoSubdeptsGroup" resultType="Map">
|
||||
select psg.use_status as useStatus, count(1) as total from pro_project_info_subdepts_group psg
|
||||
<where>
|
||||
<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="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="groupLeaderPhone != null and groupLeaderPhone != ''"> and psg.group_leader_phone = #{groupLeaderPhone}</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="craftPost != null and craftPost != ''"> and psg.craft_post = #{craftPost}</if>
|
||||
<if test='activeTags == "finished"'> and psg.approve_status <![CDATA[ >= ]]> 100 and psg.use_status in (0,1)</if>
|
||||
and psg.is_del != 2
|
||||
</where>
|
||||
group by psg.use_status
|
||||
</select>
|
||||
|
||||
<select id="selectProProjectInfoSubdeptsGroupById" parameterType="Long" resultMap="ProProjectInfoSubdeptsGroupResult">
|
||||
<include refid="selectProProjectInfoSubdeptsGroupVo"/>
|
||||
|
|
|
@ -62,6 +62,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
order by ps.id desc
|
||||
</select>
|
||||
|
||||
<select id="findProProjectInfoSubdeptsCount" parameterType="ProProjectInfoSubdepts" resultType="Map">
|
||||
select ps.use_status as useStatus, count(1) as total from pro_project_info_subdepts ps
|
||||
<where>
|
||||
<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>
|
||||
<if test="activeProjectId != null "> and ps.project_id = #{activeProjectId}</if>
|
||||
<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="approveStatus != null "> and ps.approve_status = #{approveStatus}</if>
|
||||
<if test="subDeptLeaderPhone != null and subDeptLeaderPhone != ''"> and ps.sub_dept_leader_phone = #{subDeptLeaderPhone}</if>
|
||||
<if test='activeTags == "finished"'> and ps.approve_status <![CDATA[ >= ]]> 100 and ps.use_status in (0,1)</if>
|
||||
and ps.is_del = 0
|
||||
</where>
|
||||
group by ps.use_status
|
||||
</select>
|
||||
|
||||
<select id="selectProProjectInfoSubdeptsById" parameterType="Long" resultMap="ProProjectInfoSubdeptsResult">
|
||||
<include refid="selectProProjectInfoSubdeptsVo"/>
|
||||
where ps.id = #{id}
|
||||
|
|
|
@ -101,6 +101,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> and date(psu.use_date) between #{params.beginTime} and #{params.endTime}</if>
|
||||
and psu.is_del != 2
|
||||
</where>
|
||||
order by psu.id desc
|
||||
</select>
|
||||
|
||||
<select id="findProProjectInfoSubdeptsUsersCount" parameterType="ProProjectInfoSubdeptsUsers" resultType="Map">
|
||||
select psu.use_status as useStatus, count(1) as total from pro_project_info_subdepts_users psu
|
||||
<where>
|
||||
<if test="comId != null "> and psu.com_id = #{comId}</if>
|
||||
<if test="parId != null "> and psu.par_id = #{parId}</if>
|
||||
<if test="projectId != null "> and psu.project_id = #{projectId}</if>
|
||||
<if test="subDeptId != null "> and psu.sub_dept_id = #{subDeptId}</if>
|
||||
<if test="subDeptType != null and subDeptType != ''"> and psu.sub_dept_type = #{subDeptType}</if>
|
||||
<if test="subDeptName != null and subDeptName != ''"> and psu.sub_dept_name like concat('%', #{subDeptName}, '%')</if>
|
||||
<if test="userId != null "> and psu.user_id = #{userId}</if>
|
||||
<if test="userPost != null "> and psu.user_post = #{userPost}</if>
|
||||
<if test="subDeptGroup != null "> and psu.sub_dept_group = #{subDeptGroup}</if>
|
||||
<if test="subDeptGroupName != null and subDeptGroupName != ''"> and psu.sub_dept_group_name like concat('%', #{subDeptGroupName}, '%')</if>
|
||||
<if test="workType != null and workType != 0"> and psu.work_type = #{workType}</if>
|
||||
<if test="craftType != null and craftType != ''"> and psu.craft_type = #{craftType}</if>
|
||||
<if test="craftPost != null and craftPost != ''"> and psu.craft_post = #{craftPost}</if>
|
||||
<if test="eduStatus != null and eduStatus != ''"> and psu.edu_status = #{eduStatus}</if>
|
||||
<if test="eduDate != null "> and psu.edu_date = #{eduDate}</if>
|
||||
<if test="approveStatus != null "> and psu.approve_status = #{approveStatus}</if>
|
||||
<if test="subStep != null "> and psu.sub_step = #{subStep}</if>
|
||||
<if test="illnessStatus != null "> and psu.illness_status = #{illnessStatus}</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='activeTags == "finished"'> and psu.approve_status <![CDATA[ >= ]]> 100 and psu.use_status in (0,1)</if>
|
||||
<if test="isDel != null "> and psu.is_del = #{isDel}</if>
|
||||
<if test='searchValue == "subUsers"'> and psu.user_post != '66' </if>
|
||||
<if test='searchValue == "sedUsers"'> and psu.sub_dept_type in ('1','4','5') and psu.user_post not in ('4','5') </if>
|
||||
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> and date(psu.use_date) between #{params.beginTime} and #{params.endTime}</if>
|
||||
and psu.is_del != 2
|
||||
</where>
|
||||
group by psu.use_status
|
||||
</select>
|
||||
|
||||
<select id="selectProProjectInfoSubdeptsUsersById" parameterType="Long" resultMap="ProProjectInfoSubdeptsUsersResult">
|
||||
|
|
|
@ -14,6 +14,8 @@ import org.springframework.web.bind.annotation.*;
|
|||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 参建单位Controller
|
||||
|
@ -30,8 +32,8 @@ public class ProProjectInfoSubdeptsController extends BaseController
|
|||
|
||||
/**
|
||||
* 查询参建单位列表
|
||||
* @RequiresPermissions("manage:proProjectInfoSubdepts:list")
|
||||
*/
|
||||
@RequiresPermissions("manage:proProjectInfoSubdepts:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ProProjectInfoSubdepts proProjectInfoSubdepts)
|
||||
{
|
||||
|
@ -74,6 +76,19 @@ public class ProProjectInfoSubdeptsController extends BaseController
|
|||
return toAjax(proProjectInfoSubdeptsService.insertProProjectInfoSubdepts(proProjectInfoSubdepts));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增分包单位
|
||||
*/
|
||||
@PostMapping("/registerSubDepts")
|
||||
public AjaxResult registerSubDepts(@RequestBody ProProjectInfoSubdepts proProjectInfoSubdepts)
|
||||
{
|
||||
if(Objects.isNull(proProjectInfoSubdepts.getId())){
|
||||
return success(proProjectInfoSubdeptsService.insertProProjectInfoSubdeptsWX(proProjectInfoSubdepts,true));
|
||||
}else{
|
||||
return success(proProjectInfoSubdeptsService.updateProProjectInfoSubdeptsWX(proProjectInfoSubdepts,true));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改参建单位
|
||||
*/
|
||||
|
@ -98,8 +113,8 @@ public class ProProjectInfoSubdeptsController extends BaseController
|
|||
|
||||
/**
|
||||
* 参建单位入场/离场
|
||||
* @RequiresPermissions("manage:proProjectInfoSubdepts:edit")
|
||||
*/
|
||||
@RequiresPermissions("manage:proProjectInfoSubdepts:edit")
|
||||
@Log(title = "单位离场", businessType = BusinessType.UPDATE)
|
||||
@GetMapping("/editUseStatus/{id}")
|
||||
public AjaxResult editUseStatus(@PathVariable("id") Long id, String status)
|
||||
|
@ -127,4 +142,15 @@ public class ProProjectInfoSubdeptsController extends BaseController
|
|||
List<ProProjectInfoSubdepts> list = proProjectInfoSubdeptsService.selectProProjectInfoSubdeptsList(proProjectInfoSubdepts);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计参建单位列表
|
||||
*/
|
||||
@GetMapping("/findWxCount")
|
||||
public AjaxResult findWxCount(ProProjectInfoSubdepts proProjectInfoSubdepts)
|
||||
{
|
||||
List<Map<String, Object>> list = proProjectInfoSubdeptsService.findProProjectInfoSubdeptsCount(proProjectInfoSubdepts);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.yanzhu.manage.controller;
|
||||
|
||||
import com.yanzhu.common.core.text.Convert;
|
||||
import com.yanzhu.common.core.utils.poi.ExcelUtil;
|
||||
import com.yanzhu.common.core.web.controller.BaseController;
|
||||
import com.yanzhu.common.core.web.domain.AjaxResult;
|
||||
|
@ -9,13 +8,13 @@ import com.yanzhu.common.log.annotation.Log;
|
|||
import com.yanzhu.common.log.enums.BusinessType;
|
||||
import com.yanzhu.common.security.annotation.RequiresPermissions;
|
||||
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsGroup;
|
||||
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers;
|
||||
import com.yanzhu.manage.service.IProProjectInfoSubdeptsGroupService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
|
@ -33,8 +32,8 @@ public class ProProjectInfoSubdeptsGroupController extends BaseController
|
|||
|
||||
/**
|
||||
* 查询单位班组列表
|
||||
* @RequiresPermissions("manage:proProjectInfoSubdeptsGroup:list")
|
||||
*/
|
||||
@RequiresPermissions("manage:proProjectInfoSubdeptsGroup:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup)
|
||||
{
|
||||
|
@ -58,8 +57,8 @@ public class ProProjectInfoSubdeptsGroupController extends BaseController
|
|||
|
||||
/**
|
||||
* 获取单位班组详细信息
|
||||
* @RequiresPermissions("manage:proProjectInfoSubdeptsGroup:query")
|
||||
*/
|
||||
@RequiresPermissions("manage:proProjectInfoSubdeptsGroup:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
|
@ -74,7 +73,7 @@ public class ProProjectInfoSubdeptsGroupController extends BaseController
|
|||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup)
|
||||
{
|
||||
return toAjax(proProjectInfoSubdeptsGroupService.insertProProjectInfoSubdeptsGroup(proProjectInfoSubdeptsGroup));
|
||||
return toAjax(proProjectInfoSubdeptsGroupService.insertProProjectInfoSubdeptsGroup(proProjectInfoSubdeptsGroup,true));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -88,12 +87,25 @@ public class ProProjectInfoSubdeptsGroupController extends BaseController
|
|||
return toAjax(proProjectInfoSubdeptsGroupService.updateProProjectInfoSubdeptsGroup(proProjectInfoSubdeptsGroup));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增分包单位
|
||||
*/
|
||||
@PostMapping("/registerSubDeptsGroup")
|
||||
public AjaxResult registerSubDeptsGroup(@RequestBody ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup)
|
||||
{
|
||||
if(Objects.isNull(proProjectInfoSubdeptsGroup.getId())){
|
||||
return success(proProjectInfoSubdeptsGroupService.insertProProjectInfoSubdeptsGroup(proProjectInfoSubdeptsGroup,true));
|
||||
}else{
|
||||
return success(proProjectInfoSubdeptsGroupService.updateProProjectInfoSubdeptsGroup(proProjectInfoSubdeptsGroup));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改班组组长
|
||||
* @param proProjectInfoSubdeptsGroup 班组信息
|
||||
* @return
|
||||
* @RequiresPermissions("manage:proProjectInfoSubdeptsGroup:edit")
|
||||
*/
|
||||
@RequiresPermissions("manage:proProjectInfoSubdeptsGroup:edit")
|
||||
@PostMapping("/updateGroupLeader")
|
||||
public AjaxResult updateGroupLeader(@RequestBody ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup){
|
||||
return toAjax(proProjectInfoSubdeptsGroupService.updateGroupLeader(proProjectInfoSubdeptsGroup));
|
||||
|
@ -101,8 +113,8 @@ public class ProProjectInfoSubdeptsGroupController extends BaseController
|
|||
|
||||
/**
|
||||
* 单位班组入场/离场
|
||||
* @RequiresPermissions("manage:proProjectInfoSubdeptsGroup:edit")
|
||||
*/
|
||||
@RequiresPermissions("manage:proProjectInfoSubdeptsGroup:edit")
|
||||
@Log(title = "班组离场", businessType = BusinessType.UPDATE)
|
||||
@GetMapping("/editUseStatus/{id}")
|
||||
public AjaxResult editUseStatus(@PathVariable("id") Long id, String status)
|
||||
|
@ -120,4 +132,14 @@ public class ProProjectInfoSubdeptsGroupController extends BaseController
|
|||
{
|
||||
return toAjax(proProjectInfoSubdeptsGroupService.deleteProProjectInfoSubdeptsGroupByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计参建单位列表
|
||||
*/
|
||||
@GetMapping("/findWxCount")
|
||||
public AjaxResult findWxCount(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup)
|
||||
{
|
||||
List<Map<String, Object>> list = proProjectInfoSubdeptsGroupService.findProProjectInfoSubdeptsGroupCount(proProjectInfoSubdeptsGroup);
|
||||
return success(list);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
package com.yanzhu.manage.controller;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.yanzhu.common.core.constant.CacheConstants;
|
||||
import com.yanzhu.common.core.domain.R;
|
||||
import com.yanzhu.common.core.enums.ApproveStatus;
|
||||
import com.yanzhu.common.core.enums.UseStateEnums;
|
||||
import com.yanzhu.common.core.text.Convert;
|
||||
import com.yanzhu.common.core.utils.DateUtils;
|
||||
|
@ -54,8 +51,8 @@ public class ProProjectInfoSubdeptsUsersController extends BaseController
|
|||
|
||||
/**
|
||||
* 查询分包单位工人列表
|
||||
* @RequiresPermissions("manage:proProjectInfoSubdeptsUsers:list")
|
||||
*/
|
||||
@RequiresPermissions("manage:proProjectInfoSubdeptsUsers:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers)
|
||||
{
|
||||
|
@ -138,6 +135,19 @@ public class ProProjectInfoSubdeptsUsersController extends BaseController
|
|||
return toAjax(proProjectInfoSubdeptsUsersService.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增分包单位人员
|
||||
*/
|
||||
@PostMapping("/registerSubDeptsUsers")
|
||||
public AjaxResult registerSubDeptsUsers(@RequestBody ProProjectInfoSubdeptsUsers ProProjectInfoSubdeptsUsers)
|
||||
{
|
||||
if(Objects.isNull(ProProjectInfoSubdeptsUsers.getId())){
|
||||
return success(proProjectInfoSubdeptsUsersService.insertProProjectInfoSubdeptsUsersWX(ProProjectInfoSubdeptsUsers,true));
|
||||
}else{
|
||||
return success(proProjectInfoSubdeptsUsersService.updateProProjectInfoSubdeptsUsersWX(ProProjectInfoSubdeptsUsers,true));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 变更手机号码
|
||||
*/
|
||||
|
@ -261,8 +271,8 @@ public class ProProjectInfoSubdeptsUsersController extends BaseController
|
|||
* @param ids
|
||||
* @param state
|
||||
* @return
|
||||
* @RequiresPermissions("manage:proProjectInfoSubdeptsUsers:edit")
|
||||
*/
|
||||
@RequiresPermissions("manage:proProjectInfoSubdeptsUsers:edit")
|
||||
@PostMapping("/enterState/{state}")
|
||||
public AjaxResult updateEnterState(@RequestBody List<Long> ids,@PathVariable int state){
|
||||
try {
|
||||
|
@ -462,6 +472,16 @@ public class ProProjectInfoSubdeptsUsersController extends BaseController
|
|||
return success(datas);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计参建单位列表
|
||||
*/
|
||||
@GetMapping("/findWxCount")
|
||||
public AjaxResult findWxCount(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers)
|
||||
{
|
||||
List<Map<String, Object>> list = proProjectInfoSubdeptsUsersService.findProProjectInfoSubdeptsUsersCount(proProjectInfoSubdeptsUsers);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 组装的测试数据...
|
||||
* JiangYuQi
|
||||
|
|
|
@ -69,9 +69,9 @@ public class WxController extends BaseController {
|
|||
public AjaxResult registerSubDepts(@RequestBody ProProjectInfoSubdepts proProjectInfoSubdepts)
|
||||
{
|
||||
if(Objects.isNull(proProjectInfoSubdepts.getId())){
|
||||
return success(proProjectInfoSubdeptsService.insertProProjectInfoSubdeptsWX(proProjectInfoSubdepts));
|
||||
return success(proProjectInfoSubdeptsService.insertProProjectInfoSubdeptsWX(proProjectInfoSubdepts,false));
|
||||
}else{
|
||||
return success(proProjectInfoSubdeptsService.updateProProjectInfoSubdeptsWX(proProjectInfoSubdepts));
|
||||
return success(proProjectInfoSubdeptsService.updateProProjectInfoSubdeptsWX(proProjectInfoSubdepts,false));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -82,9 +82,9 @@ public class WxController extends BaseController {
|
|||
public AjaxResult registerSubDeptsUsers(@RequestBody ProProjectInfoSubdeptsUsers ProProjectInfoSubdeptsUsers)
|
||||
{
|
||||
if(Objects.isNull(ProProjectInfoSubdeptsUsers.getId())){
|
||||
return success(proProjectInfoSubdeptsUsersService.insertProProjectInfoSubdeptsUsersWX(ProProjectInfoSubdeptsUsers));
|
||||
return success(proProjectInfoSubdeptsUsersService.insertProProjectInfoSubdeptsUsersWX(ProProjectInfoSubdeptsUsers,false));
|
||||
}else{
|
||||
return success(proProjectInfoSubdeptsUsersService.updateProProjectInfoSubdeptsUsersWX(ProProjectInfoSubdeptsUsers));
|
||||
return success(proProjectInfoSubdeptsUsersService.updateProProjectInfoSubdeptsUsersWX(ProProjectInfoSubdeptsUsers,false));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.yanzhu.manage.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsGroup;
|
||||
|
||||
/**
|
||||
|
@ -27,13 +29,21 @@ public interface IProProjectInfoSubdeptsGroupService
|
|||
*/
|
||||
public List<ProProjectInfoSubdeptsGroup> selectProProjectInfoSubdeptsGroupList(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup);
|
||||
|
||||
/**
|
||||
* 统计分包单位班组信息
|
||||
*
|
||||
* @param proProjectInfoSubdeptsGroup 分包单位班组
|
||||
* @return 分包单位班组集合
|
||||
*/
|
||||
public List<Map<String, Object>> findProProjectInfoSubdeptsGroupCount(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup);
|
||||
|
||||
/**
|
||||
* 新增分包单位班组
|
||||
*
|
||||
* @param proProjectInfoSubdeptsGroup 分包单位班组
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProProjectInfoSubdeptsGroup(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup);
|
||||
public int insertProProjectInfoSubdeptsGroup(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup,boolean isSign);
|
||||
|
||||
/**
|
||||
* 修改分包单位班组
|
||||
|
|
|
@ -30,6 +30,14 @@ public interface IProProjectInfoSubdeptsService
|
|||
*/
|
||||
public List<ProProjectInfoSubdepts> selectProProjectInfoSubdeptsList(ProProjectInfoSubdepts proProjectInfoSubdepts);
|
||||
|
||||
/**
|
||||
* 统计分包单位信息
|
||||
*
|
||||
* @param proProjectInfoSubdepts 分包单位
|
||||
* @return 分包单位集合
|
||||
*/
|
||||
public List<Map<String, Object>> findProProjectInfoSubdeptsCount(ProProjectInfoSubdepts proProjectInfoSubdepts);
|
||||
|
||||
/**
|
||||
* 新增分包单位
|
||||
*
|
||||
|
@ -44,7 +52,7 @@ public interface IProProjectInfoSubdeptsService
|
|||
* @param proProjectInfoSubdepts 分包单位
|
||||
* @return 结果
|
||||
*/
|
||||
public ProProjectInfoSubdepts insertProProjectInfoSubdeptsWX(ProProjectInfoSubdepts proProjectInfoSubdepts);
|
||||
public ProProjectInfoSubdepts insertProProjectInfoSubdeptsWX(ProProjectInfoSubdepts proProjectInfoSubdepts,boolean isSign);
|
||||
|
||||
/**
|
||||
* 修改分包单位
|
||||
|
@ -60,7 +68,7 @@ public interface IProProjectInfoSubdeptsService
|
|||
* @param proProjectInfoSubdepts 分包单位
|
||||
* @return 结果
|
||||
*/
|
||||
public ProProjectInfoSubdepts updateProProjectInfoSubdeptsWX(ProProjectInfoSubdepts proProjectInfoSubdepts);
|
||||
public ProProjectInfoSubdepts updateProProjectInfoSubdeptsWX(ProProjectInfoSubdepts proProjectInfoSubdepts,boolean isSign);
|
||||
|
||||
/**
|
||||
* 修改分包单位
|
||||
|
|
|
@ -31,6 +31,14 @@ public interface IProProjectInfoSubdeptsUsersService
|
|||
*/
|
||||
public List<ProProjectInfoSubdeptsUsers> selectProProjectInfoSubdeptsUsersList(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers);
|
||||
|
||||
/**
|
||||
* 统计分包单位工人列表
|
||||
*
|
||||
* @param proProjectInfoSubdeptsUsers 分包单位工人
|
||||
* @return 分包单位工人集合
|
||||
*/
|
||||
public List<Map<String, Object>> findProProjectInfoSubdeptsUsersCount(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers);
|
||||
|
||||
/**
|
||||
* 查询分包单位工人列表
|
||||
*
|
||||
|
@ -53,7 +61,7 @@ public interface IProProjectInfoSubdeptsUsersService
|
|||
* @param proProjectInfoSubdeptsUsers 分包单位工人
|
||||
* @return 结果
|
||||
*/
|
||||
public ProProjectInfoSubdeptsUsers insertProProjectInfoSubdeptsUsersWX(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers);
|
||||
public ProProjectInfoSubdeptsUsers insertProProjectInfoSubdeptsUsersWX(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers,boolean isSign);
|
||||
|
||||
/**
|
||||
* 修改分包单位工人
|
||||
|
@ -77,7 +85,7 @@ public interface IProProjectInfoSubdeptsUsersService
|
|||
* @param proProjectInfoSubdeptsUsers 分包单位工人
|
||||
* @return 结果
|
||||
*/
|
||||
public ProProjectInfoSubdeptsUsers updateProProjectInfoSubdeptsUsersWX(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers);
|
||||
public ProProjectInfoSubdeptsUsers updateProProjectInfoSubdeptsUsersWX(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers,boolean isSign);
|
||||
|
||||
/**
|
||||
* 批量删除分包单位工人
|
||||
|
|
|
@ -29,6 +29,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
|
@ -82,11 +83,29 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
|
|||
@Override
|
||||
public List<ProProjectInfoSubdeptsGroup> selectProProjectInfoSubdeptsGroupList(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup)
|
||||
{
|
||||
proProjectInfoSubdeptsGroup.setActiveComId(SecurityUtils.getLoginUser().getSysUser().getActiveComId());
|
||||
proProjectInfoSubdeptsGroup.setActiveProjectId(SecurityUtils.getLoginUser().getSysUser().getActiveProjectId());
|
||||
if(proProjectInfoSubdeptsGroup.getProjectId()==null){
|
||||
proProjectInfoSubdeptsGroup.setActiveComId(SecurityUtils.getLoginUser().getSysUser().getActiveComId());
|
||||
proProjectInfoSubdeptsGroup.setActiveProjectId(SecurityUtils.getLoginUser().getSysUser().getActiveProjectId());
|
||||
}
|
||||
return proProjectInfoSubdeptsGroupMapper.selectProProjectInfoSubdeptsGroupList(proProjectInfoSubdeptsGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计分包单位班组信息
|
||||
*
|
||||
* @param proProjectInfoSubdeptsGroup 分包单位班组
|
||||
* @return 分包单位班组
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> findProProjectInfoSubdeptsGroupCount(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup)
|
||||
{
|
||||
if(proProjectInfoSubdeptsGroup.getProjectId()==null){
|
||||
proProjectInfoSubdeptsGroup.setActiveComId(SecurityUtils.getLoginUser().getSysUser().getActiveComId());
|
||||
proProjectInfoSubdeptsGroup.setActiveProjectId(SecurityUtils.getLoginUser().getSysUser().getActiveProjectId());
|
||||
}
|
||||
return proProjectInfoSubdeptsGroupMapper.findProProjectInfoSubdeptsGroupCount(proProjectInfoSubdeptsGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增分包单位班组
|
||||
*
|
||||
|
@ -95,7 +114,7 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
|
|||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int insertProProjectInfoSubdeptsGroup(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup)
|
||||
public int insertProProjectInfoSubdeptsGroup(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup,boolean isSign)
|
||||
{
|
||||
ProProjectInfoSubdepts info = proProjectInfoSubdeptsMapper.selectProProjectInfoSubdeptsById(proProjectInfoSubdeptsGroup.getSubDeptId());
|
||||
if(Objects.nonNull(info)){
|
||||
|
@ -104,6 +123,10 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
|
|||
proProjectInfoSubdeptsGroup.setSubDeptCode(info.getSubDeptCode());
|
||||
proProjectInfoSubdeptsGroup.setSubDeptType(info.getSubDeptType());
|
||||
}
|
||||
if(isSign){
|
||||
proProjectInfoSubdeptsGroup.setUseStatus(UseStateEnums.IN.getCode());
|
||||
proProjectInfoSubdeptsGroup.setApproveStatus(ApproveStatus.passed.getCode());
|
||||
}
|
||||
proProjectInfoSubdeptsGroup.setCreateBy(SecurityUtils.getUsername());
|
||||
proProjectInfoSubdeptsGroup.setCreateTime(DateUtils.getNowDate());
|
||||
int res = proProjectInfoSubdeptsGroupMapper.insertProProjectInfoSubdeptsGroup(proProjectInfoSubdeptsGroup);
|
||||
|
@ -340,7 +363,7 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
|
|||
try {
|
||||
SysUser sysUser = new SysUser();
|
||||
sysUser.setUserName(entiry.getGroupLeaderPhone());
|
||||
sysUser.setActiveProjectId(proProjectInfoSubdeptsGroup.getProjectId());
|
||||
sysUser.setDeptId(proProjectInfoSubdeptsGroup.getProjectId());
|
||||
remoteUserService.removeUserRoles(sysUser, SecurityConstants.INNER);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
|
@ -364,7 +387,7 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
|
|||
proProjectInfoSubdeptsUsers.setSubDeptGroupName(entiry.getGroupName());
|
||||
// 设置班组长二维码信息...
|
||||
try {
|
||||
String accessToken = wxMaService.getAccessToken();
|
||||
//String accessToken = wxMaService.getAccessToken();
|
||||
String filePath = DateUtils.datePath()+"/"+System.currentTimeMillis()+".png";
|
||||
String savePath = ProfileConfig.profilePath+"/"+filePath;
|
||||
String profilePath = ProfileConfig.profile+"/"+filePath;
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.yanzhu.common.core.constant.SecurityConstants;
|
|||
import com.yanzhu.common.core.domain.R;
|
||||
import com.yanzhu.common.core.enums.*;
|
||||
import com.yanzhu.common.core.exception.ServiceException;
|
||||
import com.yanzhu.common.core.text.Convert;
|
||||
import com.yanzhu.common.core.utils.DateUtils;
|
||||
import com.yanzhu.common.core.utils.StringUtils;
|
||||
import com.yanzhu.common.redis.service.RedisService;
|
||||
|
@ -32,6 +33,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
|
@ -94,11 +96,29 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
|
|||
@Override
|
||||
public List<ProProjectInfoSubdepts> selectProProjectInfoSubdeptsList(ProProjectInfoSubdepts proProjectInfoSubdepts)
|
||||
{
|
||||
proProjectInfoSubdepts.setActiveComId(SecurityUtils.getLoginUser().getSysUser().getActiveComId());
|
||||
proProjectInfoSubdepts.setActiveProjectId(SecurityUtils.getLoginUser().getSysUser().getActiveProjectId());
|
||||
if(proProjectInfoSubdepts.getProjectId()==null){
|
||||
proProjectInfoSubdepts.setActiveComId(SecurityUtils.getLoginUser().getSysUser().getActiveComId());
|
||||
proProjectInfoSubdepts.setActiveProjectId(SecurityUtils.getLoginUser().getSysUser().getActiveProjectId());
|
||||
}
|
||||
return proProjectInfoSubdeptsMapper.selectProProjectInfoSubdeptsList(proProjectInfoSubdepts);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计分包单位信息
|
||||
*
|
||||
* @param proProjectInfoSubdepts 分包单位
|
||||
* @return 分包单位
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> findProProjectInfoSubdeptsCount(ProProjectInfoSubdepts proProjectInfoSubdepts)
|
||||
{
|
||||
if(proProjectInfoSubdepts.getProjectId()==null){
|
||||
proProjectInfoSubdepts.setActiveComId(SecurityUtils.getLoginUser().getSysUser().getActiveComId());
|
||||
proProjectInfoSubdepts.setActiveProjectId(SecurityUtils.getLoginUser().getSysUser().getActiveProjectId());
|
||||
}
|
||||
return proProjectInfoSubdeptsMapper.findProProjectInfoSubdeptsCount(proProjectInfoSubdepts);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增分包单位
|
||||
*
|
||||
|
@ -222,7 +242,7 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
|
|||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public ProProjectInfoSubdepts insertProProjectInfoSubdeptsWX(ProProjectInfoSubdepts proProjectInfoSubdepts)
|
||||
public ProProjectInfoSubdepts insertProProjectInfoSubdeptsWX(ProProjectInfoSubdepts proProjectInfoSubdepts,boolean isSign)
|
||||
{
|
||||
ProProjectInfo info = redisService.getCacheObject(CacheConstants.PRO_PROJECT+proProjectInfoSubdepts.getProjectId());
|
||||
if(Objects.isNull(info)){
|
||||
|
@ -230,6 +250,10 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
|
|||
}
|
||||
proProjectInfoSubdepts.setComId(info.getComId());
|
||||
if(Objects.equals(proProjectInfoSubdepts.getSubDeptType(), SubDeptsEnums.ZYFB.getCode()) || Objects.equals(proProjectInfoSubdepts.getSubDeptType(),SubDeptsEnums.LWFB.getCode())){
|
||||
Map<String, Object> map = proProjectInfoSubdeptsUsersMapper.findUserPhone(proProjectInfoSubdepts.getSubDeptLeaderPhone());
|
||||
if(Objects.nonNull(map) && Convert.toInt(map.get("total"),0)>0){
|
||||
throw new ServiceException("手机号码已被注册");
|
||||
}
|
||||
// 单位委托人信息
|
||||
if(StringUtils.isNotEmpty(proProjectInfoSubdepts.getSubDeptLeaderName()) && StringUtils.isNotEmpty(proProjectInfoSubdepts.getSubDeptLeaderCode()) && StringUtils.isNotEmpty(proProjectInfoSubdepts.getSubDeptLeaderPhone())){
|
||||
SysUser sysUser = new SysUser();
|
||||
|
@ -252,7 +276,12 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
|
|||
}
|
||||
}
|
||||
proProjectInfoSubdepts.setCreateBy(DataSourceEnuns.APP.getInfo());
|
||||
proProjectInfoSubdepts.setApproveStatus(ApproveStatus.await.getCode());
|
||||
if(isSign){
|
||||
proProjectInfoSubdepts.setUseStatus(UseStateEnums.IN.getCode());
|
||||
proProjectInfoSubdepts.setApproveStatus(ApproveStatus.passed.getCode());
|
||||
}else{
|
||||
proProjectInfoSubdepts.setApproveStatus(ApproveStatus.await.getCode());
|
||||
}
|
||||
proProjectInfoSubdepts.setCreateTime(DateUtils.getNowDate());
|
||||
int res = proProjectInfoSubdeptsMapper.insertProProjectInfoSubdepts(proProjectInfoSubdepts);
|
||||
|
||||
|
@ -297,13 +326,34 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
|
|||
subdeptsUser.setCraftType(CraftTypeEnums.GLRY.getCode());
|
||||
subdeptsUser.setCraftPost(CraftPostEnums.WTDL.getCode());
|
||||
subdeptsUser.setEduStatus(ShiFouEnums.FOU.getCodeStr());
|
||||
subdeptsUser.setApproveStatus(ApproveStatus.await.getCode());
|
||||
subdeptsUser.setApproveStatus(ApproveStatus.passed.getCode());
|
||||
if(Objects.isNull(subdeptsUser.getSubStep()) || subdeptsUser.getSubStep()<1){
|
||||
subdeptsUser.setSubStep(1L);
|
||||
}
|
||||
subdeptsUser.setCreateBy(DataSourceEnuns.APP.getInfo());
|
||||
subdeptsUser.setCreateTime(DateUtils.getNowDate());
|
||||
proProjectInfoSubdeptsUsersMapper.insertProProjectInfoSubdeptsUsers(subdeptsUser);
|
||||
res = proProjectInfoSubdeptsUsersMapper.insertProProjectInfoSubdeptsUsers(subdeptsUser);
|
||||
if(isSign){
|
||||
try {
|
||||
if(res>0){
|
||||
//String accessToken = wxMaService.getAccessToken();
|
||||
String filePath = DateUtils.datePath()+"/"+System.currentTimeMillis()+".png";
|
||||
String savePath = ProfileConfig.profilePath+"/"+filePath;
|
||||
String profilePath = ProfileConfig.profile+"/"+filePath;
|
||||
//log.info("accessToken...{}",accessToken);
|
||||
// 生成二维码
|
||||
File file = wxMaService.getQrcodeService().createQrcode("pages/project_qr/index?SIGID=2&QRPID="+subdeptsUser.getProjectId()+"&PARID="+subdeptsUser.getId(),280);
|
||||
FileUtil.copyFile(file,new File(savePath));
|
||||
subdeptsUser.setQrCode(profilePath);
|
||||
proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(subdeptsUser);
|
||||
proProjectInfoSubdepts.setQrCode(profilePath);
|
||||
proProjectInfoSubdeptsMapper.updateProProjectInfoSubdepts(proProjectInfoSubdepts);
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
uniService.syncUniUser(subdeptsUser,true);
|
||||
}
|
||||
}
|
||||
return proProjectInfoSubdepts;
|
||||
}
|
||||
|
@ -389,7 +439,7 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
|
|||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public ProProjectInfoSubdepts updateProProjectInfoSubdeptsWX(ProProjectInfoSubdepts proProjectInfoSubdepts)
|
||||
public ProProjectInfoSubdepts updateProProjectInfoSubdeptsWX(ProProjectInfoSubdepts proProjectInfoSubdepts,boolean isSign)
|
||||
{
|
||||
ProProjectInfo info = redisService.getCacheObject(CacheConstants.PRO_PROJECT+proProjectInfoSubdepts.getProjectId());
|
||||
if(Objects.isNull(info)){
|
||||
|
@ -441,7 +491,6 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
|
|||
if(Objects.isNull(subdeptsUser.getSubStep()) || subdeptsUser.getSubStep()<1){
|
||||
subdeptsUser.setSubStep(1L);
|
||||
}
|
||||
|
||||
if(Objects.isNull(subdeptsUser.getId())){
|
||||
subdeptsUser.setCreateBy(DataSourceEnuns.APP.getInfo());
|
||||
subdeptsUser.setCreateTime(DateUtils.getNowDate());
|
||||
|
@ -451,6 +500,27 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
|
|||
subdeptsUser.setUpdateTime(DateUtils.getNowDate());
|
||||
proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(subdeptsUser);
|
||||
}
|
||||
|
||||
if(isSign){
|
||||
try {
|
||||
if(res>0 && StringUtils.isEmpty(subdeptsUser.getQrCode())){
|
||||
//String accessToken = wxMaService.getAccessToken();
|
||||
String filePath = DateUtils.datePath()+"/"+System.currentTimeMillis()+".png";
|
||||
String savePath = ProfileConfig.profilePath+"/"+filePath;
|
||||
String profilePath = ProfileConfig.profile+"/"+filePath;
|
||||
//log.info("accessToken...{}",accessToken);
|
||||
// 生成二维码
|
||||
File file = wxMaService.getQrcodeService().createQrcode("pages/project_qr/index?SIGID=2&QRPID="+subdeptsUser.getProjectId()+"&PARID="+subdeptsUser.getId(),280);
|
||||
FileUtil.copyFile(file,new File(savePath));
|
||||
subdeptsUser.setQrCode(profilePath);
|
||||
proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(subdeptsUser);
|
||||
proProjectInfoSubdepts.setQrCode(profilePath);
|
||||
proProjectInfoSubdeptsMapper.updateProProjectInfoSubdepts(proProjectInfoSubdepts);
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
return proProjectInfoSubdepts;
|
||||
}
|
||||
|
|
|
@ -109,6 +109,21 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
|
|||
return proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(proProjectInfoSubdeptsUsers);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分包单位工人列表
|
||||
*
|
||||
* @param proProjectInfoSubdeptsUsers 分包单位工人
|
||||
* @return 分包单位工人
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> findProProjectInfoSubdeptsUsersCount(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers)
|
||||
{
|
||||
if(Objects.nonNull(proProjectInfoSubdeptsUsers.getUseStatus()) && Objects.equals(proProjectInfoSubdeptsUsers.getUseStatus(),"-1")){
|
||||
proProjectInfoSubdeptsUsers.setUseStatus(null);
|
||||
}
|
||||
return proProjectInfoSubdeptsUsersMapper.findProProjectInfoSubdeptsUsersCount(proProjectInfoSubdeptsUsers);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分包单位工人列表
|
||||
*
|
||||
|
@ -315,12 +330,15 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
|
|||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public ProProjectInfoSubdeptsUsers insertProProjectInfoSubdeptsUsersWX(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers){
|
||||
public ProProjectInfoSubdeptsUsers insertProProjectInfoSubdeptsUsersWX(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers,boolean isSign){
|
||||
ProProjectInfoSubdeptsUsers parUsers = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersById(proProjectInfoSubdeptsUsers.getParId());
|
||||
if(Objects.isNull(parUsers)){
|
||||
throw new ServiceException("用户信息异常...请重新扫码");
|
||||
}
|
||||
|
||||
Map<String, Object> map = proProjectInfoSubdeptsUsersMapper.findUserPhone(proProjectInfoSubdeptsUsers.getUserPhone());
|
||||
if(Objects.nonNull(map) && Convert.toInt(map.get("total"),0)>0){
|
||||
throw new ServiceException("手机号码已被注册");
|
||||
}
|
||||
proProjectInfoSubdeptsUsers.setComId(parUsers.getComId());
|
||||
proProjectInfoSubdeptsUsers.setProjectId(parUsers.getProjectId());
|
||||
proProjectInfoSubdeptsUsers.setSubDeptId(parUsers.getSubDeptId());
|
||||
|
@ -332,7 +350,13 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
|
|||
proProjectInfoSubdeptsUsers.setCreateBy(DataSourceEnuns.APP.getInfo());
|
||||
proProjectInfoSubdeptsUsers.setCreateTime(DateUtils.getNowDate());
|
||||
proProjectInfoSubdeptsUsers.setSubStep(1L);
|
||||
proProjectInfoSubdeptsUsers.setApproveStatus(ApproveStatus.await.getCode());
|
||||
if(isSign){
|
||||
proProjectInfoSubdeptsUsers.setUseStatus(UseStateEnums.IN.getCode());
|
||||
proProjectInfoSubdeptsUsers.setUseDate(DateUtils.getNowDate());
|
||||
proProjectInfoSubdeptsUsers.setApproveStatus(ApproveStatus.passed.getCode());
|
||||
}else{
|
||||
proProjectInfoSubdeptsUsers.setApproveStatus(ApproveStatus.await.getCode());
|
||||
}
|
||||
|
||||
// 完善人员信息...
|
||||
SysUser sysUser = new SysUser();
|
||||
|
@ -482,6 +506,39 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
|
|||
Long userId = remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER).getData();
|
||||
proProjectInfoSubdeptsUsers.setUserId(userId);
|
||||
proProjectInfoSubdeptsUsersMapper.insertProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
|
||||
|
||||
if(isSign){
|
||||
if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.XMJL.getCode())){
|
||||
try {
|
||||
String accessToken = wxMaService.getAccessToken();
|
||||
String filePath = DateUtils.datePath()+"/"+System.currentTimeMillis()+".png";
|
||||
String savePath = ProfileConfig.profilePath+"/"+filePath;
|
||||
String profilePath = ProfileConfig.profile+"/"+filePath;
|
||||
log.info("accessToken...{}",accessToken);
|
||||
// 生成二维码
|
||||
File file = wxMaService.getQrcodeService().createQrcode("pages/project_qr/index?SIGID=3&QRPID="+proProjectInfoSubdeptsUsers.getProjectId()+"&PARID="+proProjectInfoSubdeptsUsers.getId(),280);
|
||||
FileUtil.copyFile(file,new File(savePath));
|
||||
proProjectInfoSubdeptsUsers.setQrCode(profilePath);
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.BZZ.getCode())){
|
||||
try {
|
||||
String accessToken = wxMaService.getAccessToken();
|
||||
String filePath = DateUtils.datePath()+"/"+System.currentTimeMillis()+".png";
|
||||
String savePath = ProfileConfig.profilePath+"/"+filePath;
|
||||
String profilePath = ProfileConfig.profile+"/"+filePath;
|
||||
log.info("accessToken...{}",accessToken);
|
||||
// 生成二维码
|
||||
File file = wxMaService.getQrcodeService().createQrcode("pages/project_qr/index?SIGID=4&QRPID="+proProjectInfoSubdeptsUsers.getProjectId()+"&PARID="+proProjectInfoSubdeptsUsers.getId(),280);
|
||||
FileUtil.copyFile(file,new File(savePath));
|
||||
proProjectInfoSubdeptsUsers.setQrCode(profilePath);
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
uniService.syncUniUser(proProjectInfoSubdeptsUsers,true);
|
||||
}
|
||||
return proProjectInfoSubdeptsUsers;
|
||||
}
|
||||
|
||||
|
@ -494,7 +551,6 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
|
|||
@Override
|
||||
public int updateProProjectInfoSubdeptsUsers(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers)
|
||||
{
|
||||
|
||||
// 参建单位信息
|
||||
ProProjectInfoSubdepts subDepts = proProjectInfoSubdeptsMapper.selectProProjectInfoSubdeptsById(proProjectInfoSubdeptsUsers.getSubDeptId());
|
||||
proProjectInfoSubdeptsUsers.setSubDeptType(subDepts.getSubDeptType());
|
||||
|
@ -637,7 +693,7 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
|
|||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public ProProjectInfoSubdeptsUsers updateProProjectInfoSubdeptsUsersWX(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers)
|
||||
public ProProjectInfoSubdeptsUsers updateProProjectInfoSubdeptsUsersWX(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers,boolean isSign)
|
||||
{
|
||||
ProProjectInfoSubdeptsUsers parUsers = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersById(proProjectInfoSubdeptsUsers.getParId());
|
||||
if(Objects.isNull(parUsers)){
|
||||
|
|
|
@ -621,6 +621,23 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
userRole.setUserId(info.getUserId());
|
||||
userRole.setDeptId(user.getDeptId());
|
||||
userRoleMapper.deleteUserRoleByUserRole(userRole);
|
||||
try {
|
||||
List<SysUserRole> sysUserRoleList = new ArrayList<>();
|
||||
SysUserRole newUserRole = new SysUserRole();
|
||||
newUserRole.setDeptId(user.getDeptId());
|
||||
List<SysRole> list = roleMapper.findDeptRoleListByDeptIdAndKey(user.getDeptId(),UserTypeEnums.FBLWRY.getKeys()+"_"+user.getDeptId());
|
||||
if(StringUtils.isEmpty(list)){
|
||||
//新增单位角色...
|
||||
Long roleId = insertDeptSysRole(UserTypeEnums.FBLWRY.getInfo(),UserTypeEnums.FBLWRY.getKeys()+"_"+user.getDeptId(),user.getDeptId());
|
||||
newUserRole.setRoleId(roleId);
|
||||
}else{
|
||||
newUserRole.setRoleId(list.get(0).getRoleId());
|
||||
}
|
||||
sysUserRoleList.add(newUserRole);
|
||||
userRoleMapper.batchUserRole(sysUserRoleList);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return info.getUserId();
|
||||
}
|
||||
|
||||
|
|
|
@ -116,3 +116,30 @@ export function editApproveStatus(proUserId) {
|
|||
data: {}
|
||||
})
|
||||
}
|
||||
|
||||
// 查询参建单位列表
|
||||
export function subdeptsList(query) {
|
||||
return request({
|
||||
url: '/manage/proProjectInfoSubdepts/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 统计参建单位列表
|
||||
export function subdeptsCount(query) {
|
||||
return request({
|
||||
url: '/manage/proProjectInfoSubdepts/findWxCount',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 管理人员新增参建单位信息
|
||||
export function registerSubDeptsGL(data) {
|
||||
return request({
|
||||
url: '/manage/proProjectInfoSubdepts/registerSubDepts',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
|
|
@ -23,7 +23,16 @@
|
|||
"pages/project_problemmodify/modify/index",
|
||||
"pages/project_problemmodify/check/index",
|
||||
"pages/project_problemmodify/add/index",
|
||||
"pages/project_problemmodify/draft/index"
|
||||
"pages/project_problemmodify/draft/index",
|
||||
"pages/project_subdepts/list/index",
|
||||
"pages/project_subdepts/add/index",
|
||||
"pages/project_subdepts/info/index",
|
||||
"pages/project_subgroups/list/index",
|
||||
"pages/project_subgroups/add/index",
|
||||
"pages/project_subgroups/info/index",
|
||||
"pages/project_subusers/list/index",
|
||||
"pages/project_subusers/add/index",
|
||||
"pages/project_subusers/info/index"
|
||||
],
|
||||
"usingComponents": {
|
||||
"van-row": "@vant/weapp/row",
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<view class="rectifier_list">
|
||||
<view class="rectifier_list_height">
|
||||
<view wx:for="{{rectifierData}}" wx:key="index" data-index="{{index}}">
|
||||
<view class="rectifier_list-group_for"><text class="modify_eharts_title_1">{{item.subDeptName}}</text><text wx:if="{{item.subDeptTypeName}}" style="font-size: small; color: antiquewhite;"> [{{item.subDeptTypeName}}]</text></view>
|
||||
<view class="rectifier_list-group_for"><text class="modify_eharts_title_1">{{item.subDeptName}}</text><text wx:if="{{item.subDeptTypeName}}" style="font-size: small; color: #ff711e;"> [{{item.subDeptTypeName}}]</text></view>
|
||||
<view class="rectifier_list_for" wx:for="{{item.userList}}" wx:for-item="items" wx:for-index="index_i" wx:key="index_i" data-index="{{index+'_'+index_i}}" bindtap="onSelected">
|
||||
<view class="rectifier_list_radio">
|
||||
<view class="rectifier_list_radio_circle {{items.state?'active':''}}">
|
||||
|
|
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 704 B |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 1.9 KiB |
|
@ -315,7 +315,7 @@ Page({
|
|||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
/*关闭当前页面,跳转到其它页面。*/
|
||||
if (wx.getStorageSync('nav-types') == "depts") {
|
||||
wx.redirectTo({
|
||||
url: '../subDepts/index',
|
||||
|
|
|
@ -561,7 +561,7 @@ Page({
|
|||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
/*关闭当前页面,跳转到其它页面。*/
|
||||
wx.redirectTo({
|
||||
url: '../await/index',
|
||||
})
|
||||
|
|
|
@ -82,7 +82,7 @@ Page({
|
|||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
/*关闭当前页面,跳转到其它页面。*/
|
||||
wx.redirectTo({
|
||||
url: '../../index/index',
|
||||
})
|
||||
|
|
|
@ -490,7 +490,7 @@ Page({
|
|||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
/*关闭当前页面,跳转到其它页面。*/
|
||||
wx.redirectTo({
|
||||
url: '../myFlowDefinition/index',
|
||||
})
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
</view>
|
||||
<view class="inspect_info_list" style="width: 100%;">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">申请图片
|
||||
<text style="font-size: small; color: antiquewhite;">[其它格式文件请截图上传或电脑端上传]</text>
|
||||
<text style="font-size: small; color: #ff711e;">[其它格式文件请截图上传或电脑端上传]</text>
|
||||
</view>
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="fileUpload" limit="{{limit}}"></file-uploader>
|
||||
|
|
|
@ -61,7 +61,7 @@ Page({
|
|||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
/*关闭当前页面,跳转到其它页面。*/
|
||||
wx.redirectTo({
|
||||
url: '../../index/index',
|
||||
})
|
||||
|
|
|
@ -167,7 +167,7 @@ Page({
|
|||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
/*关闭当前页面,跳转到其它页面。*/
|
||||
wx.redirectTo({
|
||||
url: '../../index/index',
|
||||
})
|
||||
|
|
|
@ -68,7 +68,7 @@ Page({
|
|||
onLoad(options) {
|
||||
if (!getToken()) {
|
||||
wx.redirectTo({
|
||||
url: '../../login/login',
|
||||
url: '../../../login/login',
|
||||
})
|
||||
}
|
||||
const proUserInfo = getUserInfo();
|
||||
|
|
|
@ -43,7 +43,7 @@ Page({
|
|||
onLoad(options) {
|
||||
if (!getToken()) {
|
||||
wx.redirectTo({
|
||||
url: '../../login/login',
|
||||
url: '../../../login/login',
|
||||
})
|
||||
}
|
||||
this.setData({
|
||||
|
|
|
@ -57,7 +57,7 @@ Page({
|
|||
onLoad(options) {
|
||||
if (!getToken()) {
|
||||
wx.redirectTo({
|
||||
url: '../../login/login',
|
||||
url: '../../../login/login',
|
||||
})
|
||||
}
|
||||
const proUserInfo = getUserInfo();
|
||||
|
|
|
@ -43,7 +43,7 @@ Page({
|
|||
onLoad(options) {
|
||||
if (!getToken()) {
|
||||
wx.redirectTo({
|
||||
url: '../../login/login',
|
||||
url: '../../../login/login',
|
||||
})
|
||||
}
|
||||
const proUserInfo = getUserInfo();
|
||||
|
@ -175,7 +175,7 @@ Page({
|
|||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
/*关闭当前页面,跳转到其它页面。*/
|
||||
wx.redirectTo({
|
||||
url: `../list/index?type=${this.data.type}`,
|
||||
})
|
||||
|
|
|
@ -51,7 +51,7 @@ Page({
|
|||
onLoad(options) {
|
||||
if (!getToken()) {
|
||||
wx.redirectTo({
|
||||
url: '../../login/login',
|
||||
url: '../../../login/login',
|
||||
})
|
||||
}
|
||||
const proUserInfo = getUserInfo();
|
||||
|
@ -151,7 +151,7 @@ Page({
|
|||
/**
|
||||
* 标签切换
|
||||
*/
|
||||
trainingTypeJump(e) {
|
||||
trainJump(e) {
|
||||
let index = e.currentTarget.dataset.index;
|
||||
let nav = "";
|
||||
if (index == 1) {
|
||||
|
@ -190,7 +190,7 @@ Page({
|
|||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
/*关闭当前页面,跳转到其它页面。*/
|
||||
if (wx.getStorageSync('nav-menu') == "xmgl") {
|
||||
wx.redirectTo({
|
||||
url: '../../project_more/index',
|
||||
|
@ -208,15 +208,6 @@ Page({
|
|||
}
|
||||
},
|
||||
|
||||
//项目切换 返回值
|
||||
onProjectSelect(e) {
|
||||
let projectId = e.detail.id;
|
||||
let projectName = e.detail.text;
|
||||
app.globalData.projectId = projectId;
|
||||
app.globalData.projectName = projectName;
|
||||
this.onLoad();
|
||||
},
|
||||
|
||||
onScrollToLower() {
|
||||
let nal = Math.ceil(this.data.total / this.data.pageSize);
|
||||
if (this.data.pageNum < nal) {
|
||||
|
|
|
@ -15,17 +15,17 @@
|
|||
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
|
||||
<view wx:if="{{projectUserInfo.subDeptType!='1'}}" class="modify_video_nav" style="margin-top: 5rpx;">
|
||||
<view class="{{activeState=='dzg'?'active':''}}" bindtap="trainingTypeJump" data-index="1"><text>待整改({{dzgCount}})</text></view>
|
||||
<view class="{{activeState=='yzg'?'active':''}}" bindtap="trainingTypeJump" data-index="2"><text>已整改({{yzgCount}})</text></view>
|
||||
<view class="{{activeState=='dzg'?'active':''}}" bindtap="trainJump" data-index="1"><text>待整改({{dzgCount}})</text></view>
|
||||
<view class="{{activeState=='yzg'?'active':''}}" bindtap="trainJump" data-index="2"><text>已整改({{yzgCount}})</text></view>
|
||||
</view>
|
||||
<view wx:if="{{projectUserInfo.subDeptType=='1'}}" class="modify_video_nav" style="margin-top: 5rpx;">
|
||||
<view class="{{activeState=='dfj'?'active':''}}" bindtap="trainingTypeJump" data-index="3"><text>待复检({{dfjCount}})</text></view>
|
||||
<view class="{{activeState=='dzg'?'active':''}}" bindtap="trainingTypeJump" data-index="4"><text>待整改({{dzgCount}})</text></view>
|
||||
<view class="{{activeState=='ywc'?'active':''}}" bindtap="trainingTypeJump" data-index="5"><text>已完成({{ywcCount}})</text></view>
|
||||
<view class="{{activeState=='dfj'?'active':''}}" bindtap="trainJump" data-index="3"><text>待复检({{dfjCount}})</text></view>
|
||||
<view class="{{activeState=='dzg'?'active':''}}" bindtap="trainJump" data-index="4"><text>待整改({{dzgCount}})</text></view>
|
||||
<view class="{{activeState=='ywc'?'active':''}}" bindtap="trainJump" data-index="5"><text>已完成({{ywcCount}})</text></view>
|
||||
</view>
|
||||
<view class="inspect_max_scroll">
|
||||
<!--专项检查样式zxjc-->
|
||||
<view class="inspect_for_scroll {{item.problemType=='2'?'':''}}" v-if="{{ listData.length>0 }}" wx:for="{{listData}}" wx:key="index" data-set="{{item}}" bindtap="getInfo">
|
||||
<view class="inspect_for_scroll" v-if="{{ listData.length>0 }}" wx:for="{{listData}}" wx:key="index" data-set="{{item}}" bindtap="getInfo">
|
||||
<view class="inspect_for_bgd">
|
||||
<view class="inspect_list_title">
|
||||
<view class="inspect_list_title_label inspect_list_title_width">
|
||||
|
|
|
@ -43,7 +43,7 @@ Page({
|
|||
onLoad(options) {
|
||||
if (!getToken()) {
|
||||
wx.redirectTo({
|
||||
url: '../../login/login',
|
||||
url: '../../../login/login',
|
||||
})
|
||||
}
|
||||
this.setData({
|
||||
|
|
|
@ -1429,7 +1429,7 @@ Page({
|
|||
app.toast("请填写合同约定的承包范围!");
|
||||
return false;
|
||||
}
|
||||
if (!form.startWorkDates) {
|
||||
if (!form.useDates) {
|
||||
app.toast("请选择进入场地时间!");
|
||||
return false;
|
||||
}
|
||||
|
@ -2057,55 +2057,18 @@ Page({
|
|||
* 重新登记
|
||||
*/
|
||||
wxSignBack() {
|
||||
let title = "";
|
||||
let _userPostList = [];
|
||||
let sigId = this.data.form.userPost;
|
||||
if (sigId == '1') {
|
||||
title = "参建单位信息登记";
|
||||
_userPostList.push({
|
||||
"id": "1",
|
||||
"text": "委托代理人"
|
||||
});
|
||||
} else if (sigId == '2' || sigId == '3') {
|
||||
if (sigId == '2') {
|
||||
_userPostList.push({
|
||||
"id": "2",
|
||||
"text": "项目经理"
|
||||
});
|
||||
} else {
|
||||
_userPostList.push({
|
||||
"id": "3",
|
||||
"text": "班组长"
|
||||
});
|
||||
_userPostList.push({
|
||||
"id": "5",
|
||||
"text": "特殊工种"
|
||||
});
|
||||
_userPostList.push({
|
||||
"id": "6",
|
||||
"text": "材料员"
|
||||
});
|
||||
_userPostList.push({
|
||||
"id": "8",
|
||||
"text": "安全员"
|
||||
});
|
||||
}
|
||||
title = "参建单位管理人员信息登记";
|
||||
} else if (sigId == '4') {
|
||||
title = "参建单位劳务人员信息登记";
|
||||
_userPostList.push({
|
||||
"id": "4",
|
||||
"text": "劳务人员"
|
||||
});
|
||||
this.setData({
|
||||
"form.craftType": '1'
|
||||
});
|
||||
}
|
||||
let _form = {
|
||||
subDeptType: null,
|
||||
craftType: null,
|
||||
craftPost: null,
|
||||
leaderDegreeGrade: null,
|
||||
userInfos: {},
|
||||
degreeGrade: null
|
||||
};
|
||||
this.setData({
|
||||
title,
|
||||
form:_form,
|
||||
active: 0,
|
||||
"parForm.subDeptName": this.data.form.subDeptName,
|
||||
userPostList: _userPostList,
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="markers inspect_info_title">营业执照副本
|
||||
<text style="font-size: small; color: antiquewhite;">[有效期内的清晰扫描照片]</text>
|
||||
<text style="font-size: small; color: #ff711e;">[有效期内的清晰扫描照片]</text>
|
||||
</view>
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="fileUpload0" limit="{{limit}}" fileUrlArray="{{form.businessLicensePath}}"></file-uploader>
|
||||
|
@ -128,7 +128,7 @@
|
|||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="markers inspect_info_title">代理人半身照
|
||||
<text style="font-size: small; color: antiquewhite;">[进场扫脸,请上传清晰照片]</text>
|
||||
<text style="font-size: small; color: #ff711e;">[进场扫脸,请上传清晰照片]</text>
|
||||
</view>
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="fileUpload5" limit="{{limit}}" fileUrlArray="{{form.leaderUserPicture}}"></file-uploader>
|
||||
|
@ -136,7 +136,7 @@
|
|||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="markers inspect_info_title">代理人委托书
|
||||
<text style="font-size: small; color: antiquewhite;">[需加盖劳务单位的公章委托书照片]</text>
|
||||
<text style="font-size: small; color: #ff711e;">[需加盖劳务单位的公章委托书照片]</text>
|
||||
</view>
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="fileUpload6" limit="{{limit}}" fileUrlArray="{{form.subDeptLeaderPowerPath}}"></file-uploader>
|
||||
|
@ -246,7 +246,7 @@
|
|||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="markers inspect_info_title">个人半身近照
|
||||
<text style="font-size: small; color: antiquewhite;">[进场扫脸,请上传清晰照片]</text>
|
||||
<text style="font-size: small; color: #ff711e;">[进场扫脸,请上传清晰照片]</text>
|
||||
</view>
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="fileUploadUserPicture" limit="{{limit}}" fileUrlArray="{{form.userPicture}}"></file-uploader>
|
||||
|
@ -254,7 +254,7 @@
|
|||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="markers inspect_info_title">劳务单位委托书
|
||||
<text style="font-size: small; color: antiquewhite;">[需加盖劳务单位的公章委托书照片]</text>
|
||||
<text style="font-size: small; color: #ff711e;">[需加盖劳务单位的公章委托书照片]</text>
|
||||
</view>
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="fileUploadDeptPower" limit="{{limit}}" fileUrlArray="{{form.subDeptPowerPath}}"></file-uploader>
|
||||
|
@ -389,7 +389,7 @@
|
|||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="markers inspect_info_title">半身近照
|
||||
<text style="font-size: small; color: antiquewhite;">[进场扫脸,请上传清晰照片]</text>
|
||||
<text style="font-size: small; color: #ff711e;">[进场扫脸,请上传清晰照片]</text>
|
||||
</view>
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="fileUploadUserPicture" limit="{{limit}}" fileUrlArray="{{form.userPicture}}"></file-uploader>
|
||||
|
@ -397,7 +397,7 @@
|
|||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{userPost=='6'}}">
|
||||
<view class="markers inspect_info_title">劳务单位委托书
|
||||
<text style="font-size: small; color: antiquewhite;">[需加盖劳务单位的公章委托书照片]</text>
|
||||
<text style="font-size: small; color: #ff711e;">[需加盖劳务单位的公章委托书照片]</text>
|
||||
</view>
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="fileUploadDeptPower" limit="{{limit}}" fileUrlArray="{{form.subDeptPowerPath}}"></file-uploader>
|
||||
|
@ -459,7 +459,7 @@
|
|||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{userPost=='5'}}">
|
||||
<view class="inspect_info_title">开户银行网点
|
||||
<text style="font-size: small; color: antiquewhite;">[开户银行地址]</text>
|
||||
<text style="font-size: small; color: #ff711e;">[开户银行地址]</text>
|
||||
</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写开户银行网点" placeholder-style="color:#6777aa;" bindinput="inputBankOffice" class="inspect_input_fill_in" maxlength="30" model:value="{{form.bankOffice}}" />
|
||||
|
@ -533,7 +533,7 @@
|
|||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="markers inspect_info_title">个人半身近照
|
||||
<text style="font-size: small; color: antiquewhite;">[进场扫脸,请上传清晰照片]</text>
|
||||
<text style="font-size: small; color: #ff711e;">[进场扫脸,请上传清晰照片]</text>
|
||||
</view>
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="fileUploadUserPicture" limit="{{limit}}" fileUrlArray="{{form.userPicture}}"></file-uploader>
|
||||
|
@ -595,7 +595,7 @@
|
|||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title">开户银行网点
|
||||
<text style="font-size: small; color: antiquewhite;">[开户银行地址]</text>
|
||||
<text style="font-size: small; color: #ff711e;">[开户银行地址]</text>
|
||||
</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写开户银行网点" placeholder-style="color:#6777aa;" bindinput="inputBankOffice" class="inspect_input_fill_in" maxlength="30" model:value="{{form.bankOffice}}" />
|
||||
|
@ -908,7 +908,7 @@
|
|||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="markers inspect_info_title">3、受教育本人签名
|
||||
<text style="font-size: small; color: antiquewhite;">[点击签名进行修改]</text>
|
||||
<text style="font-size: small; color: #ff711e;">[点击签名进行修改]</text>
|
||||
</view>
|
||||
<view class="inspect_info_content">
|
||||
<sign bind:returnData="sign" canvasId="canvas" class="myCanvas"></sign>
|
||||
|
|
|
@ -0,0 +1,743 @@
|
|||
import config from '../../../config'
|
||||
import {
|
||||
getToken
|
||||
} from '../../../utils/auth'
|
||||
import {
|
||||
findDictCache,
|
||||
findCardOcrFront
|
||||
} from '../../../api/publics'
|
||||
import {
|
||||
registerSubDeptsGL
|
||||
} from '../../../api/project'
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
limit: 1,
|
||||
maxDate: new Date(2088, 1, 1).getTime(),
|
||||
form: {
|
||||
subDeptType: "3",
|
||||
subDeptName: "",
|
||||
subDeptCode: "",
|
||||
businessLicensePath: "",
|
||||
subDeptInfos: {
|
||||
legalPersonCardImgPos: "",
|
||||
legalPersonCardImgInv: "",
|
||||
legalPerson: "",
|
||||
legalPersonCard: ""
|
||||
},
|
||||
contractInfos: "",
|
||||
useDates: "",
|
||||
startWorkDates: "",
|
||||
endWorkDates: "",
|
||||
leaderCardImgPos: "",
|
||||
leaderCardImgInv: "",
|
||||
leaderUserPicture: "",
|
||||
subDeptLeaderPowerPath: "",
|
||||
subDeptLeaderName: "",
|
||||
subDeptLeaderCode: "",
|
||||
subDeptLeaderPhone: "",
|
||||
nation: "",
|
||||
nativePlace: "",
|
||||
address: "",
|
||||
emergencyContact: "",
|
||||
contactPhone: "",
|
||||
leaderDegreeGrade: ""
|
||||
},
|
||||
eduCationalType: [],
|
||||
subDeptTypeList: [],
|
||||
active: 0,
|
||||
flowNodes: [{
|
||||
text: '信息登记'
|
||||
}, {
|
||||
text: '视频学习'
|
||||
}, {
|
||||
text: '在线考试'
|
||||
}, {
|
||||
text: '文件签署'
|
||||
}],
|
||||
loadShow: false,
|
||||
imgBase: config.baseImgUrl,
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
if (!getToken()) {
|
||||
wx.redirectTo({
|
||||
url: '../../../login/login',
|
||||
})
|
||||
}
|
||||
this.setData({
|
||||
"form.projectId": app.globalData.useProjectId,
|
||||
"form.projectName": app.globalData.useProjectName
|
||||
});
|
||||
this.getDictCache();
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取字典缓存数据
|
||||
*/
|
||||
getDictCache() {
|
||||
// 初始化单位类型
|
||||
findDictCache("sub_dept_type").then(res => {
|
||||
if (res.code == 200) {
|
||||
let list = [];
|
||||
res.data.forEach(item => {
|
||||
if (item.dictValue != "1") {
|
||||
list.push({
|
||||
"id": item.dictValue,
|
||||
"text": item.dictLabel
|
||||
});
|
||||
}
|
||||
});
|
||||
this.setData({
|
||||
subDeptTypeList: list
|
||||
});
|
||||
}
|
||||
});
|
||||
// 初始化学历类型
|
||||
findDictCache("educational_type").then(res => {
|
||||
if (res.code == 200) {
|
||||
let eduCationalType = [];
|
||||
res.data.forEach(item => {
|
||||
eduCationalType.push({
|
||||
"id": item.dictValue,
|
||||
"text": item.dictLabel
|
||||
});
|
||||
})
|
||||
this.setData({
|
||||
eduCationalType
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//取消页面
|
||||
cancelSaveView() {
|
||||
this.returnToPage()
|
||||
},
|
||||
|
||||
/**
|
||||
* 委托代理提交参建单位信息
|
||||
*/
|
||||
submitSubDeptValues() {
|
||||
let {
|
||||
form
|
||||
} = this.data;
|
||||
let subDeptInfos = form.subDeptInfos;
|
||||
if (!subDeptInfos) {
|
||||
subDeptInfos = {};
|
||||
}
|
||||
//数据效验
|
||||
if (!form.projectId) {
|
||||
app.toast("数据异常,请刷新页面重试!")
|
||||
return false;
|
||||
}
|
||||
//数据效验
|
||||
if (!form.subDeptType) {
|
||||
app.toast("请选择单位类型!");
|
||||
return false;
|
||||
}
|
||||
if (!form.subDeptName) {
|
||||
app.toast("请填写单位名称!");
|
||||
return false;
|
||||
}
|
||||
if (!form.subDeptCode) {
|
||||
app.toast("请填写单位社会信用代码!");
|
||||
return false;
|
||||
}
|
||||
if (!form.useDates) {
|
||||
app.toast("请选择进入场地时间!");
|
||||
return false;
|
||||
}
|
||||
if (form.subDeptType == "4" || form.subDeptType == "5") {
|
||||
if (!form.businessLicensePath || form.businessLicensePath.length == 0) {
|
||||
app.toast("请上传营业执照副本!");
|
||||
return false;
|
||||
}
|
||||
if (!subDeptInfos.legalPersonCardImgPos || subDeptInfos.legalPersonCardImgPos.length == 0) {
|
||||
app.toast("请上传法人身份证正面照!");
|
||||
return false;
|
||||
}
|
||||
if (!subDeptInfos.legalPersonCardImgInv || subDeptInfos.legalPersonCardImgInv.length == 0) {
|
||||
app.toast("请上传法人身份证反面照!");
|
||||
return false;
|
||||
}
|
||||
if (!subDeptInfos.legalPerson) {
|
||||
app.toast("请填写法人姓名!");
|
||||
return false;
|
||||
}
|
||||
if (!subDeptInfos.legalPersonCard) {
|
||||
app.toast("请填写法人身份证号!");
|
||||
return false;
|
||||
}
|
||||
if (!form.contractInfos) {
|
||||
app.toast("请填写合同约定的承包范围!");
|
||||
return false;
|
||||
}
|
||||
if (!form.startWorkDates) {
|
||||
app.toast("请选择计划开工时间!");
|
||||
return false;
|
||||
}
|
||||
if (!form.endWorkDates) {
|
||||
app.toast("请选择计划完工时间!");
|
||||
return false;
|
||||
}
|
||||
if (!form.leaderCardImgPos || form.leaderCardImgPos.length == 0) {
|
||||
app.toast("请上传委托人身份证正面照!");
|
||||
return false;
|
||||
}
|
||||
if (!form.leaderCardImgInv || form.leaderCardImgInv.length == 0) {
|
||||
app.toast("请上传委托人身份证反面照!");
|
||||
return false;
|
||||
}
|
||||
if (!form.leaderUserPicture || form.leaderUserPicture.length == 0) {
|
||||
app.toast("请上传委托人半身近照!");
|
||||
return false;
|
||||
}
|
||||
if (!form.subDeptLeaderPowerPath || form.subDeptLeaderPowerPath.length == 0) {
|
||||
app.toast("请上传委托人单位委托书!");
|
||||
return false;
|
||||
}
|
||||
if (!form.subDeptLeaderName) {
|
||||
app.toast("请填写委托人姓名!");
|
||||
return false;
|
||||
}
|
||||
if (!form.subDeptLeaderCode) {
|
||||
app.toast("请填写委托人身份证号!");
|
||||
return false;
|
||||
} else {
|
||||
const cardCodePattern = /^[1-9]\d{5}(18|19|20|21|22)?\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|[Xx])$/;
|
||||
if (!cardCodePattern.test(form.subDeptLeaderCode)) {
|
||||
app.toast("身份证号码不正确!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!form.subDeptLeaderPhone) {
|
||||
app.toast("请填写委托人联系电话!");
|
||||
return false;
|
||||
}
|
||||
if (!form.nativePlace) {
|
||||
app.toast("请填写籍贯!");
|
||||
return false;
|
||||
}
|
||||
if (!form.nation) {
|
||||
app.toast("请填写民族!");
|
||||
return false;
|
||||
}
|
||||
if (!form.address) {
|
||||
app.toast("请填写地址!");
|
||||
return false;
|
||||
}
|
||||
if (!form.emergencyContact) {
|
||||
app.toast("请填写紧急联系人!");
|
||||
return false;
|
||||
}
|
||||
if (!form.contactPhone) {
|
||||
app.toast("请填写紧急联系人电话!");
|
||||
return false;
|
||||
} else {
|
||||
const phonePattern = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/;
|
||||
if (!phonePattern.test(form.contactPhone)) {
|
||||
app.toast("紧急联系人电话不正确!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!form.leaderDegreeGrade) {
|
||||
app.toast("请选择委托人学历信息!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
let that = this;
|
||||
//弹出确认
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: '是否确认保存参建单位信息?',
|
||||
success: function (sm) {
|
||||
if (sm.confirm) {
|
||||
that.submitSubDeptForm();
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 委托代理提交参建单位表单
|
||||
*/
|
||||
submitSubDeptForm() {
|
||||
let _form = {
|
||||
...this.data.form
|
||||
};
|
||||
let subDeptInfos = {
|
||||
..._form.subDeptInfos
|
||||
};
|
||||
this.setData({
|
||||
loadShow: true
|
||||
})
|
||||
let uploadFiles = [];
|
||||
if (_form.businessLicensePath && _form.businessLicensePath.length > 0) {
|
||||
uploadFiles.push({
|
||||
type: 'businessLicensePath',
|
||||
path: _form.businessLicensePath[0]
|
||||
});
|
||||
}
|
||||
if (subDeptInfos.legalPersonCardImgPos && subDeptInfos.legalPersonCardImgPos.length > 0) {
|
||||
uploadFiles.push({
|
||||
type: 'legalPersonCardImgPos',
|
||||
path: subDeptInfos.legalPersonCardImgPos[0]
|
||||
});
|
||||
}
|
||||
if (subDeptInfos.legalPersonCardImgInv && subDeptInfos.legalPersonCardImgInv.length > 0) {
|
||||
uploadFiles.push({
|
||||
type: 'legalPersonCardImgInv',
|
||||
path: subDeptInfos.legalPersonCardImgInv[0]
|
||||
});
|
||||
}
|
||||
if (_form.leaderCardImgPos && _form.leaderCardImgPos.length > 0) {
|
||||
uploadFiles.push({
|
||||
type: 'leaderCardImgPos',
|
||||
path: _form.leaderCardImgPos[0]
|
||||
});
|
||||
}
|
||||
if (_form.leaderCardImgInv && _form.leaderCardImgInv.length > 0) {
|
||||
uploadFiles.push({
|
||||
type: 'leaderCardImgInv',
|
||||
path: _form.leaderCardImgInv[0]
|
||||
});
|
||||
}
|
||||
if (_form.leaderUserPicture && _form.leaderUserPicture.length > 0) {
|
||||
uploadFiles.push({
|
||||
type: 'leaderUserPicture',
|
||||
path: _form.leaderUserPicture[0]
|
||||
});
|
||||
}
|
||||
if (_form.subDeptLeaderPowerPath && _form.subDeptLeaderPowerPath.length > 0) {
|
||||
uploadFiles.push({
|
||||
type: 'subDeptLeaderPowerPath',
|
||||
path: _form.subDeptLeaderPowerPath[0]
|
||||
});
|
||||
}
|
||||
let that = this;
|
||||
let uploads = [];
|
||||
uploadFiles.forEach(async (item) => {
|
||||
let obj;
|
||||
if (item.path.indexOf(this.data.imgBase) > -1) {
|
||||
obj = {
|
||||
data: {
|
||||
data: {
|
||||
url: item.path.replace(this.data.imgBase, "")
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
|
||||
obj = await that.syncUploadImage(item.path);
|
||||
}
|
||||
if (item.type == "businessLicensePath") {
|
||||
_form.businessLicensePath = obj.data.data.url;
|
||||
}
|
||||
if (item.type == "legalPersonCardImgPos") {
|
||||
subDeptInfos.legalPersonCardImgPos = obj.data.data.url;
|
||||
}
|
||||
if (item.type == "legalPersonCardImgInv") {
|
||||
subDeptInfos.legalPersonCardImgInv = obj.data.data.url;
|
||||
}
|
||||
if (item.type == "leaderCardImgPos") {
|
||||
_form.leaderCardImgPos = obj.data.data.url;
|
||||
}
|
||||
if (item.type == "leaderCardImgInv") {
|
||||
_form.leaderCardImgInv = obj.data.data.url;
|
||||
}
|
||||
if (item.type == "leaderUserPicture") {
|
||||
_form.leaderUserPicture = obj.data.data.url;
|
||||
}
|
||||
if (item.type == "subDeptLeaderPowerPath") {
|
||||
_form.subDeptLeaderPowerPath = obj.data.data.url;
|
||||
}
|
||||
uploads.push(obj.data.data.url);
|
||||
//验证图片上传完毕
|
||||
if (uploads.length == uploadFiles.length) {
|
||||
_form.subDeptInfos = JSON.stringify(subDeptInfos);
|
||||
let leaderUserInfos = {};
|
||||
leaderUserInfos.nation = _form.nation;
|
||||
leaderUserInfos.nativePlace = _form.nativePlace;
|
||||
leaderUserInfos.address = _form.address;
|
||||
leaderUserInfos.emergencyContact = _form.emergencyContact;
|
||||
leaderUserInfos.contactPhone = _form.contactPhone;
|
||||
leaderUserInfos.cardImgPos = _form.leaderCardImgPos;
|
||||
leaderUserInfos.cardImgInv = _form.leaderCardImgInv;
|
||||
_form.leaderUserInfos = JSON.stringify(leaderUserInfos);
|
||||
registerSubDeptsGL(_form).then(res => {
|
||||
this.setData({
|
||||
loadShow: false
|
||||
});
|
||||
if (res.code == 200) {
|
||||
app.toast("新增数据成功!")
|
||||
setTimeout(() => {
|
||||
wx.redirectTo({
|
||||
url: `../list/index`,
|
||||
})
|
||||
}, 200)
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//选择单位类型
|
||||
onSubDeptType(e) {
|
||||
this.setData({
|
||||
"form.subDeptType": e.detail.id
|
||||
})
|
||||
},
|
||||
|
||||
//填写单位名称
|
||||
onSubDeptName(e) {
|
||||
this.setData({
|
||||
"form.subDeptName": e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
//填写信用代码
|
||||
onSubDeptCode(e) {
|
||||
this.setData({
|
||||
"form.subDeptCode": e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 营业执照副本
|
||||
* @param {*} options
|
||||
*/
|
||||
fileUpload0(options) {
|
||||
let file = options.detail;
|
||||
this.setData({
|
||||
"form.businessLicensePath": file
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 法人身份证正面
|
||||
* @param {*} options
|
||||
*/
|
||||
fileUpload1(options) {
|
||||
let file = options.detail;
|
||||
this.setData({
|
||||
"form.subDeptInfos.legalPersonCardImgPos": file
|
||||
});
|
||||
file.forEach(async (item, idx) => {
|
||||
let obj = await this.syncUploadImage(item);
|
||||
findCardOcrFront(obj.data.data.url).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.setData({
|
||||
"form.subDeptInfos.legalPerson": res.data.name,
|
||||
"form.subDeptInfos.legalPersonCard": res.data.cardId
|
||||
})
|
||||
if (!res.data.name || !res.data.cardId) {
|
||||
this.setData({
|
||||
"form.subDeptInfos.legalPersonCardImgPos": []
|
||||
});
|
||||
app.toast("身份证正面照识别失败!请重新上传");
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 法人身份证反面
|
||||
* @param {*} options
|
||||
*/
|
||||
fileUpload2(options) {
|
||||
let file = options.detail;
|
||||
this.setData({
|
||||
"form.subDeptInfos.legalPersonCardImgInv": file
|
||||
});
|
||||
},
|
||||
|
||||
/** 单位法人姓名 */
|
||||
inputInfoslegalPerson(e) {
|
||||
this.setData({
|
||||
"form.subDeptInfos.legalPerson": e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
/** 单位法人身份证号 */
|
||||
inputInfoslegalPersonCard(e) {
|
||||
this.setData({
|
||||
"form.subDeptInfos.legalPersonCard": e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
/** 进入场地时间 */
|
||||
onInputTime0(e) {
|
||||
this.setData({
|
||||
"form.useDates": e.detail
|
||||
})
|
||||
},
|
||||
|
||||
/** 计划开工时间 */
|
||||
onInputTime1(e) {
|
||||
this.setData({
|
||||
"form.startWorkDates": e.detail
|
||||
})
|
||||
},
|
||||
|
||||
/** 计划完工时间 */
|
||||
onInputTime2(e) {
|
||||
this.setData({
|
||||
"form.endWorkDates": e.detail
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 委托人身份证反面
|
||||
* @param {*} options
|
||||
*/
|
||||
fileUpload3(options) {
|
||||
let file = options.detail;
|
||||
this.setData({
|
||||
"form.leaderCardImgPos": file
|
||||
});
|
||||
file.forEach(async (item, idx) => {
|
||||
let obj = await this.syncUploadImage(item);
|
||||
findCardOcrFront(obj.data.data.url).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.setData({
|
||||
"form.subDeptLeaderName": res.data.name,
|
||||
"form.subDeptLeaderCode": res.data.cardId,
|
||||
"form.nation": res.data.nation,
|
||||
"form.nativePlace": res.data.native,
|
||||
"form.address": res.data.address
|
||||
})
|
||||
if (!res.data.name || !res.data.cardId) {
|
||||
this.setData({
|
||||
"form.leaderCardImgPos": []
|
||||
});
|
||||
app.toast("身份证正面照识别失败!请重新上传");
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 委托人身份证反面
|
||||
* @param {*} options
|
||||
*/
|
||||
fileUpload4(options) {
|
||||
let file = options.detail;
|
||||
this.setData({
|
||||
"form.leaderCardImgInv": file
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 委托人半身照
|
||||
* @param {*} options
|
||||
*/
|
||||
fileUpload5(options) {
|
||||
let file = options.detail;
|
||||
this.setData({
|
||||
"form.leaderUserPicture": file
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 委托人委托书
|
||||
* @param {*} options
|
||||
*/
|
||||
fileUpload6(options) {
|
||||
let file = options.detail;
|
||||
debugger
|
||||
this.setData({
|
||||
"form.subDeptLeaderPowerPath": file
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 输入负责人姓名
|
||||
* @param {*} e
|
||||
*/
|
||||
inputLeaderName(e) {
|
||||
this.setData({
|
||||
"form.subDeptLeaderName": e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 输入负责人身份证号
|
||||
* @param {*} e
|
||||
*/
|
||||
inputLeaderCode(e) {
|
||||
this.setData({
|
||||
"form.subDeptLeaderCode": e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 输入负责人联系电话
|
||||
* @param {*} e
|
||||
*/
|
||||
subDeptLeaderPhone(e) {
|
||||
this.setData({
|
||||
"form.subDeptLeaderPhone": e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 个人籍贯
|
||||
* @param {*} e
|
||||
*/
|
||||
inputOriginNative(e) {
|
||||
this.setData({
|
||||
"form.nativePlace": e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 个人民族
|
||||
* @param {*} e
|
||||
*/
|
||||
inputOriginNation(e) {
|
||||
this.setData({
|
||||
"form.nation": e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 个人籍贯地址
|
||||
* @param {*} e
|
||||
*/
|
||||
inputOriginAddress(e) {
|
||||
this.setData({
|
||||
"form.address": e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 紧急联系人
|
||||
* @param {*} e
|
||||
*/
|
||||
inputUrgentUser(e) {
|
||||
this.setData({
|
||||
"form.emergencyContact": e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 紧急联系人电话
|
||||
* @param {*} e
|
||||
*/
|
||||
inputUrgentUserPhone(e) {
|
||||
this.setData({
|
||||
"form.contactPhone": e.detail.value
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 文化程度
|
||||
* @param {*} e
|
||||
*/
|
||||
onLeaderDegreeGrade(e) {
|
||||
this.setData({
|
||||
"form.leaderDegreeGrade": e.detail.id
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 这里考虑上传图片异步问题,封装为同步
|
||||
*/
|
||||
syncUploadImage(file) {
|
||||
let _baseUrl = config.baseUrl;
|
||||
return new Promise((resolve, reject) => {
|
||||
wx.uploadFile({
|
||||
url: _baseUrl + "/file/upload", // 上传的服务器接口地址
|
||||
filePath: file,
|
||||
header: {
|
||||
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||
'Authorization': 'Bearer ' + getToken()
|
||||
},
|
||||
name: "file", //上传的所需字段,后端提供
|
||||
formData: {},
|
||||
success: (res) => {
|
||||
// 上传完成操作
|
||||
const data = JSON.parse(res.data)
|
||||
resolve({
|
||||
data: data
|
||||
})
|
||||
},
|
||||
fail: (err) => {
|
||||
//上传失败:修改pedding为reject
|
||||
console.log("访问接口失败", err);
|
||||
wx.showToast({
|
||||
title: "网络出错,上传失败",
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
reject(err)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
wx.redirectTo({
|
||||
url: `../list/index?type=${this.data.type}`
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-steps": "@vant/weapp/steps/index",
|
||||
"van-notice-bar": "@vant/weapp/notice-bar/index",
|
||||
"van-overlay": "@vant/weapp/overlay/index"
|
||||
},
|
||||
"navigationStyle": "custom"
|
||||
}
|
|
@ -0,0 +1,204 @@
|
|||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage">
|
||||
<image src="/images/left.png"></image>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="15">
|
||||
<view class="header_name">新增参建单位</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
|
||||
<view class="inspect_info">
|
||||
<view class="module_title_2 module_title_padding">
|
||||
<view>{{form.projectName}}</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="markers inspect_info_title">单位类型</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-select columns="{{subDeptTypeList}}" placeholder="请选择单位企业类型" bindchange="onSubDeptType" selectValue="{{form.subDeptType}}"></voucher-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="markers inspect_info_title">单位名称</view>
|
||||
<view class="inspect_info_content">
|
||||
<textarea class="add_textarea" placeholder="请填写单位名称" model:value="{{form.subDeptName}}" placeholder-style="color:#6777aa;" maxlength="64" bindblur="onSubDeptName" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="markers inspect_info_title">社会信用代码</view>
|
||||
<view class="inspect_info_content">
|
||||
<textarea class="add_textarea" placeholder="请填写社会信用代码" model:value="{{form.subDeptCode}}" placeholder-style="color:#6777aa;" maxlength="64" bindblur="onSubDeptCode" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{form.subDeptType=='4' || form.subDeptType=='5'}}">
|
||||
<view class="markers inspect_info_title">营业执照副本
|
||||
<text style="font-size: small; color: #ff711e;">[有效期内的清晰扫描照片]</text>
|
||||
</view>
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="fileUpload0" limit="{{limit}}" fileUrlArray="{{form.businessLicensePath}}"></file-uploader>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{form.subDeptType=='4' || form.subDeptType=='5'}}">
|
||||
<van-row>
|
||||
<van-col span="12">
|
||||
<view class="markers inspect_info_title">法人身份证正面
|
||||
</view>
|
||||
<view class="inspect_info_content" style="margin-left: 10px;">
|
||||
<file-uploader bindimages="fileUpload1" iconClass="in-zcard-click" limit="{{limit}}" fileUrlArray="{{form.subDeptInfos.legalPersonCardImgPos}}"></file-uploader>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<view class="markers inspect_info_title">法人身份证反面
|
||||
</view>
|
||||
<view class="inspect_info_content" style="margin-left: 10px;">
|
||||
<file-uploader bindimages="fileUpload2" iconClass="in-fcard-click" limit="{{limit}}" fileUrlArray="{{form.subDeptInfos.legalPersonCardImgInv}}"></file-uploader>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{form.subDeptType=='4' || form.subDeptType=='5'}}">
|
||||
<view class="markers inspect_info_title">法定代表人姓名</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写法定代表人姓名" placeholder-style="color:#6777aa;" model:value="{{form.subDeptInfos.legalPerson}}" disabled bindinput="inputInfoslegalPerson" class="inspect_input_fill_in" maxlength="30" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{form.subDeptType=='4' || form.subDeptType=='5'}}">
|
||||
<view class="markers inspect_info_title">法定代表人身份证号</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写法定代表人身份证号" placeholder-style="color:#6777aa;" model:value="{{form.subDeptInfos.legalPersonCard}}" disabled bindinput="inputInfoslegalPersonCard" class="inspect_input_fill_in" maxlength="30" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{form.subDeptType=='4' || form.subDeptType=='5'}}">
|
||||
<view class="markers inspect_info_title">合同约定的承包范围</view>
|
||||
<view class="inspect_info_content">
|
||||
<textarea class="add_textarea" placeholder="请填写合同约定的承包范围" model:value="{{form.contractInfos}}" placeholder-style="color:#6777aa;" bindblur="inputContractInfos" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="markers inspect_info_title">进入场地时间</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-date counts="5" maxDate="{{maxDate}}" placeholder="请选择进入场地时间" time="{{form.useDates}}" bindchange="onInputTime0"></voucher-date>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{form.subDeptType=='4' || form.subDeptType=='5'}}">
|
||||
<view class="markers inspect_info_title">计划开工时间</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-date counts="5" maxDate="{{maxDate}}" placeholder="请选择计划开工时间" time="{{form.startWorkDates}}" bindchange="onInputTime1"></voucher-date>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{form.subDeptType=='4' || form.subDeptType=='5'}}">
|
||||
<view class="markers inspect_info_title">计划完工时间</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-date counts="5" maxDate="{{maxDate}}" placeholder="请选择计划完工时间" time="{{form.endWorkDates}}" bindchange="onInputTime2"></voucher-date>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{form.subDeptType=='4' || form.subDeptType=='5'}}">
|
||||
<van-row>
|
||||
<van-col span="12">
|
||||
<view class="markers inspect_info_title">代理人证件正面
|
||||
</view>
|
||||
<view class="inspect_info_content" style="margin-left: 10px;">
|
||||
<file-uploader bindimages="fileUpload3" iconClass="in-zcard-click" limit="{{limit}}" fileUrlArray="{{form.leaderCardImgPos}}"></file-uploader>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="12">
|
||||
<view class="markers inspect_info_title">代理人证件反面
|
||||
</view>
|
||||
<view class="inspect_info_content" style="margin-left: 10px;">
|
||||
<file-uploader bindimages="fileUpload4" iconClass="in-fcard-click" limit="{{limit}}" fileUrlArray="{{form.leaderCardImgInv}}"></file-uploader>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{form.subDeptType=='4' || form.subDeptType=='5'}}">
|
||||
<view class="markers inspect_info_title">代理人半身照
|
||||
<text style="font-size: small; color: #ff711e;">[进场扫脸,请上传清晰照片]</text>
|
||||
</view>
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="fileUpload5" limit="{{limit}}" fileUrlArray="{{form.leaderUserPicture}}"></file-uploader>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{form.subDeptType=='4' || form.subDeptType=='5'}}">
|
||||
<view class="markers inspect_info_title">代理人委托书
|
||||
<text style="font-size: small; color: #ff711e;">[需加盖劳务单位的公章委托书照片]</text>
|
||||
</view>
|
||||
<view class="inspect_info_content">
|
||||
<file-uploader bindimages="fileUpload6" limit="{{limit}}" fileUrlArray="{{form.subDeptLeaderPowerPath}}"></file-uploader>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{form.subDeptType=='4' || form.subDeptType=='5'}}">
|
||||
<view class="markers inspect_info_title">委托代理人姓名</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写委托代理人姓名" placeholder-style="color:#6777aa;" model:value="{{form.subDeptLeaderName}}" disabled bindinput="inputLeaderName" class="inspect_input_fill_in" maxlength="30" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{form.subDeptType=='4' || form.subDeptType=='5'}}">
|
||||
<view class="markers inspect_info_title">委托代理人身份证号</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写委托代理人身份证号" placeholder-style="color:#6777aa;" model:value="{{form.subDeptLeaderCode}}" disabled bindinput="inputLeaderCode" class="inspect_input_fill_in" maxlength="30" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{form.subDeptType=='4' || form.subDeptType=='5'}}">
|
||||
<view class="markers inspect_info_title">委托代理人联系电话</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写委托代理人联系电话" placeholder-style="color:#6777aa;" bindinput="subDeptLeaderPhone" model:value="{{form.subDeptLeaderPhone}}" class="inspect_input_fill_in" maxlength="30" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{form.subDeptType=='4' || form.subDeptType=='5'}}">
|
||||
<view class="markers inspect_info_title">民族</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写民族" placeholder-style="color:#6777aa;" bindinput="inputOriginNation" class="inspect_input_fill_in" disabled maxlength="30" model:value="{{form.nation}}" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{form.subDeptType=='4' || form.subDeptType=='5'}}">
|
||||
<view class="markers inspect_info_title">籍贯</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写籍贯" placeholder-style="color:#6777aa;" bindinput="inputOriginNative" class="inspect_input_fill_in" disabled maxlength="30" model:value="{{form.nativePlace}}" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{form.subDeptType=='4' || form.subDeptType=='5'}}">
|
||||
<view class="markers inspect_info_title">地址</view>
|
||||
<view class="inspect_info_content">
|
||||
<textarea class="add_textarea" placeholder="请填写地址" placeholder-style="color:#6777aa;" maxlength="64" disabled bindblur="inputOriginAddress" model:value="{{form.address}}" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{form.subDeptType=='4' || form.subDeptType=='5'}}">
|
||||
<view class="markers inspect_info_title">紧急联系人</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写紧急联系人" placeholder-style="color:#6777aa;" bindinput="inputUrgentUser" class="inspect_input_fill_in" model:value="{{form.emergencyContact}}" maxlength="30" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{form.subDeptType=='4' || form.subDeptType=='5'}}">
|
||||
<view class="markers inspect_info_title">紧急联系人电话</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写紧急联系人电话" placeholder-style="color:#6777aa;" bindinput="inputUrgentUserPhone" class="inspect_input_fill_in" model:value="{{form.contactPhone}}" maxlength="11" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{form.subDeptType=='4' || form.subDeptType=='5'}}">
|
||||
<view class="markers inspect_info_title">代理人文化程度</view>
|
||||
<view class="inspect_info_content">
|
||||
<voucher-select columns="{{eduCationalType}}" placeholder="请选择代理人文化程度" bindchange="onLeaderDegreeGrade" selectValue="{{form.leaderDegreeGrade}}"></voucher-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="safety_inspect_title module_title_flex">
|
||||
<text class="color_orange">添加的单位信息不进入审核流程、添加后立即生效。</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="problem_submit_to">
|
||||
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="submitSubDeptValues">提交保存</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<van-overlay show="{{loadShow}}">
|
||||
<view class="gif">
|
||||
<image src="/images/loding.gif"></image>
|
||||
<view>数据处理中!请稍后...</view>
|
||||
</view>
|
||||
</van-overlay>
|
|
@ -0,0 +1,11 @@
|
|||
.van-steps {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.van-step--horizontal .van-step__circle-container {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.van-steps--horizontal {
|
||||
padding: 10px 20px !important;
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
// pages/project_subdepts/info/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"usingComponents": {}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
<!--pages/project_subdepts/info/index.wxml-->
|
||||
<text>pages/project_subdepts/info/index.wxml</text>
|
|
@ -0,0 +1 @@
|
|||
/* pages/project_subdepts/info/index.wxss */
|
|
@ -0,0 +1,211 @@
|
|||
import {
|
||||
getToken
|
||||
} from '../../../utils/auth'
|
||||
import {
|
||||
subdeptsList,
|
||||
subdeptsCount
|
||||
} from '../../../api/project'
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
addFlag: false,
|
||||
initData: {},
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
listData: [],
|
||||
activeState: "0",
|
||||
yrcCount: 0,
|
||||
ylcCount: 0
|
||||
},
|
||||
|
||||
//项目切换 返回值
|
||||
onProjectSelect(e) {
|
||||
let projectId = e.detail.id;
|
||||
let projectName = e.detail.text;
|
||||
app.globalData.useProjectId = projectId;
|
||||
app.globalData.useProjectName = projectName;
|
||||
this.onLoad();
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
if (!getToken()) {
|
||||
wx.redirectTo({
|
||||
url: '../../../login/login',
|
||||
})
|
||||
}
|
||||
this.setData({
|
||||
addFlag: true,
|
||||
initData: {
|
||||
id: app.globalData.useProjectId,
|
||||
text: app.globalData.useProjectName,
|
||||
},
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
listData: [],
|
||||
total: 0
|
||||
});
|
||||
//获取数据列表
|
||||
this.getListData();
|
||||
this.getListCount();
|
||||
},
|
||||
|
||||
/**
|
||||
* 添加按钮
|
||||
*/
|
||||
skipAdd() {
|
||||
wx.redirectTo({
|
||||
url: `../add/index`,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取详情
|
||||
* @param {*} e
|
||||
*/
|
||||
getInfo(e) {
|
||||
let {
|
||||
id
|
||||
} = e.currentTarget.dataset.set
|
||||
wx.redirectTo({
|
||||
url: `../info/index&id=${id}`,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询数据列表
|
||||
*/
|
||||
getListData() {
|
||||
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&useStatus=" + this.data.activeState + "&activeTags=finished";
|
||||
subdeptsList(params).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.setData({
|
||||
total: res.total,
|
||||
listData: this.data.listData.concat(res.rows)
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 统计数据列表
|
||||
*/
|
||||
getListCount() {
|
||||
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&activeTags=finished";
|
||||
subdeptsCount(params).then(res => {
|
||||
if (res.code == 200) {
|
||||
let _yrc = 0,
|
||||
_ylc = 0;
|
||||
res.data.forEach(item => {
|
||||
if (item.useStatus == "0") {
|
||||
_yrc = item.total;
|
||||
} else {
|
||||
_ylc = item.total;
|
||||
}
|
||||
});
|
||||
this.setData({
|
||||
yrcCount: _yrc,
|
||||
ylcCount: _ylc
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 标签切换
|
||||
*/
|
||||
trainJump(e) {
|
||||
let index = e.currentTarget.dataset.index;
|
||||
let nav = "";
|
||||
if (index == 1) {
|
||||
nav = '0';
|
||||
} else {
|
||||
nav = '1';
|
||||
}
|
||||
this.setData({
|
||||
activeState: nav,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
listData: [],
|
||||
});
|
||||
this.getListData();
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到其它页面。*/
|
||||
wx.redirectTo({
|
||||
url: '../../project_more/index',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 滚动到底部
|
||||
*/
|
||||
onScrollToLower() {
|
||||
let nal = Math.ceil(this.data.total / this.data.pageSize);
|
||||
if (this.data.pageNum < nal) {
|
||||
this.setData({
|
||||
pageNum: this.data.pageNum + 1
|
||||
});
|
||||
this.getListData();
|
||||
} else {
|
||||
console.log("已经到底了,没有数据可加载!!!");
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-collapse": "@vant/weapp/collapse",
|
||||
"van-collapse-item": "@vant/weapp/collapse-item",
|
||||
"van-steps": "@vant/weapp/steps/index"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="4">
|
||||
<view class="header_img" bindtap="returnToPage">
|
||||
<image src="/images/left.png"></image>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="15">
|
||||
<view class="header_name">参建单位管理</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
||||
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
|
||||
<view class="modify_video_nav" style="margin-top: 5rpx;">
|
||||
<view class="{{activeState=='0'?'active':''}}" bindtap="trainJump" data-index="1"><text>已入场({{yrcCount}})</text></view>
|
||||
<view class="{{activeState=='1'?'active':''}}" bindtap="trainJump" data-index="2"><text>已离场({{ylcCount}})</text></view>
|
||||
</view>
|
||||
<view class="inspect_max_scroll">
|
||||
<!--专项检查样式zxjc-->
|
||||
<view class="inspect_for_scroll" v-if="{{ listData.length>0 }}" wx:for="{{listData}}" wx:key="index" data-set="{{item}}" bindtap="getInfo">
|
||||
<view class="inspect_for_bgd">
|
||||
<view class="inspect_list_title">
|
||||
<view class="inspect_list_title_label inspect_list_title_width">
|
||||
<view class="inspect_list_title_number">{{index < 10 ?'0'+(index+1):(index+1)}}</view>
|
||||
<view class="module_title module_title_flex inspect_list_title_text color_orange">
|
||||
{{item.subDeptTypeName}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info">
|
||||
<view class="inspect_list_info_details">
|
||||
<view class="inspect_list_info_data">
|
||||
<view class="inspect_list_info_data_prop color_blue">单位名称:<text>{{item.subDeptName}}</text></view>
|
||||
<view class="inspect_list_info_data_prop">信用代码:<text>{{item.subDeptCode}}</text></view>
|
||||
<view class="inspect_list_info_data_prop ">入场时间:<text>{{item.useDates}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{listData.length==0}}">
|
||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{addFlag}}" class="inspect_add_to" bindtap="skipAdd">
|
||||
<view style="padding-top: 22rpx;">
|
||||
<image src="/images/new_add.png"></image>
|
||||
<view>新增</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
|
@ -0,0 +1 @@
|
|||
/* pages/project_subDepts/index.wxss */
|
|
@ -0,0 +1,66 @@
|
|||
// pages/project_subgroups/add/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"usingComponents": {}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
<!--pages/project_subgroups/add/index.wxml-->
|
||||
<text>pages/project_subgroups/add/index.wxml</text>
|
|
@ -0,0 +1 @@
|
|||
/* pages/project_subgroups/add/index.wxss */
|
|
@ -0,0 +1,66 @@
|
|||
// pages/project_subgroups/info/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"usingComponents": {}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
<!--pages/project_subgroups/info/index.wxml-->
|
||||
<text>pages/project_subgroups/info/index.wxml</text>
|
|
@ -0,0 +1 @@
|
|||
/* pages/project_subgroups/info/index.wxss */
|
|
@ -0,0 +1,66 @@
|
|||
// pages/project_subgroups/list/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"usingComponents": {}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
<!--pages/project_subgroups/list/index.wxml-->
|
||||
<text>pages/project_subgroups/list/index.wxml</text>
|
|
@ -0,0 +1 @@
|
|||
/* pages/project_subgroups/list/index.wxss */
|
|
@ -0,0 +1,66 @@
|
|||
// pages/project_subusers/add/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"usingComponents": {}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
<!--pages/project_subusers/add/index.wxml-->
|
||||
<text>pages/project_subusers/add/index.wxml</text>
|
|
@ -0,0 +1 @@
|
|||
/* pages/project_subusers/add/index.wxss */
|
|
@ -0,0 +1,66 @@
|
|||
// pages/project_subusers/info/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"usingComponents": {}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
<!--pages/project_subusers/info/index.wxml-->
|
||||
<text>pages/project_subusers/info/index.wxml</text>
|
|
@ -0,0 +1 @@
|
|||
/* pages/project_subusers/info/index.wxss */
|
|
@ -0,0 +1,66 @@
|
|||
// pages/project_subusers/list/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"usingComponents": {}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
<!--pages/project_subusers/list/index.wxml-->
|
||||
<text>pages/project_subusers/list/index.wxml</text>
|
|
@ -0,0 +1 @@
|
|||
/* pages/project_subusers/list/index.wxss */
|
|
@ -19,7 +19,7 @@
|
|||
<view class="echarts_max">
|
||||
<view class="echarts_min">
|
||||
<view class="eharts_title module_title_flex">
|
||||
我的签名<text style="font-size: small; color: antiquewhite;">[点击签名进行修改]</text>
|
||||
我的签名<text style="font-size: small; color: #ff711e;">[点击签名进行修改]</text>
|
||||
</view>
|
||||
<view class="video_ai_survey">
|
||||
<sign bind:returnData="sign" imageUrl="{{signData.signetPath?(imgBaseUrl+signData.signetPath):''}}" canvasId="canvas" class="myCanvas"></sign>
|
||||
|
|