Forráskód Böngészése

项目上传文件树形

user5 4 éve
szülő
commit
4ec884fef1

+ 18 - 0
src/main/java/com/jeeplus/modules/projectAccessory/entity/ProjectTemplateInfo.java

@@ -32,6 +32,8 @@ public class ProjectTemplateInfo extends TreeEntity<ProjectTemplateInfo>{
 	private String attachId;
 	private Integer mustFlag;   //判断是否是必填项(1:必填,0:非必填)
 	private Integer requiredStage;   //必填阶段(1.上传报告,2.归档)
+	private Integer flag;
+	private String url;
 
 	public ProjectTemplateInfo() {
 		super();
@@ -169,4 +171,20 @@ public class ProjectTemplateInfo extends TreeEntity<ProjectTemplateInfo>{
 	public void setRequiredStage(Integer requiredStage) {
 		this.requiredStage = requiredStage;
 	}
+
+	public Integer getFlag() {
+		return flag;
+	}
+
+	public void setFlag(Integer flag) {
+		this.flag = flag;
+	}
+
+	public String getUrl() {
+		return url;
+	}
+
+	public void setUrl(String url) {
+		this.url = url;
+	}
 }

+ 38 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java

@@ -1857,4 +1857,42 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 	public void updateDate(RuralProjectRecords projectRecords){
 		dao.updateDate(projectRecords);
 	}
+
+	public void disposeData(RuralProjectcontentinfo ruralProjectcontentinfo){
+		List<ProjectTemplateInfo> fileAttachmentList = ruralProjectcontentinfo.getFileAttachmentList();
+		List<ProjectTemplateInfo> gistdataList = ruralProjectcontentinfo.getFileGistdataList();
+		List<ProjectTemplateInfo> otherAttachMentList = ruralProjectcontentinfo.getFileOtherList();
+		List<ProjectTemplateInfo> attachmentList = disposeDataAttachment(fileAttachmentList);
+		List<ProjectTemplateInfo> gistList = disposeDataAttachment(gistdataList);
+		List<ProjectTemplateInfo> otherList = disposeDataAttachment(otherAttachMentList);
+		ruralProjectcontentinfo.setFileAttachmentList(attachmentList);
+		ruralProjectcontentinfo.setFileGistdataList(gistList);
+		ruralProjectcontentinfo.setFileOtherList(otherList);
+	}
+
+	public List<ProjectTemplateInfo> disposeDataAttachment(List<ProjectTemplateInfo> fileAttachmentList){
+		List<ProjectTemplateInfo> list = Lists.newArrayList();
+		for (ProjectTemplateInfo info: fileAttachmentList) {
+			info.getParent().setId("0");
+			info.setParentIds("0,");
+			info.setFlag(0);
+			list.add(info);
+			//处理附件信息
+			for (WorkClientAttachment attachment: info.getWorkAttachments()) {
+				ProjectTemplateInfo attach = new ProjectTemplateInfo();
+				ProjectTemplateInfo parent = new ProjectTemplateInfo();
+				parent.setId(info.getId());
+				attach.setId(attachment.getId());
+				attach.setParent(parent);
+				attach.setMustFlag(0);
+				attach.setParentIds("0,"+info.getId()+",");
+				attach.setFlag(1);
+				attach.setAttachName(attachment.getAttachmentName());
+				attach.setUrl(attachment.getUrl());
+				attach.setAttachTypes(attachment.getType());
+				list.add(attach);
+			}
+		}
+		return list;
+	}
 }

+ 1 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectRecordsController.java

@@ -833,6 +833,7 @@ public class RuralCostProjectRecordsController extends BaseController {
 		if (projectRecords!=null&&StringUtils.isNotBlank(projectRecords.getId())) {
 			projectRecords = projectRecordsService.getQueryProjectUsers(projectRecords.getId());
 			RuralProjectcontentinfo ruralProjectcontentinfo = projectRecordsService.formAccessory(projectRecords);
+			projectRecordsService.disposeData(ruralProjectcontentinfo);
 			model.addAttribute("projectcontentinfo", ruralProjectcontentinfo);
 			model.addAttribute("projectRecords", projectRecords);
 		}else {

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

@@ -253,6 +253,8 @@ public class RuralProjectMessageController extends BaseController {
                 }
 
             }
+
+        projectRecordsService.disposeData(projectcontentinfo);
         /*}*/
         //查询总审人员信息
         List<User> auditUserList = userService.getAuditUserList();

+ 2 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectRecordsController.java

@@ -17,6 +17,7 @@ import com.jeeplus.common.web.BaseController;
 import com.jeeplus.modules.act.entity.Act;
 import com.jeeplus.modules.act.service.ActTaskService;
 import com.jeeplus.modules.act.utils.ActUtils;
+import com.jeeplus.modules.projectFilingBatch.entity.ProjectFilingBatch;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportRecord;
 import com.jeeplus.modules.projectcontentinfo.service.ProjectReportDataService;
@@ -919,6 +920,7 @@ public class RuralProjectRecordsController extends BaseController {
 		if (projectRecords!=null&&StringUtils.isNotBlank(projectRecords.getId())) {
 			projectRecords = projectRecordsService.getQueryProjectUsers(projectRecords.getId());
 			RuralProjectcontentinfo ruralProjectcontentinfo = projectRecordsService.formAccessory(projectRecords);
+			projectRecordsService.disposeData(ruralProjectcontentinfo);
 			model.addAttribute("projectcontentinfo", ruralProjectcontentinfo);
 			model.addAttribute("projectRecords", projectRecords);
 		}else {

+ 6 - 1
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -1868,7 +1868,9 @@ public class WorkProjectNotifyController extends BaseController {
 
 						}
 					//}
-
+					projectcontentinfo.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
+					projectcontentinfo.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
+					projectcontentinfo.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));
 					projectcontentinfo.setHome("home");
 					model.addAttribute("processInstanceId",projectReportData.getProcessInstanceId());
 					model.addAttribute("projectId", projectcontentinfo.getProject().getId());
@@ -2083,6 +2085,9 @@ public class WorkProjectNotifyController extends BaseController {
 						}
 					//}
 
+					projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileAttachmentList()));
+					projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileGistdataList()));
+					projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectReportRecord.getFileOtherList()));
 					model.addAttribute("projectReportRecord", projectReportRecord);
 					model.addAttribute("project", projectReportRecord.getReport().getProject());
 					if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {

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

@@ -5,6 +5,7 @@
 	<title>合同归档管理</title>
 	<meta name="decorator" content="default"/>
 	<link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
+	<%@include file="/webpage/include/treetable.jsp" %>
 	<script type="text/javascript">
         var validateForm;
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
@@ -37,6 +38,9 @@
             return false;
         }
         $(document).ready(function() {
+			$("#upTable").treeTable({expandLevel : 5},{ expandable: true });
+			$("#gistdata_upTable").treeTable({expandLevel : 5},{ expandable: true });
+			$("#upTable_other").treeTable({expandLevel : 5},{ expandable: true });
             validateForm = $("#inputForm").validate({
                 submitHandler: function(form){
                     loading('正在提交,请稍等...');
@@ -227,32 +231,52 @@
 				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
 				<span id="attachment_title"></span>
 				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed details">
+					<table id="upTable" class="table table-bordered table-hover list-table">
 						<thead>
 						<tr>
-								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
-							<th width="150px">操作</th>
+							<th width="40%">文件类型</th>
+							<th width="">文件名</th>
+							<th width="100px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_attachment">
 						<c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr>
-								<td style="display:none">${fileAttachment.id}</td>
-								<td>${fileAttachment.attachName}</td>
-								<td>${fileAttachment.attachLength}</td>
-								<td>${fileAttachment.attachTypes}</td>
-								<td>
-									<c:forEach items="${fileAttachment.workAttachments}" var = "workAttachment" varStatus="status">
-										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
-									</c:forEach>
+							<tr id="${fileAttachment.id}" pid="${fileAttachment.parent.id}">
+								<c:choose>
+									<c:when test="${fileAttachment.mustFlag == 1}">
+										<td><span style="color: red">* </span>${fileAttachment.attachName}</td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fileAttachment.flag == 0}">
+												<td>${fileAttachment.attachName}</td>
+											</c:when>
+											<c:otherwise>
+												<td></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td style="text-align:center;">
+									<c:choose>
+										<c:when test="${fileAttachment.flag == 0}">
+											${fileAttachment.attachLength}M;  ${fileAttachment.attachTypes}
+										</c:when>
+										<c:otherwise>
+											<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileAttachment.url}','90%','90%')">${fileAttachment.attachName} ; </a>
+										</c:otherwise>
+									</c:choose>
 								</td>
-								<td class="op-td">
+								<td class="op-td" style="text-align:center;">
 									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										<c:choose>
+											<c:when test="${fileAttachment.flag == 0}">
+												<a href="javascript:void(0)"  onclick="openBill3('编辑附件', '${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>
+											</c:when>
+											<c:otherwise>
+												<a href="javascript:void(0)"  onclick="openBill3('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.parent.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:otherwise>
+										</c:choose>
 									</div>
 								</td>
 							</tr>
@@ -279,35 +303,57 @@
 				<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
 				<span id="gistdata_title"></span>
 				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="gistdata_upTable" class="table table-bordered table-condensed details">
+					<table id="gistdata_upTable" class="table table-bordered table-hover list-table">
 						<thead>
 						<tr>
-								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
-							<th width="150px">操作</th>
+							<th width="40%">文件类型</th>
+							<th width="">文件名</th>
+							<th width="100px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_gistdata">
 						<c:forEach items="${projectReportRecord.fileGistdataList}" var = "fileGistdata" varStatus="status">
-							<tr>
+							<tr id="${fileGistdata.id}" pid="${fileGistdata.parent.id}">
 									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none">${fileGistdata.id}</td>
-								<td>${fileGistdata.attachName}</td>
-								<td>${fileGistdata.attachLength}</td>
-								<td>${fileGistdata.attachTypes}</td>
-								<td>
-									<c:forEach items="${fileGistdata.workAttachments}" var = "workAttachment" varStatus="status">
-										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
-									</c:forEach>
+								<c:choose>
+									<c:when test="${fileGistdata.mustFlag == 1}">
+										<td><span style="color: red">* </span>${fileGistdata.attachName}</td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fileGistdata.flag == 0}">
+												<td>${fileGistdata.attachName}</td>
+											</c:when>
+											<c:otherwise>
+												<td></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td style="text-align:center;">
+									<c:choose>
+										<c:when test="${fileGistdata.flag == 0}">
+											${fileGistdata.attachLength}M;  ${fileGistdata.attachTypes}
+										</c:when>
+										<c:otherwise>
+											<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileGistdata.url}','90%','90%')">${fileGistdata.attachName} ; </a>
+										</c:otherwise>
+									</c:choose>
 								</td>
-								<td class="op-td">
+								<td class="op-td"  style="text-align:center;">
 									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?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>
+										<c:choose>
+											<c:when test="${fileGistdata.flag == 0}">
+												<a href="javascript:void(0)"  onclick="openBill3('编辑附件', '${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>
+											</c:when>
+											<c:otherwise>
+												<a href="javascript:void(0)"  onclick="openBill3('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.parent.id}&projectId=${project.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:otherwise>
+										</c:choose>
 									</div>
 								</td>
+								<td style="display:none">${fileGistdata.id}</td>
+								<td style="display:none">${fileGistdata.mustFlag}</td>
 							</tr>
 						</c:forEach>
 						</tbody>
@@ -332,35 +378,57 @@
 				<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
 				<span id="other_title"></span>
 				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable_other" class="table table-bordered table-condensed details">
+					<table id="upTable_other" class="table table-bordered table-hover list-table">
 						<thead>
 						<tr>
-								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
-							<th width="150px">操作</th>
+							<th width="40%">文件类型</th>
+							<th width="">文件名</th>
+							<th width="100px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_other">
 						<c:forEach items="${projectReportRecord.fileOtherList}" var = "fileOther" varStatus="status">
-							<tr>
+							<tr id="${fileOther.id}" pid="${fileOther.parent.id}">
 									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none">${fileOther.id}</td>
-								<td>${fileOther.attachName}</td>
-								<td>${fileOther.attachLength}</td>
-								<td>${fileOther.attachTypes}</td>
-								<td>
-									<c:forEach items="${fileOther.workAttachments}" var = "workAttachment" varStatus="status">
-										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
-									</c:forEach>
+								<c:choose>
+									<c:when test="${fileOther.mustFlag == 1}">
+										<td><span style="color: red">* </span>${fileOther.attachName}</td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fileOther.flag == 0}">
+												<td>${fileOther.attachName}</td>
+											</c:when>
+											<c:otherwise>
+												<td></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td style="text-align:center;">
+									<c:choose>
+										<c:when test="${fileOther.flag == 0}">
+											${fileOther.attachLength}M;  ${fileOther.attachTypes}
+										</c:when>
+										<c:otherwise>
+											<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileOther.url}','90%','90%')">${fileOther.attachName} ; </a>
+										</c:otherwise>
+									</c:choose>
 								</td>
