Bladeren bron

Merge branch 'master' of http://192.168.2.4:3000/user5/simple_xg_total_process_master

chengqiang 4 jaren geleden
bovenliggende
commit
b63738af12
21 gewijzigde bestanden met toevoegingen van 1160 en 433 verwijderingen
  1. 18 0
      src/main/java/com/jeeplus/modules/projectAccessory/entity/ProjectTemplateInfo.java
  2. 17 0
      src/main/java/com/jeeplus/modules/projectFilingBatch/dao/ProjectFilingBatchProInfoDao.java
  3. 42 0
      src/main/java/com/jeeplus/modules/projectFilingBatch/entity/ProjectFilingBatchProInfo.java
  4. 22 20
      src/main/java/com/jeeplus/modules/projectFilingBatch/service/ProjectFilingBatchService.java
  5. 2 2
      src/main/java/com/jeeplus/modules/projectFilingBatch/web/ProjectFilingBatchController.java
  6. 68 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java
  7. 1 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectRecordsController.java
  8. 7 1
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageController.java
  9. 52 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectRecordsController.java
  10. 32 20
      src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java
  11. 39 0
      src/main/resources/mappings/modules/projectGuidang/ProjectFilingBatchProInfoDao.xml
  12. 7 8
      src/main/webapp/webpage/modules/projectFilingBatch/projectFilingBatchAudit.jsp
  13. 4 4
      src/main/webapp/webpage/modules/projectFilingBatch/projectFilingBatchView.jsp
  14. 127 58
      src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordAudit.jsp
  15. 10 10
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectMessageLists.jsp
  16. 140 89
      src/main/webapp/webpage/modules/ruralprojectrecords/projectAccessoryForm.jsp
  17. 139 55
      src/main/webapp/webpage/modules/ruralprojectrecords/projectReportRecord/projectReportRecordView.jsp
  18. 126 52
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageAudit.jsp
  19. 148 52
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageView.jsp
  20. 148 51
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/reportView.jsp
  21. 11 11
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageLists.jsp

+ 18 - 0
src/main/java/com/jeeplus/modules/projectAccessory/entity/ProjectTemplateInfo.java

