2 コミット 849ebf0d24 ... 6f25df2a2d

作者 SHA1 メッセージ 日付
  user7 6f25df2a2d Merge remote-tracking branch 'origin/master' 4 年 前
  user7 2eea0721b8 签证汇总表 4 年 前

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

@@ -0,0 +1,19 @@
+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);
+
+
+
+
+}

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

@@ -0,0 +1,20 @@
+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;//定审金额
+
+}

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

@@ -0,0 +1,37 @@
+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;
+    }*/
+}

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

@@ -0,0 +1,231 @@
+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";
+    }
+}

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

@@ -0,0 +1,23 @@
+package com.jeeplus.modules.projectVisa.dao;
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.projectType.entity.ProjectType;
+import com.jeeplus.modules.projectVisa.entity.ProjectVisa;
+import com.jeeplus.modules.projectrecord.entity.ProjectImplementEarly;
+
+import java.util.List;
+@MyBatisDao
+public interface ProjectVisaDao extends CrudDao<ProjectVisa> {
+
+
+    Integer getProjectVisaCount(ProjectVisa projectVisa);
+
+    List<ProjectVisa> getProjectVisaList(ProjectVisa projectVisa);
+
+
+
+    ProjectVisa getVisa(ProjectVisa projectVisa);
+
+    List<ProjectVisa> getVisaList(String id);
+}

+ 86 - 0
src/main/java/com/jeeplus/modules/projectVisa/entity/ProjectVisa.java

