Browse Source

工程咨询、造价审核 项目列表模块

user5 4 years ago
parent
commit
81b3b9fc66
19 changed files with 4842 additions and 15 deletions
  1. 9 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/entity/ProjectReportRecord.java
  2. 14 6
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageService.java
  3. 647 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageController.java
  4. 85 5
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageController.java
  5. 8 0
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageDao.xml
  6. 266 0
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordForm.jsp
  7. 298 0
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordModify.jsp
  8. 189 0
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordView.jsp
  9. 390 0
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/projectRecordsMessageAudit.jsp
  10. 390 0
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/projectRecordsMessageModify.jsp
  11. 557 0
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/projectRecordsMessageView.jsp
  12. 630 0
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/reportForm.jsp
  13. 605 0
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/reportModify.jsp
  14. 277 0
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/reportView.jsp
  15. 470 0
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectMessageList.jsp
  16. 2 1
      src/main/webapp/webpage/modules/ruralprojectrecords/projectReportRecord/projectReportRecordForm.jsp
  17. 2 1
      src/main/webapp/webpage/modules/ruralprojectrecords/projectReportRecord/projectReportRecordModify.jsp
  18. 2 1
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/reportForm.jsp
  19. 1 1
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageList.jsp

+ 9 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/entity/ProjectReportRecord.java

@@ -50,6 +50,7 @@ public class ProjectReportRecord extends ActEntity<ProjectReportRecord> {
 	private String reportId;
 	private Date accomplishDate;  //归档完成时间
 	private String condition;    //判定条件
+	private String flag;    //判定条件
 
 	private Integer type;//(1:ProjectReportRecord  2:RuralProjectReportRecord)
 
@@ -330,4 +331,12 @@ public class ProjectReportRecord extends ActEntity<ProjectReportRecord> {
 	public void setCondition(String condition) {
 		this.condition = condition;
 	}
+
+	public String getFlag() {
+		return flag;
+	}
+
+	public void setFlag(String flag) {
+		this.flag = flag;
+	}
 }

+ 14 - 6
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageService.java

@@ -783,7 +783,20 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
             projectReportRecord.preInsert();
             insert = true;
         }
+        //将附件插入数据库
         saveWorkattachments(projectReportRecord);
+        //对数据进行插入数据库
+        if (insert) { //新增操作
+            this.insert(projectReportRecord);
+        }else {//修改操作
+            this.save(projectReportRecord);
+        }
+        //判断如果是暂存,则跳过流程操作
+        if("1".equals(projectReportRecord.getFlag())){
+            return "true";
+        }
+
+        //启动流程操作
         String title =  "报告名称:"+projectReportRecord.getReport().getName();
         String str = "归档申请编号:"+projectReportRecord.getRecordNum()+ ",主委托方:"+projectReportRecord.getClientName()+",申请人:"+user.getName()+",所属部门:"+UserUtils.getSelectOffice().getName();
         // 用来设置启动流程的人员ID,引擎会自动把用户ID保存到activiti:initiator中
@@ -792,7 +805,7 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
         String businessKey = projectReportRecord.getId().toString();
         Office office = UserUtils.getSelectOffice();
         WorkActivityMenu workActivityMenu = workActivityMenuService.findByParentAndOffice("5864872f45b84acd893010e66a3db2c8", office);
-        // 启动流程
+
         String processType = workActivityMenu.getProcessType();
         StringBuffer buffer = new StringBuffer();
         Activity activity = new Activity();
@@ -808,11 +821,6 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
                         ""
                 );
         List<User> users = new ArrayList<>();