@@ -32,6 +32,8 @@ public class ProjectTemplateInfo extends TreeEntity<ProjectTemplateInfo>{
 	private String attachId;
 	private Integer mustFlag;   //判断是否是必填项(1:必填,0:非必填)
 	private Integer requiredStage;   //必填阶段(1.上传报告,2.归档)
+	private Integer flag;
+	private String url;
 
 	public ProjectTemplateInfo() {
 		super();
@@ -169,4 +171,20 @@ public class ProjectTemplateInfo extends TreeEntity<ProjectTemplateInfo>{
 	public void setRequiredStage(Integer requiredStage) {
 		this.requiredStage = requiredStage;
 	}
+
+	public Integer getFlag() {
+		return flag;
+	}
+
+	public void setFlag(Integer flag) {
+		this.flag = flag;
+	}
+
+	public String getUrl() {
+		return url;
+	}
+
+	public void setUrl(String url) {
+		this.url = url;
+	}
 }

+ 17 - 0
src/main/java/com/jeeplus/modules/projectFilingBatch/dao/ProjectFilingBatchProInfoDao.java

@@ -0,0 +1,17 @@
+package com.jeeplus.modules.projectFilingBatch.dao;
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.DataEntity;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatch;
+import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatchProInfo;
+
+import java.util.List;
+
+@MyBatisDao
+public interface ProjectFilingBatchProInfoDao extends CrudDao<ProjectFilingBatchProInfo> {
+     ProjectFilingBatchProInfo findProInfo(ProjectFilingBatchProInfo proInfo);
+     Integer proInfoInsert(ProjectFilingBatchProInfo proInfo);
+
+     List<ProjectFilingBatchProInfo> getListByFilingBatchId(String filingBatchId);
+}

+ 42 - 0
src/main/java/com/jeeplus/modules/projectFilingBatch/entity/ProjectFilingBatchProInfo.java

@@ -0,0 +1,42 @@
+package com.jeeplus.modules.projectFilingBatch.entity;
+
+import com.jeeplus.common.persistence.DataEntity;
+
+public class ProjectFilingBatchProInfo extends DataEntity<ProjectFilingBatchProInfo> {
+    private String proInfofilingBatch;
+    private String proId;
+    private String proInfoType;
+    private String proInfoName;
+
+    public String getProInfofilingBatch() {
+        return proInfofilingBatch;
+    }
+
+    public void setProInfofilingBatch(String proInfofilingBatch) {
+        this.proInfofilingBatch = proInfofilingBatch;
+    }
+
+    public String getProId() {
+        return proId;
+    }
+
+    public void setProId(String proId) {
+        this.proId = proId;
+    }
+
+    public String getProInfoType() {
+        return proInfoType;
+    }
+
+    public void setProInfoType(String proInfoType) {
+        this.proInfoType = proInfoType;
+    }
+
+    public String getProInfoName() {
+        return proInfoName;
+    }
+
+    public void setProInfoName(String proInfoName) {
+        this.proInfoName = proInfoName;
+    }
+}

+ 22 - 20
src/main/java/com/jeeplus/modules/projectFilingBatch/service/ProjectFilingBatchService.java

@@ -8,8 +8,10 @@ import com.jeeplus.common.utils.MenuStatusEnum;
 import com.jeeplus.modules.act.entity.Act;
 import com.jeeplus.modules.act.service.ActTaskService;
 import com.jeeplus.modules.projectFilingBatch.dao.ProjectFilingBatchDao;
+import com.jeeplus.modules.projectFilingBatch.dao.ProjectFilingBatchProInfoDao;
 import com.jeeplus.modules.projectFilingBatch.dao.ProjectFilingbatchRelationDao;
 import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatch;
+import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatchProInfo;
 import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatchTree;
 import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingbatchRelation;
 import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
@@ -86,6 +88,8 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
     private SerialNumTplService serialNumTplService;
     @Autowired
     private WorkattachmentService workattachmentService;
+    @Autowired
+    private ProjectFilingBatchProInfoDao projectFilingBatchProInfoDao;
     @Override
     public ProjectFilingBatch get(String id) {
         return super.get(id);
@@ -199,7 +203,9 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
 
 
     @Transactional(readOnly = false)
-    public Map<String,List> getFilingBatchById(ProjectFilingBatch projectFilingBatch, HttpServletRequest request, HttpServletResponse response) {
+    public Map<String,List> getFilingBatchById(ProjectFilingBatch projectFilingBatch) {
+        //查询批次下所有数据
+        List<ProjectFilingBatchProInfo> attachmentList = projectFilingBatchProInfoDao.getListByFilingBatchId(projectFilingBatch.getId());
         //查询批次项目信息
         List<ProjectFilingbatchRelation> relationList = dao.getRelationList(projectFilingBatch);
 
@@ -211,17 +217,13 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
 
             batchData = getRelationInfo(batch,projectFilingBatch);
             dataList.add(batchData);
-            //获取子项目信息
-            Workattachment workattachment = new Workattachment();
-            workattachment.setAttachmentId(batch.getProjectId());
-            workattachment.setDivIdType("_filingBatch");
-            //查询对应子项目数据
-            List<Workattachment> attachmentList = workattachmentService.findList(workattachment);
 
             //项目名称不为空则进行所有项目的查询和处理
-            for (Workattachment attachment: attachmentList) {
-                ProjectFilingBatchTree treeData = getAttachmentInfo(attachment,batch.getId());
-                dataList.add(treeData);
+            for (ProjectFilingBatchProInfo info: attachmentList) {
+                if(info.getProId().equals(batch.getProjectId())){
+                    ProjectFilingBatchTree treeData = getAttachmentInfo(info,batch.getId());
+                    dataList.add(treeData);
+                }
 
             }
         }
@@ -271,15 +273,13 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
         return treeData;
     }
 
-    private ProjectFilingBatchTree getAttachmentInfo(Workattachment attachment,String pId){
+    private ProjectFilingBatchTree getAttachmentInfo(ProjectFilingBatchProInfo proInfo,String pId){
         ProjectFilingBatchTree treeData = new ProjectFilingBatchTree();
         //将界面需要展示数据放入类中
         //项目编号
-        treeData.setProjectNum(attachment.getRemarks());
+        treeData.setProjectNum(proInfo.getProInfoType());
         //报告号
-        treeData.setNumber(attachment.getAttachmentName());
-        //文件路径
-        treeData.setUrl(attachment.getUrl());
+        treeData.setNumber(proInfo.getProInfoName());
         //项目名称
         treeData.setFilingName("");
         //案卷号
@@ -765,12 +765,14 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
             //审批通过,处理归档项目状态
             List<ProjectFilingbatchRelation> projectFilingbatchRelationList = projectFilingBatch.getProjectFilingbatchRelations();
             for (ProjectFilingbatchRelation info: projectFilingbatchRelationList) {
-                if(4 == info.getStatus()){
-                    info.setDelFlag("1");
-                    info.setBoxNum("");
-                    info.setReBoxNum("");
+                if(StringUtils.isNotBlank(info.getId())){
+                    if(4 == info.getStatus()){
+                        info.setDelFlag("1");
+                        info.setBoxNum("");
+                        info.setReBoxNum("");
+                    }
+                    this.updateByid(info);
                 }
-                this.updateByid(info);
             }
             //审核完成提示框
             String title = "归档批次号【"+projectFilingBatch.getFilingBatch()+"】归档成功";

+ 2 - 2
src/main/java/com/jeeplus/modules/projectFilingBatch/web/ProjectFilingBatchController.java

@@ -164,8 +164,8 @@ public class ProjectFilingBatchController extends BaseController {
      */
     @RequestMapping(value = "getFilingBatchById")
     @ResponseBody
-    public Map<String,List> getFilingBatchById(ProjectFilingBatch projectFilingBatch, HttpServletRequest request, HttpServletResponse response) {
-        Map<String, List> map = projectFilingBatchService.getFilingBatchById(projectFilingBatch, request, response);
+    public Map<String,List> getFilingBatchById(ProjectFilingBatch projectFilingBatch) {
+        Map<String, List> map = projectFilingBatchService.getFilingBatchById(projectFilingBatch);
         return map;
     }
 

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

@@ -19,17 +19,21 @@ import com.jeeplus.modules.projectAccessory.dao.ProjectTemplateDao;
 import com.jeeplus.modules.projectAccessory.entity.ProjectAccessoryRelationInfo;
 import com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo;
 import com.jeeplus.modules.projectAccessory.service.ProjectAccessoryRelationService;
+import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatch;
+import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingbatchRelation;
 import com.jeeplus.modules.projectcontentinfo.dao.ProjectReportDataDao;
 import com.jeeplus.modules.projectcontentinfo.dao.ProjectcontentinfoDao;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
 import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
 import com.jeeplus.modules.projectcontentinfo.service.ProjectReportDataService;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecordTreeData;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
 import com.jeeplus.modules.ruralprojectrecords.dao.RuralProjectClientLinkmanDao;
 import com.jeeplus.modules.ruralprojectrecords.dao.RuralProjectRecordsDao;
 import com.jeeplus.modules.ruralprojectrecords.dao.RuralWorkProjectUserDao;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectcontentinfo;
+import com.jeeplus.modules.ruralprojectrecords.entity.SubProjectInfo;
 import com.jeeplus.modules.ruralprojectrecords.enums.ProjectStatusEnum;
 import com.jeeplus.modules.serialnum.service.SerialNumTplService;
 import com.jeeplus.modules.sys.entity.MainDictDetail;
@@ -72,6 +76,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Propagation;
 import org.springframework.transaction.annotation.Transactional;
 
+import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.*;
 import java.net.URLEncoder;
@@ -1857,4 +1862,67 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 	public void updateDate(RuralProjectRecords projectRecords){
 		dao.updateDate(projectRecords);
 	}
+
+	public void disposeData(RuralProjectcontentinfo ruralProjectcontentinfo){
+		List<ProjectTemplateInfo> fileAttachmentList = ruralProjectcontentinfo.getFileAttachmentList();
+		List<ProjectTemplateInfo> gistdataList = ruralProjectcontentinfo.getFileGistdataList();
+		List<ProjectTemplateInfo> otherAttachMentList = ruralProjectcontentinfo.getFileOtherList();
+		List<ProjectTemplateInfo> attachmentList = disposeDataAttachment(fileAttachmentList);
+		List<ProjectTemplateInfo> gistList = disposeDataAttachment(gistdataList);
+		List<ProjectTemplateInfo> otherList = disposeDataAttachment(otherAttachMentList);
+		ruralProjectcontentinfo.setFileAttachmentList(attachmentList);
+		ruralProjectcontentinfo.setFileGistdataList(gistList);
+		ruralProjectcontentinfo.setFileOtherList(otherList);
+	}
+
+	public List<ProjectTemplateInfo> disposeDataAttachment(List<ProjectTemplateInfo> fileAttachmentList){
+		List<ProjectTemplateInfo> list = Lists.newArrayList();
+		for (ProjectTemplateInfo info: fileAttachmentList) {
+			info.getParent().setId("0");
+			info.setParentIds("0,");
+			info.setFlag(0);
+			list.add(info);
+			//处理附件信息
+			for (WorkClientAttachment attachment: info.getWorkAttachments()) {
+				ProjectTemplateInfo attach = new ProjectTemplateInfo();
+				ProjectTemplateInfo parent = new ProjectTemplateInfo();
+				parent.setId(info.getId());
+				attach.setId(attachment.getId());
+				attach.setParent(parent);
+				attach.setMustFlag(0);
+				attach.setParentIds("0,"+info.getId()+",");
+				attach.setFlag(1);
+				attach.setAttachName(attachment.getAttachmentName());
+				attach.setUrl(attachment.getUrl());
+				attach.setAttachTypes(attachment.getType());
+				list.add(attach);
+			}
+		}
+		return list;
+	}
+
+	@Transactional(readOnly = false)
+	public Map<String,List> getTemplateList(List<ProjectTemplateInfo> fileAttachmentList) {
+		Map map = new HashMap();
+		List<ProjectTemplateInfo> treeList = Lists.newArrayList();
+		for (int i = 0; i < fileAttachmentList.size(); i++) {
+			ProjectTemplateInfo parentData = fileAttachmentList.get(i);
+			parentData.setParentId("0");
+			parentData.setFlag(0);
+			treeList.add(parentData);
+			for (WorkClientAttachment info: parentData.getWorkAttachments()) {
+				ProjectTemplateInfo childrenData = new ProjectTemplateInfo();
+				childrenData.setParentId(parentData.getId());
+				childrenData.setId(info.getId());
+				childrenData.setMustFlag(0);
+				childrenData.setFlag(1);
+				childrenData.setAttachName(info.getAttachmentName());
+				childrenData.setUrl(info.getUrl());
+				childrenData.setAttachTypes(info.getType());
+				treeList.add(childrenData);
+			}
+		}
+		map.put("data",treeList);
+		return map;
+	}
 }

+ 1 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectRecordsController.java

@@ -833,6 +833,7 @@ public class RuralCostProjectRecordsController extends BaseController {
 		if (projectRecords!=null&&StringUtils.isNotBlank(projectRecords.getId())) {
 			projectRecords = projectRecordsService.getQueryProjectUsers(projectRecords.getId());
 			RuralProjectcontentinfo ruralProjectcontentinfo = projectRecordsService.formAccessory(projectRecords);
+			projectRecordsService.disposeData(ruralProjectcontentinfo);
 			model.addAttribute("projectcontentinfo", ruralProjectcontentinfo);
 			model.addAttribute("projectRecords", projectRecords);
 		}else {

+ 7 - 1
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageController.java

@@ -110,6 +110,8 @@ public class RuralProjectMessageController extends BaseController {
     private ProjectFilingbatchRelationDao projectFilingbatchRelationDao;
     @Autowired
     private ProjectFilingBatchDao projectFilingBatchDao;
+    @Autowired
+    private RuralProjectRecordsService ruralProjectRecordsService;
 
     private static byte[] SYN_BYTE = new byte[0];
 
@@ -253,6 +255,8 @@ public class RuralProjectMessageController extends BaseController {
                 }
 
             }
+
+        //projectRecordsService.disposeData(projectcontentinfo);
         /*}*/
         //查询总审人员信息
         List<User> auditUserList = userService.getAuditUserList();
@@ -525,7 +529,9 @@ public class RuralProjectMessageController extends BaseController {
                 }
 
             }
-        /*}*/
+        /*}*/projectcontent.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontent.getFileAttachmentList()));
+        projectcontent.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontent.getFileGistdataList()));
+        projectcontent.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontent.getFileOtherList()));
 
         //查询总审人员信息
         List<User> auditUserList = userService.getAuditUserList();

+ 52 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectRecordsController.java

@@ -17,6 +17,8 @@ import com.jeeplus.common.web.BaseController;
 import com.jeeplus.modules.act.entity.Act;
 import com.jeeplus.modules.act.service.ActTaskService;
 import com.jeeplus.modules.act.utils.ActUtils;
+import com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo;
+import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatch;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportRecord;
 import com.jeeplus.modules.projectcontentinfo.service.ProjectReportDataService;
@@ -919,6 +921,7 @@ public class RuralProjectRecordsController extends BaseController {
 		if (projectRecords!=null&&StringUtils.isNotBlank(projectRecords.getId())) {
 			projectRecords = projectRecordsService.getQueryProjectUsers(projectRecords.getId());
 			RuralProjectcontentinfo ruralProjectcontentinfo = projectRecordsService.formAccessory(projectRecords);
+			projectRecordsService.disposeData(ruralProjectcontentinfo);
 			model.addAttribute("projectcontentinfo", ruralProjectcontentinfo);
 			model.addAttribute("projectRecords", projectRecords);
 		}else {
@@ -926,4 +929,53 @@ public class RuralProjectRecordsController extends BaseController {
 		}
 		return "modules/ruralprojectrecords/projectAccessoryForm";
 	}
+
+
+	/**
+	 *查询成果文件树形信息
+	 */
+	@RequestMapping(value = "getOutcomeAccessoryInfo")
+	@ResponseBody
+	public Map<String,List> getOutcomeAccessoryInfo(RuralProjectRecords projectRecords) {
+		Map map =new HashMap();
+		if (projectRecords!=null&&StringUtils.isNotBlank(projectRecords.getId())) {
+			projectRecords = projectRecordsService.getQueryProjectUsers(projectRecords.getId());
+			RuralProjectcontentinfo ruralProjectcontentinfo = projectRecordsService.formAccessory(projectRecords);
+			List<ProjectTemplateInfo> fileAttachmentList = ruralProjectcontentinfo.getFileAttachmentList();
+			map = projectRecordsService.getTemplateList(fileAttachmentList);
+		}
+		return map;
+	}
+
+	/**
+	 *查询依据性文件树形信息
+	 */
+	@RequestMapping(value = "getGistAccessoryInfo")
+	@ResponseBody
+	public Map<String,List> getGistAccessoryInfo(RuralProjectRecords projectRecords) {
+		Map map =new HashMap();
+		if (projectRecords!=null&&StringUtils.isNotBlank(projectRecords.getId())) {
+			projectRecords = projectRecordsService.getQueryProjectUsers(projectRecords.getId());
+			RuralProjectcontentinfo ruralProjectcontentinfo = projectRecordsService.formAccessory(projectRecords);
+			List<ProjectTemplateInfo> fileAttachmentList = ruralProjectcontentinfo.getFileGistdataList();
+			map = projectRecordsService.getTemplateList(fileAttachmentList);
+		}
+		return map;
+	}
+
+	/**
+	 * 查询其他文件树形信息
+	 */
+	@RequestMapping(value = "getOtherAccessoryInfo")
+	@ResponseBody
+	public Map<String,List> getOtherAccessoryInfo(RuralProjectRecords projectRecords) {
+		Map map =new HashMap();
+		if (projectRecords!=null&&StringUtils.isNotBlank(projectRecords.getId())) {
+			projectRecords = projectRecordsService.getQueryProjectUsers(projectRecords.getId());
+			RuralProjectcontentinfo ruralProjectcontentinfo = projectRecordsService.formAccessory(projectRecords);
+			List<ProjectTemplateInfo> fileAttachmentList = ruralProjectcontentinfo.getFileOtherList();
+			map = projectRecordsService.getTemplateList(fileAttachmentList);
+		}
+		return map;
+	}
 }

+ 32 - 20
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -40,8 +40,11 @@ import com.jeeplus.modules.projectAccessory.entity.ProjectAccessoryRelationInfo;
 import com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo;
 import com.jeeplus.modules.projectAccessory.service.ProjectAccessoryRelationService;
 import com.jeeplus.modules.projectAccessory.service.ProjectTemplateService;
+import com.jeeplus.modules.projectFilingBatch.dao.ProjectFilingBatchProInfoDao;
 import com.jeeplus.modules.projectFilingBatch.dao.ProjectFilingbatchRelationDao;
 import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatch;
+import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatchProInfo;
+import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatchTree;
 import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingbatchRelation;
 import com.jeeplus.modules.projectFilingBatch.service.ProjectFilingBatchService;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectContentData;
@@ -464,6 +467,8 @@ public class WorkProjectNotifyController extends BaseController {
 	private ProjectFilingbatchRelationDao projectFilingbatchRelationDao;
 	@Autowired
 	private WorkattachmentService workattachmentService;
+	@Autowired
+	private ProjectFilingBatchProInfoDao projectFilingBatchProInfoDao;
 
 	@ModelAttribute
 	public WorkProjectNotify get(@RequestParam(required=false) String id) {
@@ -1868,7 +1873,9 @@ public class WorkProjectNotifyController extends BaseController {
 
 						}
 					//}
-
+					projectcontentinfo.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
+					projectcontentinfo.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
+					projectcontentinfo.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));
 					projectcontentinfo.setHome("home");
 					model.addAttribute("processInstanceId",projectReportData.getProcessInstanceId());
 					model.addAttribute("projectId", projectcontentinfo.getProject().getId());
@@ -2083,6 +2090,9 @@ public class WorkProjectNotifyController extends BaseController {
 						}
 					//}
 
+					projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileAttachmentList()));
+					projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileGistdataList()));
+					projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileOtherList()));
 					model.addAttribute("projectReportRecord", projectReportRecord);
 					model.addAttribute("project", projectReportRecord.getReport().getProject());
 					if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
