Bladeren bron

Merge remote-tracking branch 'origin/master'

user5 4 jaren geleden
bovenliggende
commit
a6d4b4684d
24 gewijzigde bestanden met toevoegingen van 2411 en 496 verwijderingen
  1. 7 0
      src/main/java/com/jeeplus/modules/projectConstruction/dao/ContractDao.java
  2. 32 0
      src/main/java/com/jeeplus/modules/projectConstruction/entity/ProjectContractTree.java
  3. 14 0
      src/main/java/com/jeeplus/modules/projectConstruction/service/ContractService.java
  4. 69 37
      src/main/java/com/jeeplus/modules/projectConstruction/web/ContractController.java
  5. 0 19
      src/main/java/com/jeeplus/modules/projectDesignChange/dao/ProjectDesignChangeDao.java
  6. 0 20
      src/main/java/com/jeeplus/modules/projectDesignChange/entity/ProjectDesignChange.java
  7. 0 37
      src/main/java/com/jeeplus/modules/projectDesignChange/service/ProjectDesignChangeService.java
  8. 0 231
      src/main/java/com/jeeplus/modules/projectDesignChange/web/ProjectDesignChangeController.java
  9. 4 0
      src/main/java/com/jeeplus/modules/projectVisa/dao/ProjectVisaDao.java
  10. 21 0
      src/main/java/com/jeeplus/modules/projectVisa/service/ProjectVisaService.java
  11. 289 0
      src/main/java/com/jeeplus/modules/projectVisa/web/ProjectDesignController.java
  12. 3 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectContentDataService.java
  13. 25 0
      src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectRecordTreeData.java
  14. 18 0
      src/main/resources/mappings/modules/constructionContract/contractDao.xml
  15. 47 0
      src/main/resources/mappings/modules/projectrecord/stage/ProjectVisaDao.xml
  16. 555 0
      src/main/webapp/webpage/modules/projectConstruction/contractList.jsp
  17. 1 0
      src/main/webapp/webpage/modules/projectConstruction/projectConstructionForm.jsp
  18. 206 141
      src/main/webapp/webpage/modules/projectConstruction/projectConstructionList.jsp
  19. 480 0
      src/main/webapp/webpage/modules/projectrecord/implementStage/projectDesignForm.jsp
  20. 504 0
      src/main/webapp/webpage/modules/projectrecord/implementStage/projectDesignList.jsp
  21. 128 0
      src/main/webapp/webpage/modules/projectrecord/implementStage/projectDesignView.jsp
  22. 2 2
      src/main/webapp/webpage/modules/projectrecord/implementStage/projectVisaForm.jsp
  23. 3 3
      src/main/webapp/webpage/modules/projectrecord/implementStage/projectVisaList.jsp
  24. 3 6
      src/main/webapp/webpage/modules/projectrecord/implementStage/projectVisaView.jsp

+ 7 - 0
src/main/java/com/jeeplus/modules/projectConstruction/dao/ContractDao.java

@@ -23,6 +23,13 @@ public interface ContractDao extends CrudDao<ConstructionContract> {
     int queryCount(ConstructionContract constructionContract);
     int queryCount(ConstructionContract constructionContract);
 
 
     /**
     /**
+     * 根据项目id查询施工合同集合
+     * @param id
+     * @return
+     */
+    List<ConstructionContract> find(String id);
+
+    /**
      * 获取工程进度款信息集合
      * 获取工程进度款信息集合
      * @param constructionContract
      * @param constructionContract
      * @return
      * @return

+ 32 - 0
src/main/java/com/jeeplus/modules/projectConstruction/entity/ProjectContractTree.java

@@ -0,0 +1,32 @@
+package com.jeeplus.modules.projectConstruction.entity;
+
+import com.jeeplus.common.persistence.DataEntity;
+
+import java.util.List;
+
+public class ProjectContractTree extends DataEntity<ProjectContractTree> {
+    private String projectId;		// 项目编号
+    private String projectName;		// 项目名称
+    private String contractName;	// 合同名称
+    private String projectLeader;   // 负责人
+    private String projectRegistrant;   // 项目登记人
+    private String clientName;      // 主委托方
+    private Integer projectStatus;  // 项目状态
+    private String pid;             // 父id
+    private String loginId;         //登陆者id
+    private String createId;        //创建者id
+    private String status;          //状态
+    private String reportId;        //报告id
+    private String reportName;      //报告名称
+
+    private String contentPId;      //保留工作内容id
+
+    private String dictType;
+    private String parentIds;
+
+    private List<String> masterIdList;  //项目负责人集合
+    private Integer operationSign;   //操作标识
+    private String projectContentId;  //工作内容id
+    private String recordId;
+    private String reportRecordName;   //归档信息名称
+}

+ 14 - 0
src/main/java/com/jeeplus/modules/projectConstruction/service/ContractService.java

@@ -132,4 +132,18 @@ public class ContractService extends CrudService<ContractDao,ConstructionContrac
         }
         }
         return count;
         return count;
     }
     }
+
+    /**
+     * 根据项目id查询施工合同集合
+     * @param id
+     * @return
+     */
+    @Transactional(readOnly = true)
+    public List<ConstructionContract> find(String id) {
+        if(StringUtils.isNotEmpty(id)){
+            return  contractDao.find(id);
+        }else{
+            return null;
+        }
+    }
 }
 }

+ 69 - 37
src/main/java/com/jeeplus/modules/projectConstruction/web/ContractController.java

@@ -22,6 +22,7 @@ import com.jeeplus.modules.projectConstruction.service.ContractService;
 import com.jeeplus.modules.projectType.entity.ProjectTemplateType;
 import com.jeeplus.modules.projectType.entity.ProjectTemplateType;
 import com.jeeplus.modules.projectType.service.ProjectResultsFileTemplateService;
 import com.jeeplus.modules.projectType.service.ProjectResultsFileTemplateService;
 import com.jeeplus.modules.projectType.service.ProjectTypeService;
 import com.jeeplus.modules.projectType.service.ProjectTypeService;
+import com.jeeplus.modules.projectVisa.entity.ProjectVisa;
 import com.jeeplus.modules.projectcontentinfo.entity.*;
 import com.jeeplus.modules.projectcontentinfo.entity.*;
 import com.jeeplus.modules.projectcontentinfo.service.*;
 import com.jeeplus.modules.projectcontentinfo.service.*;
 import com.jeeplus.modules.projectcontroltable.entity.ProjectControlTable;
 import com.jeeplus.modules.projectcontroltable.entity.ProjectControlTable;
@@ -96,7 +97,7 @@ public class ContractController extends BaseController {
     @Autowired
     @Autowired
     private ProjectcontentinfoService projectcontentinfoService;
     private ProjectcontentinfoService projectcontentinfoService;
 
 
-    @ModelAttribute
+    /*@ModelAttribute
     public ConstructionContract get(@RequestParam(required=false) String id) {
     public ConstructionContract get(@RequestParam(required=false) String id) {
         ConstructionContract entity = null;
         ConstructionContract entity = null;
         if (StringUtils.isNotBlank(id)){
         if (StringUtils.isNotBlank(id)){
@@ -106,18 +107,36 @@ public class ContractController extends BaseController {
             entity = new ConstructionContract();
             entity = new ConstructionContract();
         }
         }
         return entity;
         return entity;
-    }
+    }*/
+    /*@ModelAttribute
+    public ProjectImplementEarly get(@RequestParam(required=false) String id) {
+        ProjectImplementEarly entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = projectImplementEarlyService.get(id);
+        }
+        if (entity == null){
+            entity = new ProjectImplementEarly();
+        }
+        return entity;
+    }*/
 
 
     /**
     /**
      * 项目列表页面
      * 项目列表页面
      */
      */
     @RequiresPermissions("project:constructionContract:list")
     @RequiresPermissions("project:constructionContract:list")
     @RequestMapping(value = {"list", ""})
     @RequestMapping(value = {"list", ""})
-    public String list(ConstructionContract constructionContract, HttpServletRequest request, HttpServletResponse response, Model model) {
-        if(UserUtils.isManager()){
+    public String list(ProjectImplementEarly projectRecords, HttpServletRequest request, HttpServletResponse response, Model model) {
+        /*if(UserUtils.isManager()){
             model.addAttribute("flag","1");
             model.addAttribute("flag","1");
         }
         }
         Page<ConstructionContract> page = contractService.findPage(new Page<ConstructionContract>(request, response), constructionContract);
         Page<ConstructionContract> page = contractService.findPage(new Page<ConstructionContract>(request, response), constructionContract);
+        model.addAttribute("page", page);*/
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
+        }
+        Page<ProjectImplementEarly> page = projectImplementEarlyService.findProjectPage(new Page<ProjectImplementEarly>(request, response), projectRecords);
+        //无合同状态下,获取委托方的名称
+        List<ProjectImplementEarly> list = page.getList();
         model.addAttribute("page", page);
         model.addAttribute("page", page);
         return "modules/projectConstruction/projectConstructionList";
         return "modules/projectConstruction/projectConstructionList";
     }
     }
@@ -148,7 +167,7 @@ public class ContractController extends BaseController {
                 }
                 }
             }
             }
             //将界面需要展示数据放入类中
             //将界面需要展示数据放入类中
-            projectRecordTreeData.setId(records1.getId());
+            projectRecordTreeData.setId(records1.getId());//获取项目id
             projectRecordTreeData.setProjectName(records1.getProjectName());
             projectRecordTreeData.setProjectName(records1.getProjectName());
             projectRecordTreeData.setProjectId(records1.getProjectId());
             projectRecordTreeData.setProjectId(records1.getProjectId());
             projectRecordTreeData.setProjectContentId(records1.getProjectContentId());
             projectRecordTreeData.setProjectContentId(records1.getProjectContentId());
@@ -192,44 +211,35 @@ public class ContractController extends BaseController {
             projectRecordTreeData.setLoginId(UserUtils.getUser().getId());
             projectRecordTreeData.setLoginId(UserUtils.getUser().getId());
             projectRecordTreeDataList.add(projectRecordTreeData);
             projectRecordTreeDataList.add(projectRecordTreeData);
 
 
-            //获取阶段Type父节点信息
-            String projectType = projectImplementEarlyService.getProjectType(records1.getProjectTypeId(), "实施前期");
-            //根据项目id查询相关的项目阶段内容
-            List<ProjectRecordTreeData> reportDataList = projectContentDataService.getProjectContentDataList(records1.getId(),projectType);
-            if(0 != reportDataList.size()){
-                Projectcontentinfo select = new Projectcontentinfo();
-                ProjectRecords project = new ProjectRecords();
-                project.setId(records1.getId());
-                select.setParentIds("0,");
-                select.setProject(project);
-                List<Projectcontentinfo> p = projectcontentinfoService.findListByProject(select);
-                for (ProjectRecordTreeData reportData : reportDataList) {
-                    //添加工作内容id
-                    if(p.size()>0){
-                        reportData.setContentPId(p.get(0).getId());
-                        reportData.setParentIds("0,");
-                        reportData.setDictType("");
-                    }
-                    //将项目所属类型名称放入树形列表的projectId中
-                    reportData.setProjectId(reportData.getProjectLeader());
-                    //添加项目负责人
-                    reportData.setProjectLeader(projectLeader);
-                    //添加登陆者id
-                    reportData.setLoginId(UserUtils.getUser().getId());
-                    reportData.setCreateId(records1.getCreateBy().getId());
+            //根据项目id查询合同的集合
+            List<ConstructionContract> contractList = contractService.find(records1.getId());
+            if(0 != contractList.size()){
+                for(int j=0;j<contractList.size();j++){
+                    ProjectRecordTreeData treeNew=new ProjectRecordTreeData();
+                    ConstructionContract contract=contractList.get(j);
+                    treeNew.setId(contract.getId()); //合同Id
+
+                    treeNew.setPid(records1.getId());//子类父id也就是项目Id
+                    treeNew.setProjectId(contract.getCnumber());
+                    treeNew.setProjectName(contract.getContractName());
+                    treeNew.setContCate(contract.getContCate());
+                    treeNew.setTrueAmt(contract.getTrueAmt());
+                    treeNew.setProjectLeader(projectLeader);
+                    treeNew.setProjectRegistrant(contract.getCreateName());
+                    treeNew.setCreateDate(contract.getCreateDate());
                     //如果当前登录人为项目登记者或项目负责人则允许其添加子节点信息
                     //如果当前登录人为项目登记者或项目负责人则允许其添加子节点信息
                     for (String masterId : masterIdList) {
                     for (String masterId : masterIdList) {
                         if(masterId.equals(UserUtils.getUser().getId())){
                         if(masterId.equals(UserUtils.getUser().getId())){
-                            reportData.setOperationSign(1);
+                            treeNew.setOperationSign(1);
                             break;
                             break;
                         }else{
                         }else{
-                            reportData.setOperationSign(0);
+                            treeNew.setOperationSign(0);
                         }
                         }
+
                     }
                     }
+                    projectRecordTreeDataList.add(treeNew);
                 }
                 }
             }
             }
-            projectRecordTreeDataList.addAll(reportDataList);
-
         }
         }
         map.put("data",projectRecordTreeDataList);
         map.put("data",projectRecordTreeDataList);
         return map;
         return map;
