瀏覽代碼

电子归档修改

user5 4 年之前
父節點
當前提交
0bbb3b005c
共有 37 個文件被更改,包括 9014 次插入67 次删除
  1. 347 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectReportRecordService.java
  2. 65 0
      src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectReportRecordController.java
  3. 9 0
      src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectPlanInfo.java
  4. 27 0
      src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectRecordTreeData.java
  5. 27 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectRecords.java
  6. 161 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageNewService.java
  7. 21 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageService.java
  8. 374 3
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageNewController.java
  9. 375 3
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageNewController.java
  10. 172 2
      src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java
  11. 9 6
      src/main/resources/mappings/modules/projectrecord/ProjectPlanDao.xml
  12. 1 0
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsDao.xml
  13. 2 3
      src/main/webapp/webpage/modules/oa/oaNotifyAudit.jsp
  14. 1 1
      src/main/webapp/webpage/modules/processProjectReportRecord/projectReportRecordAudit.jsp
  15. 4 4
      src/main/webapp/webpage/modules/projectFilingBatch/projectFilingBatchAudit.jsp
  16. 2 2
      src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordAudit.jsp
  17. 1 1
      src/main/webapp/webpage/modules/projectrecord/plan/projectPlanConsultingForm.jsp
  18. 1 1
      src/main/webapp/webpage/modules/projectrecord/plan/projectPlanCostForm.jsp
  19. 4 4
      src/main/webapp/webpage/modules/ruralprojectrecords/check/ruralProjectRecordsAudit.jsp
  20. 4 4
      src/main/webapp/webpage/modules/ruralprojectrecords/check/ruralProjectRecordsDownAudit.jsp
  21. 14 4
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectMessageLists.jsp
  22. 979 0
      src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/projectReportRecordForm.jsp
  23. 1040 0
      src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/projectReportRecordModify.jsp
  24. 1620 0
      src/main/webapp/webpage/modules/ruralprojectrecords/record/projectReportRecordAudit.jsp
  25. 983 0
      src/main/webapp/webpage/modules/ruralprojectrecords/record/projectReportRecordForm.jsp
  26. 1035 0
      src/main/webapp/webpage/modules/ruralprojectrecords/record/projectReportRecordModify.jsp
  27. 774 0
      src/main/webapp/webpage/modules/ruralprojectrecords/record/projectReportRecordModifyApply.jsp
  28. 924 0
      src/main/webapp/webpage/modules/ruralprojectrecords/record/projectReportRecordView.jsp
  29. 2 2
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralProjectRecordsAudit.jsp
  30. 2 2
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/projectRecordsMessageAudit.jsp
  31. 13 4
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageLists.jsp
  32. 12 12
      src/main/webapp/webpage/modules/ruralprojectrecords/view/projectAccessoryView.jsp
  33. 2 2
      src/main/webapp/webpage/modules/workcontractinfo/workContractAudit.jsp
  34. 2 2
      src/main/webapp/webpage/modules/workcontractrecord/workContractRecordAudit.jsp
  35. 1 1
      src/main/webapp/webpage/modules/workinvoice/workInvoiceAuditEnd.jsp
  36. 2 2
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementAudit.jsp
  37. 2 2
      src/main/webapp/webpage/modules/workreimbursement/workReimbursementCWAudit.jsp

+ 347 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/service/ProjectReportRecordService.java

@@ -795,4 +795,351 @@ public class ProjectReportRecordService extends CrudService<ProjectReportRecordD
 		projectReportRecordDao.adminModifyRecord(projectReportRecord);
 	}
 
+
+	/**
+	 * 审核流程
+	 * @param reportRecord
+	 */
+	@Transactional(readOnly = false)
+	public String newAuditSave(ProjectReportRecord reportRecord,List<User> auditUsers) {
+		String flag = reportRecord.getAct().getFlag();
+		ProjectReportRecord projectReportRecord = null;
+		// 对不同环节的业务逻辑进行操作
+		Act act = reportRecord.getAct();
+		String taskDefKey = act.getTaskDefKey();
+		if (!"modifyApply".equals(taskDefKey) && !taskDefKey.contains("audit")  ) {
+			actTaskService.claim(act.getTaskId(), UserUtils.getUser().getId());
+			projectReportRecord = get(reportRecord.getId());
+		}else {
+			projectReportRecord = reportRecord;
+			saveWorkattachments(reportRecord);
+			flag = "yes";
+		}
+		projectReportRecord.setFileNum(reportRecord.getFileNum());
+		projectReportRecord.setFileNumTow(reportRecord.getFileNumTow());
+		projectReportRecord.setName(reportRecord.getName());
+		projectReportRecord.setAccomplishDate(new Date());
+		User user= UserUtils.get(projectReportRecord.getCreateBy().getId());
+		String title =  "报告名称:"+projectReportRecord.getReport().getName();
+		String str = "归档申请编号:"+projectReportRecord.getRecordNum()+ ",主委托方:"+projectReportRecord.getClientName()+",申请人:"+user.getName()+",所属部门:"+UserUtils.getSelectOffice().getName();
+
+		if (StringUtils.isBlank(act.getComment())){
+			act.setComment(flag.equals("yes")?"同意":"驳回");
+		}
+		String comment = "";
+		if (projectReportRecord.getStatus().equals("4")){
+			comment = ("yes".equals(flag)?"[重新申请] ":"[已撤销] ");
+		}else {
+			comment = ("yes".equals(flag)?"[同意] ":"[驳回] ")+act.getComment();
+		}
+		//yes 的时候状态为审核通过 否则为未通过
+		//1 审核中 2 未通过
+		projectReportRecord.setStatus(("yes".equals(flag) ? "2" : "4"));
+		Map<String, Object> vars = Maps.newHashMap();
+		//业务逻辑对应的条件表达式
+		String exp = "";
+		String taskCount = "";
+		String notifyRole = "";
+		int key = 0;
+		String enname = "";
+		List<Activity> activitieList = activityService.getByProcessInstanceId(projectReportRecord.getProcessInstanceId());
+		WorkActivityMenu workActivityMenu = new WorkActivityMenu();
+		if (activitieList != null && activitieList.size() != 0) {
+			workActivityMenu.setProcessType(activitieList.get(0).getProcessKey());
+			workActivityMenu.setActivities(activitieList);
+		}
+
+		WorkActivityProcess workActivityProcess = new WorkActivityProcess();
+		WorkActivityProcess selectProcess = new WorkActivityProcess();
+		selectProcess.setProcessInstanceId(projectReportRecord.getProcessInstanceId());
+		List<WorkActivityProcess> workActivityProcesses = workActivityProcessService.findList(selectProcess);
+		List<Activity> activities = workActivityMenu.getActivities();
+		if (StringUtils.isNotBlank(workActivityMenu.getProcessType()) && !workActivityMenu.getProcessType().equals("newReportRecord")) {
+			key = 1;
+			for (int i = 0; i < workActivityProcesses.size(); i++) {
+				WorkActivityProcess activityProcess = workActivityProcesses.get(i);
+				if (taskDefKey.equals(activityProcess.getActivityTask()) && !taskDefKey.equals("modifyApply")) {
+					taskCount = activityProcess.getCount()+"";
+					workActivityProcess = activityProcess;
+					if (!workActivityProcess.getIsApproval().equals("0")) {
+						workActivityProcess.setId("");
+					}
+					exp = "pass";
+					if (!"yes".equals(flag)) {
+						projectReportRecord.setStatus("4");
+						workActivityProcess.setIsApproval("2");
+						String returnBack = "-1";
+						for (Activity activity : activities) {
+							if (activity.getCount() == activityProcess.getCount()) {
+								notifyRole = activity.getName();
+								returnBack = activity.getReturnBack();
+								break;
+							}
+						}
+						if (returnBack.equals("0")) {
+							workActivityProcess.setId("");
+						}
+
+					} else {
+						workActivityProcess.setIsApproval("1");
+					}
+				}else if(taskDefKey.equals("modifyApply")){
+					taskCount = "0";
+					notifyRole = "调整报告";
+					exp = "pass";
+					workActivityProcess.setId("");
+					workActivityProcess.setCount(0);
+					if (!"yes".equals(flag)) {
+						projectReportRecord.setStatus("3");
+						workActivityProcess.setIsApproval("2");
+					} else {
+						workActivityProcess.setIsApproval("1");
+					}
+					break;
+				}
+			}
+		} else {
+			workActivityMenu.setProcessType("newReportRecord");
+			for (int i = 0; i < workActivityProcesses.size(); i++) {
+				WorkActivityProcess activityProcess = workActivityProcesses.get(i);
+				workActivityProcess = activityProcess;
+				String count = activityProcess.getCount() + "";
+				if (!workActivityProcess.getIsApproval().equals("0")) {
+					workActivityProcess.setId("");
+				}
+				// 审核环节
+				if ("bggdgly".equals(taskDefKey) && count.contains("1")) {
+					taskCount = "1";
+					exp = "pass";
+					if ("yes".equals(flag)) {
+						workActivityProcessService.insertAuditsByType(auditUsers,reportRecord.getProcessInstanceId(),2,1);
+
+						notifyRole = "报告归档管理员审批";
+						workActivityProcess.setIsApproval("1");
+						enname = "bzshb";
+						vars.put("bzshbList", auditUsers);
+						vars.put("bzshbcount",auditUsers.size());
+					} else {
+						notifyRole = "调整报告";
+						workActivityProcess.setIsApproval("2");
+					}
+
+					/*if ("yes".equals(flag)) {
+						notifyRole = "审批通过";
+						workActivityProcess.setIsApproval("1");
+					} else {
+						notifyRole = "调整报告归档";
+						workActivityProcess.setIsApproval("2");
+					}*/
+					break;
+				}else if ("bzshb".equals(taskDefKey) && count.contains("2")) {
+					taskCount = "2";
+					exp = "pass";
+					if ("yes".equals(flag)) {
+						notifyRole = "审批通过";
+						workActivityProcess.setIsApproval("1");
+					} else {
+						notifyRole = "调整报告归档";
+						workActivityProcess.setIsApproval("2");
+					}
+					break;
+				}else if ("modifyApply".equals(taskDefKey)&& count.contains("0")) {
+					notifyRole = "报告归档管理员审批";
+					taskCount = "0";
+					exp = "pass";
+					workActivityProcess.setCount(0);
+					enname = "bggdgly";
+					if (!"yes".equals(flag)) {
+						projectReportRecord.setStatus("3");
+					}
+					break;
+				} else if ("apply_end".equals(taskDefKey)) {
+				}
+
+			}
+		}
+		// 设置意见
+		act.setComment(("yes".equals(flag) ? "[同意] " : "[驳回] ") + act.getComment());
+		projectReportRecord.preUpdate();
+		// 提交流程任务
+		vars.put(exp, "yes".equals(flag) ? true : false);
+		vars.put("passs", true);
+		workActivityProcessService.updateProcess(workActivityProcess,workActivityMenu,key,taskCount,projectReportRecord.getProcessInstanceId(),taskDefKey,"modifyApply",flag,comment, activities);
+		// 提交流程任务
+		actTaskService.complete(act.getTaskId(), act.getProcInsId(), act.getComment(), vars);
+		boolean state = actTaskService.isProcessEnd(act.getProcInsId());
+		List<User> users = new ArrayList<>();
+		List<User> userList = new ArrayList<>();
+		//获取项目信息
+		RuralProjectRecords record = ruralProjectRecordsService.getById(reportRecord.getReport().getProject().getId());
+
+		if (!state) {
+			String titleStr = "项目【"+ record.getProjectName()+"】归档完成";
+			String content = "项目【"+ record.getProjectName()+"】归档完成,案卷号:" + projectReportRecord.getFileNum();
+			if("3".equals(record.getProjectType())){
+				titleStr = "全过程项目【"+ record.getProjectName()+"】归档完成";
+				content = "全过程项目【"+ record.getProjectName()+"】归档完成,归档编号:" + projectReportRecord.getFileNum();
+			}
+			users.add(projectReportRecord.getCreateBy());
+			if ("yes".equals(flag)) {
+				ProjectReportData projectReportData =projectReportRecord.getReport();
+				projectReportData.setFileStatus("3");
+				projectReportDataService.updateFileStatus(projectReportData);
+				projectReportRecord.setStatus("5");
+				WorkProjectNotify notify = new WorkProjectNotify();
+				notify.setNotifyId(projectReportRecord.getId());
+				userList = workProjectNotifyService.readByNotifyId(notify);
+				workProjectNotifyService
+						.save(UtilNotify
+								.saveNotify(projectReportRecord.getId(),
+										projectReportRecord.getCreateBy(),
+										projectReportRecord.getCompanyId(),
+										titleStr,
+										content,
+										"101",
+										"0",
+										"待通知",
+										notifyRole));
+
+			} else {
+				WorkProjectNotify notify = new WorkProjectNotify();
+				notify.setNotifyId(projectReportRecord.getId());
+				userList = workProjectNotifyService.readByNotifyId(notify);
+				if (StringUtils.isNotBlank(projectReportRecord.getStatus()) && !projectReportRecord.getStatus().equals("3")){
+					projectReportRecord.setStatus("4");
+					workProjectNotifyService
+							.save(UtilNotify
+									.saveNotify(projectReportRecord.getId(),
+											projectReportRecord.getCreateBy(),
+											projectReportRecord.getCompanyId(),
+											title,
+											str,
+											"101",
+											"0",
+											"待通知",
+											notifyRole));
+				}
+			}
+			workActivityProcessService.deleteProcessIdAuditUsers(projectReportRecord.getProcessInstanceId());
+		} else {
+			if (StringUtils.isNotBlank(workActivityMenu.getProcessType()) && !workActivityMenu.getProcessType().equals("newReportRecord")) {
+				WorkProjectNotify notify = new WorkProjectNotify();
+				notify.setNotifyId(projectReportRecord.getId());
+				userList = workProjectNotifyService.readByNotifyId(notify);
+				WorkProjectNotify workProjectNotify = UtilNotify
+						.saveNotify(projectReportRecord.getId(),
+								new User(),
+								projectReportRecord.getCompanyId(),
+								title,
+								str,
+								"101",
+								"0",
+								"待审批",
+								notifyRole);
+				List<WorkProjectNotify> workProjectNotifys = activityService.getByFlagAndTaskDefKeyList(
+						activities,
+						workProjectNotify,
+						taskDefKey,
+						flag,
+						taskCount,
+						projectReportRecord.getCreateBy(),
+						user.getOffice().getId(),
+						"10");
+				for (WorkProjectNotify workProjectNotify1:workProjectNotifys){
+					users.add(workProjectNotify1.getUser());
+					workProjectNotify1.setId("");
+					workProjectNotify1.setIsNewRecord(false);
+					workProjectNotifyService
+							.save(workProjectNotify1);
+				}
+
+			} else {
+				if (!"yes".equals(flag)) {//驳回待办信息
+					str = "项目【"+ record.getProjectName()+"】归档被驳回,请重新归档";
+					title = "项目【"+ record.getProjectName()+"】归档被驳回";
+					if("3".equals(record.getProjectType())){
+						title = "全过程项目【"+ record.getProjectName()+"】归档被驳回";
+						str = "全过程项目【"+ record.getProjectName()+"】归档被驳回,请重新归档";
+					}
+					WorkProjectNotify notify = new WorkProjectNotify();
+					notify.setNotifyId(projectReportRecord.getId());
+					userList = workProjectNotifyService.readByNotifyId(notify);
+					workProjectNotifyService
+							.save(UtilNotify
+									.saveNotify(projectReportRecord.getId(),
+											projectReportRecord.getCreateBy(),
+											projectReportRecord.getCompanyId(),
+											title,
+											str,
+											"101",
+											"0",
+											"重新申请",
+											notifyRole));
+					users.add( projectReportRecord.getCreateBy());
+				} else {
+					if (StringUtils.isNotBlank(enname)) {//驳回重新归档
+						str = "项目【"+ record.getProjectName()+"】归档信息重新登记,待审批";
+						title = "项目【"+ record.getProjectName()+"】归档信息重新登记,待审批";
+						if("3".equals(record.getProjectType())){
+							title = "全过程项目【"+ record.getProjectName()+"】归档信息重新登记,待审批";
+							str = "全过程项目【"+ record.getProjectName()+"】归档信息重新登记,待审批";
+						}
+						WorkProjectNotify notify = new WorkProjectNotify();
+						notify.setNotifyId(projectReportRecord.getId());
+						userList = workProjectNotifyService.readByNotifyId(notify);
+						WorkProjectNotify workProjectNotify = UtilNotify
+								.saveNotify(projectReportRecord.getId(),
+										new User(),
+										projectReportRecord.getCompanyId(),
+										title,
+										str,
+										"101",
+										"0",
+										"待审批",
+										notifyRole);
+						users.addAll(auditUsers);
+						for (User user1 : users) {
+							workProjectNotify.setUser(user1);
+							workProjectNotify.setId("");
+							workProjectNotify.setIsNewRecord(false);
+							workProjectNotifyService
+									.save(workProjectNotify);
+						}
+					}else {
+						WorkProjectNotify notify = new WorkProjectNotify();
+						notify.setNotifyId(projectReportRecord.getId());
+						userList = workProjectNotifyService.readByNotifyId(notify);
+						users.add(projectReportRecord.getCreateBy());
+						workProjectNotifyService
+								.save(UtilNotify
+										.saveNotify(projectReportRecord.getId(),
+												projectReportRecord.getCreateBy(),
+												projectReportRecord.getCompanyId(),
+												title,
+												str,
+												"101",
+												"0",
+												"重新申请",
+												notifyRole));
+					}
+				}
+			}
+		}
+		if (users!=null && users.size()!=0) {
+			for (User u : users) {
+				UserUtils.pushIm(u.getId(),title);
+			}
+		}
+		if (users!=null && userList.size()!=0) {
+			for (User u : userList) {
+				UserUtils.pushMeIm(u.getId());
+			}
+		}
+		if (1 == projectReportRecord.getType()){
+			dao.update(projectReportRecord);
+		}else if(2 == projectReportRecord.getType()){
+			dao.updateRuralProjectReportRecord(projectReportRecord);
+		}
+		return "保存审核意见成功!";
+	}
 }

+ 65 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/web/ProjectReportRecordController.java

@@ -485,6 +485,71 @@ public class ProjectReportRecordController extends BaseController {
     }
 
 
