Ver código fonte

案例项目部分功能提交

徐滕 1 mês atrás
pai
commit
adf50d10fa
36 arquivos alterados com 2724 adições e 1068 exclusões
  1. 45 4
      src/main/java/com/jeeplus/modules/projectAccessory/service/ProjectTemplateService.java
  2. 51 0
      src/main/java/com/jeeplus/modules/projectEngineeringCaseBase/dao/ProjectEngineeringInfoCaseBaseDao.java
  3. 57 0
      src/main/java/com/jeeplus/modules/projectEngineeringCaseBase/entity/EngineeringCaseBaseTree.java
  4. 82 0
      src/main/java/com/jeeplus/modules/projectEngineeringCaseBase/entity/ProjectEngineeringCaseBaseInfo.java
  5. 209 0
      src/main/java/com/jeeplus/modules/projectEngineeringCaseBase/service/ProjectEngineeringCaseBaseService.java
  6. 129 0
      src/main/java/com/jeeplus/modules/projectEngineeringCaseBase/web/ProjectEngineeringCaseBaseController.java
  7. 3 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectReportDefectRecordController.java
  8. 74 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/ProjectCaseBaseAudit.java
  9. 4 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java
  10. 69 56
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectRecordsOwnCaseBaseController.java
  11. 20 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectViewController.java
  12. 2 0
      src/main/java/com/jeeplus/modules/sys/dao/AreaDao.java
  13. 4 0
      src/main/java/com/jeeplus/modules/sys/service/AreaService.java
  14. 32 0
      src/main/java/com/jeeplus/modules/sys/utils/UserUtils.java
  15. 52 0
      src/main/java/com/jeeplus/modules/sys/web/AreaController.java
  16. 9 0
      src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java
  17. 170 0
      src/main/resources/mappings/modules/projectEngineeringCaseBase/PeojectEngineeringCaseBaseDao.xml
  18. 40 4
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsOwnCaseBaseDao.xml
  19. 17 0
      src/main/resources/mappings/modules/sys/AreaDao.xml
  20. 105 0
      src/main/webapp/WEB-INF/tags/sys/treeselectProjectCityArea.tag
  21. 113 0
      src/main/webapp/webpage/modules/projectAccessory/projectEngineeringCaseBase/projectEngineeringCaseBaseForm.jsp
  22. 124 0
      src/main/webapp/webpage/modules/projectAccessory/projectEngineeringCaseBase/projectEngineeringCaseBaseList.jsp
  23. 262 200
      src/main/webapp/webpage/modules/projectcontentinfo/projectCaseBaseSupplementAudit.jsp
  24. 142 625
      src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordCaseBaseForm.jsp
  25. 872 0
      src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordCaseBaseView.jsp
  26. 4 0
      src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/projectRecordDescriptionVew2.jsp
  27. 3 0
      src/main/webapp/webpage/modules/ruralprojectrecords/subProjectInfo/subProjectInfoList.jsp
  28. 3 179
      src/main/webapp/webpage/modules/ruralprojectrecords/view/projectAccessoryView.jsp
  29. 6 0
      src/main/webapp/webpage/modules/ruralprojectrecords/view/projectPaperFilingView.jsp
  30. 3 0
      src/main/webapp/webpage/modules/ruralprojectrecords/view/projectPlanView.jsp
  31. 3 0
      src/main/webapp/webpage/modules/ruralprojectrecords/view/projectReportRecordView.jsp
  32. 3 0
      src/main/webapp/webpage/modules/ruralprojectrecords/view/reportIssueView.jsp
  33. 3 0
      src/main/webapp/webpage/modules/ruralprojectrecords/view/reportView.jsp
  34. 3 0
      src/main/webapp/webpage/modules/ruralprojectrecords/view/reportedView.jsp
  35. 3 0
      src/main/webapp/webpage/modules/ruralprojectrecords/view/ruralProjectRecordsView.jsp
  36. 3 0
      src/main/webapp/webpage/modules/ruralprojectrecords/view/workClientAndContractView.jsp

+ 45 - 4
src/main/java/com/jeeplus/modules/projectAccessory/service/ProjectTemplateService.java

@@ -754,6 +754,51 @@ public class ProjectTemplateService extends TreeService<ProjectTemplateDao, Proj
     }
 
     /**
+     * 文件展示数据处理
+     * @param mainDictDetails
+     * @param relateInfo
+     * @param engineeringId
+     * @param projectRecords
+     * @param projectcontentinfo
+     */
+    public void disposeProjectTemplateCaseBaseFile(List<MainDictDetail> mainDictDetails, ProjectAccessoryRelationInfo relateInfo,
+                                           String engineeringId, RuralProjectRecords projectRecords, ProjectReportRecord projectcontentinfo,String screenType){
+        //创建报告文件、依据性文件、其他文件必填列表以及数据父节点的value值集合
+
+        if("1000".equals(screenType) && "2".equals(projectRecords.getProjectType())){
+            BigDecimal submitScale = projectRecords.getSubmitScale();
+            // 送审金额大于等于1000万时
+            if(submitScale.compareTo(BigDecimal.valueOf(1000))!=-1){
+                relateInfo.setFlag(true);
+            }else {
+                relateInfo.setFlag(false);
+            }
+        }
+
+        List<String> mainDictValueList = Lists.newArrayList();
+        for (MainDictDetail mainDict : mainDictDetails) {
+            mainDictValueList.add(mainDict.getValue());
+        }
+        relateInfo.setAttachTypeList(mainDictValueList);
+        List<ProjectTemplateInfo> fileAttachmentMainDictList = this.getProjectTemplateViewList(relateInfo,screenType, projectRecords.getCaseStatus());
+        Map<String, List<ProjectTemplateInfo>> stringListMap = dataMessageParentAttachmentDispose(fileAttachmentMainDictList);
+        for (MainDictDetail mainDict : mainDictDetails) {
+            switch (mainDict.getValue()) {
+                case "14":	//案例文件
+                    if(org.apache.commons.lang3.StringUtils.isNotBlank(projectRecords.getCaseStatus()) && "5".equals(projectRecords.getCaseStatus())){
+                        for (String key: stringListMap.keySet()) {
+                            if(key.contains("14")){
+                                List<ProjectTemplateInfo> fileCaseBaseList = stringListMap.get(key);
+                                projectcontentinfo.setFileCaseBaseList(fileCaseBaseList);
+                            }
+                        }
+                    }
+                    break;
+            }
+        }
+    }
+
+    /**
      *
      * @param projectTemplateInfo
      * @return
@@ -789,10 +834,6 @@ public class ProjectTemplateService extends TreeService<ProjectTemplateDao, Proj
                     info.setWorkAttachments(attachments);
                 }
             }
-            if(info.getParentIds().equals("0,14,")){
-                System.out.println("213124512");
-
-            }
             //判断是否为必填项,若为必填项则添加必填判定字段
             if(null !=info.getRequiredStage() && (info.getRequiredStage() == projectTemplateInfo.getRequiredStage() || (null != projectTemplateInfo.getRequiredStageList() && projectTemplateInfo.getRequiredStageList().contains(info.getRequiredStage())))){
                 info.setMustFlag(1);

+ 51 - 0
src/main/java/com/jeeplus/modules/projectEngineeringCaseBase/dao/ProjectEngineeringInfoCaseBaseDao.java

@@ -0,0 +1,51 @@
+package com.jeeplus.modules.projectEngineeringCaseBase.dao;
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.TreeDao;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.projectEngineering.entity.ProjectEngineeringInfo;
+import com.jeeplus.modules.projectEngineeringCaseBase.entity.ProjectEngineeringCaseBaseInfo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Set;
+
+/**
+ * 工程类型
+ */
+@MyBatisDao
+public interface ProjectEngineeringInfoCaseBaseDao extends CrudDao<ProjectEngineeringCaseBaseInfo>, TreeDao<ProjectEngineeringCaseBaseInfo> {
+
+    /**
+     * 获取所有的父级信息
+     * @return
+     */
+    public List<ProjectEngineeringCaseBaseInfo> getParentAll();
+
+    /**
+     * 查询最大的序号
+     * @param parentId
+     * @return
+     */
+    String selectOrderNum(String parentId);
+
+    List<ProjectEngineeringCaseBaseInfo> fingIds(@Param("parentIdSet") Set<String> parentIdSet, @Param("companyId") String companyId);
+
+    /**
+     * 根据工程类型编号查询id
+     * @param indexNum
+     * @return
+     */
+    String getEngineeringId(String indexNum);
+
+    ProjectEngineeringCaseBaseInfo getProjectReportedType(String id);
+
+    List<ProjectEngineeringCaseBaseInfo> getProjectReportedTypeList(ProjectEngineeringCaseBaseInfo info);
+
+    /**
+     * 根据父节点id查询字节带你信息
+     * @param parentId
+     * @return
+     */
+    List<ProjectEngineeringCaseBaseInfo> getChildInfoList(String parentId);
+}

+ 57 - 0
src/main/java/com/jeeplus/modules/projectEngineeringCaseBase/entity/EngineeringCaseBaseTree.java

@@ -0,0 +1,57 @@
+package com.jeeplus.modules.projectEngineeringCaseBase.entity;
+
+import java.util.List;
+
+/**
+ * 工程类型树形实体类
+ */
+public class EngineeringCaseBaseTree {
+
+    private String title; //工程类型名称
+    private String id;  //工程类型Id
+    private String type; //是否有子集
+    private List<EngineeringCaseBaseTree> child;
+
+    private boolean isSpreadItem; //是否默认隐藏
+
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public List<EngineeringCaseBaseTree> getChild() {
+        return child;
+    }
+
+    public void setChild(List<EngineeringCaseBaseTree> child) {
+        this.child = child;
+    }
+
+    public boolean getIsSpreadItem() {
+        return isSpreadItem;
+    }
+
+    public void setIsSpreadItem(boolean spreadItem) {
+        isSpreadItem = spreadItem;
+    }
+}

+ 82 - 0
src/main/java/com/jeeplus/modules/projectEngineeringCaseBase/entity/ProjectEngineeringCaseBaseInfo.java

@@ -0,0 +1,82 @@
+package com.jeeplus.modules.projectEngineeringCaseBase.entity;
+
+import com.jeeplus.common.persistence.TreeEntity;
+
+/**
+ * 工程类型实体类
+ */
+public class ProjectEngineeringCaseBaseInfo extends TreeEntity<ProjectEngineeringCaseBaseInfo> {
+
+    private String engineeringName; //名称
+    private String indexNum;        //序号
+    private String parentIds;		// 所有父ID
+    private String parentId;		// 父ID
+    private String companyId;   //公司id
+    private String parentName;
+
+
+    public String getParentName() {
+        return parentName;
+    }
+
+    public void setParentName(String parentName) {
+        this.parentName = parentName;
+    }
+
+    public String getEngineeringName() {
+        return engineeringName;
+    }
+
+    public void setEngineeringName(String engineeringName) {
+        this.engineeringName = engineeringName;
+    }
+
+    public String getIndexNum() {
+        return indexNum;
+    }
+
+    public void setIndexNum(String indexNum) {
+        this.indexNum = indexNum;
+    }
+
+    @Override
+    public ProjectEngineeringCaseBaseInfo getParent() {
+        return parent;
+    }
+
+    @Override
+    public void setParent(ProjectEngineeringCaseBaseInfo parent) {
+        this.parent = parent;
+    }
+    public int getGrade(){
+        String[] split = this.getParentIds().split(",");
+        if ("0".equals(this.parent.id)){
+            return Integer.parseInt(this.parent.id);
+        }
+        return split.length-1;
+    }
+
+    public String getParentIds() {
+        return parentIds;
+    }
+
+    public void setParentIds(String parentIds) {
+        this.parentIds = parentIds;
+    }
+
+    public String getParentId() {
+        return parentId;
+    }
+
+    public void setParentId(String parentId) {
+        this.parentId = parentId;
+    }
+
+    public String getCompanyId() {
+        return companyId;
+    }
+
+    public void setCompanyId(String companyId) {
+        this.companyId = companyId;
+    }
+}

+ 209 - 0
src/main/java/com/jeeplus/modules/projectEngineeringCaseBase/service/ProjectEngineeringCaseBaseService.java

@@ -0,0 +1,209 @@
+package com.jeeplus.modules.projectEngineeringCaseBase.service;
+
+import com.google.common.collect.Lists;
+import com.jeeplus.common.service.TreeService;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.modules.projectEngineering.dao.ProjectEngineeringInfoDao;
+import com.jeeplus.modules.projectEngineering.entity.ProjectEngineeringInfo;
+import com.jeeplus.modules.projectEngineeringCaseBase.dao.ProjectEngineeringInfoCaseBaseDao;
+import com.jeeplus.modules.projectEngineeringCaseBase.entity.ProjectEngineeringCaseBaseInfo;
+import com.jeeplus.modules.sys.entity.Office;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.*;
+
+@Service
+@Transactional(readOnly = true)
+public class ProjectEngineeringCaseBaseService extends TreeService<ProjectEngineeringInfoCaseBaseDao, ProjectEngineeringCaseBaseInfo> {
+    @Autowired
+    private ProjectEngineeringInfoCaseBaseDao engineeringInfoDao;
+
+    public ProjectEngineeringCaseBaseInfo get(String id) {
+        return super.get(id);
+    }
+    private List<ProjectEngineeringCaseBaseInfo> fingIds(Set<String> parentIdSet, String companyId) {
+        return engineeringInfoDao.fingIds(parentIdSet,companyId);
+    }
+    /**
+     * 查询所有数据
+     * @param projectEngineeringInfo
+     * @return
+     */
+    public List<ProjectEngineeringCaseBaseInfo> findList(ProjectEngineeringCaseBaseInfo projectEngineeringInfo) {
+        List<ProjectEngineeringCaseBaseInfo> projectEngineeringInfoList = new ArrayList<>();
+        List<ProjectEngineeringCaseBaseInfo> listReturn = Lists.newArrayList();
+        //根据条件查询数据集合
+        List<ProjectEngineeringCaseBaseInfo> listAll = super.findList(projectEngineeringInfo);
+        Office company = UserUtils.getSelectCompany();
+        projectEngineeringInfo.setCompanyId(company.getId());
+        //判断,数据不为空则添加到返回集合中
+        if (listAll!=null && listAll.size()!=0){
+            projectEngineeringInfoList.addAll(listAll);
+        }
+
+        if(projectEngineeringInfoList!=null&&projectEngineeringInfoList.size()>0&&projectEngineeringInfo!=null&& (StringUtils.isNotBlank(projectEngineeringInfo.getEngineeringName())||StringUtils.isNotBlank(projectEngineeringInfo.getIndexNum()))){
+            //标准内容模糊查询,查询所有父节点
+            Set<String> parentIdSet = new HashSet<>();
+            for (ProjectEngineeringCaseBaseInfo engineeringInfo : projectEngineeringInfoList) {
+                String parentIds = engineeringInfo.getParentIds();
+                if (StringUtils.isNotBlank(parentIds)){
+                    parentIdSet.addAll(Arrays.asList(parentIds.split(",")));
+                }
+            }
+            for (ProjectEngineeringCaseBaseInfo engineeringInfo : projectEngineeringInfoList) {
+                parentIdSet.remove(engineeringInfo.getId());
+            }
+            projectEngineeringInfoList.addAll(0,this.fingIds(parentIdSet,"0"));
+            projectEngineeringInfoList.addAll(0,this.fingIds(parentIdSet,UserUtils.getSelectCompany().getId()));
+        }
+        sortList(listReturn,projectEngineeringInfoList,"0",true);
+        return listReturn;
+    }
+    public static void sortList(List<ProjectEngineeringCaseBaseInfo> list, List<ProjectEngineeringCaseBaseInfo> sourcelist, String parentId, boolean cascade){
+        for (int i=0; i<sourcelist.size(); i++){
+            ProjectEngineeringCaseBaseInfo e = sourcelist.get(i);
+            if (e.getParent()!=null && StringUtils.isNotBlank(e.getParent().getId()) && e.getParent().getId().equals(parentId)){
+                list.add(e);
+                if (cascade){
+                    // 判断是否还有子节点, 有则继续获取子节点
+                    for (int j=0; j<sourcelist.size(); j++){
+                        ProjectEngineeringCaseBaseInfo child = sourcelist.get(j);
+                        if (child.getParent()!=null && StringUtils.isNotBlank(child.getParent().getId()) && child.getParent().getId().equals(e.getId())){
+                            sortList(list, sourcelist, e.getId(), true);
+                            break;
+                        }
+                    }
+                }
+            }
+        }
+    }
+    /**
+     * 新增
+     * @param projectEngineeringInfo
+     */
+    @Transactional(readOnly = false)
+    public void save(ProjectEngineeringCaseBaseInfo projectEngineeringInfo) {
+        //设置序号
+        if(projectEngineeringInfo.getIsNewRecord()) {
+            projectEngineeringInfo.setParent(this.get(projectEngineeringInfo.getParent().getId()));
+            String orderNum = null;
+            //判断是否选择了父级节点。没有选择则默认为第一级别
+            if(null != projectEngineeringInfo.getParent()){
+                //添加数据
+                String parentids=projectEngineeringInfo.getParent().getParentIds();
+                projectEngineeringInfo.setParentIds(parentids+projectEngineeringInfo.getParent().getId()+",");
+                projectEngineeringInfo.setParentId(projectEngineeringInfo.getParent().getId());
+                orderNum = this.selectOrderNum(projectEngineeringInfo.getParent().getId());
+                projectEngineeringInfo.setCompanyId(UserUtils.getSelectCompany().getId());
+            }else{
+                //添加数据
+                projectEngineeringInfo.setParentIds("0,");
+                projectEngineeringInfo.setParentId("0");
+                orderNum = this.selectOrderNum("0");
+                if (null == orderNum){
+                    orderNum="0";
+                }
+                projectEngineeringInfo.setCompanyId("0");
+            }
+            //判断是否有数据,没有数据则默认给编号01,有则在最大数据上递增1
+            if (StringUtils.isBlank(orderNum)) {
+                projectEngineeringInfo.setIndexNum(projectEngineeringInfo.getParent().getIndexNum() + "01");
+            } else {
+                projectEngineeringInfo.setIndexNum(String.valueOf(Integer.valueOf(orderNum) + 1));
+            }
+        }
+        //根据条件进行新增或修改处理
+        if (StringUtils.isNotBlank(projectEngineeringInfo.getId())){
+            projectEngineeringInfo.preUpdate();
+            dao.update(projectEngineeringInfo);
+        }else{
+            projectEngineeringInfo.preInsert();
+            dao.insert(projectEngineeringInfo);
+        }
+    }
+
+    /**
+     * 获取所有父级信息
+     * @return
+     */
+    public List<ProjectEngineeringCaseBaseInfo> getParentInfo(){
+        return engineeringInfoDao.getParentAll();
+    }
+
+    /**
+     * 自动生成序号
+     * @param parentId
+     * @return
+     */
+    public String selectOrderNum(String parentId) {
+        return engineeringInfoDao.selectOrderNum(parentId);
+    }
+
+
+
+    /**
+     * 根据工程类型编号查询id
+     * @param indexNum
+     * @return
+     */
+    public String getEngineeringId(String indexNum){
+        return engineeringInfoDao.getEngineeringId(indexNum);
+    }
+
+    /**
+     * 查询上报项目类型信息
+     * @param id
+     * @return
+     */
+    public ProjectEngineeringCaseBaseInfo getProjectReportedType(String id) {
+        return engineeringInfoDao.getProjectReportedType(id);
+    }
+
+    /**
+     * 查询所有数据
+     * @param projectEngineeringInfo
+     * @return
+     */
+    public List<ProjectEngineeringCaseBaseInfo> getProjectReportedTypeList(ProjectEngineeringCaseBaseInfo projectEngineeringInfo) {
+        List<ProjectEngineeringCaseBaseInfo> projectEngineeringInfoList = new ArrayList<>();
+        List<ProjectEngineeringCaseBaseInfo> listReturn = Lists.newArrayList();
+        //根据条件查询数据集合
+        List<ProjectEngineeringCaseBaseInfo> listAll = engineeringInfoDao.getProjectReportedTypeList(projectEngineeringInfo);
+        Office company = UserUtils.getSelectCompany();
+        projectEngineeringInfo.setCompanyId(company.getId());
+        //判断,数据不为空则添加到返回集合中
+        if (listAll!=null && listAll.size()!=0){
+            projectEngineeringInfoList.addAll(listAll);
+        }
+
+        if(projectEngineeringInfoList!=null&&projectEngineeringInfoList.size()>0&&projectEngineeringInfo!=null&& (StringUtils.isNotBlank(projectEngineeringInfo.getEngineeringName())||StringUtils.isNotBlank(projectEngineeringInfo.getIndexNum()))){
+            //标准内容模糊查询,查询所有父节点
+            Set<String> parentIdSet = new HashSet<>();
+            for (ProjectEngineeringCaseBaseInfo engineeringInfo : projectEngineeringInfoList) {
+                String parentIds = engineeringInfo.getParentIds();
+                if (StringUtils.isNotBlank(parentIds)){
+                    parentIdSet.addAll(Arrays.asList(parentIds.split(",")));
+                }
+            }
+            for (ProjectEngineeringCaseBaseInfo engineeringInfo : projectEngineeringInfoList) {
+                parentIdSet.remove(engineeringInfo.getId());
+            }
+            projectEngineeringInfoList.addAll(0,this.fingIds(parentIdSet,"0"));
+            projectEngineeringInfoList.addAll(0,this.fingIds(parentIdSet,UserUtils.getSelectCompany().getId()));
+        }
+        sortList(listReturn,projectEngineeringInfoList,"0",true);
+        return listReturn;
+    }
+
+    /**
+     * 根据父节点id查询子节点信息
+     * @param parentId
+     * @return
+     */
+    public List<ProjectEngineeringCaseBaseInfo> getChildInfoList(String parentId) {
+        return engineeringInfoDao.getChildInfoList(parentId);
+    }
+}