@@ -2734,31 +2744,33 @@ public class WorkProjectNotifyController extends BaseController {
 					//获取详细信息
 					List<RuralProjectRecords> ruralProjectRecordsList = new ArrayList<>();
 					List<ProjectFilingBatch> projectFilingBatches = projectFilingBatchService.findProjectIdByFiling(projectFilingBatch.getId());
+					//查询批次下所有数据
+					List<ProjectFilingBatchProInfo> attachmentList = projectFilingBatchProInfoDao.getListByFilingBatchId(projectFilingBatch.getId());
+
 					for (ProjectFilingBatch filingBatch : projectFilingBatches) {
 						RuralProjectRecords ruralProjectRecords = ruralProjectRecordsService.get(filingBatch.getProjectId());
 						ruralProjectRecords.setProjectReportNumber(filingBatch.getNumber());
 						ruralProjectRecords.setId(filingBatch.getRelationId());
 						ruralProjectRecords.setParentId("0");
 						ruralProjectRecordsList.add(ruralProjectRecords);
-						//获取子项目信息
-						Workattachment workattachmentInfo = new Workattachment();
-						workattachmentInfo.setAttachmentId(filingBatch.getProjectId());
-						workattachmentInfo.setDivIdType("_filingBatch");
-						//查询对应子项目数据
-						List<Workattachment> attachmentList = workattachmentService.findList(workattachmentInfo);
-						for (Workattachment attachment:attachmentList) {
-							//查询附件信息
-							RuralProjectRecords workattachment = new RuralProjectRecords();
-							//附件文件类型
-							workattachment.setProjectId(attachment.getRemarks());
-							//附件文件名称
-							workattachment.setProjectReportNumber(attachment.getAttachmentName());
-							//文件路径
-							workattachment.setUrl(attachment.getUrl());
-							//项目名称
-							workattachment.setFilingName("");
-							workattachment.setParentId(ruralProjectRecords.getId());
-							ruralProjectRecordsList.add(workattachment);
+
+						//项目名称不为空则进行所有项目的查询和处理
+						for (ProjectFilingBatchProInfo info: attachmentList) {
+							if(info.getProId().equals(filingBatch.getProjectId())){
+								RuralProjectRecords treeData = new RuralProjectRecords();
+								//将界面需要展示数据放入类中
+								//项目编号
+								treeData.setProjectId(info.getProInfoType());
+								//报告号
+								treeData.setProjectReportNumber(info.getProInfoName());
+								//项目名称
+								treeData.setFilingName("");
+								//案卷号
+								treeData.setBoxNum("");
+								treeData.setParentId(ruralProjectRecords.getId());
+								ruralProjectRecordsList.add(treeData);
+							}
+
 						}
 					}
 					List<ProjectFilingbatchRelation> projectFilingbatchRelations=projectFilingbatchRelationDao.getProjectRelation(projectFilingBatch.getId());

+ 39 - 0
src/main/resources/mappings/modules/projectGuidang/ProjectFilingBatchProInfoDao.xml

@@ -0,0 +1,39 @@
+<?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.projectFilingBatch.dao.ProjectFilingBatchProInfoDao">
+	<insert id="proInfoInsert">
+		insert into project_filingbatch_proinfo
+			(id,
+			 filing_batch,
+			 project_id,
+			 proInfo_type,
+			 proInfo_name)
+			 values
+			(#{id},
+			 #{proInfofilingBatch},
+			 #{proId},
+			 #{proInfoType},
+			 #{proInfoName}
+			 )
+	</insert>
+	<select id="findProInfo" resultType="com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatchProInfo">
+		select id As "id",
+			   filing_batch As "proInfofilingBatch",
+			   project_id AS "proId",
+			   proInfo_type AS "proInfoType",
+			   proInfo_name as "proInfoName"
+		from project_filingbatch_proinfo
+		where filing_batch=#{proInfofilingBatch} and project_id=#{proId}
+	</select>
+
+	<select id="getListByFilingBatchId" resultType="com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatchProInfo">
+		select id As "id",
+			   filing_batch As "proInfofilingBatch",
+			   project_id AS "proId",
+			   proInfo_type AS "proInfoType",
+			   proInfo_name as "proInfoName"
+		from project_filingbatch_proinfo
+		where filing_batch=#{filingBatchId}
+	</select>
+
+</mapper>

+ 7 - 8
src/main/webapp/webpage/modules/projectFilingBatch/projectFilingBatchAudit.jsp

@@ -305,17 +305,16 @@
 										<td class="hide">
 											<input id="projectFilingbatchRelations${index.index}_status" name="projectFilingbatchRelations[${index.index}].status" type="hidden" value=""/>
 										</td>
-										<td style="background-color: #f1f1f1;">
-											<div></div>
+										<td  style="background-color: #f1f1f1;">
 											<span class="treeTable-icon open" style="padding-left: 10px;"><i class="layui-icon layui-icon-triangle-d"></i></span>  ${project.projectId}
 <%--											<span style="padding-left: 10px;padding-right: 10px;float: left">-</span>${project.projectId}--%>
 <%--											<input style="cursor:Pointer" type="text" value="  -  ${project.projectId}" readonly="readonly"  class="form-control"/>--%>
 										</td>
 										<td>
-											<input id="projectFilingbatchRelations${index.index}_projectName" type="text" value="${project.projectName}" readonly="readonly"  class="form-control"/>
+											<input id="projectFilingbatchRelations${index.index}_projectName" type="text" value="${project.projectName}" readonly="readonly" style="text-align: center" class="form-control"/>
 										</td>
 										<td>
-											<input type="text" value="${project.projectReportNumber}" readonly="readonly"  class="form-control"/>
+											<input type="text" value="${project.projectReportNumber}" readonly="readonly" style="text-align: center" class="form-control"/>
 										</td>
 										<td>
 											<input id="projectFilingbatchRelations${index.index}_boxNum"  name="projectFilingbatchRelations[${index.index}].boxNum" maxlength="32" type="text" value="${projectFilingBatch.boxNum}"  class="form-control layui-input"/>
@@ -338,10 +337,10 @@
 											<input id="projectFilingbatchRelations${index.index}_parentId" type="hidden" value="${project.parentId}"/>
 										</td>
 										<td>
-											<input type="text" readonly value="${project.projectId}" style="text-align: center" class="form-control"/>
+											<input type="text" title="${project.projectId}" readonly value="${project.projectId}" style="text-align: center" class="form-control"/>
 										</td>
 										<td style="background-color: #f1f1f1;display:table-cell; vertical-align:middle;text-align: center">
-											<a class="attention-info" title="${project.projectReportNumber}" href="javascript:void(0);" onclick="preview('预览', '${project.url}','80%', '80%')">${project.projectReportNumber}</a>
+											<input type="text" title="${project.projectReportNumber}" readonly value="${project.projectReportNumber}" style="text-align: center" class="form-control"/>
 										</td>
 										<td>
 											<input type="text" readonly value="" class="form-control"/>
@@ -350,8 +349,8 @@
 										<td>
 											<input type="text" readonly value="" class="form-control"/>
 										</td>
-										<td style="background-color: #f1f1f1;display:table-cell; vertical-align:middle;text-align: center">
-											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${project.url}');" class="op-btn op-btn-add"> 下载 </a>
+										<td>
+											<input type="text" readonly value="" class="form-control"/>
 										</td>
 									</tr>
 								</c:otherwise>

+ 4 - 4
src/main/webapp/webpage/modules/projectFilingBatch/projectFilingBatchView.jsp

@@ -279,18 +279,18 @@
                 url: '${ctx}/projectFilingBatch/projectFilingBatchInfo/getFilingBatchById?id='+id,
                 page: false,
                 cols: [[
-                    {field: 'projectNum', title: '项目编号/文件类型',templet:function(d){
+                    {field: 'projectNum', title: '项目编号/审定单',templet:function(d){
                             if(0 == d.pid){
                                 return "<font style = 'font-size:14px;font-weight:500;'>"+d.projectNum+"</font>";
                             }else{
                                 return "<font>"+d.projectNum+"</font>";
                             }
                         }},
-                    {field: 'number', align:'center', title: '报告号/文件',templet:function(d){
+                    {field: 'number', align:'center', title: '报告号/文件描述',templet:function(d){
                             if(0 == d.pid){
                                 return "<font style = 'font-size:14px;font-weight:500;'>"+d.number+"</font>";
                             }else{
-                                return "<a class=\"attention-info\" title=\"" + d.number + "\" href=\"javascript:void(0);\" onclick=\"preview('预览', '"+d.url+"','80%', '80%')\">" + d.number + "</a>";
+                                return "<font>"+d.number+"</font>";
                             }
                         }},
                     {field: 'filingName', align:'center', title: '项目名称',templet:function(d){
@@ -311,7 +311,7 @@
                             if(0 == d.pid){
                                 return "<font style = 'font-size:14px;font-weight:500;'>"+d.statusStr+"</font>";
                             }else{
-                                return "<a href=\"javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('"+d.url+"');\" class=\"op-btn op-btn-add\"> 下载 </a>"
+                                return "<font></font>"
                             }
                         }}
                 ]],

+ 127 - 58
src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordAudit.jsp

@@ -5,6 +5,7 @@
 	<title>合同归档管理</title>
 	<meta name="decorator" content="default"/>
 	<link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
+	<%@include file="/webpage/include/treetable.jsp" %>
 	<script type="text/javascript">
         var validateForm;
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
@@ -37,6 +38,9 @@
             return false;
         }
         $(document).ready(function() {
+			$("#upTable").treeTable({expandLevel : 5},{ expandable: true });
+			$("#gistdata_upTable").treeTable({expandLevel : 5},{ expandable: true });
+			$("#upTable_other").treeTable({expandLevel : 5},{ expandable: true });
             validateForm = $("#inputForm").validate({
                 submitHandler: function(form){
                     loading('正在提交,请稍等...');
@@ -227,32 +231,52 @@
 				<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">
+					<table id="upTable" class="table table-bordered table-hover list-table">
 						<thead>
 						<tr>
-								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
-							<th width="150px">操作</th>
+							<th width="40%">文件类型</th>
+							<th width="">文件名</th>
+							<th width="100px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_attachment">
 						<c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr>
-								<td style="display:none">${fileAttachment.id}</td>
-								<td>${fileAttachment.attachName}</td>
-								<td>${fileAttachment.attachLength}</td>
-								<td>${fileAttachment.attachTypes}</td>
-								<td>
-									<c:forEach items="${fileAttachment.workAttachments}" var = "workAttachment" varStatus="status">
-										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
-									</c:forEach>
+							<tr id="${fileAttachment.id}" pid="${fileAttachment.parent.id}">
+								<c:choose>
+									<c:when test="${fileAttachment.mustFlag == 1}">
+										<td><span style="color: red">* </span>${fileAttachment.attachName}</td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fileAttachment.flag == 0}">
+												<td>${fileAttachment.attachName}</td>
+											</c:when>
+											<c:otherwise>
+												<td></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td style="text-align:center;">
+									<c:choose>
+										<c:when test="${fileAttachment.flag == 0}">
+											${fileAttachment.attachLength}M;  ${fileAttachment.attachTypes}
+										</c:when>
+										<c:otherwise>
+											<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileAttachment.url}','90%','90%')">${fileAttachment.attachName} ; </a>
+										</c:otherwise>
+									</c:choose>
 								</td>
-								<td class="op-td">
+								<td class="op-td" style="text-align:center;">
 									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										<c:choose>
+											<c:when test="${fileAttachment.flag == 0}">
+												<a href="javascript:void(0)"  onclick="openBill3('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:when>
+											<c:otherwise>
+												<a href="javascript:void(0)"  onclick="openBill3('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileAttachment.parent.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:otherwise>
+										</c:choose>
 									</div>
 								</td>
 							</tr>
@@ -279,35 +303,57 @@
 				<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">
+					<table id="gistdata_upTable" class="table table-bordered table-hover list-table">
 						<thead>
 						<tr>
-								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
-							<th width="150px">操作</th>
+							<th width="40%">文件类型</th>
+							<th width="">文件名</th>
+							<th width="100px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_gistdata">
 						<c:forEach items="${projectReportRecord.fileGistdataList}" var = "fileGistdata" varStatus="status">
-							<tr>
+							<tr id="${fileGistdata.id}" pid="${fileGistdata.parent.id}">
 									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none">${fileGistdata.id}</td>
-								<td>${fileGistdata.attachName}</td>
-								<td>${fileGistdata.attachLength}</td>
-								<td>${fileGistdata.attachTypes}</td>
-								<td>
-									<c:forEach items="${fileGistdata.workAttachments}" var = "workAttachment" varStatus="status">
-										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
-									</c:forEach>
+								<c:choose>
+									<c:when test="${fileGistdata.mustFlag == 1}">
+										<td><span style="color: red">* </span>${fileGistdata.attachName}</td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fileGistdata.flag == 0}">
+												<td>${fileGistdata.attachName}</td>
+											</c:when>
+											<c:otherwise>
+												<td></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td style="text-align:center;">
+									<c:choose>
+										<c:when test="${fileGistdata.flag == 0}">
+											${fileGistdata.attachLength}M;  ${fileGistdata.attachTypes}
+										</c:when>
+										<c:otherwise>
+											<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileGistdata.url}','90%','90%')">${fileGistdata.attachName} ; </a>
+										</c:otherwise>
+									</c:choose>
 								</td>
-								<td class="op-td">
+								<td class="op-td"  style="text-align:center;">
 									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileGistdata.id}&projectId=${project.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										<c:choose>
+											<c:when test="${fileGistdata.flag == 0}">
+												<a href="javascript:void(0)"  onclick="openBill3('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileGistdata.id}&projectId=${project.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:when>
+											<c:otherwise>
+												<a href="javascript:void(0)"  onclick="openBill3('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileGistdata.parent.id}&projectId=${project.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:otherwise>
+										</c:choose>
 									</div>
 								</td>
+								<td style="display:none">${fileGistdata.id}</td>
+								<td style="display:none">${fileGistdata.mustFlag}</td>
 							</tr>
 						</c:forEach>
 						</tbody>
@@ -332,35 +378,57 @@
 				<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">
+					<table id="upTable_other" class="table table-bordered table-hover list-table">
 						<thead>
 						<tr>
-								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
-							<th width="150px">操作</th>
+							<th width="40%">文件类型</th>
+							<th width="">文件名</th>
+							<th width="100px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_other">
 						<c:forEach items="${projectReportRecord.fileOtherList}" var = "fileOther" varStatus="status">
-							<tr>
+							<tr id="${fileOther.id}" pid="${fileOther.parent.id}">
 									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none">${fileOther.id}</td>
-								<td>${fileOther.attachName}</td>
-								<td>${fileOther.attachLength}</td>
-								<td>${fileOther.attachTypes}</td>
-								<td>
-									<c:forEach items="${fileOther.workAttachments}" var = "workAttachment" varStatus="status">
-										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
-									</c:forEach>
+								<c:choose>
+									<c:when test="${fileOther.mustFlag == 1}">
+										<td><span style="color: red">* </span>${fileOther.attachName}</td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fileOther.flag == 0}">
+												<td>${fileOther.attachName}</td>
+											</c:when>
+											<c:otherwise>
+												<td></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td style="text-align:center;">
+									<c:choose>
+										<c:when test="${fileOther.flag == 0}">
+											${fileOther.attachLength}M;  ${fileOther.attachTypes}
+										</c:when>
+										<c:otherwise>
+											<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileOther.url}','90%','90%')">${fileOther.attachName} ; </a>
+										</c:otherwise>
+									</c:choose>
 								</td>
-								<td class="op-td">
+								<td class="op-td" style="text-align:center;">
 									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileOther.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										<c:choose>
+											<c:when test="${fileOther.flag == 0}">
+												<a href="javascript:void(0)"  onclick="openBill3('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileOther.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:when>
+											<c:otherwise>
+												<a href="javascript:void(0)"  onclick="openBill3('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileOther.parent.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:otherwise>
+										</c:choose>
 									</div>
 								</td>
+								<td style="display:none">${fileOther.id}</td>
+								<td style="display:none">${fileOther.mustFlag}</td>
 							</tr>
 						</c:forEach>
 						</tbody>
@@ -452,7 +520,7 @@
 <script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
 <script src="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.js" charset="utf-8"></script>
 <script>
-	function openBill2(title,url,width,height,target,formId,tableId){
+	function openBill3(title,url,width,height,target,formId,tableId){
 		var rows = $(this).parent().prevAll().length + 1;
 		var frameIndex = parent.layer.getFrameIndex(window.name);
 		var urls = url+"&index="+frameIndex;
@@ -484,14 +552,14 @@
 				inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
 				var $document = iframeWin.contentWindow.document;
 
-				formSubmit2($document,formId,index,tableId);
+				formSubmit3($document,formId,index,tableId);
 
 			},
 			cancel: function(index){
 			}
 		});
 	}
-	function formSubmit2($document,inputForm,index,tableId){
+	function formSubmit3($document,inputForm,index,tableId){
 
 		var validateForm = $($document.getElementById(inputForm)).validate({
 			submitHandler: function(form){
@@ -516,9 +584,10 @@
 					if(d.str.length>0){
 						parent.layer.msg(d.str,{icon:1});
 					}
-					$("#"+tableId).load(location.href + " #"+tableId);
+					//$("#"+tableId).load(location.href + " #"+tableId);
 					//关闭当前页
 					top.layer.close(index)
+					location.reload();
 				}
 			});
 		}

+ 10 - 10
src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectMessageLists.jsp

@@ -526,7 +526,7 @@
 							return "<a class=\"attention-info\" title=\"" + d.projectName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目信息', '${ctx}/subProject/subProject/view?id=" + d.id +"','95%', '95%')\">" + d.projectName + "</a>";
 						}
 						}},
