Quellcode durchsuchen

添加归档员修改项目归档案卷号信息功能

user5 vor 4 Jahren
Ursprung
Commit
772739c72a

+ 6 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectReportRecordDao.java

@@ -53,4 +53,10 @@ public interface ProjectReportRecordDao extends CrudDao<ProjectReportRecord> {
      * @param reportId
      */
     ProjectReportRecord getprojectReportRecord(String reportId);
+
+    /**
+     * 管理员修改项目归档案卷号
+     * @param projectReportRecord
+     */
+    void adminModifyRecord(ProjectReportRecord projectReportRecord);
 }

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

@@ -781,4 +781,14 @@ public class ProjectReportRecordService extends CrudService<ProjectReportRecordD
 	public ProjectReportRecord getprojectReportRecord(String reportId){
 		return dao.getprojectReportRecord(reportId);
 	}
+
+	/**
+	 * 管理员修改项目归档案卷号
+	 * @param projectReportRecord
+	 */
+	@Transactional(readOnly = false)
+	public void adminModifyRecord(ProjectReportRecord projectReportRecord){
+		projectReportRecordDao.adminModifyRecord(projectReportRecord);
+	}
+
 }

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

@@ -86,6 +86,7 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 	private List<ReportedConsultant> reportedConsultantList= Lists.newArrayList();;//咨询员列表
 	private Integer overDueStatus; //超期状态(0:未超期,1:已超期)
 	private List<String> typeList;
+	private String flagArchive;  //归档员判定
 
 	@NotNull(message = "委托方联系人不能为空")
 	private List<WorkClientLinkman> workClientLinkmanList;		// 委托方联系人
@@ -893,4 +894,12 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 	public void setTypeList(List<String> typeList) {
 		this.typeList = typeList;
 	}
+
+	public String getFlagArchive() {
+		return flagArchive;
+	}
+
+	public void setFlagArchive(String flagArchive) {
+		this.flagArchive = flagArchive;
+	}
 }

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

@@ -143,6 +143,12 @@ public class RuralCostProjectMessageController extends BaseController {
             }else{
                 records1.setFlagAdmin("0");
             }
+            //判断是否为归档员
+            if (UserUtils.getArchiveUserRole()){
+                records1.setFlagArchive("1");
+            }else{
+                records1.setFlagArchive("0");
+            }
         }
         model.addAttribute("page", page);
         return "modules/ruralprojectrecords/cost/ruralCostProjectMessageList";
@@ -1223,4 +1229,67 @@ public class RuralCostProjectMessageController extends BaseController {
         }
     }
 
+    /**
+     * 查看,增加,编辑报告归档表单页面
+     */
+    @RequestMapping(value = "adminRecordModifyForm")
+    public String adminRecordModifyForm(ProjectReportRecord projectReportRecord, Model model) {
+        projectReportRecord = projectReportRecordService.get(projectReportRecord.getId());
+        if(StringUtils.isBlank(projectReportRecord.getId())){
+            projectReportRecord.setCreateDate(new Date());
+            projectReportRecord.setCreateBy(UserUtils.getUser());
+        }
+        projectReportRecord.setView("modify");
+
+
+
+        //查询报告文件、依据性文件、其他文件必填列表以及数据
+        List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
+        for (MainDictDetail mainDict:mainDictDetails) {
+            ProjectAccessoryRelationInfo relateInfo = new ProjectAccessoryRelationInfo();
+            //添加项目类型
+            relateInfo.setProjectType("1");
+            //添加归档类型
+            relateInfo.setRequiredStage(2);
+            //添加项目id
+            relateInfo.setId(projectReportRecord.getReport().getProject().getId());
+            relateInfo.setAttachType(mainDict.getValue());
+            switch(mainDict.getValue()){
+                case "11" :
+                    projectReportRecord.setFileAttachmentList(projectTemplateService.getProjectTemplateList(relateInfo));
+                    break;
+                case "12" :
+                    projectReportRecord.setFileGistdataList(projectTemplateService.getProjectTemplateList(relateInfo));
+                    break;
+                case "13" :
+                    projectReportRecord.setFileOtherList(projectTemplateService.getProjectTemplateList(relateInfo));
+                    break;
+            }
+        }
+
+        model.addAttribute("projectReportRecord", projectReportRecord);
+        model.addAttribute("project", projectReportRecord.getReport().getProject());
+        return "modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordAdminModify";
+    }
+
+
+    /**
+     * 归档员修改案卷号信息
+     * @param projectReportRecord
+     * @param redirectAttributes
+     * @return
+     */
+    @RequestMapping(value = {"adminModifyRecord"})
+    public String adminModifyRecord(ProjectReportRecord projectReportRecord,
+                                    RedirectAttributes redirectAttributes) {
+        try {
+            //管理员修改项目归档案卷号
+            projectReportRecordService.adminModifyRecord(projectReportRecord);
+            addMessage(redirectAttributes, "案卷号变更成功");
+        }catch (Exception e){
+            logger.error("Exception e:"+e);
+            addMessage(redirectAttributes, "案卷号变更失败");
+        }
+        return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralCostProjectMessage/?repage";
+    }
 }