+ 129 - 0
src/main/java/com/jeeplus/modules/projectEngineeringCaseBase/web/ProjectEngineeringCaseBaseController.java

@@ -0,0 +1,129 @@
+package com.jeeplus.modules.projectEngineeringCaseBase.web;
+
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.utils.MyBeanUtils;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.projectEngineeringCaseBase.entity.ProjectEngineeringCaseBaseInfo;
+import com.jeeplus.modules.projectEngineeringCaseBase.service.ProjectEngineeringCaseBaseService;
+import org.apache.shiro.authz.annotation.Logical;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 工程类型
+ *
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/projectEngineeringCaseBase/projectEngineeringCaseBase")
+public class ProjectEngineeringCaseBaseController extends BaseController {
+    @Autowired
+    private ProjectEngineeringCaseBaseService engineeringService;
+
+    @ModelAttribute
+    public ProjectEngineeringCaseBaseInfo get(@RequestParam(required=false) String id) {
+        ProjectEngineeringCaseBaseInfo entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = engineeringService.get(id);
+        }
+        if (entity == null){
+            entity = new ProjectEngineeringCaseBaseInfo();
+        }
+        return entity;
+    }
+
+    /**
+     * 工程类型列表
+     * @param projectEngineeringInfo
+     * @param model
+     * @return
+     */
+    @RequiresPermissions("projectEngineeringCaseBase:projectEngineeringCaseBase:list")
+    @RequestMapping(value = {"list", ""})
+    public String list(ProjectEngineeringCaseBaseInfo projectEngineeringInfo, HttpServletRequest request, HttpServletResponse response, Model model) {
+        //进行查询之后进行任何操作,返回还是查询之后的数据页面
+        if (StringUtils.isNotBlank(projectEngineeringInfo.getToflag())){
+            request.getSession().removeAttribute("projectengineeringCaseBaseInfo");
+            ProjectEngineeringCaseBaseInfo search=projectEngineeringInfo;
+            request.getSession().setAttribute("projectengineeringCaseBaseInfo",search);
+        }else{
+            if (request.getSession().getAttribute("projectengineeringCaseBaseInfo")!=null){
+                projectEngineeringInfo= (ProjectEngineeringCaseBaseInfo) request.getSession().getAttribute("projectengineeringCaseBaseInfo");
+                model.addAttribute("projectengineeringCaseBaseInfo", projectEngineeringInfo);
+            }
+        }
+        List<ProjectEngineeringCaseBaseInfo> list = engineeringService.findList(projectEngineeringInfo);
+        model.addAttribute("list", list);
+        model.addAttribute("projectengineeringCaseBaseInfo", projectEngineeringInfo);
+        return "modules/projectAccessory/projectEngineeringCaseBase/projectEngineeringCaseBaseList";
+    }
+    /**
+     * 查看,增加,编辑工程类型表单页面
+     * @param projectEngineeringInfo
+     * @param model
+     * @return
+     */
+    @RequiresPermissions(value={"projectEngineeringCaseBase:projectEngineeringCaseBase:add","projectEngineeringCaseBase:projectEngineeringCaseBase:edit"},logical= Logical.OR)
+    @RequestMapping(value = "form")
+    public String form(ProjectEngineeringCaseBaseInfo projectEngineeringInfo, Model model) {
+
+        //获取所有父级工程类型
+        List<ProjectEngineeringCaseBaseInfo> parentInfos=engineeringService.getParentInfo();
+        model.addAttribute("parentInfos", parentInfos);
+        if(projectEngineeringInfo!=null&&projectEngineeringInfo.getParent()!=null&&StringUtils.isNotBlank(projectEngineeringInfo.getParent().getId())){
+            ProjectEngineeringCaseBaseInfo parent = engineeringService.get(projectEngineeringInfo.getParent().getId());
+            model.addAttribute("parent", parent);
+        }
+        model.addAttribute("projectengineeringCaseBaseInfo", projectEngineeringInfo);
+        return "modules/projectAccessory/projectEngineeringCaseBase/projectEngineeringCaseBaseForm";
+    }
+    /**
+     * 保存工程类型
+     * @param projectEngineeringInfo
+     * @param model
+     * @param redirectAttributes
+     * @return
+     * @throws Exception
+     */
+    @RequiresPermissions(value={"projectEngineeringCaseBase:projectEngineeringCaseBase:add","projectEngineeringCaseBase:projectEngineeringCaseBase:edit"},logical= Logical.OR)
+    @RequestMapping(value = "save")
+    public String save(ProjectEngineeringCaseBaseInfo projectEngineeringInfo, Model model, RedirectAttributes redirectAttributes) throws Exception{
+//        if (!beanValidator(model, projectEngineeringInfo)){
+//            return form(projectEngineeringInfo, model);
+//        }
+        if(!projectEngineeringInfo.getIsNewRecord()){//编辑表单保存
+            ProjectEngineeringCaseBaseInfo t = engineeringService.get(projectEngineeringInfo.getId());//从数据库取出记录的值
+            MyBeanUtils.copyBeanNotNull2Bean(projectEngineeringInfo, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+            engineeringService.save(t);//保存
+        }else{//新增表单保存
+            engineeringService.save(projectEngineeringInfo);//保存
+        }
+        addMessage(redirectAttributes, "保存成功");
+        return "redirect:"+ Global.getAdminPath()+"/projectEngineeringCaseBase/projectEngineeringCaseBase/?repage";
+    }
+    /**
+     * 删除工程类型
+     * @param projectEngineeringInfo
+     * @param redirectAttributes
+     * @return
+     */
+    @RequiresPermissions("projectEngineeringCaseBase:projectEngineeringCaseBase:del")
+    @RequestMapping(value = "delete")
+    public String delete(ProjectEngineeringCaseBaseInfo projectEngineeringInfo, RedirectAttributes redirectAttributes) {
+        engineeringService.delete(projectEngineeringInfo);
+        addMessage(redirectAttributes, "删除成功");
+        return "redirect:"+Global.getAdminPath()+"/projectEngineeringCaseBase/projectEngineeringCaseBase/?repage";
+    }
+}
+
+

+ 3 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectReportDefectRecordController.java

