Ver código fonte

Merge remote-tracking branch 'origin/master'

user5 4 anos atrás
pai
commit
a625c50c54
16 arquivos alterados com 1909 adições e 36 exclusões
  1. 2 0
      src/main/java/com/jeeplus/modules/projectFilingBatch/dao/ProjectFilingBatchProInfoDao.java
  2. 13 3
      src/main/java/com/jeeplus/modules/projectFilingBatch/service/ProjectFilingBatchService.java
  3. 15 0
      src/main/java/com/jeeplus/modules/projectFilingBatch/web/ProjectFilingBatchController.java
  4. 7 2
      src/main/java/com/jeeplus/modules/projectrecord/service/ProjectPlanService.java
  5. 206 0
      src/main/java/com/jeeplus/modules/projectrecord/web/ProjectPlanConsultingController.java
  6. 206 0
      src/main/java/com/jeeplus/modules/projectrecord/web/ProjectPlanCostController.java
  7. 4 0
      src/main/resources/mappings/modules/projectGuidang/ProjectFilingBatchProInfoDao.xml
  8. 100 0
      src/main/webapp/WEB-INF/tags/sys/inquireselectplanUser.tag
  9. 27 11
      src/main/webapp/webpage/modules/projectFilingBatch/ProjectFilingBatchProInfoForm.jsp
  10. 27 10
      src/main/webapp/webpage/modules/projectFilingBatch/projectFilingBatchApply.jsp
  11. 10 7
      src/main/webapp/webpage/modules/projectFilingBatch/projectFilingBatchForm.jsp
  12. 342 0
      src/main/webapp/webpage/modules/projectrecord/plan/projectPlanConsultingForm.jsp
  13. 303 0
      src/main/webapp/webpage/modules/projectrecord/plan/projectPlanConsultingList.jsp
  14. 342 0
      src/main/webapp/webpage/modules/projectrecord/plan/projectPlanCostForm.jsp
  15. 303 0
      src/main/webapp/webpage/modules/projectrecord/plan/projectPlanCostList.jsp
  16. 2 3
      src/main/webapp/webpage/modules/projectrecord/plan/projectPlanForm.jsp

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

@@ -5,6 +5,7 @@ import com.jeeplus.common.persistence.DataEntity;
 import com.jeeplus.common.persistence.annotation.MyBatisDao;
 import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatch;
 import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatchProInfo;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -14,4 +15,5 @@ public interface ProjectFilingBatchProInfoDao extends CrudDao<ProjectFilingBatch
      Integer proInfoInsert(ProjectFilingBatchProInfo proInfo);
 
      List<ProjectFilingBatchProInfo> getListByFilingBatchId(String filingBatchId);
+     Integer deleteById(@Param("id")String id);
 }

+ 13 - 3
src/main/java/com/jeeplus/modules/projectFilingBatch/service/ProjectFilingBatchService.java

@@ -259,7 +259,7 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
                 treeData.setBoxNum("");
                 treeData.setStatusStr("审批中");
             }else if(5 == filingBatch.getFilingStatus() || 4 == filingBatch.getFilingStatus()){
-                if("1" == filingBatch.getDelFlag()){
+                if(relation.getDelFlag().equals("1")){
                     treeData.setBoxNum("");
                     treeData.setStatusStr("驳回");
                 }else{
@@ -1017,6 +1017,7 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
             DelProInfo(info);
             proInfoDao.proInfoInsert(info);
         }else{
+            Integer count=0;
             for (int i=0;i<proInfos.length;i++){
                 if (proInfos[i]!=""&& !"".equals(proInfos[i])) {
                     json = JSONObject.fromObject(proInfos[i]);
@@ -1026,7 +1027,7 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
                     info.setProInfofilingBatch(json.get("filingId").toString());
                     info.setProInfoName(json.get("names").toString());
                     info.setProInfoType(json.get("types").toString());
-                    if(i==0){ DelProInfo(info);}
+                    if(count==0){ DelProInfo(info);count++;}
                     proInfoDao.proInfoInsert(info);
                 }
             }
@@ -1034,10 +1035,19 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
 
     }
     /**
-     * 删除--项目附件info
+     * 删除--项目文件信息info
      * @param proInfo
      */
     public void DelProInfo(ProjectFilingBatchProInfo proInfo){
         proInfoDao.delete(proInfo);
     }
+    /**
+     * 删除--项目文件信息info
+     * 修改页面中的文件信息删除
+     * @param id
+     */
+    @Transactional(readOnly = false)
+    public void deleteById(String id){
+        proInfoDao.deleteById(id);
+    }
 }

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

@@ -518,4 +518,19 @@ public class ProjectFilingBatchController extends BaseController {
         model.addAttribute("filingId", filingId);
         return "modules/projectFilingBatch/ProjectFilingBatchProInfoForm";
     }
+    /**
+     * 批量归档——文件信息
+     * 删除
+     * @param id
+     * @return
+     */
+    @RequestMapping("deleteById")
+    @ResponseBody
+    public String deleteById(@RequestParam("id") String id) {
+        if (null != id){
+            projectFilingBatchService.deleteById(id);
+        }
+        return "success";
+    }
+
 }

+ 7 - 2
src/main/java/com/jeeplus/modules/projectrecord/service/ProjectPlanService.java

@@ -58,8 +58,13 @@ public class ProjectPlanService extends CrudService<ProjectPlanDao, ProjectPlanI
             }
             //根据用户姓名查询用户id
             //获取提醒人信息
