فهرست منبع

项目关联实施前期、实施阶段、竣工阶段模块功能展示和添加修改功能

user5 5 سال پیش
والد
کامیت
6df13c1d4a
24فایلهای تغییر یافته به همراه4575 افزوده شده و 0 حذف شده
  1. 8 0
      src/main/java/com/jeeplus/modules/projectType/dao/ProjectTypeDao.java
  2. 9 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectContentDataDao.java
  3. 6 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectContentDataService.java
  4. 7 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectcontentinfoController.java
  5. 22 0
      src/main/java/com/jeeplus/modules/projectrecord/dao/ProjectImplementEarlyDao.java
  6. 614 0
      src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectImplementEarly.java
  7. 21 0
      src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectRecordTreeData.java
  8. 98 0
      src/main/java/com/jeeplus/modules/projectrecord/service/ProjectImplementEarlyService.java
  9. 222 0
      src/main/java/com/jeeplus/modules/projectrecord/web/ProjectImplementCompletionController.java
  10. 225 0
      src/main/java/com/jeeplus/modules/projectrecord/web/ProjectImplementEarlyController.java
  11. 222 0
      src/main/java/com/jeeplus/modules/projectrecord/web/ProjectImplementStageController.java
  12. 4 0
      src/main/java/com/jeeplus/modules/workcontent/dao/WorkContentTypeDao.java
  13. 25 0
      src/main/java/com/jeeplus/modules/workcontent/service/WorkContentTypeService.java
  14. 32 0
      src/main/java/com/jeeplus/modules/workcontent/web/WorkContentTypeController.java
  15. 7 0
      src/main/resources/mappings/modules/projectType/ProjectTypeDao.xml
  16. 15 0
      src/main/resources/mappings/modules/projectcontentinfo/ProjectContentDataDao.xml
  17. 214 0
      src/main/resources/mappings/modules/projectrecord/ProjectImplementEarlyDao.xml
  18. 37 0
      src/main/resources/mappings/modules/workcontent/WorkContentTypeDao.xml
  19. 18 0
      src/main/webapp/WEB-INF/tlds/fns.tld
  20. 1 0
      src/main/webapp/webpage/modules/projectcontentinfo/workContentForm.jsp
  21. 521 0
      src/main/webapp/webpage/modules/projectrecord/implementCompletion/projectImplementCompletionList.jsp
  22. 542 0
      src/main/webapp/webpage/modules/projectrecord/implementEarly/projectImplementEarlyList.jsp
  23. 521 0
      src/main/webapp/webpage/modules/projectrecord/implementStage/projectImplementStageList.jsp
  24. 1184 0
      src/main/webapp/webpage/modules/projectrecord/workContentFromAndView/workContentForm.jsp

+ 8 - 0
src/main/java/com/jeeplus/modules/projectType/dao/ProjectTypeDao.java

@@ -11,6 +11,7 @@ import com.jeeplus.modules.sys.entity.Menu;
 import com.jeeplus.modules.sys.entity.Office;
 import com.jeeplus.modules.workcontent.entity.WorkContentCompanyType;
 import com.jeeplus.modules.workcontent.entity.WorkContentType;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -51,4 +52,11 @@ public interface ProjectTypeDao extends CrudDao<ProjectType> {
 	 * 初始化加载获取项目类型到下拉框
 	 */
 	List<ProjectType> getProjectType();
+
+	/**
+	 * 根据项目所属区域类型获取对应得二级级别信息
+	 * @param parentId
+	 * @return
+	 */
+	String getProjectTypeByParentId(@Param("parentId") String parentId, @Param("typeName") String typeName);
 }

+ 9 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectContentDataDao.java

@@ -6,6 +6,7 @@ package com.jeeplus.modules.projectcontentinfo.dao;
 import com.jeeplus.common.persistence.CrudDao;
 import com.jeeplus.common.persistence.annotation.MyBatisDao;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectContentData;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecordTreeData;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectContentData;
 import org.apache.ibatis.annotations.Param;
 
@@ -35,4 +36,12 @@ public interface ProjectContentDataDao extends CrudDao<ProjectContentData> {
     String findByLinkId(@Param("contentId") String contentId,@Param("projectId") String projectId);
 
     List<RuralProjectContentData> findListOnRural(RuralProjectContentData projectContentData);
+
+    /**
+     * 根据项目编号和阶段Type获取信息
+     * @param projectId 项目id
+     * @param projectTypeParentId 阶段type
+     * @return
+     */
+    List<ProjectRecordTreeData> getProjectContentDataList(@Param("projectId")String projectId,@Param("projectTypeParentId")String projectTypeParentId);
 }

+ 6 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectContentDataService.java

@@ -13,6 +13,7 @@ import com.jeeplus.modules.projectcontentinfo.dao.ProjectBasedDataDao;
 import com.jeeplus.modules.projectcontentinfo.dao.ProjectcontentinfoDao;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectBasedData;
 import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecordTreeData;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectContentData;
 import com.jeeplus.modules.sys.dao.WorkattachmentDao;
 import com.jeeplus.modules.sys.entity.Workattachment;
@@ -194,4 +195,9 @@ public class ProjectContentDataService extends CrudService<ProjectContentDataDao
         }
         return workReviewAudits;
     }
+
+    public List<ProjectRecordTreeData> getProjectContentDataList(String projectId,String projectTypeParentId) {
+        List<ProjectRecordTreeData> projectRecordTreeDataList = dao.getProjectContentDataList(projectId,projectTypeParentId);
+        return projectRecordTreeDataList;
+    }
 }

+ 7 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectcontentinfoController.java