@@ -468,6 +468,9 @@ public class ProjectReportDefectRecordController extends BaseController {
 //		materialDefectRecord.setHiatus(ruralProjectRecords.getHiatus());
 //		materialDefectRecord.setRemarks(ruralProjectRecords.getRemarks());
 
+		//查询项目是否时案例项目
+		ruralProjectRecords = projectRecordsService.getCaseBaseByProjectId(ruralProjectRecords);
+
 		model.addAttribute("ruralProjectRecords", ruralProjectRecords);
 		model.addAttribute("materialDefectRecord", materialDefectRecord);
 //		model.addAttribute("project", materialDefectRecord.getReport().getProject());

+ 74 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/ProjectCaseBaseAudit.java

@@ -2,8 +2,10 @@ package com.jeeplus.modules.ruralprojectrecords.entity;
 
 import com.jeeplus.common.persistence.ActEntity;
 import com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo;
+import com.jeeplus.modules.sys.entity.Area;
 import com.jeeplus.modules.sys.entity.Office;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -19,6 +21,14 @@ public class ProjectCaseBaseAudit extends ActEntity<ProjectCaseBaseAudit> {
     private Office office;
     private String home;
     private String selectedIds; //被选中同步的附件id集合
+    private String projectDomain; //工程领域
+    private String engineeringType; //工程类型
+    private Date startDate; //工程建设开始日期
+    private Date endDate; //工程建设结束日期
+    private Area area;		// 项目所在地
+    private String province;  //项目所在省
+    private String city;  //项目所在市
+    private String county;//项目所在区
 
     public String getProjectId() {
         return projectId;
@@ -75,4 +85,68 @@ public class ProjectCaseBaseAudit extends ActEntity<ProjectCaseBaseAudit> {
     public void setSelectedIds(String selectedIds) {
         this.selectedIds = selectedIds;
     }
+
+    public String getProjectDomain() {
+        return projectDomain;
+    }
+
+    public void setProjectDomain(String projectDomain) {
+        this.projectDomain = projectDomain;
+    }
+
+    public String getEngineeringType() {
+        return engineeringType;
+    }
+
+    public void setEngineeringType(String engineeringType) {
+        this.engineeringType = engineeringType;
+    }
+
+    public Date getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(Date startDate) {
+        this.startDate = startDate;
+    }
+
+    public Date getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Date endDate) {
+        this.endDate = endDate;
+    }
+
+    public Area getArea() {
+        return area;
+    }
+
+    public void setArea(Area area) {
+        this.area = area;
+    }
+
+    public String getProvince() {
+        return province;
+    }
+
+    public void setProvince(String province) {
+        this.province = province;
+    }
+
+    public String getCity() {
+        return city;
+    }
+
+    public void setCity(String city) {
+        this.city = city;
+    }
+
+    public String getCounty() {
+        return county;
+    }
+
+    public void setCounty(String county) {
+        this.county = county;
+    }
 }

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

@@ -246,6 +246,10 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 
 	public RuralProjectRecords get(String id) {
 		RuralProjectRecords ruralProjectRecords = super.get(id);
+		if(null != ruralProjectRecords && null != ruralProjectRecords.getArea() && StringUtils.isNotBlank(ruralProjectRecords.getArea().getId())) {
+			Area area = areaService.get(ruralProjectRecords.getArea().getId());
+			ruralProjectRecords.setArea(area);
+		}
 		if (null !=ruralProjectRecords){
 			ruralProjectRecords.setUploadMode(uploadMode);
 			if(StringUtils.isNotBlank(ruralProjectRecords.getBelongingDepartment()) && "其他".equals(ruralProjectRecords.getBelongingDepartment())){

+ 69 - 56
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectRecordsOwnCaseBaseController.java

@@ -14,8 +14,11 @@ 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.ProjectTemplateService;
+import com.jeeplus.modules.projectEngineering.entity.EngineeringTree;
 import com.jeeplus.modules.projectEngineering.entity.ProjectEngineeringInfo;
 import com.jeeplus.modules.projectEngineering.service.ProjectEngineeringService;
+import com.jeeplus.modules.projectEngineeringCaseBase.entity.ProjectEngineeringCaseBaseInfo;
+import com.jeeplus.modules.projectEngineeringCaseBase.service.ProjectEngineeringCaseBaseService;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportDataTwo;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportRecord;
@@ -58,6 +61,7 @@ import org.activiti.engine.history.HistoricProcessInstance;
 import org.activiti.engine.runtime.ProcessInstance;
 import org.activiti.engine.task.Task;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.json.JSONArray;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
@@ -121,6 +125,8 @@ public class RuralProjectRecordsOwnCaseBaseController extends BaseController {
     private WorkattachmentService workattachmentService;
     @Autowired
     private KnowledgeSharingDetailsService knowledgeSharingDetailsService;
+    @Autowired
+    private ProjectEngineeringCaseBaseService engineeringCaseBaseService;
 
     private static byte[] SYN_BYTE = new byte[0];
 
@@ -221,15 +227,7 @@ public class RuralProjectRecordsOwnCaseBaseController extends BaseController {
         RuralProjectRecords ruralProjectRecords = projectRecordsService.get(projectReportRecord.getReportId());
         MyBeanUtils.copyBeanNotNull2Bean(ruralProjectRecords, projectRecords);
         ProjectReportData reportData = ruralProjectMessageService.getProjectReportDateByProjectId(projectReportRecord.getReportId());
-        if (StringUtils.isBlank(projectReportRecord.getView()) || !projectReportRecord.getView().equals("view")) {
-            if (StringUtils.isNotBlank(projectReportRecord.getReportId())) {
-                projectReportRecord = projectReportRecordService.getprojectReportRecord(reportData.getId());
-            }
-        }
 
-        //获取合同信息
-        WorkContractInfo projectContractInfo = ruralProjectMessageService.getProjectContractInfo(projectRecords.getWorkContractInfo().getId());
-        projectRecords.setWorkContractInfo(projectContractInfo);
         reportData.setProject(projectRecords);
         projectReportRecord.setReport(reportData);
         projectReportRecord.setUploadMode(uploadMode);
@@ -271,22 +269,29 @@ public class RuralProjectRecordsOwnCaseBaseController extends BaseController {
         //查询报告文件、依据性文件、其他文件必填列表以及数据
         List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
         //文件处理
-        projectTemplateService.disposeProjectTemplateFile(mainDictDetails, relateInfo, engineeringId, ruralProjectRecords, projectReportRecord, "1000");
+        projectTemplateService.disposeProjectTemplateCaseBaseFile(mainDictDetails, relateInfo, engineeringId, ruralProjectRecords, projectReportRecord, "1000");
+
+
 
         ProjectCaseBaseAudit projectCaseBaseAudit = service.getByProjectId(ruralProjectRecords.getId());
         if (null == projectCaseBaseAudit) {
             projectCaseBaseAudit = new ProjectCaseBaseAudit();
             projectCaseBaseAudit.setProjectId(ruralProjectRecords.getId());
+            projectCaseBaseAudit.setArea(ruralProjectRecords.getArea());
+            projectCaseBaseAudit.setProvince(ruralProjectRecords.getProvince());
+            projectCaseBaseAudit.setCity(ruralProjectRecords.getCity());
+        }
+        if (StringUtils.isBlank(projectCaseBaseAudit.getProjectDomain())) {
+            projectCaseBaseAudit.setProjectDomain("1");
         }
+        //获取工程类型
+        ProjectEngineeringCaseBaseInfo engineeringInfos=engineeringCaseBaseService.get(projectCaseBaseAudit.getEngineeringType());
+        model.addAttribute("engineeringInfo", engineeringInfos);
         model.addAttribute("projectCaseBaseAudit", projectCaseBaseAudit);
+        model.addAttribute("projectRecords", ruralProjectRecords);
 
-        if (null != projectContractInfo) {
-            if (projectContractInfo.getWorkClientInfoList().size() > 0) {
-                model.addAttribute("workClientInfoName", projectContractInfo.getWorkClientInfoList().get(0).getName());
-            }
-        }
         if (StringUtils.isNotBlank(projectReportRecord.getView()) && projectReportRecord.getView().equals("view")) {
-            return "modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordView";
+            return "modules/projectcontentinfo/projectReportRecordCaseBaseView";
         } else if (StringUtils.isNotBlank(projectReportRecord.getView()) && projectReportRecord.getView().equals("modiftApply")) {
             ProcessInstance processInstance = actTaskService.getProcIns(projectReportRecord.getProcessInstanceId());
             if (processInstance != null) {
@@ -306,7 +311,7 @@ public class RuralProjectRecordsOwnCaseBaseController extends BaseController {
     }
 
     /**
-     * 保存报告归档
+     * 暂存
      */
     @RequestMapping(value = "storeCaseBaseRecord")
     public String storeCaseBaseRecord(ProjectCaseBaseAudit projectCaseBaseAudit, Model model, RedirectAttributes redirectAttributes) throws Exception {
@@ -354,46 +359,6 @@ public class RuralProjectRecordsOwnCaseBaseController extends BaseController {
             service.save(projectCaseBaseAudit);//保存
         }
 
-
-        //对上传的文件进行同步到dify
-        //查询案例相关的文件
-        //获取案例类型参数
-        List<ProjectTemplateInfo> caseBaseProjectTemplateList = projectTemplateDao.getCaseBaseAccessoryListByParentId("14");
-        List<Workattachment> attachmentAllList = com.google.common.collect.Lists.newArrayList();
-        for (ProjectTemplateInfo projectTemplateInfo : caseBaseProjectTemplateList) {
-            //根据项目id和案例类型信息查询项目案例的所有项目
-            Workattachment workAttachment = new Workattachment();
-            workAttachment.setAttachmentId(projectTemplateInfo.getId());
-            workAttachment.setProjectId(ruralProjectRecords.getId());
-            workAttachment.setAttachmentFlag("100");
-            List<Workattachment> attachmentList = workattachmentService.getAttList(workAttachment);
-            for (Workattachment workattachment : attachmentList) {
-                workattachment.setProjectId("");
-                workattachment.setId("");
-                workattachment.setAttachmentName(ruralProjectRecords.getProjectReportNumber() + "-" + workattachment.getAttachmentName());
-            }
-            attachmentAllList.addAll(attachmentList);
-        }
-        if(attachmentAllList.size()>0){
-            //先根据id查询案例资料的知识库中是否存在数据,如果存在,则将其进行删除。
-            List<KnowledgeSharingInfo> byProjectId = knowledgeSharingDetailsService.getByProjectId(ruralProjectRecords.getId());
-            for (KnowledgeSharingInfo knowledgeSharingInfo : byProjectId) {
-                knowledgeSharingDetailsService.delete(knowledgeSharingInfo);
-            }
-
-            KnowledgeSharingInfo knowledgeSharingInfo = new KnowledgeSharingInfo();
-            knowledgeSharingInfo.setColumnId("10");
-            knowledgeSharingInfo.setSubject(ruralProjectRecords.getProjectName() + "案例资料文件");
-            knowledgeSharingInfo.setWorkAttachments(attachmentAllList);
-            knowledgeSharingInfo.setCreateBy(UserUtils.getUser());
-            knowledgeSharingInfo.setCreateDate(new Date());
-            knowledgeSharingInfo.setUpdateBy(UserUtils.getUser());
-            knowledgeSharingInfo.setUpdateDate(new Date());
-            knowledgeSharingInfo.setProjectId(ruralProjectRecords.getId());
-            knowledgeSharingDetailsService.save(knowledgeSharingInfo);
-            knowledgeSharingDetailsService.saveToDify(knowledgeSharingInfo, "1");
-        }
-
         if (StringUtils.isNotBlank(projectCaseBaseAudit.getHome()) && "home".equals(projectCaseBaseAudit.getHome())) {
             //修改代办状态
             workProjectNotifyService.updateCaseBaseNotifyStatus(ruralProjectRecords.getId(), "113");
@@ -951,4 +916,52 @@ public class RuralProjectRecordsOwnCaseBaseController extends BaseController {
         return consultantinfo;
     }
 
+
+    /**
+     * 查询其他文件树形信息
+     */
+    @RequestMapping(value = "engineeringTreeMenu")
+    @ResponseBody
+    public String engineeringTreeMenu(){
+        LinkedHashSet<EngineeringTree> trees=new LinkedHashSet<>();
+        LinkedHashSet<EngineeringTree> list = new LinkedHashSet<>();
+        EngineeringTree emptyInfo = new EngineeringTree();
+        emptyInfo.setId("");
+        emptyInfo.setTitle("请选择");
+        //查询所有工程分类
+        List<ProjectEngineeringCaseBaseInfo> engineeringInfos=engineeringCaseBaseService.findList(new ProjectEngineeringCaseBaseInfo());
+        childs(engineeringInfos,trees,"0");
+        list.add(emptyInfo);
+        list.addAll(trees);
+        JSONArray jsonArray=new JSONArray(list);
+        return jsonArray.toString();
+    }
+
+    public static void childs(List<ProjectEngineeringCaseBaseInfo> sourcelist,LinkedHashSet<EngineeringTree> list,String parentId){
+        for (int i=0; i<sourcelist.size(); i++){
+            ProjectEngineeringCaseBaseInfo e = sourcelist.get(i);
+            if (e.getParent()!=null && StringUtils.isNotBlank(e.getParent().getId()) && e.getParent().getId().equals(parentId)){
+                EngineeringTree tree=new EngineeringTree();
+                tree.setTitle(e.getEngineeringName());
+                tree.setId(e.getId());
+                // 判断是否还有子节点, 有则继续获取子节点
+                for (int j=0; j<sourcelist.size(); j++){
+                    ProjectEngineeringCaseBaseInfo child = sourcelist.get(j);
+                    if (child.getParent()!=null && StringUtils.isNotBlank(child.getParent().getId()) && child.getParent().getId().equals(e.getId())){
+                        tree.setType("group");
+                        tree.setIsSpreadItem(false);
+                        LinkedHashSet<EngineeringTree> childs=new LinkedHashSet<>();
+                        childs(sourcelist,childs, e.getId());
+                        List<EngineeringTree> childss=new ArrayList<>(childs);
+                        tree.setChild(childss);
+                        list.add(tree);
+                        break;
+                    }else{
+                        list.add(tree);
+                    }
+                }
+            }
+        }
+    }
+
 }

+ 20 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectViewController.java

@@ -128,6 +128,9 @@ public class RuralProjectViewController extends BaseController {
             long l2 = System.currentTimeMillis();
             System.out.println("查询项目信息方法时间l2-l1:" + (l2-l1));
 
+            //查询项目是否时案例项目
+            projectRecords = projectRecordsService.getCaseBaseByProjectId(projectRecords);
+
             //根据归属部门Id查询归属部门名称显示
             String belongingDepartmentName = projectRecordsService.getBelongingDepartmentNameByBelongingDepartment(projectRecords.getBelongingDepartment());
             model.addAttribute("belongingDepartmentName",belongingDepartmentName);
@@ -220,6 +223,8 @@ public class RuralProjectViewController extends BaseController {
         RuralProjectRecords projectRecords=new RuralProjectRecords();
         if (null!=projectId){
             projectRecords = projectRecordsService.get(projectId);
+            //查询项目是否时案例项目
+            projectRecords = projectRecordsService.getCaseBaseByProjectId(projectRecords);
             model.addAttribute("projectRecords", projectRecords);
         }
         workContractInfo = workContractInfoService.get(workContractInfo.getId());
@@ -557,6 +562,8 @@ public class RuralProjectViewController extends BaseController {
         //查询总审人员信息
         List<User> auditUserList = userService.getAuditUserList();
         ruralProjectRecords.setBzshbUserList(auditUserList);
+        //查询项目是否时案例项目
+        ruralProjectRecords = projectRecordsService.getCaseBaseByProjectId(ruralProjectRecords);
         //查询报告签发
         ProjectReportDataTwo projectReportDataTwo =projectReportDataTwoService.findTwoByProjectId(projectcontentinfo1.getProject().getId());
         model.addAttribute("processInstanceId",projectReportData.getProcessInstanceId());
@@ -621,6 +628,8 @@ public class RuralProjectViewController extends BaseController {
             projectRecords.setCreateBy(UserUtils.getUser());
             projectRecords.setCreateDate(new Date());
         }
+        //查询项目是否时案例项目
+        projectRecords = projectRecordsService.getCaseBaseByProjectId(projectRecords);
 
         ProjectPlanInfo projectPlanInfo = new ProjectPlanInfo();
         //将项目id放入项目计划表中
@@ -676,6 +685,8 @@ public class RuralProjectViewController extends BaseController {
         RuralProjectRecords projectRecords=new RuralProjectRecords();
         if (null!=reported.getProjectId()){
             projectRecords = projectRecordsService.get(reported.getProjectId());
+            //查询项目是否时案例项目
+            projectRecords = projectRecordsService.getCaseBaseByProjectId(projectRecords);
             model.addAttribute("projectRecords", projectRecords);
         }
         RuralProjectRecordsReported newReported = ruralProjectMessageService.getRuralProjectRecordsReported(reported.getProjectId());
@@ -727,8 +738,11 @@ public class RuralProjectViewController extends BaseController {
         RuralProjectRecords projectRecords=new RuralProjectRecords();
         if (null!=subProjectInfo.getParentProId()){
             projectRecords = projectRecordsService.get(subProjectInfo.getParentProId());
+            //查询项目是否时案例项目
+            projectRecords = projectRecordsService.getCaseBaseByProjectId(projectRecords);
             model.addAttribute("projectRecords", projectRecords);
         }
+
         //获取子项目信息
         Page<SubProjectInfo> page = subProjectInfoService.findPage(new Page<SubProjectInfo>(request, response), subProjectInfo);
 
@@ -803,6 +817,8 @@ public class RuralProjectViewController extends BaseController {
     @RequestMapping(value = "formRecordModify")
     public String formRecordModify(RuralProjectRecords projectRecords, Model model) {
         projectRecords = projectRecordsService.get(projectRecords.getId());
+        //查询项目是否时案例项目
+        projectRecords = projectRecordsService.getCaseBaseByProjectId(projectRecords);
         model.addAttribute("projectRecords", projectRecords);
         if (null != projectRecords) {
             if (StringUtils.isBlank(projectRecords.getPrrId())) {
@@ -1117,6 +1133,8 @@ public class RuralProjectViewController extends BaseController {
                 }
             }
         }
+        //查询项目是否时案例项目
+        ruralProjectRecords = projectRecordsService.getCaseBaseByProjectId(ruralProjectRecords);
         model.addAttribute("list", workReviewAudits);
         model.addAttribute("processInstanceId",projectReportDataTwo.getProcessInstanceId());
         model.addAttribute("projectReportData",projectReportData);
@@ -1157,6 +1175,8 @@ public class RuralProjectViewController extends BaseController {
     public String paperView(String projectId,String submitMoney, Model model) {
         RuralProjectRecords projectRecords=new RuralProjectRecords();
         projectRecords=ruralProjectRecordsService.get(projectId);
+        //查询项目是否时案例项目
+        projectRecords = projectRecordsService.getCaseBaseByProjectId(projectRecords);
         //B类项目查询信息
         if("1".equals(submitMoney)){
             List<RuralProjectRecords> ruralProjectRecordsList = new ArrayList<>();

+ 2 - 0
src/main/java/com/jeeplus/modules/sys/dao/AreaDao.java

@@ -27,6 +27,8 @@ public interface AreaDao extends TreeDao<Area> {
 
 	List<Area> getChildren(String parentId);
 
+	List<Area> findAllCityList(Area area);
+
     Area findAraeByid(String id);
 
 	List<Area> findAraeByParentId(String id);

+ 4 - 0
src/main/java/com/jeeplus/modules/sys/service/AreaService.java

@@ -35,6 +35,10 @@ public class AreaService extends TreeService<AreaDao, Area> {
 	public List<Area> findByArae(String areaName){
 		return UserUtils.getAreaListByname(areaName);
 	}
+	//根据地区名查找
+	public List<Area> findByAraeCity(String areaName){
+		return UserUtils.getAreaCityListByname(areaName);
+	}
 	//根据id查地区
 	public Area findArae(String pid){
 		return UserUtils.findAraeByid(pid);

+ 32 - 0
src/main/java/com/jeeplus/modules/sys/utils/UserUtils.java

@@ -85,6 +85,7 @@ public class UserUtils {
 	public static final String CACHE_COMPANY = "company_";
 	public static final String CACHE_MENU_LIST = "menuList";
 	public static final String CACHE_AREA_LIST = "areaList";
+	public static final String CACHE_AREA_CITY_LIST = "areaCityList";
 	public static final String CACHE_OFFICE_LIST = "officeList";
 	public static final String CACHE_OFFICE_ALL_LIST = "officeAllList";
 	public static final String CACHE_SELECT_ROLE = "selectRole";
@@ -274,6 +275,7 @@ public class UserUtils {
 		removeCache(CACHE_ROLE_LIST);
 		removeCache(CACHE_MENU_LIST);
 		removeCache(CACHE_AREA_LIST);
+		removeCache(CACHE_AREA_CITY_LIST);
 		removeCache(CACHE_OFFICE_LIST);
 		removeCache(CACHE_OFFICE_ALL_LIST);
 		removeCache(CACHE_SELECT_ROLE);
@@ -843,6 +845,20 @@ public class UserUtils {
 	 * 获取当前用户授权的区域
 	 * @return
 	 */
+	public static List<Area> getAreaCityList(){
+		@SuppressWarnings("unchecked")
+		//List<Area> areaList = (List<Area>)getCache(CACHE_AREA_CITY_LIST);
+		List<Area> areaList = null;
+		if (areaList == null){
+			areaList = areaDao.findAllCityList(new Area());
+			putCache(CACHE_AREA_CITY_LIST, areaList);
+		}
+		return areaList;
+	}
+	/**
+	 * 获取当前用户授权的区域
+	 * @return
+	 */
 	public static List<Area> getAreaListByname(String areaName){
 		@SuppressWarnings("unchecked")
 		//List<Area> areaList = (List<Area>)getCache(CACHE_AREA_LIST);
@@ -855,6 +871,22 @@ public class UserUtils {
 		}
 		return areaList;
 	}
+	/**
+	 * 获取当前用户授权的区域
+	 * @return
+	 */
+	public static List<Area> getAreaCityListByname(String areaName){
+		@SuppressWarnings("unchecked")
+		//List<Area> areaList = (List<Area>)getCache(CACHE_AREA_LIST);
+				List<Area> areaList = null;
+		if (areaList == null){
+			Area area=new Area();
+			area.setName(areaName);
+			areaList = areaDao.findAllCityList(area);
+			putCache(CACHE_AREA_LIST, areaList);
+		}
+		return areaList;
+	}
 
 	/**
 	 * 获取当前用户有权限访问的部门

+ 52 - 0
src/main/java/com/jeeplus/modules/sys/web/AreaController.java

@@ -206,6 +206,58 @@ public class AreaController extends BaseController {
 		List<Map<String,Object>> mapList = Lists.newArrayList(s);
 		return mapList;
 	}
+	@RequiresPermissions("user")
+	@ResponseBody
+	@RequestMapping(value = "treeDataCity")
+	public List<Map<String, Object>> treeDataCity(@RequestParam(required=false) String extId,@RequestParam(required=false) String selectName, HttpServletResponse response) {
+//		List<Map<String, Object>> mapList = Lists.newArrayList();
+//		List<Area> list = areaService.findAll();
+		List<Area> list = areaService.findByAraeCity(selectName);
+		LinkedList<Map<String,Object>> prantsSet = new LinkedList<>();
+		for (int i=0; i<list.size(); i++){
+			Area e = list.get(i);
+			if (StringUtils.isBlank(extId) || (extId!=null && !extId.equals(e.getId()) && e.getParentIds().indexOf(","+extId+",")==-1)){
+				Map<String, Object> map = Maps.newHashMap();
+				if (null != selectName){
+					//根据查询结果查询他的父级区域
+					String[] pids=e.getParentIds().split(",");
+					for (int j=0;j<pids.length;j++){
+						Map<String, Object> prantsmap = Maps.newHashMap();
+						Area areas = areaService.findArae(pids[j]);
+						if (null!= areas){
+							prantsmap.put("id", areas.getId());
+							prantsmap.put("pId", areas.getParentId());
+							prantsmap.put("pIds", areas.getParentIds());
+							prantsmap.put("name", areas.getName());
+							prantsmap.put("selectName", selectName);
+							prantsSet.add(prantsmap);
+						}
+					}
+					List<Area> areaList = Lists.newArrayList();
+					//根据id查该地区下所有子集
+					areaList = areaService.findAraeListByParentId(areaList,e.getId());
+					for (Area info: areaList) {
+						Map<String, Object> prantsmap = Maps.newHashMap();
+						prantsmap.put("id", info.getId());
+						prantsmap.put("pId", info.getParentId());
+						prantsmap.put("pIds", info.getParentIds());
+						prantsmap.put("name", info.getName());
+						prantsmap.put("selectName", selectName);
+						prantsSet.add(prantsmap);
+					}
+				}
+				map.put("id", e.getId());
+				map.put("pId", e.getParentId());
+				map.put("pIds", e.getParentIds());
+				map.put("name", e.getName());
+				map.put("selectName", selectName);
+				prantsSet.add(map);
+			}
+		}
+		List<Map<String,Object>> s=paichong(prantsSet);
+		List<Map<String,Object>> mapList = Lists.newArrayList(s);
+		return mapList;
+	}
 
 	@ResponseBody
 	@RequestMapping(value = "getParent")

+ 9 - 0
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -65,6 +65,8 @@ import com.jeeplus.modules.projectConstruction.service.FollowArchiveService;
 import com.jeeplus.modules.projectConstruction.service.FollowService;
 import com.jeeplus.modules.projectEngineering.entity.ProjectEngineeringInfo;
 import com.jeeplus.modules.projectEngineering.service.ProjectEngineeringService;
+import com.jeeplus.modules.projectEngineeringCaseBase.entity.ProjectEngineeringCaseBaseInfo;
+import com.jeeplus.modules.projectEngineeringCaseBase.service.ProjectEngineeringCaseBaseService;
 import com.jeeplus.modules.projectFilingBatch.dao.ProjectFilingBatchProInfoDao;
 import com.jeeplus.modules.projectFilingBatch.dao.ProjectFilingbatchRelationDao;
 import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatch;
@@ -614,6 +616,8 @@ public class WorkProjectNotifyController extends BaseController {
 
 	@Autowired
 	private RuralProjectRecordsOwnCaseBaseService ruralProjectRecordsOwnCaseBaseService;
+	@Autowired
+	private ProjectEngineeringCaseBaseService engineeringCaseBaseService;
 
 
 	@ModelAttribute
@@ -11210,6 +11214,11 @@ public class WorkProjectNotifyController extends BaseController {
 		model.addAttribute("datalistTwo", reviewAuditList);
 		model.addAttribute("projectCaseBaseAudit", projectCaseBaseAudit);
 
+
+		//获取工程类型
+		ProjectEngineeringCaseBaseInfo engineeringInfos=engineeringCaseBaseService.get(projectCaseBaseAudit.getEngineeringType());
+		model.addAttribute("engineeringInfo", engineeringInfos);
+
 		projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
 		projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
 		projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));

+ 170 - 0
src/main/resources/mappings/modules/projectEngineeringCaseBase/PeojectEngineeringCaseBaseDao.xml

@@ -0,0 +1,170 @@
+<?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.projectEngineeringCaseBase.dao.ProjectEngineeringInfoCaseBaseDao">
+
+    <sql id="engineeringColumns">
+        a.id AS "id",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.remarks AS "remarks",
+		a.del_flag AS "delFlag",
+		a.parent_id AS "parent.id",
+		a.engineering_name AS "engineeringName",
+		a.parent_ids AS "parentIds",
+		a.company_id AS "companyId",
+		a.index_num AS "indexNum"
+    </sql>
+    <select id="get" resultType="com.jeeplus.modules.projectEngineeringCaseBase.entity.ProjectEngineeringCaseBaseInfo" >
+        SELECT
+        <include refid="engineeringColumns"/>
+        FROM project_engineering_case_base_info a
+        WHERE a.id = #{id}
+    </select>
+    <select id="findList" resultType="com.jeeplus.modules.projectEngineeringCaseBase.entity.ProjectEngineeringCaseBaseInfo" >
+        SELECT
+        <include refid="engineeringColumns"/>
+        FROM project_engineering_case_base_info a
+        <where>
+            a.del_flag = 0
+            <if test="engineeringName!=null and engineeringName != ''">
+                and a.engineering_name like concat('%',#{engineeringName},'%')
+            </if>
+            <if test="parentIds!=null and parentIds != ''">
+                and a.parent_ids like concat('%',#{parentIds},'%')
+            </if>
+            <if test="indexNum != null and indexNum!=0">
+                and a.index_num = #{indexNum}
+            </if>
+        </where>
+        <choose>
+            <when test="page !=null and page.orderBy != null and page.orderBy != ''">
+                ORDER BY ${page.orderBy}
+            </when>
+            <otherwise>
+                ORDER BY a.index_num
+            </otherwise>
+        </choose>
+    </select>
+    <select id="getParentAll"
+            resultType="com.jeeplus.modules.projectEngineeringCaseBase.entity.ProjectEngineeringCaseBaseInfo">
+        SELECT
+        <include refid="engineeringColumns"/>
+        FROM project_engineering_case_base_info a
+        <where>
+            a.del_flag = 0
+            and a.parent_id ="0"
+        </where>
+        ORDER BY a.index_num
+    </select>
+    <select id="selectOrderNum" resultType="java.lang.String">
+        SELECT MAX(index_num) FROM project_engineering_case_base_info WHERE parent_id = #{parentId}
+    </select>
+    <insert id="insert">
+        insert into project_engineering_case_base_info(
+            id,
+            create_by,
+            create_date,
+            update_by,
+            update_date,
+            remarks,
+            del_flag,
+            parent_id,
+            engineering_name,
+            index_num,
+            parent_ids,
+            company_id
+        )values (
+            #{id},
+            #{createBy.id},
+            #{createDate},
+            #{updateBy.id},
+            #{updateDate},
+            #{remarks},
+            #{delFlag},
+            #{parentId},
+            #{engineeringName},
+            #{indexNum},
+            #{parentIds},
+            #{companyId}
+        )
+    </insert>
+    <update id="update">
+        update project_engineering_case_base_info set
+            update_by = #{updateBy.id},
+            update_date = #{updateDate},
+            remarks = #{remarks},
+            parent_id = #{parent.id},
+            engineering_name = #{engineeringName},
+            index_num = #{indexNum},
+            parent_ids = #{parentIds},
+            company_id = #{companyId}
+        WHERE id = #{id}
+    </update>
+    <update id="delete">
+        DELETE FROM project_engineering_case_base_info
+        WHERE id = #{id} OR find_in_set(#{id},parent_ids)
+    </update>
+    <select id="fingIds" resultType="com.jeeplus.modules.projectEngineeringCaseBase.entity.ProjectEngineeringCaseBaseInfo">
+        SELECT <include refid="engineeringColumns"/>
+        FROM project_engineering_case_base_info a
+        <where>
+            <if test="parentIdSet!=null and parentIdSet.size!=0">
+                a.id in
+                <foreach collection="parentIdSet" item="parentId" separator="," open="(" close=")">
+                    #{parentId}
+                </foreach>
+            </if>
+            AND del_flag ='0'
+            AND company_id = #{companyId}
+        </where>
+        ORDER BY a.index_num
+    </select>
+
+    <select id="getEngineeringId" resultType="java.lang.String">
+        select id from project_engineering_case_base_info where index_num=#{indexNum}
+    </select>
+
+    <select id="getProjectReportedType" resultType="com.jeeplus.modules.projectEngineeringCaseBase.entity.ProjectEngineeringCaseBaseInfo">
+        SELECT
+        <include refid="engineeringColumns"/>
+        FROM project_purpose_info a
+        WHERE a.id = #{id}
+    </select>
+
+    <select id="getProjectReportedTypeList" resultType="com.jeeplus.modules.projectEngineeringCaseBase.entity.ProjectEngineeringCaseBaseInfo" >
+        SELECT
+        <include refid="engineeringColumns"/>
+        FROM project_purpose_info a
+        <where>
+            a.del_flag = 0
+            <if test="engineeringName!=null and engineeringName != ''">
+                and a.engineering_name like concat('%',#{engineeringName},'%')
+            </if>
+            <if test="parentIds!=null and parentIds != ''">
+                and a.parent_ids like concat('%',#{parentIds},'%')
+            </if>
+            <if test="indexNum != null and indexNum!=0">
+                and a.index_num = #{indexNum}
+            </if>
+        </where>
+        <choose>
+            <when test="page !=null and page.orderBy != null and page.orderBy != ''">
+                ORDER BY ${page.orderBy}
+            </when>
+            <otherwise>
+                ORDER BY a.id
+            </otherwise>
+        </choose>
+    </select>
+
+
+    <select id="getChildInfoList" resultType="com.jeeplus.modules.projectEngineeringCaseBase.entity.ProjectEngineeringCaseBaseInfo" >
+        SELECT
+        <include refid="engineeringColumns"/>
+        FROM project_engineering_case_base_info a
+        WHERE a.parent_id = #{parentId}
+    </select>
+
+</mapper>

+ 40 - 4
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsOwnCaseBaseDao.xml

@@ -16,7 +16,20 @@
 		a.status as "status",
 		a.process_instance_id as "processInstanceId",
 		a.company_id AS "company.id",
-		a.office_id AS "office.id"
+		a.office_id AS "office.id",
+		a.project_domain as "projectDomain",
+		a.engineering_type as "engineeringType",
+		a.start_date as "startDate",
+		a.end_date as "endDate",
+		a.area_id as "area.id",
+		p.name AS "area.name",
+		p.type AS "area.type",
+		a.province as "province",
+		a.city as "city"
+	</sql>
+
+	<sql id="areaJoins">
+		LEFT JOIN sys_area p ON p.id = a.area_id
 	</sql>
 
 	<select id="get" resultType="ProjectCaseBaseAudit" >
@@ -24,6 +37,7 @@
 		<include refid="projectRecordsColumns"/>
 		from
 		project_case_base_audit a
+		<include refid="areaJoins"/>
 		<where>
 			a.del_flag = 0 and a.id = #{id}
 		</where>
@@ -35,6 +49,7 @@
 		<include refid="projectRecordsColumns"/>
 		from
 		project_case_base_audit a
+		<include refid="areaJoins"/>
 		<where>
 			a.del_flag = 0 and a.project_id = #{projectId}
 		</where>
@@ -53,7 +68,14 @@
 			status,
 			process_instance_id,
 			company_id,
-			office_id
+			office_id,
+			project_domain,
+			engineering_type,
+			start_date,
+			end_date,
+			area_id,
+			province,
+			city
 		) VALUES (
 		    #{id},
 		    #{createBy.id},
@@ -66,7 +88,14 @@
 		 	#{status},
 		 	#{processInstanceId},
 		 	#{company.id},
-		 	#{office.id}
+		 	#{office.id},
+		 	#{projectDomain},
+		 	#{engineeringType},
+		 	#{startDate},
+		 	#{endDate},
+		 	#{area.id},
+		 	#{province},
+		 	#{city}
 	 	)
 	</insert>
 
@@ -79,7 +108,14 @@
 		  status = #{status},
 		  process_instance_id = #{processInstanceId},
 		  company_id = #{company.id},
-		  office_id = #{office.id}
+		  office_id = #{office.id},
+		  project_domain = #{projectDomain},
+		  engineering_type = #{engineeringType},
+		  start_date = #{startDate},
+		  end_date = #{endDate},
+		  area_id = #{area.id},
+		  province = #{province},
+		  city = #{city}
 		WHERE id = #{id}
 	</update>
 

+ 17 - 0
src/main/resources/mappings/modules/sys/AreaDao.xml

@@ -253,4 +253,21 @@
 			and a.parent_id = #{parentId}
 		</where>
 	</select>
+
+
+	<select id="findAllCityList" parameterType="String" resultMap="areaResult">
+		SELECT
+		<include refid="areaColumns"/>
+		FROM sys_area a
+		<include refid="areaJoins"/>
+
+		<where>
+			a.del_flag = 0
+			<if test="name != null and name !=''">
+				and a.name= #{name}
+			</if>
+			and a.type != 4
+		</where>
+		ORDER BY a.sort=29 desc, a.code
+	</select>
 </mapper>

+ 105 - 0
src/main/webapp/WEB-INF/tags/sys/treeselectProjectCityArea.tag

@@ -0,0 +1,105 @@
+<%@ tag language="java" pageEncoding="UTF-8"%>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<%@ attribute name="id" type="java.lang.String" required="true" description="编号"%>
+<%@ attribute name="name" type="java.lang.String" required="true" description="隐藏域名称(ID)"%>
+<%@ attribute name="value" type="java.lang.String" required="true" description="隐藏域值(ID)"%>
+<%@ attribute name="labelName" type="java.lang.String" required="true" description="输入框名称(Name)"%>
+<%@ attribute name="labelValue" type="java.lang.String" required="true" description="输入框值(Name)"%>
+<%@ attribute name="title" type="java.lang.String" required="true" description="选择框标题"%>
+<%@ attribute name="url" type="java.lang.String" required="true" description="树结构数据地址"%>
+<%@ attribute name="checked" type="java.lang.Boolean" required="false" description="是否显示复选框,如果不需要返回父节点,请设置notAllowSelectParent为true"%>
+<%@ attribute name="extId" type="java.lang.String" required="false" description="排除掉的编号(不能选择的编号)"%>
+<%@ attribute name="isAll" type="java.lang.Boolean" required="false" description="是否列出全部数据,设置true则不进行数据权限过滤(目前仅对Office有效)"%>
+<%@ attribute name="notAllowSelectRoot" type="java.lang.Boolean" required="false" description="不允许选择根节点"%>
+<%@ attribute name="notAllowSelectParent" type="java.lang.Boolean" required="false" description="不允许选择父节点"%>
+<%@ attribute name="module" type="java.lang.String" required="false" description="过滤栏目模型(只显示指定模型,仅针对CMS的Category树)"%>
+<%@ attribute name="selectScopeModule" type="java.lang.Boolean" required="false" description="选择范围内的模型(控制不能选择公共模型,不能选择本栏目外的模型)(仅针对CMS的Category树)"%>
+<%@ attribute name="allowClear" type="java.lang.Boolean" required="false" description="是否允许清除"%>
+<%@ attribute name="allowInput" type="java.lang.Boolean" required="false" description="文本框可填写"%>
+<%@ attribute name="cssClass" type="java.lang.String" required="false" description="css样式"%>
+<%@ attribute name="cssStyle" type="java.lang.String" required="false" description="css样式"%>
+<%@ attribute name="smallBtn" type="java.lang.Boolean" required="false" description="缩小按钮显示"%>
+<%@ attribute name="hideBtn" type="java.lang.Boolean" required="false" description="是否显示按钮"%>
+<%@ attribute name="disabled" type="java.lang.String" required="false" description="是否限制选择,如果限制,设置为disabled"%>
+<%@ attribute name="dataMsgRequired" type="java.lang.String" required="false" description=""%>
+<%@ attribute name="rule" type="java.lang.String" required="false" description="考勤规则模块用"%>
+	<input id="${id}Id" name="${name}" class="${cssClass}" type="hidden" value="${value}" />
+	<div class="input-group">
+		<input id="${id}Name" placeholder="请选择${title}" name="${labelName}" ${allowInput?'':'readonly="readonly"'}  type="text" value="${labelValue}" data-msg-required="${dataMsgRequired}"
+		class="${cssClass}" style="${cssStyle}"/>
+       		 <span class="input-group-btn">
+	       		 <button type="button"  id="${id}Button" class="btn <c:if test="${fn:contains(cssClass, 'input-sm')}"> btn-sm </c:if><c:if test="${fn:contains(cssClass, 'input-lg')}"> btn-lg </c:if>  btn-primary ${disabled} ${hideBtn ? 'hide' : ''}"><i class="fa fa-search"></i>
+	             </button>
+       		 </span>
+
+    </div>
+	 <label id="${id}Name-error" class="error" for="${id}Name" style="display:none"></label>
+<script type="text/javascript">
+	$("#${id}Button, #${id}Name").click(function(){
+		// 是否限制选择,如果限制,设置为disabled
+		if ($("#${id}Button").hasClass("disabled")){
+			return true;
+		}
+		// 正常打开
+		top.layer.open({
+		    type: 2,
+		    area: ['300px', '420px'],
+		    title:"选择${title}",
+		    ajaxData:{selectIds: $("#${id}Id").val()},
+		    content: "${ctx}/tag/treeselect?url="+encodeURIComponent("${url}")+"&module=${module}&checked=${checked}&extId=${extId}&isAll=${isAll}&unit=${unit}" ,
+		    btn: ['确定', '关闭']
+    	       ,yes: function(index, layero){ //或者使用btn1
+						var tree = layero.find("iframe")[0].contentWindow.tree;//h.find("iframe").contents();
+						var ids = [], names = [], nodes = [];
+						if ("${checked}" == "true"){
+							nodes = tree.getCheckedNodes(true);
+						}else{
+							nodes = tree.getSelectedNodes();
+						}
+						for(var i=0; i<nodes.length; i++) {
+							// if (nodes[i].isParent){
+							// 	continue; // 如果为复选框选择,则过滤掉父节点
+							// }
+							if (nodes[i].level != 2){
+								//top.$.jBox.tip("不能选择根节点("+nodes[i].name+")请重新选择。");
+								top.layer.msg("项目所在地只能选择市级,请重新选择。", {icon: 0});
+								return false;
+							}
+							if (nodes[i].isParent){
+								var id = nodes[i].id;
+								var pid = nodes[i].pIds;
+								if(id.indexOf("-") == -1){	//如果id中包含-,则表示该地区为最下级地区
+									var pidSize = (pid.split(',')).length-1;
+									if(pidSize<3 && pid != '1'){
+										top.layer.msg("不能选择非市、区县节点请重新选择。", {icon: 0});
+										return false;
+									}
+								}
+							}
+							ids.push(nodes[i].id);
+							names.push(nodes[i].name);//<c:if test="${!checked}">
+							console.log(1231)
+							var level = 1 + nodes[i].level
+							$("#areaType").val(level);
+							break; // 如果为非复选框选择,则返回第一个选择  </c:if>
+						}
+						$("#${id}Id").val(ids.join(",").replace(/u_/ig,"")).change();
+						$("#${id}Name").val(names.join(",")).change();
+						$("#${id}Name").focus();
+						var rule="${rule}";
+						var id="${id}";
+						if(rule=='rule'){
+                            var _placeName =  id.split("_")[0]+"_placeName";
+                            var _itude =  id.split("_")[0]+"_itude";
+                            $("#"+_placeName).val("");
+                            $("#"+_itude).val("");
+						}
+						top.layer.close(index);
+				    	       },
+    	cancel: function(index){ //或者使用btn2
+    	           //按钮【按钮二】的回调
+    	       }
+		});
+
+	});
+</script>

+ 113 - 0
src/main/webapp/webpage/modules/projectAccessory/projectEngineeringCaseBase/projectEngineeringCaseBaseForm.jsp

@@ -0,0 +1,113 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>复核标准管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript" src="${ctxStatic}/layui/layui.js"></script>
+	<link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/css/layui.css"/>
+	<script src="${ctxStatic}/layer-v2.3/layui/xmSelect.js" charset="utf-8"></script>
+	<style>
+		label.error{
+			top:40px;
+			left:0;
+		}
+		#standardDetail-error{
+			top:82px;
+			left:0;
+		}
+	</style>
+	<script type="text/javascript">
+		var validateForm;
+		function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+			if(validateForm.form()){
+				$("#inputForm").submit();
+				return true;
+			}
+
+			return false;
+		}
+		$(document).ready(function() {
+			layui.use(['form', 'layer'], function () {
+				var form = layui.form;
+			});
+			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);
+					}
+				}
+			});
+			var edit = "${workReviewStandard.id}";
+			if(edit!=null && edit!=''){
+				$("#reviewParentButton").attr("disabled","disabled");
+			}
+		});
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="projectEngineeringCaseBaseInfo" action="${ctx}/projectEngineeringCaseBase/projectEngineeringCaseBase/save" method="post" class="form-horizontal layui-form">
+			<form:hidden path="id"/>
+			<form:hidden path="companyId"/>
+			<div class="form-group layui-row first">
+				<div class="form-group-label"><h2>工程类型信息</h2></div>
+					<%--<div class="layui-item layui-col-sm6">
+                        <label class="layui-form-label double-line"><span class="require-item">*</span>附件类型:</label>
+                        <div class="layui-input-block">
+                            <input type="text" value="${projectAccessoryInfo.parent.parentName}" readonly="readonly" class="form-control layui-input">
+                        </div>
+                    </div>--%>
+
+				<div class="layui-item layui-col-sm6 ">
+					<label class="layui-form-label">上级类型:</label>
+					<div class="layui-input-block">
+						<select name="parent.id" class="form-control required simple-select">
+							<option value="0">添加父级</option>
+							<c:forEach items="${parentInfos}" var="info" varStatus="index">
+								<option value="${info.id}">${info.engineeringName}</option>
+							</c:forEach>
+							<c:if test="${null != parent.id}">
+								<option value="${parent.id}" selected>${parent.engineeringName}</option>
+							</c:if>
+						</select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>工程类型名称:</label>
+					<div class="layui-input-block">
+						<form:input path="engineeringName" placeholder="请输入工程类型名称" htmlEscape="false" maxlength="100" class="form-control layui-input required"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">序号:</label>
+					<div class="layui-input-block">
+						<form:input path="indexNum" readonly="true" htmlEscape="false" maxlength="10"  class="form-control number layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12 with-textarea">
+					<label class="layui-form-label ">备注信息:</label>
+					<div class="layui-input-block">
+						<form:textarea path="remarks" placeholder="请输入备注信息" id="remarks" htmlEscape="false" rows="4"  maxlength="255"  class="form-control "/>
+					</div>
+				</div>
+			</div>
+		</form:form>
+	</div>
+</div>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+
+
+</script>
+</body>
+</html>

+ 124 - 0
src/main/webapp/webpage/modules/projectAccessory/projectEngineeringCaseBase/projectEngineeringCaseBaseList.jsp

@@ -0,0 +1,124 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>工程类型管理管理</title>
+    <meta name="decorator" content="default"/>
+    <%@include file="/webpage/include/treetable.jsp" %>
+    <script type="text/javascript">
+        $(document).ready(function() {
+            $("#treeTable").treeTable({expandLevel : 5},{ expandable: true });
+        });
+    </script>
+	<style>
+		body{
+			background-color:transparent;
+			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+			background-color:rgba(255,255,255,0);
+			height:100%;
+		}
+	</style>
+</head>
+<body >
+	<div class="wrapper wrapper-content">
+		<sys:message content="${message}"/>
+		<div class="layui-row">
+			<div class="full-width fl">
+				<div class="contentShadow layui-row" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="projectengineeringCaseBaseInfo" action="${ctx}/projectEngineeringCaseBase/projectEngineeringCaseBase" method="post" class="form-inline">
+					<input id="toflag" name="toflag" type="hidden" value="1"/>
+					<div class="commonQuery">
+						<div class="layui-item query athird">
+							<label class="layui-form-label double-line">工程类型名:</label>
+							<div class="layui-input-block with-icon">
+								<form:input path="engineeringName" htmlEscape="false" class=" form-control layui-input"></form:input>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">序号:</label>
+							<div class="layui-input-block">
+								<form:input path="indexNum" htmlEscape="false" class=" form-control layui-input"></form:input>
+							</div>
+						</div>
+						<div class="layui-item athird">
+							<div class="input-group">
+								<div class="layui-btn-group search-spacing">
+									<button id="searchQuery" class="layui-btn layui-btn-sm layui-bg-blue" onclick="search()">查询</button>
+									<button id="searchReset" class="layui-btn layui-btn-sm " onclick="resetSearch()">重置</button>
+								</div>
+<%--								<button id="searchReset" style="margin-right: 10px;" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>--%>
+<%--								<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>--%>
+							</div>
+						</div>
+						<div style="    clear:both;"></div>
+					</div>
+
+					</form:form>
+				</div>
+			</div>
+			<div class="full-width fl">
+				<div class="contentShadow layui-form contentDetails">
+					<div class="nav-btns">
+							<div class="layui-btn-group">
+								<shiro:hasPermission name="projectEngineeringCaseBase:projectEngineeringCaseBase:add">
+									<a onclick="openDialog('添加工程类型', '${ctx}/projectEngineeringCaseBase/projectEngineeringCaseBase/form','80%','80%')" class="layui-btn layui-btn-sm layui-bg-blue"> 添加工程类型</a>
+								</shiro:hasPermission>
+								<button class="layui-btn layui-btn-sm" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
+							</div>
+						<div style="clear: both;"></div>
+					</div>
+
+	
+					<!-- 表格 -->
+					<table id="treeTable" class="table table-bordered table-hover list-table">
+						<thead>
+							<tr>
+								<th  width="30%">工程类型名称</th>
+								<th >序号</th>
+								<th width="240px">操作</th>
+							</tr>
+						</thead>
+						<tbody>
+						<c:forEach items="${list}" var="projectAccessory">
+							<tr id="${projectAccessory.id}" pid="${projectAccessory.parent.id}">
+								<td>
+									${projectAccessory.engineeringName}
+								</td>
+								<td style="text-align: center">
+									${projectAccessory.indexNum}
+								</td>
+								<td class="op-td text-center">
+									<div class="layui-btn-group">
+									<div class="op-btn-box">
+										<shiro:hasPermission name="projectEngineeringCaseBase:projectEngineeringCaseBase:add">
+											<a href="javascript:void(0);" onclick="openDialog('添加附件结构', '${ctx}/projectEngineeringCaseBase/projectEngineeringCaseBase/form?parent.id=${projectAccessory.id}','80%','80%')" class="layui-btn layui-btn-xs layui-bg-blue"> 添加下级结构</a>
+										</shiro:hasPermission>
+										<shiro:hasPermission name="projectEngineeringCaseBase:projectEngineeringCaseBase:edit">
+											<a href="javascript:void(0);" onclick="openDialog('修改附件结构', '${ctx}/projectEngineeringCaseBase/projectEngineeringCaseBase/form?id=${projectAccessory.id}','80%','80%')" class="layui-btn layui-btn-xs layui-bg-green" > 修改</a>
+										</shiro:hasPermission>
+										<shiro:hasPermission name="projectEngineeringCaseBase:projectEngineeringCaseBase:del">
+											<a href="${ctx}/projectEngineeringCaseBase/projectEngineeringCaseBase/delete?id=${projectAccessory.id}" onclick="return confirmx('确认要删除该工程类型结构及其子工程结构吗?', this.href)"   class="layui-btn layui-btn-xs layui-bg-red"> 删除</a>
+										</shiro:hasPermission>
+									</div>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+	
+		<!-- 分页代码 -->
+	<%--<table:page page="${page}"></table:page>--%>
+
+				</div>
+			</div>
+		</div>
+</div>
+	<script>
+        resizeListWindow1();
+        $(window).resize(function(){
+            resizeListWindow1();
+        });
+	</script>
+</body>
+</html>

+ 262 - 200
src/main/webapp/webpage/modules/projectcontentinfo/projectCaseBaseSupplementAudit.jsp

@@ -114,6 +114,13 @@
 				$(id).removeAttr("class","hide");
 
 			})
+
+			var value = '${projectCaseBaseAudit.projectDomain}';
+			if (value === '1') {
+				document.getElementById('engineeringTypeBlock').style.display = '';
+			} else {
+				document.getElementById('engineeringTypeBlock').style.display = 'none';
+			}
 		});
 		function insertTitle(tValue){
 			var list = "${projectReportRecord.workAttachments}";
@@ -202,7 +209,8 @@
 							<li><a>项目计划信息</a><span class="hide">planView</span></li>
 							<li><a>质量复核信息</a><span class="hide">qualityView</span></li>
 							<li><a>报告签发信息</a><span class="hide">issueView</span></li>
-							<li class="active"><a>档案信息</a><span class="hide">AccessoryView</span></li>
+							<li><a>档案信息</a><span class="hide">AccessoryView</span></li>
+							<li class="active"><a>案例信息</a><span class="hide">caseBaseView</span></li>
 						</ul>
 					</div>
 				</div>
@@ -1274,205 +1282,7 @@
 
 					</c:if>
 				</div>
-				<div class="form-group layui-row first" id="AccessoryView">
-
-
-
-					<div class="form-group layui-row">
-						<div class="form-group-label"><h2>案例文件</h2></div>
-						<div id="addFile_caseBase" style="display: none" class="upload-progress">
-							<span id="fileName_caseBase" ></span>
-							<span id="_caseBase" ></span>
-							<b><span id="baifenbi_caseBase" ></span></b>
-							<div class="progress">
-								<div id="jindutiao_caseBase" class="progress-bar" style="width: 0%" aria-valuenow="0">
-								</div>
-							</div>
-						</div>
-						<input id="caseBase_file" type="file" name="caseBase_file" multiple="multiple" style="display: none;" onChange="if(this.value)caseBaseInsertTitle(this.value);"/>
-						<span id="caseBase_title"></span>
-						<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-							<table id="upTable_caseBase" class="table table-bordered table-condensed tree_table">
-								<thead>
-								<tr>
-										<%-- <th>序号</th>--%>
-									<th width="20%">文件要求</th>
-									<th width="35%">文件描述/文件</th>
-									<th width="20%">文件类型</th>
-									<th width="160px">上传时间</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="170px">操作</th>
-								</tr>
-								</thead>
-								<tbody id="file_caseBase">
-								<c:forEach items="${projectReportRecord.fileCaseBaseList}" var = "filecaseBase" varStatus="status">
-									<tr id="file_caseBase_${filecaseBase.id}_tr" onclick="listTr(this)">
-											<%-- <td>${status.index + 1}</td>--%>
-										<td style="display:none">${filecaseBase.id}</td>
-										<td style="display:none">${filecaseBase.mustFlag}</td>
-										<c:choose>
-											<c:when test="${filecaseBase.mustFlag == 1}">
-												<td class="tabMove" style="text-align: left;"><span class='default_open ' style="padding-right: 15px; "></span><span style="color: red">* </span>${filecaseBase.attachName}<input type="hidden" value="${filecaseBase.attachName}"/></td>
-											</c:when>
-											<c:otherwise>
-												<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${filecaseBase.attachName}<input type="hidden" value="${filecaseBase.attachName}"/></td>
-											</c:otherwise>
-										</c:choose>
-										<td>
-												<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${filecaseBase.attachName}</div></div>--%>
-											<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${filecaseBase.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${filecaseBase.attachTypes}</div>
-										</td>
-										<td></td>
-										<td></td>
-										<td></td>
-										<td class="op-td">
-											<%--<div class="op-btn-box" >
-												<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${filecaseBase.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable_caseBase')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-											</div>--%>
-										</td>
-										<td style="display:none">${filecaseBase.fileFlag}</td>
-
-									</tr>
-									<c:forEach items="${filecaseBase.workAttachments}" var = "workClientAttachment" varStatus="status">
-										<tr id="addFile_caseBase_${workClientAttachment.id}_tr" class="addFile_caseBase_${filecaseBase.id}_tr">
-											<td></td>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-															<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(filecaseBase.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																			<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																		</c:when>
-																		<c:otherwise>
-																			<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-															<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(filecaseBase.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																			<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																		</c:when>
-																		<c:otherwise>
-																			<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-											<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
-
-
-											<td class="op-td" style="text-align:center;">
-												<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-											</td>
-											<td class="op-td" style="text-align:center;">
-													${workClientAttachment.fileSize}
-											</td>
-											<td class="op-td">
-												<div class="op-btn-box" >
-														<%--附件下载删除--%>
-													<c:choose>
-														<c:when test="${projectReportRecord.uploadMode == 2}">
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-																	<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																</c:when>
-																<c:otherwise>
-																	<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																</c:otherwise>
-															</c:choose>
-														</c:when>
-														<c:otherwise>
-															<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-
-												</div>
-											</td>
-										</tr>
-									</c:forEach>
-								</c:forEach>
-								</tbody>
-							</table>
-						</div>
-					</div>
-					<script type="text/template" id="caseBaseTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="caseBaseTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','upTable_caseBase')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-					</script>
-
-					<div class="form-group-label">
-						<div style="float: right"> <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogre('个人模板列表', '${ctx}/auditTemplate/auditTemplate/templateList?identification=${identification}&name=${identificationName}','80%', '70%','','关闭')" class="nav-btn layui-btn layui-btn-sm" ><i class="fa fa-file-excel-o"></i> 审核意见模板列表</a></div>
-						<h2>审批意见</h2>
-					</div>
-					<iframe id="iframe" src="${ctx}/auditTemplate/auditTemplate/iframeView?identification=${identification}" name="listresult" frameborder="0" align="left" width="100%" height="300" scrolling="value"></iframe>
-
-
-
+				<div class="form-group layui-row first hide" id="AccessoryView">
 
 					<div class="form-group layui-row">
 						<div class="form-group-label"><h2>成果文件</h2></div>
@@ -2013,6 +1823,258 @@
 					</div>
 
 				</div>
+
+
+				<div class="form-group layui-row first" id="caseBaseView">
+					<div class="form-group layui-row first lw12">
+						<div class="form-group-label"><h2>基本信息</h2></div>
+
+
+						<div class="layui-item layui-col-sm6">
+							<label class="layui-form-label"><span class="require-item">*</span>项目名称:</label>
+							<div class="layui-input-block">
+								<input id="projectName" name="projectName"  htmlEscape="false" readonly="true" class="form-control  layui-input required" value="${projectRecords.projectName}"/>
+							</div>
+						</div>
+						<div class="layui-item layui-col-sm6 lw6">
+							<label class="layui-form-label"><span class="require-item">*</span>项目所在地:</label>
+							<div class="layui-input-block">
+								<input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${projectCaseBaseAudit.province}-${projectCaseBaseAudit.city}"/>
+							</div>
+						</div>
+						<div class="layui-item layui-col-sm6 lw7">
+							<label class="layui-form-label double-line"><span class="require-item">*</span>工程建设开始日期:</label>
+							<div class="layui-input-block">
+								<input class="laydate-icondate judgment form-control layui-input layer-date laydate-icon" style="background-color: #f1f1f1" readonly="readonly" id="startDate" name="startDate" placeholder="请选择开始日期" value="<fmt:formatDate value="${projectCaseBaseAudit.startDate}" pattern="yyyy-MM-dd"/>">
+							</div>
+						</div>
+						<div class="layui-item layui-col-sm6 lw7">
+							<label class="layui-form-label double-line"><span class="require-item">*</span>工程建设结束日期:</label>
+							<div class="layui-input-block">
+								<input class="laydate-icondate judgment form-control layui-input layer-date laydate-icon" style="background-color: #f1f1f1" readonly="readonly" id="endDate" name="endDate" placeholder="请选择结束日期" value="<fmt:formatDate value="${projectCaseBaseAudit.endDate}" pattern="yyyy-MM-dd"/>">
+							</div>
+						</div>
+
+						<div class="layui-item layui-col-sm6 lw7">
+							<label class="layui-form-label"><span class="require-item">*</span>工程领域:</label>
+							<div class="layui-input-block">
+								<form:select placeholder="请选择" path="projectDomain" disabled="true" style="background-color: #f1f1f1" class="form-control judgment editable-select layui-input" id="projectProperties" value="${projectCaseBaseAudit.projectDomain}">
+									<form:option value=""/>
+									<form:options items="${fns:getMainDictList('project_domain')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+								</form:select>
+							</div>
+
+						</div>
+						<div class="layui-item layui-col-sm6 lw7" id="engineeringTypeBlock" style="${showEngineeringType ? '' : 'display:none;'}">
+							<label class="layui-form-label"><span class="require-item">*</span>工程类型:</label>
+							<div class="layui-input-block">
+								<button type="button" class="layui-btn layui-btn-primary" style="width: 100%;text-align: left;background-color: #f1f1f1" id="demo100" disabled>
+									<span>${engineeringInfo.engineeringName}</span>
+									<input type="hidden" name="engineeringType" id="engineeringType" class="judgment" value="${engineeringInfo.id}"/>
+									<i class="layui-icon layui-icon-down layui-font-12" style="float: right"></i>
+								</button>
+							</div>
+						</div>
+
+					</div>
+					<div class="form-group layui-row">
+						<div class="form-group-label"><h2>案例文件</h2></div>
+						<div id="addFile_caseBase" style="display: none" class="upload-progress">
+							<span id="fileName_caseBase" ></span>
+							<span id="_caseBase" ></span>
+							<b><span id="baifenbi_caseBase" ></span></b>
+							<div class="progress">
+								<div id="jindutiao_caseBase" class="progress-bar" style="width: 0%" aria-valuenow="0">
+								</div>
+							</div>
+						</div>
+						<input id="caseBase_file" type="file" name="caseBase_file" multiple="multiple" style="display: none;" onChange="if(this.value)caseBaseInsertTitle(this.value);"/>
+						<span id="caseBase_title"></span>
+						<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+							<table id="upTable_caseBase" class="table table-bordered table-condensed tree_table">
+								<thead>
+								<tr>
+										<%-- <th>序号</th>--%>
+									<th width="20%">文件要求</th>
+									<th width="35%">文件描述/文件</th>
+									<th width="20%">文件类型</th>
+									<th width="160px">上传时间</th>
+									<th width="120px">文件大小(M)</th>
+									<th width="170px">操作</th>
+								</tr>
+								</thead>
+								<tbody id="file_caseBase">
+								<c:forEach items="${projectReportRecord.fileCaseBaseList}" var = "filecaseBase" varStatus="status">
+									<tr id="file_caseBase_${filecaseBase.id}_tr" onclick="listTr(this)">
+											<%-- <td>${status.index + 1}</td>--%>
+										<td style="display:none">${filecaseBase.id}</td>
+										<td style="display:none">${filecaseBase.mustFlag}</td>
+										<c:choose>
+											<c:when test="${filecaseBase.mustFlag == 1}">
+												<td class="tabMove" style="text-align: left;"><span class='default_open ' style="padding-right: 15px; "></span><span style="color: red">* </span>${filecaseBase.attachName}<input type="hidden" value="${filecaseBase.attachName}"/></td>
+											</c:when>
+											<c:otherwise>
+												<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${filecaseBase.attachName}<input type="hidden" value="${filecaseBase.attachName}"/></td>
+											</c:otherwise>
+										</c:choose>
+										<td>
+												<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${filecaseBase.attachName}</div></div>--%>
+											<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${filecaseBase.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${filecaseBase.attachTypes}</div>
+										</td>
+										<td></td>
+										<td></td>
+										<td></td>
+										<td class="op-td">
+												<div class="op-btn-box" >
+                                                    <a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${filecaseBase.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable_caseBase')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+                                                </div>
+										</td>
+										<td style="display:none">${filecaseBase.fileFlag}</td>
+
+									</tr>
+									<c:forEach items="${filecaseBase.workAttachments}" var = "workClientAttachment" varStatus="status">
+										<tr id="addFile_caseBase_${workClientAttachment.id}_tr" class="addFile_caseBase_${filecaseBase.id}_tr">
+											<td></td>
+											<c:choose>
+												<c:when test="${projectReportRecord.uploadMode == 2}">
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+															<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+														</c:when>
+														<c:otherwise>
+															<c:choose>
+																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+																</c:when>
+																<c:otherwise>
+																	<c:choose>
+																		<c:when test="${fn:containsIgnoreCase(filecaseBase.attachName,'rar')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																			<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+																		</c:when>
+																		<c:otherwise>
+																			<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+																		</c:otherwise>
+																	</c:choose>
+																</c:otherwise>
+															</c:choose>
+														</c:otherwise>
+													</c:choose>
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+															<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+														</c:when>
+														<c:otherwise>
+															<c:choose>
+																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+																</c:when>
+																<c:otherwise>
+																	<c:choose>
+																		<c:when test="${fn:containsIgnoreCase(filecaseBase.attachName,'rar')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																			<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
+																		</c:when>
+																		<c:otherwise>
+																			<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+																		</c:otherwise>
+																	</c:choose>
+																</c:otherwise>
+															</c:choose>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+											<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
+
+
+											<td class="op-td" style="text-align:center;">
+												<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
+											</td>
+											<td class="op-td" style="text-align:center;">
+													${workClientAttachment.fileSize}
+											</td>
+											<td class="op-td">
+												<div class="op-btn-box" >
+														<%--附件下载删除--%>
+													<c:choose>
+														<c:when test="${projectReportRecord.uploadMode == 2}">
+															<c:choose>
+																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+																	<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+																</c:when>
+																<c:otherwise>
+																	<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+																</c:otherwise>
+															</c:choose>
+														</c:when>
+														<c:otherwise>
+															<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:otherwise>
+													</c:choose>
+
+												</div>
+											</td>
+										</tr>
+									</c:forEach>
+								</c:forEach>
+								</tbody>
+							</table>
+						</div>
+					</div>
+					<script type="text/template" id="caseBaseTpl">//<!--
+                <tr id="budgetList{{idx}}">
+                    <td class="hide">
+                        <input id="caseBaseTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
+                    </td>
+                    <td class="hide">
+                        0
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.attachName}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.attachLength}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.attachTypes}}
+                    </td>
+                    <td style="text-align:center;">
+
+                    </td>
+					<td class="op-td">
+						<div class="op-btn-box" >
+							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','upTable_caseBase')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+						</div>
+					</td>
+                </tr>//-->
+					</script>
+
+					<div class="form-group-label">
+						<div style="float: right"> <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogre('个人模板列表', '${ctx}/auditTemplate/auditTemplate/templateList?identification=${identification}&name=${identificationName}','80%', '70%','','关闭')" class="nav-btn layui-btn layui-btn-sm" ><i class="fa fa-file-excel-o"></i> 审核意见模板列表</a></div>
+						<h2>审批意见</h2>
+					</div>
+					<iframe id="iframe" src="${ctx}/auditTemplate/auditTemplate/iframeView?identification=${identification}" name="listresult" frameborder="0" align="left" width="100%" height="300" scrolling="value"></iframe>
+
+
+
+
+
+				</div>
 			</div>
 
 			<div class="form-group layui-row page-end"></div>

+ 142 - 625
src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordCaseBaseForm.jsp

@@ -7,6 +7,11 @@
 	<script type="text/javascript" src="${ctxStatic}/layui/layui.js"></script>
 	<link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/css/layui.css"/>
 	<link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
+	</div><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 type="text/javascript" src="${ctxStatic}/layui/layuidown.js"></script>
+	<link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/layuidown.css"/>
+	<script src="${ctxStatic}/common/html/js/script.js"></script>
 	<%@include file="/webpage/include/treetable.jsp" %>
 
 	<style>
@@ -56,6 +61,18 @@
 						$("#inputForm").attr("action","${ctx}/ruralProject/RuralProjectRecordsOwnCaseBase/storeCaseBaseRecord");
 					}else{
 						if(boolFlag){
+							var areaType = $("#areaType").val()
+							if (areaType !=3){
+								top.layer.msg("项目所在地只能选择市级地区,请重新选择!", {icon: 0});
+								$("#onsubmit").val(true);
+								return false;
+							}
+							var engineeringType = $("#engineeringType").val()
+							if (!engineeringType){
+								top.layer.msg("工程类型不可为空,请选择工程类型!", {icon: 0});
+								$("#onsubmit").val(true);
+								return false;
+							}
 							var caseBase = $("#file_caseBase tr").length;
 							for(var i=0; i<caseBase; i++) {
 								var numberStr = $("#file_caseBase tr").eq(i).find("td:first").html();
@@ -74,7 +91,13 @@
 								}
 							}
 						}
-						$("#inputForm").attr("action","${ctx}/ruralProject/RuralProjectRecordsOwnCaseBase/saveCaseBaseRecord");
+						var flag=judgment();
+						if (flag){
+							$("#inputForm").attr("action","${ctx}/ruralProject/RuralProjectRecordsOwnCaseBase/saveCaseBaseRecord");
+						}else if (!flag){
+							$("#onsubmit").val(true);
+							return flag;
+						}
 					}
 					$("#inputForm").submit();
 					return true;
@@ -111,6 +134,87 @@
 					tips: 3
 				});
 			})
+
+
+			var value = '${projectCaseBaseAudit.projectDomain}';
+			if (value === '1') {
+				document.getElementById('engineeringTypeBlock').style.display = '';
+			} else {
+				document.getElementById('engineeringTypeBlock').style.display = 'none';
+			}
+
+
+			layui.use(['form', 'layer'], function () {
+				var form = layui.form;
+
+				form.on('select', function(data){
+					var value = data.value;
+					if (value === '1') {
+						document.getElementById('engineeringTypeBlock').style.display = '';
+					} else {
+						document.getElementById('engineeringTypeBlock').style.display = 'none';
+					}
+				});
+
+				$.ajax({
+					type : "POST",
+					url : "${ctx}/ruralProject/RuralProjectRecordsOwnCaseBase/engineeringTreeMenu",
+					//请求成功
+					success : function(result) {
+						var s='{"title": "menu item 4","id": "4"}'
+						var str=jQuery.parseJSON(result);
+						//工程类型树形菜单
+						layui.dropdown.render({
+							elem: '#demo100'
+							,style: 'width: 450px;'
+							,data:str
+							,click: function(item){
+								$("#demo100").find("span").html(item.title)
+								$("#demo100").find("#engineeringType").val(item.id)
+							}
+						});
+					}
+				});
+
+
+				laydate.render({
+					elem: '#startDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+					event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+					type : 'date'
+					, trigger: 'click'
+				});
+				laydate.render({
+					elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+					event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+					type : 'date'
+					, trigger: 'click'
+				});
+			})
+
+			$('#areaId').on("change", function () {
+				var areaId = $("#areaId").val();
+				$("#province").val('');
+				$("#city").val('');
+				$("#county").val('');
+				$.ajax({
+					type : "POST",
+					url : "${ctx}/sys/area/getParent",
+					data : {'areaId':areaId},
+					//请求成功
+					success : function(result) {
+						var pro = result.province;
+						var city = result.city;
+						if(pro != '') {
+							$("#province").val(pro);
+						}
+						if(city != '') {
+							$("#city").val(city);
+						}
+						$("#areaShow").html(pro+"-"+city);
+					},
+
+				});
+			})
         });
         function insertTitle(tValue){
             var list = "${projectReportRecord.workAttachments}";
@@ -180,72 +284,58 @@
 			<form:hidden path="id"/>
 			<form:hidden path="projectId"/>
 			<input type="hidden" id="onsubmit" value="true">
+			<input type="hidden" id="areaType" value="${projectCaseBaseAudit.area.type}">
 			<div class="form-group layui-row first lw12">
 				<div class="form-group-label"><h2>基本信息</h2></div>
 
 
 				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label"><span class="require-item">*</span>报告号:</label>
-					<div class="layui-input-block">
-						<input id="reportNumber" name="report.number"  htmlEscape="false" readonly="true" class="form-control  layui-input required" value="${projectReportRecord.report.number}"/>
-					</div>
-				</div>
-				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label"><span class="require-item">*</span>报告日期:</label>
-					<div class="layui-input-block">
-						<input id="reportDate" name="report.reportDate"  htmlEscape="false" readonly="true" class="form-control  layui-input required" value="<fmt:formatDate value="${projectReportRecord.report.reportDate}" pattern="yyyy-MM-dd"/>"/>
-					</div>
-				</div>
-				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label">合同编号:</label>
-					<div class="layui-input-block">
-						<input id="contractNum" name="contractNum"  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${projectReportRecord.report.project.workContractInfo.contractNum}"/>
-					</div>
-				</div>
-				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label">合同名称:</label>
+					<label class="layui-form-label"><span class="require-item">*</span>项目名称:</label>
 					<div class="layui-input-block">
-						<input id="contractName" name="contractName"  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${projectReportRecord.report.project.workContractInfo.name}"/>
+						<input id="projectName" name="projectName"  htmlEscape="false" readonly="true" class="form-control  layui-input required" value="${projectReportRecord.report.project.projectName}"/>
 					</div>
 				</div>
-				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label">委托方:</label>
-					<div class="layui-input-block">
-						<input id="clientName" name="clientName"  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${workClientInfoName}"/>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label"><span class="require-item">*</span>项目所在地:</label>
+					<div class="layui-input-block  with-icon">
+						<sys:treeselectProjectCityArea id="area" name="area.id" value="${projectCaseBaseAudit.area.id}" labelName="area.name" labelValue="${projectCaseBaseAudit.area.name}"
+												   cssStyle="background-color: #fff" title="区域" url="/sys/area/treeDataCity" cssClass="form-control judgment layui-input" allowClear="true" notAllowSelectParent="false"/>
+						<span id="areaShow" style="color: red"><c:if test="${projectCaseBaseAudit.area.id!=null}">${projectCaseBaseAudit.province}-${projectCaseBaseAudit.city}</c:if></span>
 					</div>
 				</div>
-				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label">项目编号:</label>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>工程建设开始日期:</label>
 					<div class="layui-input-block">
-						<input id="projectNum" name="projectNum"  htmlEscape="false" readonly="true" class="form-control  layui-input required" value="${projectReportRecord.report.project.projectId}"/>
+						<input class="laydate-icondate judgment form-control layui-input layer-date laydate-icon" style="background-color: #fff" readonly="readonly" id="startDate" name="startDate" placeholder="请选择开始日期" value="<fmt:formatDate value="${projectCaseBaseAudit.startDate}" pattern="yyyy-MM-dd"/>">
 					</div>
 				</div>
-				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label"><span class="require-item">*</span>项目名称:</label>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>工程建设结束日期:</label>
 					<div class="layui-input-block">
-						<input id="projectName" name="projectName"  htmlEscape="false" readonly="true" class="form-control  layui-input required" value="${projectReportRecord.report.project.projectName}"/>
+						<input class="laydate-icondate judgment form-control layui-input layer-date laydate-icon" style="background-color: #fff" readonly="readonly" id="endDate" name="endDate" placeholder="请选择结束日期" value="<fmt:formatDate value="${projectCaseBaseAudit.endDate}" pattern="yyyy-MM-dd"/>">
 					</div>
 				</div>
-				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label"><span class="require-item">*</span>归档申请人:</label>
-					<div class="layui-input-block">
-						<input id="cBName" name="createBy.name"  htmlEscape="false" readonly="true" class="form-control  layui-input required" value="${projectReportRecord.createBy.name}"/>
 
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label"><span class="require-item">*</span>工程领域:</label>
+					<div class="layui-input-block readOnlyFFF">
+						<form:select placeholder="请选择" path="projectDomain" class="form-control judgment editable-select layui-input" id="projectProperties" value="${projectCaseBaseAudit.projectDomain}">
+							<form:option value=""/>
+							<form:options items="${fns:getMainDictList('project_domain')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
 					</div>
 				</div>
-				<div class="layui-item layui-col-sm6">
-					<label class="layui-form-label">归档时间:</label>
-					<div class="layui-input-block">
-						<input id="recordDate" name="recordDate"  htmlEscape="false" readonly="true" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
-							   value="<fmt:formatDate value="${projectReportRecord.createDate}" pattern="yyyy-MM-dd"/>"/>
-					</div>
-				</div>
-				<div class="layui-item layui-col-sm12  with-textarea">
-					<label class="layui-form-label">说明:</label>
+				<div class="layui-item layui-col-sm6 lw7" id="engineeringTypeBlock" style="${showEngineeringType ? '' : 'display:none;'}">
+					<label class="layui-form-label"><span class="require-item">*</span>工程类型:</label>
 					<div class="layui-input-block">
-						<form:textarea placeholder="请输入说明:" path="remarks" htmlEscape="false" rows="4" maxlength="255" class="form-control "/>
+						<button type="button" class="layui-btn layui-btn-primary" style="width: 100%;text-align: left" id="demo100">
+							<span>${engineeringInfo.engineeringName}</span>
+							<input type="hidden" name="engineeringType" id="engineeringType" class="judgment" value="${engineeringInfo.id}"/>
+							<i class="layui-icon layui-icon-down layui-font-12" style="float: right"></i>
+						</button>
 					</div>
 				</div>
+
 			</div>
 
 
@@ -285,6 +375,7 @@
 							<th width="20%">文件类型</th>
 							<th width="160px">上传时间</th>
 							<th width="120px">文件大小(M)</th>
+							<th width="100px">同步状态</th>
 							<th width="100px">操作</th>
 						</tr>
 						</thead>
@@ -309,6 +400,7 @@
 								<td></td>
 								<td></td>
 								<td></td>
+								<td></td>
 								<td class="op-td">
 									<div class="op-btn-box" >
 										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${filecaseBase.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable_caseBase')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
@@ -393,6 +485,9 @@
 									<td class="op-td" style="text-align:center;">
 											${workClientAttachment.fileSize}
 									</td>
+									<td class="op-td" style="text-align:center; color:${workClientAttachment.syncDifySync == '1' ? 'green' : 'orange'};">
+											${workClientAttachment.syncDifySync == '1' ? '已同步' : '未同步'}
+									</td>
 									<td class="op-td">
 										<div class="op-btn-box" >
 												<%--附件下载删除--%>
@@ -440,599 +535,21 @@
                     <td style="text-align:center;">
 
                     </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','upTable_caseBase')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
-
-
-
-
-
-
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>成果文件</h2></div>
-				<div id="addFile_attachment" style="display: none" class="upload-progress">
-					<span id="fileName_attachment" ></span>
-					<span id="_attachment" ></span>
-					<b><span id="baifenbi_attachment" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-				<span id="attachment_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-							<th width="20%">文件要求</th>
-							<th width="35%">文件描述/文件</th>
-							<th width="20%">文件类型</th>
-							<th width="160px">上传时间</th>
-							<th width="120px">文件大小(M)</th>
-							<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_attachment">
-						<c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr id="file_attachment_${fileAttachment.id}_tr" onclick="listTr(this)">
-								<td style="display:none">${fileAttachment.id}</td>
-								<td style="display:none">${fileAttachment.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileAttachment.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileAttachment.attachName}</div></div>--%>
-	<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileAttachment.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileAttachment.attachTypes}</div>
-								</td>
-								<td></td>
-								<td></td>
-								<td></td>
-								<td class="op-td">
-									<div class="op-btn-box" >
-<%--
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
---%>
-									</div>
-								</td>
-								<td style="display:none">${fileAttachment.fileFlag}</td>
-							</tr>
-							<c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_attachment_${fileAttachment.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectReportRecord.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td>
-													<img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
-
-
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-									<td class="op-td" style="text-align:center;">
-											${workClientAttachment.fileSize}
-									</td>
-									<td class="op-td">
-										<div class="op-btn-box" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<script type="text/template" id="fileAttachmentTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="fileAttachment{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
                     <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
+						'未同步'
                     </td>
 					<td class="op-td">
 						<div class="op-btn-box" >
-<%--
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
---%>
+							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','upTable_caseBase')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 						</div>
 					</td>
                 </tr>//-->
 			</script>
 
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>依据性文件</h2></div>
-				<div id="addFile_gistdata" style="display: none" class="upload-progress">
-					<span id="fileName_gistdata" ></span>
-					<span id="_gistdata" ></span>
-					<b><span id="baifenbi_gistdata" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
-				<span id="gistdata_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="gistdata_upTable" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-								<%-- <th>序号</th>--%>
-									<th width="20%">文件要求</th>
-									<th width="35%">文件描述/文件</th>
-									<th width="20%">文件类型</th>
-									<th width="160px">上传时间</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_gistdata">
-						<c:forEach items="${projectReportRecord.fileGistdataList}" var = "fileGistdata" varStatus="status">
-							<tr id="file_gistdata_${fileGistdata.id}_tr" onclick="listTr(this)">
-									<%-- <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 class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileGistdata.attachName}</div></div>--%>
-	<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileGistdata.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileGistdata.attachTypes}</div>
-								</td>
-								<td></td>
-								<td></td>
-								<td></td>
-								<td class="op-td">
-									<div class="op-btn-box" >
-<%--
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
---%>
-									</div>
-								</td>
-								<td style="display:none">${fileGistdata.fileFlag}</td>
-
-							</tr>
-							<c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_gistdata_${fileGistdata.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectReportRecord.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
-
-
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-									<td class="op-td" style="text-align:center;">
-											${workClientAttachment.fileSize}
-									</td>
-									<td class="op-td">
-										<div class="op-btn-box" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</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>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-<%--
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
---%>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
-
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>其他文件</h2></div>
-				<div id="addFile_other" style="display: none" class="upload-progress">
-					<span id="fileName_other" ></span>
-					<span id="_other" ></span>
-					<b><span id="baifenbi_other" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
-				<span id="other_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable_other" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-								<%-- <th>序号</th>--%>
-									<th width="20%">文件要求</th>
-									<th width="35%">文件描述/文件</th>
-									<th width="20%">文件类型</th>
-									<th width="160px">上传时间</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_other">
-						<c:forEach items="${projectReportRecord.fileOtherList}" var = "fileOther" varStatus="status">
-							<tr id="file_other_${fileOther.id}_tr" onclick="listTr(this)">
-									<%-- <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 class="tabMove" style="text-align: left;"><span class='default_open ' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileOther.attachName}</div></div>--%>
-	<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileOther.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileOther.attachTypes}</div>
-								</td>
-								<td></td>
-								<td></td>
-								<td></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=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
---%>
-									</div>
-								</td>
-								<td style="display:none">${fileOther.fileFlag}</td>
-
-							</tr>
-							<c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="addFile_other_${fileOther.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectReportRecord.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
-
-
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-									<td class="op-td" style="text-align:center;">
-											${workClientAttachment.fileSize}
-									</td>
-									<td class="op-td">
-										<div class="op-btn-box" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<script type="text/template" id="otherTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="otherTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-<%--
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
---%>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
-
-
-
-
-
-
-
 
 			<div class="form-group layui-row page-end"></div>
 		</form:form>
 	</div>
-</div><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){
 		var rows = $(this).parent().prevAll().length + 1;

+ 872 - 0
src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordCaseBaseView.jsp

@@ -0,0 +1,872 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>合同归档管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript" src="${ctxStatic}/layui/layui.js"></script>
+	<link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/css/layui.css"/>
+	<link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
+	</div><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 type="text/javascript" src="${ctxStatic}/layui/layuidown.js"></script>
+	<link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/layuidown.css"/>
+	<script src="${ctxStatic}/common/html/js/script.js"></script>
+	<%@include file="/webpage/include/treetable.jsp" %>
+
+	<style>
+		label.error:nth-child(2){
+			top:40px;
+			left:0;
+		}
+		.layui-table th{
+			font-size: 14px;
+			/*表头内容居中显示*/
+			text-align: center;
+		}
+		.layui-table td{
+			/*表头内容居中显示*/
+			text-align: left;
+		}
+		span{
+			font-size: 14px;
+		}
+	</style>
+	<script type="text/javascript">
+        var validateForm;
+		function listTr(obj){
+			var name=$(obj).attr("id");
+			var tiao="."+name;
+			var span=$(obj).find("td").eq(2);
+			$(span).toggle(function () {
+				$(tiao).hide();
+				$(span).find("span").eq(0).attr("class","default_shut")
+			},function () {
+				$(tiao).show();
+				$(span).find("span").eq(0).attr("class","default_open")
+			});
+		}
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+				var onsubmit = $("#onsubmit").val();
+				if("true" == onsubmit){
+					$("#onsubmit").val(false);
+				}else{
+					parent.layer.msg("请勿重复提交!", {icon: 5});
+					return false
+				}
+				var projectId = '${project.id}';
+				var boolFlag = true;
+					if(obj == 2){
+						$("#inputForm").attr("action","${ctx}/ruralProject/RuralProjectRecordsOwnCaseBase/storeCaseBaseRecord");
+					}else{
+						if(boolFlag){
+							var areaType = $("#areaType").val()
+							if (areaType !=3){
+								top.layer.msg("项目所在地只能选择市级地区,请重新选择!", {icon: 0});
+								$("#onsubmit").val(true);
+								return false;
+							}
+							var engineeringType = $("#engineeringType").val()
+							if (!engineeringType){
+								top.layer.msg("工程类型不可为空,请选择工程类型!", {icon: 0});
+								$("#onsubmit").val(true);
+								return false;
+							}
+							var caseBase = $("#file_caseBase tr").length;
+							for(var i=0; i<caseBase; i++) {
+								var numberStr = $("#file_caseBase tr").eq(i).find("td:first").html();
+								var second = $("#file_caseBase tr").eq(i).find("td:eq(1)").html();
+								var fileFlag = $("#file_caseBase tr").eq(i).find("td:last").html();
+								if(second == 1){
+									if(numberStr != undefined && numberStr !=null && numberStr !=''){
+										if (fileFlag==1){
+
+										}else{
+											top.layer.msg("请上传案例文件!", {icon: 0});
+											$("#onsubmit").val(true);
+											return false;
+										}
+									}
+								}
+							}
+						}
+						var flag=judgment();
+						if (flag){
+							$("#inputForm").attr("action","${ctx}/ruralProject/RuralProjectRecordsOwnCaseBase/saveCaseBaseRecord");
+						}else if (!flag){
+							$("#onsubmit").val(true);
+							return flag;
+						}
+					}
+					$("#inputForm").submit();
+					return true;
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            return false;
+
+        }
+        $(document).ready(function() {
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+			$(".tabMove").mouseover(function(){
+				//tips层-下
+				var td=$(this)
+				var tdval=$(this).find("input").val();
+				layer.tips(tdval, td, {
+					tips: 3
+				});
+			})
+
+
+			var value = '${projectCaseBaseAudit.projectDomain}';
+			if (value === '1') {
+				document.getElementById('engineeringTypeBlock').style.display = '';
+			} else {
+				document.getElementById('engineeringTypeBlock').style.display = 'none';
+			}
+
+
+			layui.use(['form', 'layer'], function () {
+				var form = layui.form;
+
+				form.on('select', function(data){
+					var value = data.value;
+					if (value === '1') {
+						document.getElementById('engineeringTypeBlock').style.display = '';
+					} else {
+						document.getElementById('engineeringTypeBlock').style.display = 'none';
+					}
+				});
+
+				$.ajax({
+					type : "POST",
+					url : "${ctx}/ruralProject/RuralProjectRecordsOwnCaseBase/engineeringTreeMenu",
+					//请求成功
+					success : function(result) {
+						var s='{"title": "menu item 4","id": "4"}'
+						var str=jQuery.parseJSON(result);
+						//工程类型树形菜单
+						layui.dropdown.render({
+							elem: '#demo100'
+							,style: 'width: 450px;'
+							,data:str
+							,click: function(item){
+								$("#demo100").find("span").html(item.title)
+								$("#demo100").find("#engineeringType").val(item.id)
+							}
+						});
+					}
+				});
+
+/*
+				laydate.render({
+					elem: '#startDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+					event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+					type : 'date'
+					, trigger: 'click'
+				});
+				laydate.render({
+					elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+					event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+					type : 'date'
+					, trigger: 'click'
+				});*/
+			})
+
+			$('#areaId').on("change", function () {
+				var areaId = $("#areaId").val();
+				$("#province").val('');
+				$("#city").val('');
+				$("#county").val('');
+				$.ajax({
+					type : "POST",
+					url : "${ctx}/sys/area/getParent",
+					data : {'areaId':areaId},
+					//请求成功
+					success : function(result) {
+						var pro = result.province;
+						var city = result.city;
+						if(pro != '') {
+							$("#province").val(pro);
+						}
+						if(city != '') {
+							$("#city").val(city);
+						}
+						$("#areaShow").html(pro+"-"+city);
+					},
+
+				});
+			})
+        });
+        function insertTitle(tValue){
+            var list = "${projectReportRecord.workAttachments}";
+            var size = (list.split('url')).length-1;
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "99";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "projectRecords";
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
+        }
+
+		function otherInsertTitle(tValue){
+			var files = $("#other_file")[0].files;
+			for(var i=0;i<files.length;i++) {
+				var file = files[i];
+				var attachmentId = "";
+				var attachmentFlag = "153";
+				console.log(file);
+				var timestamp = new Date().getTime();
+
+				var storeAs = "projectRecords";
+				var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
+				/*将这段字符串存到数据库即可*/
+				var divId = "_other";
+				$("#addFile" + divId).show();
+				multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, "0");
+			}
+		}
+
+		function caseBaseInsertTitle(tValue){
+			var files = $("#caseBase_file")[0].files;
+			for(var i=0;i<files.length;i++) {
+				var file = files[i];
+				var attachmentId = "";
+				var attachmentFlag = "154";
+				console.log(file);
+				var timestamp = new Date().getTime();
+
+				var storeAs = "projectRecords";
+				var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
+				/*将这段字符串存到数据库即可*/
+				var divId = "_caseBase";
+				$("#addFile" + divId).show();
+				multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, "0");
+			}
+		}
+
+		function readOpenInfo(value) {
+			layer.open({
+				title: '内容',
+				btn: ['关闭'],
+				content: value
+			});
+		}
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="tapfixed">
+		<div class="list-form-tab contentShadow shadowLTR" id="tabDiv">
+			<ul class="list-tabs" >
+				<li><a href="${ctx}/ruralProject/ruralProjectView/view?id=${projectRecords.id}">项目详情</a></li>
+				<li><a href="${ctx}/ruralProject/ruralProjectView/list?parentProId=${projectRecords.id}&projectType=${projectRecords.projectType}">子项目列表</a></li>
+				<li><a href="${ctx}/ruralProject/ruralProjectView/workContractView?id=${projectRecords.workContractInfo.id}&projectId=${projectRecords.id}">客户合同详情</a></li>
+				<li><a href="${ctx}/ruralProject/ruralProjectView/planView?id=${projectRecords.id}">项目计划信息</a></li>
+				<li><a href="${ctx}/ruralProject/ruralProjectView/modify?projectId=${projectRecords.id}">质量复核信息</a></li>
+				<c:if test="${projectRecords.submitMoney eq '2'}">
+					<li><a href="${ctx}/ruralProject/ruralProjectView/reportIssue?projectId=${projectRecords.id}">报告签发信息</a></li>
+				</c:if>
+				<li><a href="${ctx}/ruralProject/ruralProjectView/getAccessoryView?id=${projectRecords.id}">档案信息</a></li>
+				<li><a href="${ctx}/ruralProject/ruralProjectView/formRecordModify?id=${projectRecords.id}">线上归档信息</a></li>
+				<%--			<li><a href="${ctx}/ruralProject/ruralProjectView/searchview?id=${projectRecords.id}">选查信息详情</a></li>--%>
+				<li><a href="${ctx}/ruralProject/ruralProjectView/paperView?projectId=${projectRecords.id}&submitMoney=${projectRecords.submitMoney}">纸质归档信息</a></li>
+				<li><a href="${ctx}/ruralProject/ruralProjectView/getReportedView?projectId=${projectRecords.id}&id=${reportedId}">上报信息</a></li>
+				<c:if test="${projectRecords.defectRecordStatus != '0'}">
+					<li><a href="${ctx}/projectReportDefectRecord/projectReportDefectRecord/formDescription2?reportId=${projectRecords.prdId}">资料缺失说明</a></li>
+				</c:if>
+				<li class="active"><a href="${ctx}/ruralProject/RuralProjectRecordsOwnCaseBase/formCaseBase?reportId=${projectRecords.id}&view=view">案例信息</a></li>
+			</ul>
+		</div>
+	</div>
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="projectCaseBaseAudit" method="post" class="form-horizontal layui-form">
+			<form:hidden path="id"/>
+			<form:hidden path="projectId"/>
+			<input type="hidden" id="onsubmit" value="true">
+			<input type="hidden" id="areaType" value="${projectCaseBaseAudit.area.type}">
+			<div class="form-group layui-row first lw12">
+				<div class="form-group-label"><h2>基本信息</h2></div>
+
+
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>项目名称:</label>
+					<div class="layui-input-block">
+						<input id="projectName" name="projectName"  htmlEscape="false" readonly="true" class="form-control  layui-input required" value="${projectReportRecord.report.project.projectName}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw6">
+					<label class="layui-form-label"><span class="require-item">*</span>项目所在地:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false" style="background-color: #f1f1f1" readonly="true" class="form-control layui-input" value="${projectCaseBaseAudit.province}-${projectCaseBaseAudit.city}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>工程建设开始日期:</label>
+					<div class="layui-input-block">
+						<input class="laydate-icondate judgment form-control layui-input layer-date laydate-icon" style="background-color: #fff" readonly="readonly" id="startDate" name="startDate" placeholder="请选择开始日期" value="<fmt:formatDate value="${projectCaseBaseAudit.startDate}" pattern="yyyy-MM-dd"/>">
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>工程建设结束日期:</label>
+					<div class="layui-input-block">
+						<input class="laydate-icondate judgment form-control layui-input layer-date laydate-icon" style="background-color: #fff" readonly="readonly" id="endDate" name="endDate" placeholder="请选择结束日期" value="<fmt:formatDate value="${projectCaseBaseAudit.endDate}" pattern="yyyy-MM-dd"/>">
+					</div>
+				</div>
+
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label"><span class="require-item">*</span>工程领域:</label>
+					<div class="layui-input-block readOnlyFFF">
+						<form:select placeholder="请选择" path="projectDomain" disabled="true" class="form-control judgment editable-select layui-input" id="projectProperties" value="${projectCaseBaseAudit.projectDomain}">
+							<form:option value=""/>
+							<form:options items="${fns:getMainDictList('project_domain')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+						</form:select>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7" id="engineeringTypeBlock" style="${showEngineeringType ? '' : 'display:none;'}">
+					<label class="layui-form-label"><span class="require-item">*</span>工程类型:</label>
+					<div class="layui-input-block">
+						<button type="button" class="layui-btn layui-btn-primary" style="width: 100%;text-align: left" id="demo100" disabled>
+							<span>${engineeringInfo.engineeringName}</span>
+							<input type="hidden" name="engineeringType" id="engineeringType" class="judgment" value="${engineeringInfo.id}"/>
+							<i class="layui-icon layui-icon-down layui-font-12" style="float: right"></i>
+						</button>
+					</div>
+				</div>
+
+			</div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>案例文件</h2></div>
+				<div id="addFile_caseBase" style="display: none" class="upload-progress">
+					<span id="fileName_caseBase" ></span>
+					<span id="_caseBase" ></span>
+					<b><span id="baifenbi_caseBase" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_caseBase" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="caseBase_file" type="file" name="caseBase_file" multiple="multiple" style="display: none;" onChange="if(this.value)caseBaseInsertTitle(this.value);"/>
+				<span id="caseBase_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable_caseBase" class="table table-bordered table-condensed tree_table">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th width="20%">文件要求</th>
+							<th width="35%">文件描述/文件</th>
+							<th width="20%">文件类型</th>
+							<th width="160px">上传时间</th>
+							<th width="120px">文件大小(M)</th>
+							<th width="100px">同步状态</th>
+							<th width="100px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_caseBase">
+						<c:forEach items="${projectReportRecord.fileCaseBaseList}" var = "filecaseBase" varStatus="status">
+							<tr id="file_caseBase_${filecaseBase.id}_tr" onclick="listTr(this)">
+									<%-- <td>${status.index + 1}</td>--%>
+								<td style="display:none">${filecaseBase.id}</td>
+								<td style="display:none">${filecaseBase.mustFlag}</td>
+								<c:choose>
+									<c:when test="${filecaseBase.mustFlag == 1}">
+										<td class="tabMove" style="text-align: left;"><span class='default_open ' style="padding-right: 15px; "></span><span style="color: red">* </span>${filecaseBase.attachName}<input type="hidden" value="${filecaseBase.attachName}"/></td>
+									</c:when>
+									<c:otherwise>
+										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${filecaseBase.attachName}<input type="hidden" value="${filecaseBase.attachName}"/></td>
+									</c:otherwise>
+								</c:choose>
+								<td>
+										<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${filecaseBase.attachName}</div></div>--%>
+									<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${filecaseBase.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${filecaseBase.attachTypes}</div>
+								</td>
+								<td></td>
+								<td></td>
+								<td></td>
+								<td></td>
+								<td class="op-td">
+									<%--<div class="op-btn-box" >
+										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${filecaseBase.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable_caseBase')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+									</div>--%>
+								</td>
+								<td style="display:none">${filecaseBase.fileFlag}</td>
+
+							</tr>
+							<c:forEach items="${filecaseBase.workAttachments}" var = "workClientAttachment" varStatus="status">
+								<tr class="addFile_caseBase_${filecaseBase.id}_tr">
+									<td></td>
+									<c:choose>
+										<c:when test="${projectReportRecord.uploadMode == 2}">
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<c:choose>
+																<c:when test="${fn:containsIgnoreCase(filecaseBase.attachName,'rar')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+																</c:when>
+																<c:otherwise>
+																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+																</c:otherwise>
+															</c:choose>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<c:choose>
+																<c:when test="${fn:containsIgnoreCase(filecaseBase.attachName,'rar')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
+																</c:when>
+																<c:otherwise>
+																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+																</c:otherwise>
+															</c:choose>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
+
+
+									<td class="op-td" style="text-align:center;">
+										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
+									</td>
+									<td class="op-td" style="text-align:center;">
+											${workClientAttachment.fileSize}
+									</td>
+									<td class="op-td" style="text-align:center; color:${workClientAttachment.syncDifySync == '1' ? 'green' : 'orange'};">
+											${workClientAttachment.syncDifySync == '1' ? '已同步' : '未同步'}
+									</td>
+									<td class="op-td">
+										<div class="op-btn-box" >
+												<%--附件下载删除--%>
+											<c:choose>
+												<c:when test="${projectReportRecord.uploadMode == 2}">
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:when>
+														<c:otherwise>
+															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:otherwise>
+													</c:choose>
+												</c:when>
+												<c:otherwise>
+													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+												</c:otherwise>
+											</c:choose>
+										</div>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<script type="text/template" id="caseBaseTpl">//<!--
+                <tr id="budgetList{{idx}}">
+                    <td class="hide">
+                        <input id="caseBaseTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
+                    </td>
+                    <td class="hide">
+                        0
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.attachName}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.attachLength}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.attachTypes}}
+                    </td>
+                    <td style="text-align:center;">
+
+                    </td>
+                    <td style="text-align:center;">
+						'未同步'
+                    </td>
+					<td class="op-td">
+						<div class="op-btn-box" >
+							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','upTable_caseBase')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+						</div>
+					</td>
+                </tr>//-->
+			</script>
+
+
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+<script>
+	function openBill2(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;
+		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			width='auto';
+			height='auto';
+		}else{//如果是PC端,根据用户设置的width和height显示。
+
+		}
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			skin:"two-btns",
+			maxmin: false, //开启最大化最小化按钮
+			content: urls ,
+			btn: ['确定','关闭'],
+			yes: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+				}
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
+				var $document = iframeWin.contentWindow.document;
+
+				formSubmit2($document,formId,index,tableId);
+
+			},
+			cancel: function(index){
+			}
+		});
+	}
+	function formSubmit2($document,inputForm,index,tableId){
+
+		var validateForm = $($document.getElementById(inputForm)).validate({
+			submitHandler: function(form){
+				loading('正在提交,请稍等...');
+				form.submit();
+			},
+			errorContainer: "#messageBox",
+			errorPlacement: function(error, element) {
+				$($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+				if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+					error.appendTo(element.parent().parent());
+				} else {
+					error.insertAfter(element);
+				}
+			}
+		});
+		if(validateForm.form()){
+			var action = $document.getElementById(inputForm).action;
+			var handleInfo = $($document.getElementById(inputForm)).serialize();
+			$.ajax({
+				type : "POST",
+				url : action,
+				data : handleInfo,
+				//请求成功
+				success:function(data) {
+					var d = data;
+					//输出提示信息
+					if(d.str.length>0){
+						parent.layer.msg(d.str,{icon:1});
+					}
+					$("#"+tableId).load(location.href + " #"+tableId);
+					//关闭当前页
+					top.layer.close(index)
+				}
+			});
+		}
+	}
+
+
+	//新增行方法
+	var fileAttachmentTpl = $("#fileAttachmentTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+	var gistdataTpl = $("#gistdataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+	var otherTpl = $("#otherTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+	var caseBaseTpl = $("#caseBaseTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+
+	function formAttachment(title,url,width,height,target,formId,divId){
+		var rows = $(this).parent().prevAll().length + 1;
+		var frameIndex = parent.layer.getFrameIndex(window.name);
+		var urls = url;
+		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			width='auto';
+			height='auto';
+		}else{//如果是PC端,根据用户设置的width和height显示。
+
+		}
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			skin:"two-btns",
+			maxmin: false, //开启最大化最小化按钮
+			content: urls ,
+			btn: ['确定','关闭'],
+			yes: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				inputForm.attr("action","${ctx}/projectTemplate/projectTemplate/getProjectTemplateInfo");//表单提交成功后,从服务器返回的url在当前tab中展示
+				var $document = iframeWin.contentWindow.document;
+				formSubmitAjax($document,formId,index,divId);
+
+			},
+			cancel: function(index){
+			}
+		});
+	}
+	function formSubmitAjax($document,inputForm,index,divId){
+		var validateForm = $($document.getElementById(inputForm)).validate({
+			submitHandler: function(form){
+				loading('正在提交,请稍等...');
+				form.submit();
+			},
+			errorContainer: "#messageBox",
+			errorPlacement: function(error, element) {
+				$($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+				if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+					error.appendTo(element.parent().parent());
+				} else {
+					error.insertAfter(element);
+				}
+			}
+		});
+		if(validateForm.form()){
+			$($document.getElementById(inputForm)).ajaxSubmit({
+				success:function(data) {
+					if(!data.success){
+						top.layer.msg("保存依据资料信息异常!",{icon:2});
+						return false;
+					}
+					var idx = ''
+					if(divId == 'file_attachment'){
+						idx = $("#file_attachment tr").length;
+						addRowBaseData("#file_attachment",idx,fileAttachmentTpl,data.body.projectAccessoryInfo);
+					}else if(divId == 'file_gistdata'){
+						idx = $("#file_gistdata tr").length;
+						addRowBaseData("#file_gistdata",idx,gistdataTpl,data.body.projectAccessoryInfo);
+					}else if(divId == 'file_other'){
+						idx = $("#file_other tr").length;
+						addRowBaseData("#file_other",idx,otherTpl,data.body.projectAccessoryInfo);
+					}else if(divId == 'file_caseBase'){
+						idx = $("#file_caseBase tr").length;
+						addRowBaseData("#file_caseBase",idx,caseBaseTpl,data.body.projectAccessoryInfo);
+					}
+					parent.layer.msg(data.msg,{icon:1});
+					top.layer.close(index)
+				}
+			});
+		}
+	}
+
+
+	function hasInArr(id,idArr) {
+		for(var i=0;i<idArr.length;i++){
+			if(id==$(idArr[i]).val()){
+				return true;
+			}
+		}
+		return false;
+	}
+	function existBaseData(id,length) {
+		for (var i=0;i<length;i++) {
+			var val = $('#file_attachment'+i+'_id').val();
+			if(id==val){
+				return true;
+			}
+		}
+		return false;
+	}
+
+	function addRowBaseData(list, idx, tpl, row){
+		bornTemplete(list, idx, tpl, row, idx);
+	}
+
+	function bornTemplete(list, idx, tpl, row, idx1){
+		var idx1 = '';
+		if(list == 'file_attachment'){
+			idx1 = $("#file_attachment tr").length +1;
+		}else if(list == 'file_gistdata'){
+			idx1 = $("#file_gistdata tr").length +1;
+		}else if(list == 'file_other'){
+			idx1 = $("#file_other tr").length +1;
+		}else if(list == 'file_caseBase'){
+			idx1 = $("#file_caseBase tr").length +1;
+		}
+
+		$(list).append(Mustache.render(tpl, {
+			idx: idx, delBtn: true, row: row,
+			order:idx1 + 1, idx1:idx1
+		}));
+		$(list+idx).find("select").each(function(){
+			$(this).val($(this).attr("data-value"));
+		});
+		$(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+			var ss = $(this).attr("data-value").split(',');
+			for (var i=0; i<ss.length; i++){
+				if($(this).val() == ss[i]){
+					$(this).attr("checked","checked");
+				}
+			}
+		});
+	}
+	function delRowBaseData(obj, prefix,userId){
+		var id = $(prefix+"_id").val();
+		var currentUser = '${fns:getUser().id}';
+		var contentId = '${projectcontentinfo.projectContentData.id}';
+		console.log(contentId);
+		var condition = "${flag}";
+		$.ajax({
+			type:"post",
+			url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
+			data:{"contentId":contentId,"basedId":id,"condition":condition},
+			dataType:"json",
+			success:function(data){
+				if(data.success) {
+					if("according" == condition || "completion" == condition || "early" == condition || "claim" == condition || "design" == condition || "visa" == condition || "interim" == condition || "distribution" == condition || "material" == condition || "armor" == condition ){
+						$(obj).parent().parent().remove();
+					}else{
+						$(obj).parent().parent().remove();
+					}
+					if(data.body.inuse){
+						return;
+					}
+					if (currentUser == userId) {
+						confirmDelete('是否同步删除资料库的文件?','${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+id+'&id=${projectcontentinfo.id}&type=1');
+					}
+				}else {
+					top.layer.msg("删除依据资料失败!", {icon: 0});
+				}
+			}
+		})
+		return;
+	}
+
+	function delBaseData(obj, prefix,userId){
+		var id = $(prefix+"_id").val();
+		var currentUser = '${fns:getUser().id}';
+		var contentId = '${projectcontentinfo.projectContentData.id}';
+		console.log(contentId);
+		var condition = "${flag}";
+		$.ajax({
+			type:"post",
+			url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
+			data:{"contentId":contentId,"basedId":id,"condition":condition},
+			dataType:"json",
+			success:function(data){
+				if(data.success) {
+					if("according" == condition || "completion" == condition || "early" == condition || "claim" == condition || "design" == condition || "visa" == condition || "interim" == condition || "distribution" == condition || "material" == condition || "armor" == condition ){
+						$(obj).parent().parent().parent().remove();
+					}else{
+						$(obj).parent().parent().remove();
+					}
+					if(data.body.inuse){
+						return;
+					}
+					if (currentUser == userId) {
+						confirmDelete('是否同步删除资料库的文件?','${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+id+'&id=${projectcontentinfo.id}&type=1');
+					}
+				}else {
+					top.layer.msg("删除依据资料失败!", {icon: 0});
+				}
+			}
+		})
+		return;
+	}
+
+	function confirmDelete(mess, href){
+		top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
+			if (typeof href == 'function') {
+				href();
+			}else{
+				$.ajax({
+					url:href,
+					type:"post",
+					success:function(data){
+						if(data.success){
+							top.layer.msg("删除依据资料成功!", {icon: 0});
+						}
+					}
+				});
+			}
+			top.layer.close(index);
+		});
+		return false;
+	}
+</script>
+</body>
+</html>

+ 4 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/projectRecordDescriptionVew2.jsp

@@ -112,6 +112,10 @@
                 <li><a href="${ctx}/ruralProject/ruralProjectView/paperView?projectId=${ruralProjectRecords.id}&submitMoney=${ruralProjectRecords.submitMoney}">纸质归档信息</a></li>
                 <li><a href="${ctx}/ruralProject/ruralProjectView/getReportedView?projectId=${ruralProjectRecords.id}&id=${reportedId}">上报信息</a></li>
                 <li class="active"><a href="${ctx}/projectReportDefectRecord/projectReportDefectRecord/formDescription2?reportId=${ruralProjectRecords.prdId}">资料缺失说明</a></li>
+
+                <c:if test="${projectRecords.caseStatus == '5'}">
+                    <li><a href="${ctx}/ruralProject/RuralProjectRecordsOwnCaseBase/formCaseBase?reportId=${ruralProjectRecords.id}&view=view">案例信息</a></li>
+                </c:if>
             </ul>
         </div>
     </div>

+ 3 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/subProjectInfo/subProjectInfoList.jsp

@@ -264,6 +264,9 @@
 			<c:if test="${projectRecords.defectRecordStatus != '0'}">
 				<li><a href="${ctx}/projectReportDefectRecord/projectReportDefectRecord/formDescription2?reportId=${projectRecords.prdId}">资料缺失说明</a></li>
 			</c:if>
+			<c:if test="${projectRecords.caseStatus == '5'}">
+				<li><a href="${ctx}/ruralProject/RuralProjectRecordsOwnCaseBase/formCaseBase?reportId=${projectRecords.id}&view=view">案例信息</a></li>
+			</c:if>
 		</ul>
 <%--		<ul class="list-tabs" >--%>
 <%--			<li><a href="${ctx}/ruralProject/ruralProjectView/view?id=${projectRecords.id}">项目详情</a></li>--%>

+ 3 - 179
src/main/webapp/webpage/modules/ruralprojectrecords/view/projectAccessoryView.jsp

@@ -88,6 +88,9 @@
 			<c:if test="${projectRecords.defectRecordStatus != '0'}">
 				<li><a href="${ctx}/projectReportDefectRecord/projectReportDefectRecord/formDescription2?reportId=${projectRecords.prdId}">资料缺失说明</a></li>
 			</c:if>
+			<c:if test="${projectRecords.caseStatus == '5'}">
+				<li><a href="${ctx}/ruralProject/RuralProjectRecordsOwnCaseBase/formCaseBase?reportId=${projectRecords.id}&view=view">案例信息</a></li>
+			</c:if>
 		</ul>
 	</div>
 	</div>
@@ -635,185 +638,6 @@
 				</div>
 			</div>
 
-
-			<c:if test="${projectRecords.caseStatus == '5'}">
-				<div class="form-group layui-row">
-					<div class="form-group-label"><h2>案例文件</h2></div>
-					<div id="addFile_caseBase" style="display: none" class="upload-progress">
-						<span id="fileName_caseBase" ></span>
-						<span id="_caseBase" ></span>
-						<b><span id="baifenbi_caseBase" ></span></b>
-						<div class="progress">
-							<div id="jindutiao_caseBase" class="progress-bar" style="width: 0%" aria-valuenow="0">
-							</div>
-						</div>
-					</div>
-					<input id="caseBase_file" type="file" name="caseBase_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
-					<span id="caseBase_title"></span>
-					<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-						<table id="upTable_caseBase" class="table table-bordered table-condensed">
-							<thead>
-							<tr>
-								<th width="20%">文件要求</th>
-								<th width="30%">文件描述/文件</th>
-								<th width="20%">文件类型</th>
-								<th width="160px">上传时间</th>
-								<th width="120px">文件大小(M)</th>
-								<th width="180px">操作</th>
-							</tr>
-							</thead>
-							<tbody id="file_caseBase">
-							<c:forEach items="${projectcontentinfo.fileCaseBaseList}" var = "fileCaseBase" varStatus="status">
-								<tr id="${fileCaseBase.id}" pid="${fileCaseBase.parent.id}">
-										<%-- <td>${status.index + 1}</td>--%>
-									<c:choose>
-										<c:when test="${fileCaseBase.mustFlag == 1}">
-											<td class="tabMove"  style="text-align:left;"><span style="color: red">* </span>${fileCaseBase.attachName}<input type="hidden" value="${fileCaseBase.attachName}"/></td>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fileCaseBase.flag == 0}">
-													<td class="tabMove"  style="text-align:left;">${fileCaseBase.attachName}<input type="hidden" value="${fileCaseBase.attachName}"/></td>
-												</c:when>
-												<c:otherwise>
-													<td></td>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-									<td>
-										<c:choose>
-											<c:when test="${fileCaseBase.flag == 0}">
-												<%--													<div style="overflow: hidden"><span class="file_nei">内容:</span><div class="file_neirong">${fileOther.attachName}</div></div>--%>
-												<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileCaseBase.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileCaseBase.attachTypes}</div>
-											</c:when>
-											<c:otherwise>
-												<c:choose>
-													<c:when test="${projectcontentinfo.uploadMode == 2}">
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(fileCaseBase.attachName,'jpg')
-															   or fn:containsIgnoreCase(fileCaseBase.attachName,'png')
-															   or fn:containsIgnoreCase(fileCaseBase.attachName,'gif')
-															   or fn:containsIgnoreCase(fileCaseBase.attachName,'bmp')
-															   or fn:containsIgnoreCase(fileCaseBase.attachName,'jpeg')}">
-																<img src="${fileCaseBase.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileCaseBase.temporaryUrl}','90%','90%')" alt="${fileCaseBase.attachName}">
-															</c:when>
-															<c:otherwise>
-																<c:choose>
-																	<c:when test="${fn:containsIgnoreCase(fileCaseBase.attachName,'pdf')}">
-																		<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileCaseBase.temporaryUrl}',1)">${fileCaseBase.attachName} ; </a>
-																	</c:when>
-																	<c:otherwise>
-																		<c:choose>
-																			<c:when test="${fn:containsIgnoreCase(fileCaseBase.attachName,'rar')
-																						   or fn:containsIgnoreCase(fileCaseBase.attachName,'zip')
-																						   or fn:containsIgnoreCase(fileCaseBase.attachName,'jar')
-																						   or fn:containsIgnoreCase(fileCaseBase.attachName,'7z')}">
-																				<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileCaseBase.temporaryUrl}',3)">${fileCaseBase.attachName}</a>
-																			</c:when>
-																			<c:otherwise>
-																				<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileCaseBase.temporaryUrl}',2)">${fileCaseBase.attachName}</a>
-																			</c:otherwise>
-																		</c:choose>
-																	</c:otherwise>
-																</c:choose>
-															</c:otherwise>
-														</c:choose>
-													</c:when>
-													<c:otherwise>
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(fileCaseBase.attachName,'jpg')
-																					   or fn:containsIgnoreCase(fileCaseBase.attachName,'png')
-																					   or fn:containsIgnoreCase(fileCaseBase.attachName,'gif')
-																					   or fn:containsIgnoreCase(fileCaseBase.attachName,'bmp')
-																					   or fn:containsIgnoreCase(fileCaseBase.attachName,'jpeg')}">
-																<img src="${fileCaseBase.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileCaseBase.url}','90%','90%')" alt="${fileCaseBase.attachName}">
-															</c:when>
-															<c:otherwise>
-																<c:choose>
-																	<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-																		<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileCaseBase.url}',1)">${fileCaseBase.attachName} ; </a>
-																	</c:when>
-																	<c:otherwise>
-																		<c:choose>
-																			<c:when test="${fn:containsIgnoreCase(fileCaseBase.attachName,'rar')
-																						   or fn:containsIgnoreCase(fileCaseBase.attachName,'zip')
-																						   or fn:containsIgnoreCase(fileCaseBase.attachName,'jar')
-																						   or fn:containsIgnoreCase(fileCaseBase.attachName,'7z')}">
-																				<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileCaseBase.url}',3)">${fileCaseBase.attachName}</a>
-																			</c:when>
-																			<c:otherwise>
-																				<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileCaseBase.url}',2)">${fileCaseBase.attachName}</a>
-																			</c:otherwise>
-																		</c:choose>
-																	</c:otherwise>
-																</c:choose>
-															</c:otherwise>
-														</c:choose>
-													</c:otherwise>
-												</c:choose>
-												<%--													<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileOther.url}','90%','90%')">${fileOther.attachName} ; </a>--%>
-											</c:otherwise>
-										</c:choose>
-									</td>
-
-
-									<c:choose>
-										<c:when test="${fileGistdata.flag == 0}">
-											<td class="op-td"></td>
-										</c:when>
-										<c:otherwise>
-											<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${fileCaseBase.description}')">${fileCaseBase.description}</td>
-										</c:otherwise>
-									</c:choose>
-									<td class="op-td" style="text-align:center;">
-										<c:choose>
-											<c:when test="${fileCaseBase.flag == 0}">
-												<div></div>
-											</c:when>
-											<c:otherwise>
-												<fmt:formatDate value="${fileCaseBase.createDate}" type="date"/>
-											</c:otherwise>
-										</c:choose>
-									</td>
-									<td>${fileCaseBase.fileSize}</td>
-									<td class="op-td" style="text-align:center;">
-										<div class="op-btn-box" >
-											<c:choose>
-												<c:when test="${fileCaseBase.flag == 0}">
-
-												</c:when>
-												<c:otherwise>
-													<%--附件下载删除--%>
-													<c:choose>
-														<c:when test="${projectcontentinfo.uploadMode == 2}">
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileCaseBase.attachName,'pdf')}">
-																	<a href="${fileCaseBase.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																</c:when>
-																<c:otherwise>
-																	<a href="${fileCaseBase.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																</c:otherwise>
-															</c:choose>
-														</c:when>
-														<c:otherwise>
-															<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileCaseBase.temporaryUrl}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-													<c:if test="${fileCaseBase.collectFlag != 1}">
-														<a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${fileCaseBase.url}','${fileCaseBase.createBy.id}','${fileCaseBase.fileSize}')" class="op-btn op-btn-delete"  style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-													</c:if>
-												</c:otherwise>
-											</c:choose>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-							</tbody>
-						</table>
-					</div>
-				</div>
-			</c:if>
 		<div class="form-group layui-row page-end"></div>
 		</form:form>
 	</div>