-            User userR = dao.getUserId(projectPlanInfo.getRemindId());
-            projectPlanInfo.setRemindName(userR.getId());
+            User userR =new User();
+            if(StringUtils.isNotBlank(projectPlanInfo.getRemindId())){
+                userR = dao.getUserId(projectPlanInfo.getRemindId());
+                projectPlanInfo.setRemindName(userR.getId());
+            }else{
+                projectPlanInfo.setRemindName("");
+            }
             //获取完成人信息
             User userF = new User();
             if(StringUtils.isNotBlank(projectPlanInfo.getFinishId())){

+ 206 - 0
src/main/java/com/jeeplus/modules/projectrecord/web/ProjectPlanConsultingController.java

@@ -0,0 +1,206 @@
+package com.jeeplus.modules.projectrecord.web;
+
+import com.google.common.collect.Lists;
+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.utils.excel.ExportExcel;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.projectrecord.dao.WorkProjectUserDao;
+import com.jeeplus.modules.projectrecord.entity.ProjectPlanInfo;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.projectrecord.service.ProjectPlanService;
+import com.jeeplus.modules.projectrecord.service.ProjectRecordsService;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
+import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
+import com.jeeplus.modules.sys.entity.MainDictDetail;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.utils.DictUtils;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
+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.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 项目计划Controller
+ * @author ppt
+ * @version 2018-05-02
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/project/projectPlanConsulting")
+public class ProjectPlanConsultingController extends BaseController {
+
+    @Autowired
+    private ProjectRecordsService projectRecordsService;
+
+    @Autowired
+    private RuralProjectRecordsService ruralProjectRecordsService;
+
+    @Autowired
+    private ProjectPlanService projectPlanService;
+
+    @Autowired
+    private WorkProjectUserDao workProjectUserDao;
+
+    @ModelAttribute
+    public RuralProjectRecords get(@RequestParam(required=false) String id) {
+        RuralProjectRecords entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = ruralProjectRecordsService.get(id);
+        }
+        if (entity == null){
+            entity = new RuralProjectRecords();
+        }
+        return entity;
+    }
+
+    /**
+     * 项目列表页面
+     */
+    @RequiresPermissions("project:projectPlanConsulting:list")
+    @RequestMapping(value = {"list", ""})
+    public String list(RuralProjectRecords projectRecords, HttpServletRequest request, HttpServletResponse response, Model model) {
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
+        }
+        projectRecords.setProjectStatus(5);
+
+        List<String> typeList = Lists.newArrayList();
+        //添加项目类型
+        typeList.add("1");  //项目咨询
+//        typeList.add("2");  //造价审核
+        projectRecords.setTypeList(typeList);
+
+        //查询已审核通过的项目信息
+        Page<RuralProjectRecords> page = ruralProjectRecordsService.projectPlanFindPage(new Page<RuralProjectRecords>(request, response), projectRecords);
+        //无合同状态下,获取委托方的名称,并将委托方信息添加到数据中
+        List<RuralProjectRecords> list = page.getList();
+        for (int i = 0; i < list.size(); i++) {
+            RuralProjectRecords records1 = list.get(i);
+            if (records1.getWorkContractInfo() == null) {
+                ruralProjectRecordsService.queryLinkmanInfos(records1);
+                if (records1.getWorkClientLinkmanList() != null && records1.getWorkClientLinkmanList().size() > 0) {
+                    WorkClientLinkman linkman = records1.getWorkClientLinkmanList().get(0);
+                    WorkContractInfo contractInfo = new WorkContractInfo();
+                    contractInfo.setClient(linkman.getClientId());
+                    records1.setWorkContractInfo(contractInfo);
+                }
+            }
+            //判断是否为admin
+            if (UserUtils.isManager()){
+                records1.setFlagAdmin("1");
+            }else{
+                records1.setFlagAdmin("0");
+            }
+        }
+        model.addAttribute("page", page);
+        return "modules/projectrecord/plan/projectPlanConsultingList";
+    }
+
+    @RequestMapping(value = {"form"})
+    public String form(RuralProjectRecords projectRecords, Model model) {
+        boolean flag = false;
+        //判断是否为查看信息操作
+        if("view".equals(projectRecords.getView())){
+            flag = true;
+        }
+        //获取项目信息
+        //如果没有id则为新增 添加创建人信息和当前创建时间信息
+        if (projectRecords!=null&&StringUtils.isNotBlank(projectRecords.getId())) {
+            //projectRecords = ruralProjectRecordsService.get(projectRecords.getId());
+            projectRecords = ruralProjectRecordsService.getMasters(projectRecords.getId());
+        }else {
+            projectRecords.setCreateBy(UserUtils.getUser());
+            projectRecords.setCreateDate(new Date());
+        }
+
+        ProjectPlanInfo projectPlanInfo = new ProjectPlanInfo();
+        //将项目id放入项目计划表中
+        projectPlanInfo.setProjectId(projectRecords.getId());
+        //获取项目计划信息
+        List<ProjectPlanInfo> projectPlanList = projectPlanService.getProjectPlanList(projectPlanInfo);
+        if(projectPlanList.size() == 0 && !flag){
+            //获取项目计划信息
+            List<MainDictDetail> mainDictList = DictUtils.getMainDictList("projectPlan");
+            if(mainDictList.size()>0){
+                for (MainDictDetail mainDict : mainDictList) {
+                    ProjectPlanInfo projectPlan = new ProjectPlanInfo();
+                    projectPlan.setProjectStage(mainDict.getLabel());
+                    //将项目负责人添加到展示栏
+                    if(null != projectRecords.getProjectLeaders()) {
+                        projectPlan.setRemindName(projectRecords.getProjectLeaders().get(0).getName());
+                        projectPlan.setRemindId(projectRecords.getProjectLeaders().get(0).getId());
+                    }
+                    //将项目等级人信息添加到完成人控件中
+                    User user = UserUtils.get(projectRecords.getCreateBy().getId());
+                    projectPlan.setFinishId(user.getId());
+                    projectPlan.setFinishName(user.getName());
+                    projectPlanList.add(projectPlan);
+                }
+            }
+        }
+        //获取 项目计划附件信息
+        List<WorkClientAttachment> workAttachmentList = projectPlanService.getWorkAttachment(projectRecords.getId());
+        projectRecords.setProjectPlanList(projectPlanList);
+        projectRecords.setWorkAttachments(workAttachmentList);
+        model.addAttribute("projectRecords", projectRecords);
+        if(flag){
+            return "modules/projectrecord/plan/projectPlanView";
+        }
+        return "modules/projectrecord/plan/projectPlanConsultingForm";
+    }
+
+    /**
+     * 保存客户管理
+     */
+    @RequiresPermissions(value={"project:projectPlanConsulting:add","project:projectPlanConsulting:edit"})
+    @RequestMapping(value = "save")
+    public String save(ProjectRecords projectRecords, Model model, RedirectAttributes redirectAttributes) throws Exception{
+        ProjectRecords ProjectRecord = ruralProjectRecordsService.getProjectRecords(projectRecords.getId());
+        MyBeanUtils.copyBeanNotNull2Bean(projectRecords, ProjectRecord);//将编辑表单中的非NULL值覆盖数据库记录中的值
+        projectPlanService.saveProjectPlanInfo(ProjectRecord);//保存
+        addMessage(redirectAttributes, "保存项目计划成功");
+        return "redirect:"+ Global.getAdminPath()+"/project/projectPlanConsulting/?repage";
+    }
+
+    /**
+     * 导出excel文件
+     */
+    @RequestMapping(value = "export")
+    public String exportFile(ProjectRecords projectRecords, HttpServletResponse response, RedirectAttributes redirectAttributes) {
+        ProjectRecords ProjectRecord = ruralProjectRecordsService.getProjectRecords(projectRecords.getId());
+        try {
+            MyBeanUtils.copyBeanNotNull2Bean(projectRecords, ProjectRecord);//将编辑表单中的非NULL值覆盖数据库记录中的值
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        try {
+            //文件名称
+            String fileName = ProjectRecord.getProjectName()+"-项目计划.xlsx";
+            ProjectPlanInfo projectPlanInfo = new ProjectPlanInfo();
+            projectPlanInfo.setProjectId(ProjectRecord.getId());
+            //获取项目计划信息
+            List<ProjectPlanInfo> projectPlanList = projectPlanService.getProjectPlanList(projectPlanInfo);
+            new ExportExcel(ProjectRecord.getProjectName()+"-项目计划", ProjectPlanInfo.class).setDataList(projectPlanList).write(response, fileName).dispose();
+            return null;
+        } catch (Exception e) {
+            addMessage(redirectAttributes, "导出项目计划记录失败!失败信息:"+e.getMessage());
+        }
+        return "redirect:"+Global.getAdminPath()+"/project/projectPlanConsulting/?repage";
+    }
+
+}

+ 206 - 0
src/main/java/com/jeeplus/modules/projectrecord/web/ProjectPlanCostController.java

@@ -0,0 +1,206 @@
+package com.jeeplus.modules.projectrecord.web;
+
+import com.google.common.collect.Lists;
+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.utils.excel.ExportExcel;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.projectrecord.dao.WorkProjectUserDao;
+import com.jeeplus.modules.projectrecord.entity.ProjectPlanInfo;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.projectrecord.service.ProjectPlanService;
+import com.jeeplus.modules.projectrecord.service.ProjectRecordsService;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
+import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
+import com.jeeplus.modules.sys.entity.MainDictDetail;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.utils.DictUtils;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
+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.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 项目计划Controller
+ * @author ppt
+ * @version 2018-05-02
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/project/projectPlanCost")
+public class ProjectPlanCostController extends BaseController {
+
+    @Autowired
+    private ProjectRecordsService projectRecordsService;
+
+    @Autowired
+    private RuralProjectRecordsService ruralProjectRecordsService;
+
+    @Autowired
+    private ProjectPlanService projectPlanService;
+
+    @Autowired
+    private WorkProjectUserDao workProjectUserDao;
+
+    @ModelAttribute
+    public RuralProjectRecords get(@RequestParam(required=false) String id) {
+        RuralProjectRecords entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = ruralProjectRecordsService.get(id);
+        }
+        if (entity == null){
+            entity = new RuralProjectRecords();
+        }
+        return entity;
+    }
+
+    /**
+     * 项目列表页面
+     */
+    @RequiresPermissions("project:projectPlanCost:list")
+    @RequestMapping(value = {"list", ""})
+    public String list(RuralProjectRecords projectRecords, HttpServletRequest request, HttpServletResponse response, Model model) {
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
+        }
+        projectRecords.setProjectStatus(5);
+
+        List<String> typeList = Lists.newArrayList();
+        //添加项目类型
+//        typeList.add("1");  //项目咨询
+        typeList.add("2");  //造价审核
+        projectRecords.setTypeList(typeList);
+
+        //查询已审核通过的项目信息
+        Page<RuralProjectRecords> page = ruralProjectRecordsService.projectPlanFindPage(new Page<RuralProjectRecords>(request, response), projectRecords);
+        //无合同状态下,获取委托方的名称,并将委托方信息添加到数据中
+        List<RuralProjectRecords> list = page.getList();
+        for (int i = 0; i < list.size(); i++) {
+            RuralProjectRecords records1 = list.get(i);
+            if (records1.getWorkContractInfo() == null) {
+                ruralProjectRecordsService.queryLinkmanInfos(records1);
+                if (records1.getWorkClientLinkmanList() != null && records1.getWorkClientLinkmanList().size() > 0) {
+                    WorkClientLinkman linkman = records1.getWorkClientLinkmanList().get(0);
+                    WorkContractInfo contractInfo = new WorkContractInfo();
+                    contractInfo.setClient(linkman.getClientId());
+                    records1.setWorkContractInfo(contractInfo);
+                }
+            }
+            //判断是否为admin
+            if (UserUtils.isManager()){
+                records1.setFlagAdmin("1");
+            }else{
+                records1.setFlagAdmin("0");
+            }
+        }
+        model.addAttribute("page", page);
+        return "modules/projectrecord/plan/projectPlanCostList";
+    }
+
+    @RequestMapping(value = {"form"})
+    public String form(RuralProjectRecords projectRecords, Model model) {
+        boolean flag = false;
+        //判断是否为查看信息操作
+        if("view".equals(projectRecords.getView())){
+            flag = true;
+        }
+        //获取项目信息
+        //如果没有id则为新增 添加创建人信息和当前创建时间信息
+        if (projectRecords!=null&&StringUtils.isNotBlank(projectRecords.getId())) {
+            //projectRecords = ruralProjectRecordsService.get(projectRecords.getId());
+            projectRecords = ruralProjectRecordsService.getMasters(projectRecords.getId());
+        }else {
+            projectRecords.setCreateBy(UserUtils.getUser());
+            projectRecords.setCreateDate(new Date());
+        }
+
+        ProjectPlanInfo projectPlanInfo = new ProjectPlanInfo();
+        //将项目id放入项目计划表中
+        projectPlanInfo.setProjectId(projectRecords.getId());
+        //获取项目计划信息
+        List<ProjectPlanInfo> projectPlanList = projectPlanService.getProjectPlanList(projectPlanInfo);
+        if(projectPlanList.size() == 0 && !flag){
+            //获取项目计划信息
+            List<MainDictDetail> mainDictList = DictUtils.getMainDictList("projectPlan");
+            if(mainDictList.size()>0){
+                for (MainDictDetail mainDict : mainDictList) {
+                    ProjectPlanInfo projectPlan = new ProjectPlanInfo();
+                    projectPlan.setProjectStage(mainDict.getLabel());
+                    //将项目负责人添加到展示栏
+                    if(null != projectRecords.getProjectLeaders()) {
+                        projectPlan.setRemindName(projectRecords.getProjectLeaders().get(0).getName());
+                        projectPlan.setRemindId(projectRecords.getProjectLeaders().get(0).getId());
+                    }
+                    //将项目等级人信息添加到完成人控件中
+                    User user = UserUtils.get(projectRecords.getCreateBy().getId());
+                    projectPlan.setFinishId(user.getId());
+                    projectPlan.setFinishName(user.getName());
+                    projectPlanList.add(projectPlan);
+                }
+            }
+        }
+        //获取 项目计划附件信息
+        List<WorkClientAttachment> workAttachmentList = projectPlanService.getWorkAttachment(projectRecords.getId());
+        projectRecords.setProjectPlanList(projectPlanList);
+        projectRecords.setWorkAttachments(workAttachmentList);
+        model.addAttribute("projectRecords", projectRecords);
+        if(flag){
+            return "modules/projectrecord/plan/projectPlanView";
+        }
+        return "modules/projectrecord/plan/projectPlanCostForm";
+    }
+
+    /**
+     * 保存客户管理
+     */
+    @RequiresPermissions(value={"project:projectPlanCost:add","project:projectPlanCost:edit"})
+    @RequestMapping(value = "save")
+    public String save(ProjectRecords projectRecords, Model model, RedirectAttributes redirectAttributes) throws Exception{
+        ProjectRecords ProjectRecord = ruralProjectRecordsService.getProjectRecords(projectRecords.getId());
+        MyBeanUtils.copyBeanNotNull2Bean(projectRecords, ProjectRecord);//将编辑表单中的非NULL值覆盖数据库记录中的值
+        projectPlanService.saveProjectPlanInfo(ProjectRecord);//保存
+        addMessage(redirectAttributes, "保存项目计划成功");
+        return "redirect:"+ Global.getAdminPath()+"/project/projectPlanCost/?repage";
+    }
+
+    /**
+     * 导出excel文件
+     */
+    @RequestMapping(value = "export")
+    public String exportFile(ProjectRecords projectRecords, HttpServletResponse response, RedirectAttributes redirectAttributes) {
+        ProjectRecords ProjectRecord = ruralProjectRecordsService.getProjectRecords(projectRecords.getId());
+        try {
+            MyBeanUtils.copyBeanNotNull2Bean(projectRecords, ProjectRecord);//将编辑表单中的非NULL值覆盖数据库记录中的值
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        try {
+            //文件名称
+            String fileName = ProjectRecord.getProjectName()+"-项目计划.xlsx";
+            ProjectPlanInfo projectPlanInfo = new ProjectPlanInfo();
+            projectPlanInfo.setProjectId(ProjectRecord.getId());
+            //获取项目计划信息
+            List<ProjectPlanInfo> projectPlanList = projectPlanService.getProjectPlanList(projectPlanInfo);
+            new ExportExcel(ProjectRecord.getProjectName()+"-项目计划", ProjectPlanInfo.class).setDataList(projectPlanList).write(response, fileName).dispose();
+            return null;
+        } catch (Exception e) {
+            addMessage(redirectAttributes, "导出项目计划记录失败!失败信息:"+e.getMessage());
+        }
+        return "redirect:"+Global.getAdminPath()+"/project/projectPlanCost/?repage";
+    }
+
+}

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