@@ -816,6 +816,13 @@ public class ProjectcontentinfoController extends BaseController {
 					projectContentData.setProject(projectcontentinfo.getProject());
 					List<ProjectContentData> list = projectContentDataService.findList(projectContentData);
 					model.addAttribute("list", list);
+					if("early".equals(projectcontentinfo.getCondition())){
+						return "redirect:"+Global.getAdminPath()+"/project/projectImplementEarly/?repage";
+					}else if("stage".equals(projectcontentinfo.getCondition())){
+						return "redirect:"+Global.getAdminPath()+"/project/projectImplementStage/?repage";
+					}else if("complement".equals(projectcontentinfo.getCondition())){
+						return "redirect:"+Global.getAdminPath()+"/project/projectImplementCompletion/?repage";
+					}
 					if (StringUtils.isNotBlank(projectcontentinfo.getEdit()) && projectcontentinfo.getEdit().equals("edit")){
 						return "redirect:"+Global.getAdminPath()+"/projectcontentinfo/projectcontentinfo/list?id="+projectcontentinfo.getId()+"&edit=edit";
 					}

+ 22 - 0
src/main/java/com/jeeplus/modules/projectrecord/dao/ProjectImplementEarlyDao.java

@@ -0,0 +1,22 @@
+package com.jeeplus.modules.projectrecord.dao;
+
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.projectrecord.entity.ProjectImplementEarly;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+
+import java.util.List;
+
+/**
+ * 项目实施前期dao
+ * @author 徐滕
+ * @version 2020-07-10
+ */
+@MyBatisDao
+public interface ProjectImplementEarlyDao extends CrudDao<ProjectImplementEarly> {
+
+    Integer getProjectRecodesCount(ProjectImplementEarly projectRecords);
+
+    List<ProjectImplementEarly> getProjectRecodesList(ProjectImplementEarly projectRecords);
+}

+ 614 - 0
src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectImplementEarly.java

@@ -0,0 +1,614 @@
+package com.jeeplus.modules.projectrecord.entity;
+
+import com.google.common.collect.Lists;
+import com.jeeplus.common.persistence.DataEntity;
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
+import com.jeeplus.modules.sys.entity.Area;
+import com.jeeplus.modules.sys.entity.Office;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientLinkman;
+import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
+import org.hibernate.validator.constraints.NotBlank;
+
+import javax.validation.constraints.NotNull;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 项目实施前期entity
+ * @author 徐滕
+ * @version 2020-07-10
+ */
+public class ProjectImplementEarly extends DataEntity<ProjectImplementEarly> {
+    public static final String SERIAL_BIZCODE ="1";
+    private static final long serialVersionUID = 1L;
+    @NotNull(message = "合同信息不能为空")
+    private WorkContractInfo workContractInfo;		// 合同id
+    private String projectId;		// 项目编号
+    @NotBlank(message = "项目名称不能为空")
+    private String projectName;		// 项目名称
+    private String scaleType;		// 规模类型
+    private String scaleUnit;		// 规模单位
+    private Double scaleQuantity;		// 规模数量
+    private Area area;		// 项目所在地
+    private String projectSite;		// 建设地点
+    private String province;  //项目所在省
+    private String city;  //项目所在市
+    private String county;//项目所在区
+    private String projectStructure;   //工程结构
+    private String onGroundNum;    //地上层数
+    private String underGroundNum;    //地下层数
+    private String buildingScale;    //建筑规模
+    private String measuringUnit;     //规模单位
+    private String projectUse;        //工程用途
+    private Double installFees;      //安装造价
+    private Double buildingFees;      //土建造价
+    private Double buildingPercent;    //土建百分比
+    private Double installPercent;     //安装百分比
+    private Double unitFees;     //单位造价
+    private Double buildingUnitFees;  //土建单位造价
+    private Double installUnitFees;    //安装单位造价
+    private Double totalFees;        //总合同额
+    private String projectRegistrant;  //项目登记人
+
+    //新添代码
+    private String projectTypeId; //项目类型
+
+    private ProjectReportData reportData;//报告
+
+    public ProjectReportData getReportData() {
+        return reportData;
+    }
+
+    public void setReportData(ProjectReportData reportData) {
+        this.reportData = reportData;
+    }
+
+    @NotNull(message = "委托方联系人不能为空")
+    private List<WorkClientLinkman> workClientLinkmanList;		// 委托方联系人
+    private List<WorkClientLinkman> workConstructionLinkmanList;		// 施工方及联系人
+    private List<WorkClientLinkman> workBuildLinkmanList;//建设方联系人
+    private List<WorkClientLinkman> workSuperLinkmanList;		// 监理方及联系人
+    private List<WorkClientLinkman> workDesignLinkmanList;//设计方联系人
+    @NotBlank(message = "工程概况不能为空")
+    private String projectDesc;		// 工程概况
+    /*@NotNull(message = "项目负责人不能为空")*/
+    private List<User> projectLeaders; //项目负责人
+
+    private List<User> projectMembers;  //项目组成员
+
+    private String leaderNameStr;
+    private String leaderIds;
+    private String memberNameStr;
+    private String memberIds;
+
+    private String processInstanceId;
+
+    private Office company;
+    private Office office;
+    private Integer projectStatus;//项目状态
+
+    private String auditType;
+
+    private String alterProcessId;
+    private String userIds;
+    private String delUserIds;
+    private List<User> users;
+    private String userId;
+
+    private String home;
+    private Date beginDate;
+    private Date endDate;
+    private int membercount;
+    private List<WorkClientAttachment> workAttachments = Lists.newArrayList();
+
+    private List<ProjectReportData> projectReportData = Lists.newArrayList();
+
+    public ProjectImplementEarly() {
+        super();
+    }
+
+    public ProjectImplementEarly(String id){
+        super(id);
+    }
+
+    public WorkContractInfo getWorkContractInfo() {
+        return workContractInfo;
+    }
+
+    public void setWorkContractInfo(WorkContractInfo contract) {
+        this.workContractInfo = contract;
+    }
+
+    @ExcelField(title="项目编号", align=2, sort=1)
+    public String getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
+
+    @ExcelField(title="项目名称", align=2, sort=2)
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    @ExcelField(title="规模类型", align=2, sort=9)
+    public String getScaleType() {
+        return scaleType;
+    }
+
+    public void setScaleType(String scaleType) {
+        this.scaleType = scaleType;
+    }
+
+    @ExcelField(title="规模单位", align=2, sort=10)
+    public String getScaleUnit() {
+        return scaleUnit;
+    }
+
+    public void setScaleUnit(String scaleUnit) {
+        this.scaleUnit = scaleUnit;
+    }
+
+    @ExcelField(title="规模数量", align=2, sort=11)
+    public Double getScaleQuantity() {
+        return scaleQuantity;
+    }
+
+    public void setScaleQuantity(Double scaleQuantity) {
+        this.scaleQuantity = scaleQuantity;
+    }
+
+    @ExcelField(title="项目所在地", align=2, sort=12)
+    public Area getArea() {
+        return area;
+    }
+
+    public void setArea(Area area) {
+        this.area = area;
+    }
+
+    @ExcelField(title="建设地点", align=2, sort=13)
+    public String getProjectSite() {
+        return projectSite;
+    }
+
+    public void setProjectSite(String projectSite) {
+        this.projectSite = projectSite;
+    }
+
+    public List<WorkClientLinkman> getWorkClientLinkmanList() {
+        return workClientLinkmanList;
+    }
+
+    public void setWorkClientLinkmanList(List<WorkClientLinkman> workClientLinkmanList) {
+        this.workClientLinkmanList = workClientLinkmanList;
+    }
+
+    @ExcelField(title="工程概况", align=2, sort=16)
+    public String getProjectDesc() {
+        return projectDesc;
+    }
+    @ExcelField(title="特殊要求", align=2, sort=17)
+    public String getRemarks() {
+        return remarks;
+    }
+    @ExcelField(title="创建日期", align=2, sort=18)
+    public Date getCreateDate() {
+        return createDate;
+    }
+
+    public void setProjectDesc(String projectDesc) {
+        this.projectDesc = projectDesc;
+    }
+
+    public List<User> getProjectLeaders() {
+        return projectLeaders;
+    }
+
+    public void setProjectLeaders(List<User> projectLeaders) {
+        this.projectLeaders = projectLeaders;
+    }
+
+    public List<User> getProjectMembers() {
+        return projectMembers;
+    }
+
+    public void setProjectMembers(List<User> projectMembers) {
+        this.projectMembers = projectMembers;
+    }
+
+    public List<WorkClientLinkman> getWorkConstructionLinkmanList() {
+        return workConstructionLinkmanList;
+    }
+
+    public void setWorkConstructionLinkmanList(List<WorkClientLinkman> workConstructionLinkmanList) {
+        this.workConstructionLinkmanList = workConstructionLinkmanList;
+    }
+
+    @ExcelField(title="项目状态", align=2, sort=19,dictType = "audit_state")
+    public Integer getProjectStatus() {
+        return projectStatus;
+    }
+
+    public void setProjectStatus(Integer projectStatus) {
+        this.projectStatus = projectStatus;
+    }
+
+    @ExcelField(title="负责人", align=2, sort=8)
+    public String getLeaderNameStr() {
+        return leaderNameStr;
+    }
+
+    public void setLeaderNameStr(String leaderNameStr) {
+        this.leaderNameStr = leaderNameStr;
+    }
+
+    public String getMemberNameStr() {
+        return memberNameStr;
+    }
+
+    public void setMemberNameStr(String memberNameStr) {
+        this.memberNameStr = memberNameStr;
+    }
+
+    public String getLeaderIds() {
+        return leaderIds;
+    }
+
+    public void setLeaderIds(String leaderIds) {
+        this.leaderIds = leaderIds;
+    }
+
+    public String getMemberIds() {
+        return memberIds;
+    }
+
+    public void setMemberIds(String memberIds) {
+        this.memberIds = memberIds;
+    }
+
+    public String getProcessInstanceId() {
+        return processInstanceId;
+    }
+
+    public void setProcessInstanceId(String processInstanceId) {
+        this.processInstanceId = processInstanceId;
+    }
+
+    public String getAuditType() {
+        return auditType;
+    }
+
+    public void setAuditType(String auditType) {
+        this.auditType = auditType;
+    }
+
+    public Office getCompany() {
+        return company;
+    }
+
+    public void setCompany(Office company) {
+        this.company = company;
+    }
+
+    public Office getOffice() {
+        return office;
+    }
+
+    public void setOffice(Office office) {
+        this.office = office;
+    }
+
+    public String getAlterProcessId() {
+        return alterProcessId;
+    }
+
+    public void setAlterProcessId(String alterProcessId) {
+        this.alterProcessId = alterProcessId;
+    }
+
+    public List<WorkClientAttachment> getWorkAttachments() {
+        return workAttachments;
+    }
+
+    public void setWorkAttachments(List<WorkClientAttachment> workAttachments) {
+        this.workAttachments = workAttachments;
+    }
+
+    public String getUserIds() {
+        return userIds;
+    }
+
+    public void setUserIds(String userIds) {
+        this.userIds = userIds;
+    }
+
+    public String getDelUserIds() {
+        return delUserIds;
+    }
+
+    public void setDelUserIds(String delUserIds) {
+        this.delUserIds = delUserIds;
+    }
+
+    public List<User> getUsers() {
+        return users;
+    }
+
+    public void setUsers(List<User> users) {
+        this.users = users;
+    }
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+    @ExcelField(title="合同名称", align=2, sort=4)
+    public String getContractName() {
+        if (workContractInfo!=null) {
+            return workContractInfo.getName();
+        }else {
+            return "";
+        }
+    }
+    @ExcelField(title="合同编号", align=2, sort=3)
+    public String getContractNumber() {
+        if (workContractInfo!=null) {
+            return workContractInfo.getContractNum();
+        }else {
+            return "";
+        }
+    }
+    @ExcelField(title="合同金额", align=2, sort=5)
+    public String getContractPrice() {
+        if (workContractInfo!=null) {
+            return workContractInfo.getContractPrice();
+        }else {
+            return "";
+        }
+    }
+    @ExcelField(title="工程分类", align=2, sort=7)
+    public String getContractType() {
+        if (workContractInfo!=null) {
+            return workContractInfo.getConstructionProjectTypeStr();
+        }else {
+            return "";
+        }
+    }
+    @ExcelField(title="主委托方", align=2, sort=6)
+    public String getClientName() {
+        if (workContractInfo!=null && workContractInfo.getClient()!=null){
+            return workContractInfo.getClient().getName();
+        }else {
+            return "";
+        }
+    }
+
+    public String getHome() {
+        return home;
+    }
+
+    public void setHome(String home) {
+        this.home = home;
+    }
+
+    public Date getBeginDate() {
+        return beginDate;
+    }
+
+    public void setBeginDate(Date beginDate) {
+        this.beginDate = beginDate;
+    }
+
+    public Date getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Date endDate) {
+        this.endDate = endDate;
+    }
+
+    public int getMembercount() {
+        return membercount;
+    }
+
+    public void setMembercount(int membercount) {
+        this.membercount = membercount;
+    }
+
+    public String getProvince() {
+        return province;
+    }
+
+    public void setProvince(String province) {
+        this.province = province;
+    }
+
+    public String getCity() {
+        return city;
+    }
+
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    public String getCounty() {
+        return county;
+    }
+
+    public void setCounty(String county) {
+        this.county = county;
+    }
+
+    public String getProjectStructure() {
+        return projectStructure;
+    }
+
+    public void setProjectStructure(String projectStructure) {
+        this.projectStructure = projectStructure;
+    }
+
+    public String getOnGroundNum() {
+        return onGroundNum;
+    }
+
+    public void setOnGroundNum(String onGroundNum) {
+        this.onGroundNum = onGroundNum;
+    }
+
+    public String getUnderGroundNum() {
+        return underGroundNum;
+    }
+
+    public void setUnderGroundNum(String underGroundNum) {
+        this.underGroundNum = underGroundNum;
+    }
+
+    public String getBuildingScale() {
+        return buildingScale;
+    }
+
+    public void setBuildingScale(String buildingScale) {
+        this.buildingScale = buildingScale;
+    }
+
+    public String getMeasuringUnit() {
+        return measuringUnit;
+    }
+
+    public void setMeasuringUnit(String measuringUnit) {
+        this.measuringUnit = measuringUnit;
+    }
+
+    public String getProjectUse() {
+        return projectUse;
+    }
+
+    public void setProjectUse(String projectUse) {
+        this.projectUse = projectUse;
+    }
+
+    public Double getInstallFees() {
+        return installFees;
+    }
+
+    public void setInstallFees(Double installFees) {
+        this.installFees = installFees;
+    }
+
+    public Double getBuildingFees() {
+        return buildingFees;
+    }
+
+    public void setBuildingFees(Double buildingFees) {
+        this.buildingFees = buildingFees;
+    }
+
+    public Double getBuildingPercent() {
+        return buildingPercent;
+    }
+
+    public void setBuildingPercent(Double buildingPercent) {
+        this.buildingPercent = buildingPercent;
+    }
+
+    public Double getInstallPercent() {
+        return installPercent;
+    }
+
+    public void setInstallPercent(Double installPercent) {
+        this.installPercent = installPercent;
+    }
+
+    public Double getUnitFees() {
+        return unitFees;
+    }
+
+    public void setUnitFees(Double unitFees) {
+        this.unitFees = unitFees;
+    }
+
+    public Double getBuildingUnitFees() {
+        return buildingUnitFees;
+    }
+
+    public void setBuildingUnitFees(Double buildingUnitFees) {
+        this.buildingUnitFees = buildingUnitFees;
+    }
+
+    public Double getInstallUnitFees() {
+        return installUnitFees;
+    }
+
+    public void setInstallUnitFees(Double installUnitFees) {
+        this.installUnitFees = installUnitFees;
+    }
+
+    public Double getTotalFees() {
+        return totalFees;
+    }
+
+    public void setTotalFees(Double totalFees) {
+        this.totalFees = totalFees;
+    }
+
+    public List<ProjectReportData> getProjectReportData() {
+        return projectReportData;
+    }
+
+    public void setProjectReportData(List<ProjectReportData> projectReportData) {
+        this.projectReportData = projectReportData;
+    }
+
+    public String getProjectRegistrant() {
+        return projectRegistrant;
+    }
+
+    public void setProjectRegistrant(String projectRegistrant) {
+        this.projectRegistrant = projectRegistrant;
+    }
+
+    public String getProjectTypeId() {
+        return projectTypeId;
+    }
+
+    public void setProjectTypeId(String projectTypeId) {
+        this.projectTypeId = projectTypeId;
+    }
+
+    public List<WorkClientLinkman> getWorkBuildLinkmanList() {
+        return workBuildLinkmanList;
+    }
+
+    public void setWorkBuildLinkmanList(List<WorkClientLinkman> workBuildLinkmanList) {
+        this.workBuildLinkmanList = workBuildLinkmanList;
+    }
+
+    public List<WorkClientLinkman> getWorkSuperLinkmanList() {
+        return workSuperLinkmanList;
+    }
+
+    public void setWorkSuperLinkmanList(List<WorkClientLinkman> workSuperLinkmanList) {
+        this.workSuperLinkmanList = workSuperLinkmanList;
+    }
+
+    public List<WorkClientLinkman> getWorkDesignLinkmanList() {
+        return workDesignLinkmanList;
+    }
+
+    public void setWorkDesignLinkmanList(List<WorkClientLinkman> workDesignLinkmanList) {
+        this.workDesignLinkmanList = workDesignLinkmanList;
+    }
+}

+ 21 - 0
src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectRecordTreeData.java

@@ -2,6 +2,8 @@ package com.jeeplus.modules.projectrecord.entity;
 
 import com.jeeplus.common.persistence.DataEntity;
 