-					{field: 'clientName', align:'center', title: '报告号',width:170,templet: function(d){
+					{field: 'projectReportNumber', align:'center', title: '报告号',width:170,templet: function(d){
 							if(0 == d.pid){
 								if(""!= d.projectReportNumber){
 									return "<a class=\"attention-info pid\" title=\"" + d.projectReportNumber + "\" href=\"javascript:void(0);\" onclick=\"openDialogReportView('查看报告信息', '${ctx}/ruralProject/ruralCostProjectMessage/modify?projectId=" + d.id + "&view=view&reportedId="+d.id+"','"+ d.id +"','95%', '95%')\">" + d.projectReportNumber + "</a>";
@@ -537,7 +537,7 @@
 								return "<font></font>";
 							}
 						}},
-                    {field: 'projectLeader', align:'center', title: '合同名称',width:180,templet: function(d){
+                    {field: 'contractName', align:'center', title: '合同名称',width:180,templet: function(d){
 							if(0 == d.pid){
 								if(""!= d.contractName){
 									return "<a class=\"attention-info pid\" title=\""+d.contractName+"\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看合同信息', '${ctx}/workcontractinfo/workContractInfo/lookForm?id=" + d.contractId + "','95%', '95%')\">" + d.contractName + "</a>";
@@ -548,28 +548,28 @@
 								return "<font></font>";
 							}
 						}},
-                    /*{field: 'projectLeader', align:'center', title: '案卷号',width:120,templet: function(d){
+                    /*{field: 'recodeNum', align:'center', title: '案卷号',width:120,templet: function(d){
 							if(0 == d.pid){
 								return "<a class=\"attention-info pid\" title=\"" + d.recodeNum + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看归档信息', '${ctx}/ruralProject/ruralProjectDownMessage/view?id=" + d.prrdId + "&view=view','95%', '95%')\">" + d.recodeNum + "</a>";
 							}else{
 								return "<font></font>";
 							}
 						}},*/
-                    {field: 'projectLeader', align:'center', title: '负责人',width:80,templet: function(d){
+                    {field: 'projectLeaders', align:'center', title: '负责人',width:80,templet: function(d){
 							if(0 == d.pid){
 								return "<font style = 'font-size:14px;'>"+d.projectLeaders+"</font>";
 							}else{
 								return "<font></font>";
 							}
 						}},
-                    {field: 'projectLeader', align:'center', title: '委托方',width:160,templet: function(d){
+                    {field: 'clientName', align:'center', title: '委托方',width:200,templet: function(d){
 							if(0 == d.pid){
 								return "<font style = 'font-size:14px;font-weight:500;'>"+d.clientName+"</font>";
 							}else{
 								return "<font></font>";
 							}
 						}},
-					{field: 'projectLeader', align:'center', title: '登记人',width:160,templet: function(d){
+					{field: 'projectRegistrant', align:'center', title: '登记人',width:80,templet: function(d){
 							if(0 == d.pid){
 								return "<font style = 'font-size:14px;font-weight:500;'>"+d.projectRegistrant+"</font>";
 							}else{
@@ -585,7 +585,7 @@
 								return "<font>"+layui.util.toDateString(date,'yyyy-MM-dd')+"</font>";
 							}
 						}},
-					{align:'center', title: '报告状态',  width:70,templet:function(d){
+					{align:'center', title: '报告',  width:70,templet:function(d){
 							var st = getAuditState(""+d.projectReportStatus);
 							if(d.pid ==0){
 								if(st.action)
@@ -597,7 +597,7 @@
 								return '';
 							}
 						}},
-					{align:'center', title: '线上归档状态',  width:70,templet:function(d){
+					{align:'center', title: '电子',  width:70,templet:function(d){
 							var st = getRuralProjectArchiveState(""+d.projectReportRecordStatus);
 							if(d.pid ==0){
 								if(st.action)
@@ -609,7 +609,7 @@
 								return '';
 							}
 						}},
-					{align:'center', title: '线下归档状态',  width:70,templet:function(d){
+					{align:'center', title: '批量',  width:70,templet:function(d){
 						var st = getRuralProjectArchiveState(""+d.filingProjectStatus);
 						if(d.pid ==0){
 							if(st.action)
@@ -621,7 +621,7 @@
 							return '';
 						}
 					}},
-					{align:'center', title: '上报状态',  width:90,templet:function(d){
+					{align:'center', title: '上报',  width:90,templet:function(d){
 							var st = getReportedState(""+d.reportedState);
 							if(d.pid ==0){
 								if(st.action)

+ 140 - 89
src/main/webapp/webpage/modules/ruralprojectrecords/projectAccessoryForm.jsp

@@ -4,6 +4,8 @@
 <head>
 	<title>报告详情管理</title>
 	<meta name="decorator" content="default"/>
+	<%--<link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />--%>
+	<%@include file="/webpage/include/treetable.jsp" %>
 	<style>
 		label.error{
 			top:40px;
@@ -29,6 +31,9 @@
             return false;
         }
         $(document).ready(function() {
+			$("#upTable").treeTable({expandLevel : 5},{ expandable: true });
+			$("#gistdata_upTable").treeTable({expandLevel : 5},{ expandable: true });
+			$("#upTable_other").treeTable({expandLevel : 5},{ expandable: true });
             validateForm = $("#inputForm").validate({
                 submitHandler: function(form){
                     loading('正在提交,请稍等...');
@@ -52,10 +57,10 @@
             });
             $("#attachment_btn").click(function () {
                 $("#attachment_file").click();
-            });;
+            });
             $("#gistdata_btn").click(function () {
                 $("#gistdata_file").click();
-            });;
+            });
             $("#other_btn").click(function () {
                 $("#other_file").click();
             });
@@ -121,7 +126,7 @@
                 multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, "0");
             }
         }
-        
+
         function selectNum() {
 			top.layer.open({
 				type: 2,
@@ -404,43 +409,58 @@
 				<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">
+					<%--<table id="upTable" class="layui-table" lay-filter="permissionTable"></table>--%>
+					<table id="upTable" class="table table-bordered table-hover list-table">
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
-							<th width="150px">操作</th>
+							<th width="40%">文件类型</th>
+							<th width="">文件名</th>
+							<th width="100px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_attachment">
 						<c:forEach items="${projectcontentinfo.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr>
-								<td style="display:none">${fileAttachment.id}</td>
-								<td style="display:none">${fileAttachment.mustFlag}</td>
+							<tr id="${fileAttachment.id}" pid="${fileAttachment.parent.id}">
 								<c:choose>
 									<c:when test="${fileAttachment.mustFlag == 1}">
 										<td><span style="color: red">* </span>${fileAttachment.attachName}</td>
 									</c:when>
 									<c:otherwise>
-										<td>${fileAttachment.attachName}</td>
+										<c:choose>
+											<c:when test="${fileAttachment.flag == 0}">
+												<td>${fileAttachment.attachName}</td>
+											</c:when>
+											<c:otherwise>
+												<td></td>
+											</c:otherwise>
+										</c:choose>
 									</c:otherwise>
 								</c:choose>
-
-								<td>${fileAttachment.attachLength}</td>
-								<td>${fileAttachment.attachTypes}</td>
-								<td>
-									<c:forEach items="${fileAttachment.workAttachments}" var = "workAttachment" varStatus="status">
-										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
-									</c:forEach>
+								<td style="text-align:center;">
+									<c:choose>
+										<c:when test="${fileAttachment.flag == 0}">
+											${fileAttachment.attachLength}M;  ${fileAttachment.attachTypes}
+										</c:when>
+										<c:otherwise>
+											<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileAttachment.url}','90%','90%')">${fileAttachment.attachName} ; </a>
+										</c:otherwise>
+									</c:choose>
 								</td>
-								<td class="op-td">
+								<td class="op-td" style="text-align:center;">
 									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										<c:choose>
+											<c:when test="${fileAttachment.flag == 0}">
+												<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:when>
+											<c:otherwise>
+												<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.parent.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:otherwise>
+										</c:choose>
 									</div>
 								</td>
+								<td style="display:none">${fileAttachment.id}</td>
+								<td style="display:none">${fileAttachment.mustFlag}</td>
 							</tr>
 						</c:forEach>
 						</tbody>
@@ -494,43 +514,58 @@
 				<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">
+					<table id="gistdata_upTable" class="table table-bordered table-hover list-table">
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
-							<th width="150px">操作</th>
+							<th width="40%">文件类型</th>
+							<th width="">文件名</th>
+							<th width="100px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_gistdata">
 						<c:forEach items="${projectcontentinfo.fileGistdataList}" var = "fileGistdata" varStatus="status">
-							<tr>
+							<tr id="${fileGistdata.id}" pid="${fileGistdata.parent.id}">
 									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none">${fileGistdata.id}</td>
-								<td style="display:none">${fileGistdata.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileGistdata.mustFlag == 1}">
-										<td><span style="color: red">* </span>${fileGistdata.attachName}</td>
-									</c:when>
-									<c:otherwise>
-										<td>${fileGistdata.attachName}</td>
-									</c:otherwise>
-								</c:choose>
-								<td>${fileGistdata.attachLength}</td>
-								<td>${fileGistdata.attachTypes}</td>
-								<td>
-									<c:forEach items="${fileGistdata.workAttachments}" var = "workAttachment" varStatus="status">
-										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
-									</c:forEach>
+										<c:choose>
+											<c:when test="${fileGistdata.mustFlag == 1}">
+												<td><span style="color: red">* </span>${fileGistdata.attachName}</td>
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${fileGistdata.flag == 0}">
+														<td>${fileGistdata.attachName}</td>
+													</c:when>
+													<c:otherwise>
+														<td></td>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+								<td style="text-align:center;">
+									<c:choose>
+										<c:when test="${fileGistdata.flag == 0}">
+												${fileGistdata.attachLength}M;  ${fileGistdata.attachTypes}
+											</c:when>
+											<c:otherwise>
+												<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileGistdata.url}','90%','90%')">${fileGistdata.attachName} ; </a>
+										</c:otherwise>
+									</c:choose>
 								</td>
-								<td class="op-td">
+								<td class="op-td"  style="text-align:center;">
 									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										<c:choose>
+											<c:when test="${fileGistdata.flag == 0}">
+												<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:when>
+											<c:otherwise>
+												<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.parent.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:otherwise>
+										</c:choose>
 									</div>
 								</td>
+										<td style="display:none">${fileGistdata.id}</td>
+										<td style="display:none">${fileGistdata.mustFlag}</td>
 							</tr>
 						</c:forEach>
 						</tbody>
@@ -539,12 +574,6 @@
 			</div>
 			<script type="text/template" id="gistdataTpl">//<!--
                 <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="gistdataTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
                     <td style="text-align:center;">
                         {{row.attachName}}
                     </td>
@@ -562,6 +591,12 @@
 							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 						</div>
 					</td>
+                    <td class="hide">
+                        <input id="gistdataTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
+                    </td>
+                    <td class="hide">
+                        0
+                    </td>
                 </tr>//-->
 			</script>
 
@@ -583,43 +618,58 @@
 				<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">
+					<table id="upTable_other" class="table table-bordered table-hover list-table">
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
-							<th width="150px">操作</th>
+							<th width="40%">文件类型</th>
+							<th width="">文件名</th>
+							<th width="100px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_other">
 						<c:forEach items="${projectcontentinfo.fileOtherList}" var = "fileOther" varStatus="status">
-							<tr>
+							<tr id="${fileOther.id}" pid="${fileOther.parent.id}">
 									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none">${fileOther.id}</td>
-								<td style="display:none">${fileOther.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileOther.mustFlag == 1}">
-										<td><span style="color: red">* </span>${fileOther.attachName}</td>
-									</c:when>
-									<c:otherwise>
-										<td>${fileOther.attachName}</td>
-									</c:otherwise>
-								</c:choose>
-								<td>${fileOther.attachLength}</td>
-								<td>${fileOther.attachTypes}</td>
-								<td>
-									<c:forEach items="${fileOther.workAttachments}" var = "workAttachment" varStatus="status">
-										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
-									</c:forEach>
-								</td>
-								<td class="op-td">
-									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
+										<c:choose>
+											<c:when test="${fileOther.mustFlag == 1}">
+												<td><span style="color: red">* </span>${fileOther.attachName}</td>
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${fileOther.flag == 0}">
+														<td>${fileOther.attachName}</td>
+													</c:when>
+													<c:otherwise>
+														<td></td>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+										<td style="text-align:center;">
+											<c:choose>
+												<c:when test="${fileOther.flag == 0}">
+													${fileOther.attachLength}M;  ${fileOther.attachTypes}
+												</c:when>
+												<c:otherwise>
+													<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileOther.url}','90%','90%')">${fileOther.attachName} ; </a>
+												</c:otherwise>
+											</c:choose>
+										</td>
+										<td class="op-td" style="text-align:center;">
+											<div class="op-btn-box" >
+												<c:choose>
+													<c:when test="${fileOther.flag == 0}">
+														<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+													</c:when>
+													<c:otherwise>
+														<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.parent.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+													</c:otherwise>
+												</c:choose>
+											</div>
+										</td>
+										<td style="display:none">${fileOther.id}</td>
+										<td style="display:none">${fileOther.mustFlag}</td>
 							</tr>
 						</c:forEach>
 						</tbody>
@@ -691,13 +741,13 @@
 				var $document = iframeWin.contentWindow.document;
 
 				formSubmit2($document,formId,index,tableId);
-
 			},
 			cancel: function(index){
 			},
 			end:function () {
-				var reviewFee = $("#reviewFee").val();
-				$("#"+tableId).load(location.href+"&reviewFee="+reviewFee + " #"+tableId);
+				//var reviewFee = $("#reviewFee").val();
+				//$("#"+tableId).load(location.href+"&reviewFee="+reviewFee + " #"+tableId);
+				//location.reload();
 			}
 		});
 	}
@@ -726,16 +776,17 @@
 					if(d.str.length>0){
 						parent.layer.msg(d.str,{icon:1});
 					}
-					var reviewFee = $("#reviewFee").val();
-					$("#"+tableId).load(location.href+"&reviewFee="+reviewFee + " #"+tableId);
+					//var reviewFee = $("#reviewFee").val();
+					//$("#"+tableId).load(location.href+"&reviewFee="+reviewFee + " #"+tableId);
 					//关闭当前页
-					top.layer.close(index)
+					top.layer.close(index);
+					//$("#gistdata_upTable").treeTable({expandLevel : 5},{ expandable: true });
+					location.reload();
 				}
 			});
 		}
 	}
 
-
 	//新增行方法
 	var fileAttachmentTpl = $("#fileAttachmentTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
 	var gistdataTpl = $("#gistdataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");

+ 139 - 55
src/main/webapp/webpage/modules/ruralprojectrecords/projectReportRecord/projectReportRecordView.jsp

@@ -5,6 +5,7 @@
 	<title>合同归档管理</title>
 	<meta name="decorator" content="default"/>
 	<link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
+	<%@include file="/webpage/include/treetable.jsp" %>
 	<style>
 		label.error:nth-child(2){
 			top:40px;
@@ -24,7 +25,26 @@
 		}
 	</style>
 	<script type="text/javascript">
-
+		$(document).ready(function() {
+			$("#upTable").treeTable({expandLevel : 5},{ expandable: true });
+			$("#gistdata_upTable").treeTable({expandLevel : 5},{ expandable: true });
+			$("#upTable_other").treeTable({expandLevel : 5},{ expandable: true });
+			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);
+					}
+				}
+			});
+		});
 	</script>
 </head>
 <body>
@@ -181,32 +201,52 @@
 			<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">
+				<table id="upTable" class="table table-bordered table-hover list-table">
 					<thead>
 					<tr>
-						<%-- <th>序号</th>--%>
-						<th>电子件名称</th>
-						<th width="100px">最大容量(M)</th>
-						<th width="18%">类型限制</th>
-						<th>文件名</th>
-						<th width="150px">操作</th>
+						<th width="40%">文件类型</th>
+						<th width="">文件名</th>
+						<th width="100px">操作</th>
 					</tr>
 					</thead>
 					<tbody id="file_attachment">
 					<c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-						<tr>
-							<td style="display:none">${fileAttachment.id}</td>
-							<td>${fileAttachment.attachName}</td>
-							<td>${fileAttachment.attachLength}</td>
-							<td>${fileAttachment.attachTypes}</td>
-							<td>
-								<c:forEach items="${fileAttachment.workAttachments}" var = "workAttachment" varStatus="status">
-									<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
-								</c:forEach>
+						<tr id="${fileAttachment.id}" pid="${fileAttachment.parent.id}">
+							<c:choose>
+								<c:when test="${fileAttachment.mustFlag == 1}">
+									<td><span style="color: red">* </span>${fileAttachment.attachName}</td>
+								</c:when>
+								<c:otherwise>
+									<c:choose>
+										<c:when test="${fileAttachment.flag == 0}">
+											<td>${fileAttachment.attachName}</td>
+										</c:when>
+										<c:otherwise>
+											<td></td>
+										</c:otherwise>
+									</c:choose>
+								</c:otherwise>
+							</c:choose>
+							<td style="text-align:center;">
+								<c:choose>
+									<c:when test="${fileAttachment.flag == 0}">
+										${fileAttachment.attachLength}M;  ${fileAttachment.attachTypes}
+									</c:when>
+									<c:otherwise>
+										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileAttachment.url}','90%','90%')">${fileAttachment.attachName} ; </a>
+									</c:otherwise>
+								</c:choose>
 							</td>
-							<td class="op-td">
+							<td class="op-td" style="text-align:center;">
 								<div class="op-btn-box" >
-									<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+									<c:choose>
+										<c:when test="${fileAttachment.flag == 0}">
+											<a href="javascript:void(0)"  onclick="openBill3('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										</c:when>
+										<c:otherwise>
+											<a href="javascript:void(0)"  onclick="openBill3('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileAttachment.parent.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										</c:otherwise>
+									</c:choose>
 								</div>
 							</td>
 						</tr>
@@ -230,35 +270,57 @@
 			<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">
+				<table id="gistdata_upTable" class="table table-bordered table-hover list-table">
 					<thead>
 					<tr>
-						<%-- <th>序号</th>--%>
-						<th>电子件名称</th>
-						<th width="100px">最大容量(M)</th>
-						<th width="18%">类型限制</th>
-						<th>文件名</th>
-						<th width="150px">操作</th>
+						<th width="40%">文件类型</th>
+						<th width="">文件名</th>
+						<th width="100px">操作</th>
 					</tr>
 					</thead>
 					<tbody id="file_gistdata">
 					<c:forEach items="${projectReportRecord.fileGistdataList}" var = "fileGistdata" varStatus="status">
-						<tr>
+						<tr id="${fileGistdata.id}" pid="${fileGistdata.parent.id}">
 								<%-- <td>${status.index + 1}</td>--%>
-							<td style="display:none">${fileGistdata.id}</td>
-							<td>${fileGistdata.attachName}</td>
-							<td>${fileGistdata.attachLength}</td>
-							<td>${fileGistdata.attachTypes}</td>
-							<td>
-								<c:forEach items="${fileGistdata.workAttachments}" var = "workAttachment" varStatus="status">
-									<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
-								</c:forEach>
+							<c:choose>
+								<c:when test="${fileGistdata.mustFlag == 1}">
+									<td><span style="color: red">* </span>${fileGistdata.attachName}</td>
+								</c:when>
+								<c:otherwise>
+									<c:choose>
+										<c:when test="${fileGistdata.flag == 0}">
+											<td>${fileGistdata.attachName}</td>
+										</c:when>
+										<c:otherwise>
+											<td></td>
+										</c:otherwise>
+									</c:choose>
+								</c:otherwise>
+							</c:choose>
+							<td style="text-align:center;">
+								<c:choose>
+									<c:when test="${fileGistdata.flag == 0}">
+										${fileGistdata.attachLength}M;  ${fileGistdata.attachTypes}
+									</c:when>
+									<c:otherwise>
+										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileGistdata.url}','90%','90%')">${fileGistdata.attachName} ; </a>
+									</c:otherwise>
+								</c:choose>
 							</td>
-							<td class="op-td">
+							<td class="op-td"  style="text-align:center;">
 								<div class="op-btn-box" >
-									<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileGistdata.id}&projectId=${project.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+									<c:choose>
+										<c:when test="${fileGistdata.flag == 0}">
+											<a href="javascript:void(0)"  onclick="openBill3('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileGistdata.id}&projectId=${project.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										</c:when>
+										<c:otherwise>
+											<a href="javascript:void(0)"  onclick="openBill3('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileGistdata.parent.id}&projectId=${project.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										</c:otherwise>
+									</c:choose>
 								</div>
 							</td>
+							<td style="display:none">${fileGistdata.id}</td>
+							<td style="display:none">${fileGistdata.mustFlag}</td>
 						</tr>
 					</c:forEach>
 					</tbody>
@@ -280,35 +342,57 @@
 			<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">
+				<table id="upTable_other" class="table table-bordered table-hover list-table">
 					<thead>
 					<tr>
-						<%-- <th>序号</th>--%>
-						<th>电子件名称</th>
-						<th width="100px">最大容量(M)</th>
-						<th width="18%">类型限制</th>
-						<th>文件名</th>
-						<th width="150px">操作</th>
+						<th width="40%">文件类型</th>
+						<th width="">文件名</th>
+						<th width="100px">操作</th>
 					</tr>
 					</thead>
 					<tbody id="file_other">
 					<c:forEach items="${projectReportRecord.fileOtherList}" var = "fileOther" varStatus="status">
-						<tr>
+						<tr id="${fileOther.id}" pid="${fileOther.parent.id}">
 								<%-- <td>${status.index + 1}</td>--%>
-							<td style="display:none">${fileOther.id}</td>
-							<td>${fileOther.attachName}</td>
-							<td>${fileOther.attachLength}</td>
-							<td>${fileOther.attachTypes}</td>
-							<td>
-								<c:forEach items="${fileOther.workAttachments}" var = "workAttachment" varStatus="status">
-									<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
-								</c:forEach>
+							<c:choose>
+								<c:when test="${fileOther.mustFlag == 1}">
+									<td><span style="color: red">* </span>${fileOther.attachName}</td>
+								</c:when>
+								<c:otherwise>
+									<c:choose>
+										<c:when test="${fileOther.flag == 0}">
+											<td>${fileOther.attachName}</td>
+										</c:when>
+										<c:otherwise>
+											<td></td>
+										</c:otherwise>
+									</c:choose>
+								</c:otherwise>
+							</c:choose>
+							<td style="text-align:center;">
+								<c:choose>
+									<c:when test="${fileOther.flag == 0}">
+										${fileOther.attachLength}M;  ${fileOther.attachTypes}
+									</c:when>
+									<c:otherwise>
+										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileOther.url}','90%','90%')">${fileOther.attachName} ; </a>
+									</c:otherwise>
+								</c:choose>
 							</td>
-							<td class="op-td">
+							<td class="op-td" style="text-align:center;">
 								<div class="op-btn-box" >
-									<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileOther.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+									<c:choose>
+										<c:when test="${fileOther.flag == 0}">
+											<a href="javascript:void(0)"  onclick="openBill3('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileOther.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										</c:when>
+										<c:otherwise>
+											<a href="javascript:void(0)"  onclick="openBill3('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileOther.parent.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										</c:otherwise>
+									</c:choose>
 								</div>
 							</td>
+							<td style="display:none">${fileOther.id}</td>
+							<td style="display:none">${fileOther.mustFlag}</td>
 						</tr>
 					</c:forEach>
 					</tbody>

+ 126 - 52
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageAudit.jsp

@@ -5,6 +5,7 @@
 	<title>项目审批管理</title>
 	<meta name="decorator" content="default"/>
 	<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>
+	<%@include file="/webpage/include/treetable.jsp" %>
 	<script type="text/javascript">
         var validateForm;
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
@@ -29,6 +30,9 @@
             return false;
         }
         $(document).ready(function() {
+			$("#upTable").treeTable({expandLevel : 5},{ expandable: true });
+			$("#gistdata_upTable").treeTable({expandLevel : 5},{ expandable: true });
+			$("#upTable_other").treeTable({expandLevel : 5},{ expandable: true });
             validateForm = $("#inputForm").validate({
                 submitHandler: function(form){
                     loading('正在提交,请稍等...');
@@ -470,31 +474,52 @@
 				<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">
+					<table id="upTable" class="table table-bordered table-hover list-table">
 						<thead>
 						<tr>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
-							<th width="150px">操作</th>
+							<th width="40%">文件类型</th>
+							<th width="">文件名</th>
+							<th width="100px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_attachment">
 						<c:forEach items="${projectcontentinfo.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr>
-								<td style="display:none">${fileAttachment.id}</td>
-								<td>${fileAttachment.attachName}</td>
-								<td>${fileAttachment.attachLength}</td>
-								<td>${fileAttachment.attachTypes}</td>
-								<td>
-									<c:forEach items="${fileAttachment.workAttachments}" var = "workAttachment" varStatus="status">
-										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
-									</c:forEach>
+							<tr id="${fileAttachment.id}" pid="${fileAttachment.parent.id}">
+								<c:choose>
+									<c:when test="${fileAttachment.mustFlag == 1}">
+										<td><span style="color: red">* </span>${fileAttachment.attachName}</td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fileAttachment.flag == 0}">
+												<td>${fileAttachment.attachName}</td>
+											</c:when>
+											<c:otherwise>
+												<td></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td style="text-align:center;">
+									<c:choose>
+										<c:when test="${fileAttachment.flag == 0}">
+											${fileAttachment.attachLength}M;  ${fileAttachment.attachTypes}
+										</c:when>
+										<c:otherwise>
+											<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileAttachment.url}','90%','90%')">${fileAttachment.attachName} ; </a>
+										</c:otherwise>
+									</c:choose>
 								</td>
-								<td class="op-td">
+								<td class="op-td" style="text-align:center;">
 									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileAttachment.id}&projectId=${projectcontentinfo.project.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										<c:choose>
+											<c:when test="${fileAttachment.flag == 0}">
+												<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileAttachment.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:when>
+											<c:otherwise>
+												<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileAttachment.parent.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:otherwise>
+										</c:choose>
 									</div>
 								</td>
 							</tr>
@@ -517,33 +542,57 @@
 				<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">
+					<table id="gistdata_upTable" class="table table-bordered table-hover list-table">
 						<thead>
 						<tr>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
-							<th width="150px">操作</th>
+							<th width="40%">文件类型</th>
+							<th width="">文件名</th>
+							<th width="100px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_gistdata">
 						<c:forEach items="${projectcontentinfo.fileGistdataList}" var = "fileGistdata" varStatus="status">
-							<tr>
-								<td style="display:none">${fileGistdata.id}</td>
-								<td>${fileGistdata.attachName}</td>
-								<td>${fileGistdata.attachLength}</td>
-								<td>${fileGistdata.attachTypes}</td>
-								<td>
-									<c:forEach items="${fileGistdata.workAttachments}" var = "workAttachment" varStatus="status">
-										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
-									</c:forEach>
+							<tr id="${fileGistdata.id}" pid="${fileGistdata.parent.id}">
+									<%-- <td>${status.index + 1}</td>--%>
+										<c:choose>
+											<c:when test="${fileGistdata.mustFlag == 1}">
+												<td><span style="color: red">* </span>${fileGistdata.attachName}</td>
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${fileGistdata.flag == 0}">
+														<td>${fileGistdata.attachName}</td>
+													</c:when>
+													<c:otherwise>
+														<td></td>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+								<td style="text-align:center;">
+									<c:choose>
+										<c:when test="${fileGistdata.flag == 0}">
+											${fileGistdata.attachLength}M;  ${fileGistdata.attachTypes}
+										</c:when>
+										<c:otherwise>
+											<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileGistdata.url}','90%','90%')">${fileGistdata.attachName} ; </a>
+										</c:otherwise>
+									</c:choose>
 								</td>
-								<td class="op-td">
+								<td class="op-td"  style="text-align:center;">
 									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileGistdata.id}&projectId=${projectcontentinfo.project.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										<c:choose>
+											<c:when test="${fileGistdata.flag == 0}">
+												<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileGistdata.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:when>
+											<c:otherwise>
+												<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileGistdata.parent.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:otherwise>
+										</c:choose>
 									</div>
 								</td>
+								<td style="display:none">${fileGistdata.id}</td>
+								<td style="display:none">${fileGistdata.mustFlag}</td>
 							</tr>
 						</c:forEach>
 						</tbody>
@@ -564,33 +613,57 @@
 				<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">
+					<table id="upTable_other" class="table table-bordered table-hover list-table">
 						<thead>
 						<tr>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
-							<th width="150px">操作</th>
+							<th width="40%">文件类型</th>
+							<th width="">文件名</th>
+							<th width="100px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_other">
 						<c:forEach items="${projectcontentinfo.fileOtherList}" var = "fileOther" varStatus="status">
-							<tr>
-								<td style="display:none">${fileOther.id}</td>
-								<td>${fileOther.attachName}</td>
-								<td>${fileOther.attachLength}</td>
-								<td>${fileOther.attachTypes}</td>
-								<td>
-									<c:forEach items="${fileOther.workAttachments}" var = "workAttachment" varStatus="status">
-										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
-									</c:forEach>
+							<tr id="${fileOther.id}" pid="${fileOther.parent.id}">
+									<%-- <td>${status.index + 1}</td>--%>
+										<c:choose>
+											<c:when test="${fileOther.mustFlag == 1}">
+												<td><span style="color: red">* </span>${fileOther.attachName}</td>
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${fileOther.flag == 0}">
+														<td>${fileOther.attachName}</td>
+													</c:when>
+													<c:otherwise>
+														<td></td>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+								<td style="text-align:center;">
+									<c:choose>
+										<c:when test="${fileOther.flag == 0}">
+											${fileOther.attachLength}M;  ${fileOther.attachTypes}
+										</c:when>
+										<c:otherwise>
+											<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileOther.url}','90%','90%')">${fileOther.attachName} ; </a>
+										</c:otherwise>
+									</c:choose>
 								</td>
-								<td class="op-td">
+								<td class="op-td" style="text-align:center;">
 									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileOther.id}&projectId=${projectcontentinfo.project.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										<c:choose>
+											<c:when test="${fileOther.flag == 0}">
+												<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileOther.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:when>
+											<c:otherwise>
+												<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileOther.parent.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:otherwise>
+										</c:choose>
 									</div>
 								</td>
+								<td style="display:none">${fileOther.id}</td>
+								<td style="display:none">${fileOther.mustFlag}</td>
 							</tr>
 						</c:forEach>
 						</tbody>
@@ -686,9 +759,10 @@
 					if(d.str.length>0){
 						parent.layer.msg(d.str,{icon:1});
 					}
-					$("#"+tableId).load(location.href + " #"+tableId);
+					//$("#"+tableId).load(location.href + " #"+tableId);
 					//关闭当前页
 					top.layer.close(index)
+					location.reload();
 				}
 			});
 		}