+ 70 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageController.java

@@ -144,6 +144,12 @@ public class RuralProjectMessageController extends BaseController {
             }else{
                 records1.setFlagAdmin("0");
             }
+            //判断是否为归档员
+            if (UserUtils.getArchiveUserRole()){
+                records1.setFlagArchive("1");
+            }else{
+                records1.setFlagArchive("0");
+            }
         }
         model.addAttribute("page", page);
         return "modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageList";
@@ -1250,4 +1256,68 @@ public class RuralProjectMessageController extends BaseController {
             return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectMessage/?repage";
         }
     }
+
+    /**
+     * 查看,增加,编辑报告归档表单页面
+     */
+    @RequestMapping(value = "adminRecordModifyForm")
+    public String adminRecordModifyForm(ProjectReportRecord projectReportRecord, Model model) {
+        projectReportRecord = projectReportRecordService.get(projectReportRecord.getId());
+        if(StringUtils.isBlank(projectReportRecord.getId())){
+            projectReportRecord.setCreateDate(new Date());
+            projectReportRecord.setCreateBy(UserUtils.getUser());
+        }
+        projectReportRecord.setView("modify");
+
+
+
+        //查询报告文件、依据性文件、其他文件必填列表以及数据
+        List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
+        for (MainDictDetail mainDict:mainDictDetails) {
+            ProjectAccessoryRelationInfo relateInfo = new ProjectAccessoryRelationInfo();
+            //添加项目类型
+            relateInfo.setProjectType("1");
+            //添加归档类型
+            relateInfo.setRequiredStage(2);
+            //添加项目id
+            relateInfo.setId(projectReportRecord.getReport().getProject().getId());
+            relateInfo.setAttachType(mainDict.getValue());
+            switch(mainDict.getValue()){
+                case "11" :
+                    projectReportRecord.setFileAttachmentList(projectTemplateService.getProjectTemplateList(relateInfo));
+                    break;
+                case "12" :
+                    projectReportRecord.setFileGistdataList(projectTemplateService.getProjectTemplateList(relateInfo));
+                    break;
+                case "13" :
+                    projectReportRecord.setFileOtherList(projectTemplateService.getProjectTemplateList(relateInfo));
+                    break;
+            }
+        }
+
+        model.addAttribute("projectReportRecord", projectReportRecord);
+        model.addAttribute("project", projectReportRecord.getReport().getProject());
+        return "modules/ruralprojectrecords/projectReportRecord/projectReportRecordAdminModify";
+    }
+
+
+    /**
+     * 归档员修改案卷号信息
+     * @param projectReportRecord
+     * @param redirectAttributes
+     * @return
+     */
+    @RequestMapping(value = {"adminModifyRecord"})
+    public String adminModifyRecord(ProjectReportRecord projectReportRecord,
+                            RedirectAttributes redirectAttributes) {
+        try {
+            //管理员修改项目归档案卷号
+            projectReportRecordService.adminModifyRecord(projectReportRecord);
+            addMessage(redirectAttributes, "案卷号变更成功");
+        }catch (Exception e){
+            logger.error("Exception e:"+e);
+            addMessage(redirectAttributes, "案卷号变更失败");
+        }
+        return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectMessage/?repage";
+    }
 }

+ 30 - 0
src/main/java/com/jeeplus/modules/sys/utils/UserUtils.java

@@ -536,6 +536,36 @@ public class UserUtils {
 			return true;
 		}
 	}