+	//报告流程审批
+	@RequestMapping(value = {"newAuditSave"})
+	public String newAuditSave(ProjectReportRecord projectReportRecord, HttpServletRequest request, HttpServletResponse response, Model model,
+							RedirectAttributes redirectAttributes) {
+		try {
+			//查询项目新增报告信息
+			ProjectReportData reportData = projectReportDataService.get(projectReportRecord.getReport().getId());
+			// 对不同环节的业务逻辑进行操作
+			List<User> users = null;
+			User auditUser = null;
+			String taskDefKey =  projectReportRecord.getAct().getTaskDefKey();
+			if ("bggdgly".equals(taskDefKey)){
+				/*users = UserUtils.getByProssType(projectReportRecord.getProcessInstanceId(),2);
+				if (users==null ) {
+					users = UserUtils.getByRoleActivityEnname("bggdgly",3,projectReportRecord.getOfficeId(),"12",projectReportRecord.getCreateBy());
+				}*/
+				users = Lists.newArrayList();
+				//查询总审人员信息(新增报告选择得总审人员)
+				User zsUser = UserUtils.get(reportData.getBzshbUserId());
+				users.add(zsUser);
+			}else if ("bzshb".equals(taskDefKey)){
+				users = UserUtils.getByProssType(projectReportRecord.getProcessInstanceId(),5);
+				if (users==null ) {
+					users = Lists.newArrayList();
+					//查询总审人员信息(新增报告选择得总审人员)
+					User zsUser = UserUtils.get(reportData.getBzshbUserId());
+					users.add(zsUser);
+				}
+			}else if ("modifyApply".equals(taskDefKey)){
+				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.newAuditSave(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 if (StringUtils.isNotBlank(projectReportRecord.getHome()) && "notifyList".equals(projectReportRecord.getHome())){
+			return "redirect:" + Global.getAdminPath() + "/workprojectnotify/workProjectNotify/list/?repage";
+		}else {
+			RuralProjectRecords ruralProjectRecords = projectRecordsService.get(projectReportRecord.getReport().getProject().getId());
+			if(StringUtils.isNotBlank(projectReportRecord.getCondition())){
+				if("earlyArchive".equals(projectReportRecord.getCondition())){
+					return "redirect:"+Global.getAdminPath()+"/project/projectEarlyPigeonhole/?repage";
+				}else if("completionArchive".equals(projectReportRecord.getCondition())) {
+					return "redirect:" + Global.getAdminPath() + "/project/projectCompletionPigeonhole/?repage";
+				}
+			}
+			if(null != ruralProjectRecords){
+				if("1".equals(ruralProjectRecords.getProjectType())){
+					return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralProjectMessage/?repage";
+				}else if("2".equals(ruralProjectRecords.getProjectType())){
+					return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralCostProjectMessage/?repage";
+				}
+			}
+			return "redirect:"+Global.getAdminPath()+"/project/projectEarlyPigeonhole/?repage";
+		}
+	}
 
 }

+ 9 - 0
src/main/java/com/jeeplus/modules/projectrecord/entity/ProjectPlanInfo.java

@@ -13,6 +13,7 @@ public class ProjectPlanInfo extends DataEntity<ProjectPlanInfo> {
     private String remindId;    //提醒人Id
     private String finishName;    //完成人
     private String finishId;    //完成人id
+    private String sort;    //排序
 
     private String loginId;
 
@@ -93,4 +94,12 @@ public class ProjectPlanInfo extends DataEntity<ProjectPlanInfo> {
     public void setFinishId(String finishId) {
         this.finishId = finishId;
     }
+
+    public String getSort() {
+        return sort;
+    }
+
+    public void setSort(String sort) {
+        this.sort = sort;
+    }
 }

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

@@ -74,6 +74,9 @@ public class ProjectRecordTreeData extends DataEntity<ProjectRecordTreeData> {
     private Integer newReportNotifyFlag; //新新增报告判定条件
     private String newReportNotifyId; //新新增报告判定条件
     private Integer newReportAuditNotifyFlag; //新新增报告(审批)判定条件
+    private Integer newRecordNotifyFlag; //新归档代办判定条件
+    private String newRecordNotifyId; //新归档代办判定条件
+    private Integer newRecordAuditNotifyFlag; //新归档(审批)判定条件
 
 
 
@@ -572,4 +575,28 @@ public class ProjectRecordTreeData extends DataEntity<ProjectRecordTreeData> {
     public void setNewReportAuditNotifyFlag(Integer newReportAuditNotifyFlag) {
         this.newReportAuditNotifyFlag = newReportAuditNotifyFlag;
     }
+
+    public Integer getNewRecordNotifyFlag() {
+        return newRecordNotifyFlag;
+    }
+
+    public void setNewRecordNotifyFlag(Integer newRecordNotifyFlag) {
+        this.newRecordNotifyFlag = newRecordNotifyFlag;
+    }
+
+    public String getNewRecordNotifyId() {
+        return newRecordNotifyId;
+    }
+
+    public void setNewRecordNotifyId(String newRecordNotifyId) {
+        this.newRecordNotifyId = newRecordNotifyId;
+    }
+
+    public Integer getNewRecordAuditNotifyFlag() {
+        return newRecordAuditNotifyFlag;
+    }
+
+    public void setNewRecordAuditNotifyFlag(Integer newRecordAuditNotifyFlag) {
+        this.newRecordAuditNotifyFlag = newRecordAuditNotifyFlag;
+    }
 }

+ 27 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectRecords.java

@@ -187,6 +187,9 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 	private String engineeringName;	//工程类型名称
 	private String submitMoney;		//送审金额
 	private String modifyFlag;		//修改判定参数
+	private Integer newRecordNotifyFlag; //新归档代办判定条件
+	private String newRecordNotifyId; //新归档代办判定条件
+	private Integer newRecordAuditNotifyFlag; //新归档(审批)判定条件
 
 
 	private List<String> civilProjectList = Lists.newArrayList();
@@ -1323,4 +1326,28 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 	public void setModifyFlag(String modifyFlag) {
 		this.modifyFlag = modifyFlag;
 	}
+
+	public Integer getNewRecordNotifyFlag() {
+		return newRecordNotifyFlag;
+	}
+
+	public void setNewRecordNotifyFlag(Integer newRecordNotifyFlag) {
+		this.newRecordNotifyFlag = newRecordNotifyFlag;
+	}
+
+	public String getNewRecordNotifyId() {
+		return newRecordNotifyId;
+	}
+
+	public void setNewRecordNotifyId(String newRecordNotifyId) {
+		this.newRecordNotifyId = newRecordNotifyId;
+	}
+
+	public Integer getNewRecordAuditNotifyFlag() {
+		return newRecordAuditNotifyFlag;
+	}
+
+	public void setNewRecordAuditNotifyFlag(Integer newRecordAuditNotifyFlag) {
+		this.newRecordAuditNotifyFlag = newRecordAuditNotifyFlag;
+	}
 }

+ 161 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageNewService.java

@@ -1,5 +1,6 @@
 package com.jeeplus.modules.ruralprojectrecords.service;
 
+import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.google.gson.Gson;
 import com.jeeplus.common.persistence.Page;
@@ -1750,4 +1751,164 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
         List<WorkStaffCertificate> list=projectcontentinfoDao.getCertificateByUser(userId);
         return list;
     }
+
+    /**
+     * 提交归档存储
+     * @param projectReportRecord
+     * @param variables
+     */
+    @Transactional(readOnly = false)
+    public String saveProjectReportRecord(ProjectReportRecord projectReportRecord, Map<String, Object> variables, String processInstanceId) {
+
+        User user = UserUtils.getUser();
+        Boolean insert = false;
+        if (com.jeeplus.common.utils.StringUtils.isBlank(projectReportRecord.getId())){
+            projectReportRecord.setCompanyId(user.getComId());
+            projectReportRecord.setOfficeId(user.getOffice().getId());
+            projectReportRecord.preInsert();
+            insert = true;
+        }
+        //将附件插入数据库
+        saveWorkattachments(projectReportRecord);
+        //对数据进行插入数据库
+        if (insert) { //新增操作
+            this.insert(projectReportRecord);
+        }else {//修改操作
+            this.save(projectReportRecord);
+        }
+        //判断如果是暂存,则跳过流程操作
+        if("1".equals(projectReportRecord.getFlag())){
+            return "true";
+        }
+        //获取项目信息
+        RuralProjectRecords record = ruralProjectRecordsService.get(projectReportRecord.getReport().getProject().getId());
+        //查询项目新增报告信息
+        ProjectReportData reportData = projectReportDataService.get(record.getPrdId());
+        //启动流程操作
+        String title = "项目【"+ record.getProjectName()+"】归档待审批";
+        String str = "项目【"+ record.getProjectName()+"】归档待审批";
+        // 用来设置启动流程的人员ID,引擎会自动把用户ID保存到activiti:initiator中
+        identityService.setAuthenticatedUserId(user.getId());
+        // 启动流程
+        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();
+        WorkProjectNotify workProjectNotify = UtilNotify
+                .saveNotify(projectReportRecord.getId(),
+                        null,
+                        projectReportRecord.getCompanyId(),
+                        title,
+                        str,
+                        "101",
+                        "0",
+                        "待审批",
+                        ""
+                );
+        List<User> users = new ArrayList<>();
+        List<User> bggdglys = UserUtils.getByRoleActivityEnname("bggdgly",3,office.getId(),"10",projectReportRecord.getCreateBy());
+        //查询总审人员信息(新增报告选择得总审人员)
+        List<User> zsUserList=Lists.newArrayList();
+        User zsUser = UserUtils.get(reportData.getBzshbUserId());
+        if(null == zsUser){
+            return "流程审批总审人员下无用户,请联系管理员!";
+        }
+        zsUserList.add(zsUser);
+        if (com.jeeplus.common.utils.StringUtils.isNotBlank(workActivityMenu.getId())) {
+            workProjectNotify.setNotifyRole("");
+            workActivityMenu = workActivityMenuService.get(workActivityMenu.getId());
+            List<Activity> activities = workActivityMenu.getActivities();
+            for (Activity a : activities) {
+                String encount = a.getEncount();
+                String enlist = a.getEnlist();
+                if (a.getRole()!=null && com.jeeplus.common.utils.StringUtils.isNotBlank(a.getRole().getEnname())){
+                    List enusers = UserUtils.getByRoleActivityEnnames(a.getRole().getEnname(),office.getId(),"10",projectReportRecord.getCreateBy());
+                    if (enusers.size()==0){
+                        projectReportRecord.setStatus("1");
+                        return "报告归档流程审批人不能为空,角色"+a.getRole().getName()+"下无用户,请联系管理员!";
+                    }
+                    variables.put(enlist, enusers);
+                    variables.put(encount, enusers.size());
+                }
+                if (a.getDelFlag().equals("0") && a.getCount() == 1) {
+                    activity = a;
+                }
+            }
+            buffer.append(activity.getRole().getEnname());
+            if (activity != null && com.jeeplus.common.utils.StringUtils.isNotBlank(activity.getId())) {
+                //角色审批
+                if (com.jeeplus.common.utils.StringUtils.isNotBlank(activity.getRole().getEnname())) {
+                    users = UserUtils.getByRoleActivityEnnames(activity.getRole().getEnname(),office.getId(),"10",projectReportRecord.getCreateBy());
+                }
+                //人员审批
+                if (com.jeeplus.common.utils.StringUtils.isNotBlank(activity.getUser().getId())) {
+                    users.add(activity.getUser());
+                }
+            }
+            workProjectNotify.setId("");
+        } else {
+            variables.put("bggdglyList", bggdglys);
+            if (bggdglys.size()==0){
+                projectReportRecord.setStatus("1");
+                this.save(projectReportRecord);
+                return "流程审批人不能为空,报告归档管理员下无用户,请联系管理员!";
+            }
+            variables.put("bggdglycount",bggdglys.size());
+            processType = "newReportRecord";
+            users.addAll(bggdglys);
+        }
+        for (User u : users){
+            workProjectNotify.setUser(u);
+            workProjectNotify.setId("");
+            workProjectNotify.setNotifyRole("档案管理员审批");
+            workProjectNotifyService
+                    .save(workProjectNotify);
+            Map<String,Object> extras = new HashMap<>();
+            extras.put("type","7001");
+            extras.put("id",workProjectNotify.getId());
+            extras.put("procDefKey","101");
+            UserUtils.pushInfoToApp(title,str,extras,u.getId());
+            UserUtils.pushIm(u.getId(),str);
+        }
+        variables.put("type", processType);
+        variables.put("busId", businessKey);
+        variables.put("title", "报告归档编号:" + projectReportRecord.getRecordNum());//设置标题;
+
+        ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processType, businessKey, variables);
+
+        projectReportRecord.setProcessInstance(processInstance);
+        if (com.jeeplus.common.utils.StringUtils.isNotBlank(processInstanceId)) {
+            workActivityProcessService.updateProcessInstanceId(processInstance.getId(),processInstanceId);
+            workActivityProcessService.deleteProcessInstanceId(processInstanceId);
+            workActivityProcessService.deleteProcessIdAuditUsers(processInstanceId);
+        }
+        ProjectReportData projectReportData =projectReportRecord.getReport();
+        projectReportData.setFileStatus("2");
+        projectReportDataService.updateFileStatus(projectReportData);
+        // 修改更新流程实例ID
+        projectReportRecord.setProcessInstanceId(processInstance.getId());
+        dao.updateProcessInstanceId(projectReportRecord);
+        //通知添加流程实例ID
+        workProjectNotify.setProcessInstanceId(processInstance.getId());
+        workProjectNotifyService.save(workProjectNotify);
+        List<Activity> list = workActivityMenu.getActivities();
+        if (list != null && list.size() != 0) {
+            workActivityProcessService.saveList(list, processInstance.getId());
+        } else {
+            WorkActivityProcess workActivityProcess = new WorkActivityProcess();
+            workActivityProcess.setCount(1);
+            workActivityProcess.setProcessKey(processType);
+            workActivityProcess.setProcessInstanceId(processInstance.getId());
+            workActivityProcess.setIsApproval("0");
+            workActivityProcessService.insert(workActivityProcess);
+            workActivityProcess.setCount(2);
+            workActivityProcessService.insert(workActivityProcess);
+            workActivityProcessService.insertAuditsByType(bggdglys,processInstance.getId(),1,1);
+            workActivityProcessService.insertAuditsByType(zsUserList,processInstance.getId(),2,0);
+        }
+        return "true";
+    }
 }

+ 21 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageService.java

@@ -313,6 +313,11 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
         //查询所有需要当前登录人进行处理的项目信息
         List<WorkProjectNotify> newReportNotifyList = workProjectNotifyService.findList(workProjectNotify);
 
+        //查询新的归档流程信息代办
+        workProjectNotify.setType("101");
+        //查询所有需要当前登录人进行处理的项目信息
+        List<WorkProjectNotify> newRecordNotifyList = workProjectNotifyService.findList(workProjectNotify);
+
         //无合同状态下,获取委托方的名称
         List<RuralProjectRecords> list = page.getList();
         List<ProjectRecordTreeData> projectRecordTreeDataList = new ArrayList<>();
@@ -363,6 +368,19 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
                     break;
                 }
             }
+            //新代办修改权限处理
+            for (WorkProjectNotify notify: newRecordNotifyList) {
+                if(notify.getNotifyId().equals(records1.getPrrId())){
+                    records1.setNewRecordNotifyId(notify.getId());
+                    if("重新申请".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+                        records1.setNewRecordNotifyFlag(1);
+                    }
+                    if("待审批".equals(notify.getRemarks()) && !"1".equals(notify.getStatus())){
+                        records1.setNewRecordNotifyFlag(1);
+                    }
+                    break;
+                }
+            }
             if (records1.getWorkContractInfo() == null) {
                 this.queryLinkmanInfos(records1);
                 if (records1.getWorkClientLinkmanList() != null && records1.getWorkClientLinkmanList().size() > 0) {
@@ -521,6 +539,9 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
         projectRecordTreeData.setNewReportNotifyFlag(info.getNewReportNotifyFlag());
         projectRecordTreeData.setNewReportAuditNotifyFlag(info.getNewReportAuditNotifyFlag());
         projectRecordTreeData.setNewReportNotifyId(info.getReportNotifyId());
+        projectRecordTreeData.setNewRecordNotifyFlag(info.getNewRecordNotifyFlag());
+        projectRecordTreeData.setNewRecordNotifyId(info.getNewRecordNotifyId());
+        projectRecordTreeData.setNewRecordAuditNotifyFlag(info.getNewRecordAuditNotifyFlag());
 
         return projectRecordTreeData;
     }

+ 374 - 3
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageNewController.java

@@ -12,9 +12,11 @@ import com.jeeplus.modules.projectAccessory.entity.ProjectTemplateInfo;
 import com.jeeplus.modules.projectAccessory.service.ProjectTemplateService;
 import com.jeeplus.modules.projectEngineering.service.ProjectEngineeringService;
 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;
@@ -29,6 +31,7 @@ import com.jeeplus.modules.sys.entity.User;
 import com.jeeplus.modules.sys.service.UserService;
 import com.jeeplus.modules.sys.utils.DictUtils;
 import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
 import com.jeeplus.modules.workstaff.entity.WorkStaffCertificate;
 import org.activiti.engine.HistoryService;
 import org.activiti.engine.history.HistoricProcessInstance;
@@ -46,9 +49,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
+import java.util.*;
 
 /**
  * 造价审核项目列表Controller
@@ -80,6 +81,10 @@ public class RuralCostProjectMessageNewController extends BaseController {
     private UserService userService;
     @Autowired
     private ProjectEngineeringService engineeringService;
+    @Autowired
+    private ProjectReportRecordService projectReportRecordService;
+
+    private static byte[] SYN_BYTE = new byte[0];
 
     @ModelAttribute
     public RuralProjectRecords get(@RequestParam(required=false) String id) {
@@ -833,4 +838,370 @@ public class RuralCostProjectMessageNewController extends BaseController {
         model.addAttribute("projectReportData",projectReportData);
         return "modules/sys/gridselectConsultantOpinion";
     }
+
+    /**
+     * 根据信息获取归档信息并调转页面
+     */
+    @RequestMapping(value = "formRecord")
+    public String form(ProjectReportRecord projectReportRecord, Model model) throws Exception {
+        //查询“配农网”工程类型id
+        String engineeringId = engineeringService.getEngineeringId("202");
+        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")){
+                synchronized (SYN_BYTE) {
+                    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);
+        projectReportRecord.setUploadMode(uploadMode);
+        model.addAttribute("projectReportRecord", projectReportRecord);
+        model.addAttribute("project", projectReportRecord.getReport().getProject());
+
+        ProjectAccessoryRelationInfo relateInfo = new ProjectAccessoryRelationInfo();
+        //添加项目类型
+        relateInfo.setAttachmentProjectType(ruralProjectRecords.getProjectType());
+        relateInfo.setAttachmentProjectSort(ruralProjectRecords.getAttachmentProjectSort());
+        //判断是否为打包项目,打包项目无需查看项目送审金额是否为500w以上判定
+        String money=ruralProjectRecords.getSubmitMoney();
+        Integer approvalMoney=null;
+        if(StringUtils.isBlank(money)){
+            approvalMoney=1;
+        }else{
+            approvalMoney=Integer.parseInt(money);
+        }
+        switch (approvalMoney){
+            case 0:
+                //金额为0
+                relateInfo.setAttachmentProjectApprovalMoney(null);
+                break;
+            case 1:
+                //500w以下金额状态
+                relateInfo.setAttachmentProjectApprovalMoney("1");
+                break;
+            case 2:
+                //500w以上金额状态
+                relateInfo.setAttachmentProjectApprovalMoney("2");
+                break;
+        }
+
+        //添加报告类型
+        relateInfo.setRequiredStage(2);
+        relateInfo.setId(ruralProjectRecords.getId());
+        //查询报告文件、依据性文件、其他文件必填列表以及数据
+        List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
+        for (MainDictDetail mainDict : mainDictDetails) {
+            relateInfo.setAttachType(mainDict.getValue());
+            switch (mainDict.getValue()) {
+                case "11":
+                    List<ProjectTemplateInfo> fileAttachmentList = projectTemplateService.getProjectTemplateList(relateInfo);
+                    for (ProjectTemplateInfo info: fileAttachmentList) {
+                        info.setAttachTypes(info.getAttachTypes().toLowerCase());
+                        if(engineeringId.equals(ruralProjectRecords.getEngineeringType())){
+                            if("审定单".equals(info.getAttachName()) || "咨询报告书正文(含附件)  附件一:工程预算或结算汇总表 附件二:编制或审核说明 附件三:工程预算或结算审定单 附件四:工程预算或结算书".equals(info.getAttachName()) ){
+                                if(!info.getAttachTypes().contains("zip")){
+                                    info.setAttachTypes(info.getAttachTypes()+",zip");
+                                }
+                                if(!info.getAttachTypes().contains("rar")){
+                                    info.setAttachTypes(info.getAttachTypes()+",rar");
+                                }
+                            }
+                        }
+                    }
+                    projectReportRecord.setFileAttachmentList(fileAttachmentList);
+                    break;
+                case "12":
+                    List<ProjectTemplateInfo> projectTemplateList = projectTemplateService.getProjectTemplateList(relateInfo);
+                    for (ProjectTemplateInfo info: projectTemplateList) {
+                        info.setAttachTypes(info.getAttachTypes().toLowerCase());
+                        if(engineeringId.equals(ruralProjectRecords.getEngineeringType())){
+                            if("投标文件、中标通知书、工程承包合同(协议书记专用条款部分)、补充协议".equals(info.getAttachName()) || "送审工程预算、结算书".equals(info.getAttachName()) ){
+                                if(!info.getAttachTypes().contains("zip")){
+                                    info.setAttachTypes(info.getAttachTypes()+",zip");
+                                }
+                                if(!info.getAttachTypes().contains("rar")){
+                                    info.setAttachTypes(info.getAttachTypes()+",rar");
+                                }
+                            }
+                        }
+                    }
+                    projectReportRecord.setFileGistdataList(projectTemplateList);
+                    break;
+                case "13":
+                    projectReportRecord.setFileOtherList(projectTemplateService.getProjectTemplateList(relateInfo));
+                    break;
+            }
+
+        }
+
+        if(null != projectContractInfo){
+            if(projectContractInfo.getWorkClientInfoList().size()>0){
+                model.addAttribute("workClientInfoName", projectContractInfo.getWorkClientInfoList().get(0).getName());
+            }
+        }
+        if (StringUtils.isNotBlank(projectReportRecord.getView()) && projectReportRecord.getView().equals("view")){
+            return "modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordView";
+        }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/record/cost/projectReportRecordForm";
+    }
+    /**
+     * 暂存报告归档
+     * @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 {//新增表单保存
+                ProjectReportRecord reportRecord = projectReportRecordService.getprojectReportRecord(projectReportRecord.getReport().getId());//从数据库取出记录的值
+                if(null != reportRecord){
+                    addMessage(redirectAttributes, "报告归档已存在,请勿重复提交");
+                    return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralCostProjectMessage/?repage";
+                }
+                ruralProjectMessageService.saveProjectReportRecord(projectReportRecord,variables,processInstanceId);//保存
+            }
+            addMessage(redirectAttributes, "保存报告归档暂存成功");
+        }catch (Exception e){
+            addMessage(redirectAttributes, "保存报告归档暂存失败");
+            logger.error("保存报告归档暂存失败",e);
+        }
+        return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralCostProjectMessage/?repage";
+    }
+
+    /**
+     * 保存报告归档
+     */
+    @RequestMapping(value = "saveRecord")
+    public String save(ProjectReportRecord projectReportRecord, Model model, RedirectAttributes redirectAttributes,Integer saveAuditFlag) 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());//从数据库取出记录的值
+                if(null != saveAuditFlag){
+                    if(1 == saveAuditFlag && t.getStatus().equals("2")){
+                        addMessage(redirectAttributes, "报告归档已送审,请勿重复送审");
+                        return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralCostProjectMessage/?repage";
+                    }
+                    if(t.getStatus().equals("5")){
+                        addMessage(redirectAttributes, "报告归档已登记完成,无法再次送审");
+                        return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralCostProjectMessage/?repage";
+                    }
+                }
+                MyBeanUtils.copyBeanNotNull2Bean(projectReportRecord,t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+                if (StringUtils.isNotBlank(projectReportRecord.getView()) && projectReportRecord.getView().equals("modify")){
+                    projectReportRecord.setStatus("2");
+                }
+                ruralProjectMessageService.saveProjectReportRecord(t,variables,processInstanceId);//保存
+            }else {//新增表单保存
+                ProjectReportRecord reportRecord = projectReportRecordService.getprojectReportRecord(projectReportRecord.getReport().getId());//从数据库取出记录的值
+                if(null !=reportRecord){
+                    projectReportRecord.setId(reportRecord.getId());
+                }
+                ruralProjectMessageService.saveProjectReportRecord(projectReportRecord,variables,processInstanceId);//保存
+            }
+            addMessage(redirectAttributes, "保存报告归档成功");
+        }catch (Exception e){
+            addMessage(redirectAttributes, "保存报告归档失败");
+            logger.error("保存报告归档失败",e);
+        }
+        return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralCostProjectMessage/?repage";
+    }
+
+    /**
+     * 查看,增加,编辑报告归档表单页面
+     */
+    @RequestMapping(value = "formRecordModify")
+    public String formRecordModify(ProjectReportRecord projectReportRecord, Model model) {
+        //查询“配农网”工程类型id
+        String engineeringId = engineeringService.getEngineeringId("202");
+        projectReportRecord = projectReportRecordService.get(projectReportRecord.getId());
+        if(StringUtils.isBlank(projectReportRecord.getId())){
+            projectReportRecord.setCreateDate(new Date());
+            projectReportRecord.setCreateBy(UserUtils.getUser());
+        }
+
+        //获取项目信息
+        RuralProjectRecords ruralProjectRecords = projectRecordsService.get(projectReportRecord.getReport().getProject().getId());
+        ProjectAccessoryRelationInfo relateInfo = new ProjectAccessoryRelationInfo();
+        //添加项目类型
+        relateInfo.setAttachmentProjectType(ruralProjectRecords.getProjectType());
+        relateInfo.setAttachmentProjectSort(ruralProjectRecords.getAttachmentProjectSort());
+        //判断是否为打包项目,打包项目无需查看项目送审金额是否为500w以上判定
+        String money=ruralProjectRecords.getSubmitMoney();
+        Integer approvalMoney=null;
+        if(StringUtils.isBlank(money)){
+            approvalMoney=1;
+        }else{
+            approvalMoney=Integer.parseInt(money);
+        }
+        switch (approvalMoney){
+            case 0:
+                //金额为0
+                relateInfo.setAttachmentProjectApprovalMoney(null);
+                break;
+            case 1:
+                //500w以下金额状态
+                relateInfo.setAttachmentProjectApprovalMoney("1");
+                break;
+            case 2:
+                //500w以上金额状态
+                relateInfo.setAttachmentProjectApprovalMoney("2");
+                break;
+        }
+
+        //添加报告类型
+        relateInfo.setRequiredStage(2);
+        relateInfo.setId(ruralProjectRecords.getId());
+        //查询报告文件、依据性文件、其他文件必填列表以及数据
+        List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
+        for (MainDictDetail mainDict : mainDictDetails) {
+            relateInfo.setAttachType(mainDict.getValue());
+            switch (mainDict.getValue()) {
+                case "11":
+                    List<ProjectTemplateInfo> fileAttachmentList = projectTemplateService.getProjectTemplateList(relateInfo);
+                    for (ProjectTemplateInfo info: fileAttachmentList) {
+                        info.setAttachTypes(info.getAttachTypes().toLowerCase());
+                        if(engineeringId.equals(ruralProjectRecords.getEngineeringType())){
+                            if("审定单".equals(info.getAttachName()) || "咨询报告书正文(含附件)  附件一:工程预算或结算汇总表 附件二:编制或审核说明 附件三:工程预算或结算审定单 附件四:工程预算或结算书".equals(info.getAttachName()) ){
+                                if(!info.getAttachTypes().contains("zip")){
+                                    info.setAttachTypes(info.getAttachTypes()+",zip");
+                                }
+                                if(!info.getAttachTypes().contains("rar")){
+                                    info.setAttachTypes(info.getAttachTypes()+",rar");
+                                }
+                            }
+                        }
+                    }
+                    projectReportRecord.setFileAttachmentList(fileAttachmentList);
+                    break;
+                case "12":
+                    List<ProjectTemplateInfo> projectTemplateList = projectTemplateService.getProjectTemplateList(relateInfo);
+                    for (ProjectTemplateInfo info: projectTemplateList) {
+                        info.setAttachTypes(info.getAttachTypes().toLowerCase());
+                        if(engineeringId.equals(ruralProjectRecords.getEngineeringType())){
+                            if("投标文件、中标通知书、工程承包合同(协议书记专用条款部分)、补充协议".equals(info.getAttachName()) || "送审工程预算、结算书".equals(info.getAttachName()) ){
+                                if(!info.getAttachTypes().contains("zip")){
+                                    info.setAttachTypes(info.getAttachTypes()+",zip");
+                                }
+                                if(!info.getAttachTypes().contains("rar")){
+                                    info.setAttachTypes(info.getAttachTypes()+",rar");
+                                }
+                            }
+                        }
+                    }
+                    projectReportRecord.setFileGistdataList(projectTemplateList);
+                    break;
+                case "13":
+                    projectReportRecord.setFileOtherList(projectTemplateService.getProjectTemplateList(relateInfo));
+                    break;
+            }
+
+        }
+
+        projectReportRecord.setView("modify");
+        model.addAttribute("projectReportRecord", projectReportRecord);
+        model.addAttribute("project", projectReportRecord.getReport().getProject());
+
+        if(StringUtils.isNotBlank(projectReportRecord.getProcessInstanceId())){
+            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);
+            }
+        }
+
+        if (StringUtils.isNotBlank(projectReportRecord.getView()) && projectReportRecord.getView().equals("view")){
+            return "modules/ruralprojectrecords/projectReportRecord/projectReportRecordView";
+        }else if (StringUtils.isNotBlank(projectReportRecord.getView()) && projectReportRecord.getView().equals("modiftApply")){
+            return "modules/projectcontentinfo/projectReportRecordModiftApply";
+        }
+        return "modules/ruralprojectrecords/record/cost/projectReportRecordModify";
+    }
 }