@@ -267,7 +277,7 @@ public class ContractController extends BaseController {
      * @param model
      * @param model
      * @return
      * @return
      */
      */
-    @RequiresPermissions(value={"project:constructionContract:view"})
+    /*@RequiresPermissions(value={"project:constructionContract:view"})*/
     @RequestMapping(value = "view")
     @RequestMapping(value = "view")
     public String view(ConstructionContract constructionContract, Model model) {
     public String view(ConstructionContract constructionContract, Model model) {
         constructionContract = contractService.get(constructionContract.getId());
         constructionContract = contractService.get(constructionContract.getId());
@@ -285,7 +295,7 @@ public class ContractController extends BaseController {
     /**
     /**
      * 添加合同数据
      * 添加合同数据
      */
      */
-    @RequiresPermissions(value={"project:constructionContract:add","project:constructionContract:edit"})
+    /*@RequiresPermissions(value={"project:constructionContract:add","project:constructionContract:edit"})*/
     @RequestMapping(value = "save")
     @RequestMapping(value = "save")
     public String save(ConstructionContract constructionContract, Model model, RedirectAttributes redirectAttributes) {
     public String save(ConstructionContract constructionContract, Model model, RedirectAttributes redirectAttributes) {
         contractService.insertContract(constructionContract);
         contractService.insertContract(constructionContract);
@@ -306,9 +316,31 @@ public class ContractController extends BaseController {
     /**
     /**
      * 删除工程款信息
      * 删除工程款信息
      */
      */
-    @RequestMapping(value = "delete")
+    /*@RequestMapping(value = "delete")
     public String delete(ConstructionContract constructionContract) {
     public String delete(ConstructionContract constructionContract) {
+
         contractService.delete(constructionContract);
         contractService.delete(constructionContract);
         return "redirect:"+ Global.getAdminPath()+"/project/constructionContract/?repage";
         return "redirect:"+ Global.getAdminPath()+"/project/constructionContract/?repage";
+    }*/
+
+    /**
+     * 删除依据性资料
+     */
+    @RequestMapping(value = "delete")
+    @ResponseBody
+    public Map<String,Object> delete(ConstructionContract constructionContract, RedirectAttributes redirectAttributes) {
+        Map<String,Object> j= new HashMap<>();
+        try {
+            contractService.delete(constructionContract);
+            j.put("status",true);
+            j.put("msg","删除成功");
+            addMessage(redirectAttributes, "删除成功");
+        }catch (Exception e){
+            j.put("status",false);
+            j.put("msg","删除失败");
+            addMessage(redirectAttributes, "删除失败");
+        }
+        return j;
     }
     }
+
 }
 }

+ 0 - 19
src/main/java/com/jeeplus/modules/projectDesignChange/dao/ProjectDesignChangeDao.java

@@ -1,19 +0,0 @@
-package com.jeeplus.modules.projectDesignChange.dao;
-
-import com.jeeplus.common.persistence.CrudDao;
-import com.jeeplus.modules.projectDesignChange.entity.ProjectDesignChange;
-import com.jeeplus.modules.projectVisa.entity.ProjectVisa;
-
-import java.util.List;
-
-public interface ProjectDesignChangeDao extends CrudDao<ProjectDesignChange> {
-
-
-    Integer getProjectVisaCount(ProjectDesignChange projectDesignChange);
-
-    List<ProjectDesignChange> getProjectVisaList(ProjectDesignChange projectDesignChange);
-
-
-
-
-}

+ 0 - 20
src/main/java/com/jeeplus/modules/projectDesignChange/entity/ProjectDesignChange.java

@@ -1,20 +0,0 @@
-package com.jeeplus.modules.projectDesignChange.entity;
-
-import com.jeeplus.common.persistence.DataEntity;
-
-import java.util.Date;
-
-/**
- * 实施阶段-签证汇总
- */
-public class ProjectDesignChange extends DataEntity<ProjectDesignChange> {
-
-    private String contractId;//实施阶段合同Id
-    private String visaNumber;//签证编号
-    private Date  visaDate;//签证时间
-    private String visaContent;//签证内容
-    private String sendMoney;//送审金额
-
-    private String confirmMoney;//定审金额
-
-}

+ 0 - 37
src/main/java/com/jeeplus/modules/projectDesignChange/service/ProjectDesignChangeService.java

@@ -1,37 +0,0 @@
-package com.jeeplus.modules.projectDesignChange.service;
-
-import com.jeeplus.common.service.CrudService;
-import com.jeeplus.modules.projectDesignChange.dao.ProjectDesignChangeDao;
-import com.jeeplus.modules.projectDesignChange.entity.ProjectDesignChange;
-import com.jeeplus.modules.projectVisa.dao.ProjectVisaDao;
-import com.jeeplus.modules.projectVisa.entity.ProjectVisa;
-
-/*@Service
-@Transactional(readOnly = true)*/
-public class ProjectDesignChangeService extends CrudService<ProjectDesignChangeDao, ProjectDesignChange> {
-
-    /*@Autowired
-    private ProjectVisaDao projectVisaDao;
-
-
-
-
-    public ProjectVisa get(String id) {
-        return super.get(id);
-    }
-
-    public Page<ProjectVisa> findProjectPage(Page<ProjectVisa> page, ProjectVisa projectVisa) {
-        //设置数据权限
-        if(!UserUtils.getUser().isAdmin()) {
-            String dataScopeSql = dataScopeFilterOR(projectVisa.getCurrentUser(), "o", "u", "s", MenuStatusEnum.WORK_RECORDS.getValue());
-            projectVisa.getSqlMap().put("dsf", dataScopeSql);
-        }
-        Integer count = dao.getProjectVisaCount(projectVisa);
-        page.setCount(count);
-        page.setCountFlag(false);
-        projectVisa.setPage(page);
-        List<ProjectVisa> recordsList = dao.getProjectVisaList(projectVisa);
-
-        return page;
-    }*/
-}

+ 0 - 231
src/main/java/com/jeeplus/modules/projectDesignChange/web/ProjectDesignChangeController.java

@@ -1,231 +0,0 @@
-package com.jeeplus.modules.projectDesignChange.web;
-
-import com.jeeplus.common.persistence.Page;
-import com.jeeplus.common.utils.StringUtils;
-import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
-import com.jeeplus.modules.projectcontentinfo.service.ProjectContentDataService;
-import com.jeeplus.modules.projectcontentinfo.service.ProjectcontentinfoService;
-import com.jeeplus.modules.projectrecord.entity.ProjectImplementEarly;
-import com.jeeplus.modules.projectrecord.entity.ProjectRecordTreeData;
-import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
-import com.jeeplus.modules.projectrecord.service.ProjectImplementEarlyService;
-import com.jeeplus.modules.sys.entity.Area;
-import com.jeeplus.modules.sys.entity.User;
-import com.jeeplus.modules.sys.utils.UserUtils;
-import com.jeeplus.modules.workclientinfo.entity.WorkClientInfo;
-import com.jeeplus.modules.workclientinfo.entity.WorkClientLinkman;
-import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
-import org.apache.shiro.authz.annotation.RequiresPermissions;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.ModelAttribute;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.util.*;
-
-//实施阶段-签证汇总
-@Controller
-@RequestMapping(value = "${adminPath}/project/projectDesignChange")
-public class ProjectDesignChangeController {
-
-    /*@Autowired
-    private ProjectVisaService projectVisaService;*/
-    @Autowired
-    private ProjectImplementEarlyService projectImplementEarlyService;
-    @Autowired
-    private ProjectContentDataService projectContentDataService;
-    @Autowired
-    private ProjectcontentinfoService projectcontentinfoService;
-
-
-    /*@ModelAttribute
-    public ProjectVisa get(@RequestParam(required=false) String id) {
-        ProjectVisa entity = null;
-        if (StringUtils.isNotBlank(id)){
-            entity = projectVisaService.get(id);
-        }
-        if (entity == null){
-            entity = new ProjectVisa();
-        }
-        return entity;
-    }*/
-    @ModelAttribute
-    public ProjectImplementEarly get(@RequestParam(required=false) String id) {
-        ProjectImplementEarly entity = null;
-        if (StringUtils.isNotBlank(id)){
-            entity = projectImplementEarlyService.get(id);
-        }
-        if (entity == null){
-            entity = new ProjectImplementEarly();
-        }
-        return entity;
-    }
-
-    /**
-     * 签证汇总表列表页面
-     */
-    @RequiresPermissions("project:projectDesignChange:list")
-    @RequestMapping(value = {"list", ""})
-    public String list(ProjectImplementEarly projectRecords, HttpServletRequest request, HttpServletResponse response, Model model) {
-        if(UserUtils.isManager()){
-            model.addAttribute("flag","1");
-        }
-        Page<ProjectImplementEarly> page = projectImplementEarlyService.findProjectPage(new Page<ProjectImplementEarly>(request, response), projectRecords);
-        //无合同状态下,获取委托方的名称
-        List<ProjectImplementEarly> list = page.getList();
-        model.addAttribute("page", page);
-        return "modules/projectrecord/implementStage/projectDesignChangeList";
-    }
-
-    /**
-     * 签证汇总表列表页面
-     *//*
-    @RequiresPermissions("project:projectVisa:list")
-    @RequestMapping(value = {"list", ""})
-    public String list(ProjectVisa projectVisa, HttpServletRequest request, HttpServletResponse response, Model model) {
-        if(UserUtils.isManager()){
-            model.addAttribute("flag","1");
-        }
-        Page<ProjectVisa> page = projectVisaService.findProjectPage(new Page<ProjectVisa>(request, response), projectVisa);
-        //无合同状态下,获取委托方的名称
-        List<ProjectVisa> list = page.getList();
-        model.addAttribute("page", page);
-        return "modules/projectrecord/implementEarly/projectImplementEarlyList";
-    }*/
-
-    /**
-     * 项目列表页面
-     */
-    @RequestMapping(value = "getVisaList")
-    @ResponseBody
-    public Map<String,List> getVisaList(ProjectImplementEarly projectRecords, HttpServletRequest request, HttpServletResponse response, Model model) {
-        if(UserUtils.isManager()){
-            model.addAttribute("flag","1");
-        }
-        Page<ProjectImplementEarly> page = projectImplementEarlyService.findProjectPage(new Page<ProjectImplementEarly>(request, response), projectRecords);
-        //无合同状态下,获取委托方的名称
-        List<ProjectImplementEarly> list = page.getList();
-        List<ProjectRecordTreeData> projectRecordTreeDataList = new ArrayList<>();
-        Map<String,List> map = new HashMap<>();
-        for (int i = 0; i < list.size(); i++) {
-            ProjectRecordTreeData projectRecordTreeData = new ProjectRecordTreeData();
-            ProjectImplementEarly records1 = list.get(i);
-            if (records1.getWorkContractInfo() == null) {
-                if (records1.getWorkClientLinkmanList() != null && records1.getWorkClientLinkmanList().size() > 0) {
-                    WorkClientLinkman linkman = records1.getWorkClientLinkmanList().get(0);
-                    WorkContractInfo contractInfo = new WorkContractInfo();
-                    contractInfo.setClient(linkman.getClientId());
-                    records1.setWorkContractInfo(contractInfo);
-                }
-            }
-            //将界面需要展示数据放入类中
-            projectRecordTreeData.setId(records1.getId());
-            projectRecordTreeData.setProjectName(records1.getProjectName());
-            projectRecordTreeData.setProjectId(records1.getProjectId());
-            projectRecordTreeData.setProjectContentId(records1.getProjectContentId());
-            if(null!= records1.getWorkContractInfo()){
-                projectRecordTreeData.setContractName(records1.getWorkContractInfo().getName());
-                projectRecordTreeData.setClientName(records1.getWorkContractInfo().getClient().getName());
-            }else{
-                projectRecordTreeData.setContractName("");
-                projectRecordTreeData.setClientName("");
-            }
-            projectRecordTreeData.setProjectStatus(records1.getProjectStatus());
-            projectRecordTreeData.setProjectRegistrant(records1.getProjectRegistrant());
-            projectRecordTreeData.setCreateDate(records1.getCreateDate());
-            projectRecordTreeData.setCreateId(records1.getCreateBy().getId());
-            //父节点的pid设置为0
-            projectRecordTreeData.setPid("0");
-            //遍历项目负责人信息
-            List<User> masterUserList = records1.getProjectLeaders();
-            List<String> masterList = new ArrayList<>();
-            Set masterIdSet = new HashSet();
-            for (User masterUser:masterUserList) {
-                masterList.add(masterUser.getName());
-                masterIdSet.add(masterUser.getId());
-            }
-            //masterIdSet.add(records1.getCreateBy().getId());
-            //Set转List
-            List<String> masterIdList = new ArrayList<>(masterIdSet);
-            //如果当前登录人为项目登记者或项目负责人则允许其添加子节点信息
-            for (String masterId : masterIdList) {
-                if(masterId.equals(UserUtils.getUser().getId())){
-                    projectRecordTreeData.setOperationSign(1);
-                    break;
-                }else{
-                    projectRecordTreeData.setOperationSign(0);
-                }
-            }
-
-            //项目负责人list数据转String
-            String projectLeader = masterList.toString().replaceAll("(?:\\[|null|\\]| +)", "");
-            projectRecordTreeData.setProjectLeader(projectLeader);
-            projectRecordTreeData.setLoginId(UserUtils.getUser().getId());
-            projectRecordTreeDataList.add(projectRecordTreeData);
-
-            //获取阶段Type父节点信息
-            String projectType = projectImplementEarlyService.getProjectType(records1.getProjectTypeId(), "实施前期");
-            //根据项目id查询相关的项目阶段内容
-            List<ProjectRecordTreeData> reportDataList = projectContentDataService.getProjectContentDataList(records1.getId(),projectType);
-            if(0 != reportDataList.size()){
-                Projectcontentinfo select = new Projectcontentinfo();
-                ProjectRecords project = new ProjectRecords();
-                project.setId(records1.getId());
-                select.setParentIds("0,");
-                select.setProject(project);
-                List<Projectcontentinfo> p = projectcontentinfoService.findListByProject(select);
-                for (ProjectRecordTreeData reportData : reportDataList) {
-                    //添加工作内容id
-                    if(p.size()>0){
-                        reportData.setContentPId(p.get(0).getId());
-                        reportData.setParentIds("0,");
-                        reportData.setDictType("");
-                    }
-                    //将项目所属类型名称放入树形列表的projectId中
-                    reportData.setProjectId(reportData.getProjectLeader());
-                    //添加项目负责人
-                    reportData.setProjectLeader(projectLeader);
-                    //添加登陆者id
-                    reportData.setLoginId(UserUtils.getUser().getId());
-                    reportData.setCreateId(records1.getCreateBy().getId());
-                    //如果当前登录人为项目登记者或项目负责人则允许其添加子节点信息
-                    for (String masterId : masterIdList) {
-                        if(masterId.equals(UserUtils.getUser().getId())){
-                            reportData.setOperationSign(1);
-                            break;
-                        }else{
-                            reportData.setOperationSign(0);
-                        }
-                    }
-                }
-            }
-            projectRecordTreeDataList.addAll(reportDataList);
-
-        }
-        map.put("data",projectRecordTreeDataList);
-        return map;
-    }
-
-    //添加签证汇总页面
-    @RequestMapping(value = "form")
-    public String form(WorkClientInfo workClientInfo, Model model) {
-        if(StringUtils.isBlank(workClientInfo.getId())){
-            WorkClientInfo workClientInfo1=new WorkClientInfo();
-            Area area=new Area();
-            area.setId("9AF3266E03384019BFE935DD9F35332F");
-            area.setName("南京");
-            workClientInfo1.setArea(area);
-            model.addAttribute("workClientInfo", workClientInfo1);
-            return "modules/projectrecord/implementStage/projectDesignChangeForm";
-        }
-
-        model.addAttribute("workClientInfo", workClientInfo);
-
-        return "modules/projectrecord/implementStage/projectDesignChangeForm";
-    }
-}

+ 4 - 0
src/main/java/com/jeeplus/modules/projectVisa/dao/ProjectVisaDao.java

@@ -20,4 +20,8 @@ public interface ProjectVisaDao extends CrudDao<ProjectVisa> {
     ProjectVisa getVisa(ProjectVisa projectVisa);
     ProjectVisa getVisa(ProjectVisa projectVisa);
 
 
     List<ProjectVisa> getVisaList(String id);
     List<ProjectVisa> getVisaList(String id);
+
+    List<ProjectVisa> getDesignList(String id);
+
+    ProjectVisa getDesign(ProjectVisa projectVisa);
 }
 }

+ 21 - 0
src/main/java/com/jeeplus/modules/projectVisa/service/ProjectVisaService.java

@@ -32,11 +32,26 @@ public class ProjectVisaService extends CrudService<ProjectVisaDao,ProjectVisa>
         return projectVisaDao.getVisa(projectVisa);
         return projectVisaDao.getVisa(projectVisa);
     }
     }
 
 
+    /**
+     * 签证
+     * @param id
+     * @return
+     */
     @Transactional(readOnly = true)
     @Transactional(readOnly = true)
     public List<ProjectVisa> getVisaList(String id) {
     public List<ProjectVisa> getVisaList(String id) {
         List<ProjectVisa> projectVisaList=projectVisaDao.getVisaList(id);
         List<ProjectVisa> projectVisaList=projectVisaDao.getVisaList(id);
         return projectVisaList;
         return projectVisaList;
     }
     }
+    /**
+     * 变更
+     * @param id
+     * @return
+     */
+    @Transactional(readOnly = true)
+    public List<ProjectVisa> getDesignList(String id) {
+        List<ProjectVisa> projectVisaList=projectVisaDao.getDesignList(id);
+        return projectVisaList;
+    }
 
 
     /**
     /**
      * 新增方法
      * 新增方法
@@ -90,6 +105,12 @@ public class ProjectVisaService extends CrudService<ProjectVisaDao,ProjectVisa>
     }
     }
 
 
 
 
+    @Transactional(readOnly = true)
+    public ProjectVisa getDesign(ProjectVisa projectVisa) {
+        return projectVisaDao.getDesign(projectVisa);
+    }
+
+
 
 
     /*
     /*
 
 

+ 289 - 0
src/main/java/com/jeeplus/modules/projectVisa/web/ProjectDesignController.java

@@ -0,0 +1,289 @@
+package com.jeeplus.modules.projectVisa.web;
+
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.projectConstruction.entity.ConstructionContract;
+import com.jeeplus.modules.projectConstruction.service.ContractService;
+import com.jeeplus.modules.projectVisa.entity.ProjectVisa;
+import com.jeeplus.modules.projectVisa.entity.VisaTreeData;
+import com.jeeplus.modules.projectVisa.service.ProjectVisaService;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectContentDataService;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectcontentinfoService;
+import com.jeeplus.modules.projectrecord.entity.ProjectImplementEarly;
+import com.jeeplus.modules.projectrecord.service.ProjectImplementEarlyService;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workclientinfo.dao.WorkClientAttachmentDao;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.*;
+
+//实施阶段-签证汇总
+@Controller
+@RequestMapping(value = "${adminPath}/project/projectDesignChange")
+public class ProjectDesignController extends BaseController {
+
+    @Autowired
+    private ProjectVisaService  projectVisaService;
+    @Autowired
+    private ProjectImplementEarlyService projectImplementEarlyService;
+    @Autowired
+    private ProjectContentDataService projectContentDataService;
+    @Autowired
+    private ProjectcontentinfoService projectcontentinfoService;
+    @Autowired
+    private ContractService contractService;
+    @Autowired
+    private WorkClientAttachmentDao workClientAttachmentDao;
+
+
+    /*@ModelAttribute
+    public ProjectVisa get(@RequestParam(required=false) String id) {
+        ProjectVisa entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = projectVisaService.get(id);
+        }
+        if (entity == null){
+            entity = new ProjectVisa();
+        }
+        return entity;
+    }*/
+    @ModelAttribute
+    public ConstructionContract get(@RequestParam(required=false) String id) {
+        ConstructionContract entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = contractService.get(id);
+        }
+        if (entity == null){
+            entity = new ConstructionContract();
+        }
+        return entity;
+    }
+
+    /**
+     * 签证汇总表列表页面
+     */
+    @RequiresPermissions("project:projectDesignChange:list")
+    @RequestMapping(value = {"list", ""})
+    public String list(ConstructionContract constructionContract, HttpServletRequest request, HttpServletResponse response, Model model) {
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
+        }
+        Page<ConstructionContract> page = contractService.findPage(new Page<ConstructionContract>(request, response), constructionContract);
+        model.addAttribute("page", page);
+        return "modules/projectrecord/implementStage/projectDesignList";
+    }
+
+    //添加签证汇总页面
+    @RequestMapping(value = "form")
+    public String form(ProjectVisa projectVisa, Model model) {
+
+        model.addAttribute("projectVisa", projectVisa);
+
+        return "modules/projectrecord/implementStage/projectDesignForm";
+    }
+
+    //编辑签证汇总页面
+    @RequestMapping(value = "updateTable")
+    public String updateTable(ProjectVisa projectVisa, Model model) {
+
+        if(StringUtils.isNotEmpty(projectVisa.getId())){
+            ProjectVisa visa=projectVisaService.getDesign(projectVisa);
+            WorkClientAttachment attchment = new WorkClientAttachment();
+            attchment.setAttachmentId(projectVisa.getId());
+            List<WorkClientAttachment> attachments = workClientAttachmentDao.findList(attchment);
+            visa.setWorkAttachments(attachments);
+            model.addAttribute("projectVisa", visa);
+        }else{
+            model.addAttribute("projectVisa", projectVisa);
+        }
+
+        return "modules/projectrecord/implementStage/projectDesignForm";
+    }
+
+    //编辑签证汇总页面
+    @RequestMapping(value = "view")
+    public String view(ProjectVisa projectVisa, Model model) {
+
+        if(StringUtils.isNotEmpty(projectVisa.getId())){
+
+            ProjectVisa visa=projectVisaService.getDesign(projectVisa);
+            WorkClientAttachment attchment = new WorkClientAttachment();
+            attchment.setAttachmentId(projectVisa.getId());
+            List<WorkClientAttachment> attachments = workClientAttachmentDao.findList(attchment);
+            visa.setWorkAttachments(attachments);
+            model.addAttribute("projectVisa", visa);
+        }else{
+            model.addAttribute("projectVisa", projectVisa);
+        }
+
+        return "modules/projectrecord/implementStage/projectDesignView";
+    }
+
+
+    /**
+     * 保存客户管理
+     */
+    @RequestMapping(value = "save")
+    public String save(ProjectVisa projectVisa,RedirectAttributes redirectAttributes) throws Exception{
+
+        projectVisaService.save(projectVisa);
+
+        addMessage(redirectAttributes, "保存客户管理成功");
+        return "redirect:"+ Global.getAdminPath()+"/project/projectDesignChange/?repage";
+    }
+
+    //显示签证页面
+    public String getVisa(ProjectVisa projectVisa,Model model){
+        ProjectVisa projectVisa1=projectVisaService.getVisa(projectVisa);
+        model.addAttribute("projectVisa",projectVisa1);
+        return "";
+    }
+
+
+    //获取树状图
+    @RequestMapping(value = "getVisaList")
+    @ResponseBody
+    public Map<String,List> getTreeList(ConstructionContract constructionContract, HttpServletRequest request, HttpServletResponse response, Model model){
+
+        Map<String,List> map = new HashMap<>();
+        ProjectImplementEarly projectRecords = new ProjectImplementEarly();
+        if(StringUtils.isNotBlank(constructionContract.getProjectName())){
+            projectRecords.setProjectName(constructionContract.getProjectName());
+        }
+        Page<ProjectImplementEarly> recordPage = projectImplementEarlyService.findProjectPage(new Page<ProjectImplementEarly>(request, response), projectRecords);
+        //获取项目信息
+        List<ProjectImplementEarly> recordList = recordPage.getList();
+        //新建树形列表集合
+        List<VisaTreeData> treeList=new ArrayList<>();
+        if(recordList.size()>0){
+            for (ProjectImplementEarly record:recordList) {
+                //将项目信息放入树形列表集合中
+                VisaTreeData recordTreeData = new VisaTreeData();
+                //将界面需要展示数据放入类中
+                recordTreeData.setId(record.getId());
+                recordTreeData.setContractName(record.getProjectName());
+                recordTreeData.setCnumber(record.getProjectId());
+                recordTreeData.setNumber("");
+                recordTreeData.setPid("0");
+                //将项目设置为第一级数据
+                recordTreeData.setCondition(1);
+                //将项目信息放入
+                treeList.add(recordTreeData);
+
+                //处理合同信息数据
+                ConstructionContract conditionContract = new ConstructionContract();
+                conditionContract.setProjectId(record.getId());
+
+                if(StringUtils.isNotBlank(constructionContract.getContractName())){
+                    conditionContract.setContractName(constructionContract.getContractName());
+                }
+                //获取合同信息
+                List<ConstructionContract> contractList = contractService.getConstructionContractList(conditionContract);
+                if(contractList.size()>0){
+                    //遍历项目中的合同信息
+                    for (ConstructionContract contract:contractList) {
+                        VisaTreeData visaTreeData=new VisaTreeData();
+                        visaTreeData.setContractId(contract.getId());
+                        visaTreeData.setId(contract.getId());
+                        visaTreeData.setContractName(contract.getContractName());
+                        visaTreeData.setDate(contract.getCreateDate());
+                        visaTreeData.setNumber("");
+                        visaTreeData.setPid(record.getId());
+                        visaTreeData.setCnumber(contract.getCnumber());
+
+                        //将项目设置为第二级数据
+                        visaTreeData.setCondition(2);
+                        //遍历项目负责人信息
+                        List<User> masterUserList = record.getProjectLeaders();
+                        List<String> masterList = new ArrayList<>();
+                        Set masterIdSet = new HashSet();
+                        for (User masterUser:masterUserList) {
+                            masterList.add(masterUser.getName());
+                            masterIdSet.add(masterUser.getId());
+                        }
+                        //Set转List
+                        List<String> masterIdList = new ArrayList<>(masterIdSet);
+                        for (String masterId : masterIdList) {
+                            if(masterId.equals(UserUtils.getUser().getId())){
+                                visaTreeData.setOperationSign(1);
+                                break;
+                            }else{
+                                visaTreeData.setOperationSign(0);
+                            }
+                        }
+
+                        //将项目信息放入
+                        treeList.add(visaTreeData);
+
+                        //根据获取的合同的id去查找汇总表获取汇总表信息
+                        List<ProjectVisa> projectVisaList=projectVisaService.getDesignList(contract.getId());
+                        for (int j=0;j<projectVisaList.size();j++){
+                            VisaTreeData visaTreeData2=new VisaTreeData();
+                            ProjectVisa visa=projectVisaList.get(j);
+                            visaTreeData2.setPid(visa.getContractId());
+                            visaTreeData2.setId(visa.getId());
+                            visaTreeData2.setContractName(contract.getContractName());
+                            visaTreeData2.setContractId(visa.getContractId());
+                            visaTreeData2.setConfirmMoney(visa.getConfirmMoney());
+                            visaTreeData2.setDate(visa.getDate());
+                            visaTreeData2.setSendMoney(visa.getSendMoney());
+                            visaTreeData2.setCnumber(contract.getCnumber());
+                            visaTreeData2.setNumber(visa.getNumber());
+
+                            //将项目设置为第二级数据
+                            visaTreeData2.setCondition(3);
+                            for (String masterId : masterIdList) {
+                                if(masterId.equals(UserUtils.getUser().getId())){
+                                    visaTreeData2.setOperationSign(1);
+                                    break;
+                                }else{
+                                    visaTreeData2.setOperationSign(0);
+                                }
+                            }
+                            treeList.add(visaTreeData2);
+                        }
+
+                    }
+                }
+            }
+
+        }
+        map.put("data",treeList);
+        return map;
+    }
+
+    /**
+     * 删除依据性资料
+     */
+    @RequestMapping(value = "delete")
+    @ResponseBody
+    public Map<String,Object> delete(ProjectVisa projectVisa, RedirectAttributes redirectAttributes) {
+        Map<String,Object> j= new HashMap<>();
+        try {
+            projectVisaService.deleteByLogic(projectVisa.getId(),projectVisa.getType());
+            j.put("status",true);
+            j.put("msg","删除成功");
+            addMessage(redirectAttributes, "删除成功");
+        }catch (Exception e){
+            j.put("status",false);
+            j.put("msg","删除失败");
+            addMessage(redirectAttributes, "删除失败");
+        }
+        return j;
+    }
+
+}

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