-        if (insert) {
-            this.insert(projectReportRecord);
-        }else {
-            this.save(projectReportRecord);
-        }
         List<User> bggdglys = UserUtils.getByRoleActivityEnname("bggdgly",3,office.getId(),"10",projectReportRecord.getCreateBy());
         if (com.jeeplus.common.utils.StringUtils.isNotBlank(workActivityMenu.getId())) {
             workProjectNotify.setNotifyRole("");

+ 647 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageController.java

@@ -0,0 +1,647 @@
+package com.jeeplus.modules.ruralprojectrecords.web;
+
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.MyBeanUtils;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.act.entity.Act;
+import com.jeeplus.modules.act.service.ActTaskService;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportRecord;
+import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectReportChangeService;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectReportDataService;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectReportRecordService;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectcontentinfoService;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.projectrecord.service.ProjectRecordsService;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectcontentinfo;
+import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectMessageService;
+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.WorkClientLinkman;
+import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
+import org.activiti.engine.HistoryService;
+import org.activiti.engine.history.HistoricProcessInstance;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.task.Task;
+import org.apache.shiro.authz.annotation.Logical;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 造价审核项目列表Controller
+ * @author 徐滕
+ * @version 2020-04-15
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/ruralProject/ruralCostProjectMessage")
+public class RuralCostProjectMessageController extends BaseController {
+    @Autowired
+    private RuralProjectRecordsService projectRecordsService;
+    @Autowired
+    private ProjectRecordsService projectRecordsServices;
+    @Autowired
+    private RuralProjectMessageService ruralProjectMessageService;
+    @Autowired
+    private ProjectReportDataService projectReportDataService;
+    @Autowired
+    private ProjectcontentinfoService projectcontentinfoService;
+    @Autowired
+    private ProjectReportChangeService projectReportChangeService;
+    @Autowired
+    protected HistoryService historyService;
+    @Autowired
+    private ActTaskService actTaskService;
+    @Autowired
+    private ProjectReportRecordService projectReportRecordService;
+
+    @ModelAttribute
+    public RuralProjectRecords get(@RequestParam(required=false) String id) {
+        RuralProjectRecords entity = null;
+        if (StringUtils.isNotBlank(id)){
+            entity = projectRecordsService.get(id);
+        }
+        if (entity == null){
+            entity = new RuralProjectRecords();
+        }
+        return entity;
+    }
+
+    /**
+     * 项目列表页面
+     */
+    @RequiresPermissions("ruralProject:ruralCostProjectMessage:list")
+    @RequestMapping(value = {"list", ""})
+    public String list(RuralProjectRecords projectRecords, HttpServletRequest request, HttpServletResponse response, Model model) {
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
+        }
+        //添加查询类型(造价审核)
+        projectRecords.setProjectType("2");
+        Page<RuralProjectRecords> page = ruralProjectMessageService.findPage(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) {
+                projectRecordsService.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);
+                }
+            }
+        }
+        model.addAttribute("page", page);
+        return "modules/ruralprojectrecords/cost/ruralCostProjectMessageList";
+    }
+
+    /**
+     * 跳转新增报告页面
+     * @param projectcontentinfo
+     * @param request
+     * @param response
+     * @param model
+     * @param attr
+     * @return
+     */
+    @RequestMapping(value = {"form"})
+    public String form(RuralProjectcontentinfo projectcontentinfo, HttpServletRequest request, HttpServletResponse response, Model model, RedirectAttributes attr) {
+        Projectcontentinfo projectcontentinfo1 = projectcontentinfoService.getByProjectId(projectcontentinfo.getProjectId());
+        model.addAttribute("parentIds", projectcontentinfo1.getParentIds());
+        String dictType = projectcontentinfo.getDictType();
+        RuralProjectRecords records = projectRecordsService.getQueryProjectUsers(projectcontentinfo1.getProject().getId());
+        model.addAttribute("projectRecords", records);
+        projectcontentinfo.setProject(records);
+        ProjectReportData projectReportData = new ProjectReportData();
+        projectReportData.setType(dictType);
+        if (StringUtils.isNotBlank(projectcontentinfo1.getInfoId())){
+            projectReportData = projectReportDataService.get(projectcontentinfo1.getInfoId());
+        }else if (projectcontentinfo.getProjectReportData()!=null && StringUtils.isNotBlank(projectcontentinfo.getProjectReportData().getId())) {
+            projectReportData = projectReportDataService.get(projectcontentinfo.getProjectReportData().getId());
+        }else {
+            projectReportData.setNumber("");
+        }
+        if (projectReportData.getMaster()==null || StringUtils.isBlank(projectReportData.getMaster().getId())){
+            projectReportData.setMaster(UserUtils.getUser());
+        }
+        if (StringUtils.isBlank(projectReportData.getStatus())){
+            projectReportData.setFileStatus("1");
+        }
+        projectcontentinfo.setProjectReportData(projectReportData);
+        model.addAttribute("projectcontentinfo", projectcontentinfo);
+        if (projectReportData != null && projectReportData.getCreateBy() != null && StringUtils.isNotBlank(projectReportData.getCreateBy().getId()) && projectReportData.getCreateBy().getId().equals(UserUtils.getUser().getId())) {
+            return "modules/ruralprojectrecords/cost/projectcontentinfo/reportForm";
+        } else if (projectReportData == null || StringUtils.isBlank(projectReportData.getId())) {
+            return "modules/ruralprojectrecords/cost/projectcontentinfo/reportForm";
+        } else {
+            return "modules/ruralprojectrecords/cost/projectcontentinfo/reportView";
+        }
+    }
+
+    /**
+     * 编辑项目表单页面
+     */
+    @RequiresPermissions(value={"ruralProject:ruralCostProjectMessage:edit"},logical= Logical.OR)
+    @RequestMapping(value = "modify")
+    public String modify(RuralProjectcontentinfo projectcontentinfo,Integer status, Model model, RedirectAttributes redirectAttributes) {
+        System.out.println(status);
+        Projectcontentinfo projectcontentinfo1 = projectcontentinfoService.getByProjectId(projectcontentinfo.getProjectId());
+        ProjectReportData projectReportData = projectReportDataService.getOnRural(projectcontentinfo1.getInfoId());
+        Projectcontentinfo projectcontent = projectcontentinfoService.getByInfoId(projectReportData.getId());
+        projectcontent.setProjectReportData(projectReportData);
+        model.addAttribute("processInstanceId",projectReportData.getProcessInstanceId());
+        model.addAttribute("projectId", projectcontentinfo1.getProject().getId());
+        model.addAttribute("id", projectcontentinfo.getId());
+        model.addAttribute("projectcontentinfo", projectcontent);
+        if (StringUtils.isNotBlank(projectcontentinfo.getView()) && projectcontentinfo.getView().contains("view")) {
+            List<MainDictDetail> achievementTypes = DictUtils.getMainDictList("achievement_type");
+            if(null != achievementTypes){
+                for (MainDictDetail achievementType:achievementTypes) {
+                    if(achievementType.getValue().equals(projectReportData.getAchievementType())){
+                        projectReportData.setAchievementType(achievementType.getLabel());
+                        break;
+                    }
+                }
+            }
+            return "modules/ruralprojectrecords/cost/projectcontentinfo/reportView";
+        }
+        if (StringUtils.isNotBlank(projectcontentinfo.getView()) && projectcontentinfo.getView().contains("report")) {
+            if(StringUtils.isNotBlank(projectReportData.getProcessInstanceId())){
+                Act act = getByAct(projectReportData.getProcessInstanceId());
+                projectReportData.setAct(act);
+            }
+            return "modules/ruralprojectrecords/cost/projectcontentinfo/reportModify";
+        }
+        return "modules/ruralprojectrecords/cost/projectcontentinfo/reportForm";
+    }
+
+    /**
+     * 新增报告信息
+     * @param projectcontentinfo
+     * @param model
+     * @param redirectAttributes
+     * @return
+     */
+    @RequestMapping(value = {"saveReport"})
+    public String saveReport(Projectcontentinfo projectcontentinfo, Model model,RedirectAttributes redirectAttributes)  {
+        try{
+            String str = ruralProjectMessageService.saveData(projectcontentinfo,2);
+            addMessage(redirectAttributes, "发起报告审批"+(str.equals("true")?"成功":"失败"));
+            ProjectReportData projectReportData = projectcontentinfo.getProjectReportData();
+            if (projectReportData!=null){
+                if (StringUtils.isNotBlank(projectcontentinfo.getEdit()) && projectcontentinfo.getEdit().equals("edit")){
+                    return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralCostProjectMessage/?repage";
+                }
+                return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralCostProjectMessage/?repage";
+            }
+        }catch (Exception e){
+            logger.error("ProjectcontentinfoController save Exception e"+e);
+        }
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
+        }
+        addMessage(redirectAttributes, "发起报告审批失败");
+        ProjectRecords projectRecords = projectcontentinfo.getProject()==null?new ProjectRecords():projectcontentinfo.getProject();
+        return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralCostProjectMessage/?repage";
+    }
+
+
+
+    /**
+     * 暂存报告信息
+     * @param projectcontentinfo
+     * @param model
+     * @param redirectAttributes
+     * @return
+     */
+    @RequestMapping(value = {"holdSaveReport"})
+    public String holdSaveReport(Projectcontentinfo projectcontentinfo, Model model,RedirectAttributes redirectAttributes)  {
+        try{
+            String str = ruralProjectMessageService.saveData(projectcontentinfo,1);
+            addMessage(redirectAttributes, "暂存报告"+(str.equals("true")?"成功":"失败"));
+            ProjectReportData projectReportData = projectcontentinfo.getProjectReportData();
+            if (projectReportData!=null){
+                if (StringUtils.isNotBlank(projectcontentinfo.getEdit()) && projectcontentinfo.getEdit().equals("edit")){
+                    return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralCostProjectMessage/?repage";
+                }
+                return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralCostProjectMessage/?repage";
+            }
+        }catch (Exception e){
+            logger.error("ProjectcontentinfoController save Exception e"+e);
+        }
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
+        }
+        addMessage(redirectAttributes, "暂存报告失败");
+        ProjectRecords projectRecords = projectcontentinfo.getProject()==null?new ProjectRecords():projectcontentinfo.getProject();
+        return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralCostProjectMessage/?repage";
+    }
+
+    /**
+     * 读取单个实体流程
+     * @return
+     */
+    @RequestMapping(value = "getProcessOne")
+    public String getProcessOne(Projectcontentinfo projectcontentinfo,String type,Model model) {
+        ProjectReportData projectReportDataInfo = ruralProjectMessageService.getProjectReportDateByProjectId(projectcontentinfo.getId());
+        projectcontentinfo.setProjectReportData(projectReportDataInfo);
+        if ("2".equals(type)){          //审批中流程
+            ProjectReportData projectReportData = projectReportDataService.get(projectcontentinfo.getProjectReportData().getId());
+            model.addAttribute("processInstanceId", projectReportData.getProcessInstanceId());
+        }else if("3".equals(type)){     //变更中流程
+            ProjectReportData projectReportData = projectReportChangeService.get(projectcontentinfo.getProjectReportData().getId());
+            model.addAttribute("processInstanceId", projectReportData.getProcessInstanceId());
+        } else if("8".equals(type)){         //变更中流程
+            ProjectReportData projectReportData = projectReportDataService.get(projectcontentinfo.getProjectReportData().getId());
+            model.addAttribute("processInstanceId", projectReportData.getUpId());
+        }else if("6".equals(type) || "7".equals(type)){      //作废流程
+            ProjectReportData projectReportData = projectReportDataService.get(projectcontentinfo.getProjectReportData().getId());
+            model.addAttribute("processInstanceId", projectReportData.getInvalidProcessInstanceId());
+        }else if("5".equals(type)){
+            ProjectReportData projectReportData = projectReportDataService.get(projectcontentinfo.getProjectReportData().getId());
+            if(projectReportData.getUpId() != null){
+                model.addAttribute("processInstanceId", projectReportData.getUpId());
+            }else {
+                model.addAttribute("processInstanceId", projectReportData.getProcessInstanceId());
+            }
+        }
+        return "modules/workreimbursement/workReimbursementTrack";
+    }
+
+    //报告流程审批
+    @RequestMapping(value = {"reportAudit"})
+    public String reportAudit(Projectcontentinfo projectcontentinfo, HttpServletRequest request, HttpServletResponse response, Model model,
+                              RedirectAttributes redirectAttributes) throws Exception {
+        ProjectReportData projectReportData = projectcontentinfo.getProjectReportData();
+        if(StringUtils.isNotBlank(projectReportData.getProcessInstanceId())){
+            Act act = getByAct(projectReportData.getProcessInstanceId());
+            projectReportData.setAct(act);
+        }
+        ProjectReportData t = projectReportDataService.getOnRural(projectReportData.getId());//从数据库取出记录的值
+        try {
+            MyBeanUtils.copyBeanNotNull2Bean(projectReportData, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+            if(StringUtils.isNotBlank(t.getProcessInstanceId())){
+                Act act = getByAct(t.getProcessInstanceId());
+                MyBeanUtils.copyBeanNotNull2Bean(projectReportData.getAct(), act);
+                t.setAct(act);
+                projectcontentinfo.setProjectReportData(t);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        String taskDefKey =  t.getAct().getTaskDefKey();
+        List<User> users = null;
+        ProjectRecords projectRecord = projectRecordsServices.getRuralMasters(projectcontentinfo.getProject().getId());
+        projectReportData.setProject(projectRecord);
+        if ("master".equals(taskDefKey)){
+            users = UserUtils.getByProssType(t.getProcessInstanceId(),2);
+            if (users==null )
+                users = UserUtils.getByRoleActivityEnname("bzshb",3,t.getOfficeId(),"12",t.getCreateBy());
+        }else if ("bzshb".equals(taskDefKey)){
+            users = UserUtils.getByProssType(t.getProcessInstanceId(),5);
+            if (users==null )
+                users = UserUtils.getByRoleActivityEnname("gzr",3,t.getOfficeId(),"12",t.getCreateBy());
+        }else if ("gzr".equals(taskDefKey)){
+            users = UserUtils.getByProssType(t.getProcessInstanceId(),5);
+            if (users==null )
+                users = UserUtils.getByRoleActivityEnname("gzr",3,t.getOfficeId(),"12",t.getCreateBy());
+        }else if ("modifyApply".equals(taskDefKey)){
+            users = UserUtils.getByProssType(t.getProcessInstanceId(),1);
+        }
+        String flag = t.getAct().getFlag();
+        if ("yes".equals(flag) && (users==null || users.size()==0)){
+            addMessage(redirectAttributes, "审批失败,审批人为空,请联系管理员!");
+        }else {
+            if ("modifyApply".equals(taskDefKey)){
+                ruralProjectMessageService.saveData(projectcontentinfo,3);
+            }
+            String str = ruralProjectMessageService.auditSave(t, users);
+            addMessage(redirectAttributes, str);
+        }
+        if (StringUtils.isNotBlank(projectcontentinfo.getHome()) && projectcontentinfo.getHome().equals("home")){
+            return "redirect:" + Global.getAdminPath() + "/home/?repage";
+        }else {
+            if (StringUtils.isNotBlank(projectcontentinfo.getEdit()) && projectcontentinfo.getEdit().equals("edit")){
+                return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralCostProjectMessage/?repage";
+            }
+            return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralCostProjectMessage/?repage";
+        }
+
+    }
+
+    @RequestMapping(value = "revoke")
+    public String revoke(HttpServletRequest request, RedirectAttributes redirectAttributes) throws Exception {
+        HashMap<String, String> requestMap = findRequestMap(request);
+        String processInstanceId = requestMap.get("processInstanceId");
+        String id = requestMap.get("id");
+        /*try {*/
+            RuralProjectRecords projectRecords = ruralProjectMessageService.get(id);
+            if(5==projectRecords.getProjectReportStatus()){
+                addMessage(redirectAttributes, "项目报告已审批通过,无法撤回");
+                return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralCostProjectMessage/?repage";
+            }
+        ProjectReportData projectReportDateByProjectId = ruralProjectMessageService.getProjectReportDateByProjectId(projectRecords.getId());
+        ruralProjectMessageService.cancelInvalidate(projectReportDateByProjectId);
+            addMessage(redirectAttributes, "撤回该项目报告成功");
+        /*}catch (Exception e){
+            logger.info(e.getMessage());
+            addMessage(redirectAttributes, "撤回该项目报告失败");
+        }*/
+        return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralCostProjectMessage/?repage";
+    }
+
+
+
+    public Act getByAct(String processInstanceId){
+        Act act = new Act();
+        HistoricProcessInstance historicProcessInstance = historyService.createHistoricProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
+        ProcessInstance processInstance = actTaskService.getProcIns(processInstanceId);
+        if (processInstance!=null) {
+            List<Task> taskList = actTaskService.getCurrentTaskList(processInstance);
+            if(taskList!=null && taskList.size()>1){
+                for (Task taskInfok:taskList) {
+                    if (taskInfok.getAssignee().equals(UserUtils.getUser().getId())) {
+                        act.setTaskId(taskInfok.getId());
+                        act.setTaskName(taskInfok.getName());
+                        act.setTaskDefKey(taskInfok.getTaskDefinitionKey());
+                        act.setProcDefId(taskInfok.getProcessDefinitionId());
+                        act.setProcInsId(taskInfok.getProcessInstanceId());
+                        act.setTask(taskInfok);
+                    }
+                }
+            }else {
+                Task task = actTaskService.getCurrentTaskInfo(processInstance);
+                act.setTaskId(task.getId());
+                act.setTaskName(task.getName());
+                act.setTaskDefKey(task.getTaskDefinitionKey());
+                act.setProcDefId(task.getProcessDefinitionId());
+                act.setProcInsId(task.getProcessInstanceId());
+                act.setTask(task);
+            }
+        }
+        return  act;
+    }
+
+
+
+
+    /**
+     * 根据信息获取归档信息并调转页面
+     */
+    @RequestMapping(value = "formRecord")
+    public String form(ProjectReportRecord projectReportRecord, Model model) throws Exception {
+        if (StringUtils.isBlank(projectReportRecord.getView()) || !projectReportRecord.getView().equals("view")){
+            if(StringUtils.isBlank(projectReportRecord.getId())){
+                projectReportRecord.setCreateDate(new Date());
+                projectReportRecord.setCreateBy(UserUtils.getUser());
+            }
+        }
+        ProjectReportData projectReportData = new ProjectReportData();
+        ProjectRecords projectRecords = new ProjectRecords();
+        projectReportData.setFileStatus("1");
+        ProjectReportData reportData = ruralProjectMessageService.getProjectReportDateByProjectId(projectReportRecord.getReportId());
+        if(null != reportData){
+            if (StringUtils.isBlank(projectReportRecord.getView()) || !projectReportRecord.getView().equals("view")){
+                int count = projectReportRecordService.getNumber(reportData.getId());
+                projectReportRecord.setRecordNum(count>9?reportData.getNumber()+"-"+count+"":reportData.getNumber()+"-"+"0"+count);
+            }else{
+                ProjectReportRecord projectReportRecordInfo =ruralProjectMessageService.getProjectReportRecord(reportData.getId());
+                MyBeanUtils.copyBeanNotNull2Bean(projectReportRecordInfo, projectReportRecord);
+            }
+        }
+        //获取项目信息
+        RuralProjectRecords ruralProjectRecords = projectRecordsService.get(projectReportRecord.getReportId());
+        MyBeanUtils.copyBeanNotNull2Bean(ruralProjectRecords, projectRecords);
+        //获取合同信息
+        WorkContractInfo projectContractInfo = ruralProjectMessageService.getProjectContractInfo(projectRecords.getWorkContractInfo().getId());
+        projectRecords.setWorkContractInfo(projectContractInfo);
+        reportData.setProject(projectRecords);
+        projectReportRecord.setReport(reportData);
+        model.addAttribute("projectReportRecord", projectReportRecord);
+        if(null != projectContractInfo){
+            if(null != projectContractInfo.getWorkClientInfoList()){
+                model.addAttribute("workClientInfoName", projectContractInfo.getWorkClientInfoList().get(0).getName());
+            }
+        }
+        if (StringUtils.isNotBlank(projectReportRecord.getView()) && projectReportRecord.getView().equals("view")){
+            return "modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordView";
+        }else if (StringUtils.isNotBlank(projectReportRecord.getView()) && projectReportRecord.getView().equals("modiftApply")){
+            ProcessInstance processInstance = actTaskService.getProcIns(projectReportRecord.getProcessInstanceId());
+            if (processInstance!=null) {
+                Task taskInfok = actTaskService.getCurrentTaskInfo(processInstance);
+                Act act = new Act();
+                act.setTaskId(taskInfok.getId());
+                act.setTaskName(taskInfok.getName());
+                act.setProcDefId(taskInfok.getProcessDefinitionId());
+                act.setTaskDefKey(taskInfok.getTaskDefinitionKey());
+                act.setProcInsId(taskInfok.getProcessInstanceId());
+                act.setTask(taskInfok);
+                projectReportRecord.setAct(act);
+            }
+            return "modules/projectcontentinfo/projectReportRecordModiftApply";
+        }
+        return "modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordForm";
+    }
+
+    /**
+     * 查看,增加,编辑报告归档表单页面
+     */
+    @RequestMapping(value = "formRecordModify")
+    public String formRecordModify(ProjectReportRecord projectReportRecord, Model model) {
+        projectReportRecord = projectReportRecordService.get(projectReportRecord.getId());
+        if(StringUtils.isBlank(projectReportRecord.getId())){
+            projectReportRecord.setCreateDate(new Date());
+            projectReportRecord.setCreateBy(UserUtils.getUser());
+        }
+        projectReportRecord.setView("modify");
+        model.addAttribute("projectReportRecord", projectReportRecord);
+        if (StringUtils.isNotBlank(projectReportRecord.getView()) && projectReportRecord.getView().equals("view")){
+            return "modules/ruralprojectrecords/projectReportRecord/projectReportRecordView";
+        }else if (StringUtils.isNotBlank(projectReportRecord.getView()) && projectReportRecord.getView().equals("modiftApply")){
+            ProcessInstance processInstance = actTaskService.getProcIns(projectReportRecord.getProcessInstanceId());
+            if (processInstance!=null) {
+                Task taskInfok = actTaskService.getCurrentTaskInfo(processInstance);
+                Act act = new Act();
+                act.setTaskId(taskInfok.getId());
+                act.setTaskName(taskInfok.getName());
+                act.setProcDefId(taskInfok.getProcessDefinitionId());
+                act.setTaskDefKey(taskInfok.getTaskDefinitionKey());
+                act.setProcInsId(taskInfok.getProcessInstanceId());
+                act.setTask(taskInfok);
+                projectReportRecord.setAct(act);
+            }
+            return "modules/projectcontentinfo/projectReportRecordModiftApply";
+        }
+        return "modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordModify";
+    }
+
+
+
+
+    /**
+     * 保存报告归档
+     */
+    @RequestMapping(value = "saveRecord")
+    public String save(ProjectReportRecord projectReportRecord, Model model, RedirectAttributes redirectAttributes) throws Exception{
+        if (!beanValidator(model, projectReportRecord)){
+            return form(projectReportRecord, model);
+        }
+        try {
+            //获取创建者信息
+            User user = projectReportRecord.getCreateBy();
+            String sta = projectReportRecord.getStatus();
+            if(user!=null && !UserUtils.getUser().getId().equals(user.getId()) && StringUtils.isNotBlank(user.getId())){
+                addMessage(redirectAttributes, "您不是申请人,无法修改");
+                return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralCostProjectMessage/?repage";
+            }
+            //状态设置为审核中
+            projectReportRecord.setStatus("2");
+            String processInstanceId ="";
+            if (user!=null && StringUtils.isNotBlank(user.getId()) && StringUtils.isNotBlank(sta) && "3".equals(sta)){
+                processInstanceId = projectReportRecordService.get(projectReportRecord.getId()).getProcessInstanceId();
+            }
+            Map<String, Object> variables = new HashMap<>();
+            if(!projectReportRecord.getIsNewRecord()){//编辑表单保存
+                ProjectReportRecord t = projectReportRecordService.get(projectReportRecord.getId());//从数据库取出记录的值
+                MyBeanUtils.copyBeanNotNull2Bean(projectReportRecord,t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+                if (StringUtils.isNotBlank(projectReportRecord.getView()) && projectReportRecord.getView().equals("modify")){
+                    projectReportRecord.setStatus("2");
+                }
+                ruralProjectMessageService.saveProjectReportRecord(t,variables,processInstanceId);//保存
+            }else {//新增表单保存
+                ruralProjectMessageService.saveProjectReportRecord(projectReportRecord,variables,processInstanceId);//保存
+            }
+            addMessage(redirectAttributes, "保存报告归档成功");
+        }catch (Exception e){
+            addMessage(redirectAttributes, "保存报告归档失败");
+        }
+        return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralCostProjectMessage/?repage";
+    }
+
+
+    /**
+     * 暂存报告归档
+     * @param projectReportRecord
+     * @param model
+     * @param redirectAttributes
+     * @return
+     * @throws Exception
+     */
+    @RequestMapping(value = "holdSaveRecord")
+    public String holdSaveRecord(ProjectReportRecord projectReportRecord, Model model, RedirectAttributes redirectAttributes) throws Exception{
+        if (!beanValidator(model, projectReportRecord)){
+            return form(projectReportRecord, model);
+        }
+        try {
+            //获取创建者信息
+            User user = projectReportRecord.getCreateBy();
+            String sta = projectReportRecord.getStatus();
+            if(user!=null && !UserUtils.getUser().getId().equals(user.getId()) && StringUtils.isNotBlank(user.getId())){
+                addMessage(redirectAttributes, "您不是申请人,无法修改");
+                return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralCostProjectMessage/?repage";
+            }
+            //添加暂存判定
+            projectReportRecord.setFlag("1");
+            //将状态改为暂存状态
+            projectReportRecord.setStatus("1");
+            String processInstanceId ="";
+            if (user!=null && StringUtils.isNotBlank(user.getId()) && StringUtils.isNotBlank(sta) && "3".equals(sta)){
+                processInstanceId = projectReportRecordService.get(projectReportRecord.getId()).getProcessInstanceId();
+            }
+            Map<String, Object> variables = new HashMap<>();
+            if(!projectReportRecord.getIsNewRecord()){//编辑表单保存
+                ProjectReportRecord t = projectReportRecordService.get(projectReportRecord.getId());//从数据库取出记录的值
+                MyBeanUtils.copyBeanNotNull2Bean(projectReportRecord,t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+                if (StringUtils.isNotBlank(projectReportRecord.getView()) && projectReportRecord.getView().equals("modify")){
+                    projectReportRecord.setStatus("1");
+                }
+                ruralProjectMessageService.saveProjectReportRecord(t,variables,processInstanceId);//保存
+            }else {//新增表单保存
+                ruralProjectMessageService.saveProjectReportRecord(projectReportRecord,variables,processInstanceId);//保存
+            }
+            addMessage(redirectAttributes, "保存报告归档暂存成功");
+        }catch (Exception e){
+            addMessage(redirectAttributes, "保存报告归档暂存失败");
+        }
+        return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralCostProjectMessage/?repage";
+    }
+
+    /**
+     * 读取单个实体流程
+     * @return
+     */
+    @RequestMapping(value = "getReportRecordProcessOne")
+    public String getReportRecordProcessOne(ProjectReportRecord projectReportRecord,Model model) {
+        model.addAttribute("processInstanceId", projectReportRecord.getProcessInstanceId());
+        return "modules/workreimbursement/workReimbursementTrack";
+    }
+
+    //报告流程审批
+    @RequestMapping(value = {"auditProjectReportRecordSave"})
+    public String auditProjectReportRecordSave(ProjectReportRecord projectReportRecord, HttpServletRequest request, HttpServletResponse response, Model model,
+                            RedirectAttributes redirectAttributes) {
+        try {
+            // 对不同环节的业务逻辑进行操作
+            List<User> users = UserUtils.getByProssType(projectReportRecord.getProcessInstanceId(),1);
+            String flag = projectReportRecord.getAct().getFlag();
+            if ("yes".equals(flag) && (users==null || users.size()==0)){
+                addMessage(redirectAttributes, "审批失败,审批人为空,请联系管理员!");
+            }else {
+                String str = projectReportRecordService.auditSave(projectReportRecord,users);
+                addMessage(redirectAttributes, str);
+            }
+        }catch (Exception e){
+            logger.error("Exception e:"+e);
+            addMessage(redirectAttributes, "报告归档流程审批失败");
+        }
+        if (StringUtils.isNotBlank(projectReportRecord.getHome()) && projectReportRecord.getHome().equals("home")){
+            return "redirect:" + Global.getAdminPath() + "/home/?repage";
+        }else {
+            //报告变更
+            Page<ProjectReportRecord> page = projectReportRecordService.findPage(new Page<ProjectReportRecord>(request, response), projectReportRecord);
+            model.addAttribute("page", page);
+            return "modules/projectcontentinfo/projectReportRecordList";
+        }
+    }
+
+    /**
+     * 报告归档:强制撤回
+     */
+    @RequestMapping("cancelInvalidate")
+    public String cancelInvalidate(ProjectReportRecord projectReportRecord,RedirectAttributes redirectAttributes){
+        projectReportRecord = projectReportRecordService.get(projectReportRecord.getId());
+        try {
+            if(projectReportRecord.getStatus().equals("5")){
+                addMessage(redirectAttributes, "报告归档已审批通过,无法撤回");
+            }else{
+                ruralProjectMessageService.cancelInvalidate(projectReportRecord);
+                addMessage(redirectAttributes, "强制撤回报告归档成功");
+            }
+        }catch (Exception e){
+            addMessage(redirectAttributes, "强制撤回报告归档失败");
+        }
+        return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralCostProjectMessage/?repage";
+    }
+
+}

+ 85 - 5
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageController.java

@@ -95,6 +95,8 @@ public class RuralProjectMessageController extends BaseController {
         if(UserUtils.isManager()){
             model.addAttribute("flag","1");
         }
+        //添加查询类型(工程咨询)
+        projectRecords.setProjectType("1");
         Page<RuralProjectRecords> page = ruralProjectMessageService.findPage(new Page<RuralProjectRecords>(request, response), projectRecords);
         //无合同状态下,获取委托方的名称
         List<RuralProjectRecords> list = page.getList();
@@ -133,8 +135,8 @@ public class RuralProjectMessageController extends BaseController {
         projectcontentinfo.setProject(records);
         ProjectReportData projectReportData = new ProjectReportData();
         projectReportData.setType(dictType);
-        if (StringUtils.isNotBlank(projectcontentinfo.getInfoId())){
-            projectReportData = projectReportDataService.get(projectcontentinfo.getInfoId());
+        if (StringUtils.isNotBlank(projectcontentinfo1.getInfoId())){
+            projectReportData = projectReportDataService.get(projectcontentinfo1.getInfoId());
         }else if (projectcontentinfo.getProjectReportData()!=null && StringUtils.isNotBlank(projectcontentinfo.getProjectReportData().getId())) {
             projectReportData = projectReportDataService.get(projectcontentinfo.getProjectReportData().getId());
         }else {
@@ -225,6 +227,36 @@ public class RuralProjectMessageController extends BaseController {
     }
 
     /**
+     * 暂存报告信息
+     * @param projectcontentinfo
+     * @param model
+     * @param redirectAttributes
+     * @return
+     */
+    @RequestMapping(value = {"holdSaveReport"})
+    public String holdSaveReport(Projectcontentinfo projectcontentinfo, Model model,RedirectAttributes redirectAttributes)  {
+        try{
+            String str = ruralProjectMessageService.saveData(projectcontentinfo,1);
+            addMessage(redirectAttributes, "暂存报告"+(str.equals("true")?"成功":"失败"));
+            ProjectReportData projectReportData = projectcontentinfo.getProjectReportData();
+            if (projectReportData!=null){
+                if (StringUtils.isNotBlank(projectcontentinfo.getEdit()) && projectcontentinfo.getEdit().equals("edit")){
+                    return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralCostProjectMessage/?repage";
+                }
+                return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralCostProjectMessage/?repage";
+            }
+        }catch (Exception e){
+            logger.error("ProjectcontentinfoController save Exception e"+e);
+        }
+        if(UserUtils.isManager()){
+            model.addAttribute("flag","1");
+        }
+        addMessage(redirectAttributes, "暂存报告失败");
+        ProjectRecords projectRecords = projectcontentinfo.getProject()==null?new ProjectRecords():projectcontentinfo.getProject();
+        return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralCostProjectMessage/?repage";
+    }
+
+    /**
      * 读取单个实体流程
      * @return
      */
@@ -441,6 +473,7 @@ public class RuralProjectMessageController extends BaseController {
             projectReportRecord.setCreateBy(UserUtils.getUser());
         }
         projectReportRecord.setView("modify");
+
         model.addAttribute("projectReportRecord", projectReportRecord);
         if (StringUtils.isNotBlank(projectReportRecord.getView()) && projectReportRecord.getView().equals("view")){
             return "modules/ruralprojectrecords/projectReportRecord/projectReportRecordView";
@@ -478,7 +511,7 @@ public class RuralProjectMessageController extends BaseController {
             String sta = projectReportRecord.getStatus();
             if(user!=null && !UserUtils.getUser().getId().equals(user.getId()) && StringUtils.isNotBlank(user.getId())){
                 addMessage(redirectAttributes, "您不是申请人,无法修改");
-                return "redirect:"+Global.getAdminPath()+"/workreimbursement/workReimbursement/?repage";
+                return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralProjectMessage/?repage";
             }
             //状态设置为审核中
             projectReportRecord.setStatus("2");
@@ -489,11 +522,11 @@ public class RuralProjectMessageController extends BaseController {
             Map<String, Object> variables = new HashMap<>();
             if(!projectReportRecord.getIsNewRecord()){//编辑表单保存
                 ProjectReportRecord t = projectReportRecordService.get(projectReportRecord.getId());//从数据库取出记录的值
-                MyBeanUtils.copyBeanNotNull2Bean(t,projectReportRecord);//将编辑表单中的非NULL值覆盖数据库记录中的值
+                MyBeanUtils.copyBeanNotNull2Bean(projectReportRecord,t);//将编辑表单中的非NULL值覆盖数据库记录中的值
                 if (StringUtils.isNotBlank(projectReportRecord.getView()) && projectReportRecord.getView().equals("modify")){
                     projectReportRecord.setStatus("2");
                 }
-                ruralProjectMessageService.saveProjectReportRecord(projectReportRecord,variables,processInstanceId);//保存
+                ruralProjectMessageService.saveProjectReportRecord(t,variables,processInstanceId);//保存
             }else {//新增表单保存
                 ruralProjectMessageService.saveProjectReportRecord(projectReportRecord,variables,processInstanceId);//保存
             }
@@ -505,6 +538,53 @@ public class RuralProjectMessageController extends BaseController {
     }
 
     /**
+     * 暂存报告归档
+     * @param projectReportRecord
+     * @param model
+     * @param redirectAttributes
+     * @return
+     * @throws Exception
+     */
+    @RequestMapping(value = "holdSaveRecord")
+    public String holdSaveRecord(ProjectReportRecord projectReportRecord, Model model, RedirectAttributes redirectAttributes) throws Exception{
+        if (!beanValidator(model, projectReportRecord)){
+            return form(projectReportRecord, model);
+        }
+        try {
+            //获取创建者信息
+            User user = projectReportRecord.getCreateBy();
+            String sta = projectReportRecord.getStatus();
+            if(user!=null && !UserUtils.getUser().getId().equals(user.getId()) && StringUtils.isNotBlank(user.getId())){
+                addMessage(redirectAttributes, "您不是申请人,无法修改");
+                return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralProjectMessage/?repage";
+            }
+            //添加暂存判定
+            projectReportRecord.setFlag("1");
+            //将状态改为暂存状态
+            projectReportRecord.setStatus("1");
+            String processInstanceId ="";
+            if (user!=null && StringUtils.isNotBlank(user.getId()) && StringUtils.isNotBlank(sta) && "3".equals(sta)){
+                processInstanceId = projectReportRecordService.get(projectReportRecord.getId()).getProcessInstanceId();
+            }
+            Map<String, Object> variables = new HashMap<>();
+            if(!projectReportRecord.getIsNewRecord()){//编辑表单保存
+                ProjectReportRecord t = projectReportRecordService.get(projectReportRecord.getId());//从数据库取出记录的值
+                MyBeanUtils.copyBeanNotNull2Bean(projectReportRecord,t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+                if (StringUtils.isNotBlank(projectReportRecord.getView()) && projectReportRecord.getView().equals("modify")){
+                    projectReportRecord.setStatus("1");
+                }
+                ruralProjectMessageService.saveProjectReportRecord(t,variables,processInstanceId);//保存
+            }else {//新增表单保存
+                ruralProjectMessageService.saveProjectReportRecord(projectReportRecord,variables,processInstanceId);//保存
+            }
+            addMessage(redirectAttributes, "保存报告归档暂存成功");
+        }catch (Exception e){
+            addMessage(redirectAttributes, "保存报告归档暂存失败");
+        }
+        return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralProjectMessage/?repage";
+    }
+
+    /**
      * 读取单个实体流程
      * @return
      */

+ 8 - 0
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageDao.xml

@@ -296,6 +296,10 @@
 				AND prr.status = #{projectReportRecordStatus}
 			</if>
 
+			<if test="projectType != null and projectType != ''">
+				AND a.project_type = #{projectType}
+			</if>
+
 
             AND  a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
             <if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
@@ -393,6 +397,10 @@
 			<if test="projectReportRecordStatus != null and projectReportRecordStatus != ''">
 				AND prr.status = #{projectReportRecordStatus}
 			</if>
+
+			<if test="projectType != null and projectType != ''">
+				AND a.project_type = #{projectType}
+			</if>
             AND  a.status != 7 AND a.del_flag = #{DEL_FLAG_NORMAL}
             <if test="sqlMap.dsf !=null and sqlMap.dsf!=''">
                 AND ((w1.user_id = #{currentUser.id} AND w1.del_flag='0' AND a.company_id = #{currentUser.company.id})${sqlMap.dsf} )

+ 266 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordForm.jsp

@@ -0,0 +1,266 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>合同归档管理</title>
+	<meta name="decorator" content="default"/>
+	<style>
+		label.error:nth-child(2){
+			top:40px;
+			left:0;
+		}
+	</style>
+	<script type="text/javascript">
+        var validateForm;
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(obj == 2){
+                    //$("#inputForm").attr("action","${ctx}/projectcontentinfo/projectReportRecord/store");
+					$("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessage/holdSaveRecord");
+                }else{
+                    $("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessage/saveRecord");
+                }
+                $("#inputForm").submit();
+                return true;
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            return false;
+
+        }
+        $(document).ready(function() {
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+
+        });
+        function insertTitle(tValue){
+            var list = "${projectReportRecord.workAttachments}";
+            var size = (list.split('url')).length-1;
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "99";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workContractRd/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
+        }
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="projectReportRecord" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<form:hidden path="numberCount"/>
+			<form:hidden id="reportId" path="report.id"/>
+
+			<div class="form-group layui-row first lw12">
+				<div class="form-group-label"><h2>基本信息</h2></div>
+
+
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>报告编号:</label>
+					<div class="layui-input-block">
+						<form:input id="reportNumber" path="report.number" htmlEscape="false"   readonly="true" class="form-control layui-input required"/>
+					</div>
+				</div>
+
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>归档申请编号:</label>
+					<div class="layui-input-block">
+						<input id="recordNum" name="recordNum"  htmlEscape="false" readonly="true" class="form-control  layui-input required" value="${projectReportRecord.recordNum}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>签字造价师一:</label>
+					<div class="layui-input-block with-icon">
+						<sys:treeselect id="signCostOne" name="signCostOne.id" value="${projectReportRecord.signCostOne.id}" labelName="signCostOne.name" labelValue="${projectReportRecord.signCostOne.name}"
+										title="签字造价师一" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input required" allowClear="true" notAllowSelectParent="true"/></div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>签字造价师二:</label>
+					<div class="layui-input-block with-icon">
+						<sys:treeselect id="signCostTwo" name="signCostTwo.id" value="${projectReportRecord.signCostTwo.id}" labelName="signCostTwo.name" labelValue="${projectReportRecord.signCostTwo.name}"
+										title="签字造价师二" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input required" allowClear="true" notAllowSelectParent="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>报告名称:</label>
+					<div class="layui-input-block">
+						<form:input id="reportName" path="report.name" htmlEscape="false"   readonly="true" class="form-control layui-input required"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>报告日期:</label>
+					<div class="layui-input-block">
+						<input id="reportDate" name="report.reportDate"  htmlEscape="false" readonly="true" class="form-control  layui-input required" value="<fmt:formatDate value="${projectReportRecord.report.reportDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>合同编号:</label>
+					<div class="layui-input-block">
+						<input id="contractNum" name="contractNum"  htmlEscape="false" readonly="true" class="form-control  layui-input required" value="${projectReportRecord.report.project.workContractInfo.contractNum}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>合同名称:</label>
+					<div class="layui-input-block">
+						<input id="contractName" name="contractName"  htmlEscape="false" readonly="true" class="form-control  layui-input required" value="${projectReportRecord.report.project.workContractInfo.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>主委托方:</label>
+					<div class="layui-input-block">
+						<input id="clientName" name="clientName"  htmlEscape="false" readonly="true" class="form-control  layui-input required" value="${workClientInfoName}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">项目编号:</label>
+					<div class="layui-input-block">
+						<input id="projectNum" name="projectNum"  htmlEscape="false" readonly="true" class="form-control  layui-input required" value="${projectReportRecord.report.project.projectId}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>项目名称:</label>
+					<div class="layui-input-block">
+						<input id="projectName" name="projectName"  htmlEscape="false" readonly="true" class="form-control  layui-input required" value="${projectReportRecord.report.project.projectName}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>归档申请人:</label>
+					<div class="layui-input-block">
+						<form:input id="cBName" path="createBy.name" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>申请日期:</label>
+					<div class="layui-input-block">
+						<input id="createDate" name="createDate"  htmlEscape="false" readonly="true" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+							   value="<fmt:formatDate value="${projectReportRecord.createDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+					<%--<div class="layui-item layui-col-sm6">
+                        <label class="layui-form-label">档案号:</label>
+                        <div class="layui-input-block">
+                            <form:input path="fileNum" htmlEscape="false"    class="form-control  layui-input"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6">
+                        <label class="layui-form-label">档案名称:</label>
+                        <div class="layui-input-block">
+                            <form:input path="name" htmlEscape="false"    class="form-control  layui-input"/>
+                        </div>
+                    </div>--%>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">提交归档时间:</label>
+					<div class="layui-input-block">
+						<input id="recordDate" name="recordDate"  htmlEscape="false" readonly="true" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+							   value="<fmt:formatDate value="${projectReportRecord.createDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">归档完成日期:</label>
+					<div class="layui-input-block">
+						<input id="accomplishDate" name="accomplishDate"  htmlEscape="false" readonly="true" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+							   value="<fmt:formatDate value="${projectReportRecord.accomplishDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">说明:</label>
+					<div class="layui-input-block">
+						<form:textarea path="remarks" htmlEscape="false" rows="4"    class="form-control "/>
+					</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="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>
+				<div id="addFile_attachment" style="display: none" class="upload-progress">
+					<span id="fileName_attachment" ></span>
+					<b><span id="baifenbi_attachment" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+				<span id="attachment_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${projectReportRecord.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+									<%-- <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>
+
+										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+											<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>
+										</c:if>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 298 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordModify.jsp

@@ -0,0 +1,298 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>合同归档管理</title>
+	<meta name="decorator" content="default"/>
+	<style>
+		label.error:nth-child(2){
+			top:40px;
+			left:0;
+		}
+	</style>
+	<script type="text/javascript">
+        var validateForm;
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(obj == 2){
+					//$("#inputForm").attr("action","${ctx}/projectcontentinfo/projectReportRecord/store");
+					$("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessage/holdSaveRecord");
+                }else{
+                    $("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessage/saveRecord");
+                }
+                $("#inputForm").submit();
+                return true;
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            return false;
+
+        }
+        $(document).ready(function() {
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });
+
+        });
+        function insertTitle(tValue){
+            var list = "${projectReportRecord.workAttachments}";
+            var size = (list.split('url')).length-1;
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "99";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "attachment-file/workContractRd/"+timestamp+"/"+file['name'];
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
+        }
+
+        function setValuee(obj){
+            $("#reportId").val(obj.id);
+            $("#reportnumber").val(obj.number);
+            $("#reportName").val(obj.name);
+            $("#reportDate").val(obj.reportDate);
+            $("#contractNum").val(obj.contractNum);
+            $("#contractName").val(obj.contractName);
+            $("#clientName").val(obj.clientName);
+            $("#projectName").val(obj.projectName);
+            $("#projectNum").val(obj.projectNum);
+            $.ajax({
+                type:'post',
+                url:'${ctx}/projectcontentinfo/projectReportRecord/getNumber',
+                data:{
+                    "reportId":obj.id
+                },
+                success:function(data){
+                    var numberCount = data.numberCount;
+                    $("#recordNum").val(obj.number+"-"+numberCount);
+                    $("#numberCount").val(numberCount);
+                }
+            })
+        }
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="projectReportRecord" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<form:hidden path="view"/>
+			<form:hidden path="numberCount"/>
+			<form:hidden id="reportId" path="report.id"/>
+
+			<div class="form-group layui-row first lw12">
+				<div class="form-group-label"><h2>基本信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>报告编号:</label>
+					<div class="layui-input-block">
+						<form:input id="reportNumber" path="report.number" htmlEscape="false"   readonly="true" class="form-control layui-input required"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>归档申请编号:</label>
+					<div class="layui-input-block">
+						<div class="input-group">
+							<form:input id="recordNum" path="recordNum" htmlEscape="false"   readonly="true" class="form-control layui-input required"/>
+							<span class="input-group-btn">
+								<label class="form-status">
+									<c:choose>
+										<c:when test="${not empty projectReportRecord.status}">${fns:getDictLabel(projectReportRecord.status, 'audit_record_state', '')}
+										</c:when>
+										<c:otherwise>新添</c:otherwise>
+									</c:choose></label>
+							 </span>
+						</div>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>签字造价师一:</label>
+					<div class="layui-input-block with-icon">
+						<sys:treeselect id="signCostOne" name="signCostOne.id" value="${projectReportRecord.signCostOne.id}" labelName="signCostOne.name" labelValue="${projectReportRecord.signCostOne.name}"
+										title="签字造价师一" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input required" allowClear="true" notAllowSelectParent="true"/></div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>签字造价师二:</label>
+					<div class="layui-input-block with-icon">
+						<sys:treeselect id="signCostTwo" name="signCostTwo.id" value="${projectReportRecord.signCostTwo.id}" labelName="signCostTwo.name" labelValue="${projectReportRecord.signCostTwo.name}"
+										title="签字造价师二" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input required" allowClear="true" notAllowSelectParent="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>报告名称:</label>
+					<div class="layui-input-block">
+						<form:input id="reportName" path="report.name" htmlEscape="false"   readonly="true" class="form-control layui-input required"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>报告日期:</label>
+					<div class="layui-input-block">
+						<input id="reportDate" name="report.reportDate"  htmlEscape="false" readonly="true" class="form-control  layui-input required" value="<fmt:formatDate value="${projectReportRecord.report.reportDate}" pattern="yyyy-MM-dd"/>"/>
+							<%--<input class="laydate-icondate form-control layui-input layer-date laydate-icon" id="createDate" name="createDate" value="<fmt:formatDate value="${projectReportRecord.createDate}" pattern="yyyy-MM-dd"/>">--%>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>合同编号:</label>
+					<div class="layui-input-block">
+						<form:input id="contractNum" path="contractNum" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>合同名称:</label>
+					<div class="layui-input-block">
+						<form:input id="contractName" path="contractName" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>主委托方:</label>
+					<div class="layui-input-block">
+						<form:input id="clientName" path="clientName" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">项目编号:</label>
+					<div class="layui-input-block">
+						<form:input id="projectNum" path="projectNum" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>项目名称:</label>
+					<div class="layui-input-block">
+						<form:input id="projectName" path="projectName" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>归档申请人:</label>
+					<div class="layui-input-block">
+						<form:input id="cBName" path="createBy.name" htmlEscape="false" readonly="true" class="form-control  layui-input required"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>申请日期:</label>
+					<div class="layui-input-block">
+						<input id="createDate" name="createDate"  htmlEscape="false" readonly="true" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+							   value="<fmt:formatDate value="${projectReportRecord.createDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+					<%--<div class="layui-item layui-col-sm6">
+                        <label class="layui-form-label">档案号:</label>
+                        <div class="layui-input-block">
+                            <form:input path="fileNum" htmlEscape="false"    class="form-control  layui-input"/>
+                        </div>
+                    </div>
+                    <div class="layui-item layui-col-sm6">
+                        <label class="layui-form-label">档案名称:</label>
+                        <div class="layui-input-block">
+                            <form:input path="name" htmlEscape="false"    class="form-control  layui-input"/>
+                        </div>
+                    </div>--%>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">提交归档时间:</label>
+					<div class="layui-input-block">
+						<input id="recordDate" name="recordDate"  htmlEscape="false" readonly="true" class="form-control  layui-input" value="<fmt:formatDate value="${projectReportRecord.createDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">归档完成日期:</label>
+					<div class="layui-input-block">
+						<input id="accomplishDate" name="accomplishDate"  htmlEscape="false" readonly="true" class="form-control  layui-input"
+							   value="<fmt:formatDate value="${projectReportRecord.accomplishDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">说明:</label>
+					<div class="layui-input-block">
+						<form:textarea path="remarks" htmlEscape="false" rows="4"    class="form-control "/>
+					</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="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>
+				<div id="addFile_attachment" style="display: none" class="upload-progress">
+					<span id="fileName_attachment" ></span>
+					<b><span id="baifenbi_attachment" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+				<span id="attachment_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${projectReportRecord.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<tr>
+									<%-- <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>
+
+										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+											<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>
+										</c:if>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 189 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordView.jsp

@@ -0,0 +1,189 @@
+<%@ 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">
+
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container view-form">
+		<div class="form-group layui-row first lw9">
+			<div class="form-group-label"><h2>基本信息</h2></div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">报告编号:</label>
+				<div class="layui-input-block with-icon">
+					<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectReportRecord.report.number}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">归档申请编号:</label>
+				<div class="layui-input-block">
+					<div class="input-group">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectReportRecord.recordNum}"/>
+						<span class="input-group-btn">
+								<label class="form-status">
+									<c:choose>
+										<c:when test="${not empty projectReportRecord.status}">${fns:getDictLabel(projectReportRecord.status, 'audit_record_state', '')}
+										</c:when>
+										<c:otherwise>新添</c:otherwise>
+									</c:choose></label>
+							 </span>
+					</div>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">签字造价师一:</label>
+				<div class="layui-input-block">
+					<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${projectReportRecord.signCostOne.name}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">签字造价师二:</label>
+				<div class="layui-input-block">
+					<input  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${projectReportRecord.signCostTwo.name}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">报告名称:</label>
+				<div class="layui-input-block">
+					<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectReportRecord.report.name}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">报告日期:</label>
+				<div class="layui-input-block">
+					<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="<fmt:formatDate value="${projectReportRecord.report.reportDate}" pattern="yyyy-MM-dd"/>"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">合同编号:</label>
+				<div class="layui-input-block">
+					<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectReportRecord.report.project.workContractInfo.contractNum}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">合同名称:</label>
+				<div class="layui-input-block">
+					<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectReportRecord.report.project.workContractInfo.name}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">主委托方:</label>
+				<div class="layui-input-block">
+					<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${workClientInfoName}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">项目编号:</label>
+				<div class="layui-input-block">
+					<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectReportRecord.report.project.projectId}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">项目名称:</label>
+				<div class="layui-input-block">
+					<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectReportRecord.report.project.projectName}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">归档申请人:</label>
+				<div class="layui-input-block">
+					<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectReportRecord.createBy.name}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">申请日期:</label>
+				<div class="layui-input-block">
+					<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="<fmt:formatDate value="${projectReportRecord.createDate}" pattern="yyyy-MM-dd"/>"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">档案号:</label>
+				<div class="layui-input-block">
+					<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectReportRecord.fileNum}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">档案名称:</label>
+				<div class="layui-input-block">
+					<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectReportRecord.name}"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">提交归档时间:</label>
+				<div class="layui-input-block">
+					<input id="recordDate" name="recordDate"  htmlEscape="false" readonly="true" class="form-control  layui-input" value="<fmt:formatDate value="${projectReportRecord.createDate}" pattern="yyyy-MM-dd"/>"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">归档完成日期:</label>
+				<div class="layui-input-block">
+					<input id="accomplishDate" name="accomplishDate"  htmlEscape="false" readonly="true" class="form-control  layui-input" value="<fmt:formatDate value="${projectReportRecord.accomplishDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm12  with-textarea">
+				<label class="layui-form-label">说明:</label>
+				<div class="layui-input-block">
+					<textarea path="remarks" htmlEscape="false" readonly="true" rows="3" maxlength="20" class="form-control" >${projectReportRecord.remarks}</textarea>
+				</div>
+			</div>
+		</div>
+		<div class="form-group layui-row">
+			<div class="form-group-label"><h2>附件信息</h2></div>
+			<span id="attachment_title"></span>
+			<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+				<table id="upTable" class="table table-bordered table-condensed details">
+					<thead>
+					<tr>
+						<%-- <th>序号</th>--%>
+						<th>文件预览</th>
+						<th>上传人</th>
+						<th>上传时间</th>
+						<th width="150px">操作</th>
+					</tr>
+					</thead>
+					<tbody id="file_attachment">
+					<c:forEach items="${projectReportRecord.workAttachments}" var = "workClientAttachment" varStatus="status">
+						<tr>
+								<%-- <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>
+								</div>
+							</td>
+						</tr>
+					</c:forEach>
+					</tbody>
+				</table>
+			</div>
+		</div>
+			<div class="form-group layui-row page-end"></div>
+	</div>
+</div>
+</body>
+</html>

+ 390 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/projectRecordsMessageAudit.jsp

@@ -0,0 +1,390 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>项目审批管理</title>
+	<meta name="decorator" content="default"/>
+	<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>
+	<script type="text/javascript">
+        var validateForm;
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(obj == 1) {
+                    $("#flag").val("yes");
+                    /*if($("#taskDefKey").val()== "projectplan" && $(".trIdAdds").length==0){
+                        top.layer.alert('请至少上传一个项目计划表或者实施方案文档!', {icon: 0});
+                        return;
+                    }*/
+                }else {
+                    if(obj == 2){
+                        $("#flag").val("no1");
+                    }else {
+                        $("#flag").val("no2");
+                    }
+                }
+                $("#inputForm").submit();
+                return true;
+            }
+
+            return false;
+        }
+        $(document).ready(function() {
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+
+            var contractNum = $("#contractNum").val();
+            if (contractNum == null || contractNum === "") {
+                $("#div1").hide();
+                $("#div3").hide();
+                setTimeout(function () {
+                    var tt = $("#workClientLinkmanList").find("tr").eq(0).find("td").eq(1).text().trim();
+                    $("#clientName").val(tt);
+                },100);
+            }
+        });
+
+        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();
+                var attachmentFlag = "86";
+                console.log(file);
+                var timestamp=new Date().getTime();
+
+                var storeAs = "attachment-file/projectRecords/"+timestamp+"/"+file['name'];
+                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+                var divId = "_attachment";
+                $("#addFile"+divId).show();
+                multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
+        }
+
+        function addFile() {
+            $("#attachment_file").click();
+        }
+
+        function addRow(list, idx, tpl, row){
+            // var idx1 = $("#workClientLinkmanList tr").length;
+            bornTemplete(list, idx, tpl, row, idx);
+        }
+
+        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");
+                    }
+                }
+            });
+        }
+	</script>
+</head>
+<body >
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="projectcontentinfo" enctype="multipart/form-data" action="${ctx}/ruralProject/ruralProjectMessage/reportAudit" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<form:hidden path="home"/>
+			<form:hidden path="project.id"/>
+			<form:hidden path="projectReportData.act.taskId"/>
+			<form:hidden path="projectReportData.id"/>
+			<form:hidden path="projectReportData.act.taskName"/>
+			<form:hidden id="taskDefKey" path="projectReportData.act.taskDefKey"/>
+			<form:hidden path="projectReportData.act.procInsId"/>
+			<form:hidden path="projectReportData.act.procDefId"/>
+			<form:hidden id="flag" path="projectReportData.act.flag"/>
+			<c:set var="status" value="${projectReportData.act.status}" />
+
+
+			<sys:message content="${message}"/>
+			<div class="form-group layui-row first lw12">
+				<div class="form-group-label"><h2>基本信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>成果类型:</label>
+					<div class="layui-input-block">
+						<form:input path="projectReportData.achievementType" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">签章类型:</label>
+					<div class="layui-input-block">
+						<form:input path="projectReportData.ReportType" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+			</div>
+			<div class="form-group layui-row first lw12">
+				<div class="form-group-label"><h2>项目信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">送审价(元):</label>
+					<div class="layui-input-block with-icon">
+						<form:input id="reviewFee" path="projectReportData.reviewFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">审定价(元):</label>
+					<div class="layui-input-block with-icon">
+						<form:input id="approvalFee" path="projectReportData.approvalFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同价(元):</label>
+					<div class="layui-input-block with-icon">
+						<form:input id="contractFee" path="projectReportData.contractFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">核增核减额(元):</label>
+					<div class="layui-input-block with-icon">
+						<form:input id="verifyFee" path="projectReportData.verifyFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">核增核减率(%):</label>
+					<div class="layui-input-block with-icon">
+						<form:input id="verifyRate" path="projectReportData.verifyRate" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">咨询标的额(元):</label>
+					<div class="layui-input-block with-icon">
+						<form:input id="consultFee" path="projectReportData.consultFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">土建造价(元):</label>
+					<div class="layui-input-block with-icon">
+						<form:input id="buildingFee" path="projectReportData.buildingFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">安装造价(元):</label>
+					<div class="layui-input-block with-icon">
+						<form:input id="installFee" path="projectReportData.installFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>报告文件</h2></div>
+				<div id="addFile_attachment" style="display: none" class="upload-progress">
+					<span id="fileName_attachment" ></span>
+					<b><span id="baifenbi_attachment" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+				<span id="attachment_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${projectcontentinfo.projectReportData.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<c:if test="${workClientAttachment.divIdType eq '_attachment'}">
+								<tr>
+									<c:choose>
+										<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+											<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+													<td><a class="attention-info" href="javascript:void(0)" onclick="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>
+										</div>
+									</td>
+								</tr>
+							</c:if>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>依据性资料</h2></div>
+				<div id="addFile_gistdata" style="display: none" class="upload-progress">
+					<span id="fileName_gistdata" ></span>
+					<b><span id="baifenbi_gistdata" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
+				<span id="gistdata_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="gistdata_upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_gistdata">
+						<c:forEach items="${projectcontentinfo.projectReportData.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<c:if test="${workClientAttachment.divIdType eq '_gistdata'}">
+								<tr>
+									<c:choose>
+										<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+											<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+													<td><a class="attention-info" href="javascript:void(0)" onclick="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>
+										</div>
+									</td>
+								</tr>
+							</c:if>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>其他文件</h2></div>
+				<div id="addFile_other" style="display: none" class="upload-progress">
+					<span id="fileName_other" ></span>
+					<b><span id="baifenbi_other" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
+				<span id="other_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable_other" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_other">
+						<c:forEach items="${projectcontentinfo.projectReportData.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<c:if test="${workClientAttachment.divIdType eq '_other'}">
+								<tr>
+									<c:choose>
+										<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+											<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+													<td><a class="attention-info" href="javascript:void(0)" onclick="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>
+										</div>
+									</td>
+								</tr>
+							</c:if>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>审批意见</h2></div>
+				<div class="layui-item layui-col-sm12 lw6 with-textarea">
+					<label class="layui-form-label">审批意见:</label>
+					<div class="layui-input-block">
+						<form:textarea path="projectReportData.act.comment" class="form-control" rows="4" maxlength="127" />
+						<input type="file" name="upload_files" style="display: none;">
+					</div>
+				</div>
+			</div>
+
+		</form:form>
+
+		<div class="form-group layui-row">
+			<div class="form-group-label"><h2>审批流程</h2></div>
+			<div class="layui-item layui-col-xs12 form-table-container" >
+				<act:flowChart procInsId="${processInstanceId}"/>
+				<act:histoicFlow procInsId="${processInstanceId}"/>
+			</div>
+		</div>
+	</div>
+</div>
+</body>
+</html>