+import java.util.List;
+
 public class ProjectRecordTreeData extends DataEntity<ProjectRecordTreeData> {
     private String projectId;		// 项目编号
     private String projectName;		// 项目名称
@@ -19,6 +21,9 @@ public class ProjectRecordTreeData extends DataEntity<ProjectRecordTreeData> {
     private String dictType;
     private String parentIds;
 
+    private List<String> masterIdList;  //项目负责人集合
+    private Integer operationSign;   //操作标识
+
     public String getProjectId() {
         return projectId;
     }
@@ -122,4 +127,20 @@ public class ProjectRecordTreeData extends DataEntity<ProjectRecordTreeData> {
     public void setParentIds(String parentIds) {
         this.parentIds = parentIds;
     }
+
+    public List<String> getMasterIdList() {
+        return masterIdList;
+    }
+
+    public void setMasterIdList(List<String> masterIdList) {
+        this.masterIdList = masterIdList;
+    }
+
+    public Integer getOperationSign() {
+        return operationSign;
+    }
+
+    public void setOperationSign(Integer operationSign) {
+        this.operationSign = operationSign;
+    }
 }

+ 98 - 0
src/main/java/com/jeeplus/modules/projectrecord/service/ProjectImplementEarlyService.java

@@ -0,0 +1,98 @@
+package com.jeeplus.modules.projectrecord.service;
+
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.service.CrudService;
+import com.jeeplus.common.utils.Collections3;
+import com.jeeplus.common.utils.MenuStatusEnum;
+import com.jeeplus.modules.projectType.dao.ProjectTypeDao;
+import com.jeeplus.modules.projectType.entity.ProjectType;
+import com.jeeplus.modules.projectrecord.dao.ProjectImplementEarlyDao;
+import com.jeeplus.modules.projectrecord.dao.WorkProjectUserDao;
+import com.jeeplus.modules.projectrecord.entity.ProjectImplementEarly;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.utils.DictUtils;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientInfo;
+import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
+import com.jeeplus.modules.workcontractinfo.service.WorkContractInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * 项目实施前期service
+ * @author 徐滕
+ * @version 2020-07-10
+ */
+@Service
+@Transactional(readOnly = true)
+public class ProjectImplementEarlyService extends CrudService<ProjectImplementEarlyDao, ProjectImplementEarly> {
+
+    @Autowired
+    private WorkContractInfoService contractInfoService;
+    @Autowired
+    private ProjectTypeDao projectTypeDao;
+    @Autowired
+    private WorkProjectUserDao workProjectUserDao;
+
+    public ProjectImplementEarly get(String id) {
+        return super.get(id);
+    }
+
+    public Page<ProjectImplementEarly> findProjectPage(Page<ProjectImplementEarly> page, ProjectImplementEarly projectRecords) {
+        //设置数据权限
+        if(!UserUtils.getUser().isAdmin()) {
+            String dataScopeSql = dataScopeFilterOR(projectRecords.getCurrentUser(), "o", "u", "s", MenuStatusEnum.WORK_RECORDS.getValue());
+            projectRecords.getSqlMap().put("dsf", dataScopeSql);
+        }
+        Integer count = dao.getProjectRecodesCount(projectRecords);
+        page.setCount(count);
+        page.setCountFlag(false);
+        projectRecords.setPage(page);
+        List<ProjectImplementEarly> recordsList = dao.getProjectRecodesList(projectRecords);
+        //查询负责人信息
+        for (ProjectImplementEarly records : recordsList) {
+            this.queryContractInfos(records);
+            List<User> users = workProjectUserDao.queryProjectUsers(records.getId(), "1");
+            records.setProjectLeaders(users);
+            records.setLeaderNameStr(Collections3.extractToString(users, "name", ","));
+            records.setLeaderIds(Collections3.extractToString(users, "id", ","));
+        }
+        page.setList(recordsList);
+        return page;
+    }
+
+    /**
+     * 查询合同信息
+     * @param projectRecords
+     */
+    public void queryContractInfos(ProjectImplementEarly projectRecords) {
+        if (null != projectRecords.getWorkContractInfo()){
+            WorkContractInfo workContractInfo = contractInfoService.get(projectRecords.getWorkContractInfo().getId());
+            if(workContractInfo!=null){
+                workContractInfo.setConstructionProjectTypeStr(DictUtils.getMainDictLabel(String.valueOf(workContractInfo.getContractType()), "contract_type", ""));
+                if(workContractInfo.getWorkClientInfoList()!=null&&!workContractInfo.getWorkClientInfoList().isEmpty()){
+                    StringBuilder workClinetInfoIds = new StringBuilder();
+                    for (WorkClientInfo workClientInfo : workContractInfo.getWorkClientInfoList()) {
+                        workClinetInfoIds.append(workClientInfo.getId()).append(",");
+                    }
+                    workClinetInfoIds.deleteCharAt(workClinetInfoIds.length()-1);
+                    workContractInfo.setWorkClinetInfoIds(workClinetInfoIds.toString());
+                }
+            }
+            projectRecords.setWorkContractInfo(workContractInfo);
+        }
+    }
+
+    /**
+     * 根据项目所属区域类型获取对应得二级级别信息
+     * @param parentId
+     * @return
+     */
+    public String getProjectType(String parentId,String typeName){
+        String getProjectType = projectTypeDao.getProjectTypeByParentId(parentId,typeName);
+        return getProjectType;
+    }
+}

+ 222 - 0
src/main/java/com/jeeplus/modules/projectrecord/web/ProjectImplementCompletionController.java

@@ -0,0 +1,222 @@
+package com.jeeplus.modules.projectrecord.web;
+
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectContentData;
+import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectContentDataService;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectcontentinfoService;
+import com.jeeplus.modules.projectcontroltable.entity.ProjectControlTable;
+import com.jeeplus.modules.projectcontroltable.service.ProjectControlTableService;
+import com.jeeplus.modules.projectrecord.entity.ProjectImplementEarly;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecordTreeData;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.projectrecord.service.ProjectImplementEarlyService;
+import com.jeeplus.modules.projectrecord.service.ProjectRecordsService;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientLinkman;
+import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.*;
+
+/**
+ * 项目实施阶段Controller
+ * @author 徐滕
+ * @version 2020-07-10
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/project/projectImplementCompletion")
+public class ProjectImplementCompletionController {
+
+    @Autowired
+    private ProjectImplementEarlyService projectImplementEarlyService;
+    @Autowired
+    private ProjectRecordsService projectRecordsService;
+    @Autowired
+    private ProjectcontentinfoService projectcontentinfoService;
+    @Autowired
+    private ProjectContentDataService projectContentDataService;
+    @Autowired
+    private ProjectControlTableService projectControlTableService;
+
+    @ModelAttribute
+    public ProjectImplementEarly get(@RequestParam(required=false) String id) {
+        ProjectImplementEarly entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = projectImplementEarlyService.get(id);
+        }
+        if (entity == null){
+            entity = new ProjectImplementEarly();
+        }
+        return entity;
+    }
+
+    /**
+     * 项目列表页面
+     */
+    @RequiresPermissions("project:projectImplementCompletion:list")
+    @RequestMapping(value = {"list", ""})
+    public String list(ProjectImplementEarly projectRecords, HttpServletRequest request, HttpServletResponse response, Model model) {
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
+        }
+        Page<ProjectImplementEarly> page = projectImplementEarlyService.findProjectPage(new Page<ProjectImplementEarly>(request, response), projectRecords);
+        //无合同状态下,获取委托方的名称
+        List<ProjectImplementEarly> list = page.getList();
+        model.addAttribute("page", page);
+        return "modules/projectrecord/implementCompletion/projectImplementCompletionList";
+    }
+
+    /**
+     * 项目列表页面
+     */
+    @RequestMapping(value = "getProjectList")
+    @ResponseBody
+    public Map<String,List> getProjectList(ProjectImplementEarly projectRecords, HttpServletRequest request, HttpServletResponse response, Model model) {
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
+        }
+        Page<ProjectImplementEarly> page = projectImplementEarlyService.findProjectPage(new Page<ProjectImplementEarly>(request, response), projectRecords);
+        //无合同状态下,获取委托方的名称
+        List<ProjectImplementEarly> list = page.getList();
+        List<ProjectRecordTreeData> projectRecordTreeDataList = new ArrayList<>();
+        Map<String,List> map = new HashMap<>();
+        for (int i = 0; i < list.size(); i++) {
+            ProjectRecordTreeData projectRecordTreeData = new ProjectRecordTreeData();
+            ProjectImplementEarly records1 = list.get(i);
+            if (records1.getWorkContractInfo() == null) {
+                if (records1.getWorkClientLinkmanList() != null && records1.getWorkClientLinkmanList().size() > 0) {
+                    WorkClientLinkman linkman = records1.getWorkClientLinkmanList().get(0);
+                    WorkContractInfo contractInfo = new WorkContractInfo();
+                    contractInfo.setClient(linkman.getClientId());
+                    records1.setWorkContractInfo(contractInfo);
+                }
+            }
+            //将界面需要展示数据放入类中
+            projectRecordTreeData.setId(records1.getId());
+            projectRecordTreeData.setProjectName(records1.getProjectName());
+            projectRecordTreeData.setProjectId(records1.getProjectId());
+            if(null!= records1.getWorkContractInfo()){
+                projectRecordTreeData.setContractName(records1.getWorkContractInfo().getName());
+                projectRecordTreeData.setClientName(records1.getWorkContractInfo().getClient().getName());
+            }else{
+                projectRecordTreeData.setContractName("");
+                projectRecordTreeData.setClientName("");
+            }
+            projectRecordTreeData.setProjectStatus(records1.getProjectStatus());
+            projectRecordTreeData.setProjectRegistrant(records1.getProjectRegistrant());
+            projectRecordTreeData.setCreateDate(records1.getCreateDate());
+            projectRecordTreeData.setCreateId(records1.getCreateBy().getId());
+            //父节点的pid设置为0
+            projectRecordTreeData.setPid("0");
+            //遍历项目负责人信息
+            List<User> masterUserList = records1.getProjectLeaders();
+            List<String> masterList = new ArrayList<>();
+            Set masterIdSet = new HashSet();
+            for (User masterUser:masterUserList) {
+                masterList.add(masterUser.getName());
+                masterIdSet.add(masterUser.getId());
+            }
+            masterIdSet.add(records1.getCreateBy().getId());
+            //Set转List
+            List<String> masterIdList = new ArrayList<>(masterIdSet);
+            //如果当前登录人为项目登记者或项目负责人则允许其添加子节点信息
+            for (String masterId : masterIdList) {
+                if(masterId.equals(UserUtils.getUser().getId())){
+                    projectRecordTreeData.setOperationSign(1);
+                    break;
+                }else{
+                    projectRecordTreeData.setOperationSign(0);
+                }
+            }
+
+            //项目负责人list数据转String
+            String projectLeader = masterList.toString().replaceAll("(?:\\[|null|\\]| +)", "");
+            projectRecordTreeData.setProjectLeader(projectLeader);
+            projectRecordTreeData.setLoginId(UserUtils.getUser().getId());
+            projectRecordTreeDataList.add(projectRecordTreeData);
+
+            //获取阶段Type父节点信息
+            String projectType = projectImplementEarlyService.getProjectType(records1.getProjectTypeId(), "竣工阶段");
+            //根据项目id查询相关的项目阶段内容
+            List<ProjectRecordTreeData> reportDataList = projectContentDataService.getProjectContentDataList(records1.getId(),projectType);
+            if(0 != reportDataList.size()){
+                Projectcontentinfo select = new Projectcontentinfo();
+                ProjectRecords project = new ProjectRecords();
+                project.setId(records1.getId());
+                select.setParentIds("0,");
+                select.setProject(project);
+                List<Projectcontentinfo> p = projectcontentinfoService.findListByProject(select);
+                for (ProjectRecordTreeData reportData : reportDataList) {
+                    //添加工作内容id
+                    if(p.size()>0){
+                        reportData.setContentPId(p.get(0).getId());
+                        reportData.setParentIds("0,");
+                        reportData.setDictType("");
+                    }
+                    //将项目所属类型名称放入树形列表的projectId中
+                    reportData.setProjectId(reportData.getProjectLeader());
+                    //添加项目负责人
+                    reportData.setProjectLeader(projectLeader);
+                    //添加登陆者id
+                    reportData.setLoginId(UserUtils.getUser().getId());
+                    reportData.setCreateId(records1.getCreateBy().getId());
+                }
+            }
+            projectRecordTreeDataList.addAll(reportDataList);
+
+        }
+        map.put("data",projectRecordTreeDataList);
+        return map;
+    }
+
+    @RequestMapping(value = {"form"})
+    public String form(Projectcontentinfo projectcontentinfo, HttpServletRequest request, HttpServletResponse response, Model model, RedirectAttributes attr) {
+        String dictType = projectcontentinfo.getDictType();
+        ProjectRecords records = projectRecordsService.getQueryProjectUsers(projectcontentinfo.getProject().getId());
+        projectcontentinfo.setProject(records);
+
+
+        ProjectContentData projectContentData = new ProjectContentData();
+        projectContentData.setType(dictType);
+        if (StringUtils.isNotBlank(projectcontentinfo.getInfoId())){
+            projectContentData = projectContentDataService.get(projectcontentinfo.getInfoId());
+        }else if (projectcontentinfo.getProjectContentData()!=null && StringUtils.isNotBlank(projectcontentinfo.getProjectContentData().getId())) {
+            projectContentData = projectContentDataService.get(projectcontentinfo.getProjectContentData().getId());
+        }
+        projectContentData.setMaster(UserUtils.getUser());
+        if(StringUtils.isNotBlank(projectContentData.getId())){
+            List<ProjectControlTable> controlData = projectControlTableService.getControlData(projectContentData.getId(),"");
+            projectContentData.setProjectControlTableList(controlData);
+            projectContentDataService.queryBasedData(projectContentData);
+        }
+        projectcontentinfo.setProjectContentData(projectContentData);
+        String projectType = projectImplementEarlyService.getProjectType(records.getProjectTypeId(), "竣工阶段");
+        projectcontentinfo.setType(projectType);
+        model.addAttribute("projectcontentinfo", projectcontentinfo);
+        model.addAttribute("flag", "complement");
+        if (projectcontentinfo.getView().equals("contentView")){
+            return "modules/projectcontentinfo/workContentView";
+        }else {
+            if (projectContentData != null && projectContentData.getCreateBy() != null && StringUtils.isNotBlank(projectContentData.getCreateBy().getId()) && projectContentData.getCreateBy().getId().equals(UserUtils.getUser().getId())) {
+                return "modules/projectrecord/workContentFromAndView/workContentForm";
+            } else if (projectContentData == null || StringUtils.isBlank(projectContentData.getId())) {
+                return "modules/projectrecord/workContentFromAndView/workContentForm";
+            } else {
+                return "modules/projectcontentinfo/workContentView";
+            }
+        }
+    }
+}

+ 225 - 0
src/main/java/com/jeeplus/modules/projectrecord/web/ProjectImplementEarlyController.java