@@ -9,6 +9,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.List;
 
 
 import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.modules.projectConstruction.entity.ConstructionContract;
 import com.jeeplus.modules.projectcontentinfo.dao.ProjectBasedDataDao;
 import com.jeeplus.modules.projectcontentinfo.dao.ProjectBasedDataDao;
 import com.jeeplus.modules.projectcontentinfo.dao.ProjectcontentinfoDao;
 import com.jeeplus.modules.projectcontentinfo.dao.ProjectcontentinfoDao;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectBasedData;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectBasedData;
@@ -227,4 +228,6 @@ public class ProjectContentDataService extends CrudService<ProjectContentDataDao
         List<ProjectRecordTreeData> projectRecordTreeDataList = dao.getProjectContentReportArchiveDataList(projectId,projectTypeParentId);
         List<ProjectRecordTreeData> projectRecordTreeDataList = dao.getProjectContentReportArchiveDataList(projectId,projectTypeParentId);
         return projectRecordTreeDataList;
         return projectRecordTreeDataList;
     }
     }
+
+
 }
 }

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

@@ -30,6 +30,12 @@ public class ProjectRecordTreeData extends DataEntity<ProjectRecordTreeData> {
     private String recordId;
     private String recordId;
     private String reportRecordName;   //归档信息名称
     private String reportRecordName;   //归档信息名称
 
 
+    private String contCate;//合同分类
+    private double trueAmt;//有效合同金额
+
+
+
+
     public String getProjectId() {
     public String getProjectId() {
         return projectId;
         return projectId;
     }
     }
@@ -197,4 +203,23 @@ public class ProjectRecordTreeData extends DataEntity<ProjectRecordTreeData> {
     public void setReportRecordName(String reportRecordName) {
     public void setReportRecordName(String reportRecordName) {
         this.reportRecordName = reportRecordName;
         this.reportRecordName = reportRecordName;
     }
     }
+
+    public String getContCate() {
+        return contCate;
+    }
+
+    public void setContCate(String contCate) {
+        this.contCate = contCate;
+    }
+
+    public double getTrueAmt() {
+        return trueAmt;
+    }
+
+    public void setTrueAmt(double trueAmt) {
+        this.trueAmt = trueAmt;
+    }
+
+
+
 }
 }