+ 390 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/projectRecordsMessageModify.jsp

@@ -0,0 +1,390 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+    <title>项目审批管理</title>
+    <meta name="decorator" content="default"/>
+    <script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>
+    <script type="text/javascript">
+        var validateForm;
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(obj == 1) {
+                    $("#flag").val("yes");
+                    /*if($("#taskDefKey").val()== "projectplan" && $(".trIdAdds").length==0){
+                        top.layer.alert('请至少上传一个项目计划表或者实施方案文档!', {icon: 0});
+                        return;
+                    }*/
+                }else {
+                    if(obj == 2){
+                        $("#flag").val("no1");
+                    }else {
+                        $("#flag").val("no2");
+                    }
+                }
+                $("#inputForm").submit();
+                return true;
+            }
+
+            return false;
+        }
+        $(document).ready(function() {
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+
+            var contractNum = $("#contractNum").val();
+            if (contractNum == null || contractNum === "") {
+                $("#div1").hide();
+                $("#div3").hide();
+                setTimeout(function () {
+                    var tt = $("#workClientLinkmanList").find("tr").eq(0).find("td").eq(1).text().trim();
+                    $("#clientName").val(tt);
+                },100);
+            }
+        });
+
+        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();
+                var attachmentFlag = "86";
+                console.log(file);
+                var timestamp=new Date().getTime();
+
+                var storeAs = "attachment-file/projectRecords/"+timestamp+"/"+file['name'];
+                var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+                var divId = "_attachment";
+                $("#addFile"+divId).show();
+                multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,0);}
+        }
+
+        function addFile() {
+            $("#attachment_file").click();
+        }
+
+        function addRow(list, idx, tpl, row){
+            // var idx1 = $("#workClientLinkmanList tr").length;
+            bornTemplete(list, idx, tpl, row, idx);
+        }
+
+        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");
+                    }
+                }
+            });
+        }
+    </script>
+</head>
+<body >
+<div class="single-form">
+    <div class="container">
+        <form:form id="inputForm" modelAttribute="projectcontentinfo" enctype="multipart/form-data" action="${ctx}/ruralProject/ruralProjectMessage/reportAudit" method="post" class="form-horizontal">
+            <form:hidden path="id"/>
+            <form:hidden path="home"/>
+            <form:hidden path="project.id"/>
+            <form:hidden path="projectReportData.act.taskId"/>
+            <form:hidden path="projectReportData.id"/>
+            <form:hidden path="projectReportData.act.taskName"/>
+            <form:hidden id="taskDefKey" path="projectReportData.act.taskDefKey"/>
+            <form:hidden path="projectReportData.act.procInsId"/>
+            <form:hidden path="projectReportData.act.procDefId"/>
+            <form:hidden id="flag" path="projectReportData.act.flag"/>
+            <c:set var="status" value="${projectReportData.act.status}" />
+
+
+            <sys:message content="${message}"/>
+            <div class="form-group layui-row first lw12">
+                <div class="form-group-label"><h2>基本信息</h2></div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label"><span class="require-item">*</span>成果类型:</label>
+                    <div class="layui-input-block">
+                        <form:input path="projectReportData.achievementType" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">签章类型:</label>
+                    <div class="layui-input-block">
+                        <form:input path="projectReportData.ReportType" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+            </div>
+            <div class="form-group layui-row first lw12">
+                <div class="form-group-label"><h2>项目信息</h2></div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">送审价(元):</label>
+                    <div class="layui-input-block with-icon">
+                        <form:input id="reviewFee" path="projectReportData.reviewFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">审定价(元):</label>
+                    <div class="layui-input-block with-icon">
+                        <form:input id="approvalFee" path="projectReportData.approvalFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">合同价(元):</label>
+                    <div class="layui-input-block with-icon">
+                        <form:input id="contractFee" path="projectReportData.contractFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">核增核减额(元):</label>
+                    <div class="layui-input-block with-icon">
+                        <form:input id="verifyFee" path="projectReportData.verifyFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">核增核减率(%):</label>
+                    <div class="layui-input-block with-icon">
+                        <form:input id="verifyRate" path="projectReportData.verifyRate" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">咨询标的额(元):</label>
+                    <div class="layui-input-block with-icon">
+                        <form:input id="consultFee" path="projectReportData.consultFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">土建造价(元):</label>
+                    <div class="layui-input-block with-icon">
+                        <form:input id="buildingFee" path="projectReportData.buildingFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+                <div class="layui-item layui-col-sm6">
+                    <label class="layui-form-label">安装造价(元):</label>
+                    <div class="layui-input-block with-icon">
+                        <form:input id="installFee" path="projectReportData.installFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+                    </div>
+                </div>
+            </div>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>报告文件</h2></div>
+                <div id="addFile_attachment" style="display: none" class="upload-progress">
+                    <span id="fileName_attachment" ></span>
+                    <b><span id="baifenbi_attachment" ></span></b>
+                    <div class="progress">
+                        <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+                        </div>
+                    </div>
+                </div>
+                <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+                <span id="attachment_title"></span>
+                <div class="layui-item layui-col-xs12" style="padding:0 16px;">
+                    <table id="upTable" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                            <th>文件预览</th>
+                            <th>上传人</th>
+                            <th>上传时间</th>
+                            <th width="150px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_attachment">
+                        <c:forEach items="${projectcontentinfo.projectReportData.workAttachments}" var = "workClientAttachment" varStatus="status">
+                            <c:if test="${workClientAttachment.divIdType eq '_attachment'}">
+                                <tr>
+                                    <c:choose>
+                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                            <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+                                        </c:when>
+                                        <c:otherwise>
+                                            <c:choose>
+                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                    <td><a class="attention-info" href="javascript:void(0)" onclick="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>
+                                        </div>
+                                    </td>
+                                </tr>
+                            </c:if>
+                        </c:forEach>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>依据性资料</h2></div>
+                <div id="addFile_gistdata" style="display: none" class="upload-progress">
+                    <span id="fileName_gistdata" ></span>
+                    <b><span id="baifenbi_gistdata" ></span></b>
+                    <div class="progress">
+                        <div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
+                        </div>
+                    </div>
+                </div>
+                <input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
+                <span id="gistdata_title"></span>
+                <div class="layui-item layui-col-xs12" style="padding:0 16px;">
+                    <table id="gistdata_upTable" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                            <th>文件预览</th>
+                            <th>上传人</th>
+                            <th>上传时间</th>
+                            <th width="150px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_gistdata">
+                        <c:forEach items="${projectcontentinfo.projectReportData.workAttachments}" var = "workClientAttachment" varStatus="status">
+                            <c:if test="${workClientAttachment.divIdType eq '_gistdata'}">
+                                <tr>
+                                    <c:choose>
+                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                            <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+                                        </c:when>
+                                        <c:otherwise>
+                                            <c:choose>
+                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                    <td><a class="attention-info" href="javascript:void(0)" onclick="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>
+                                        </div>
+                                    </td>
+                                </tr>
+                            </c:if>
+                        </c:forEach>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>其他文件</h2></div>
+                <div id="addFile_other" style="display: none" class="upload-progress">
+                    <span id="fileName_other" ></span>
+                    <b><span id="baifenbi_other" ></span></b>
+                    <div class="progress">
+                        <div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
+                        </div>
+                    </div>
+                </div>
+                <input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
+                <span id="other_title"></span>
+                <div class="layui-item layui-col-xs12" style="padding:0 16px;">
+                    <table id="upTable_other" class="table table-bordered table-condensed details">
+                        <thead>
+                        <tr>
+                            <th>文件预览</th>
+                            <th>上传人</th>
+                            <th>上传时间</th>
+                            <th width="150px">操作</th>
+                        </tr>
+                        </thead>
+                        <tbody id="file_other">
+                        <c:forEach items="${projectcontentinfo.projectReportData.workAttachments}" var = "workClientAttachment" varStatus="status">
+                            <c:if test="${workClientAttachment.divIdType eq '_other'}">
+                                <tr>
+                                    <c:choose>
+                                        <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                            <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+                                        </c:when>
+                                        <c:otherwise>
+                                            <c:choose>
+                                                <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                    <td><a class="attention-info" href="javascript:void(0)" onclick="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>
+                                        </div>
+                                    </td>
+                                </tr>
+                            </c:if>
+                        </c:forEach>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+
+
+            <div class="form-group layui-row">
+                <div class="form-group-label"><h2>审批意见</h2></div>
+                <div class="layui-item layui-col-sm12 lw6 with-textarea">
+                    <label class="layui-form-label">审批意见:</label>
+                    <div class="layui-input-block">
+                        <form:textarea path="projectReportData.act.comment" class="form-control" rows="4" maxlength="127" />
+                        <input type="file" name="upload_files" style="display: none;">
+                    </div>
+                </div>
+            </div>
+
+        </form:form>
+
+        <div class="form-group layui-row">
+            <div class="form-group-label"><h2>审批流程</h2></div>
+            <div class="layui-item layui-col-xs12 form-table-container" >
+                <act:flowChart procInsId="${processInstanceId}"/>
+                <act:histoicFlow procInsId="${processInstanceId}"/>
+            </div>
+        </div>
+    </div>
+</div>
+</body>
+</html>