@@ -0,0 +1,225 @@
+package com.jeeplus.modules.projectrecord.web;
+
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectContentData;
+import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectContentDataService;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectcontentinfoService;
+import com.jeeplus.modules.projectcontroltable.entity.ProjectControlTable;
+import com.jeeplus.modules.projectcontroltable.service.ProjectControlTableService;
+import com.jeeplus.modules.projectrecord.entity.ProjectImplementEarly;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecordTreeData;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.projectrecord.service.ProjectImplementEarlyService;
+import com.jeeplus.modules.projectrecord.service.ProjectRecordsService;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientLinkman;
+import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.*;
+
+/**
+ * 项目实施前期Controller
+ * @author 徐滕
+ * @version 2020-07-10
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/project/projectImplementEarly")
+public class ProjectImplementEarlyController {
+
+    @Autowired
+    private ProjectImplementEarlyService projectImplementEarlyService;
+    @Autowired
+    private ProjectRecordsService projectRecordsService;
+    @Autowired
+    private ProjectcontentinfoService projectcontentinfoService;
+    @Autowired
+    private ProjectContentDataService projectContentDataService;
+    @Autowired
+    private ProjectControlTableService projectControlTableService;
+
+    @ModelAttribute
+    public ProjectImplementEarly get(@RequestParam(required=false) String id) {
+        ProjectImplementEarly entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = projectImplementEarlyService.get(id);
+        }
+        if (entity == null){
+            entity = new ProjectImplementEarly();
+        }
+        return entity;
+    }
+
+    /**
+     * 项目列表页面
+     */
+    @RequiresPermissions("project:projectImplementEarly:list")
+    @RequestMapping(value = {"list", ""})
+    public String list(ProjectImplementEarly projectRecords, HttpServletRequest request, HttpServletResponse response, Model model) {
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
+        }
+        Page<ProjectImplementEarly> page = projectImplementEarlyService.findProjectPage(new Page<ProjectImplementEarly>(request, response), projectRecords);
+        //无合同状态下,获取委托方的名称
+        List<ProjectImplementEarly> list = page.getList();
+        model.addAttribute("page", page);
+        return "modules/projectrecord/implementEarly/projectImplementEarlyList";
+    }
+
+    /**
+     * 项目列表页面
+     */
+    @RequestMapping(value = "getProjectList")
+    @ResponseBody
+    public Map<String,List> getProjectList(ProjectImplementEarly projectRecords, HttpServletRequest request, HttpServletResponse response, Model model) {
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
+        }
+        Page<ProjectImplementEarly> page = projectImplementEarlyService.findProjectPage(new Page<ProjectImplementEarly>(request, response), projectRecords);
+        //无合同状态下,获取委托方的名称
+        List<ProjectImplementEarly> list = page.getList();
+        List<ProjectRecordTreeData> projectRecordTreeDataList = new ArrayList<>();
+        Map<String,List> map = new HashMap<>();
+        for (int i = 0; i < list.size(); i++) {
+            ProjectRecordTreeData projectRecordTreeData = new ProjectRecordTreeData();
+            ProjectImplementEarly records1 = list.get(i);
+            if (records1.getWorkContractInfo() == null) {
+                if (records1.getWorkClientLinkmanList() != null && records1.getWorkClientLinkmanList().size() > 0) {
+                    WorkClientLinkman linkman = records1.getWorkClientLinkmanList().get(0);
+                    WorkContractInfo contractInfo = new WorkContractInfo();
+                    contractInfo.setClient(linkman.getClientId());
+                    records1.setWorkContractInfo(contractInfo);
+                }
+            }
+            //将界面需要展示数据放入类中
+            projectRecordTreeData.setId(records1.getId());
+            projectRecordTreeData.setProjectName(records1.getProjectName());
+            projectRecordTreeData.setProjectId(records1.getProjectId());
+            if(null!= records1.getWorkContractInfo()){
+                projectRecordTreeData.setContractName(records1.getWorkContractInfo().getName());
+                projectRecordTreeData.setClientName(records1.getWorkContractInfo().getClient().getName());
+            }else{
+                projectRecordTreeData.setContractName("");
+                projectRecordTreeData.setClientName("");
+            }
+            projectRecordTreeData.setProjectStatus(records1.getProjectStatus());
+            projectRecordTreeData.setProjectRegistrant(records1.getProjectRegistrant());
+            projectRecordTreeData.setCreateDate(records1.getCreateDate());
+            projectRecordTreeData.setCreateId(records1.getCreateBy().getId());
+            //父节点的pid设置为0
+            projectRecordTreeData.setPid("0");
+            //遍历项目负责人信息
+            List<User> masterUserList = records1.getProjectLeaders();
+            List<String> masterList = new ArrayList<>();
+            Set masterIdSet = new HashSet();
+            for (User masterUser:masterUserList) {
+                masterList.add(masterUser.getName());
+                masterIdSet.add(masterUser.getId());
+            }
+            masterIdSet.add(records1.getCreateBy().getId());
+            //Set转List
+            List<String> masterIdList = new ArrayList<>(masterIdSet);
+            //如果当前登录人为项目登记者或项目负责人则允许其添加子节点信息
+            for (String masterId : masterIdList) {
+                if(masterId.equals(UserUtils.getUser().getId())){
+                    projectRecordTreeData.setOperationSign(1);
+                    break;
+                }else{
+                    projectRecordTreeData.setOperationSign(0);
+                }
+            }
+
+            //项目负责人list数据转String
+            String projectLeader = masterList.toString().replaceAll("(?:\\[|null|\\]| +)", "");
+            projectRecordTreeData.setProjectLeader(projectLeader);
+            projectRecordTreeData.setLoginId(UserUtils.getUser().getId());
+            projectRecordTreeDataList.add(projectRecordTreeData);
+
+            //获取阶段Type父节点信息
+            String projectType = projectImplementEarlyService.getProjectType(records1.getProjectTypeId(), "实施前期");
+            //根据项目id查询相关的项目阶段内容
+            List<ProjectRecordTreeData> reportDataList = projectContentDataService.getProjectContentDataList(records1.getId(),projectType);
+            if(0 != reportDataList.size()){
+                Projectcontentinfo select = new Projectcontentinfo();
+                ProjectRecords project = new ProjectRecords();
+                project.setId(records1.getId());
+                select.setParentIds("0,");
+                select.setProject(project);
+                List<Projectcontentinfo> p = projectcontentinfoService.findListByProject(select);
+                for (ProjectRecordTreeData reportData : reportDataList) {
+                    //添加工作内容id
+                    if(p.size()>0){
+                        reportData.setContentPId(p.get(0).getId());
+                        reportData.setParentIds("0,");
+                        reportData.setDictType("");
+                    }
+                    //将项目所属类型名称放入树形列表的projectId中
+                    reportData.setProjectId(reportData.getProjectLeader());
+                    //添加项目负责人
+                    reportData.setProjectLeader(projectLeader);
+                    //添加登陆者id
+                    reportData.setLoginId(UserUtils.getUser().getId());
+                    reportData.setCreateId(records1.getCreateBy().getId());
+                }
+            }
+            projectRecordTreeDataList.addAll(reportDataList);
+
+        }
+        map.put("data",projectRecordTreeDataList);
+        return map;
+    }
+
+    @RequestMapping(value = {"form"})
+    public String form(Projectcontentinfo projectcontentinfo, HttpServletRequest request, HttpServletResponse response, Model model, RedirectAttributes attr) {
+        String dictType = projectcontentinfo.getDictType();
+        ProjectRecords records = projectRecordsService.getQueryProjectUsers(projectcontentinfo.getProject().getId());
+        projectcontentinfo.setProject(records);
+        if (projectcontentinfo.getView().contains("before")){
+            ProjectContentData projectContentData = new ProjectContentData();
+            projectContentData.setType(dictType);
+            if (StringUtils.isNotBlank(projectcontentinfo.getInfoId())){
+                projectContentData = projectContentDataService.get(projectcontentinfo.getInfoId());
+            }else if (projectcontentinfo.getProjectContentData()!=null && StringUtils.isNotBlank(projectcontentinfo.getProjectContentData().getId())) {
+                projectContentData = projectContentDataService.get(projectcontentinfo.getProjectContentData().getId());
+            }
+            projectContentData.setMaster(UserUtils.getUser());
+            if(StringUtils.isNotBlank(projectContentData.getId())){
+                List<ProjectControlTable> controlData = projectControlTableService.getControlData(projectContentData.getId(),"");
+                projectContentData.setProjectControlTableList(controlData);
+                projectContentDataService.queryBasedData(projectContentData);
+            }
+            projectcontentinfo.setProjectContentData(projectContentData);
+            String projectType = projectImplementEarlyService.getProjectType(records.getProjectTypeId(), "实施前期");
+            projectcontentinfo.setType(projectType);
+            model.addAttribute("projectcontentinfo", projectcontentinfo);
+            model.addAttribute("flag", "early");
+            if (projectcontentinfo.getView().equals("contentView")){
+                return "modules/projectcontentinfo/workContentView";
+            }else {
+                if (projectContentData != null && projectContentData.getCreateBy() != null && StringUtils.isNotBlank(projectContentData.getCreateBy().getId()) && projectContentData.getCreateBy().getId().equals(UserUtils.getUser().getId())) {
+                    return "modules/projectrecord/workContentFromAndView/workContentForm";
+                } else if (projectContentData == null || StringUtils.isBlank(projectContentData.getId())) {
+                    return "modules/projectrecord/workContentFromAndView/workContentForm";
+                } else {
+                    return "modules/projectcontentinfo/workContentView";
+                }
+            }
+        }else if(projectcontentinfo.getView().contains("current")){
+
+        }else if(projectcontentinfo.getView().contains("completion")){}
+        return "";
+    }
+}

+ 222 - 0
src/main/java/com/jeeplus/modules/projectrecord/web/ProjectImplementStageController.java

@@ -0,0 +1,222 @@
+package com.jeeplus.modules.projectrecord.web;
+
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectContentData;
+import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectContentDataService;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectcontentinfoService;
+import com.jeeplus.modules.projectcontroltable.entity.ProjectControlTable;
+import com.jeeplus.modules.projectcontroltable.service.ProjectControlTableService;
+import com.jeeplus.modules.projectrecord.entity.ProjectImplementEarly;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecordTreeData;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.projectrecord.service.ProjectImplementEarlyService;
+import com.jeeplus.modules.projectrecord.service.ProjectRecordsService;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientLinkman;
+import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.*;
+
+/**
+ * 项目实施阶段Controller
+ * @author 徐滕
+ * @version 2020-07-10
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/project/projectImplementStage")
+public class ProjectImplementStageController {
+
+    @Autowired
+    private ProjectImplementEarlyService projectImplementEarlyService;
+    @Autowired
+    private ProjectRecordsService projectRecordsService;
+    @Autowired
+    private ProjectcontentinfoService projectcontentinfoService;
+    @Autowired
+    private ProjectContentDataService projectContentDataService;
+    @Autowired
+    private ProjectControlTableService projectControlTableService;
+
+    @ModelAttribute
+    public ProjectImplementEarly get(@RequestParam(required=false) String id) {
+        ProjectImplementEarly entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = projectImplementEarlyService.get(id);
+        }
+        if (entity == null){
+            entity = new ProjectImplementEarly();
+        }
+        return entity;
+    }
+
+    /**
+     * 项目列表页面
+     */
+    @RequiresPermissions("project:projectImplementStage:list")
+    @RequestMapping(value = {"list", ""})
+    public String list(ProjectImplementEarly projectRecords, HttpServletRequest request, HttpServletResponse response, Model model) {
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
+        }
+        Page<ProjectImplementEarly> page = projectImplementEarlyService.findProjectPage(new Page<ProjectImplementEarly>(request, response), projectRecords);
+        //无合同状态下,获取委托方的名称
+        List<ProjectImplementEarly> list = page.getList();
+        model.addAttribute("page", page);
+        return "modules/projectrecord/implementStage/projectImplementStageList";
+    }
+
+    /**
+     * 项目列表页面
+     */
+    @RequestMapping(value = "getProjectList")
+    @ResponseBody
+    public Map<String,List> getProjectList(ProjectImplementEarly projectRecords, HttpServletRequest request, HttpServletResponse response, Model model) {
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
+        }
+        Page<ProjectImplementEarly> page = projectImplementEarlyService.findProjectPage(new Page<ProjectImplementEarly>(request, response), projectRecords);
+        //无合同状态下,获取委托方的名称
+        List<ProjectImplementEarly> list = page.getList();
+        List<ProjectRecordTreeData> projectRecordTreeDataList = new ArrayList<>();
+        Map<String,List> map = new HashMap<>();
+        for (int i = 0; i < list.size(); i++) {
+            ProjectRecordTreeData projectRecordTreeData = new ProjectRecordTreeData();
+            ProjectImplementEarly records1 = list.get(i);
+            if (records1.getWorkContractInfo() == null) {
+                if (records1.getWorkClientLinkmanList() != null && records1.getWorkClientLinkmanList().size() > 0) {
+                    WorkClientLinkman linkman = records1.getWorkClientLinkmanList().get(0);
+                    WorkContractInfo contractInfo = new WorkContractInfo();
+                    contractInfo.setClient(linkman.getClientId());
+                    records1.setWorkContractInfo(contractInfo);
+                }
+            }
+            //将界面需要展示数据放入类中
+            projectRecordTreeData.setId(records1.getId());
+            projectRecordTreeData.setProjectName(records1.getProjectName());
+            projectRecordTreeData.setProjectId(records1.getProjectId());
+            if(null!= records1.getWorkContractInfo()){
+                projectRecordTreeData.setContractName(records1.getWorkContractInfo().getName());
+                projectRecordTreeData.setClientName(records1.getWorkContractInfo().getClient().getName());
+            }else{
+                projectRecordTreeData.setContractName("");
+                projectRecordTreeData.setClientName("");
+            }
+            projectRecordTreeData.setProjectStatus(records1.getProjectStatus());
+            projectRecordTreeData.setProjectRegistrant(records1.getProjectRegistrant());
+            projectRecordTreeData.setCreateDate(records1.getCreateDate());
+            projectRecordTreeData.setCreateId(records1.getCreateBy().getId());
+            //父节点的pid设置为0
+            projectRecordTreeData.setPid("0");
+            //遍历项目负责人信息
+            List<User> masterUserList = records1.getProjectLeaders();
+            List<String> masterList = new ArrayList<>();
+            Set masterIdSet = new HashSet();
+            for (User masterUser:masterUserList) {
+                masterList.add(masterUser.getName());
+                masterIdSet.add(masterUser.getId());
+            }
+            masterIdSet.add(records1.getCreateBy().getId());
+            //Set转List
+            List<String> masterIdList = new ArrayList<>(masterIdSet);
+            //如果当前登录人为项目登记者或项目负责人则允许其添加子节点信息
+            for (String masterId : masterIdList) {
+                if(masterId.equals(UserUtils.getUser().getId())){
+                    projectRecordTreeData.setOperationSign(1);
+                    break;
+                }else{
+                    projectRecordTreeData.setOperationSign(0);
+                }
+            }
+
+            //项目负责人list数据转String
+            String projectLeader = masterList.toString().replaceAll("(?:\\[|null|\\]| +)", "");
+            projectRecordTreeData.setProjectLeader(projectLeader);
+            projectRecordTreeData.setLoginId(UserUtils.getUser().getId());
+            projectRecordTreeDataList.add(projectRecordTreeData);
+
+            //获取阶段Type父节点信息
+            String projectType = projectImplementEarlyService.getProjectType(records1.getProjectTypeId(), "实施阶段");
+            //根据项目id查询相关的项目阶段内容
+            List<ProjectRecordTreeData> reportDataList = projectContentDataService.getProjectContentDataList(records1.getId(),projectType);
+            if(0 != reportDataList.size()){
+                Projectcontentinfo select = new Projectcontentinfo();
+                ProjectRecords project = new ProjectRecords();
+                project.setId(records1.getId());
+                select.setParentIds("0,");
+                select.setProject(project);
+                List<Projectcontentinfo> p = projectcontentinfoService.findListByProject(select);
+                for (ProjectRecordTreeData reportData : reportDataList) {
+                    //添加工作内容id
+                    if(p.size()>0){
+                        reportData.setContentPId(p.get(0).getId());
+                        reportData.setParentIds("0,");
+                        reportData.setDictType("");
+                    }
+                    //将项目所属类型名称放入树形列表的projectId中
+                    reportData.setProjectId(reportData.getProjectLeader());
+                    //添加项目负责人
+                    reportData.setProjectLeader(projectLeader);
+                    //添加登陆者id
+                    reportData.setLoginId(UserUtils.getUser().getId());
+                    reportData.setCreateId(records1.getCreateBy().getId());
+                }
+            }
+            projectRecordTreeDataList.addAll(reportDataList);
+
+        }
+        map.put("data",projectRecordTreeDataList);
+        return map;
+    }
+
+    @RequestMapping(value = {"form"})
+    public String form(Projectcontentinfo projectcontentinfo, HttpServletRequest request, HttpServletResponse response, Model model, RedirectAttributes attr) {
+        String dictType = projectcontentinfo.getDictType();
+        ProjectRecords records = projectRecordsService.getQueryProjectUsers(projectcontentinfo.getProject().getId());
+        projectcontentinfo.setProject(records);
+
+
+        ProjectContentData projectContentData = new ProjectContentData();
+        projectContentData.setType(dictType);
+        if (StringUtils.isNotBlank(projectcontentinfo.getInfoId())){
+            projectContentData = projectContentDataService.get(projectcontentinfo.getInfoId());
+        }else if (projectcontentinfo.getProjectContentData()!=null && StringUtils.isNotBlank(projectcontentinfo.getProjectContentData().getId())) {
+            projectContentData = projectContentDataService.get(projectcontentinfo.getProjectContentData().getId());
+        }
+        projectContentData.setMaster(UserUtils.getUser());
+        if(StringUtils.isNotBlank(projectContentData.getId())){
+            List<ProjectControlTable> controlData = projectControlTableService.getControlData(projectContentData.getId(),"");
+            projectContentData.setProjectControlTableList(controlData);
+            projectContentDataService.queryBasedData(projectContentData);
+        }
+        projectcontentinfo.setProjectContentData(projectContentData);
+        String projectType = projectImplementEarlyService.getProjectType(records.getProjectTypeId(), "实施阶段");
+        projectcontentinfo.setType(projectType);
+        model.addAttribute("projectcontentinfo", projectcontentinfo);
+        model.addAttribute("flag", "stage");
+        if (projectcontentinfo.getView().equals("contentView")){
+            return "modules/projectcontentinfo/workContentView";
+        }else {
+            if (projectContentData != null && projectContentData.getCreateBy() != null && StringUtils.isNotBlank(projectContentData.getCreateBy().getId()) && projectContentData.getCreateBy().getId().equals(UserUtils.getUser().getId())) {
+                return "modules/projectrecord/workContentFromAndView/workContentForm";
+            } else if (projectContentData == null || StringUtils.isBlank(projectContentData.getId())) {
+                return "modules/projectrecord/workContentFromAndView/workContentForm";
+            } else {
+                return "modules/projectcontentinfo/workContentView";
+            }
+        }
+    }
+}