+ 18 - 0
src/main/resources/mappings/modules/constructionContract/contractDao.xml

@@ -236,4 +236,22 @@
 			</if>
 			</if>
 		</where>
 		</where>
 	</select>
 	</select>
+
+
+
+	<select id="find" resultType="com.jeeplus.modules.projectConstruction.entity.ConstructionContract" >
+		SELECT
+		pr.project_name as 'projectName',
+		sd.label as 'contCate',
+		su.name as 'createName',
+		<include refid="workContentContractinfoColumns"/>
+		FROM construction_contract a
+		left join sys_dict sd on sd.value = a.cont_cate
+		left join project_records pr on pr.id = a.project_id
+		left join sys_user su on a.create_by=su.id
+		<where>
+			a.del_flag = 0
+			and a.project_id=#{id} ORDER BY a.update_date DESC
+		</where>
+	</select>
 </mapper>
 </mapper>

+ 47 - 0
src/main/resources/mappings/modules/projectrecord/stage/ProjectVisaDao.xml

@@ -257,6 +257,31 @@
 		a.contract_id=#{id}
 		a.contract_id=#{id}
 		and a.type=1 and del_flag='0'
 		and a.type=1 and del_flag='0'
 	</select>
 	</select>
+
+	<!--根据合同id获取变更表格对象-->
+	<select id="getDesignList" resultType="ProjectVisa">
+		select
+		a.id AS "id",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.del_flag AS "delFlag",
+		a.contract_id AS "contractId",
+		a.number AS "number",
+		a.date AS "date",
+		a.content AS "content",
+		a.send_money AS "sendMoney",
+		a.procedure AS "procedure",
+		a.confirm_money AS "confirmMoney",
+		a.type AS "type"
+		from contract_visa_design a
+		where
+		a.contract_id=#{id}
+		and a.type=2 and del_flag='0'
+	</select>
+
+
 	<!--根据id查询获取表格对象-->
 	<!--根据id查询获取表格对象-->
 	<select id="getVisa" resultType="ProjectVisa">
 	<select id="getVisa" resultType="ProjectVisa">
 		select
 		select
@@ -280,6 +305,28 @@
 		and a.type=1 and del_flag='0'
 		and a.type=1 and del_flag='0'
 	</select>
 	</select>
 
 
+	<!--根据id查询获取表格对象-->
+	<select id="getDesign" resultType="ProjectVisa">
+		select
+		a.id AS "id",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.del_flag AS "delFlag",
+		a.contract_id AS "contractId",
+		a.number AS "number",
+		a.date AS "date",
+		a.content AS "content",
+		a.send_money AS "sendMoney",
+		a.procedure AS "procedure",
+		a.confirm_money AS "confirmMoney",
+		a.type AS "type"
+		from contract_visa_design a
+		where
+		a.id=#{id}
+		and a.type=2 and del_flag='0'
+	</select>
 	<!--软删除签证-变更汇总表-->
 	<!--软删除签证-变更汇总表-->
 	<update id="deleteByLogic">
 	<update id="deleteByLogic">
 		update contract_visa_design set del_flag='1' where id=#{id} and type=#{type}
 		update contract_visa_design set del_flag='1' where id=#{id} and type=#{type}