+
+	/**
+	 * 获取当前用户在当前企业是否是项目归档管理员
+	 *
+	 * @return
+	 */
+	public static boolean getArchiveUserRole(){
+		List<Role> roles = (List<Role>)getCache("selectRole");
+		if(roles == null || roles.size() ==0){
+			User user = UserUtils.getUser();
+			List<Role> roleList = UserUtils.getRoleListByCompany(user.getId());
+			roles = roleList;
+		}
+		for (Role role:roles){
+			//获取权限信息
+			Role selectRole = roleDao.getByRoleActivity(role);
+			if(null != selectRole){
+				List<SysRoleActivity> roleActivityList = selectRole.getRoleActivityList();
+				if(roleActivityList.size() > 0){
+					for (SysRoleActivity info: roleActivityList) {
+						//判断是否为项目归档管理员
+						if("XHMDZGS1551886525850bggdgly".equals(info.getEnname())){
+							return true;
+						}
+					}
+				}
+			}
+		}
+		return false;
+	}
 	/**
 	 * 获取当前用户所有岗位列表
 	 * @return

+ 9 - 0
src/main/resources/mappings/modules/projectcontentinfo/ProjectReportRecordDao.xml

@@ -341,4 +341,13 @@
 		<include refid="projectReportRecordJoins"/>
 		WHERE a.report_id = #{reportId}
 	</select>
+
+	<update id="adminModifyRecord">
+		update
+		  rural_project_report_record
+		set
+		  file_num = #{fileNum},
+		  file_num_tow = #{fileNumTow}
+		where id = #{id} ;
+	</update>
 </mapper>

+ 580 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordAdminModify.jsp

@@ -0,0 +1,580 @@
+<%@ 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">
+		var validateForm;
+		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+			var fileNum =  $("#fileNum").val();
+			var fileNumTow =  $("#fileNumTow").val();
+			if(validateForm.form()){
+				if(fileNum == ''|| fileNum == undefined){
+					top.layer.msg('填写案卷号!', {icon: 0});
+					return;
+				}
+				if(fileNumTow == ''|| fileNumTow == undefined){
+					top.layer.msg('请再次填写案卷号!', {icon: 0});
+					return;
+				}
+				if(fileNum != fileNumTow){
+					top.layer.msg('两次案卷号填写不同,请重新输入!', {icon: 0});
+					return;
+				}
+				$("#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);
+					}
+				}
+			});
+		});
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="projectReportRecord" action="${ctx}/ruralProject/ruralCostProjectMessage/adminModifyRecord" 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="createBy.id"/>
+			<sys:message content="${message}"/>
+			<div class="form-group layui-row first lw9">
+				<div class="form-group-label"><h2>基本信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">报告号:</label>
+					<div class="layui-input-block with-icon">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectReportRecord.report.number}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>案卷号:</label>
+					<div class="layui-input-block">
+							<input htmlEscape="false" id="fileNum" name="fileNum"  class="form-control required layui-input" value="${projectReportRecord.fileNum}"/>
+					</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="fileNumTow" name="fileNumTow" type="text"  class="layui-input required 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="<fmt:formatDate value="${projectReportRecord.report.reportDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同编号:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectReportRecord.contractNum}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同名称:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectReportRecord.contractName}"/>
+					</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.clientName}"/>
+					</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.projectNum}"/>
+					</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.projectName}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">归档申请人:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectReportRecord.createBy.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">提交归档时间:</label>
+					<div class="layui-input-block">
+						<input id="recordDate" name="recordDate"  htmlEscape="false" readonly="true" class="form-control  layui-input" value="<fmt:formatDate value="${projectReportRecord.createDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">归档完成日期:</label>
+					<div class="layui-input-block">
+						<input id="accomplishDate" name="accomplishDate"  htmlEscape="false" readonly="true" class="form-control  layui-input"
+							   value="<fmt:formatDate value="${projectReportRecord.accomplishDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">说明:</label>
+					<div class="layui-input-block">
+						<textarea path="remarks" htmlEscape="false" readonly="true" rows="3" maxlength="255" 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>序号</th>--%>
+							<th>电子件名称</th>
+							<th width="100px">最大容量(M)</th>
+							<th width="18%">类型限制</th>
+							<th>文件名</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
+							<tr>
+								<td style="display:none">${fileAttachment.id}</td>
+								<td>${fileAttachment.attachName}</td>
+								<td>${fileAttachment.attachLength}</td>
+								<td>${fileAttachment.attachTypes}</td>
+								<td>
+									<c:forEach items="${fileAttachment.workAttachments}" var = "workAttachment" varStatus="status">
+										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
+									</c:forEach>
+								</td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:void(0)"  onclick="openBill2('查看附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-eye"></i> 查看</a>
+									</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>序号</th>--%>
+							<th>电子件名称</th>
+							<th width="100px">最大容量(M)</th>
+							<th width="18%">类型限制</th>
+							<th>文件名</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_gistdata">
+						<c:forEach items="${projectReportRecord.fileGistdataList}" var = "fileGistdata" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<td style="display:none">${fileGistdata.id}</td>
+								<td>${fileGistdata.attachName}</td>
+								<td>${fileGistdata.attachLength}</td>
+								<td>${fileGistdata.attachTypes}</td>
+								<td>
+									<c:forEach items="${fileGistdata.workAttachments}" var = "workAttachment" varStatus="status">
+										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
+									</c:forEach>
+								</td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:void(0)"  onclick="openBill2('查看附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileGistdata.id}&projectId=${projectcontentinfo.project.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-eye"></i> 查看</a>
+									</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_other" style="display: none" class="upload-progress">
+					<span id="fileName_other" ></span>
+					<span id="_other" ></span>
+					<b><span id="baifenbi_other" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
+				<span id="other_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable_other" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>电子件名称</th>
+							<th width="100px">最大容量(M)</th>
+							<th width="18%">类型限制</th>
+							<th>文件名</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_other">
+						<c:forEach items="${projectReportRecord.fileOtherList}" var = "fileOther" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<td style="display:none">${fileOther.id}</td>
+								<td>${fileOther.attachName}</td>
+								<td>${fileOther.attachLength}</td>
+								<td>${fileOther.attachTypes}</td>
+								<td>
+									<c:forEach items="${fileOther.workAttachments}" var = "workAttachment" varStatus="status">
+										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
+									</c:forEach>
+								</td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:void(0)"  onclick="openBill2('查看附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileOther.id}&projectId=${projectcontentinfo.project.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-eye"></i> 查看</a>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<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()){
+			$($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>

+ 7 - 2
src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectMessageList.jsp

@@ -525,7 +525,11 @@
 						if(d.deleteAdmin != undefined && d.deleteAdmin =="1")
 						{
 							xml+="<a href=\"#\" onclick=\"openDialogre('修改项目报告', '${ctx}/ruralProject/ruralCostProjectMessage/adminModifyForm?projectId=" + d.id + "','95%', '95%','','提交,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改报告</a>";
-							xml+="<a href=\"#\" onclick=\"openDialogView('历史报告', '${ctx}/ruralProject/ruralProjectMessage/getReportModifyList?projectId=" + d.id + "','95%', '95%')\" class=\"op-btn op-btn-delete\" style=\"background-color:#5FB878;\" ><i class=\"fa fa-eye\"></i> 历史报告</a>";
+							xml+="<a href=\"#\" onclick=\"openDialogView('历史报告', '${ctx}/ruralProject/ruralCostProjectMessage/getReportModifyList?projectId=" + d.id + "','95%', '95%')\" class=\"op-btn op-btn-delete\" style=\"background-color:#5FB878;\" ><i class=\"fa fa-eye\"></i> 历史报告</a>";
+						}
+						if(d.flagArchive != undefined && d.flagArchive =="1")
+						{
+							xml+="<a href=\"#\" onclick=\"openDialogre('修改归档案卷号', '${ctx}/ruralProject/ruralCostProjectMessage/adminRecordModifyForm?id=" + d.prrId + "','95%', '95%','','提交,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改归档</a>";
 						}
                         return xml;
 
@@ -647,7 +651,8 @@
                     </c:otherwise>
                     </c:choose>
 					,"deleteAdmin":<c:choose><c:when test="${'1' == projectRecords.flagAdmin && projectRecords.projectReportStatus == 5}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
-                    <shiro:hasPermission name="ruralProject:ruralProjectRecords:edit">,"canedit3":<c:choose><c:when test="${fns:getUser().id == projectRecords.leaderIds || fns:getUser().id eq projectRecords.createBy.id}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose></shiro:hasPermission>
+					,"flagArchive":<c:choose><c:when test="${'1' == projectRecords.flagArchive && projectRecords.projectReportRecordStatus == 5}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+					<shiro:hasPermission name="ruralProject:ruralProjectRecords:edit">,"canedit3":<c:choose><c:when test="${fns:getUser().id == projectRecords.leaderIds || fns:getUser().id eq projectRecords.createBy.id}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose></shiro:hasPermission>
                     <%--<shiro:hasPermission name="project:projectRecords:edit">
                     ,"canedit3":<c:choose>
                                     <c:when test="${projectRecords.projectReportStatus == 5 && fn:contains(projectRecords.leaderIds,fns:getUser().id)}">"1"</c:when>

+ 580 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/projectReportRecord/projectReportRecordAdminModify.jsp

@@ -0,0 +1,580 @@
+<%@ 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">
+		var validateForm;
+		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
+			var fileNum =  $("#fileNum").val();
+			var fileNumTow =  $("#fileNumTow").val();
+			if(validateForm.form()){
+				if(fileNum == ''|| fileNum == undefined){
+					top.layer.msg('填写案卷号!', {icon: 0});
+					return;
+				}
+				if(fileNumTow == ''|| fileNumTow == undefined){
+					top.layer.msg('请再次填写案卷号!', {icon: 0});
+					return;
+				}
+				if(fileNum != fileNumTow){
+					top.layer.msg('两次案卷号填写不同,请重新输入!', {icon: 0});
+					return;
+				}
+				$("#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);
+					}
+				}
+			});
+		});
+	</script>
+</head>
+<body>
+<div class="single-form">
+	<div class="container">
+		<form:form id="inputForm" modelAttribute="projectReportRecord" action="${ctx}/ruralProject/ruralProjectMessage/adminModifyRecord" 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="createBy.id"/>
+			<sys:message content="${message}"/>
+			<div class="form-group layui-row first lw9">
+				<div class="form-group-label"><h2>基本信息</h2></div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">报告号:</label>
+					<div class="layui-input-block with-icon">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectReportRecord.report.number}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label"><span class="require-item">*</span>案卷号:</label>
+					<div class="layui-input-block">
+							<input htmlEscape="false" id="fileNum" name="fileNum"  class="form-control required layui-input" value="${projectReportRecord.fileNum}"/>
+					</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="fileNumTow" name="fileNumTow" type="text"  class="layui-input required 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="<fmt:formatDate value="${projectReportRecord.report.reportDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同编号:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectReportRecord.contractNum}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">合同名称:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectReportRecord.contractName}"/>
+					</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.clientName}"/>
+					</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.projectNum}"/>
+					</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.projectName}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">归档申请人:</label>
+					<div class="layui-input-block">
+						<input htmlEscape="false"  readonly="true" class="form-control layui-input" value="${projectReportRecord.createBy.name}"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">提交归档时间:</label>
+					<div class="layui-input-block">
+						<input id="recordDate" name="recordDate"  htmlEscape="false" readonly="true" class="form-control  layui-input" value="<fmt:formatDate value="${projectReportRecord.createDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm6">
+					<label class="layui-form-label">归档完成日期:</label>
+					<div class="layui-input-block">
+						<input id="accomplishDate" name="accomplishDate"  htmlEscape="false" readonly="true" class="form-control  layui-input"
+							   value="<fmt:formatDate value="${projectReportRecord.accomplishDate}" pattern="yyyy-MM-dd"/>"/>
+					</div>
+				</div>
+				<div class="layui-item layui-col-sm12  with-textarea">
+					<label class="layui-form-label">说明:</label>
+					<div class="layui-input-block">
+						<textarea path="remarks" htmlEscape="false" readonly="true" rows="3" maxlength="255" 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>序号</th>--%>
+							<th>电子件名称</th>
+							<th width="100px">最大容量(M)</th>
+							<th width="18%">类型限制</th>
+							<th>文件名</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_attachment">
+						<c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
+							<tr>
+								<td style="display:none">${fileAttachment.id}</td>
+								<td>${fileAttachment.attachName}</td>
+								<td>${fileAttachment.attachLength}</td>
+								<td>${fileAttachment.attachTypes}</td>
+								<td>
+									<c:forEach items="${fileAttachment.workAttachments}" var = "workAttachment" varStatus="status">
+										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
+									</c:forEach>
+								</td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:void(0)"  onclick="openBill2('查看附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-eye"></i> 查看</a>
+									</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>序号</th>--%>
+							<th>电子件名称</th>
+							<th width="100px">最大容量(M)</th>
+							<th width="18%">类型限制</th>
+							<th>文件名</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_gistdata">
+						<c:forEach items="${projectReportRecord.fileGistdataList}" var = "fileGistdata" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<td style="display:none">${fileGistdata.id}</td>
+								<td>${fileGistdata.attachName}</td>
+								<td>${fileGistdata.attachLength}</td>
+								<td>${fileGistdata.attachTypes}</td>
+								<td>
+									<c:forEach items="${fileGistdata.workAttachments}" var = "workAttachment" varStatus="status">
+										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
+									</c:forEach>
+								</td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:void(0)"  onclick="openBill2('查看附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileGistdata.id}&projectId=${projectcontentinfo.project.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-eye"></i> 查看</a>
+									</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_other" style="display: none" class="upload-progress">
+					<span id="fileName_other" ></span>
+					<span id="_other" ></span>
+					<b><span id="baifenbi_other" ></span></b>
+					<div class="progress">
+						<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
+						</div>
+					</div>
+				</div>
+				<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
+				<span id="other_title"></span>
+				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
+					<table id="upTable_other" class="table table-bordered table-condensed details">
+						<thead>
+						<tr>
+								<%-- <th>序号</th>--%>
+							<th>电子件名称</th>
+							<th width="100px">最大容量(M)</th>
+							<th width="18%">类型限制</th>
+							<th>文件名</th>
+							<th width="150px">操作</th>
+						</tr>
+						</thead>
+						<tbody id="file_other">
+						<c:forEach items="${projectReportRecord.fileOtherList}" var = "fileOther" varStatus="status">
+							<tr>
+									<%-- <td>${status.index + 1}</td>--%>
+								<td style="display:none">${fileOther.id}</td>
+								<td>${fileOther.attachName}</td>
+								<td>${fileOther.attachLength}</td>
+								<td>${fileOther.attachTypes}</td>
+								<td>
+									<c:forEach items="${fileOther.workAttachments}" var = "workAttachment" varStatus="status">
+										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
+									</c:forEach>
+								</td>
+								<td class="op-td">
+									<div class="op-btn-box" >
+										<a href="javascript:void(0)"  onclick="openBill2('查看附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileOther.id}&projectId=${projectcontentinfo.project.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-eye"></i> 查看</a>
+									</div>
+								</td>
+							</tr>
+						</c:forEach>
+						</tbody>
+					</table>
+				</div>
+			</div>
+			<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()){
+			$($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>

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

@@ -526,6 +526,10 @@
 							xml+="<a href=\"#\" onclick=\"openDialogre('修改项目报告', '${ctx}/ruralProject/ruralProjectMessage/adminModifyForm?projectId=" + d.id + "','95%', '95%','','提交,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改报告</a>";
 							xml+="<a href=\"#\" onclick=\"openDialogView('历史报告', '${ctx}/ruralProject/ruralProjectMessage/getReportModifyList?projectId=" + d.id + "','95%', '95%')\" class=\"op-btn op-btn-delete\" style=\"background-color:#5FB878;\" ><i class=\"fa fa-eye\"></i> 历史报告</a>";
 						}
+						if(d.flagArchive != undefined && d.flagArchive =="1")
+						{
+							xml+="<a href=\"#\" onclick=\"openDialogre('修改归档案卷号', '${ctx}/ruralProject/ruralProjectMessage/adminRecordModifyForm?id=" + d.prrId + "','95%', '95%','','提交,关闭')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改归档</a>";
+						}
                         return xml;
 
                     }}
@@ -640,6 +644,7 @@
                     </c:otherwise>
                     </c:choose>
 					,"deleteAdmin":<c:choose><c:when test="${'1' == projectRecords.flagAdmin && projectRecords.projectReportStatus == 5}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
+					,"flagArchive":<c:choose><c:when test="${'1' == projectRecords.flagArchive && projectRecords.projectReportRecordStatus == 5}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose>
                     <shiro:hasPermission name="project:projectRecords:edit">,"canedit3":<c:choose><c:when test="${fns:getUser().id == projectRecords.leaderIds || fns:getUser().id eq projectRecords.createBy.id}">"1"</c:when><c:otherwise>"0"</c:otherwise></c:choose></shiro:hasPermission>
                     <%--<shiro:hasPermission name="project:projectRecords:edit">
                     ,"canedit3":<c:choose>