+ 4 - 0
src/main/java/com/jeeplus/modules/workcontent/dao/WorkContentTypeDao.java

@@ -8,6 +8,7 @@ import com.jeeplus.common.persistence.annotation.MyBatisDao;
 import com.jeeplus.modules.sys.entity.Office;
 import com.jeeplus.modules.workcontent.entity.WorkContentCompanyType;
 import com.jeeplus.modules.workcontent.entity.WorkContentType;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -26,4 +27,7 @@ public interface WorkContentTypeDao extends CrudDao<WorkContentType> {
     void batchInsertComType(List<WorkContentCompanyType> list);
     List<WorkContentType> findProjectList(WorkContentType workContentType);
 
+    WorkContentType getProjectTypeName(@Param("propertyName") String propertyName, @Param("value") Object value);
+
+    List<WorkContentType> getProjectTypeList(WorkContentType workContentType);
 }

+ 25 - 0
src/main/java/com/jeeplus/modules/workcontent/service/WorkContentTypeService.java

@@ -48,6 +48,27 @@ public class WorkContentTypeService extends CrudService<WorkContentTypeDao, Work
         }
         return list;
     }
+
+	@Transactional(readOnly = false)
+	public List<WorkContentType> getProjectTypeList(WorkContentType workContentType) {
+        List<WorkContentType> list = dao.getProjectTypeList(workContentType);
+        if (list==null||list.isEmpty()){
+            int count = dao.countContentType(workContentType.getCompany());
+            if(count==0){
+                list = dao.findAllList(new WorkContentType());
+                List<WorkContentCompanyType> workContentCompanyTypeList = new ArrayList<>(list.size());
+                for (WorkContentType contentType : list) {
+                    WorkContentCompanyType companyType = new WorkContentCompanyType();
+                    workContentCompanyTypeList.add(companyType);
+                    companyType.setCompany(workContentType.getCompany());
+                    companyType.setTypeId(contentType.getTypeId());
+                    companyType.setDelFlag("0");
+                }
+                dao.batchInsertComType(workContentCompanyTypeList);
+            }
+        }
+        return list;
+    }
     @Transactional(readOnly = false)
     public List<WorkContentType> findProjectList(WorkContentType workContentType) {
         List<WorkContentType> list = dao.findProjectList(workContentType);
@@ -100,4 +121,8 @@ public class WorkContentTypeService extends CrudService<WorkContentTypeDao, Work
 	    dao.changeStatus(workContentType);
         return msg;
     }
+
+    public WorkContentType getProjectTypeName(String propertyName,Object value){
+	    return dao.getProjectTypeName(propertyName,value);
+    }
 }

+ 32 - 0
src/main/java/com/jeeplus/modules/workcontent/web/WorkContentTypeController.java

@@ -226,6 +226,38 @@ public class WorkContentTypeController extends BaseController {
 		}*/
         return list;
     }