+ 555 - 0
src/main/webapp/webpage/modules/projectConstruction/contractList.jsp

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

+ 1 - 0
src/main/webapp/webpage/modules/projectConstruction/projectConstructionForm.jsp

@@ -229,6 +229,7 @@
         <sys:message content="${message}"/>
         <sys:message content="${message}"/>
         <form:form id="inputForm" modelAttribute="constructionContract" action="${ctx}/project/constructionContract/save" method="post" class="form-horizontal">
         <form:form id="inputForm" modelAttribute="constructionContract" action="${ctx}/project/constructionContract/save" method="post" class="form-horizontal">
             <form:hidden path="id"/>
             <form:hidden path="id"/>
+            <%--<form:hidden path="projectId"/>--%>
         <div class="form-group layui-row first">
         <div class="form-group layui-row first">
                 <div class="form-group-label"><h2>合同信息</h2></div>
                 <div class="form-group-label"><h2>合同信息</h2></div>
                 <div class="layui-item layui-col-sm6">
                 <div class="layui-item layui-col-sm6">

+ 206 - 141
src/main/webapp/webpage/modules/projectConstruction/projectConstructionList.jsp

@@ -1,27 +1,38 @@
 <%@ page contentType="text/html;charset=UTF-8" %>
 <%@ page contentType="text/html;charset=UTF-8" %>
-<%@ page isELIgnored="false"%>
 <%@ include file="/webpage/include/taglib.jsp"%>
 <%@ include file="/webpage/include/taglib.jsp"%>
 <html>
 <html>
 <head>
 <head>
-	<title>客户管理管理</title>
+	<title>项目登记</title>
 	<meta name="decorator" content="default"/>
 	<meta name="decorator" content="default"/>
+	<link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
+	<%--<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>--%>
+	<style>
+		.layui-table th{
+			font-size: 14px;
+			/*表头内容居中显示*/
+			text-align: center;
+		}
+		.pid{
+			font-size:14px;
+			font-weight:400;
+		}
+	</style>
 	<script type="text/javascript">
 	<script type="text/javascript">
 		$(document).ready(function() {
 		$(document).ready(function() {
-			$("#cus_name").show();
-			$("#cus_name").siblings().hide();
+
 			//搜索框收放
 			//搜索框收放
 			$('#moresee').click(function(){
 			$('#moresee').click(function(){
 				if($('#moresees').is(':visible'))
 				if($('#moresees').is(':visible'))
 				{
 				{
-					$('#moresees').slideUp(0,resizeListWindow1);
+					$('#moresees').slideUp(0,resizeListWindow2);
 					$('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
 					$('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
 				}else{
 				}else{
-					$('#moresees').slideDown(0,resizeListWindow1);
+					$('#moresees').slideDown(0,resizeListWindow2);
 					$('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
 					$('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
 				}
 				}
 			});
 			});
 			laydate.render({
 			laydate.render({
-				elem: '#startDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+				elem: '#beginDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
 				event: 'focus', //响应事件。如果没有传入event,则按照默认的click
 				event: 'focus', //响应事件。如果没有传入event,则按照默认的click
 				type : 'date'
 				type : 'date'
 			});
 			});
@@ -31,36 +42,143 @@
 				type : 'date'
 				type : 'date'
 			});
 			});
 		});
 		});
-		function switchInput(obj){
-			$("#"+obj).show();
-			$("#"+obj).siblings().hide();
+
+		function reset() {
+			$("#searchForm").resetForm();
 		}
 		}
-		//打开对话框(查看)
-		function openDialogNow(title,url,width,height){
-			if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
-				width='auto';
-				height='auto';
-			}else{//如果是PC端,根据用户设置的width和height显示。
+
+		function openDialog(title,url,width,height,target) {
+
+			if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+				width = 'auto';
+				height = 'auto';
+			} else {//如果是PC端,根据用户设置的width和height显示。
 
 
 			}
 			}
+
 			top.layer.open({
 			top.layer.open({
 				type: 2,
 				type: 2,
 				area: [width, height],
 				area: [width, height],
 				title: title,
 				title: title,
 				maxmin: true, //开启最大化最小化按钮
 				maxmin: true, //开启最大化最小化按钮
-				content: url ,
-				btn: ['关闭'],
-				cancel: function(index){
+				content: url,
+				skin: 'three-btns',
+				btn: ['送审', '暂存', '关闭'],
+				/*yes: function (index, layero) {
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if (target) {
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    } else {
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target", top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+
+                    if (iframeWin.contentWindow.doSubmit()) {
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function () {
+                            top.layer.close(index)
+                        }, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+
+                },*/
+				btn1: function(index, layero){
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(1) ){
+						// top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}
+				},
+				btn2:function(index,layero){
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(2) ){
+						// top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}else {
+						return false;
+					}
+				},
+				btn3: function (index) {
 				}
 				}
 			});
 			});
 		}
 		}
-	</script>
-	<script type="text/javascript">
-		$(function () {
-			function openNewWindowTab(url) {
-				alert(url);
+
+		function openDialogre(title,url,width,height,target,buttons) {
+
+			if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+				width = 'auto';
+				height = 'auto';
+			} else {//如果是PC端,根据用户设置的width和height显示。
+
 			}
 			}
-		})
+			var split = buttons.split(",");
+			top.layer.open({
+				type: 2,
+				area: [width, height],
+				title: title,
+				maxmin: true, //开启最大化最小化按钮
+				skin: 'three-btns',
+				content: url,
+				btn: split,
+				btn1: function(index, layero){
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(1) ){
+						// top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}
+				},
+				btn2:function(index,layero){
+					if(split.length==2){return}
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(2) ){
+						// top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}else {
+						return false;
+					}
+				},
+				btn3: function (index) {
+				}
+			});
+		}
 	</script>
 	</script>
 	<style>
 	<style>
 		body{
 		body{
@@ -72,34 +190,29 @@
 		}
 		}
 	</style>
 	</style>
 </head>
 </head>
-<body class="gray-bg">
+<body>
 <div class="wrapper wrapper-content">
 <div class="wrapper wrapper-content">
 	<sys:message content="${message}"/>
 	<sys:message content="${message}"/>
 	<div class="layui-row">
 	<div class="layui-row">
 		<div class="full-width fl">
 		<div class="full-width fl">
-			<div class="contentShadow layui-row" id="queryDiv">
-				<form:form id="searchForm" modelAttribute="constructionContract" action="${ctx}/project/constructionContract/list" method="post" class="form-inline">
+			<div class="layui-row contentShadow shadowLR" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="projectImplementEarly" action="${ctx}/project/constructionContract/" method="post" class="form-inline">
 					<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
 					<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
 					<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
 					<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
-					<div class="commonQuery lw14">
+					<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+					<div class="commonQuery lw6">
 						<div class="layui-item query athird">
 						<div class="layui-item query athird">
-							<label class="layui-form-label">合同名称:</label>
+							<label class="layui-form-label">项目名称:</label>
 							<div class="layui-input-block">
 							<div class="layui-input-block">
-								<form:input path="contractName" htmlEscape="false" maxlength="255"  class=" form-control layui-input"/>
+								<form:input path="projectName" htmlEscape="false" maxlength="64"  class=" form-control  layui-input"/>
 							</div>
 							</div>
 						</div>
 						</div>
-						<%--<div class="layui-item query athird">
-							<label class="layui-form-label">创建时间:</label>
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">项目负责人:</label>
 							<div class="layui-input-block">
 							<div class="layui-input-block">
-								<input id="startDate" placeholder="开始时间" name="startDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
-									   value="<fmt:formatDate value="${constructionContract.startDate}" pattern="yyyy-MM-dd"/>"/>
-								</input>
-								<span class="group-sep">-</span>
-								<input id="endDate" placeholder="结束时间" name="endDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
-									   value="<fmt:formatDate value="${constructionContract.endDate}" pattern="yyyy-MM-dd"/>"/>
-								</input>
+								<form:input path="leaderNameStr" htmlEscape="false" maxlength="255"  class=" form-control layui-input"/>
 							</div>
 							</div>
-						</div>--%>
+						</div>
 						<div class="layui-item athird">
 						<div class="layui-item athird">
 							<div class="input-group">
 							<div class="input-group">
 								<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
 								<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
@@ -109,31 +222,19 @@
 						</div>
 						</div>
 						<div style="    clear:both;"></div>
 						<div style="    clear:both;"></div>
 					</div>
 					</div>
-					<div id="moresees" style="clear:both;display:none;" class="lw14">
-
-					</div>
 				</form:form>
 				</form:form>
 			</div>
 			</div>
 		</div>
 		</div>
-
 		<div class="full-width fl">
 		<div class="full-width fl">
-			<div class="contentShadow layui-form contentDetails">
+			<div class="layui-form contentDetails contentShadow shadowLBR">
 				<div class="nav-btns">
 				<div class="nav-btns">
-					<%--此处按钮样式包括 nav-btn-add nav-btn-refresh nav-btn-import nav-btn-export nav-btn-query nav-btn-reset--%>
-						<%--<table:addRow url="${ctx}/project/constructionContract/form" title="合同管理"></table:addRow>--%><!-- 增加按钮 -->
-					<%--<shiro:hasPermission name="project:constructionContract:import">
-						<table:importExcel url="${ctx}/workclientinfo/workClientInfo/import"></table:importExcel><!-- 导入按钮 -->
-					</shiro:hasPermission>
-
-					<shiro:hasPermission name="project:constructionContract:export">
-						<table:exportExcel url="${ctx}/workclientinfo/workClientInfo/export"></table:exportExcel><!-- 导出按钮 -->
-					</shiro:hasPermission>--%>
-
+					<button class="nav-btn layui-btn" id="btn-expand">全部展开</button>
+					<button class="nav-btn layui-btn-warm" id="btn-fold">全部折叠</button>
 					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
 					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
+
 					<div style="clear: both;"></div>
 					<div style="clear: both;"></div>
 				</div>
 				</div>
-				<table class="oa-table layui-table" id="contentTable"></table>
-
+				<table id="permissionTable" class="layui-table" lay-filter="permissionTable"></table>
 				<!-- 分页代码 -->
 				<!-- 分页代码 -->
 				<table:page page="${page}"></table:page>
 				<table:page page="${page}"></table:page>
 				<div style="clear: both;"></div>
 				<div style="clear: both;"></div>
@@ -142,69 +243,19 @@
 	</div>
 	</div>
 	<div id="changewidth"></div>
 	<div id="changewidth"></div>
 </div>
 </div>