@@ -40,5 +40,9 @@
 		delete from project_filingbatch_proinfo
 		where filing_batch=#{proInfofilingBatch} and project_id=#{proId}
 	</delete>
+	<delete id="deleteById">
+		delete from project_filingbatch_proinfo
+		where id=#{id}
+	</delete>
 
 </mapper>

+ 100 - 0
src/main/webapp/WEB-INF/tags/sys/inquireselectplanUser.tag

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

+ 27 - 11
src/main/webapp/webpage/modules/projectFilingBatch/ProjectFilingBatchProInfoForm.jsp

@@ -11,7 +11,13 @@
 		var validateForm;
 		function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
 			if(validateForm.form()){
-				$("#inputForm").submit();
+				var length=$("#file_attachment tr").length
+				for (var i=0;i<length;i++){
+					var type=$("#file_attachment tr").eq(i).find("td").eq(1).find("input").val();
+					if (type==""){
+						return false;
+					}
+				}
 				return true;
 			}
 			return false;
@@ -99,12 +105,12 @@
 			var sa=ss[1];
 			$(id).parent().parent().parent().show();
 			$(id).append(
-					"<tr class='listInfo'>"+
-					"<td style=\"text-align: center;position: relative;\" width=\"20%\"><span style='color: red;float: left;position: absolute;left: 15px;top: 15px;'>*</span><input name='ProInfoType' style='text-align: center'  class=\"form-control required\"></input></td>"+
+					"<tr class='listInfo' align='center'>"+
+					"<td style=\"text-align: center;position: relative;\" width=\"20%\"><span style='color: red;float: left;position: absolute;left: 15px;top: 15px;'>*</span><input name='ProInfoType' style='text-align: center;width: 100%;'  class=\"form-control required\"/></td>"+
 					"<td style=\"text-align: center\" width=\"20%\"><input name='ProInfoName' style='text-align: center' class=\"form-control\"></input></td>"+
-					"<td width=\"20%\">" +
+					"<td width=\"10%\" align='center'>" +
 					// "<span href=javascript:void(0); onclick=\"accordingBtn(this)\"   class=\"op-btn op-btn-edit\" title=\"上传附件\"><i class=\"glyphicon glyphicon-edit\"></i>&nbsp;编辑</span>" +
-					"<div class=\"op-btn-box\" ><span class=\"op-btn op-btn-delete\" onclick=\"delListInfoRow(this)\" title=\"删除\"><i class=\"glyphicon glyphicon-remove\"></i>&nbsp;删除</span></div>" +
+					"<div class=\"op-btn-box\" style='margin-top: 8px;'><span class=\"op-btn op-btn-delete\" onclick=\"delListInfoRow(this)\" title=\"删除\"><i class=\"glyphicon glyphicon-remove\"></i>&nbsp;删除</span></div>" +
 					"</td>"+
 					"</tr>"
 			)
