فهرست منبع

项目列表模块内容

user5 5 سال پیش
والد
کامیت
8df329c00b
32فایلهای تغییر یافته به همراه7112 افزوده شده و 5 حذف شده
  1. 3 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectBasedDataDao.java
  2. 3 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectContentDataDao.java
  3. 3 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectReportDataDao.java
  4. 8 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectcontentinfoDao.java
  5. 10 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/entity/Projectcontentinfo.java
  6. 6 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectBasedDataService.java
  7. 5 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectContentDataService.java
  8. 5 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectReportDataService.java
  9. 10 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectcontentinfoService.java
  10. 33 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/dao/RuralProjectMessageDao.java
  11. 168 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectBasedData.java
  12. 193 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectContentData.java
  13. 20 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectRecords.java
  14. 562 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectReportData.java
  15. 200 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectcontentinfo.java
  16. 1131 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageService.java
  17. 2 2
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java
  18. 212 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageController.java
  19. 46 0
      src/main/resources/mappings/modules/projectcontentinfo/ProjectBasedDataDao.xml
  20. 45 0
      src/main/resources/mappings/modules/projectcontentinfo/ProjectContentDataDao.xml
  21. 45 0
      src/main/resources/mappings/modules/projectcontentinfo/ProjectReportDataDao.xml
  22. 73 0
      src/main/resources/mappings/modules/projectcontentinfo/ProjectcontentinfoDao.xml
  23. 632 0
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageDao.xml
  24. 3 3
      src/main/webapp/static/bos/bosupload.js
  25. 1 0
      src/main/webapp/static/common/jeeplus.js
  26. 619 0
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/reportForm.jsp
  27. 371 0
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/reportView.jsp
  28. 968 0
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageForm.jsp
  29. 427 0
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageList.jsp
  30. 736 0
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageModify.jsp
  31. 15 0
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageTask.jsp
  32. 557 0
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageView.jsp

+ 3 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectBasedDataDao.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.ProjectBasedData;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectBasedData;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -23,4 +24,6 @@ public interface ProjectBasedDataDao extends CrudDao<ProjectBasedData> {
     List<ProjectBasedData> findReportBased(@Param("reportId") String reportId, @Param("type") String type);
 
     List<ProjectBasedData> queryListByContentId(String contentId);
+
+    List<RuralProjectBasedData> findListOnRural(RuralProjectBasedData projectBasedData);
 }

+ 3 - 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.ruralprojectrecords.entity.RuralProjectContentData;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.HashMap;
@@ -32,4 +33,6 @@ public interface ProjectContentDataDao extends CrudDao<ProjectContentData> {
     List<ProjectContentData> findReportContent(@Param("reportId") String reportId,@Param("type") String type);
     Integer countByBaseId(String basedId);
     String findByLinkId(@Param("contentId") String contentId,@Param("projectId") String projectId);
+
+    List<RuralProjectContentData> findListOnRural(RuralProjectContentData projectContentData);
 }

+ 3 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectReportDataDao.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.ProjectReportData;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectReportData;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -71,4 +72,6 @@ public interface ProjectReportDataDao extends CrudDao<ProjectReportData> {
     List<ProjectReportData> findByProjectId(String projectId);
 
     ProjectReportData findByNum(String number);
+
+    List<RuralProjectReportData> findListOnRural(RuralProjectReportData projectReportData);
 }

+ 8 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectcontentinfoDao.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.Projectcontentinfo;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectcontentinfo;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -39,4 +40,11 @@ public interface ProjectcontentinfoDao extends CrudDao<Projectcontentinfo> {
     void updateByLinkId(@Param("linkId")String linkId,@Param("dataName")String dataName);
 
     List<Projectcontentinfo> findType(@Param("projectId")String projectId,@Param("type")String type);
+
+
+	Projectcontentinfo getByProjectId(String projectId);
+
+	List<RuralProjectcontentinfo> findListByProjectOnRural(RuralProjectcontentinfo projectcontentinfo);
+
+	void insertOnRural(Projectcontentinfo projectcontentinfo);
 }

+ 10 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/entity/Projectcontentinfo.java

@@ -7,6 +7,7 @@ package com.jeeplus.modules.projectcontentinfo.entity;
 import com.jeeplus.common.persistence.TreeEntity;
 import com.jeeplus.common.utils.excel.annotation.ExcelField;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
 import com.jeeplus.modules.sys.entity.Workattachment;
 
 import java.util.List;