+ 6 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/view/projectPaperFilingView.jsp

@@ -106,6 +106,12 @@
 			<li><a href="${ctx}/ruralProject/ruralProjectView/formRecordModify?id=${projectRecords.id}">线上归档信息</a></li>
 			<li class="active"><a href="${ctx}/ruralProject/ruralProjectView/paperView?projectId=${projectRecords.id}&submitMoney=${projectRecords.submitMoney}">纸质归档信息</a></li>
 			<li><a href="${ctx}/ruralProject/ruralProjectView/getReportedView?projectId=${projectRecords.id}&id=${reportedId}">上报信息</a></li>
+			<c:if test="${projectRecords.defectRecordStatus != '0'}">
+				<li><a href="${ctx}/projectReportDefectRecord/projectReportDefectRecord/formDescription2?reportId=${projectRecords.prdId}">资料缺失说明</a></li>
+			</c:if>
+			<c:if test="${projectRecords.caseStatus == '5'}">
+				<li><a href="${ctx}/ruralProject/RuralProjectRecordsOwnCaseBase/formCaseBase?reportId=${projectRecords.id}&view=view">案例信息</a></li>
+			</c:if>
 		</ul>
 	</div>
 </div>

+ 3 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/view/projectPlanView.jsp

@@ -158,6 +158,9 @@
             <c:if test="${projectRecords.defectRecordStatus != '0'}">
                 <li><a href="${ctx}/projectReportDefectRecord/projectReportDefectRecord/formDescription2?reportId=${projectRecords.prdId}">资料缺失说明</a></li>
             </c:if>