@@ -115,10 +121,19 @@
 		function proInfoType() {
 			var length=$("#file_attachment tr").length;
 			var types=new Array();
+			var flag=true;
 			for (var i=0;i<length;i++){
 				types[i]=$("#file_attachment tr").eq(i).find("td").eq(0).find("input").eq(0).val();
+				if (types[i]==""){
+					flag=false;
+				}
 			}
-			return types;
+			if (flag){
+				return types;
+			}else{
+				top.layer.msg("文件类型不能为空", {icon: 0});
+			}
+
 		}
 		function proInfoValue() {
 			var length=$("#file_attachment tr").length;
@@ -126,6 +141,7 @@
 			for (var i=0;i<length;i++){
 				names[i]=$("#file_attachment tr").eq(i).find("td").eq(1).find("input").eq(0).val();
 			}
+
 			return names;
 		}
 		function delListInfoRow(obj, prefix){
@@ -152,7 +168,7 @@
 <body>
 <div class="single-form">
 	<div class="container">
-<%--		<form:form id="inputForm" modelAttribute="projectFilingBatchProInfo" action="${ctx}/projectAccessory/projectAccessory/saveWorkAttachment" method="post" class="form-horizontal">--%>
+		<form:form id="inputForm" method="post" class="form-horizontal">
 <%--			<form:hidden path="id"/>--%>
 <%--			<form:hidden path="proId"/>--%>
 <%--			<form:hidden path="proInfofilingBatch"/>--%>
@@ -174,20 +190,20 @@
 				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
 					<input type="hidden" id="proId" value="${proid}">
 					<input type="hidden" id="filingId" value="${filingId}">
-					<table id="upTable" cellpadding="0" cellspacing="0" class="table table-bordered table-condensed details">
+					<table id="upTable"  class="table table-bordered table-condensed can-edit">
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
 							<th>文件类型</th>
 							<th>文件描述</th>
-							<th width="150px">操作</th>
+							<th width="15%">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_attachment">
 <%--						<c:choose>--%>
 <%--							<c:when test="${types != '' and names != ''}">--%>
 								<c:forEach items="${proInfo}" var = "info" varStatus="status">
-									<tr>
+									<tr align="center">
 										<td><input name="proInfoType" style="text-align: center;" class="form-control required" value='${info.type}'/></td>
 										<td><input name="proInfoName" style="text-align: center" class="form-control required" value='${info.name}'/></td>
 										<td class="op-td">
@@ -207,7 +223,7 @@
 					</table>
 				</div>
 			</div>
-<%--		</form:form>--%>
+		</form:form>
 	</div>
 </div>
 </body>

+ 27 - 10
src/main/webapp/webpage/modules/projectFilingBatch/projectFilingBatchApply.jsp

@@ -77,7 +77,7 @@
 									"<input  readonly='true' name='ProInfoType' style='text-align: center'  class=\"form-control required\" value='"+type+"'></td>"+
 									"<td style=\"text-align: center\" width=\"20%\"><input  readonly='true' name='ProInfoName' style='text-align: center' class=\"form-control\" value='"+name+"'></input></td>"+
 									"<td style=\"text-align: center\" width=\"20%\"></td>"+
-									"<td width=\"20%\">" +
+									"<td width=\"20%\" style='padding-top: 8px;'>" +
 									"<span href=javascript:void(0); onclick=\"addRowInfoForm("+edit+","+editId+")\"   class=\"op-btn op-btn-edit\" title=\"上传附件\"><i class=\"glyphicon glyphicon-edit\"></i>&nbsp;编辑</span>" +
 									"<span class=\"op-btn op-btn-delete\" onclick=\"delListInfoRow(this)\" title=\"删除\"><i class=\"glyphicon glyphicon-remove\"></i>&nbsp;删除</span>" +
 									"<input type='text' class='" + jsonInput + "'  name='proInfos' style='display: none;' value='"+proJson+"' />"+
@@ -128,16 +128,16 @@
 							}
 							if(flag) {
 								$("#projectList").append("<tr class='rowSize' onclick='listTr(this)'>" +
-										"<td><input type=\"hidden\" name=\"proId\" id='" + tid + "' value=" + obj.id + "><input type=\"hidden\" name=\"projectid\" value=" + obj.id + "><span><i class=\"layui-icon layui-icon-triangle-d\"></i></span>" + obj.projectId + "</td>" +
-										"<td>" + obj.projectName + "</td>" +
-										"<td>" + obj.projectReportNumber + "</td>" +
+										"<td ><input type=\"hidden\" name=\"proId\" id='" + tid + "' value=" + obj.id + "><input type=\"hidden\" name=\"projectid\" value=" + obj.id + "/><span><i class=\"layui-icon layui-icon-triangle-d\"></i></span>" + obj.projectId + "</td>" +
+										"<td >" + obj.projectName + "</td>" +
+										"<td >" + obj.projectReportNumber + "</td>" +
 										"<td class=\"text-center op-td\" >" +
 										"<span class=\"op-btn op-btn-add\" onclick=\"addRowInfoForm("+tid+","+id+")\" title=\"添加\"><i class=\"fa fa-plus\"></i>&nbsp;添加</span>" +
 										"<span class=\"op-btn op-btn-delete\" onclick=\"delListRow(this," + id + ")\" title=\"删除\"><i class=\"glyphicon glyphicon-remove\"></i>&nbsp;删除</span>" +
 										"</td>" +
 										"</tr>")
 								$("#projectList").append("<tr class='"+obj.id+"' style='display: none;'> <td colspan='4' style='padding: 0px;'>" +
-										"<table style=\"width: 100%;padding: 0px;margin: 0px;\" class=\"table table-bordered table-condensed details\">" +
+										"<table style=\"width: 100%;padding: 0px;margin: 0px;\" class=\"table table-bordered table-condensed can-edit\">" +
 										"<tbody id='" + id + "'>" +
 										"<input type='text' id='" + id + "_len' style='display: none;' name='flags' />"+
 										"</tbody>" +
@@ -159,20 +159,21 @@
 										$(iid).parent().parent().parent().show();
 										$.each(result.data,function(index,value){
 											$(iid).append(
-													"<tr class='listInfo' style='position: relative'>"+
+													"<tr class='listInfo'>"+
 													// "<td class=\"hide\">"+
 													// "<input type='file' multiple='multiple' style='display: none;' onChange='if(this.value)insertAccording(this.value,"+obj.id+",this);'/>"+
 													// "<input type='hidden' style='display: none;' id='attId' value='"+value.id+"'/>"+
 													// "<input type='hidden' style='display: none;' id='fileUrl' value='"+value.url+"'/>"+
 													// "</td>"+
 													"<td style=\"text-align: center;position: relative;\" width=\"20%\">" +
-													"<input name='proInfoType' onChange='upwType(this)' style='text-align: center' readonly='true' class=\"form-control required\" value='"+value.proInfoType+"'/></td>"+
+													"<input name='proInfoType' style='text-align: center' readonly='true' class=\"form-control\" value='"+value.proInfoType+"'/></td>"+
 													"<td style=\"text-align: center\" width=\"20%\"><input  readonly='true' name='proInfoName' style='text-align: center' class=\"form-control required\" value='"+value.proInfoName+"'/></td>"+
 													"<td style=\"text-align: center\" width=\"20%\"></td>"+
-													"<td width=\"20%\">" +
+													"<td width=\"20%\" style='padding-top : 8px;'>" +
 													"<span href=javascript:void(0); onclick=\"addRowInfoForm("+tid+","+id+")\"   class=\"op-btn op-btn-edit\" title=\"上传附件\"><i class=\"glyphicon glyphicon-edit\"></i>&nbsp;编辑</span>" +
 													"<span class=\"op-btn op-btn-delete\" onclick=\"delListInfoRow(this)\" title=\"删除\"><i class=\"glyphicon glyphicon-remove\"></i>&nbsp;删除</span>" +
 													"<input type='text' class='" + id + "_json' style='display: none;' name='proInfos' />"+
+													"<input type='text' style='display: none;' class='typeId' value='"+value.id+"' />"+
 													"</td>"+
 													"</tr>"
 											)
@@ -210,7 +211,21 @@
 				},100);
 			}
 		});
+		function delListInfoRow(obj, prefix){
+			var tr=$(obj).parent().parent();
+			var id=$(tr).find("td").eq(3).find(".typeId").val();
+			$(obj).parent().parent().remove();
+			// $(obj).parent().parent().parent().parent().parent().parent().remove();
+			$.ajax({
+				type:"post",
+				url:"${ctx}/projectFilingBatch/projectFilingBatchInfo/deleteById",
+				data:{"id":id},
+				dataType:"json",
+				success:function (d) {
 
+				}
+			});
+		}
         function insertTitle(tValue){
             var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
             var attachmentId = $("#id").val();
@@ -295,12 +310,13 @@
 					</div>
 				</div>
 			</div>
-			<div class="form-group layui-row first">
+			<div class="form-group layui-row  first">
 				<div class="form-group-label"><h2>项目基础信息</h2></div>
+				<div class="layui-item layui-col-xs12 form-table-container" style="padding:0px">
 				<table id="contentTable2" class="table table-bordered table-condensed details">
 					<thead>
 					<tr>
-						<th class="hide"></th>
+<%--						<th class="hide"></th>--%>
 						<th style="text-align: center" width="20%">归档项目编号</th>
 						<th style="text-align: center" width="20%">归档项目名称</th>
 						<th style="text-align: center" width="20%">报告号</th>
@@ -352,6 +368,7 @@
 <%--					</c:choose>--%>
 					</tbody>
 				</table>
+				</div>
 			</div>
 	</form:form>
 			<div class="form-group layui-row">

+ 10 - 7
src/main/webapp/webpage/modules/projectFilingBatch/projectFilingBatchForm.jsp

@@ -148,6 +148,7 @@
                                                 "<span href=javascript:void(0); onclick=\"addRowInfoForm("+tid+","+id+")\"   class=\"op-btn op-btn-edit\" title=\"上传附件\"><i class=\"glyphicon glyphicon-edit\"></i>&nbsp;编辑</span>" +
                                                 "<span class=\"op-btn op-btn-delete\" onclick=\"delListInfoRow(this)\" title=\"删除\"><i class=\"glyphicon glyphicon-remove\"></i>&nbsp;删除</span>" +
                                                 "<input type='text' class='" + id + "_json' style='display: none;' name='proInfos' />"+
+                                                "<input type='text' style='display: none;' class='typeId' value='"+value.id+"' />"+
                                                 "</td>"+
                                                 "</tr>"
                                             )