@@ -20,6 +21,7 @@ public class Projectcontentinfo extends TreeEntity<Projectcontentinfo> {
 	
 	private static final long serialVersionUID = 1L;
 	private ProjectRecords project;		// 项目id
+	private RuralProjectRecords projectOnRural;		// 项目id
 	private String companyId;		// 公司id
 	private String officeId;		// 部门id
 	private String name;		// 名称
@@ -36,6 +38,14 @@ public class Projectcontentinfo extends TreeEntity<Projectcontentinfo> {
 	private String home;
 	private String change;
 
+	public RuralProjectRecords getProjectOnRural() {
+		return projectOnRural;
+	}
+
+	public void setProjectOnRural(RuralProjectRecords projectOnRural) {
+		this.projectOnRural = projectOnRural;
+	}
+
 	public Projectcontentinfo() {
 		super();
 	}

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

@@ -8,6 +8,7 @@ import java.util.List;
 import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.modules.project.entity.Project;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectBasedData;
 import com.jeeplus.modules.sys.dao.WorkattachmentDao;
 import com.jeeplus.modules.sys.entity.Workattachment;
 import com.jeeplus.modules.sys.utils.UserUtils;
@@ -66,6 +67,11 @@ public class ProjectBasedDataService extends CrudService<ProjectBasedDataDao, Pr
 	public List<ProjectBasedData> findList(ProjectBasedData projectBasedData) {
 		return super.findList(projectBasedData);
 	}
+
+
+	public List<RuralProjectBasedData> findListOnRural(RuralProjectBasedData projectBasedData) {
+		return dao.findListOnRural(projectBasedData);
+	}
 	
 	public Page<ProjectBasedData> findPage(Page<ProjectBasedData> page, ProjectBasedData projectBasedData) {
 		return super.findPage(page, projectBasedData);

+ 5 - 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.ruralprojectrecords.entity.RuralProjectContentData;
 import com.jeeplus.modules.sys.dao.WorkattachmentDao;
 import com.jeeplus.modules.sys.entity.Workattachment;
 import com.jeeplus.modules.workreview.entity.WorkReviewAudit;
@@ -64,6 +65,10 @@ public class ProjectContentDataService extends CrudService<ProjectContentDataDao
 	public List<ProjectContentData> findList(ProjectContentData projectContentData) {
 		return super.findList(projectContentData);
 	}
+
+	public List<RuralProjectContentData> findListOnRural(RuralProjectContentData projectContentData) {
+		return dao.findListOnRural(projectContentData);
+	}
 	
 	public Page<ProjectContentData> findPage(Page<ProjectContentData> page, ProjectContentData projectContentData) {
 		return super.findPage(page, projectContentData);

+ 5 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectReportDataService.java

@@ -25,6 +25,7 @@ import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
 import com.jeeplus.modules.projectrecord.service.ProjectRecordsService;
 import com.jeeplus.modules.projectreportnum.entity.ReportNum;
 import com.jeeplus.modules.projectreportnum.service.ProjectReportNumService;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectReportData;
 import com.jeeplus.modules.serialnum.service.SerialNumTplService;
 import com.jeeplus.modules.sys.dao.WorkattachmentDao;
 import com.jeeplus.modules.sys.entity.Office;
@@ -195,6 +196,10 @@ public class ProjectReportDataService extends CrudService<ProjectReportDataDao,
 		return super.findList(projectReportData);
 	}
 
+	public List<RuralProjectReportData> findListOnRural(RuralProjectReportData projectReportData) {
+		return dao.findListOnRural(projectReportData);
+	}
+
 	public Page<ProjectReportData> findPage(Page<ProjectReportData> page, ProjectReportData projectReportData) {
 		return super.findPage(page, projectReportData);
 	}

+ 10 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectcontentinfoService.java

@@ -17,6 +17,7 @@ import com.jeeplus.modules.projectcontroltable.entity.ProjectControlTable;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
 import com.jeeplus.modules.projectrecord.service.ProjectRecordsService;
 import com.jeeplus.modules.projectreportnum.service.ProjectReportNumService;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectcontentinfo;
 import com.jeeplus.modules.sys.dao.WorkattachmentDao;
 import com.jeeplus.modules.sys.entity.Office;
 import com.jeeplus.modules.sys.entity.User;
@@ -82,6 +83,10 @@ public class ProjectcontentinfoService extends CrudService<ProjectcontentinfoDao
 	public Projectcontentinfo get(String id) {
 		return super.get(id);
 	}
+
+	public Projectcontentinfo getByProjectId(String projectId) {
+		return dao.getByProjectId(projectId);
+	}
 	public boolean getOrChange(String id) {
 		Projectcontentinfo projectcontentinfo = super.get(id);
 		if (projectcontentinfo==null || StringUtils.isBlank(projectcontentinfo.getId())){
@@ -105,6 +110,11 @@ public class ProjectcontentinfoService extends CrudService<ProjectcontentinfoDao
 	public List<Projectcontentinfo> findListByProject(Projectcontentinfo projectcontentinfo) {
 		return dao.findListByProject(projectcontentinfo);
 	}
+
+	public List<RuralProjectcontentinfo> findListByProjectOnRural(RuralProjectcontentinfo projectcontentinfo) {
+		return dao.findListByProjectOnRural(projectcontentinfo);
+	}
+
 	public List<Projectcontentinfo> findByParentIds(Projectcontentinfo projectcontentinfo) {
 		//详情页面
 		ProjectContentData projectContentData = projectContentDataService.get(projectcontentinfo.getLinkId());

+ 33 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/dao/RuralProjectMessageDao.java

@@ -0,0 +1,33 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.ruralprojectrecords.dao;
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
+
+import java.util.List;
+
+/**
+ * 项目列表DAO接口
+ * @author ppt
+ * @version 2018-05-02
+ */
+@MyBatisDao
+public interface RuralProjectMessageDao extends CrudDao<RuralProjectRecords> {
+
+
+    void updateProcessIdAndStatus(RuralProjectRecords projectRecords);
+
+    void updateSelectiveById(RuralProjectRecords projectRecords);
+
+    List<RuralProjectRecords> findListByStatus(RuralProjectRecords projectRecords);
+
+    void updateSelectiveByProjectId(RuralProjectRecords records);
+
+    RuralProjectRecords findUseableByProjectId(String projectId);
+    List<RuralProjectRecords> findPageByRe(RuralProjectRecords records);
+    int queryCount(RuralProjectRecords records);
+    int queryCountByStatus(RuralProjectRecords records);
+}

+ 168 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectBasedData.java

@@ -0,0 +1,168 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.ruralprojectrecords.entity;
+
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.jeeplus.common.persistence.DataEntity;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.entity.Workattachment;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 依据性资料Entity
+ * @author 杨帆
+ * @version 2018-06-05
+ */
+public class RuralProjectBasedData extends DataEntity<RuralProjectBasedData> {
+
+	private static final long serialVersionUID = 1L;
+	private String companyId;		// 公司id
+	private String officeId;		// 部门id
+	private String name;		// 资料名称
+	private String number;		// 资料编号
+	private String type;		// 资料类别
+	private String provider;		// 资料提供者
+	private Date provideDate;		// 提供日期
+	private RuralProjectRecords project;		// 项目id
+	private String uploadEnvironment;		// 上传环节
+	private User uploadUser;		// 上传人
+    @JsonFormat(pattern="yyyy-MM-dd")
+    private Date uploadDate;		// 上传日期
+	private List<Workattachment> workAttachments;
+	private Date startDate;
+	private Date endDate;
+    private String typeLabel;
+
+	public RuralProjectBasedData() {
+		super();
+	}
+
+	public RuralProjectBasedData(String id){
+		super(id);
+	}
+
+	public String getCompanyId() {
+		return companyId;
+	}
+
+	public void setCompanyId(String companyId) {
+		this.companyId = companyId;
+	}
+
+	public String getOfficeId() {
+		return officeId;
+	}
+
+	public void setOfficeId(String officeId) {
+		this.officeId = officeId;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getNumber() {
+		return number;
+	}
+
+	public void setNumber(String number) {
+		this.number = number;
+	}
+
+	public String getType() {
+		return type;
+	}
+
+	public void setType(String type) {
+		this.type = type;
+	}
+
+	public String getProvider() {
+		return provider;
+	}
+
+	public void setProvider(String provider) {
+		this.provider = provider;
+	}
+
+	public RuralProjectRecords getProject() {
+		return project;
+	}
+
+	public void setProject(RuralProjectRecords project) {
+		this.project = project;
+	}
+
+	public String getUploadEnvironment() {
+		return uploadEnvironment;
+	}
+
+	public void setUploadEnvironment(String uploadEnvironment) {
+		this.uploadEnvironment = uploadEnvironment;
+	}
+
+	public User getUploadUser() {
+		return uploadUser;
+	}
+
+	public void setUploadUser(User uploadUser) {
+		this.uploadUser = uploadUser;
+	}
+
+	public Date getProvideDate() {
+		return provideDate;
+	}
+
+	public void setProvideDate(Date provideDate) {
+		this.provideDate = provideDate;
+	}
+
+	public Date getUploadDate() {
+		return uploadDate;
+	}
+
+	public void setUploadDate(Date uploadDate) {
+		this.uploadDate = uploadDate;
+	}
+
+	public List<Workattachment> getWorkAttachments() {
+		return workAttachments;
+	}
+
+	public void setWorkAttachments(List<Workattachment> workAttachments) {
+		this.workAttachments = workAttachments;
+	}
+
+	public Date getStartDate() {
+		return startDate;
+	}
+
+	public void setStartDate(Date startDate) {
+		this.startDate = startDate;
+	}
+
+	public Date getEndDate() {
+		return endDate;
+	}
+
+	public void setEndDate(Date endDate) {
+		this.endDate = endDate;
+	}
+
+    public String getTypeLabel() {
+        return typeLabel;
+    }
+
+    public void setTypeLabel(String typeLabel) {
+        this.typeLabel = typeLabel;
+    }
+}

+ 193 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectContentData.java

@@ -0,0 +1,193 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.ruralprojectrecords.entity;
+
+
+import com.jeeplus.common.persistence.DataEntity;
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectBasedData;
+import com.jeeplus.modules.projectcontroltable.entity.ProjectControlTable;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.entity.Workattachment;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 工作内容详情Entity
+ * @author yangfan
+ * @version 2018-06-05
+ */
+public class RuralProjectContentData extends DataEntity<RuralProjectContentData> {
+
+	private static final long serialVersionUID = 1L;
+	private String companyId;		// 公司id
+	private String officeId;		// 部门id
+	private RuralProjectRecords project;		// 项目id
+	private String name;		// 工作内容名称
+	private String number;		// 工作内容编号
+	private String type;		// 工作内容类型
+	private User master;		// 负责人
+	private String contentDetailsId;		// 内容详情id
+	private Date startDate;
+	private Date endDate;
+    private String contentDetail;
+    private List detailObject;
+    private Integer parentType;
+    private String extId;
+	private List<ProjectControlTable> projectControlTableList;
+	private List<Workattachment> workAttachments;
+	private List<ProjectBasedData> projectBasedDataList;
+
+    public List getDetailObject() {
+        return detailObject;
+    }
+
+    public void setDetailObject(List detailObject) {
+        this.detailObject = detailObject;
+    }
+
+    public RuralProjectContentData() {
+		super();
+	}
+
+	public RuralProjectContentData(String id){
+		super(id);
+	}
+
+	@ExcelField(title="公司id", align=2, sort=7)
+	public String getCompanyId() {
+		return companyId;
+	}
+
+	public void setCompanyId(String companyId) {
+		this.companyId = companyId;
+	}
+	
+	@ExcelField(title="部门id", align=2, sort=8)
+	public String getOfficeId() {
+		return officeId;
+	}
+
+	public void setOfficeId(String officeId) {
+		this.officeId = officeId;
+	}
+
+    public RuralProjectRecords getProject() {
+        return project;
+    }
+
+    public void setProject(RuralProjectRecords project) {
+        this.project = project;
+    }
+
+    @ExcelField(title="工作内容名称", align=2, sort=10)
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+	
+	@ExcelField(title="工作内容编号", align=2, sort=11)
+	public String getNumber() {
+		return number;
+	}
+
+	public void setNumber(String number) {
+		this.number = number;
+	}
+	
+	@ExcelField(title="工作内容类型", align=2, sort=12)
+	public String getType() {
+		return type;
+	}
+
+	public void setType(String type) {
+		this.type = type;
+	}
+
+    public User getMaster() {
+        return master;
+    }
+
+    public void setMaster(User master) {
+        this.master = master;
+    }
+
+    @ExcelField(title="内容详情id", align=2, sort=14)
+	public String getContentDetailsId() {
+		return contentDetailsId;
+	}
+
+	public void setContentDetailsId(String contentDetailsId) {
+		this.contentDetailsId = contentDetailsId;
+	}
+
+	public Date getStartDate() {
+		return startDate;
+	}
+
+	public void setStartDate(Date startDate) {
+		this.startDate = startDate;
+	}
+
+	public Date getEndDate() {
+		return endDate;
+	}
+
+	public void setEndDate(Date endDate) {
+		this.endDate = endDate;
+	}
+
+    public String getContentDetail() {
+        return contentDetail;
+    }
+
+    public void setContentDetail(String contentDetail) {
+        this.contentDetail = contentDetail;
+    }
+
+    public void setParentType(Integer parentType) {
+        this.parentType = parentType;
+    }
+
+    public Integer getParentType() {
+        return parentType;
+    }
+
+    public String getExtId() {
+        return extId;
+    }
+
+    public void setExtId(String extId) {
+        this.extId = extId;
+    }
+
+	public List<ProjectControlTable> getProjectControlTableList() {
+		return projectControlTableList;
+	}
+
+	public void setProjectControlTableList(List<ProjectControlTable> projectControlTableList) {
+		this.projectControlTableList = projectControlTableList;
+	}
+
+    public List<Workattachment> getWorkAttachments() {
+        return workAttachments;
+    }
+
+    public void setWorkAttachments(List<Workattachment> workAttachments) {
+        this.workAttachments = workAttachments;
+    }
+
+    public List<ProjectBasedData> getProjectBasedDataList() {
+        return projectBasedDataList;
+    }
+
+    public void setProjectBasedDataList(List<ProjectBasedData> projectBasedDataList) {
+        this.projectBasedDataList = projectBasedDataList;
+    }
+}

+ 20 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectRecords.java

@@ -58,6 +58,26 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 
 	private ProjectReportData reportData;//报告
 
+	private String projectReportNumber; //报告号
+
+	private Integer projectReportStatus; //报告状态
+
+	public Integer getProjectReportStatus() {
+		return projectReportStatus;
+	}
+
+	public void setProjectReportStatus(Integer projectReportStatus) {
+		this.projectReportStatus = projectReportStatus;
+	}
+
+	public String getProjectReportNumber() {
+		return projectReportNumber;
+	}
+
+	public void setProjectReportNumber(String projectReportNumber) {
+		this.projectReportNumber = projectReportNumber;
+	}
+
 	public ProjectReportData getReportData() {
 		return reportData;
 	}

+ 562 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectReportData.java

@@ -0,0 +1,562 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.ruralprojectrecords.entity;
+
+
+import com.jeeplus.common.persistence.ActEntity;
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectBasedData;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectContentData;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.entity.Workattachment;
+import com.jeeplus.modules.workcontent.web.WorkContentTypeController;
+import com.jeeplus.modules.workreview.entity.WorkReviewAudit;
+import org.activiti.engine.history.HistoricProcessInstance;
+import org.activiti.engine.repository.ProcessDefinition;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.task.Task;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 报告详情Entity
+ * @author yangfan
+ * @version 2018-06-05
+ */
+public class RuralProjectReportData extends ActEntity<RuralProjectReportData> {
+
+	private static final long serialVersionUID = 1L;
+	private String companyId;		// 公司id
+	private String officeId;		// 部门id
+	private String officeName;		// 部门id
+	private RuralProjectRecords project;		// 项目id
+	private String name;		// 报告名称
+	private String number;		// 报告编号
+	private String type;		// 工作内容类型
+	private String achievementType;		// 成功类型
+	private String reviewStandard;		// 复核标准
+	private User signCostOne;		// 签字造价师一
+	private User signCostTwo;		// 签字造价师二
+	private User master;		// 负责人
+	private Date reportDate;		// 报告日期
+	private String fileStatus;		// 归档状态
+	private String status;		// 报告状态 1待归档 2已归档
+	private String invalidStatus;		// 报告作废状态
+	private Date startDate;
+	private Date endDate;
+	private List<Workattachment> workAttachments;
+	private String processInstanceId; // 流程实例编号
+	private String invalidProcessInstanceId; // 流程实例编号
+	private String home;
+	private List<ProjectContentData> projectContentDataList;
+	private List<ProjectBasedData> projectBasedDataList;
+	private List<WorkReviewAudit> projectReviewList;
+	private String reportId;
+	private String numberPath;
+
+	public String getNumberPath() {
+		return numberPath;
+	}
+
+	public void setNumberPath(String numberPath) {
+		this.numberPath = numberPath;
+	}
+
+	private RuralProjectReportData beforeEntity;
+	private Integer beforeCount;
+	private String clientName;
+	private String contractNum;
+	private String contractName;
+	private String projectMaster;
+	private String projectMasterId;
+	private Date createStartDate;
+	private Date createEndDate;
+	private Date createDate;
+	private String typeName;
+	private String projectName;
+	private String projectNum;
+	private String signCostOneName;
+	private String signCostTwoName;
+	private String masterName;
+	private String upId;
+
+
+	private Double reviewFee;  //送审价
+	private Double approvalFee;  //审定价
+	private Double contractFee;   //合同价
+	private Double verifyFee;    //核增核减额
+	private Double verifyRate;    //核增核减率
+	private Double consultFee;    //咨询标的额
+	private Double buildingFee;   //土建额
+	private Double installFee;    //安装额
+
+	public String getUpId() {
+		return upId;
+	}
+
+	public void setUpId(String upId) {
+		this.upId = upId;
+	}
+
+
+	public String getReportType() {
+		return reportType;
+	}
+
+	public void setReportType(String reportType) {
+		this.reportType = reportType;
+	}
+
+	private String reportType;		// 签章类型 电子章/实体章
+	// 流程任务
+	private Task task;
+	private Map<String, Object> variables;
+	// 运行中的流程实例
+	private ProcessInstance processInstance;
+	// 历史的流程实例
+	private HistoricProcessInstance historicProcessInstance;
+	// 流程定义
+	private ProcessDefinition processDefinition;
+
+	public RuralProjectReportData() {
+		super();
+	}
+
+	public RuralProjectReportData(String id){
+		super(id);
+	}
+
+	public String getCompanyId() {
+		return companyId;
+	}
+
+	public void setCompanyId(String companyId) {
+		this.companyId = companyId;
+	}
+	
+	public String getOfficeId() {
+		return officeId;
+	}
+
+	public void setOfficeId(String officeId) {
+		this.officeId = officeId;
+	}
+
+	@Override
+	public void setCreateDate(Date createDate) {
+		this.createDate = createDate;
+	}
+
+	public void setProject(RuralProjectRecords project) {
+		this.project = project;
+	}
+	
+	public void setName(String name) {
+		this.name = name;
+	}
+	
+	@ExcelField(title="报告编号", align=2, sort=1)
+	public String getNumber() {
+		return number;
+	}
+
+	@ExcelField(title="报告名称", align=2, sort=2)
+	public String getName() {
+		return name;
+	}
+
+	public String getType() {
+		return type;
+	}
+	@ExcelField(title="工作内容类型", align=2, sort=3)
+	public String getTypeName() {
+		return WorkContentTypeController.getContentTypeName(this.type,"");
+	}
+
+	@ExcelField(title="成果类型", align=2, sort=4,mainDictType = "achievement_type")
+	public String getAchievementType() {
+		return achievementType;
+	}
+
+	public User getSignCostOne() {
+		return signCostOne;
+	}
+
+	@ExcelField(title="签字造价师一", align=2, sort=5)
+	public String getSignCostOneName() {
+		return this.signCostOne.getName();
+	}
+
+	@ExcelField(title="签字造价师二", align=2, sort=6)
+	public String getSignCostTwoName() {
+		return this.signCostTwo.getName();
+	}
+
+	public User getSignCostTwo() {
+		return signCostTwo;
+	}
+
+	@ExcelField(title="复核标准", align=2, sort=7,dictType = "reviewStandard")
+	public String getReviewStandard() {
+		return reviewStandard;
+	}
+
+	@ExcelField(title="报告状态", align=2, sort=8,dictType = "audit_state")
+	public String getStatus() {
+		return status;
+	}
+
+	@ExcelField(title="报告日期", align=2, sort=9)
+	public Date getReportDate() {
+		return reportDate;
+	}
+
+	@ExcelField(title="归档状态", align=2, sort=10,dictType = "record_state")
+	public String getFileStatus() {
+		return fileStatus;
+	}
+
+	@ExcelField(title="负责人", align=2, sort=11)
+	public String getMasterName() {
+		return this.master.getName();
+	}
+
+	@ExcelField(title="所属部门", align=2, sort=12)
+	public String getOfficeName() {
+		return officeName;
+	}
+
+	@ExcelField(title="创建时间", align=2, sort=13)
+	@Override
+	public Date getCreateDate() {
+		return createDate;
+	}
+
+	public RuralProjectRecords getProject() {
+		return project;
+	}
+
+	@ExcelField(title="所属项目", align=2, sort=14)
+	public String getProjectName() {
+		return this.project.getProjectName();
+	}
+
+	@ExcelField(title="项目负责人", align=2, sort=15)
+	public String getProjectMaster() {
+		return projectMaster;
+	}
+
+	@ExcelField(title="合同编号", align=2, sort=16)
+	public String getContractNum() {
+		return contractNum;
+	}
+
+	@ExcelField(title="主委托方", align=2, sort=17)
+	public String getClientName() {
+		return clientName;
+	}
+
+	public void setNumber(String number) {
+		this.number = number;
+	}
+	
+	public void setType(String type) {
+		this.type = type;
+	}
+	
+	public void setAchievementType(String achievementType) {
+		this.achievementType = achievementType;
+	}
+	
+	public void setReviewStandard(String reviewStandard) {
+		this.reviewStandard = reviewStandard;
+	}
+
+	public void setSignCostOne(User signCostOne) {
+		this.signCostOne = signCostOne;
+	}
+	
+	public void setSignCostTwo(User signCostTwo) {
+		this.signCostTwo = signCostTwo;
+	}
+	
+	public void setMaster(User master) {
+		this.master = master;
+	}
+	
+	public void setReportDate(Date reportDate) {
+		this.reportDate = reportDate;
+	}
+	
+	public void setFileStatus(String fileStatus) {
+		this.fileStatus = fileStatus;
+	}
+	
+	public void setStatus(String status) {
+		this.status = status;
+	}
+
+	public String getInvalidStatus() {
+		return invalidStatus;
+	}
+
+	public void setInvalidStatus(String invalidStatus) {
+		this.invalidStatus = invalidStatus;
+	}
+
+	public Date getStartDate() {
+		return startDate;
+	}
+
+	public void setStartDate(Date startDate) {
+		this.startDate = startDate;
+	}
+
+	public Date getEndDate() {
+		return endDate;
+	}
+
+	public void setEndDate(Date endDate) {
+		this.endDate = endDate;
+	}
+
+	public List<Workattachment> getWorkAttachments() {
+		return workAttachments;
+	}
+
+	public void setWorkAttachments(List<Workattachment> workAttachments) {
+		this.workAttachments = workAttachments;
+	}
+
+	public String getProcessInstanceId() {
+		return processInstanceId;
+	}
+
+	public void setProcessInstanceId(String processInstanceId) {
+		this.processInstanceId = processInstanceId;
+	}
+
+	public Task getTask() {
+		return task;
+	}
+
+	public void setTask(Task task) {
+		this.task = task;
+	}
+
+	public Map<String, Object> getVariables() {
+		return variables;
+	}
+
+	public void setVariables(Map<String, Object> variables) {
+		this.variables = variables;
+	}
+
+	public ProcessInstance getProcessInstance() {
+		return processInstance;
+	}
+
+	public void setProcessInstance(ProcessInstance processInstance) {
+		this.processInstance = processInstance;
+	}
+
+	public HistoricProcessInstance getHistoricProcessInstance() {
+		return historicProcessInstance;
+	}
+
+	public void setHistoricProcessInstance(HistoricProcessInstance historicProcessInstance) {
+		this.historicProcessInstance = historicProcessInstance;
+	}
+
+	public ProcessDefinition getProcessDefinition() {
+		return processDefinition;
+	}
+
+	public void setProcessDefinition(ProcessDefinition processDefinition) {
+		this.processDefinition = processDefinition;
+	}
+
+	public String getHome() {
+		return home;
+	}
+
+	public void setHome(String home) {
+		this.home = home;
+	}
+
+	public List<ProjectContentData> getProjectContentDataList() {
+		return projectContentDataList;
+	}
+
+	public void setProjectContentDataList(List<ProjectContentData> projectContentDataList) {
+		this.projectContentDataList = projectContentDataList;
+	}
+
+	public String getReportId() {
+		return reportId;
+	}
+
+	public void setReportId(String reportId) {
+		this.reportId = reportId;
+	}
+
+	public RuralProjectReportData getBeforeEntity() {
+		return beforeEntity;
+	}
+
+	public void setBeforeEntity(RuralProjectReportData beforeEntity) {
+		this.beforeEntity = beforeEntity;
+	}
+
+	public Integer getBeforeCount() {
+		return beforeCount;
+	}
+
+	public void setBeforeCount(Integer beforeCount) {
+		this.beforeCount = beforeCount;
+	}
+
+	public String getInvalidProcessInstanceId() {
+		return invalidProcessInstanceId;
+	}
+
+	public void setInvalidProcessInstanceId(String invalidProcessInstanceId) {
+		this.invalidProcessInstanceId = invalidProcessInstanceId;
+	}
+
+	public void setOfficeName(String officeName) {
+		this.officeName = officeName;
+	}
+
+	public void setClientName(String clientName) {
+		this.clientName = clientName;
+	}
+
+	public void setContractNum(String contractNum) {
+		this.contractNum = contractNum;
+	}
+
+	public void setProjectMaster(String projectMaster) {
+		this.projectMaster = projectMaster;
+	}
+
+	public Date getCreateStartDate() {
+		return createStartDate;
+	}
+
+	public void setCreateStartDate(Date createStartDate) {
+		this.createStartDate = createStartDate;
+	}
+
+	public Date getCreateEndDate() {
+		return createEndDate;
+	}
+
+	public void setCreateEndDate(Date createEndDate) {
+		this.createEndDate = createEndDate;
+	}
+
+	public String getProjectMasterId() {
+		return projectMasterId;
+	}
+
+	public void setProjectMasterId(String projectMasterId) {
+		this.projectMasterId = projectMasterId;
+	}
+
+	public String getContractName() {
+		return contractName;
+	}
+
+	public String getProjectNum() {
+		return this.project.getProjectId();
+	}
+	public User getMaster() {
+		return master;
+	}
+
+	public List<ProjectBasedData> getProjectBasedDataList() {
+		return projectBasedDataList;
+	}
+
+	public void setProjectBasedDataList(List<ProjectBasedData> projectBasedDataList) {
+		this.projectBasedDataList = projectBasedDataList;
+	}
+
+	public List<WorkReviewAudit> getProjectReviewList() {
+		return projectReviewList;
+	}
+
+	public void setProjectReviewList(List<WorkReviewAudit> projectReviewList) {
+		this.projectReviewList = projectReviewList;
+	}
+
+
+	public Double getReviewFee() {
+		return reviewFee;
+	}
+
+	public void setReviewFee(Double reviewFee) {
+		this.reviewFee = reviewFee;
+	}
+
+	public Double getApprovalFee() {
+		return approvalFee;
+	}
+
+	public void setApprovalFee(Double approvalFee) {
+		this.approvalFee = approvalFee;
+	}
+
+	public Double getContractFee() {
+		return contractFee;
+	}
+
+	public void setContractFee(Double contractFee) {
+		this.contractFee = contractFee;
+	}
+
+	public Double getVerifyFee() {
+		return verifyFee;
+	}
+
+	public void setVerifyFee(Double verifyFee) {
+		this.verifyFee = verifyFee;
+	}
+
+	public Double getVerifyRate() {
+		return verifyRate;
+	}
+
+	public void setVerifyRate(Double verifyRate) {
+		this.verifyRate = verifyRate;
+	}
+
+	public Double getConsultFee() {
+		return consultFee;
+	}
+
+	public void setConsultFee(Double consultFee) {
+		this.consultFee = consultFee;
+	}
+
+	public Double getBuildingFee() {
+		return buildingFee;
+	}
+
+	public void setBuildingFee(Double buildingFee) {
+		this.buildingFee = buildingFee;
+	}
+
+	public Double getInstallFee() {
+		return installFee;
+	}
+
+	public void setInstallFee(Double installFee) {
+		this.installFee = installFee;
+	}
+}

+ 200 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectcontentinfo.java

@@ -0,0 +1,200 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.ruralprojectrecords.entity;
+
+
+import com.jeeplus.common.persistence.TreeEntity;
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectBasedData;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectContentData;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.sys.entity.Workattachment;
+
+import java.util.List;
+
+/**
+ * 工作内容管理Entity
+ * @author yangfan
+ * @version 2018-06-04
+ */
+public class RuralProjectcontentinfo extends TreeEntity<RuralProjectcontentinfo> {
+
+	private static final long serialVersionUID = 1L;
+	private RuralProjectRecords project;		// 项目id
+	private String companyId;		// 公司id
+	private String officeId;		// 部门id
+	private String name;		// 名称
+	private String type;		// 类型
+	private String dictType;		// 字典类型
+	private String infoId; //详情页id
+	private ProjectBasedData projectBasedData;
+	private ProjectContentData projectContentData;
+	private ProjectReportData projectReportData;
+	private String view;
+	private List<Workattachment> workAttachments;
+	private String edit;
+	private String linkId;//引用ID
+	private String home;
+	private String change;
+	private String projectId;   //项目id
+
+	public String getProjectId() {
+		return projectId;
+	}
+
+	public void setProjectId(String projectId) {
+		this.projectId = projectId;
+	}
+
+	public RuralProjectcontentinfo() {
+		super();
+	}
+
+	public RuralProjectcontentinfo(String id){
+		super(id);
+	}
+
+	@Override
+	public RuralProjectcontentinfo getParent() {
+		return parent;
+	}
+
+	@Override
+	public void setParent(RuralProjectcontentinfo parent) {
+		this.parent = parent;
+	}
+
+	@ExcelField(title="项目id", align=2, sort=10)
+	public RuralProjectRecords getProject() {
+		return project;
+	}
+
+	public void setProject(RuralProjectRecords project) {
+		this.project = project;
+	}
+	
+	@ExcelField(title="公司id", align=2, sort=11)
+	public String getCompanyId() {
+		return companyId;
+	}
+
+	public void setCompanyId(String companyId) {
+		this.companyId = companyId;
+	}
+	
+	@ExcelField(title="部门id", align=2, sort=12)
+	public String getOfficeId() {
+		return officeId;
+	}
+
+	public void setOfficeId(String officeId) {
+		this.officeId = officeId;
+	}
+	
+	@ExcelField(title="名称", align=2, sort=13)
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getType() {
+		return type;
+	}
+
+	public void setType(String type) {
+		this.type = type;
+	}
+
+	public String getDictType() {
+		return dictType;
+	}
+
+	public void setDictType(String dictType) {
+		this.dictType = dictType;
+	}
+
+	public String getInfoId() {
+		return infoId;
+	}
+
+	public void setInfoId(String infoId) {
+		this.infoId = infoId;
+	}
+
+	public ProjectBasedData getProjectBasedData() {
+		return projectBasedData;
+	}
+
+	public void setProjectBasedData(ProjectBasedData projectBasedData) {
+		this.projectBasedData = projectBasedData;
+	}
+
+	public ProjectContentData getProjectContentData() {
+		return projectContentData;
+	}
+
+	public void setProjectContentData(ProjectContentData projectContentData) {
+		this.projectContentData = projectContentData;
+	}
+
+	public ProjectReportData getProjectReportData() {
+		return projectReportData;
+	}
+
+	public void setProjectReportData(ProjectReportData projectReportData) {
+		this.projectReportData = projectReportData;
+	}
+
+	public String getView() {
+		return view;
+	}
+
+	public void setView(String view) {
+		this.view = view;
+	}
+
+	public List<Workattachment> getWorkAttachments() {
+		return workAttachments;
+	}
+
+	public void setWorkAttachments(List<Workattachment> workAttachments) {
+		this.workAttachments = workAttachments;
+	}
+
+	public String getEdit() {
+		return edit;
+	}
+
+	public void setEdit(String edit) {
+		this.edit = edit;
+	}
+
+    public String getLinkId() {
+        return linkId;
+    }
+
+    public void setLinkId(String linkId) {
+        this.linkId = linkId;
+    }
+
+	public String getHome() {
+		return home;
+	}
+
+	public void setHome(String home) {
+		this.home = home;
+	}
+
+	public String getChange() {
+		return change;
+	}
+
+	public void setChange(String change) {
+		this.change = change;
+	}
+}

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1131 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageService.java


+ 2 - 2
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java

@@ -865,7 +865,7 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 		}
 		if(ProjectStatusEnum.SIGNED.getValue()==projectRecords.getProjectStatus()){
 			Projectcontentinfo projectcontentinfo = new Projectcontentinfo();
-//			projectcontentinfo.setProject(projectRecords);
+			projectcontentinfo.setProjectOnRural(projectRecords);
 			projectcontentinfo.setCompanyId(projectRecords.getCompany().getId());
 			projectcontentinfo.setOfficeId(projectRecords.getOffice().getId());
 			projectcontentinfo.setSort(30);
@@ -873,7 +873,7 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 			projectcontentinfo.setParent(new Projectcontentinfo("0"));
 			projectcontentinfo.setName(projectRecords.getProjectId());
 			projectcontentinfo.preInsert();
-			projectcontentinfoDao.insert(projectcontentinfo);
+			projectcontentinfoDao.insertOnRural(projectcontentinfo);
 		}
 		dao.updateSelectiveById(projectRecords);
 		return "保存审核意见成功!";

+ 212 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageController.java

@@ -0,0 +1,212 @@
+package com.jeeplus.modules.ruralprojectrecords.web;
+
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.act.service.ActTaskService;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectBasedData;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectContentData;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
+import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectBasedDataService;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectContentDataService;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectReportDataService;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectcontentinfoService;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.projectreportnum.service.ProjectReportNumService;
+import com.jeeplus.modules.ruralprojectrecords.entity.*;
+import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectMessageService;
+import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workactivity.service.ActivityService;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientLinkman;
+import com.jeeplus.modules.workclientinfo.service.WorkClientInfoService;
+import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
+import com.jeeplus.modules.workcontractinfo.service.WorkContractInfoService;
+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.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 项目列表Controller
+ * @author 徐滕
+ * @version 2020-04-15
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/ruralProject/ruralProjectMessage")
+public class RuralProjectMessageController extends BaseController {
+    @Autowired
+    private WorkClientInfoService workClientInfoService;
+
+    @Autowired
+    private RuralProjectRecordsService projectRecordsService;
+    @Autowired
+    private RuralProjectMessageService ruralProjectMessageService;
+
+    @Autowired
+    private ProjectReportDataService projectReportDataService;
+
+    @Autowired
+    private ProjectBasedDataService projectBasedDataService;
+
+    @Autowired
+    private WorkContractInfoService contractInfoService;
+    @Autowired
+    private ActTaskService actTaskService;
+    @Autowired
+    private ActivityService activityService;
+    @Autowired
+    private ProjectcontentinfoService projectcontentinfoService;
+    @Autowired
+    private ProjectContentDataService projectContentDataService;
+
+    @Autowired
+    private ProjectReportNumService projectReportNumService;
+
+    @ModelAttribute
+    public RuralProjectRecords get(@RequestParam(required=false) String id) {
+        RuralProjectRecords entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = projectRecordsService.get(id);
+        }
+        if (entity == null){
+            entity = new RuralProjectRecords();
+        }
+        return entity;
+    }
+
+    /**
+     * 项目列表页面
+     */
+    @RequiresPermissions("ruralProject:ruralProjectMessage:list")
+    @RequestMapping(value = {"list", ""})
+    public String list(RuralProjectRecords projectRecords, HttpServletRequest request, HttpServletResponse response, Model model) {
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
+        }
+        Page<RuralProjectRecords> page = ruralProjectMessageService.findPage(new Page<RuralProjectRecords>(request, response), projectRecords);
+        //无合同状态下,获取委托方的名称
+        List<RuralProjectRecords> list = page.getList();
+        for (int i = 0; i < list.size(); i++) {
+            RuralProjectRecords records1 = list.get(i);
+            if (records1.getWorkContractInfo() == null) {
+                projectRecordsService.queryLinkmanInfos(records1);
+                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);
+                }
+            }
+        }
+        model.addAttribute("page", page);
+        return "modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageList";
+    }
+
+    @RequestMapping(value = {"form"})
+    public String form(RuralProjectcontentinfo projectcontentinfo, HttpServletRequest request, HttpServletResponse response, Model model, RedirectAttributes attr) {
+        Projectcontentinfo projectcontentinfo1 = projectcontentinfoService.getByProjectId(projectcontentinfo.getProjectId());
+        model.addAttribute("parentIds", projectcontentinfo1.getParentIds());
+        String dictType = projectcontentinfo.getDictType();
+        RuralProjectRecords records = projectRecordsService.getQueryProjectUsers(projectcontentinfo1.getProject().getId());
+        model.addAttribute("projectRecords", records);
+
+        /*RuralProjectcontentinfo select = new RuralProjectcontentinfo();
+        select.setProject(records);
+        select.setParentIds("0,");
+        RuralProjectcontentinfo p = projectcontentinfoService.findListByProjectOnRural(select).get(0);
+        model.addAttribute("id",p.getId());
+        RuralProjectBasedData projectBasedData = new RuralProjectBasedData();
+        projectBasedData.setProject(records);
+        List<RuralProjectBasedData> projectBasedDatas = projectBasedDataService.findListOnRural(projectBasedData);
+        model.addAttribute("projectBasedDatas", projectBasedDatas);
+        RuralProjectContentData projectContentData = new RuralProjectContentData();
+        projectContentData.setProject(records);
+        List<RuralProjectContentData> projectContentDatas = projectContentDataService.findListOnRural(projectContentData);
+        model.addAttribute("projectContentDatas", projectContentDatas);
+        RuralProjectReportData projectReportInfo = new RuralProjectReportData();
+        projectReportInfo.setProject(records);
+        List<RuralProjectReportData> projectReportDatas = projectReportDataService.findListOnRural(projectReportInfo);
+        model.addAttribute("projectReportDatas", projectReportDatas);*/
+
+        projectcontentinfo.setProject(records);
+        ProjectReportData projectReportData = new ProjectReportData();
+        projectReportData.setType(dictType);
+        if (StringUtils.isNotBlank(projectcontentinfo.getInfoId())){
+            projectReportData = projectReportDataService.get(projectcontentinfo.getInfoId());
+        }else if (projectcontentinfo.getProjectReportData()!=null && StringUtils.isNotBlank(projectcontentinfo.getProjectReportData().getId())) {
+            projectReportData = projectReportDataService.get(projectcontentinfo.getProjectReportData().getId());
+        }else {
+            projectReportData.setNumber("");
+        }
+        if (projectReportData.getMaster()==null || StringUtils.isBlank(projectReportData.getMaster().getId())){
+            projectReportData.setMaster(UserUtils.getUser());
+        }
+        if (StringUtils.isBlank(projectReportData.getStatus())){
+            projectReportData.setFileStatus("1");
+        }
+        projectcontentinfo.setProjectReportData(projectReportData);
+        model.addAttribute("projectcontentinfo", projectcontentinfo);
+        if (projectReportData != null && projectReportData.getCreateBy() != null && StringUtils.isNotBlank(projectReportData.getCreateBy().getId()) && projectReportData.getCreateBy().getId().equals(UserUtils.getUser().getId())) {
+            return "modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/reportForm";
+        } else if (projectReportData == null || StringUtils.isBlank(projectReportData.getId())) {
+            return "modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/reportForm";
+        } else {
+            return "modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/reportView";
+        }
+    }
+
+    /**
+     * 新增报告信息
+     * @param projectcontentinfo
+     * @param model
+     * @param redirectAttributes
+     * @return
+     */
+    @RequestMapping(value = {"saveReport"})
+    public String saveReport(Projectcontentinfo projectcontentinfo, Model model,RedirectAttributes redirectAttributes)  {
+        try{
+            String str = projectcontentinfoService.saveData(projectcontentinfo,2);
+            addMessage(redirectAttributes, "发起报告审批"+(str.equals("true")?"成功":"失败"));
+            ProjectReportData projectReportData = projectcontentinfo.getProjectReportData();
+            if (projectReportData!=null){
+                if (StringUtils.isNotBlank(projectcontentinfo.getEdit()) && projectcontentinfo.getEdit().equals("edit")){
+                    return "redirect:"+ Global.getAdminPath()+"/projectcontentinfo/projectcontentinfo/list?id="+projectcontentinfo.getId()+"&edit=edit";
+                }
+                return "redirect:"+Global.getAdminPath()+"/projectcontentinfo/projectcontentinfo/?id="+projectcontentinfo.getId();
+            }
+        }catch (Exception e){
+            logger.error("ProjectcontentinfoController save Exception e"+e);
+        }
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
+        }
+        addMessage(redirectAttributes, "发起报告审批失败");
+        ProjectRecords projectRecords = projectcontentinfo.getProject()==null?new ProjectRecords():projectcontentinfo.getProject();
+        return "redirect:"+Global.getAdminPath()+"/projectcontentinfo/projectcontentinfo/?project.id="+projectRecords.getId();
+    }
+
+
+    /**
+     * 生成一个报告号
+     */
+    public String createReportNo(){
+        String msg = projectReportNumService.save("one");//保存
+        return msg;
+    }
+
+
+}

+ 46 - 0
src/main/resources/mappings/modules/projectcontentinfo/ProjectBasedDataDao.xml

@@ -95,6 +95,52 @@
 			</otherwise>
 		</choose>
 	</select>
+
+	<select id="findListOnRural" resultType="RuralProjectBasedData" >
+		SELECT
+			<include refid="projectBasedDataColumns"/>
+		FROM project_based_data a
+		<include refid="projectBasedDataJoins"/>
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			<if test="project != null and project.id != null and project.id != ''">
+				AND a.project_id = #{project.id}
+			</if>
+			<if test="type != null and type != ''">
+				AND a.type = #{type}
+			</if>
+			<if test="name != null and name != ''">
+				AND a.name like
+				<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
+				<if test="dbName == 'mysql'">CONCAT('%', #{name}, '%')</if>
+			</if>
+			<if test="number != null and number != ''">
+				AND a.number = #{number}
+			</if>
+			<if test="uploadUser!=null and uploadUser.id != null and uploadUser.id != ''">
+				AND a.upload_user = #{uploadUser.id}
+			</if>
+			<if test="provider!=null and provider != ''">
+				AND a.provider like
+				<if test="dbName == 'oracle'">'%'||#{provider}||'%'</if>
+				<if test="dbName == 'mysql'">CONCAT('%', #{provider}, '%')</if>
+			</if>
+			<if test="startDate != null and startDate != ''">
+				AND a.upload_date &gt;= #{startDate}
+			</if>
+			<if test="endDate != null and endDate != ''">
+				AND a.upload_date &lt;= #{endDate}
+			</if>
+		</where>
+		<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="findAllList" resultType="ProjectBasedData" >
 		SELECT 

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

@@ -79,6 +79,51 @@
 		</choose>
 	</select>
 
+	<select id="findListOnRural" resultType="RuralProjectContentData" >
+		SELECT
+			<include refid="projectContentDataColumns"/>
+		FROM project_content_data a
+		<include refid="projectContentDataJoins"/>
+		<where>
+            <if test="name !=null and name != ''">
+                AND a.name LIKE concat('%',#{name},'%')
+            </if>
+            <if test="number !=null and number != ''">
+                AND a.number = #{number}
+            </if>
+            <if test="master !=null and master.name != null and master.name !=''">
+                AND su.name LIKE concat('%',#{master.name},'%')
+            </if>
+            <if test="project!=null and project.id!=null and project.id!=''">
+                AND a.project_id = #{project.id}
+            </if>
+            <if test="type!=null and type!=''">
+                AND a.type = #{type}
+            </if>
+            <if test="parentType != null">
+                AND a.type LIKE concat(#{parentType},'%')
+            </if>
+            <if test="startDate != null">
+                AND a.create_date >= #{startDate}
+            </if>
+            <if test="endDate != null">
+                AND a.create_date &lt;= #{endDate}
+            </if>
+            <if test="extId !=null and extId!=''">
+                AND a.id != #{extId}
+            </if>
+			AND a.del_flag = #{DEL_FLAG_NORMAL}
+		</where>
+		<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="findReportContent" resultType="ProjectContentData" >
 		SELECT
 			<include refid="projectContentDataColumns"/>

+ 45 - 0
src/main/resources/mappings/modules/projectcontentinfo/ProjectReportDataDao.xml

@@ -166,6 +166,51 @@
 			</otherwise>
 		</choose>
 	</select>
+
+	<select id="findListOnRural" resultType="RuralProjectReportData" >
+		SELECT
+			<include refid="projectReportDataColumns"/>
+		FROM project_report_data a
+		<include refid="projectReportDataJoins"/>
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			<if test="project != null and project.id != null and project.id != ''">
+				AND a.project_id = #{project.id}
+			</if>
+			<if test="type != null and type != ''">
+				AND a.type = #{type}
+			</if>
+			<if test="name != null and name != ''">
+				AND a.name like
+				<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
+				<if test="dbName == 'mysql'">CONCAT('%', #{name}, '%')</if>
+			</if>
+			<if test="number != null and number != ''">
+				AND a.number = #{number}
+			</if>
+			<if test="status != null and status != ''">
+				AND a.status = #{status}
+			</if>
+			<if test="master!=null and master.id != null and master.id != ''">
+				AND a.master = #{master.id}
+			</if>
+			<if test="startDate != null and startDate != ''">
+				AND a.report_date &gt;= #{startDate}
+			</if>
+			<if test="endDate != null and endDate != ''">
+				AND a.report_date &lt;= #{endDate}
+			</if>
+		</where>
+		<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="findInfoList" resultType="ProjectReportData" >
 		SELECT
 			<include refid="projectReportDataColumns"/>,

+ 73 - 0
src/main/resources/mappings/modules/projectcontentinfo/ProjectcontentinfoDao.xml

@@ -34,6 +34,16 @@
 		<include refid="projectcontentinfoJoins"/>
 		WHERE a.id = #{id}
 	</select>
+
+	<select id="getByProjectId" resultType="Projectcontentinfo" >
+		SELECT
+			<include refid="projectcontentinfoColumns"/>
+		FROM project_content_info a
+		<include refid="projectcontentinfoJoins"/>
+		WHERE a.project_id = #{projectId}
+	</select>
+
+
 	<select id="getByInfoId" resultType="Projectcontentinfo" >
 		SELECT
 			<include refid="projectcontentinfoColumns"/>
@@ -105,6 +115,27 @@
 		</choose>
 	</select>
 
+	<select id="findListByProjectOnRural" resultType="com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectcontentinfo" >
+		SELECT
+		<include refid="projectcontentinfoColumns"/>
+		FROM project_content_info a
+		<include refid="projectcontentinfoJoins"/>
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			AND a.parent_ids = #{parentIds}
+			AND a.project_id = #{project.id}
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.sort DESC
+			</otherwise>
+		</choose>
+	</select>
+
+
 	<select id="findByType" resultType="Projectcontentinfo" >
 		SELECT
 		<include refid="projectcontentinfoColumns"/>
@@ -277,6 +308,48 @@
 			#{linkId}
 		)
 	</insert>
+
+	<insert id="insertOnRural">
+		INSERT INTO project_content_info(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			remarks,
+			del_flag,
+			parent_id,
+			parent_ids,
+			sort,
+			project_id,
+			company_id,
+			office_id,
+			type,
+			info_id,
+			dict_type,
+			name,
+			link_id
+		) VALUES (
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{remarks},
+			#{delFlag},
+			#{parent.id},
+			#{parentIds},
+			#{sort},
+			#{projectOnRural.id},
+			#{companyId},
+			#{officeId},
+			#{type},
+			#{infoId},
+			#{dictType},
+			#{name},
+			#{linkId}
+		)
+	</insert>
 	
 	<update id="update">
 		UPDATE project_content_info SET 	

+ 632 - 0
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageDao.xml

@@ -0,0 +1,632 @@
+<?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.ruralprojectrecords.dao.RuralProjectMessageDao">
+
+	<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"
+	</sql>
+	
+	<sql id="projectRecordsJoins">
+		LEFT JOIN sys_area area ON area.id = a.area_id
+	</sql>
+	
+    
+	<select id="get" resultType="RuralProjectRecords" >
+		SELECT
+			<include refid="projectRecordsColumns"/>
+        ,su.name AS "createBy.name"
+        ,o.top_company AS "office.name"
+        FROM rural_project_records a
+        <include refid="projectRecordsJoins"/>
+        LEFT JOIN sys_user su ON su.id = a.create_by
+        LEFT JOIN sys_office o ON o.id = a.office_id
+		WHERE a.id = #{id}
+	</select>
+	
+	<select id="findList" resultType="RuralProjectRecords" >
+		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",
+		ifnull(prd.number ,"") as "projectReportNumber"
+		,ifnull(prd.status,0) as "projectReportStatus"
+		FROM rural_project_records a
+		<include refid="projectRecordsJoins"/>
+
+        <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
+		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
+		left join project_report_data prd on prd.project_id = a.id
+		<where>
+			a.status = 5
+			<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="projectStatus !=null">
+                AND a.status = #{projectStatus}
+            </if>
+            <if test="beginDate !=null">
+                AND a.create_date >= #{beginDate}
+            </if>
+            <if test="endDate !=null">
+                AND a.create_date &lt; #{endDate}
+            </if>
+            AND  a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
+            <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>
+		<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="queryCount" resultType="int" >
+        SELECT count(DISTINCT a.id)
+        FROM rural_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>
+            <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="projectStatus !=null">
+                AND a.status = #{projectStatus}
+            </if>
+            <if test="beginDate !=null">
+                AND a.create_date >= #{beginDate}
+            </if>
+            <if test="endDate !=null">
+                AND a.create_date &lt; #{endDate}
+            </if>
+            AND  a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
+            <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>
+
+	<select id="findListByStatus" resultType="RuralProjectRecords" >
+		SELECT
+		<include refid="projectRecordsColumns"/>
+		,
+		wci.name AS "workContractInfo.name",
+		wci.contract_num AS "workContractInfo.contractNum",
+		wct.id AS "workContractInfo.client.id",
+		wct.name AS "workContractInfo.client.name",
+		o.top_company AS "office.name"
+		FROM rural_project_records a
+		<include refid="projectRecordsJoins"/>
+		LEFT JOIN work_project_user w on a.id = w.project_id
+		LEFT JOIN work_project_user w1 on a.id = w1.project_id
+        LEFT JOIN sys_user su on w.user_id = su.id
+        LEFT JOIN sys_user u on a.create_by = u.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 s ON s.id = a.company_id
+		LEFT JOIN sys_office o ON o.id = a.office_id
+		<where>
+			<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="workContractInfo !=null and workContractInfo.name !=null and workContractInfo.name !=''">
+				AND wci.name like concat(concat('%',#{workContractInfo.name}),'%')
+			</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}),'%')
+			</if>
+			AND w.is_master = '1' AND  a.status  = '5' AND a.del_flag='0'
+			<if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+                AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND (s.id = #{currentUser.company.id} or find_in_set( #{currentUser.company.id}, s.parent_ids ) ))${sqlMap.dsf} )
+			</if>
+            AND a.del_flag = #{DEL_FLAG_NORMAL}
+		</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="queryCountByStatus" resultType="int" >
+        SELECT count(DISTINCT a.id)
+        FROM rural_project_records a
+        LEFT JOIN work_project_user w on a.id = w.project_id
+        LEFT JOIN work_project_user w1 on a.id = w1.project_id
+        LEFT JOIN sys_user su on w.user_id = su.id
+        LEFT JOIN sys_user u on a.create_by = u.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 s ON s.id = a.company_id
+        LEFT JOIN sys_office o ON o.id = a.office_id
+        <where>
+            <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="workContractInfo !=null and workContractInfo.name !=null and workContractInfo.name !=''">
+                AND wci.name like concat(concat('%',#{workContractInfo.name}),'%')
+            </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}),'%')
+            </if>
+            AND w.is_master = '1' AND  a.status  = '5' AND a.del_flag='0'
+            <if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+                AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND (s.id = #{currentUser.company.id} or find_in_set( #{currentUser.company.id}, s.parent_ids ) ))${sqlMap.dsf} )
+            </if>
+            AND a.del_flag = #{DEL_FLAG_NORMAL}
+        </where>
+    </select>
+	
+	<select id="findAllList" resultType="RuralProjectRecords" >
+		SELECT 
+			<include refid="projectRecordsColumns"/>
+		FROM rural_project_records a
+		<include refid="projectRecordsJoins"/>
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+		</where>		
+		<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>
+	
+	<insert id="insert">
+		INSERT INTO rural_project_records(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			del_flag,
+			contract_id,
+			project_id,
+			project_name,
+			scale_type,
+			scale_unit,
+			scale_quantity,
+			area_id,
+			project_site,
+			project_desc,
+			remarks,
+			status,
+			company_id,
+		    office_id,
+		    alter_process_id,
+		    province,
+		    city,
+		    area_name,
+		    project_structure,
+		    on_ground_num,
+		    under_ground_num,
+		    building_scale,
+		    measuring_unit,
+		    project_use,
+		    install_fees,
+		    building_fees,
+		    building_percent,
+		    install_percent,
+		    unit_fees,
+		    building_unit_fees,
+		    install_unit_fees,
+		    total_fees
+		) VALUES (
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{delFlag},
+			#{workContractInfo.id},
+			#{projectId},
+			#{projectName},
+			#{scaleType},
+			#{scaleUnit},
+			#{scaleQuantity},
+			#{area.id},
+			#{projectSite},
+			#{projectDesc},
+			#{remarks},
+			#{projectStatus},
+			#{company.id},
+			#{office.id},
+			#{alterProcessId},
+			#{province},
+			#{city},
+			#{county},
+			#{projectStructure},
+			#{onGroundNum},
+			#{underGroundNum},
+			#{buildingScale},
+			#{measuringUnit},
+			#{projectUse},
+			#{installFees},
+			#{buildingFees},
+			#{buildingPercent},
+			#{installPercent},
+			#{unitFees},
+			#{buildingUnitFees},
+			#{installUnitFees},
+			#{totalFees}
+		)
+	</insert>
+	
+	<update id="update">
+		UPDATE rural_project_records SET
+			update_by = #{updateBy.id},
+			update_date = #{updateDate},
+			contract_id = #{workContractInfo.id},
+			project_id = #{projectId},
+			project_name = #{projectName},
+			scale_type = #{scaleType},
+			scale_unit = #{scaleUnit},
+			scale_quantity = #{scaleQuantity},
+			area_id = #{area.id},
+			project_site = #{projectSite},
+			project_desc = #{projectDesc},
+			remarks = #{remarks},
+			status = #{projectStatus},
+			company_id = #{company.id},
+			office_id = #{office.id},
+			alter_process_id = #{alterProcessId},
+			province = #{province},
+		    city = #{city},
+		    area_name = #{county},
+		    project_structure =  #{projectStructure},
+		    on_ground_num = #{onGroundNum},
+		    under_ground_num = #{underGroundNum},
+		    building_scale = #{buildingScale},
+		    measuring_unit =  #{measuringUnit},
+		    project_use =  #{projectUse},
+		    install_fees =  #{installFees},
+		    building_fees =  #{buildingFees},
+		    building_percent =  #{buildingPercent},
+		    install_percent =  #{installPercent},
+		    unit_fees = #{unitFees},
+		    building_unit_fees = #{buildingUnitFees},
+		    install_unit_fees =  #{installUnitFees},
+		    total_fees =  #{totalFees}
+		WHERE id = #{id}
+	</update>
+	
+	
+	<!--物理删除-->
+	<update id="delete">
+		UPDATE rural_project_records SET
+			del_flag = #{DEL_FLAG_DELETE}
+		WHERE id = #{id}
+	</update>
+	
+	<!--逻辑删除-->
+	<update id="deleteByLogic">
+		UPDATE rural_project_records SET
+			del_flag = #{DEL_FLAG_DELETE}
+		WHERE id = #{id}
+	</update>
+
+	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
+	<select id="findUniqueByProperty" resultType="RuralProjectRecords" statementType="STATEMENT">
+		select
+			<include refid="projectRecordsColumns"/>
+		FROM rural_project_records a
+		<include refid="projectRecordsJoins"/>
+		where ${propertyName} = '${value}'
+	</select>
+
+    <select id="findUseableByProjectId" resultType="RuralProjectRecords">
+        select
+        <include refid="projectRecordsColumns"/>
+        FROM rural_project_records a
+        <include refid="projectRecordsJoins"/>
+        WHERE a.project_id = #{projectId} and a.status != 7
+    </select>
+
+    <update id="updateProcessIdAndStatus" >
+        UPDATE  rural_project_records SET
+          process_instance_id = #{processInstanceId},
+          status = #{projectStatus}
+        WHERE id = #{id}
+    </update>
+	
+	<update id="updateSelectiveById">
+		UPDATE  rural_project_records
+		<set>
+			<if test="updateBy!=null and updateBy.id!=null and updateBy.id!=''">
+				update_by = #{updateBy.id},
+			</if>
+			<if test="updateDate!=null">
+				update_date = #{updateDate},
+			</if>
+			<if test="workContractInfo!=null and workContractInfo.id!=null and workContractInfo.id!=''">
+				contract_id = #{workContractInfo.id},
+			</if>
+			<if test="projectId!=null and projectId!=''">
+				project_id = #{projectId},
+			</if>
+			<if test="projectName!=null and projectName!=''">
+				project_name = #{projectName},
+			</if>
+			<if test="scaleType!=null and scaleType!=''">
+				scale_type = #{scaleType},
+			</if>
+			<if test="scaleUnit!=null and scaleUnit!=''">
+				scale_unit = #{scaleUnit},
+			</if>
+			<if test="scaleQuantity !=null and scaleQuantity != ''">
+				scale_quantity = #{scaleQuantity},
+			</if>
+			<if test="area!=null and area.id!=null and area.id!=''">
+				area_id = #{area.id},
+			</if>
+			<if test="projectSite!=null and projectSite!=''">
+				project_site = #{projectSite},
+			</if>
+			<if test="projectDesc!=null and projectDesc!=''">
+				project_desc = #{projectDesc},
+			</if>
+			<if test="remarks!=null and remarks!=''">
+				remarks = #{remarks},
+			</if>
+			<if test="projectStatus !=null and projectStatus != 0">
+				status = #{projectStatus},
+			</if>
+			<if test="company!=null and company.id!=null and company.id!=''">
+				company_id = #{company.id},
+			</if>
+			<if test="office!=null and office.id!=null and office.id!=''">
+				office_id = #{office.id},
+			</if>
+			<if test="alterProcessId!=null and alterProcessId!=''">
+                alter_process_id = #{alterProcessId}
+			</if>
+		</set>
+		WHERE id = #{id}
+	</update>
+
+	<update id="updateSelectiveByProjectId">
+		UPDATE  rural_project_records
+		<set>
+			<if test="updateBy!=null and updateBy.id!=null and updateBy.id!=''">
+				update_by = #{updateBy.id},
+			</if>
+			<if test="updateDate!=null">
+				update_date = #{updateDate},
+			</if>
+			<if test="workContractInfo!=null and workContractInfo.id!=null and workContractInfo.id!=''">
+				contract_id = #{workContractInfo.id},
+			</if>
+			<if test="projectName!=null and projectName!=''">
+				project_name = #{projectName},
+			</if>
+			<if test="scaleType!=null and scaleType!=''">
+				scale_type = #{scaleType},
+			</if>
+			<if test="scaleUnit!=null and scaleUnit!=''">
+				scale_unit = #{scaleUnit},
+			</if>
+			<if test="scaleQuantity !=null and scaleQuantity != ''">
+				scale_quantity = #{scaleQuantity},
+			</if>
+			<if test="area!=null and area.id!=null and area.id!=''">
+				area_id = #{area.id},
+			</if>
+			<if test="projectSite!=null and projectSite!=''">
+				project_site = #{projectSite},
+			</if>
+			<if test="projectDesc!=null and projectDesc!=''">
+				project_desc = #{projectDesc},
+			</if>
+			<if test="remarks!=null and remarks!=''">
+				remarks = #{remarks},
+			</if>
+			<if test="projectStatus !=null and projectStatus != 0">
+				status = #{projectStatus},
+			</if>
+			<if test="company!=null and company.id!=null and company.id!=''">
+				company_id = #{company.id},
+			</if>
+			<if test="office!=null and office.id!=null and office.id!=''">
+				office_id = #{office.id},
+			</if>
+			<if test="alterProcessId!=null and alterProcessId!=''">
+				alter_process_id = #{alterProcessId}
+			</if>
+		</set>
+		WHERE project_id = #{projectId}
+	</update>
+
+	<select id="findPageByRe" resultType="RuralProjectRecords" >
+		SELECT
+		<include refid="projectRecordsColumns"/>
+		,
+		wci.name AS "workContractInfo.name",
+		wci.contract_num AS "workContractInfo.contractNum",
+		wct.id AS "workContractInfo.client.id",
+		wct.name AS "workContractInfo.client.name",
+		o.name AS "office.name"
+		FROM rural_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 u on a.create_by = u.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 s ON s.id = a.company_id
+		LEFT JOIN sys_office o ON o.id = a.office_id
+		where a.status='5'  and a.del_flag='0' and w.user_id=#{userId} and w.del_flag='0'
+		and wci.del_flag='0' and (wci.completion_status!='5' or wci.completion_status is null)
+		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>
+</mapper>

+ 3 - 3
src/main/webapp/static/bos/bosupload.js

@@ -31,7 +31,7 @@ function multitest (storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,
     var name = names[names.length-1];
     $.ajax({
         type:'post',
-        url:realPath+"/a/bos/upload",
+        url:realPath+"/bos/upload",
         data:formdata,
         contentType: false,
         processData: false,
@@ -46,7 +46,7 @@ function multitest (storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,
         // }
         success:function (data1) {
             if(data1.code==='1'){
-                returnUrl = realPath+"/a/sys/workattachment/saveAttachment";
+                returnUrl = realPath+"/sys/workattachment/saveAttachment";
                 var p = Math.floor(1*100);
                 $("#jindutiao"+divId).attr("style","width: "+p+"%");
                 $("#jindutiao"+divId).attr("aria-valuenow",p+"%");
@@ -95,7 +95,7 @@ function multitest (storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,
                                 '<div class="op-btn-box">' +
                                 // '<a href="javascript:location.href=\''+realPath+'/a/workfullmanage/workFullManage/downLoadAttach?file=\'+encodeURIComponent(\''+data.url+'\');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>'+
                                 '<a href="'+data1.url+'" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>'+
-                                '<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,\''+realPath+'/a/sys/workattachment/deleteFileFromAliyun?url='+data.url+'&id='+data.id+'&type=2\',\''+addFile+'\',\''+divId+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>'+
+                                '<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,\''+realPath+'/sys/workattachment/deleteFileFromAliyun?url='+data.url+'&id='+data.id+'&type=2\',\''+addFile+'\',\''+divId+'\')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>'+
                                 '</div>' +
                                 '</td>'+
                                 '</tr>';

+ 1 - 0
src/main/webapp/static/common/jeeplus.js

@@ -424,6 +424,7 @@ function getAuditState(id)
     result.action = true;
     switch(id)
     {
+        case "0":result.status="";result.action = false;break;
         case "1":result.label = "tempstore";result.status="暂存";result.action = false;break;
         case "2":result.label = "auditing";result.status="审批中";break;
         case "3":result.label = "cancel";result.status="撤回";break;

+ 619 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/reportForm.jsp

@@ -0,0 +1,619 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>报告详情管理</title>
+	<meta name="decorator" content="default"/>
+	<style>
+		label.error{
+			top:40px;
+			left:0;
+		}
+	</style>
+	<script type="text/javascript">
+        var validateForm;
+        var dataList;
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(obj == 1){
+                    $("#inputForm").attr("action","${ctx}/ruralProject/ruralProjectMessage/saveReport?view=report");
+                }else{
+                    $("#inputForm").attr("action","${ctx}/projectcontentinfo/projectcontentinfo/save?view=report");
+                }
+                $("#inputForm").submit();
+                return true;
+            }
+
+            return false;
+        }
+        $(document).ready(function() {
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            laydate.render({
+                elem: '#reportDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });;
+            $("#gistdata_btn").click(function () {
+                $("#gistdata_file").click();
+            });;
+            $("#other_btn").click(function () {
+                $("#other_file").click();
+            });
+        });
+        function hasInArr(id,idArr) {
+            for(var i=0;i<idArr.length;i++){
+                if(id==$(idArr[i]).val()){
+                    return true;
+                }
+            }
+            return false;
+        }
+        function insertTitle(tValue){
+            var files = $("#attachment_file")[0].files;
+            for(var i=0;i<files.length;i++) {
+                var file = files[i];
+                var attachmentId = "";
+                var attachmentFlag = "84";
+                console.log(file);
+                var timestamp = new Date().getTime();
+
+                var storeAs = "attachment-file/basedData/" + timestamp + "/" + file['name'];
+                var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
+                /*将这段字符串存到数据库即可*/
+                var divId = "_attachment";
+                $("#addFile" + divId).show();
+                multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, "0");
+            }
+        }
+
+        function gistdataInsertTitle(tValue){
+            var files = $("#gistdata_file")[0].files;
+            for(var i=0;i<files.length;i++) {
+                var file = files[i];
+                var gistdataId = "";
+                var gistdataFlag = "84";
+                console.log(file);
+                var timestamp = new Date().getTime();
+
+                var storeAs = "attachment-file/basedData/" + timestamp + "/" + file['name'];
+                var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
+                /*将这段字符串存到数据库即可*/
+                var divId = "_gistdata";
+                $("#addFile" + divId).show();
+                multipartUploadWithSts(storeAs, file, gistdataId, gistdataFlag, uploadPath, divId, "0");
+            }
+        }
+
+        function otherInsertTitle(tValue){
+            var files = $("#other_file")[0].files;
+            for(var i=0;i<files.length;i++) {
+                var file = files[i];
+                var attachmentId = "";
+                var attachmentFlag = "84";
+                console.log(file);
+                var timestamp = new Date().getTime();
+
+                var storeAs = "attachment-file/basedData/" + timestamp + "/" + file['name'];
+                var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
+                /*将这段字符串存到数据库即可*/
+                var divId = "_other";
+                $("#addFile" + divId).show();
+                multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, "0");
+            }
+        }
+        
+        function selectNum() {
+			top.layer.open({
+				type: 2,
+				area: ['50%','95%'],
+				title:'选择报告号',
+				content: '${ctx}/projectreportnum/projectReportNum/select',
+				btn: ['确定','关闭'],
+				btn1: function(index, layero){
+					var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var item = iframeWin.getSelectedItem();
+					if(item === 'false'){
+						iframeWin.layer.msg('请选择一条数据', {icon: 5});
+					}else {
+						$("#number").val(item)
+						top.layer.close(index);//关闭对话框。
+					}
+				},
+				btn2: function(index){
+				}
+
+			})
+		}
+        function openDialogre(title,url,width,height,formId){
+
+            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;
+                    inputForm.attr("action","${ctx}/projectcontentinfo/projectcontentinfo/ajaxsaveBaseData");//表单提交成功后,从服务器返回的url在当前tab中展示
+                    var $document = iframeWin.contentWindow.document;
+                    formSubmitAjax($document,formId,index);
+                },
+                btn2: function(index){
+                }
+            });
+        }
+        function formSubmitAjax($document,inputForm,index){
+            var validateForm = $($document.getElementById(inputForm)).validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            if(validateForm.form()){
+                $($document.getElementById(inputForm)).ajaxSubmit({
+                    success:function(data) {
+                        if(!data.success){
+                            top.layer.msg("保存依据资料信息异常!",{icon:2});
+                            return false;
+                        }
+                        var idx = $("#workBaseDataList tr").length;
+                        addRowBaseData("#workBaseDataList",idx,workBaseDataTpl,data.body.workBasedData);
+                        parent.layer.msg(data.msg,{icon:1});
+                        top.layer.close(index)
+                    }
+                });
+            }
+        }
+
+        function delRowBaseData(obj, prefix,userId){
+            var id = $(prefix+"_id").val();
+            /* var createBy = $(prefix+"_userId").val();*/
+            var currentUser = '${fns:getUser().id}';
+            var contentId = '${projectcontentinfo.projectContentData.id}';
+            console.log(contentId);
+
+            $.ajax({
+                type:"post",
+                url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
+                data:{"contentId":contentId,"basedId":id},
+                dataType:"json",
+                success:function(data){
+                    if(data.success) {
+                        $(obj).parent().parent().remove();
+                        /*parent.parent.refreshTrees();*/
+                        if(data.body.inuse){
+                            return;
+                        }
+                        if (currentUser == userId) {
+                            confirmDelete('是否同步删除资料库的文件?','${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+id+'&id=${projectcontentinfo.id}&type=1');
+                        }
+                    }else {
+                        top.layer.msg("删除依据资料失败!", {icon: 0});
+                    }
+                }
+            })
+            return;
+        }
+
+		function reviewAudits(mess, href,obj,remarks){
+				console.log(remarks);
+				var remark = $(remarks);
+				remark.val("确认");
+			    $("#audit"+obj).val("1");
+				$("#check1"+obj).attr("style","display:none");
+				$("#check2"+obj).attr("style","display");
+				top.layer.msg("已确认!", {icon: 1});
+			return false;
+		}
+
+		function getFee() {
+			var rf = $("#reviewFee").val();
+			var af = $("#approvalFee").val();
+			if(rf != ''&& af !=''){
+				var hf = parseInt(rf)-parseInt(af);
+				var rate = Math.round(parseInt(hf) / parseInt(rf) * 100) / 100 * 100
+				$("#verifyFee").val(hf);
+				$("#verifyRate").val(rate);
+			}
+			if(af !=''){
+				$("#consultFee").val(af)
+			}
+		}
+
+        function addReview(obj) {
+            var infoId = $("#id").val();
+            var name = $("#name").val();
+            $.ajax({
+                type:"post",
+                url:'${ctx}/projectcontentinfo/projectContentData/addReview',
+                data:{"reviewId":obj,"name":name,"infoId":infoId},
+                dataType:"json",
+                success:function(data){
+                    if(data.success) {
+                        $("#projectContentDataList2").html("");
+						var list = eval(data.body.list);
+						dataList=list
+                        for(var i in list){
+                            var tr = "<tr>" +
+                                "<td>" +
+                                "<input id=\"projectReviewList"+i+"_id\" name=\"projectReportData.projectReviewList["+i+"].id\" type=\"hidden\" value=\""+list[i].id+"\"/>" +
+                                "<input id=\"projectReviewList"+i+"_delFalg\" name=\"projectReportData.projectReviewList["+i+"].delFalg\" type=\"hidden\" value=\"1\"/>" +
+                                "<input id=\"projectReviewList"+i+"_remarks\" name=\"projectReportData.projectReviewList["+i+"].remarks\" type=\"hidden\" value=\"\"/>" +
+                                ""+(parseInt(i)+1)+"" +
+                                "</td>" +
+                                "<td>" +
+                                ""+list[i].standardDetail+"" +
+                                "</td>" +
+                                "<td>" +
+                               	"<div id = \"check1"+list[i].id+"\">\n" +
+                                "<input type=\"hidden\" id=\"audit"+list[i].id+"\" value=\"0\"/>\n" +
+                                "<a href=\"projectReviewList"+list[i]+"\" onclick=\"return reviewAudits('确认要审核该质量复核内容吗?', this.href,'"+list[i].id+"','#projectReviewList"+i+"_remarks')\" style=\"color:#fff;\" class=\"op-btn op-btn-edit\">确认</a>" +
+                                "</div>\n" +
+                                "<div id = \"check2"+list[i].id+"\" class=\"check-ok\" style=\"display: none\">" +
+                                "<i class=\"fa fa-check\"></i>" +
+                                "</div>"
+                                "</td>" +
+                                "</tr>";
+                            $("#projectContentDataList2").append(tr);
+                        }
+                    }else {
+                        top.layer.msg("获取数据失败!", {icon: 0});
+                    }
+                }
+            })
+        }
+
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container${container}">
+		<form:form id="inputForm" modelAttribute="projectcontentinfo" action="${ctx}/projectcontentinfo/projectcontentinfo/save?view=report" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<form:hidden path="name"/>
+		<form:hidden path="parentIds"/>
+		<form:hidden path="edit"/>
+		<form:hidden path="projectReportData.id"/>
+		<form:hidden path="projectReportData.createBy.id"/>
+		<sys:message content="${message}"/>
+		<div class="form-group layui-row first lw12">
+			<div class="form-group-label"><h2>基本信息</h2></div>
+			<%--<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label"><span class="require-item">*</span>报告编号:</label>
+				<div class="layui-input-block">
+					<div class="input-group">
+						<form:input  path="projectReportData.number" onclick="selectNum()" id="number" htmlEscape="false" readonly="true" class="form-control layui-input required"/>
+						<span class="input-group-btn" onclick="selectNum()">
+								<label class="form-status">
+									<c:choose>
+										<c:when test="${not empty projectcontentinfo.projectReportData.status}">${fns:getDictLabel(projectcontentinfo.projectReportData.status, 'audit_state', '')}
+										</c:when>
+										<c:otherwise>新增</c:otherwise>
+									</c:choose></label>
+							 </span>
+					</div>
+				</div>
+			</div>--%>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label"><span class="require-item">*</span>成果类型:</label>
+				<div class="layui-input-block">
+					<form:select  path="projectReportData.achievementType" class="form-control simple-select required">
+						<form:option value="" label=""/>
+						<form:options items="${fns:getMainDictList('achievement_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+					</form:select>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label"><span class="require-item">*</span>签章类型:</label>
+				<div class="layui-input-block">
+					<form:select path="projectReportData.reportType" class="form-control simple-select required">
+						<form:option value="" label=""/>
+						<form:option value="电子章" label="电子章"/>
+						<form:option value="实体章" label="实体章"/>
+					</form:select>
+				</div>
+			</div>
+		</div>
+			<div class="form-group layui-row first lw12">
+				<div class="form-group-label"><h2>项目信息</h2></div>
+					<div class="layui-item layui-col-sm6">
+						<label class="layui-form-label">送审价(元):</label>
+						<div class="layui-input-block with-icon">
+							<form:input id="reviewFee" path="projectReportData.reviewFee" htmlEscape="false"  class="form-control layui-input number" onchange="getFee()"/>
+						</div>
+					</div>
+					<div class="layui-item layui-col-sm6">
+						<label class="layui-form-label">审定价(元):</label>
+						<div class="layui-input-block with-icon">
+							<form:input id="approvalFee" path="projectReportData.approvalFee" htmlEscape="false"  class="form-control layui-input number" onchange="getFee()"/>
+						</div>
+					</div>
+					<div class="layui-item layui-col-sm6">
+						<label class="layui-form-label">合同价(元):</label>
+						<div class="layui-input-block with-icon">
+							<form:input id="contractFee" path="projectReportData.contractFee" htmlEscape="false"  class="form-control layui-input number"/>
+						</div>
+					</div>
+					<div class="layui-item layui-col-sm6">
+						<label class="layui-form-label">核增核减额(元):</label>
+						<div class="layui-input-block with-icon">
+							<form:input id="verifyFee" path="projectReportData.verifyFee" htmlEscape="false"  class="form-control layui-input number" readonly="true"/>
+						</div>
+					</div>
+					<div class="layui-item layui-col-sm6">
+						<label class="layui-form-label">核增核减率(%):</label>
+						<div class="layui-input-block with-icon">
+							<form:input id="verifyRate" path="projectReportData.verifyRate" htmlEscape="false"  class="form-control layui-input number" readonly="true"/>
+						</div>
+					</div>
+					<div class="layui-item layui-col-sm6">
+						<label class="layui-form-label">咨询标的额(元):</label>
+						<div class="layui-input-block with-icon">
+							<form:input id="consultFee" path="projectReportData.consultFee" htmlEscape="false"  class="form-control layui-input number" readonly="true"/>
+						</div>
+					</div>
+					<div class="layui-item layui-col-sm6">
+						<label class="layui-form-label">土建造价(元):</label>
+						<div class="layui-input-block with-icon">
+							<form:input id="buildingFee" path="projectReportData.buildingFee" htmlEscape="false"  class="form-control layui-input number"/>
+						</div>
+					</div>
+					<div class="layui-item layui-col-sm6">
+						<label class="layui-form-label">安装造价(元):</label>
+						<div class="layui-input-block with-icon">
+							<form:input id="installFee" path="projectReportData.installFee" htmlEscape="false"  class="form-control layui-input number"/>
+						</div>
+					</div>
+				</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>报告文件</h2></div>
+				<div class="layui-item nav-btns">
+					<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>
+				<div id="addFile_attachment" style="display: none" class="upload-progress">
+					<span id="fileName_attachment" ></span>
+					<b><span id="baifenbi_attachment" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+				<span id="attachment_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${projectcontentinfo.projectReportData.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+											<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+										</c:if>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>依据性资料</h2></div>
+				<div class="layui-item nav-btns">
+					<a id="gistdata_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>
+				<div id="addFile_gistdata" style="display: none" class="upload-progress">
+					<span id="fileName_gistdata" ></span>
+					<b><span id="baifenbi_gistdata" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
+				<span id="gistdata_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="gistdata_upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_gistdata">
+						<c:forEach items="${projectcontentinfo.projectReportData.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+											<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFileGistdata')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+										</c:if>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>其他文件</h2></div>
+				<div class="layui-item nav-btns">
+					<a id="other_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>
+				<div id="addFile_other" style="display: none" class="upload-progress">
+					<span id="fileName_other" ></span>
+					<b><span id="baifenbi_other" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
+				<span id="other_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable_other" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_other">
+						<c:forEach items="${projectcontentinfo.projectReportData.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+											<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFileOther')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+										</c:if>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+
+
+			<c:if test="${not empty projectcontentinfo.infoId}">
+				<div class="pull-right">
+					<button id="btnSubmit" class="btn btn-primary btn-rounded btn-outline btn-sm" type="submit" onclick="$('#edit').val('edit')"><i class="fa fa-chevron-up"></i>暂 存</button>
+				</div>
+			</c:if>
+		<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 371 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/reportView.jsp

@@ -0,0 +1,371 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>报告详情管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+
+	</script>
+</head>
+
+<body>
+<div class="single-form">
+	<div class="container${container}  view-form">
+		<div class="form-group layui-row first lw12">
+			<div class="form-group-label"><h2>基本信息</h2></div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label"><span class="require-item">*</span>报告名称:</label>
+				<div class="layui-input-block with-icon">
+					<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectcontentinfo.projectReportData.name}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label"><span class="require-item">*</span>报告编号:</label>
+				<div class="layui-input-block">
+					<div class="input-group">
+					<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectcontentinfo.projectReportData.number}"/>
+					<span class="input-group-btn">
+								<label class="form-status">
+									<c:choose>
+										<c:when test="${not empty projectcontentinfo.projectReportData.status}">${fns:getDictLabel(projectcontentinfo.projectReportData.status, 'audit_state', '')}
+										</c:when>
+										<c:otherwise>新添</c:otherwise>
+									</c:choose></label>
+							 </span>
+					</div>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label"><span class="require-item">*</span>工作内容类型:</label>
+				<div class="layui-input-block">
+					<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${fns:getContentTypeName(projectcontentinfo.projectReportData.type,"")}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">成果类型:</label>
+				<div class="layui-input-block">
+					<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${fns:getMainDictLabel(projectcontentinfo.projectReportData.achievementType, 'achievement_type', '')}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">复核标准:</label>
+				<div class="layui-input-block">
+					<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${fns:getDictLabel(projectcontentinfo.projectReportData.reviewStandard, 'reviewStandard', '')}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">报告日期:</label>
+				<div class="layui-input-block">
+					<input id="provideDate" name="projectReportData.provideDate" type="text" htmlEscape="false" readonly="true" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+						   value="<fmt:formatDate value="${projectcontentinfo.projectReportData.reportDate}" pattern="yyyy-MM-dd"/>"/>
+				</div>
+			</div>
+			<%--<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">签字造价师一:</label>
+				<div class="layui-input-block">
+					<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${projectcontentinfo.projectReportData.signCostOne.name}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">签字造价师二:</label>
+				<div class="layui-input-block">
+					<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${projectcontentinfo.projectReportData.signCostTwo.name}"/>
+				</div>
+			</div>--%>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">签章类型:</label>
+				<div class="layui-input-block">
+					<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${projectcontentinfo.projectReportData.reportType}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">归档状态:</label>
+				<div class="layui-input-block">
+					<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${fns:getDictLabel(projectcontentinfo.projectReportData.fileStatus, 'record_state', '')}"/>
+				</div>
+			</div>
+			<c:if test="${not empty projectcontentinfo.projectReportData.invalidStatus}">
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">作废原因:</label>
+					<div class="layui-input-block">
+						<textarea path="remarks" htmlEscape="false" readonly="true" rows="3" maxlength="20" class="form-control" >${projectcontentinfo.projectReportData.remarks}</textarea>
+					</div>
+				</div>
+			</c:if>
+		</div>
+		<div class="form-group layui-row first lw12">
+			<div class="form-group-label"><h2>项目信息</h2></div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">送审价(元):</label>
+				<div class="layui-input-block with-icon">
+					<input  id="projectReportData.reviewFee" readonly="true" class="form-control layui-input number" value="<fmt:formatNumber value="${projectcontentinfo.projectReportData.reviewFee}" pattern="#,##0.00#"/>" />
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">审定价(元):</label>
+				<div class="layui-input-block with-icon">
+					<input  id="projectReportData.approvalFee" readonly="true" class="form-control layui-input number" value="<fmt:formatNumber value="${projectcontentinfo.projectReportData.approvalFee}" pattern="#,##0.00#"/>" />
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">合同价(元):</label>
+				<div class="layui-input-block with-icon">
+					<input  id="projectReportData.contractFee"  readonly="true" class="form-control layui-input number" value="<fmt:formatNumber value="${projectcontentinfo.projectReportData.contractFee}" pattern="#,##0.00#"/>" />
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">核增核减额(元):</label>
+				<div class="layui-input-block with-icon">
+					<input id="projectReportData.verifyFee"  readonly="true" class="form-control layui-input number" value="<fmt:formatNumber value="${projectcontentinfo.projectReportData.verifyFee}" pattern="#,##0.00#"/>" />
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">核增核减率(%):</label>
+				<div class="layui-input-block with-icon">
+					<input  id="projectReportData.verifyRate"  readonly="true" class="form-control layui-input number" value="${projectcontentinfo.projectReportData.verifyRate}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">咨询标的额(元):</label>
+				<div class="layui-input-block with-icon">
+					<input  id="projectReportData.consultFee" readonly="true" class="form-control layui-input number" value="<fmt:formatNumber value="${projectcontentinfo.projectReportData.consultFee}" pattern="#,##0.00#"/>" />
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">土建造价(元):</label>
+				<div class="layui-input-block with-icon">
+					<input  id="projectReportData.buildingFee"  readonly="true" class="form-control layui-input number" value="<fmt:formatNumber value="${projectcontentinfo.projectReportData.buildingFee}" pattern="#,##0.00#"/>" />
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">安装造价(元):</label>
+				<div class="layui-input-block with-icon">
+					<input  id="projectReportData.installFee"  readonly="true" class="form-control layui-input number" value="<fmt:formatNumber value="${projectcontentinfo.projectReportData.installFee}" pattern="#,##0.00#"/>"/>
+				</div>
+			</div>
+		</div>
+		<div class="form-group layui-row first lw12">
+			<div class="form-group-label"><h2>依据性资料明细</h2></div>
+			<div class="layui-item layui-col-xs12 form-table-container">
+				<table id="contentTableBase" class="table table-bordered table-condensed details">
+					<thead>
+					<tr>
+						<th class="hide"></th>
+						<th >资料编号</th>
+						<th >资料名称</th>
+						<th >资料类别</th>
+						<th >上传人</th>
+						<th >上传日期</th>
+					</tr>
+					</thead>
+					<tbody id="workBaseDataList">
+					<c:forEach items="${projectcontentinfo.projectReportData.projectBasedDataList}" var="projectBasedData" varStatus="idx">
+						<tr>
+							<td class="hide">
+								<input type="hidden" id="workBaseDataList${idx.index}_id" value="${projectBasedData.id}">
+							</td>
+							<td style="text-align:center;">
+									${projectBasedData.number}
+							</td>
+							<td style="text-align:center;">
+									${projectBasedData.name}
+							</td>
+							<td style="text-align:center;">
+									${fns:getDictLabel(projectBasedData.type, 'project_document_type', '')}
+							</td>
+							<td style="text-align:center;">
+									${projectBasedData.uploadUser.name}
+							</td>
+							<td style="text-align:center;">
+								<fmt:formatDate value="${projectBasedData.uploadDate}" pattern="yyyy-MM-dd"/>
+							</td>
+						</tr>
+					</c:forEach>
+					</tbody>
+				</table>
+			</div>
+		</div>
+		<div class="form-group layui-row first lw12">
+			<div class="form-group-label"><h2>依据工作内容</h2></div>
+			<!-- 表格 -->
+			<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+			<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
+				<thead>
+				<tr>
+					<th style="text-align: center;width:20%">工作内容编号</th>
+					<th style="text-align: center;width:20%">工作内容名称</th>
+					<th style="text-align: center;width:20%">工作内容类型</th>
+					<th style="text-align: center;width:20%">负责人</th>
+					<th style="text-align: center;width:20%">创建时间</th>
+				</tr>
+				</thead>
+				<tbody id="projectContentDataList">
+				<c:forEach items="${projectcontentinfo.projectReportData.projectContentDataList}" var="projectContentData" varStatus="index">
+					<tr>
+						<td style="text-align:center;">
+								${projectContentData.number}
+						</td>
+						<td style="text-align:center;">
+								${projectContentData.name}
+						</td>
+						<td style="text-align:center;">
+								${fns:getContentTypeName(projectContentData.type,"")}
+						</td>
+						<td style="text-align:center;">
+								${projectContentData.master.name}
+						</td>
+						<td style="text-align:center;">
+							<fmt:formatDate value="${projectContentData.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
+						</td>
+					</tr>
+				</c:forEach>
+				</tbody>
+			</table>
+			</div>
+		</div>
+		<div class="form-group layui-row">
+			<div class="form-group-label"><h2>报告文件</h2></div>
+			<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+				<table id="upTable" class="table table-bordered table-condensed details">
+					<thead>
+					<tr>
+						<%-- <th>序号</th>--%>
+						<th>文件预览</th>
+						<th>上传人</th>
+						<th>上传时间</th>
+						<th width="200px">操作</th>
+					</tr>
+					</thead>
+					<tbody id="file_attachment">
+					<c:forEach items="${projectcontentinfo.projectReportData.workAttachments}" var = "workClientAttachment" varStatus="status">
+						<tr>
+								<%-- <td>${status.index + 1}</td>--%>
+							<c:choose>
+								<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+									<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+								</c:when>
+								<c:otherwise>
+									<c:choose>
+										<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+											<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+										</c:when>
+										<c:otherwise>
+											<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+										</c:otherwise>
+									</c:choose>
+								</c:otherwise>
+							</c:choose>
+							<td>${workClientAttachment.createBy.name}</td>
+							<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+							<td class="op-td">
+								<div class="op-btn-box" >
+                                    <c:set var="signflag" value="${fns:getSysParam('sign_flag',fns:getUser())}"/>
+                                    <c:choose>
+                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'doc')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'docx')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'xls')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'xlsx')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'ppt')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'pptx')}">
+                                            <c:if test="${not empty gzr && gzr eq 'gzr'}">
+                                                <a href="${ctx}/isignature/iSignatureDocument/sign?recordId=${workClientAttachment.id}&type=report" class="op-btn op-btn-sign" target="_blank">签章</a>
+                                            </c:if>
+                                            <a href="javascript:void(0);" onclick="openDialogView('查看电子签章信息', '${ctx}/isignature/iSignatureDocument/form?recordId=${workClientAttachment.id}','95%', '95%')" class="op-btn op-btn-view" ><i class="fa fa-search-plus"></i> 查看</a>
+                                            <c:choose>
+                                                <c:when test="${signflag == '是'}">
+                                                    <a href="javascript:location.href='${ctx}/isignature/iSignatureDocument/download?recordId=${workClientAttachment.id}'" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                </c:when>
+                                                <c:otherwise>
+                                                    <a href="javascript:location.href='${ctx}/workcontractinfo/workContractInfo/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                </c:otherwise>
+                                            </c:choose>
+                                        </c:when>
+                                        <c:otherwise>
+                                            <a href="javascript:location.href='${ctx}/workcontractinfo/workContractInfo/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                        </c:otherwise>
+                                    </c:choose>
+								</div>
+							</td>
+						</tr>
+					</c:forEach>
+					</tbody>
+				</table>
+			</div>
+		</div>
+		<div class="form-group layui-row">
+			<div class="form-group-label"><h2>自检</h2></div>
+			<div class="layui-item layui-col-xs12 form-table-container">
+				<table id="contentTable2" class="table details table-bordered table-condensed">
+					<thead>
+					<tr>
+						<th style="text-align: center;width:15%">序号</th>
+						<th style="text-align: center;width:70%">复核内容及评分标准</th>
+						<th style="text-align: center;width:15%">操作</th>
+					</tr>
+					</thead>
+					<tbody id="projectContentDataList2">
+					<c:forEach items="${projectcontentinfo.projectReportData.projectReviewList}" var="projectReview" varStatus="index">
+						<tr>
+							<td>
+								<input id="projectReviewList${index.index}_id" name="projectReportData.projectReviewList[${index.index}].id" type="hidden" value="${projectReview.id}"/>
+								<input id="projectReviewList${index.index}_delFalg" name="projectReportData.projectReviewList[${index.index}].delFalg" type="hidden" value="1"/>
+								<input id="projectReviewList${index.index}_remarks" name="projectReportData.projectReviewList[${index.index}].remarks" type="hidden" value="${projectReview.remarks}"/>
+									${index.index + 1}
+							</td>
+							<td>
+									${projectReview.standardDetail}
+							</td>
+
+							<td>
+								<c:choose>
+									<c:when test="${not empty projectReview.remarks}">
+										<div class="check-ok">
+											<i class="fa fa-check"></i>
+										</div>
+									</c:when>
+									<c:otherwise>
+										<div id = "check1${projectReview.id}">
+										</div>
+										<div id = "check2${projectReview.id}" class="check-ok" style="display: none">
+											<i class="fa fa-check"></i>
+										</div>
+									</c:otherwise>
+								</c:choose>
+							</td>
+						</tr>
+					</c:forEach>
+					</tbody>
+				</table>
+			</div>
+		</div>
+		<c:if test="${not empty projectcontentinfo.projectReportData.act.procInsId}">
+		<div class="form-group layui-row">
+			<div class="form-group-label"><h2>审批意见</h2></div>
+			<div class="layui-item layui-col-xs12 with-textarea" >
+				<label class="layui-form-label">审批意见:</label>
+				<div class="layui-input-block">
+					<textarea name="projectReportData.act.comment" class="form-control" rows="4" maxlength="127" ></textarea>
+				</div>
+			</div>
+		</div>
+		</c:if>
+		<c:if test="${not empty projectcontentinfo.projectReportData.act.procInsId}">
+		<div class="form-group layui-row">
+			<div class="form-group-label"><h2>审批流程</h2></div>
+			<div class="layui-item layui-col-xs12 form-table-container" >
+				<act:flowChart procInsId="${projectcontentinfo.projectReportData.act.procInsId}"/>
+				<act:histoicFlow procInsId="${projectcontentinfo.projectReportData.act.procInsId}"/>
+			</div>
+		</div>
+		</c:if>
+		<div class="form-group layui-row page-end"></div>
+	</div>
+</div>
+</body>
+</html>

+ 968 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageForm.jsp

@@ -0,0 +1,968 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+    <title>项目管理</title>
+    <meta name="decorator" content="default"/>
+    <script type="text/javascript" src="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.js"></script>
+    <script type="text/javascript" src="${ctxStatic}/iCheck/icheck.min.js"></script>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
+    <style>
+        #projectDesc-error{
+            left:0;
+            top:82px;
+        }
+        .layui-layer-dialog{
+            background: red;
+        }
+        td input{
+            margin-left:-10px !important;
+            height: 42px !important;
+        }
+    </style>
+    <script type="text/javascript">
+        var validateForm;
+        var isMasterClient = true;//是否是主委托方
+        var clientCount = 0;
+        function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                // if($(".trIdAdds").length==0){
+                //     top.layer.alert('请至少上传一个项目计划表或者实施方案文档!', {icon: 0});
+                //     return;
+                // }
+                if($("#workClientLinkmanList tr").length==0){
+                    top.layer.alert('请至少选择一个委托方联系人!', {icon: 0});
+                    return;
+                }
+                /*if($("#workConstructionLinkmanList tr").length==0){
+                    top.layer.alert('请至少选择一个施工方联系人!', {icon: 0});
+                    return;
+                }*/
+                if(i==2){
+                    $("#inputForm").attr("action","${ctx}/ruralProject/ruralProjectRecords/tstore");
+                }
+                $("#inputForm").submit();
+                return true;
+            }
+
+            return false;
+        }
+        $(document).ready(function() {
+            var radioVal ;
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+
+            <%--$('#scaleType').editableSelect({--%>
+                <%--effects: 'slide'--%>
+            <%--});--%>
+            <%--$('#scaleType').val("${projectRecords.scaleType}")--%>
+            <%--$('#scaleUnit').editableSelect({--%>
+                <%--effects: 'slide'--%>
+            <%--});--%>
+            <%--$('#scaleUnit').val("${projectRecords.scaleUnit}")--%>
+
+            $("input[name='ext']").on('ifChecked',function(event){
+                radioVal = $(this).val();
+                if(radioVal == 0){
+                    //有合同状态
+                    $("#divv2 input").val("");
+                    // $("#workClientLinkmanList tr").remove();
+                    $("#divv").show();
+                    $("#divv3").show();
+                }else{
+                    $("#divv input").val('');
+                    $("#divv2 input").val("");
+                    $("#divv3 input").val("");
+                    // $("#workClientLinkmanList tr").remove();
+                    $("#divv").hide();
+                    $("#divv3").hide();
+                    $("#linkmanId").val("");
+                }
+            });
+
+            //自动选择合同状态
+            if ($("#projectName").val() != null) {
+                if ($("#contractName").val() == "") {
+                    $("#ext1").iCheck("check");
+                }
+            }
+
+
+            $('#areaId').on("change", function () {
+                var areaId = $("#areaId").val();
+                $("#province").val('');
+                $("#city").val('');
+                $("#county").val('');
+                $.ajax({
+                    type : "POST",
+                    url : "${ctx}/sys/area/getParent",
+                    data : {'areaId':areaId},
+                    //请求成功
+                    success : function(result) {
+                        var pro = result.province;
+                        var city = result.city;
+                        var county  = result.county;
+                        if(pro != '') {
+                            $("#province").val(pro);
+                        }
+                        if(city != '') {
+                            $("#city").val(city);
+                        }
+                        if(county != '') {
+                            $("#county").val(county);
+                        }
+                    },
+
+                });
+            })
+
+        });
+
+
+        function setContractValue(obj){
+            var clientId = $("#contractClientId").val();
+            $.ajax({
+                type:'post',
+                url:'${ctx}/ruralProject/ruralProjectRecords/getContractInfo',
+                data:{
+                    "id":obj
+                },
+                success:function(data){
+                    $("#contractName").val(data.name);
+                    $("#contractPrice").val(data.contractPrice);
+                    formatNum($("#contractPrice"));
+                    $("#contractClientName").val(data.client.name);
+                    $("#contractClientId").val(data.client.id);
+                    $("#constructionProjectType").val(data.constructionProjectTypeStr);
+                    $("#linkmanId").val(data.workClinetInfoIds);
+                    //清理之前的联系人
+                    var newClientId  = data.client.id;
+                    if(clientId != newClientId){
+                        $("#workClientLinkmanList tr").remove();
+                        if(isMasterClient){
+                            clientCount++;
+                            setLinkMan(newClientId);
+                            isMasterClient = false;
+                        }
+                    }
+                    // console.log("clientId------newClientId");
+                    // console.log(clientId+"------"+newClientId);
+                }
+            });
+        }
+
+        function getFee() {
+            $("#unitFees").val('');
+            var totalFee = $("#totalFees").val();
+            var count = $("#buildingScale").val();
+            if(count != '' && totalFee != '') {
+                var cFee = Math.round(parseInt(totalFee) / parseInt(count) * 100) / 100 * 10000;
+                $("#unitFees").val(cFee);
+            }
+        }
+
+        function getBudlingFees() {
+            $("#buildingPercent").val('');
+            $("#buildingUnitFees").val('');
+            var totalFee = $("#totalFees").val();
+            var budFee = $("#buildingFees").val();
+            var count = $("#buildingScale").val();
+            if(totalFee != '') {
+                var p = Math.round(parseInt(budFee) / parseInt(totalFee) * 100 * 100) / 100;
+            }
+            if(count != '') {
+                var pp = Math.round(parseInt(budFee) / parseInt(count) * 100) / 100 * 10000;
+            }
+            $("#buildingPercent").val(p);
+            $("#buildingUnitFees").val(pp);
+        }
+
+        function getInstallFees() {
+            $("#installPercent").val('');
+            $("#installUnitFees").val('');
+            var totalFee = $("#totalFees").val();
+            var budFee = $("#installFees").val();
+            var count = $("#buildingScale").val();
+            if(totalFee != '') {
+                var p = Math.round(parseInt(budFee) / parseInt(totalFee) * 100 * 100) / 100;
+            }
+            if(count != '') {
+                var pp = Math.round(parseInt(budFee) / parseInt(count) * 100) / 100 * 10000;
+            }
+            $("#installPercent").val(p);
+            $("#installUnitFees").val(pp);
+        }
+
+        function setLinkMan(newClientId) {
+            $.ajax({
+                url:"${ctx}/ruralProject/ruralProjectRecords/getLinkManByClientId",
+                data:{"clientId":newClientId},
+                type:"post",
+                dataType:"json",
+                success:function (d) {
+                    // console.log(d);
+                    addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl);workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;
+                    var row = workClientLinkmanRowIdx - 1 ;
+                    $("#workClientLinkmanList"+row+"_id").val(d.id);
+                    $("#workClientLinkmanList"+row+"_clientId_id").val(d.clientId);
+                    $("#workClientLinkmanList"+row+"_clientName").val(d.clientName);
+                    $("#workClientLinkmanList"+row+"_name").val(d.linkName);
+                    $("#workClientLinkmanList"+row+"_linkMobile").val(d.linkMobile);
+                    $("#workClientLinkmanList"+row+"_linkPhone").val(d.linkPhone);
+                    $("#workClientLinkmanList"+row+"_clientName").prop("readonly","readonly");
+                    $("#workClientLinkmanList"+row+"_name").prop("readonly","readonly");
+                    $("#workClientLinkmanList"+row+"_linkMobile").prop("readonly","readonly");
+                    $("#workClientLinkmanList"+row+"_linkPhone").prop("readonly","readonly");
+                }
+            });
+        }
+        function setValuee(obj){
+            var successRows = 0;
+            ss = $("#workClientLinkmanList tr").length;
+            for (var i = 0; i < obj.length; i++) {
+                //没有重复的客户id,就可以插入
+                var canInsert = true;
+                for (var j = 0; j < ss; j++) {
+                    var cid = $("#workClientLinkmanList" + j + "_id").val();
+                    if(cid == obj[i].id){
+                        canInsert = false;
+                        // console.log("重复!!");
+                        break;
+                    }
+                }
+                if(canInsert==true){
+                    var idArr = $("#workClientLinkmanList tr:visible .clientId");
+                    if (obj[i].id != '' && !hasInArr(obj[i].id, idArr)) {
+                        addRow("#workClientLinkmanList", workClientLinkmanRowIdx, workClientLinkmanTpl, obj[i]);
+                        workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;
+                        successRows++;
+                    }
+                }
+            }
+            clientCount=successRows+clientCount;
+            // console.log("success==="+successRows);
+            // console.log("clientCount==="+clientCount);
+
+            //如果主委托方还没有设置,则将第一个客户设置为主委托方
+            if(obj[0].name != null){
+                if(isMasterClient){
+                    $("#contractClientName").val(obj[0].clientId.name);
+                    isMasterClient = false;
+                }
+            }
+        }
+        function hasInArr(id,idArr) {
+            for(var i=0;i<idArr.length;i++){
+                if(id==$(idArr[i]).val()){
+                    return true;
+                }
+            }
+            return false;
+        }
+        function existLinkman(id,length) {
+            for (var i=0;i<length;i++) {
+                var val = $('#workClientLinkmanList'+i+'_id').val();
+                if(id==val){
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        function setClientInfo(obj) {
+            for(var i=0;i<obj.length;i++){
+                var idArr = $("#workConstructionLinkmanList tr:visible .linkmanId");
+                if(obj[i].id!=''&&!hasInArr(obj[i].id,idArr)){
+                    addRow("#workConstructionLinkmanList",workConstructionLinkmanRowIdx,workConstructionLinkmanTpl,obj[i]);
+                    workConstructionLinkmanRowIdx=workConstructionLinkmanRowIdx+1;
+                }
+            }
+        }
+        function existConstructionLinkman(obj,length) {
+            for (var i=0;i<length;i++) {
+                var val = $('#workConstructionLinkmanList'+i+'_id').val();
+                var cid = $('#workConstructionLinkmanList'+i+'_cid').val();
+                if(obj.id==val&&obj.client.id==cid){
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        function insertTitle(tValue){
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+                var attachmentId = $("#id").val();
+                var attachmentFlag = "82";
+                /*console.log(file);*/
+                var timestamp=new Date().getTime();
+
+                var storeAs = "attachment-file/projectRecords/"+timestamp+"/"+file['name'];
+                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+                var divId = "_attachment";
+                $("#addFile"+divId).show();
+                multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
+        }
+
+
+        function addFile() {
+            $("#attachment_file").click();
+        }
+
+        function addRow(list, idx, tpl, row){
+            // var idx1 = $("#workClientLinkmanList tr").length;
+            bornTemplete(list, idx, tpl, row, idx);
+        }
+
+        function bornTemplete(list, idx, tpl, row, idx1){
+            $(list).append(Mustache.render(tpl, {
+                idx: idx, delBtn: true, row: row,
+                order:idx1 + 1
+            }));
+            $(list+idx).find("select").each(function(){
+                $(this).val($(this).attr("data-value"));
+            });
+            $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+                var ss = $(this).attr("data-value").split(',');
+                for (var i=0; i<ss.length; i++){
+                    if($(this).val() == ss[i]){
+                        $(this).attr("checked","checked");
+                    }
+                }
+            });
+        }
+
+        function delRow(obj, prefix){
+            var id = $(prefix+"_id");
+            var delFlag = $(prefix+"_delFlag");
+            $(obj).parent().parent().remove();
+        }
+        function formatNum(obj) {
+            var val = $(obj).val();
+            if(val==null||val==''|| isNaN(val))return;
+            var money = parseFloat((val + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
+            var l = money.split(".")[0].split("").reverse(),
+                r = money.split(".")[1];
+            t = "";
+            for(i = 0; i < l.length; i ++ )
+            {
+                t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
+            }
+            $(obj).val(t.split("").reverse().join("") + "." + r);
+        }
+        function openBill2(title,url,width,height,target,formId){
+            var frameIndex = parent.layer.getFrameIndex(window.name);
+            var urls = url+"&index="+frameIndex;
+            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:"two-btns",
+                maxmin: false, //开启最大化最小化按钮
+                content: urls ,
+                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中展示
+                    inputForm.attr("action","${ctx}/ruralProject/ruralProjectRecords/linkManSave");//表单提交成功后,从服务器返回的url在当前tab中展示
+                    var $document = iframeWin.contentWindow.document;
+
+                    formSubmit2($document,formId,index);
+
+                },
+                cancel: function(index){
+                }
+            });
+
+
+        }
+
+        function formSubmit2($document,inputForm,index){
+            var validateForm = $($document.getElementById(inputForm)).validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            if(validateForm.form()){
+                $($document.getElementById(inputForm)).ajaxSubmit({
+                    success:function(data) {
+                        var d = data;
+                        if(d.msg == "false"){
+                            parent.layer.msg("保存客户信息异常!",{icon:2});
+                            return false;
+                        }
+
+                        addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl);workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;
+                        var row = workClientLinkmanRowIdx - 1 ;
+
+                        $("#"+"workClientLinkmanList"+row+"_id").val(d.id);
+                        $("#"+"workClientLinkmanList"+row+"_clientId_id").val(d.clientId);
+                        $("#"+"workClientLinkmanList"+row+"_clientName").val(d.clientName);
+                        $("#"+"workClientLinkmanList"+row+"_name").val(d.linkName);
+                        $("#"+"workClientLinkmanList"+row+"_linkMobile").val(d.linkMobile);
+                        $("#"+"workClientLinkmanList"+row+"_linkPhone").val(d.linkPhone);
+                        if(isMasterClient){
+                            $("#contractClientName").val(d.clientName);
+                            isMasterClient = false;
+                        }
+                        parent.layer.msg(d.str,{icon:1});
+                        top.layer.close(index)
+                    }
+                });
+            }
+        }
+    </script>
+</head>
+<body>
+<div class="single-form">
+    <div class="container">
+        <sys:message content="${message}"/>
+        <form:form id="inputForm" modelAttribute="ruralProjectRecords" action="${ctx}/ruralProject/ruralProjectRecords/save" method="post" class="form-horizontal">
+            <form:hidden path="id"/>
+            <form:hidden path="workContractInfo.client.id" id="contractClientId" value="${workContractInfo.client.id}"/>
+
+            <div class="form-group layui-row first">
+                <div class="form-group layui-row">
+                    <div class="form-group-label"><h2>项目合同信息</h2></div>
+                    <div class="layui-item layui-col-sm6 lw7">
+                        <label class="layui-form-label">合同情况:</label>
+                        <div class="layui-input-block">
+                            <input type="radio" class="i-checks" name="ext" checked id="ext" value="0">
+                            <label for="ext">有合同</label>
+                            <input type="radio" class="i-checks" name="ext" id="ext1" value="1">
+                            <label for="ext1">无合同</label>
+                        </div>
+                    </div>
+                </div>
+               <div class="form-group layui-row">
+                   <div id="divv">
+                       <div class="layui-item layui-col-sm12 lw7" id="d1">
+                           <label class="layui-form-label"><span class="require-item">*</span>选择合同:</label>
+                           <div class="layui-input-block  with-icon">
+                               <sys:gridselectContract url="${ctx}/ruralProject/ruralProjectRecords/selectcontract" type="" isTotal="" id="contractId" name="workContractInfo.id"  value="${projectRecords.workContractInfo.id}"  title="选择合同" labelName="workContractInfo.name"
+                                                       labelValue="${ruralrojectRecords.workContractInfo.name}" cssClass="form-control required layui-input" fieldLabels="合同名称" fieldKeys="name" searchLabel="合同名称" searchKey="name" ></sys:gridselectContract>
+                           </div>
+                       </div>
+                       <div class="layui-item layui-col-sm6 lw7">
+                           <label class="layui-form-label">合同名称:</label>
+                           <div class="layui-input-block">
+                               <input  htmlEscape="false"  readonly="true" id="contractName"  class="form-control layui-input" value="${ruralProjectRecords.workContractInfo.name}"/>
+                           </div>
+                       </div>
+                       <div class="layui-item layui-col-sm6 lw7">
+                           <label class="layui-form-label double-line">合同金额(元):</label>
+                           <div class="layui-input-block">
+                               <input htmlEscape="false"  readonly="true" id="contractPrice"  class="form-control layui-input" value="${ruralProjectRecords.workContractInfo.contractPrice}" onchange="formatNum(this);"/>
+                           </div>
+                       </div>
+                   </div>
+                   <div id="divv2">
+                       <div class="layui-item layui-col-sm6 lw7">
+                           <label class="layui-form-label">主委托方:</label>
+                           <div class="layui-input-block">
+                               <input htmlEscape="false"  readonly="true" id="contractClientName" name="workContractInfo.client.name" class="form-control layui-input" value="${ruralProjectRecords.workContractInfo.client.name}"/>
+                           </div>
+                       </div>
+                   </div>
+                   <div id="divv3">
+                       <div class="layui-item layui-col-sm6 lw7">
+                           <label class="layui-form-label">工程分类:</label>
+                           <div class="layui-input-block">
+                               <input htmlEscape="false"  readonly="true" id="constructionProjectType"  class="form-control layui-input" value="${ruralProjectRecords.workContractInfo.constructionProjectTypeStr}"/>
+                           </div>
+                       </div>
+                   </div>
+               </div>
+            </div>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>项目基础信息</h2></div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label"><span class="require-item">*</span>项目名称:</label>
+                    <div class="layui-input-block">
+                        <form:input path="projectName" htmlEscape="false"  class="form-control layui-input required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">项目编号:</label>
+                    <div class="layui-input-block">
+                        <div class="input-group">
+                            <form:input path="projectId" htmlEscape="false"  readonly="true" class="form-control layui-input"/>
+                            <span class="input-group-btn">
+                                <label class="form-status"><c:choose><c:when test="${not empty ruralProjectRecords.projectStatus}">${fns:getDictLabel(ruralProjectRecords.projectStatus, 'audit_state', '')}</c:when><c:otherwise>新添</c:otherwise></c:choose></label>
+                             </span>
+                        </div>
+                    </div>
+                </div>
+                <%--<div class="layui-item layui-col-sm6 lw7">--%>
+                    <%--<label class="layui-form-label">规模类型:</label>--%>
+                    <%--<div class="layui-input-block">--%>
+                        <%--<form:select path="scaleType" class="form-control editable-select layui-input" id="scaleType" value="${scaleType}">--%>
+                            <%--<form:option value=""/>--%>
+                            <%--<form:options items="${fns:getMainDictList('scale_type')}" itemLabel="label" itemValue="label" htmlEscape="false"/>--%>
+                        <%--</form:select>--%>
+                    <%--</div>--%>
+                <%--</div>--%>
+                <%--<div class="layui-item layui-col-sm6 lw7">--%>
+                    <%--<label class="layui-form-label">规模单位:</label>--%>
+                    <%--<div class="layui-input-block">--%>
+                        <%--<form:select path="scaleUnit" class="form-control editable-select layui-input" id="scaleUnit" value="${scaleUnit}">--%>
+                            <%--<form:option value=""/>--%>
+                            <%--<form:options items="${fns:getMainDictList('scale_unit')}" itemLabel="label" itemValue="label" htmlEscape="false"/>--%>
+                        <%--</form:select>--%>
+                    <%--</div>--%>
+                <%--</div>--%>
+                <%--<div class="layui-item layui-col-sm6 lw7">--%>
+                    <%--<label class="layui-form-label">规模数量:</label>--%>
+                    <%--<div class="layui-input-block">--%>
+                        <%--<form:input path="scaleQuantity" htmlEscape="false"  class="form-control number layui-input"/>--%>
+                    <%--</div>--%>
+                <%--</div>--%>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label"><span class="require-item">*</span>项目所在地:</label>
+                    <div class="layui-input-block  with-icon">
+                        <sys:treeselect id="area" name="area.id" value="${ruralProjectRecords.area.id}" labelName="area.name" labelValue="${ruralProjectRecords.area.name}"
+                                        title="区域" url="/sys/area/treeData" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="false"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">所在省份:</label>
+                    <div class="layui-input-block">
+                        <form:input path="province" htmlEscape="false" id="province" class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">所在地级市:</label>
+                    <div class="layui-input-block">
+                        <form:input path="city" htmlEscape="false" id="city" class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">所在区县:</label>
+                    <div class="layui-input-block">
+                        <form:input path="county" htmlEscape="false" id="county" class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">建设地点:</label>
+                    <div class="layui-input-block">
+                        <form:input path="projectSite" htmlEscape="false"  class="form-control layui-input"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label"><span class="require-item">*</span>项目负责人:</label>
+                    <div class="layui-input-block  with-icon">
+                        <sys:treeselectt id="master" name="projectLeaders" value="${ruralProjectRecords.leaderIds}" labelName="leaderNameStr" labelValue="${ruralProjectRecords.leaderNameStr}"
+                                         title="用户" url="/sys/office/treeDataAll?type=3" checked="true" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">创建人:</label>
+                    <div class="layui-input-block">
+                        <form:input path="createBy.name" htmlEscape="false"  readonly="true"  class="form-control  layui-input"/>
+                        <form:hidden path="createBy.id" htmlEscape="false"   readonly="true"  class="form-control  layui-input"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">创建日期:</label>
+                    <div class="layui-input-block">
+                        <input id="createDate" name="createDate" htmlEscape="false"  value="<fmt:formatDate value="${ruralProjectRecords.createDate}" pattern="yyyy-MM-dd"/>" readonly="readonly"  class="form-control required layui-input"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">工程结构:</label>
+                    <div class="layui-input-block">
+                        <form:select path="projectStructure" class="form-control editable-select layui-input" id="projectStructure" value="${projectStructure}">
+                            <form:option value=""/>
+                            <form:options items="${fns:getMainDictList('project_structure')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
+                        </form:select>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">地上层数:</label>
+                    <div class="layui-input-block">
+                        <form:input path="onGroundNum" htmlEscape="false"  class="form-control layui-input number"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">底下层数:</label>
+                    <div class="layui-input-block">
+                        <form:input path="underGroundNum" htmlEscape="false"  class="form-control layui-input number"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line"><span class="require-item">*</span>建筑面积或规模:</label>
+                    <div class="layui-input-block">
+                        <form:input path="buildingScale" htmlEscape="false"  class="form-control layui-input required number" onchange="getFee()"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">计量单位:</label>
+                    <div class="layui-input-block">
+                        <form:select path="measuringUnit" class="form-control editable-select layui-input" id="measuringUnit" value="${measuringUnit}">
+                            <form:option value=""/>
+                            <form:options items="${fns:getMainDictList('scale_unit')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
+                        </form:select>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">工程用途:</label>
+                    <div class="layui-input-block">
+                        <form:select path="projectUse" class="form-control editable-select layui-input" id="projectUse" value="${projectUse}">
+                            <form:option value=""/>
+                            <form:options items="${fns:getMainDictList('project_use')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
+                        </form:select>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line"><span class="require-item">*</span>咨询标的额(万元):</label>
+                    <div class="layui-input-block">
+                        <form:input path="totalFees" htmlEscape="false" id="totalFees" class="form-control layui-input required number" onchange="getFee()"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line">其中土建造价(万元):</label>
+                    <div class="layui-input-block">
+                        <form:input path="buildingFees" htmlEscape="false" id="buildingFees" class="form-control layui-input" onchange="getBudlingFees()"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line">其中安装造价(万元):</label>
+                    <div class="layui-input-block">
+                        <form:input path="installFees" htmlEscape="false" id="installFees" class="form-control layui-input" onchange="getInstallFees()"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line">其中土建百分比(%):</label>
+                    <div class="layui-input-block">
+                        <form:input path="buildingPercent" htmlEscape="false" id="buildingPercent" class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line">其中安装百分比(%):</label>
+                    <div class="layui-input-block">
+                        <form:input path="installPercent" htmlEscape="false" id="installPercent" class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">单位造价(元):</label>
+                    <div class="layui-input-block">
+                        <form:input path="unitFees" htmlEscape="false" id="unitFees" class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line">土建单位造价(元):</label>
+                    <div class="layui-input-block">
+                        <form:input path="buildingUnitFees" htmlEscape="false" id="buildingUnitFees" class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line">安装单位造价(元):</label>
+                    <div class="layui-input-block">
+                        <form:input path="installUnitFees" htmlEscape="false" id="installUnitFees" class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7 with-textarea">
+                    <label class="layui-form-label"><span class="require-item">*</span>工程概况:</label>
+                    <div class="layui-input-block">
+                        <form:textarea path="projectDesc" htmlEscape="false" rows="4"  maxlength="255"  class="form-control required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7 with-textarea">
+                    <label class="layui-form-label ">特殊要求:</label>
+                    <div class="layui-input-block">
+                        <form:textarea path="remarks" htmlEscape="false" rows="4"  maxlength="255"  class="form-control "/>
+                    </div>
+                </div>
+            </div>
+
+
+            <div>
+                <div class="form-group-label"><h2><span class="require-item">*</span>委托方联系人信息</h2></div>
+                <div class="layui-item nav-btns" style="float: left;width: 155px">
+                    <sys:gridselect1  id="linkman" url="${ctx}/workclientinfo/workClientInfo/linkmanList"
+                                      name="linkman.id"  title="选择客户"
+                                      value="${ruralProjectRecords.workContractInfo.workClinetInfoIds}"
+                                      cssClass="form-control required" fieldLabels="联系人" fieldKeys="name"
+                                      searchLabel="联系人" searchKey="name"></sys:gridselect1>
+                </div>
+                <div class="layui-item nav-btns" style="float: left;">
+                    <a href="javascript:void(0)"
+                       onclick="openBill2('新增客户管理', '${ctx}/workclientinfo/workClientInfo/form?param=2','95%','95%',false,'inputForm')"
+                       class="nav-btn nav-btn-add"><i class="fa fa-plus"></i> 新增客户</a>
+                </div>
+
+                <div class="layui-item layui-col-xs12 form-table-container" style="padding:0px">
+                    <table id="contentTable1" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                            <th class="hide"></th>
+                            <th width="20%"><font color="red">*</font>委托方</th>
+                            <th width="20%">联系人姓名</th>
+                            <th width="20%">联系方式1</th>
+                            <th width="20%">联系方式2</th>
+                            <th width="20%">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="workClientLinkmanList">
+                        </tbody>
+                    </table>
+                    <script type="text/template" id="workClientLinkmanTpl">//<!--
+            <tr id="workClientLinkmanList{{idx}}">
+                <td class="hide">
+                    <input id="workClientLinkmanList{{idx}}_id" name="workClientLinkmanList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+                    <input id="workClientLinkmanList{{idx}}_clientId_id" name="workClientLinkmanList[{{idx}}].clientId.id" type="hidden" value="{{row.clientId.id}}"/>
+                    <input id="workClientLinkmanList{{idx}}_delFlag" name="workClientLinkmanList[{{idx}}].delFlag" type="hidden" value="0"/>
+                </td>
+                <td>
+                    <input readonly="true" id="workClientLinkmanList{{idx}}_clientName" name="workClientLinkmanList[{{idx}}].clientId.name" type="text" value="{{row.clientId.name}}"    class="form-control "/>
+                </td>
+                <td>
+                    <input readonly="true" id="workClientLinkmanList{{idx}}_name" name="workClientLinkmanList[{{idx}}].name" type="text" value="{{row.name}}"    class="form-control required"/>
+                </td>
+
+                <td>
+                    <input readonly="true" id="workClientLinkmanList{{idx}}_linkPhone" name="workClientLinkmanList[{{idx}}].linkPhone" type="text" value="{{row.linkPhone}}"    class="form-control isTel"/>
+                </td>
+                <td>
+                    <input readonly="true" id="workClientLinkmanList{{idx}}_linkMobile" name="workClientLinkmanList[{{idx}}].linkMobile" type="text" value="{{row.linkMobile}}"    class="form-control isPhone"/>
+                </td>
+                <td class="text-center op-td" >
+                    {{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#workClientLinkmanList{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>{{/delBtn}}
+                </td>
+            </tr>//-->
+                    </script>
+                    <script type="text/javascript">
+                        var workClientLinkmanRowIdx = 0,
+                            workClientLinkmanTpl = $("#workClientLinkmanTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, "");
+                        $(document).ready(function () {
+                            var data = ${fns:toJson(workClientInfo.workClientLinkmanList)};
+                            if(data!=null && data.length() > 0){
+                                for (var i = 0; i < data.length; i++) {
+                                    addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl, data[i]);
+                                    workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;
+                                }
+                            }
+                        });
+                    </script>
+                </div>
+            </div>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>施工方信息</h2></div>
+                <div class="layui-item nav-btns">
+                    <sys:gridselectClientLink url="${ctx}/workclientinfo/workClientInfo/clientInfolist" id="constructionOrgList"   title="选择施工单位"
+                                              cssClass="form-control required" fieldLabels="${fns:urlEncode('客户编号')}" fieldKeys="name"  searchLabel="${fns:urlEncode('客户名称')}" searchKey="name"></sys:gridselectClientLink>
+                </div>
+                <div class="layui-item layui-col-xs12 form-table-container">
+                    <table id="contentTable2" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                            <th class="hide"></th>
+                            <th style="text-align: center" width="20%">施工方单位名称</th>
+                            <th style="text-align: center" width="20%">联系人姓名</th>
+                            <th style="text-align: center" width="20%">联系方式1</th>
+                            <th style="text-align: center" width="20%">联系方式2</th>
+                            <th width="20%">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="workConstructionLinkmanList">
+                        </tbody>
+                    </table>
+                    <script type="text/template" id="workConstructionLinkmanTpl">//<!--
+					<tr id="workConstructionLinkmanList{{idx}}">
+					<td class="hide">
+						<input id="workConstructionLinkmanList{{idx}}_id" name="workConstructionLinkmanList[{{idx}}].id" type="hidden" value="{{row.id}}" class="linkmanId"/>
+						<input id="workConstructionLinkmanList{{idx}}_delFlag" name="workConstructionLinkmanList[{{idx}}].delFlag" type="hidden" value="0"/>
+					</td>
+					<td style="text-align: center">
+						<input id="workConstructionLinkmanList{{idx}}_cid" name = "workConstructionLinkmanList[{{idx}}].clientId.id" type="hidden" value="{{row.clientId.id}}"/>
+						{{row.clientId.name}}
+					</td>
+					<td style="text-align: center">
+						{{row.name }}
+					</td>
+					<td style="text-align: center">
+						{{row.linkPhone}}
+					</td>
+					<td style="text-align: center">
+						{{row.linkMobile}}
+					</td>
+					<td class="text-center" width="10">
+						{{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#workConstructionLinkmanList{{idx}}')" title="删除"><i class="fa fa-trash"></i>&nbsp;删除</span>{{/delBtn}}
+					</td>
+				</tr>//-->
+                    </script>
+                    <script>
+                        var workClientLinkmanRowIdx = 0, workClientLinkmanTpl = $("#workClientLinkmanTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                        var workConstructionLinkmanRowIdx = 0, workConstructionLinkmanTpl = $("#workConstructionLinkmanTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                        $(document).ready(function() {
+                            var data = ${fns:toJson(ruralProjectRecords.workClientLinkmanList)};
+                            if (data!=null) {
+                                for (var i = 0; i < data.length; i++) {
+                                    addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl, data[i]);
+                                    workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;
+                                }
+                            }
+                            var dataBank = ${fns:toJson(ruralProjectRecords.workConstructionLinkmanList)};
+                            if (dataBank!=null) {
+                                for (var i = 0; i < dataBank.length; i++) {
+                                    addRow('#workConstructionLinkmanList', workConstructionLinkmanRowIdx, workConstructionLinkmanTpl, dataBank[i]);
+                                    workConstructionLinkmanRowIdx = workConstructionLinkmanRowIdx + 1;
+                                }
+                            }
+                        });
+
+                    </script>
+                </div>
+            </div>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2><span class="require-item">*</span>项目计划附件信息</h2></div>
+                <div class="layui-item nav-btns">
+                    <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"  onclick="addFile()"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+                    <a class="nav-btn nav-btn-export" title="下载模板"  onclick="window.location.href='${ctx}/ruralProject/ruralProjectRecords/downloadTemplate';"><i class="fa fa-download"></i>&nbsp;下载模板</a>
+                </div>
+                <div id="addFile_attachment" style="display: none" class="upload-progress">
+                    <span id="fileName_attachment" ></span>
+                    <b><span id="baifenbi_attachment" ></span></b>
+                    <div class="progress">
+                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+                        </div>
+                    </div>
+                </div>
+                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+                <span id="attachment_title"></span>
+                <div class="layui-item layui-col-xs12 form-table-container">
+                    <table id="listAttachment" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                                <%-- <th>序号</th>--%>
+                            <th width="25%">文件</th>
+                            <th width="25%">上传人</th>
+                            <th width="25%">上传时间</th>
+                            <th width="150px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_attachment">
+                        <c:forEach items="${ruralProjectRecords.workAttachments}" var = "workClientAttachment" varStatus="status">
+                            <tr class="trIdAdds">
+                                    <%-- <td>${status.index + 1}</td>--%>
+                                <c:choose>
+                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                        <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                    </c:when>
+                                    <c:otherwise>
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:otherwise>
+                                </c:choose>
+                                <td>${workClientAttachment.createBy.name}</td>
+                                <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+                                <td class="op-td">
+                                    <div class="op-btn-box" >
+                                        <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                        <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+                                    </div>
+                                </td>
+                            </tr>
+                        </c:forEach>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>项目组成员列表</h2></div>
+                <div class="layui-item layui-col-xs12 form-table-container">
+                    <table id="usersListTable" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                            <th width="25%">姓名</th>
+                            <th width="25%">部门</th>
+                            <th width="25%">职级</th>
+                            <th width="80px;">状态</th>
+                        </tr>
+                        </thead>
+                        <tbody id="usersList">
+                        <c:if test="${not empty ruralProjectRecords.projectMembers}">
+                            <c:forEach items="${ruralProjectRecords.projectMembers}" var="user">
+                                <tr id="${user.id}">
+                                    <td>
+                                            ${user.name}
+                                    </td>
+                                    <td>
+                                            ${user.office.name}
+                                    </td>
+                                    <td>
+                                            ${user.basicInfo.jobGrade.name}
+                                    </td>
+                                    <td>
+                                        <c:choose>
+                                            <c:when test="${user.delFlag == 0}">
+                                                正常
+                                            </c:when>
+                                            <c:otherwise>
+                                                移除
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </td>
+                                </tr>
+                            </c:forEach>
+                        </c:if>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+            <div class="form-group layui-row page-end"></div>
+        </form:form>
+    </div>
+</div>
+</body>
+</html>

+ 427 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageList.jsp

@@ -0,0 +1,427 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>项目列表</title>
+	<meta name="decorator" content="default"/>
+	<%--<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>--%>
+	<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="ruralProjectRecords" action="${ctx}/ruralProject/ruralProjectRecords/" 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 with-icon">
+								<form:input path="projectId" 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="projectName" htmlEscape="false" maxlength="64"  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">
+								<form:input path="leaderNameStr" 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">
+								<form:input path="workContractInfo.name" 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">
+								<form:input path="workContractInfo.client.name" 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 id="beginDate" name="beginDate" placeholder="开始时间" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${projectRecords.beginDate}" pattern="yyyy-MM-dd"/>"/>
+								</input>
+                                <span class="group-sep">-</span>
+                                <input id="endDate" name="endDate" placeholder="结束时间" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                       value="<fmt:formatDate value="${projectRecords.endDate}" pattern="yyyy-MM-dd"/>"/>
+                                </input>
+							</div>
+						</div>
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">状态:</label>
+							<div class="layui-input-block">
+								<form:select path="projectReportStatus" class=" form-control  simple-select">
+									<form:option value="" label=""/>
+									<form:options items="${fns:getDictList('audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+								</form:select>
+							</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">
+					<%--<shiro:hasPermission name="project:projectRecords:add">
+						<table:addRow url="${ctx}/ruralProject/ruralProjectRecords/form" title="项目"></table:addRow><!-- 增加按钮 -->
+					</shiro:hasPermission>
+					<shiro:hasPermission name="project:projectRecords:del">
+					</shiro:hasPermission>
+					<shiro:hasPermission name="project:projectRecords:export">
+						<table:exportExcel url="${ctx}/ruralProject/ruralProjectRecords/export"></table:exportExcel><!-- 导出按钮 -->
+					</shiro:hasPermission>--%>
+					<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 class="oa-table layui-table" id="contentTable1"></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>
+
+    layui.use('table', function(){
+        layui.table.render({
+            limit:${ page.pageSize }
+            ,elem: '#contentTable1'
+            ,page: false
+            ,cols: [[
+                // {checkbox: true, fixed: true},
+                {field:'index',align:'center', title: '序号',width:40}
+                ,{field:'projName',align:'center', title: '项目名称',minWidth:200,templet:function(d){
+                        return "<a class=\"attention-info\" title=\"" + d.projName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/ruralProject/ruralProjectRecords/view?id=" + d.id +"','95%', '95%')\">" + d.projName + "</a>";
+                    }}
+                ,{field:'projId',align:'center', title: '项目编号',minWidth:150,templet:function(d){
+                        return "<a class=\"attention-info\" title=\"" + d.projId + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/ruralProject/ruralProjectRecords/view?id=" + d.id + "','95%', '95%')\">" + d.projId + "</a>";
+                    }}
+                ,{field:'projectReportNumber', align:'center',title: '报告编号',minWidth:200,templet:function(d){
+                    	return "<span title='"+ d.contract +"'>" + d.projectReportNumber + "</span>";
+					}}
+                ,{field:'contract', align:'center',title: '合同名称',minWidth:200,templet:function(d){
+                    	return "<span title='"+ d.contract +"'>" + d.contract + "</span>";
+					}}
+                ,{field:'projMaster', align:'center',title: '负责人', width:65,templet:function(d){
+                        return "<span title=\"" + d.projMaster + "\">" + d.projMaster + "</span>";
+                    }}
+                ,{field:'client',align:'center', title: '主委托方',  width:150,templet:function(d){
+                        return "<span title=\"" + d.client + "\">" + d.client + "</span>";
+                    }}
+                ,{field:'createDate',align:'center', title: '创建日期',  width:80}
+                ,{align:'center', title: '状态',  width:70,templet:function(d){
+                        var st = getAuditState(d.projectReportStatus);
+                        if(st.action)
+                            var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/ruralProject/ruralProjectRecords/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;
+                    }}
+                ,{field:'op',align:'center',title:"操作",width:130,templet:function(d){
+                        ////对操作进行初始化
+                        var xml="";
+                        if(d.canAdd != undefined && d.canAdd =="1")
+                        {
+                            xml+="<a href=\"#\" onclick=\"openDialogre('新增报告', '${ctx}/ruralProject/ruralProjectMessage/form?projectId=" + d.id +"','95%', '95%','','送审,暂存,关闭')\" class=\"op-btn layui-bg-green\" ><i class=\"fa fa-plus\"></i> 新增报告</a>";
+                        }
+                        if(d.canedit1 != undefined && d.canedit1 =="1")
+                        {
+                            xml+="<a href=\"#\" onclick=\"openDialogre('修改项目', '${ctx}/ruralProject/ruralProjectRecords/form?id=" + d.id +"','95%', '95%','','送审,暂存,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                        }
+                        if(d.canedit2 != undefined && d.canedit2 =="1")
+                        {
+                            xml+="<a href=\"#\" onclick=\"openDialogre('调整项目', '${ctx}/ruralProject/ruralProjectRecords/modify?id=" + d.id + "','95%', '95%','','送审,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                        }
+                        if(d.canrecall != undefined && d.canrecall =="1")
+                        {
+                            xml+="<a href=\"#\" onclick=\"openDialogre('调整项目', '${ctx}/ruralProject/ruralProjectRecords/form?id=" + d.id + "','95%', '95%','','送审,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                        }
+                        if(d.cancancel != undefined && d.cancancel =="1")
+                        {
+                            xml+="<a href=\"${ctx}/ruralProject/ruralProjectRecords/revoke?id=" + d.id + "&processInstanceId=" + d.procId + "\" onclick=\"return confirmx('确认要撤回该项目报告审批吗?', this.href)\" class=\"op-btn op-btn-cancel\" ><i class=\"glyphicon glyphicon-share-alt\"></i> 撤回</a>";
+                        }
+                        if(d.canedit3 != undefined && d.canedit3 =="1")
+                        {
+                            xml+="<a href=\"javascript:void(0)\" onclick=\"openDialogre('项目变更管理', '${ctx}/ruralProject/ruralProjectRecordsAlter/form?alterBeforeRecords.id='+encodeURIComponent('" + d.id + "'),'95%','95%','','送审,暂存,关闭')\" style=\"color: white;background: darkseagreen\" class=\"op-btn op-btn-op-btn-revert\" ><i class=\"fa fa-edit\"></i> 变更</a>";
+                        }
+                        return xml;
+
+                    }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="projectRecords" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${projectRecords.id}"
+                    ,"projId":"${projectRecords.projectId}"
+                    ,"projectReportNumber":"${projectRecords.projectReportNumber}"
+                    ,"projName":"<c:out value="${projectRecords.projectName}" escapeXml="true"/>"
+                    ,"projMaster":"<c:forEach items="${projectRecords.projectLeaders}" var="leader" varStatus="status"><c:choose><c:when test="${status.last}">${leader.name}</c:when><c:otherwise>${leader.name},</c:otherwise></c:choose></c:forEach>"
+                    ,"contract":"${projectRecords.workContractInfo.name}"
+                    ,"client":"${projectRecords.workContractInfo.client.name}"
+                    ,"createDate":"<fmt:formatDate value="${projectRecords.createDate}" pattern="yyyy-MM-dd"/>"
+                    ,"projectReportStatus":"${projectRecords.projectReportStatus}"
+                    ,"procId":"${projectRecords.processInstanceId}"
+                    <c:choose><c:when test="${flag == '1' or fns:getUser().id == projectRecords.createBy.id}">
+
+                    <shiro:hasPermission name="project:projectRecords:edit">
+                    ,"canAdd":<c:choose>
+                                    <c:when test="${projectRecords.projectReportStatus == 0 }">"1"</c:when>
+                                    <c:otherwise>"0"</c:otherwise>
+                                </c:choose>
+                    ,"canedit1":<c:choose>
+                                    <c:when test="${projectRecords.projectReportStatus == 1 }">"1"</c:when>
+                                    <c:otherwise>"0"</c:otherwise>
+                                </c:choose>
+                    ,"canedit2":<c:choose>
+                                    <c:when test="${projectRecords.projectReportStatus == 4}">"1"</c:when>
+                                    <c:otherwise>"0"</c:otherwise>
+                                </c:choose>
+                    ,"canrecall":<c:choose>
+                                    <c:when test="${projectRecords.projectReportStatus == 3}">"1"</c:when>
+                                    <c:otherwise>"0"</c:otherwise>
+                                </c:choose>
+                    </shiro:hasPermission>
+
+                    ,"cancancel":<c:choose>
+                                    <c:when test="${projectRecords.projectReportStatus == 2 && fns:getUser().id == projectRecords.createBy.id}">"1"</c:when>
+                                    <c:otherwise>"0"</c:otherwise>
+                                </c:choose>
+                    </c:when>
+                    <c:otherwise>
+                    ,"candel":"0"
+                    ,"canedit1":"0"
+                    ,"canedit2":"0"
+                    ,"canrecall":"0"
+                    ,"cancancel":"0"
+                    </c:otherwise>
+                    </c:choose>
+                    <shiro:hasPermission name="project:projectRecords:edit">
+                    ,"canedit3":<c:choose>
+                                    <c:when test="${projectRecords.projectReportStatus == 5 && fn:contains(projectRecords.leaderIds,fns:getUser().id)}">"1"</c:when>
+                                    <c:otherwise>"0"</c:otherwise>
+                                </c:choose>
+                    </shiro:hasPermission>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+            // ,even: true
+            // ,height: 315
+        });
+    })
+
+    resizeListTable();
+    $("a").on("click",addLinkVisied);
+</script>
+<script>
+    resizeListWindow2();
+    $(window).resize(function(){
+        resizeListWindow2();
+    });
+</script>
+</body>
+</html>

+ 736 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageModify.jsp

@@ -0,0 +1,736 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>项目管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript" src="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.js"></script>
+	<link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+		  if(validateForm.form()){
+              if($(".trIdAdds").length==0){
+                  top.layer.alert('请至少上传一个项目计划表或者实施方案文档!', {icon: 0});
+                  return;
+              }
+              if($("#workClientLinkmanList tr").length==0){
+                  top.layer.alert('请至少选择一个委托方联系人!', {icon: 0});
+                  return;
+              }
+		      if(i==2){
+		          $("#inputForm").attr("action","${ctx}/ruralProject/ruralProjectRecords/tstore");
+			  }
+			  $("#inputForm").submit();
+			  return true;
+		  }
+	
+		  return false;
+		}
+		$(document).ready(function() {
+			validateForm = $("#inputForm").validate({
+				submitHandler: function(form){
+					loading('正在提交,请稍等...');
+					form.submit();
+				},
+				errorContainer: "#messageBox",
+				errorPlacement: function(error, element) {
+					$("#messageBox").text("输入有误,请先更正。");
+					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+						error.appendTo(element.parent().parent());
+					} else {
+						error.insertAfter(element);
+					}
+				}
+			});
+
+            <%--$('#scaleType').editableSelect({--%>
+                <%--effects: 'slide'--%>
+            <%--});--%>
+            <%--$('#scaleType').val("${projectRecords.scaleType}")--%>
+            <%--$('#scaleUnit').editableSelect({--%>
+                <%--effects: 'slide'--%>
+            <%--});--%>
+            <%--$('#scaleUnit').val("${projectRecords.scaleUnit}")--%>
+            $('#areaId').on("change", function () {
+                var areaId = $("#areaId").val();
+                $("#province").val('');
+                $("#city").val('');
+                $("#county").val('');
+                $.ajax({
+                    type : "POST",
+                    url : "${ctx}/sys/area/getParent",
+                    data : {'areaId':areaId},
+                    //请求成功
+                    success : function(result) {
+                        var pro = result.province;
+                        var city = result.city;
+                        var county  = result.county;
+                        if(pro != '') {
+                            $("#province").val(pro);
+                        }
+                        if(city != '') {
+                            $("#city").val(city);
+                        }
+                        if(county != '') {
+                            $("#county").val(county);
+                        }
+                    },
+
+                });
+            })
+		});
+
+        function setContractValue(obj){
+            var clientId = $("#contractClientId").val();
+            $.ajax({
+                type:'post',
+                url:'${ctx}/ruralProject/ruralProjectRecords/getContractInfo',
+                data:{
+                    "id":obj
+                },
+                success:function(data){
+                    $("#contractName").val(data.name);
+                    $("#contractPrice").val(data.contractPrice);
+                    formatNum($("#contractPrice"));
+                    $("#contractClientName").val(data.client.name);
+                    $("#contractClientId").val(data.client.id);
+                    $("#constructionProjectType").val(data.constructionProjectTypeStr);
+                    $("#linkmanId").val(data.workClinetInfoIds);
+                }
+            })
+            var newClientId  =$("#contractClientId").val();
+            if (clientId != newClientId){
+				$("#workClientLinkmanList tr").remove();
+			}
+        }
+
+        function setValuee(obj){
+            for(var i=0;i<obj.length;i++){
+                var idArr = $("#workClientLinkmanList tr:visible .clientId");
+                if(obj[i].id!=''&&!hasInArr(obj[i].id,idArr)){
+                    addRow("#workClientLinkmanList",workClientLinkmanRowIdx,workClientLinkmanTpl,obj[i]);
+                    workClientLinkmanRowIdx=workClientLinkmanRowIdx+1;
+                }
+            }
+        }
+        function getFee() {
+            $("#unitFees").val('');
+            var totalFee = $("#totalFees").val();
+            var count = $("#buildingScale").val();
+            if(count != '' && totalFee != '') {
+                var cFee = Math.round(parseInt(totalFee) / parseInt(count) * 100) / 100 * 10000;
+                $("#unitFees").val(cFee);
+            }
+        }
+
+        function getBudlingFees() {
+            $("#buildingPercent").val('');
+            $("#buildingUnitFees").val('');
+            var totalFee = $("#totalFees").val();
+            var budFee = $("#buildingFees").val();
+            var count = $("#buildingScale").val();
+            if(totalFee != '') {
+                var p = Math.round(parseInt(budFee) / parseInt(totalFee) * 100 * 100) / 100;
+            }
+            if(count != '') {
+                var pp = Math.round(parseInt(budFee) / parseInt(count) * 100) / 100 * 10000;
+            }
+            $("#buildingPercent").val(p);
+            $("#buildingUnitFees").val(pp);
+        }
+
+        function getInstallFees() {
+            $("#installPercent").val('');
+            $("#installUnitFees").val('');
+            var totalFee = $("#totalFees").val();
+            var budFee = $("#installFees").val();
+            var count = $("#buildingScale").val();
+            if(totalFee != '') {
+                var p = Math.round(parseInt(budFee) / parseInt(totalFee) * 100 * 100) / 100;
+            }
+            if(count != '') {
+                var pp = Math.round(parseInt(budFee) / parseInt(count) * 100) / 100 * 10000;
+            }
+            $("#installPercent").val(p);
+            $("#installUnitFees").val(pp);
+        }
+        function hasInArr(id,idArr) {
+            for(var i=0;i<idArr.length;i++){
+                if(id==$(idArr[i]).val()){
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        function existLinkman(id,length) {
+            for (var i=0;i<length;i++) {
+                var val = $('#workClientLinkmanList'+i+'_id').val();
+                if(id==val){
+                    return true;
+				}
+            }
+            return false;
+        }
+
+        function setClientInfo(obj) {
+            for(var i=0;i<obj.length;i++){
+                var idArr = $("#workConstructionLinkmanList tr:visible .linkmanId");
+                if(obj[i].id!=''&&!hasInArr(obj[i].id,idArr)){
+                    addRow("#workConstructionLinkmanList",workConstructionLinkmanRowIdx,workConstructionLinkmanTpl,obj[i]);
+                    workConstructionLinkmanRowIdx=workConstructionLinkmanRowIdx+1;
+                }
+            }
+        }
+		
+        function existConstructionLinkman(obj,length) {
+            for (var i=0;i<length;i++) {
+                var val = $('#workConstructionLinkmanList'+i+'_id').val();
+                var cid = $('#workConstructionLinkmanList'+i+'_cid').val();
+                if(obj.id==val&&obj.client.id==cid){
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        function insertTitle(tValue){
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = $("#id").val();
+            var attachmentFlag = "82";
+            /*console.log(file);*/
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/projectRecords/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
+        }
+
+
+        function addFile() {
+            $("#attachment_file").click();
+        }
+        
+        function addRow(list, idx, tpl, row){
+            // var idx1 = $("#workClientLinkmanList tr").length;
+                bornTemplete(list, idx, tpl, row, idx);
+        }
+
+        function bornTemplete(list, idx, tpl, row, idx1){
+            $(list).append(Mustache.render(tpl, {
+                idx: idx, delBtn: true, row: row,
+                order:idx1 + 1
+            }));
+            $(list+idx).find("select").each(function(){
+                $(this).val($(this).attr("data-value"));
+            });
+            $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+                var ss = $(this).attr("data-value").split(',');
+                for (var i=0; i<ss.length; i++){
+                    if($(this).val() == ss[i]){
+                        $(this).attr("checked","checked");
+                    }
+                }
+            });
+        }
+
+        function delRow(obj, prefix){
+            var id = $(prefix+"_id");
+            var delFlag = $(prefix+"_delFlag");
+            $(obj).parent().parent().remove();
+        }
+
+        function formatNum(obj) {
+            var val = $(obj).val();
+            if(val==null||val==''|| isNaN(val))return;
+            var money = parseFloat((val + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
+            var l = money.split(".")[0].split("").reverse(),
+                r = money.split(".")[1];
+            t = "";
+            for(i = 0; i < l.length; i ++ )
+            {
+                t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
+            }
+            $(obj).val(t.split("").reverse().join("") + "." + r);
+        }
+	</script>
+</head>
+<body >
+<div class="single-form">
+    <div class="container">
+		<form:form id="inputForm" modelAttribute="projectRecords" enctype="multipart/form-data" action="${ctx}/ruralProject/ruralProjectRecords/saveAudit" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+            <form:hidden path="home"/>
+            <form:hidden path="act.taskId"/>
+            <form:hidden path="act.taskName"/>
+            <form:hidden path="act.taskDefKey"/>
+            <form:hidden path="act.procInsId"/>
+            <form:hidden path="act.procDefId"/>
+            <form:hidden id="flag" path="act.flag"/>
+		    <form:hidden path="workContractInfo.client.id" id="contractClientId" value="${workContractInfo.client.id}"/>
+
+            <div class="form-group layui-row first">
+                <div class="form-group-label"><h2>项目合同信息</h2></div>
+                <div class="layui-item layui-col-sm12 lw7">
+                    <label class="layui-form-label"><span class="require-item">*</span>选择合同:</label>
+                    <div class="layui-input-block  with-icon">
+                        <sys:gridselectContract url="${ctx}/ruralProject/ruralProjectRecords/selectcontract" type="" isTotal="1" id="contractId" name="workContractInfo.id"  value="${projectRecords.workContractInfo.id}"  title="选择合同" labelName="workContractInfo.name"
+                                                labelValue="${projectRecords.workContractInfo.name}" cssClass="form-control required layui-input" fieldLabels="合同名称" fieldKeys="name" searchLabel="合同名称" searchKey="name" ></sys:gridselectContract>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">合同名称:</label>
+                    <div class="layui-input-block">
+                        <input  htmlEscape="false"  readonly="true" id="contractName"  class="form-control layui-input" value="${projectRecords.workContractInfo.name}"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line">合同金额(元):</label>
+                    <div class="layui-input-block">
+                        <input  htmlEscape="false"  readonly="true" id="contractPrice"  class="form-control layui-input" value="<fmt:formatNumber value="${projectRecords.workContractInfo.contractPrice}" pattern="#,##0.00#"/>" onchange="formatNum(this);"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">主委托方:</label>
+                    <div class="layui-input-block">
+                        <input  htmlEscape="false"  readonly="true" id="contractClientName" name="workContractInfo.client.name" class="form-control layui-input" value="${projectRecords.workContractInfo.client.name}"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">工程分类:</label>
+                    <div class="layui-input-block">
+                        <input  htmlEscape="false"  readonly="true" id="constructionProjectType"  class="form-control layui-input" value="${projectRecords.workContractInfo.constructionProjectTypeStr}"/>
+                    </div>
+                </div>
+            </div>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>项目基础信息</h2></div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label"><span class="require-item">*</span>项目名称</label>
+                    <div class="layui-input-block">
+                        <form:input path="projectName" htmlEscape="false"  class="form-control layui-input required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">项目编号:</label>
+                    <div class="layui-input-block">
+                        <div class="input-group">
+                            <form:input path="projectId" htmlEscape="false"  readonly="true" class="form-control layui-input"/>
+                            <span class="input-group-btn">
+                                <label class="form-status"><c:choose><c:when test="${not empty projectRecords.projectStatus}">${fns:getDictLabel(projectRecords.projectStatus, 'audit_state', '')}</c:when><c:otherwise>新添</c:otherwise></c:choose></label>
+                             </span>
+                        </div>
+                    </div>
+                </div>
+                <%--<div class="layui-item layui-col-sm6 lw7">--%>
+                    <%--<label class="layui-form-label">规模类型:</label>--%>
+                    <%--<div class="layui-input-block">--%>
+                        <%--<form:select path="scaleType" class="form-control editable-select layui-input" id="scaleType" value="${scaleType}">--%>
+                            <%--<form:option value=""/>--%>
+                            <%--<form:options items="${fns:getMainDictList('scale_type')}" itemLabel="label" itemValue="label" htmlEscape="false"/>--%>
+                        <%--</form:select>--%>
+                    <%--</div>--%>
+                <%--</div>--%>
+                <%--<div class="layui-item layui-col-sm6 lw7">--%>
+                    <%--<label class="layui-form-label">规模单位:</label>--%>
+                    <%--<div class="layui-input-block">--%>
+                        <%--<form:select path="scaleUnit" class="form-control editable-select layui-input" id="scaleUnit" value="${scaleUnit}">--%>
+                            <%--<form:option value=""/>--%>
+                            <%--<form:options items="${fns:getMainDictList('scale_unit')}" itemLabel="label" itemValue="label" htmlEscape="false"/>--%>
+                        <%--</form:select>--%>
+                    <%--</div>--%>
+                <%--</div>--%>
+                <%--<div class="layui-item layui-col-sm6 lw7">--%>
+                    <%--<label class="layui-form-label">规模数量:</label>--%>
+                    <%--<div class="layui-input-block">--%>
+                        <%--<form:input path="scaleQuantity" htmlEscape="false"  class="form-control number layui-input"/>--%>
+                    <%--</div>--%>
+                <%--</div>--%>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">项目所在地:</label>
+                    <div class="layui-input-block  with-icon">
+                        <sys:treeselect id="area" name="area.id" value="${projectRecords.area.id}" labelName="area.name" labelValue="${projectRecords.area.name}"
+                                        title="区域" url="/sys/area/treeData" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">所在省份:</label>
+                    <div class="layui-input-block">
+                        <form:input path="province" htmlEscape="false" id="province" class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">所在地级市:</label>
+                    <div class="layui-input-block">
+                        <form:input path="city" htmlEscape="false" id="city" class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">所在区县:</label>
+                    <div class="layui-input-block">
+                        <form:input path="county" htmlEscape="false" id="county" class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">建设地点:</label>
+                    <div class="layui-input-block">
+                        <form:input path="projectSite" htmlEscape="false"  class="form-control layui-input"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label"><span class="require-item">*</span>项目负责人:</label>
+                    <div class="layui-input-block  with-icon">
+                        <sys:treeselectt id="master" name="projectLeaders" value="${projectRecords.leaderIds}" labelName="leaderNameStr" labelValue="${projectRecords.leaderNameStr}"
+                                         title="用户" url="/sys/office/treeDataAll?type=3" checked="true" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">创建人:</label>
+                    <div class="layui-input-block">
+                        <form:input path="createBy.name" htmlEscape="false"  readonly="true"  class="form-control  layui-input"/>
+                        <form:hidden path="createBy.id" htmlEscape="false"   readonly="true"  class="form-control  layui-input"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">创建日期:</label>
+                    <div class="layui-input-block">
+                        <input id="createDate" name="createDate" htmlEscape="false"  value="<fmt:formatDate value="${projectRecords.createDate}" pattern="yyyy-MM-dd"/>" readonly="readonly"  class="form-control required layui-input"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">工程结构:</label>
+                    <div class="layui-input-block">
+                        <form:select path="projectStructure" class="form-control editable-select layui-input" id="projectStructure" value="${projectStructure}">
+                            <form:option value=""/>
+                            <form:options items="${fns:getMainDictList('project_structure')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
+                        </form:select>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">地上层数:</label>
+                    <div class="layui-input-block">
+                        <form:input path="onGroundNum" htmlEscape="false"  class="form-control layui-input number"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">底下层数:</label>
+                    <div class="layui-input-block">
+                        <form:input path="underGroundNum" htmlEscape="false"  class="form-control layui-input number"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line"><span class="require-item">*</span>建筑面积或规模:</label>
+                    <div class="layui-input-block">
+                        <form:input path="buildingScale" htmlEscape="false"  class="form-control layui-input required number" onchange="getFee()"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">计量单位:</label>
+                    <div class="layui-input-block">
+                        <form:select path="measuringUnit" class="form-control editable-select layui-input" id="measuringUnit" value="${measuringUnit}">
+                            <form:option value=""/>
+                            <form:options items="${fns:getMainDictList('scale_unit')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
+                        </form:select>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">工程用途:</label>
+                    <div class="layui-input-block">
+                        <form:select path="projectUse" class="form-control editable-select layui-input" id="projectUse" value="${projectUse}">
+                            <form:option value=""/>
+                            <form:options items="${fns:getMainDictList('project_use')}" itemLabel="label" itemValue="label" htmlEscape="false"/>
+                        </form:select>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line"><span class="require-item">*</span>咨询标的额(万元):</label>
+                    <div class="layui-input-block">
+                        <form:input path="totalFees" htmlEscape="false" id="totalFees" class="form-control layui-input required number" onchange="getFee()"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line">其中土建造价(万元):</label>
+                    <div class="layui-input-block">
+                        <form:input path="buildingFees" htmlEscape="false" id="buildingFees" class="form-control layui-input" onchange="getBudlingFees()"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line">其中安装造价(万元):</label>
+                    <div class="layui-input-block">
+                        <form:input path="installFees" htmlEscape="false" id="installFees" class="form-control layui-input" onchange="getInstallFees()"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line">其中土建百分比(%):</label>
+                    <div class="layui-input-block">
+                        <form:input path="buildingPercent" htmlEscape="false" id="buildingPercent" class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line">其中安装百分比(%):</label>
+                    <div class="layui-input-block">
+                        <form:input path="installPercent" htmlEscape="false" id="installPercent" class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">单位造价(元):</label>
+                    <div class="layui-input-block">
+                        <form:input path="unitFees" htmlEscape="false" id="unitFees" class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line">土建单位造价(元):</label>
+                    <div class="layui-input-block">
+                        <form:input path="buildingUnitFees" htmlEscape="false" id="buildingUnitFees" class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label double-line">安装单位造价(元):</label>
+                    <div class="layui-input-block">
+                        <form:input path="installUnitFees" htmlEscape="false" id="installUnitFees" class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7 with-textarea">
+                    <label class="layui-form-label"><span class="require-item">*</span>工程概况:</label>
+                    <div class="layui-input-block">
+                        <form:textarea path="projectDesc" htmlEscape="false" rows="4"  maxlength="255"  class="form-control required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7 with-textarea">
+                    <label class="layui-form-label ">特殊要求:</label>
+                    <div class="layui-input-block">
+                        <form:textarea path="remarks" htmlEscape="false" rows="4"  maxlength="255"  class="form-control "/>
+                    </div>
+                </div>
+            </div>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2><span class="require-item">*</span>委托方联系人信息</h2></div>
+                <div class="layui-item nav-btns">
+                    <sys:gridselect1 url="${ctx}/workclientinfo/workClientInfo/linkmanList" id="linkman" name="linkman.id"  title="选择客户" value="${projectRecords.workContractInfo.workClinetInfoIds}"
+                                     cssClass="form-control required" fieldLabels="联系人" fieldKeys="name"  searchLabel="联系人" searchKey="name"></sys:gridselect1>
+                </div>
+                <div class="layui-item layui-col-xs12 form-table-container">
+                    <table id="contentTable" class="table table-bordered table-condensed details">
+                        <thead>
+                    <tr>
+                        <th class="hide"></th>
+                        <th width="20%">委托方</th>
+                        <th width="20%">联系人姓名</th>
+                        <th width="20%">联系方式1</th>
+                        <th width="20%">联系方式2</th>
+                        <th width="20%">操作</th>
+                    </tr>
+                    </thead>
+                        <tbody id="workClientLinkmanList">
+                        </tbody>
+                    </table>
+                    <script type="text/template" id="workClientLinkmanTpl">//<!--
+					<tr id="workClientLinkmanList{{idx}}">
+					<td class="hide">
+						<input id="workClientLinkmanList{{idx}}_id" name="workClientLinkmanList[{{idx}}].id" type="hidden" value="{{row.id}}" class="clientId"/>
+						<input id="workClientLinkmanList{{idx}}_delFlag" name="workClientLinkmanList[{{idx}}].delFlag" type="hidden" value="0"/>
+					</td>
+					<td>
+						<input id="workClientLinkmanList{{idx}}_cid" name = "workClientLinkmanList[{{idx}}].clientId.id" type="hidden" value="{{row.clientId.id}}"/>
+						{{row.clientId.name}}
+					</td>
+					<td>
+						{{row.name}}
+					</td>
+					<td>
+						{{row.linkPhone}}
+					</td>
+					<td>
+						{{row.linkMobile}}
+					</td>
+					<td class="op-td">
+						{{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#workClientLinkmanList{{idx}}')" title="删除"><i class="fa fa-trash"></i>&nbsp;删除</span>{{/delBtn}}
+					</td>
+				</tr>//-->
+                    </script>
+                </div>
+            </div>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2><span class="require-item">*</span>施工方信息</h2></div>
+                <div class="layui-item nav-btns">
+                    <sys:gridselectClientLink url="${ctx}/workclientinfo/workClientInfo/clientInfolist" id="constructionOrgList"   title="选择施工单位"
+                                              cssClass="form-control required" fieldLabels="客户编号" fieldKeys="name"  searchLabel="客户名称" searchKey="name"></sys:gridselectClientLink>
+                </div>
+                <div class="layui-item layui-col-xs12 form-table-container">
+                    <table id="contentTable2" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                            <th class="hide"></th>
+                            <th style="text-align: center" width="20%">施工方单位名称</th>
+                            <th style="text-align: center" width="20%">联系人姓名</th>
+                            <th style="text-align: center" width="20%">联系方式1</th>
+                            <th style="text-align: center" width="20%">联系方式2</th>
+                            <th width="20%">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="workConstructionLinkmanList">
+                        </tbody>
+                    </table>
+                    <script type="text/template" id="workConstructionLinkmanTpl">//<!--
+					<tr id="workConstructionLinkmanList{{idx}}">
+					<td class="hide">
+						<input id="workConstructionLinkmanList{{idx}}_id" name="workConstructionLinkmanList[{{idx}}].id" type="hidden" value="{{row.id}}" class="linkmanId"/>
+						<input id="workConstructionLinkmanList{{idx}}_delFlag" name="workConstructionLinkmanList[{{idx}}].delFlag" type="hidden" value="0"/>
+					</td>
+					<td style="text-align: center">
+						<input id="workConstructionLinkmanList{{idx}}_cid" name = "workConstructionLinkmanList[{{idx}}].clientId.id" type="hidden" value="{{row.clientId.id}}"/>
+						{{row.clientId.name}}
+					</td>
+					<td style="text-align: center">
+						{{row.name }}
+					</td>
+					<td style="text-align: center">
+						{{row.linkPhone}}
+					</td>
+					<td style="text-align: center">
+						{{row.linkMobile}}
+					</td>
+					<td class="text-center" width="10">
+						{{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#workConstructionLinkmanList{{idx}}')" title="删除"><i class="fa fa-trash"></i>&nbsp;删除</span>{{/delBtn}}
+					</td>
+				</tr>//-->
+                    </script>
+
+                <script>
+                    var workClientLinkmanRowIdx = 0, workClientLinkmanTpl = $("#workClientLinkmanTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                    var workConstructionLinkmanRowIdx = 0, workConstructionLinkmanTpl = $("#workConstructionLinkmanTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                    $(document).ready(function() {
+                        var data = ${fns:toJson(projectRecords.workClientLinkmanList)};
+                        for (var i=0; i<data.length; i++){
+                            addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl, data[i]);
+                            workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;
+                        }
+                        var dataBank = ${fns:toJson(projectRecords.workConstructionLinkmanList)};
+                        for (var i=0; i<dataBank.length; i++){
+                            addRow('#workConstructionLinkmanList', workConstructionLinkmanRowIdx, workConstructionLinkmanTpl, dataBank[i]);
+                            workConstructionLinkmanRowIdx = workConstructionLinkmanRowIdx + 1;
+                        }
+                    });
+                </script>
+                </div>
+            </div>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2><span class="require-item">*</span>项目计划附件信息</h2></div>
+                <div class="layui-item nav-btns">
+                    <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"  onclick="addFile()"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+                </div>
+                <div id="addFile_attachment" style="display: none" class="upload-progress">
+                    <span id="fileName_attachment" ></span>
+                    <b><span id="baifenbi_attachment" ></span></b>
+                    <div class="progress">
+                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+                        </div>
+                    </div>
+                </div>
+                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+                <span id="attachment_title"></span>
+                <div class="layui-item layui-col-xs12 form-table-container">
+                    <table id="listAttachment" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                                <%-- <th>序号</th>--%>
+                            <th width="25%">文件</th>
+                            <th width="25%">上传人</th>
+                            <th width="25%">上传时间</th>
+                            <th width="25%">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_attachment">
+                        <c:forEach items="${projectRecords.workAttachments}" var = "workClientAttachment" varStatus="status">
+                            <tr class="trIdAdds">
+                                    <%-- <td>${status.index + 1}</td>--%>
+                                <c:choose>
+                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                        <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                    </c:when>
+                                    <c:otherwise>
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:otherwise>
+                                </c:choose>
+                                <td>${workClientAttachment.createBy.name}</td>
+                                <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+                                <td class="op-td">
+                                    <div class="op-btn-box" >
+                                        <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                        <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+                                    </div>
+                                </td>
+                            </tr>
+                        </c:forEach>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>项目组成员列表</h2></div>
+                <div class="layui-item layui-col-xs12 form-table-container">
+                    <table id="usersListTable" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                            <th width="25%">姓名</th>
+                            <th width="25%">部门</th>
+                            <th width="25%">职级</th>
+                            <th width="25%">状态</th>
+                        </tr>
+                        </thead>
+                        <tbody id="usersList">
+                        <c:if test="${not empty projectRecords.projectMembers}">
+                            <c:forEach items="${projectRecords.projectMembers}" var="user">
+                                <tr id="${user.id}">
+                                    <td>
+                                            ${user.name}
+                                    </td>
+                                    <td>
+                                            ${user.office.name}
+                                    </td>
+                                    <td>
+                                            ${user.basicInfo.jobGrade.name}
+                                    </td>
+                                    <td>
+                                        <c:choose>
+                                            <c:when test="${user.delFlag == 0}">
+                                                正常
+                                            </c:when>
+                                            <c:otherwise>
+                                                移除
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </td>
+                                </tr>
+                            </c:forEach>
+                        </c:if>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+            <div class="form-group layui-row page-end"></div>
+        </form:form>
+    </div>
+</div>
+
+</body>
+</html>

+ 15 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageTask.jsp

@@ -0,0 +1,15 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>流程追踪</title>
+	<meta name="decorator" content="default"/>
+</head>
+<body class="gray-bg">
+<div class="container form layui-form">
+	<act:flowChart procInsId="${processInstanceId}"/>
+	<act:histoicFlow procInsId="${processInstanceId}"/>
+</div>
+</body>
+</html>
+

+ 557 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageView.jsp

@@ -0,0 +1,557 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>项目审批管理</title>
+	<meta name="decorator" content="default"/>
+	<script>
+		$(document).ready(function () {
+			var tt = $("#contractNum").val();
+			if (tt == null || tt === "") {
+				$("#divv").hide();
+				$("#divv3").hide();
+				setTimeout(function () {
+					var tt = $("#workClientLinkmanList").find("tr").eq(0).find("td").eq(1).text().trim();
+					$("#clientName").val(tt);
+				},100);
+			}
+
+		})
+	</script>
+	<script type="text/javascript">
+        function addRow(list, idx, tpl, row){
+            // var idx1 = $("#workClientLinkmanList tr").length;
+            bornTemplete(list, idx, tpl, row, idx);
+        }
+
+        function bornTemplete(list, idx, tpl, row, idx1){
+            $(list).append(Mustache.render(tpl, {
+                idx: idx, delBtn: true, row: row,
+                order:idx1 + 1
+            }));
+            $(list+idx).find("select").each(function(){
+                $(this).val($(this).attr("data-value"));
+            });
+            $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+                var ss = $(this).attr("data-value").split(',');
+                for (var i=0; i<ss.length; i++){
+                    if($(this).val() == ss[i]){
+                        $(this).attr("checked","checked");
+                    }
+                }
+            });
+        }
+        function seeFile(fileUrl,fileName) {
+            //   location.href = "/followRecord/seeFile";
+            var index = fileName.lastIndexOf(".");
+            var fileType = fileName.substring(index);
+            // debugger
+            if (".pdf" == fileType) {
+                window.open(fileUrl);
+            } else {
+                window.open("${ctx}/isignature/iSignatureDocument/seeFile?fileUrl="+fileUrl+"&fileName="+fileName);
+            }
+        }
+	</script>
+	<script>
+		function initRecordStatus(index,id,dataid,status)
+		{
+			var elem = document.getElementById("status_td_" + index);
+			var st = getAuditState(status);
+			if(st.action)
+				var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/projectcontentinfo/projectcontentinfo/getProcessOne?id=" + id + "&projectReportData.id="+ dataid + "&type="+status+"','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>";
+
+			elem.innerHTML = xml;
+		}
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container view-form">
+		<form:form id="inputForm" modelAttribute="projectRecords" action="${ctx}/ruralProject/ruralProjectRecords/saveAudit" method="post" class="form-horizontal">
+			<div class="form-group layui-row first">
+				<div class="form-group-label"><h2>项目合同信息</h2></div>
+               <div id="divv">
+				   <div class="layui-item layui-col-sm12 lw6">
+					   <label class="layui-form-label">合同编号:</label>
+					   <div class="layui-input-block">
+						   <input htmlEscape="false" id="contractNum" readonly="true" class="form-control layui-input" value="${projectRecords.workContractInfo.contractNum}"/>
+					   </div>
+				   </div>
+				   <div class="layui-item layui-col-sm6 lw6">
+					   <label class="layui-form-label">合同名称:</label>
+					   <div class="layui-input-block">
+						   <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.workContractInfo.name}"/>
+					   </div>
+				   </div>
+				   <div class="layui-item layui-col-sm6 lw6">
+					   <label class="layui-form-label double-line">合同金额(元):</label>
+					   <div class="layui-input-block">
+						   <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="<fmt:formatNumber value="${projectRecords.workContractInfo.contractPrice}" pattern="#,##0.00#"/>"/>
+					   </div>
+				   </div>
+			   </div>
+				<div class="layui-item layui-col-sm6 lw6">
+					<label class="layui-form-label">主委托方:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  id="clientName" readonly="true" class="form-control layui-input" value="${projectRecords.workContractInfo.client.name}"/>
+					</div>
+				</div>
+				<div id="divv3">
+					<div class="layui-item layui-col-sm6 lw6">
+						<label class="layui-form-label">工程分类:</label>
+						<div class="layui-input-block">
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.workContractInfo.constructionProjectTypeStr}"/>
+						</div>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row first">
+				<div class="form-group-label"><h2>项目基础信息</h2></div>
+                <div class="layui-item layui-col-sm6 lw6">
+                    <label class="layui-form-label">项目名称:</label>
+                    <div class="layui-input-block">
+                        <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.projectName}"/>
+                    </div>
+                </div>
+				<div class="layui-item layui-col-sm6 lw6">
+					<label class="layui-form-label">项目编号:</label>
+					<div class="layui-input-block">
+                        <div class="input-group">
+                            <form:input path="projectId" htmlEscape="false"  readonly="true" class="form-control layui-input"/>
+                            <span class="input-group-btn">
+                                <label class="form-status"><c:choose><c:when test="${not empty projectRecords.projectStatus}">${fns:getDictLabel(projectRecords.projectStatus, 'audit_state', '')}</c:when><c:otherwise>新添</c:otherwise></c:choose></label>
+                             </span>
+                        </div>
+					</div>
+				</div>
+				<%--<div class="layui-item layui-col-sm6 lw6">--%>
+					<%--<label class="layui-form-label">规模类型:</label>--%>
+					<%--<div class="layui-input-block">--%>
+						<%--<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.scaleType}"/>--%>
+					<%--</div>--%>
+				<%--</div>--%>
+				<%--<div class="layui-item layui-col-sm6 lw6">--%>
+					<%--<label class="layui-form-label">规模单位:</label>--%>
+					<%--<div class="layui-input-block">--%>
+						<%--<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.scaleUnit}"/>--%>
+					<%--</div>--%>
+				<%--</div>--%>
+				<%--<div class="layui-item layui-col-sm6 lw6">--%>
+					<%--<label class="layui-form-label">规模数量:</label>--%>
+					<%--<div class="layui-input-block">--%>
+						<%--<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.scaleQuantity}"/>--%>
+					<%--</div>--%>
+				<%--</div>--%>
+				<div class="layui-item layui-col-sm6 lw6">
+					<label class="layui-form-label">项目所在地:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.area.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">所在省份:</label>
+					<div class="layui-input-block">
+						<form:input path="province" htmlEscape="false" id="province" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">所在地级市:</label>
+					<div class="layui-input-block">
+						<form:input path="city" htmlEscape="false" id="city" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">所在区县:</label>
+					<div class="layui-input-block">
+						<form:input path="county" htmlEscape="false" id="areaName1" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw6">
+					<label class="layui-form-label">建设地点:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.projectSite}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw6">
+					<label class="layui-form-label">项目负责人:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.leaderNameStr}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw6">
+					<label class="layui-form-label">创建人:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.createBy.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw6">
+					<label class="layui-form-label">创建日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="<fmt:formatDate value="${projectRecords.createDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">工程结构:</label>
+					<div class="layui-input-block">
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.projectStructure}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">地上层数:</label>
+					<div class="layui-input-block">
+						<form:input path="onGroundNum" htmlEscape="false"  class="form-control layui-input number" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">底下层数:</label>
+					<div class="layui-input-block">
+						<form:input path="underGroundNum" htmlEscape="false"  class="form-control layui-input number" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>建筑面积或规模:</label>
+					<div class="layui-input-block">
+						<form:input path="buildingScale" htmlEscape="false"  class="form-control layui-input required number" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">计量单位:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.measuringUnit}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">工程用途:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.projectUse}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>咨询标的额(万元):</label>
+					<div class="layui-input-block">
+						<input value="<fmt:formatNumber value="${projectRecords.totalFees}" pattern="#,##0.00#"/>" htmlEscape="false" id="totalFees" class="form-control layui-input required number"  readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line">其中土建造价(万元):</label>
+					<div class="layui-input-block">
+						<input   value="<fmt:formatNumber value="${projectRecords.buildingFees}" pattern="#,##0.00#"/>" htmlEscape="false" id="buildingFees" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line">其中安装造价(万元):</label>
+					<div class="layui-input-block">
+						<input  value="<fmt:formatNumber value="${projectRecords.installFees}" pattern="#,##0.00#"/>" htmlEscape="false" id="installFees" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line">其中土建百分比(%):</label>
+					<div class="layui-input-block">
+						<form:input path="buildingPercent" htmlEscape="false" id="buildingPercent" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line">其中安装百分比(%):</label>
+					<div class="layui-input-block">
+						<form:input path="installPercent" htmlEscape="false" id="installPercent" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">单位造价(元):</label>
+					<div class="layui-input-block">
+						<input value="<fmt:formatNumber value="${projectRecords.unitFees}" pattern="#,##0.00#"/>" htmlEscape="false" id="unitFees" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line">土建单位造价(元):</label>
+					<div class="layui-input-block">
+						<input  value="<fmt:formatNumber value="${projectRecords.buildingUnitFees}" pattern="#,##0.00#"/>" htmlEscape="false" id="buildingUnitFees" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line">安装单位造价(元):</label>
+					<div class="layui-input-block">
+						<input  value="<fmt:formatNumber value="${projectRecords.installUnitFees}" pattern="#,##0.00#"/>" htmlEscape="false" id="installUnitFees" class="form-control layui-input" readonly="readonly"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw6 with-textarea">
+					<label class="layui-form-label">工程概况:</label>
+					<div class="layui-input-block">
+						<textarea htmlEscape="false" rows="4" readonly="true" maxlength="1000" class="form-control" >${projectRecords.projectDesc}</textarea>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw6 with-textarea">
+					<label class="layui-form-label">特殊要求:</label>
+					<div class="layui-input-block">
+						<textarea htmlEscape="false" rows="4" readonly="true" maxlength="1000" class="form-control" >${projectRecords.remarks}</textarea>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>委托方联系人信息</h2></div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="contentTable" class="table table-bordered table-condensed no-bottom-margin details">
+						<thead>
+						<tr>
+							<th class="hide"></th>
+							<th width="25%">委托方</th>
+							<th width="25%">联系人姓名</th>
+							<th width="25%">联系方式1</th>
+							<th width="25%">联系方式2</th>
+						</tr>
+						</thead>
+						<tbody id="workClientLinkmanList">
+						</tbody>
+					</table>
+					<script type="text/template" id="workClientLinkmanTpl">//<!--
+					<tr id="workClientLinkmanList{{idx}}">
+					<td class="hide">
+						<input id="workClientLinkmanList{{idx}}_id" name="workClientLinkmanList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+						<input id="workClientLinkmanList{{idx}}_delFlag" name="workClientLinkmanList[{{idx}}].delFlag" type="hidden" value="0"/>
+					</td>
+					<td>
+						{{row.clientId.name}}
+					</td>
+					<td>
+						{{row.name}}
+					</td>
+					<td>
+						{{row.linkPhone}}
+					</td>
+					<td>
+						{{row.linkMobile}}
+					</td>
+				</tr>//-->
+					</script>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>施工方信息</h2></div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="contentTable1" class="table table-bordered table-condensed no-bottom-margin details">
+						<thead>
+						<tr>
+							<th class="hide"></th>
+							<th width="25%">施工方单位名称</th>
+							<th width="25%">联系人姓名</th>
+							<th width="25%">联系方式1</th>
+							<th width="25%">联系方式2</th>
+						</tr>
+						</thead>
+						<tbody id="workConstructionLinkmanList">
+						</tbody>
+					</table>
+					<script type="text/template" id="workConstructionLinkmanTpl">//<!--
+					<tr id="workConstructionLinkmanList{{idx}}">
+					<td class="hide">
+						<input id="workConstructionLinkmanList{{idx}}_id" name="workConstructionLinkmanList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+						<input id="workConstructionLinkmanList{{idx}}_delFlag" name="workConstructionLinkmanList[{{idx}}].delFlag" type="hidden" value="0"/>
+					</td>
+					<td>
+						{{row.clientId.name}}
+					</td>
+					<td>
+						{{row.name }}
+					</td>
+					<td>
+						{{row.linkPhone}}
+					</td>
+					<td>
+						{{row.linkMobile}}
+					</td>
+				</tr>//-->
+					</script>
+				</div>
+			</div>
+
+			<c:if test="${not empty projectRecords.workAttachments}">
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>项目计划附件信息</h2></div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="listAttachment" class="table table-bordered table-condensed no-bottom-margin details">
+						<thead>
+						<tr>
+							<th width="25%">文件预览</th>
+							<th width="25%">上传人</th>
+							<th width="25%">上传时间</th>
+							<th width="25%">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${projectRecords.workAttachments}" var="workClientAttachment" varStatus="status">
+							<tr>
+									<%--<td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','95%','95%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','95%','95%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" pattern="yyyy-MM-dd"/></td>
+								<td  class="op-td">
+									<a href="javascript:location.href=encodeURI('${ctx}/workcontractinfo/workContractInfo/downLoadAttach?file=${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+									<%--<a href="#" onclick="seeFile('${workClientAttachment.url}','${workClientAttachment.attachmentName}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;查看</a>--%>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			</c:if>
+			<script>
+                var workClientLinkmanRowIdx = 0, workClientLinkmanTpl = $("#workClientLinkmanTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                var workConstructionLinkmanRowIdx = 0, workConstructionLinkmanTpl = $("#workConstructionLinkmanTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                $(document).ready(function() {
+                    var data = ${fns:toJson(projectRecords.workClientLinkmanList)};
+                    for (var i=0; i<data.length; i++){
+                        addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl, data[i]);
+                        workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;
+                    }
+                    var dataBank = ${fns:toJson(projectRecords.workConstructionLinkmanList)};
+                    for (var i=0; i<dataBank.length; i++){
+                        addRow('#workConstructionLinkmanList', workConstructionLinkmanRowIdx, workConstructionLinkmanTpl, dataBank[i]);
+                        workConstructionLinkmanRowIdx = workConstructionLinkmanRowIdx + 1;
+                    }
+                });
+
+			</script>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>项目组成员列表</h2></div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+				<table id="usersListTable" class="table table-bordered table-condensed no-bottom-margin details">
+					<thead>
+					<tr>
+						<th width="25%">姓名</th>
+						<th width="25%">部门</th>
+						<th width="25%">职级</th>
+						<th width="25%">状态</th>
+					</tr>
+					</thead>
+					<tbody id="usersList">
+					<c:if test="${not empty projectRecords.projectMembers}">
+						<c:forEach items="${projectRecords.projectMembers}" var="user">
+							<tr id="${user.id}">
+								<td>
+										${user.name}
+								</td>
+								<td>
+										${user.office.name}
+								</td>
+								<td>
+										${user.basicInfo.jobGrade.name}
+								</td>
+								<td>
+									<c:choose>
+										<c:when test="${user.delFlag == 0}">
+											正常
+										</c:when>
+										<c:otherwise>
+											移除
+										</c:otherwise>
+									</c:choose>
+								</td>
+							</tr>
+						</c:forEach>
+					</c:if>
+					</tbody>
+				</table>
+			</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>项目报告</h2></div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th width="25%">报告编号</th>
+							<th width="25%">报告名称</th>
+							<th width="20%">工作内容类型</th>
+							<th width="10%">签章类型</th>
+							<th width="10%">创建日期</th>
+							<th width="10%">状态</th>
+						</tr>
+						</thead>
+						<tbody>
+						<c:choose>
+							<c:when test="${not empty projectRecords.projectReportData}">
+								<c:forEach items="${projectRecords.projectReportData}" var="projectReportData" varStatus="index">
+									<tr>
+										<td><a title="${projectReportData.number}" href="javascript:void(0)" onclick="openDialogView('查看报告详情', '${ctx}/projectcontentinfo/projectcontentinfo/form1?id=${projectReportData.id}','95%', '95%')">
+												${projectReportData.number}
+										</a></td>
+										<td>
+													${projectReportData.name}
+										</td>
+										<td title="${fns:getContentTypeName(projectReportData.type,"")}">
+												${fns:getContentTypeName(projectReportData.type,"")}
+										</td>
+										<td title="${projectReportData.reportType}">
+												${projectReportData.reportType}
+										</td>
+										<td>
+											<fmt:formatDate value="${projectReportData.reportDate}" pattern="yyyy-MM-dd"/>
+										</td>
+										<td class="op-td">
+												<%--<c:choose>--%>
+												<%--<c:when test="${empty projectReportData.status || projectReportData.status eq 1}">--%>
+												<%--<div style="text-align: center">--%>
+												<%--<a href="javascript:void(0)" class="op-btn op-btn-trace" >${fns:getDictLabel(projectReportData.status, 'audit_state', '')}</a>--%>
+												<%--</div>--%>
+												<%--</c:when>--%>
+												<%--<c:otherwise>--%>
+												<%--<div style="text-align: center">--%>
+												<%--<a href="javascript:void(0)" onclick="openDialogView('流程追踪', '${ctx}/projectcontentinfo/projectcontentinfo/getProcessOne?id=${id}&projectReportData.id=${projectReportData.id}&type=1','95%','95%')" class="op-btn op-btn-trace" >${fns:getDictLabel(projectReportData.status, 'audit_state', '')}</a>--%>
+												<%--</div>--%>
+												<%--</c:otherwise>--%>
+												<%--</c:choose>--%>
+											<div style="text-align: center" id="status_td_${index.index+1}">
+											</div>
+											<script>
+												initRecordStatus(${index.index+1},"${id}","${projectReportData.id}","${projectReportData.status}");
+											</script>
+										</td>
+									</tr>
+								</c:forEach>
+							</c:when>
+							<c:otherwise>
+								<tr>
+									<td colspan="7">
+										暂无数据
+									</td>
+								</tr>
+							</c:otherwise>
+						</c:choose>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>