+
+	/**
+	 * 根据需求获取内容类型Label
+	 * @param typeId
+	 * @param defaultVal
+	 * @return
+	 */
+	public static String getProjectTypeName(String typeId,String defaultVal){
+		if (StringUtils.isNotBlank(typeId)) {
+			WorkContentType contentType = workContentTypeService.getProjectTypeName("type_id", typeId);
+			if (contentType != null) {
+				return contentType.getTypeName();
+			}
+		}
+		return defaultVal;
+	}
+
+	/**
+	 * 根据需求获取当前公司的内容类型
+	 * @param parentId
+	 * @return
+	 */
+	public static List<WorkContentType> getContentTypeByProjectType(String parentId){
+	    WorkContentType workContentType = new WorkContentType();
+        Office company = UserUtils.getSelectCompany();
+        workContentType.setCompany(company);
+        workContentType.setParentId(parentId);
+        workContentType.setDelFlag(WorkContentType.DEL_FLAG_NORMAL);
+		List<WorkContentType> list = workContentTypeService.getProjectTypeList(workContentType);
+        return list;
+    }
+
 	public static List<WorkContentType> getProjectContentType(String parentId,String projectId){
 		WorkContentType workContentType = new WorkContentType();
 		Office company = UserUtils.getSelectCompany();

+ 7 - 0
src/main/resources/mappings/modules/projectType/ProjectTypeDao.xml

@@ -159,4 +159,11 @@
 		select type_id as "typeId",type_name as "typeName" from project_type where parent_id="0"
 	</select>
 
+	<select id="getProjectTypeByParentId" resultType="java.lang.String">
+		select type_id typeId from project_type
+		where parent_id = #{parentId}
+			and del_flag=0
+			and type_name LIKE concat('%',#{typeName},'%')
+	</select>
+
 </mapper>

+ 15 - 0
src/main/resources/mappings/modules/projectcontentinfo/ProjectContentDataDao.xml

@@ -286,4 +286,19 @@
     <select id="findByLinkId" resultType="java.lang.String">
         SELECT id FROM project_content_info WHERE info_id = #{contentId} and project_id = #{projectId}
     </select>
+
+
+	<select id="getProjectContentDataList" resultType="com.jeeplus.modules.projectrecord.entity.ProjectRecordTreeData">
+		select a.id as "id", a.create_by as "createBy.id", a.create_date as "createDate",
+		a.project_id as "pid", a.name as "projectName", "" as projectId,
+		"0" as projectStatus,su.name as "projectRegistrant" ,
+		pt.type_name as projectLeader,
+		ppt.type_name as clientName
+		from project_content_data a
+		left join sys_user su on su.id = a.create_by
+		left join project_type pt on a.type = pt.id
+		left join project_type ppt on pt.parent_id = ppt.id
+		left join project_type ptd on a.type = ptd.type_id
+		where a.project_id = #{projectId} and ptd.parent_id =#{projectTypeParentId} and a.del_flag = 0 order by a.update_date desc
+	</select>
 </mapper>

+ 214 - 0
src/main/resources/mappings/modules/projectrecord/ProjectImplementEarlyDao.xml

@@ -0,0 +1,214 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.modules.projectrecord.dao.ProjectImplementEarlyDao">
+
+	<sql id="projectRecordsColumns">
+		a.id AS "id",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.del_flag AS "delFlag",
+		a.contract_id AS "workContractInfo.id",
+		a.project_id AS "projectId",
+		a.project_name AS "projectName",
+		a.scale_type AS "scaleType",
+		a.scale_unit AS "scaleUnit",
+		a.scale_quantity AS "scaleQuantity",
+		a.area_id AS "area.id",
+		a.project_site AS "projectSite",
+		a.project_desc AS "projectDesc",
+		a.remarks AS "remarks",
+		a.status AS "projectStatus",
+		a.process_instance_id AS "processInstanceId",
+		a.company_id AS "company.id",
+		a.office_id AS "office.id",
+		a.alter_process_id AS "alterProcessId",
+		area.name AS "area.name",
+		a.province,
+		a.city,
+		a.area_name AS "county",
+		a.project_structure AS "projectStructure",
+		a.on_ground_num AS "onGroundNum",
+		a.under_ground_num AS "underGroundNum",
+		a.building_scale AS "buildingScale",
+		a.measuring_unit AS "measuringUnit",
+		a.project_use AS "projectUse",
+		a.install_fees AS "installFees",
+		a.building_fees AS "buildingFees",
+		a.building_percent AS "buildingPercent",
+		a.install_percent AS "installPercent",
+		a.unit_fees AS "unitFees",
+		a.building_unit_fees AS "buildingUnitFees",
+		a.install_unit_fees AS "installUnitFees",
+		a.total_fees AS "totalFees",
+		a.type_id As "projectTypeId"
+	</sql>
+	
+	<sql id="projectRecordsJoins">
+		LEFT JOIN sys_area area ON area.id = a.area_id
+	</sql>
+	
+	<select id="getProjectRecodesList" resultType="ProjectImplementEarly" >
+		SELECT
+			<include refid="projectRecordsColumns"/>
+		,
+		wci.name AS "workContractInfo.name",
+		wct.id AS "workContractInfo.client.id",
+		wct.name AS "workContractInfo.client.name",
+		o.top_company AS "office.name",
+		dsu.name as "projectRegistrant"
+		FROM project_records a
+		<include refid="projectRecordsJoins"/>
+
+
+		LEFT JOIN work_project_user w on a.id = w.project_id
+		LEFT JOIN sys_user su on w.user_id = su.id
+		LEFT JOIN sys_user dsu on a.create_by = dsu.id
+        LEFT JOIN work_project_user w1 on a.id = w1.project_id
+		LEFT JOIN work_contract_info wci on a.contract_id = wci.id
+		LEFT JOIN work_client_info wct on wci.client_id = wct.id
+        LEFT JOIN sys_office o ON o.id = a.office_id
+		<where>
+			a.status = 5
+            AND a.del_flag = 0
+			<if test="projectId != null and projectId != ''">
+				AND a.project_id like concat('%',#{projectId},'%')
+			</if>
+			<if test="projectName != null and projectName != ''">
+				AND a.project_name like concat(concat('%',#{projectName}),'%')
+			</if>
+			<if test="scaleType != null and scaleType != ''">
+				AND a.scale_type = #{scaleType}
+			</if>
+			<if test="scaleUnit != null and scaleUnit != ''">
+				AND a.scale_unit = #{scaleUnit}
+			</if>
+			<if test="scaleQuantity != null and scaleQuantity != ''">
+				AND a.scale_quantity = #{scaleQuantity}
+			</if>
+			<if test="projectSite != null and projectSite != ''">
+				AND a.project_site LIKE concat('%',#{projectSite},'%')
+			</if>
+			<if test="remarks != null and remarks != ''">
+				AND a.remarks LIKE concat('%',#{remarks},'%')
+			</if>
+			<if test="projectDesc != null and projectDesc != ''">
+				AND a.project_desc LIKE concat('%',#{projectDesc},'%')
+			</if>
+			<if test="area != null and area.id != null and area.id != ''">
+				AND a.area_id = #{area.id}
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.name !=null and workContractInfo.name !=''">
+				AND wci.name like concat(concat('%',#{workContractInfo.name}),'%')
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractNum !=null and workContractInfo.contractNum !=''">
+				AND wci.contract_num like concat(concat('%',#{workContractInfo.contractNum}),'%')
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractPrice !=null and workContractInfo.contractPrice !=''">
+				AND wci.contract_price = #{workContractInfo.contractPrice}
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractType !=null and workContractInfo.contractType !=''">
+				AND wci.contract_type = #{workContractInfo.contractType}
+			</if>
+			<if test="workContractInfo!=null and workContractInfo.client !=null and workContractInfo.client.name !=null and workContractInfo.client.name !=''">
+				AND wct.name like concat(concat('%',#{workContractInfo.client.name}),'%')
+			</if>
+			<if test="leaderNameStr !=null and leaderNameStr !=''">
+				AND su.name like concat(concat('%',#{leaderNameStr}),'%') AND w.is_master = '1' AND w.del_flag='0'
+			</if>
+			<if test="beginDate !=null">
+				AND a.create_date >= #{beginDate}
+			</if>
+			<if test="endDate !=null">
+				AND a.create_date &lt; #{endDate}
+			</if>
+            <if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+               AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
+            </if>
+		</where>
+            GROUP BY a.id
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+
+    <select id="getProjectRecodesCount" resultType="int" >
+        SELECT count(DISTINCT a.id)
+        FROM project_records a
+        <if test="leaderNameStr !=null and leaderNameStr !=''">
+            LEFT JOIN work_project_user w on a.id = w.project_id
+            LEFT JOIN sys_user su on w.user_id = su.id
+        </if>
+        LEFT JOIN work_project_user w1 on a.id = w1.project_id
+        <if test="workContractInfo !=null">
+            LEFT JOIN work_contract_info wci on a.contract_id = wci.id
+        </if>
+        <if test="workContractInfo!=null and workContractInfo.client !=null and workContractInfo.client.name !=null and workContractInfo.client.name !=''">
+            LEFT JOIN work_client_info wct on wci.client_id = wct.id
+        </if>
+        <where>
+			a.status = 5
+            AND a.del_flag = 0
+			<if test="projectId != null and projectId != ''">
+				AND a.project_id like concat('%',#{projectId},'%')
+			</if>
+			<if test="projectName != null and projectName != ''">
+				AND a.project_name like concat(concat('%',#{projectName}),'%')
+			</if>
+			<if test="scaleType != null and scaleType != ''">
+				AND a.scale_type = #{scaleType}
+			</if>
+			<if test="scaleUnit != null and scaleUnit != ''">
+				AND a.scale_unit = #{scaleUnit}
+			</if>
+			<if test="scaleQuantity != null and scaleQuantity != ''">
+				AND a.scale_quantity = #{scaleQuantity}
+			</if>
+			<if test="projectSite != null and projectSite != ''">
+				AND a.project_site LIKE concat('%',#{projectSite},'%')
+			</if>
+			<if test="remarks != null and remarks != ''">
+				AND a.remarks LIKE concat('%',#{remarks},'%')
+			</if>
+			<if test="projectDesc != null and projectDesc != ''">
+				AND a.project_desc LIKE concat('%',#{projectDesc},'%')
+			</if>
+			<if test="area != null and area.id != null and area.id != ''">
+				AND a.area_id = #{area.id}
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.name !=null and workContractInfo.name !=''">
+				AND wci.name like concat(concat('%',#{workContractInfo.name}),'%')
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractNum !=null and workContractInfo.contractNum !=''">
+				AND wci.contract_num like concat(concat('%',#{workContractInfo.contractNum}),'%')
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractPrice !=null and workContractInfo.contractPrice !=''">
+				AND wci.contract_price = #{workContractInfo.contractPrice}
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractType !=null and workContractInfo.contractType !=''">
+				AND wci.contract_type = #{workContractInfo.contractType}
+			</if>
+			<if test="workContractInfo!=null and workContractInfo.client !=null and workContractInfo.client.name !=null and workContractInfo.client.name !=''">
+				AND wct.name like concat(concat('%',#{workContractInfo.client.name}),'%')
+			</if>
+			<if test="leaderNameStr !=null and leaderNameStr !=''">
+				AND su.name like concat(concat('%',#{leaderNameStr}),'%') AND w.is_master = '1' AND w.del_flag='0'
+			</if>
+			<if test="beginDate !=null">
+				AND a.create_date >= #{beginDate}
+			</if>
+			<if test="endDate !=null">
+				AND a.create_date &lt; #{endDate}
+			</if>
+            <if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+                AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id})${sqlMap.dsf} )
+            </if>
+        </where>
+    </select>
+</mapper>

+ 37 - 0
src/main/resources/mappings/modules/workcontent/WorkContentTypeDao.xml

@@ -154,6 +154,11 @@
 		select * FROM work_content_type  where ${propertyName} = '${value}'
 	</select>
 
+	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
+	<select id="getProjectTypeName" resultType="WorkContentType" statementType="STATEMENT">
+		select * FROM project_type where ${propertyName} = '${value}'
+	</select>
+
     <select id="countContentType" resultType="int">
         SELECT count(*) from work_content_type_company WHERE com_id = #{id}
     </select>
@@ -165,4 +170,36 @@
             (#{item.typeId},#{item.company.id},'0')
         </foreach>
     </insert>
+
+	<select id="getProjectTypeList" resultType="WorkContentType" >
+		SELECT DISTINCT
+			a.id AS "id",
+			a.create_by AS "createBy.id",
+			a.create_date AS "createDate",
+			a.update_by AS "updateBy.id",
+			a.update_date AS "updateDate",
+			a.remarks AS "remarks",
+			a.type_id AS "typeId",
+			a.type_name AS "typeName",
+			a.parent_id AS "parentId",
+			a.parent_ids AS "parentIds"
+		FROM project_type a
+		<where>
+			a.del_flag = '0'
+			<if test="typeId !=null and typeId != ''">
+				AND a.type_id = #{typeId}
+			</if>
+			<if test="typeName != null and typeName != ''">
+				AND (a.type_name LIKE concat('%',#{typeName},'%') OR a.parent_id ='0')
+			</if>
+			<if test="parentId !=null and parentId !=''">
+				AND a.parent_id = #{parentId}
+			</if>
+		</where>
+		<choose>
+			<otherwise>
+				ORDER BY a.type_id
+			</otherwise>
+		</choose>
+	</select>
 </mapper>

+ 18 - 0
src/main/webapp/WEB-INF/tlds/fns.tld

@@ -351,6 +351,24 @@
         <function-signature>java.util.List getContentType(java.lang.String)</function-signature>
         <example>${fns:getContentTypeList(parentId)}</example>
     </function>
+
+
+  <function>
+    <description>根据需求获取内容类型Label</description>
+    <name>getProjectTypeName</name>
+    <function-class>com.jeeplus.modules.workcontent.web.WorkContentTypeController</function-class>
+    <function-signature>java.lang.String getProjectTypeName(java.lang.String,java.lang.String)</function-signature>
+    <example>${fns:getContentTypeName(typeId,default)}</example>
+  </function>
+
+  <function>
+    <description>根据需求获取当前公司的内容类型</description>
+    <name>getContentTypeByProjectType</name>
+    <function-class>com.jeeplus.modules.workcontent.web.WorkContentTypeController</function-class>
+    <function-signature>java.util.List getContentTypeByProjectType(java.lang.String)</function-signature>
+    <example>${fns:getContentTypeList(parentId)}</example>
+  </function>
+
   <function>
     <description>获取当前项目的内容类型</description>
     <name>getProjectContentTypeList</name>

+ 1 - 0
src/main/webapp/webpage/modules/projectcontentinfo/workContentForm.jsp

@@ -491,6 +491,7 @@
             <form:hidden path="id"/>
             <form:hidden path="edit"/>
             <form:hidden path="parentIds"/>
+            <form:hidden path="condition"/>
             <form:hidden path="project.id"/>
             <form:hidden path="projectContentData.id"/>
             <input type="hidden" id="contentDeta" name="projectContentData.contentDetail">

+ 521 - 0
src/main/webapp/webpage/modules/projectrecord/implementCompletion/projectImplementCompletionList.jsp

@@ -0,0 +1,521 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>项目登记</title>
+	<meta name="decorator" content="default"/>
+    <link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
+    <style>
+        .layui-table th{
+            font-size: 14px;
+            /*表头内容居中显示*/
+            text-align: center;
+        }
+		.pid{
+			font-size:14px;
+			font-weight:400;
+		}
+    </style>
+	<script type="text/javascript">
+        $(document).ready(function() {
+
+            //搜索框收放
+            $('#moresee').click(function(){
+                if($('#moresees').is(':visible'))
+                {
+                    $('#moresees').slideUp(0,resizeListWindow2);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+                }else{
+                    $('#moresees').slideDown(0,resizeListWindow2);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+                }
+            });
+            laydate.render({
+                elem: '#beginDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+            laydate.render({
+                elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+        });
+
+        function reset() {
+            $("#searchForm").resetForm();
+        }
+
+        function openDialog(title,url,width,height,target) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                content: url,
+                skin: 'three-btns',
+                btn: ['送审', '暂存', '关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }else {
+                        return false;
+                    }
+                },
+                btn3: function (index) {
+                }
+            });
+        }
+
+        function openDialogre(title,url,width,height,target,buttons) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            var split = buttons.split(",");
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                skin: 'three-btns',
+                content: url,
+                btn: split,
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    if(split.length==2){return}
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }else {
+                        return false;
+                    }
+                },
+                btn3: function (index) {
+                }
+            });
+        }
+	</script>
+	<style>
+		body{
+			background-color:transparent;
+			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+			color:#ffffff;
+			background-color:rgba(255,255,255,0);
+			height:100%;
+		}
+	</style>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+	<div class="layui-row">
+		<div class="full-width fl">
+			<div class="layui-row contentShadow shadowLR" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="projectImplementEarly" action="${ctx}/project/projectImplementCompletion/" method="post" class="form-inline">
+					<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+					<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+					<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+					<div class="commonQuery lw6">
+						<div class="layui-item query athird">
+							<label class="layui-form-label">项目名称:</label>
+							<div class="layui-input-block">
+								<form:input path="projectName" htmlEscape="false" maxlength="64"  class=" form-control  layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">项目负责人:</label>
+							<div class="layui-input-block">
+								<form:input path="leaderNameStr" htmlEscape="false" maxlength="255"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item athird">
+							<div class="input-group">
+								<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+								<button id="searchReset" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>
+								<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
+							</div>
+						</div>
+						<div style="    clear:both;"></div>
+					</div>
+					<div id="moresees" style="clear:both;display:none;" class="lw6">
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">合同名称:</label>
+							<div class="layui-input-block">
+								<input type="text" input="workContractInfoName" name="workContractInfo.name" value="" htmlEscape="false" maxlength="255"  class=" form-control layui-input">
+							</div>
+						</div>
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">委托方:</label>
+							<div class="layui-input-block">
+								<input type="text" input="workContractInfoClientName" name="workContractInfo.client.name" value="" htmlEscape="false" maxlength="255"  class=" form-control layui-input">
+							</div>
+						</div>
+						<div style="clear:both;"></div>
+					</div>
+				</form:form>
+			</div>
+		</div>
+		<div class="full-width fl">
+			<div class="layui-form contentDetails contentShadow shadowLBR">
+				<div class="nav-btns">
+					<button class="nav-btn layui-btn" id="btn-expand">全部展开</button>
+					<button class="nav-btn layui-btn-warm" id="btn-fold">全部折叠</button>
+					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
+
+                    <div style="clear: both;"></div>
+				</div>
+                <table id="permissionTable" class="layui-table" lay-filter="permissionTable"></table>
+				<!-- 分页代码 -->
+				<table:page page="${page}"></table:page>
+				<div style="clear: both;"></div>
+			</div>
+		</div>
+	</div>
+	<div id="changewidth"></div>
+</div>
+
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+
+    resizeListTable();
+    $("a").on("click",addLinkVisied);
+</script>
+<script>
+    resizeListWindow2();
+    $(window).resize(function(){
+        resizeListWindow2();
+    });
+</script>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script src="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.js" charset="utf-8"></script>
+<script>
+    /*使用模块加载的方式 加载文件*/
+    layui.config({
+        base: '${ctx}/resoueces/css/layui/module/'
+    }).extend({
+        treetable: 'treetable-lay/treetable'
+    }).use(['layer', 'table', 'treetable'], function () {
+        var $ = layui.jquery;
+        var table = layui.table;
+        var layer = layui.layer;
+        var treetable = layui.treetable;
+
+        // 渲染表格
+        var renderTable = function () {
+        	var projectName = $("#projectName").val();
+        	var workContractInfoName = $("#workContractInfoName").val();
+        	var workContractInfoClientName = $("#workContractInfoClientName").val();
+        	if(undefined == workContractInfoName){
+				workContractInfoName = "";
+			}
+        	if(undefined == workContractInfoClientName){
+				workContractInfoClientName = "";
+			}
+            layer.load(2);
+            treetable.render({
+                treeColIndex: 1,//树形图标显示在第几列
+                treeSpid: 0,//最上级的父级id
+                treeIdName: 'permissionId',//id字段的名称
+                treePidName: 'pid',//pid字段的名称
+                treeDefaultClose: true,//是否默认折叠
+                treeLinkage: true,//父级展开时是否自动展开所有子级
+                elem: '#permissionTable',
+                url: '${ctx}/project/projectImplementCompletion/getProjectList?projectId=${projectRecords.id}&pageNo=${page.pageNo}&projectName='+$("#projectName").val()+'&leaderNameStr='+$("#leaderNameStr").val()+'&workContractInfo.name='+workContractInfoName+'&workContractInfo.client.name='+workContractInfoClientName,
+                page: false,
+                cols: [[
+                    {type: 'numbers', align:'center', title: '序号' ,width:80},
+                    {field: 'projectId', title: '项目编号/当前阶段'},
+                    {field: 'projectName', align:'center', title: '项目名称/工作内容',templet:function(d){
+                    	if(0 == d.pid){
+							return "<a class=\"attention-info pid\" title=\"" + d.projectName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/project/projectRecords/view?id=" + d.id +"','95%', '95%')\">" + d.projectName + "</a>";
+						}else{
+							return "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看工作内容', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=contentView&dictType=&id="+d.contentPId+"&parentIds="+d.parentIds+"&infoId="+d.id+"','95%', '95%')\">" + d.projectName + "</a>";
+						}
+						}},
+					/*{field: 'clientName', align:'center', title: '委托方/当前阶段',templet: function(d){
+							if(0 == d.pid){
+								return "<font style = 'font-size:14px;font-weight:500;'>"+d.clientName+"</font>";
+							}else{
+								return "<font>"+d.clientName+"</font>";
+							}
+						}},*/
+                    {field: 'projectLeader', align:'center', title: '项目负责人',templet: function(d){
+							if(0 == d.pid){
+								return "<font style = 'font-size:14px;font-weight:500;'>"+d.projectLeader+"</font>";
+							}else{
+								return "<font>"+d.projectLeader+"</font>";
+							}
+						}},
+                    {field: 'projectRegistrant', align:'center', title: '登记人',templet: function(d){
+							if(0 == d.pid){
+								return "<font style = 'font-size:14px;font-weight:500;'>"+d.projectRegistrant+"</font>";
+							}else{
+								return "<font>"+d.projectRegistrant+"</font>";
+							}
+						}},
+                    {field: 'createDate', align:'center', title: '登记日期',width:100,templet: function(d){
+							var date=d.createDate;
+							date=date.replace(new RegExp(/-/gm) ,"/");
+
+							if(0 == d.pid){
+								return "<font style = 'font-size:14px;font-weight:500;'>"+layui.util.toDateString(date,'yyyy-MM-dd')+"</font>";
+							}else{
+								return "<font>"+layui.util.toDateString(date,'yyyy-MM-dd')+"</font>";
+							}
+						}},
+					/*{align:'center', title: '状态',  width:70,templet:function(d){
+							var st = getAuditState(""+d.projectStatus);
+							if(d.pid ==0){
+								if(st.action)
+									var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/project/projectRecords/getProcess?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								else
+									var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								return xml;
+							}else if(d.pid !=0){
+								if(st.action)
+									var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/projectcontentinfo/projectcontentinfo/getProcessOne?id=" + d.id + "&projectReportData.id="+ d.id + "&type="+d.projectStatus+"','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								else
+									var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								return xml;
+							}else{
+								return '';
+							}
+						}},*/
+                    {templet: complain, align:'center', title: '操作',width:130}
+                ]],
+                done: function () {
+                    layer.closeAll('loading');
+                }
+            });
+        };
+
+        renderTable();
+
+        //触发三个button按钮
+        $('#btn-expand').click(function () {
+            treetable.expandAll('#permissionTable');
+        });
+
+        $('#btn-fold').click(function () {
+            treetable.foldAll('#permissionTable');
+        });
+
+        $('#btn-refresh').click(function () {
+            renderTable();
+        });
+
+
+        function complain(d){//操作中显示的内容
+			if(1 == d.operationSign) {
+					return [
+						'<a href="javascript:void(0)" onclick="openDialogreAudit(\'新增工作内容\', \'${ctx}/project/projectImplementCompletion/form?view=before&dictType=&parentIds=&project.id=' + d.id +'\',\'95%\',\'95%\')" style=\"color: white;background: darkseagreen\" class="op-btn op-btn-add" ><i class="fa fa-plus"></i> 新增</a>',
+					].join('');
+			} else if (d.pid!="0"){
+					//子级内容
+					return [
+						'<a href="javascript:void(0)" onclick="openDialogreAudit(\'修改工作内容\', \'${ctx}/projectcontentinfo/projectcontentinfo/form?view=content&condition=early&dictType=&id='+d.contentPId+'&parentIds='+d.parentIds+'&infoId='+d.id+'\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 修改</a>',
+						/*'<a href="${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+d.id+'&id='+d.contentPId+'&type=8&condition=record" onclick="return confirmxRefresh(\'确认要删除该工作内容报告吗?\', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>',*/
+					].join('');
+				}else{
+				return[''].join('');
+			}
+        }
+        //监听工具条
+        table.on('tool(permissionTable)', function (obj) {
+            var data = obj.data;
+            var layEvent = obj.event;
+            if(data.permissionName!=null){
+                if (layEvent === 'del') {
+                    layer.msg('删除' + data.id);
+                } else if (layEvent === 'edit') {
+                    layer.msg('修改' + data.id);
+                }
+            }
+        });
+    });
+
+</script>
+<script>
+	function openDialogres(title,url,width,height,target){
+
+		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			width='auto';
+			height='auto';
+		}else{//如果是PC端,根据用户设置的width和height显示。
+
+		}
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			skin: 'three-btns',
+			maxmin: true, //开启最大化最小化按钮
+			content: url ,
+			btn: ['提交','暂存','关闭'],
+			btn1: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+				}
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				if(iframeWin.contentWindow.doSubmit(1) ){
+					//top.layer.close(index);//关闭对话框。
+					setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+				}
+			},
+			btn2:function(index,layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+				}
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				if(iframeWin.contentWindow.doSubmit(2) ){
+					// top.layer.close(index);//关闭对话框。
+					setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+				}
+				return false;
+			},
+			btn3: function(index){
+			}
+		});
+	}
+	function openDialogreAudit(title,url,width,height,target){
+
+		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			width='auto';
+			height='auto';
+		}else{//如果是PC端,根据用户设置的width和height显示。
+
+		}
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			skin: 'three-btns',
+			maxmin: true, //开启最大化最小化按钮
+			content: url ,
+			btn: ['提交','关闭'],
+			btn1: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+				}
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				if(iframeWin.contentWindow.doSubmit(1) ){
+					top.layer.close(index);//关闭对话框。
+					setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+				}
+			},
+			btn2: function(index){
+			}
+		});
+	}
+	// 确认对话框
+	function confirmxRefresh(mess, href){
+		top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
+			//do something
+			if (typeof href == 'function') {
+				href();
+			}else{
+				resetTip(); //loading();
+				$.ajax({
+					url:href,
+					data:$('#loginForm').serialize(),
+					type:"post",
+					success:function(data){
+						if(data.status){
+							parent.layer.msg(data.msg,{icon:1});
+						}else {
+							parent.layer.msg(data.msg,{icon:2});
+						}
+						//parent.refreshTrees();
+						location = '${ctx}/project/projectRecords/list';
+					}
+				});
+			}
+			top.layer.close(index);
+		});
+		return false;
+	}
+</script>
+</body>
+</html>

+ 542 - 0
src/main/webapp/webpage/modules/projectrecord/implementEarly/projectImplementEarlyList.jsp

@@ -0,0 +1,542 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>项目登记</title>
+	<meta name="decorator" content="default"/>
+    <link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
+	<%--<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>--%>
+    <style>
+        .layui-table th{
+            font-size: 14px;
+            /*表头内容居中显示*/
+            text-align: center;
+        }
+		.pid{
+			font-size:14px;
+			font-weight:400;
+		}
+    </style>
+	<script type="text/javascript">
+        $(document).ready(function() {
+
+            //搜索框收放
+            $('#moresee').click(function(){
+                if($('#moresees').is(':visible'))
+                {
+                    $('#moresees').slideUp(0,resizeListWindow2);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+                }else{
+                    $('#moresees').slideDown(0,resizeListWindow2);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+                }
+            });
+            laydate.render({
+                elem: '#beginDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+            laydate.render({
+                elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+        });
+
+        function reset() {
+            $("#searchForm").resetForm();
+        }
+
+        function openDialog(title,url,width,height,target) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                content: url,
+                skin: 'three-btns',
+                btn: ['送审', '暂存', '关闭'],
+                /*yes: function (index, layero) {
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if (target) {
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    } else {
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target", top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+
+                    if (iframeWin.contentWindow.doSubmit()) {
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function () {
+                            top.layer.close(index)
+                        }, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+
+                },*/
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }else {
+                        return false;
+                    }
+                },
+                btn3: function (index) {
+                }
+            });
+        }
+
+        function openDialogre(title,url,width,height,target,buttons) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            var split = buttons.split(",");
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                skin: 'three-btns',
+                content: url,
+                btn: split,
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    if(split.length==2){return}
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }else {
+                        return false;
+                    }
+                },
+                btn3: function (index) {
+                }
+            });
+        }
+	</script>
+	<style>
+		body{
+			background-color:transparent;
+			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+			color:#ffffff;
+			background-color:rgba(255,255,255,0);
+			height:100%;
+		}
+	</style>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+	<div class="layui-row">
+		<div class="full-width fl">
+			<div class="layui-row contentShadow shadowLR" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="projectImplementEarly" action="${ctx}/project/projectImplementEarly/" method="post" class="form-inline">
+					<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+					<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+					<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+					<div class="commonQuery lw6">
+						<div class="layui-item query athird">
+							<label class="layui-form-label">项目名称:</label>
+							<div class="layui-input-block">
+								<form:input path="projectName" htmlEscape="false" maxlength="64"  class=" form-control  layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">项目负责人:</label>
+							<div class="layui-input-block">
+								<form:input path="leaderNameStr" htmlEscape="false" maxlength="255"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item athird">
+							<div class="input-group">
+								<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+								<button id="searchReset" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>
+								<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
+							</div>
+						</div>
+						<div style="    clear:both;"></div>
+					</div>
+					<div id="moresees" style="clear:both;display:none;" class="lw6">
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">合同名称:</label>
+							<div class="layui-input-block">
+								<input type="text" input="workContractInfoName" name="workContractInfo.name" value="" htmlEscape="false" maxlength="255"  class=" form-control layui-input">
+							</div>
+						</div>
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">委托方:</label>
+							<div class="layui-input-block">
+								<input type="text" input="workContractInfoClientName" name="workContractInfo.client.name" value="" htmlEscape="false" maxlength="255"  class=" form-control layui-input">
+							</div>
+						</div>
+						<div style="clear:both;"></div>
+					</div>
+				</form:form>
+			</div>
+		</div>
+		<div class="full-width fl">
+			<div class="layui-form contentDetails contentShadow shadowLBR">
+				<div class="nav-btns">
+					<button class="nav-btn layui-btn" id="btn-expand">全部展开</button>
+					<button class="nav-btn layui-btn-warm" id="btn-fold">全部折叠</button>
+					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
+
+                    <div style="clear: both;"></div>
+				</div>
+                <table id="permissionTable" class="layui-table" lay-filter="permissionTable"></table>
+				<!-- 分页代码 -->
+				<table:page page="${page}"></table:page>
+				<div style="clear: both;"></div>
+			</div>
+		</div>
+	</div>
+	<div id="changewidth"></div>
+</div>
+
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+
+    resizeListTable();
+    $("a").on("click",addLinkVisied);
+</script>
+<script>
+    resizeListWindow2();
+    $(window).resize(function(){
+        resizeListWindow2();
+    });
+</script>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script src="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.js" charset="utf-8"></script>
+<script>
+    /*使用模块加载的方式 加载文件*/
+    layui.config({
+        base: '${ctx}/resoueces/css/layui/module/'
+    }).extend({
+        treetable: 'treetable-lay/treetable'
+    }).use(['layer', 'table', 'treetable'], function () {
+        var $ = layui.jquery;
+        var table = layui.table;
+        var layer = layui.layer;
+        var treetable = layui.treetable;
+
+        // 渲染表格
+        var renderTable = function () {
+        	var projectName = $("#projectName").val();
+        	var workContractInfoName = $("#workContractInfoName").val();
+        	var workContractInfoClientName = $("#workContractInfoClientName").val();
+        	if(undefined == workContractInfoName){
+				workContractInfoName = "";
+			}
+        	if(undefined == workContractInfoClientName){
+				workContractInfoClientName = "";
+			}
+            layer.load(2);
+            treetable.render({
+                treeColIndex: 1,//树形图标显示在第几列
+                treeSpid: 0,//最上级的父级id
+                treeIdName: 'permissionId',//id字段的名称
+                treePidName: 'pid',//pid字段的名称
+                treeDefaultClose: true,//是否默认折叠
+                treeLinkage: true,//父级展开时是否自动展开所有子级
+                elem: '#permissionTable',
+                url: '${ctx}/project/projectImplementEarly/getProjectList?projectId=${projectRecords.id}&pageNo=${page.pageNo}&projectName='+$("#projectName").val()+'&leaderNameStr='+$("#leaderNameStr").val()+'&workContractInfo.name='+workContractInfoName+'&workContractInfo.client.name='+workContractInfoClientName,
+                page: false,
+                cols: [[
+                    {type: 'numbers', align:'center', title: '序号' ,width:80},
+                    {field: 'projectId', title: '项目编号/当前阶段'},
+                    {field: 'projectName', align:'center', title: '项目名称/工作内容',templet:function(d){
+                    	if(0 == d.pid){
+							return "<a class=\"attention-info pid\" title=\"" + d.projectName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/project/projectRecords/view?id=" + d.id +"','95%', '95%')\">" + d.projectName + "</a>";
+						}else{
+							return "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看工作内容', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=contentView&dictType=&id="+d.contentPId+"&parentIds="+d.parentIds+"&infoId="+d.id+"','95%', '95%')\">" + d.projectName + "</a>";
+						}
+						}},
+					/*{field: 'clientName', align:'center', title: '委托方/当前阶段',templet: function(d){
+							if(0 == d.pid){
+								return "<font style = 'font-size:14px;font-weight:500;'>"+d.clientName+"</font>";
+							}else{
+								return "<font>"+d.clientName+"</font>";
+							}
+						}},*/
+                    {field: 'projectLeader', align:'center', title: '项目负责人',templet: function(d){
+							if(0 == d.pid){
+								return "<font style = 'font-size:14px;font-weight:500;'>"+d.projectLeader+"</font>";
+							}else{
+								return "<font>"+d.projectLeader+"</font>";
+							}
+						}},
+                    {field: 'projectRegistrant', align:'center', title: '登记人',templet: function(d){
+							if(0 == d.pid){
+								return "<font style = 'font-size:14px;font-weight:500;'>"+d.projectRegistrant+"</font>";
+							}else{
+								return "<font>"+d.projectRegistrant+"</font>";
+							}
+						}},
+                    {field: 'createDate', align:'center', title: '登记日期',width:100,templet: function(d){
+							var date=d.createDate;
+							date=date.replace(new RegExp(/-/gm) ,"/");
+
+							if(0 == d.pid){
+								return "<font style = 'font-size:14px;font-weight:500;'>"+layui.util.toDateString(date,'yyyy-MM-dd')+"</font>";
+							}else{
+								return "<font>"+layui.util.toDateString(date,'yyyy-MM-dd')+"</font>";
+							}
+						}},
+					/*{align:'center', title: '状态',  width:70,templet:function(d){
+							var st = getAuditState(""+d.projectStatus);
+							if(d.pid ==0){
+								if(st.action)
+									var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/project/projectRecords/getProcess?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								else
+									var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								return xml;
+							}else if(d.pid !=0){
+								if(st.action)
+									var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/projectcontentinfo/projectcontentinfo/getProcessOne?id=" + d.id + "&projectReportData.id="+ d.id + "&type="+d.projectStatus+"','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								else
+									var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								return xml;
+							}else{
+								return '';
+							}
+						}},*/
+                    {templet: complain, align:'center', title: '操作',width:130}
+                ]],
+                done: function () {
+                    layer.closeAll('loading');
+                }
+            });
+        };
+
+        renderTable();
+
+        //触发三个button按钮
+        $('#btn-expand').click(function () {
+            treetable.expandAll('#permissionTable');
+        });
+
+        $('#btn-fold').click(function () {
+            treetable.foldAll('#permissionTable');
+        });
+
+        $('#btn-refresh').click(function () {
+            renderTable();
+        });
+
+
+        function complain(d){//操作中显示的内容
+			if(1 == d.operationSign) {
+					return [
+						'<a href="javascript:void(0)" onclick="openDialogreAudit(\'新增工作内容\', \'${ctx}/project/projectImplementEarly/form?view=before&dictType=&parentIds=&project.id=' + d.id +'\',\'95%\',\'95%\')" style=\"color: white;background: darkseagreen\" class="op-btn op-btn-add" ><i class="fa fa-plus"></i> 新增</a>',
+					].join('');
+			} else if (d.pid!="0"){
+					//子级内容
+					return [
+						'<a href="javascript:void(0)" onclick="openDialogreAudit(\'修改工作内容\', \'${ctx}/projectcontentinfo/projectcontentinfo/form?view=content&condition=early&dictType=&id='+d.contentPId+'&parentIds='+d.parentIds+'&infoId='+d.id+'\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 修改</a>',
+						/*'<a href="${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+d.id+'&id='+d.contentPId+'&type=8&condition=record" onclick="return confirmxRefresh(\'确认要删除该工作内容报告吗?\', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>',*/
+					].join('');
+				}else{
+				return[''].join('');
+			}
+        }
+        //监听工具条
+        table.on('tool(permissionTable)', function (obj) {
+            var data = obj.data;
+            var layEvent = obj.event;
+            if(data.permissionName!=null){
+                if (layEvent === 'del') {
+                    layer.msg('删除' + data.id);
+                } else if (layEvent === 'edit') {
+                    layer.msg('修改' + data.id);
+                }
+            }
+        });
+    });
+
+</script>
+<script>
+	function openDialogres(title,url,width,height,target){
+
+		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			width='auto';
+			height='auto';
+		}else{//如果是PC端,根据用户设置的width和height显示。
+
+		}
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			skin: 'three-btns',
+			maxmin: true, //开启最大化最小化按钮
+			content: url ,
+			btn: ['提交','暂存','关闭'],
+			btn1: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+				}
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				if(iframeWin.contentWindow.doSubmit(1) ){
+					//top.layer.close(index);//关闭对话框。
+					setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+				}
+			},
+			btn2:function(index,layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+				}
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				if(iframeWin.contentWindow.doSubmit(2) ){
+					// top.layer.close(index);//关闭对话框。
+					setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+				}
+				return false;
+			},
+			btn3: function(index){
+			}
+		});
+	}
+	function openDialogreAudit(title,url,width,height,target){
+
+		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			width='auto';
+			height='auto';
+		}else{//如果是PC端,根据用户设置的width和height显示。
+
+		}
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			skin: 'three-btns',
+			maxmin: true, //开启最大化最小化按钮
+			content: url ,
+			btn: ['提交','关闭'],
+			btn1: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+				}
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				if(iframeWin.contentWindow.doSubmit(1) ){
+					top.layer.close(index);//关闭对话框。
+					setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+				}
+			},
+			btn2: function(index){
+			}
+		});
+	}
+	// 确认对话框
+	function confirmxRefresh(mess, href){
+		top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
+			//do something
+			if (typeof href == 'function') {
+				href();
+			}else{
+				resetTip(); //loading();
+				$.ajax({
+					url:href,
+					data:$('#loginForm').serialize(),
+					type:"post",
+					success:function(data){
+						if(data.status){
+							parent.layer.msg(data.msg,{icon:1});
+						}else {
+							parent.layer.msg(data.msg,{icon:2});
+						}
+						//parent.refreshTrees();
+						location = '${ctx}/project/projectRecords/list';
+					}
+				});
+			}
+			top.layer.close(index);
+		});
+		return false;
+	}
+</script>
+</body>
+</html>