+ 375 - 3
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageNewController.java

@@ -13,9 +13,11 @@ import com.jeeplus.modules.projectAccessory.service.ProjectTemplateService;
 import com.jeeplus.modules.projectEngineering.service.ProjectEngineeringService;
 import com.jeeplus.modules.projectcontentinfo.dao.ProjectcontentinfoDao;
 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;
@@ -31,6 +33,7 @@ import com.jeeplus.modules.sys.entity.User;
 import com.jeeplus.modules.sys.service.UserService;
 import com.jeeplus.modules.sys.utils.DictUtils;
 import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
 import com.jeeplus.modules.workstaff.entity.WorkStaffCertificate;
 import org.activiti.engine.HistoryService;
 import org.activiti.engine.history.HistoricProcessInstance;
@@ -48,9 +51,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
+import java.util.*;
 
 /**
  * 项目列表Controller
@@ -86,6 +87,10 @@ public class RuralProjectMessageNewController extends BaseController {
     private ProjectcontentinfoDao projectcontentinfoDao;
     @Autowired
     private ProjectEngineeringService engineeringService;
+    @Autowired
+    private ProjectReportRecordService projectReportRecordService;
+
+    private static byte[] SYN_BYTE = new byte[0];
 
     @ModelAttribute
     public RuralProjectRecords get(@RequestParam(required=false) String id) {
@@ -825,4 +830,371 @@ public class RuralProjectMessageNewController extends BaseController {
         }
         return  act;
     }
+
+    /**
+     * 根据信息获取归档信息并调转页面
+     */
+    @RequestMapping(value = "formRecord")
+    public String form(ProjectReportRecord projectReportRecord, Model model) throws Exception {
+        //查询“配农网”工程类型id
+        String engineeringId = engineeringService.getEngineeringId("202");
+        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")){
+                synchronized (SYN_BYTE) {
+                    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);
+        projectReportRecord.setUploadMode(uploadMode);
+        model.addAttribute("projectReportRecord", projectReportRecord);
+        model.addAttribute("project", projectReportRecord.getReport().getProject());
+        if(null != projectContractInfo){
+            if(projectContractInfo.getWorkClientInfoList().size()>0){
+                model.addAttribute("workClientInfoName", projectContractInfo.getWorkClientInfoList().get(0).getName());
+            }
+        }
+
+        ProjectAccessoryRelationInfo relateInfo = new ProjectAccessoryRelationInfo();
+        //添加项目类型
+        relateInfo.setAttachmentProjectType(ruralProjectRecords.getProjectType());
+        relateInfo.setAttachmentProjectSort(ruralProjectRecords.getAttachmentProjectSort());
+        //判断是否为打包项目,打包项目无需查看项目送审金额是否为500w以上判定
+        String money=ruralProjectRecords.getSubmitMoney();
+        Integer approvalMoney=null;
+        if(StringUtils.isBlank(money)){
+            approvalMoney=1;
+        }else{
+            approvalMoney=Integer.parseInt(money);
+        }
+        switch (approvalMoney){
+            case 0:
+                //金额为0
+                relateInfo.setAttachmentProjectApprovalMoney(null);
+                break;
+            case 1:
+                //500w以下金额状态
+                relateInfo.setAttachmentProjectApprovalMoney("1");
+                break;
+            case 2:
+                //500w以上金额状态
+                relateInfo.setAttachmentProjectApprovalMoney("2");
+                break;
+        }
+
+        //添加报告类型
+        relateInfo.setRequiredStage(2);
+        relateInfo.setId(ruralProjectRecords.getId());
+        //查询报告文件、依据性文件、其他文件必填列表以及数据
+        List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
+        for (MainDictDetail mainDict : mainDictDetails) {
+            relateInfo.setAttachType(mainDict.getValue());
+            switch (mainDict.getValue()) {
+                case "11":
+                    List<ProjectTemplateInfo> fileAttachmentList = projectTemplateService.getProjectTemplateList(relateInfo);
+                    for (ProjectTemplateInfo info: fileAttachmentList) {
+                        info.setAttachTypes(info.getAttachTypes().toLowerCase());
+                        if(engineeringId.equals(ruralProjectRecords.getEngineeringType())){
+                            if("审定单".equals(info.getAttachName()) || "咨询报告书正文(含附件)  附件一:工程预算或结算汇总表 附件二:编制或审核说明 附件三:工程预算或结算审定单 附件四:工程预算或结算书".equals(info.getAttachName()) ){
+                                if(!info.getAttachTypes().contains("zip")){
+                                    info.setAttachTypes(info.getAttachTypes()+",zip");
+                                }
+                                if(!info.getAttachTypes().contains("rar")){
+                                    info.setAttachTypes(info.getAttachTypes()+",rar");
+                                }
+                            }
+                        }
+                    }
+                    projectReportRecord.setFileAttachmentList(fileAttachmentList);
+                    break;
+                case "12":
+                    List<ProjectTemplateInfo> projectTemplateList = projectTemplateService.getProjectTemplateList(relateInfo);
+                    for (ProjectTemplateInfo info: projectTemplateList) {
+                        info.setAttachTypes(info.getAttachTypes().toLowerCase());
+                        if(engineeringId.equals(ruralProjectRecords.getEngineeringType())){
+                            if("投标文件、中标通知书、工程承包合同(协议书记专用条款部分)、补充协议".equals(info.getAttachName()) || "送审工程预算、结算书".equals(info.getAttachName()) ){
+                                if(!info.getAttachTypes().contains("zip")){
+                                    info.setAttachTypes(info.getAttachTypes()+",zip");
+                                }
+                                if(!info.getAttachTypes().contains("rar")){
+                                    info.setAttachTypes(info.getAttachTypes()+",rar");
+                                }
+                            }
+                        }
+                    }
+                    projectReportRecord.setFileGistdataList(projectTemplateList);
+                    break;
+                case "13":
+                    projectReportRecord.setFileOtherList(projectTemplateService.getProjectTemplateList(relateInfo));
+                    break;
+            }
+
+        }
+
+
+        if (StringUtils.isNotBlank(projectReportRecord.getView()) && projectReportRecord.getView().equals("view")){
+            projectReportRecord.setFileAttachmentList(projectRecordsService.disposeDataAttachment(projectReportRecord.getFileAttachmentList()));
+            projectReportRecord.setFileGistdataList(projectRecordsService.disposeDataAttachment(projectReportRecord.getFileGistdataList()));
+            projectReportRecord.setFileOtherList(projectRecordsService.disposeDataAttachment(projectReportRecord.getFileOtherList()));
+            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/record/projectReportRecordForm";
+    }
+
+    /**
+     * 暂存报告归档
+     * @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 {//新增表单保存
+                ProjectReportRecord reportRecord = projectReportRecordService.getprojectReportRecord(projectReportRecord.getReport().getId());//从数据库取出记录的值
+                if(null != reportRecord){
+                    addMessage(redirectAttributes, "报告归档已存在,请勿重复提交");
+                    return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralProjectMessage/?repage";
+                }
+                ruralProjectMessageService.saveProjectReportRecord(projectReportRecord,variables,processInstanceId);//保存
+            }
+            addMessage(redirectAttributes, "保存报告归档暂存成功");
+        }catch (Exception e){
+            addMessage(redirectAttributes, "保存报告归档暂存失败");
+            logger.error("Exception e:"+e);
+        }
+        return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralProjectMessage/?repage";
+    }
+    /**
+     * 保存报告归档
+     */
+    @RequestMapping(value = "saveRecord")
+    public String save(ProjectReportRecord projectReportRecord, Model model, RedirectAttributes redirectAttributes,Integer saveAuditFlag) 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.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());//从数据库取出记录的值
+                if(null != saveAuditFlag){
+                    if(1 == saveAuditFlag && t.getStatus().equals("2")){
+                        addMessage(redirectAttributes, "报告归档已送审,请勿重复送审");
+                        return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralProjectMessage/?repage";
+                    }
+                    if(t.getStatus().equals("5")){
+                        addMessage(redirectAttributes, "报告归档已登记完成,无法再次送审");
+                        return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralProjectMessage/?repage";
+                    }
+                }
+                MyBeanUtils.copyBeanNotNull2Bean(projectReportRecord,t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+                if (StringUtils.isNotBlank(projectReportRecord.getView()) && projectReportRecord.getView().equals("modify")){
+                    projectReportRecord.setStatus("2");
+                }
+                ruralProjectMessageService.saveProjectReportRecord(t,variables,processInstanceId);//保存
+            }else {//新增表单保存
+                ProjectReportRecord reportRecord = projectReportRecordService.getprojectReportRecord(projectReportRecord.getReport().getId());//从数据库取出记录的值
+                if(null !=reportRecord){
+                    projectReportRecord.setId(reportRecord.getId());
+                }
+                ruralProjectMessageService.saveProjectReportRecord(projectReportRecord,variables,processInstanceId);//保存
+            }
+            addMessage(redirectAttributes, "保存报告归档成功");
+        }catch (Exception e){
+            addMessage(redirectAttributes, "保存报告归档失败");
+            logger.error("Exception e:"+e);
+        }
+        return "redirect:" + Global.getAdminPath() + "/ruralProject/ruralProjectMessage/?repage";
+    }
+    /**
+     * 查看,增加,编辑报告归档表单页面
+     */
+    @RequestMapping(value = "formRecordModify")
+    public String formRecordModify(ProjectReportRecord projectReportRecord, Model model) {
+        //查询“配农网”工程类型id
+        String engineeringId = engineeringService.getEngineeringId("202");
+        projectReportRecord = projectReportRecordService.get(projectReportRecord.getId());
+        if(StringUtils.isBlank(projectReportRecord.getId())){
+            projectReportRecord.setCreateDate(new Date());
+            projectReportRecord.setCreateBy(UserUtils.getUser());
+        }
+        projectReportRecord.setView("modify");
+        //获取项目信息
+        RuralProjectRecords ruralProjectRecords = projectRecordsService.get(projectReportRecord.getReport().getProject().getId());
+        //根据条件查询附件必填项
+        ProjectAccessoryRelationInfo relateInfo = new ProjectAccessoryRelationInfo();
+        //添加项目类型
+        relateInfo.setAttachmentProjectType(ruralProjectRecords.getProjectType());
+        relateInfo.setAttachmentProjectSort(ruralProjectRecords.getAttachmentProjectSort());
+        //判断是否为打包项目,打包项目无需查看项目送审金额是否为500w以上判定
+        String money=ruralProjectRecords.getSubmitMoney();
+        Integer approvalMoney=null;
+        if(StringUtils.isBlank(money)){
+            approvalMoney=1;
+        }else{
+            approvalMoney=Integer.parseInt(money);
+        }
+        switch (approvalMoney){
+            case 0:
+                //金额为0
+                relateInfo.setAttachmentProjectApprovalMoney(null);
+                break;
+            case 1:
+                //500w以下金额状态
+                relateInfo.setAttachmentProjectApprovalMoney("1");
+                break;
+            case 2:
+                //500w以上金额状态
+                relateInfo.setAttachmentProjectApprovalMoney("2");
+                break;
+        }
+
+        //添加报告类型
+        relateInfo.setRequiredStage(2);
+        relateInfo.setId(ruralProjectRecords.getId());
+        //查询报告文件、依据性文件、其他文件必填列表以及数据
+        List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
+        for (MainDictDetail mainDict : mainDictDetails) {
+            relateInfo.setAttachType(mainDict.getValue());
+            switch (mainDict.getValue()) {
+                case "11":
+                    List<ProjectTemplateInfo> fileAttachmentList = projectTemplateService.getProjectTemplateList(relateInfo);
+                    for (ProjectTemplateInfo info: fileAttachmentList) {
+                        info.setAttachTypes(info.getAttachTypes().toLowerCase());
+                        if(engineeringId.equals(ruralProjectRecords.getEngineeringType())){
+                            if("审定单".equals(info.getAttachName()) || "咨询报告书正文(含附件)  附件一:工程预算或结算汇总表 附件二:编制或审核说明 附件三:工程预算或结算审定单 附件四:工程预算或结算书".equals(info.getAttachName()) ){
+                                if(!info.getAttachTypes().contains("zip")){
+                                    info.setAttachTypes(info.getAttachTypes()+",zip");
+                                }
+                                if(!info.getAttachTypes().contains("rar")){
+                                    info.setAttachTypes(info.getAttachTypes()+",rar");
+                                }
+                            }
+                        }
+                    }
+                    projectReportRecord.setFileAttachmentList(fileAttachmentList);
+                    break;
+                case "12":
+                    List<ProjectTemplateInfo> projectTemplateList = projectTemplateService.getProjectTemplateList(relateInfo);
+                    for (ProjectTemplateInfo info: projectTemplateList) {
+                        info.setAttachTypes(info.getAttachTypes().toLowerCase());
+                        if(engineeringId.equals(ruralProjectRecords.getEngineeringType())){
+                            if("投标文件、中标通知书、工程承包合同(协议书记专用条款部分)、补充协议".equals(info.getAttachName()) || "送审工程预算、结算书".equals(info.getAttachName()) ){
+                                if(!info.getAttachTypes().contains("zip")){
+                                    info.setAttachTypes(info.getAttachTypes()+",zip");
+                                }
+                                if(!info.getAttachTypes().contains("rar")){
+                                    info.setAttachTypes(info.getAttachTypes()+",rar");
+                                }
+                            }
+                        }
+                    }
+                    projectReportRecord.setFileGistdataList(projectTemplateList);
+                    break;
+                case "13":
+                    projectReportRecord.setFileOtherList(projectTemplateService.getProjectTemplateList(relateInfo));
+                    break;
+            }
+
+        }
+
+        model.addAttribute("projectReportRecord", projectReportRecord);
+        model.addAttribute("project", projectReportRecord.getReport().getProject());
+
+        if(StringUtils.isNotBlank(projectReportRecord.getProcessInstanceId())){
+            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);
+            }
+        }
+        if (StringUtils.isNotBlank(projectReportRecord.getView()) && projectReportRecord.getView().equals("view")){
+            return "modules/ruralprojectrecords/projectReportRecord/projectReportRecordView";
+        }else if (StringUtils.isNotBlank(projectReportRecord.getView()) && projectReportRecord.getView().equals("modiftApply")){
+            return "modules/projectcontentinfo/projectReportRecordModiftApply";
+        }
+        return "modules/ruralprojectrecords/record/projectReportRecordModify";
+    }
 }

+ 172 - 2
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -3070,7 +3070,7 @@ public class WorkProjectNotifyController extends BaseController {
 						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileAttachmentList()));
 						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileGistdataList()));
 						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileOtherList()));
-						return "modules/ruralprojectrecords/projectReportRecord/projectReportRecordView";
+						return "modules/ruralprojectrecords/view/projectReportRecordView";
 					}else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
 						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileAttachmentList()));
 						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileGistdataList()));
@@ -3084,7 +3084,177 @@ public class WorkProjectNotifyController extends BaseController {
 						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileAttachmentList()));
 						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileGistdataList()));
 						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileOtherList()));