+            <c:if test="${projectRecords.caseStatus == '5'}">
+                <li><a href="${ctx}/ruralProject/RuralProjectRecordsOwnCaseBase/formCaseBase?reportId=${projectRecords.id}&view=view">案例信息</a></li>
+            </c:if>
         </ul>
     </div>
     </div>

+ 3 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/view/projectReportRecordView.jsp

@@ -204,6 +204,9 @@
 				<c:if test="${projectRecords.defectRecordStatus != '0'}">
 					<li><a href="${ctx}/projectReportDefectRecord/projectReportDefectRecord/formDescription2?reportId=${projectRecords.prdId}">资料缺失说明</a></li>
 				</c:if>
+				<c:if test="${projectRecords.caseStatus == '5'}">
+					<li><a href="${ctx}/ruralProject/RuralProjectRecordsOwnCaseBase/formCaseBase?reportId=${projectRecords.id}&view=view">案例信息</a></li>
+				</c:if>
 			</ul>
 		</div>
 	</div>

+ 3 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/view/reportIssueView.jsp

@@ -178,6 +178,9 @@
 				<c:if test="${projectRecords.defectRecordStatus != '0'}">
 					<li><a href="${ctx}/projectReportDefectRecord/projectReportDefectRecord/formDescription2?reportId=${projectRecords.prdId}">资料缺失说明</a></li>
 				</c:if>