+ 557 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/projectRecordsMessageView.jsp

@@ -0,0 +1,557 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>项目审批管理</title>
+	<meta name="decorator" content="default"/>
+	<script>
+		$(document).ready(function () {
+			var tt = $("#contractNum").val();
+			if (tt == null || tt === "") {
+				$("#divv").hide();
+				$("#divv3").hide();
+				setTimeout(function () {
+					var tt = $("#workClientLinkmanList").find("tr").eq(0).find("td").eq(1).text().trim();
+					$("#clientName").val(tt);
+				},100);
+			}
+
+		})
+	</script>
+	<script type="text/javascript">
+        function addRow(list, idx, tpl, row){
+            // var idx1 = $("#workClientLinkmanList tr").length;
+            bornTemplete(list, idx, tpl, row, idx);
+        }
+
+        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");
+                    }
+                }
+            });
+        }
+        function seeFile(fileUrl,fileName) {
+            //   location.href = "/followRecord/seeFile";
+            var index = fileName.lastIndexOf(".");
+            var fileType = fileName.substring(index);
+            // debugger
+            if (".pdf" == fileType) {
+                window.open(fileUrl);
+            } else {
+                window.open("${ctx}/isignature/iSignatureDocument/seeFile?fileUrl="+fileUrl+"&fileName="+fileName);
+            }
+        }
+	</script>
+	<script>
+		function initRecordStatus(index,id,dataid,status)
+		{
+			var elem = document.getElementById("status_td_" + index);
+			var st = getAuditState(status);
+			if(st.action)
+				var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/projectcontentinfo/projectcontentinfo/getProcessOne?id=" + id + "&projectReportData.id="+ dataid + "&type="+status+"','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+			else
+				var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+
+			elem.innerHTML = xml;
+		}
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container view-form">
+		<form:form id="inputForm" modelAttribute="projectRecords" action="${ctx}/project/projectRecords/saveAudit" method="post" class="form-horizontal">
+			<div class="form-group layui-row first">
+				<div class="form-group-label"><h2>项目合同信息</h2></div>
+               <div id="divv">
+				   <div class="layui-item layui-col-sm12 lw6">
+					   <label class="layui-form-label">合同编号:</label>
+					   <div class="layui-input-block">
+						   <input htmlEscape="false" id="contractNum" readonly="true" class="form-control layui-input" value="${projectRecords.workContractInfo.contractNum}"/>
+					   </div>
+				   </div>
+				   <div class="layui-item layui-col-sm6 lw6">
+					   <label class="layui-form-label">合同名称:</label>
+					   <div class="layui-input-block">
+						   <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.workContractInfo.name}"/>
+					   </div>
+				   </div>
+				   <div class="layui-item layui-col-sm6 lw6">
+					   <label class="layui-form-label double-line">合同金额(元):</label>
+					   <div class="layui-input-block">
+						   <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="<fmt:formatNumber value="${projectRecords.workContractInfo.contractPrice}" pattern="#,##0.00#"/>"/>
+					   </div>
+				   </div>
+			   </div>
+				<div class="layui-item layui-col-sm6 lw6">
+					<label class="layui-form-label">主委托方:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  id="clientName" readonly="true" class="form-control layui-input" value="${projectRecords.workContractInfo.client.name}"/>
+					</div>
+				</div>
+				<div id="divv3">
+					<div class="layui-item layui-col-sm6 lw6">
+						<label class="layui-form-label">工程分类:</label>
+						<div class="layui-input-block">
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.workContractInfo.constructionProjectTypeStr}"/>
+						</div>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row first">
+				<div class="form-group-label"><h2>项目基础信息</h2></div>
+                <div class="layui-item layui-col-sm6 lw6">
+                    <label class="layui-form-label">项目名称:</label>
+                    <div class="layui-input-block">
+                        <input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.projectName}"/>
+                    </div>
+                </div>
+				<div class="layui-item layui-col-sm6 lw6">
+					<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"/>
+                            <span class="input-group-btn">
+                                <label class="form-status"><c:choose><c:when test="${not empty projectRecords.projectStatus}">${fns:getDictLabel(projectRecords.projectStatus, 'audit_state', '')}</c:when><c:otherwise>新添</c:otherwise></c:choose></label>
+                             </span>
+                        </div>
+					</div>
+				</div>
+				<%--<div class="layui-item layui-col-sm6 lw6">--%>
+					<%--<label class="layui-form-label">规模类型:</label>--%>
+					<%--<div class="layui-input-block">--%>
+						<%--<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.scaleType}"/>--%>
+					<%--</div>--%>
+				<%--</div>--%>
+				<%--<div class="layui-item layui-col-sm6 lw6">--%>
+					<%--<label class="layui-form-label">规模单位:</label>--%>
+					<%--<div class="layui-input-block">--%>
+						<%--<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.scaleUnit}"/>--%>
+					<%--</div>--%>
+				<%--</div>--%>
+				<%--<div class="layui-item layui-col-sm6 lw6">--%>
+					<%--<label class="layui-form-label">规模数量:</label>--%>
+					<%--<div class="layui-input-block">--%>
+						<%--<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.scaleQuantity}"/>--%>
+					<%--</div>--%>
+				<%--</div>--%>
+				<div class="layui-item layui-col-sm6 lw6">
+					<label class="layui-form-label">项目所在地:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.area.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">所在省份:</label>
+					<div class="layui-input-block">
+						<form:input path="province" htmlEscape="false" id="province" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">所在地级市:</label>
+					<div class="layui-input-block">
+						<form:input path="city" htmlEscape="false" id="city" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">所在区县:</label>
+					<div class="layui-input-block">
+						<form:input path="county" htmlEscape="false" id="areaName1" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw6">
+					<label class="layui-form-label">建设地点:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.projectSite}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw6">
+					<label class="layui-form-label">项目负责人:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.leaderNameStr}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw6">
+					<label class="layui-form-label">创建人:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.createBy.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw6">
+					<label class="layui-form-label">创建日期:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="<fmt:formatDate value="${projectRecords.createDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">工程结构:</label>
+					<div class="layui-input-block">
+							<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.projectStructure}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">地上层数:</label>
+					<div class="layui-input-block">
+						<form:input path="onGroundNum" htmlEscape="false"  class="form-control layui-input number" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">底下层数:</label>
+					<div class="layui-input-block">
+						<form:input path="underGroundNum" htmlEscape="false"  class="form-control layui-input number" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>建筑面积或规模:</label>
+					<div class="layui-input-block">
+						<form:input path="buildingScale" htmlEscape="false"  class="form-control layui-input required number" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">计量单位:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.measuringUnit}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">工程用途:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectRecords.projectUse}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line"><span class="require-item">*</span>咨询标的额(万元):</label>
+					<div class="layui-input-block">
+						<input value="<fmt:formatNumber value="${projectRecords.totalFees}" pattern="#,##0.00#"/>" htmlEscape="false" id="totalFees" class="form-control layui-input required number"  readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line">其中土建造价(万元):</label>
+					<div class="layui-input-block">
+						<input   value="<fmt:formatNumber value="${projectRecords.buildingFees}" pattern="#,##0.00#"/>" htmlEscape="false" id="buildingFees" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line">其中安装造价(万元):</label>
+					<div class="layui-input-block">
+						<input  value="<fmt:formatNumber value="${projectRecords.installFees}" pattern="#,##0.00#"/>" htmlEscape="false" id="installFees" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line">其中土建百分比(%):</label>
+					<div class="layui-input-block">
+						<form:input path="buildingPercent" htmlEscape="false" id="buildingPercent" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line">其中安装百分比(%):</label>
+					<div class="layui-input-block">
+						<form:input path="installPercent" htmlEscape="false" id="installPercent" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label">单位造价(元):</label>
+					<div class="layui-input-block">
+						<input value="<fmt:formatNumber value="${projectRecords.unitFees}" pattern="#,##0.00#"/>" htmlEscape="false" id="unitFees" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line">土建单位造价(元):</label>
+					<div class="layui-input-block">
+						<input  value="<fmt:formatNumber value="${projectRecords.buildingUnitFees}" pattern="#,##0.00#"/>" htmlEscape="false" id="buildingUnitFees" class="form-control layui-input" readonly="true"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw7">
+					<label class="layui-form-label double-line">安装单位造价(元):</label>
+					<div class="layui-input-block">
+						<input  value="<fmt:formatNumber value="${projectRecords.installUnitFees}" pattern="#,##0.00#"/>" htmlEscape="false" id="installUnitFees" class="form-control layui-input" readonly="readonly"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw6 with-textarea">
+					<label class="layui-form-label">工程概况:</label>
+					<div class="layui-input-block">
+						<textarea htmlEscape="false" rows="4" readonly="true" maxlength="1000" class="form-control" >${projectRecords.projectDesc}</textarea>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6 lw6 with-textarea">
+					<label class="layui-form-label">特殊要求:</label>
+					<div class="layui-input-block">
+						<textarea htmlEscape="false" rows="4" readonly="true" maxlength="1000" class="form-control" >${projectRecords.remarks}</textarea>
+					</div>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>委托方联系人信息</h2></div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="contentTable" class="table table-bordered table-condensed no-bottom-margin details">
+						<thead>
+						<tr>
+							<th class="hide"></th>
+							<th width="25%">委托方</th>
+							<th width="25%">联系人姓名</th>
+							<th width="25%">联系方式1</th>
+							<th width="25%">联系方式2</th>
+						</tr>
+						</thead>
+						<tbody id="workClientLinkmanList">
+						</tbody>
+					</table>
+					<script type="text/template" id="workClientLinkmanTpl">//<!--
+					<tr id="workClientLinkmanList{{idx}}">
+					<td class="hide">
+						<input id="workClientLinkmanList{{idx}}_id" name="workClientLinkmanList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+						<input id="workClientLinkmanList{{idx}}_delFlag" name="workClientLinkmanList[{{idx}}].delFlag" type="hidden" value="0"/>
+					</td>
+					<td>
+						{{row.clientId.name}}
+					</td>
+					<td>
+						{{row.name}}
+					</td>
+					<td>
+						{{row.linkPhone}}
+					</td>
+					<td>
+						{{row.linkMobile}}
+					</td>
+				</tr>//-->
+					</script>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>施工方信息</h2></div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="contentTable1" class="table table-bordered table-condensed no-bottom-margin details">
+						<thead>
+						<tr>
+							<th class="hide"></th>
+							<th width="25%">施工方单位名称</th>
+							<th width="25%">联系人姓名</th>
+							<th width="25%">联系方式1</th>
+							<th width="25%">联系方式2</th>
+						</tr>
+						</thead>
+						<tbody id="workConstructionLinkmanList">
+						</tbody>
+					</table>
+					<script type="text/template" id="workConstructionLinkmanTpl">//<!--
+					<tr id="workConstructionLinkmanList{{idx}}">
+					<td class="hide">
+						<input id="workConstructionLinkmanList{{idx}}_id" name="workConstructionLinkmanList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+						<input id="workConstructionLinkmanList{{idx}}_delFlag" name="workConstructionLinkmanList[{{idx}}].delFlag" type="hidden" value="0"/>
+					</td>
+					<td>
+						{{row.clientId.name}}
+					</td>
+					<td>
+						{{row.name }}
+					</td>
+					<td>
+						{{row.linkPhone}}
+					</td>
+					<td>
+						{{row.linkMobile}}
+					</td>
+				</tr>//-->
+					</script>
+				</div>
+			</div>
+
+			<c:if test="${not empty projectRecords.workAttachments}">
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>项目计划附件信息</h2></div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="listAttachment" class="table table-bordered table-condensed no-bottom-margin details">
+						<thead>
+						<tr>
+							<th width="25%">文件预览</th>
+							<th width="25%">上传人</th>
+							<th width="25%">上传时间</th>
+							<th width="25%">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${projectRecords.workAttachments}" var="workClientAttachment" varStatus="status">
+							<tr>
+									<%--<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 href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','95%','95%','1')">${workClientAttachment.attachmentName}</a></td>
+											</c:when>
+											<c:otherwise>
+												<td><a href="javascript:void(0)" onclick="preview('预览','${workClientAttachment.url}','95%','95%')">${workClientAttachment.attachmentName}</a></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td>${workClientAttachment.createBy.name}</td>
+								<td><fmt:formatDate value="${workClientAttachment.createDate}" pattern="yyyy-MM-dd"/></td>
+								<td  class="op-td">
+									<a href="javascript:location.href=encodeURI('${ctx}/workcontractinfo/workContractInfo/downLoadAttach?file=${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+									<%--<a href="#" onclick="seeFile('${workClientAttachment.url}','${workClientAttachment.attachmentName}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;查看</a>--%>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			</c:if>
+			<script>
+                var workClientLinkmanRowIdx = 0, workClientLinkmanTpl = $("#workClientLinkmanTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                var workConstructionLinkmanRowIdx = 0, workConstructionLinkmanTpl = $("#workConstructionLinkmanTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+                $(document).ready(function() {
+                    var data = ${fns:toJson(projectRecords.workClientLinkmanList)};
+                    for (var i=0; i<data.length; i++){
+                        addRow('#workClientLinkmanList', workClientLinkmanRowIdx, workClientLinkmanTpl, data[i]);
+                        workClientLinkmanRowIdx = workClientLinkmanRowIdx + 1;
+                    }
+                    var dataBank = ${fns:toJson(projectRecords.workConstructionLinkmanList)};
+                    for (var i=0; i<dataBank.length; i++){
+                        addRow('#workConstructionLinkmanList', workConstructionLinkmanRowIdx, workConstructionLinkmanTpl, dataBank[i]);
+                        workConstructionLinkmanRowIdx = workConstructionLinkmanRowIdx + 1;
+                    }
+                });
+
+			</script>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>项目组成员列表</h2></div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+				<table id="usersListTable" class="table table-bordered table-condensed no-bottom-margin details">
+					<thead>
+					<tr>
+						<th width="25%">姓名</th>
+						<th width="25%">部门</th>
+						<th width="25%">职级</th>
+						<th width="25%">状态</th>
+					</tr>
+					</thead>
+					<tbody id="usersList">
+					<c:if test="${not empty projectRecords.projectMembers}">
+						<c:forEach items="${projectRecords.projectMembers}" var="user">
+							<tr id="${user.id}">
+								<td>
+										${user.name}
+								</td>
+								<td>
+										${user.office.name}
+								</td>
+								<td>
+										${user.basicInfo.jobGrade.name}
+								</td>
+								<td>
+									<c:choose>
+										<c:when test="${user.delFlag == 0}">
+											正常
+										</c:when>
+										<c:otherwise>
+											移除
+										</c:otherwise>
+									</c:choose>
+								</td>
+							</tr>
+						</c:forEach>
+					</c:if>
+					</tbody>
+				</table>
+			</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>项目报告</h2></div>
+				<div class="layui-item layui-col-xs12 form-table-container" >
+					<table id="upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+							<th width="25%">报告编号</th>
+							<th width="25%">报告名称</th>
+							<th width="20%">工作内容类型</th>
+							<th width="10%">签章类型</th>
+							<th width="10%">创建日期</th>
+							<th width="10%">状态</th>
+						</tr>
+						</thead>
+						<tbody>
+						<c:choose>
+							<c:when test="${not empty projectRecords.projectReportData}">
+								<c:forEach items="${projectRecords.projectReportData}" var="projectReportData" varStatus="index">
+									<tr>
+										<td><a title="${projectReportData.number}" href="javascript:void(0)" onclick="openDialogView('查看报告详情', '${ctx}/projectcontentinfo/projectcontentinfo/form1?id=${projectReportData.id}','95%', '95%')">
+												${projectReportData.number}
+										</a></td>
+										<td>
+													${projectReportData.name}
+										</td>
+										<td title="${fns:getContentTypeName(projectReportData.type,"")}">
+												${fns:getContentTypeName(projectReportData.type,"")}
+										</td>
+										<td title="${projectReportData.reportType}">
+												${projectReportData.reportType}
+										</td>
+										<td>
+											<fmt:formatDate value="${projectReportData.reportDate}" pattern="yyyy-MM-dd"/>
+										</td>
+										<td class="op-td">
+												<%--<c:choose>--%>
+												<%--<c:when test="${empty projectReportData.status || projectReportData.status eq 1}">--%>
+												<%--<div style="text-align: center">--%>
+												<%--<a href="javascript:void(0)" class="op-btn op-btn-trace" >${fns:getDictLabel(projectReportData.status, 'audit_state', '')}</a>--%>
+												<%--</div>--%>
+												<%--</c:when>--%>
+												<%--<c:otherwise>--%>
+												<%--<div style="text-align: center">--%>
+												<%--<a href="javascript:void(0)" onclick="openDialogView('流程追踪', '${ctx}/projectcontentinfo/projectcontentinfo/getProcessOne?id=${id}&projectReportData.id=${projectReportData.id}&type=1','95%','95%')" class="op-btn op-btn-trace" >${fns:getDictLabel(projectReportData.status, 'audit_state', '')}</a>--%>
+												<%--</div>--%>
+												<%--</c:otherwise>--%>
+												<%--</c:choose>--%>
+											<div style="text-align: center" id="status_td_${index.index+1}">
+											</div>
+											<script>
+												initRecordStatus(${index.index+1},"${id}","${projectReportData.id}","${projectReportData.status}");
+											</script>
+										</td>
+									</tr>
+								</c:forEach>
+							</c:when>
+							<c:otherwise>
+								<tr>
+									<td colspan="7">
+										暂无数据
+									</td>
+								</tr>
+							</c:otherwise>
+						</c:choose>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 630 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/reportForm.jsp