-<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
-<%--<script>
-	layui.use('table', function(){
-		layui.table.render({
-			limit:${ page.pageSize }
-			,elem: '#contentTable'
-			,page: false
-			,cols: [[
-				{field:'index',align:'center', title: '序号',width:40}
-				,{field:'projectName',align:'center', title: '项目名称',minWidth:200,templet:function(d){
-						return "<a class=\"attention-info\" title=\"" + d.projectName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/project/projectRecords/view?id=" + d.projectId +"','95%', '95%')\">" + d.projectName + "</a>";
-						return xml;
-					}}
-				,{field:'contractName',align:'center', title: '合同名称',minWidth:200,templet:function(d){
-						var xml = "<a class=\"attention-info\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看合同信息', '${ctx}/project/constructionContract/view?id=" + d.id + "','95%','95%')\">" +
-								"<span title=" + d.contractName + ">" + d.contractName.substr(0,40) + "</span></a>";
-						return xml;
-					}}
-				,{field:'cnumber',align:'center', title: '合同编号',width:150}
-				,{field:'contCate',align:'center', title: '合同分类',width:150}
-				,{field:'trueAmt',align:'center', title: '有效合同额',width:150}
-				,{field:'createDate',align:'center', title: '创建时间', width:85}
-				,{field:'op',align:'center',title:"操作",width:130,templet:function(d){
-						////对操作进行初始化
-						var xml = "";
-
-						if(d.canedit != undefined && d.canedit == "1")
-							xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('修改客户信息', '${ctx}/project/constructionContract/form?id=" + d.id + "&param=1','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i>修改</a>"
-
-						if(d.candelete != undefined && d.candelete == "1")
-							xml +="<a href=\"${ctx}/project/constructionContract/delete?id=" + d.id + "\" onclick=\"return confirmx('确认要删除该客户信息吗?', this.href)\"   class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";
-						return xml;
-					}}
-			]]
-			,data: [
-				<c:if test="${ not empty page.list}">
-				<c:forEach items="${page.list}" var="constructionContract" varStatus="index">
-				<c:if test="${index.index != 0}">,</c:if>
-				{
-					"index":"${index.index+1}"
-					,"id":"${constructionContract.id}"
-					,"projectId":"${constructionContract.projectId}"
-					,"contractName":"${constructionContract.contractName}"
-					,"cnumber":"${constructionContract.cnumber}"
-					,"contCate":"${constructionContract.contCate}"
-					,"trueAmt":"${constructionContract.trueAmt}"
-					,"projectName":"${constructionContract.projectName}"
-					,"createDate":"<fmt:formatDate value="${constructionContract.createDate}" pattern="yyyy-MM-dd"/>"
-					<c:if test="${flag == '1' or fns:getUser().id == constructionContract.createBy.id}">
-					<shiro:hasPermission name="project:constructionContract:edit">,"canedit":"1"</shiro:hasPermission>
-					<shiro:hasPermission name="project:constructionContract:del">,"candelete":"1"</shiro:hasPermission>
-					</c:if>
-				}
-				</c:forEach>
-				</c:if>
-			]
-		});
 
 
-	})
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
 
 
-	resizeListTable();/*消除由于有竖向滚动条造成table出现横向滚动条*/
+	resizeListTable();
 	$("a").on("click",addLinkVisied);
 	$("a").on("click",addLinkVisied);
-</script>--%>
+</script>
+<script>
+	resizeListWindow2();
+	$(window).resize(function(){
+		resizeListWindow2();
+	});
+</script>
 <script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
 <script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
 <script src="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.js" charset="utf-8"></script>
 <script src="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.js" charset="utf-8"></script>
 <script>
 <script>
@@ -222,9 +273,13 @@
 		// 渲染表格
 		// 渲染表格
 		var renderTable = function () {
 		var renderTable = function () {
 			var projectName = $("#projectName").val();
 			var projectName = $("#projectName").val();
-			var contractName = $("#contractName").val();
-			if(undefined == contractName){
-				contractName = "";
+			var workContractInfoName = $("#workContractInfoName").val();
+			var workContractInfoClientName = $("#workContractInfoClientName").val();
+			if(undefined == workContractInfoName){
+				workContractInfoName = "";
+			}
+			if(undefined == workContractInfoClientName){
+				workContractInfoClientName = "";
 			}
 			}
 			layer.load(2);
 			layer.load(2);
 			treetable.render({
 			treetable.render({
@@ -235,7 +290,7 @@
 				treeDefaultClose: true,//是否默认折叠
 				treeDefaultClose: true,//是否默认折叠
 				treeLinkage: true,//父级展开时是否自动展开所有子级
 				treeLinkage: true,//父级展开时是否自动展开所有子级
 				elem: '#permissionTable',
 				elem: '#permissionTable',
-				url: '${ctx}/project/constructionContract/getProjectList?projectId=${projectRecords.id}&pageNo=${page.pageNo}&projectName='+$("#projectName").val()+'&leaderNameStr='+$("#leaderNameStr").val()+'&workContractInfo.name='+contractName,
+				url: '${ctx}/project/constructionContract/getProjectList?projectId=${projectRecords.id}&pageNo=${page.pageNo}&projectName='+$("#projectName").val()+'&leaderNameStr='+$("#leaderNameStr").val(),
 				page: false,
 				page: false,
 				cols: [[
 				cols: [[
 					{type: 'numbers', align:'center', title: '序号' ,width:80},
 					{type: 'numbers', align:'center', title: '序号' ,width:80},
@@ -244,21 +299,21 @@
 							if(0 == d.pid){
 							if(0 == d.pid){
 								return "<a class=\"attention-info pid\" title=\"" + d.projectName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/project/projectRecords/view?id=" + d.id +"','95%', '95%')\">" + d.projectName + "</a>";
 								return "<a class=\"attention-info pid\" title=\"" + d.projectName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/project/projectRecords/view?id=" + d.id +"','95%', '95%')\">" + d.projectName + "</a>";
 							}else{
 							}else{
-								return "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看工作内容', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=contentView&condition=according&dictType=&id="+d.contentPId+"&parentIds="+d.parentIds+"&infoId="+d.id+"','95%', '95%')\">" + d.projectName + "</a>";
+								return "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看施工合同内容', '${ctx}/project/constructionContract/view?id="+d.id+"','95%', '95%')\">" + d.projectName + "</a>";
 							}
 							}
 						}},
 						}},
-					{field: 'clientName', align:'center', title: '合同分类',templet: function(d){
+					{field: 'contCate', align:'center', title: '合同分类',templet: function(d){
 							if(0 == d.pid){
 							if(0 == d.pid){
 								return "";
 								return "";
 							}else{
 							}else{
-								return "<font>"+d.clientName+"</font>";
+								return "<font>"+d.contCate+"</font>";
 							}
 							}
 						}},
 						}},
-					{field: 'projectLeader', align:'center', title: '有效合同额',templet: function(d){
+					{field: 'trueAmt', align:'center', title: '有效合同额',templet: function(d){
 							if(0 == d.pid){
 							if(0 == d.pid){
 								return "";
 								return "";
 							}else{
 							}else{
-								return "<font>"+d.projectLeader+"</font>";
+								return "<font>"+d.trueAmt+"</font>";
 							}
 							}
 						}},
 						}},
 					{field: 'projectLeader', align:'center', title: '项目负责人',templet: function(d){
 					{field: 'projectLeader', align:'center', title: '项目负责人',templet: function(d){
@@ -277,7 +332,7 @@
 						}},
 						}},
 					{field: 'createDate', align:'center', title: '登记日期',width:100,templet: function(d){
 					{field: 'createDate', align:'center', title: '登记日期',width:100,templet: function(d){
 							var date=d.createDate;
 							var date=d.createDate;
-							date=date.replace(new RegExp(/-/gm) ,"/");
+							/*date=date.replace(new RegExp(/-/gm) ,"/");*/
 
 
 							if(0 == d.pid){
 							if(0 == d.pid){
 								return "<font style = 'font-size:14px;font-weight:500;'>"+layui.util.toDateString(date,'yyyy-MM-dd')+"</font>";
 								return "<font style = 'font-size:14px;font-weight:500;'>"+layui.util.toDateString(date,'yyyy-MM-dd')+"</font>";
@@ -285,6 +340,24 @@
 								return "<font>"+layui.util.toDateString(date,'yyyy-MM-dd')+"</font>";
 								return "<font>"+layui.util.toDateString(date,'yyyy-MM-dd')+"</font>";
 							}
 							}
 						}},
 						}},
+					/*{align:'center', title: '状态',  width:70,templet:function(d){
+							var st = getAuditState(""+d.projectStatus);
+							if(d.pid ==0){
+								if(st.action)
+									var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/project/projectRecords/getProcess?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								else
+									var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								return xml;
+							}else if(d.pid !=0){
+								if(st.action)
+									var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/projectcontentinfo/projectcontentinfo/getProcessOne?id=" + d.id + "&projectReportData.id="+ d.id + "&type="+d.projectStatus+"','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								else
+									var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								return xml;
+							}else{
+								return '';
+							}
+						}},*/
 					{templet: complain, align:'center', title: '操作',width:130}
 					{templet: complain, align:'center', title: '操作',width:130}
 				]],
 				]],
 				done: function () {
 				done: function () {
@@ -313,7 +386,7 @@
 			if(d.pid=="0") {
 			if(d.pid=="0") {
 				if(1 == d.operationSign) {
 				if(1 == d.operationSign) {
 					return [
 					return [
-						'<a href="javascript:void(0)" onclick="openDialogreAudit(\'新增工作内容\', \'${ctx}/project/projectImplementEarly/form?view=before&dictType=&parentIds=&projectContentId='+d.projectContentId+'&project.id=' + d.id +'\',\'95%\',\'95%\')" style=\"color: white;background: darkseagreen\" class="op-btn op-btn-add" ><i class="fa fa-plus"></i> 新增</a>',
+						'<a href="javascript:void(0)" onclick="openDialogreAudit(\'新增施工合同\', \'${ctx}/project/constructionContract/form?view=before&projectId=' + d.id +'\',\'95%\',\'95%\')" style=\"color: white;background: darkseagreen\" class="op-btn op-btn-add" ><i class="fa fa-plus"></i> 新增</a>',
 					].join('');
 					].join('');
 				}else{
 				}else{
 					return [
 					return [
@@ -325,8 +398,8 @@
 					if(d.status ==null){
 					if(d.status ==null){
 						//子级内容
 						//子级内容
 						return [
 						return [
-							'<a href="javascript:void(0)" onclick="openDialogreAudit(\'修改工作内容\', \'${ctx}/projectcontentinfo/projectcontentinfo/form?view=content&condition=early&flag=modify&dictType=&id='+d.contentPId+'&parentIds='+d.parentIds+'&infoId='+d.id+'\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>',
-							/*'<a href="${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+d.id+'&id='+d.contentPId+'&type=8&condition=record" onclick="return confirmxRefresh(\'确认要删除该工作内容报告吗?\', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>',*/
+							'<a href="javascript:void(0)" onclick="openDialogreAudit(\'修改施工合同内容\', \'${ctx}/project/constructionContract/form?id='+d.id+'&projectId='+d.pid+ '\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>',
+							'<a href="${ctx}/project/constructionContract/delete?projectId='+d.pid+'&id='+d.id+'" onclick="return confirmxRefresh(\'确认要删除该施工合同吗?\', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>',
 						].join('');
 						].join('');
 
 
 					}else{
 					}else{
@@ -468,7 +541,7 @@
 							parent.layer.msg(data.msg,{icon:2});
 							parent.layer.msg(data.msg,{icon:2});
 						}
 						}
 						//parent.refreshTrees();
 						//parent.refreshTrees();
-						location = '${ctx}/project/projectRecords/list';
+						location = '${ctx}/project/constructionContract/list';
 					}
 					}
 				});
 				});
 			}
 			}
@@ -477,13 +550,5 @@
 		return false;
 		return false;
 	}
 	}
 </script>
 </script>
-<script type="text/javascript">
-	resizeListWindow1();
-	$(window).resize(function(){
-		resizeListWindow1();
-	});
-</script>
 </body>
 </body>
-
-</html>
-
+</html>

+ 480 - 0
src/main/webapp/webpage/modules/projectrecord/implementStage/projectDesignForm.jsp

@@ -0,0 +1,480 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+    <title>设计变更管理</title>
+    <meta name="decorator" content="default"/>
+    <script src="${ctxStatic}/layer-v2.3/layui/xmSelect.js" charset="utf-8"></script>
+    <style>
+        #projectContentDataType-error{
+            left:0;
+            top:40px;
+        }
+    </style>
+    <script type="text/javascript">
+        $.fn.serializeJson=function(){
+            var serializeObj={};
+            var array=this.serializeArray();
+            var str=this.serialize();
+            $(array).each(function(){
+                if(serializeObj[this.name]){
+                    if($.isArray(serializeObj[this.name])){
+                        serializeObj[this.name].push(this.value);
+                    }else{
+                        serializeObj[this.name]=[serializeObj[this.name],this.value];
+                    }
+                }else{
+                    serializeObj[this.name]=this.value;
+                }
+            });
+            return serializeObj;
+        };
+
+        var validateForm;
+        var detailFlag =0;
+        function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+
+                beforeSubmit();
+                $("#inputForm").submit();
+                return true;
+            }
+
+            return false;
+        }
+        function beforeSubmit() {
+            var contentDetaStr = '';
+            var contentTypeId = $("#projectContentDataSign").val();
+
+
+            $(document.getElementById("projectContentDataType")).removeAttr("disabled");
+        }
+
+        $(function() {
+            var editVal = '${projectcontentinfo.edit}';
+
+            if($("#createDate").val()==null || $("#createDate").val()==''){
+                $("#createDate").val(getNowFormatDate());
+            }
+            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 tp = "${projectcontentinfo.dictType}";
+            var tp2 = "${projectcontentinfo.projectContentData.id}"
+            if((tp!=null && tp!='')||(tp2!=null && tp2!='')){
+                $(document.getElementById("projectContentDataType")).attr("disabled","disabled");
+            }
+            initControlData("1");
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+        });
+
+
+        function openDialogre(title,url,width,height,formId){
+
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                skin: 'three-btns',
+                maxmin: true, //开启最大化最小化按钮
+                content: url ,
+                btn: ['提交','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    inputForm.attr("action","${ctx}/projectcontentinfo/projectcontentinfo/ajaxsaveBaseData");//表单提交成功后,从服务器返回的url在当前tab中展示
+                    var $document = iframeWin.contentWindow.document;
+                    formSubmitAjax($document,formId,index);
+                },
+                btn2: function(index){
+                }
+            });
+        }
+
+        function formSubmitAjax($document,inputForm,index){
+            var validateForm = $($document.getElementById(inputForm)).validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            if(validateForm.form()){
+                $($document.getElementById(inputForm)).ajaxSubmit({
+                    success:function(data) {
+                        if(!data.success){
+                            top.layer.msg("保存依据资料信息异常!",{icon:2});
+                            return false;
+                        }
+                        var idx = $("#workBaseDataList tr").length;
+                        addRowBaseData("#workBaseDataList",idx,workBaseDataTpl,data.body.workBasedData);
+                        parent.layer.msg(data.msg,{icon:1});
+                        top.layer.close(index)
+                    }
+                });
+            }
+        }
+
+        function getNowFormatDate() {
+            var date = new Date();
+            var seperator1 = "-";
+            var month = date.getMonth() + 1;
+            var strDate = date.getDate();
+            month = (month < 10)?"0"+month:month;
+            strDate = (strDate < 10)?"0"+strDate:strDate;
+            var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate;
+            return currentdate;
+        }
+
+        function accordingBtn(obj, prefix,userId){
+            //var id = $(prefix+"_id").val();
+            $(prefix+"_file").click();
+        }
+
+        function insertAccording(tValue,idx,prefix) {
+            var files = $(prefix+"_file")[0].files;
+            for(var i=0;i<files.length;i++) {
+                var file = files[i];
+                var attachmentId = "";
+                var attachmentFlag = "132";
+                console.log(file);
+                var timestamp = new Date().getTime();
+
+                var storeAs = "attachment-file/basedData/" + timestamp + "/" + file['name'];
+                var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
+                /*将这段字符串存到数据库即可*/
+                var divId = "_attachment";
+                multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, "0",1,idx,prefix);
+            }
+            $(prefix+"_file").val(123)
+            //var idx1 = $("#workBaseDataList tr").length +1;
+        }
+
+        function addFile() {
+            $("#attachment_file").click();
+        }
+
+        function insertTitle(tValue){
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+                var attachmentId = "";
+                var attachmentFlag = "94";
+                var timestamp=new Date().getTime();
+
+                var storeAs = "attachment-file/projectContentData/"+timestamp+"/"+file['name'];
+                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+                var divId = "_attachment";
+                $("#addFile"+divId).show();
+                multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
+        }
+
+        function openDialogreControl(title,url,width,height,target){
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                skin: 'three-btns',
+                maxmin: true, //开启最大化最小化按钮
+                content: url ,
+                btn: ['提交','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    var $document = iframeWin.contentWindow.document;
+                    var index1 = parent.layer.load(0, {shade: [0.1, 'tranparent']});
+                    formSubmit($document,"inputForm",index,index1);
+                },
+                btn2: function(index){
+                    parent.layer.close(index)
+                },
+                end:function(index){
+                    parent.layer.close(index)
+                }
+            });
+        }
+        function formSubmit($document,inputForm,index,index1){
+            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) {
+                        parent.parent.layer.msg("操作成功",{icon:1})
+                        parent.parent.layer.close(index1)
+                        parent.layer.close(index1)
+                        parent.parent.layer.close(index)
+                        parent.layer.close(index)
+                        initGetControlData();
+                    },error:function(){
+                        parent.parent.layer.msg("操作失败",{icon:2})
+                        parent.parent.layer.close(index1)
+                        parent.layer.close(index1)
+                        parent.parent.layer.close(index)
+                        parent.layer.close(index)
+                        initControlData("1");
+                    }
+                });
+            }else {
+                parent.parent.layer.msg("信息未填写完整!", {icon: 2});
+                parent.layer.close(index1)
+                parent.parent.layer.close(index1)
+            }
+        }
+        /**
+         * 删除临时数据
+         */
+        function initControlData(obj,othis,del,tableId){
+            if(del == "del"){
+                proId = tableId;
+            }else{
+                proId = "";
+            }
+            $.ajax({
+                type:'post',
+                url:'${ctx}/projectcontroltable/projectControlTable/delControlData',
+                data:{
+                    "projectId":"${projectcontentinfo.project.id}",
+                    "projectContentId":proId,
+                    "flag":del
+                },
+                success:function(data){
+                    if(obj != "1"){
+                        if(data.flag){
+                            //$(othis).parent().parent().parent().remove();
+                            parent.layer.msg("数据删除成功",{icon:1})
+                            $(othis).remove()
+                        }else{
+                            parent.layer.msg("数据删除失败",{icon:2})
+                        }
+                    }
+                }
+            })
+        }
+
+        function getMatchDate(str){
+            var reDateTime = /^(?:19|20)[0-9][0-9]-(?:(?:0[1-9])|(?:1[0-2]))-(?:(?:[0-2][1-9])|(?:[1-3][0-1]))/
+            var date = (""+str).match(reDateTime);
+            if(date){
+                return date[0]
+            }else{
+                return "";
+            }
+        }
+
+        function formatNum(obj) {
+            var val = $(obj).val();
+            console.log("-----------val"+val);
+            if(!isNumber(val))return;
+            var money = parseFloat((val + "").replace(/[^\d\.-]/g, "")).toFixed(2) + "";
+            var l = money.split(".")[0].split("").reverse(),
+                r = money.split(".")[1];
+            t = "";
+            for(i = 0; i < l.length; i ++ )
+            {
+                t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? "," : "");
+            }
+            $(obj).val(t.split("").reverse().join("") + "." + r);
+        }
+        function isNumber(val){
+            if(val === "" || val ==null){
+                return false;
+            }
+            var regPos = /^\d+(\.\d+)?$/; //非负浮点数
+            var regNeg = /^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$/; //负浮点数
+            if(regPos.test(val) || regNeg.test(val)){
+                return true;
+            }else{
+                return false;
+            }
+
+        }
+        $(document).ready(function() {
+            laydate.render({
+                elem: '#closingDate',
+                event: 'focus',
+                type : 'date'
+            });
+        });
+
+    </script>
+</head>
+<body>
+<div class="single-form">
+    <div class="container${container}">
+        <form:form id="inputForm" modelAttribute="projectVisa" action="${ctx}/project/projectDesignChange/save?" method="post" class="form-horizontal">
+            <form:hidden path="id"/>
+            <form:hidden path="contractId" value="${projectVisa.contractId}"/>
+            <form:hidden path="type" value="${projectVisa.type}"/>
+
+
+            <sys:message content="${message}"/>
+            <div class="form-group layui-row first lw12">
+                <div class="form-group-label"><h2>基本信息</h2></div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>设计变更编号:</label>
+                    <div class="layui-input-block">
+                        <form:input path="number" htmlEscape="false"   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">
+                        <input class="laydate-icondate form-control layui-input layer-date laydate-icon" id="closingDate" name="date" value="<fmt:formatDate value="${projectVisa.date}" 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">
+                        <form:input path="sendMoney" htmlEscape="false"   class="form-control required layui-input"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">审批手续合规性:</label>
+                    <div class="layui-input-block">
+                        <form:input path="procedure" htmlEscape="false" class="form-control layui-input"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>定审金额(万元):</label>
+                    <div class="layui-input-block">
+                        <form:input path="confirmMoney" htmlEscape="false"   class="form-control required layui-input"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm12 lw7">
+                    <label class="layui-form-label">主要内容:</label>
+                    <div class="layui-input-block">
+                        <form:textarea path="content" htmlEscape="false" rows="4" maxlength="500"
+                                       onkeyup="checkContentKeyUp('unitIntroduction',500);" class="form-control "/>
+                    </div>
+                    <span id="contentMsg" style="float: right"></span>
+                </div>
+            </div>
+
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>附件信息</h2></div>
+                <div class="layui-item nav-btns">
+                    <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+                </div>
+                <div id="addFile_attachment" style="display: none" class="upload-progress">
+                    <span id="fileName_attachment" ></span>
+                    <b><span id="baifenbi_attachment" ></span></b>
+                    <div class="progress">
+                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+                        </div>
+                    </div>
+                </div>
+                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+                <span id="attachment_title"></span>
+                <div class="layui-item layui-col-xs12" style="padding:0 16px;">
+                    <table id="upTable" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                            <th>文件名称</th>
+                            <th>上传人</th>
+                            <th>上传时间</th>
+                            <th width="150px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_attachment">
+                        <c:forEach items="${projectVisa.workAttachments}" var = "workAttachment" varStatus="status">
+                            <tr>
+                                <c:choose>
+                                    <c:when test="${fn:containsIgnoreCase(workAttachment.attachmentName,'jpg')
+                                                                           or fn:containsIgnoreCase(workAttachment.attachmentName,'png')
+                                                                           or fn:containsIgnoreCase(workAttachment.attachmentName,'gif')
+                                                                           or fn:containsIgnoreCase(workAttachment.attachmentName,'bmp')
+                                                                           or fn:containsIgnoreCase(workAttachment.attachmentName,'jpeg')}">
+                                        <td><img src="${workAttachment.url}" width="50" height="50" alt="${workAttachment.attachmentName}"/></td>
+                                    </c:when>
+                                    <c:otherwise>
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(workAttachment.attachmentName,'pdf')}">
+                                                <td><a href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%','1')">${workAttachment.attachmentName}</a></td>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <td><a href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName}</a></td>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:otherwise>
+                                </c:choose>
+                                <td>${workAttachment.createBy.name}</td>
+                                <td><fmt:formatDate value="${workAttachment.createDate}" type="both"/></td>
+                                <td class="op-td">
+                                    <div class="op-btn-box" >
+                                        <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+                                        <c:if test="${workAttachment.createBy.id eq fns:getUser().id}">
+                                            <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workAttachment.url}&id=${workAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i> 删除</a>
+                                        </c:if>
+                                    </div>
+                                </td>
+                            </tr>
+                        </c:forEach>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+        </form:form>
+    </div>
+</div>
+</body>
+</html>

+ 504 - 0
src/main/webapp/webpage/modules/projectrecord/implementStage/projectDesignList.jsp

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

+ 128 - 0
src/main/webapp/webpage/modules/projectrecord/implementStage/projectDesignView.jsp

@@ -0,0 +1,128 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+    <title>设计变更管理</title>
+    <meta name="decorator" content="default"/>
+    <script src="${ctxStatic}/layer-v2.3/layui/xmSelect.js" charset="utf-8"></script>
+    <style>
+        #projectContentDataType-error{
+            left:0;
+            top:40px;
+        }
+    </style>
+</head>
+<body>
+<div class="single-form">
+    <div class="container${container}">
+        <form:form id="inputForm" modelAttribute="projectVisa" action="${ctx}/project/projectDesignChange/save?" method="post" class="form-horizontal">
+            <form:hidden path="id"/>
+            <form:hidden path="contractId" value="${projectVisa.contractId}"/>
+
+            <sys:message content="${message}"/>
+            <div class="form-group layui-row first lw12">
+                <div class="form-group-label"><h2>基本信息</h2></div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">设计变更编号:</label>
+                    <div class="layui-input-block">
+                        <form:input path="number" htmlEscape="false" readonly="true"  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">
+                        <input class="laydate-icondate form-control layui-input layer-date laydate-icon" readonly="true" id="closingDate" name="date" value="<fmt:formatDate value="${projectVisa.date}" pattern="yyyy-MM-dd"/>">
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">送审金额(万元):</label>
+                    <div class="layui-input-block">
+                        <form:input path="sendMoney" htmlEscape="false" readonly="true"  class="form-control required layui-input"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">审批手续合规性:</label>
+                    <div class="layui-input-block">
+                        <form:input path="procedure" htmlEscape="false" readonly="true" 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">
+                        <form:input path="confirmMoney" htmlEscape="false" readonly="true"  class="form-control required layui-input"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm12 lw7">
+                    <label class="layui-form-label">主要内容:</label>
+                    <div class="layui-input-block">
+                        <form:textarea path="content" htmlEscape="false" rows="4" maxlength="500" readonly="true"
+                                       onkeyup="checkContentKeyUp('unitIntroduction',500);" class="form-control "/>
+                    </div>
+                    <span id="contentMsg" style="float: right"></span>
+                </div>
+            </div>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>附件信息</h2></div>
+                <div class="layui-item nav-btns">
+                </div>
+                <div id="addFile_attachment" style="display: none" class="upload-progress">
+                    <span id="fileName_attachment" ></span>
+                    <b><span id="baifenbi_attachment" ></span></b>
+                    <div class="progress">
+                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+                        </div>
+                    </div>
+                </div>
+                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+                <span id="attachment_title"></span>
+                <div class="layui-item layui-col-xs12" style="padding:0 16px;">
+                    <table id="upTable" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                            <th>文件名称</th>
+                            <th>上传人</th>
+                            <th>上传时间</th>
+                            <th width="150px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_attachment">
+                        <c:forEach items="${projectVisa.workAttachments}" var = "workAttachment" varStatus="status">
+                            <tr>
+                                <c:choose>
+                                    <c:when test="${fn:containsIgnoreCase(workAttachment.attachmentName,'jpg')
+                                                                           or fn:containsIgnoreCase(workAttachment.attachmentName,'png')
+                                                                           or fn:containsIgnoreCase(workAttachment.attachmentName,'gif')
+                                                                           or fn:containsIgnoreCase(workAttachment.attachmentName,'bmp')
+                                                                           or fn:containsIgnoreCase(workAttachment.attachmentName,'jpeg')}">
+                                        <td><img src="${workAttachment.url}" width="50" height="50" alt="${workAttachment.attachmentName}"/></td>
+                                    </c:when>
+                                    <c:otherwise>
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(workAttachment.attachmentName,'pdf')}">
+                                                <td><a href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%','1')">${workAttachment.attachmentName}</a></td>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <td><a href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName}</a></td>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:otherwise>
+                                </c:choose>
+                                <td>${workAttachment.createBy.name}</td>
+                                <td><fmt:formatDate value="${workAttachment.createDate}" type="both"/></td>
+                                <td class="op-td">
+                                    <div class="op-btn-box" >
+                                        <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                    </div>
+                                </td>
+                            </tr>
+                        </c:forEach>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+        </form:form>
+    </div>
+</div>
+</body>
+</html>