+ 148 - 52
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageView.jsp

@@ -4,8 +4,37 @@
 <head>
 	<title>报告详情管理</title>
 	<meta name="decorator" content="default"/>
+	<%@include file="/webpage/include/treetable.jsp" %>
 	<script type="text/javascript">
-
+		$(document).ready(function() {
+			$("#upTable").treeTable({expandLevel : 5},{ expandable: true });
+			$("#gistdata_upTable").treeTable({expandLevel : 5},{ expandable: true });
+			$("#upTable_other").treeTable({expandLevel : 5},{ expandable: true });
+			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);
+					}
+				}
+			});
+			$("#attachment_btn").click(function () {
+				$("#attachment_file").click();
+			});
+			$("#gistdata_btn").click(function () {
+				$("#gistdata_file").click();
+			});
+			$("#other_btn").click(function () {
+				$("#other_file").click();
+			});
+		});
 	</script>
 </head>
 
@@ -360,31 +389,52 @@
 				<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">
+					<table id="upTable" class="table table-bordered table-hover list-table">
 						<thead>
 						<tr>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
-							<th width="150px">操作</th>
+							<th width="40%">文件类型</th>
+							<th width="">文件名</th>
+							<th width="100px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_attachment">
 						<c:forEach items="${projectcontentinfo.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr>