@@ -0,0 +1,630 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>造价审核新增报告管理</title>
+	<meta name="decorator" content="default"/>
+	<style>
+		label.error{
+			top:40px;
+			left:0;
+		}
+	</style>
+	<script type="text/javascript">
+        var validateForm;
+        var dataList;
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(obj == 1){
+                    $("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessage/saveReport");
+                }else{
+                    //$("#inputForm").attr("action","${ctx}/projectcontentinfo/projectcontentinfo/save?view=report");
+					$("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessage/holdSaveReport");
+                }
+                $("#inputForm").submit();
+                return true;
+            }
+
+            return false;
+        }
+        $(document).ready(function() {
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            laydate.render({
+                elem: '#reportDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });;
+            $("#gistdata_btn").click(function () {
+                $("#gistdata_file").click();
+            });;
+            $("#other_btn").click(function () {
+                $("#other_file").click();
+            });
+        });
+        function hasInArr(id,idArr) {
+            for(var i=0;i<idArr.length;i++){
+                if(id==$(idArr[i]).val()){
+                    return true;
+                }
+            }
+            return false;
+        }
+        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 = "86";
+                console.log(file);
+                var timestamp = new Date().getTime();
+
+                var storeAs = "newxgccpm-test/attachment-file/basedData/" + timestamp + "/" + file['name'];
+                var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
+                /*将这段字符串存到数据库即可*/
+                var divId = "_attachment";
+                $("#addFile" + divId).show();
+                multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, "0");
+            }
+        }
+
+        function gistdataInsertTitle(tValue){
+            var files = $("#gistdata_file")[0].files;
+            for(var i=0;i<files.length;i++) {
+                var file = files[i];
+                var gistdataId = "";
+                var gistdataFlag = "152";
+                console.log(file);
+                var timestamp = new Date().getTime();
+
+                var storeAs = "newxgccpm-test/attachment-file/basedData/" + timestamp + "/" + file['name'];
+                var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
+                /*将这段字符串存到数据库即可*/
+                var divId = "_gistdata";
+                $("#addFile" + divId).show();
+                multipartUploadWithSts(storeAs, file, gistdataId, gistdataFlag, uploadPath, divId, "0");
+            }
+        }
+
+        function otherInsertTitle(tValue){
+            var files = $("#other_file")[0].files;
+            for(var i=0;i<files.length;i++) {
+                var file = files[i];
+                var attachmentId = "";
+                var attachmentFlag = "153";
+                console.log(file);
+                var timestamp = new Date().getTime();
+
+                var storeAs = "newxgccpm-test/attachment-file/basedData/" + timestamp + "/" + file['name'];
+                var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
+                /*将这段字符串存到数据库即可*/
+                var divId = "_other";
+                $("#addFile" + divId).show();
+                multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, "0");
+            }
+        }
+        
+        function selectNum() {
+			top.layer.open({
+				type: 2,
+				area: ['50%','95%'],
+				title:'选择报告号',
+				content: '${ctx}/projectreportnum/projectReportNum/select',
+				btn: ['确定','关闭'],
+				btn1: function(index, layero){
+					var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var item = iframeWin.getSelectedItem();
+					if(item === 'false'){
+						iframeWin.layer.msg('请选择一条数据', {icon: 5});
+					}else {
+						$("#number").val(item)
+						top.layer.close(index);//关闭对话框。
+					}
+				},
+				btn2: function(index){
+				}
+
+			})
+		}
+        function openDialogre(title,url,width,height,formId){
+
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                skin: 'three-btns',
+                maxmin: true, //开启最大化最小化按钮
+                content: url ,
+                btn: ['提交','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    inputForm.attr("action","${ctx}/projectcontentinfo/projectcontentinfo/ajaxsaveBaseData");//表单提交成功后,从服务器返回的url在当前tab中展示
+                    var $document = iframeWin.contentWindow.document;
+                    formSubmitAjax($document,formId,index);
+                },
+                btn2: function(index){
+                }
+            });
+        }
+        function formSubmitAjax($document,inputForm,index){
+            var validateForm = $($document.getElementById(inputForm)).validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            if(validateForm.form()){
+                $($document.getElementById(inputForm)).ajaxSubmit({
+                    success:function(data) {
+                        if(!data.success){
+                            top.layer.msg("保存依据资料信息异常!",{icon:2});
+                            return false;
+                        }
+                        var idx = $("#workBaseDataList tr").length;
+                        addRowBaseData("#workBaseDataList",idx,workBaseDataTpl,data.body.workBasedData);
+                        parent.layer.msg(data.msg,{icon:1});
+                        top.layer.close(index)
+                    }
+                });
+            }
+        }
+
+        function delRowBaseData(obj, prefix,userId){
+            var id = $(prefix+"_id").val();
+            /* var createBy = $(prefix+"_userId").val();*/
+            var currentUser = '${fns:getUser().id}';
+            var contentId = '${projectcontentinfo.projectContentData.id}';
+            console.log(contentId);
+
+            $.ajax({
+                type:"post",
+                url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
+                data:{"contentId":contentId,"basedId":id},
+                dataType:"json",
+                success:function(data){
+                    if(data.success) {
+                        $(obj).parent().parent().remove();
+                        /*parent.parent.refreshTrees();*/
+                        if(data.body.inuse){
+                            return;
+                        }
+                        if (currentUser == userId) {
+                            confirmDelete('是否同步删除资料库的文件?','${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+id+'&id=${projectcontentinfo.id}&type=1');
+                        }
+                    }else {
+                        top.layer.msg("删除依据资料失败!", {icon: 0});
+                    }
+                }
+            })
+            return;
+        }
+
+		function reviewAudits(mess, href,obj,remarks){
+				console.log(remarks);
+				var remark = $(remarks);
+				remark.val("确认");
+			    $("#audit"+obj).val("1");
+				$("#check1"+obj).attr("style","display:none");
+				$("#check2"+obj).attr("style","display");
+				top.layer.msg("已确认!", {icon: 1});
+			return false;
+		}
+
+		function getFee() {
+			var rf = $("#reviewFee").val();
+			var af = $("#approvalFee").val();
+			if(rf != ''&& af !=''){
+				var hf = parseInt(rf)-parseInt(af);
+				var rate = Math.round(parseInt(hf) / parseInt(rf) * 100) / 100 * 100
+				$("#verifyFee").val(hf);
+				$("#verifyRate").val(rate);
+			}
+			if(af !=''){
+				$("#consultFee").val(af)
+			}
+		}
+
+        function addReview(obj) {
+            var infoId = $("#id").val();
+            var name = $("#name").val();
+            $.ajax({
+                type:"post",
+                url:'${ctx}/projectcontentinfo/projectContentData/addReview',
+                data:{"reviewId":obj,"name":name,"infoId":infoId},
+                dataType:"json",
+                success:function(data){
+                    if(data.success) {
+                        $("#projectContentDataList2").html("");
+						var list = eval(data.body.list);
+						dataList=list
+                        for(var i in list){
+                            var tr = "<tr>" +
+                                "<td>" +
+                                "<input id=\"projectReviewList"+i+"_id\" name=\"projectReportData.projectReviewList["+i+"].id\" type=\"hidden\" value=\""+list[i].id+"\"/>" +
+                                "<input id=\"projectReviewList"+i+"_delFalg\" name=\"projectReportData.projectReviewList["+i+"].delFalg\" type=\"hidden\" value=\"1\"/>" +
+                                "<input id=\"projectReviewList"+i+"_remarks\" name=\"projectReportData.projectReviewList["+i+"].remarks\" type=\"hidden\" value=\"\"/>" +
+                                ""+(parseInt(i)+1)+"" +
+                                "</td>" +
+                                "<td>" +
+                                ""+list[i].standardDetail+"" +
+                                "</td>" +
+                                "<td>" +
+                               	"<div id = \"check1"+list[i].id+"\">\n" +
+                                "<input type=\"hidden\" id=\"audit"+list[i].id+"\" value=\"0\"/>\n" +
+                                "<a href=\"projectReviewList"+list[i]+"\" onclick=\"return reviewAudits('确认要审核该质量复核内容吗?', this.href,'"+list[i].id+"','#projectReviewList"+i+"_remarks')\" style=\"color:#fff;\" class=\"op-btn op-btn-edit\">确认</a>" +
+                                "</div>\n" +
+                                "<div id = \"check2"+list[i].id+"\" class=\"check-ok\" style=\"display: none\">" +
+                                "<i class=\"fa fa-check\"></i>" +
+                                "</div>"
+                                "</td>" +
+                                "</tr>";
+                            $("#projectContentDataList2").append(tr);
+                        }
+                    }else {
+                        top.layer.msg("获取数据失败!", {icon: 0});
+                    }
+                }
+            })
+        }
+
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container${container}">
+		<form:form id="inputForm" modelAttribute="projectcontentinfo" action="${ctx}/ruralProject/ruralCostProjectMessage/saveReport" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<form:hidden path="name"/>
+		<form:hidden path="parentIds"/>
+		<form:hidden path="edit"/>
+		<form:hidden path="projectReportData.id"/>
+		<form:hidden path="projectReportData.createBy.id"/>
+		<form:hidden path="project.id"/>
+		<sys:message content="${message}"/>
+		<div class="form-group layui-row first lw12">
+			<div class="form-group-label"><h2>基本信息</h2></div>
+			<%--<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label"><span class="require-item">*</span>报告编号:</label>
+				<div class="layui-input-block">
+					<div class="input-group">
+						<form:input  path="projectReportData.number" onclick="selectNum()" id="number" htmlEscape="false" readonly="true" class="form-control layui-input required"/>
+						<span class="input-group-btn" onclick="selectNum()">
+								<label class="form-status">
+									<c:choose>
+										<c:when test="${not empty projectcontentinfo.projectReportData.status}">${fns:getDictLabel(projectcontentinfo.projectReportData.status, 'audit_state', '')}
+										</c:when>
+										<c:otherwise>新增</c:otherwise>
+									</c:choose></label>
+							 </span>
+					</div>
+				</div>
+			</div>--%>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label"><span class="require-item">*</span>成果类型:</label>
+				<div class="layui-input-block">
+					<form:select  path="projectReportData.achievementType" class="form-control simple-select required">
+						<form:option value="" label=""/>
+						<form:options items="${fns:getMainDictList('achievement_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+					</form:select>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label"><span class="require-item">*</span>签章类型:</label>
+				<div class="layui-input-block">
+					<form:select path="projectReportData.reportType" class="form-control simple-select required">
+						<form:option value="" label=""/>
+						<form:option value="电子章" label="电子章"/>
+						<form:option value="实体章" label="实体章"/>
+					</form:select>
+				</div>
+			</div>
+		</div>
+			<div class="form-group layui-row first lw12">
+				<div class="form-group-label"><h2>项目信息</h2></div>
+					<div class="layui-item layui-col-sm6">
+						<label class="layui-form-label">送审价(元):</label>
+						<div class="layui-input-block with-icon">
+							<form:input id="reviewFee" path="projectReportData.reviewFee" htmlEscape="false"  class="form-control layui-input number" onchange="getFee()"/>
+						</div>
+					</div>
+					<div class="layui-item layui-col-sm6">
+						<label class="layui-form-label">审定价(元):</label>
+						<div class="layui-input-block with-icon">
+							<form:input id="approvalFee" path="projectReportData.approvalFee" htmlEscape="false"  class="form-control layui-input number" onchange="getFee()"/>
+						</div>
+					</div>
+					<div class="layui-item layui-col-sm6">
+						<label class="layui-form-label">合同价(元):</label>
+						<div class="layui-input-block with-icon">
+							<form:input id="contractFee" path="projectReportData.contractFee" htmlEscape="false"  class="form-control layui-input number"/>
+						</div>
+					</div>
+					<div class="layui-item layui-col-sm6">
+						<label class="layui-form-label">核增核减额(元):</label>
+						<div class="layui-input-block with-icon">
+							<form:input id="verifyFee" path="projectReportData.verifyFee" htmlEscape="false"  class="form-control layui-input number" readonly="true"/>
+						</div>
+					</div>
+					<div class="layui-item layui-col-sm6">
+						<label class="layui-form-label">核增核减率(%):</label>
+						<div class="layui-input-block with-icon">
+							<form:input id="verifyRate" path="projectReportData.verifyRate" htmlEscape="false"  class="form-control layui-input number" readonly="true"/>
+						</div>
+					</div>
+					<div class="layui-item layui-col-sm6">
+						<label class="layui-form-label">咨询标的额(元):</label>
+						<div class="layui-input-block with-icon">
+							<form:input id="consultFee" path="projectReportData.consultFee" htmlEscape="false"  class="form-control layui-input number" readonly="true"/>
+						</div>
+					</div>
+					<div class="layui-item layui-col-sm6">
+						<label class="layui-form-label">土建造价(元):</label>
+						<div class="layui-input-block with-icon">
+							<form:input id="buildingFee" path="projectReportData.buildingFee" htmlEscape="false"  class="form-control layui-input number"/>
+						</div>
+					</div>
+					<div class="layui-item layui-col-sm6">
+						<label class="layui-form-label">安装造价(元):</label>
+						<div class="layui-input-block with-icon">
+							<form:input id="installFee" path="projectReportData.installFee" htmlEscape="false"  class="form-control layui-input number"/>
+						</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="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>
+				<div id="addFile_attachment" style="display: none" class="upload-progress">
+					<span id="fileName_attachment" ></span>
+					<span id="_attachment" ></span>
+					<b><span id="baifenbi_attachment" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+				<span id="attachment_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${projectcontentinfo.projectReportData.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<c:if test="${workClientAttachment.divIdType eq '_attachment'}">
+							<tr>
+									<%-- <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}"></td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="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>
+
+										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+											<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>
+										</c:if>
+									</div>
+								</td>
+							</tr>
+							</c:if>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>依据性资料</h2></div>
+				<div class="layui-item nav-btns">
+					<a id="gistdata_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>
+				<div id="addFile_gistdata" style="display: none" class="upload-progress">
+					<span id="fileName_gistdata" ></span>
+					<span id="_gistdata" ></span>
+					<b><span id="baifenbi_gistdata" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
+				<span id="gistdata_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="gistdata_upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_gistdata">
+						<c:forEach items="${projectcontentinfo.projectReportData.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<c:if test="${workClientAttachment.divIdType eq '_gistdata'}">
+							<tr>
+									<%-- <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}"></td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="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>
+
+										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+											<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFileGistdata')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+										</c:if>
+									</div>
+								</td>
+							</tr>
+							</c:if>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>其他文件</h2></div>
+				<div class="layui-item nav-btns">
+					<a id="other_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>
+				<div id="addFile_other" style="display: none" class="upload-progress">
+					<span id="fileName_other" ></span>
+					<span id="_other" ></span>
+					<b><span id="baifenbi_other" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
+				<span id="other_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable_other" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_other">
+						<c:forEach items="${projectcontentinfo.projectReportData.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<c:if test="${workClientAttachment.divIdType eq '_other'}">
+							<tr>
+									<%-- <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}"></td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="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>
+
+										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+											<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFileOther')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+										</c:if>
+									</div>
+								</td>
+							</tr>
+							</c:if>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+
+
+			<c:if test="${not empty projectcontentinfo.infoId}">
+				<div class="pull-right">
+					<button id="btnSubmit" class="btn btn-primary btn-rounded btn-outline btn-sm" type="submit" onclick="$('#edit').val('edit')"><i class="fa fa-chevron-up"></i>暂 存</button>
+				</div>
+			</c:if>
+		<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 605 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/reportModify.jsp