@@ -744,11 +745,13 @@
             });
         }
         function delListRow(o,obj){
-            var tr=obj.id+" tr"
-            var html=$(tr).html()
-            if(html!="undefined"){
+            var tr="#"+obj.id+" tr"
+            var html=$(tr).length
+            if(0 == html){
                 $(o).parent().parent().remove();
                 $(obj).parent().parent().parent().remove();
+            }else{
+                parent.layer.msg("该项目下有文件信息!", {icon: 5});
             }
 
 
@@ -758,13 +761,13 @@
         }
         function delListInfoRow(obj, prefix){
             var tr=$(obj).parent().parent();
-            var id=$(tr).find("td").eq(0).find("#attId").val();
-            var url=$(tr).find("td").eq(0).find("#fileUrl").val();
+            var id=$(tr).find("td").eq(3).find(".typeId").val();
             $(obj).parent().parent().remove();
-            $(obj).parent().parent().parent().parent().parent().parent().remove();
+            // $(obj).parent().parent().parent().parent().parent().parent().remove();
             $.ajax({
                 type:"post",
-                url:"${ctx}/sys/workattachment/deleteFileFromAliyun?url="+url+"&id="+id,
+                url:"${ctx}/projectFilingBatch/projectFilingBatchInfo/deleteById",
+                data:{"id":id},
                 dataType:"json",
                 success:function (d) {
 

+ 342 - 0
src/main/webapp/webpage/modules/projectrecord/plan/projectPlanConsultingForm.jsp

@@ -0,0 +1,342 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+    <title>项目管理</title>
+    <meta name="decorator" content="default"/>
+    <script type="text/javascript" src="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.js"></script>
+    <script type="text/javascript" src="${ctxStatic}/iCheck/icheck.min.js"></script>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
+
+    <link rel='layuicss' type="text/css" href="${ctxp}/static/layui/css/layui.css"/>
+    <style>
+        #projectDesc-error{
+            left:0;
+            top:82px;
+        }
+        .layui-layer-dialog{
+            background: red;
+        }
+        td input{
+            margin-left:0px !important;
+            height: 42px !important;
+        }
+    </style>
+    <script type="text/javascript">
+        var validateForm;
+        function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(i==2){
+                    $("#inputForm").attr("action","${ctx}/project/projectPlanConsulting/save");
+                }
+                $("#inputForm").submit();
+                return true;
+            }
+
+            return false;
+        }
+        $(document).ready(function() {
+            var radioVal ;
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+
+        });
+
+        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 = "131";
+                /*console.log(file);*/
+                var timestamp=new Date().getTime();
+
+                var storeAs = "projectPlan";
+                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);}
+        }
+
+
+        laydate.render({
+            elem: '#beginDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+            type : 'date'
+, trigger: 'click'
+        });
+        laydate.render({
+            elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+            type : 'date'
+, trigger: 'click'
+        });
+
+        function func(idx){
+            var ids = "projectPlanList";
+            //获取被选中的option标签
+            var vs = document.getElementById("projectPlanList"+idx+"_projectStage").value;
+        }
+
+        function addFile() {
+            $("#attachment_file").click();
+        }
+
+        function addRow(list, idx, tpl, row){
+            var idx1 = $("#projectPlanList tr").length;
+            idx+=1;
+            bornTemplete(list, idx, tpl, row, idx1);
+        }
+
+        function bornTemplete(list, idx, tpl, row, idx1){
+            $(list).append(Mustache.render(tpl, {
+                idx: idx, delBtn: true, row: row,
+                order:idx1 + 1
+            }));
+            $(list+idx).find("select").each(function(){
+                $(this).val($(this).attr("data-value"));
+            });
+            $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+                var ss = $(this).attr("data-value").split(',');
+                for (var i=0; i<ss.length; i++){
+                    if($(this).val() == ss[i]){
+                        $(this).attr("checked","checked");
+                    }
+                }
+            });
+
+            laydate.render({
+                elem : (list+idx+"_beginDate"),
+                event: 'focus',
+                type : 'date'
+, trigger: 'click',
+                trigger: 'click'
+            });
+            laydate.render({
+                elem : (list+idx+"_endDate"),
+                event: 'focus',
+                type : 'date'
+, trigger: 'click',
+                trigger: 'click'
+            });
+        }
+        function delRow(obj, prefix){
+            var id = $(prefix+"_id");
+            var delFlag = $(prefix+"_delFlag");
+            if (id.val() == ""){
+                $(obj).parent().parent().remove();
+            }else if(delFlag.val() == "0"){
+                delFlag.val("1");
+                $(obj).html("&divide;").attr("title", "撤回删除");
+                $(obj).parent().parent().addClass("error");
+                $(obj).parent().parent().addClass("hide");
+            }else if(delFlag.val() == "1"){
+                delFlag.val("0");
+                $(obj).html("&times;").attr("title", "删除");
+                $(obj).parent().parent().removeClass("error");
+            }
+
+        }
+
+
+    </script>
+</head>
+<body>
+<div class="single-form">
+    <div class="container">
+        <sys:message content="${message}"/>
+        <form:form id="inputForm" modelAttribute="projectRecords" action="${ctx}/project/projectPlanConsulting/save" method="post" class="form-horizontal">
+            <form:hidden path="id"/>
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>项目计划信息</h2></div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">项目名称:</label>
+                    <div class="layui-input-block">
+                        <form:input path="projectName" htmlEscape="false" readonly="true" class="form-control layui-input required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">项目编号:</label>
+                    <div class="layui-input-block">
+                        <div class="input-group">
+                            <form:input path="projectId" htmlEscape="false"  readonly="true" class="form-control layui-input"/>
+                        </div>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">创建人:</label>
+                    <div class="layui-input-block">
+                        <form:input path="createBy.name" htmlEscape="false"  readonly="true"  class="form-control  layui-input"/>
+                        <form:hidden path="createBy.id" htmlEscape="false"   readonly="true"  class="form-control  layui-input"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">创建日期:</label>
+                    <div class="layui-input-block">
+                        <input id="createDate" name="createDate" htmlEscape="false"  value="<fmt:formatDate value="${projectRecords.createDate}" pattern="yyyy-MM-dd"/>" readonly="readonly"  class="form-control required layui-input"/>
+                    </div>
+                </div>
+            </div>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>项目计划列表</h2></div>
+                <div class="layui-item layui-col-sm12 lw7">
+                    <div class="layui-item nav-btns">
+                        <div class="layui-item nav-btns" style="padding-left:0px;">
+                            <a class="nav-btn nav-btn-add"
+                               onclick="addRow('#projectPlanList', workClientBankRowIdx, workClientBankTpl);workClientBankRowIdx = workClientBankRowIdx + 1;"
+                               title="新增"><i class="fa fa-plus"></i> 新增</a>
+                            <shiro:hasPermission name="project:projectPlanConsulting:export">
+                                <a class="nav-btn nav-btn-export" title="导出"  onclick="return confirmx('确认要导出该项目计划列表吗?', '${ctx}/project/projectPlanConsulting/export?id=${projectRecords.id}');"><i class="fa fa-file-excel-o"></i> 导出</a>
+                            </shiro:hasPermission>
+                        </div>
+                        <table id="bankinfo" class="table table-bordered table-condensed can-edit">
+                            <thead>
+                            <tr>
+                                <th width="60px">编号</th>
+                                <th >任务阶段</th>
+                                <th >计划开始时间</th>
+                                <th >计划结束时间</th>
+                                <th >提醒人</th>
+                                <th >完成人</th>
+                                <th width="100px">操作</th>
+                            </tr>
+                            </thead>
+                            <tbody id="projectPlanList">
+
+                            </tbody>
+                        </table>
+                        <script type="text/template" id="workClientBankTpl">//<!--
+                                <tr id="projectPlanList{{idx}}">
+                                    <td class="hide">
+                                        <input id="projectPlanList{{idx}}_id" name="projectPlanList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+                                        <input id="projectPlanList{{idx}}_delFlag" name="projectPlanList[{{idx}}].delFlag" type="hidden" value="0"/>
+                                    </td>
+
+                                    <td width="60px">
+                                        <input id="projectPlanList{{idx}}_costNum" name="projectPlanList[{{idx}}].costNum" readonly="readonly" style="text-align: center"  value="{{idx}}" type="text" class="form-control contentDetail"/>
+                                    </td>
+                                    <td>
+                                        <input id="projectPlanList{{idx}}_projectStage" name="projectPlanList[{{idx}}].projectStage" list ="num" value="{{row.projectStage}}" class="form-control required"/>
+                                    </td>
+
+                                    <td>
+                                        <input lay-verify="date" readonly="true" placeholder="yyyy-MM-dd" autocomplete="off" id="projectPlanList{{idx}}_beginDate" name="projectPlanList[{{idx}}].beginDate" type="text" value="{{row.beginDate}}"  class="form-control required datetime"/>
+                                    </td>
+                                    <td>
+                                        <input lay-verify="date" readonly="true" placeholder="yyyy-MM-dd" autocomplete="off" id="projectPlanList{{idx}}_endDate" name="projectPlanList[{{idx}}].endDate" type="text" value="{{row.endDate}}"  class="form-control required datetime"/>
+                                    </td>
+
+                                    <td>
+                                        <sys:inquireselectplanUser id="projectPlanList{{idx}}_remindName" name="projectPlanList[{{idx}}].remindId" value="{{row.remindId}}" labelName="projectPlanList[{{idx}}].remindName" labelValue="{{row.remindName}}"
+                                         title="用户" url="/sys/office/treeDataByPlan?type=3&projectId=${projectRecords.id}" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
+                                    </td>
+
+                                    <td>
+                                        <sys:inquireselectplanUser id="projectPlanList{{idx}}_finishName" name="projectPlanList[{{idx}}].finishId" value="{{row.finishId}}" labelName="projectPlanList[{{idx}}].finishName" labelValue="{{row.finishName}}"
+                                         title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
+                                    </td>
+
+                                    <td class="text-center op-td" width="10">
+                                        {{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#projectPlanList{{idx}}')" title="删除"><i class="fa fa-trash"></i>&nbsp;删除</span>{{/delBtn}}
+                                    </td>
+                                </tr>//-->
+                        </script>
+                    </div>
+                </div>
+            </div>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>项目计划附件信息</h2></div>
+                <div class="layui-item nav-btns">
+                    <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"  onclick="addFile()"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+                    <%--<a class="nav-btn nav-btn-export" title="下载模板"  onclick="window.location.href='${ctx}/project/projectPlanConsulting/downloadTemplate';"><i class="fa fa-download"></i>&nbsp;下载模板</a>--%>
+                </div>
+                <div id="addFile_attachment" style="display: none" class="upload-progress">
+                    <span id="fileName_attachment" ></span>
+                    <b><span id="baifenbi_attachment" ></span></b>
+                    <div class="progress">
+                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+                        </div>
+                    </div>
+                </div>
+                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+                <span id="attachment_title"></span>
+                <div class="layui-item layui-col-xs12 form-table-container">
+                    <table id="listAttachment" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                                <%-- <th>序号</th>--%>
+                            <th width="25%">文件</th>
+                            <th width="25%">上传人</th>
+                            <th width="25%">上传时间</th>
+                            <th width="150px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_attachment">
+                        <c:forEach items="${projectRecords.workAttachments}" var = "workClientAttachment" varStatus="status">
+                            <tr class="trIdAdds">
+                                    <%-- <td>${status.index + 1}</td>--%>
+                                <c:choose>
+                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                        <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                    </c:when>
+                                    <c:otherwise>
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:otherwise>
+                                </c:choose>
+                                <td>${workClientAttachment.createBy.name}</td>
+                                <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+                                <td class="op-td">
+                                    <div class="op-btn-box" >
+                                        <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                        <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+                                    </div>
+                                </td>
+                            </tr>
+                        </c:forEach>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+
+            <div class="form-group layui-row page-end"></div>
+        </form:form>
+    </div>
+</div>
+<script type="text/javascript">
+    var workClientBankRowIdx = 0,
+        workClientBankTpl = $("#workClientBankTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, "");
+    $(document).ready(function () {
+        var dataBank = ${fns:toJson(projectRecords.projectPlanList)};
+        for (var i = 0; i < dataBank.length; i++) {
+            addRow('#projectPlanList', workClientBankRowIdx, workClientBankTpl, dataBank[i]);
+            workClientBankRowIdx = workClientBankRowIdx + 1;
+        }
+    });
+
+</script>
+</body>
+</html>

+ 303 - 0
src/main/webapp/webpage/modules/projectrecord/plan/projectPlanConsultingList.jsp

@@ -0,0 +1,303 @@
+<%@ 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" />
+	<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'
+, trigger: 'click'
+			});
+			laydate.render({
+				elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+				event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+				type : 'date'
+, trigger: 'click'
+			});
+		});
+
+		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) {
+				}
+			});
+		}
+	</script>
+	<style>
+		body{
+			background-color:transparent;
+			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+			color:#ffffff;
+			background-color:rgba(255,255,255,0);
+			height:100%;
+		}
+	</style>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+	<div class="layui-row">
+		<div class="full-width fl">
+			<div class="layui-row contentShadow shadowLR" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="ruralProjectRecords" action="${ctx}/project/projectPlanConsulting/" method="post" class="form-inline">
+					<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+					<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+					<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+					<div class="commonQuery lw6">
+							<div class="layui-item query athird">
+                                <label class="layui-form-label">项目编号:</label>
+                                <div class="layui-input-block with-icon">
+                                    <form:input path="projectId" htmlEscape="false" maxlength="64"  class=" form-control  layui-input"/>
+                                </div>
+                            </div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">项目名称:</label>
+							<div class="layui-input-block">
+								<form:input path="projectName" htmlEscape="false" maxlength="64"  class=" form-control  layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item athird">
+							<div class="input-group">
+								<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+								<button id="searchReset" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>
+								<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
+							</div>
+						</div>
+						<div style="    clear:both;"></div>
+					</div>
+					<div id="moresees" style="clear:both;display:none;" class="lw6">
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">项目负责人:</label>
+							<div class="layui-input-block">
+								<form:input path="leaderNameStr" htmlEscape="false" maxlength="255"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">合同名称:</label>
+							<div class="layui-input-block">
+								<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 class="layui-item query athird ">
+							<label class="layui-form-label">创建时间:</label>
+							<div class="layui-input-block">
+								<input id="beginDate" name="beginDate" placeholder="开始时间" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${projectRecords.beginDate}" pattern="yyyy-MM-dd"/>"/>
+								</input>
+								<span class="group-sep">-</span>
+								<input id="endDate" name="endDate" placeholder="结束时间" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${projectRecords.endDate}" pattern="yyyy-MM-dd"/>"/>
+								</input>
+							</div>
+						</div>
+
+						<div 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-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
+					<div style="clear: both;"></div>
+				</div>
+				<table class="oa-table layui-table" id="contentTable1"></table>
+				<table:page page="${page}"></table:page>
+				<div style="clear: both;"></div>
+			</div>
+		</div>
+	</div>
+	<div id="changewidth"></div>
+</div>
+
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+
+	layui.use('table', function(){
+		layui.table.render({
+			limit:${ page.pageSize }
+			,elem: '#contentTable1'
+			,page: false
+			,cols: [[
+				// {checkbox: true, fixed: true},
+				{field:'index',align:'center', title: '序号',width:40}
+				,{field:'projName',align:'center', title: '项目名称',minWidth:200,templet:function(d){
+						return "<a class=\"attention-info\" title=\"" + d.projName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/ruralProject/ruralProjectRecords/view?id=" + d.id +"','95%', '95%')\">" + d.projName + "</a>";
+					}}
+				,{field:'projId',align:'center', title: '项目编号',minWidth:150}
+				,{field:'contract', align:'center',title: '合同名称',minWidth:200,templet:function(d){
+						if(null == d.contract || '' == d.contract){
+							return "<span style=\"color:red\" title='无合同'>无合同</span>";
+						}else{
+							return "<span title='"+ d.contract +"'>" + d.contract + "</span>";
+						}
+					}}
+				,{field:'projMaster', align:'center',title: '负责人', width:65,templet:function(d){
+						return "<span title=\"" + d.projMaster + "\">" + d.projMaster + "</span>";
+					}}
+				,{field:'client',align:'center', title: '委托方',  width:150,templet:function(d){
+						return "<span title=\"" + d.client + "\">" + d.client + "</span>";
+					}}
+				,{field:'createDate',align:'center', title: '创建日期',  width:80}
+				,{field:'op',align:'center',title:"操作",width:130,templet:function(d){
+						////对操作进行初始化
+						var xml="";
+						if(d.canedit3 != undefined && d.canedit3 =="1")
+						{
+							xml+="<a href=\"javascript:void(0)\" onclick=\"openDialogView('查看项目计划信息', '${ctx}/project/projectPlanConsulting/form?view=view&id='+encodeURIComponent('" + d.id + "'),'95%','95%')\" style=\"color: white;background: darkseagreen\" class=\"op-btn op-btn-op-btn-revert\" ><i class=\"fa fa-search-plus\"></i> 详情</a>";
+						}
+						if(d.canedit4 != undefined && d.canedit4 =="1")
+						{
+							xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('编辑项目计划信息', '${ctx}/project/projectPlanConsulting/form?view=form&id='+encodeURIComponent('" + d.id + "'),'95%','95%','')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 编辑</a>";
+						}
+						return xml;
+
+					}}
+			]]
+			,data: [
+				<c:if test="${ not empty page.list}">
+				<c:forEach items="${page.list}" var="projectRecords" varStatus="index">
+				<c:if test="${index.index != 0}">,</c:if>
+				{
+					"index":"${index.index+1}"
+					,"id":"${projectRecords.id}"
+					,"projId":"${projectRecords.projectId}"
+					,"projName":"<c:out value="${projectRecords.projectName}" escapeXml="true"/>"
+					,"projMaster":"<c:forEach items="${projectRecords.projectLeaders}" var="leader" varStatus="status"><c:choose><c:when test="${status.last}">${leader.name}</c:when><c:otherwise>${leader.name},</c:otherwise></c:choose></c:forEach>"
+					,"contract":"${projectRecords.workContractInfo.name}"
+					,"client":"${projectRecords.workContractInfo.client.name}"
+					,"createDate":"<fmt:formatDate value="${projectRecords.createDate}" pattern="yyyy-MM-dd"/>"
+					,"projectStatus":"${projectRecords.projectStatus}"
+					,"procId":"${projectRecords.processInstanceId}"
+					<shiro:hasPermission name="project:projectPlanConsulting:edit">
+						,"canedit3":<c:choose><c:when test="${projectRecords.projectStatus == 5 && (fns:getUser().id == projectRecords.leaderIds || fns:getUser().id eq projectRecords.createBy.id)}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+						,"canedit4":<c:choose><c:when test="${projectRecords.projectStatus == 5 && (fns:getUser().id == projectRecords.leaderIds || fns:getUser().id eq projectRecords.createBy.id)}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+					</shiro:hasPermission>
+				}
+				</c:forEach>
+				</c:if>
+			]
+			// ,even: true
+			// ,height: 315
+		});
+	})
+
+	resizeListTable();
+	$("a").on("click",addLinkVisied);
+</script>
+<script>
+	resizeListWindow2();
+	$(window).resize(function(){
+		resizeListWindow2();
+	});
+</script>
+</body>
+</html>