+ 2 - 2
src/main/webapp/webpage/modules/projectrecord/implementStage/projectVisaForm.jsp

@@ -381,7 +381,7 @@
                 </div>
                 </div>
 
 
                 <div class="layui-item layui-col-sm6">
                 <div class="layui-item layui-col-sm6">
-                    <label class="layui-form-label"><span class="require-item">*</span>送审金额:</label>
+                    <label class="layui-form-label"><span class="require-item">*</span>送审金额(万元):</label>
                     <div class="layui-input-block">
                     <div class="layui-input-block">
                         <form:input path="sendMoney" htmlEscape="false"   class="form-control required layui-input"/>
                         <form:input path="sendMoney" htmlEscape="false"   class="form-control required layui-input"/>
                     </div>
                     </div>
@@ -393,7 +393,7 @@
                     </div>
                     </div>
                 </div>
                 </div>
                 <div class="layui-item layui-col-sm6">
                 <div class="layui-item layui-col-sm6">
-                    <label class="layui-form-label"><span class="require-item">*</span>定审金额:</label>
+                    <label class="layui-form-label"><span class="require-item">*</span>定审金额(万元):</label>
                     <div class="layui-input-block">
                     <div class="layui-input-block">
                         <form:input path="confirmMoney" htmlEscape="false"   class="form-control required layui-input"/>
                         <form:input path="confirmMoney" htmlEscape="false"   class="form-control required layui-input"/>
                     </div>
                     </div>