-								<td style="display:none">${fileAttachment.id}</td>
-								<td>${fileAttachment.attachName}</td>
-								<td>${fileAttachment.attachLength}</td>
-								<td>${fileAttachment.attachTypes}</td>
-								<td>
-									<c:forEach items="${fileAttachment.workAttachments}" var = "workAttachment" varStatus="status">
-										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
-									</c:forEach>
+							<tr id="${fileAttachment.id}" pid="${fileAttachment.parent.id}">
+								<c:choose>
+									<c:when test="${fileAttachment.mustFlag == 1}">
+										<td><span style="color: red">* </span>${fileAttachment.attachName}</td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fileAttachment.flag == 0}">
+												<td>${fileAttachment.attachName}</td>
+											</c:when>
+											<c:otherwise>
+												<td></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td style="text-align:center;">
+									<c:choose>
+										<c:when test="${fileAttachment.flag == 0}">
+											${fileAttachment.attachLength}M;  ${fileAttachment.attachTypes}
+										</c:when>
+										<c:otherwise>
+											<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileAttachment.url}','90%','90%')">${fileAttachment.attachName} ; </a>
+										</c:otherwise>
+									</c:choose>
 								</td>
-								<td class="op-td">
+								<td class="op-td" style="text-align:center;">
 									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileAttachment.id}&projectId=${projectcontentinfo.project.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										<c:choose>
+											<c:when test="${fileAttachment.flag == 0}">
+												<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileAttachment.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:when>
+											<c:otherwise>
+												<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileAttachment.parent.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:otherwise>
+										</c:choose>
 									</div>
 								</td>
 							</tr>
@@ -407,33 +457,57 @@
 				<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">
+					<table id="gistdata_upTable" class="table table-bordered table-hover list-table">
 						<thead>
 						<tr>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
-							<th width="150px">操作</th>
+							<th width="40%">文件类型</th>
+							<th width="">文件名</th>
+							<th width="100px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_gistdata">
 						<c:forEach items="${projectcontentinfo.fileGistdataList}" var = "fileGistdata" varStatus="status">
-							<tr>
-								<td style="display:none">${fileGistdata.id}</td>
-								<td>${fileGistdata.attachName}</td>
-								<td>${fileGistdata.attachLength}</td>
-								<td>${fileGistdata.attachTypes}</td>
-								<td>
-									<c:forEach items="${fileGistdata.workAttachments}" var = "workAttachment" varStatus="status">
-										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
-									</c:forEach>
+							<tr id="${fileGistdata.id}" pid="${fileGistdata.parent.id}">
+									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${fileGistdata.mustFlag == 1}">
+										<td><span style="color: red">* </span>${fileGistdata.attachName}</td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fileGistdata.flag == 0}">
+												<td>${fileGistdata.attachName}</td>
+											</c:when>
+											<c:otherwise>
+												<td></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td style="text-align:center;">
+									<c:choose>
+										<c:when test="${fileGistdata.flag == 0}">
+											${fileGistdata.attachLength}M;  ${fileGistdata.attachTypes}
+										</c:when>
+										<c:otherwise>
+											<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileGistdata.url}','90%','90%')">${fileGistdata.attachName} ; </a>
+										</c:otherwise>
+									</c:choose>
 								</td>