+ 342 - 0
src/main/webapp/webpage/modules/projectrecord/plan/projectPlanCostForm.jsp

@@ -0,0 +1,342 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+    <title>项目管理</title>
+    <meta name="decorator" content="default"/>
+    <script type="text/javascript" src="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.js"></script>
+    <script type="text/javascript" src="${ctxStatic}/iCheck/icheck.min.js"></script>
+    <link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
+
+    <link rel='layuicss' type="text/css" href="${ctxp}/static/layui/css/layui.css"/>
+    <style>
+        #projectDesc-error{
+            left:0;
+            top:82px;
+        }
+        .layui-layer-dialog{
+            background: red;
+        }
+        td input{
+            margin-left:0px !important;
+            height: 42px !important;
+        }
+    </style>
+    <script type="text/javascript">
+        var validateForm;
+        function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(i==2){
+                    $("#inputForm").attr("action","${ctx}/project/projectPlanCost/save");
+                }
+                $("#inputForm").submit();
+                return true;
+            }
+
+            return false;
+        }
+        $(document).ready(function() {
+            var radioVal ;
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+
+        });
+
+        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 = "131";
+                /*console.log(file);*/
+                var timestamp=new Date().getTime();
+
+                var storeAs = "projectPlan";
+                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);}
+        }
+
+
+        laydate.render({
+            elem: '#beginDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+            type : 'date'
+, trigger: 'click'
+        });
+        laydate.render({
+            elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+            type : 'date'
+, trigger: 'click'
+        });
+
+        function func(idx){
+            var ids = "projectPlanList";
+            //获取被选中的option标签
+            var vs = document.getElementById("projectPlanList"+idx+"_projectStage").value;
+        }
+
+        function addFile() {
+            $("#attachment_file").click();
+        }
+
+        function addRow(list, idx, tpl, row){
+            var idx1 = $("#projectPlanList tr").length;
+            idx+=1;
+            bornTemplete(list, idx, tpl, row, idx1);
+        }
+
+        function bornTemplete(list, idx, tpl, row, idx1){
+            $(list).append(Mustache.render(tpl, {
+                idx: idx, delBtn: true, row: row,
+                order:idx1 + 1
+            }));
+            $(list+idx).find("select").each(function(){
+                $(this).val($(this).attr("data-value"));
+            });
+            $(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+                var ss = $(this).attr("data-value").split(',');
+                for (var i=0; i<ss.length; i++){
+                    if($(this).val() == ss[i]){
+                        $(this).attr("checked","checked");
+                    }
+                }
+            });
+
+            laydate.render({
+                elem : (list+idx+"_beginDate"),
+                event: 'focus',
+                type : 'date'
+, trigger: 'click',
+                trigger: 'click'
+            });
+            laydate.render({
+                elem : (list+idx+"_endDate"),
+                event: 'focus',
+                type : 'date'
+, trigger: 'click',
+                trigger: 'click'
+            });
+        }
+        function delRow(obj, prefix){
+            var id = $(prefix+"_id");
+            var delFlag = $(prefix+"_delFlag");
+            if (id.val() == ""){
+                $(obj).parent().parent().remove();
+            }else if(delFlag.val() == "0"){
+                delFlag.val("1");
+                $(obj).html("&divide;").attr("title", "撤回删除");
+                $(obj).parent().parent().addClass("error");
+                $(obj).parent().parent().addClass("hide");
+            }else if(delFlag.val() == "1"){
+                delFlag.val("0");
+                $(obj).html("&times;").attr("title", "删除");
+                $(obj).parent().parent().removeClass("error");
+            }
+
+        }
+
+
+    </script>
+</head>
+<body>
+<div class="single-form">
+    <div class="container">
+        <sys:message content="${message}"/>
+        <form:form id="inputForm" modelAttribute="projectRecords" action="${ctx}/project/projectPlanCost/save" method="post" class="form-horizontal">
+            <form:hidden path="id"/>
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>项目计划信息</h2></div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">项目名称:</label>
+                    <div class="layui-input-block">
+                        <form:input path="projectName" htmlEscape="false" readonly="true" class="form-control layui-input required"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">项目编号:</label>
+                    <div class="layui-input-block">
+                        <div class="input-group">
+                            <form:input path="projectId" htmlEscape="false"  readonly="true" class="form-control layui-input"/>
+                        </div>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">创建人:</label>
+                    <div class="layui-input-block">
+                        <form:input path="createBy.name" htmlEscape="false"  readonly="true"  class="form-control  layui-input"/>
+                        <form:hidden path="createBy.id" htmlEscape="false"   readonly="true"  class="form-control  layui-input"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6 lw7">
+                    <label class="layui-form-label">创建日期:</label>
+                    <div class="layui-input-block">
+                        <input id="createDate" name="createDate" htmlEscape="false"  value="<fmt:formatDate value="${projectRecords.createDate}" pattern="yyyy-MM-dd"/>" readonly="readonly"  class="form-control required layui-input"/>
+                    </div>
+                </div>
+            </div>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>项目计划列表</h2></div>
+                <div class="layui-item layui-col-sm12 lw7">
+                    <div class="layui-item nav-btns">
+                        <div class="layui-item nav-btns" style="padding-left:0px;">
+                            <a class="nav-btn nav-btn-add"
+                               onclick="addRow('#projectPlanList', workClientBankRowIdx, workClientBankTpl);workClientBankRowIdx = workClientBankRowIdx + 1;"
+                               title="新增"><i class="fa fa-plus"></i> 新增</a>
+                            <shiro:hasPermission name="project:projectPlanCost:export">
+                                <a class="nav-btn nav-btn-export" title="导出"  onclick="return confirmx('确认要导出该项目计划列表吗?', '${ctx}/project/projectPlanCost/export?id=${projectRecords.id}');"><i class="fa fa-file-excel-o"></i> 导出</a>
+                            </shiro:hasPermission>
+                        </div>
+                        <table id="bankinfo" class="table table-bordered table-condensed can-edit">
+                            <thead>
+                            <tr>
+                                <th width="60px">编号</th>
+                                <th >任务阶段</th>
+                                <th >计划开始时间</th>
+                                <th >计划结束时间</th>
+                                <th >提醒人</th>
+                                <th >完成人</th>
+                                <th width="100px">操作</th>
+                            </tr>
+                            </thead>
+                            <tbody id="projectPlanList">
+
+                            </tbody>
+                        </table>
+                        <script type="text/template" id="workClientBankTpl">//<!--
+                                <tr id="projectPlanList{{idx}}">
+                                    <td class="hide">
+                                        <input id="projectPlanList{{idx}}_id" name="projectPlanList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+                                        <input id="projectPlanList{{idx}}_delFlag" name="projectPlanList[{{idx}}].delFlag" type="hidden" value="0"/>
+                                    </td>
+
+                                    <td width="60px">
+                                        <input id="projectPlanList{{idx}}_costNum" name="projectPlanList[{{idx}}].costNum" readonly="readonly" style="text-align: center"  value="{{idx}}" type="text" class="form-control contentDetail"/>
+                                    </td>
+                                    <td>
+                                        <input id="projectPlanList{{idx}}_projectStage" name="projectPlanList[{{idx}}].projectStage" list ="num" value="{{row.projectStage}}" class="form-control required"/>
+                                    </td>
+
+                                    <td>
+                                        <input lay-verify="date" readonly="true" placeholder="yyyy-MM-dd" autocomplete="off" id="projectPlanList{{idx}}_beginDate" name="projectPlanList[{{idx}}].beginDate" type="text" value="{{row.beginDate}}"  class="form-control required datetime"/>
+                                    </td>
+                                    <td>
+                                        <input lay-verify="date" readonly="true" placeholder="yyyy-MM-dd" autocomplete="off" id="projectPlanList{{idx}}_endDate" name="projectPlanList[{{idx}}].endDate" type="text" value="{{row.endDate}}"  class="form-control required datetime"/>
+                                    </td>
+
+                                    <td>
+                                        <sys:inquireselectplanUser id="projectPlanList{{idx}}_remindName" name="projectPlanList[{{idx}}].remindId" value="{{row.remindId}}" labelName="projectPlanList[{{idx}}].remindName" labelValue="{{row.remindName}}"
+                                         title="用户" url="/sys/office/treeDataByPlan?type=3&projectId=${projectRecords.id}" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
+                                    </td>
+
+                                    <td>
+                                        <sys:inquireselectplanUser id="projectPlanList{{idx}}_finishName" name="projectPlanList[{{idx}}].finishId" value="{{row.finishId}}" labelName="projectPlanList[{{idx}}].finishName" labelValue="{{row.finishName}}"
+                                         title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
+                                    </td>
+
+                                    <td class="text-center op-td" width="10">
+                                        {{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRow(this, '#projectPlanList{{idx}}')" title="删除"><i class="fa fa-trash"></i>&nbsp;删除</span>{{/delBtn}}
+                                    </td>
+                                </tr>//-->
+                        </script>
+                    </div>
+                </div>
+            </div>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>项目计划附件信息</h2></div>
+                <div class="layui-item nav-btns">
+                    <a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"  onclick="addFile()"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+                    <%--<a class="nav-btn nav-btn-export" title="下载模板"  onclick="window.location.href='${ctx}/project/projectPlanCost/downloadTemplate';"><i class="fa fa-download"></i>&nbsp;下载模板</a>--%>
+                </div>
+                <div id="addFile_attachment" style="display: none" class="upload-progress">
+                    <span id="fileName_attachment" ></span>
+                    <b><span id="baifenbi_attachment" ></span></b>
+                    <div class="progress">
+                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+                        </div>
+                    </div>
+                </div>
+                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+                <span id="attachment_title"></span>
+                <div class="layui-item layui-col-xs12 form-table-container">
+                    <table id="listAttachment" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                                <%-- <th>序号</th>--%>
+                            <th width="25%">文件</th>
+                            <th width="25%">上传人</th>
+                            <th width="25%">上传时间</th>
+                            <th width="150px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_attachment">
+                        <c:forEach items="${projectRecords.workAttachments}" var = "workClientAttachment" varStatus="status">
+                            <tr class="trIdAdds">
+                                    <%-- <td>${status.index + 1}</td>--%>
+                                <c:choose>
+                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                        <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                    </c:when>
+                                    <c:otherwise>
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%','1')">${workClientAttachment.attachmentName}</a></td>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','90%','90%')">${workClientAttachment.attachmentName}</a></td>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:otherwise>
+                                </c:choose>
+                                <td>${workClientAttachment.createBy.name}</td>
+                                <td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
+                                <td class="op-td">
+                                    <div class="op-btn-box" >
+                                        <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workClientAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                        <a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+                                    </div>
+                                </td>
+                            </tr>
+                        </c:forEach>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+
+            <div class="form-group layui-row page-end"></div>
+        </form:form>
+    </div>
+</div>
+<script type="text/javascript">
+    var workClientBankRowIdx = 0,
+        workClientBankTpl = $("#workClientBankTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, "");
+    $(document).ready(function () {
+        var dataBank = ${fns:toJson(projectRecords.projectPlanList)};
+        for (var i = 0; i < dataBank.length; i++) {
+            addRow('#projectPlanList', workClientBankRowIdx, workClientBankTpl, dataBank[i]);
+            workClientBankRowIdx = workClientBankRowIdx + 1;
+        }
+    });
+
+</script>
+</body>
+</html>

+ 303 - 0
src/main/webapp/webpage/modules/projectrecord/plan/projectPlanCostList.jsp

@@ -0,0 +1,303 @@
+<%@ 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" />
+	<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'
+, trigger: 'click'
+			});
+			laydate.render({
+				elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+				event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+				type : 'date'
+, trigger: 'click'
+			});
+		});
+
+		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) {
+				}
+			});
+		}
+	</script>
+	<style>
+		body{
+			background-color:transparent;
+			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+			color:#ffffff;
+			background-color:rgba(255,255,255,0);
+			height:100%;
+		}
+	</style>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+	<div class="layui-row">
+		<div class="full-width fl">
+			<div class="layui-row contentShadow shadowLR" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="ruralProjectRecords" action="${ctx}/project/projectPlanCost/" method="post" class="form-inline">
+					<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+					<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+					<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+					<div class="commonQuery lw6">
+							<div class="layui-item query athird">
+                                <label class="layui-form-label">项目编号:</label>
+                                <div class="layui-input-block with-icon">
+                                    <form:input path="projectId" htmlEscape="false" maxlength="64"  class=" form-control  layui-input"/>
+                                </div>
+                            </div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">项目名称:</label>
+							<div class="layui-input-block">
+								<form:input path="projectName" htmlEscape="false" maxlength="64"  class=" form-control  layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item athird">
+							<div class="input-group">
+								<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+								<button id="searchReset" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>
+								<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
+							</div>
+						</div>
+						<div style="    clear:both;"></div>
+					</div>
+					<div id="moresees" style="clear:both;display:none;" class="lw6">
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">项目负责人:</label>
+							<div class="layui-input-block">
+								<form:input path="leaderNameStr" htmlEscape="false" maxlength="255"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">合同名称:</label>
+							<div class="layui-input-block">
+								<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 class="layui-item query athird ">
+							<label class="layui-form-label">创建时间:</label>
+							<div class="layui-input-block">
+								<input id="beginDate" name="beginDate" placeholder="开始时间" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${projectRecords.beginDate}" pattern="yyyy-MM-dd"/>"/>
+								</input>
+								<span class="group-sep">-</span>
+								<input id="endDate" name="endDate" placeholder="结束时间" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${projectRecords.endDate}" pattern="yyyy-MM-dd"/>"/>
+								</input>
+							</div>
+						</div>
+
+						<div 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-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
+					<div style="clear: both;"></div>
+				</div>
+				<table class="oa-table layui-table" id="contentTable1"></table>
+				<table:page page="${page}"></table:page>
+				<div style="clear: both;"></div>
+			</div>
+		</div>
+	</div>
+	<div id="changewidth"></div>
+</div>
+
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+
+	layui.use('table', function(){
+		layui.table.render({
+			limit:${ page.pageSize }
+			,elem: '#contentTable1'
+			,page: false
+			,cols: [[
+				// {checkbox: true, fixed: true},
+				{field:'index',align:'center', title: '序号',width:40}
+				,{field:'projName',align:'center', title: '项目名称',minWidth:200,templet:function(d){
+						return "<a class=\"attention-info\" title=\"" + d.projName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/ruralProject/ruralProjectRecords/view?id=" + d.id +"','95%', '95%')\">" + d.projName + "</a>";
+					}}
+				,{field:'projId',align:'center', title: '项目编号',minWidth:150}
+				,{field:'contract', align:'center',title: '合同名称',minWidth:200,templet:function(d){
+						if(null == d.contract || '' == d.contract){
+							return "<span style=\"color:red\" title='无合同'>无合同</span>";
+						}else{
+							return "<span title='"+ d.contract +"'>" + d.contract + "</span>";
+						}
+					}}
+				,{field:'projMaster', align:'center',title: '负责人', width:65,templet:function(d){
+						return "<span title=\"" + d.projMaster + "\">" + d.projMaster + "</span>";
+					}}
+				,{field:'client',align:'center', title: '委托方',  width:150,templet:function(d){
+						return "<span title=\"" + d.client + "\">" + d.client + "</span>";
+					}}
+				,{field:'createDate',align:'center', title: '创建日期',  width:80}
+				,{field:'op',align:'center',title:"操作",width:130,templet:function(d){
+						////对操作进行初始化
+						var xml="";
+						if(d.canedit3 != undefined && d.canedit3 =="1")
+						{
+							xml+="<a href=\"javascript:void(0)\" onclick=\"openDialogView('查看项目计划信息', '${ctx}/project/projectPlanCost/form?view=view&id='+encodeURIComponent('" + d.id + "'),'95%','95%')\" style=\"color: white;background: darkseagreen\" class=\"op-btn op-btn-op-btn-revert\" ><i class=\"fa fa-search-plus\"></i> 详情</a>";
+						}
+						if(d.canedit4 != undefined && d.canedit4 =="1")
+						{
+							xml +="<a href=\"javascript:void(0)\" onclick=\"openDialog('编辑项目计划信息', '${ctx}/project/projectPlanCost/form?view=form&id='+encodeURIComponent('" + d.id + "'),'95%','95%','')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 编辑</a>";
+						}
+						return xml;
+
+					}}
+			]]
+			,data: [
+				<c:if test="${ not empty page.list}">
+				<c:forEach items="${page.list}" var="projectRecords" varStatus="index">
+				<c:if test="${index.index != 0}">,</c:if>
+				{
+					"index":"${index.index+1}"
+					,"id":"${projectRecords.id}"
+					,"projId":"${projectRecords.projectId}"
+					,"projName":"<c:out value="${projectRecords.projectName}" escapeXml="true"/>"
+					,"projMaster":"<c:forEach items="${projectRecords.projectLeaders}" var="leader" varStatus="status"><c:choose><c:when test="${status.last}">${leader.name}</c:when><c:otherwise>${leader.name},</c:otherwise></c:choose></c:forEach>"
+					,"contract":"${projectRecords.workContractInfo.name}"
+					,"client":"${projectRecords.workContractInfo.client.name}"
+					,"createDate":"<fmt:formatDate value="${projectRecords.createDate}" pattern="yyyy-MM-dd"/>"
+					,"projectStatus":"${projectRecords.projectStatus}"
+					,"procId":"${projectRecords.processInstanceId}"
+					<shiro:hasPermission name="project:projectPlanCost:edit">
+						,"canedit3":<c:choose><c:when test="${projectRecords.projectStatus == 5 && (fns:getUser().id == projectRecords.leaderIds || fns:getUser().id eq projectRecords.createBy.id)}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+						,"canedit4":<c:choose><c:when test="${projectRecords.projectStatus == 5 && (fns:getUser().id == projectRecords.leaderIds || fns:getUser().id eq projectRecords.createBy.id)}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+					</shiro:hasPermission>
+				}
+				</c:forEach>
+				</c:if>
+			]
+			// ,even: true
+			// ,height: 315
+		});
+	})
+
+	resizeListTable();
+	$("a").on("click",addLinkVisied);
+</script>
+<script>
+	resizeListWindow2();
+	$(window).resize(function(){
+		resizeListWindow2();
+	});
+</script>
+</body>
+</html>