+				<c:if test="${projectRecords.caseStatus == '5'}">
+					<li><a href="${ctx}/ruralProject/RuralProjectRecordsOwnCaseBase/formCaseBase?reportId=${projectRecords.id}&view=view">案例信息</a></li>
+				</c:if>
 			</ul>
 		</div>
 	</div>

+ 3 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/view/reportView.jsp

@@ -314,6 +314,9 @@
 				<c:if test="${projectRecords.defectRecordStatus != '0'}">
 					<li><a href="${ctx}/projectReportDefectRecord/projectReportDefectRecord/formDescription2?reportId=${projectRecords.prdId}">资料缺失说明</a></li>
 				</c:if>
+				<c:if test="${projectRecords.caseStatus == '5'}">
+					<li><a href="${ctx}/ruralProject/RuralProjectRecordsOwnCaseBase/formCaseBase?reportId=${projectRecords.id}&view=view">案例信息</a></li>
+				</c:if>
 			</ul>
 		</div>
 	</div>

+ 3 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/view/reportedView.jsp

@@ -139,6 +139,9 @@
             <c:if test="${projectRecords.defectRecordStatus != '0'}">
                 <li><a href="${ctx}/projectReportDefectRecord/projectReportDefectRecord/formDescription2?reportId=${projectRecords.prdId}">资料缺失说明</a></li>
             </c:if>