-						return "modules/ruralprojectrecords/projectReportRecord/projectReportRecordView";
+						return "modules/ruralprojectrecords/view/projectReportRecordView";
+
+					}
+				} else if (workProjectNotify.getType().equals("101")) {    //工作内容报告归档
+					//查询“配农网”工程类型id
+					String engineeringId = engineeringService.getEngineeringId("202");
+					ProjectReportRecord projectReportRecord = projectReportRecordService.get(workProjectNotify.getNotifyId());
+					//判断是否未全过程归档项目信息
+					if("3".equals(projectReportRecord.getReport().getProject().getProjectType())){
+						Act act = getByAct(projectReportRecord.getProcessInstanceId());
+						projectReportRecord.setAct(act);
+						projectReportRecord.setHome("home");
+						model.addAttribute("projectReportRecord", projectReportRecord);
+						if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
+							return "modules/processProjectReportRecord/projectReportRecordView";
+						}else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
+							return "modules/processProjectReportRecord/projectReportRecordAudit";
+						} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
+							return "modules/processProjectReportRecord/projectReportRecordModifyApply";
+						} else {
+							return "modules/processProjectReportRecord/projectReportRecordView";
+						}
+					}
+					ProjectReportData projectReportData = projectReportDataService.getOnRural(projectReportRecord.getReport().getId());
+					projectReportRecord.setProjectReportData(projectReportData);
+					Projectcontentinfo projectcontentinfo = projectcontentinfoService.getByInfoId(projectReportData.getId());
+					projectcontentinfo.setProjectReportData(projectReportData);
+					//获取项目信息
+					RuralProjectRecords ruralProjectRecords = ruralProjectRecordsService.getQueryProjectUsers(projectReportRecord.getReport().getProject().getId());
+					//获取子项目列表信息
+					List<SubProjectInfo> subProjectInfos=this.queryReportDetails(ruralProjectRecords.getId());
+					//获取合同信息
+					WorkContractInfo workContractInfo=this.queryWorkContract(ruralProjectRecords.getId());
+					if(null != workContractInfo){
+						WorkClientInfo clientInfo = workClientInfoService.get(workContractInfo.getClient().getId());
+						model.addAttribute("workClientInfo", clientInfo);
+						if(StringUtils.isNotBlank(workContractInfo.getChargeCriterion())){
+							//收费标准
+							String [] biao=workContractInfo.getChargeCriterion().split(",");
+							List<String> chargeCriterionList=new ArrayList<>();
+							for (int i=0;i<biao.length;i++){
+								chargeCriterionList.add(biao[i]);
+							}
+							projectReportRecord.setChargeCriterionList(chargeCriterionList);
+						}
+					}
+
+					Act act = getByAct(projectReportRecord.getProcessInstanceId());
+					projectReportRecord.setAct(act);
+
+					if(StringUtils.isNotBlank(workProjectNotify.getHome())){
+						projectReportRecord.setHome(workProjectNotify.getHome());
+					}else{
+						projectReportRecord.setHome("home");
+					}
+
+
+					WorkContractInfo projectContractInfo = ruralProjectMessageService.getProjectContractInfo(ruralProjectRecords.getWorkContractInfo().getId());
+					ruralProjectRecords.setWorkContractInfo(projectContractInfo);
+					MyBeanUtils.copyBeanNotNull2Bean(ruralProjectRecords,projectReportRecord.getReport().getProject());//将编辑表单中的非NULL值覆盖数据库记录中的值
+					if(null != projectContractInfo){
+						if(projectContractInfo.getWorkClientInfoList().size()>0){
+							model.addAttribute("workClientInfoName", projectContractInfo.getWorkClientInfoList().get(0).getName());
+						}
+					}
+
+						ProjectAccessoryRelationInfo relateInfo = new ProjectAccessoryRelationInfo();
+						//添加项目类型
+						relateInfo.setAttachmentProjectType(ruralProjectRecords.getProjectType());
+						relateInfo.setAttachmentProjectSort(ruralProjectRecords.getAttachmentProjectSort());
+						//判断是否为打包项目,打包项目无需查看项目送审金额是否为500w以上判定
+						String money=ruralProjectRecords.getSubmitMoney();
+						Integer approvalMoney=null;
+						if(StringUtils.isBlank(money)){
+							approvalMoney=1;
+						}else{
+							approvalMoney=Integer.parseInt(money);
+						}
+						switch (approvalMoney){
+							case 0:
+								//金额为0
+								relateInfo.setAttachmentProjectApprovalMoney(null);
+								break;
+							case 1:
+								//500w以下金额状态
+								relateInfo.setAttachmentProjectApprovalMoney("1");
+								break;
+							case 2:
+								//500w以上金额状态
+								relateInfo.setAttachmentProjectApprovalMoney("2");
+								break;
+						}
+
+						//添加报告类型
+						//relateInfo.setRequiredStage(2);
+						List<Integer> requiredStageList = Lists.newArrayList();
+						requiredStageList.add(1);
+						requiredStageList.add(2);
+						relateInfo.setRequiredStageList(requiredStageList);
+						relateInfo.setId(ruralProjectRecords.getId());
+						//查询报告文件、依据性文件、其他文件必填列表以及数据
+						List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
+						for (MainDictDetail mainDict : mainDictDetails) {
+							relateInfo.setAttachType(mainDict.getValue());
+							switch (mainDict.getValue()) {
+								case "11":
+									List<ProjectTemplateInfo> fileAttachmentList = projectTemplateService.getProjectTemplateListByArchive(relateInfo);
+									for (ProjectTemplateInfo info: fileAttachmentList) {
+										info.setAttachTypes(info.getAttachTypes().toLowerCase());
+										if(engineeringId.equals(ruralProjectRecords.getEngineeringType())){
+											if("审定单".equals(info.getAttachName()) || "咨询报告书正文(含附件)  附件一:工程预算或结算汇总表 附件二:编制或审核说明 附件三:工程预算或结算审定单 附件四:工程预算或结算书".equals(info.getAttachName()) ){
+												if(!info.getAttachTypes().contains("zip")){
+													info.setAttachTypes(info.getAttachTypes()+",zip");
+												}
+												if(!info.getAttachTypes().contains("rar")){
+													info.setAttachTypes(info.getAttachTypes()+",rar");
+												}
+											}
+										}
+									}
+									projectReportRecord.setFileAttachmentList(fileAttachmentList);
+									break;
+								case "12":
+									List<ProjectTemplateInfo> projectTemplateList = projectTemplateService.getProjectTemplateListByArchive(relateInfo);
+									for (ProjectTemplateInfo info: projectTemplateList) {
+										info.setAttachTypes(info.getAttachTypes().toLowerCase());
+										if(engineeringId.equals(ruralProjectRecords.getEngineeringType())){
+											if("投标文件、中标通知书、工程承包合同(协议书记专用条款部分)、补充协议".equals(info.getAttachName()) || "送审工程预算、结算书".equals(info.getAttachName()) ){
+												if(!info.getAttachTypes().contains("zip")){
+													info.setAttachTypes(info.getAttachTypes()+",zip");
+												}
+												if(!info.getAttachTypes().contains("rar")){
+													info.setAttachTypes(info.getAttachTypes()+",rar");
+												}
+											}
+										}
+									}
+									projectReportRecord.setFileGistdataList(projectTemplateList);
+									break;
+								case "13":
+									projectReportRecord.setFileOtherList(projectTemplateService.getProjectTemplateListByArchive(relateInfo));
+									break;
+							}
+
+						}
+					projectReportRecord.setUploadMode(uploadMode);
+					model.addAttribute("projectcontentinfo", projectcontentinfo);
+					model.addAttribute("projectRecords", ruralProjectRecords);
+					model.addAttribute("projectReportData", projectReportData);
+					model.addAttribute("workContractInfo", workContractInfo);
+					model.addAttribute("projectReportRecord", projectReportRecord);
+					model.addAttribute("project", projectReportRecord.getReport().getProject());
+					if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
+						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileAttachmentList()));
+						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileGistdataList()));
+						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileOtherList()));
+						return "modules/ruralprojectrecords/view/projectReportRecordView";
+					}else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
+						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileAttachmentList()));
+						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileGistdataList()));
+						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileOtherList()));
+						model.addAttribute("identification","projectcontentinfoFile");
+						model.addAttribute("identificationName","归档审核意见");
+						return "modules/ruralprojectrecords/record/projectReportRecordAudit";
+					} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
+						return "modules/ruralprojectrecords/record/projectReportRecordModifyApply";
+					} else {
+						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileAttachmentList()));
+						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileGistdataList()));
+						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileOtherList()));
+						return "modules/ruralprojectrecords/view/projectReportRecordView";
 
 					}
 				} else if (workProjectNotify.getType().equals("65")) {    //工作内容报告归档

+ 9 - 6
src/main/resources/mappings/modules/projectrecord/ProjectPlanDao.xml

@@ -18,8 +18,8 @@
 		a.remind_name as remindName,
 		a.finish_name as finishName
 	</sql>
-	
-    
+
+
 	<select id="getUserId" resultType="com.jeeplus.modules.sys.entity.User">
 		select * from sys_user where id = #{userName}
 	</select>
@@ -38,7 +38,8 @@
 		  begin_date,
 		  end_date,
 		  remind_name,
-		  finish_name
+		  finish_name,
+		  sort
 		)
 		values
 		  (
@@ -54,7 +55,8 @@
 		  	#{beginDate},
 		  	#{endDate},
 		  	#{remindName},
-		  	#{finishName}
+		  	#{finishName},
+		  	#{sort}
 		  )
 	</insert>
 
@@ -94,6 +96,7 @@
 		a.remarks AS "remarks",
 		a.project_id as projectId,
 		a.project_stage as projectStage,
+		a.sort,
 		DATE_FORMAT(a.begin_date,'%Y-%m-%d') as beginDate,
 		DATE_FORMAT(a.end_date,'%Y-%m-%d') as endDate,
 		sur.name as remindName,
@@ -110,11 +113,11 @@
 				AND a.remind_name  = #{loginId}
 			</if>-->
 		</where>
-		order by a.update_date desc
+		order by a.sort asc
 	</select>
 
 	<select id="getProjectTypeName" resultType="java.lang.String">
 		select type_id as typeId from project_type where type_name = #{projectStage} and parent_id = #{parentId}
 	</select>
 
-</mapper>
+</mapper>

+ 1 - 0
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsDao.xml

@@ -66,6 +66,7 @@
         ,su.name AS "createBy.name"
         ,o.top_company AS "office.name"
 		,prd.number AS "projectReportNumber"
+		,prd.id AS "prdId"
 		,prr.id As "prrid"
 		,a.project_master_id as "projectMasterId"
 		,a.submit_money as "submitMoney"

+ 2 - 3
src/main/webapp/webpage/modules/oa/oaNotifyAudit.jsp