-								<td class="op-td">
+								<td class="op-td" style="text-align:center;">
 									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?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>
+										<c:choose>
+											<c:when test="${fileOther.flag == 0}">
+												<a href="javascript:void(0)"  onclick="openBill3('编辑附件', '${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>
+											</c:when>
+											<c:otherwise>
+												<a href="javascript:void(0)"  onclick="openBill3('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.parent.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:otherwise>
+										</c:choose>
 									</div>
 								</td>
+								<td style="display:none">${fileOther.id}</td>
+								<td style="display:none">${fileOther.mustFlag}</td>
 							</tr>
 						</c:forEach>
 						</tbody>
@@ -452,7 +520,7 @@
 <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 openBill3(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;
@@ -484,14 +552,14 @@
 				inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
 				var $document = iframeWin.contentWindow.document;
 
-				formSubmit2($document,formId,index,tableId);
+				formSubmit3($document,formId,index,tableId);
 
 			},
 			cancel: function(index){
 			}
 		});
 	}
-	function formSubmit2($document,inputForm,index,tableId){
+	function formSubmit3($document,inputForm,index,tableId){
 
 		var validateForm = $($document.getElementById(inputForm)).validate({
 			submitHandler: function(form){
@@ -516,9 +584,10 @@
 					if(d.str.length>0){
 						parent.layer.msg(d.str,{icon:1});
 					}
-					$("#"+tableId).load(location.href + " #"+tableId);
+					//$("#"+tableId).load(location.href + " #"+tableId);
 					//关闭当前页
 					top.layer.close(index)
+					location.reload();
 				}
 			});
 		}

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

@@ -526,7 +526,7 @@
 							return "<a class=\"attention-info\" title=\"" + d.projectName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目信息', '${ctx}/subProject/subProject/view?id=" + d.id +"','95%', '95%')\">" + d.projectName + "</a>";
 						}
 						}},