@@ -0,0 +1,605 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>报告详情管理</title>
+	<meta name="decorator" content="default"/>
+	<style>
+		label.error{
+			top:40px;
+			left:0;
+		}
+	</style>
+	<script type="text/javascript">
+        var validateForm;
+        var dataList;
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+                if(obj == 1){
+                    $("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessage/reportAudit");
+                }else{
+                    $("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessage/reportAudit");
+                }
+                $("#inputForm").submit();
+                return true;
+            }
+
+            return false;
+        }
+        $(document).ready(function() {
+            validateForm = $("#inputForm").validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $("#messageBox").text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            laydate.render({
+                elem: '#reportDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+            $("#attachment_btn").click(function () {
+                $("#attachment_file").click();
+            });;
+            $("#gistdata_btn").click(function () {
+                $("#gistdata_file").click();
+            });;
+            $("#other_btn").click(function () {
+                $("#other_file").click();
+            });
+        });
+        function hasInArr(id,idArr) {
+            for(var i=0;i<idArr.length;i++){
+                if(id==$(idArr[i]).val()){
+                    return true;
+                }
+            }
+            return false;
+        }
+        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 = "86";
+                console.log(file);
+                var timestamp = new Date().getTime();
+
+                var storeAs = "newxgccpm-test/attachment-file/basedData/" + timestamp + "/" + file['name'];
+                var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
+                /*将这段字符串存到数据库即可*/
+                var divId = "_attachment";
+                $("#addFile" + divId).show();
+                multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, "0");
+            }
+        }
+
+        function gistdataInsertTitle(tValue){
+            var files = $("#gistdata_file")[0].files;
+            for(var i=0;i<files.length;i++) {
+                var file = files[i];
+                var gistdataId = "";
+                var gistdataFlag = "152";
+                console.log(file);
+                var timestamp = new Date().getTime();
+
+                var storeAs = "newxgccpm-test/attachment-file/basedData/" + timestamp + "/" + file['name'];
+                var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
+                /*将这段字符串存到数据库即可*/
+                var divId = "_gistdata";
+                $("#addFile" + divId).show();
+                multipartUploadWithSts(storeAs, file, gistdataId, gistdataFlag, uploadPath, divId, "0");
+            }
+        }
+
+        function otherInsertTitle(tValue){
+            var files = $("#other_file")[0].files;
+            for(var i=0;i<files.length;i++) {
+                var file = files[i];
+                var attachmentId = "";
+                var attachmentFlag = "153";
+                console.log(file);
+                var timestamp = new Date().getTime();
+
+                var storeAs = "newxgccpm-test/attachment-file/basedData/" + timestamp + "/" + file['name'];
+                var uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
+                /*将这段字符串存到数据库即可*/
+                var divId = "_other";
+                $("#addFile" + divId).show();
+                multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, "0");
+            }
+        }
+        
+        function selectNum() {
+			top.layer.open({
+				type: 2,
+				area: ['50%','95%'],
+				title:'选择报告号',
+				content: '${ctx}/projectreportnum/projectReportNum/select',
+				btn: ['确定','关闭'],
+				btn1: function(index, layero){
+					var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var item = iframeWin.getSelectedItem();
+					if(item === 'false'){
+						iframeWin.layer.msg('请选择一条数据', {icon: 5});
+					}else {
+						$("#number").val(item)
+						top.layer.close(index);//关闭对话框。
+					}
+				},
+				btn2: function(index){
+				}
+
+			})
+		}
+        function openDialogre(title,url,width,height,formId){
+
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                skin: 'three-btns',
+                maxmin: true, //开启最大化最小化按钮
+                content: url ,
+                btn: ['提交','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    inputForm.attr("action","${ctx}/projectcontentinfo/projectcontentinfo/ajaxsaveBaseData");//表单提交成功后,从服务器返回的url在当前tab中展示
+                    var $document = iframeWin.contentWindow.document;
+                    formSubmitAjax($document,formId,index);
+                },
+                btn2: function(index){
+                }
+            });
+        }
+        function formSubmitAjax($document,inputForm,index){
+            var validateForm = $($document.getElementById(inputForm)).validate({
+                submitHandler: function(form){
+                    loading('正在提交,请稍等...');
+                    form.submit();
+                },
+                errorContainer: "#messageBox",
+                errorPlacement: function(error, element) {
+                    $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                        error.appendTo(element.parent().parent());
+                    } else {
+                        error.insertAfter(element);
+                    }
+                }
+            });
+            if(validateForm.form()){
+                $($document.getElementById(inputForm)).ajaxSubmit({
+                    success:function(data) {
+                        if(!data.success){
+                            top.layer.msg("保存依据资料信息异常!",{icon:2});
+                            return false;
+                        }
+                        var idx = $("#workBaseDataList tr").length;
+                        addRowBaseData("#workBaseDataList",idx,workBaseDataTpl,data.body.workBasedData);
+                        parent.layer.msg(data.msg,{icon:1});
+                        top.layer.close(index)
+                    }
+                });
+            }
+        }
+
+        function delRowBaseData(obj, prefix,userId){
+            var id = $(prefix+"_id").val();
+            /* var createBy = $(prefix+"_userId").val();*/
+            var currentUser = '${fns:getUser().id}';
+            var contentId = '${projectcontentinfo.projectContentData.id}';
+            console.log(contentId);
+
+            $.ajax({
+                type:"post",
+                url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
+                data:{"contentId":contentId,"basedId":id},
+                dataType:"json",
+                success:function(data){
+                    if(data.success) {
+                        $(obj).parent().parent().remove();
+                        /*parent.parent.refreshTrees();*/
+                        if(data.body.inuse){
+                            return;
+                        }
+                        if (currentUser == userId) {
+                            confirmDelete('是否同步删除资料库的文件?','${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+id+'&id=${projectcontentinfo.id}&type=1');
+                        }
+                    }else {
+                        top.layer.msg("删除依据资料失败!", {icon: 0});
+                    }
+                }
+            })
+            return;
+        }
+
+		function reviewAudits(mess, href,obj,remarks){
+				console.log(remarks);
+				var remark = $(remarks);
+				remark.val("确认");
+			    $("#audit"+obj).val("1");
+				$("#check1"+obj).attr("style","display:none");
+				$("#check2"+obj).attr("style","display");
+				top.layer.msg("已确认!", {icon: 1});
+			return false;
+		}
+
+		function getFee() {
+			var rf = $("#reviewFee").val();
+			var af = $("#approvalFee").val();
+			if(rf != ''&& af !=''){
+				var hf = parseInt(rf)-parseInt(af);
+				var rate = Math.round(parseInt(hf) / parseInt(rf) * 100) / 100 * 100
+				$("#verifyFee").val(hf);
+				$("#verifyRate").val(rate);
+			}
+			if(af !=''){
+				$("#consultFee").val(af)
+			}
+		}
+
+        function addReview(obj) {
+            var infoId = $("#id").val();
+            var name = $("#name").val();
+            $.ajax({
+                type:"post",
+                url:'${ctx}/projectcontentinfo/projectContentData/addReview',
+                data:{"reviewId":obj,"name":name,"infoId":infoId},
+                dataType:"json",
+                success:function(data){
+                    if(data.success) {
+                        $("#projectContentDataList2").html("");
+						var list = eval(data.body.list);
+						dataList=list
+                        for(var i in list){
+                            var tr = "<tr>" +
+                                "<td>" +
+                                "<input id=\"projectReviewList"+i+"_id\" name=\"projectReportData.projectReviewList["+i+"].id\" type=\"hidden\" value=\""+list[i].id+"\"/>" +
+                                "<input id=\"projectReviewList"+i+"_delFalg\" name=\"projectReportData.projectReviewList["+i+"].delFalg\" type=\"hidden\" value=\"1\"/>" +
+                                "<input id=\"projectReviewList"+i+"_remarks\" name=\"projectReportData.projectReviewList["+i+"].remarks\" type=\"hidden\" value=\"\"/>" +
+                                ""+(parseInt(i)+1)+"" +
+                                "</td>" +
+                                "<td>" +
+                                ""+list[i].standardDetail+"" +
+                                "</td>" +
+                                "<td>" +
+                               	"<div id = \"check1"+list[i].id+"\">\n" +
+                                "<input type=\"hidden\" id=\"audit"+list[i].id+"\" value=\"0\"/>\n" +
+                                "<a href=\"projectReviewList"+list[i]+"\" onclick=\"return reviewAudits('确认要审核该质量复核内容吗?', this.href,'"+list[i].id+"','#projectReviewList"+i+"_remarks')\" style=\"color:#fff;\" class=\"op-btn op-btn-edit\">确认</a>" +
+                                "</div>\n" +
+                                "<div id = \"check2"+list[i].id+"\" class=\"check-ok\" style=\"display: none\">" +
+                                "<i class=\"fa fa-check\"></i>" +
+                                "</div>"
+                                "</td>" +
+                                "</tr>";
+                            $("#projectContentDataList2").append(tr);
+                        }
+                    }else {
+                        top.layer.msg("获取数据失败!", {icon: 0});
+                    }
+                }
+            })
+        }
+
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container${container}">
+		<form:form id="inputForm" modelAttribute="projectcontentinfo" action="${ctx}/ruralProject/ruralCostProjectMessage/reportAudit" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+		<form:hidden path="name"/>
+		<form:hidden path="parentIds"/>
+		<form:hidden path="edit"/>
+		<form:hidden path="projectReportData.id"/>
+		<form:hidden path="projectReportData.createBy.id"/>
+		<form:hidden path="project.id"/>
+		<sys:message content="${message}"/>
+		<div class="form-group layui-row first lw12">
+			<div class="form-group-label"><h2>基本信息</h2></div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label"><span class="require-item">*</span>成果类型:</label>
+				<div class="layui-input-block">
+					<form:select  path="projectReportData.achievementType" class="form-control simple-select required">
+						<form:option value="" label=""/>
+						<form:options items="${fns:getMainDictList('achievement_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+					</form:select>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label"><span class="require-item">*</span>签章类型:</label>
+				<div class="layui-input-block">
+					<form:select path="projectReportData.reportType" class="form-control simple-select required">
+						<form:option value="" label=""/>
+						<form:option value="电子章" label="电子章"/>
+						<form:option value="实体章" label="实体章"/>
+					</form:select>
+				</div>
+			</div>
+		</div>
+			<div class="form-group layui-row first lw12">
+				<div class="form-group-label"><h2>项目信息</h2></div>
+					<div class="layui-item layui-col-sm6">
+						<label class="layui-form-label">送审价(元):</label>
+						<div class="layui-input-block with-icon">
+							<form:input id="reviewFee" path="projectReportData.reviewFee" htmlEscape="false"  class="form-control layui-input number" onchange="getFee()"/>
+						</div>
+					</div>
+					<div class="layui-item layui-col-sm6">
+						<label class="layui-form-label">审定价(元):</label>
+						<div class="layui-input-block with-icon">
+							<form:input id="approvalFee" path="projectReportData.approvalFee" htmlEscape="false"  class="form-control layui-input number" onchange="getFee()"/>
+						</div>
+					</div>
+					<div class="layui-item layui-col-sm6">
+						<label class="layui-form-label">合同价(元):</label>
+						<div class="layui-input-block with-icon">
+							<form:input id="contractFee" path="projectReportData.contractFee" htmlEscape="false"  class="form-control layui-input number"/>
+						</div>
+					</div>
+					<div class="layui-item layui-col-sm6">
+						<label class="layui-form-label">核增核减额(元):</label>
+						<div class="layui-input-block with-icon">
+							<form:input id="verifyFee" path="projectReportData.verifyFee" htmlEscape="false"  class="form-control layui-input number" readonly="true"/>
+						</div>
+					</div>
+					<div class="layui-item layui-col-sm6">
+						<label class="layui-form-label">核增核减率(%):</label>
+						<div class="layui-input-block with-icon">
+							<form:input id="verifyRate" path="projectReportData.verifyRate" htmlEscape="false"  class="form-control layui-input number" readonly="true"/>
+						</div>
+					</div>
+					<div class="layui-item layui-col-sm6">
+						<label class="layui-form-label">咨询标的额(元):</label>
+						<div class="layui-input-block with-icon">
+							<form:input id="consultFee" path="projectReportData.consultFee" htmlEscape="false"  class="form-control layui-input number" readonly="true"/>
+						</div>
+					</div>
+					<div class="layui-item layui-col-sm6">
+						<label class="layui-form-label">土建造价(元):</label>
+						<div class="layui-input-block with-icon">
+							<form:input id="buildingFee" path="projectReportData.buildingFee" htmlEscape="false"  class="form-control layui-input number"/>
+						</div>
+					</div>
+					<div class="layui-item layui-col-sm6">
+						<label class="layui-form-label">安装造价(元):</label>
+						<div class="layui-input-block with-icon">
+							<form:input id="installFee" path="projectReportData.installFee" htmlEscape="false"  class="form-control layui-input number"/>
+						</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="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>
+				<div id="addFile_attachment" style="display: none" class="upload-progress">
+					<span id="fileName_attachment" ></span>
+					<span id="_attachment" ></span>
+					<b><span id="baifenbi_attachment" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+				<span id="attachment_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${projectcontentinfo.projectReportData.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<c:if test="${workClientAttachment.divIdType eq '_attachment'}">
+							<tr>
+									<%-- <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}"></td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="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>
+
+										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+											<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>
+										</c:if>
+									</div>
+								</td>
+							</tr>
+							</c:if>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>依据性资料</h2></div>
+				<div class="layui-item nav-btns">
+					<a id="gistdata_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>
+				<div id="addFile_gistdata" style="display: none" class="upload-progress">
+					<span id="fileName_gistdata" ></span>
+					<span id="_gistdata" ></span>
+					<b><span id="baifenbi_gistdata" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
+				<span id="gistdata_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="gistdata_upTable" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_gistdata">
+						<c:forEach items="${projectcontentinfo.projectReportData.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<c:if test="${workClientAttachment.divIdType eq '_gistdata'}">
+							<tr>
+									<%-- <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}"></td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="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>
+
+										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+											<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFileGistdata')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+										</c:if>
+									</div>
+								</td>
+							</tr>
+							</c:if>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>其他文件</h2></div>
+				<div class="layui-item nav-btns">
+					<a id="other_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>
+				</div>
+				<div id="addFile_other" style="display: none" class="upload-progress">
+					<span id="fileName_other" ></span>
+					<span id="_other" ></span>
+					<b><span id="baifenbi_other" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
+				<span id="other_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable_other" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>文件预览</th>
+							<th>上传人</th>
+							<th>上传时间</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_other">
+						<c:forEach items="${projectcontentinfo.projectReportData.workAttachments}" var = "workClientAttachment" varStatus="status">
+							<c:if test="${workClientAttachment.divIdType eq '_other'}">
+							<tr>
+									<%-- <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}"></td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="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>
+
+										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
+											<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFileOther')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
+										</c:if>
+									</div>
+								</td>
+							</tr>
+							</c:if>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+		<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 277 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/reportView.jsp