@@ -16,10 +16,9 @@
         var validateForm;
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
-
+                var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+                $("#opinion").val(ss);
                 if(obj == 1){
-                    var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
-                    $("#opinion").val(ss);
                     $('#flag').val('yes');
                 }else{
                     $('#flag').val('no');

+ 1 - 1
src/main/webapp/webpage/modules/processProjectReportRecord/projectReportRecordAudit.jsp

@@ -288,4 +288,4 @@
 	</div>
 </div>
 </body>
-</html>
+</html>

+ 4 - 4
src/main/webapp/webpage/modules/projectFilingBatch/projectFilingBatchAudit.jsp

@@ -14,9 +14,9 @@
 		var validateForm;
 		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
+				var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+				$("#opinion").val(ss);
                 if(obj == 1) {
-					var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
-					$("#opinion").val(ss);
                     $("#flag").val("yes");
                 }else {
                     if(obj == 2){
@@ -61,7 +61,7 @@
 
 
             }
-	
+
 		  return false;
 		}
 		$(document).ready(function() {
@@ -445,4 +445,4 @@
 	});
 </script>
 </body>
-</html>
+</html>

+ 2 - 2
src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordAudit.jsp

@@ -14,9 +14,9 @@
         	var fileNum =  $("#fileNum").val();
 			var fileNumTow =  $("#fileNumTow").val();
             if(validateForm.form()){
+				var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+				$("#opinion").val(ss);
                 if(obj == 1){
-					var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
-					$("#opinion").val(ss);
 					/*if(fileNum == ''|| fileNum == undefined){
 						top.layer.msg('填写案卷号!', {icon: 0});
 						return;

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

@@ -238,7 +238,7 @@
                                     </td>
 
                                     <td width="60px">
-                                        <input id="projectPlanList{{idx}}_costNum" name="projectPlanList[{{idx}}].costNum" readonly="readonly" style="text-align: center"  value="{{idx}}" type="text" class="form-control contentDetail"/>
+                                        <input id="projectPlanList{{idx}}_costNum" name="projectPlanList[{{idx}}].sort" readonly="readonly" style="text-align: center"  value="{{idx}}" type="text" class="form-control contentDetail"/>
                                     </td>
                                     <td>
                                         <input id="projectPlanList{{idx}}_projectStage" name="projectPlanList[{{idx}}].projectStage" list ="num" value="{{row.projectStage}}" class="form-control required"/>

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

@@ -239,7 +239,7 @@
                                     </td>
 
                                     <td width="60px">
-                                        <input id="projectPlanList{{idx}}_costNum" name="projectPlanList[{{idx}}].costNum" readonly="readonly" style="text-align: center"  value="{{idx}}" type="text" class="form-control contentDetail"/>
+                                        <input id="projectPlanList{{idx}}_costNum" name="projectPlanList[{{idx}}].sort" readonly="readonly" style="text-align: center"  value="{{idx}}" type="text" class="form-control contentDetail"/>
                                     </td>
                                     <td>
                                         <input id="projectPlanList{{idx}}_projectStage" name="projectPlanList[{{idx}}].projectStage" list ="num" value="{{row.projectStage}}" class="form-control required"/>

+ 4 - 4
src/main/webapp/webpage/modules/ruralprojectrecords/check/ruralProjectRecordsAudit.jsp

@@ -11,9 +11,9 @@
 		var validateForm;
 		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
+				var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+				$("#opinion").val(ss);
                 if(obj == 1) {
-					var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
-					$("#opinion").val(ss);
                     $("#flag").val("yes");
                     var bzshbUserId = $("#bzshbUserId").val();
                     if(undefined == bzshbUserId || null == bzshbUserId || '' == bzshbUserId){
@@ -30,7 +30,7 @@
                 $("#inputForm").submit();
                 return true;
             }
-	
+
 		  return false;
 		}
 		$(document).ready(function() {
@@ -573,4 +573,4 @@
 	</div>
 </div>
 </body>
-</html>
+</html>

+ 4 - 4
src/main/webapp/webpage/modules/ruralprojectrecords/check/ruralProjectRecordsDownAudit.jsp

@@ -13,9 +13,9 @@
             if(validateForm.form()){
 				var fileNum =  $("#fileNum").val();
 				var fileNumTow =  $("#fileNumTow").val();
+				var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+				$("#opinion").val(ss);
                 if(obj == 1) {
-					var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
-					$("#opinion").val(ss);
                     $("#flag").val("yes");
                     var bzshbUserId = $("#bzshbUserId").val();
                     if(undefined == bzshbUserId || null == bzshbUserId || '' == bzshbUserId){
@@ -44,7 +44,7 @@
                 $("#inputForm").submit();
                 return true;
             }
-	
+
 		  return false;
 		}
 		$(document).ready(function() {
@@ -600,4 +600,4 @@
 	</div>
 </div>
 </body>
-</html>
+</html>

+ 14 - 4
src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectMessageLists.jsp

@@ -847,6 +847,10 @@
 				{
 					xml+="<a href=\"#\" onclick=\"notifyDialogre('新增报告审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=" + d.reportNotifyId +"&home=report','95%', '95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 审批</a>";
 				}
+				if(d.newRecordAuditNotifyFlag != undefined && d.newRecordAuditNotifyFlag !=null && "" != d.newRecordAuditNotifyFlag && d.newRecordAuditNotifyFlag == 1)
+				{
+					xml+="<a href=\"#\" onclick=\"notifyDialogre('电子归档审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=" + d.reportNotifyId +"&home=record','95%', '95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 审批</a>";
+				}
 				if(d.flag == 1){
 					if(d.projectReportStatus == 0){
 						xml+="<a href=\"#\" onclick=\"openDialogre('新增报告', '${ctx}/ruralProject/ruralCostProjectMessageNew/form?projectId=" + d.id +"','95%', '95%','','送审,暂存,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-blue\" > 新增报告</a>";
@@ -878,19 +882,25 @@
 					if(d.projectReportStatus == 5){
 						/*xml+="<a href=\"#\" style='background-color: #FFB800' onclick=\"openDialogre('下载模板', '${ctx}/ruralProject/ruralCostProjectMessage/skipDownloadFtl?id=" + d.id +"','35%', '35%','','下载,关闭')\" class=\"op-btn\" > 下载模板</a>";*/
 						if(d.projectReportRecordStatus == 0){
-							xml+="<a href=\"#\" onclick=\"openDialogre('新增归档信息', '${ctx}/ruralProject/ruralCostProjectMessage/formRecord?reportId=" + d.id +"','95%', '95%','','送审,暂存,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-blue\" > 线上归档</a>";
+							xml+="<a href=\"#\" onclick=\"openDialogre('新增归档信息', '${ctx}/ruralProject/ruralCostProjectMessageNew/formRecord?reportId=" + d.id +"','95%', '95%','','送审,暂存,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-blue\" > 线上归档</a>";
 						}
 						if(d.projectReportRecordStatus == 1){
-							xml+="<a href=\"#\" onclick=\"openDialogre('修改归档信息', '${ctx}/ruralProject/ruralCostProjectMessage/formRecordModify?id=" + d.prrId +"','95%', '95%','','送审,暂存,关闭')\" class=\"layui-btn layui-btn-xs  layui-bg- layui-bg-green\" > 线上重新归档</a>";
+							xml+="<a href=\"#\" onclick=\"openDialogre('修改归档信息', '${ctx}/ruralProject/ruralCostProjectMessageNew/formRecordModify?id=" + d.prrId +"','95%', '95%','','送审,暂存,关闭')\" class=\"layui-btn layui-btn-xs  layui-bg- layui-bg-green\" > 线上重新归档</a>";
 						}
 						if(d.projectReportRecordStatus == 2){
 							xml+="<a href=\"${ctx}/ruralProject/ruralCostProjectMessage/cancelInvalidate?id=" + d.prrId + "&processInstanceId=" + d.prrProcessInstanceId + "\" onclick=\"return confirmx('确认要撤回该报告线上归档审批吗?', this.href)\" class=\"layui-btn layui-btn-xs  layui-bg-red\" > 撤回线上归档</a>";
 						}
 						if(d.projectReportRecordStatus == 3){
-							xml+="<a href=\"#\" onclick=\"openDialogre('撤回调整归档信息', '${ctx}/ruralProject/ruralCostProjectMessage/formRecordModify?id=" + d.prrId + " ','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs  layui-bg-green\" > 线上重新归档</a>";
+							xml+="<a href=\"#\" onclick=\"openDialogre('撤回调整归档信息', '${ctx}/ruralProject/ruralCostProjectMessageNew/formRecordModify?id=" + d.prrId + " ','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs  layui-bg-green\" > 线上重新归档</a>";
 						}
 						if(d.projectReportRecordStatus == 4){
-							xml+="<a href=\"#\" onclick=\"openDialogre('调整归档信息', '${ctx}/ruralProject/ruralCostProjectMessage/formRecordModify?id=" + d.prrId + "&view=modify','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs  layui-bg-green\" > 线上重新归档</a>";
+							//驳回操作
+							if(d.newRecordNotifyFlag == 1){
+								xml+="<a href=\"#\" onclick=\"openDialogre('调整归档信息', '${ctx}/ruralProject/ruralCostProjectMessageNew/formRecordModify?id=" + d.prrId + "&view=modify','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs  layui-bg-green\" > 线上重新归档</a>";
+							}else{
+								xml+="<a href=\"#\" onclick=\"openDialogre('调整归档信息', '${ctx}/ruralProject/ruralCostProjectMessage/formRecordModify?id=" + d.prrId + "&view=modify','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs  layui-bg-green\" > 线上重新归档</a>";
+							}
+
 						}
 					}
 

+ 979 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/projectReportRecordForm.jsp

@@ -0,0 +1,979 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>合同归档管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript" src="${ctxStatic}/layui/layui.js"></script>
+	<link rel='stylesheet' type="text/css" href="${ctxStatic}/layui/css/layui.css"/>
+	<link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
+	<%@include file="/webpage/include/treetable.jsp" %>
+
+	<style>
+		label.error:nth-child(2){
+			top:40px;
+			left:0;
+		}
+		.layui-table th{
+			font-size: 14px;
+			/*表头内容居中显示*/
+			text-align: center;
+		}
+		.layui-table td{
+			/*表头内容居中显示*/
+			text-align: left;
+		}
+		span{
+			font-size: 14px;
+		}
+	</style>
+	<script type="text/javascript">
+        var validateForm;
+		function listTr(obj){
+			var name=$(obj).attr("id");
+			var tiao="."+name;
+			var span=$(obj).find("td").eq(2);
+			$(span).toggle(function () {
+				$(tiao).hide();
+				$(span).find("span").eq(0).attr("class","default_shut")
+			},function () {
+				$(tiao).show();
+				$(span).find("span").eq(0).attr("class","default_open")
+			});
+		}
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+				var projectId = '${project.id}';
+				var boolFlag = true;
+					if(obj == 2){
+						$("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessageNew/holdSaveRecord");
+					}else{
+						var leng = $("#file_attachment tr").length;
+						for(var i=0; i<leng; i++) {
+							var numberStr = $("#file_attachment tr").eq(i).find("td:first").html();
+							var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
+							var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
+							if(second == 1){
+								if(numberStr != undefined && numberStr !=null && numberStr !=''){
+									if (fileFlag==1){
+
+									}else{
+										top.layer.msg("请上传成果文件!", {icon: 0});
+										return false;
+									}
+								}
+							}
+						}
+						if(boolFlag){
+							var gistdata = $("#file_gistdata tr").length;
+							for(var i=0; i<gistdata; i++) {
+								var numberStr = $("#file_gistdata tr").eq(i).find("td:first").html();
+								var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
+								var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
+								if(second == 1){
+									if(numberStr != undefined && numberStr !=null && numberStr !=''){
+										if (fileFlag==1){
+
+										}else{
+											top.layer.msg("请上传依据性文件!", {icon: 0});
+											return false;
+										}
+									}
+								}
+							}
+						}
+						if(boolFlag){
+							var other = $("#file_other tr").length;
+							for(var i=0; i<other; i++) {
+								var numberStr = $("#file_other tr").eq(i).find("td:first").html();
+								var second = $("#file_other tr").eq(i).find("td:eq(1)").html();
+								var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
+								if(second == 1){
+									if(numberStr != undefined && numberStr !=null && numberStr !=''){
+										if (fileFlag==1){
+
+										}else{
+											top.layer.msg("请上传其它文件!", {icon: 0});
+											return false;
+										}
+									}
+								}
+							}
+						}
+						$("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessageNew/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();
+            });
+			$(".tabMove").mouseover(function(){
+				//tips层-下
+				var td=$(this)
+				var tdval=$(this).find("input").val();
+				layer.tips(tdval, td, {
+					tips: 3
+				});
+			})
+        });
+        function insertTitle(tValue){
+            var list = "${projectReportRecord.workAttachments}";
+            var size = (list.split('url')).length-1;
+            var files = $("#attachment_file")[0].files;            for(var i = 0;i<files.length;i++) {                var file = files[i];
+            var attachmentId = "";
+            var attachmentFlag = "99";
+            console.log(file);
+            var timestamp=new Date().getTime();
+
+            var storeAs = "projectRecords";
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
+        }
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="projectReportRecord" method="post" class="form-horizontal layui-form">
+			<form:hidden path="id"/>
+			<form:hidden path="numberCount"/>
+			<form:hidden id="reportId" path="report.id"/>
+			<form:hidden path="report.name"/>
+			<form:hidden path="report.project.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="reportDate" name="report.reportDate"  htmlEscape="false" readonly="true" class="form-control  layui-input required" value="<fmt:formatDate value="${projectReportRecord.report.reportDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同编号:</label>
+					<div class="layui-input-block">
+						<input id="contractNum" name="contractNum"  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${projectReportRecord.report.project.workContractInfo.contractNum}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同名称:</label>
+					<div class="layui-input-block">
+						<input id="contractName" name="contractName"  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${projectReportRecord.report.project.workContractInfo.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">委托方:</label>
+					<div class="layui-input-block">
+						<input id="clientName" name="clientName"  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${workClientInfoName}"/>
+					</div>
+				</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">归档时间:</label>
+					<div class="layui-input-block">
+						<input id="recordDate" name="recordDate"  htmlEscape="false" readonly="true" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+							   value="<fmt:formatDate value="${projectReportRecord.createDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">说明:</label>
+					<div class="layui-input-block">
+						<form:textarea placeholder="请输入说明:" path="remarks" htmlEscape="false" rows="4" maxlength="255" class="form-control "/>
+					</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>
+					<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 tree_table">
+						<thead>
+						<tr>
+							<th width="30%">电子件名称</th>
+<%--							<th width="100px">最大容量(M)</th>--%>
+							<th>类型限制</th>
+<%--							<th>文件名</th>--%>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
+							<tr id="file_attachment_${fileAttachment.id}_tr" onclick="listTr(this)">
+								<td style="display:none">${fileAttachment.id}</td>
+								<td style="display:none">${fileAttachment.mustFlag}</td>
+								<c:choose>
+									<c:when test="${fileAttachment.mustFlag == 1}">
+										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
+									</c:when>
+									<c:otherwise>
+										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
+									</c:otherwise>
+								</c:choose>
+								<td>${fileAttachment.attachLength}M;${fileAttachment.attachTypes}</td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+									</div>
+								</td>
+								<td style="display:none">${fileAttachment.fileFlag}</td>
+							</tr>
+							<c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
+								<tr class="file_attachment_${fileAttachment.id}_tr">
+									<td></td>
+									<c:choose>
+										<c:when test="${projectReportRecord.uploadMode == 2}">
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td>
+													<img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+									<td class="op-td">
+										<div class="op-btn-box" >
+												<%--附件下载删除--%>
+											<c:choose>
+												<c:when test="${projectReportRecord.uploadMode == 2}">
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:when>
+														<c:otherwise>
+															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:otherwise>
+													</c:choose>
+												</c:when>
+												<c:otherwise>
+													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+												</c:otherwise>
+											</c:choose>
+										</div>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<script type="text/template" id="fileAttachmentTpl">//<!--
+                <tr id="budgetList{{idx}}">
+                    <td class="hide">
+                        <input id="fileAttachment{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
+                    </td>
+                    <td class="hide">
+                        0
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.attachName}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.attachLength}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.attachTypes}}
+                    </td>
+                    <td style="text-align:center;">
+
+                    </td>
+					<td class="op-td">
+						<div class="op-btn-box" >
+							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+						</div>
+					</td>
+                </tr>//-->
+			</script>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>依据性文件</h2></div>
+				<div id="addFile_gistdata" style="display: none" class="upload-progress">
+					<span id="fileName_gistdata" ></span>
+					<span id="_gistdata" ></span>
+					<b><span id="baifenbi_gistdata" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
+				<span id="gistdata_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="gistdata_upTable" class="table table-bordered table-condensed details tree_table">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th width="30%">电子件名称</th>
+<%--							<th width="100px">最大容量(M)</th>--%>
+							<th>类型限制</th>
+<%--							<th>文件名</th>--%>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_gistdata">
+						<c:forEach items="${projectReportRecord.fileGistdataList}" var = "fileGistdata" varStatus="status">
+							<tr id="file_gistdata_${fileGistdata.id}_tr" onclick="listTr(this)">
+									<%-- <td>${status.index + 1}</td>--%>
+								<td style="display:none">${fileGistdata.id}</td>
+								<td style="display:none">${fileGistdata.mustFlag}</td>
+								<c:choose>
+									<c:when test="${fileGistdata.mustFlag == 1}">
+										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
+									</c:when>
+									<c:otherwise>
+										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
+									</c:otherwise>
+								</c:choose>
+								<td>${fileGistdata.attachLength}M;${fileGistdata.attachTypes}</td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+									</div>
+								</td>
+								<td style="display:none">${fileGistdata.fileFlag}</td>
+
+							</tr>
+							<c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
+								<tr class="file_gistdata_${fileGistdata.id}_tr">
+									<td></td>
+									<c:choose>
+										<c:when test="${projectReportRecord.uploadMode == 2}">
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+									<td class="op-td">
+										<div class="op-btn-box" >
+												<%--附件下载删除--%>
+											<c:choose>
+												<c:when test="${projectReportRecord.uploadMode == 2}">
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:when>
+														<c:otherwise>
+															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:otherwise>
+													</c:choose>
+												</c:when>
+												<c:otherwise>
+													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+												</c:otherwise>
+											</c:choose>
+										</div>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<script type="text/template" id="gistdataTpl">//<!--
+                <tr id="budgetList{{idx}}">
+                    <td class="hide">
+                        <input id="gistdataTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
+                    </td>
+                    <td class="hide">
+                        0
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.attachName}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.attachLength}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.attachTypes}}
+                    </td>
+                    <td style="text-align:center;">
+
+                    </td>
+					<td class="op-td">
+						<div class="op-btn-box" >
+							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+						</div>
+					</td>
+                </tr>//-->
+			</script>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>其他文件</h2></div>
+				<div id="addFile_other" style="display: none" class="upload-progress">
+					<span id="fileName_other" ></span>
+					<span id="_other" ></span>
+					<b><span id="baifenbi_other" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
+				<span id="other_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable_other" class="table table-bordered table-condensed details tree_table">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th width="30%">电子件名称</th>
+<%--							<th width="100px">最大容量(M)</th>--%>
+							<th>类型限制</th>
+<%--							<th>文件名</th>--%>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_other">
+						<c:forEach items="${projectReportRecord.fileOtherList}" var = "fileOther" varStatus="status">
+							<tr id="file_other_${fileOther.id}_tr" onclick="listTr(this)">
+									<%-- <td>${status.index + 1}</td>--%>
+								<td style="display:none">${fileOther.id}</td>
+								<td style="display:none">${fileOther.mustFlag}</td>
+								<c:choose>
+									<c:when test="${fileOther.mustFlag == 1}">
+										<td class="tabMove" style="text-align: left;"><span class='default_open ' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
+									</c:when>
+									<c:otherwise>
+										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
+									</c:otherwise>
+								</c:choose>
+								<td>${fileOther.attachLength}M;${fileOther.attachTypes}</td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+									</div>
+								</td>
+								<td style="display:none">${fileOther.fileFlag}</td>
+
+							</tr>
+							<c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
+								<tr class="addFile_other_${fileOther.id}_tr">
+									<td></td>
+									<c:choose>
+										<c:when test="${projectReportRecord.uploadMode == 2}">
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+									<td class="op-td">
+										<div class="op-btn-box" >
+												<%--附件下载删除--%>
+											<c:choose>
+												<c:when test="${projectReportRecord.uploadMode == 2}">
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:when>
+														<c:otherwise>
+															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:otherwise>
+													</c:choose>
+												</c:when>
+												<c:otherwise>
+													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+												</c:otherwise>
+											</c:choose>
+										</div>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<script type="text/template" id="otherTpl">//<!--
+                <tr id="budgetList{{idx}}">
+                    <td class="hide">
+                        <input id="otherTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
+                    </td>
+                    <td class="hide">
+                        0
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.attachName}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.attachLength}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.attachTypes}}
+                    </td>
+                    <td style="text-align:center;">
+
+                    </td>
+					<td class="op-td">
+						<div class="op-btn-box" >
+							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+						</div>
+					</td>
+                </tr>//-->
+			</script>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div><script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script src="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.js" charset="utf-8"></script>
+<script>
+	function openBill2(title,url,width,height,target,formId,tableId){
+		var rows = $(this).parent().prevAll().length + 1;
+		var frameIndex = parent.layer.getFrameIndex(window.name);
+		var urls = url+"&index="+frameIndex;
+		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			width='auto';
+			height='auto';
+		}else{//如果是PC端,根据用户设置的width和height显示。
+
+		}
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			skin:"two-btns",
+			maxmin: false, //开启最大化最小化按钮
+			content: urls ,
+			btn: ['确定','关闭'],
+			yes: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+				}
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
+				var $document = iframeWin.contentWindow.document;
+
+				formSubmit2($document,formId,index,tableId);
+
+			},
+			cancel: function(index){
+			}
+		});
+	}
+	function formSubmit2($document,inputForm,index,tableId){
+
+		var validateForm = $($document.getElementById(inputForm)).validate({
+			submitHandler: function(form){
+				loading('正在提交,请稍等...');
+				form.submit();
+			},
+			errorContainer: "#messageBox",
+			errorPlacement: function(error, element) {
+				$($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+				if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+					error.appendTo(element.parent().parent());
+				} else {
+					error.insertAfter(element);
+				}
+			}
+		});
+		if(validateForm.form()){
+			var action = $document.getElementById(inputForm).action;
+			var handleInfo = $($document.getElementById(inputForm)).serialize();
+			$.ajax({
+				type : "POST",
+				url : action,
+				data : handleInfo,
+				//请求成功
+				success:function(data) {
+					var d = data;
+					//输出提示信息
+					if(d.str.length>0){
+						parent.layer.msg(d.str,{icon:1});
+					}
+					$("#"+tableId).load(location.href + " #"+tableId);
+					//关闭当前页
+					top.layer.close(index)
+				}
+			});
+		}
+	}
+
+
+	//新增行方法
+	var fileAttachmentTpl = $("#fileAttachmentTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+	var gistdataTpl = $("#gistdataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+	var otherTpl = $("#otherTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+
+	function formAttachment(title,url,width,height,target,formId,divId){
+		var rows = $(this).parent().prevAll().length + 1;
+		var frameIndex = parent.layer.getFrameIndex(window.name);
+		var urls = url;
+		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			width='auto';
+			height='auto';
+		}else{//如果是PC端,根据用户设置的width和height显示。
+
+		}
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			skin:"two-btns",
+			maxmin: false, //开启最大化最小化按钮
+			content: urls ,
+			btn: ['确定','关闭'],
+			yes: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				inputForm.attr("action","${ctx}/projectTemplate/projectTemplate/getProjectTemplateInfo");//表单提交成功后,从服务器返回的url在当前tab中展示
+				var $document = iframeWin.contentWindow.document;
+				formSubmitAjax($document,formId,index,divId);
+
+			},
+			cancel: function(index){
+			}
+		});
+	}
+	function formSubmitAjax($document,inputForm,index,divId){
+		var validateForm = $($document.getElementById(inputForm)).validate({
+			submitHandler: function(form){
+				loading('正在提交,请稍等...');
+				form.submit();
+			},
+			errorContainer: "#messageBox",
+			errorPlacement: function(error, element) {
+				$($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+				if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+					error.appendTo(element.parent().parent());
+				} else {
+					error.insertAfter(element);
+				}
+			}
+		});
+		if(validateForm.form()){
+			$($document.getElementById(inputForm)).ajaxSubmit({
+				success:function(data) {
+					if(!data.success){
+						top.layer.msg("保存依据资料信息异常!",{icon:2});
+						return false;
+					}
+					var idx = ''
+					if(divId == 'file_attachment'){
+						idx = $("#file_attachment tr").length;
+						addRowBaseData("#file_attachment",idx,fileAttachmentTpl,data.body.projectAccessoryInfo);
+					}else if(divId == 'file_gistdata'){
+						idx = $("#file_gistdata tr").length;
+						addRowBaseData("#file_gistdata",idx,gistdataTpl,data.body.projectAccessoryInfo);
+					}else if(divId == 'file_other'){
+						idx = $("#file_other tr").length;
+						addRowBaseData("#file_other",idx,otherTpl,data.body.projectAccessoryInfo);
+					}
+					parent.layer.msg(data.msg,{icon:1});
+					top.layer.close(index)
+				}
+			});
+		}
+	}
+
+
+	function hasInArr(id,idArr) {
+		for(var i=0;i<idArr.length;i++){
+			if(id==$(idArr[i]).val()){
+				return true;
+			}
+		}
+		return false;
+	}
+	function existBaseData(id,length) {
+		for (var i=0;i<length;i++) {
+			var val = $('#file_attachment'+i+'_id').val();
+			if(id==val){
+				return true;
+			}
+		}
+		return false;
+	}
+
+	function addRowBaseData(list, idx, tpl, row){
+		bornTemplete(list, idx, tpl, row, idx);
+	}
+
+	function bornTemplete(list, idx, tpl, row, idx1){
+		var idx1 = '';
+		if(list == 'file_attachment'){
+			idx1 = $("#file_attachment tr").length +1;
+		}else if(list == 'file_gistdata'){
+			idx1 = $("#file_gistdata tr").length +1;
+		}else if(list == 'file_other'){
+			idx1 = $("#file_other tr").length +1;
+		}
+
+		$(list).append(Mustache.render(tpl, {
+			idx: idx, delBtn: true, row: row,
+			order:idx1 + 1, idx1:idx1
+		}));
+		$(list+idx).find("select").each(function(){
+			$(this).val($(this).attr("data-value"));
+		});
+		$(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+			var ss = $(this).attr("data-value").split(',');
+			for (var i=0; i<ss.length; i++){
+				if($(this).val() == ss[i]){
+					$(this).attr("checked","checked");
+				}
+			}
+		});
+	}
+	function delRowBaseData(obj, prefix,userId){
+		var id = $(prefix+"_id").val();
+		var currentUser = '${fns:getUser().id}';
+		var contentId = '${projectcontentinfo.projectContentData.id}';
+		console.log(contentId);
+		var condition = "${flag}";
+		$.ajax({
+			type:"post",
+			url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
+			data:{"contentId":contentId,"basedId":id,"condition":condition},
+			dataType:"json",
+			success:function(data){
+				if(data.success) {
+					if("according" == condition || "completion" == condition || "early" == condition || "claim" == condition || "design" == condition || "visa" == condition || "interim" == condition || "distribution" == condition || "material" == condition || "armor" == condition ){
+						$(obj).parent().parent().remove();
+					}else{
+						$(obj).parent().parent().remove();
+					}
+					if(data.body.inuse){
+						return;
+					}
+					if (currentUser == userId) {
+						confirmDelete('是否同步删除资料库的文件?','${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+id+'&id=${projectcontentinfo.id}&type=1');
+					}
+				}else {
+					top.layer.msg("删除依据资料失败!", {icon: 0});
+				}
+			}
+		})
+		return;
+	}
+
+	function delBaseData(obj, prefix,userId){
+		var id = $(prefix+"_id").val();
+		var currentUser = '${fns:getUser().id}';
+		var contentId = '${projectcontentinfo.projectContentData.id}';
+		console.log(contentId);
+		var condition = "${flag}";
+		$.ajax({
+			type:"post",
+			url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
+			data:{"contentId":contentId,"basedId":id,"condition":condition},
+			dataType:"json",
+			success:function(data){
+				if(data.success) {
+					if("according" == condition || "completion" == condition || "early" == condition || "claim" == condition || "design" == condition || "visa" == condition || "interim" == condition || "distribution" == condition || "material" == condition || "armor" == condition ){
+						$(obj).parent().parent().parent().remove();
+					}else{
+						$(obj).parent().parent().remove();
+					}
+					if(data.body.inuse){
+						return;
+					}
+					if (currentUser == userId) {
+						confirmDelete('是否同步删除资料库的文件?','${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+id+'&id=${projectcontentinfo.id}&type=1');
+					}
+				}else {
+					top.layer.msg("删除依据资料失败!", {icon: 0});
+				}
+			}
+		})
+		return;
+	}
+
+	function confirmDelete(mess, href){
+		top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
+			if (typeof href == 'function') {
+				href();
+			}else{
+				$.ajax({
+					url:href,
+					type:"post",
+					success:function(data){
+						if(data.success){
+							top.layer.msg("删除依据资料成功!", {icon: 0});
+						}
+					}
+				});
+			}
+			top.layer.close(index);
+		});
+		return false;
+	}
+</script>
+</body>
+</html>

文件差異過大導致無法顯示
+ 1040 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/projectReportRecordModify.jsp


文件差異過大導致無法顯示
+ 1620 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/record/projectReportRecordAudit.jsp


+ 983 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/record/projectReportRecordForm.jsp