-					{field: 'clientName', align:'center', title: '报告号',width:170,templet: function(d){
+					{field: 'projectReportNumber', align:'center', title: '报告号',width:170,templet: function(d){
 							if(0 == d.pid){
 								if(""!= d.projectReportNumber){
 									return "<a class=\"attention-info pid\" title=\"" + d.projectReportNumber + "\" href=\"javascript:void(0);\" onclick=\"openDialogReportView('查看报告信息', '${ctx}/ruralProject/ruralCostProjectMessage/modify?projectId=" + d.id + "&view=view&reportedId="+d.id+"','"+ d.id +"','95%', '95%')\">" + d.projectReportNumber + "</a>";
@@ -537,7 +537,7 @@
 								return "<font></font>";
 							}
 						}},
-                    {field: 'projectLeader', align:'center', title: '合同名称',width:180,templet: function(d){
+                    {field: 'contractName', align:'center', title: '合同名称',width:180,templet: function(d){
 							if(0 == d.pid){
 								if(""!= d.contractName){
 									return "<a class=\"attention-info pid\" title=\""+d.contractName+"\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看合同信息', '${ctx}/workcontractinfo/workContractInfo/lookForm?id=" + d.contractId + "','95%', '95%')\">" + d.contractName + "</a>";
@@ -548,28 +548,28 @@
 								return "<font></font>";
 							}
 						}},
-                    /*{field: 'projectLeader', align:'center', title: '案卷号',width:120,templet: function(d){
+                    /*{field: 'recodeNum', align:'center', title: '案卷号',width:120,templet: function(d){
 							if(0 == d.pid){
 								return "<a class=\"attention-info pid\" title=\"" + d.recodeNum + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看归档信息', '${ctx}/ruralProject/ruralProjectDownMessage/view?id=" + d.prrdId + "&view=view','95%', '95%')\">" + d.recodeNum + "</a>";
 							}else{
 								return "<font></font>";
 							}
 						}},*/
-                    {field: 'projectLeader', align:'center', title: '负责人',width:80,templet: function(d){
+                    {field: 'projectLeaders', align:'center', title: '负责人',width:80,templet: function(d){
 							if(0 == d.pid){
 								return "<font style = 'font-size:14px;'>"+d.projectLeaders+"</font>";
 							}else{
 								return "<font></font>";
 							}
 						}},
-                    {field: 'projectLeader', align:'center', title: '委托方',width:160,templet: function(d){
+                    {field: 'clientName', align:'center', title: '委托方',width:200,templet: function(d){
 							if(0 == d.pid){
 								return "<font style = 'font-size:14px;font-weight:500;'>"+d.clientName+"</font>";
 							}else{
 								return "<font></font>";
 							}
 						}},
-					{field: 'projectLeader', align:'center', title: '登记人',width:160,templet: function(d){
+					{field: 'projectRegistrant', align:'center', title: '登记人',width:80,templet: function(d){
 							if(0 == d.pid){
 								return "<font style = 'font-size:14px;font-weight:500;'>"+d.projectRegistrant+"</font>";
 							}else{
@@ -585,7 +585,7 @@
 								return "<font>"+layui.util.toDateString(date,'yyyy-MM-dd')+"</font>";
 							}
 						}},
-					{align:'center', title: '报告状态',  width:70,templet:function(d){
+					{align:'center', title: '报告',  width:70,templet:function(d){
 							var st = getAuditState(""+d.projectReportStatus);
 							if(d.pid ==0){
 								if(st.action)
@@ -597,7 +597,7 @@
 								return '';
 							}
 						}},
-					{align:'center', title: '线上归档状态',  width:70,templet:function(d){
+					{align:'center', title: '电子',  width:70,templet:function(d){
 							var st = getRuralProjectArchiveState(""+d.projectReportRecordStatus);
 							if(d.pid ==0){
 								if(st.action)
@@ -609,7 +609,7 @@
 								return '';
 							}
 						}},
-					{align:'center', title: '线下归档状态',  width:70,templet:function(d){
+					{align:'center', title: '批量',  width:70,templet:function(d){
 						var st = getRuralProjectArchiveState(""+d.filingProjectStatus);
 						if(d.pid ==0){
 							if(st.action)
@@ -621,7 +621,7 @@
 							return '';
 						}
 					}},
-					{align:'center', title: '上报状态',  width:90,templet:function(d){
+					{align:'center', title: '上报',  width:90,templet:function(d){
 							var st = getReportedState(""+d.reportedState);
 							if(d.pid ==0){
 								if(st.action)

+ 140 - 89
src/main/webapp/webpage/modules/ruralprojectrecords/projectAccessoryForm.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" />--%>
+	<%@include file="/webpage/include/treetable.jsp" %>
 	<style>
 		label.error{
 			top:40px;
@@ -29,6 +31,9 @@
             return false;
         }
         $(document).ready(function() {
+			$("#upTable").treeTable({expandLevel : 5},{ expandable: true });
+			$("#gistdata_upTable").treeTable({expandLevel : 5},{ expandable: true });
+			$("#upTable_other").treeTable({expandLevel : 5},{ expandable: true });
             validateForm = $("#inputForm").validate({
                 submitHandler: function(form){
                     loading('正在提交,请稍等...');
@@ -52,10 +57,10 @@
             });
             $("#attachment_btn").click(function () {
                 $("#attachment_file").click();
-            });;
+            });
             $("#gistdata_btn").click(function () {
                 $("#gistdata_file").click();
-            });;
+            });
             $("#other_btn").click(function () {
                 $("#other_file").click();
             });
@@ -121,7 +126,7 @@
                 multipartUploadWithSts(storeAs, file, attachmentId, attachmentFlag, uploadPath, divId, "0");
             }
         }
-        
+
         function selectNum() {
 			top.layer.open({
 				type: 2,
@@ -404,43 +409,58 @@
 				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
 				<span id="attachment_title"></span>
 				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed details">
+					<%--<table id="upTable" class="layui-table" lay-filter="permissionTable"></table>--%>
+					<table id="upTable" class="table table-bordered table-hover list-table">
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
-							<th width="150px">操作</th>
+							<th width="40%">文件类型</th>
+							<th width="">文件名</th>
+							<th width="100px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_attachment">
 						<c:forEach items="${projectcontentinfo.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr>
-								<td style="display:none">${fileAttachment.id}</td>
-								<td style="display:none">${fileAttachment.mustFlag}</td>
+							<tr id="${fileAttachment.id}" pid="${fileAttachment.parent.id}">
 								<c:choose>
 									<c:when test="${fileAttachment.mustFlag == 1}">
 										<td><span style="color: red">* </span>${fileAttachment.attachName}</td>
 									</c:when>
 									<c:otherwise>
-										<td>${fileAttachment.attachName}</td>
+										<c:choose>
+											<c:when test="${fileAttachment.flag == 0}">
+												<td>${fileAttachment.attachName}</td>
+											</c:when>
+											<c:otherwise>
+												<td></td>
+											</c:otherwise>
+										</c:choose>
 									</c:otherwise>
 								</c:choose>
-
-								<td>${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 style="text-align:center;">
+									<c:choose>
+										<c:when test="${fileAttachment.flag == 0}">
+											${fileAttachment.attachLength}M;  ${fileAttachment.attachTypes}
+										</c:when>
+										<c:otherwise>
+											<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileAttachment.url}','90%','90%')">${fileAttachment.attachName} ; </a>
+										</c:otherwise>
+									</c:choose>
 								</td>
-								<td class="op-td">
+								<td class="op-td" style="text-align:center;">
 									<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>
+										<c:choose>
+											<c:when test="${fileAttachment.flag == 0}">
+												<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>
+											</c:when>
+											<c:otherwise>
+												<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.parent.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:otherwise>
+										</c:choose>
 									</div>
 								</td>
+								<td style="display:none">${fileAttachment.id}</td>
+								<td style="display:none">${fileAttachment.mustFlag}</td>
 							</tr>
 						</c:forEach>
 						</tbody>
@@ -494,43 +514,58 @@
 				<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
 				<span id="gistdata_title"></span>
 				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="gistdata_upTable" class="table table-bordered table-condensed details">
+					<table id="gistdata_upTable" class="table table-bordered table-hover list-table">
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
-							<th width="150px">操作</th>
+							<th width="40%">文件类型</th>
+							<th width="">文件名</th>
+							<th width="100px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_gistdata">
 						<c:forEach items="${projectcontentinfo.fileGistdataList}" var = "fileGistdata" varStatus="status">
-							<tr>
+							<tr id="${fileGistdata.id}" pid="${fileGistdata.parent.id}">
 									<%-- <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>
-									</c:when>
-									<c:otherwise>
-										<td>${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>
+										<c:choose>
+											<c:when test="${fileGistdata.mustFlag == 1}">
+												<td><span style="color: red">* </span>${fileGistdata.attachName}</td>
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${fileGistdata.flag == 0}">
+														<td>${fileGistdata.attachName}</td>
+													</c:when>
+													<c:otherwise>
+														<td></td>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+								<td style="text-align:center;">
+									<c:choose>
+										<c:when test="${fileGistdata.flag == 0}">
+												${fileGistdata.attachLength}M;  ${fileGistdata.attachTypes}
+											</c:when>
+											<c:otherwise>
+												<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileGistdata.url}','90%','90%')">${fileGistdata.attachName} ; </a>
+										</c:otherwise>
+									</c:choose>
 								</td>
-								<td class="op-td">
+								<td class="op-td"  style="text-align:center;">
 									<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>
+										<c:choose>
+											<c:when test="${fileGistdata.flag == 0}">
+												<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>
+											</c:when>
+											<c:otherwise>
+												<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.parent.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:otherwise>
+										</c:choose>
 									</div>
 								</td>
+										<td style="display:none">${fileGistdata.id}</td>
+										<td style="display:none">${fileGistdata.mustFlag}</td>
 							</tr>
 						</c:forEach>
 						</tbody>
@@ -539,12 +574,6 @@
 			</div>
 			<script type="text/template" id="gistdataTpl">//<!--
                 <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="gistdataTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
                     <td style="text-align:center;">
                         {{row.attachName}}
                     </td>
@@ -562,6 +591,12 @@
 							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.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>
+                    <td class="hide">
+                        <input id="gistdataTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
+                    </td>
+                    <td class="hide">
+                        0
+                    </td>
                 </tr>//-->
 			</script>
 
@@ -583,43 +618,58 @@
 				<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
 				<span id="other_title"></span>
 				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable_other" class="table table-bordered table-condensed details">
+					<table id="upTable_other" class="table table-bordered table-hover list-table">
 						<thead>
 						<tr>
 								<%-- <th>序号</th>--%>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
-							<th width="150px">操作</th>
+							<th width="40%">文件类型</th>
+							<th width="">文件名</th>
+							<th width="100px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_other">
 						<c:forEach items="${projectcontentinfo.fileOtherList}" var = "fileOther" varStatus="status">
-							<tr>
+							<tr id="${fileOther.id}" pid="${fileOther.parent.id}">
 									<%-- <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>
-									</c:when>
-									<c:otherwise>
-										<td>${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 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>
+										<c:choose>
+											<c:when test="${fileOther.mustFlag == 1}">
+												<td><span style="color: red">* </span>${fileOther.attachName}</td>
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${fileOther.flag == 0}">
+														<td>${fileOther.attachName}</td>
+													</c:when>
+													<c:otherwise>
+														<td></td>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+										<td style="text-align:center;">
+											<c:choose>
+												<c:when test="${fileOther.flag == 0}">
+													${fileOther.attachLength}M;  ${fileOther.attachTypes}
+												</c:when>
+												<c:otherwise>
+													<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileOther.url}','90%','90%')">${fileOther.attachName} ; </a>
+												</c:otherwise>
+											</c:choose>
+										</td>
+										<td class="op-td" style="text-align:center;">
+											<div class="op-btn-box" >
+												<c:choose>
+													<c:when test="${fileOther.flag == 0}">
+														<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>
+													</c:when>
+													<c:otherwise>
+														<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.parent.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+													</c:otherwise>
+												</c:choose>
+											</div>
+										</td>
+										<td style="display:none">${fileOther.id}</td>
+										<td style="display:none">${fileOther.mustFlag}</td>
 							</tr>
 						</c:forEach>
 						</tbody>
@@ -691,13 +741,13 @@
 				var $document = iframeWin.contentWindow.document;
 
 				formSubmit2($document,formId,index,tableId);
-
 			},
 			cancel: function(index){
 			},
 			end:function () {
-				var reviewFee = $("#reviewFee").val();
-				$("#"+tableId).load(location.href+"&reviewFee="+reviewFee + " #"+tableId);
+				//var reviewFee = $("#reviewFee").val();
+				//$("#"+tableId).load(location.href+"&reviewFee="+reviewFee + " #"+tableId);
+				//location.reload();
 			}
 		});
 	}
@@ -726,16 +776,17 @@
 					if(d.str.length>0){
 						parent.layer.msg(d.str,{icon:1});
 					}
-					var reviewFee = $("#reviewFee").val();
-					$("#"+tableId).load(location.href+"&reviewFee="+reviewFee + " #"+tableId);
+					//var reviewFee = $("#reviewFee").val();
+					//$("#"+tableId).load(location.href+"&reviewFee="+reviewFee + " #"+tableId);
 					//关闭当前页
-					top.layer.close(index)
+					top.layer.close(index);
+					//$("#gistdata_upTable").treeTable({expandLevel : 5},{ expandable: true });
+					location.reload();
 				}
 			});
 		}
 	}
 
-
 	//新增行方法
 	var fileAttachmentTpl = $("#fileAttachmentTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
 	var gistdataTpl = $("#gistdataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");

+ 126 - 52
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/projectRecordsMessageAudit.jsp

@@ -5,6 +5,7 @@
 	<title>项目审批管理</title>
 	<meta name="decorator" content="default"/>
 	<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>
+	<%@include file="/webpage/include/treetable.jsp" %>
 	<script type="text/javascript">
         var validateForm;
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
@@ -29,6 +30,9 @@
             return false;
         }
         $(document).ready(function() {
+			$("#upTable").treeTable({expandLevel : 5},{ expandable: true });
+			$("#gistdata_upTable").treeTable({expandLevel : 5},{ expandable: true });
+			$("#upTable_other").treeTable({expandLevel : 5},{ expandable: true });
             validateForm = $("#inputForm").validate({
                 submitHandler: function(form){
                     loading('正在提交,请稍等...');
@@ -470,31 +474,52 @@
 				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
 				<span id="attachment_title"></span>
 				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed details">
+					<table id="upTable" class="table table-bordered table-hover list-table">
 						<thead>
 						<tr>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
-							<th width="150px">操作</th>
+							<th width="40%">文件类型</th>
+							<th width="">文件名</th>
+							<th width="100px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_attachment">
 						<c:forEach items="${projectcontentinfo.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr>
-								<td style="display:none">${fileAttachment.id}</td>
-								<td>${fileAttachment.attachName}</td>
-								<td>${fileAttachment.attachLength}</td>
-								<td>${fileAttachment.attachTypes}</td>
-								<td>
-									<c:forEach items="${fileAttachment.workAttachments}" var = "workAttachment" varStatus="status">
-										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
-									</c:forEach>
+							<tr id="${fileAttachment.id}" pid="${fileAttachment.parent.id}">
+								<c:choose>
+									<c:when test="${fileAttachment.mustFlag == 1}">
+										<td><span style="color: red">* </span>${fileAttachment.attachName}</td>
+									</c:when>
+									<c:otherwise>
+										<c:choose>
+											<c:when test="${fileAttachment.flag == 0}">
+												<td>${fileAttachment.attachName}</td>
+											</c:when>
+											<c:otherwise>
+												<td></td>
+											</c:otherwise>
+										</c:choose>
+									</c:otherwise>
+								</c:choose>
+								<td style="text-align:center;">
+									<c:choose>
+										<c:when test="${fileAttachment.flag == 0}">
+											${fileAttachment.attachLength}M;  ${fileAttachment.attachTypes}
+										</c:when>
+										<c:otherwise>
+											<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileAttachment.url}','90%','90%')">${fileAttachment.attachName} ; </a>
+										</c:otherwise>
+									</c:choose>
 								</td>
-								<td class="op-td">
+								<td class="op-td" style="text-align:center;">
 									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?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>
+										<c:choose>
+											<c:when test="${fileAttachment.flag == 0}">
+												<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>
+											</c:when>
+											<c:otherwise>
+												<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.parent.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:otherwise>
+										</c:choose>
 									</div>
 								</td>
 							</tr>
@@ -517,33 +542,57 @@
 				<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
 				<span id="gistdata_title"></span>
 				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="gistdata_upTable" class="table table-bordered table-condensed details">
+					<table id="gistdata_upTable" class="table table-bordered table-hover list-table">
 						<thead>
 						<tr>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
-							<th width="150px">操作</th>
+							<th width="40%">文件类型</th>
+							<th width="">文件名</th>
+							<th width="100px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_gistdata">
 						<c:forEach items="${projectcontentinfo.fileGistdataList}" var = "fileGistdata" varStatus="status">
-							<tr>
-								<td style="display:none">${fileGistdata.id}</td>
-								<td>${fileGistdata.attachName}</td>
-								<td>${fileGistdata.attachLength}</td>
-								<td>${fileGistdata.attachTypes}</td>
-								<td>
-									<c:forEach items="${fileGistdata.workAttachments}" var = "workAttachment" varStatus="status">
-										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
-									</c:forEach>
+							<tr id="${fileGistdata.id}" pid="${fileGistdata.parent.id}">
+									<%-- <td>${status.index + 1}</td>--%>
+										<c:choose>
+											<c:when test="${fileGistdata.mustFlag == 1}">
+												<td><span style="color: red">* </span>${fileGistdata.attachName}</td>
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${fileGistdata.flag == 0}">
+														<td>${fileGistdata.attachName}</td>
+													</c:when>
+													<c:otherwise>
+														<td></td>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+								<td style="text-align:center;">
+									<c:choose>
+										<c:when test="${fileGistdata.flag == 0}">
+											${fileGistdata.attachLength}M;  ${fileGistdata.attachTypes}
+										</c:when>
+										<c:otherwise>
+											<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileGistdata.url}','90%','90%')">${fileGistdata.attachName} ; </a>
+										</c:otherwise>
+									</c:choose>
 								</td>
-								<td class="op-td">
+								<td class="op-td"  style="text-align:center;">
 									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileGistdata.id}&projectId=${projectcontentinfo.project.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										<c:choose>
+											<c:when test="${fileGistdata.flag == 0}">
+												<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>
+											</c:when>
+											<c:otherwise>
+												<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.parent.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:otherwise>
+										</c:choose>
 									</div>
 								</td>
+								<td style="display:none">${fileGistdata.id}</td>
+								<td style="display:none">${fileGistdata.mustFlag}</td>
 							</tr>
 						</c:forEach>
 						</tbody>
@@ -564,33 +613,57 @@
 				<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
 				<span id="other_title"></span>
 				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable_other" class="table table-bordered table-condensed details">
+					<table id="upTable_other" class="table table-bordered table-hover list-table">
 						<thead>
 						<tr>
-							<th>电子件名称</th>
-							<th width="100px">最大容量(M)</th>
-							<th width="18%">类型限制</th>
-							<th>文件名</th>
-							<th width="150px">操作</th>
+							<th width="40%">文件类型</th>
+							<th width="">文件名</th>
+							<th width="100px">操作</th>
 						</tr>
 						</thead>
 						<tbody id="file_other">
 						<c:forEach items="${projectcontentinfo.fileOtherList}" var = "fileOther" varStatus="status">
-							<tr>
-								<td style="display:none">${fileOther.id}</td>
-								<td>${fileOther.attachName}</td>
-								<td>${fileOther.attachLength}</td>
-								<td>${fileOther.attachTypes}</td>
-								<td>
-									<c:forEach items="${fileOther.workAttachments}" var = "workAttachment" varStatus="status">
-										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
-									</c:forEach>
+							<tr id="${fileOther.id}" pid="${fileOther.parent.id}">
+									<%-- <td>${status.index + 1}</td>--%>
+										<c:choose>
+											<c:when test="${fileOther.mustFlag == 1}">
+												<td><span style="color: red">* </span>${fileOther.attachName}</td>
+											</c:when>
+											<c:otherwise>
+												<c:choose>
+													<c:when test="${fileOther.flag == 0}">
+														<td>${fileOther.attachName}</td>
+													</c:when>
+													<c:otherwise>
+														<td></td>
+													</c:otherwise>
+												</c:choose>
+											</c:otherwise>
+										</c:choose>
+								<td style="text-align:center;">
+									<c:choose>
+										<c:when test="${fileOther.flag == 0}">
+											${fileOther.attachLength}M;  ${fileOther.attachTypes}
+										</c:when>
+										<c:otherwise>
+											<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileOther.url}','90%','90%')">${fileOther.attachName} ; </a>
+										</c:otherwise>
+									</c:choose>
 								</td>
-								<td class="op-td">
+								<td class="op-td" style="text-align:center;">
 									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileOther.id}&projectId=${projectcontentinfo.project.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+										<c:choose>
+											<c:when test="${fileOther.flag == 0}">
+												<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>
+											</c:when>
+											<c:otherwise>
+												<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.parent.id}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+											</c:otherwise>
+										</c:choose>
 									</div>
 								</td>
+								<td style="display:none">${fileOther.id}</td>
+								<td style="display:none">${fileOther.mustFlag}</td>
 							</tr>
 						</c:forEach>
 						</tbody>
@@ -686,9 +759,10 @@
 					if(d.str.length>0){
 						parent.layer.msg(d.str,{icon:1});
 					}
-					$("#"+tableId).load(location.href + " #"+tableId);
+					//$("#"+tableId).load(location.href + " #"+tableId);
 					//关闭当前页
 					top.layer.close(index)
+					location.reload();
 				}
 			});
 		}

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

@@ -517,7 +517,7 @@
                 url: '${ctx}/ruralProject/ruralProjectMessage/getProjectList?projectId='+projectId+'&pageNo=${page.pageNo}&projectName='+projectName+'&leaderNameStr='+leaderNameStr+'&workContractInfo.name='+workContractInfoName+'&workContractInfo.client.name='+workContractInfoClientName+'&beginDate='+beginDate+'&endDate='+endDate+'&projectReportStatus='+projectReportStatus+'&projectReportRecordStatus='+projectReportRecordStatus+'&reportedState='+reportedState+'&projectType=1',
                 page: false,
                 cols: [[
-                    {type: 'numbers', align:'center', title: '序号' ,width:80},
+                    {type: 'numbers', align:'center', title: '序号' ,width:50},
                     {field: 'projectId', title: '项目编号/项目定义号',width:160},
                     {field: 'projectName', align:'center', title: '项目名称',width:200,templet:function(d){
                     	if(0 == d.pid){
@@ -526,7 +526,7 @@
 							return "<a class=\"attention-info\" title=\"" + d.projectName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目信息', '${ctx}/subProject/subProject/view?id=" + d.id +"','95%', '95%')\">" + d.projectName + "</a>";
 						}
 						}},
-					{field: 'clientName', align:'center', title: '报告号',width:170,templet: function(d){
+					{field: 'projectReportNumber', align:'center', title: '报告号',width:170,templet: function(d){
 							if(0 == d.pid){
 								if(""!= d.projectReportNumber){
 									return "<a class=\"attention-info pid\" title=\"" + d.projectReportNumber + "\" href=\"javascript:void(0);\" onclick=\"openDialogReportView('查看报告信息', '${ctx}/ruralProject/ruralProjectMessage/modify?projectId=" + d.id + "&view=view&reportedId="+d.id+"','"+ d.id +"','95%', '95%')\">" + d.projectReportNumber + "</a>";
@@ -537,7 +537,7 @@
 								return "<font></font>";
 							}
 						}},
-                    {field: 'projectLeader', align:'center', title: '合同名称',width:180,templet: function(d){
+                    {field: 'contractName', align:'center', title: '合同名称',width:180,templet: function(d){
 							if(0 == d.pid){
 								if(""!= d.contractName){
 									return "<a class=\"attention-info pid\" title=\""+d.contractName+"\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看合同信息', '${ctx}/workcontractinfo/workContractInfo/lookForm?id=" + d.contractId + "','95%', '95%')\">" + d.contractName + "</a>";
@@ -548,28 +548,28 @@
 								return "<font></font>";
 							}
 						}},
-                    /*{field: 'projectLeader', align:'center', title: '案卷号',width:120,templet: function(d){
+                    /*{field: 'recodeNum', align:'center', title: '案卷号',width:120,templet: function(d){
 							if(0 == d.pid){
 								return "<a class=\"attention-info pid\" title=\"" + d.recodeNum + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看归档信息', '${ctx}/ruralProject/ruralProjectDownMessage/view?id=" + d.prrdId + "&view=view','95%', '95%')\">" + d.recodeNum + "</a>";
 							}else{
 								return "<font></font>";
 							}
 						}},*/
-                    {field: 'projectLeader', align:'center', title: '负责人',width:80,templet: function(d){
+                    {field: 'projectLeaders', align:'center', title: '负责人',width:80,templet: function(d){
 							if(0 == d.pid){
 								return "<font style = 'font-size:14px;'>"+d.projectLeaders+"</font>";
 							}else{
 								return "<font></font>";
 							}
 						}},
-                    {field: 'projectLeader', align:'center', title: '委托方',width:160,templet: function(d){
+                    {field: 'clientName', align:'center', title: '委托方',width:200,templet: function(d){
 							if(0 == d.pid){
 								return "<font style = 'font-size:14px;font-weight:500;'>"+d.clientName+"</font>";
 							}else{
 								return "<font></font>";
 							}
 						}},
-					{field: 'projectLeader', align:'center', title: '登记人',width:160,templet: function(d){
+					{field: 'projectRegistrant', align:'center', title: '登记人',width:80,templet: function(d){
 							if(0 == d.pid){
 								return "<font style = 'font-size:14px;font-weight:500;'>"+d.projectRegistrant+"</font>";
 							}else{
@@ -585,7 +585,7 @@
 								return "<font>"+layui.util.toDateString(date,'yyyy-MM-dd')+"</font>";
 							}
 						}},
-					{align:'center', title: '报告状态',  width:70,templet:function(d){
+					{align:'center', title: '报告',  width:70,templet:function(d){
 							var st = getAuditState(""+d.projectReportStatus);
 							if(d.pid ==0){
 								if(st.action)
@@ -597,7 +597,7 @@
 								return '';
 							}
 						}},
-					{align:'center', title: '线上归档状态',  width:70,templet:function(d){
+					{align:'center', title: '电子',  width:70,templet:function(d){
 							var st = getRuralProjectArchiveState(""+d.projectReportRecordStatus);
 							if(d.pid ==0){
 								if(st.action)
@@ -609,7 +609,7 @@
 								return '';
 							}
 						}},
-					{align:'center', title: '线下归档状态',  width:70,templet:function(d){
+					{align:'center', title: '批量',  width:70,templet:function(d){
 							var st = getRuralProjectArchiveState(""+d.filingProjectStatus);
 							if(d.pid ==0){
 								if(st.action)
@@ -621,7 +621,7 @@
 								return '';
 							}
 						}},
-					{align:'center', title: '上报状态',  width:90,templet:function(d){
+					{align:'center', title: '上报',  width:90,templet:function(d){
 							var st = getReportedState(""+d.reportedState);
 							if(d.pid ==0){
 								if(st.action)