@@ -0,0 +1,86 @@
+package com.jeeplus.modules.projectVisa.entity;
+
+import com.jeeplus.common.persistence.DataEntity;
+import com.jeeplus.modules.projectType.entity.ProjectType;
+
+import java.util.Date;
+
+/**
+ * 实施阶段-签证汇总
+ */
+public class ProjectVisa extends DataEntity<ProjectVisa> {
+
+    private String contractId;//实施阶段合同Id
+    private String number;//签证编号
+    private Date   date;//签证时间
+    private String content;//签证内容
+    private Double sendMoney;//送审金额
+    private String procedure;//审批手续合规性
+    private Double confirmMoney;//定审金额
+    private String type;//汇总类型1是签证2是设计
+
+    public String getContractId() {
+        return contractId;
+    }
+
+    public void setContractId(String contractId) {
+        this.contractId = contractId;
+    }
+
+    public String getNumber() {
+        return number;
+    }
+
+    public void setNumber(String number) {
+        this.number = number;
+    }
+
+    public Date getDate() {
+        return date;
+    }
+
+    public void setDate(Date date) {
+        this.date = date;
+    }
+
+
+    public Double getSendMoney() {
+        return sendMoney;
+    }
+
+    public void setSendMoney(Double sendMoney) {
+        this.sendMoney = sendMoney;
+    }
+
+    public Double getConfirmMoney() {
+        return confirmMoney;
+    }
+
+    public void setConfirmMoney(Double confirmMoney) {
+        this.confirmMoney = confirmMoney;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getProcedure() {
+        return procedure;
+    }
+
+    public void setProcedure(String procedure) {
+        this.procedure = procedure;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+}

+ 109 - 0
src/main/java/com/jeeplus/modules/projectVisa/entity/VisaTreeData.java

@@ -0,0 +1,109 @@
+package com.jeeplus.modules.projectVisa.entity;
+
+import com.jeeplus.common.persistence.DataEntity;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecordTreeData;
+
+import java.util.Date;
+
+public class VisaTreeData extends DataEntity<VisaTreeData> {
+
+    private String contractId;//合同Id
+    private String tableId;//设计变更-签证表Id
+    private String contractName;//合同名称
+    private String number;//设计变更-签证编号
+    private Date date;//设计变更-签证时间
+    private String pid;//父类id=0
+    private Integer operationSign;//操作标识
+    private Double sendMoney;//送审金额
+    private String procedure;//审批手续合规性
+    private Double confirmMoney;//定审金额
+    private String type;//汇总类型1是签证2是设计
+
+    public String getContractId() {
+        return contractId;
+    }
+
+    public void setContractId(String contractId) {
+        this.contractId = contractId;
+    }
+
+    public String getTableId() {
+        return tableId;
+    }
+
+    public void setTableId(String tableId) {
+        this.tableId = tableId;
+    }
+
+    public String getContractName() {
+        return contractName;
+    }
+
+    public void setContractName(String contractName) {
+        this.contractName = contractName;
+    }
+
+    public String getNumber() {
+        return number;
+    }
+
+    public void setNumber(String number) {
+        this.number = number;
+    }
+
+    public Date getDate() {
+        return date;
+    }
+
+    public void setDate(Date date) {
+        this.date = date;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getPid() {
+        return pid;
+    }
+
+    public void setPid(String pid) {
+        this.pid = pid;
+    }
+
+    public Integer getOperationSign() {
+        return operationSign;
+    }
+
+    public void setOperationSign(Integer operationSign) {
+        this.operationSign = operationSign;
+    }
+
+    public Double getSendMoney() {
+        return sendMoney;
+    }
+
+    public void setSendMoney(Double sendMoney) {
+        this.sendMoney = sendMoney;
+    }
+
+    public String getProcedure() {
+        return procedure;
+    }
+
+    public void setProcedure(String procedure) {
+        this.procedure = procedure;
+    }
+
+    public Double getConfirmMoney() {
+        return confirmMoney;
+    }
+
+    public void setConfirmMoney(Double confirmMoney) {
+        this.confirmMoney = confirmMoney;
+    }
+}

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

@@ -0,0 +1,60 @@
+package com.jeeplus.modules.projectVisa.service;
+
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.service.CrudService;
+import com.jeeplus.common.utils.Collections3;
+import com.jeeplus.common.utils.MenuStatusEnum;
+import com.jeeplus.modules.projectVisa.dao.ProjectVisaDao;
+import com.jeeplus.modules.projectVisa.entity.ProjectVisa;
+import com.jeeplus.modules.projectrecord.entity.ProjectImplementEarly;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+@Service
+public class ProjectVisaService extends CrudService<ProjectVisaDao,ProjectVisa> {
+
+    @Autowired
+    private ProjectVisaDao projectVisaDao;
+
+    @Transactional(readOnly = true)
+    public ProjectVisa getVisa(ProjectVisa projectVisa) {
+        return projectVisaDao.getVisa(projectVisa);
+    }
+
+    @Transactional(readOnly = true)
+    public List<ProjectVisa> getVisaList(String id) {
+        List<ProjectVisa> projectVisaList=projectVisaDao.getVisaList(id);
+        return projectVisaList;
+    }
+
+
+
+    /*
+
+
+
+
+    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;
+    }*/
+}

+ 340 - 0
src/main/java/com/jeeplus/modules/projectVisa/web/ProjectVisaController.java

@@ -0,0 +1,340 @@
+package com.jeeplus.modules.projectVisa.web;
+
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.MyBeanUtils;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.act.entity.Act;
+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.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.Office;
+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.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.task.Task;
+import org.apache.shiro.authz.annotation.Logical;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.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/projectVisa")
+public class ProjectVisaController extends BaseController {
+
+    @Autowired
+    private ProjectVisaService  projectVisaService;
+    @Autowired
+    private ProjectImplementEarlyService projectImplementEarlyService;
+    @Autowired
+    private ProjectContentDataService projectContentDataService;
+    @Autowired
+    private ProjectcontentinfoService projectcontentinfoService;
+    @Autowired
+    private ContractService contractService;
+
+
+    /*@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:projectVisa: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/projectVisaList";
+    }
+
+    /**
+     * 签证汇总表列表页面
+     *//*
+    @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(ProjectVisa projectVisa, Model model) {
+
+        model.addAttribute("projectVisa", projectVisa);
+
+        return "modules/projectrecord/implementStage/projectVisaForm";
+    }
+
+    //编辑签证汇总页面
+    @RequestMapping(value = "updateTable")
+    public String updateTable(ProjectVisa projectVisa, Model model) {
+
+        if(StringUtils.isNotEmpty(projectVisa.getId())){
+            ProjectVisa visa=projectVisaService.getVisa(projectVisa);
+            model.addAttribute("projectVisa", visa);
+        }else{
+            model.addAttribute("projectVisa", projectVisa);
+        }
+
+        return "modules/projectrecord/implementStage/projectVisaForm";
+    }
+
+
+    /**
+     * 保存客户管理
+     */
+    @RequestMapping(value = "save")
+    public String save(ProjectVisa projectVisa,
+                       Model model, RedirectAttributes redirectAttributes,
+//					   @RequestParam(value = "upload_files") MultipartFile[] upload_files.
+                       HttpServletRequest request
+    ) throws Exception{
+
+
+        //上传文件
+//		List<WorkClientAttachment> workClientAttachments = workClientInfoService.uploadFile(request, upload_files, workClientInfo.getId(), VarStr.attachmentFlag[0]);
+//		List<WorkClientAttachment> workClientAttachmentList = workClientInfo.getWorkClientAttachmentList();
+//		workClientAttachments.addAll(workClientAttachmentList);
+//		workClientInfo.setWorkClientAttachmentList(workClientAttachments);
+
+        /*//保存当前人的公司
+        workClientInfo.setCompanyId(UserUtils.getSelectCompany().getId());
+        workClientInfo.setOfficeId(UserUtils.getSelectOffice().getId());
+        if(!workClientInfo.getIsNewRecord()){//编辑表单保存
+            WorkClientInfo t = workClientInfoService.get(workClientInfo.getId());//从数据库取出记录的值
+            MyBeanUtils.copyBeanNotNull2Bean(workClientInfo, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+            workClientInfoService.save(t);//保存
+        }else{//新增表单保存
+            workClientInfoService.save(workClientInfo);//保存
+        }*/
+        projectVisa.setType("1");
+        projectVisaService.save(projectVisa);
+
+        addMessage(redirectAttributes, "保存客户管理成功");
+        return "redirect:"+ Global.getAdminPath()+"/project/projectVisa/?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){
+
+        Page<ConstructionContract> page = contractService.findPage(new Page<ConstructionContract>(request, response), constructionContract);
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
+        }
+        List<ConstructionContract> contractList=page.getList();
+        Map<String,List> map = new HashMap<>();
+        List<VisaTreeData> treeList=new ArrayList<>();
+        //便利合同把合同给VisaTreeData而且pid为0
+        for(int i=0;i<contractList.size();i++){
+            VisaTreeData visaTreeData=new VisaTreeData();
+            ConstructionContract contract=contractList.get(i);
+            visaTreeData.setContractId(contract.getId());
+            visaTreeData.setId(contract.getId());
+            visaTreeData.setContractName(contract.getContractName());
+            visaTreeData.setDate(contract.getCreateDate());
+            visaTreeData.setNumber("");
+            visaTreeData.setPid("0");
+
+            treeList.add(visaTreeData);
+            //根据获取的合同的id去查找汇总表获取汇总表信息
+            List<ProjectVisa> projectVisaList=projectVisaService.getVisaList(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.setNumber(visa.getNumber());
+
+                treeList.add(visaTreeData2);
+            }
+        }
+        map.put("data",treeList);
+        return map;
+    }
+
+}

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

@@ -0,0 +1,282 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.modules.projectVisa.dao.ProjectVisaDao">
+
+	<sql id="projectVisaColumns">
+		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"
+	</sql>
+	
+	<sql id="projectVisaJoins">
+		LEFT JOIN construction_contract  b ON b.id = a.contract_id
+	</sql>
+	
+	<!--<select id="getProjectRecodesList" resultType="ProjectImplementEarly" >
+		SELECT
+			<include refid="projectRecordsColumns"/>
+		,
+		wci.name AS "workContractInfo.name",
+		wct.id AS "workContractInfo.client.id",
+		wct.name AS "workContractInfo.client.name",
+		o.top_company AS "office.name",
+		dsu.name as "projectRegistrant",
+		pci.id as projectContentId
+		FROM project_records a
+		<include refid="projectRecordsJoins"/>
+
+
+		LEFT JOIN work_project_user w on a.id = w.project_id
+		LEFT JOIN project_content_info pci on pci.project_id = a.id
+		LEFT JOIN sys_user su on w.user_id = su.id
+		LEFT JOIN sys_user dsu on a.create_by = dsu.id
+        LEFT JOIN work_project_user w1 on a.id = w1.project_id
+		LEFT JOIN work_contract_info wci on a.contract_id = wci.id
+		LEFT JOIN work_client_info wct on wci.client_id = wct.id
+        LEFT JOIN sys_office o ON o.id = a.office_id
+		<where>
+			a.status = 5
+            AND a.del_flag = 0
+			<if test="projectId != null and projectId != ''">
+				AND a.project_id like concat('%',#{projectId},'%')
+			</if>
+			<if test="projectName != null and projectName != ''">
+				AND a.project_name like concat(concat('%',#{projectName}),'%')
+			</if>
+			<if test="scaleType != null and scaleType != ''">
+				AND a.scale_type = #{scaleType}
+			</if>
+			<if test="scaleUnit != null and scaleUnit != ''">
+				AND a.scale_unit = #{scaleUnit}
+			</if>
+			<if test="scaleQuantity != null and scaleQuantity != ''">
+				AND a.scale_quantity = #{scaleQuantity}
+			</if>
+			<if test="projectSite != null and projectSite != ''">
+				AND a.project_site LIKE concat('%',#{projectSite},'%')
+			</if>
+			<if test="remarks != null and remarks != ''">
+				AND a.remarks LIKE concat('%',#{remarks},'%')
+			</if>
+			<if test="projectDesc != null and projectDesc != ''">
+				AND a.project_desc LIKE concat('%',#{projectDesc},'%')
+			</if>
+			<if test="area != null and area.id != null and area.id != ''">
+				AND a.area_id = #{area.id}
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.name !=null and workContractInfo.name !=''">
+				AND wci.name like concat(concat('%',#{workContractInfo.name}),'%')
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractNum !=null and workContractInfo.contractNum !=''">
+				AND wci.contract_num like concat(concat('%',#{workContractInfo.contractNum}),'%')
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractPrice !=null and workContractInfo.contractPrice !=''">
+				AND wci.contract_price = #{workContractInfo.contractPrice}
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractType !=null and workContractInfo.contractType !=''">
+				AND wci.contract_type = #{workContractInfo.contractType}
+			</if>
+			<if test="workContractInfo!=null and workContractInfo.client !=null and workContractInfo.client.name !=null and workContractInfo.client.name !=''">
+				AND wct.name like concat(concat('%',#{workContractInfo.client.name}),'%')
+			</if>
+			<if test="leaderNameStr !=null and leaderNameStr !=''">
+				AND su.name like concat(concat('%',#{leaderNameStr}),'%') AND w.is_master = '1' AND w.del_flag='0'
+			</if>
+			<if test="beginDate !=null">
+				AND a.create_date >= #{beginDate}
+			</if>
+			<if test="endDate !=null">
+				AND a.create_date &lt; #{endDate}
+			</if>
+            <if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+               AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id} )${sqlMap.dsf} )
+            </if>
+		</where>
+            GROUP BY a.id
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>-->
+
+    <!--<select id="getProjectRecodesCount" resultType="int" >
+        SELECT count(DISTINCT a.id)
+        FROM project_records a
+        <if test="leaderNameStr !=null and leaderNameStr !=''">
+            LEFT JOIN work_project_user w on a.id = w.project_id
+            LEFT JOIN sys_user su on w.user_id = su.id
+        </if>
+        LEFT JOIN work_project_user w1 on a.id = w1.project_id
+        <if test="workContractInfo !=null">
+            LEFT JOIN work_contract_info wci on a.contract_id = wci.id
+        </if>
+        <if test="workContractInfo!=null and workContractInfo.client !=null and workContractInfo.client.name !=null and workContractInfo.client.name !=''">
+            LEFT JOIN work_client_info wct on wci.client_id = wct.id
+        </if>
+        <where>
+			a.status = 5
+            AND a.del_flag = 0
+			<if test="projectId != null and projectId != ''">
+				AND a.project_id like concat('%',#{projectId},'%')
+			</if>
+			<if test="projectName != null and projectName != ''">
+				AND a.project_name like concat(concat('%',#{projectName}),'%')
+			</if>
+			<if test="scaleType != null and scaleType != ''">
+				AND a.scale_type = #{scaleType}
+			</if>
+			<if test="scaleUnit != null and scaleUnit != ''">
+				AND a.scale_unit = #{scaleUnit}
+			</if>
+			<if test="scaleQuantity != null and scaleQuantity != ''">
+				AND a.scale_quantity = #{scaleQuantity}
+			</if>
+			<if test="projectSite != null and projectSite != ''">
+				AND a.project_site LIKE concat('%',#{projectSite},'%')
+			</if>
+			<if test="remarks != null and remarks != ''">
+				AND a.remarks LIKE concat('%',#{remarks},'%')
+			</if>
+			<if test="projectDesc != null and projectDesc != ''">
+				AND a.project_desc LIKE concat('%',#{projectDesc},'%')
+			</if>
+			<if test="area != null and area.id != null and area.id != ''">
+				AND a.area_id = #{area.id}
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.name !=null and workContractInfo.name !=''">
+				AND wci.name like concat(concat('%',#{workContractInfo.name}),'%')
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractNum !=null and workContractInfo.contractNum !=''">
+				AND wci.contract_num like concat(concat('%',#{workContractInfo.contractNum}),'%')
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractPrice !=null and workContractInfo.contractPrice !=''">
+				AND wci.contract_price = #{workContractInfo.contractPrice}
+			</if>
+			<if test="workContractInfo !=null and workContractInfo.contractType !=null and workContractInfo.contractType !=''">
+				AND wci.contract_type = #{workContractInfo.contractType}
+			</if>
+			<if test="workContractInfo!=null and workContractInfo.client !=null and workContractInfo.client.name !=null and workContractInfo.client.name !=''">
+				AND wct.name like concat(concat('%',#{workContractInfo.client.name}),'%')
+			</if>
+			<if test="leaderNameStr !=null and leaderNameStr !=''">
+				AND su.name like concat(concat('%',#{leaderNameStr}),'%') AND w.is_master = '1' AND w.del_flag='0'
+			</if>
+			<if test="beginDate !=null">
+				AND a.create_date >= #{beginDate}
+			</if>
+			<if test="endDate !=null">
+				AND a.create_date &lt; #{endDate}
+			</if>
+            <if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
+                AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id})${sqlMap.dsf} )
+            </if>
+        </where>
+    </select>-->
+	<insert id="insert">
+		insert into contract_visa_design (
+			id ,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			contract_id,
+			number,
+			date,
+			content ,
+			send_money,
+			`procedure`,
+			confirm_money,
+			type
+		) values(
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{contractId},
+			#{number},
+			#{date},
+			#{content},
+			#{sendMoney},
+			#{procedure},
+			#{confirmMoney},
+			#{type}
+		)
+
+	</insert>
+
+	<update id="update" >
+		update contract_visa_design set
+		update_by=#{updateBy.id},
+		update_date=#{updateDate},
+		contract_id=#{contractId},
+		number=#{number},
+		date=#{date},
+		content=#{content},
+		send_money=#{sendMoney},
+		`procedure`=#{procedure},
+		confirm_money=#{confirmMoney},
+		type=#{type}
+		where id=#{id} and type=#{type}
+	</update>
+
+<!--根据合同id获取表格对象-->
+	<select id="getVisaList" 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=1
+	</select>
+	<!--根据id查询获取表格对象-->
+	<select id="getVisa" 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=1
+	</select>
+</mapper>

ファイルの差分が大きいため隠しています
+ 1033 - 0
src/main/webapp/webpage/modules/projectrecord/implementStage/projectDesignChangeForm.jsp


+ 620 - 0
src/main/webapp/webpage/modules/projectrecord/implementStage/projectDesignChangeList.jsp

@@ -0,0 +1,620 @@
+<%@ 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) {
+                }
+            });
+        }
+
+        /*//添加签证汇总
+        function openVisa(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: false, //开启最大化最小化按钮
+                content: url ,
+                skin:"three-btns",
+                btn: ['送审','暂存','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(3) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                    return false;
+                },
+                btn3: function(index){
+                }
+            });
+
+        }*/
+    </script>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+    </style>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+    <sys:message content="${message}"/>
+    <div class="layui-row">
+        <div class="full-width fl">
+            <div class="layui-row contentShadow shadowLR" id="queryDiv">
+                <form:form id="searchForm" modelAttribute="projectImplementEarly" action="${ctx}/project/projectImplementEarly/" method="post" class="form-inline">
+                    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+                    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+                    <table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+                    <div class="commonQuery lw6">
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">项目名称:</label>
+                            <div class="layui-input-block">
+                                <form:input path="projectName" htmlEscape="false" maxlength="64"  class=" form-control  layui-input"/>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird ">
+                            <label class="layui-form-label">项目负责人:</label>
+                            <div class="layui-input-block">
+                                <form:input path="leaderNameStr" htmlEscape="false" maxlength="255"  class=" form-control layui-input"/>
+                            </div>
+                        </div>
+                        <div class="layui-item athird">
+                            <div class="input-group">
+                                <a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+                                <button id="searchReset" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>
+                                <button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
+                            </div>
+                        </div>
+                        <div style="    clear:both;"></div>
+                    </div>
+                    <div id="moresees" style="clear:both;display:none;" class="lw6">
+                        <div class="layui-item query athird ">
+                            <label class="layui-form-label">合同名称:</label>
+                            <div class="layui-input-block">
+                                <input type="text" input="workContractInfoName" name="workContractInfo.name" value="" htmlEscape="false" maxlength="255"  class=" form-control layui-input">
+                            </div>
+                        </div>
+                        <div class="layui-item query athird ">
+                            <label class="layui-form-label">委托方:</label>
+                            <div class="layui-input-block">
+                                <input type="text" input="workContractInfoClientName" name="workContractInfo.client.name" value="" htmlEscape="false" maxlength="255"  class=" form-control layui-input">
+                            </div>
+                        </div>
+                        <div style="clear:both;"></div>
+                    </div>
+                </form:form>
+            </div>
+        </div>
+        <div class="full-width fl">
+            <div class="layui-form contentDetails contentShadow shadowLBR">
+                <div class="nav-btns">
+                    <%--<button class="nav-btn nav-btn-add" title="签证汇总" onclick="openVisa('签证汇总','${ctx}/project/projectVisa/form','95%','95%')"><i class="fa fa-plus"></i>&nbsp;添加</button>--%>
+                    <table:addRow url="${ctx}/project/projectVisa/form" title="签证汇总"></table:addRow><!-- 增加按钮 -->
+                    <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/projectVisa/getVisaList?projectId=${projectRecords.id}&pageNo=${page.pageNo}&projectName='+$("#projectName").val()+'&leaderNameStr='+$("#leaderNameStr").val()+'&workContractInfo.name='+workContractInfoName+'&workContractInfo.client.name='+workContractInfoClientName,
+                page: false,
+                cols: [[
+                    {type: 'numbers', align:'center', title: '序号' ,width:80},
+                    {field: 'projectId', title: '项目编号/当前阶段'},
+                    {field: 'projectName', align:'center', title: '项目名称/工作内容',templet:function(d){
+                            if(0 == d.pid){
+                                return "<a class=\"attention-info pid\" title=\"" + d.projectName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/project/projectRecords/view?id=" + d.id +"','95%', '95%')\">" + d.projectName + "</a>";
+                            }else{
+                                return "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogView('查看工作内容', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=contentView&condition=according&dictType=&id="+d.contentPId+"&parentIds="+d.parentIds+"&infoId="+d.id+"','95%', '95%')\">" + d.projectName + "</a>";
+                            }
+                        }},
+                    /*{field: 'clientName', align:'center', title: '委托方/当前阶段',templet: function(d){
+                            if(0 == d.pid){
+                                return "<font style = 'font-size:14px;font-weight:500;'>"+d.clientName+"</font>";
+                            }else{
+                                return "<font>"+d.clientName+"</font>";
+                            }
+                        }},*/
+                    {field: 'projectLeader', align:'center', title: '项目负责人',templet: function(d){
+                            if(0 == d.pid){
+                                return "<font style = 'font-size:14px;font-weight:500;'>"+d.projectLeader+"</font>";
+                            }else{
+                                return "<font>"+d.projectLeader+"</font>";
+                            }
+                        }},
+                    {field: 'projectRegistrant', align:'center', title: '登记人',templet: function(d){
+                            if(0 == d.pid){
+                                return "<font style = 'font-size:14px;font-weight:500;'>"+d.projectRegistrant+"</font>";
+                            }else{
+                                return "<font>"+d.projectRegistrant+"</font>";
+                            }
+                        }},
+                    {field: 'createDate', align:'center', title: '登记日期',width:100,templet: function(d){
+                            var date=d.createDate;
+                            date=date.replace(new RegExp(/-/gm) ,"/");
+
+                            if(0 == d.pid){
+                                return "<font style = 'font-size:14px;font-weight:500;'>"+layui.util.toDateString(date,'yyyy-MM-dd')+"</font>";
+                            }else{
+                                return "<font>"+layui.util.toDateString(date,'yyyy-MM-dd')+"</font>";
+                            }
+                        }},
+                    /*{align:'center', title: '状态',  width:70,templet:function(d){
+                            var st = getAuditState(""+d.projectStatus);
+                            if(d.pid ==0){
+                                if(st.action)
+                                    var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/project/projectRecords/getProcess?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								else
+									var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								return xml;
+							}else if(d.pid !=0){
+								if(st.action)
+									var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/projectcontentinfo/projectcontentinfo/getProcessOne?id=" + d.id + "&projectReportData.id="+ d.id + "&type="+d.projectStatus+"','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								else
+									var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+								return xml;
+							}else{
+								return '';
+							}
+						}},*/
+                    {templet: complain, align:'center', title: '操作',width:130}
+                ]],
+                done: function () {
+                    layer.closeAll('loading');
+                }
+            });
+        };
+
+        renderTable();
+
+        //触发三个button按钮
+        $('#btn-expand').click(function () {
+            treetable.expandAll('#permissionTable');
+        });
+
+        $('#btn-fold').click(function () {
+            treetable.foldAll('#permissionTable');
+        });
+
+        $('#btn-refresh').click(function () {
+            renderTable();
+        });
+
+
+        function complain(d){//操作中显示的内容
+            if(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>

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

@@ -0,0 +1,971 @@
+<%@ 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);
+                    }
+                }
+            });
+            changeContentDetail(document.getElementById("projectContentDataType"));
+            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 changeContentDetail(obj) {
+            var val = $(obj).val();
+            var modify = $("#modify").val();
+            if("modify" != modify){
+                $("#workBaseDataList").empty();
+                $.ajax({
+                    type:'post',
+                    url:'${ctx}/project/projectImplementEarly/projectBasedDataList',
+                    data:{
+                        "typeId":val
+                    },
+                    success:function(data){
+                        console.log(data);
+                        if(data.projectBasedDataList.length > 0){
+                            var data = data.projectBasedDataList;
+                            for(var i=0;i<data.length;i++){
+                                var idArr = $("#workBaseDataList tr:visible .clientId");
+                                if(data[i].id!=''&&!hasInArr(data[i].id,idArr)){
+                                    addRowBaseData("#workBaseDataList",workBaseDataRowIdx,workBaseDataTplFirst,data[i]);
+                                    workBaseDataRowIdx=workBaseDataRowIdx+1;
+                                }
+                            }
+                        }
+                    }
+                })
+
+            }
+
+
+            $("#contentDetail").empty();
+            contentDetailTypeShow(val);
+            $("#contentDetailTypeDiv").show();
+            $("#projectContentDataSign").val(val);
+            var param2 = {'contentId':"${projectcontentinfo.projectContentData.id}",'projectId':"${projectcontentinfo.project.id}"};
+            detailFlag=1;
+            switch (val){
+                case '22':
+                    $("#contentDetail").load("${ctx}/workPreliminary/workPreliminaryDesignEstimate/list",param2);
+                    break;
+                case '13':
+                case '25':
+                    $("#contentDetail").load("${ctx}/workcontentinvestmentcost/workContentInvestmentCost/list",param2);
+                    break;
+                case '31':
+                    $("#contentDetail").load("${ctx}/workcontent/workContentContprogram/form",param2);
+                    break;
+                case '32':
+                    $("#contentDetail").load("${ctx}/workcontent/workContentBiddingplan/form",param2);
+                    break;
+                case '23':
+                    $("#contentDetail").load("${ctx}/workcontent/workContentCtrlprice/form",param2);
+                    break;
+                case '41':
+                    $("#contentDetail").load("${ctx}/workcontent/workContentContractinfo/form",param2);
+                    break;
+                case '42':
+                    $("#contentDetail").load("${ctx}/workcontent/workContentPricemanage/form",param2);
+                    break;
+                case '43':
+                    $("#contentDetail").load("${ctx}/workcontent/workContentAltermanage/form",param2);
+                    break;
+                case '45':
+                    $("#contentDetail").load("${ctx}/workcontent/workContentVisamanage/form",param2);
+                    break;
+                case '46':
+                    $("#contentDetail").load("${ctx}/workcontent/workContentClaim/form",param2);
+                    break;
+                case '47':
+                    $("#contentDetail").load("${ctx}/workcontent/workContentFundplan/form",param2);
+                    break;
+                case '48':
+                    $("#contentDetail").load("${ctx}/workcontent/workContentProjectprice/form",param2);
+                    break;
+                case '49':
+                    $("#contentDetail").load("${ctx}/workcontent/workContentPriceadjust/form",param2);
+                    break;
+                case '52':
+                    $("#contentDetail").load("${ctx}/workcontent/workContentBudget/form",param2);
+                    break;
+                case '53':
+                    $("#contentDetail").load("${ctx}/workcontent/workContentDocument/form",param2);
+                    break;
+                case '410':
+                    $("#contentDetail").load("${ctx}/workConcealProject/workConcealProject/list",param2);
+                    break;
+                case '411':
+                    $("#contentDetail").load("${ctx}/fiveDirectionsAffirm/workFiveDirectionsAffirm/list",param2);
+                    break;
+                /*新加代码*/
+                case '412':
+                    $("#contentDetail").load("${ctx}/workcontentbranchaccount/workcontentBranchAccount/list",param2);
+                    break;
+                /*新加代码*/
+                case '510':
+                    $("#contentDetail").load("${ctx}/workContent/workContentCompleteAccount/list",param2);
+                    break;
+                case '420':
+                    $("#contentDetail").load("${ctx}/workSchedule/workSchedule/list",param2);
+                    break;
+                case '421':
+                    $("#contentDetail").load("${ctx}/workMaterialsPrice/workMaterialsPrice/list",param2);
+                    break;
+                default:
+                    detailFlag=0;
+                    $("#contentDetail").html("");
+                    break;
+            }
+        }
+
+        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 "";
+            }
+        }
+
+        /**
+         * 获取临时数据
+         * @param obj
+         * @param othis
+         */
+        function initGetControlData(){
+            $.ajax({
+                type:'post',
+                url:'${ctx}/projectcontroltable/projectControlTable/getControlData',
+                data:{
+                    "projectId":"${projectcontentinfo.project.id}",
+                    "proId":"${projectcontentinfo.projectContentData.id}"
+                },
+                success:function(data){
+                    if(data){
+                        var htmlStr = '';
+                        data = data.list.projectControlTableList;
+                        for(var i=0;i<data.length;i++){
+                            htmlStr += "<tr id='tr"+i+"'>"+
+                                "   <td style='text-align:center;'>"+
+                                "	   "+data[i].tName+
+                                "	   <input type='hidden' name='projectContentData.projectControlTableList["+i+"].id' value='"+data[i].id+"'>"+
+                                "	   <input type='hidden' name='projectContentData.projectControlTableList["+i+"].tName' value='"+data[i].tName+"'>"+
+                                "	   <input type='hidden' name='projectContentData.projectControlTableList["+i+"].processName' value='"+data[i].processName+"'>"+
+                                "	   <input type='hidden' name='projectContentData.projectControlTableList["+i+"].pfId' value='"+data[i].pfId+"'>"+
+                                "   </td>"+
+                                "   <td style='text-align:center;'>" +
+                                "  			"+data[i].processName+
+                                "	   		<input type='hidden' name='projectContentData.projectControlTableList["+i+"].tType' value='"+data[i].tType+"'>"+
+                                "	</td>"+
+                                "   <td style='text-align:center;'>"+
+                                "  		"+data[i].tUser.name+
+                                "   </td>"+
+                                "   <td style='text-align:center;'>"+
+                                "  "+ getMatchDate(data[i].createDate)+
+                                //										"	    <input type='hidden' name='projectControlTableList["+i+"].createDate' value='"+data[i].createDate+"'>"+
+                                //										"	    <input type='hidden' name='projectControlTableList["+i+"].updateDate' value='"+data[i].updateDate+"'>"+
+                                //										"	    <input type='hidden' name='projectControlTableList["+i+"].delFlag' value='"+data[i].delFlag+"'>"+
+                                //										"	    <input type='hidden' name='projectControlTableList["+i+"].createBy.id' value='"+data[i].createBy.id+"'>"+
+                                "   </td>"+
+                                "   <td style='text-align:center;'>"+
+                                "   	<a href='javascript:void(0)' onclick=\"openDialogView('查看过程控制明细', '${ctx}/projectcontroltable/projectControlTable/form?view=view&id="+data[i].id+"','90%', '90%')\" class='btn btn-info btn-xs' ><i class='fa fa-search-plus'></i> 查看</a>"+
+                                "  		<a href=\"javascript:initControlData('0','#tr"+i+"','del','"+data[i].id+"')\" onclick=\"return confirmx('确认要删除该过程控制数据吗?', this.href)\"   class='btn btn-danger btn-xs'><i class='fa fa-trash'></i> 删除</a>"+
+                                "  </td>"+
+                                "</tr>";
+                        }
+                        if(htmlStr){
+                            $("#projectControlTables").html(htmlStr);
+                        }
+                    }
+                }
+            })
+        }
+
+        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/projectVisa/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"><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="${projectcontentinfo.projectContentData.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>
+            <c:if test="${projectcontentinfo.infoId !=null and projectcontentinfo.edit  == 'edit'}">
+                <div class="pull-right">
+                    <button id="btnSubmit" class="nav-btn nav-btn-add" type="submit" onclick="$('#edit').val('edit');beforeSubmit();"><i class="fa fa-chevron-up"></i> 提交</button>
+                </div>
+            </c:if>
+            <div class="form-group layui-row page-end">
+                <br>
+                <br>
+                <br>
+            </div>
+        </form:form>
+    </div>
+</div>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+    function contentDetailTypeShow(obj) {
+        var projectContentDataId = '${projectcontentinfo.projectContentData.id}';
+        $.ajax({
+            type:'post',
+            url:'${ctx}/projectcontentinfo/projectcontentinfo/getAchievementTypeList2',
+            data:{
+                "achievementParentId":obj,
+                "type":3
+            },
+            success:function(data){
+                if(data.success) {
+                    if (null != obj && "" != obj) {
+                        if(null !=projectContentDataId && ""!= projectContentDataId) {
+                            $.ajax({
+                                type: 'post',
+                                url: getExistingDataOnPath(obj),
+                                data: {
+                                    "contentId": "${projectcontentinfo.projectContentData.id}"
+                                },
+                                success: function (tableTypeList) {
+                                    var dataList = data.body.list;
+                                    var newDataList = [];
+                                    var holdDataList = data.body.list;
+                                    if (0 != dataList.length) {
+                                        for (i in holdDataList) {
+                                            newDataList.push(holdDataList[i])
+                                        }
+                                    }
+                                    if (0 != newDataList.length && 0 !=tableTypeList.length){
+                                        for (i in newDataList) {
+                                            for (j in tableTypeList) {
+                                                if (newDataList[i].value == tableTypeList[j]) {
+                                                    var newData = {
+                                                        "name": newDataList[i].name,
+                                                        "value": newDataList[i].value,
+                                                        "selected": true
+                                                    }
+                                                    holdDataList.splice(i,1,newData);
+                                                }
+                                                modifyGetDetailsNum(tableTypeList);
+                                            }
+                                        }
+                                        xmSelect.render({
+                                            el: '#contentDetailType',
+                                            language: 'zn',
+                                            data: holdDataList
+                                        })
+                                        $("#dataBodyList").val(holdDataList);
+                                    }else{
+                                        xmSelect.render({
+                                            el: '#contentDetailType',
+                                            language: 'zn',
+                                            data: dataList
+                                        })
+                                        $("#dataBodyList").val(holdDataList);
+                                    }
+                                }
+                            })
+                        }else{
+                            xmSelect.render({
+                                el: '#contentDetailType',
+                                language: 'zn',
+                                data: data.body.list
+                            })
+                            $("#dataBodyList").val(data.body.list);
+                        }
+                    }else {
+                        xmSelect.render({
+                            el: '#contentDetailType',
+                            language: 'zn',
+                            data: data.body.list
+                        })
+                        $("#dataBodyList").val(data.body.list);
+                    }
+                }
+            }
+        })
+    }
+
+    var contentDetailType = xmSelect.render({
+        el: '#contentDetailType',
+        language: 'zn',
+        data: [
+        ]
+    })
+
+    function getExistingDataOnPath(val) {
+        switch (val){
+            case '22':
+                return "${ctx}/workPreliminary/workPreliminaryDesignEstimate/getTableType";
+            case '13':
+            case '25':
+                return "${ctx}/workcontentinvestmentcost/workContentInvestmentCost/getTableType";
+            case '31':
+                return "${ctx}/workcontent/workContentContprogram/form";
+            case '32':
+                return "${ctx}/workcontent/workContentBiddingplan/form";
+            case '23':
+                return "${ctx}/workcontent/workContentCtrlprice/getTableType";
+            case '41':
+                return "${ctx}/workcontent/workContentContractinfo/form";
+            case '42':
+                return "${ctx}/workcontent/workContentPricemanage/form";
+            case '43':
+                return "${ctx}/workcontent/workContentAltermanage/form";
+            case '45':
+                return "${ctx}/workcontent/workContentVisamanage/form";
+            case '46':
+                return "${ctx}/workcontent/workContentClaim/form";
+            case '47':
+                return "${ctx}/workcontent/workContentFundplan/form";
+            case '48':
+                return "${ctx}/workcontent/workContentProjectprice/form";
+            case '49':
+                return "${ctx}/workcontent/workContentPriceadjust/form";
+            case '52':
+                return "${ctx}/workcontent/workContentBudget/form";
+            case '53':
+                return "${ctx}/workcontent/workContentDocument/form";
+            /*case '400':
+                return "${ctx}/workcontent/workContentContractSum/form";*/
+            case '410':
+                return "${ctx}/workConcealProject/workConcealProject/getTableType";
+            case '411':
+                return "${ctx}/fiveDirectionsAffirm/workFiveDirectionsAffirm/getTableType";
+            /*新加代码*/
+            case '412':
+                return  "${ctx}/workcontentbranchaccount/workcontentBranchAccount/getTableType";
+            /*新加代码*/
+            case '510':
+                return  "${ctx}/workContent/workContentCompleteAccount/getTableType";
+            case '420':
+                return "${ctx}/workSchedule/workSchedule/getTableType";
+            case '421':
+                return "${ctx}/workMaterialsPrice/workMaterialsPrice/getTableType";
+            default:
+                return "";
+        }
+    }
+
+
+    function getDetailsNum(){
+        var list = [];
+        //获取当前多选选中的值
+        var selectArr = contentDetailType.getValue();
+        for (var i in selectArr){
+            list.push(selectArr[i].value);
+        }
+        $("#contentDetail").val("");
+        console.log(list);
+        var val = $("#projectContentDataSign").val();
+        var param2 = {'contentId':"${projectcontentinfo.projectContentData.id}",'projectId':"${projectcontentinfo.project.id}",'sign':list.toString(),'achievementParentId':val};
+        detailFlag=1;
+        switch (val){
+            case '22':
+                $("#contentDetail").load("${ctx}/workPreliminary/workPreliminaryDesignEstimate/list",param2);
+                break;
+            case '13':
+            case '25':
+                $("#contentDetail").load("${ctx}/workcontentinvestmentcost/workContentInvestmentCost/list",param2);
+                break;
+            case '31':
+                $("#contentDetail").load("${ctx}/workcontent/workContentContprogram/form",param2);
+                break;
+            case '32':
+                $("#contentDetail").load("${ctx}/workcontent/workContentBiddingplan/form",param2);
+                break;
+            case '23':
+                $("#contentDetail").load("${ctx}/workcontent/workContentCtrlprice/form",param2);
+                break;
+            case '41':
+                $("#contentDetail").load("${ctx}/workcontent/workContentContractinfo/form",param2);
+                break;
+            case '42':
+                $("#contentDetail").load("${ctx}/workcontent/workContentPricemanage/form",param2);
+                break;
+            case '43':
+                $("#contentDetail").load("${ctx}/workcontent/workContentAltermanage/form",param2);
+                break;
+            case '45':
+                $("#contentDetail").load("${ctx}/workcontent/workContentVisamanage/form",param2);
+                break;
+            case '46':
+                $("#contentDetail").load("${ctx}/workcontent/workContentClaim/form",param2);
+                break;
+            case '47':
+                $("#contentDetail").load("${ctx}/workcontent/workContentFundplan/form",param2);
+                break;
+            case '48':
+                $("#contentDetail").load("${ctx}/workcontent/workContentProjectprice/form",param2);
+                break;
+            case '49':
+                $("#contentDetail").load("${ctx}/workcontent/workContentPriceadjust/form",param2);
+                break;
+            case '52':
+                $("#contentDetail").load("${ctx}/workcontent/workContentBudget/form",param2);
+                break;
+            case '53':
+                $("#contentDetail").load("${ctx}/workcontent/workContentDocument/form",param2);
+                break;
+            /*case '400':
+                $("#contentDetail").load("${ctx}/workcontent/workContentContractSum/form",param2);
+                break;*/
+            case '410':
+                $("#contentDetail").load("${ctx}/workConcealProject/workConcealProject/list",param2);
+                break;
+            case '411':
+                $("#contentDetail").load("${ctx}/fiveDirectionsAffirm/workFiveDirectionsAffirm/list",param2);
+                break;
+            /*新加代码*/
+            case '412':
+                $("#contentDetail").load("${ctx}/workcontentbranchaccount/workcontentBranchAccount/list",param2);
+            /*新加代码*/
+            case '510':
+                $("#contentDetail").load("${ctx}/workContent/workContentCompleteAccount/list",param2);
+                break;
+            case '420':
+                $("#contentDetail").load("${ctx}/workSchedule/workSchedule/list",param2);
+                break;
+            case '421':
+                $("#contentDetail").load("${ctx}/workMaterialsPrice/workMaterialsPrice/list",param2);
+                break;
+            default:
+                detailFlag=0;
+                $("#contentDetail").html("");
+                break;
+        }
+
+    }
+
+    function modifyGetDetailsNum(list){
+        $("#contentDetailType").empty();
+        console.log(list);
+        var val = $("#projectContentDataSign").val();
+        var param2 = {'contentId':"${projectcontentinfo.projectContentData.id}",'projectId':"${projectcontentinfo.project.id}",'sign':list.toString(),'achievementParentId':val};
+        detailFlag=1;
+        switch (val){
+            case '22':
+                $("#contentDetail").load("${ctx}/workPreliminary/workPreliminaryDesignEstimate/list",param2);
+                break;
+            case '13':
+            case '25':
+                $("#contentDetail").load("${ctx}/workcontentinvestmentcost/workContentInvestmentCost/list",param2);
+                break;
+            case '31':
+                $("#contentDetail").load("${ctx}/workcontent/workContentContprogram/form",param2);
+                break;
+            case '32':
+                $("#contentDetail").load("${ctx}/workcontent/workContentBiddingplan/form",param2);
+                break;
+            case '23':
+                $("#contentDetail").load("${ctx}/workcontent/workContentCtrlprice/form",param2);
+                break;
+            case '41':
+                $("#contentDetail").load("${ctx}/workcontent/workContentContractinfo/form",param2);
+                break;
+            case '42':
+                $("#contentDetail").load("${ctx}/workcontent/workContentPricemanage/form",param2);
+                break;
+            case '43':
+                $("#contentDetail").load("${ctx}/workcontent/workContentAltermanage/form",param2);
+                break;
+            case '45':
+                $("#contentDetail").load("${ctx}/workcontent/workContentVisamanage/form",param2);
+                break;
+            case '46':
+                $("#contentDetail").load("${ctx}/workcontent/workContentClaim/form",param2);
+                break;
+            case '47':
+                $("#contentDetail").load("${ctx}/workcontent/workContentFundplan/form",param2);
+                break;
+            case '48':
+                $("#contentDetail").load("${ctx}/workcontent/workContentProjectprice/form",param2);
+                break;
+            case '49':
+                $("#contentDetail").load("${ctx}/workcontent/workContentPriceadjust/form",param2);
+                break;
+            case '52':
+                $("#contentDetail").load("${ctx}/workcontent/workContentBudget/form",param2);
+                break;
+            case '53':
+                $("#contentDetail").load("${ctx}/workcontent/workContentDocument/form",param2);
+                break;
+            /*case '400':
+                $("#contentDetail").load("${ctx}/workcontent/workContentContractSum/form",param2);
+                break;*/
+            case '410':
+                $("#contentDetail").load("${ctx}/workConcealProject/workConcealProject/list",param2);
+                break;
+            case '411':
+                $("#contentDetail").load("${ctx}/fiveDirectionsAffirm/workFiveDirectionsAffirm/list",param2);
+                break;
+
+            /*新加代码*/
+            case '412':
+                $("#contentDetail").load("${ctx}/workcontentbranchaccount/workcontentBranchAccount/list",param2);
+                break;
+            /*新加代码*/
+            case '510':
+                $("#contentDetail").load("${ctx}/workContent/workContentCompleteAccount/list",param2);
+                break;
+            case '420':
+                $("#contentDetail").load("${ctx}/workSchedule/workSchedule/list",param2);
+                break;
+            case '421':
+                $("#contentDetail").load("${ctx}/workMaterialsPrice/workMaterialsPrice/list",param2);
+                break;
+            default:
+                detailFlag=0;
+                $("#contentDetail").html("");
+                break;
+        }
+    }
+</script>
+</body>
+</html>

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

@@ -0,0 +1,554 @@
+<%@ 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) {
+                }
+            });
+        }
+
+        /*//添加签证汇总
+        function openVisa(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: false, //开启最大化最小化按钮
+                content: url ,
+                skin:"three-btns",
+                btn: ['送审','暂存','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(3) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                    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/constructionContract/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="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();
+            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/projectVisa/getVisaList?pageNo=${page.pageNo}',
+                page: false,
+                cols: [[
+                    {type: 'numbers', align:'center', title: '序号' ,width:80},
+                    {field: 'contractName', title: '合同名称',templet:function(d){
+                            if(0 == d.pid){
+                                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.contractName + "</a>";
+                            }else{
+                                return "<a>" + d.contractName + "</a>";
+                            }
+                        }},
+                    {field: 'number', align:'center', title: '签证编号',templet:function(d){
+                            if(0 == d.pid){
+                                return "";
+                            }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.number + "</a>";
+                            }
+                        }},
+                    {field: 'sendMoney', align:'center', title: '送审金额',templet: function(d){
+                            if(0 == d.pid){
+                                return "";
+                            }else{
+                                return "<font>"+d.sendMoney+"</font>";
+                            }
+                        }},
+                    {field: 'confirmMoney', align:'center', title: '定审金额',templet: function(d){
+                            if(0 == d.pid){
+                                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(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") {
+                return [
+                    '<a href="javascript:void(0)" onclick="openDialogreAudit(\'新增工作内容\', \'${ctx}/project/projectVisa/form?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.pid!="0"){
+                return [
+                    '<a href="javascript:void(0)" onclick="openDialogreAudit(\'修改工作内容\', \'${ctx}/project/projectVisa/updateTable?id='+d.id+'&contractId='+d.contractId+'\',\'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('');
+
+                }
+
+        }
+        //监听工具条
+        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>