Browse Source

Merge remote-tracking branch 'origin/master'

user5 4 năm trước cách đây
mục cha
commit
05b030d3a8

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

@@ -1018,7 +1018,7 @@ public class ProjectFilingBatchService extends CrudService<ProjectFilingBatchDao
             proInfoDao.proInfoInsert(info);
         }else{
             for (int i=0;i<proInfos.length;i++){
-                if (proInfos[i]!="") {
+                if (proInfos[i]!=""&& !"".equals(proInfos[i])) {
                     json = JSONObject.fromObject(proInfos[i]);
                     ProjectFilingBatchProInfo info = new ProjectFilingBatchProInfo();
                     info.setId(IdGen.uuid());

+ 6 - 1
src/main/java/com/jeeplus/modules/projectFilingBatch/web/ProjectFilingBatchController.java

@@ -454,7 +454,8 @@ public class ProjectFilingBatchController extends BaseController {
      */
     @RequestMapping("saveAudit")
     public String saveAudit(ProjectFilingBatch projectFilingBatch, Model model,
-                            RedirectAttributes redirectAttributes,Integer saveAuditFlag)  {
+                            RedirectAttributes redirectAttributes,Integer saveAuditFlag,
+                            @RequestParam(value = "proId",required = false) String[] proId,  @RequestParam(value = "proInfos",required = false)String[] proInfos, @RequestParam(value = "flags",required = false)String[] flags)  {
         String home = projectFilingBatch.getHome();
         try {
             String taskDefKey = projectFilingBatch.getAct().getTaskDefKey();
@@ -481,6 +482,10 @@ public class ProjectFilingBatchController extends BaseController {
 
                 String str = projectFilingBatchService.auditSave(projectFilingBatch,users);
                 addMessage(redirectAttributes, str);
+                //新增项目树形信息
+                if (proInfos!=null) {
+                    projectFilingBatchService.insertProInfo(proInfos, flags, proId,projectFilingBatch.getId());
+                }
             }
         }catch (Exception e){
             addMessage(redirectAttributes, "归档批次归档流程审批失败");

+ 18 - 2
src/main/webapp/webpage/modules/projectAccessory/workAttachmentForm.jsp

@@ -84,6 +84,22 @@
 				$("#addFile"+divId).show();
 				multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
 		}
+		function showfile(){
+			var length=$("#file_attachment tr").length;
+			var files=new Array();
+			for(var i=0;i<length;i++){
+				files[i]=$("#file_attachment").find("tr").eq(i).find("td").html();
+			}
+			return files;
+		}
+		function showfileXia(){
+			var length=$("#file_attachment tr").length;
+			var xia=new Array();
+			for(var i=0;i<length;i++){
+				xia[i]=$("#file_attachment").find("tr").eq(i).find("td").eq(3).find("span").html();
+			}
+			return xia;
+		}
 	</script>
 </head>
 <body>
@@ -147,8 +163,8 @@
 								<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>
-
+										<span>
+										</span>
 										<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
 											<a href="javascript:void(0)" onclick="deleteFileFromAliyun(this,'${ctx}/sys/workattachment/deleteFileFromAliyun?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i>&nbsp;删除</a>
 										</c:if>

+ 212 - 38
src/main/webapp/webpage/modules/projectFilingBatch/projectFilingBatchApply.jsp

@@ -4,7 +4,11 @@
 <head>
 	<title>重新申请</title>
 	<meta name="decorator" content="default"/>
+	<script type="text/javascript" src="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.js"></script>
+	<script type="text/javascript" src="${ctxStatic}/iCheck/icheck.min.js"></script>
+	<link rel='stylesheet' type="text/css" href="${ctxStatic}/helloweba_editable-select/jquery.editable-select.min.css"/>
 	<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>
+	<link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
 	<script type="text/javascript">
 		var validateForm;
 		function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
@@ -15,7 +19,171 @@
 	
 		  return false;
 		}
+		function listTr(obj){
+			var name=$(obj).find("td").eq(0).find("input").eq(0).val();
+			var tiao="."+name;
+			var span=$(obj).find("td").eq(0);
+			// var ss=$(span).val().split(" ")[4];
+			$(span).toggle(function () {
+				$(tiao).hide();
+				$(span).find("span").attr("class","treeTable-icon")
+			},function () {
+				$(tiao).show();
+				$(span).find("span").attr("class","treeTable-icon open")
+			});
+		}
+		function addRowInfoForm(obj,tbody) {
+			var proid=$(obj).val();
+			var filingId=$("#filingId").val();
+			var len="#"+tbody.id+" tr";
+			var length=$(len).length;
+			var types=new Array();
+			var names=new Array();
+			for (var i=0;i<length;i++){
+				types[i]=$(len).eq(i).find("td").eq(0).find("input").eq(0).val();
+				names[i]=$(len).eq(i).find("td").eq(1).find("input").eq(0).val();
+			}
+			var index = parent.layer.getFrameIndex(window.name);
+			openDialog1('添加信息', '${ctx}/projectFilingBatch/projectFilingBatchInfo/projectFilingBatchProInfoForm?types='+types+'&names='+names+'&proid='+proid+'&filingId='+filingId,'70%', '80%',tbody);
+		}
+		function openDialog1(title,url,width,height,tbody){
+			top.layer.open({
+				type: 2,
+				area: [width, height],
+				title: title,
+				maxmin: true, //开启最大化最小化按钮
+				content: url ,
+				btn: ['确定', '关闭'],
+				yes: function(index, layero){
+					var body = top.layer.getChildFrame('body', index);
+					var tbodyId="#"+tbody.id;
+					var JsonId="."+tbody.id;
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var types=iframeWin.contentWindow.proInfoType();
+					var names=iframeWin.contentWindow.proInfoValue();
+					var proJsons=iframeWin.contentWindow.proInfoJson();
+					var jsonInput=JsonId+"_json"
+					// $(jsonInput).val(json);
+					if(iframeWin.contentWindow.proInfoValue() ){
+						$(tbodyId).html("")
+						for (var i=0;i<types.length;i++){
+							var s=$(body).find("#file_attachment tr").eq(i).html();
+							var name=names[i];
+							var type=types[i];
+							var proJson=proJsons[i];
+							$(tbodyId).append(
+									"<tr class='listInfo'>"+
+									"<td style=\"text-align: center;position: relative;\" width=\"20%\">" +
+									"<input  readonly='true' name='ProInfoType' style='text-align: center'  class=\"form-control required\" value='"+type+"'></td>"+
+									"<td style=\"text-align: center\" width=\"20%\"><input  readonly='true' name='ProInfoName' style='text-align: center' class=\"form-control\" value='"+name+"'></input></td>"+
+									"<td style=\"text-align: center\" width=\"20%\"></td>"+
+									"<td width=\"20%\">" +
+									"<span href=javascript:void(0); onclick=\"addRowInfoForm("+edit+","+editId+")\"   class=\"op-btn op-btn-edit\" title=\"上传附件\"><i class=\"glyphicon glyphicon-edit\"></i>&nbsp;编辑</span>" +
+									"<span class=\"op-btn op-btn-delete\" onclick=\"delListInfoRow(this)\" title=\"删除\"><i class=\"glyphicon glyphicon-remove\"></i>&nbsp;删除</span>" +
+									"<input type='text' class='" + jsonInput + "'  name='proInfos' style='display: none;' value='"+proJson+"' />"+
+									"</td>"+
+									"</tr>"
+							)
+						}
+						if(types.length==1){
+							var lenId=tbodyId+"_len"
+							$(lenId).val("123");
+							var ssss=$(lenId).val()
+						}else{
+							var lenId=tbodyId+"_len"
+							$(lenId).val("");
+						}
+						top.layer.close(index);//关闭对话框。
+						// top.window[iframeName].frames.location.reload();//刷新父亲
+					}
+				},
+				cancel: function(index){
+				}
+			});
+		}
 		$(document).ready(function() {
+			var filingId=$("#filingId").val();
+			if(filingId!=""){
+				$.ajax({
+					url:"${ctx}/projectFilingBatch/projectFilingBatchInfo/formTwo",
+					data:{
+						"filingId":filingId
+					},
+					type:"post",
+					success:function (d) {
+						$.each(d.project,function(index,obj){
+							var id="projectList_"+obj.id;
+							var pid="project_"+obj.id;
+							var tid="project_"+obj.id+"_proId";
+							editId=id;
+							edit=tid;
+							var inId="#"+tid;
+							var size=$("#projectList .rowSize").size();
+							var flag=true;
+							var dd=$(inId).val();
+							for (var i=0;i<size;i++){
+								if (dd==d.id){
+									flag=false;
+								}
+							}
+							if(flag) {
+								$("#projectList").append("<tr class='rowSize' onclick='listTr(this)'>" +
+										"<td><input type=\"hidden\" name=\"proId\" id='" + tid + "' value=" + obj.id + "><input type=\"hidden\" name=\"projectid\" value=" + obj.id + "><span><i class=\"layui-icon layui-icon-triangle-d\"></i></span>" + obj.projectId + "</td>" +
+										"<td>" + obj.projectName + "</td>" +
+										"<td>" + obj.projectReportNumber + "</td>" +
+										"<td class=\"text-center op-td\" >" +
+										"<span class=\"op-btn op-btn-add\" onclick=\"addRowInfoForm("+tid+","+id+")\" title=\"添加\"><i class=\"fa fa-plus\"></i>&nbsp;添加</span>" +
+										"<span class=\"op-btn op-btn-delete\" onclick=\"delListRow(this," + id + ")\" title=\"删除\"><i class=\"glyphicon glyphicon-remove\"></i>&nbsp;删除</span>" +
+										"</td>" +
+										"</tr>")
+								$("#projectList").append("<tr class='"+obj.id+"' style='display: none;'> <td colspan='4' style='padding: 0px;'>" +
+										"<table style=\"width: 100%;padding: 0px;margin: 0px;\" class=\"table table-bordered table-condensed details\">" +
+										"<tbody id='" + id + "'>" +
+										"<input type='text' id='" + id + "_len' style='display: none;' name='flags' />"+
+										"</tbody>" +
+
+										"</table>" +
+										"</td></tr>")
+								$.ajax({
+									type : "POST",
+									url : "${ctx}/projectFilingBatch/projectFilingBatchInfo/getFilingBatchProInfo",
+									data : {
+										'projectId':obj.id,
+										'filingBatch':filingId,
+									},
+									//请求成功
+									success : function(result) {
+										var iid="#"+id
+										// var ss=(obj.id).split("_")
+										// var sa=ss[1];
+										$(iid).parent().parent().parent().show();
+										$.each(result.data,function(index,value){
+											$(iid).append(
+													"<tr class='listInfo' style='position: relative'>"+
+													// "<td class=\"hide\">"+
+													// "<input type='file' multiple='multiple' style='display: none;' onChange='if(this.value)insertAccording(this.value,"+obj.id+",this);'/>"+
+													// "<input type='hidden' style='display: none;' id='attId' value='"+value.id+"'/>"+
+													// "<input type='hidden' style='display: none;' id='fileUrl' value='"+value.url+"'/>"+
+													// "</td>"+
+													"<td style=\"text-align: center;position: relative;\" width=\"20%\">" +
+													"<input name='proInfoType' onChange='upwType(this)' style='text-align: center' readonly='true' class=\"form-control required\" value='"+value.proInfoType+"'/></td>"+
+													"<td style=\"text-align: center\" width=\"20%\"><input  readonly='true' name='proInfoName' style='text-align: center' class=\"form-control required\" value='"+value.proInfoName+"'/></td>"+
+													"<td style=\"text-align: center\" width=\"20%\"></td>"+
+													"<td width=\"20%\">" +
+													"<span href=javascript:void(0); onclick=\"addRowInfoForm("+tid+","+id+")\"   class=\"op-btn op-btn-edit\" title=\"上传附件\"><i class=\"glyphicon glyphicon-edit\"></i>&nbsp;编辑</span>" +
+													"<span class=\"op-btn op-btn-delete\" onclick=\"delListInfoRow(this)\" title=\"删除\"><i class=\"glyphicon glyphicon-remove\"></i>&nbsp;删除</span>" +
+													"<input type='text' class='" + id + "_json' style='display: none;' name='proInfos' />"+
+													"</td>"+
+													"</tr>"
+											)
+										})
+									}
+								});
+							}
+						})
+					}
+				});
+			}
 			validateForm = $("#inputForm").validate({
 				submitHandler: function(form){
 					loading('正在提交,请稍等...');
@@ -89,7 +257,7 @@
 <div class="single-form">
 	<div class="container">
 		<form:form id="inputForm" modelAttribute="projectFilingBatch" enctype="multipart/form-data" action="${ctx}/projectFilingBatch/projectFilingBatchInfo/saveAudit" method="post" class="form-horizontal">
-		<form:hidden path="id"/>
+		<form:hidden path="id" id="filingId"/>
 		<form:hidden path="home"/>
 		<form:hidden path="act.taskId"/>
 		<form:hidden path="act.taskName"/>
@@ -113,6 +281,12 @@
 							<form:input path="createBy.name" id="createBy"  readonly="true" class="form-control layui-input" />
 						</div>
 					</div>
+					<div class="layui-item layui-col-sm6 lw7 with-textarea">
+						<label class="layui-form-label"><span style="color: red">*</span>归档名称:</label>
+						<div class="layui-input-block">
+							<form:input path="filingName" htmlEscape="false" class="form-control  layui-input required"/>
+						</div>
+					</div>
 					<div class="layui-item layui-col-sm12 lw7">
 						<label class="layui-form-label">归档信息:</label>
 						<div class="layui-input-block">
@@ -135,47 +309,47 @@
 						<th style="text-align: center" width="20%">操作</th>
 					</tr>
 					</thead>
-					<tbody id="workConstructionLinkmanList">
-					<c:choose>
-						<c:when test="${not empty projectFilingBatch}">
-							<c:forEach items="${projectFilingBatch.project}" var="project" varStatus="index">
-								<tr>
-									<td>
-											${project.projectId}
-									</td>
-									<td>
-											${project.projectName}
-									</td>
-									<td>
-											${project.projectReportNumber}
-									</td>
+					<tbody id="projectList">
+<%--					<c:choose>--%>
+<%--						<c:when test="${not empty projectFilingBatch}">--%>
+<%--							<c:forEach items="${projectFilingBatch.project}" var="project" varStatus="index">--%>
+<%--								<tr>--%>
+<%--									<td>--%>
+<%--											${project.projectId}--%>
+<%--									</td>--%>
+<%--									<td>--%>
+<%--											${project.projectName}--%>
+<%--									</td>--%>
 <%--									<td>--%>
-<%--										<input id="boxNum" style="border: 0px;width: 100%;background-color: rgba(255,255,255,0);" type="text" class="form-control layui-input boxNum" value=""/>--%>
-<%--										<span class="node" style="display: none;color: red;"></span>--%>
+<%--											${project.projectReportNumber}--%>
 <%--									</td>--%>
+<%--&lt;%&ndash;									<td>&ndash;%&gt;--%>
+<%--&lt;%&ndash;										<input id="boxNum" style="border: 0px;width: 100%;background-color: rgba(255,255,255,0);" type="text" class="form-control layui-input boxNum" value=""/>&ndash;%&gt;--%>
+<%--&lt;%&ndash;										<span class="node" style="display: none;color: red;"></span>&ndash;%&gt;--%>
+<%--&lt;%&ndash;									</td>&ndash;%&gt;--%>
+<%--&lt;%&ndash;									<td>&ndash;%&gt;--%>
+<%--&lt;%&ndash;										<input  id="reboxNum"  style="border: 0px;width: 100%;background-color: rgba(255,255,255,0);" type="text" class="form-control layui-input reBoxNum" value=""/>&ndash;%&gt;--%>
+<%--&lt;%&ndash;										<span class="reNode" style="display: none;color: red;"></span>&ndash;%&gt;--%>
+<%--&lt;%&ndash;									</td>&ndash;%&gt;--%>
 <%--									<td>--%>
-<%--										<input  id="reboxNum"  style="border: 0px;width: 100%;background-color: rgba(255,255,255,0);" type="text" class="form-control layui-input reBoxNum" value=""/>--%>
-<%--										<span class="reNode" style="display: none;color: red;"></span>--%>
+<%--										<span class="op-btn op-btn-delete" onclick="delEntrustRow(this)" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>--%>
+<%--&lt;%&ndash;										<input type="hidden" id="getProId" value="${project.id}"/>&ndash;%&gt;--%>
+<%--&lt;%&ndash;										<select id="projectPass" style="border: 0px;width:100%;text-align: center;background-color: rgba(255,255,255,0);" class="form-control editable-select layui-input" readonly="true">&ndash;%&gt;--%>
+<%--&lt;%&ndash;											<option style="text-align: center" value="5">通过</option>&ndash;%&gt;--%>
+<%--&lt;%&ndash;											<option style="text-align: center" value="4">驳回</option>&ndash;%&gt;--%>
+<%--&lt;%&ndash;										</select>&ndash;%&gt;--%>
 <%--									</td>--%>
-									<td>
-										<span class="op-btn op-btn-delete" onclick="delEntrustRow(this)" title="删除"><i class="glyphicon glyphicon-remove"></i>&nbsp;删除</span>
-<%--										<input type="hidden" id="getProId" value="${project.id}"/>--%>
-<%--										<select id="projectPass" style="border: 0px;width:100%;text-align: center;background-color: rgba(255,255,255,0);" class="form-control editable-select layui-input" readonly="true">--%>
-<%--											<option style="text-align: center" value="5">通过</option>--%>
-<%--											<option style="text-align: center" value="4">驳回</option>--%>
-<%--										</select>--%>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:when>
-						<c:otherwise>
-							<tr>
-								<td colspan="7">
-									暂无数据
-								</td>
-							</tr>
-						</c:otherwise>
-					</c:choose>
+<%--								</tr>--%>
+<%--							</c:forEach>--%>
+<%--						</c:when>--%>
+<%--						<c:otherwise>--%>
+<%--							<tr>--%>
+<%--								<td colspan="7">--%>
+<%--									暂无数据--%>
+<%--								</td>--%>
+<%--							</tr>--%>
+<%--						</c:otherwise>--%>
+<%--					</c:choose>--%>
 					</tbody>
 				</table>
 			</div>

+ 82 - 39
src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordModifyApply.jsp

@@ -4,7 +4,22 @@
 <head>
 	<title>合同归档管理</title>
 	<meta name="decorator" content="default"/>
+	<link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
+
 	<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").attr("class","treeTable-icon")
+			},function () {
+				$(tiao).show();
+				$(span).find("span").attr("class","treeTable-icon open")
+			});
+		}
         var validateForm;
         function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
@@ -314,32 +329,41 @@
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<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_attachment">
 						<c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr>
+							<tr id="file_attachment_${fileAttachment.id}_tr" onclick="listTr(this)">
 								<td style="display:none">${fileAttachment.id}</td>
 								<td style="display:none">${fileAttachment.mustFlag}</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><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>${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}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
 							</tr>
+							<c:forEach items="${fileAttachment.workAttachments}" var = "workAttachment" varStatus="status">
+								<tr class="file_attachment_${fileAttachment.id}_tr">
+									<td></td>
+									<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" >
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+												<%--											<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>
@@ -364,33 +388,43 @@
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<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>
+							<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>
-								<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><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>${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}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
 							</tr>
+							<c:forEach items="${fileGistdata.workAttachments}" var = "workAttachment" varStatus="status">
+								<tr class="file_gistdata_${fileGistdata.id}_tr">
+									<td></td>
+									<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" >
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+												<%--											<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>
@@ -415,33 +449,42 @@
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<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>
+							<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>
-								<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><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>${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}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
 							</tr>
+							<c:forEach items="${fileOther.workAttachments}" var = "workAttachment" varStatus="status">
+								<tr class="file_other_${fileOther.id}_tr">
+									<td></td>
+									<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" >
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+												<%--											<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>

+ 88 - 53
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordModify.jsp

@@ -24,6 +24,19 @@
 		}
 	</style>
 	<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").attr("class","treeTable-icon")
+			},function () {
+				$(tiao).show();
+				$(span).find("span").attr("class","treeTable-icon open")
+			});
+		}
         var validateForm;
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
@@ -323,9 +336,9 @@
 
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>成果文件</h2></div>
-				<div class="layui-item nav-btns">
-					<a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=11&projectType=2&projectId=${project.id}&reviewFee=${projectReportRecord.report.reviewFee}','500px','350px',false,'inputForm','file_attachment')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>
-				</div>
+<%--				<div class="layui-item nav-btns">--%>
+<%--					<a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=11&projectType=2&projectId=${project.id}&reviewFee=${projectReportRecord.report.reviewFee}','500px','350px',false,'inputForm','file_attachment')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>--%>
+<%--				</div>--%>
 				<div id="addFile_attachment" style="display: none" class="upload-progress">
 					<span id="fileName_attachment" ></span>
 					<span id="_attachment" ></span>
@@ -342,39 +355,46 @@
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<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_attachment">
 						<c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr>
+							<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><span style="color: red">* </span>${fileAttachment.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span><span style="color: red">* </span>${fileAttachment.attachName}</td>
 									</c:when>
 									<c:otherwise>
-										<td>${fileAttachment.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>${fileAttachment.attachName}</td>
 									</c:otherwise>
 								</c:choose>
-								<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>${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}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
 							</tr>
+							<c:forEach items="${fileAttachment.workAttachments}" var = "workAttachment" varStatus="status">
+								<tr class="file_attachment_${fileAttachment.id}_tr">
+									<td></td>
+									<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" >
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+												<%--											<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>
@@ -410,10 +430,10 @@
 
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>依据性资料</h2></div>
-				<div class="layui-item nav-btns">
-						<%--<a id="gistdata_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>--%>
-					<a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=12&projectType=2&projectId=${project.id}&reviewFee=${projectReportRecord.report.reviewFee}','500px','350px',false,'inputForm','file_gistdata')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>
-				</div>
+<%--				<div class="layui-item nav-btns">--%>
+<%--						&lt;%&ndash;<a id="gistdata_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>&ndash;%&gt;--%>
+<%--					<a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=12&projectType=2&projectId=${project.id}&reviewFee=${projectReportRecord.report.reviewFee}','500px','350px',false,'inputForm','file_gistdata')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>--%>
+<%--				</div>--%>
 				<div id="addFile_gistdata" style="display: none" class="upload-progress">
 					<span id="fileName_gistdata" ></span>
 					<span id="_gistdata" ></span>
@@ -430,40 +450,48 @@
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
+							<th width="40%">电子件名称</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>
+							<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><span style="color: red">* </span>${fileGistdata.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span><span style="color: red">* </span>${fileGistdata.attachName}</td>
 									</c:when>
 									<c:otherwise>
-										<td>${fileGistdata.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>${fileGistdata.attachName}</td>
 									</c:otherwise>
 								</c:choose>
-								<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>${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}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
 							</tr>
+							<c:forEach items="${fileGistdata.workAttachments}" var = "workAttachment" varStatus="status">
+								<tr class="file_gistdata_${fileGistdata.id}_tr">
+									<td></td>
+									<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" >
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+												<%--											<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>
@@ -499,10 +527,10 @@
 
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>其他文件</h2></div>
-				<div class="layui-item nav-btns">
-						<%--<a id="other_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>--%>
-					<a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=13&projectType=2&projectId=${project.id}&reviewFee=${projectReportRecord.report.reviewFee}','500px','350px',false,'inputForm','file_other')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>
-				</div>
+<%--				<div class="layui-item nav-btns">--%>
+<%--						&lt;%&ndash;<a id="other_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>&ndash;%&gt;--%>
+<%--					<a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=13&projectType=2&projectId=${project.id}&reviewFee=${projectReportRecord.report.reviewFee}','500px','350px',false,'inputForm','file_other')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>--%>
+<%--				</div>--%>
 				<div id="addFile_other" style="display: none" class="upload-progress">
 					<span id="fileName_other" ></span>
 					<span id="_other" ></span>
@@ -519,40 +547,47 @@
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
+							<th width="40%">电子件名称</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>
+							<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><span style="color: red">* </span>${fileOther.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span><span style="color: red">* </span>${fileOther.attachName}</td>
 									</c:when>
 									<c:otherwise>
-										<td>${fileOther.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>${fileOther.attachName}</td>
 									</c:otherwise>
 								</c:choose>
-								<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>${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}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
 							</tr>
+							<c:forEach items="${fileOther.workAttachments}" var = "workAttachment" varStatus="status">
+								<tr class="addFile_other_${fileOther.id}_tr">
+									<td></td>
+									<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" >
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+												<%--											<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>

+ 76 - 41
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/reportForm.jsp

@@ -4,6 +4,7 @@
 <head>
 	<title>造价审核新增报告管理</title>
 	<meta name="decorator" content="default"/>
+	<link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
 	<style>
 		label.error{
 			top:40px;
@@ -11,6 +12,19 @@
 		}
 	</style>
 	<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").attr("class","treeTable-icon")
+			},function () {
+				$(tiao).show();
+				$(span).find("span").attr("class","treeTable-icon open")
+			});
+		}
         var validateForm;
         var dataList;
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
@@ -887,39 +901,46 @@
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-									<th>电子件名称</th>
-									<th width="100px">最大容量(M)</th>
+									<th width="40%">电子件名称</th>
+<%--									<th width="100px">最大容量(M)</th>--%>
 							<th width="18%">类型限制</th>
-									<th>文件名</th>
+<%--									<th>文件名</th>--%>
 							<th width="150px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_attachment">
 						<c:forEach items="${projectcontentinfo.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr>
+							<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><span style="color: red">* </span>${fileAttachment.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span><span style="color: red">* </span>${fileAttachment.attachName}</td>
 									</c:when>
 									<c:otherwise>
-										<td>${fileAttachment.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>${fileAttachment.attachName}</td>
 									</c:otherwise>
 								</c:choose>
-								<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>${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=${projectRecords.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
 							</tr>
+							<c:forEach items="${fileAttachment.workAttachments}" var = "workAttachment" varStatus="status">
+								<tr class="file_attachment_${fileAttachment.id}_tr">
+									<td></td>
+									<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" >
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+												<%--											<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>
@@ -975,40 +996,47 @@
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-									<th>电子件名称</th>
-									<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-									<th>文件名</th>
+									<th width="40%">电子件名称</th>
+<%--									<th width="100px">最大容量(M)</th>--%>
+							<th >类型限制</th>
+<%--									<th>文件名</th>--%>
 							<th width="150px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_gistdata">
 						<c:forEach items="${projectcontentinfo.fileGistdataList}" var = "fileGistdata" varStatus="status">
-							<tr>
+							<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><span style="color: red">* </span>${fileGistdata.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span><span style="color: red">* </span>${fileGistdata.attachName}</td>
 									</c:when>
 									<c:otherwise>
-										<td>${fileGistdata.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>${fileGistdata.attachName}</td>
 									</c:otherwise>
 								</c:choose>
-								<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>${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=${projectRecords.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
 							</tr>
+							<c:forEach items="${fileGistdata.workAttachments}" var = "workAttachment" varStatus="status">
+								<tr class="file_gistdata_${fileGistdata.id}_tr">
+									<td></td>
+									<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" >
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+												<%--											<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>
@@ -1064,40 +1092,47 @@
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-									<th>电子件名称</th>
-									<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-									<th>文件名</th>
+									<th width="40%">电子件名称</th>
+<%--									<th width="100px">最大容量(M)</th>--%>
+							<th >类型限制</th>
+<%--									<th>文件名</th>--%>
 							<th width="150px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_other">
 						<c:forEach items="${projectcontentinfo.fileOtherList}" var = "fileOther" varStatus="status">
-							<tr>
+							<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><span style="color: red">* </span>${fileOther.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span><span style="color: red">* </span>${fileOther.attachName}</td>
 									</c:when>
 									<c:otherwise>
-										<td>${fileOther.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>${fileOther.attachName}</td>
 									</c:otherwise>
 								</c:choose>
-								<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>${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=${projectRecords.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
 							</tr>
+							<c:forEach items="${fileOther.workAttachments}" var = "workAttachment" varStatus="status">
+								<tr class="file_other_${fileOther.id}_tr">
+									<td></td>
+									<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" >
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+												<%--											<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>

+ 91 - 56
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/reportModify.jsp

@@ -4,6 +4,7 @@
 <head>
 	<title>报告详情管理</title>
 	<meta name="decorator" content="default"/>
+	<link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
 	<style>
 		label.error{
 			top:40px;
@@ -11,6 +12,19 @@
 		}
 	</style>
 	<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").attr("class","treeTable-icon")
+			},function () {
+				$(tiao).show();
+				$(span).find("span").attr("class","treeTable-icon open")
+			});
+		}
         var validateForm;
         var dataList;
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
@@ -810,10 +824,10 @@
 
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>成果文件</h2></div>
-				<div class="layui-item nav-btns">
-					<%--<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>--%>
-						<a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=11&projectType=2&projectId=${projectId}&reviewFee='+$('#reviewFee').val(),'500px','350px',false,'inputForm','file_attachment')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>
-				</div>
+<%--				<div class="layui-item nav-btns">--%>
+<%--					&lt;%&ndash;<a id="attachment_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>&ndash;%&gt;--%>
+<%--						<a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=11&projectType=2&projectId=${projectId}&reviewFee='+$('#reviewFee').val(),'500px','350px',false,'inputForm','file_attachment')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>--%>
+<%--				</div>--%>
 				<div id="addFile_attachment" style="display: none" class="upload-progress">
 					<span id="fileName_attachment" ></span>
 					<span id="_attachment" ></span>
@@ -830,40 +844,47 @@
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
+							<th width="40%">电子件名称</th>
+<%--							<th width="100px">最大容量(M)</th>--%>
+							<th>类型限制</th>
+<%--							<th>文件名</th>--%>
 							<th width="150px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_attachment">
 						<c:forEach items="${projectcontentinfo.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr>
+							<tr id="file_attachment_${fileAttachment.id}_tr" onclick="listTr(this)">
 									<%-- <td>${status.index + 1}</td>--%>
 								<td style="display:none">${fileAttachment.id}</td>
 								<td style="display:none">${fileAttachment.mustFlag}</td>
 								<c:choose>
 									<c:when test="${fileAttachment.mustFlag == 1}">
-										<td><span style="color: red">* </span>${fileAttachment.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span><span style="color: red">* </span>${fileAttachment.attachName}</td>
 									</c:when>
 									<c:otherwise>
-										<td>${fileAttachment.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>${fileAttachment.attachName}</td>
 									</c:otherwise>
 								</c:choose>
-								<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>${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=${projectId}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${projectId}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
 							</tr>
+							<c:forEach items="${fileAttachment.workAttachments}" var = "workAttachment" varStatus="status">
+								<tr class="file_attachment_${fileAttachment.id}_tr">
+									<td></td>
+									<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" >
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+												<%--											<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>
@@ -899,10 +920,10 @@
 
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>依据性资料</h2></div>
-				<div class="layui-item nav-btns">
-					<%--<a id="gistdata_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>--%>
-						<a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=12&projectType=2&projectId=${projectId}&reviewFee='+$('#reviewFee').val(),'500px','350px',false,'inputForm','file_gistdata')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>
-				</div>
+<%--				<div class="layui-item nav-btns">--%>
+<%--					&lt;%&ndash;<a id="gistdata_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>&ndash;%&gt;--%>
+<%--						<a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=12&projectType=2&projectId=${projectId}&reviewFee='+$('#reviewFee').val(),'500px','350px',false,'inputForm','file_gistdata')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>--%>
+<%--				</div>--%>
 				<div id="addFile_gistdata" style="display: none" class="upload-progress">
 					<span id="fileName_gistdata" ></span>
 					<span id="_gistdata" ></span>
@@ -919,40 +940,47 @@
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
+							<th width="40%">电子件名称</th>
+<%--							<th width="100px">最大容量(M)</th>--%>
+							<th>类型限制</th>
+<%--							<th>文件名</th>--%>
 							<th width="150px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_gistdata">
 						<c:forEach items="${projectcontentinfo.fileGistdataList}" var = "fileGistdata" varStatus="status">
-							<tr>
+								<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="${fileOther.mustFlag == 1}">
-										<td><span style="color: red">* </span>${fileGistdata.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span><span style="color: red">* </span>${fileGistdata.attachName}</td>
 									</c:when>
 									<c:otherwise>
-										<td>${fileGistdata.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>${fileGistdata.attachName}</td>
 									</c:otherwise>
 								</c:choose>
-								<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>${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=${projectId}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${projectId}','70%','80%',false,'inputForm','gistdata_upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
 							</tr>
+							<c:forEach items="${fileGistdata.workAttachments}" var = "workAttachment" varStatus="status">
+								<tr class="file_gistdata_${fileGistdata.id}_tr">
+									<td></td>
+									<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" >
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+												<%--											<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>
@@ -988,10 +1016,10 @@
 
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>其他文件</h2></div>
-				<div class="layui-item nav-btns">
-					<%--<a id="other_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>--%>
-						<a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=13&projectType=2&projectId=${projectId}&reviewFee='+$('#reviewFee').val(),'500px','350px',false,'inputForm','file_other')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>
-				</div>
+<%--				<div class="layui-item nav-btns">--%>
+<%--					&lt;%&ndash;<a id="other_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>&ndash;%&gt;--%>
+<%--						<a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=13&projectType=2&projectId=${projectId}&reviewFee='+$('#reviewFee').val(),'500px','350px',false,'inputForm','file_other',this)" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>--%>
+<%--				</div>--%>
 				<div id="addFile_other" style="display: none" class="upload-progress">
 					<span id="fileName_other" ></span>
 					<span id="_other" ></span>
@@ -1008,40 +1036,47 @@
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
+							<th width="40%">电子件名称</th>
+<%--							<th width="100px">最大容量(M)</th>--%>
+							<th>类型限制</th>
+<%--							<th>文件名</th>--%>
 							<th width="150px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_other">
 						<c:forEach items="${projectcontentinfo.fileOtherList}" var = "fileOther" varStatus="status">
-							<tr>
+							<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><span style="color: red">* </span>${fileOther.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span><span style="color: red">* </span>${fileOther.attachName}</td>
 									</c:when>
 									<c:otherwise>
-										<td>${fileOther.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>${fileOther.attachName}</td>
 									</c:otherwise>
 								</c:choose>
-								<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>${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=${projectId}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
 							</tr>
+							<c:forEach items="${fileOther.workAttachments}" var = "workAttachment" varStatus="status">
+								<tr class="file_other_${fileOther.id}_tr">
+									<td></td>
+									<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" >
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+												<%--											<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>

+ 92 - 64
src/main/webapp/webpage/modules/ruralprojectrecords/projectReportRecord/projectReportRecordForm.jsp

@@ -158,6 +158,19 @@
             $("#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").attr("class","treeTable-icon")
+			},function () {
+				$(tiao).show();
+				$(span).find("span").attr("class","treeTable-icon open")
+			});
+		}
 	</script>
 </head>
 <body>
@@ -291,9 +304,9 @@
 
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>成果文件</h2></div>
-				<div class="layui-item nav-btns">
-					<a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=11&projectType=1&projectId=${project.id}&reviewFee=${projectReportRecord.report.reviewFee}','500px','350px',false,'inputForm','file_attachment')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>
-				</div>
+<%--				<div class="layui-item nav-btns">--%>
+<%--					<a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=11&projectType=1&projectId=${project.id}&reviewFee=${projectReportRecord.report.reviewFee}','500px','350px',false,'inputForm','file_attachment')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>--%>
+<%--				</div>--%>
 				<div id="addFile_attachment" style="display: none" class="upload-progress">
 					<span id="fileName_attachment" ></span>
 					<span id="_attachment" ></span>
@@ -310,39 +323,46 @@
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<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_attachment">
 						<c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr>
+							<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><span style="color: red">* </span>${fileAttachment.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span><span style="color: red">* </span>${fileAttachment.attachName}</td>
 									</c:when>
 									<c:otherwise>
-										<td>${fileAttachment.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>${fileAttachment.attachName}</td>
 									</c:otherwise>
 								</c:choose>
-								<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>${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}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
 							</tr>
+							<c:forEach items="${fileAttachment.workAttachments}" var = "workAttachment" varStatus="status">
+								<tr class="file_attachment_${fileAttachment.id}_tr">
+									<td></td>
+									<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" >
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+												<%--											<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>
@@ -357,16 +377,10 @@
                         0
                     </td>
                     <td style="text-align:center;">
-                        {{row.attachName}}
+                        <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}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
+                        {{row.attachLength}}M;{{row.attachTypes}}
                     </td>
 					<td class="op-td">
 						<div class="op-btn-box" >
@@ -378,10 +392,10 @@
 
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>依据性资料</h2></div>
-				<div class="layui-item nav-btns">
-						<%--<a id="gistdata_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>--%>
-					<a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=12&projectType=1&projectId=${project.id}&reviewFee=${projectReportRecord.report.reviewFee}','500px','350px',false,'inputForm','file_gistdata')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>
-				</div>
+<%--				<div class="layui-item nav-btns">--%>
+<%--						&lt;%&ndash;<a id="gistdata_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>&ndash;%&gt;--%>
+<%--					<a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=12&projectType=1&projectId=${project.id}&reviewFee=${projectReportRecord.report.reviewFee}','500px','350px',false,'inputForm','file_gistdata')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>--%>
+<%--				</div>--%>
 				<div id="addFile_gistdata" style="display: none" class="upload-progress">
 					<span id="fileName_gistdata" ></span>
 					<span id="_gistdata" ></span>
@@ -398,40 +412,48 @@
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<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>
+							<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><span style="color: red">* </span>${fileGistdata.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span><span style="color: red">* </span>${fileGistdata.attachName}</td>
 									</c:when>
 									<c:otherwise>
-										<td>${fileGistdata.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>${fileGistdata.attachName}</td>
 									</c:otherwise>
 								</c:choose>
-								<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></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}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
 							</tr>
+							<c:forEach items="${fileAttachment.workAttachments}" var = "workAttachment" varStatus="status">
+								<tr class="file_gistdata_${fileGistdata.id}_tr">
+									<td></td>
+									<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" >
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+												<%--											<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>
@@ -446,16 +468,10 @@
                         0
                     </td>
                     <td style="text-align:center;">
-                        {{row.attachName}}
+                        <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}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
+                        {{row.attachLength}}M;{{row.attachTypes}}
                     </td>
 					<td class="op-td">
 						<div class="op-btn-box" >
@@ -467,10 +483,10 @@
 
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>其他文件</h2></div>
-				<div class="layui-item nav-btns">
-						<%--<a id="other_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>--%>
-					<a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=13&projectType=1&projectId=${project.id}&reviewFee=${projectReportRecord.report.reviewFee}','500px','350px',false,'inputForm','file_other')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>
-				</div>
+<%--				<div class="layui-item nav-btns">--%>
+<%--						&lt;%&ndash;<a id="other_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>&ndash;%&gt;--%>
+<%--					<a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=13&projectType=1&projectId=${project.id}&reviewFee=${projectReportRecord.report.reviewFee}','500px','350px',false,'inputForm','file_other')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>--%>
+<%--				</div>--%>
 				<div id="addFile_other" style="display: none" class="upload-progress">
 					<span id="fileName_other" ></span>
 					<span id="_other" ></span>
@@ -487,29 +503,28 @@
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
+							<th width="40%">电子件名称</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>
+							<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><span style="color: red">* </span>${fileOther.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span><span style="color: red">* </span>${fileOther.attachName}</td>
 									</c:when>
 									<c:otherwise>
-										<td>${fileOther.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>${fileOther.attachName}</td>
 									</c:otherwise>
 								</c:choose>
-								<td>${fileOther.attachLength}</td>
-								<td>${fileOther.attachTypes}</td>
+								<td>${fileOther.attachLength}M;${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>
@@ -521,6 +536,19 @@
 									</div>
 								</td>
 							</tr>
+							<c:forEach items="${fileAttachment.workAttachments}" var = "workAttachment" varStatus="status">
+								<tr class="file_gistdata_${fileOther.id}_tr">
+									<td></td>
+									<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" >
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+												<%--											<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>

+ 120 - 81
src/main/webapp/webpage/modules/ruralprojectrecords/projectReportRecord/projectReportRecordModify.jsp

@@ -322,9 +322,9 @@
 
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>成果文件</h2></div>
-				<div class="layui-item nav-btns">
-					<a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=11&projectType=1&projectId=${project.id}&reviewFee=${projectReportRecord.report.reviewFee}','500px','350px',false,'inputForm','file_attachment')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>
-				</div>
+<%--				<div class="layui-item nav-btns">--%>
+<%--					<a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=11&projectType=1&projectId=${project.id}&reviewFee=${projectReportRecord.report.reviewFee}','500px','350px',false,'inputForm','file_attachment')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>--%>
+<%--				</div>--%>
 				<div id="addFile_attachment" style="display: none" class="upload-progress">
 					<span id="fileName_attachment" ></span>
 					<span id="_attachment" ></span>
@@ -341,39 +341,47 @@
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<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>
+							<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><span style="color: red">* </span>${fileAttachment.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span><span style="color: red">* </span>${fileAttachment.attachName}</td>
 									</c:when>
 									<c:otherwise>
-										<td>${fileAttachment.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>${fileAttachment.attachName}</td>
 									</c:otherwise>
 								</c:choose>
-								<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>${fileAttachment.attachLength}M;${fileAttachment.attachTypes}</td>
+<%--								<td></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}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										<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 items="${fileAttachment.workAttachments}" var = "workAttachment" varStatus="status">
+								<tr class="file_attachment_${fileAttachment.id}_tr">
+									<td></td>
+									<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" >
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+<%--											<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>
@@ -388,16 +396,10 @@
                         0
                     </td>
                     <td style="text-align:center;">
-                        {{row.attachName}}
+                       <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}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
+                        {{row.attachLength}}M;{{row.attachTypes}}
                     </td>
 					<td class="op-td">
 						<div class="op-btn-box" >
@@ -409,10 +411,10 @@
 
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>依据性资料</h2></div>
-				<div class="layui-item nav-btns">
-						<%--<a id="gistdata_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>--%>
-					<a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=12&projectType=1&projectId=${project.id}&reviewFee=${projectReportRecord.report.reviewFee}','500px','350px',false,'inputForm','file_gistdata')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>
-				</div>
+<%--				<div class="layui-item nav-btns">--%>
+<%--						&lt;%&ndash;<a id="gistdata_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>&ndash;%&gt;--%>
+<%--					<a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=12&projectType=1&projectId=${project.id}&reviewFee=${projectReportRecord.report.reviewFee}','500px','350px',false,'inputForm','file_gistdata')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>--%>
+<%--				</div>--%>
 				<div id="addFile_gistdata" style="display: none" class="upload-progress">
 					<span id="fileName_gistdata" ></span>
 					<span id="_gistdata" ></span>
@@ -429,40 +431,47 @@
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<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>
+							<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><span style="color: red">* </span>${fileGistdata.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span><span style="color: red">* </span>${fileGistdata.attachName}</td>
 									</c:when>
 									<c:otherwise>
-										<td>${fileGistdata.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>${fileGistdata.attachName}</td>
 									</c:otherwise>
 								</c:choose>
-								<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>${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}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
 							</tr>
+							<c:forEach items="${fileGistdata.workAttachments}" var = "workAttachment" varStatus="status">
+								<tr class="file_gistdata_${fileGistdata.id}_tr">
+									<td></td>
+									<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" >
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+<%--											<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>
@@ -477,16 +486,10 @@
                         0
                     </td>
                     <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
+                        <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.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
+                        {{row.attachLength}}M;{{row.attachTypes}}
                     </td>
 					<td class="op-td">
 						<div class="op-btn-box" >
@@ -498,10 +501,10 @@
 
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>其他文件</h2></div>
-				<div class="layui-item nav-btns">
-						<%--<a id="other_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>--%>
-					<a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=13&projectType=1&projectId=${project.id}&reviewFee=${projectReportRecord.report.reviewFee}','500px','350px',false,'inputForm','file_other')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>
-				</div>
+<%--				<div class="layui-item nav-btns">--%>
+<%--						&lt;%&ndash;<a id="other_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>&ndash;%&gt;--%>
+<%--					<a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=13&projectType=1&projectId=${project.id}&reviewFee=${projectReportRecord.report.reviewFee}','500px','350px',false,'inputForm','file_other')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>--%>
+<%--				</div>--%>
 				<div id="addFile_other" style="display: none" class="upload-progress">
 					<span id="fileName_other" ></span>
 					<span id="_other" ></span>
@@ -518,40 +521,49 @@
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<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_other">
 						<c:forEach items="${projectReportRecord.fileOtherList}" var = "fileOther" varStatus="status">
-							<tr>
+							<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><span style="color: red">* </span>${fileOther.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span><span style="color: red">* </span>${fileOther.attachName}</td>
 									</c:when>
 									<c:otherwise>
-										<td>${fileOther.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>${fileOther.attachName}</td>
 									</c:otherwise>
 								</c:choose>
-								<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></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}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
 							</tr>
+							<c:forEach items="${fileOther.workAttachments}" var = "workAttachment" varStatus="status">
+								<tr class="file_other_${fileOther.id}_tr">
+									<td></td>
+									<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" >
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+<%--											<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>
@@ -566,17 +578,12 @@
                         0
                     </td>
                     <td style="text-align:center;">
-                        {{row.attachName}}
+                       <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}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
+                        {{row.attachLength}}M;{{row.attachTypes}}
                     </td>
+                    <td style
 					<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>
@@ -675,8 +682,11 @@
 <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){
+	function openBill2(title,url,width,height,target,formId,tableId,obj){
 		var rows = $(this).parent().prevAll().length + 1;
+		var tbody="#"+$(obj).parent().parent().parent().parent().attr("id");
+		var trname=$(obj).parent().parent().parent().attr("id");
+		var filetr="."+$(obj).parent().parent().parent().attr("id");
 		var frameIndex = parent.layer.getFrameIndex(window.name);
 		var urls = url+"&index="+frameIndex;
 		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
@@ -706,7 +716,24 @@
 				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
 				inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
 				var $document = iframeWin.contentWindow.document;
-
+				var files=iframeWin.contentWindow.showfile()
+				var xias=iframeWin.contentWindow.showfileXia()
+				// if(files.length!=0){
+				// 	// var name=filetr
+				// 	$(filetr).remove();
+				// 	for (var i=0;i<files.length;i++){
+				// 		$(tbody).append(
+				// 				"<tr class='"+trname+"'>" +
+				// 				"<td></td>" +
+				// 				"<td>" +
+				// 				files[i]+
+				// 				"</td>" +
+				// 				"<td>" +
+				// 				"</td>" +
+				// 				"</tr>"
+				// 	)
+				// 	}
+				// }
 				formSubmit2($document,formId,index,tableId);
 
 			},
@@ -938,7 +965,19 @@
 		})
 		return;
 	}
-
+	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").attr("class","treeTable-icon")
+		},function () {
+			$(tiao).show();
+			$(span).find("span").attr("class","treeTable-icon open")
+		});
+	}
 	function confirmDelete(mess, href){
 		top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
 			//do something

+ 83 - 44
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageModify.jsp

@@ -4,7 +4,21 @@
 <head>
     <title>项目审批管理</title>
     <meta name="decorator" content="default"/>
+    <link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
     <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").attr("class","treeTable-icon")
+            },function () {
+                $(tiao).show();
+                $(span).find("span").attr("class","treeTable-icon open")
+            });
+        }
         var validateForm;
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
@@ -630,32 +644,40 @@
                     <table id="upTable" class="table table-bordered table-condensed details">
                         <thead>
                         <tr>
-                            <th>电子件名称</th>
-                            <th width="100px">最大容量(M)</th>
-                            <th width="18%">类型限制</th>
-                            <th>文件名</th>
+                            <th width="40%">电子件名称</th>
+<%--                            <th width="100px">最大容量(M)</th>--%>
+                            <th >类型限制</th>
+<%--                            <th>文件名</th>--%>
                             <th width="150px">操作</th>
                         </tr>
                         </thead>
                         <tbody id="file_attachment">
                         <c:forEach items="${projectcontentinfo.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-                                <tr>
+                                <tr id="file_attachment_${fileAttachment.id}_tr" onclick="listTr(this)">
                                     <td style="display:none">${fileAttachment.id}</td>
                                     <td style="display:none">${fileAttachment.mustFlag}</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><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>${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=${projectcontentinfo.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 items="${fileAttachment.workAttachments}" var = "workAttachment" varStatus="status">
+                                <tr class="file_attachment_${fileAttachment.id}_tr">
+                                    <td></td>
+                                    <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" >
-                                            <a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${projectcontentinfo.project.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+                                            <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+                                                <%--											<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>
+<%--                                <a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>--%>
+                            </c:forEach>
                         </c:forEach>
                         </tbody>
                     </table>
@@ -677,33 +699,41 @@
                 <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 width="100px">最大容量(M)</th>
-                            <th width="18%">类型限制</th>
-                            <th>文件名</th>
+                        <tr >
+                            <th width="40%">电子件名称</th>
+<%--                            <th width="100px">最大容量(M)</th>--%>
+                            <th >类型限制</th>
+<%--                            <th>文件名</th>--%>
                             <th width="150px">操作</th>
                         </tr>
                         </thead>
                         <tbody id="file_gistdata">
                         <c:forEach items="${projectcontentinfo.fileGistdataList}" var = "fileGistdata" varStatus="status">
-                                <tr>
+                                <tr id="file_gistdata_${fileGistdata.id}_tr" onclick="listTr(this)">
                                     <td style="display:none">${fileGistdata.id}</td>
                                     <td style="display:none">${fileGistdata.mustFlag}</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><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>${fileGistdata.attachName}</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=${projectcontentinfo.project.id}','70%','80%',false,'inputForm','gistdata_upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+                                        </div>
                                     </td>
+                                </tr>
+                            <c:forEach items="${fileGistdata.workAttachments}" var = "workAttachment" varStatus="status">
+                                <tr class="file_gistdata_${fileGistdata.id}_tr">
+                                    <td></td>
+                                    <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" >
-                                            <a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${projectcontentinfo.project.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+                                            <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+                                                <%--											<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>
+<%--                                <a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>--%>
+                            </c:forEach>
                         </c:forEach>
                         </tbody>
                     </table>
@@ -726,32 +756,40 @@
                     <table id="upTable_other" class="table table-bordered table-condensed details">
                         <thead>
                         <tr>
-                            <th>电子件名称</th>
-                            <th width="100px">最大容量(M)</th>
-                            <th width="18%">类型限制</th>
-                            <th>文件名</th>
+                            <th width="40%">电子件名称</th>
+<%--                            <th width="100px">最大容量(M)</th>--%>
+                            <th >类型限制</th>
+<%--                            <th>文件名</th>--%>
                             <th width="150px">操作</th>
                         </tr>
                         </thead>
                         <tbody id="file_other">
                         <c:forEach items="${projectcontentinfo.fileOtherList}" var = "fileOther" varStatus="status">
-                                <tr>
+                                <tr id="file_other_${fileOther.id}_tr" onclick="listTr(this)">
                                     <td style="display:none">${fileOther.id}</td>
                                     <td style="display:none">${fileOther.mustFlag}</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><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>${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=${projectcontentinfo.project.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+                                        <a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${projectcontentinfo.project.id}','70%','80%',false,'inputForm','upTable_other',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
                                     </div>
                                 </td>
                                 </tr>
+                            <c:forEach items="${fileOther.workAttachments}" var = "workAttachment" varStatus="status">
+                                <tr class="file_other_${fileOther.id}_tr">
+                                    <td></td>
+                                    <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" >
+                                            <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+                                                <%--											<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>
+<%--                                <a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>--%>
+                            </c:forEach>
                         </c:forEach>
                         </tbody>
                     </table>
@@ -782,7 +820,7 @@
     </div>
 </div>
 <script>
-    function openBill2(title,url,width,height,target,formId){
+    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;
@@ -814,14 +852,14 @@
                 inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
                 var $document = iframeWin.contentWindow.document;
 
-                formSubmit2($document,formId,index);
+                formSubmit2($document,formId,index,tableId);
 
             },
             cancel: function(index){
             }
         });
     }
-    function formSubmit2($document,inputForm,index){
+    function formSubmit2($document,inputForm,index,tableId){
 
         var validateForm = $($document.getElementById(inputForm)).validate({
             submitHandler: function(form){
@@ -846,6 +884,7 @@
                     if(d.str.length>0){
                         parent.layer.msg(d.str,{icon:1});
                     }
+                    $("#"+tableId).load(location.href + " #"+tableId);
                     //关闭当前页
                     top.layer.close(index)
                 }

+ 81 - 44
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/reportForm.jsp

@@ -4,6 +4,8 @@
 <head>
 	<title>报告详情管理</title>
 	<meta name="decorator" content="default"/>
+	<link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
+
 	<style>
 		label.error{
 			top:40px;
@@ -475,7 +477,19 @@
                 }
             })
         }
-
+		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").attr("class","treeTable-icon")
+			},function () {
+				$(tiao).show();
+				$(span).find("span").attr("class","treeTable-icon open")
+			});
+		}
 	</script>
 </head>
 <body>
@@ -886,40 +900,48 @@
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
+							<th width="40%">电子件名称</th>
+<%--							<th width="100px">最大容量(M)</th>--%>
+							<th >类型限制</th>
+<%--							<th>文件名</th>--%>
 							<th width="150px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_attachment">
 						<c:forEach items="${projectcontentinfo.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr>
+							<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><span style="color: red">* </span>${fileAttachment.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span><span style="color: red">* </span>${fileAttachment.attachName}</td>
 									</c:when>
 									<c:otherwise>
-										<td>${fileAttachment.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>${fileAttachment.attachName}</td>
 									</c:otherwise>
 								</c:choose>
 
-								<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>${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=${projectRecords.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
 							</tr>
+							<c:forEach items="${fileAttachment.workAttachments}" var = "workAttachment" varStatus="status">
+								<tr class="file_attachment_${fileAttachment.id}_tr">
+									<td></td>
+									<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" >
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+												<%--											<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>
@@ -974,42 +996,50 @@
 				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
 					<table id="gistdata_upTable" class="table table-bordered table-condensed details">
 						<thead>
-						<tr>
+						<tr >
 								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
+							<th width="40%">电子件名称</th>
+<%--							<th width="100px">最大容量(M)</th>--%>
+							<th >类型限制</th>
+<%--							<th>文件名</th>--%>
 							<th width="150px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_gistdata">
 						<c:forEach items="${projectcontentinfo.fileGistdataList}" var = "fileGistdata" varStatus="status">
-							<tr>
+							<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><span style="color: red">* </span>${fileGistdata.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span><span style="color: red">* </span>${fileGistdata.attachName}</td>
 									</c:when>
 									<c:otherwise>
-										<td>${fileGistdata.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>${fileGistdata.attachName}</td>
 									</c:otherwise>
 								</c:choose>
-								<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>${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=${projectRecords.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
 							</tr>
+							<c:forEach items="${fileGistdata.workAttachments}" var = "workAttachment" varStatus="status">
+								<tr class="file_gistdata_${fileGistdata.id}_tr">
+									<td></td>
+									<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" >
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+												<%--											<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>
@@ -1065,40 +1095,47 @@
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
+							<th width="40%">电子件名称</th>
+<%--							<th width="100px">最大容量(M)</th>--%>
+							<th >类型限制</th>
+<%--							<th>文件名</th>--%>
 							<th width="150px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_other">
 						<c:forEach items="${projectcontentinfo.fileOtherList}" var = "fileOther" varStatus="status">
-							<tr>
+							<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><span style="color: red">* </span>${fileOther.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span><span style="color: red">* </span>${fileOther.attachName}</td>
 									</c:when>
 									<c:otherwise>
-										<td>${fileOther.attachName}</td>
+										<td><span class='treeTable-icon open' style="padding-right: 15px; "><i class="layui-icon layui-icon-triangle-d"></i></span>${fileOther.attachName}</td>
 									</c:otherwise>
 								</c:choose>
-								<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>${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=${projectRecords.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
 									</div>
 								</td>
 							</tr>
+							<c:forEach items="${fileOther.workAttachments}" var = "workAttachment" varStatus="status">
+								<tr class="file_other_${fileOther.id}_tr">
+									<td></td>
+									<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" >
+											<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent(encodeURIComponent('${workAttachment.url}'));" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+
+												<%--											<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>