+ 2 - 3
src/main/webapp/webpage/modules/projectrecord/plan/projectPlanForm.jsp

@@ -222,7 +222,6 @@
                                     <td class="hide">
                                         <input id="projectPlanList{{idx}}_id" name="projectPlanList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
                                         <input id="projectPlanList{{idx}}_delFlag" name="projectPlanList[{{idx}}].delFlag" type="hidden" value="0"/>
-                                        <input id="projectPlanList{{idx}}_remindId" name="projectPlanList[{{idx}}].remindId" type="hidden" value="{{row.remindId}}"/>
                                     </td>
 
                                     <td width="60px">
@@ -240,12 +239,12 @@
                                     </td>
 
                                     <td>
-                                        <sys:treeselecttPlanUser id="projectPlanList{{idx}}_remindName" name="remindName" value="${projectRecords.leaderIds}" labelName="projectPlanList[{{idx}}].remindName" labelValue="{{row.remindName}}"
+                                        <sys:inquireselectplanUser id="projectPlanList{{idx}}_remindName" name="projectPlanList[{{idx}}].remindId" value="{{row.remindId}}" labelName="projectPlanList[{{idx}}].remindName" labelValue="{{row.remindName}}"
                                          title="用户" url="/sys/office/treeDataByPlan?type=3&projectId=${projectRecords.id}" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
                                     </td>
 
                                     <td>
-                                        <sys:treeselecttPlanUser id="projectPlanList{{idx}}_finishName" name="projectPlanList[{{idx}}].finishId" value="{{row.finishId}}" labelName="projectPlanList[{{idx}}].finishName" labelValue="{{row.finishName}}"
+                                        <sys:inquireselectplanUser id="projectPlanList{{idx}}_finishName" name="projectPlanList[{{idx}}].finishId" value="{{row.finishId}}" labelName="projectPlanList[{{idx}}].finishName" labelValue="{{row.finishName}}"
                                          title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
                                     </td>