@@ -0,0 +1,983 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>合同归档管理</title>
+	<meta name="decorator" content="default"/>
+	<link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
+	<%@include file="/webpage/include/treetable.jsp" %>
+	<style>
+		label.error:nth-child(2){
+			top:40px;
+			left:0;
+		}
+		.layui-table th{
+			font-size: 14px;
+			/*表头内容居中显示*/
+			text-align: center;
+		}
+		.layui-table td{
+			/*表头内容居中显示*/
+			text-align: left;
+		}
+		span{
+			font-size: 14px;
+		}
+	</style>
+
+	<script type="text/javascript">
+        var validateForm;
+        function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+				var projectId = '${project.id}';
+				var boolFlag = true;
+
+				if(boolFlag){
+					if(obj == 2){
+						$("#inputForm").attr("action","${ctx}/ruralProject/ruralProjectMessageNew/holdSaveRecord");
+					}else{
+						var leng = $("#file_attachment tr").length;
+						for(var i=0; i<leng; i++) {
+							var numberStr = $("#file_attachment tr").eq(i).find("td:first").html();
+							var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
+							var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
+							if(second == 1){
+								if(numberStr != undefined && numberStr !=null && numberStr !=''){
+									if (fileFlag==1){
+
+									}else{
+										top.layer.msg("请上传成果文件!", {icon: 0});
+										return false;
+									}
+								}
+							}
+						}
+						if(boolFlag){
+							var gistdata = $("#file_gistdata tr").length;
+							for(var i=0; i<gistdata; i++) {
+								var numberStr = $("#file_gistdata tr").eq(i).find("td:first").html();
+								var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
+								var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
+
+								if(second == 1){
+									if(numberStr != undefined && numberStr !=null && numberStr !=''){
+										if (fileFlag==1){
+
+										}else{
+											top.layer.msg("请上传依据性文件!", {icon: 0});
+											return false;
+										}
+									}
+								}
+							}
+						}
+						if(boolFlag){
+							var other = $("#file_other tr").length;
+							for(var i=0; i<other; i++) {
+								var numberStr = $("#file_other tr").eq(i).find("td:first").html();
+								var second = $("#file_other tr").eq(i).find("td:eq(1)").html();
+								var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
+
+								if(second == 1){
+									if(numberStr != undefined && numberStr !=null && numberStr !=''){
+										if (fileFlag==1){
+
+										}else{
+											top.layer.msg("请上传其它文件!", {icon: 0});
+											return false;
+										}
+									}
+								}
+							}
+						}
+						$("#inputForm").attr("action","${ctx}/ruralProject/ruralProjectMessageNew/saveRecord");
+					}
+					$("#inputForm").submit();
+					return true;
+				}
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            return false;
+
+        }
+        $(document).ready(function() {
+			$(".tabMove").mouseover(function(){
+				//tips层-下
+				var td=$(this)
+				var tdval=$(this).find("input").val();
+				layer.tips(tdval, td, {
+					tips: 3
+				});
+			})
+            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 = "projectRecords";
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
+        }
+		function listTr(obj){
+			var name=$(obj).attr("id");
+			var tiao="."+name;
+			var span=$(obj).find("td").eq(2);
+			// var ss=$(span).val().split(" ")[4];
+			$(span).toggle(function () {
+				$(tiao).hide();
+				$(span).find("span").eq(0).attr("class","default_shut")
+			},function () {
+				$(tiao).show();
+				$(span).find("span").eq(0).attr("class","default_open")
+			});
+		}
+	</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"/>
+			<form:hidden path="report.name"/>
+			<form:hidden path="report.project.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="reportDate" name="report.reportDate"  htmlEscape="false" readonly="true" class="form-control  layui-input required" value="<fmt:formatDate value="${projectReportRecord.report.reportDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同编号:</label>
+					<div class="layui-input-block">
+						<input id="contractNum" name="contractNum"  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${projectReportRecord.report.project.workContractInfo.contractNum}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同名称:</label>
+					<div class="layui-input-block">
+						<input id="contractName" name="contractName"  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${projectReportRecord.report.project.workContractInfo.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">委托方:</label>
+					<div class="layui-input-block">
+						<input id="clientName" name="clientName"  htmlEscape="false" readonly="true" class="form-control  layui-input" value="${workClientInfoName}"/>
+					</div>
+				</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">提交归档时间:</label>
+					<div class="layui-input-block">
+						<input id="recordDate" name="recordDate"  htmlEscape="false" readonly="true" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
+							   value="<fmt:formatDate value="${projectReportRecord.createDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">说明:</label>
+					<div class="layui-input-block">
+						<form:textarea placeholder="请输入说明" path="remarks" htmlEscape="false" rows="4" maxlength="255" class="form-control "/>
+					</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>
+					<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 tree_table">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th width="30%">电子件名称</th>
+<%--							<th width="100px">最大容量(M)</th>--%>
+							<th width="">类型限制</th>
+<%--							<th>文件名</th>--%>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
+							<tr  id="file_attachment_${fileAttachment.id}_tr" onclick="listTr(this)">
+								<td style="display:none">${fileAttachment.id}</td>
+								<td style="display:none">${fileAttachment.mustFlag}</td>
+								<c:choose>
+									<c:when test="${fileAttachment.mustFlag == 1}">
+										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
+									</c:when>
+									<c:otherwise>
+										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
+									</c:otherwise>
+								</c:choose>
+								<td>${fileAttachment.attachLength}M;${fileAttachment.attachTypes}</td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+									</div>
+								</td>
+								<td style="display:none">${fileAttachment.fileFlag}</td>
+
+							</tr>
+							<c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
+								<tr class="file_attachment_${fileAttachment.id}_tr">
+									<td></td>
+									<c:choose>
+										<c:when test="${projectReportRecord.uploadMode == 2}">
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+<%--									<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a></td>--%>
+									<td class="op-td">
+										<div class="op-btn-box" >
+												<%--附件下载删除--%>
+											<c:choose>
+												<c:when test="${projectReportRecord.uploadMode == 2}">
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:when>
+														<c:otherwise>
+															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:otherwise>
+													</c:choose>
+												</c:when>
+												<c:otherwise>
+													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+												</c:otherwise>
+											</c:choose>
+
+												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
+										</div>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<script type="text/template" id="fileAttachmentTpl">//<!--
+                <tr id="budgetList{{idx}}">
+                    <td class="hide">
+                        <input id="fileAttachment{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
+                    </td>
+                    <td class="hide">
+                        0
+                    </td>
+                    <td style="text-align:center;">
+                        <span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>{{row.attachName}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.attachLength}}M;{{row.attachTypes}}
+                    </td>
+					<td class="op-td">
+						<div class="op-btn-box" >
+							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+						</div>
+					</td>
+                </tr>//-->
+			</script>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>依据性文件</h2></div>
+				<div id="addFile_gistdata" style="display: none" class="upload-progress">
+					<span id="fileName_gistdata" ></span>
+					<span id="_gistdata" ></span>
+					<b><span id="baifenbi_gistdata" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
+				<span id="gistdata_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="gistdata_upTable" class="table table-bordered table-condensed details tree_table">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th  width="40%">电子件名称</th>
+<%--							<th width="100px">最大容量(M)</th>--%>
+							<th width="">类型限制</th>
+<%--							<th>文件名</th>--%>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_gistdata">
+						<c:forEach items="${projectReportRecord.fileGistdataList}" var = "fileGistdata" varStatus="status">
+							<tr  id="file_gistdata_${fileGistdata.id}_tr" onclick="listTr(this)">
+									<%-- <td>${status.index + 1}</td>--%>
+								<td style="display:none">${fileGistdata.id}</td>
+								<td style="display:none">${fileGistdata.mustFlag}</td>
+								<c:choose>
+									<c:when test="${fileGistdata.mustFlag == 1}">
+										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
+									</c:when>
+									<c:otherwise>
+										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
+									</c:otherwise>
+								</c:choose>
+								<td>${fileGistdata.attachLength}M;${fileGistdata.attachTypes}</td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+									</div>
+								</td>
+								<td style="display:none">${fileGistdata.fileFlag}</td>
+							</tr>
+							<c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
+								<tr class="file_gistdata_${fileGistdata.id}_tr">
+									<td></td>
+									<c:choose>
+										<c:when test="${projectReportRecord.uploadMode == 2}">
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+<%--									<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a></td>--%>
+									<td class="op-td">
+										<div class="op-btn-box" >
+												<%--附件下载删除--%>
+											<c:choose>
+												<c:when test="${projectReportRecord.uploadMode == 2}">
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:when>
+														<c:otherwise>
+															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:otherwise>
+													</c:choose>
+												</c:when>
+												<c:otherwise>
+													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+												</c:otherwise>
+											</c:choose>
+
+												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
+										</div>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<script type="text/template" id="gistdataTpl">//<!--
+                <tr id="budgetList{{idx}}">
+                    <td class="hide">
+                        <input id="gistdataTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
+                    </td>
+                    <td class="hide">
+                        0
+                    </td>
+                    <td style="text-align:center;">
+                        <span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>{{row.attachName}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.attachLength}}M;{{row.attachTypes}}
+                    </td>
+					<td class="op-td">
+						<div class="op-btn-box" >
+							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+						</div>
+					</td>
+                </tr>//-->
+			</script>
+
+			<div class="form-group layui-row">
+				<div class="form-group-label"><h2>其他文件</h2></div>
+				<div id="addFile_other" style="display: none" class="upload-progress">
+					<span id="fileName_other" ></span>
+					<span id="_other" ></span>
+					<b><span id="baifenbi_other" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
+				<span id="other_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable_other" class="table table-bordered table-condensed details tree_table">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th width="30%">电子件名称</th>
+<%--							<th width="100px">最大容量(M)</th>--%>
+							<th>类型限制</th>
+<%--							<th>文件名</th>--%>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_other">
+						<c:forEach items="${projectReportRecord.fileOtherList}" var = "fileOther" varStatus="status">
+							<tr   id="file_gistdata_${fileOther.id}_tr" onclick="listTr(this)">
+									<%-- <td>${status.index + 1}</td>--%>
+								<td style="display:none">${fileOther.id}</td>
+								<td style="display:none">${fileOther.mustFlag}</td>
+								<c:choose>
+									<c:when test="${fileOther.mustFlag == 1}">
+										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther	.attachName}"/></td>
+									</c:when>
+									<c:otherwise>
+										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
+									</c:otherwise>
+								</c:choose>
+								<td>${fileOther.attachLength}M;${fileOther.attachTypes}</td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+									</div>
+								</td>
+								<td style="display:none">${fileOther.fileFlag}</td>
+							</tr>
+							<c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
+								<tr class="file_gistdata_${fileOther.id}_tr">
+									<td></td>
+									<c:choose>
+										<c:when test="${projectReportRecord.uploadMode == 2}">
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+<%--									<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a></td>--%>
+									<td class="op-td">
+										<div class="op-btn-box" >
+												<%--附件下载删除--%>
+											<c:choose>
+												<c:when test="${projectReportRecord.uploadMode == 2}">
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:when>
+														<c:otherwise>
+															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:otherwise>
+													</c:choose>
+												</c:when>
+												<c:otherwise>
+													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+												</c:otherwise>
+											</c:choose>
+
+												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
+										</div>
+									</td>
+								</tr>
+							</c:forEach>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<script type="text/template" id="otherTpl">//<!--
+                <tr id="budgetList{{idx}}">
+                    <td class="hide">
+                        <input id="otherTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
+                    </td>
+                    <td class="hide">
+                        0
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.attachName}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.attachLength}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.attachTypes}}
+                    </td>
+                    <td style="text-align:center;">
+
+                    </td>
+					<td class="op-td">
+						<div class="op-btn-box" >
+							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+						</div>
+					</td>
+                </tr>//-->
+			</script>
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script src="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.js" charset="utf-8"></script>
+<script>
+	function openBill2(title,url,width,height,target,formId,tableId){
+		var rows = $(this).parent().prevAll().length + 1;
+		var frameIndex = parent.layer.getFrameIndex(window.name);
+		var urls = url+"&index="+frameIndex;
+		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			width='auto';
+			height='auto';
+		}else{//如果是PC端,根据用户设置的width和height显示。
+
+		}
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			skin:"two-btns",
+			maxmin: false, //开启最大化最小化按钮
+			content: urls ,
+			btn: ['确定','关闭'],
+			yes: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+				}
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
+				var $document = iframeWin.contentWindow.document;
+
+				formSubmit2($document,formId,index,tableId);
+
+			},
+			cancel: function(index){
+			}
+		});
+	}
+	function formSubmit2($document,inputForm,index,tableId){
+
+		var validateForm = $($document.getElementById(inputForm)).validate({
+			submitHandler: function(form){
+				loading('正在提交,请稍等...');
+				form.submit();
+			},
+			errorContainer: "#messageBox",
+			errorPlacement: function(error, element) {
+				$($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+				if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+					error.appendTo(element.parent().parent());
+				} else {
+					error.insertAfter(element);
+				}
+			}
+		});
+		if(validateForm.form()){
+			var action = $document.getElementById(inputForm).action;
+			var handleInfo = $($document.getElementById(inputForm)).serialize();
+			$.ajax({
+				type : "POST",
+				url : action,
+				data : handleInfo,
+				//请求成功
+				success:function(data) {
+					var d = data;
+					//输出提示信息
+					if(d.str.length>0){
+						parent.layer.msg(d.str,{icon:1});
+					}
+					$("#"+tableId).load(location.href + " #"+tableId);
+					//关闭当前页
+					top.layer.close(index)
+				}
+			});
+		}
+	}
+
+
+	//新增行方法
+	var fileAttachmentTpl = $("#fileAttachmentTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+	var gistdataTpl = $("#gistdataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+	var otherTpl = $("#otherTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+
+	function formAttachment(title,url,width,height,target,formId,divId){
+		var rows = $(this).parent().prevAll().length + 1;
+		var frameIndex = parent.layer.getFrameIndex(window.name);
+		var urls = url;
+		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			width='auto';
+			height='auto';
+		}else{//如果是PC端,根据用户设置的width和height显示。
+
+		}
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			skin:"two-btns",
+			maxmin: false, //开启最大化最小化按钮
+			content: urls ,
+			btn: ['确定','关闭'],
+			yes: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				inputForm.attr("action","${ctx}/projectTemplate/projectTemplate/getProjectTemplateInfo");//表单提交成功后,从服务器返回的url在当前tab中展示
+				var $document = iframeWin.contentWindow.document;
+				formSubmitAjax($document,formId,index,divId);
+
+			},
+			cancel: function(index){
+			}
+		});
+	}
+	function formSubmitAjax($document,inputForm,index,divId){
+		var validateForm = $($document.getElementById(inputForm)).validate({
+			submitHandler: function(form){
+				loading('正在提交,请稍等...');
+				form.submit();
+			},
+			errorContainer: "#messageBox",
+			errorPlacement: function(error, element) {
+				$($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+				if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+					error.appendTo(element.parent().parent());
+				} else {
+					error.insertAfter(element);
+				}
+			}
+		});
+		if(validateForm.form()){
+			$($document.getElementById(inputForm)).ajaxSubmit({
+				success:function(data) {
+					if(!data.success){
+						top.layer.msg("保存依据资料信息异常!",{icon:2});
+						return false;
+					}
+					var idx = ''
+					if(divId == 'file_attachment'){
+						idx = $("#file_attachment tr").length;
+						addRowBaseData("#file_attachment",idx,fileAttachmentTpl,data.body.projectAccessoryInfo);
+					}else if(divId == 'file_gistdata'){
+						idx = $("#file_gistdata tr").length;
+						addRowBaseData("#file_gistdata",idx,gistdataTpl,data.body.projectAccessoryInfo);
+					}else if(divId == 'file_other'){
+						idx = $("#file_other tr").length;
+						addRowBaseData("#file_other",idx,otherTpl,data.body.projectAccessoryInfo);
+					}
+					parent.layer.msg(data.msg,{icon:1});
+					top.layer.close(index)
+				}
+			});
+		}
+	}
+
+
+	function hasInArr(id,idArr) {
+		for(var i=0;i<idArr.length;i++){
+			if(id==$(idArr[i]).val()){
+				return true;
+			}
+		}
+		return false;
+	}
+	function existBaseData(id,length) {
+		for (var i=0;i<length;i++) {
+			var val = $('#file_attachment'+i+'_id').val();
+			if(id==val){
+				return true;
+			}
+		}
+		return false;
+	}
+
+	function addRowBaseData(list, idx, tpl, row){
+		bornTemplete(list, idx, tpl, row, idx);
+	}
+
+	function bornTemplete(list, idx, tpl, row, idx1){
+		var idx1 = '';
+		if(list == 'file_attachment'){
+			idx1 = $("#file_attachment tr").length +1;
+		}else if(list == 'file_gistdata'){
+			idx1 = $("#file_gistdata tr").length +1;
+		}else if(list == 'file_other'){
+			idx1 = $("#file_other tr").length +1;
+		}
+
+		$(list).append(Mustache.render(tpl, {
+			idx: idx, delBtn: true, row: row,
+			order:idx1 + 1, idx1:idx1
+		}));
+		$(list+idx).find("select").each(function(){
+			$(this).val($(this).attr("data-value"));
+		});
+		$(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+			var ss = $(this).attr("data-value").split(',');
+			for (var i=0; i<ss.length; i++){
+				if($(this).val() == ss[i]){
+					$(this).attr("checked","checked");
+				}
+			}
+		});
+	}
+	function delRowBaseData(obj, prefix,userId){
+		var id = $(prefix+"_id").val();
+		var currentUser = '${fns:getUser().id}';
+		var contentId = '${projectcontentinfo.projectContentData.id}';
+		console.log(contentId);
+		var condition = "${flag}";
+		$.ajax({
+			type:"post",
+			url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
+			data:{"contentId":contentId,"basedId":id,"condition":condition},
+			dataType:"json",
+			success:function(data){
+				if(data.success) {
+					if("according" == condition || "completion" == condition || "early" == condition || "claim" == condition || "design" == condition || "visa" == condition || "interim" == condition || "distribution" == condition || "material" == condition || "armor" == condition ){
+						$(obj).parent().parent().remove();
+					}else{
+						$(obj).parent().parent().remove();
+					}
+					if(data.body.inuse){
+						return;
+					}
+					if (currentUser == userId) {
+						confirmDelete('是否同步删除资料库的文件?','${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+id+'&id=${projectcontentinfo.id}&type=1');
+					}
+				}else {
+					top.layer.msg("删除依据资料失败!", {icon: 0});
+				}
+			}
+		})
+		return;
+	}
+
+	function delBaseData(obj, prefix,userId){
+		var id = $(prefix+"_id").val();
+		var currentUser = '${fns:getUser().id}';
+		var contentId = '${projectcontentinfo.projectContentData.id}';
+		console.log(contentId);
+		var condition = "${flag}";
+		$.ajax({
+			type:"post",
+			url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
+			data:{"contentId":contentId,"basedId":id,"condition":condition},
+			dataType:"json",
+			success:function(data){
+				if(data.success) {
+					if("according" == condition || "completion" == condition || "early" == condition || "claim" == condition || "design" == condition || "visa" == condition || "interim" == condition || "distribution" == condition || "material" == condition || "armor" == condition ){
+						$(obj).parent().parent().parent().remove();
+					}else{
+						$(obj).parent().parent().remove();
+					}
+					if(data.body.inuse){
+						return;
+					}
+					if (currentUser == userId) {
+						confirmDelete('是否同步删除资料库的文件?','${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+id+'&id=${projectcontentinfo.id}&type=1');
+					}
+				}else {
+					top.layer.msg("删除依据资料失败!", {icon: 0});
+				}
+			}
+		})
+		return;
+	}
+
+	function confirmDelete(mess, href){
+		top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
+			//do something
+			if (typeof href == 'function') {
+				href();
+			}else{
+				$.ajax({
+					url:href,
+					type:"post",
+					success:function(data){
+						if(data.success){
+							top.layer.msg("删除依据资料成功!", {icon: 0});
+						}
+					}
+				});
+			}
+			top.layer.close(index);
+		});
+		return false;
+	}
+</script>
+</body>
+</html>

文件差異過大導致無法顯示
+ 1035 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/record/projectReportRecordModify.jsp


+ 774 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/record/projectReportRecordModifyApply.jsp