@@ -0,0 +1,277 @@
+<%@ 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">
+
+	</script>
+</head>
+
+<body>
+<div class="single-form">
+	<div class="container${container}  view-form">
+		<form:form id="inputForm" modelAttribute="projectcontentinfo" action="${ctx}/ruralProject/ruralCostProjectMessage/reportAudit" method="post" class="form-horizontal">
+		<div class="form-group layui-row first lw12">
+			<div class="form-group-label"><h2>基本信息</h2></div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label"><span class="require-item">*</span>成果类型:</label>
+				<div class="layui-input-block">
+					<form:input path="projectReportData.achievementType" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">签章类型:</label>
+				<div class="layui-input-block">
+					<form:input path="projectReportData.ReportType" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+				</div>
+			</div>
+		</div>
+		<div class="form-group layui-row first lw12">
+			<div class="form-group-label"><h2>项目信息</h2></div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">送审价(元):</label>
+				<div class="layui-input-block with-icon">
+					<form:input id="reviewFee" path="projectReportData.reviewFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">审定价(元):</label>
+				<div class="layui-input-block with-icon">
+					<form:input id="approvalFee" path="projectReportData.approvalFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">合同价(元):</label>
+				<div class="layui-input-block with-icon">
+					<form:input id="contractFee" path="projectReportData.contractFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">核增核减额(元):</label>
+				<div class="layui-input-block with-icon">
+					<form:input id="verifyFee" path="projectReportData.verifyFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">核增核减率(%):</label>
+				<div class="layui-input-block with-icon">
+					<form:input id="verifyRate" path="projectReportData.verifyRate" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">咨询标的额(元):</label>
+				<div class="layui-input-block with-icon">
+					<form:input id="consultFee" path="projectReportData.consultFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">土建造价(元):</label>
+				<div class="layui-input-block with-icon">
+					<form:input id="buildingFee" path="projectReportData.buildingFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+				</div>
+			</div>
+			<div class="layui-item layui-col-sm6">
+				<label class="layui-form-label">安装造价(元):</label>
+				<div class="layui-input-block with-icon">
+					<form:input id="installFee" path="projectReportData.installFee" htmlEscape="false"  class="form-control layui-input" readonly="true"/>
+				</div>
+			</div>
+		</div>
+		<div class="form-group layui-row">
+			<div class="form-group-label"><h2>报告文件</h2></div>
+			<div id="addFile_attachment" style="display: none" class="upload-progress">
+				<span id="fileName_attachment" ></span>
+				<b><span id="baifenbi_attachment" ></span></b>
+				<div class="progress">
+					<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
+					</div>
+				</div>
+			</div>
+			<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
+			<span id="attachment_title"></span>
+			<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+				<table id="upTable" class="table table-bordered table-condensed details">
+					<thead>
+					<tr>
+						<th>文件预览</th>
+						<th>上传人</th>
+						<th>上传时间</th>
+						<th width="150px">操作</th>
+					</tr>
+					</thead>
+					<tbody id="file_attachment">
+					<c:forEach items="${projectcontentinfo.projectReportData.workAttachments}" var = "workClientAttachment" varStatus="status">
+						<c:if test="${workClientAttachment.divIdType eq '_attachment'}">
+							<tr>
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="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>
+									</div>
+								</td>
+							</tr>
+						</c:if>
+					</c:forEach>
+					</tbody>
+				</table>
+			</div>
+		</div>
+
+		<div class="form-group layui-row">
+			<div class="form-group-label"><h2>依据性资料</h2></div>
+			<div id="addFile_gistdata" style="display: none" class="upload-progress">
+				<span id="fileName_gistdata" ></span>
+				<b><span id="baifenbi_gistdata" ></span></b>
+				<div class="progress">
+					<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
+					</div>
+				</div>
+			</div>
+			<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
+			<span id="gistdata_title"></span>
+			<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+				<table id="gistdata_upTable" class="table table-bordered table-condensed details">
+					<thead>
+					<tr>
+						<th>文件预览</th>
+						<th>上传人</th>
+						<th>上传时间</th>
+						<th width="150px">操作</th>
+					</tr>
+					</thead>
+					<tbody id="file_gistdata">
+					<c:forEach items="${projectcontentinfo.projectReportData.workAttachments}" var = "workClientAttachment" varStatus="status">
+						<c:if test="${workClientAttachment.divIdType eq '_gistdata'}">
+							<tr>
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="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>
+									</div>
+								</td>
+							</tr>
+						</c:if>
+					</c:forEach>
+					</tbody>
+				</table>
+			</div>
+		</div>
+
+		<div class="form-group layui-row">
+			<div class="form-group-label"><h2>其他文件</h2></div>
+			<div id="addFile_other" style="display: none" class="upload-progress">
+				<span id="fileName_other" ></span>
+				<b><span id="baifenbi_other" ></span></b>
+				<div class="progress">
+					<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
+					</div>
+				</div>
+			</div>
+			<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
+			<span id="other_title"></span>
+			<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+				<table id="upTable_other" class="table table-bordered table-condensed details">
+					<thead>
+					<tr>
+						<th>文件预览</th>
+						<th>上传人</th>
+						<th>上传时间</th>
+						<th width="150px">操作</th>
+					</tr>
+					</thead>
+					<tbody id="file_other">
+					<c:forEach items="${projectcontentinfo.projectReportData.workAttachments}" var = "workClientAttachment" varStatus="status">
+						<c:if test="${workClientAttachment.divIdType eq '_other'}">
+							<tr>
+								<c:choose>
+									<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+															   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+										<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+												<td><a class="attention-info" href="javascript:void(0)" onclick="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>
+									</div>
+								</td>
+							</tr>
+						</c:if>
+					</c:forEach>
+					</tbody>
+				</table>
+			</div>
+		</div>
+
+
+		<c:if test="${not empty projectcontentinfo.projectReportData.act.procInsId}">
+		<div class="form-group layui-row">
+			<div class="form-group-label"><h2>审批流程</h2></div>
+			<div class="layui-item layui-col-xs12 form-table-container" >
+				<act:flowChart procInsId="${projectcontentinfo.projectReportData.act.procInsId}"/>
+				<act:histoicFlow procInsId="${projectcontentinfo.projectReportData.act.procInsId}"/>
+			</div>
+		</div>
+		</c:if>
+		<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+</body>
+</html>