+            <c:if test="${projectRecords.caseStatus == '5'}">
+                <li><a href="${ctx}/ruralProject/RuralProjectRecordsOwnCaseBase/formCaseBase?reportId=${projectRecords.id}&view=view">案例信息</a></li>
+            </c:if>
         </ul>
 <%--        <ul class="list-tabs" >--%>
 <%--            <li><a href="${ctx}/ruralProject/ruralProjectView/view?id=${projectRecords.id}">项目详情</a></li>--%>

+ 3 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/view/ruralProjectRecordsView.jsp

@@ -106,6 +106,9 @@
 			<c:if test="${projectRecords.defectRecordStatus != '0'}">
 				<li><a href="${ctx}/projectReportDefectRecord/projectReportDefectRecord/formDescription2?reportId=${projectRecords.prdId}">资料缺失说明</a></li>
 			</c:if>
+			<c:if test="${projectRecords.caseStatus == '5'}">
+				<li><a href="${ctx}/ruralProject/RuralProjectRecordsOwnCaseBase/formCaseBase?reportId=${projectRecords.id}&view=view">案例信息</a></li>
+			</c:if>
 		</ul>
 	</div>
 	</div>

+ 3 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/view/workClientAndContractView.jsp

@@ -37,6 +37,9 @@
             <c:if test="${projectRecords.defectRecordStatus != '0'}">
                 <li><a href="${ctx}/projectReportDefectRecord/projectReportDefectRecord/formDescription2?reportId=${projectRecords.prdId}">资料缺失说明</a></li>
             </c:if>
+            <c:if test="${projectRecords.caseStatus == '5'}">
+                <li><a href="${ctx}/ruralProject/RuralProjectRecordsOwnCaseBase/formCaseBase?reportId=${projectRecords.id}&view=view">案例信息</a></li>
+            </c:if>
         </ul>
     </div>
     </div>