@@ -0,0 +1,774 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>合同归档管理</title>
+	<meta name="decorator" content="default"/>
+	<link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
+	<%@include file="/webpage/include/treetable.jsp" %>
+
+	<script type="text/javascript">
+		function listTr(obj){
+			var name=$(obj).attr("id");
+			var tiao="."+name;
+			var span=$(obj).find("td").eq(2);
+			// var ss=$(span).val().split(" ")[4];
+			$(span).toggle(function () {
+				$(tiao).hide();
+				$(span).find("span").eq(0).attr("class","default_shut")
+			},function () {
+				$(tiao).show();
+				$(span).find("span").eq(0).attr("class","default_open")
+			});
+		}
+        var validateForm;
+        function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+            if(validateForm.form()){
+				var projectId = '${project.id}';
+				var leng = $("#file_attachment tr").length;
+				var boolFlag = true;
+				for(var i=0; i<leng; i++) {
+					var numberStr = $("#file_attachment tr").eq(i).find("td:first").html();
+					var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
+					var name = $("#file_attachment tr").eq(i).find("td:eq(2)").html();
+					var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
+					if(second == 1){
+						if(numberStr != undefined && numberStr !=null && numberStr !=''){
+							if (fileFlag==1){
+
+							}else{
+								top.layer.msg("请上传成果文件!", {icon: 0});
+								return false;
+							}
+						}
+					}
+				}
+				if(boolFlag){
+					var gistdata = $("#file_gistdata tr").length;
+					for(var i=0; i<gistdata; i++) {
+						var numberStr = $("#file_gistdata tr").eq(i).find("td:first").html();
+						var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
+						var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
+						if(second == 1){
+							if(numberStr != undefined && numberStr !=null && numberStr !=''){
+								if (fileFlag==1){
+
+								}else{
+									top.layer.msg("请上传依据性文件!", {icon: 0});
+									return false;
+								}
+							}
+						}
+					}
+				}
+				if(boolFlag){
+					var other = $("#file_other tr").length;
+					for(var i=0; i<other; i++) {
+						var numberStr = $("#file_other tr").eq(i).find("td:first").html();
+						var second = $("#file_other tr").eq(i).find("td:eq(1)").html();
+						var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
+
+						if(second == 1){
+							if(numberStr != undefined && numberStr !=null && numberStr !=''){
+								if (fileFlag==1){
+
+								}else{
+									top.layer.msg("请上传其它文件!", {icon: 0});
+									return false;
+								}
+							}
+						}
+					}
+				}
+				if(boolFlag) {
+					$("#inputForm").submit();
+					return true;
+				}
+            }else {
+                parent.layer.msg("信息未填写完整!", {icon: 5});
+            }
+            return false;
+        }
+        $(document).ready(function() {
+			$(".tabMove").mouseover(function(){
+				//tips层-下
+				var td=$(this)
+				var tdval=$(this).find("input").val();
+				layer.tips(tdval, td, {
+					tips: 3
+				});
+			})
+            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 = "projectRecords";
+            var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
+            var divId = "_attachment";
+            $("#addFile"+divId).show();
+            multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
+        }
+
+        function setValuee(obj){
+            $("#reportId").val(obj.id);
+            $("#type").val(obj.type);
+            $("#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.number
+                },
+                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" action="${ctx}/projectcontentinfo/projectReportRecord/newAuditSave" method="post" class="form-horizontal">
+			<form:hidden path="id"/>
+			<form:hidden path="type"/>
+			<form:hidden path="home"/>
+			<form:hidden path="numberCount"/>
+			<form:hidden id="reportId" path="report.id"/>
+			<form:hidden path="act.taskId"/>
+			<form:hidden path="act.taskName"/>
+			<form:hidden path="act.taskDefKey"/>
+			<form:hidden path="act.procInsId"/>
+			<form:hidden path="act.procDefId"/>
+			<form:hidden id="flag" path="act.flag"/>
+			<form:hidden path="report.name"/>
+
+			<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 with-icon">
+						<sys:gridselectreportrecord url="${ctx}/projectcontentinfo/projectReportData/selectreportData" id="report" name="report.id"  value="${projectReportRecord.report.id}"  title="选择报告" labelName="report.number"
+													labelValue="${projectReportRecord.report.number}" cssClass="form-control layui-input required" fieldLabels="报告" fieldKeys="name" searchLabel="报告名称" searchKey="name" ></sys:gridselectreportrecord>
+
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>报告日期:</label>
+					<div class="layui-input-block">
+						<input id="reportDate" name="report.reportDate"  htmlEscape="false" readonly="true" class="form-control  layui-input required" value="<fmt:formatDate value="${projectReportRecord.report.reportDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同编号:</label>
+					<div class="layui-input-block">
+						<form:input id="contractNum" path="contractNum" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同名称:</label>
+					<div class="layui-input-block">
+						<form:input id="contractName" path="contractName" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">委托方:</label>
+					<div class="layui-input-block">
+						<form:input id="clientName" path="clientName" htmlEscape="false" readonly="true" class="form-control  layui-input"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">项目编号:</label>
+					<div class="layui-input-block">
+						<form:input 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">归档时间:</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-sm12  with-textarea">
+					<label class="layui-form-label">说明:</label>
+					<div class="layui-input-block">
+						<form:textarea placeholder="请输入说明:" path="remarks" htmlEscape="false" rows="4" maxlength="255" class="form-control "/>
+					</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>
+					<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 tree_table">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th width="30%">电子件名称</th>
+<%--							<th width="100px">最大容量(M)</th>--%>
+							<th width="">类型限制</th>
+<%--							<th>文件名</th>--%>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
+							<tr id="file_attachment_${fileAttachment.id}_tr" onclick="listTr(this)">
+								<td style="display:none">${fileAttachment.id}</td>
+								<td style="display:none">${fileAttachment.mustFlag}</td>
+								<c:choose>
+									<c:when test="${fileOther.mustFlag == 1}">
+										<td class="tabMove" style="text-align: left;"><span class='default_open ' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
+									</c:when>
+									<c:otherwise>
+										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
+									</c:otherwise>
+								</c:choose>
+<%--								<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>--%>
+								<td>${fileAttachment.attachLength}M;${fileAttachment.attachTypes}</td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+									</div>
+								</td>
+								<td style="display:none">${fileAttachment.fileFlag}</td>
+							</tr>
+							<c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
+								<tr class="file_attachment_${fileAttachment.id}_tr">
+									<td></td>
+									<c:choose>
+										<c:when test="${projectReportRecord.uploadMode == 2}">
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+<%--									<td>--%>
+<%--										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>--%>
+<%--									</td>--%>
+									<td class="op-td">
+										<div class="op-btn-box" >
+												<%--附件下载删除--%>
+											<c:choose>
+												<c:when test="${projectReportRecord.uploadMode == 2}">
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:when>
+														<c:otherwise>
+															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:otherwise>
+													</c:choose>
+												</c:when>
+												<c:otherwise>
+													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+												</c:otherwise>
+											</c:choose>
+
+												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
+										</div>
+									</td>
+								</tr>
+							</c:forEach>
+						</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>
+					<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 tree_table">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th width="30%">电子件名称</th>
+<%--							<th width="100px">最大容量(M)</th>--%>
+							<th width="">类型限制</th>
+<%--							<th>文件名</th>--%>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_gistdata">
+						<c:forEach items="${projectReportRecord.fileGistdataList}" var = "fileGistdata" varStatus="status">
+							<tr  id="file_gistdata_${fileGistdata.id}_tr" onclick="listTr(this)">
+									<%-- <td>${status.index + 1}</td>--%>
+								<td style="display:none">${fileGistdata.id}</td>
+								<td style="display:none">${fileGistdata.mustFlag}</td>
+								<c:choose>
+									<c:when test="${fileGistdata.mustFlag == 1}">
+										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
+									</c:when>
+									<c:otherwise>
+										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
+									</c:otherwise>
+								</c:choose>
+<%--								<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>--%>
+<%--								<td></td>--%>
+								<td>${fileGistdata.attachLength}M;${fileGistdata.attachTypes}</td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+									</div>
+								</td>
+								<td style="display:none">${fileGistdata.fileFlag}</td>
+
+							</tr>
+							<c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
+								<tr class="file_gistdata_${fileGistdata.id}_tr">
+									<td></td>
+									<c:choose>
+										<c:when test="${projectReportRecord.uploadMode == 2}">
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+<%--									<td>--%>
+<%--										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>--%>
+<%--									</td>--%>
+									<td class="op-td">
+										<div class="op-btn-box" >
+												<%--附件下载删除--%>
+											<c:choose>
+												<c:when test="${projectReportRecord.uploadMode == 2}">
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:when>
+														<c:otherwise>
+															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:otherwise>
+													</c:choose>
+												</c:when>
+												<c:otherwise>
+													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+												</c:otherwise>
+											</c:choose>
+
+												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
+										</div>
+									</td>
+								</tr>
+							</c:forEach>
+						</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>
+					<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 tree_table">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th width="40%">电子件名称</th>
+<%--							<th width="100px">最大容量(M)</th>--%>
+							<th width="">类型限制</th>
+<%--							<th>文件名</th>--%>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_other">
+						<c:forEach items="${projectReportRecord.fileOtherList}" var = "fileOther" varStatus="status">
+							<tr id="file_other_${fileOther.id}_tr" onclick="listTr(this)">
+									<%-- <td>${status.index + 1}</td>--%>
+								<td style="display:none">${fileOther.id}</td>
+								<td style="display:none">${fileOther.mustFlag}</td>
+								<c:choose>
+									<c:when test="${fileOther.mustFlag == 1}">
+										<td class="tabMove" style="text-align: left;"><span class='default_open ' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
+									</c:when>
+									<c:otherwise>
+										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
+									</c:otherwise>
+								</c:choose>
+<%--								<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>--%>
+								<td>${fileOther.attachLength}M;${fileOther.attachTypes}</td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+									</div>
+								</td>
+								<td style="display:none">${fileOther.fileFlag}</td>
+
+							</tr>
+							<c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
+								<tr class="file_other_${fileOther.id}_tr">
+									<td></td>
+									<c:choose>
+										<c:when test="${projectReportRecord.uploadMode == 2}">
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:when>
+										<c:otherwise>
+											<c:choose>
+												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+												</c:when>
+												<c:otherwise>
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+														</c:when>
+														<c:otherwise>
+															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+														</c:otherwise>
+													</c:choose>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+<%--									<td>--%>
+<%--										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>--%>
+<%--									</td>--%>
+									<td class="op-td">
+										<div class="op-btn-box" >
+												<%--附件下载删除--%>
+											<c:choose>
+												<c:when test="${projectReportRecord.uploadMode == 2}">
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+															<a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:when>
+														<c:otherwise>
+															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:otherwise>
+													</c:choose>
+												</c:when>
+												<c:otherwise>
+													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+												</c:otherwise>
+											</c:choose>
+
+												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
+										</div>
+									</td>
+								</tr>
+							</c:forEach>
+						</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-xs12 form-table-container" >
+					<act:flowChart procInsId="${projectReportRecord.act.procInsId}"/>
+					<act:histoicFlow procInsId="${projectReportRecord.act.procInsId}"/>
+				</div>
+			</div>
+
+			<div class="form-group layui-row page-end"></div>
+		</form:form>
+	</div>
+</div>
+<script>
+	function openBill2(title,url,width,height,target,formId,tableId){
+		var rows = $(this).parent().prevAll().length + 1;
+		var frameIndex = parent.layer.getFrameIndex(window.name);
+		var urls = url+"&index="+frameIndex;
+		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			width='auto';
+			height='auto';
+		}else{//如果是PC端,根据用户设置的width和height显示。
+
+		}
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			skin:"two-btns",
+			maxmin: false, //开启最大化最小化按钮
+			content: urls ,
+			btn: ['确定','关闭'],
+			yes: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+				}
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
+				var $document = iframeWin.contentWindow.document;
+
+				formSubmit2($document,formId,index,tableId);
+
+			},
+			cancel: function(index){
+			}
+		});
+	}
+	function formSubmit2($document,inputForm,index,tableId){
+
+		var validateForm = $($document.getElementById(inputForm)).validate({
+			submitHandler: function(form){
+				loading('正在提交,请稍等...');
+				form.submit();
+			},
+			errorContainer: "#messageBox",
+			errorPlacement: function(error, element) {
+				$($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+				if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+					error.appendTo(element.parent().parent());
+				} else {
+					error.insertAfter(element);
+				}
+			}
+		});
+		if(validateForm.form()){
+			var action = $document.getElementById(inputForm).action;
+			var handleInfo = $($document.getElementById(inputForm)).serialize();
+			$.ajax({
+				type : "POST",
+				url : action,
+				data : handleInfo,
+				//请求成功
+				success:function(data) {
+					var d = data;
+					//输出提示信息
+					if(d.str.length>0){
+						parent.layer.msg(d.str,{icon:1});
+					}
+					$("#"+tableId).load(location.href + " #"+tableId);
+					//关闭当前页
+					top.layer.close(index)
+				}
+			});
+		}
+	}
+
+	function formAttachment(title,url,width,height,target,formId){
+		var rows = $(this).parent().prevAll().length + 1;
+		var frameIndex = parent.layer.getFrameIndex(window.name);
+		var urls = url;
+		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			width='auto';
+			height='auto';
+		}else{//如果是PC端,根据用户设置的width和height显示。
+
+		}
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			skin:"two-btns",
+			maxmin: false, //开启最大化最小化按钮
+			content: urls ,
+			btn: ['确定','关闭'],
+			yes: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+				}
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
+				var $document = iframeWin.contentWindow.document;
+				var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var item = iframeWin.getSelectedItem();
+				setValuee(item);
+
+			},
+			cancel: function(index){
+			}
+		});
+	}
+	function setValuee(obj){
+		for(var i=0;i<obj.length;i++){
+			var idArr = $("#file_attachment tr:visible .clientId");
+			if(obj[i].id!=''&&!hasInArr(obj[i].id,idArr)){
+				addRowBaseData("#workBaseDataList",workBaseDataRowIdx,workBaseDataTpl,obj[i]);
+				$("#workBaseDataList"+workBaseDataRowIdx+"_nature").html("引用");
+				workBaseDataRowIdx=workBaseDataRowIdx+1;
+			}
+		}
+	}
+</script>
+</body>
+</html>

+ 924 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/record/projectReportRecordView.jsp

@@ -0,0 +1,924 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>合同归档管理</title>
+	<meta name="decorator" content="default"/>
+	<link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
+	<%@include file="/webpage/include/treetable.jsp" %>
+	<style>
+		label.error:nth-child(2){
+			top:40px;
+			left:0;
+		}
+		.layui-table th{
+			font-size: 14px;
+			/*表头内容居中显示*/
+			text-align: center;
+		}
+		.layui-table td{
+			/*表头内容居中显示*/
+			text-align: left;
+		}
+		span{
+			font-size: 14px;
+		}
+	</style>
+	<script type="text/javascript">
+		$(document).ready(function() {
+			$("#upTable").treeTable({expandLevel : 5},{ expandable: true });
+			$("#gistdata_upTable").treeTable({expandLevel : 5},{ expandable: true });
+			$("#upTable_other").treeTable({expandLevel : 5},{ expandable: true });
+			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);
+					}
+				}
+			});
+		});
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="list-form-tab contentShadow shadowLTR" id="tabDiv">
+		<ul class="list-tabs" >
+			<li><a href="${ctx}/ruralProject/ruralProjectRecords/view?id=${project.id}">项目详情</a></li>
+			<li><a href="${ctx}/subProject/subProject/list?parentProId=${project.id}&projectType=${project.projectType}">子项目列表</a></li>
+			<c:if test="${not empty project.id}">
+				<li class="active"><a href="${ctx}/ruralProject/ruralProjectMessage/formRecord?reportId=${project.id}&view=view">项目线上归档信息</a></li>
+			</c:if>
+			<li><a href="${ctx}/ruralProject/ruralProjectRecords/getAccessoryView?id=${project.id}">附件信息</a></li>
+		</ul>
+	</div>
+	<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" style="background-color: #f1f1f1" 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.fileNum}"/>
+						<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 id="fileNumTow" name="fileNumTow" readonly="true" type="text"  class="layui-input form-control" equalTo="#fileNum" value="${projectReportRecord.fileNumTow}"/>
+				</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" style="background-color: #f1f1f1" 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" style="background-color: #f1f1f1" 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" style="background-color: #f1f1f1" 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" style="background-color: #f1f1f1" 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" style="background-color: #f1f1f1" 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" style="background-color: #f1f1f1" 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" style="background-color: #f1f1f1" 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" style="background-color: #f1f1f1" 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" style="background-color: #f1f1f1" name="accomplishDate"  htmlEscape="false" readonly="true" class="form-control  layui-input" value="<fmt:formatDate value="${projectReportRecord.accomplishDate}" pattern="yyyy-MM-dd"/>"/>
+				</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" style="background-color: #f1f1f1" 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>
+			<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 width="55%">文件类型</th>
+						<th width="">文件名</th>
+						<th width="100px">操作</th>
+					</tr>
+					</thead>
+					<tbody id="file_attachment">
+					<c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
+						<tr id="${fileAttachment.id}" pid="${fileAttachment.parent.id}">
+							<c:choose>
+								<c:when test="${fileAttachment.mustFlag == 1}">
+									<td><span style="color: red">* </span>${fileAttachment.attachName}</td>
+								</c:when>
+								<c:otherwise>
+									<c:choose>
+										<c:when test="${fileAttachment.flag == 0}">
+											<td>${fileAttachment.attachName}</td>
+										</c:when>
+										<c:otherwise>
+											<td></td>
+										</c:otherwise>
+									</c:choose>
+								</c:otherwise>
+							</c:choose>
+							<td style="text-align:center;">
+								<c:choose>
+									<c:when test="${fileAttachment.flag == 0}">
+										${fileAttachment.attachLength}M;  ${fileAttachment.attachTypes}
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${projectReportRecord.uploadMode == 2}">
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'jpg')
+                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'png')
+                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'gif')
+                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'bmp')
+                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'jpeg')}">
+														<img src="${fileAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileAttachment.temporaryUrl}','90%','90%')" alt="${fileAttachment.attachName}">
+													</c:when>
+													<c:otherwise>
+														<c:choose>
+															<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
+																<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.temporaryUrl}',1)">${fileAttachment.attachName} ; </a>
+															</c:when>
+															<c:otherwise>
+																<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.temporaryUrl}',2)">${fileAttachment.attachName} ; </a>
+															</c:otherwise>
+														</c:choose>
+													</c:otherwise>
+												</c:choose>
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'jpg')
+																				   or fn:containsIgnoreCase(fileAttachment.attachName,'png')
+																				   or fn:containsIgnoreCase(fileAttachment.attachName,'gif')
+																				   or fn:containsIgnoreCase(fileAttachment.attachName,'bmp')
+																				   or fn:containsIgnoreCase(fileAttachment.attachName,'jpeg')}">
+														<img src="${fileAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileAttachment.url}','90%','90%')" alt="${fileAttachment.attachName}">
+													</c:when>
+													<c:otherwise>
+														<c:choose>
+															<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
+																<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',1)">${fileAttachment.attachName} ; </a>
+															</c:when>
+															<c:otherwise>
+																<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',2)">${fileAttachment.attachName} ; </a>
+															</c:otherwise>
+														</c:choose>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+<%--										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileAttachment.url}','90%','90%')">${fileAttachment.attachName} ; </a>--%>
+									</c:otherwise>
+								</c:choose>
+							</td>
+							<td class="op-td" style="text-align:center;">
+								<div class="op-btn-box" >
+									<c:choose>
+										<c:when test="${fileAttachment.flag == 0}">
+
+										</c:when>
+										<c:otherwise>
+											<%--附件下载删除--%>
+											<c:choose>
+												<c:when test="${projectReportRecord.uploadMode == 2}">
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
+															<a href="javascript:void(0)" onclick="openPreview('${fileAttachment.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:when>
+														<c:otherwise>
+															<a href="${fileAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:otherwise>
+													</c:choose>
+												</c:when>
+												<c:otherwise>
+													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+								</div>
+							</td>
+						</tr>
+					</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>
+				<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 width="55%">文件类型</th>
+						<th width="">文件名</th>
+						<th width="100px">操作</th>
+					</tr>
+					</thead>
+					<tbody id="file_gistdata">
+					<c:forEach items="${projectReportRecord.fileGistdataList}" var = "fileGistdata" varStatus="status">
+						<tr id="${fileGistdata.id}" pid="${fileGistdata.parent.id}">
+								<%-- <td>${status.index + 1}</td>--%>
+							<c:choose>
+								<c:when test="${fileGistdata.mustFlag == 1}">
+									<td><span style="color: red">* </span>${fileGistdata.attachName}</td>
+								</c:when>
+								<c:otherwise>
+									<c:choose>
+										<c:when test="${fileGistdata.flag == 0}">
+											<td>${fileGistdata.attachName}</td>
+										</c:when>
+										<c:otherwise>
+											<td></td>
+										</c:otherwise>
+									</c:choose>
+								</c:otherwise>
+							</c:choose>
+							<td style="text-align:center;">
+								<c:choose>
+									<c:when test="${fileGistdata.flag == 0}">
+										${fileGistdata.attachLength}M;  ${fileGistdata.attachTypes}
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${projectReportRecord.uploadMode == 2}">
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'jpg')
+                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'png')
+                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'gif')
+                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'bmp')
+                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'jpeg')}">
+														<img src="${fileGistdata.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileGistdata.temporaryUrl}','90%','90%')" alt="${fileGistdata.attachName}">
+													</c:when>
+													<c:otherwise>
+														<c:choose>
+															<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'pdf')}">
+																<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',1)">${fileGistdata.attachName} ; </a>
+															</c:when>
+															<c:otherwise>
+																<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',2)">${fileGistdata.attachName} ; </a>
+															</c:otherwise>
+														</c:choose>
+													</c:otherwise>
+												</c:choose>
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'jpg')
+																				   or fn:containsIgnoreCase(fileGistdata.attachName,'png')
+																				   or fn:containsIgnoreCase(fileGistdata.attachName,'gif')
+																				   or fn:containsIgnoreCase(fileGistdata.attachName,'bmp')
+																				   or fn:containsIgnoreCase(fileGistdata.attachName,'jpeg')}">
+														<img src="${fileGistdata.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileGistdata.url}','90%','90%')" alt="${fileGistdata.attachName}">
+													</c:when>
+													<c:otherwise>
+														<c:choose>
+															<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'pdf')}">
+																<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',1)">${fileGistdata.attachName} ; </a>
+															</c:when>
+															<c:otherwise>
+																<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',2)">${fileGistdata.attachName} ; </a>
+															</c:otherwise>
+														</c:choose>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+<%--										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileGistdata.url}','90%','90%')">${fileGistdata.attachName} ; </a>--%>
+									</c:otherwise>
+								</c:choose>
+							</td>
+							<td class="op-td"  style="text-align:center;">
+								<div class="op-btn-box" >
+									<c:choose>
+										<c:when test="${fileGistdata.flag == 0}">
+
+										</c:when>
+										<c:otherwise>
+											<%--附件下载删除--%>
+											<c:choose>
+												<c:when test="${projectReportRecord.uploadMode == 2}">
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'pdf')}">
+															<a href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:when>
+														<c:otherwise>
+															<a href="${fileGistdata.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:otherwise>
+													</c:choose>
+												</c:when>
+												<c:otherwise>
+													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileGistdata.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+								</div>
+							</td>
+							<td style="display:none">${fileGistdata.id}</td>
+							<td style="display:none">${fileGistdata.mustFlag}</td>
+						</tr>
+					</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>
+				<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 width="55%">文件类型</th>
+						<th width="">文件名</th>
+						<th width="100px">操作</th>
+					</tr>
+					</thead>
+					<tbody id="file_other">
+					<c:forEach items="${projectReportRecord.fileOtherList}" var = "fileOther" varStatus="status">
+						<tr id="${fileOther.id}" pid="${fileOther.parent.id}">
+								<%-- <td>${status.index + 1}</td>--%>
+							<c:choose>
+								<c:when test="${fileOther.mustFlag == 1}">
+									<td><span style="color: red">* </span>${fileOther.attachName}</td>
+								</c:when>
+								<c:otherwise>
+									<c:choose>
+										<c:when test="${fileOther.flag == 0}">
+											<td>${fileOther.attachName}</td>
+										</c:when>
+										<c:otherwise>
+											<td></td>
+										</c:otherwise>
+									</c:choose>
+								</c:otherwise>
+							</c:choose>
+							<td style="text-align:center;">
+								<c:choose>
+									<c:when test="${fileOther.flag == 0}">
+										${fileOther.attachLength}M;  ${fileOther.attachTypes}
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${projectReportRecord.uploadMode == 2}">
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'jpg')
+                                                           or fn:containsIgnoreCase(fileOther.attachName,'png')
+                                                           or fn:containsIgnoreCase(fileOther.attachName,'gif')
+                                                           or fn:containsIgnoreCase(fileOther.attachName,'bmp')
+                                                           or fn:containsIgnoreCase(fileOther.attachName,'jpeg')}">
+														<img src="${fileOther.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileOther.temporaryUrl}','90%','90%')" alt="${fileOther.attachName}">
+													</c:when>
+													<c:otherwise>
+														<c:choose>
+															<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
+																<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',1)">${fileOther.attachName} ; </a>
+															</c:when>
+															<c:otherwise>
+																<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',2)">${fileOther.attachName} ; </a>
+															</c:otherwise>
+														</c:choose>
+													</c:otherwise>
+												</c:choose>
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'jpg')
+																				   or fn:containsIgnoreCase(fileOther.attachName,'png')
+																				   or fn:containsIgnoreCase(fileOther.attachName,'gif')
+																				   or fn:containsIgnoreCase(fileOther.attachName,'bmp')
+																				   or fn:containsIgnoreCase(fileOther.attachName,'jpeg')}">
+														<img src="${fileOther.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileOther.url}','90%','90%')" alt="${fileOther.attachName}">
+													</c:when>
+													<c:otherwise>
+														<c:choose>
+															<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
+																<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',1)">${fileOther.attachName} ; </a>
+															</c:when>
+															<c:otherwise>
+																<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',2)">${fileOther.attachName} ; </a>
+															</c:otherwise>
+														</c:choose>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+<%--										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileOther.url}','90%','90%')">${fileOther.attachName} ; </a>--%>
+									</c:otherwise>
+								</c:choose>
+							</td>
+							<td class="op-td" style="text-align:center;">
+								<div class="op-btn-box" >
+									<c:choose>
+										<c:when test="${fileOther.flag == 0}">
+
+										</c:when>
+										<c:otherwise>
+											<%--附件下载删除--%>
+											<c:choose>
+												<c:when test="${projectReportRecord.uploadMode == 2}">
+													<c:choose>
+														<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
+															<a href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:when>
+														<c:otherwise>
+															<a href="${fileOther.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+														</c:otherwise>
+													</c:choose>
+												</c:when>
+												<c:otherwise>
+													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileOther.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+												</c:otherwise>
+											</c:choose>
+										</c:otherwise>
+									</c:choose>
+								</div>
+							</td>
+							<td style="display:none">${fileOther.id}</td>
+							<td style="display:none">${fileOther.mustFlag}</td>
+						</tr>
+					</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-xs12 form-table-container">
+				<table id="permissionTable" class="layui-table" lay-filter="permissionTable"></table>
+			</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>
+						&lt;%&ndash; <th>序号</th>&ndash;%&gt;
+						<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>
+								&lt;%&ndash; <td>${status.index + 1}</td>&ndash;%&gt;
+							<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>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script src="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.js" charset="utf-8"></script>
+<script>
+	function openBill2(title,url,width,height,target,formId,tableId){
+		var rows = $(this).parent().prevAll().length + 1;
+		var frameIndex = parent.layer.getFrameIndex(window.name);
+		var urls = url+"&index="+frameIndex;
+		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			width='auto';
+			height='auto';
+		}else{//如果是PC端,根据用户设置的width和height显示。
+
+		}
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			skin:"two-btns",
+			maxmin: false, //开启最大化最小化按钮
+			content: urls ,
+			btn: ['确定','关闭'],
+			yes: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+				}
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
+				var $document = iframeWin.contentWindow.document;
+
+				formSubmit2($document,formId,index,tableId);
+
+			},
+			cancel: function(index){
+			}
+		});
+	}
+	function formSubmit2($document,inputForm,index,tableId){
+
+		var validateForm = $($document.getElementById(inputForm)).validate({
+			submitHandler: function(form){
+				loading('正在提交,请稍等...');
+				form.submit();
+			},
+			errorContainer: "#messageBox",
+			errorPlacement: function(error, element) {
+				$($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+				if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+					error.appendTo(element.parent().parent());
+				} else {
+					error.insertAfter(element);
+				}
+			}
+		});
+		if(validateForm.form()){
+			$($document.getElementById(inputForm)).ajaxSubmit({
+				success:function(data) {
+					var d = data;
+					//输出提示信息
+					if(d.str.length>0){
+						parent.layer.msg(d.str,{icon:1});
+					}
+					$("#"+tableId).load(location.href + " #"+tableId);
+					//关闭当前页
+					top.layer.close(index)
+				}
+			});
+		}
+	}
+
+	function formAttachment(title,url,width,height,target,formId){
+		var rows = $(this).parent().prevAll().length + 1;
+		var frameIndex = parent.layer.getFrameIndex(window.name);
+		var urls = url;
+		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			width='auto';
+			height='auto';
+		}else{//如果是PC端,根据用户设置的width和height显示。
+
+		}
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			skin:"two-btns",
+			maxmin: false, //开启最大化最小化按钮
+			content: urls ,
+			btn: ['确定','关闭'],
+			yes: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+				}
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
+				var $document = iframeWin.contentWindow.document;
+				var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var item = iframeWin.getSelectedItem();
+				setValuee(item);
+
+			},
+			cancel: function(index){
+			}
+		});
+	}
+	function setValuee(obj){
+		for(var i=0;i<obj.length;i++){
+			var idArr = $("#file_attachment tr:visible .clientId");
+			if(obj[i].id!=''&&!hasInArr(obj[i].id,idArr)){
+				addRowBaseData("#workBaseDataList",workBaseDataRowIdx,workBaseDataTpl,obj[i]);
+				$("#workBaseDataList"+workBaseDataRowIdx+"_nature").html("引用");
+				workBaseDataRowIdx=workBaseDataRowIdx+1;
+			}
+		}
+	}
+</script>
+<%--<script>
+	/*使用模块加载的方式 加载文件*/
+	layui.config({
+		base: '${ctx}/resoueces/css/layui/module/'
+	}).extend({
+		treetable: 'treetable-lay/treetable'
+	}).use(['layer', 'table', 'treetable'], function () {
+		var $ = layui.jquery;
+		var table = layui.table;
+		var layer = layui.layer;
+		var treetable = layui.treetable;
+
+		// 渲染表格
+		window.renderTable = function () {//树桩表格参考文档:https://gitee.com/whvse/treetable-lay
+			layer.load(2);
+			treetable.render({
+				treeColIndex: 1,//树形图标显示在第几列
+				treeSpid: 0,//最上级的父级id
+				treeIdName: 'permissionId',//id字段的名称
+				treePidName: 'pid',//pid字段的名称
+				treeDefaultClose: false,//是否默认折叠
+				treeLinkage: true,//父级展开时是否自动展开所有子级
+				elem: '#permissionTable',
+				url: '${ctx}/projectAccessory/projectAccessory/getProjectAccessoryTreeData?projectId=${project.id}',
+				page: false,
+				cols: [[
+					{type: 'numbers', title: '编号' ,width:80},
+					{field: 'type', title: '电子件名称'},
+					{field: 'workAttachments',title: '附件',templet:function(d){
+							if(d.pid !='0'){
+								if(null == d.workAttachments || '' == d.workAttachments){
+									return "<span style=\"color:red\" title='无附件'>无附件</span>";
+								}else{
+									var html = '';
+									for (var x in d.workAttachments) {
+										html += "<div style='display:inline;float:left;'><a style='width:100px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;' class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"preview('预览','"+d.workAttachments[x].url+"','90%','90%')\" title='"+d.workAttachments[x].attachmentName+"'>"+d.workAttachments[x].attachmentName+"</a></div>"
+										if(x != d.workAttachments.length-1){
+											html += "<div style='display:inline;float:left;'> ; </div>";
+										}
+									}
+									return html;
+								}
+							}else{
+								return "";
+							}
+						}},
+					{templet: complain, title: '附件管理',width:80}
+				]],
+				done: function () {
+					layer.closeAll('loading');
+				}
+			});
+		};
+
+		renderTable();
+
+		//触发三个button按钮
+		$('#btn-expand').click(function () {
+			treetable.expandAll('#permissionTable');
+		});
+
+		$('#btn-fold').click(function () {
+			treetable.foldAll('#permissionTable');
+		});
+
+		$('#btn-refresh').click(function () {
+			renderTable();
+		});
+
+
+		function complain(d){//操作中显示的内容
+			if(d.pid !=0){
+				return [
+					'<a href="javascript:void(0)"  onclick="openBill2(\'附件详情\', \'${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId='+d.id+'&projectId='+d.projectId+'\',\'70%\',\'80%\',false,\'inputForm\')" class="op-btn op-btn-edit" ><i class="fa fa-search-plus"></i> 详情</a>',
+				].join('');
+			}else{
+				return[''].join('');
+			}
+		}
+	});
+
+	function openBill2(title,url,width,height,target,formId){
+		var rows = $(this).parent().prevAll().length + 1;
+		var frameIndex = parent.layer.getFrameIndex(window.name);
+		var urls = url+"&index="+frameIndex;
+		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+			width='auto';
+			height='auto';
+		}else{//如果是PC端,根据用户设置的width和height显示。
+
+		}
+		top.layer.open({
+			type: 2,
+			area: [width, height],
+			title: title,
+			skin:"two-btns",
+			maxmin: false, //开启最大化最小化按钮
+			content: urls ,
+			btn: ['确定','关闭'],
+			yes: function(index, layero){
+				var body = top.layer.getChildFrame('body', index);
+				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+				var inputForm = body.find('#inputForm');
+				var top_iframe;
+				if(target){
+					top_iframe = target;//如果指定了iframe,则在改frame中跳转
+				}else{
+					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+				}
+				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+				inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
+				var $document = iframeWin.contentWindow.document;
+
+				formSubmit2($document,formId,index);
+
+			},
+			cancel: function(index){
+			}
+		});
+	}
+	function formSubmit2($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) {
+					var d = data;
+					//调用layui.use中的renderTable()方法刷新列表
+					renderTable()
+					//输出提示信息
+					if(d.str.length>0){
+						parent.layer.msg(d.str,{icon:1});
+					}
+					//关闭当前页
+					top.layer.close(index)
+				}
+			});
+		}
+	}
+</script>--%>
+</body>
+</html>