+ 521 - 0
src/main/webapp/webpage/modules/projectrecord/implementStage/projectImplementStageList.jsp

@@ -0,0 +1,521 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>项目登记</title>
+	<meta name="decorator" content="default"/>
+    <link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
+    <style>
+        .layui-table th{
+            font-size: 14px;
+            /*表头内容居中显示*/
+            text-align: center;
+        }
+		.pid{
+			font-size:14px;
+			font-weight:400;
+		}
+    </style>
+	<script type="text/javascript">
+        $(document).ready(function() {
+
+            //搜索框收放
+            $('#moresee').click(function(){
+                if($('#moresees').is(':visible'))
+                {
+                    $('#moresees').slideUp(0,resizeListWindow2);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+                }else{
+                    $('#moresees').slideDown(0,resizeListWindow2);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+                }
+            });
+            laydate.render({
+                elem: '#beginDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+            laydate.render({
+                elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+        });
+
+        function reset() {
+            $("#searchForm").resetForm();
+        }
+
+        function openDialog(title,url,width,height,target) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                content: url,
+                skin: 'three-btns',
+                btn: ['送审', '暂存', '关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }else {
+                        return false;
+                    }
+                },
+                btn3: function (index) {
+                }
+            });
+        }
+
+        function openDialogre(title,url,width,height,target,buttons) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            var split = buttons.split(",");
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                skin: 'three-btns',
+                content: url,
+                btn: split,
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    if(split.length==2){return}
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }else {
+                        return false;
+                    }
+                },
+                btn3: function (index) {
+                }
+            });
+        }
+	</script>
+	<style>
+		body{
+			background-color:transparent;
+			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+			color:#ffffff;
+			background-color:rgba(255,255,255,0);
+			height:100%;
+		}
+	</style>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+	<div class="layui-row">
+		<div class="full-width fl">
+			<div class="layui-row contentShadow shadowLR" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="projectImplementEarly" action="${ctx}/project/projectImplementStage/" method="post" class="form-inline">
+					<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+					<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+					<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+					<div class="commonQuery lw6">
+						<div class="layui-item query athird">
+							<label class="layui-form-label">项目名称:</label>
+							<div class="layui-input-block">
+								<form:input path="projectName" htmlEscape="false" maxlength="64"  class=" form-control  layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">项目负责人:</label>
+							<div class="layui-input-block">
+								<form:input path="leaderNameStr" htmlEscape="false" maxlength="255"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item athird">
+							<div class="input-group">
+								<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+								<button id="searchReset" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>
+								<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
+							</div>
+						</div>
+						<div style="    clear:both;"></div>
+					</div>
+					<div id="moresees" style="clear:both;display:none;" class="lw6">
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">合同名称:</label>
+							<div class="layui-input-block">
+								<input type="text" input="workContractInfoName" name="workContractInfo.name" value="" htmlEscape="false" maxlength="255"  class=" form-control layui-input">
+							</div>
+						</div>
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">委托方:</label>
+							<div class="layui-input-block">
+								<input type="text" input="workContractInfoClientName" name="workContractInfo.client.name" value="" htmlEscape="false" maxlength="255"  class=" form-control layui-input">
+							</div>
+						</div>
+						<div style="clear:both;"></div>
+					</div>
+				</form:form>
+			</div>
+		</div>
+		<div class="full-width fl">
+			<div class="layui-form contentDetails contentShadow shadowLBR">
+				<div class="nav-btns">
+					<button class="nav-btn layui-btn" id="btn-expand">全部展开</button>
+					<button class="nav-btn layui-btn-warm" id="btn-fold">全部折叠</button>
+					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
+
+                    <div style="clear: both;"></div>
+				</div>
+                <table id="permissionTable" class="layui-table" lay-filter="permissionTable"></table>
+				<!-- 分页代码 -->
+				<table:page page="${page}"></table:page>
+				<div style="clear: both;"></div>
+			</div>
+		</div>
+	</div>
+	<div id="changewidth"></div>
+</div>
+
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+
+    resizeListTable();
+    $("a").on("click",addLinkVisied);
+</script>
+<script>
+    resizeListWindow2();
+    $(window).resize(function(){
+        resizeListWindow2();
+    });
+</script>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script src="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.js" charset="utf-8"></script>
+<script>
+    /*使用模块加载的方式 加载文件*/
+    layui.config({
+        base: '${ctx}/resoueces/css/layui/module/'
+    }).extend({
+        treetable: 'treetable-lay/treetable'
+    }).use(['layer', 'table', 'treetable'], function () {
+        var $ = layui.jquery;
+        var table = layui.table;
+        var layer = layui.layer;
+        var treetable = layui.treetable;
+
+        // 渲染表格
+        var renderTable = function () {
+        	var projectName = $("#projectName").val();
+        	var workContractInfoName = $("#workContractInfoName").val();
+        	var workContractInfoClientName = $("#workContractInfoClientName").val();
+        	if(undefined == workContractInfoName){
+				workContractInfoName = "";
+			}
+        	if(undefined == workContractInfoClientName){
+				workContractInfoClientName = "";
+			}
+            layer.load(2);
+            treetable.render({
+                treeColIndex: 1,//树形图标显示在第几列
+                treeSpid: 0,//最上级的父级id
+                treeIdName: 'permissionId',//id字段的名称
+                treePidName: 'pid',//pid字段的名称
+                treeDefaultClose: true,//是否默认折叠
+                treeLinkage: true,//父级展开时是否自动展开所有子级
+                elem: '#permissionTable',
+                url: '${ctx}/project/projectImplementStage/getProjectList?projectId=${projectRecords.id}&pageNo=${page.pageNo}&projectName='+$("#projectName").val()+'&leaderNameStr='+$("#leaderNameStr").val()+'&workContractInfo.name='+workContractInfoName+'&workContractInfo.client.name='+workContractInfoClientName,
+                page: false,
+                cols: [[
+                    {type: 'numbers', align:'center', title: '序号' ,width:80},
+                    {field: 'projectId', title: '项目编号/当前阶段'},
+                    {field: 'projectName', align:'center', title: '项目名称/工作内容',templet:function(d){
+                    	if(0 == d.pid){
+							return "<a class=\"attention-info pid\" title=\"" + d.projectName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/project/projectRecords/view?id=" + d.id +"','95%', '95%')\">" + d.projectName + "</a>";
+						}else{
+							return "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看工作内容', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=contentView&dictType=&id="+d.contentPId+"&parentIds="+d.parentIds+"&infoId="+d.id+"','95%', '95%')\">" + d.projectName + "</a>";
+						}
+						}},
+					/*{field: 'clientName', align:'center', title: '委托方/当前阶段',templet: function(d){
+							if(0 == d.pid){
+								return "<font style = 'font-size:14px;font-weight:500;'>"+d.clientName+"</font>";
+							}else{
+								return "<font>"+d.clientName+"</font>";
+							}
+						}},*/
+                    {field: 'projectLeader', align:'center', title: '项目负责人',templet: function(d){
+							if(0 == d.pid){
+								return "<font style = 'font-size:14px;font-weight:500;'>"+d.projectLeader+"</font>";
+							}else{
+								return "<font>"+d.projectLeader+"</font>";
+							}
+						}},
+                    {field: 'projectRegistrant', align:'center', title: '登记人',templet: function(d){
+							if(0 == d.pid){
+								return "<font style = 'font-size:14px;font-weight:500;'>"+d.projectRegistrant+"</font>";
+							}else{
+								return "<font>"+d.projectRegistrant+"</font>";
+							}
+						}},
+                    {field: 'createDate', align:'center', title: '登记日期',width:100,templet: function(d){
+							var date=d.createDate;
+							date=date.replace(new RegExp(/-/gm) ,"/");
+
+							if(0 == d.pid){
+								return "<font style = 'font-size:14px;font-weight:500;'>"+layui.util.toDateString(date,'yyyy-MM-dd')+"</font>";
+							}else{
+								return "<font>"+layui.util.toDateString(date,'yyyy-MM-dd')+"</font>";
+							}
+						}},
+					/*{align:'center', title: '状态',  width:70,templet:function(d){
+							var st = getAuditState(""+d.projectStatus);
+							if(d.pid ==0){
+								if(st.action)
+									var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/project/projectRecords/getProcess?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								else
+									var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								return xml;
+							}else if(d.pid !=0){
+								if(st.action)
+									var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/projectcontentinfo/projectcontentinfo/getProcessOne?id=" + d.id + "&projectReportData.id="+ d.id + "&type="+d.projectStatus+"','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								else
+									var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								return xml;
+							}else{
+								return '';
+							}
+						}},*/
+                    {templet: complain, align:'center', title: '操作',width:130}
+                ]],
+                done: function () {
+                    layer.closeAll('loading');
+                }
+            });
+        };
+
+        renderTable();
+
+        //触发三个button按钮
+        $('#btn-expand').click(function () {
+            treetable.expandAll('#permissionTable');
+        });
+
+        $('#btn-fold').click(function () {
+            treetable.foldAll('#permissionTable');
+        });
+
+        $('#btn-refresh').click(function () {
+            renderTable();
+        });
+
+
+        function complain(d){//操作中显示的内容
+			if(1 == d.operationSign) {
+					return [
+						'<a href="javascript:void(0)" onclick="openDialogreAudit(\'新增工作内容\', \'${ctx}/project/projectImplementStage/form?view=before&dictType=&parentIds=&project.id=' + d.id +'\',\'95%\',\'95%\')" style=\"color: white;background: darkseagreen\" class="op-btn op-btn-add" ><i class="fa fa-plus"></i> 新增</a>',
+					].join('');
+			} else if (d.pid!="0"){
+					//子级内容
+					return [
+						'<a href="javascript:void(0)" onclick="openDialogreAudit(\'修改工作内容\', \'${ctx}/projectcontentinfo/projectcontentinfo/form?view=content&condition=early&dictType=&id='+d.contentPId+'&parentIds='+d.parentIds+'&infoId='+d.id+'\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 修改</a>',
+						/*'<a href="${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+d.id+'&id='+d.contentPId+'&type=8&condition=record" onclick="return confirmxRefresh(\'确认要删除该工作内容报告吗?\', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>',*/
+					].join('');
+				}else{
+				return[''].join('');
+			}
+        }
+        //监听工具条
+        table.on('tool(permissionTable)', function (obj) {
+            var data = obj.data;
+            var layEvent = obj.event;
+            if(data.permissionName!=null){
+                if (layEvent === 'del') {
+                    layer.msg('删除' + data.id);
+                } else if (layEvent === 'edit') {
+                    layer.msg('修改' + data.id);
+                }
+            }
+        });
+    });
+
+</script>
+<script>
+	function openDialogres(title,url,width,height,target){
+
+		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			width='auto';
+			height='auto';
+		}else{//如果是PC端,根据用户设置的width和height显示。
+
+		}
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			skin: 'three-btns',
+			maxmin: true, //开启最大化最小化按钮
+			content: url ,
+			btn: ['提交','暂存','关闭'],
+			btn1: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+				}
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				if(iframeWin.contentWindow.doSubmit(1) ){
+					//top.layer.close(index);//关闭对话框。
+					setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+				}
+			},
+			btn2:function(index,layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+				}
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				if(iframeWin.contentWindow.doSubmit(2) ){
+					// top.layer.close(index);//关闭对话框。
+					setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+				}
+				return false;
+			},
+			btn3: function(index){
+			}
+		});
+	}
+	function openDialogreAudit(title,url,width,height,target){
+
+		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			width='auto';
+			height='auto';
+		}else{//如果是PC端,根据用户设置的width和height显示。
+
+		}
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			skin: 'three-btns',
+			maxmin: true, //开启最大化最小化按钮
+			content: url ,
+			btn: ['提交','关闭'],
+			btn1: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+				}
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				if(iframeWin.contentWindow.doSubmit(1) ){
+					top.layer.close(index);//关闭对话框。
+					setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+				}
+			},
+			btn2: function(index){
+			}
+		});
+	}
+	// 确认对话框
+	function confirmxRefresh(mess, href){
+		top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
+			//do something
+			if (typeof href == 'function') {
+				href();
+			}else{
+				resetTip(); //loading();
+				$.ajax({
+					url:href,
+					data:$('#loginForm').serialize(),
+					type:"post",
+					success:function(data){
+						if(data.status){
+							parent.layer.msg(data.msg,{icon:1});
+						}else {
+							parent.layer.msg(data.msg,{icon:2});
+						}
+						//parent.refreshTrees();
+						location = '${ctx}/project/projectRecords/list';
+					}
+				});
+			}
+			top.layer.close(index);
+		});
+		return false;
+	}
+</script>
+</body>
+</html>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1184 - 0
src/main/webapp/webpage/modules/projectrecord/workContentFromAndView/workContentForm.jsp