+ 3 - 3
src/main/webapp/webpage/modules/projectrecord/implementStage/projectVisaList.jsp

@@ -283,7 +283,7 @@
                         }},
                         }},
                     {field: 'contractName', title: '项目名称/合同名称/签证编号',templet:function(d){
                     {field: 'contractName', title: '项目名称/合同名称/签证编号',templet:function(d){
                             if(d.condition ==1){
                             if(d.condition ==1){
-                                return  "<a class=\"attention-info pid\" title=\"" + d.contractName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看合同信息', '${ctx}/project/constructionContract/view?id=" + d.projectId +"','95%', '95%')\">" + d.contractName + "</a>";
+                                return  "<a class=\"attention-info pid\" title=\"" + d.contractName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目信息', '${ctx}/project/projectRecords/view?id=" + d.id +"','95%', '95%')\">" + d.contractName + "</a>";
                             }else if(d.condition ==2){
                             }else if(d.condition ==2){
                                 return  "<a class=\"attention-info pid\" title=\"" + d.contractName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看合同信息', '${ctx}/project/constructionContract/view?id=" + d.contractId +"','95%', '95%')\">" + d.contractName + "</a>";
                                 return  "<a class=\"attention-info pid\" title=\"" + d.contractName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看合同信息', '${ctx}/project/constructionContract/view?id=" + d.contractId +"','95%', '95%')\">" + d.contractName + "</a>";
                             }else{
                             }else{
@@ -351,11 +351,11 @@
                 ].join('');
                 ].join('');
             } else if(d.condition ==2) {
             } else if(d.condition ==2) {
                 return [
                 return [
-                    '<a href="javascript:void(0)" onclick="openDialogreAudit(\'新增工作内容\', \'${ctx}/project/projectVisa/form?type=1&contractId='+d.contractId+' \',\'95%\',\'95%\')" style=\"color: white;background: darkseagreen\" class="op-btn op-btn-add" ><i class="fa fa-plus"></i> 新增</a>',
+                    '<a href="javascript:void(0)" onclick="openDialogreAudit(\'新增签证内容\', \'${ctx}/project/projectVisa/form?type=1&contractId='+d.contractId+' \',\'95%\',\'95%\')" style=\"color: white;background: darkseagreen\" class="op-btn op-btn-add" ><i class="fa fa-plus"></i> 新增</a>',
                 ].join('');
                 ].join('');
             } else if (d.condition ==3){
             } else if (d.condition ==3){
                 return [
                 return [
-                    '<a href="javascript:void(0)" onclick="openDialogreAudit(\'修改工作内容\', \'${ctx}/project/projectVisa/updateTable?type=1&id='+d.id+'&contractId='+d.contractId+'\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>',
+                    '<a href="javascript:void(0)" onclick="openDialogreAudit(\'修改签证内容\', \'${ctx}/project/projectVisa/updateTable?type=1&id='+d.id+'&contractId='+d.contractId+'\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>',
                     '<a href="${ctx}/project/projectVisa/delete?type=1&id='+d.id+'" onclick="return confirmxRefresh(\'确认要删除该签证汇总表吗?\', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>',
                     '<a href="${ctx}/project/projectVisa/delete?type=1&id='+d.id+'" onclick="return confirmxRefresh(\'确认要删除该签证汇总表吗?\', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>',
                 ].join('');
                 ].join('');
 
 

+ 3 - 6
src/main/webapp/webpage/modules/projectrecord/implementStage/projectVisaView.jsp

@@ -2,7 +2,7 @@
 <%@ include file="/webpage/include/taglib.jsp"%>
 <%@ include file="/webpage/include/taglib.jsp"%>
 <html>
 <html>
 <head>
 <head>
-    <title>工作内容详情管理</title>
+    <title>签证管理</title>
     <meta name="decorator" content="default"/>
     <meta name="decorator" content="default"/>
     <script src="${ctxStatic}/layer-v2.3/layui/xmSelect.js" charset="utf-8"></script>
     <script src="${ctxStatic}/layer-v2.3/layui/xmSelect.js" charset="utf-8"></script>
     <style>
     <style>
@@ -30,17 +30,14 @@
                         <form:input path="number" htmlEscape="false" readonly="true"  class="form-control layui-input required"/>
                         <form:input path="number" htmlEscape="false" readonly="true"  class="form-control layui-input required"/>
                     </div>
                     </div>
                 </div>
                 </div>
-
-
                 <div class="layui-item layui-col-sm6">
                 <div class="layui-item layui-col-sm6">
                     <label class="layui-form-label">签证日期</label>
                     <label class="layui-form-label">签证日期</label>
                     <div class="layui-input-block">
                     <div class="layui-input-block">
                         <input class="laydate-icondate form-control layui-input layer-date laydate-icon" readonly="true" id="closingDate" name="date" value="<fmt:formatDate value="${projectVisa.date}" pattern="yyyy-MM-dd"/>">
                         <input class="laydate-icondate form-control layui-input layer-date laydate-icon" readonly="true" id="closingDate" name="date" value="<fmt:formatDate value="${projectVisa.date}" pattern="yyyy-MM-dd"/>">
                     </div>
                     </div>
                 </div>
                 </div>
-
                 <div class="layui-item layui-col-sm6">
                 <div class="layui-item layui-col-sm6">
-                    <label class="layui-form-label">送审金额:</label>
+                    <label class="layui-form-label">送审金额(万元):</label>
                     <div class="layui-input-block">
                     <div class="layui-input-block">
                         <form:input path="sendMoney" htmlEscape="false" readonly="true"  class="form-control required layui-input"/>
                         <form:input path="sendMoney" htmlEscape="false" readonly="true"  class="form-control required layui-input"/>
                     </div>
                     </div>
@@ -52,7 +49,7 @@
                     </div>
                     </div>
                 </div>
                 </div>
                 <div class="layui-item layui-col-sm6">
                 <div class="layui-item layui-col-sm6">
-                    <label class="layui-form-label">定审金额:</label>
+                    <label class="layui-form-label">定审金额(万元):</label>
                     <div class="layui-input-block">
                     <div class="layui-input-block">
                         <form:input path="confirmMoney" htmlEscape="false" readonly="true"  class="form-control required layui-input"/>
                         <form:input path="confirmMoney" htmlEscape="false" readonly="true"  class="form-control required layui-input"/>
                     </div>
                     </div>