-								<td class="op-td">
+								<td class="op-td"  style="text-align:center;">
 									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${projectcontentinfo.project.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										<c:choose>
+											<c:when test="${fileGistdata.flag == 0}">
+												<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileGistdata.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:when>
+											<c:otherwise>
+												<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileGistdata.parent.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:otherwise>
+										</c:choose>
 									</div>
 								</td>
+								<td style="display:none">${fileGistdata.id}</td>
+								<td style="display:none">${fileGistdata.mustFlag}</td>
 							</tr>
 						</c:forEach>
 						</tbody>
@@ -454,31 +528,53 @@
 				<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">
+					<table id="upTable_other" class="table table-bordered table-hover list-table">
 						<thead>
 						<tr>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
-							<th width="150px">操作</th>
+							<th width="40%">文件类型</th>
+							<th width="">文件名</th>
+							<th width="100px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_other">
 						<c:forEach items="${projectcontentinfo.fileOtherList}" var = "fileOther" varStatus="status">
-							<tr>
-								<td style="display:none">${fileOther.id}</td>
-								<td>${fileOther.attachName}</td>
-								<td>${fileOther.attachLength}</td>
-								<td>${fileOther.attachTypes}</td>
-								<td>
-									<c:forEach items="${fileOther.workAttachments}" var = "workAttachment" varStatus="status">
-										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
-									</c:forEach>
+							<tr id="${fileOther.id}" pid="${fileOther.parent.id}">
+									<%-- <td>${status.index + 1}</td>--%>
+								<c:choose>
+									<c:when test="${fileOther.mustFlag == 1}">
+										<td><span style="color: red">* </span>${fileOther.attachName}</td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fileOther.flag == 0}">
+												<td>${fileOther.attachName}</td>
+											</c:when>
+											<c:otherwise>
+												<td></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td style="text-align:center;">
+									<c:choose>
+										<c:when test="${fileOther.flag == 0}">
+											${fileOther.attachLength}M;  ${fileOther.attachTypes}
+										</c:when>
+										<c:otherwise>
+											<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileOther.url}','90%','90%')">${fileOther.attachName} ; </a>
+										</c:otherwise>
+									</c:choose>
 								</td>
-								<td class="op-td">
+								<td class="op-td" style="text-align:center;">
 									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${projectcontentinfo.project.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										<c:choose>
+											<c:when test="${fileOther.flag == 0}">
+												<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileOther.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:when>
+											<c:otherwise>
+												<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileOther.parent.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:otherwise>
+										</c:choose>
 									</div>
 								</td>
 							</tr>

+ 148 - 51
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/reportView.jsp

@@ -4,8 +4,38 @@
 <head>
 	<title>报告详情管理</title>
 	<meta name="decorator" content="default"/>
+	<%@include file="/webpage/include/treetable.jsp" %>
 	<script type="text/javascript">
 
+		$(document).ready(function() {
+			$("#upTable").treeTable({expandLevel : 5},{ expandable: true });
+			$("#gistdata_upTable").treeTable({expandLevel : 5},{ expandable: true });
+			$("#upTable_other").treeTable({expandLevel : 5},{ expandable: true });
+			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);
+					}
+				}
+			});
+			$("#attachment_btn").click(function () {
+				$("#attachment_file").click();
+			});
+			$("#gistdata_btn").click(function () {
+				$("#gistdata_file").click();
+			});
+			$("#other_btn").click(function () {
+				$("#other_file").click();
+			});
+		});
 
 		function openDialogre(title,url,width,height,target,buttons) {
 
@@ -458,31 +488,52 @@
 			<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">
+				<table id="upTable" class="table table-bordered table-hover list-table">
 					<thead>
 					<tr>
-						<th>电子件名称</th>
-						<th width="100px">最大容量(M)</th>
-						<th width="18%">类型限制</th>
-						<th>文件名</th>
-						<th width="150px">操作</th>
+						<th width="40%">文件类型</th>
+						<th width="">文件名</th>
+						<th width="100px">操作</th>
 					</tr>
 					</thead>
 					<tbody id="file_attachment">
 					<c:forEach items="${projectcontentinfo.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-						<tr>
-							<td style="display:none">${fileAttachment.id}</td>
-							<td>${fileAttachment.attachName}</td>
-							<td>${fileAttachment.attachLength}</td>
-							<td>${fileAttachment.attachTypes}</td>
-							<td>
-								<c:forEach items="${fileAttachment.workAttachments}" var = "workAttachment" varStatus="status">
-									<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
-								</c:forEach>
+						<tr id="${fileAttachment.id}" pid="${fileAttachment.parent.id}">
+							<c:choose>
+								<c:when test="${fileAttachment.mustFlag == 1}">
+									<td><span style="color: red">* </span>${fileAttachment.attachName}</td>
+								</c:when>
+								<c:otherwise>
+									<c:choose>
+										<c:when test="${fileAttachment.flag == 0}">
+											<td>${fileAttachment.attachName}</td>
+										</c:when>
+										<c:otherwise>
+											<td></td>
+										</c:otherwise>
+									</c:choose>
+								</c:otherwise>
+							</c:choose>
+							<td style="text-align:center;">
+								<c:choose>
+									<c:when test="${fileAttachment.flag == 0}">
+										${fileAttachment.attachLength}M;  ${fileAttachment.attachTypes}
+									</c:when>
+									<c:otherwise>
+										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileAttachment.url}','90%','90%')">${fileAttachment.attachName} ; </a>
+									</c:otherwise>
+								</c:choose>
 							</td>