+ 470 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectMessageList.jsp

@@ -0,0 +1,470 @@
+<%@ 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">
+        $(document).ready(function() {
+
+            //搜索框收放
+            $('#moresee').click(function(){
+                if($('#moresees').is(':visible'))
+                {
+                    $('#moresees').slideUp(0,resizeListWindow2);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+                }else{
+                    $('#moresees').slideDown(0,resizeListWindow2);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+                }
+            });
+            laydate.render({
+                elem: '#beginDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+            laydate.render({
+                elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+            });
+        });
+
+        function reset() {
+            $("#searchForm").resetForm();
+        }
+
+        function openDialog(title,url,width,height,target) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                content: url,
+                skin: 'three-btns',
+                btn: ['送审', '暂存', '关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }else {
+                        return false;
+                    }
+                },
+                btn3: function (index) {
+                }
+            });
+        }
+
+        function openDialogre(title,url,width,height,target,buttons) {
+
+            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+                width = 'auto';
+                height = 'auto';
+            } else {//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            var split = buttons.split(",");
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                skin: 'three-btns',
+                content: url,
+                btn: split,
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    if(split.length==2){return}
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }else {
+                        return false;
+                    }
+                },
+                btn3: function (index) {
+                }
+            });
+        }
+	</script>
+	<style>
+		body{
+			background-color:transparent;
+			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+			color:#ffffff;
+			background-color:rgba(255,255,255,0);
+			height:100%;
+		}
+	</style>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+	<div class="layui-row">
+		<div class="full-width fl">
+			<div class="layui-row contentShadow shadowLR" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="ruralProjectRecords" action="${ctx}/ruralProject/ruralCostProjectMessage/" 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">
+								<form:input path="workContractInfo.name" htmlEscape="false" maxlength="255"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">委托方:</label>
+							<div class="layui-input-block">
+								<form:input path="workContractInfo.client.name" 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 class="layui-item query athird ">
+							<label class="layui-form-label">报告状态:</label>
+							<div class="layui-input-block">
+								<form:select path="projectReportStatus" class=" form-control  simple-select">
+									<form:option value="" label=""/>
+									<form:options items="${fns:getDictList('audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+								</form:select>
+							</div>
+						</div>
+						<div class="layui-item query athird ">
+							<label class="layui-form-label">归档状态:</label>
+							<div class="layui-input-block">
+								<form:select path="projectReportRecordStatus" class=" form-control  simple-select">
+									<form:option value="" label=""/>
+									<form:options items="${fns:getDictList('audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+								</form:select>
+							</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/ruralCostProjectRecords/view?id=" + d.id +"','95%', '95%')\">" + d.projName + "</a>";
+                    }}
+                ,{field:'projId',align:'center', title: '项目编号',minWidth:150,templet:function(d){
+                        return "<a class=\"attention-info\" title=\"" + d.projId + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/ruralProject/ruralCostProjectRecords/view?id=" + d.id + "','95%', '95%')\">" + d.projId + "</a>";
+                    }}
+                ,{field:'projectReportNumber', align:'center',title: '报告编号',minWidth:200,templet:function(d){
+                        return "<a class=\"attention-info\" title=\"" + d.contract + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看报告信息', '${ctx}/ruralProject/ruralCostProjectMessage/modify?projectId=" + d.id + "&view=view','95%', '95%')\">" + d.projectReportNumber + "</a>";
+					}}
+                ,{field:'recodeNum', align:'center',title: '归档申请编号',minWidth:200,templet:function(d){
+                        return "<a class=\"attention-info\" title=\"" + d.contract + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看归档信息', '${ctx}/ruralProject/ruralCostProjectMessage/formRecord?reportId=" + d.id + "&view=view','95%', '95%')\">" + d.recodeNum + "</a>";
+
+					}}
+                ,{field:'contract', align:'center',title: '合同名称',minWidth:200,templet:function(d){
+                    	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}
+                ,{align:'center', title: '报告状态',  width:70,templet:function(d){
+                        var st = getAuditState(d.projectReportStatus);
+                        if(st.action)
+                            var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/ruralProject/ruralCostProjectMessage/getProcessOne?id=" + d.id + "&projectReportData.id=" + d.bid + "&type=2','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+                        else
+                            var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+                        return xml;
+                    }}
+                ,{align:'center', title: '归档状态',  width:70,templet:function(d){
+                        var st = getAuditState(d.projectReportRecordStatus);
+                        if(st.action)
+                            var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/ruralProject/ruralCostProjectMessage/getReportRecordProcessOne?processInstanceId=" + d.prrProcessInstanceId + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+                        else
+                            var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+                        return xml;
+                    }}
+                ,{field:'op',align:'center',title:"操作",width:200,templet:function(d){
+                        ////对操作进行初始化
+                        var xml="";
+                        if(d.canAdd != undefined && d.canAdd =="1")
+                        {
+                            xml+="<a href=\"#\" onclick=\"openDialogre('新增报告', '${ctx}/ruralProject/ruralCostProjectMessage/form?projectId=" + d.id +"','95%', '95%','','送审,暂存,关闭')\" class=\"op-btn layui-bg-green\" ><i class=\"fa fa-plus\"></i> 新增报告</a>";
+                        }
+                        if(d.canedit1 != undefined && d.canedit1 =="1")
+                        {
+                            xml+="<a href=\"#\" onclick=\"openDialogre('修改报告信息', '${ctx}/ruralProject/ruralCostProjectMessage/form?projectId=" + d.id +"','95%', '95%','','送审,暂存,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改报告</a>";
+                        }
+                        if(d.canedit2 != undefined && d.canedit2 =="1")
+                        {
+                            xml+="<a href=\"#\" onclick=\"openDialogre('调整报告信息', '${ctx}/ruralProject/ruralCostProjectMessage/modify?projectId=" + d.id + "&view=report','95%', '95%','','送审,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改报告</a>";
+                        }
+                        if(d.canrecall != undefined && d.canrecall =="1")
+                        {
+                            xml+="<a href=\"#\" onclick=\"openDialogre('调整报告信息', '${ctx}/ruralProject/ruralCostProjectMessage/modify?projectId=" + d.id + " ','95%', '95%','','送审,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改报告</a>";
+                        }
+                        if(d.cancancel != undefined && d.cancancel =="1")
+                        {
+                            xml+="<a href=\"${ctx}/ruralProject/ruralCostProjectMessage/revoke?id=" + d.id + "&processInstanceId=" + d.procId + "\" onclick=\"return confirmx('确认要撤回该项目报告审批吗?', this.href)\" class=\"op-btn op-btn-cancel\" ><i class=\"glyphicon glyphicon-share-alt\"></i> 撤回报告</a>";
+                        }
+
+
+						/*归档相关按钮*/
+						if(d.projectReportStatus == 5){
+							if(d.recordAdd != undefined && d.recordAdd =="1")
+							{
+								xml+="<a href=\"#\" onclick=\"openDialogre('新增归档信息', '${ctx}/ruralProject/ruralCostProjectMessage/formRecord?reportId=" + d.id +"','95%', '95%','','送审,暂存,关闭')\" class=\"op-btn layui-bg-green\" ><i class=\"fa fa-plus\"></i> 新增归档信息</a>";
+							}
+							if(d.recordedit1 != undefined && d.recordedit1 =="1")
+							{
+								xml+="<a href=\"#\" onclick=\"openDialogre('修改归档信息', '${ctx}/ruralProject/ruralCostProjectMessage/formRecordModify?id=" + d.prrId +"','95%', '95%','','送审,暂存,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改归档信息</a>";
+							}
+							if(d.recordedit2 != undefined && d.recordedit2 =="1")
+							{
+								xml+="<a href=\"#\" onclick=\"openDialogre('调整归档信息', '${ctx}/ruralProject/ruralCostProjectMessage/formRecordModify?id=" + d.prrId + "&view=modify','95%', '95%','','送审,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改归档信息</a>";
+							}
+							if(d.recordrecall != undefined && d.recordrecall =="1")
+							{
+								xml+="<a href=\"#\" onclick=\"openDialogre('撤回调整归档信息', '${ctx}/ruralProject/ruralCostProjectMessage/formRecordModify?id=" + d.prrId + " ','95%', '95%','','送审,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改归档信息</a>";
+							}
+							if(d.recordcancel != undefined && d.recordcancel =="1")
+							{
+								xml+="<a href=\"${ctx}/ruralProject/ruralCostProjectMessage/cancelInvalidate?id=" + d.prrId + "&processInstanceId=" + d.prrProcessInstanceId + "\" onclick=\"return confirmx('确认要撤回该报告归档审批吗?', this.href)\" class=\"op-btn op-btn-cancel\" ><i class=\"glyphicon glyphicon-share-alt\"></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}"
+                    ,"projectReportNumber":"${projectRecords.projectReportNumber}"
+                    ,"recodeNum":"${projectRecords.recodeNum}"
+                    ,"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"/>"
+                    ,"projectReportStatus":"${projectRecords.projectReportStatus}"
+                    ,"projectReportRecordStatus":"${projectRecords.projectReportRecordStatus}"
+                    ,"prrProcessInstanceId":"${projectRecords.prrProcessInstanceId}"
+                    ,"prrId":"${projectRecords.prrId}"
+                    ,"procId":"${projectRecords.processInstanceId}"
+                    <c:choose>
+                        <c:when test="${flag == '1' or fn:contains(projectRecords.leaderIds,fns:getUser().id)}">
+                            ,"canAdd":<c:choose>
+                                            <c:when test="${projectRecords.projectReportStatus == 0 }">"1"</c:when>
+                                            <c:otherwise>"0"</c:otherwise>
+                                        </c:choose>
+                            ,"canedit1":<c:choose>
+                                            <c:when test="${projectRecords.projectReportStatus == 1 }">"1"</c:when>
+                                            <c:otherwise>"0"</c:otherwise>
+                                        </c:choose>
+                            ,"canedit2":<c:choose>
+                                            <c:when test="${projectRecords.projectReportStatus == 4}">"1"</c:when>
+                                            <c:otherwise>"0"</c:otherwise>
+                                        </c:choose>
+                            ,"canrecall":<c:choose>
+                                            <c:when test="${projectRecords.projectReportStatus == 3}">"1"</c:when>
+                                            <c:otherwise>"0"</c:otherwise>
+                                        </c:choose>
+
+                            ,"cancancel":<c:choose>
+                                            <c:when test="${projectRecords.projectReportStatus == 2 && fns:getUser().id == projectRecords.createBy.id}">"1"</c:when>
+                                            <c:otherwise>"0"</c:otherwise>
+                                        </c:choose>
+
+                            <%-- 归档状态 --%>
+                            ,"recordAdd":<c:choose>
+                                <c:when test="${projectRecords.projectReportRecordStatus == 0 }">"1"</c:when>
+                                <c:otherwise>"0"</c:otherwise>
+                            </c:choose>
+                            ,"recordedit1":<c:choose>
+                                <c:when test="${projectRecords.projectReportRecordStatus == 1 }">"1"</c:when>
+                                <c:otherwise>"0"</c:otherwise>
+                            </c:choose>
+                            ,"recordedit2":<c:choose>
+                                <c:when test="${projectRecords.projectReportRecordStatus == 4}">"1"</c:when>
+                                <c:otherwise>"0"</c:otherwise>
+                            </c:choose>
+                            ,"recordrecall":<c:choose>
+                                <c:when test="${projectRecords.projectReportRecordStatus == 3}">"1"</c:when>
+                                <c:otherwise>"0"</c:otherwise>
+                            </c:choose>
+                            ,"recordcancel":<c:choose>
+                                <c:when test="${projectRecords.projectReportRecordStatus == 2 && fns:getUser().id == projectRecords.createBy.id}">"1"</c:when>
+                            <c:otherwise>"0"</c:otherwise>
+                            </c:choose>
+                        </c:when>
+                    <c:otherwise>
+                    ,"canAdd":"0"
+                    ,"recordAdd":"0"
+                    ,"canedit1":"0"
+                    ,"canedit2":"0"
+                    ,"canrecall":"0"
+                    ,"cancancel":"0"
+                    ,"recordedit1":"0"
+                    ,"recordedit2":"0"
+                    ,"recordrecall":"0"
+                    ,"recordcancel":"0"
+                    </c:otherwise>
+                    </c:choose>
+                    <shiro:hasPermission name="ruralProject:ruralProjectRecords:edit">,"canedit3":<c:choose><c:when test="${fn:contains(projectRecords.leaderIds,fns:getUser().id)}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose></shiro:hasPermission>
+                    <%--<shiro:hasPermission name="project:projectRecords:edit">
+                    ,"canedit3":<c:choose>
+                                    <c:when test="${projectRecords.projectReportStatus == 5 && fn:contains(projectRecords.leaderIds,fns:getUser().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 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/projectReportRecord/projectReportRecordForm.jsp

@@ -15,7 +15,8 @@
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
                 if(obj == 2){
-                    $("#inputForm").attr("action","${ctx}/projectcontentinfo/projectReportRecord/store");
+                    //$("#inputForm").attr("action","${ctx}/projectcontentinfo/projectReportRecord/store");
+					$("#inputForm").attr("action","${ctx}/ruralProject/ruralProjectMessage/holdSaveRecord");
                 }else{
                     $("#inputForm").attr("action","${ctx}/ruralProject/ruralProjectMessage/saveRecord");
                 }

+ 2 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/projectReportRecord/projectReportRecordModify.jsp

@@ -15,7 +15,8 @@
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
                 if(obj == 2){
-                    $("#inputForm").attr("action","${ctx}/projectcontentinfo/projectReportRecord/store");
+                    //$("#inputForm").attr("action","${ctx}/projectcontentinfo/projectReportRecord/store");
+					$("#inputForm").attr("action","${ctx}/ruralProject/ruralProjectMessage/holdSaveRecord");
                 }else{
                     $("#inputForm").attr("action","${ctx}/ruralProject/ruralProjectMessage/saveRecord");
                 }

+ 2 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/reportForm.jsp

@@ -18,7 +18,8 @@
                 if(obj == 1){
                     $("#inputForm").attr("action","${ctx}/ruralProject/ruralProjectMessage/saveReport");
                 }else{
-                    $("#inputForm").attr("action","${ctx}/projectcontentinfo/projectcontentinfo/save?view=report");
+                    //$("#inputForm").attr("action","${ctx}/projectcontentinfo/projectcontentinfo/save?view=report");
+					$("#inputForm").attr("action","${ctx}/ruralProject/ruralProjectMessage/holdSaveReport");
                 }
                 $("#inputForm").submit();
                 return true;

+ 1 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageList.jsp

@@ -343,7 +343,7 @@
 							}
 							if(d.recordedit1 != undefined && d.recordedit1 =="1")
 							{
-								xml+="<a href=\"#\" onclick=\"openDialogre('修改归档信息', '${ctx}/ruralProject/ruralProjectMessage/form?id=" + d.prrId +"','95%', '95%','','送审,暂存,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改归档信息</a>";
+								xml+="<a href=\"#\" onclick=\"openDialogre('修改归档信息', '${ctx}/ruralProject/ruralProjectMessage/formRecordModify?id=" + d.prrId +"','95%', '95%','','送审,暂存,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改归档信息</a>";
 							}
 							if(d.recordedit2 != undefined && d.recordedit2 =="1")
 							{