+ 2 - 2
src/main/webapp/webpage/modules/ruralprojectrecords/ruralProjectRecordsAudit.jsp

@@ -13,9 +13,9 @@
 		var validateForm;
 		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
+				var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+				$("#opinion").val(ss);
                 if(obj == 1) {
-					var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
-					$("#opinion").val(ss);
 					$("#iframe").load(function(){
 						var ss= $("#iframe")[0].contentWindow.opinion();
 						alert(ss)

+ 2 - 2
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/projectRecordsMessageAudit.jsp

@@ -13,9 +13,9 @@
 	<script type="text/javascript">
         var validateForm;
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+			var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+			$("#opinion").val(ss);
             if(validateForm.form()){
-				var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
-				$("#opinion").val(ss);
                 if(obj == 1) {
 					var flags=judgment();
 					if (flags){

+ 13 - 4
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageLists.jsp

@@ -850,6 +850,10 @@
 				{
 					xml+="<a href=\"#\" onclick=\"notifyDialogre('新增报告审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=" + d.reportNotifyId +"&home=report','95%', '95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 审批</a>";
 				}
+				if(d.newRecordAuditNotifyFlag != undefined && d.newRecordAuditNotifyFlag !=null && "" != d.newRecordAuditNotifyFlag && d.newRecordAuditNotifyFlag == 1)
+				{
+					xml+="<a href=\"#\" onclick=\"notifyDialogre('电子归档审批', '${ctx}/workprojectnotify/workProjectNotify/form?id=" + d.reportNotifyId +"&home=record','95%', '95%')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 审批</a>";
+				}
 				if(d.flag == 1){
 					if(d.projectReportStatus == 0){
 						xml+="<a href=\"#\" onclick=\"openDialogre('新增报告', '${ctx}/ruralProject/ruralProjectMessageNew/form?projectId=" + d.id +"','95%', '95%','','送审,暂存,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-blue\" > 新增报告</a>";
@@ -880,19 +884,24 @@
 					if(d.projectReportStatus == 5){
 						/*xml+="<a href=\"#\" style='background-color: #FFB800' onclick=\"openDialogre('下载模板', '${ctx}/ruralProject/ruralProjectMessage/skipDownloadFtl?id=" + d.id +"','35%', '35%','','下载,关闭')\" class=\"op-btn\" > 下载模板</a>";*/
 						if(d.projectReportRecordStatus == 0){
-							xml+="<a href=\"#\" onclick=\"openDialogre('新增归档信息', '${ctx}/ruralProject/ruralProjectMessage/formRecord?reportId=" + d.id +"','95%', '95%','','送审,暂存,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-blue\" > 线上归档</a>";
+							xml+="<a href=\"#\" onclick=\"openDialogre('新增归档信息', '${ctx}/ruralProject/ruralProjectMessageNew/formRecord?reportId=" + d.id +"','95%', '95%','','送审,暂存,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-blue\" > 线上归档</a>";
 						}
 						if(d.projectReportRecordStatus == 1){
-							xml+="<a href=\"#\" onclick=\"openDialogre('修改归档信息', '${ctx}/ruralProject/ruralProjectMessage/formRecordModify?id=" + d.prrId +"','95%', '95%','','送审,暂存,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 线上重新归档</a>";
+							xml+="<a href=\"#\" onclick=\"openDialogre('修改归档信息', '${ctx}/ruralProject/ruralProjectMessageNew/formRecordModify?id=" + d.prrId +"','95%', '95%','','送审,暂存,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 线上重新归档</a>";
 						}
 						if(d.projectReportRecordStatus == 2){
 							xml+="<a href=\"${ctx}/ruralProject/ruralProjectMessage/cancelInvalidate?id=" + d.prrId + "&processInstanceId=" + d.prrProcessInstanceId + "\" onclick=\"return confirmx('确认要撤回该线上报告归档审批吗?', this.href)\" class=\"layui-btn layui-btn-xs layui-bg-red\" > 撤回线上归档</a>";
 						}
 						if(d.projectReportRecordStatus == 3){
-							xml+="<a href=\"#\" onclick=\"openDialogre('撤回调整归档信息', '${ctx}/ruralProject/ruralProjectMessage/formRecordModify?id=" + d.prrId + " ','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 线上重新归档</a>";
+							xml+="<a href=\"#\" onclick=\"openDialogre('撤回调整归档信息', '${ctx}/ruralProject/ruralProjectMessageNew/formRecordModify?id=" + d.prrId + " ','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 线上重新归档</a>";
 						}
 						if(d.projectReportRecordStatus == 4){
-							xml+="<a href=\"#\" onclick=\"openDialogre('调整归档信息', '${ctx}/ruralProject/ruralProjectMessage/formRecordModify?id=" + d.prrId + "&view=modify','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs layui-bg-green\" > 线上重新归档</a>";
+							//驳回操作
+							if(d.newRecordNotifyFlag == 1){
+								xml+="<a href=\"#\" onclick=\"openDialogre('调整归档信息', '${ctx}/ruralProject/ruralProjectMessageNew/formRecordModify?id=" + d.prrId + "&view=modify','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs  layui-bg-green\" > 线上重新归档</a>";
+							}else{
+								xml+="<a href=\"#\" onclick=\"openDialogre('调整归档信息', '${ctx}/ruralProject/ruralProjectMessage/formRecordModify?id=" + d.prrId + "&view=modify','95%', '95%','','送审,关闭')\" class=\"layui-btn layui-btn-xs  layui-bg-green\" > 线上重新归档</a>";
+							}
 						}
 					}
 

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

@@ -165,10 +165,10 @@
 														<c:otherwise>
 															<c:choose>
 																<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-																	<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileAttachment.temporaryUrl}','90%','90%','1')">${fileAttachment.attachName} ; </a>
+																	<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.temporaryUrl}',1)">${fileAttachment.attachName} ; </a>
 																</c:when>
 																<c:otherwise>
-																	<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileAttachment.temporaryUrl}','90%','90%')">${fileAttachment.attachName} ; </a>
+																	<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.temporaryUrl}',2)">${fileAttachment.attachName} ; </a>
 																</c:otherwise>
 															</c:choose>
 														</c:otherwise>
@@ -186,10 +186,10 @@
 														<c:otherwise>
 															<c:choose>
 																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachName,'pdf')}">
-																	<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileAttachment.url}','90%','90%','1')">${fileAttachment.attachName} ; </a>
+																	<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',1)">${fileAttachment.attachName} ; </a>
 																</c:when>
 																<c:otherwise>
-																	<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileAttachment.url}','90%','90%')">${fileAttachment.attachName} ; </a>
+																	<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',2)">${fileAttachment.attachName} ; </a>
 																</c:otherwise>
 															</c:choose>
 														</c:otherwise>
@@ -281,10 +281,10 @@
 															<c:otherwise>
 																<c:choose>
 																	<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'pdf')}">
-																		<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileGistdata.temporaryUrl}','90%','90%','1')">${fileGistdata.attachName} ; </a>
+																		<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',1)">${fileGistdata.attachName} ; </a>
 																	</c:when>
 																	<c:otherwise>
-																		<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileGistdata.temporaryUrl}','90%','90%')">${fileGistdata.attachName} ; </a>
+																		<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',2)">${fileGistdata.attachName} ; </a>
 																	</c:otherwise>
 																</c:choose>
 															</c:otherwise>
@@ -302,10 +302,10 @@
 															<c:otherwise>
 																<c:choose>
 																	<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachName,'pdf')}">
-																		<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileGistdata.url}','90%','90%','1')">${fileGistdata.attachName} ; </a>
+																		<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',1)">${fileGistdata.attachName} ; </a>
 																	</c:when>
 																	<c:otherwise>
-																		<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileGistdata.url}','90%','90%')">${fileGistdata.attachName} ; </a>
+																		<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',2)">${fileGistdata.attachName} ; </a>
 																	</c:otherwise>
 																</c:choose>
 															</c:otherwise>
@@ -396,10 +396,10 @@
 																<c:otherwise>
 																	<c:choose>
 																		<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileOther.temporaryUrl}','90%','90%','1')">${fileOther.attachName} ; </a>
+																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',1)">${fileOther.attachName} ; </a>
 																		</c:when>
 																		<c:otherwise>
-																			<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileOther.temporaryUrl}','90%','90%')">${fileOther.attachName} ; </a>
+																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',2)">${fileOther.attachName} ; </a>
 																		</c:otherwise>
 																	</c:choose>
 																</c:otherwise>
@@ -417,10 +417,10 @@
 																<c:otherwise>
 																	<c:choose>
 																		<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileOther.url}','90%','90%','1')">${fileOther.attachName} ; </a>
+																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',1)">${fileOther.attachName} ; </a>
 																		</c:when>
 																		<c:otherwise>
-																			<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileOther.url}','90%','90%')">${fileOther.attachName} ; </a>
+																			<a class="attention-info" href="javascript:void(0)"  onclick="openPreview('${fileOther.url}',2)">${fileOther.attachName} ; </a>
 																		</c:otherwise>
 																	</c:choose>
 																</c:otherwise>

+ 2 - 2
src/main/webapp/webpage/modules/workcontractinfo/workContractAudit.jsp

@@ -11,9 +11,9 @@
         function doSubmit(obj){
             // 回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
+                var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+                $("#opinion").val(ss);
                 if(obj == 1) {
-                    var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
-                    $("#opinion").val(ss);
                     $("#flag").val("yes");
                 }else {
                     $("#flag").val("no");

+ 2 - 2
src/main/webapp/webpage/modules/workcontractrecord/workContractRecordAudit.jsp

@@ -13,9 +13,9 @@
 		  if(validateForm.form()){
 		      var fileNum =  $("#fileNum").val();
 		      var fileNumTow =  $("#fileNumTow").val();
+			  var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+			  $("#opinion").val(ss);
               if(obj == 1){
-				  var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
-				  $("#opinion").val(ss);
 				  $('#flag').val('yes');
                   if(fileNum == ''|| fileNum == undefined){
                       top.layer.msg('填写案卷号!', {icon: 0});

+ 1 - 1
src/main/webapp/webpage/modules/workinvoice/workInvoiceAuditEnd.jsp

@@ -18,9 +18,9 @@
         var numcount=0;//验证导入发票号是否重复
 		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
 		  if(validateForm.form()){
-              if(obj == 1) {
 			  var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
 			  $("#opinion").val(ss);
+              if(obj == 1) {
               	//非空验证
 				  var ff=true;
 				  $(".judgment").each(function(){

+ 2 - 2
src/main/webapp/webpage/modules/workreimbursement/workReimbursementAudit.jsp

@@ -10,9 +10,9 @@
 		var validateForm;
 		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
 		  if(validateForm.form()){
+			  var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+			  $("#opinion").val(ss);
 		      if(obj == 1){
-				  var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
-				  $("#opinion").val(ss);
                   $('#flag').val('yes');
               }else{
                   $('#flag').val('no');

+ 2 - 2
src/main/webapp/webpage/modules/workreimbursement/workReimbursementCWAudit.jsp

@@ -11,9 +11,9 @@
         var state;//考核科目显示隐藏
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
+                var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
+                $("#opinion").val(ss);
                 if(obj == 1){
-                    var ss= document.getElementById("iframe").contentWindow.document.getElementById("opinion").value
-                    $("#opinion").val(ss);
                     $('#flag').val('yes');
                     var idx1 = $("#contentTable tbody").length;
                     /*for(var i = 0;i < idx1; i++){