-							<td class="op-td">
+							<td class="op-td" style="text-align:center;">
 								<div class="op-btn-box" >
-									<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+									<c:choose>
+										<c:when test="${fileAttachment.flag == 0}">
+											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileAttachment.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										</c:when>
+										<c:otherwise>
+											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileAttachment.parent.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										</c:otherwise>
+									</c:choose>
 								</div>
 							</td>
 						</tr>
@@ -505,33 +556,57 @@
 			<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">
+				<table id="gistdata_upTable" class="table table-bordered table-hover list-table">
 					<thead>
 					<tr>
-						<th>电子件名称</th>
-						<th width="100px">最大容量(M)</th>
-						<th width="18%">类型限制</th>
-						<th>文件名</th>
-						<th width="150px">操作</th>
+						<th width="40%">文件类型</th>
+						<th width="">文件名</th>
+						<th width="100px">操作</th>
 					</tr>
 					</thead>
 					<tbody id="file_gistdata">
 					<c:forEach items="${projectcontentinfo.fileGistdataList}" var = "fileGistdata" varStatus="status">
-						<tr>
-							<td style="display:none">${fileGistdata.id}</td>
-							<td>${fileGistdata.attachName}</td>
-							<td>${fileGistdata.attachLength}</td>
-							<td>${fileGistdata.attachTypes}</td>
-							<td>
-								<c:forEach items="${fileGistdata.workAttachments}" var = "workAttachment" varStatus="status">
-									<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
-								</c:forEach>
+						<tr id="${fileGistdata.id}" pid="${fileGistdata.parent.id}">
+								<%-- <td>${status.index + 1}</td>--%>
+							<c:choose>
+								<c:when test="${fileGistdata.mustFlag == 1}">
+									<td><span style="color: red">* </span>${fileGistdata.attachName}</td>
+								</c:when>
+								<c:otherwise>
+									<c:choose>
+										<c:when test="${fileGistdata.flag == 0}">
+											<td>${fileGistdata.attachName}</td>
+										</c:when>
+										<c:otherwise>
+											<td></td>
+										</c:otherwise>
+									</c:choose>
+								</c:otherwise>
+							</c:choose>
+							<td style="text-align:center;">
+								<c:choose>
+									<c:when test="${fileGistdata.flag == 0}">
+										${fileGistdata.attachLength}M;  ${fileGistdata.attachTypes}
+									</c:when>
+									<c:otherwise>
+										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileGistdata.url}','90%','90%')">${fileGistdata.attachName} ; </a>
+									</c:otherwise>
+								</c:choose>
 							</td>
-							<td class="op-td">
+							<td class="op-td"  style="text-align:center;">
 								<div class="op-btn-box" >
-									<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileGistdata.id}&projectId=${project.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+									<c:choose>
+										<c:when test="${fileGistdata.flag == 0}">
+											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileGistdata.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										</c:when>
+										<c:otherwise>
+											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileGistdata.parent.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										</c:otherwise>
+									</c:choose>
 								</div>
 							</td>
+							<td style="display:none">${fileGistdata.id}</td>
+							<td style="display:none">${fileGistdata.mustFlag}</td>
 						</tr>
 					</c:forEach>
 					</tbody>
@@ -552,31 +627,53 @@
 			<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">
+				<table id="upTable_other" class="table table-bordered table-hover list-table">
 					<thead>
 					<tr>
-						<th>电子件名称</th>
-						<th width="100px">最大容量(M)</th>
-						<th width="18%">类型限制</th>
-						<th>文件名</th>
-						<th width="150px">操作</th>
+						<th width="40%">文件类型</th>
+						<th width="">文件名</th>
+						<th width="100px">操作</th>
 					</tr>
 					</thead>
 					<tbody id="file_other">
 					<c:forEach items="${projectcontentinfo.fileOtherList}" var = "fileOther" varStatus="status">
-						<tr>
-							<td style="display:none">${fileOther.id}</td>
-							<td>${fileOther.attachName}</td>
-							<td>${fileOther.attachLength}</td>
-							<td>${fileOther.attachTypes}</td>
-							<td>
-								<c:forEach items="${fileOther.workAttachments}" var = "workAttachment" varStatus="status">
-									<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
-								</c:forEach>
+						<tr id="${fileOther.id}" pid="${fileOther.parent.id}">
+								<%-- <td>${status.index + 1}</td>--%>
+							<c:choose>
+								<c:when test="${fileOther.mustFlag == 1}">
+									<td><span style="color: red">* </span>${fileOther.attachName}</td>
+								</c:when>
+								<c:otherwise>
+									<c:choose>
+										<c:when test="${fileOther.flag == 0}">
+											<td>${fileOther.attachName}</td>
+										</c:when>
+										<c:otherwise>
+											<td></td>
+										</c:otherwise>
+									</c:choose>
+								</c:otherwise>
+							</c:choose>
+							<td style="text-align:center;">
+								<c:choose>
+									<c:when test="${fileOther.flag == 0}">
+										${fileOther.attachLength}M;  ${fileOther.attachTypes}
+									</c:when>
+									<c:otherwise>
+										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileOther.url}','90%','90%')">${fileOther.attachName} ; </a>
+									</c:otherwise>
+								</c:choose>
 							</td>
-							<td class="op-td">
+							<td class="op-td" style="text-align:center;">
 								<div class="op-btn-box" >
-									<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileOther.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+									<c:choose>
+										<c:when test="${fileOther.flag == 0}">
+											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileOther.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										</c:when>
+										<c:otherwise>
+											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileOther.parent.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										</c:otherwise>
+									</c:choose>
 								</div>
 							</td>
 						</tr>

+ 11 - 11
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageLists.jsp

@@ -517,7 +517,7 @@
                 url: '${ctx}/ruralProject/ruralProjectMessage/getProjectList?projectId='+projectId+'&pageNo=${page.pageNo}&projectName='+projectName+'&leaderNameStr='+leaderNameStr+'&workContractInfo.name='+workContractInfoName+'&workContractInfo.client.name='+workContractInfoClientName+'&beginDate='+beginDate+'&endDate='+endDate+'&projectReportStatus='+projectReportStatus+'&projectReportRecordStatus='+projectReportRecordStatus+'&reportedState='+reportedState+'&projectType=1',
                 page: false,
                 cols: [[
-                    {type: 'numbers', align:'center', title: '序号' ,width:80},
+                    {type: 'numbers', align:'center', title: '序号' ,width:50},
                     {field: 'projectId', title: '项目编号/项目定义号',width:160},
                     {field: 'projectName', align:'center', title: '项目名称',width:200,templet:function(d){
                     	if(0 == d.pid){
@@ -526,7 +526,7 @@
 							return "<a class=\"attention-info\" title=\"" + d.projectName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目信息', '${ctx}/subProject/subProject/view?id=" + d.id +"','95%', '95%')\">" + d.projectName + "</a>";
 						}
 						}},
-					{field: 'clientName', align:'center', title: '报告号',width:170,templet: function(d){
+					{field: 'projectReportNumber', align:'center', title: '报告号',width:170,templet: function(d){
 							if(0 == d.pid){
 								if(""!= d.projectReportNumber){
 									return "<a class=\"attention-info pid\" title=\"" + d.projectReportNumber + "\" href=\"javascript:void(0);\" onclick=\"openDialogReportView('查看报告信息', '${ctx}/ruralProject/ruralProjectMessage/modify?projectId=" + d.id + "&view=view&reportedId="+d.id+"','"+ d.id +"','95%', '95%')\">" + d.projectReportNumber + "</a>";
@@ -537,7 +537,7 @@
 								return "<font></font>";
 							}
 						}},
-                    {field: 'projectLeader', align:'center', title: '合同名称',width:180,templet: function(d){
+                    {field: 'contractName', align:'center', title: '合同名称',width:180,templet: function(d){
 							if(0 == d.pid){
 								if(""!= d.contractName){
 									return "<a class=\"attention-info pid\" title=\""+d.contractName+"\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看合同信息', '${ctx}/workcontractinfo/workContractInfo/lookForm?id=" + d.contractId + "','95%', '95%')\">" + d.contractName + "</a>";
@@ -548,28 +548,28 @@
 								return "<font></font>";
 							}
 						}},
-                    /*{field: 'projectLeader', align:'center', title: '案卷号',width:120,templet: function(d){
+                    /*{field: 'recodeNum', align:'center', title: '案卷号',width:120,templet: function(d){
 							if(0 == d.pid){
 								return "<a class=\"attention-info pid\" title=\"" + d.recodeNum + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看归档信息', '${ctx}/ruralProject/ruralProjectDownMessage/view?id=" + d.prrdId + "&view=view','95%', '95%')\">" + d.recodeNum + "</a>";
 							}else{
 								return "<font></font>";
 							}
 						}},*/
-                    {field: 'projectLeader', align:'center', title: '负责人',width:80,templet: function(d){
+                    {field: 'projectLeaders', align:'center', title: '负责人',width:80,templet: function(d){
 							if(0 == d.pid){
 								return "<font style = 'font-size:14px;'>"+d.projectLeaders+"</font>";
 							}else{
 								return "<font></font>";
 							}
 						}},
-                    {field: 'projectLeader', align:'center', title: '委托方',width:160,templet: function(d){
+                    {field: 'clientName', align:'center', title: '委托方',width:200,templet: function(d){
 							if(0 == d.pid){
 								return "<font style = 'font-size:14px;font-weight:500;'>"+d.clientName+"</font>";
 							}else{
 								return "<font></font>";
 							}
 						}},
-					{field: 'projectLeader', align:'center', title: '登记人',width:160,templet: function(d){
+					{field: 'projectRegistrant', align:'center', title: '登记人',width:80,templet: function(d){
 							if(0 == d.pid){
 								return "<font style = 'font-size:14px;font-weight:500;'>"+d.projectRegistrant+"</font>";
 							}else{
@@ -585,7 +585,7 @@
 								return "<font>"+layui.util.toDateString(date,'yyyy-MM-dd')+"</font>";
 							}
 						}},
-					{align:'center', title: '报告状态',  width:70,templet:function(d){
+					{align:'center', title: '报告',  width:70,templet:function(d){
 							var st = getAuditState(""+d.projectReportStatus);
 							if(d.pid ==0){
 								if(st.action)
@@ -597,7 +597,7 @@
 								return '';
 							}
 						}},
-					{align:'center', title: '线上归档状态',  width:70,templet:function(d){
+					{align:'center', title: '电子',  width:70,templet:function(d){
 							var st = getRuralProjectArchiveState(""+d.projectReportRecordStatus);
 							if(d.pid ==0){
 								if(st.action)
@@ -609,7 +609,7 @@
 								return '';
 							}
 						}},
-					{align:'center', title: '线下归档状态',  width:70,templet:function(d){
+					{align:'center', title: '批量',  width:70,templet:function(d){
 							var st = getRuralProjectArchiveState(""+d.filingProjectStatus);
 							if(d.pid ==0){
 								if(st.action)
@@ -621,7 +621,7 @@
 								return '';
 							}
 						}},
-					{align:'center', title: '上报状态',  width:90,templet:function(d){
+					{align:'center', title: '上报',  width:90,templet:function(d){
 							var st = getReportedState(""+d.reportedState);
 							if(d.pid ==0){
 								if(st.action)