Bläddra i källkod

项目文件上传组件部分功能开发

徐滕 10 timmar sedan
förälder
incheckning
a1b1430750
25 ändrade filer med 1974 tillägg och 11420 borttagningar
  1. 4 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectRecordsOwnCaseBaseController.java
  2. 11 5
      src/main/java/com/jeeplus/modules/sys/service/WorkattachmentService.java
  3. 12 2
      src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java
  4. 313 0
      src/main/webapp/WEB-INF/tags/table/fileDisplay.tag
  5. 193 0
      src/main/webapp/WEB-INF/tags/table/otherFileDisplay.tag
  6. 545 0
      src/main/webapp/WEB-INF/tags/table/otherFileInstallDisplay.tag
  7. 13 13
      src/main/webapp/static/common/js/common.js
  8. 40 805
      src/main/webapp/webpage/modules/projectcontentinfo/projectCaseBaseSupplementAudit.jsp
  9. 41 802
      src/main/webapp/webpage/modules/projectcontentinfo/projectCaseBaseSupplementModify.jsp
  10. 143 878
      src/main/webapp/webpage/modules/projectcontentinfo/projectCaseBaseSupplementView.jsp
  11. 8 502
      src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordCaseBaseForm.jsp
  12. 30 543
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/newReported/bzshbReportedAudit.jsp
  13. 62 529
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordForm.jsp
  14. 60 604
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordModify.jsp
  15. 56 876
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/new/reportForm.jsp
  16. 27 531
      src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/recordTwo/projectReportRecordAudit.jsp
  17. 59 846
      src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/recordTwo/projectReportRecordForm.jsp
  18. 41 534
      src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/recordTwo/projectReportRecordModify.jsp
  19. 57 499
      src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/recordTwo/projectReportRecordModifyApply.jsp
  20. 55 492
      src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/recordTwo/projectReportRecordUrgentModifyApply.jsp
  21. 30 469
      src/main/webapp/webpage/modules/ruralprojectrecords/record/projectRepordDescriptionAudit.jsp
  22. 57 848
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/judgementReport/projectRecordsJudgementForm.jsp
  23. 60 580
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/reportForm.jsp
  24. 27 533
      src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/reportedView.jsp
  25. 30 529
      src/main/webapp/webpage/modules/ruralprojectrecords/view/projectAccessoryView.jsp

+ 4 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectRecordsOwnCaseBaseController.java

@@ -760,6 +760,10 @@ public class RuralProjectRecordsOwnCaseBaseController extends BaseController {
         Act act = getByAct(projectCaseBaseAudit.getProcessInstanceId());
         projectCaseBaseAudit.setAct(act);
 
+        //获取工程类型
+        ProjectEngineeringCaseBaseInfo engineeringInfos=engineeringCaseBaseService.get(projectCaseBaseAudit.getEngineeringType());
+        model.addAttribute("engineeringInfo", engineeringInfos);
+
         return "modules/projectcontentinfo/projectCaseBaseSupplementModify";
     }
 

+ 11 - 5
src/main/java/com/jeeplus/modules/sys/service/WorkattachmentService.java

@@ -845,10 +845,14 @@ public class WorkattachmentService extends CrudService<WorkattachmentDao, Workat
 		for (WorkClientAttachment info : list) {
 			switch (uploadMode){
 				case "1":
-					info.setUrl(bosUrl + info.getUrl());
+					if(!info.getUrl().contains(bosUrl)){
+						info.setUrl(bosUrl + info.getUrl());
+					}
 					break;
 				case "2":
-					info.setUrl(aliyunUrl + info.getUrl());
+					if(!info.getUrl().contains(aliyunUrl)){
+						info.setUrl(aliyunUrl + info.getUrl());
+					}
 					break;
 				default:
 					//获取本地服务器ip和端口号
@@ -856,9 +860,11 @@ public class WorkattachmentService extends CrudService<WorkattachmentDao, Workat
 					//创建展示附件访问方法路径
 					//String methodAccessPath = "/a/viewFile/viewFile/getUploadFile?uploadFilePath=";
 					String methodAccessPath = "";
-					String newUrl = serverIPAndPort + methodAccessPath + info.getUrl();
-					//变更新的文件查看地址
-					info.setUrl(newUrl);
+					if(!info.getUrl().contains(serverIPAndPort + methodAccessPath)){
+						String newUrl = serverIPAndPort + methodAccessPath + info.getUrl();
+						//变更新的文件查看地址
+						info.setUrl(newUrl);
+					}
 					break;
 			}
 		}

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

@@ -3510,6 +3510,16 @@ public class WorkProjectNotifyController extends BaseController {
 
 					model.addAttribute("consultantInfo", consultantList);
 					if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
+
+						//查询报告文件、依据性文件、其他文件必填列表以及数据
+						List<MainDictDetail> mainDictDetails = projectTemplateService.attachmentTemplateList();
+						//文件处理
+						projectTemplateService.disposeProjectTemplateFile(mainDictDetails, relateInfo, engineeringId, ruralProjectRecords, projectcontentinfo, "");
+
+						projectReportRecord.setFileAttachmentList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileAttachmentList()));
+						projectReportRecord.setFileGistdataList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileGistdataList()));
+						projectReportRecord.setFileOtherList(ruralProjectRecordsService.disposeDataAttachment(projectcontentinfo.getFileOtherList()));
+
 						ruralProjectMessageService.getInfoByView(reported);
 						model.addAttribute("reportedId", reported.getId());
 						return "modules/ruralprojectrecords/ruralporjectmessage/reportedView";
@@ -11251,7 +11261,7 @@ public class WorkProjectNotifyController extends BaseController {
 			return "modules/projectcontentinfo/projectCaseBaseSupplementpendingForm";
 		} else if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
 			model.addAttribute("identificationName", "案例文件审核意见");
-			return "modules/projectcontentinfo/projectCaseBaseSupplementForm";
+			return "modules/projectcontentinfo/projectCaseBaseSupplementView";
 		} else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
 			model.addAttribute("identificationName", "案例文件审核意见");
 			return "modules/projectcontentinfo/projectCaseBaseSupplementAudit";
@@ -11260,7 +11270,7 @@ public class WorkProjectNotifyController extends BaseController {
 			return "modules/projectcontentinfo/projectCaseBaseSupplementModify";
 		} else {
 			model.addAttribute("identificationName", "案例文件审核意见");
-			return "modules/projectcontentinfo/projectCaseBaseSupplementForm";
+			return "modules/projectcontentinfo/projectCaseBaseSupplementView";
 		}
     }
 

+ 313 - 0
src/main/webapp/WEB-INF/tags/table/fileDisplay.tag

@@ -0,0 +1,313 @@
+<%@ tag pageEncoding="UTF-8"%>
+<%@ attribute name="onChangeFunc" required="true" type="java.lang.String" description="文件选择变化时的处理函数" %>
+<%@ attribute name="fileList" required="true" type="java.util.List" description="文件列表数据" %>
+<%@ attribute name="projectId" required="true" type="java.lang.String" description="项目ID" %>
+<%@ attribute name="uploadMode" required="true" type="java.lang.String" description="上传模式" %>
+<%@ attribute name="moduleId" required="true" type="java.lang.String" description="模块唯一标识" %>
+<%@ attribute name="title" required="true" type="java.lang.String" description="模块标题" %>
+<%@ attribute name="showType" required="false" type="java.lang.Boolean" description="展示同步按钮的判断条件" %>
+<%-- 不使用default属性 --%>
+<%@ attribute name="showEditBtn" required="false" type="java.lang.Boolean" description="是否显示编辑按钮" %>
+
+<!-- 导入必要的标签库 -->
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
+
+<%-- 定义默认值变量 --%>
+<c:choose>
+    <c:when test="${not empty showEditBtn}">
+        <%-- 传递了参数则使用参数值 --%>
+        <c:set var="showEditBtnValue" value="${showEditBtn}"/>
+    </c:when>
+    <c:otherwise>
+        <%-- 未传递参数时默认不显示编辑按钮 --%>
+        <c:set var="showEditBtnValue" value="false"/>
+    </c:otherwise>
+</c:choose>
+<%-- 定义默认值变量 --%>
+<c:choose>
+    <c:when test="${not empty showType}">
+        <c:set var="showTypeBtnValue" value="${showType}" />
+    </c:when>
+    <c:otherwise>
+        <%-- 如果未传入showEditBtn参数,默认显示编辑按钮 --%>
+        <c:set var="showTypeBtnValue" value="false" />
+    </c:otherwise>
+</c:choose>
+
+<div class="form-group layui-row">
+    <div class="form-group-label"><h2>${title}</h2></div>
+    <div id="addFile_${moduleId}" style="display: none" class="upload-progress">
+        <span id="fileName_${moduleId}" ></span>
+        <span id="_${moduleId}" ></span>
+        <b><span id="baifenbi_${moduleId}" ></span></b>
+        <div class="progress">
+            <div id="jindutiao_${moduleId}" class="progress-bar" style="width: 0%" aria-valuenow="0">
+            </div>
+        </div>
+    </div>
+    <input id="${moduleId}_file" type="file" name="${moduleId}_file" multiple="multiple" style="display: none;"
+           onChange="if(this.value)${onChangeFunc}(this.value);"/>
+    <span id="${moduleId}_title"></span>
+    <div class="layui-item layui-col-xs12" style="padding:0 16px;">
+        <table id="upTable_${moduleId}" class="table table-bordered table-condensed tree_table">
+            <thead>
+            <tr>
+                <th width="20%">文件要求</th>
+                <th width="35%">文件描述/文件</th>
+                <th width="20%">文件类型</th>
+                <th width="160px">上传时间</th>
+                <th width="120px">文件大小(M)</th>
+                <th width="170px">操作</th>
+            </tr>
+            </thead>
+            <tbody id="file_${moduleId}">
+            <c:forEach items="${fileList}" var = "filecaseBase" varStatus="status">
+                <tr id="file_${moduleId}_${filecaseBase.id}_tr" onclick="listTr(this)">
+                    <td style="display:none">${filecaseBase.id}</td>
+                    <td style="display:none">${filecaseBase.mustFlag}</td>
+                    <c:choose>
+                        <c:when test="${filecaseBase.mustFlag == 1}">
+                            <td class="tabMove" style="text-align: left;"><span class='default_open ' style="padding-right: 15px; "></span><span style="color: red">* </span>${filecaseBase.attachName}<input type="hidden" value="${filecaseBase.attachName}"/></td>
+                        </c:when>
+                        <c:otherwise>
+                            <td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${filecaseBase.attachName}<input type="hidden" value="${filecaseBase.attachName}"/></td>
+                        </c:otherwise>
+                    </c:choose>
+                    <td>
+                        <div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${filecaseBase.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${filecaseBase.attachTypes}</div>
+                    </td>
+                    <td></td>
+                    <td></td>
+                    <td></td>
+                    <td class="op-td">
+                        <div class="op-btn-box">
+                                <%-- 临时调试输出,确认变量值 --%>
+                                <%-- <span style="color:red">调试:showEditBtn=${showEditBtn}, showEditBtnValue=${showEditBtnValue}</span> --%>
+
+                                <%-- 确保使用的是showEditBtnValue变量 --%>
+                            <c:if test="${showEditBtnValue == true}">
+                                <a href="javascript:void(0)" onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${filecaseBase.id}&projectId=${projectId}&uploadMode=${uploadMode}','70%','80%',false,'inputForm','upTable_${moduleId}')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+                            </c:if>
+                        </div>
+                    </td>
+                    <td style="display:none">${filecaseBase.fileFlag}</td>
+                </tr>
+                <c:forEach items="${filecaseBase.workAttachments}" var = "workClientAttachment" varStatus="status">
+                    <tr id="addFile_${moduleId}_${workClientAttachment.id}_tr" class="addFile_${moduleId}_${filecaseBase.id}_tr">
+                        <td></td>
+                        <c:choose>
+                            <c:when test="${uploadMode == 2}">
+                                <c:choose>
+                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                        <td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openPreview('${workClientAttachment.temporaryUrl}',5)" alt="${workClientAttachment.attachmentName}"></td>
+                                    </c:when>
+                                    <c:otherwise>
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(filecaseBase.attachName,'rar')
+                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:otherwise>
+                                </c:choose>
+                            </c:when>
+                            <c:otherwise>
+                                <c:choose>
+                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                       or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                        <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+                                    </c:when>
+                                    <c:otherwise>
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(filecaseBase.attachName,'rar')
+                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:otherwise>
+                                </c:choose>
+                            </c:otherwise>
+                        </c:choose>
+                        <td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
+
+
+                        <td class="op-td" style="text-align:center;">
+                            <fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
+                        </td>
+                        <td class="op-td" style="text-align:center;">
+                                ${workClientAttachment.fileSize}
+                        </td>
+                        <td class="op-td">
+                            <div class="op-btn-box" >
+                                <c:choose>
+                                    <c:when test="${uploadMode == 2}">
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:when>
+                                    <c:otherwise>
+                                        <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                    </c:otherwise>
+                                </c:choose>
+                            </div>
+                        </td>
+                    </tr>
+                </c:forEach>
+            </c:forEach>
+            </tbody>
+        </table>
+    </div>
+</div>
+<script type="text/template" id="caseBaseTpl">//<!--
+                <tr id="budgetList{{idx}}">
+                    <td class="hide">
+                        <input id="caseBaseTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
+                    </td>
+                    <td class="hide">
+                        0
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.attachName}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.attachLength}}
+                    </td>
+                    <td style="text-align:center;">
+                        {{row.attachTypes}}
+                    </td>
+                    <td style="text-align:center;">
+
+                    </td>
+					<td class="op-td">
+						<div class="op-btn-box" >
+                            <c:if test="${showEditBtnValue}">
+                                <a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','upTable_caseBase')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+                            </c:if>
+						</div>
+					</td>
+                </tr>//-->
+</script>
+
+<script>
+    function openBill2(title,url,width,height,target,formId,tableId){
+        var rows = $(this).parent().prevAll().length + 1;
+        var frameIndex = parent.layer.getFrameIndex(window.name);
+        var urls = url+"&index="+frameIndex;
+        if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+            width='auto';
+            height='auto';
+        }else{//如果是PC端,根据用户设置的width和height显示。
+
+        }
+        top.layer.open({
+            type: 2,
+            area: [width, height],
+            title: title,
+            skin:"two-btns",
+            maxmin: false, //开启最大化最小化按钮
+            content: urls ,
+            btn: ['确定','关闭'],
+            yes: function(index, layero){
+                var body = top.layer.getChildFrame('body', index);
+                var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                var inputForm = body.find('#inputForm');
+                var top_iframe;
+                if(target){
+                    top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                }else{
+                    top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                }
+                inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
+                var $document = iframeWin.contentWindow.document;
+
+                formSubmit2($document,formId,index,tableId);
+
+            },
+            cancel: function(index){
+            }
+        });
+    }
+    function formSubmit2($document,inputForm,index,tableId){
+
+        var validateForm = $($document.getElementById(inputForm)).validate({
+            submitHandler: function(form){
+                loading('正在提交,请稍等...');
+                form.submit();
+            },
+            errorContainer: "#messageBox",
+            errorPlacement: function(error, element) {
+                $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+                if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                    error.appendTo(element.parent().parent());
+                } else {
+                    error.insertAfter(element);
+                }
+            }
+        });
+        if(validateForm.form()){
+            var action = $document.getElementById(inputForm).action;
+            var handleInfo = $($document.getElementById(inputForm)).serialize();
+            $.ajax({
+                type : "POST",
+                url : action,
+                data : handleInfo,
+                //请求成功
+                success:function(data) {
+                    var d = data;
+                    //输出提示信息
+                    if(d.str.length>0){
+                        parent.layer.msg(d.str,{icon:1});
+                    }
+                    if(${showTypeBtnValue}){
+                        //将数据临时挂载在父级页面
+                        parent.tempSyncIds = [...confirmIdList]
+                        location.reload();
+                    }else{
+                        $("#"+tableId).load(location.href + " #"+tableId);
+                    }
+                    //关闭当前页
+                    top.layer.close(index)
+                }
+            });
+        }
+    }
+</script>

+ 193 - 0
src/main/webapp/WEB-INF/tags/table/otherFileDisplay.tag

@@ -0,0 +1,193 @@
+
+<%@ include file="/webpage/include/taglib.jsp"%>
+<%@ tag pageEncoding="UTF-8"%>
+<%@ attribute name="onChangeFunc" required="true" type="java.lang.String" description="文件选择变化时的处理函数" %>
+<%@ attribute name="fileList" required="true" type="java.util.List" description="文件列表数据" %>
+<%@ attribute name="uploadMode" required="true" type="java.lang.String" description="上传模式" %>
+<%@ attribute name="moduleId" required="true" type="java.lang.String" description="模块唯一标识" %>
+<%@ attribute name="title" required="true" type="java.lang.String" description="模块标题" %>
+<%@ attribute name="projectContentInfo" required="false" type="java.lang.Object" description="项目内容信息对象" %>
+<%@ attribute name="projectReportRecord" required="true" type="java.lang.Object" description="项目报告记录对象" %>
+
+<!-- 导入必要的标签库 -->
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
+
+<div class="form-group layui-row">
+    <div class="form-group-label"><h2>${title}</h2></div>
+    <div class="layui-item nav-btns">
+        <%--<a id="${moduleId}_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>--%>
+    </div>
+    <div id="addFile_${moduleId}" style="display: none" class="upload-progress">
+        <span id="fileName_${moduleId}" ></span>
+        <span id="_${moduleId}" ></span>
+        <b><span id="baifenbi_${moduleId}" ></span></b>
+        <div class="progress">
+            <div id="jindutiao_${moduleId}" class="progress-bar" style="width: 0%" aria-valuenow="0">
+            </div>
+        </div>
+    </div>
+    <input id="${moduleId}_file" type="file" name="${moduleId}_file" multiple="multiple" style="display: none;"
+           onChange="if(this.value)${onChangeFunc}(this.value);"/>
+    <span id="${moduleId}_title"></span>
+    <div class="layui-item layui-col-xs12" style="padding:0 16px;">
+        <table id="upTable_${moduleId}" class="table table-bordered table-condensed">
+            <thead>
+            <tr>
+                <th width="20%">文件要求</th>
+                <th width="35%">文件描述/文件</th>
+                <th width="20%">文件类型</th>
+                <th width="160px">上传时间</th>
+                <th width="120px">文件大小(M)</th>
+                <th width="100px">操作</th>
+            </tr>
+            </thead>
+            <tbody id="file_${moduleId}">
+            <c:forEach items="${fileList}" var = "fileOther" varStatus="status">
+                <tr id="${fileOther.id}" pid="${fileOther.parent.id}">
+                    <c:choose>
+                        <c:when test="${fileOther.mustFlag == 1}">
+                            <td class="tabMove" style="text-align: left;"><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
+                        </c:when>
+                        <c:otherwise>
+                            <c:choose>
+                                <c:when test="${fileOther.flag == 0}">
+                                    <td class="tabMove" style="text-align: left;">${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
+                                </c:when>
+                                <c:otherwise>
+                                    <td></td>
+                                </c:otherwise>
+                            </c:choose>
+                        </c:otherwise>
+                    </c:choose>
+                    <td>
+                        <c:choose>
+                            <c:when test="${fileOther.flag == 0}">
+                                <div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileOther.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileOther.attachTypes}</div>
+                            </c:when>
+                            <c:otherwise>
+                                <c:choose>
+                                    <c:when test="${projectContentInfo.uploadMode == 2}">
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'jpg')
+                                                       or fn:containsIgnoreCase(fileOther.attachName,'png')
+                                                       or fn:containsIgnoreCase(fileOther.attachName,'gif')
+                                                       or fn:containsIgnoreCase(fileOther.attachName,'bmp')
+                                                       or fn:containsIgnoreCase(fileOther.attachName,'jpeg')}">
+                                                <img src="${fileOther.temporaryUrl}" width="50" height="50" onclick="openPreview('${fileOther.temporaryUrl}',5)" alt="${fileOther.attachName}">
+                                            </c:when>
+                                            <c:otherwise>
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
+                                                        <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',1)">${fileOther.attachName} ; </a>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <c:choose>
+                                                            <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
+                                                                       or fn:containsIgnoreCase(fileOther.attachName,'zip')
+                                                                       or fn:containsIgnoreCase(fileOther.attachName,'jar')
+                                                                       or fn:containsIgnoreCase(fileOther.attachName,'7z')}">
+                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',1)">${fileOther.attachName}</a>
+                                                            </c:when>
+                                                            <c:otherwise>
+                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',2)">${fileOther.attachName}</a>
+                                                            </c:otherwise>
+                                                        </c:choose>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:when>
+                                    <c:otherwise>
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'jpg')
+                                                       or fn:containsIgnoreCase(fileOther.attachName,'png')
+                                                       or fn:containsIgnoreCase(fileOther.attachName,'gif')
+                                                       or fn:containsIgnoreCase(fileOther.attachName,'bmp')
+                                                       or fn:containsIgnoreCase(fileOther.attachName,'jpeg')}">
+                                                <img src="${fileOther.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileOther.temporaryUrl}','90%','90%')" alt="${fileOther.attachName}">
+                                            </c:when>
+                                            <c:otherwise>
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
+                                                        <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',1)">${fileOther.attachName} ; </a>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <c:choose>
+                                                            <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
+                                                                       or fn:containsIgnoreCase(fileOther.attachName,'zip')
+                                                                       or fn:containsIgnoreCase(fileOther.attachName,'jar')
+                                                                       or fn:containsIgnoreCase(fileOther.attachName,'7z')}">
+                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',1)">${fileOther.attachName}</a>
+                                                            </c:when>
+                                                            <c:otherwise>
+                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',2)">${fileOther.attachName}</a>
+                                                            </c:otherwise>
+                                                        </c:choose>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:otherwise>
+                                </c:choose>
+                            </c:otherwise>
+                        </c:choose>
+                    </td>
+
+                    <c:choose>
+                        <c:when test="${fileOther.flag == 0}">
+                            <td class="op-td"></td>
+                        </c:when>
+                        <c:otherwise>
+                            <td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${fileOther.description}')">${fileOther.description}</td>
+                        </c:otherwise>
+                    </c:choose>
+                    <td class="op-td" style="text-align:center;">
+                        <c:choose>
+                            <c:when test="${fileOther.flag == 0}">
+                                <div></div>
+                            </c:when>
+                            <c:otherwise>
+                                <fmt:formatDate value="${fileOther.createDate}" type="date"/>
+                            </c:otherwise>
+                        </c:choose>
+                    </td>
+                    <td class="op-td" style="text-align:center;">
+                            ${fileOther.fileSize}
+                    </td>
+                    <td class="op-td" style="text-align:center;">
+                        <div class="op-btn-box" >
+                            <c:choose>
+                                <c:when test="${fileOther.flag == 0}">
+
+                                </c:when>
+                                <c:otherwise>
+                                    <%--附件下载删除--%>
+                                    <c:choose>
+                                        <c:when test="${projectReportRecord.uploadMode == 2}">
+                                            <c:choose>
+                                                <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
+                                                    <a href="${fileOther.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                </c:when>
+                                                <c:otherwise>
+                                                    <a href="${fileOther.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                                </c:otherwise>
+                                            </c:choose>
+                                        </c:when>
+                                        <c:otherwise>
+                                            <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileOther.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                        </c:otherwise>
+                                    </c:choose>
+                                </c:otherwise>
+                            </c:choose>
+                        </div>
+                    </td>
+                    <td style="display:none">${fileOther.id}</td>
+                    <td style="display:none">${fileOther.mustFlag}</td>
+                </tr>
+            </c:forEach>
+            </tbody>
+        </table>
+    </div>
+</div>

+ 545 - 0
src/main/webapp/WEB-INF/tags/table/otherFileInstallDisplay.tag

@@ -0,0 +1,545 @@
+<%@ include file="/webpage/include/taglib.jsp"%>
+
+<%@ tag pageEncoding="UTF-8"%>
+<%@ attribute name="onChangeFunc" required="true" type="java.lang.String" description="文件选择变化时的处理函数" %>
+<%@ attribute name="fileList" required="true" type="java.util.List" description="文件列表数据" %>
+<%@ attribute name="projectId" required="true" type="java.lang.String" description="项目ID" %>
+<%@ attribute name="uploadMode" required="true" type="java.lang.String" description="上传模式" %>
+<%@ attribute name="moduleId" required="true" type="java.lang.String" description="模块唯一标识" %>
+<%@ attribute name="title" required="true" type="java.lang.String" description="模块标题" %>
+<%@ attribute name="showAddButton" required="false" type="java.lang.Boolean" description="是否显示添加按钮" %>
+<%@ attribute name="parentId" required="false" type="java.lang.String" description="父级ID,用于添加类型" %>
+<%@ attribute name="projectType" required="false" type="java.lang.String" description="项目类型" %>
+<%@ attribute name="reviewFeeSelector" required="false" type="java.lang.String" description="评审费用选择器" %>
+<%@ attribute name="showEditBtn" required="false" type="java.lang.Boolean" description="是否显示编辑按钮" %>
+<%@ attribute name="projectContentInfo" required="false" type="java.lang.Object" description="项目内容信息对象" %>
+<%@ attribute name="flag" required="false" type="java.lang.String" description="标识参数" %>
+
+<!-- 导入必要的标签库 -->
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
+
+<%-- 处理showEditBtn默认值(不使用type属性) --%>
+<c:choose>
+    <c:when test="${not empty showEditBtn}">
+        <%-- 传递了参数则使用参数值 --%>
+        <c:set var="showEditBtnValue" value="${showEditBtn}"/>
+    </c:when>
+    <c:otherwise>
+        <%-- 未传递参数时默认不显示编辑按钮 --%>
+        <c:set var="showEditBtnValue" value="false"/>
+    </c:otherwise>
+</c:choose>
+
+<%-- 处理showAddButton默认值(不使用type属性) --%>
+<c:choose>
+    <c:when test="${not empty showAddButton}">
+        <%-- 传递了参数则使用参数值 --%>
+        <c:set var="showAddButtonValue" value="${showAddButton}"/>
+    </c:when>
+    <c:otherwise>
+        <%-- 未传递参数时默认不显示添加按钮 --%>
+        <c:set var="showAddButtonValue" value="false"/>
+    </c:otherwise>
+</c:choose>
+
+<div class="form-group layui-row">
+    <div class="form-group-label"><h2>${title}</h2></div>
+
+    <c:if test="${showAddButtonValue}">
+        <div class="layui-item nav-btns">
+            <a href="javascript:void(0)"  onclick="formAttachment('添加类型', '${ctx}/projectAccessoryRelation/projectAccessoryRelation/formAttachment?parentId=${parentId}&projectType=${projectType}&projectId=${projectId}&reviewFee='+$('#${reviewFeeSelector}').val(),'500px','350px',false,'inputForm','file_${moduleId}')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i> 添加类型</a>
+        </div>
+    </c:if>
+
+    <div id="addFile_${moduleId}" style="display: none" class="upload-progress">
+        <span id="fileName_${moduleId}" ></span>
+        <span id="_${moduleId}" ></span>
+        <b><span id="baifenbi_${moduleId}" ></span></b>
+        <div class="progress">
+            <div id="jindutiao_${moduleId}" class="progress-bar" style="width: 0%" aria-valuenow="0">
+            </div>
+        </div>
+    </div>
+
+    <input id="${moduleId}_file" type="file" name="${moduleId}_file" multiple="multiple" style="display: none;"
+           onChange="if(this.value)${onChangeFunc}(this.value);"/>
+    <span id="${moduleId}_title"></span>
+
+    <div class="layui-item layui-col-xs12" style="padding:0 16px;">
+        <table id="upTable_${moduleId}" class="table table-bordered table-condensed tree_table">
+            <thead>
+            <tr>
+                <th width="20%">文件要求</th>
+                <th width="35%">文件描述/文件</th>
+                <th width="20%">文件类型</th>
+                <th width="160px">上传时间</th>
+                <th width="120px">文件大小(M)</th>
+                <th width="100px">操作</th>
+            </tr>
+            </thead>
+            <tbody id="file_${moduleId}">
+            <c:forEach items="${fileList}" var = "fileOther" varStatus="status">
+                <tr id="file_${moduleId}_${fileOther.id}_tr" onclick="listTr(this)">
+                    <td style="display:none"><span class="foid">${fileOther.id}</span></td>
+                    <td style="display:none">${fileOther.mustFlag}</td>
+
+                    <c:choose>
+                        <c:when test="${fileOther.mustFlag == 1}">
+                            <td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
+                        </c:when>
+                        <c:otherwise>
+                            <td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
+                        </c:otherwise>
+                    </c:choose>
+
+                    <td>
+                        <div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileOther.attachLength}M;</div>
+                        <div style="white-space:normal; word-break:break-all;overflow:hidden;">${fileOther.attachTypes}</div>
+                    </td>
+
+                    <td></td>
+                    <td></td>
+                    <td></td>
+
+                    <td class="op-td">
+                        <div class="op-btn-box">
+                            <c:if test="${showEditBtnValue}">
+                                <a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${projectId}&uploadMode=${uploadMode}','70%','80%',false,'inputForm','upTable_${moduleId}')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+                            </c:if>
+                        </div>
+                    </td>
+
+                    <td style="display:none">${fileOther.fileFlag}</td>
+                </tr>
+
+                <c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
+                    <tr class="file_${moduleId}_${fileOther.id}_tr">
+                        <td></td>
+
+                        <c:choose>
+                            <c:when test="${uploadMode == 2}">
+                                <c:choose>
+                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                               or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                               or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                               or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                               or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                        <td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+                                    </c:when>
+                                    <c:otherwise>
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
+                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:otherwise>
+                                </c:choose>
+                            </c:when>
+                            <c:otherwise>
+                                <c:choose>
+                                    <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
+                                               or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
+                                               or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
+                                               or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
+                                               or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
+                                        <td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+                                    </c:when>
+                                    <c:otherwise>
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <c:choose>
+                                                    <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
+                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
+                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
+                                                                   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
+                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
+                                                    </c:when>
+                                                    <c:otherwise>
+                                                        <td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+                                                    </c:otherwise>
+                                                </c:choose>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:otherwise>
+                                </c:choose>
+                            </c:otherwise>
+                        </c:choose>
+
+                        <td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
+
+                        <td class="op-td" style="text-align:center;">
+                            <fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
+                        </td>
+
+                        <td>${workClientAttachment.fileSize}</td>
+
+                        <td class="op-td">
+                            <div class="op-btn-box">
+                                <c:choose>
+                                    <c:when test="${uploadMode == 2}">
+                                        <c:choose>
+                                            <c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
+                                                <a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                            </c:when>
+                                            <c:otherwise>
+                                                <a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                            </c:otherwise>
+                                        </c:choose>
+                                    </c:when>
+                                    <c:otherwise>
+                                        <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
+                                    </c:otherwise>
+                                </c:choose>
+                            </div>
+                        </td>
+                    </tr>
+                </c:forEach>
+            </c:forEach>
+            </tbody>
+        </table>
+    </div>
+</div>
+
+<script type="text/template" id="${moduleId}Tpl">//<!--
+    <tr id="budgetList{{idx}}">
+        <td class="hide">
+            <input id="${moduleId}Tpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
+        </td>
+        <td class="hide">
+            0
+        </td>
+        <td style="text-align:center;">
+            {{row.attachName}}
+        </td>
+        <td style="text-align:center;">
+            {{row.attachLength}}
+        </td>
+        <td style="text-align:center;">
+            {{row.attachTypes}}
+        </td>
+        <td style="text-align:center;">
+
+        </td>
+        <td class="op-td">
+            <div class="op-btn-box">
+                <c:if test="${showEditBtnValue}">
+                    <a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${projectId}','70%','80%',false,'inputForm','upTable_${moduleId}')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
+                </c:if>
+            </div>
+        </td>
+    </tr>//-->
+</script>
+
+<script type="text/javascript">
+    // 初始化模板
+    var ${moduleId}Tpl = $("#${moduleId}Tpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+
+    /**
+     * 打开编辑窗口
+     */
+    function openBill2(title, url, width, height, target, formId, tableId) {
+        var rows = $(this).parent().prevAll().length + 1;
+        var frameIndex = parent.layer.getFrameIndex(window.name);
+        var urls = url + "&index=" + frameIndex;
+
+        // 移动端自适应
+        if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {
+            width = 'auto';
+            height = 'auto';
+        }
+
+        top.layer.open({
+            type: 2,
+            area: [width, height],
+            title: title,
+            skin: "two-btns",
+            maxmin: false,
+            content: urls,
+            btn: ['确定', '关闭'],
+            yes: function(index, layero) {
+                var body = top.layer.getChildFrame('body', index);
+                var iframeWin = layero.find('iframe')[0];
+                var inputForm = body.find('#inputForm');
+                var top_iframe;
+
+                if (target) {
+                    top_iframe = target;
+                } else {
+                    top_iframe = top.getActiveTab().attr("name");
+                }
+
+                inputForm.attr("target", top_iframe);
+                inputForm.attr("action", "${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");
+                var $document = iframeWin.contentWindow.document;
+
+                formSubmit2($document, formId, index, tableId);
+            },
+            cancel: function(index) {},
+            end: function() {
+                var reviewFee = $("#${reviewFeeSelector}").val() || "";
+                $("#" + tableId).load(location.href + "&reviewFee=" + reviewFee + " #" + tableId);
+            }
+        });
+    }
+
+    /**
+     * 表单提交处理
+     */
+    function formSubmit2($document, inputForm, index, tableId) {
+        var validateForm = $($document.getElementById(inputForm)).validate({
+            submitHandler: function(form) {
+                loading('正在提交,请稍等...');
+                form.submit();
+            },
+            errorContainer: "#messageBox",
+            errorPlacement: function(error, element) {
+                $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+                if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
+                    error.appendTo(element.parent().parent());
+                } else {
+                    error.insertAfter(element);
+                }
+            }
+        });
+
+        if (validateForm.form()) {
+            var action = $document.getElementById(inputForm).action;
+            var handleInfo = $($document.getElementById(inputForm)).serialize();
+
+            $.ajax({
+                type: "POST",
+                url: action,
+                data: handleInfo,
+                success: function(data) {
+                    var d = data;
+                    if (d.str && d.str.length > 0) {
+                        parent.layer.msg(d.str, {icon: 1});
+                    }
+
+                    // 刷新当前模块
+                    var reviewFee = $("#${reviewFeeSelector}").val() || "";
+                    $("#" + tableId).load(location.href + "&reviewFee=" + reviewFee + " #" + tableId);
+
+                    // 关闭当前页
+                    top.layer.close(index);
+                }
+            });
+        }
+    }
+
+    /**
+     * 打开添加类型窗口
+     */
+    function formAttachment(title, url, width, height, target, formId, divId) {
+        var rows = $(this).parent().prevAll().length + 1;
+        var frameIndex = parent.layer.getFrameIndex(window.name);
+        var urls = url;
+
+        // 移动端自适应
+        if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {
+            width = 'auto';
+            height = 'auto';
+        }
+
+        top.layer.open({
+            type: 2,
+            area: [width, height],
+            title: title,
+            skin: "two-btns",
+            maxmin: false,
+            content: urls,
+            btn: ['确定', '关闭'],
+            yes: function(index, layero) {
+                var body = top.layer.getChildFrame('body', index);
+                var iframeWin = layero.find('iframe')[0];
+                var inputForm = body.find('#inputForm');
+
+                inputForm.attr("action", "${ctx}/projectTemplate/projectTemplate/getProjectTemplateInfo");
+                var $document = iframeWin.contentWindow.document;
+
+                formSubmitAjax($document, formId, index, divId);
+            },
+            cancel: function(index) {}
+        });
+    }
+
+    /**
+     * 添加类型表单提交
+     */
+    function formSubmitAjax($document, inputForm, index, divId) {
+        var validateForm = $($document.getElementById(inputForm)).validate({
+            submitHandler: function(form) {
+                loading('正在提交,请稍等...');
+                form.submit();
+            },
+            errorContainer: "#messageBox",
+            errorPlacement: function(error, element) {
+                $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
+                if (element.is(":checkbox") || element.is(":radio") || element.parent().is(".input-append")) {
+                    error.appendTo(element.parent().parent());
+                } else {
+                    error.insertAfter(element);
+                }
+            }
+        });
+
+        if (validateForm.form()) {
+            $($document.getElementById(inputForm)).ajaxSubmit({
+                success: function(data) {
+                    if (!data.success) {
+                        top.layer.msg("保存依据资料信息异常!", {icon: 2});
+                        return false;
+                    }
+
+                    var idx = $("#" + divId + " tr").length;
+                    addRowBaseData("#" + divId, idx, ${moduleId}Tpl, data.body.projectAccessoryInfo);
+
+                    parent.layer.msg(data.msg, {icon: 1});
+                    top.layer.close(index);
+                }
+            });
+        }
+    }
+
+    /**
+     * 检查ID是否在数组中
+     */
+    function hasInArr(id, idArr) {
+        for (var i = 0; i < idArr.length; i++) {
+            if (id == $(idArr[i]).val()) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * 检查基础数据是否存在
+     */
+    function existBaseData(id, length) {
+        for (var i = 0; i < length; i++) {
+            var val = $('#file_attachment' + i + '_id').val();
+            if (id == val) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * 删除行数据
+     */
+    function delRowBaseData(obj, prefix, userId) {
+        var id = $(prefix + "_id").val();
+        var currentUser = '${fns:getUser().id}';
+        var contentId = '${projectContentInfo.projectContentData.id}';
+        var condition = "${flag}";
+
+        $.ajax({
+            type: "post",
+            url: '${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
+            data: {"contentId": contentId, "basedId": id, "condition": condition},
+            dataType: "json",
+            success: function(data) {
+                if (data.success) {
+                    var conditions = ["according", "completion", "early", "claim", "design", "visa", "interim", "distribution", "material", "armor"];
+                    if (conditions.indexOf(condition) !== -1) {
+                        $(obj).parent().parent().remove();
+                    } else {
+                        $(obj).parent().parent().remove();
+                    }
+
+                    if (data.body && data.body.inuse) {
+                        return;
+                    }
+
+                    if (currentUser == userId) {
+                        confirmDelete('是否同步删除资料库的文件?', '${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId=' + id + '&id=${projectContentInfo.id}&type=1');
+                    }
+                } else {
+                    top.layer.msg("删除依据资料失败!", {icon: 0});
+                }
+            }
+        });
+        return;
+    }
+
+    /**
+     * 删除基础数据
+     */
+    function delBaseData(obj, prefix, userId) {
+        var id = $(prefix + "_id").val();
+        var currentUser = '${fns:getUser().id}';
+        var contentId = '${projectContentInfo.projectContentData.id}';
+        var condition = "${flag}";
+
+        $.ajax({
+            type: "post",
+            url: '${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
+            data: {"contentId": contentId, "basedId": id, "condition": condition},
+            dataType: "json",
+            success: function(data) {
+                if (data.success) {
+                    var conditions = ["according", "completion", "early", "claim", "design", "visa", "interim", "distribution", "material", "armor"];
+                    if (conditions.indexOf(condition) !== -1) {
+                        $(obj).parent().parent().parent().remove();
+                    } else {
+                        $(obj).parent().parent().remove();
+                    }
+
+                    if (data.body && data.body.inuse) {
+                        return;
+                    }
+
+                    if (currentUser == userId) {
+                        confirmDelete('是否同步删除资料库的文件?', '${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId=' + id + '&id=${projectContentInfo.id}&type=1');
+                    }
+                } else {
+                    top.layer.msg("删除依据资料失败!", {icon: 0});
+                }
+            }
+        });
+        return;
+    }
+
+    /**
+     * 确认删除
+     */
+    function confirmDelete(mess, href) {
+        top.layer.confirm(mess, {icon: 3, title: '系统提示'}, function(index) {
+            if (typeof href == 'function') {
+                href();
+            } else {
+                $.ajax({
+                    url: href,
+                    type: "post",
+                    success: function(data) {
+                        if (data.success) {
+                            top.layer.msg("删除依据资料成功!", {icon: 0});
+                        }
+                    }
+                });
+            }
+            top.layer.close(index);
+        });
+        return false;
+    }
+</script>

+ 13 - 13
src/main/webapp/static/common/js/common.js

@@ -152,18 +152,18 @@ function preview(title,url,width,height,type){
 //打开预览新界面
 //1:pdf文件;2:office文件
 function openPreview(url,flag){
-    if(flag ==1 ){
-        var url = 'https://view.xdocin.com/view?src='+encodeURIComponent(url);
-    }else if(flag == 2){
-        if (url.indexOf(".xml") !== -1) {
-            var url = 'https://view.xdocin.com/view?src='+encodeURIComponent(url);
-        }else{
-            var url = 'https://view.officeapps.live.com/op/view.aspx?src='+encodeURIComponent(url);
-        }
-    }else if(flag == 3){
-        var url = 'https://view.xdocin.com/view?src='+encodeURIComponent(url);
-    }else if(flag == 4){
-        var url = url;
+    var imgFlag = false
+    if(flag ===1 ){
+        url = 'https://view.xdocin.com/view?src='+encodeURIComponent(url);
+    }else if(flag === 2){
+        url = 'https://view.xdocin.com/view?src='+encodeURIComponent(url);
+    }else if(flag === 3){
+        url = 'https://view.xdocin.com/view?src='+encodeURIComponent(url);
+    }else if(flag === 4){
+        url = url;
+    }else if(flag === 5){
+        url = 'https://view.xdocin.com/view?src='+encodeURIComponent(url);
+        imgFlag = true
     }else{
         $.ajax({
             type:"POST",
@@ -182,7 +182,7 @@ function openPreview(url,flag){
         //预览参数
         var ops = {
             // "pdf": true, //word文档尝试以pdf方式显示,默认false
-            // "img": true, //尝试以图片方式显示,默认false
+            "img": imgFlag, //尝试以图片方式显示,默认false
             // "watermark": "XDOC文档预览", //水印文本,显示水印
             // "saveable": true, //是否允许保存源文件,默认false
             // "printable": false, //是否允许打印,默认true

+ 40 - 805
src/main/webapp/webpage/modules/projectcontentinfo/projectCaseBaseSupplementAudit.jsp

@@ -1283,544 +1283,36 @@
 					</c:if>
 				</div>
 				<div class="form-group layui-row first hide" id="AccessoryView">
-
-					<div class="form-group layui-row">
-						<div class="form-group-label"><h2>成果文件</h2></div>
-						<div class="layui-item nav-btns">
-						</div>
-						<div id="addFile_attachment" style="display: none" class="upload-progress">
-							<span id="fileName_attachment" ></span>
-							<span id="_attachment" ></span>
-							<b><span id="baifenbi_attachment" ></span></b>
-							<div class="progress">
-								<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-								</div>
-							</div>
-						</div>
-						<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-						<span id="attachment_title"></span>
-						<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-							<table id="upTable" class="table table-bordered table-condensed">
-								<thead>
-								<tr>
-									<th width="20%">文件要求</th>
-									<th width="35%">文件描述/文件</th>
-									<th width="20%">文件类型</th>
-									<th width="160px">上传时间</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="100px">操作</th>
-								</tr>
-								</thead>
-								<tbody id="file_attachment">
-								<c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-									<tr id="${fileAttachment.id}" pid="${fileAttachment.parent.id}">
-										<c:choose>
-											<c:when test="${fileAttachment.mustFlag == 1}">
-												<td class="tabMove" style="text-align: left;"><span style="color: red">* </span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-											</c:when>
-											<c:otherwise>
-												<c:choose>
-													<c:when test="${fileAttachment.flag == 0}">
-														<td class="tabMove" style="text-align: left;">${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-													</c:when>
-													<c:otherwise>
-														<td></td>
-													</c:otherwise>
-												</c:choose>
-											</c:otherwise>
-										</c:choose>
-										<td>
-											<c:choose>
-												<c:when test="${fileAttachment.flag == 0}">
-													<%--															<div><span class="file_nei">内容:</span><div class="file_neirong">${fileAttachment.attachName}</div></div>--%>
-													<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileAttachment.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileAttachment.attachTypes}</div>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${projectcontentinfo.uploadMode == 2}">
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'jpg')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'png')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'gif')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'bmp')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'jpeg')}">
-																	<img src="${fileAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileAttachment.temporaryUrl}','90%','90%')" alt="${fileAttachment.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)"  onclick="openPreview('${fileAttachment.temporaryUrl}',1)">${fileAttachment.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.temporaryUrl}',3)">${fileAttachment.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.temporaryUrl}',2)">${fileAttachment.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'jpg')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'png')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'gif')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'bmp')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'jpeg')}">
-																	<img src="${fileAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileAttachment.url}','90%','90%')" alt="${fileAttachment.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',1)">${fileAttachment.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',3)">${fileAttachment.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',2)">${fileAttachment.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-													<%--											<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileAttachment.url}','90%','90%')">${fileAttachment.attachName} ; </a>--%>
-												</c:otherwise>
-											</c:choose>
-										</td>
-										<c:choose>
-											<c:when test="${fileAttachment.flag == 0}">
-												<td class="op-td"></td>
-											</c:when>
-											<c:otherwise>
-												<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${fileAttachment.description}')">${fileAttachment.description}</td>
-											</c:otherwise>
-										</c:choose>
-
-
-										<td class="op-td" style="text-align:center;">
-											<c:choose>
-												<c:when test="${fileAttachment.flag == 0}">
-													<div></div>
-												</c:when>
-												<c:otherwise>
-													<fmt:formatDate value="${fileAttachment.createDate}" type="date"/>
-												</c:otherwise>
-											</c:choose>
-										</td>
-										<td class="op-td" style="text-align:center;">
-												${fileAttachment.fileSize}
-										</td>
-										<td class="op-td" style="text-align:center;">
-											<div class="op-btn-box" >
-												<c:choose>
-													<c:when test="${fileAttachment.flag == 0}">
-
-													</c:when>
-													<c:otherwise>
-
-														<%--附件下载删除--%>
-														<c:choose>
-															<c:when test="${projectReportRecord.uploadMode == 2}">
-																<c:choose>
-																	<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-																		<a href="${fileAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:when>
-																	<c:otherwise>
-																		<a href="${fileAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:otherwise>
-																</c:choose>
-															</c:when>
-															<c:otherwise>
-																<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-															</c:otherwise>
-														</c:choose>
-													</c:otherwise>
-												</c:choose>
-											</div>
-										</td>
-									</tr>
-								</c:forEach>
-								</tbody>
-							</table>
-						</div>
-					</div>
-					<div class="form-group layui-row">
-						<div class="form-group-label"><h2>依据性文件</h2></div>
-						<div class="layui-item nav-btns">
-								<%--<a id="gistdata_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>--%>
-						</div>
-						<div id="addFile_gistdata" style="display: none" class="upload-progress">
-							<span id="fileName_gistdata" ></span>
-							<span id="_gistdata" ></span>
-							<b><span id="baifenbi_gistdata" ></span></b>
-							<div class="progress">
-								<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
-								</div>
-							</div>
-						</div>
-						<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
-						<span id="gistdata_title"></span>
-						<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-							<table id="gistdata_upTable" class="table table-bordered table-condensed">
-								<thead>
-								<tr>
-									<th width="20%">文件要求</th>
-									<th width="35%">文件描述/文件</th>
-									<th width="20%">文件类型</th>
-									<th width="160px">上传时间</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="100px">操作</th>
-								</tr>
-								</thead>
-								<tbody id="file_gistdata">
-								<c:forEach items="${projectReportRecord.fileGistdataList}" var = "fileGistdata" varStatus="status">
-									<tr id="${fileGistdata.id}" pid="${fileGistdata.parent.id}">
-											<%-- <td>${status.index + 1}</td>--%>
-										<c:choose>
-											<c:when test="${fileGistdata.mustFlag == 1}">
-												<td class="tabMove" style="text-align: left;"><span style="color: red">* </span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-											</c:when>
-											<c:otherwise>
-												<c:choose>
-													<c:when test="${fileGistdata.flag == 0}">
-														<td class="tabMove" style="text-align: left;">${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-													</c:when>
-													<c:otherwise>
-														<td></td>
-													</c:otherwise>
-												</c:choose>
-											</c:otherwise>
-										</c:choose>
-										<td>
-											<c:choose>
-												<c:when test="${fileGistdata.flag == 0}">
-													<%--																	<div><span class="file_nei">内容:</span><div class="file_neirong">${fileGistdata.attachName}</div></div>--%>
-													<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileGistdata.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileGistdata.attachTypes}</div>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${projectcontentinfo.uploadMode == 2}">
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'jpg')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'png')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'gif')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'bmp')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'jpeg')}">
-																	<img src="${fileGistdata.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileGistdata.temporaryUrl}','90%','90%')" alt="${fileGistdata.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',1)">${fileGistdata.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',3)">${fileGistdata.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',2)">${fileGistdata.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'jpg')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'png')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'gif')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'bmp')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'jpeg')}">
-																	<img src="${fileGistdata.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileGistdata.url}','90%','90%')" alt="${fileGistdata.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',1)">${fileGistdata.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',3)">${fileGistdata.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',2)">${fileGistdata.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-													<%--												<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileGistdata.url}','90%','90%')">${fileGistdata.attachName} ; </a>--%>
-												</c:otherwise>
-											</c:choose>
-										</td>
-
-										<c:choose>
-											<c:when test="${fileGistdata.flag == 0}">
-												<td class="op-td"></td>
-											</c:when>
-											<c:otherwise>
-												<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${fileGistdata.description}')">${fileGistdata.description}</td>
-											</c:otherwise>
-										</c:choose>
-										<td class="op-td" style="text-align:center;">
-											<c:choose>
-												<c:when test="${fileGistdata.flag == 0}">
-													<div></div>
-												</c:when>
-												<c:otherwise>
-													<fmt:formatDate value="${fileGistdata.createDate}" type="date"/>
-												</c:otherwise>
-											</c:choose>
-										</td>
-										<td class="op-td"  style="text-align:center;">
-												${fileGistdata.fileSize}
-										</td>
-										<td class="op-td"  style="text-align:center;">
-											<div class="op-btn-box" >
-												<c:choose>
-													<c:when test="${fileGistdata.flag == 0}">
-
-													</c:when>
-													<c:otherwise>
-
-														<%--附件下载删除--%>
-														<c:choose>
-															<c:when test="${projectReportRecord.uploadMode == 2}">
-																<c:choose>
-																	<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'pdf')}">
-																		<a href="${fileGistdata.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:when>
-																	<c:otherwise>
-																		<a href="${fileGistdata.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:otherwise>
-																</c:choose>
-															</c:when>
-															<c:otherwise>
-																<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileGistdata.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-															</c:otherwise>
-														</c:choose>
-													</c:otherwise>
-												</c:choose>
-											</div>
-										</td>
-										<td style="display:none">${fileGistdata.id}</td>
-										<td style="display:none">${fileGistdata.mustFlag}</td>
-									</tr>
-								</c:forEach>
-								</tbody>
-							</table>
-						</div>
-					</div>
-					<div class="form-group layui-row">
-						<div class="form-group-label"><h2>其他文件</h2></div>
-						<div class="layui-item nav-btns">
-								<%--<a id="other_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>--%>
-						</div>
-						<div id="addFile_other" style="display: none" class="upload-progress">
-							<span id="fileName_other" ></span>
-							<span id="_other" ></span>
-							<b><span id="baifenbi_other" ></span></b>
-							<div class="progress">
-								<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
-								</div>
-							</div>
-						</div>
-						<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
-						<span id="other_title"></span>
-						<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-							<table id="upTable_other" class="table table-bordered table-condensed">
-								<thead>
-								<tr>
-									<th width="20%">文件要求</th>
-									<th width="35%">文件描述/文件</th>
-									<th width="20%">文件类型</th>
-									<th width="160px">上传时间</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="100px">操作</th>
-								</tr>
-								</thead>
-								<tbody id="file_other">
-								<c:forEach items="${projectReportRecord.fileOtherList}" var = "fileOther" varStatus="status">
-									<tr id="${fileOther.id}" pid="${fileOther.parent.id}">
-											<%-- <td>${status.index + 1}</td>--%>
-										<c:choose>
-											<c:when test="${fileOther.mustFlag == 1}">
-												<td class="tabMove" style="text-align: left;"><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-											</c:when>
-											<c:otherwise>
-												<c:choose>
-													<c:when test="${fileOther.flag == 0}">
-														<td class="tabMove" style="text-align: left;">${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-													</c:when>
-													<c:otherwise>
-														<td></td>
-													</c:otherwise>
-												</c:choose>
-											</c:otherwise>
-										</c:choose>
-										<td>
-											<c:choose>
-												<c:when test="${fileOther.flag == 0}">
-													<%--																	<div style="overflow: hidden"><span class="file_nei">内容:</span><div class="file_neirong">${fileOther.attachName}</div></div>--%>
-													<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileOther.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileOther.attachTypes}</div>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${projectcontentinfo.uploadMode == 2}">
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'jpg')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'png')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'gif')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'bmp')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'jpeg')}">
-																	<img src="${fileOther.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileOther.temporaryUrl}','90%','90%')" alt="${fileOther.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',1)">${fileOther.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',3)">${fileOther.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',2)">${fileOther.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'jpg')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'png')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'gif')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'bmp')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'jpeg')}">
-																	<img src="${fileOther.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileOther.url}','90%','90%')" alt="${fileOther.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',1)">${fileOther.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',3)">${fileOther.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',2)">${fileOther.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-													<!--													<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileOther.url}','90%','90%')">${fileOther.attachName} ; </a>-->
-												</c:otherwise>
-											</c:choose>
-										</td>
-
-
-										<c:choose>
-											<c:when test="${fileGistdata.flag == 0}">
-												<td class="op-td"></td>
-											</c:when>
-											<c:otherwise>
-												<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${fileOther.description}')">${fileOther.description}</td>
-											</c:otherwise>
-										</c:choose>
-										<td class="op-td" style="text-align:center;">
-											<c:choose>
-												<c:when test="${fileOther.flag == 0}">
-													<div></div>
-												</c:when>
-												<c:otherwise>
-													<fmt:formatDate value="${fileOther.createDate}" type="date"/>
-												</c:otherwise>
-											</c:choose>
-										</td>
-										<td class="op-td" style="text-align:center;">
-												${fileOther.fileSize}
-										</td>
-										<td class="op-td" style="text-align:center;">
-											<div class="op-btn-box" >
-												<c:choose>
-													<c:when test="${fileOther.flag == 0}">
-
-													</c:when>
-													<c:otherwise>
-														<%--附件下载删除--%>
-														<c:choose>
-															<c:when test="${projectReportRecord.uploadMode == 2}">
-																<c:choose>
-																	<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
-																		<a href="${fileOther.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:when>
-																	<c:otherwise>
-																		<a href="${fileOther.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:otherwise>
-																</c:choose>
-															</c:when>
-															<c:otherwise>
-																<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileOther.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-															</c:otherwise>
-														</c:choose>
-													</c:otherwise>
-												</c:choose>
-											</div>
-										</td>
-										<td style="display:none">${fileOther.id}</td>
-										<td style="display:none">${fileOther.mustFlag}</td>
-									</tr>
-								</c:forEach>
-								</tbody>
-							</table>
-						</div>
-					</div>
+					<!-- 成果文件模块引用 -->
+					<table:otherFileDisplay
+							title="成果文件"
+							onChangeFunc="insertTitle"
+							fileList="${projectReportRecord.fileAttachmentList}"
+							uploadMode="${projectReportRecord.uploadMode}"
+							moduleId="other"
+							projectContentInfo="${projectcontentinfo}"
+							projectReportRecord="${projectReportRecord}"/>
+
+					<!-- 依据性文件模块引用 -->
+					<table:otherFileDisplay
+							title="依据性文件"
+							onChangeFunc="gistdataInsertTitle"
+							fileList="${projectReportRecord.fileGistdataList}"
+							uploadMode="${projectReportRecord.uploadMode}"
+							moduleId="other"
+							projectContentInfo="${projectcontentinfo}"
+							projectReportRecord="${projectReportRecord}"/>
+
+
+					<!-- 其他文件模块引用 -->
+					<table:otherFileDisplay
+							title="其他文件"
+							onChangeFunc="otherInsertTitle"
+							fileList="${projectReportRecord.fileOtherList}"
+							uploadMode="${projectReportRecord.uploadMode}"
+							moduleId="other"
+							projectContentInfo="${projectcontentinfo}"
+							projectReportRecord="${projectReportRecord}"/>
 
 				</div>
 
@@ -1877,192 +1369,17 @@
 						</div>
 
 					</div>
-					<div class="form-group layui-row">
-						<div class="form-group-label"><h2>案例文件</h2></div>
-						<div id="addFile_caseBase" style="display: none" class="upload-progress">
-							<span id="fileName_caseBase" ></span>
-							<span id="_caseBase" ></span>
-							<b><span id="baifenbi_caseBase" ></span></b>
-							<div class="progress">
-								<div id="jindutiao_caseBase" class="progress-bar" style="width: 0%" aria-valuenow="0">
-								</div>
-							</div>
-						</div>
-						<input id="caseBase_file" type="file" name="caseBase_file" multiple="multiple" style="display: none;" onChange="if(this.value)caseBaseInsertTitle(this.value);"/>
-						<span id="caseBase_title"></span>
-						<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-							<table id="upTable_caseBase" class="table table-bordered table-condensed tree_table">
-								<thead>
-								<tr>
-										<%-- <th>序号</th>--%>
-									<th width="20%">文件要求</th>
-									<th width="35%">文件描述/文件</th>
-									<th width="20%">文件类型</th>
-									<th width="160px">上传时间</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="170px">操作</th>
-								</tr>
-								</thead>
-								<tbody id="file_caseBase">
-								<c:forEach items="${projectReportRecord.fileCaseBaseList}" var = "filecaseBase" varStatus="status">
-									<tr id="file_caseBase_${filecaseBase.id}_tr" onclick="listTr(this)">
-											<%-- <td>${status.index + 1}</td>--%>
-										<td style="display:none">${filecaseBase.id}</td>
-										<td style="display:none">${filecaseBase.mustFlag}</td>
-										<c:choose>
-											<c:when test="${filecaseBase.mustFlag == 1}">
-												<td class="tabMove" style="text-align: left;"><span class='default_open ' style="padding-right: 15px; "></span><span style="color: red">* </span>${filecaseBase.attachName}<input type="hidden" value="${filecaseBase.attachName}"/></td>
-											</c:when>
-											<c:otherwise>
-												<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${filecaseBase.attachName}<input type="hidden" value="${filecaseBase.attachName}"/></td>
-											</c:otherwise>
-										</c:choose>
-										<td>
-												<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${filecaseBase.attachName}</div></div>--%>
-											<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${filecaseBase.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${filecaseBase.attachTypes}</div>
-										</td>
-										<td></td>
-										<td></td>
-										<td></td>
-										<td class="op-td">
-												<div class="op-btn-box" >
-                                                    <a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${filecaseBase.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable_caseBase')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-                                                </div>
-										</td>
-										<td style="display:none">${filecaseBase.fileFlag}</td>
 
-									</tr>
-									<c:forEach items="${filecaseBase.workAttachments}" var = "workClientAttachment" varStatus="status">
-										<tr id="addFile_caseBase_${workClientAttachment.id}_tr" class="addFile_caseBase_${filecaseBase.id}_tr">
-											<td></td>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-															<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(filecaseBase.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																			<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																		</c:when>
-																		<c:otherwise>
-																			<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-															<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(filecaseBase.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																			<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																		</c:when>
-																		<c:otherwise>
-																			<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-											<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
-
-
-											<td class="op-td" style="text-align:center;">
-												<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-											</td>
-											<td class="op-td" style="text-align:center;">
-													${workClientAttachment.fileSize}
-											</td>
-											<td class="op-td">
-												<div class="op-btn-box" >
-														<%--附件下载删除--%>
-													<c:choose>
-														<c:when test="${projectReportRecord.uploadMode == 2}">
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-																	<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载1</a>
-																</c:when>
-																<c:otherwise>
-																	<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																</c:otherwise>
-															</c:choose>
-														</c:when>
-														<c:otherwise>
-															<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-
-												</div>
-											</td>
-										</tr>
-									</c:forEach>
-								</c:forEach>
-								</tbody>
-							</table>
-						</div>
-					</div>
-					<script type="text/template" id="caseBaseTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="caseBaseTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','upTable_caseBase')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-					</script>
+					<!-- 案例文件模块 -->
+					<table:fileDisplay
+							title="案例文件"
+							onChangeFunc="caseBaseInsertTitle"
+							fileList="${projectReportRecord.fileCaseBaseList}"
+							projectId="${project.id}"
+							uploadMode="${projectReportRecord.uploadMode}"
+							showType="${true}"
+							showEditBtn="${true}"
+							moduleId="caseBase"/>
 
 					<div class="form-group-label">
 						<div style="float: right"> <a href="javascript:void(0)" style='background-color: #FFB800' onclick="openDialogre('个人模板列表', '${ctx}/auditTemplate/auditTemplate/templateList?identification=${identification}&name=${identificationName}','80%', '70%','','关闭')" class="nav-btn layui-btn layui-btn-sm" ><i class="fa fa-file-excel-o"></i> 审核意见模板列表</a></div>
@@ -2235,90 +1552,8 @@
 	}
 </script>
 <script>
-	function openBill2(title,url,width,height,target,formId,tableId){
-		var rows = $(this).parent().prevAll().length + 1;
-		var frameIndex = parent.layer.getFrameIndex(window.name);
-		var urls = url+"&index="+frameIndex;
-		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
-			width='auto';
-			height='auto';
-		}else{//如果是PC端,根据用户设置的width和height显示。
-
-		}
-		top.layer.open({
-			type: 2,
-			name : "iframeRefresh",
-			area: [width, height],
-			title: title,
-			skin:"two-btns",
-			maxmin: false, //开启最大化最小化按钮
-			content: urls ,
-			btn: ['确定','关闭'],
-			yes: function(index, layero){
-				var body = top.layer.getChildFrame('body', index);
-				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
-				var inputForm = body.find('#inputForm');
-				var top_iframe;
-				if(target){
-					top_iframe = target;//如果指定了iframe,则在改frame中跳转
-				}else{
-					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
-				}
-				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
-				inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
-				var $document = iframeWin.contentWindow.document;
-
-				formSubmit2($document,formId,index,tableId);
-
-			},
-			cancel: function(index){
-			},
-		});
-	}
-	function formSubmit2($document,inputForm,index,tableId){
-
-		var validateForm = $($document.getElementById(inputForm)).validate({
-			submitHandler: function(form){
-				loading('正在提交,请稍等...');
-				form.submit();
-			},
-			errorContainer: "#messageBox",
-			errorPlacement: function(error, element) {
-				$($document.getElementById("#messageBox")).text("输入有误,请先更正。");
-				if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
-					error.appendTo(element.parent().parent());
-				} else {
-					error.insertAfter(element);
-				}
-			}
-		});
-		if(validateForm.form()){
-				var action = $document.getElementById(inputForm).action;
-				var handleInfo = $($document.getElementById(inputForm)).serialize();
-				$.ajax({
-					type : "POST",
-					url : action,
-					data : handleInfo,
-					//请求成功
-					success:function(data) {
-						var d = data;
-						//输出提示信息
-						if(d.str.length>0){
-							parent.layer.msg(d.str,{icon:1});
-						}
-                        //将数据临时挂载在父级页面
-                        parent.tempSyncIds = [...confirmIdList]
-                        location.reload();
-						top.layer.close(index)
-					}
-				});
-
-		}
-	}
-
 
 	//新增行方法
-	var caseBaseTpl = $("#caseBaseTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
 
 	function formAttachment(title,url,width,height,target,formId,divId){
 		var rows = $(this).parent().prevAll().length + 1;

+ 41 - 802
src/main/webapp/webpage/modules/projectcontentinfo/projectCaseBaseSupplementModify.jsp

@@ -316,8 +316,8 @@
 					</div>
 				</div>
 			</div>
-			<div style="margin-top: 50px">
-				<div class="form-group layui-row first hide" id="projectInfo">
+			<div>
+				<div class="form-group layui-row first hide" id="projectInfo" style="margin-top: 50px">
 						<%--				<div class="form-group-label"><h2>项目基本信息</h2></div>--%>
 					<div class="layui-item layui-col-sm6 lw6">
 						<label class="layui-form-label">项目名称:</label>
@@ -1384,544 +1384,36 @@
 					</c:if>
 				</div>
 				<div class="form-group layui-row first hide" id="AccessoryView">
-
-					<div class="form-group layui-row">
-						<div class="form-group-label"><h2>成果文件</h2></div>
-						<div class="layui-item nav-btns">
-						</div>
-						<div id="addFile_attachment" style="display: none" class="upload-progress">
-							<span id="fileName_attachment" ></span>
-							<span id="_attachment" ></span>
-							<b><span id="baifenbi_attachment" ></span></b>
-							<div class="progress">
-								<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-								</div>
-							</div>
-						</div>
-						<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-						<span id="attachment_title"></span>
-						<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-							<table id="upTable" class="table table-bordered table-condensed">
-								<thead>
-								<tr>
-									<th width="20%">文件要求</th>
-									<th width="35%">文件描述/文件</th>
-									<th width="20%">文件类型</th>
-									<th width="160px">上传时间</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="100px">操作</th>
-								</tr>
-								</thead>
-								<tbody id="file_attachment">
-								<c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-									<tr id="${fileAttachment.id}" pid="${fileAttachment.parent.id}">
-										<c:choose>
-											<c:when test="${fileAttachment.mustFlag == 1}">
-												<td class="tabMove" style="text-align: left;"><span style="color: red">* </span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-											</c:when>
-											<c:otherwise>
-												<c:choose>
-													<c:when test="${fileAttachment.flag == 0}">
-														<td class="tabMove" style="text-align: left;">${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-													</c:when>
-													<c:otherwise>
-														<td></td>
-													</c:otherwise>
-												</c:choose>
-											</c:otherwise>
-										</c:choose>
-										<td>
-											<c:choose>
-												<c:when test="${fileAttachment.flag == 0}">
-													<%--															<div><span class="file_nei">内容:</span><div class="file_neirong">${fileAttachment.attachName}</div></div>--%>
-													<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileAttachment.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileAttachment.attachTypes}</div>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${projectcontentinfo.uploadMode == 2}">
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'jpg')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'png')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'gif')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'bmp')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'jpeg')}">
-																	<img src="${fileAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileAttachment.temporaryUrl}','90%','90%')" alt="${fileAttachment.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)"  onclick="openPreview('${fileAttachment.temporaryUrl}',1)">${fileAttachment.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.temporaryUrl}',3)">${fileAttachment.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.temporaryUrl}',2)">${fileAttachment.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'jpg')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'png')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'gif')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'bmp')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'jpeg')}">
-																	<img src="${fileAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileAttachment.url}','90%','90%')" alt="${fileAttachment.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',1)">${fileAttachment.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',3)">${fileAttachment.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',2)">${fileAttachment.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-													<%--											<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileAttachment.url}','90%','90%')">${fileAttachment.attachName} ; </a>--%>
-												</c:otherwise>
-											</c:choose>
-										</td>
-										<c:choose>
-											<c:when test="${fileAttachment.flag == 0}">
-												<td class="op-td"></td>
-											</c:when>
-											<c:otherwise>
-												<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${fileAttachment.description}')">${fileAttachment.description}</td>
-											</c:otherwise>
-										</c:choose>
-
-
-										<td class="op-td" style="text-align:center;">
-											<c:choose>
-												<c:when test="${fileAttachment.flag == 0}">
-													<div></div>
-												</c:when>
-												<c:otherwise>
-													<fmt:formatDate value="${fileAttachment.createDate}" type="date"/>
-												</c:otherwise>
-											</c:choose>
-										</td>
-										<td class="op-td" style="text-align:center;">
-												${fileAttachment.fileSize}
-										</td>
-										<td class="op-td" style="text-align:center;">
-											<div class="op-btn-box" >
-												<c:choose>
-													<c:when test="${fileAttachment.flag == 0}">
-
-													</c:when>
-													<c:otherwise>
-
-														<%--附件下载删除--%>
-														<c:choose>
-															<c:when test="${projectReportRecord.uploadMode == 2}">
-																<c:choose>
-																	<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-																		<a href="${fileAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:when>
-																	<c:otherwise>
-																		<a href="${fileAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:otherwise>
-																</c:choose>
-															</c:when>
-															<c:otherwise>
-																<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-															</c:otherwise>
-														</c:choose>
-													</c:otherwise>
-												</c:choose>
-											</div>
-										</td>
-									</tr>
-								</c:forEach>
-								</tbody>
-							</table>
-						</div>
-					</div>
-					<div class="form-group layui-row">
-						<div class="form-group-label"><h2>依据性文件</h2></div>
-						<div class="layui-item nav-btns">
-								<%--<a id="gistdata_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>--%>
-						</div>
-						<div id="addFile_gistdata" style="display: none" class="upload-progress">
-							<span id="fileName_gistdata" ></span>
-							<span id="_gistdata" ></span>
-							<b><span id="baifenbi_gistdata" ></span></b>
-							<div class="progress">
-								<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
-								</div>
-							</div>
-						</div>
-						<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
-						<span id="gistdata_title"></span>
-						<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-							<table id="gistdata_upTable" class="table table-bordered table-condensed">
-								<thead>
-								<tr>
-									<th width="20%">文件要求</th>
-									<th width="35%">文件描述/文件</th>
-									<th width="20%">文件类型</th>
-									<th width="160px">上传时间</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="100px">操作</th>
-								</tr>
-								</thead>
-								<tbody id="file_gistdata">
-								<c:forEach items="${projectReportRecord.fileGistdataList}" var = "fileGistdata" varStatus="status">
-									<tr id="${fileGistdata.id}" pid="${fileGistdata.parent.id}">
-											<%-- <td>${status.index + 1}</td>--%>
-										<c:choose>
-											<c:when test="${fileGistdata.mustFlag == 1}">
-												<td class="tabMove" style="text-align: left;"><span style="color: red">* </span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-											</c:when>
-											<c:otherwise>
-												<c:choose>
-													<c:when test="${fileGistdata.flag == 0}">
-														<td class="tabMove" style="text-align: left;">${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-													</c:when>
-													<c:otherwise>
-														<td></td>
-													</c:otherwise>
-												</c:choose>
-											</c:otherwise>
-										</c:choose>
-										<td>
-											<c:choose>
-												<c:when test="${fileGistdata.flag == 0}">
-													<%--																	<div><span class="file_nei">内容:</span><div class="file_neirong">${fileGistdata.attachName}</div></div>--%>
-													<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileGistdata.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileGistdata.attachTypes}</div>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${projectcontentinfo.uploadMode == 2}">
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'jpg')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'png')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'gif')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'bmp')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'jpeg')}">
-																	<img src="${fileGistdata.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileGistdata.temporaryUrl}','90%','90%')" alt="${fileGistdata.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',1)">${fileGistdata.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',3)">${fileGistdata.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',2)">${fileGistdata.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'jpg')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'png')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'gif')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'bmp')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'jpeg')}">
-																	<img src="${fileGistdata.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileGistdata.url}','90%','90%')" alt="${fileGistdata.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',1)">${fileGistdata.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',3)">${fileGistdata.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',2)">${fileGistdata.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-													<%--												<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileGistdata.url}','90%','90%')">${fileGistdata.attachName} ; </a>--%>
-												</c:otherwise>
-											</c:choose>
-										</td>
-
-										<c:choose>
-											<c:when test="${fileGistdata.flag == 0}">
-												<td class="op-td"></td>
-											</c:when>
-											<c:otherwise>
-												<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${fileGistdata.description}')">${fileGistdata.description}</td>
-											</c:otherwise>
-										</c:choose>
-										<td class="op-td" style="text-align:center;">
-											<c:choose>
-												<c:when test="${fileGistdata.flag == 0}">
-													<div></div>
-												</c:when>
-												<c:otherwise>
-													<fmt:formatDate value="${fileGistdata.createDate}" type="date"/>
-												</c:otherwise>
-											</c:choose>
-										</td>
-										<td class="op-td"  style="text-align:center;">
-												${fileGistdata.fileSize}
-										</td>
-										<td class="op-td"  style="text-align:center;">
-											<div class="op-btn-box" >
-												<c:choose>
-													<c:when test="${fileGistdata.flag == 0}">
-
-													</c:when>
-													<c:otherwise>
-
-														<%--附件下载删除--%>
-														<c:choose>
-															<c:when test="${projectReportRecord.uploadMode == 2}">
-																<c:choose>
-																	<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'pdf')}">
-																		<a href="${fileGistdata.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:when>
-																	<c:otherwise>
-																		<a href="${fileGistdata.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:otherwise>
-																</c:choose>
-															</c:when>
-															<c:otherwise>
-																<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileGistdata.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-															</c:otherwise>
-														</c:choose>
-													</c:otherwise>
-												</c:choose>
-											</div>
-										</td>
-										<td style="display:none">${fileGistdata.id}</td>
-										<td style="display:none">${fileGistdata.mustFlag}</td>
-									</tr>
-								</c:forEach>
-								</tbody>
-							</table>
-						</div>
-					</div>
-					<div class="form-group layui-row">
-						<div class="form-group-label"><h2>其他文件</h2></div>
-						<div class="layui-item nav-btns">
-								<%--<a id="other_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>--%>
-						</div>
-						<div id="addFile_other" style="display: none" class="upload-progress">
-							<span id="fileName_other" ></span>
-							<span id="_other" ></span>
-							<b><span id="baifenbi_other" ></span></b>
-							<div class="progress">
-								<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
-								</div>
-							</div>
-						</div>
-						<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
-						<span id="other_title"></span>
-						<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-							<table id="upTable_other" class="table table-bordered table-condensed">
-								<thead>
-								<tr>
-									<th width="20%">文件要求</th>
-									<th width="35%">文件描述/文件</th>
-									<th width="20%">文件类型</th>
-									<th width="160px">上传时间</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="100px">操作</th>
-								</tr>
-								</thead>
-								<tbody id="file_other">
-								<c:forEach items="${projectReportRecord.fileOtherList}" var = "fileOther" varStatus="status">
-									<tr id="${fileOther.id}" pid="${fileOther.parent.id}">
-											<%-- <td>${status.index + 1}</td>--%>
-										<c:choose>
-											<c:when test="${fileOther.mustFlag == 1}">
-												<td class="tabMove" style="text-align: left;"><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-											</c:when>
-											<c:otherwise>
-												<c:choose>
-													<c:when test="${fileOther.flag == 0}">
-														<td class="tabMove" style="text-align: left;">${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-													</c:when>
-													<c:otherwise>
-														<td></td>
-													</c:otherwise>
-												</c:choose>
-											</c:otherwise>
-										</c:choose>
-										<td>
-											<c:choose>
-												<c:when test="${fileOther.flag == 0}">
-													<%--																	<div style="overflow: hidden"><span class="file_nei">内容:</span><div class="file_neirong">${fileOther.attachName}</div></div>--%>
-													<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileOther.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileOther.attachTypes}</div>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${projectcontentinfo.uploadMode == 2}">
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'jpg')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'png')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'gif')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'bmp')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'jpeg')}">
-																	<img src="${fileOther.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileOther.temporaryUrl}','90%','90%')" alt="${fileOther.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',1)">${fileOther.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',3)">${fileOther.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',2)">${fileOther.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'jpg')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'png')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'gif')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'bmp')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'jpeg')}">
-																	<img src="${fileOther.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileOther.url}','90%','90%')" alt="${fileOther.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',1)">${fileOther.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',3)">${fileOther.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',2)">${fileOther.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-													<!--													<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileOther.url}','90%','90%')">${fileOther.attachName} ; </a>-->
-												</c:otherwise>
-											</c:choose>
-										</td>
-
-
-										<c:choose>
-											<c:when test="${fileGistdata.flag == 0}">
-												<td class="op-td"></td>
-											</c:when>
-											<c:otherwise>
-												<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${fileOther.description}')">${fileOther.description}</td>
-											</c:otherwise>
-										</c:choose>
-										<td class="op-td" style="text-align:center;">
-											<c:choose>
-												<c:when test="${fileOther.flag == 0}">
-													<div></div>
-												</c:when>
-												<c:otherwise>
-													<fmt:formatDate value="${fileOther.createDate}" type="date"/>
-												</c:otherwise>
-											</c:choose>
-										</td>
-										<td class="op-td" style="text-align:center;">
-												${fileOther.fileSize}
-										</td>
-										<td class="op-td" style="text-align:center;">
-											<div class="op-btn-box" >
-												<c:choose>
-													<c:when test="${fileOther.flag == 0}">
-
-													</c:when>
-													<c:otherwise>
-														<%--附件下载删除--%>
-														<c:choose>
-															<c:when test="${projectReportRecord.uploadMode == 2}">
-																<c:choose>
-																	<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
-																		<a href="${fileOther.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:when>
-																	<c:otherwise>
-																		<a href="${fileOther.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:otherwise>
-																</c:choose>
-															</c:when>
-															<c:otherwise>
-																<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileOther.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-															</c:otherwise>
-														</c:choose>
-													</c:otherwise>
-												</c:choose>
-											</div>
-										</td>
-										<td style="display:none">${fileOther.id}</td>
-										<td style="display:none">${fileOther.mustFlag}</td>
-									</tr>
-								</c:forEach>
-								</tbody>
-							</table>
-						</div>
-					</div>
+					<!-- 成果文件模块引用 -->
+					<table:otherFileDisplay
+							title="成果文件"
+							onChangeFunc="insertTitle"
+							fileList="${projectReportRecord.fileAttachmentList}"
+							uploadMode="${projectReportRecord.uploadMode}"
+							moduleId="other"
+							projectContentInfo="${projectcontentinfo}"
+							projectReportRecord="${projectReportRecord}"/>
+
+					<!-- 依据性文件模块引用 -->
+					<table:otherFileDisplay
+							title="依据性文件"
+							onChangeFunc="gistdataInsertTitle"
+							fileList="${projectReportRecord.fileGistdataList}"
+							uploadMode="${projectReportRecord.uploadMode}"
+							moduleId="other"
+							projectContentInfo="${projectcontentinfo}"
+							projectReportRecord="${projectReportRecord}"/>
+
+
+					<!-- 其他文件模块引用 -->
+					<table:otherFileDisplay
+							title="其他文件"
+							onChangeFunc="otherInsertTitle"
+							fileList="${projectReportRecord.fileOtherList}"
+							uploadMode="${projectReportRecord.uploadMode}"
+							moduleId="other"
+							projectContentInfo="${projectcontentinfo}"
+							projectReportRecord="${projectReportRecord}"/>
 
 				</div>
 
@@ -1978,192 +1470,16 @@
 						</div>
 
 					</div>
-					<div class="form-group layui-row">
-						<div class="form-group-label"><h2>案例文件</h2></div>
-						<div id="addFile_caseBase" style="display: none" class="upload-progress">
-							<span id="fileName_caseBase" ></span>
-							<span id="_caseBase" ></span>
-							<b><span id="baifenbi_caseBase" ></span></b>
-							<div class="progress">
-								<div id="jindutiao_caseBase" class="progress-bar" style="width: 0%" aria-valuenow="0">
-								</div>
-							</div>
-						</div>
-						<input id="caseBase_file" type="file" name="caseBase_file" multiple="multiple" style="display: none;" onChange="if(this.value)caseBaseInsertTitle(this.value);"/>
-						<span id="caseBase_title"></span>
-						<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-							<table id="upTable_caseBase" class="table table-bordered table-condensed tree_table">
-								<thead>
-								<tr>
-										<%-- <th>序号</th>--%>
-									<th width="20%">文件要求</th>
-									<th width="35%">文件描述/文件</th>
-									<th width="20%">文件类型</th>
-									<th width="160px">上传时间</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="170px">操作</th>
-								</tr>
-								</thead>
-								<tbody id="file_caseBase">
-								<c:forEach items="${projectReportRecord.fileCaseBaseList}" var = "filecaseBase" varStatus="status">
-									<tr id="file_caseBase_${filecaseBase.id}_tr" onclick="listTr(this)">
-											<%-- <td>${status.index + 1}</td>--%>
-										<td style="display:none">${filecaseBase.id}</td>
-										<td style="display:none">${filecaseBase.mustFlag}</td>
-										<c:choose>
-											<c:when test="${filecaseBase.mustFlag == 1}">
-												<td class="tabMove" style="text-align: left;"><span class='default_open ' style="padding-right: 15px; "></span><span style="color: red">* </span>${filecaseBase.attachName}<input type="hidden" value="${filecaseBase.attachName}"/></td>
-											</c:when>
-											<c:otherwise>
-												<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${filecaseBase.attachName}<input type="hidden" value="${filecaseBase.attachName}"/></td>
-											</c:otherwise>
-										</c:choose>
-										<td>
-												<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${filecaseBase.attachName}</div></div>--%>
-											<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${filecaseBase.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${filecaseBase.attachTypes}</div>
-										</td>
-										<td></td>
-										<td></td>
-										<td></td>
-										<td class="op-td">
-											<div class="op-btn-box" >
-												<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${filecaseBase.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable_caseBase')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-											</div>
-										</td>
-										<td style="display:none">${filecaseBase.fileFlag}</td>
 
-									</tr>
-									<c:forEach items="${filecaseBase.workAttachments}" var = "workClientAttachment" varStatus="status">
-										<tr id="addFile_caseBase_${workClientAttachment.id}_tr" class="addFile_caseBase_${filecaseBase.id}_tr">
-											<td></td>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-															<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(filecaseBase.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																			<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																		</c:when>
-																		<c:otherwise>
-																			<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-															<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(filecaseBase.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																			<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																		</c:when>
-																		<c:otherwise>
-																			<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-											<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
-
-
-											<td class="op-td" style="text-align:center;">
-												<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-											</td>
-											<td class="op-td" style="text-align:center;">
-													${workClientAttachment.fileSize}
-											</td>
-											<td class="op-td">
-												<div class="op-btn-box" >
-														<%--附件下载删除--%>
-													<c:choose>
-														<c:when test="${projectReportRecord.uploadMode == 2}">
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-																	<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																</c:when>
-																<c:otherwise>
-																	<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																</c:otherwise>
-															</c:choose>
-														</c:when>
-														<c:otherwise>
-															<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-
-												</div>
-											</td>
-										</tr>
-									</c:forEach>
-								</c:forEach>
-								</tbody>
-							</table>
-						</div>
-					</div>
-					<script type="text/template" id="caseBaseTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="caseBaseTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','upTable_caseBase')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-					</script>
+					<!-- 案例文件模块 -->
+					<table:fileDisplay
+							title="案例文件"
+							onChangeFunc="caseBaseInsertTitle"
+							fileList="${projectReportRecord.fileCaseBaseList}"
+							projectId="${project.id}"
+							uploadMode="${projectReportRecord.uploadMode}"
+							showType="false"
+							moduleId="caseBase"/>
 
 				</div>
 
@@ -2325,83 +1641,6 @@
 	}
 </script>
 <script>
-	function openBill2(title,url,width,height,target,formId,tableId){
-		var rows = $(this).parent().prevAll().length + 1;
-		var frameIndex = parent.layer.getFrameIndex(window.name);
-		var urls = url+"&index="+frameIndex;
-		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
-			width='auto';
-			height='auto';
-		}else{//如果是PC端,根据用户设置的width和height显示。
-
-		}
-		top.layer.open({
-			type: 2,
-			area: [width, height],
-			title: title,
-			skin:"two-btns",
-			maxmin: false, //开启最大化最小化按钮
-			content: urls ,
-			btn: ['确定','关闭'],
-			yes: function(index, layero){
-				var body = top.layer.getChildFrame('body', index);
-				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
-				var inputForm = body.find('#inputForm');
-				var top_iframe;
-				if(target){
-					top_iframe = target;//如果指定了iframe,则在改frame中跳转
-				}else{
-					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
-				}
-				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
-				inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
-				var $document = iframeWin.contentWindow.document;
-
-				formSubmit2($document,formId,index,tableId);
-
-			},
-			cancel: function(index){
-			}
-		});
-	}
-	function formSubmit2($document,inputForm,index,tableId){
-
-		var validateForm = $($document.getElementById(inputForm)).validate({
-			submitHandler: function(form){
-				loading('正在提交,请稍等...');
-				form.submit();
-			},
-			errorContainer: "#messageBox",
-			errorPlacement: function(error, element) {
-				$($document.getElementById("#messageBox")).text("输入有误,请先更正。");
-				if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
-					error.appendTo(element.parent().parent());
-				} else {
-					error.insertAfter(element);
-				}
-			}
-		});
-		if(validateForm.form()){
-			var action = $document.getElementById(inputForm).action;
-			var handleInfo = $($document.getElementById(inputForm)).serialize();
-			$.ajax({
-				type : "POST",
-				url : action,
-				data : handleInfo,
-				//请求成功
-				success:function(data) {
-					var d = data;
-					//输出提示信息
-					if(d.str.length>0){
-						parent.layer.msg(d.str,{icon:1});
-					}
-					$("#"+tableId).load(location.href + " #"+tableId);
-					//关闭当前页
-					top.layer.close(index)
-				}
-			});
-		}
-	}
 
 
 	//新增行方法

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 143 - 878
src/main/webapp/webpage/modules/projectcontentinfo/projectCaseBaseSupplementView.jsp


+ 8 - 502
src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordCaseBaseForm.jsp

@@ -345,513 +345,19 @@
 			</div>
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>案例文件</h2></div>
-				<div id="addFile_caseBase" style="display: none" class="upload-progress">
-					<span id="fileName_caseBase" ></span>
-					<span id="_caseBase" ></span>
-					<b><span id="baifenbi_caseBase" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_caseBase" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="caseBase_file" type="file" name="caseBase_file" multiple="multiple" style="display: none;" onChange="if(this.value)caseBaseInsertTitle(this.value);"/>
-				<span id="caseBase_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable_caseBase" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-								<%-- <th>序号</th>--%>
-							<th width="20%">文件要求</th>
-							<th width="35%">文件描述/文件</th>
-							<th width="20%">文件类型</th>
-							<th width="160px">上传时间</th>
-							<th width="120px">文件大小(M)</th>
-							<th width="100px">同步状态</th>
-							<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_caseBase">
-						<c:forEach items="${projectReportRecord.fileCaseBaseList}" var = "filecaseBase" varStatus="status">
-							<tr id="file_caseBase_${filecaseBase.id}_tr" onclick="listTr(this)">
-									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none">${filecaseBase.id}</td>
-								<td style="display:none">${filecaseBase.mustFlag}</td>
-								<c:choose>
-									<c:when test="${filecaseBase.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open ' style="padding-right: 15px; "></span><span style="color: red">* </span>${filecaseBase.attachName}<input type="hidden" value="${filecaseBase.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${filecaseBase.attachName}<input type="hidden" value="${filecaseBase.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-										<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${filecaseBase.attachName}</div></div>--%>
-									<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${filecaseBase.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${filecaseBase.attachTypes}</div>
-								</td>
-								<td></td>
-								<td></td>
-								<td></td>
-								<td></td>
-								<td class="op-td">
-									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${filecaseBase.id}&projectId=${projectRecords.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable_caseBase')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${filecaseBase.fileFlag}</td>
-
-							</tr>
-							<c:forEach items="${filecaseBase.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="addFile_caseBase_${filecaseBase.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectReportRecord.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(filecaseBase.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(filecaseBase.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
-
-
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-									<td class="op-td" style="text-align:center;">
-											${workClientAttachment.fileSize}
-									</td>
-									<td class="op-td" style="text-align:center; color:${workClientAttachment.syncDifySync == '1' ? 'green' : 'orange'};">
-											${workClientAttachment.syncDifySync == '1' ? '已同步' : '未同步'}
-									</td>
-									<td class="op-td">
-										<div class="op-btn-box" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<script type="text/template" id="caseBaseTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="caseBaseTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
-                    </td>
-                    <td style="text-align:center;">
-						'未同步'
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','upTable_caseBase')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
+			<!-- 案例文件模块 -->
+			<table:fileDisplay
+					title="案例文件"
+					onChangeFunc="caseBaseInsertTitle"
+					fileList="${projectReportRecord.fileCaseBaseList}"
+					projectId="${projectRecords.id}"
+					uploadMode="${projectReportRecord.uploadMode}"
+					moduleId="caseBase"/>
 
 
 			<div class="form-group layui-row page-end"></div>
 		</form:form>
 	</div>
-<script>
-	function openBill2(title,url,width,height,target,formId,tableId){
-		var rows = $(this).parent().prevAll().length + 1;
-		var frameIndex = parent.layer.getFrameIndex(window.name);
-		var urls = url+"&index="+frameIndex;
-		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
-			width='auto';
-			height='auto';
-		}else{//如果是PC端,根据用户设置的width和height显示。
-
-		}
-		top.layer.open({
-			type: 2,
-			area: [width, height],
-			title: title,
-			skin:"two-btns",
-			maxmin: false, //开启最大化最小化按钮
-			content: urls ,
-			btn: ['确定','关闭'],
-			yes: function(index, layero){
-				var body = top.layer.getChildFrame('body', index);
-				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
-				var inputForm = body.find('#inputForm');
-				var top_iframe;
-				if(target){
-					top_iframe = target;//如果指定了iframe,则在改frame中跳转
-				}else{
-					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
-				}
-				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
-				inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
-				var $document = iframeWin.contentWindow.document;
-
-				formSubmit2($document,formId,index,tableId);
-
-			},
-			cancel: function(index){
-			}
-		});
-	}
-	function formSubmit2($document,inputForm,index,tableId){
-
-		var validateForm = $($document.getElementById(inputForm)).validate({
-			submitHandler: function(form){
-				loading('正在提交,请稍等...');
-				form.submit();
-			},
-			errorContainer: "#messageBox",
-			errorPlacement: function(error, element) {
-				$($document.getElementById("#messageBox")).text("输入有误,请先更正。");
-				if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
-					error.appendTo(element.parent().parent());
-				} else {
-					error.insertAfter(element);
-				}
-			}
-		});
-		if(validateForm.form()){
-			var action = $document.getElementById(inputForm).action;
-			var handleInfo = $($document.getElementById(inputForm)).serialize();
-			$.ajax({
-				type : "POST",
-				url : action,
-				data : handleInfo,
-				//请求成功
-				success:function(data) {
-					var d = data;
-					//输出提示信息
-					if(d.str.length>0){
-						parent.layer.msg(d.str,{icon:1});
-					}
-					$("#"+tableId).load(location.href + " #"+tableId);
-					//关闭当前页
-					top.layer.close(index)
-				}
-			});
-		}
-	}
-
-
-	//新增行方法
-	var fileAttachmentTpl = $("#fileAttachmentTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
-	var gistdataTpl = $("#gistdataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
-	var otherTpl = $("#otherTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
-	var caseBaseTpl = $("#caseBaseTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
-
-	function formAttachment(title,url,width,height,target,formId,divId){
-		var rows = $(this).parent().prevAll().length + 1;
-		var frameIndex = parent.layer.getFrameIndex(window.name);
-		var urls = url;
-		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
-			width='auto';
-			height='auto';
-		}else{//如果是PC端,根据用户设置的width和height显示。
-
-		}
-		top.layer.open({
-			type: 2,
-			area: [width, height],
-			title: title,
-			skin:"two-btns",
-			maxmin: false, //开启最大化最小化按钮
-			content: urls ,
-			btn: ['确定','关闭'],
-			yes: function(index, layero){
-				var body = top.layer.getChildFrame('body', index);
-				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
-				var inputForm = body.find('#inputForm');
-				var top_iframe;
-				inputForm.attr("action","${ctx}/projectTemplate/projectTemplate/getProjectTemplateInfo");//表单提交成功后,从服务器返回的url在当前tab中展示
-				var $document = iframeWin.contentWindow.document;
-				formSubmitAjax($document,formId,index,divId);
 
-			},
-			cancel: function(index){
-			}
-		});
-	}
-	function formSubmitAjax($document,inputForm,index,divId){
-		var validateForm = $($document.getElementById(inputForm)).validate({
-			submitHandler: function(form){
-				loading('正在提交,请稍等...');
-				form.submit();
-			},
-			errorContainer: "#messageBox",
-			errorPlacement: function(error, element) {
-				$($document.getElementById("#messageBox")).text("输入有误,请先更正。");
-				if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
-					error.appendTo(element.parent().parent());
-				} else {
-					error.insertAfter(element);
-				}
-			}
-		});
-		if(validateForm.form()){
-			$($document.getElementById(inputForm)).ajaxSubmit({
-				success:function(data) {
-					if(!data.success){
-						top.layer.msg("保存依据资料信息异常!",{icon:2});
-						return false;
-					}
-					var idx = ''
-					if(divId == 'file_attachment'){
-						idx = $("#file_attachment tr").length;
-						addRowBaseData("#file_attachment",idx,fileAttachmentTpl,data.body.projectAccessoryInfo);
-					}else if(divId == 'file_gistdata'){
-						idx = $("#file_gistdata tr").length;
-						addRowBaseData("#file_gistdata",idx,gistdataTpl,data.body.projectAccessoryInfo);
-					}else if(divId == 'file_other'){
-						idx = $("#file_other tr").length;
-						addRowBaseData("#file_other",idx,otherTpl,data.body.projectAccessoryInfo);
-					}else if(divId == 'file_caseBase'){
-						idx = $("#file_caseBase tr").length;
-						addRowBaseData("#file_caseBase",idx,caseBaseTpl,data.body.projectAccessoryInfo);
-					}
-					parent.layer.msg(data.msg,{icon:1});
-					top.layer.close(index)
-				}
-			});
-		}
-	}
-
-
-	function hasInArr(id,idArr) {
-		for(var i=0;i<idArr.length;i++){
-			if(id==$(idArr[i]).val()){
-				return true;
-			}
-		}
-		return false;
-	}
-	function existBaseData(id,length) {
-		for (var i=0;i<length;i++) {
-			var val = $('#file_attachment'+i+'_id').val();
-			if(id==val){
-				return true;
-			}
-		}
-		return false;
-	}
-
-	function addRowBaseData(list, idx, tpl, row){
-		bornTemplete(list, idx, tpl, row, idx);
-	}
-
-	function bornTemplete(list, idx, tpl, row, idx1){
-		var idx1 = '';
-		if(list == 'file_attachment'){
-			idx1 = $("#file_attachment tr").length +1;
-		}else if(list == 'file_gistdata'){
-			idx1 = $("#file_gistdata tr").length +1;
-		}else if(list == 'file_other'){
-			idx1 = $("#file_other tr").length +1;
-		}else if(list == 'file_caseBase'){
-			idx1 = $("#file_caseBase tr").length +1;
-		}
-
-		$(list).append(Mustache.render(tpl, {
-			idx: idx, delBtn: true, row: row,
-			order:idx1 + 1, idx1:idx1
-		}));
-		$(list+idx).find("select").each(function(){
-			$(this).val($(this).attr("data-value"));
-		});
-		$(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
-			var ss = $(this).attr("data-value").split(',');
-			for (var i=0; i<ss.length; i++){
-				if($(this).val() == ss[i]){
-					$(this).attr("checked","checked");
-				}
-			}
-		});
-	}
-	function delRowBaseData(obj, prefix,userId){
-		var id = $(prefix+"_id").val();
-		var currentUser = '${fns:getUser().id}';
-		var contentId = '${projectcontentinfo.projectContentData.id}';
-		console.log(contentId);
-		var condition = "${flag}";
-		$.ajax({
-			type:"post",
-			url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
-			data:{"contentId":contentId,"basedId":id,"condition":condition},
-			dataType:"json",
-			success:function(data){
-				if(data.success) {
-					if("according" == condition || "completion" == condition || "early" == condition || "claim" == condition || "design" == condition || "visa" == condition || "interim" == condition || "distribution" == condition || "material" == condition || "armor" == condition ){
-						$(obj).parent().parent().remove();
-					}else{
-						$(obj).parent().parent().remove();
-					}
-					if(data.body.inuse){
-						return;
-					}
-					if (currentUser == userId) {
-						confirmDelete('是否同步删除资料库的文件?','${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+id+'&id=${projectcontentinfo.id}&type=1');
-					}
-				}else {
-					top.layer.msg("删除依据资料失败!", {icon: 0});
-				}
-			}
-		})
-		return;
-	}
-
-	function delBaseData(obj, prefix,userId){
-		var id = $(prefix+"_id").val();
-		var currentUser = '${fns:getUser().id}';
-		var contentId = '${projectcontentinfo.projectContentData.id}';
-		console.log(contentId);
-		var condition = "${flag}";
-		$.ajax({
-			type:"post",
-			url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
-			data:{"contentId":contentId,"basedId":id,"condition":condition},
-			dataType:"json",
-			success:function(data){
-				if(data.success) {
-					if("according" == condition || "completion" == condition || "early" == condition || "claim" == condition || "design" == condition || "visa" == condition || "interim" == condition || "distribution" == condition || "material" == condition || "armor" == condition ){
-						$(obj).parent().parent().parent().remove();
-					}else{
-						$(obj).parent().parent().remove();
-					}
-					if(data.body.inuse){
-						return;
-					}
-					if (currentUser == userId) {
-						confirmDelete('是否同步删除资料库的文件?','${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+id+'&id=${projectcontentinfo.id}&type=1');
-					}
-				}else {
-					top.layer.msg("删除依据资料失败!", {icon: 0});
-				}
-			}
-		})
-		return;
-	}
-
-	function confirmDelete(mess, href){
-		top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
-			if (typeof href == 'function') {
-				href();
-			}else{
-				$.ajax({
-					url:href,
-					type:"post",
-					success:function(data){
-						if(data.success){
-							top.layer.msg("删除依据资料成功!", {icon: 0});
-						}
-					}
-				});
-			}
-			top.layer.close(index);
-		});
-		return false;
-	}
-</script>
 </body>
 </html>

+ 30 - 543
src/main/webapp/webpage/modules/ruralprojectrecords/cost/newReported/bzshbReportedAudit.jsp

@@ -2771,556 +2771,43 @@
             </div>
 
             <div class="form-group layui-row first hide" id="AccessoryView">
-                <div class="form-group layui-row">
-                    <div class="form-group-label"><h2>成果文件</h2></div>
-                    <div class="layui-item nav-btns">
-                    </div>
-                    <div id="addFile_attachment" style="display: none" class="upload-progress">
-                        <span id="fileName_attachment" ></span>
-                        <span id="_attachment" ></span>
-                        <b><span id="baifenbi_attachment" ></span></b>
-                        <div class="progress">
-                            <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                            </div>
-                        </div>
-                    </div>
-                    <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-                    <span id="attachment_title"></span>
-                    <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                        <table id="upTable" class="table table-bordered table-condensed">
-                            <thead>
-                            <tr>
-                                <th width="20%">文件要求</th>
-                                <th width="35%">文件描述/文件</th>
-                                <th width="20%">文件类型</th>
-                                <th width="160px">上传时间</th>
-                                <th width="120px">文件大小(M)</th>
-                                <th width="100px">操作</th>
-                            </tr>
-                            </thead>
-                            <tbody id="file_attachment">
-                            <c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-                                <tr id="${fileAttachment.id}" pid="${fileAttachment.parent.id}">
-                                    <c:choose>
-                                        <c:when test="${fileAttachment.mustFlag == 1}">
-                                            <td class="tabMove" style="text-align: left;"><span style="color: red">* </span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-                                        </c:when>
-                                        <c:otherwise>
-                                            <c:choose>
-                                                <c:when test="${fileAttachment.flag == 0}">
-                                                    <td class="tabMove" style="text-align: left;">${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-                                                </c:when>
-                                                <c:otherwise>
-                                                    <td></td>
-                                                </c:otherwise>
-                                            </c:choose>
-                                        </c:otherwise>
-                                    </c:choose>
-                                    <td>
-                                        <c:choose>
-                                            <c:when test="${fileAttachment.flag == 0}">
-                                                <%--															<div><span class="file_nei">内容:</span><div class="file_neirong">${fileAttachment.attachName}</div></div>--%>
-                                                <div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileAttachment.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileAttachment.attachTypes}</div>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <c:choose>
-                                                    <c:when test="${projectcontentinfo.uploadMode == 2}">
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'jpg')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'png')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'gif')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'bmp')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'jpeg')}">
-                                                                <img src="${fileAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileAttachment.temporaryUrl}','90%','90%')" alt="${fileAttachment.attachName}">
-                                                            </c:when>
-                                                            <c:otherwise>
-                                                                <c:choose>
-                                                                    <c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-                                                                        <a class="attention-info" href="javascript:void(0)"  onclick="openPreview('${fileAttachment.temporaryUrl}',1)">${fileAttachment.attachName} ; </a>
-                                                                    </c:when>
-                                                                    <c:otherwise>
-                                                                        <c:choose>
-                                                                            <c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'7z')}">
-                                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.temporaryUrl}',3)">${fileAttachment.attachName}</a>
-                                                                            </c:when>
-                                                                            <c:otherwise>
-                                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.temporaryUrl}',2)">${fileAttachment.attachName}</a>
-                                                                            </c:otherwise>
-                                                                        </c:choose>
-                                                                    </c:otherwise>
-                                                                </c:choose>
-                                                            </c:otherwise>
-                                                        </c:choose>
-                                                    </c:when>
-                                                    <c:otherwise>
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'jpg')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'png')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'gif')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'bmp')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'jpeg')}">
-                                                                <img src="${fileAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileAttachment.url}','90%','90%')" alt="${fileAttachment.attachName}">
-                                                            </c:when>
-                                                            <c:otherwise>
-                                                                <c:choose>
-                                                                    <c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-                                                                        <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',1)">${fileAttachment.attachName} ; </a>
-                                                                    </c:when>
-                                                                    <c:otherwise>
-                                                                        <c:choose>
-                                                                            <c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'7z')}">
-                                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',3)">${fileAttachment.attachName}</a>
-                                                                            </c:when>
-                                                                            <c:otherwise>
-                                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',2)">${fileAttachment.attachName}</a>
-                                                                            </c:otherwise>
-                                                                        </c:choose>
-                                                                    </c:otherwise>
-                                                                </c:choose>
-                                                            </c:otherwise>
-                                                        </c:choose>
-                                                    </c:otherwise>
-                                                </c:choose>
-                                                <%--											<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileAttachment.url}','90%','90%')">${fileAttachment.attachName} ; </a>--%>
-                                            </c:otherwise>
-                                        </c:choose>
-                                    </td>
-
-
-                                    <c:choose>
-                                        <c:when test="${fileAttachment.flag == 0}">
-                                            <td class="op-td"></td>
-                                        </c:when>
-                                        <c:otherwise>
-                                            <td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${fileAttachment.description}')">${fileAttachment.description}</td>
-                                        </c:otherwise>
-                                    </c:choose>
-
-
-                                    <td class="op-td" style="text-align:center;">
-                                        <c:choose>
-                                            <c:when test="${fileAttachment.flag == 0}">
-                                                <div></div>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <fmt:formatDate value="${fileAttachment.createDate}" type="date"/>
-                                            </c:otherwise>
-                                        </c:choose>
-                                    </td>
-                                    <td class="op-td" style="text-align:center;">
-                                            ${fileAttachment.fileSize}
-                                    </td>
-                                    <td class="op-td" style="text-align:center;">
-                                        <div class="op-btn-box" >
-                                            <c:choose>
-                                                <c:when test="${fileAttachment.flag == 0}">
-
-                                                </c:when>
-                                                <c:otherwise>
-
-                                                    <%--附件下载删除--%>
-                                                    <c:choose>
-                                                        <c:when test="${projectReportRecord.uploadMode == 2}">
-                                                            <c:choose>
-                                                                <c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-                                                                    <a href="${fileAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                                </c:when>
-                                                                <c:otherwise>
-                                                                    <a href="${fileAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                                </c:otherwise>
-                                                            </c:choose>
-                                                        </c:when>
-                                                        <c:otherwise>
-                                                            <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                        </c:otherwise>
-                                                    </c:choose>
-                                                </c:otherwise>
-                                            </c:choose>
-                                        </div>
-                                    </td>
-                                </tr>
-                            </c:forEach>
-                            </tbody>
-                        </table>
-                    </div>
-                </div>
-                <div class="form-group layui-row">
-                    <div class="form-group-label"><h2>依据性文件</h2></div>
-                    <div class="layui-item nav-btns">
-                            <%--<a id="gistdata_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>--%>
-                    </div>
-                    <div id="addFile_gistdata" style="display: none" class="upload-progress">
-                        <span id="fileName_gistdata" ></span>
-                        <span id="_gistdata" ></span>
-                        <b><span id="baifenbi_gistdata" ></span></b>
-                        <div class="progress">
-                            <div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                            </div>
-                        </div>
-                    </div>
-                    <input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
-                    <span id="gistdata_title"></span>
-                    <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                        <table id="gistdata_upTable" class="table table-bordered table-condensed">
-                            <thead>
-                            <tr>
-                                <th width="20%">文件要求</th>
-                                <th width="35%">文件描述/文件</th>
-                                <th width="20%">文件类型</th>
-                                <th width="160px">上传时间</th>
-                                <th width="120px">文件大小(M)</th>
-                                <th width="100px">操作</th>
-                            </tr>
-                            </thead>
-                            <tbody id="file_gistdata">
-                            <c:forEach items="${projectReportRecord.fileGistdataList}" var = "fileGistdata" varStatus="status">
-                                <tr id="${fileGistdata.id}" pid="${fileGistdata.parent.id}">
-                                        <%-- <td>${status.index + 1}</td>--%>
-                                    <c:choose>
-                                        <c:when test="${fileGistdata.mustFlag == 1}">
-                                            <td class="tabMove" style="text-align: left;"><span style="color: red">* </span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-                                        </c:when>
-                                        <c:otherwise>
-                                            <c:choose>
-                                                <c:when test="${fileGistdata.flag == 0}">
-                                                    <td class="tabMove" style="text-align: left;">${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-                                                </c:when>
-                                                <c:otherwise>
-                                                    <td></td>
-                                                </c:otherwise>
-                                            </c:choose>
-                                        </c:otherwise>
-                                    </c:choose>
-                                    <td>
-                                        <c:choose>
-                                            <c:when test="${fileGistdata.flag == 0}">
-                                                <%--																	<div><span class="file_nei">内容:</span><div class="file_neirong">${fileGistdata.attachName}</div></div>--%>
-                                                <div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileGistdata.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileGistdata.attachTypes}</div>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <c:choose>
-                                                    <c:when test="${projectcontentinfo.uploadMode == 2}">
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'jpg')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'png')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'gif')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'bmp')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'jpeg')}">
-                                                                <img src="${fileGistdata.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileGistdata.temporaryUrl}','90%','90%')" alt="${fileGistdata.attachName}">
-                                                            </c:when>
-                                                            <c:otherwise>
-                                                                <c:choose>
-                                                                    <c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'pdf')}">
-                                                                        <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',1)">${fileGistdata.attachName} ; </a>
-                                                                    </c:when>
-                                                                    <c:otherwise>
-                                                                        <c:choose>
-                                                                            <c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'7z')}">
-                                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',3)">${fileGistdata.attachName}</a>
-                                                                            </c:when>
-                                                                            <c:otherwise>
-                                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',2)">${fileGistdata.attachName}</a>
-                                                                            </c:otherwise>
-                                                                        </c:choose>
-                                                                    </c:otherwise>
-                                                                </c:choose>
-                                                            </c:otherwise>
-                                                        </c:choose>
-                                                    </c:when>
-                                                    <c:otherwise>
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'jpg')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'png')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'gif')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'bmp')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'jpeg')}">
-                                                                <img src="${fileGistdata.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileGistdata.url}','90%','90%')" alt="${fileGistdata.attachName}">
-                                                            </c:when>
-                                                            <c:otherwise>
-                                                                <c:choose>
-                                                                    <c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'pdf')}">
-                                                                        <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',1)">${fileGistdata.attachName} ; </a>
-                                                                    </c:when>
-                                                                    <c:otherwise>
-                                                                        <c:choose>
-                                                                            <c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'7z')}">
-                                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',3)">${fileGistdata.attachName}</a>
-                                                                            </c:when>
-                                                                            <c:otherwise>
-                                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',2)">${fileGistdata.attachName}</a>
-                                                                            </c:otherwise>
-                                                                        </c:choose>
-                                                                    </c:otherwise>
-                                                                </c:choose>
-                                                            </c:otherwise>
-                                                        </c:choose>
-                                                    </c:otherwise>
-                                                </c:choose>
-                                                <%--												<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileGistdata.url}','90%','90%')">${fileGistdata.attachName} ; </a>--%>
-                                            </c:otherwise>
-                                        </c:choose>
-                                    </td>
-
-
-                                    <c:choose>
-                                        <c:when test="${fileGistdata.flag == 0}">
-                                            <td class="op-td"></td>
-                                        </c:when>
-                                        <c:otherwise>
-                                            <td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${fileGistdata.description}')">${fileGistdata.description}</td>
-                                        </c:otherwise>
-                                    </c:choose>
-                                    <td class="op-td" style="text-align:center;">
-                                        <c:choose>
-                                            <c:when test="${fileGistdata.flag == 0}">
-                                                <div></div>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <fmt:formatDate value="${fileGistdata.createDate}" type="date"/>
-                                            </c:otherwise>
-                                        </c:choose>
-                                    </td>
-                                    <td class="op-td"  style="text-align:center;">
-                                            ${fileGistdata.fileSize}
-                                    </td>
-                                    <td class="op-td"  style="text-align:center;">
-                                        <div class="op-btn-box" >
-                                            <c:choose>
-                                                <c:when test="${fileGistdata.flag == 0}">
-
-                                                </c:when>
-                                                <c:otherwise>
-
-                                                    <%--附件下载删除--%>
-                                                    <c:choose>
-                                                        <c:when test="${projectReportRecord.uploadMode == 2}">
-                                                            <c:choose>
-                                                                <c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'pdf')}">
-                                                                    <a href="${fileGistdata.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                                </c:when>
-                                                                <c:otherwise>
-                                                                    <a href="${fileGistdata.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                                </c:otherwise>
-                                                            </c:choose>
-                                                        </c:when>
-                                                        <c:otherwise>
-                                                            <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileGistdata.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                        </c:otherwise>
-                                                    </c:choose>
-                                                </c:otherwise>
-                                            </c:choose>
-                                        </div>
-                                    </td>
-                                    <td style="display:none">${fileGistdata.id}</td>
-                                    <td style="display:none">${fileGistdata.mustFlag}</td>
-                                </tr>
-                            </c:forEach>
-                            </tbody>
-                        </table>
-                    </div>
-                </div>
-                <div class="form-group layui-row">
-                    <div class="form-group-label"><h2>其他文件</h2></div>
-                    <div class="layui-item nav-btns">
-                            <%--<a id="other_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>--%>
-                    </div>
-                    <div id="addFile_other" style="display: none" class="upload-progress">
-                        <span id="fileName_other" ></span>
-                        <span id="_other" ></span>
-                        <b><span id="baifenbi_other" ></span></b>
-                        <div class="progress">
-                            <div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                            </div>
-                        </div>
-                    </div>
-                    <input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
-                    <span id="other_title"></span>
-                    <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                        <table id="upTable_other" class="table table-bordered table-condensed">
-                            <thead>
-                            <tr>
-                                <th width="20%">文件要求</th>
-                                <th width="35%">文件描述/文件</th>
-                                <th width="20%">文件类型</th>
-                                <th width="160px">上传时间</th>
-                                <th width="120px">文件大小(M)</th>
-                                <th width="100px">操作</th>
-                            </tr>
-                            </thead>
-                            <tbody id="file_other">
-                            <c:forEach items="${projectReportRecord.fileOtherList}" var = "fileOther" varStatus="status">
-                                <tr id="${fileOther.id}" pid="${fileOther.parent.id}">
-                                        <%-- <td>${status.index + 1}</td>--%>
-                                    <c:choose>
-                                        <c:when test="${fileOther.mustFlag == 1}">
-                                            <td class="tabMove" style="text-align: left;"><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-                                        </c:when>
-                                        <c:otherwise>
-                                            <c:choose>
-                                                <c:when test="${fileOther.flag == 0}">
-                                                    <td class="tabMove" style="text-align: left;">${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-                                                </c:when>
-                                                <c:otherwise>
-                                                    <td></td>
-                                                </c:otherwise>
-                                            </c:choose>
-                                        </c:otherwise>
-                                    </c:choose>
-                                    <td>
-                                        <c:choose>
-                                            <c:when test="${fileOther.flag == 0}">
-                                                <%--																	<div style="overflow: hidden"><span class="file_nei">内容:</span><div class="file_neirong">${fileOther.attachName}</div></div>--%>
-                                                <div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileOther.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileOther.attachTypes}</div>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <c:choose>
-                                                    <c:when test="${projectcontentinfo.uploadMode == 2}">
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'jpg')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'png')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'gif')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'bmp')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'jpeg')}">
-                                                                <img src="${fileOther.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileOther.temporaryUrl}','90%','90%')" alt="${fileOther.attachName}">
-                                                            </c:when>
-                                                            <c:otherwise>
-                                                                <c:choose>
-                                                                    <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
-                                                                        <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',1)">${fileOther.attachName} ; </a>
-                                                                    </c:when>
-                                                                    <c:otherwise>
-                                                                        <c:choose>
-                                                                            <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'7z')}">
-                                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',3)">${fileOther.attachName}</a>
-                                                                            </c:when>
-                                                                            <c:otherwise>
-                                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',2)">${fileOther.attachName}</a>
-                                                                            </c:otherwise>
-                                                                        </c:choose>
-                                                                    </c:otherwise>
-                                                                </c:choose>
-                                                            </c:otherwise>
-                                                        </c:choose>
-                                                    </c:when>
-                                                    <c:otherwise>
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'jpg')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'png')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'gif')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'bmp')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'jpeg')}">
-                                                                <img src="${fileOther.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileOther.url}','90%','90%')" alt="${fileOther.attachName}">
-                                                            </c:when>
-                                                            <c:otherwise>
-                                                                <c:choose>
-                                                                    <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
-                                                                        <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',1)">${fileOther.attachName} ; </a>
-                                                                    </c:when>
-                                                                    <c:otherwise>
-                                                                        <c:choose>
-                                                                            <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'7z')}">
-                                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',3)">${fileOther.attachName}</a>
-                                                                            </c:when>
-                                                                            <c:otherwise>
-                                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',2)">${fileOther.attachName}</a>
-                                                                            </c:otherwise>
-                                                                        </c:choose>
-                                                                    </c:otherwise>
-                                                                </c:choose>
-                                                            </c:otherwise>
-                                                        </c:choose>
-                                                    </c:otherwise>
-                                                </c:choose>
-                                                <!--													<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileOther.url}','90%','90%')">${fileOther.attachName} ; </a>-->
-                                            </c:otherwise>
-                                        </c:choose>
-                                    </td>
 
-                                    <c:choose>
-                                        <c:when test="${fileOther.flag == 0}">
-                                            <td class="op-td"></td>
-                                        </c:when>
-                                        <c:otherwise>
-                                            <td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${fileOther.description}')">${fileOther.description}</td>
-                                        </c:otherwise>
-                                    </c:choose>
-                                    <td class="op-td" style="text-align:center;">
-                                        <c:choose>
-                                            <c:when test="${fileOther.flag == 0}">
-                                                <div></div>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <fmt:formatDate value="${fileOther.createDate}" type="date"/>
-                                            </c:otherwise>
-                                        </c:choose>
-                                    </td>
-                                    <td class="op-td" style="text-align:center;">
-                                            ${fileOther.fileSize}
-                                    </td>
-                                    <td class="op-td" style="text-align:center;">
-                                        <div class="op-btn-box" >
-                                            <c:choose>
-                                                <c:when test="${fileOther.flag == 0}">
 
-                                                </c:when>
-                                                <c:otherwise>
-                                                    <%--附件下载删除--%>
-                                                    <c:choose>
-                                                        <c:when test="${projectReportRecord.uploadMode == 2}">
-                                                            <c:choose>
-                                                                <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
-                                                                    <a href="${fileOther.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                                </c:when>
-                                                                <c:otherwise>
-                                                                    <a href="${fileOther.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                                </c:otherwise>
-                                                            </c:choose>
-                                                        </c:when>
-                                                        <c:otherwise>
-                                                            <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileOther.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                        </c:otherwise>
-                                                    </c:choose>
-                                                </c:otherwise>
-                                            </c:choose>
-                                        </div>
-                                    </td>
-                                    <td style="display:none">${fileOther.id}</td>
-                                    <td style="display:none">${fileOther.mustFlag}</td>
-                                </tr>
-                            </c:forEach>
-                            </tbody>
-                        </table>
-                    </div>
-                </div>
+                <!-- 成果文件模块引用 -->
+                <table:otherFileDisplay
+                        title="成果文件"
+                        onChangeFunc="insertTitle"
+                        fileList="${projectReportRecord.fileAttachmentList}"
+                        uploadMode="${projectReportRecord.uploadMode}"
+                        moduleId="other"
+                        projectContentInfo="${projectcontentinfo}"
+                        projectReportRecord="${projectReportRecord}"/>
+
+                <!-- 依据性文件模块引用 -->
+                <table:otherFileDisplay
+                        title="依据性文件"
+                        onChangeFunc="gistdataInsertTitle"
+                        fileList="${projectReportRecord.fileGistdataList}"
+                        uploadMode="${projectReportRecord.uploadMode}"
+                        moduleId="other"
+                        projectContentInfo="${projectcontentinfo}"
+                        projectReportRecord="${projectReportRecord}"/>
+
+
+                <!-- 其他文件模块引用 -->
+                <table:otherFileDisplay
+                        title="其他文件"
+                        onChangeFunc="otherInsertTitle"
+                        fileList="${projectReportRecord.fileOtherList}"
+                        uploadMode="${projectReportRecord.uploadMode}"
+                        moduleId="other"
+                        projectContentInfo="${projectcontentinfo}"
+                        projectReportRecord="${projectReportRecord}"/>
             </div>
 
         </div>
 
 
-
-
-
-
-
-
         <div class="form-group-label">
             <div style="float: right">
                 <a href="javascript:void(0);" style='background-color: #FFB800' onclick="openDialogre('个人模板列表', '${ctx}/auditTemplate/auditTemplate/templateList?identification=${identification}&name=${identificationName}','80%', '70%','','关闭')" class="nav-btn layui-btn layui-btn-sm"><i class="fa fa-file-excel-o"></i> 审核意见模板列表</a>

+ 62 - 529
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordForm.jsp

@@ -48,34 +48,41 @@
 				if(obj == 2){
 					$("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessage/holdSaveRecord");
 				}else{
+					var rows = $("#file_attachment tr"); // 获取当前组件的所有行
 					var leng = $("#file_attachment tr").length;
 					for(var i=0; i<leng; i++) {
-						var numberStr = $("#file_attachment tr").eq(i).find("td:first").html();
-						var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
-						var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
+						var row = rows.eq(i);
+						var numberStr = row.find("td:eq(0) .foid").html(); // 组件中存储ID的元素是class="foid"
+						var second = row.find("td:eq(1)").html(); // 第二列(隐藏列,存储mustFlag)
+						var fileFlag = row.find("td:last").html(); // 最后一列(隐藏列,存储fileFlag)
 						if(second == 1){
 							if(numberStr != undefined && numberStr !=null && numberStr !=''){
 								if (fileFlag==1){
 
 								}else{
 									top.layer.msg("请上传成果文件!", {icon: 0});
+									$("#onsubmit").val(true);
 									return false;
 								}
 							}
 						}
 					}
 					if(boolFlag){
+						var rows = $("#file_gistdata tr"); // 获取当前组件的所有行
 						var gistdata = $("#file_gistdata tr").length;
 						for(var i=0; i<gistdata; i++) {
-							var numberStr = $("#file_gistdata tr").eq(i).find("td:first").html();
-							var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
-							var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
+							var row = rows.eq(i);
+							var numberStr = row.find("td:eq(0) .foid").html(); // 组件中存储ID的元素是class="foid"
+							var second = row.find("td:eq(1)").html(); // 第二列(隐藏列,存储mustFlag)
+							var fileFlag = row.find("td:last").html(); // 最后一列(隐藏列,存储fileFlag)
+
 							if(second == 1){
 								if(numberStr != undefined && numberStr !=null && numberStr !=''){
 									if (fileFlag==1){
 
 									}else{
 										top.layer.msg("请上传依据性文件!", {icon: 0});
+										$("#onsubmit").val(true);
 										return false;
 									}
 								}
@@ -83,17 +90,21 @@
 						}
 					}
 					if(boolFlag){
+						var rows = $("#file_other tr"); // 获取当前组件的所有行
 						var other = $("#file_other tr").length;
 						for(var i=0; i<other; i++) {
-							var numberStr = $("#file_other tr").eq(i).find("td:first").html();
-							var second = $("#file_other tr").eq(i).find("td:eq(1)").html();
-							var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
+							var row = rows.eq(i);
+							var numberStr = row.find("td:eq(0) .foid").html(); // 组件中存储ID的元素是class="foid"
+							var second = row.find("td:eq(1)").html(); // 第二列(隐藏列,存储mustFlag)
+							var fileFlag = row.find("td:last").html(); // 最后一列(隐藏列,存储fileFlag)
+
 							if(second == 1){
 								if(numberStr != undefined && numberStr !=null && numberStr !=''){
 									if (fileFlag==1){
 
 									}else{
 										top.layer.msg("请上传其它文件!", {icon: 0});
+										$("#onsubmit").val(true);
 										return false;
 									}
 								}
@@ -232,531 +243,53 @@
 				</div>
 			</div>
 
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>成果文件</h2></div>
-				<div id="addFile_attachment" style="display: none" class="upload-progress">
-					<span id="fileName_attachment" ></span>
-					<span id="_attachment" ></span>
-					<b><span id="baifenbi_attachment" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-				<span id="attachment_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-							<th width="30%">文件类型</th>
-							<th width="">文件描述/文件</th>
-							<th width="100px">文件大小(M)</th>
-							<th width="150px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_attachment">
-						<c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr id="file_attachment_${fileAttachment.id}_tr" onclick="listTr(this)">
-								<td style="display:none">${fileAttachment.id}</td>
-								<td style="display:none">${fileAttachment.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileAttachment.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-										<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileAttachment.attachName}</div></div>--%>
-									<div><span style="font-weight: bold">文件格式及大小:</span>${fileAttachment.attachLength}M;  ${fileAttachment.attachTypes}</div>
-								</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}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileAttachment.fileFlag}</td>
-							</tr>
-							<c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_attachment_${fileAttachment.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectReportRecord.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td>
-													<img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-									<td class="op-td" style="text-align:center;">
-											${workClientAttachment.fileSize}
-									</td>
-									<td class="op-td">
-										<div class="op-btn-box" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<script type="text/template" id="fileAttachmentTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="fileAttachment{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
-
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>依据性文件</h2></div>
-				<div id="addFile_gistdata" style="display: none" class="upload-progress">
-					<span id="fileName_gistdata" ></span>
-					<span id="_gistdata" ></span>
-					<b><span id="baifenbi_gistdata" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
-				<span id="gistdata_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="gistdata_upTable" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-								<%-- <th>序号</th>--%>
-							<th width="30%">文件类型</th>
-							<th width="">文件描述/文件</th>
-							<th width="100px">文件大小(M)</th>
-							<th width="150px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_gistdata">
-						<c:forEach items="${projectReportRecord.fileGistdataList}" var = "fileGistdata" varStatus="status">
-							<tr id="file_gistdata_${fileGistdata.id}_tr" onclick="listTr(this)">
-									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none">${fileGistdata.id}</td>
-								<td style="display:none">${fileGistdata.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileGistdata.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-										<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileGistdata.attachName}</div></div>--%>
-									<div><span style="font-weight: bold">文件格式及大小:</span>${fileGistdata.attachLength}M;  ${fileGistdata.attachTypes}</div>
-								</td>
-								<td></td>
-								<td class="op-td">
-									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileGistdata.fileFlag}</td>
+			<%-- showAddButton="true" 显示添加按钮 --%>
+			<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+			<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+			<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+			<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="成果文件"
+					onChangeFunc="insertTitle"
+					fileList="${projectReportRecord.fileAttachmentList}"
+					projectId="${project.id}"
+					uploadMode="${projectReportRecord.uploadMode}"
+					moduleId="attachment"
+					showEditBtn="true"/>
+
+			<%-- showAddButton="true" 显示添加按钮 --%>
+			<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+			<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+			<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+			<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="依据性文件"
+					onChangeFunc="gistdataInsertTitle"
+					fileList="${projectReportRecord.fileGistdataList}"
+					projectId="${project.id}"
+					uploadMode="${projectReportRecord.uploadMode}"
+					moduleId="gistdata"
+					showEditBtn="true"/>
+
+
+			<%-- showAddButton="true" 显示添加按钮 --%>
+			<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+			<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+			<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+			<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="其他文件"
+					onChangeFunc="otherInsertTitle"
+					fileList="${projectReportRecord.fileOtherList}"
+					projectId="${project.id}"
+					uploadMode="${projectReportRecord.uploadMode}"
+					moduleId="other"
+					showEditBtn="true"/>
 
-							</tr>
-							<c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_gistdata_${fileGistdata.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectReportRecord.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-									<td class="op-td" style="text-align:center;">
-											${workClientAttachment.fileSize}
-									</td>
-									<td class="op-td">
-										<div class="op-btn-box" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<script type="text/template" id="gistdataTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="gistdataTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
 
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
 
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>其他文件</h2></div>
-				<div id="addFile_other" style="display: none" class="upload-progress">
-					<span id="fileName_other" ></span>
-					<span id="_other" ></span>
-					<b><span id="baifenbi_other" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
-				<span id="other_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable_other" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-								<%-- <th>序号</th>--%>
-							<th width="30%">文件类型</th>
-							<th width="">文件描述/文件</th>
-							<th width="100px">文件大小(M)</th>
-							<th width="150px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_other">
-						<c:forEach items="${projectReportRecord.fileOtherList}" var = "fileOther" varStatus="status">
-							<tr id="file_other_${fileOther.id}_tr" onclick="listTr(this)">
-									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none">${fileOther.id}</td>
-								<td style="display:none">${fileOther.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileOther.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open ' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-										<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileOther.attachName}</div></div>--%>
-									<div><span style="font-weight: bold">文件格式及大小:</span>${fileOther.attachLength}M;  ${fileOther.attachTypes}</div>
-								</td>
-								<td></td>
-								<td class="op-td">
-									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileOther.fileFlag}</td>
 
-							</tr>
-							<c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="addFile_other_${fileOther.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectReportRecord.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-									<td class="op-td" style="text-align:center;">
-											${workClientAttachment.fileSize}
-									</td>
-									<td class="op-td">
-										<div class="op-btn-box" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<script type="text/template" id="otherTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="otherTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
 
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
 			<div class="form-group layui-row page-end"></div>
 		</form:form>
 	</div>

+ 60 - 604
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectReportRecord/projectReportRecordModify.jsp

@@ -48,44 +48,33 @@
 						//$("#inputForm").attr("action","${ctx}/projectcontentinfo/projectReportRecord/store");
 						$("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessage/holdSaveRecord");
 					}else{
+						var rows = $("#file_attachment tr"); // 获取当前组件的所有行
 						var leng = $("#file_attachment tr").length;
 						for(var i=0; i<leng; i++) {
-							var numberStr = $("#file_attachment tr").eq(i).find("td:first").html();
-							var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
-							var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
-
+							var row = rows.eq(i);
+							var numberStr = row.find("td:eq(0) .foid").html(); // 组件中存储ID的元素是class="foid"
+							var second = row.find("td:eq(1)").html(); // 第二列(隐藏列,存储mustFlag)
+							var fileFlag = row.find("td:last").html(); // 最后一列(隐藏列,存储fileFlag)
 							if(second == 1){
 								if(numberStr != undefined && numberStr !=null && numberStr !=''){
 									if (fileFlag==1){
 
 									}else{
 										top.layer.msg("请上传成果文件!", {icon: 0});
+										$("#onsubmit").val(true);
 										return false;
 									}
-									<%--$.ajax({--%>
-									<%--	type: 'post',--%>
-									<%--	url:'${ctx}/projectAccessoryRelation/projectAccessoryRelation/getAttachmentCount',--%>
-									<%--	data: {"attachmentId":numberStr,"projectId":projectId},--%>
-									<%--	dataType: "json",--%>
-									<%--	async: false--%>
-									<%--}).success(function (result) {--%>
-									<%--	if(result == 0){--%>
-									<%--		boolFlag = false;--%>
-									<%--		top.layer.msg("请上传成果文件!", {icon: 0});--%>
-									<%--		return false;--%>
-									<%--	}--%>
-									<%--}).error(function () {--%>
-									<%--	top.layer.msg("文件载入失败!");--%>
-									<%--});--%>
 								}
 							}
 						}
 						if(boolFlag){
+							var rows = $("#file_gistdata tr"); // 获取当前组件的所有行
 							var gistdata = $("#file_gistdata tr").length;
 							for(var i=0; i<gistdata; i++) {
-								var numberStr = $("#file_gistdata tr").eq(i).find("td:first").html();
-								var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
-								var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
+								var row = rows.eq(i);
+								var numberStr = row.find("td:eq(0) .foid").html(); // 组件中存储ID的元素是class="foid"
+								var second = row.find("td:eq(1)").html(); // 第二列(隐藏列,存储mustFlag)
+								var fileFlag = row.find("td:last").html(); // 最后一列(隐藏列,存储fileFlag)
 
 								if(second == 1){
 									if(numberStr != undefined && numberStr !=null && numberStr !=''){
@@ -93,33 +82,21 @@
 
 										}else{
 											top.layer.msg("请上传依据性文件!", {icon: 0});
+											$("#onsubmit").val(true);
 											return false;
 										}
-										<%--$.ajax({--%>
-										<%--	type: 'post',--%>
-										<%--	url:'${ctx}/projectAccessoryRelation/projectAccessoryRelation/getAttachmentCount',--%>
-										<%--	data: {"attachmentId":numberStr,"projectId":projectId},--%>
-										<%--	dataType: "json",--%>
-										<%--	async: false--%>
-										<%--}).success(function (result) {--%>
-										<%--	if(result == 0){--%>
-										<%--		boolFlag = false;--%>
-										<%--		top.layer.msg("请上传依据性文件!", {icon: 0});--%>
-										<%--		return false;--%>
-										<%--	}--%>
-										<%--}).error(function () {--%>
-										<%--	top.layer.msg("文件载入失败!");--%>
-										<%--});--%>
 									}
 								}
 							}
 						}
 						if(boolFlag){
+							var rows = $("#file_other tr"); // 获取当前组件的所有行
 							var other = $("#file_other tr").length;
 							for(var i=0; i<other; i++) {
-								var numberStr = $("#file_other tr").eq(i).find("td:first").html();
-								var second = $("#file_other tr").eq(i).find("td:eq(1)").html();
-								var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
+								var row = rows.eq(i);
+								var numberStr = row.find("td:eq(0) .foid").html(); // 组件中存储ID的元素是class="foid"
+								var second = row.find("td:eq(1)").html(); // 第二列(隐藏列,存储mustFlag)
+								var fileFlag = row.find("td:last").html(); // 最后一列(隐藏列,存储fileFlag)
 
 								if(second == 1){
 									if(numberStr != undefined && numberStr !=null && numberStr !=''){
@@ -127,23 +104,9 @@
 
 										}else{
 											top.layer.msg("请上传其它文件!", {icon: 0});
+											$("#onsubmit").val(true);
 											return false;
 										}
-										<%--$.ajax({--%>
-										<%--	type: 'post',--%>
-										<%--	url:'${ctx}/projectAccessoryRelation/projectAccessoryRelation/getAttachmentCount',--%>
-										<%--	data: {"attachmentId":numberStr,"projectId":projectId},--%>
-										<%--	dataType: "json",--%>
-										<%--	async: false--%>
-										<%--}).success(function (result) {--%>
-										<%--	if(result == 0){--%>
-										<%--		boolFlag = false;--%>
-										<%--		top.layer.msg("请上传其他文件!", {icon: 0});--%>
-										<%--		return false;--%>
-										<%--	}--%>
-										<%--}).error(function () {--%>
-										<%--	top.layer.msg("文件载入失败!");--%>
-										<%--});--%>
 									}
 								}
 							}
@@ -374,561 +337,54 @@
 				</div>
 			</div>
 
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>成果文件</h2></div>
-				<div id="addFile_attachment" style="display: none" class="upload-progress">
-					<span id="fileName_attachment" ></span>
-					<span id="_attachment" ></span>
-					<b><span id="baifenbi_attachment" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-				<span id="attachment_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-							<th width="20%">文件要求</th>
-							<th width="35%">文件描述/文件</th>
-							<th width="20%">文件类型</th>
-							<th width="160px">上传时间</th>
-							<th width="120px">文件大小(M)</th>
-							<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_attachment">
-						<c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr id="file_attachment_${fileAttachment.id}_tr" onclick="listTr(this)">
-								<td style="display:none">${fileAttachment.id}</td>
-								<td style="display:none">${fileAttachment.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileAttachment.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-										<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileAttachment.attachName}</div></div>--%>
-											<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileAttachment.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileAttachment.attachTypes}</div>
-								</td>
-								<td></td>
-								<td></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}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileAttachment.fileFlag}</td>
-							</tr>
-							<c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_attachment_${fileAttachment.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectReportRecord.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td>
-													<img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
+			<%-- showAddButton="true" 显示添加按钮 --%>
+			<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+			<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+			<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+			<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="成果文件"
+					onChangeFunc="insertTitle"
+					fileList="${projectReportRecord.fileAttachmentList}"
+					projectId="${project.id}"
+					uploadMode="${projectReportRecord.uploadMode}"
+					moduleId="attachment"
+					showEditBtn="true"/>
+
+			<%-- showAddButton="true" 显示添加按钮 --%>
+			<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+			<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+			<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+			<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="依据性文件"
+					onChangeFunc="gistdataInsertTitle"
+					fileList="${projectReportRecord.fileGistdataList}"
+					projectId="${project.id}"
+					uploadMode="${projectReportRecord.uploadMode}"
+					moduleId="gistdata"
+					showEditBtn="true"/>
+
+
+			<%-- showAddButton="true" 显示添加按钮 --%>
+			<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+			<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+			<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+			<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="其他文件"
+					onChangeFunc="otherInsertTitle"
+					fileList="${projectReportRecord.fileOtherList}"
+					projectId="${project.id}"
+					uploadMode="${projectReportRecord.uploadMode}"
+					moduleId="other"
+					showEditBtn="true"/>
 
 
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-									<td class="op-td" style="text-align:center;">
-											${workClientAttachment.fileSize}
-									</td>
-									<td class="op-td">
-										<div class="op-btn-box" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<script type="text/template" id="fileAttachmentTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="fileAttachment{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
 
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>依据性文件</h2></div>
-				<div id="addFile_gistdata" style="display: none" class="upload-progress">
-					<span id="fileName_gistdata" ></span>
-					<span id="_gistdata" ></span>
-					<b><span id="baifenbi_gistdata" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
-				<span id="gistdata_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="gistdata_upTable" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-								<%-- <th>序号</th>--%>
-									<th width="20%">文件要求</th>
-									<th width="35%">文件描述/文件</th>
-									<th width="20%">文件类型</th>
-									<th width="160px">上传时间</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_gistdata">
-						<c:forEach items="${projectReportRecord.fileGistdataList}" var = "fileGistdata" varStatus="status">
-							<tr id="file_gistdata_${fileGistdata.id}_tr" onclick="listTr(this)">
-									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none">${fileGistdata.id}</td>
-								<td style="display:none">${fileGistdata.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileGistdata.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-										<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileGistdata.attachName}</div></div>--%>
-											<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileGistdata.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileGistdata.attachTypes}</div>
-								</td>
-								<td></td>
-								<td></td>
-								<td></td>
-								<td class="op-td">
-									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileGistdata.fileFlag}</td>
 
-							</tr>
-							<c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_gistdata_${fileGistdata.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectReportRecord.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
 
 
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-									<td class="op-td" style="text-align:center;">
-											${workClientAttachment.fileSize}
-									</td>
-									<td class="op-td">
-										<div class="op-btn-box" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<script type="text/template" id="gistdataTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="gistdataTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
-
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>其他文件</h2></div>
-				<div id="addFile_other" style="display: none" class="upload-progress">
-					<span id="fileName_other" ></span>
-					<span id="_other" ></span>
-					<b><span id="baifenbi_other" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
-				<span id="other_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable_other" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-								<%-- <th>序号</th>--%>
-									<th width="20%">文件要求</th>
-									<th width="35%">文件描述/文件</th>
-									<th width="20%">文件类型</th>
-									<th width="160px">上传时间</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_other">
-						<c:forEach items="${projectReportRecord.fileOtherList}" var = "fileOther" varStatus="status">
-							<tr id="file_other_${fileOther.id}_tr" onclick="listTr(this)">
-									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none">${fileOther.id}</td>
-								<td style="display:none">${fileOther.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileOther.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open ' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-										<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileOther.attachName}</div></div>--%>
-											<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileOther.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileOther.attachTypes}</div>
-								</td>
-								<td></td>
-								<td></td>
-								<td></td>
-								<td class="op-td">
-									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileOther.fileFlag}</td>
-
-							</tr>
-							<c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="addFile_other_${fileOther.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectReportRecord.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
-
-
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-									<td class="op-td" style="text-align:center;">
-											${workClientAttachment.fileSize}
-									</td>
-									<td class="op-td">
-										<div class="op-btn-box" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<script type="text/template" id="otherTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="otherTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>审批流程</h2></div>
 				<div class="layui-item layui-col-xs12 form-table-container" >

+ 56 - 876
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/new/reportForm.jsp

@@ -164,10 +164,12 @@
 										top.layer.msg("造价咨询营业收入必须大于0!", {icon: 0});
 										return false;
 									}
+									var rows = $("#file_attachment tr"); // 获取当前组件的所有行
 									for(var i=0; i<leng; i++) {
-										var numberStr = $("#file_attachment tr").eq(i).find("td:first").find(".faid").html();
-										var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
-										var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
+										var row = rows.eq(i);
+										var numberStr = row.find("td:eq(0) .foid").html(); // 组件中存储ID的元素是class="foid"
+										var second = row.find("td:eq(1)").html(); // 第二列(隐藏列,存储mustFlag)
+										var fileFlag = row.find("td:last").html(); // 最后一列(隐藏列,存储fileFlag)
 										if(second == 1){
 											if(numberStr != undefined && numberStr !=null && numberStr !=''){
 												if (fileFlag==1){
@@ -188,11 +190,13 @@
 										return false;
 									}
 									if(boolFlag){
+										var rows = $("#file_gistdata tr"); // 获取当前组件的所有行
 										var gistdata = $("#file_gistdata tr").length;
 										for(var i=0; i<gistdata; i++) {
-											var numberStr = $("#file_gistdata tr").eq(i).find("td:first").find(".fgid").html();
-											var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
-											var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
+											var row = rows.eq(i);
+											var numberStr = row.find("td:eq(0) .foid").html(); // 组件中存储ID的元素是class="foid"
+											var second = row.find("td:eq(1)").html(); // 第二列(隐藏列,存储mustFlag)
+											var fileFlag = row.find("td:last").html(); // 最后一列(隐藏列,存储fileFlag)
 
 											if(second == 1){
 												if(numberStr != undefined && numberStr !=null && numberStr !=''){
@@ -207,11 +211,13 @@
 										}
 									}
 									if(boolFlag){
+										var rows = $("#file_other tr"); // 获取当前组件的所有行
 										var other = $("#file_other tr").length;
 										for(var i=0; i<other; i++) {
-											var numberStr = $("#file_other tr").eq(i).find("td:first").find(".foid").html();
-											var second = $("#file_other tr").eq(i).find("td:eq(1)").html();
-											var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
+											var row = rows.eq(i);
+											var numberStr = row.find("td:eq(0) .foid").html(); // 组件中存储ID的元素是class="foid"
+											var second = row.find("td:eq(1)").html(); // 第二列(隐藏列,存储mustFlag)
+											var fileFlag = row.find("td:last").html(); // 最后一列(隐藏列,存储fileFlag)
 
 											if(second == 1){
 												if(numberStr != undefined && numberStr !=null && numberStr !=''){
@@ -1718,578 +1724,49 @@
 				</div>
 			</c:if>
 
-			<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=${projectRecords.id}&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>
-					<b><span id="baifenbi_attachment" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-				<span id="attachment_title"></span>--%>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-							<th width="20%">文件要求</th>
-							<th width="35%">文件描述/文件</th>
-							<th width="20%">文件类型</th>
-							<th width="160px">上传时间</th>
-							<th width="120px">文件大小(M)</th>
-							<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_attachment">
-						<c:forEach items="${projectcontentinfo.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr id="file_attachment_${fileAttachment.id}_tr_fu" onclick="listTr(this)">
-								<td style="display:none"><span class="faid">${fileAttachment.id}</span></td>
-								<td style="display:none">${fileAttachment.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileAttachment.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-<%--									<div style="overflow: hidden"><span class="file_nei">内容:</span><div class="file_neirong">${fileAttachment.attachName}</div></div>--%>
-									<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileAttachment.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileAttachment.attachTypes}</div>
-								</td>
-								<td></td>
-								<td></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=${projectRecords.id}&uploadMode=${projectcontentinfo.uploadMode}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileAttachment.fileFlag}</td>
-
-							</tr>
-							<c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_attachment_${fileAttachment.id}_tr_fu">
-									<td></td>
-										<c:choose>
-										<c:when test="${projectcontentinfo.uploadMode == 2}">
-										<c:choose>
-										<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-									<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-										</c:when>
-										<c:otherwise>
-										<c:choose>
-										<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-									<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-									</c:when>
-									<c:otherwise>
-										<c:choose>
-											<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-												<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-											</c:when>
-											<c:otherwise>
-												<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-											</c:otherwise>
-										</c:choose>
-									</c:otherwise>
-									</c:choose>
-									</c:otherwise>
-									</c:choose>
-									</c:when>
-									<c:otherwise>
-										<c:choose>
-											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-												<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-											</c:when>
-											<c:otherwise>
-												<c:choose>
-													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-														<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-													</c:when>
-													<c:otherwise>
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-															</c:when>
-															<c:otherwise>
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-															</c:otherwise>
-														</c:choose>
-													</c:otherwise>
-												</c:choose>
-											</c:otherwise>
-										</c:choose>
-									</c:otherwise>
-									</c:choose>
-<%--										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>--%>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
-
-
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-
-									<td class="op-td">${workClientAttachment.fileSize}</td>
-									<td class="op-td">
-										<div class="op-btn-box" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectcontentinfo.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-
-												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<script type="text/template" id="fileAttachmentTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="fileAttachment{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
-
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>依据性文件</h2></div>
-<%--				<div 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=${projectRecords.id}&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>
-					<b><span id="baifenbi_gistdata" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
-				<span id="gistdata_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="gistdata_upTable" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-							<th width="20%">文件要求</th>
-							<th width="35%">文件描述/文件</th>
-							<th width="20%">文件类型</th>
-							<th width="160px">上传时间</th>
-							<th width="120px">文件大小(M)</th>
-							<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_gistdata">
-						<c:forEach items="${projectcontentinfo.fileGistdataList}" var = "fileGistdata" varStatus="status">
-							<tr  id="file_gistdata_${fileGistdata.id}_tr" onclick="listTr(this)">
-									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none"><span class="fgid">${fileGistdata.id}</span></td>
-								<td style="display:none">${fileGistdata.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileGistdata.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-<%--									<div style="overflow: hidden"><span class="file_nei">内容:</span><div class="file_neirong">${fileGistdata.attachName}</div></div>--%>
-	<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileGistdata.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileGistdata.attachTypes}</div>
-								</td>
-								<td></td>
-										<td></td>
-										<td></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}&uploadMode=${projectcontentinfo.uploadMode}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-										<td style="display:none">${fileGistdata.fileFlag}</td>
-
-							</tr>
-							<c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_gistdata_${fileGistdata.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectcontentinfo.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-<%--									<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a></td>--%>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
-
-
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-									<td class="op-td">
-										${workClientAttachment.fileSize}
-									</td>
-									<td class="op-td">
-										<div class="op-btn-box" >
-
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectcontentinfo.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-
-												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<script type="text/template" id="gistdataTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="gistdataTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
-
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>其他文件</h2></div>
-<%--				<div 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=${projectRecords.id}&reviewFee='+$('#reviewFee').val(),'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>
-					<b><span id="baifenbi_other" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
-				<span id="other_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable_other" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-							<th width="20%">文件要求</th>
-							<th width="35%">文件描述/文件</th>
-							<th width="20%">文件类型</th>
-							<th width="160px">上传时间</th>
-							<th width="120px">文件大小(M)</th>
-							<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_other">
-						<c:forEach items="${projectcontentinfo.fileOtherList}" var = "fileOther" varStatus="status">
-							<tr id="file_other_${fileOther.id}_tr" onclick="listTr(this)">
-									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none"><span class="foid">${fileOther.id}</span></td>
-								<td style="display:none">${fileOther.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileOther.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther	.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-<%--									<div style="overflow: hidden"><span class="file_nei">内容:</span><div class="file_neirong">${fileOther.attachName}</div></div>--%>
-	<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileOther.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileOther.attachTypes}</div>
-								</td>
-								<td></td>
-										<td></td>
-										<td></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}&uploadMode=${projectcontentinfo.uploadMode}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileOther.fileFlag}</td>
-							</tr>
-							<c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_other_${fileOther.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectcontentinfo.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
-
 
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-									<td>${workClientAttachment.fileSize}</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" >
+				<%-- showAddButton="true" 显示添加按钮 --%>
+				<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+				<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+				<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+				<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="成果文件"
+					onChangeFunc="insertTitle"
+					fileList="${projectcontentinfo.fileAttachmentList}"
+					projectId="${projectRecords.id}"
+					uploadMode="${projectcontentinfo.uploadMode}"
+					moduleId="attachment"
+					showEditBtn="true"/>
+
+				<%-- showAddButton="true" 显示添加按钮 --%>
+				<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+				<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+				<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+				<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="依据性文件"
+					onChangeFunc="gistdataInsertTitle"
+					fileList="${projectcontentinfo.fileGistdataList}"
+					projectId="${projectRecords.id}"
+					uploadMode="${projectcontentinfo.uploadMode}"
+					moduleId="gistdata"
+					showEditBtn="true"/>
+
+			<%-- showAddButton="true" 显示添加按钮 --%>
+			<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+			<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+			<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+			<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="其他文件"
+					onChangeFunc="otherInsertTitle"
+					fileList="${projectcontentinfo.fileOtherList}"
+					projectId="${projectRecords.id}"
+					uploadMode="${projectcontentinfo.uploadMode}"
+					moduleId="other"
+					showEditBtn="true"/>
 
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectcontentinfo.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-
-												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<script type="text/template" id="otherTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="otherTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
 
 			<div class="form-group layui-row">
 			<div class="form-group-label" style="overflow:hidden">
@@ -2496,303 +1973,6 @@
 	}
 
 </script>
-<script>
-	function openBill2(title,url,width,height,target,formId,tableId){
-		var rows = $(this).parent().prevAll().length + 1;
-		var frameIndex = parent.layer.getFrameIndex(window.name);
-		var urls = url+"&index="+frameIndex;
-		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
-			width='auto';
-			height='auto';
-		}else{//如果是PC端,根据用户设置的width和height显示。
-
-		}
-		top.layer.open({
-			type: 2,
-			area: [width, height],
-			title: title,
-			skin:"two-btns",
-			maxmin: false, //开启最大化最小化按钮
-			content: urls ,
-			btn: ['确定','关闭'],
-			yes: function(index, layero){
-				var body = top.layer.getChildFrame('body', index);
-				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
-				var inputForm = body.find('#inputForm');
-				var top_iframe;
-				if(target){
-					top_iframe = target;//如果指定了iframe,则在改frame中跳转
-				}else{
-					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
-				}
-				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
-				inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
-				var $document = iframeWin.contentWindow.document;
-
-				formSubmit2($document,formId,index,tableId);
-
-			},
-			cancel: function(index){
-			},
-			end:function () {
-				var reviewFee = $("#reviewFee").val();
-				$("#"+tableId).load(location.href+"&reviewFee="+reviewFee + " #"+tableId);
-			}
-		});
-	}
-	function formSubmit2($document,inputForm,index,tableId){
-
-		var validateForm = $($document.getElementById(inputForm)).validate({
-			submitHandler: function(form){
-				loading('正在提交,请稍等...');
-				form.submit();
-			},
-			errorContainer: "#messageBox",
-			errorPlacement: function(error, element) {
-				$($document.getElementById("#messageBox")).text("输入有误,请先更正。");
-				if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
-					error.appendTo(element.parent().parent());
-				} else {
-					error.insertAfter(element);
-				}
-			}
-		});
-		if(validateForm.form()){
-			var action = $document.getElementById(inputForm).action;
-			var handleInfo = $($document.getElementById(inputForm)).serialize();
-			$.ajax({
-				type : "POST",
-				url : action,
-				data : handleInfo,
-				//请求成功
-				success:function(data) {
-					var d = data;
-					//输出提示信息
-					if(d.str.length>0){
-						parent.layer.msg(d.str,{icon:1});
-					}
-					//刷新当前模块
-					var reviewFee = $("#reviewFee").val();
-					$("#"+tableId).load(location.href+"&reviewFee="+reviewFee + " #"+tableId);
-					//关闭当前页
-					top.layer.close(index)
-				}
-			});
-		}
-	}
-
 
-	//新增行方法
-	var fileAttachmentTpl = $("#fileAttachmentTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
-	var gistdataTpl = $("#gistdataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
-	var otherTpl = $("#otherTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
-
-	function formAttachment(title,url,width,height,target,formId,divId){
-		var rows = $(this).parent().prevAll().length + 1;
-		var frameIndex = parent.layer.getFrameIndex(window.name);
-		var urls = url;
-		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
-			width='auto';
-			height='auto';
-		}else{//如果是PC端,根据用户设置的width和height显示。
-
-		}
-		top.layer.open({
-			type: 2,
-			area: [width, height],
-			title: title,
-			skin:"two-btns",
-			maxmin: false, //开启最大化最小化按钮
-			content: urls ,
-			btn: ['确定','关闭'],
-			yes: function(index, layero){
-				var body = top.layer.getChildFrame('body', index);
-				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
-				var inputForm = body.find('#inputForm');
-				var top_iframe;
-				inputForm.attr("action","${ctx}/projectTemplate/projectTemplate/getProjectTemplateInfo");//表单提交成功后,从服务器返回的url在当前tab中展示
-				var $document = iframeWin.contentWindow.document;
-				formSubmitAjax($document,formId,index,divId);
-
-			},
-			cancel: function(index){
-			}
-		});
-	}
-	function formSubmitAjax($document,inputForm,index,divId){
-		var validateForm = $($document.getElementById(inputForm)).validate({
-			submitHandler: function(form){
-				loading('正在提交,请稍等...');
-				form.submit();
-			},
-			errorContainer: "#messageBox",
-			errorPlacement: function(error, element) {
-				$($document.getElementById("#messageBox")).text("输入有误,请先更正。");
-				if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
-					error.appendTo(element.parent().parent());
-				} else {
-					error.insertAfter(element);
-				}
-			}
-		});
-		if(validateForm.form()){
-			$($document.getElementById(inputForm)).ajaxSubmit({
-				success:function(data) {
-					if(!data.success){
-						top.layer.msg("保存依据资料信息异常!",{icon:2});
-						return false;
-					}
-					var idx = ''
-					if(divId == 'file_attachment'){
-						idx = $("#file_attachment tr").length;
-						addRowBaseData("#file_attachment",idx,fileAttachmentTpl,data.body.projectAccessoryInfo);
-					}else if(divId == 'file_gistdata'){
-						idx = $("#file_gistdata tr").length;
-						addRowBaseData("#file_gistdata",idx,gistdataTpl,data.body.projectAccessoryInfo);
-					}else if(divId == 'file_other'){
-						idx = $("#file_other tr").length;
-						addRowBaseData("#file_other",idx,otherTpl,data.body.projectAccessoryInfo);
-					}
-					parent.layer.msg(data.msg,{icon:1});
-					top.layer.close(index)
-				}
-			});
-		}
-	}
-
-
-	function hasInArr(id,idArr) {
-		for(var i=0;i<idArr.length;i++){
-			if(id==$(idArr[i]).val()){
-				return true;
-			}
-		}
-		return false;
-	}
-	function existBaseData(id,length) {
-		for (var i=0;i<length;i++) {
-			var val = $('#file_attachment'+i+'_id').val();
-			if(id==val){
-				return true;
-			}
-		}
-		return false;
-	}
-
-	// function addRowBaseData(list, idx, tpl, row){
-	// 	bornTemplete(list, idx, tpl, row, idx);
-	// }
-	//
-	// function bornTemplete(list, idx, tpl, row, idx1){
-	// 	var idx1 = '';
-	// 	if(list == 'file_attachment'){
-	// 		idx1 = $("#file_attachment tr").length +1;
-	// 	}else if(list == 'file_gistdata'){
-	// 		idx1 = $("#file_gistdata tr").length +1;
-	// 	}else if(list == 'file_other'){
-	// 		idx1 = $("#file_other tr").length +1;
-	// 	}
-	//
-	// 	$(list).append(Mustache.render(tpl, {
-	// 		idx: idx, delBtn: true, row: row,
-	// 		order:idx1 + 1, idx1:idx1
-	// 	}));
-	// 	$(list+idx).find("select").each(function(){
-	// 		$(this).val($(this).attr("data-value"));
-	// 	});
-	// 	$(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
-	// 		var ss = $(this).attr("data-value").split(',');
-	// 		for (var i=0; i<ss.length; i++){
-	// 			if($(this).val() == ss[i]){
-	// 				$(this).attr("checked","checked");
-	// 			}
-	// 		}
-	// 	});
-	// }
-	function delRowBaseData(obj, prefix,userId){
-		var id = $(prefix+"_id").val();
-		var currentUser = '${fns:getUser().id}';
-		var contentId = '${projectcontentinfo.projectContentData.id}';
-		console.log(contentId);
-		var condition = "${flag}";
-		$.ajax({
-			type:"post",
-			url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
-			data:{"contentId":contentId,"basedId":id,"condition":condition},
-			dataType:"json",
-			success:function(data){
-				if(data.success) {
-					if("according" == condition || "completion" == condition || "early" == condition || "claim" == condition || "design" == condition || "visa" == condition || "interim" == condition || "distribution" == condition || "material" == condition || "armor" == condition ){
-						$(obj).parent().parent().remove();
-					}else{
-						$(obj).parent().parent().remove();
-					}
-					if(data.body.inuse){
-						return;
-					}
-					if (currentUser == userId) {
-						confirmDelete('是否同步删除资料库的文件?','${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+id+'&id=${projectcontentinfo.id}&type=1');
-					}
-				}else {
-					top.layer.msg("删除依据资料失败!", {icon: 0});
-				}
-			}
-		})
-		return;
-	}
-
-	function delBaseData(obj, prefix,userId){
-		var id = $(prefix+"_id").val();
-		var currentUser = '${fns:getUser().id}';
-		var contentId = '${projectcontentinfo.projectContentData.id}';
-		console.log(contentId);
-		var condition = "${flag}";
-		$.ajax({
-			type:"post",
-			url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
-			data:{"contentId":contentId,"basedId":id,"condition":condition},
-			dataType:"json",
-			success:function(data){
-				if(data.success) {
-					if("according" == condition || "completion" == condition || "early" == condition || "claim" == condition || "design" == condition || "visa" == condition || "interim" == condition || "distribution" == condition || "material" == condition || "armor" == condition ){
-						$(obj).parent().parent().parent().remove();
-					}else{
-						$(obj).parent().parent().remove();
-					}
-					if(data.body.inuse){
-						return;
-					}
-					if (currentUser == userId) {
-						confirmDelete('是否同步删除资料库的文件?','${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+id+'&id=${projectcontentinfo.id}&type=1');
-					}
-				}else {
-					top.layer.msg("删除依据资料失败!", {icon: 0});
-				}
-			}
-		})
-		return;
-	}
-
-	function confirmDelete(mess, href){
-		top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
-			//do something
-			if (typeof href == 'function') {
-				href();
-			}else{
-				$.ajax({
-					url:href,
-					type:"post",
-					success:function(data){
-						if(data.success){
-							top.layer.msg("删除依据资料成功!", {icon: 0});
-						}
-					}
-				});
-			}
-			top.layer.close(index);
-		});
-		return false;
-	}
-</script>
 </body>
 </html>

+ 27 - 531
src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/recordTwo/projectReportRecordAudit.jsp

@@ -1348,545 +1348,41 @@
 					</c:if>
 				</div>
 				<div class="form-group layui-row first hide" id="AccessoryView">
-					<div class="form-group layui-row">
-						<div class="form-group-label"><h2>成果文件</h2></div>
-						<div class="layui-item nav-btns">
-						</div>
-						<div id="addFile_attachment" style="display: none" class="upload-progress">
-							<span id="fileName_attachment" ></span>
-							<span id="_attachment" ></span>
-							<b><span id="baifenbi_attachment" ></span></b>
-							<div class="progress">
-								<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-								</div>
-							</div>
-						</div>
-						<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-						<span id="attachment_title"></span>
-						<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-							<table id="upTable" class="table table-bordered table-condensed">
-								<thead>
-								<tr>
-									<th width="20%">文件要求</th>
-									<th width="35%">文件描述/文件</th>
-									<th width="20%">文件类型</th>
-									<th width="160px">上传时间</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="100px">操作</th>
-								</tr>
-								</thead>
-								<tbody id="file_attachment">
-								<c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-									<tr id="${fileAttachment.id}" pid="${fileAttachment.parent.id}">
-										<c:choose>
-											<c:when test="${fileAttachment.mustFlag == 1}">
-												<td class="tabMove" style="text-align: left;"><span style="color: red">* </span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-											</c:when>
-											<c:otherwise>
-												<c:choose>
-													<c:when test="${fileAttachment.flag == 0}">
-														<td class="tabMove" style="text-align: left;">${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-													</c:when>
-													<c:otherwise>
-														<td></td>
-													</c:otherwise>
-												</c:choose>
-											</c:otherwise>
-										</c:choose>
-										<td>
-											<c:choose>
-												<c:when test="${fileAttachment.flag == 0}">
-													<%--															<div><span class="file_nei">内容:</span><div class="file_neirong">${fileAttachment.attachName}</div></div>--%>
-													<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileAttachment.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileAttachment.attachTypes}</div>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${projectcontentinfo.uploadMode == 2}">
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'jpg')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'png')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'gif')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'bmp')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'jpeg')}">
-																	<img src="${fileAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileAttachment.temporaryUrl}','90%','90%')" alt="${fileAttachment.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)"  onclick="openPreview('${fileAttachment.temporaryUrl}',1)">${fileAttachment.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.temporaryUrl}',3)">${fileAttachment.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.temporaryUrl}',2)">${fileAttachment.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'jpg')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'png')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'gif')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'bmp')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'jpeg')}">
-																	<img src="${fileAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileAttachment.url}','90%','90%')" alt="${fileAttachment.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',1)">${fileAttachment.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',3)">${fileAttachment.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',2)">${fileAttachment.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-													<%--											<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileAttachment.url}','90%','90%')">${fileAttachment.attachName} ; </a>--%>
-												</c:otherwise>
-											</c:choose>
-										</td>
 
+					<!-- 成果文件模块引用 -->
+					<table:otherFileDisplay
+							title="成果文件"
+							onChangeFunc="insertTitle"
+							fileList="${projectReportRecord.fileAttachmentList}"
+							uploadMode="${projectReportRecord.uploadMode}"
+							moduleId="other"
+							projectContentInfo="${projectcontentinfo}"
+							projectReportRecord="${projectReportRecord}"/>
 
-										<c:choose>
-											<c:when test="${fileAttachment.flag == 0}">
-												<td class="op-td"></td>
-											</c:when>
-											<c:otherwise>
-												<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${fileAttachment.description}')">${fileAttachment.description}</td>
-											</c:otherwise>
-										</c:choose>
+					<!-- 依据性文件模块引用 -->
+					<table:otherFileDisplay
+							title="依据性文件"
+							onChangeFunc="gistdataInsertTitle"
+							fileList="${projectReportRecord.fileGistdataList}"
+							uploadMode="${projectReportRecord.uploadMode}"
+							moduleId="other"
+							projectContentInfo="${projectcontentinfo}"
+							projectReportRecord="${projectReportRecord}"/>
 
 
-										<td class="op-td" style="text-align:center;">
-											<c:choose>
-												<c:when test="${fileAttachment.flag == 0}">
-													<div></div>
-												</c:when>
-												<c:otherwise>
-													<fmt:formatDate value="${fileAttachment.createDate}" type="date"/>
-												</c:otherwise>
-											</c:choose>
-										</td>
-										<td class="op-td" style="text-align:center;">
-												${fileAttachment.fileSize}
-										</td>
-										<td class="op-td" style="text-align:center;">
-											<div class="op-btn-box" >
-												<c:choose>
-													<c:when test="${fileAttachment.flag == 0}">
+					<!-- 其他文件模块引用 -->
+					<table:otherFileDisplay
+							title="其他文件"
+							onChangeFunc="otherInsertTitle"
+							fileList="${projectReportRecord.fileOtherList}"
+							uploadMode="${projectReportRecord.uploadMode}"
+							moduleId="other"
+							projectContentInfo="${projectcontentinfo}"
+							projectReportRecord="${projectReportRecord}"/>
 
-													</c:when>
-													<c:otherwise>
 
-														<%--附件下载删除--%>
-														<c:choose>
-															<c:when test="${projectReportRecord.uploadMode == 2}">
-																<c:choose>
-																	<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-																		<a href="${fileAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:when>
-																	<c:otherwise>
-																		<a href="${fileAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:otherwise>
-																</c:choose>
-															</c:when>
-															<c:otherwise>
-																<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-															</c:otherwise>
-														</c:choose>
-													</c:otherwise>
-												</c:choose>
-											</div>
-										</td>
-									</tr>
-								</c:forEach>
-								</tbody>
-							</table>
-						</div>
-					</div>
-					<div class="form-group layui-row">
-						<div class="form-group-label"><h2>依据性文件</h2></div>
-						<div class="layui-item nav-btns">
-								<%--<a id="gistdata_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>--%>
-						</div>
-						<div id="addFile_gistdata" style="display: none" class="upload-progress">
-							<span id="fileName_gistdata" ></span>
-							<span id="_gistdata" ></span>
-							<b><span id="baifenbi_gistdata" ></span></b>
-							<div class="progress">
-								<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
-								</div>
-							</div>
-						</div>
-						<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
-						<span id="gistdata_title"></span>
-						<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-							<table id="gistdata_upTable" class="table table-bordered table-condensed">
-								<thead>
-								<tr>
-									<th width="20%">文件要求</th>
-									<th width="35%">文件描述/文件</th>
-									<th width="20%">文件类型</th>
-									<th width="160px">上传时间</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="100px">操作</th>
-								</tr>
-								</thead>
-								<tbody id="file_gistdata">
-								<c:forEach items="${projectReportRecord.fileGistdataList}" var = "fileGistdata" varStatus="status">
-									<tr id="${fileGistdata.id}" pid="${fileGistdata.parent.id}">
-											<%-- <td>${status.index + 1}</td>--%>
-										<c:choose>
-											<c:when test="${fileGistdata.mustFlag == 1}">
-												<td class="tabMove" style="text-align: left;"><span style="color: red">* </span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-											</c:when>
-											<c:otherwise>
-												<c:choose>
-													<c:when test="${fileGistdata.flag == 0}">
-														<td class="tabMove" style="text-align: left;">${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-													</c:when>
-													<c:otherwise>
-														<td></td>
-													</c:otherwise>
-												</c:choose>
-											</c:otherwise>
-										</c:choose>
-										<td>
-											<c:choose>
-												<c:when test="${fileGistdata.flag == 0}">
-													<%--																	<div><span class="file_nei">内容:</span><div class="file_neirong">${fileGistdata.attachName}</div></div>--%>
-													<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileGistdata.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileGistdata.attachTypes}</div>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${projectcontentinfo.uploadMode == 2}">
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'jpg')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'png')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'gif')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'bmp')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'jpeg')}">
-																	<img src="${fileGistdata.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileGistdata.temporaryUrl}','90%','90%')" alt="${fileGistdata.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',1)">${fileGistdata.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',3)">${fileGistdata.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',2)">${fileGistdata.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'jpg')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'png')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'gif')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'bmp')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'jpeg')}">
-																	<img src="${fileGistdata.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileGistdata.url}','90%','90%')" alt="${fileGistdata.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',1)">${fileGistdata.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',3)">${fileGistdata.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',2)">${fileGistdata.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-													<%--												<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileGistdata.url}','90%','90%')">${fileGistdata.attachName} ; </a>--%>
-												</c:otherwise>
-											</c:choose>
-										</td>
 
 
-												<c:choose>
-													<c:when test="${fileGistdata.flag == 0}">
-														<td class="op-td"></td>
-													</c:when>
-													<c:otherwise>
-														<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${fileGistdata.description}')">${fileGistdata.description}</td>
-													</c:otherwise>
-												</c:choose>
-												<td class="op-td" style="text-align:center;">
-													<c:choose>
-														<c:when test="${fileGistdata.flag == 0}">
-															<div></div>
-														</c:when>
-														<c:otherwise>
-															<fmt:formatDate value="${fileGistdata.createDate}" type="date"/>
-														</c:otherwise>
-													</c:choose>
-												</td>
-										<td class="op-td"  style="text-align:center;">
-												${fileGistdata.fileSize}
-										</td>
-										<td class="op-td"  style="text-align:center;">
-											<div class="op-btn-box" >
-												<c:choose>
-													<c:when test="${fileGistdata.flag == 0}">
-
-													</c:when>
-													<c:otherwise>
-
-														<%--附件下载删除--%>
-														<c:choose>
-															<c:when test="${projectReportRecord.uploadMode == 2}">
-																<c:choose>
-																	<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'pdf')}">
-																		<a href="${fileGistdata.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:when>
-																	<c:otherwise>
-																		<a href="${fileGistdata.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:otherwise>
-																</c:choose>
-															</c:when>
-															<c:otherwise>
-																<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileGistdata.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-															</c:otherwise>
-														</c:choose>
-													</c:otherwise>
-												</c:choose>
-											</div>
-										</td>
-										<td style="display:none">${fileGistdata.id}</td>
-										<td style="display:none">${fileGistdata.mustFlag}</td>
-									</tr>
-								</c:forEach>
-								</tbody>
-							</table>
-						</div>
-					</div>
-					<div class="form-group layui-row">
-						<div class="form-group-label"><h2>其他文件</h2></div>
-						<div class="layui-item nav-btns">
-								<%--<a id="other_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>--%>
-						</div>
-						<div id="addFile_other" style="display: none" class="upload-progress">
-							<span id="fileName_other" ></span>
-							<span id="_other" ></span>
-							<b><span id="baifenbi_other" ></span></b>
-							<div class="progress">
-								<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
-								</div>
-							</div>
-						</div>
-						<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
-						<span id="other_title"></span>
-						<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-							<table id="upTable_other" class="table table-bordered table-condensed">
-								<thead>
-								<tr>
-									<th width="20%">文件要求</th>
-									<th width="35%">文件描述/文件</th>
-									<th width="20%">文件类型</th>
-									<th width="160px">上传时间</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="100px">操作</th>
-								</tr>
-								</thead>
-								<tbody id="file_other">
-								<c:forEach items="${projectReportRecord.fileOtherList}" var = "fileOther" varStatus="status">
-									<tr id="${fileOther.id}" pid="${fileOther.parent.id}">
-											<%-- <td>${status.index + 1}</td>--%>
-										<c:choose>
-											<c:when test="${fileOther.mustFlag == 1}">
-												<td class="tabMove" style="text-align: left;"><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-											</c:when>
-											<c:otherwise>
-												<c:choose>
-													<c:when test="${fileOther.flag == 0}">
-														<td class="tabMove" style="text-align: left;">${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-													</c:when>
-													<c:otherwise>
-														<td></td>
-													</c:otherwise>
-												</c:choose>
-											</c:otherwise>
-										</c:choose>
-										<td>
-											<c:choose>
-												<c:when test="${fileOther.flag == 0}">
-													<%--																	<div style="overflow: hidden"><span class="file_nei">内容:</span><div class="file_neirong">${fileOther.attachName}</div></div>--%>
-													<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileOther.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileOther.attachTypes}</div>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${projectcontentinfo.uploadMode == 2}">
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'jpg')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'png')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'gif')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'bmp')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'jpeg')}">
-																	<img src="${fileOther.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileOther.temporaryUrl}','90%','90%')" alt="${fileOther.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',1)">${fileOther.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',3)">${fileOther.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',2)">${fileOther.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'jpg')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'png')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'gif')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'bmp')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'jpeg')}">
-																	<img src="${fileOther.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileOther.url}','90%','90%')" alt="${fileOther.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',1)">${fileOther.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',3)">${fileOther.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',2)">${fileOther.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-													<!--													<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileOther.url}','90%','90%')">${fileOther.attachName} ; </a>-->
-												</c:otherwise>
-											</c:choose>
-										</td>
-
-												<c:choose>
-													<c:when test="${fileOther.flag == 0}">
-														<td class="op-td"></td>
-													</c:when>
-													<c:otherwise>
-														<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${fileOther.description}')">${fileOther.description}</td>
-													</c:otherwise>
-												</c:choose>
-												<td class="op-td" style="text-align:center;">
-													<c:choose>
-														<c:when test="${fileOther.flag == 0}">
-															<div></div>
-														</c:when>
-														<c:otherwise>
-															<fmt:formatDate value="${fileOther.createDate}" type="date"/>
-														</c:otherwise>
-													</c:choose>
-												</td>
-										<td class="op-td" style="text-align:center;">
-												${fileOther.fileSize}
-										</td>
-										<td class="op-td" style="text-align:center;">
-											<div class="op-btn-box" >
-												<c:choose>
-													<c:when test="${fileOther.flag == 0}">
-
-													</c:when>
-													<c:otherwise>
-														<%--附件下载删除--%>
-														<c:choose>
-															<c:when test="${projectReportRecord.uploadMode == 2}">
-																<c:choose>
-																	<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
-																		<a href="${fileOther.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:when>
-																	<c:otherwise>
-																		<a href="${fileOther.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:otherwise>
-																</c:choose>
-															</c:when>
-															<c:otherwise>
-																<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileOther.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-															</c:otherwise>
-														</c:choose>
-													</c:otherwise>
-												</c:choose>
-											</div>
-										</td>
-										<td style="display:none">${fileOther.id}</td>
-										<td style="display:none">${fileOther.mustFlag}</td>
-									</tr>
-								</c:forEach>
-								</tbody>
-							</table>
-						</div>
-					</div>
 
 					<div  class="form-group layui-row">
 						<div class="form-group-label">

+ 59 - 846
src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/recordTwo/projectReportRecordForm.jsp

@@ -55,11 +55,13 @@
 					if(obj == 2){
 						$("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectMessageNew/holdSaveRecord");
 					}else{
+						var rows = $("#file_attachment tr"); // 获取当前组件的所有行
 						var leng = $("#file_attachment tr").length;
 						for(var i=0; i<leng; i++) {
-							var numberStr = $("#file_attachment tr").eq(i).find("td:first").html();
-							var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
-							var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
+							var row = rows.eq(i);
+							var numberStr = row.find("td:eq(0) .foid").html(); // 组件中存储ID的元素是class="foid"
+							var second = row.find("td:eq(1)").html(); // 第二列(隐藏列,存储mustFlag)
+							var fileFlag = row.find("td:last").html(); // 最后一列(隐藏列,存储fileFlag)
 							if(second == 1){
 								if(numberStr != undefined && numberStr !=null && numberStr !=''){
 									if (fileFlag==1){
@@ -73,11 +75,14 @@
 							}
 						}
 						if(boolFlag){
+							var rows = $("#file_gistdata tr"); // 获取当前组件的所有行
 							var gistdata = $("#file_gistdata tr").length;
 							for(var i=0; i<gistdata; i++) {
-								var numberStr = $("#file_gistdata tr").eq(i).find("td:first").html();
-								var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
-								var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
+								var row = rows.eq(i);
+								var numberStr = row.find("td:eq(0) .foid").html(); // 组件中存储ID的元素是class="foid"
+								var second = row.find("td:eq(1)").html(); // 第二列(隐藏列,存储mustFlag)
+								var fileFlag = row.find("td:last").html(); // 最后一列(隐藏列,存储fileFlag)
+
 								if(second == 1){
 									if(numberStr != undefined && numberStr !=null && numberStr !=''){
 										if (fileFlag==1){
@@ -92,11 +97,14 @@
 							}
 						}
 						if(boolFlag){
+							var rows = $("#file_other tr"); // 获取当前组件的所有行
 							var other = $("#file_other tr").length;
 							for(var i=0; i<other; i++) {
-								var numberStr = $("#file_other tr").eq(i).find("td:first").html();
-								var second = $("#file_other tr").eq(i).find("td:eq(1)").html();
-								var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
+								var row = rows.eq(i);
+								var numberStr = row.find("td:eq(0) .foid").html(); // 组件中存储ID的元素是class="foid"
+								var second = row.find("td:eq(1)").html(); // 第二列(隐藏列,存储mustFlag)
+								var fileFlag = row.find("td:last").html(); // 最后一列(隐藏列,存储fileFlag)
+
 								if(second == 1){
 									if(numberStr != undefined && numberStr !=null && numberStr !=''){
 										if (fileFlag==1){
@@ -116,6 +124,7 @@
 					return true;
             }else {
                 parent.layer.msg("信息未填写完整!", {icon: 5});
+				$("#onsubmit").val(true);
             }
             return false;
 
@@ -249,856 +258,60 @@
 				</div>
 			</div>
 
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>成果文件</h2></div>
-				<div id="addFile_attachment" style="display: none" class="upload-progress">
-					<span id="fileName_attachment" ></span>
-					<span id="_attachment" ></span>
-					<b><span id="baifenbi_attachment" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-				<span id="attachment_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-							<th width="20%">文件要求</th>
-							<th width="35%">文件描述/文件</th>
-							<th width="20%">文件类型</th>
-							<th width="160px">上传时间</th>
-							<th width="120px">文件大小(M)</th>
-							<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_attachment">
-						<c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr id="file_attachment_${fileAttachment.id}_tr" onclick="listTr(this)">
-								<td style="display:none">${fileAttachment.id}</td>
-								<td style="display:none">${fileAttachment.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileAttachment.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileAttachment.attachName}</div></div>--%>
-	<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileAttachment.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileAttachment.attachTypes}</div>
-								</td>
-								<td></td>
-								<td></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}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileAttachment.fileFlag}</td>
-							</tr>
-							<c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_attachment_${fileAttachment.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectReportRecord.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td>
-													<img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
 
 
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-									<td class="op-td" style="text-align:center;">
-											${workClientAttachment.fileSize}
-									</td>
-									<td class="op-td">
-										<div class="op-btn-box" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<script type="text/template" id="fileAttachmentTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="fileAttachment{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
+			<%-- showAddButton="true" 显示添加按钮 --%>
+			<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+			<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+			<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+			<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="成果文件"
+					onChangeFunc="insertTitle"
+					fileList="${projectReportRecord.fileAttachmentList}"
+					projectId="${project.id}"
+					uploadMode="${projectReportRecord.uploadMode}"
+					moduleId="attachment"
+					showEditBtn="true"/>
+
+			<%-- showAddButton="true" 显示添加按钮 --%>
+			<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+			<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+			<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+			<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="依据性文件"
+					onChangeFunc="gistdataInsertTitle"
+					fileList="${projectReportRecord.fileGistdataList}"
+					projectId="${project.id}"
+					uploadMode="${projectReportRecord.uploadMode}"
+					moduleId="gistdata"
+					showEditBtn="true"/>
+
+			<%-- showAddButton="true" 显示添加按钮 --%>
+			<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+			<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+			<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+			<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="其他文件"
+					onChangeFunc="otherInsertTitle"
+					fileList="${projectReportRecord.fileOtherList}"
+					projectId="${project.id}"
+					uploadMode="${projectReportRecord.uploadMode}"
+					moduleId="other"
+					showEditBtn="true"/>
 
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
 
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>依据性文件</h2></div>
-				<div id="addFile_gistdata" style="display: none" class="upload-progress">
-					<span id="fileName_gistdata" ></span>
-					<span id="_gistdata" ></span>
-					<b><span id="baifenbi_gistdata" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
-				<span id="gistdata_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="gistdata_upTable" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-								<%-- <th>序号</th>--%>
-									<th width="20%">文件要求</th>
-									<th width="35%">文件描述/文件</th>
-									<th width="20%">文件类型</th>
-									<th width="160px">上传时间</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_gistdata">
-						<c:forEach items="${projectReportRecord.fileGistdataList}" var = "fileGistdata" varStatus="status">
-							<tr id="file_gistdata_${fileGistdata.id}_tr" onclick="listTr(this)">
-									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none">${fileGistdata.id}</td>
-								<td style="display:none">${fileGistdata.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileGistdata.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileGistdata.attachName}</div></div>--%>
-	<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileGistdata.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileGistdata.attachTypes}</div>
-								</td>
-								<td></td>
-								<td></td>
-								<td></td>
-								<td class="op-td">
-									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileGistdata.fileFlag}</td>
 
-							</tr>
-							<c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_gistdata_${fileGistdata.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectReportRecord.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
 
 
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-									<td class="op-td" style="text-align:center;">
-											${workClientAttachment.fileSize}
-									</td>
-									<td class="op-td">
-										<div class="op-btn-box" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<script type="text/template" id="gistdataTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="gistdataTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
-
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>其他文件</h2></div>
-				<div id="addFile_other" style="display: none" class="upload-progress">
-					<span id="fileName_other" ></span>
-					<span id="_other" ></span>
-					<b><span id="baifenbi_other" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
-				<span id="other_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable_other" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-								<%-- <th>序号</th>--%>
-									<th width="20%">文件要求</th>
-									<th width="35%">文件描述/文件</th>
-									<th width="20%">文件类型</th>
-									<th width="160px">上传时间</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_other">
-						<c:forEach items="${projectReportRecord.fileOtherList}" var = "fileOther" varStatus="status">
-							<tr id="file_other_${fileOther.id}_tr" onclick="listTr(this)">
-									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none">${fileOther.id}</td>
-								<td style="display:none">${fileOther.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileOther.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open ' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileOther.attachName}</div></div>--%>
-	<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileOther.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileOther.attachTypes}</div>
-								</td>
-								<td></td>
-								<td></td>
-								<td></td>
-								<td class="op-td">
-									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileOther.fileFlag}</td>
-
-							</tr>
-							<c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="addFile_other_${fileOther.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectReportRecord.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
 
-
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-									<td class="op-td" style="text-align:center;">
-											${workClientAttachment.fileSize}
-									</td>
-									<td class="op-td">
-										<div class="op-btn-box" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<script type="text/template" id="otherTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="otherTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
 			<div class="form-group layui-row page-end"></div>
 		</form:form>
 	</div>
 </div><script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
 <script src="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.js" charset="utf-8"></script>
-<script>
-	function openBill2(title,url,width,height,target,formId,tableId){
-		var rows = $(this).parent().prevAll().length + 1;
-		var frameIndex = parent.layer.getFrameIndex(window.name);
-		var urls = url+"&index="+frameIndex;
-		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
-			width='auto';
-			height='auto';
-		}else{//如果是PC端,根据用户设置的width和height显示。
-
-		}
-		top.layer.open({
-			type: 2,
-			area: [width, height],
-			title: title,
-			skin:"two-btns",
-			maxmin: false, //开启最大化最小化按钮
-			content: urls ,
-			btn: ['确定','关闭'],
-			yes: function(index, layero){
-				var body = top.layer.getChildFrame('body', index);
-				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
-				var inputForm = body.find('#inputForm');
-				var top_iframe;
-				if(target){
-					top_iframe = target;//如果指定了iframe,则在改frame中跳转
-				}else{
-					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
-				}
-				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
-				inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
-				var $document = iframeWin.contentWindow.document;
-
-				formSubmit2($document,formId,index,tableId);
-
-			},
-			cancel: function(index){
-			}
-		});
-	}
-	function formSubmit2($document,inputForm,index,tableId){
-
-		var validateForm = $($document.getElementById(inputForm)).validate({
-			submitHandler: function(form){
-				loading('正在提交,请稍等...');
-				form.submit();
-			},
-			errorContainer: "#messageBox",
-			errorPlacement: function(error, element) {
-				$($document.getElementById("#messageBox")).text("输入有误,请先更正。");
-				if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
-					error.appendTo(element.parent().parent());
-				} else {
-					error.insertAfter(element);
-				}
-			}
-		});
-		if(validateForm.form()){
-			var action = $document.getElementById(inputForm).action;
-			var handleInfo = $($document.getElementById(inputForm)).serialize();
-			$.ajax({
-				type : "POST",
-				url : action,
-				data : handleInfo,
-				//请求成功
-				success:function(data) {
-					var d = data;
-					//输出提示信息
-					if(d.str.length>0){
-						parent.layer.msg(d.str,{icon:1});
-					}
-					$("#"+tableId).load(location.href + " #"+tableId);
-					//关闭当前页
-					top.layer.close(index)
-				}
-			});
-		}
-	}
-
-
-	//新增行方法
-	var fileAttachmentTpl = $("#fileAttachmentTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
-	var gistdataTpl = $("#gistdataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
-	var otherTpl = $("#otherTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
 
-	function formAttachment(title,url,width,height,target,formId,divId){
-		var rows = $(this).parent().prevAll().length + 1;
-		var frameIndex = parent.layer.getFrameIndex(window.name);
-		var urls = url;
-		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
-			width='auto';
-			height='auto';
-		}else{//如果是PC端,根据用户设置的width和height显示。
-
-		}
-		top.layer.open({
-			type: 2,
-			area: [width, height],
-			title: title,
-			skin:"two-btns",
-			maxmin: false, //开启最大化最小化按钮
-			content: urls ,
-			btn: ['确定','关闭'],
-			yes: function(index, layero){
-				var body = top.layer.getChildFrame('body', index);
-				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
-				var inputForm = body.find('#inputForm');
-				var top_iframe;
-				inputForm.attr("action","${ctx}/projectTemplate/projectTemplate/getProjectTemplateInfo");//表单提交成功后,从服务器返回的url在当前tab中展示
-				var $document = iframeWin.contentWindow.document;
-				formSubmitAjax($document,formId,index,divId);
-
-			},
-			cancel: function(index){
-			}
-		});
-	}
-	function formSubmitAjax($document,inputForm,index,divId){
-		var validateForm = $($document.getElementById(inputForm)).validate({
-			submitHandler: function(form){
-				loading('正在提交,请稍等...');
-				form.submit();
-			},
-			errorContainer: "#messageBox",
-			errorPlacement: function(error, element) {
-				$($document.getElementById("#messageBox")).text("输入有误,请先更正。");
-				if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
-					error.appendTo(element.parent().parent());
-				} else {
-					error.insertAfter(element);
-				}
-			}
-		});
-		if(validateForm.form()){
-			$($document.getElementById(inputForm)).ajaxSubmit({
-				success:function(data) {
-					if(!data.success){
-						top.layer.msg("保存依据资料信息异常!",{icon:2});
-						return false;
-					}
-					var idx = ''
-					if(divId == 'file_attachment'){
-						idx = $("#file_attachment tr").length;
-						addRowBaseData("#file_attachment",idx,fileAttachmentTpl,data.body.projectAccessoryInfo);
-					}else if(divId == 'file_gistdata'){
-						idx = $("#file_gistdata tr").length;
-						addRowBaseData("#file_gistdata",idx,gistdataTpl,data.body.projectAccessoryInfo);
-					}else if(divId == 'file_other'){
-						idx = $("#file_other tr").length;
-						addRowBaseData("#file_other",idx,otherTpl,data.body.projectAccessoryInfo);
-					}
-					parent.layer.msg(data.msg,{icon:1});
-					top.layer.close(index)
-				}
-			});
-		}
-	}
-
-
-	function hasInArr(id,idArr) {
-		for(var i=0;i<idArr.length;i++){
-			if(id==$(idArr[i]).val()){
-				return true;
-			}
-		}
-		return false;
-	}
-	function existBaseData(id,length) {
-		for (var i=0;i<length;i++) {
-			var val = $('#file_attachment'+i+'_id').val();
-			if(id==val){
-				return true;
-			}
-		}
-		return false;
-	}
-
-	function addRowBaseData(list, idx, tpl, row){
-		bornTemplete(list, idx, tpl, row, idx);
-	}
-
-	function bornTemplete(list, idx, tpl, row, idx1){
-		var idx1 = '';
-		if(list == 'file_attachment'){
-			idx1 = $("#file_attachment tr").length +1;
-		}else if(list == 'file_gistdata'){
-			idx1 = $("#file_gistdata tr").length +1;
-		}else if(list == 'file_other'){
-			idx1 = $("#file_other tr").length +1;
-		}
-
-		$(list).append(Mustache.render(tpl, {
-			idx: idx, delBtn: true, row: row,
-			order:idx1 + 1, idx1:idx1
-		}));
-		$(list+idx).find("select").each(function(){
-			$(this).val($(this).attr("data-value"));
-		});
-		$(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
-			var ss = $(this).attr("data-value").split(',');
-			for (var i=0; i<ss.length; i++){
-				if($(this).val() == ss[i]){
-					$(this).attr("checked","checked");
-				}
-			}
-		});
-	}
-	function delRowBaseData(obj, prefix,userId){
-		var id = $(prefix+"_id").val();
-		var currentUser = '${fns:getUser().id}';
-		var contentId = '${projectcontentinfo.projectContentData.id}';
-		console.log(contentId);
-		var condition = "${flag}";
-		$.ajax({
-			type:"post",
-			url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
-			data:{"contentId":contentId,"basedId":id,"condition":condition},
-			dataType:"json",
-			success:function(data){
-				if(data.success) {
-					if("according" == condition || "completion" == condition || "early" == condition || "claim" == condition || "design" == condition || "visa" == condition || "interim" == condition || "distribution" == condition || "material" == condition || "armor" == condition ){
-						$(obj).parent().parent().remove();
-					}else{
-						$(obj).parent().parent().remove();
-					}
-					if(data.body.inuse){
-						return;
-					}
-					if (currentUser == userId) {
-						confirmDelete('是否同步删除资料库的文件?','${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+id+'&id=${projectcontentinfo.id}&type=1');
-					}
-				}else {
-					top.layer.msg("删除依据资料失败!", {icon: 0});
-				}
-			}
-		})
-		return;
-	}
-
-	function delBaseData(obj, prefix,userId){
-		var id = $(prefix+"_id").val();
-		var currentUser = '${fns:getUser().id}';
-		var contentId = '${projectcontentinfo.projectContentData.id}';
-		console.log(contentId);
-		var condition = "${flag}";
-		$.ajax({
-			type:"post",
-			url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
-			data:{"contentId":contentId,"basedId":id,"condition":condition},
-			dataType:"json",
-			success:function(data){
-				if(data.success) {
-					if("according" == condition || "completion" == condition || "early" == condition || "claim" == condition || "design" == condition || "visa" == condition || "interim" == condition || "distribution" == condition || "material" == condition || "armor" == condition ){
-						$(obj).parent().parent().parent().remove();
-					}else{
-						$(obj).parent().parent().remove();
-					}
-					if(data.body.inuse){
-						return;
-					}
-					if (currentUser == userId) {
-						confirmDelete('是否同步删除资料库的文件?','${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+id+'&id=${projectcontentinfo.id}&type=1');
-					}
-				}else {
-					top.layer.msg("删除依据资料失败!", {icon: 0});
-				}
-			}
-		})
-		return;
-	}
-
-	function confirmDelete(mess, href){
-		top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
-			if (typeof href == 'function') {
-				href();
-			}else{
-				$.ajax({
-					url:href,
-					type:"post",
-					success:function(data){
-						if(data.success){
-							top.layer.msg("删除依据资料成功!", {icon: 0});
-						}
-					}
-				});
-			}
-			top.layer.close(index);
-		});
-		return false;
-	}
-</script>
 </body>
 </html>

+ 41 - 534
src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/recordTwo/projectReportRecordModify.jsp

@@ -272,542 +272,49 @@
 				</div>
 			</div>
 
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>成果文件</h2></div>
-				<div id="addFile_attachment" style="display: none" class="upload-progress">
-					<span id="fileName_attachment" ></span>
-					<span id="_attachment" ></span>
-					<b><span id="baifenbi_attachment" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-				<span id="attachment_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-								<%-- <th>序号</th>--%>
-									<th width="30%">文件类型</th>
-									<th width="">文件描述/文件</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_attachment">
-						<c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr  id="file_attachment_${fileAttachment.id}_tr" onclick="listTr(this)">
-								<td style="display:none">${fileAttachment.id}</td>
-								<td style="display:none">${fileAttachment.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileAttachment.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileAttachment.attachName}</div></div>--%>
-									<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileAttachment.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileAttachment.attachTypes}</div>
-								</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}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileAttachment.fileFlag}</td>
-							</tr>
-							<c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_attachment_${fileAttachment.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectReportRecord.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-									<td class="op-td" style="text-align:center;">
-											${workClientAttachment.fileSize}
-									</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" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-
-												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<script type="text/template" id="fileAttachmentTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="fileAttachment{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
-
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>依据性文件</h2></div>
-				<div id="addFile_gistdata" style="display: none" class="upload-progress">
-					<span id="fileName_gistdata" ></span>
-					<span id="_gistdata" ></span>
-					<b><span id="baifenbi_gistdata" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
-				<span id="gistdata_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="gistdata_upTable" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-								<%-- <th>序号</th>--%>
-									<th width="30%">文件类型</th>
-									<th width="">文件描述/文件</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_gistdata">
-						<c:forEach items="${projectReportRecord.fileGistdataList}" var = "fileGistdata" varStatus="status">
-							<tr id="file_gistdata_${fileGistdata.id}_tr" onclick="listTr(this)">
-									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none">${fileGistdata.id}</td>
-								<td style="display:none">${fileGistdata.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileGistdata.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileGistdata.attachName}</div></div>--%>
-									<div><span style="font-weight: bold">文件格式及大小:</span>${fileGistdata.attachLength}M; </div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileGistdata.attachTypes}</div>
-								</td>
-								<td></td>
-
-								<td class="op-td">
-									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileGistdata.fileFlag}</td>
-							</tr>
-
-							<c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_gistdata_${fileGistdata.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectReportRecord.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-									<td class="op-td" style="text-align:center;">
-											${workClientAttachment.fileSize}
-									</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" >
 
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-
-												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<script type="text/template" id="gistdataTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="gistdataTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
-
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>其他文件</h2></div>
-				<div id="addFile_other" style="display: none" class="upload-progress">
-					<span id="fileName_other" ></span>
-					<span id="_other" ></span>
-					<b><span id="baifenbi_other" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
-				<span id="other_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable_other" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-								<%-- <th>序号</th>--%>
-									<th width="30%">文件类型</th>
-									<th width="">文件描述/文件</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_other">
-						<c:forEach items="${projectReportRecord.fileOtherList}" var = "fileOther" varStatus="status">
-							<tr id="file_other_${fileOther.id}_tr" onclick="listTr(this)">
-									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none">${fileOther.id}</td>
-								<td style="display:none">${fileOther.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileOther.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther	.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileOther.attachName}</div></div>--%>
-									<div><span style="font-weight: bold">文件格式及大小:</span>${fileOther.attachLength}M; </div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileOther.attachTypes}</div>
-								</td>
-								<td></td>
-								<td class="op-td">
-									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileOther.fileFlag}</td>
-
-							</tr>
-							<c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="addFile_other_${fileOther.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectReportRecord.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-									<td class="op-td" style="text-align:center;">
-											${workClientAttachment.fileSize}
-									</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" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-
-												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<script type="text/template" id="otherTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="otherTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
 
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${project.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
+			<%-- showAddButton="true" 显示添加按钮 --%>
+			<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+			<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+			<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+			<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="成果文件"
+					onChangeFunc="insertTitle"
+					fileList="${projectReportRecord.fileAttachmentList}"
+					projectId="${project.id}"
+					uploadMode="${projectReportRecord.uploadMode}"
+					moduleId="attachment"
+					showEditBtn="true"/>
+
+			<%-- showAddButton="true" 显示添加按钮 --%>
+			<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+			<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+			<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+			<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="依据性文件"
+					onChangeFunc="gistdataInsertTitle"
+					fileList="${projectReportRecord.fileGistdataList}"
+					projectId="${project.id}"
+					uploadMode="${projectReportRecord.uploadMode}"
+					moduleId="gistdata"
+					showEditBtn="true"/>
+
+			<%-- showAddButton="true" 显示添加按钮 --%>
+			<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+			<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+			<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+			<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="其他文件"
+					onChangeFunc="otherInsertTitle"
+					fileList="${projectReportRecord.fileOtherList}"
+					projectId="${project.id}"
+					uploadMode="${projectReportRecord.uploadMode}"
+					moduleId="other"
+					showEditBtn="true"/>
 
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>审批流程</h2></div>

+ 57 - 499
src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/recordTwo/projectReportRecordModifyApply.jsp

@@ -27,11 +27,12 @@
 				var projectId = '${project.id}';
 				var leng = $("#file_attachment tr").length;
 				var boolFlag = true;
+				var rows = $("#file_attachment tr"); // 获取当前组件的所有行
 				for(var i=0; i<leng; i++) {
-					var numberStr = $("#file_attachment tr").eq(i).find("td:first").html();
-					var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
-					var name = $("#file_attachment tr").eq(i).find("td:eq(2)").html();
-					var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
+					var row = rows.eq(i);
+					var numberStr = row.find("td:eq(0) .foid").html(); // 组件中存储ID的元素是class="foid"
+					var second = row.find("td:eq(1)").html(); // 第二列(隐藏列,存储mustFlag)
+					var fileFlag = row.find("td:last").html(); // 最后一列(隐藏列,存储fileFlag)
 					if(second == 1){
 						if(numberStr != undefined && numberStr !=null && numberStr !=''){
 							if (fileFlag==1){
@@ -44,11 +45,14 @@
 					}
 				}
 				if(boolFlag){
+					var rows = $("#file_gistdata tr"); // 获取当前组件的所有行
 					var gistdata = $("#file_gistdata tr").length;
 					for(var i=0; i<gistdata; i++) {
-						var numberStr = $("#file_gistdata tr").eq(i).find("td:first").html();
-						var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
-						var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
+						var row = rows.eq(i);
+						var numberStr = row.find("td:eq(0) .foid").html(); // 组件中存储ID的元素是class="foid"
+						var second = row.find("td:eq(1)").html(); // 第二列(隐藏列,存储mustFlag)
+						var fileFlag = row.find("td:last").html(); // 最后一列(隐藏列,存储fileFlag)
+
 						if(second == 1){
 							if(numberStr != undefined && numberStr !=null && numberStr !=''){
 								if (fileFlag==1){
@@ -62,11 +66,13 @@
 					}
 				}
 				if(boolFlag){
+					var rows = $("#file_other tr"); // 获取当前组件的所有行
 					var other = $("#file_other tr").length;
 					for(var i=0; i<other; i++) {
-						var numberStr = $("#file_other tr").eq(i).find("td:first").html();
-						var second = $("#file_other tr").eq(i).find("td:eq(1)").html();
-						var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
+						var row = rows.eq(i);
+						var numberStr = row.find("td:eq(0) .foid").html(); // 组件中存储ID的元素是class="foid"
+						var second = row.find("td:eq(1)").html(); // 第二列(隐藏列,存储mustFlag)
+						var fileFlag = row.find("td:last").html(); // 最后一列(隐藏列,存储fileFlag)
 
 						if(second == 1){
 							if(numberStr != undefined && numberStr !=null && numberStr !=''){
@@ -245,499 +251,51 @@
 				</div>
 			</div>
 
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>成果文件</h2></div>
-				<div id="addFile_attachment" style="display: none" class="upload-progress">
-					<span id="fileName_attachment" ></span>
-					<span id="_attachment" ></span>
-					<b><span id="baifenbi_attachment" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-				<span id="attachment_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-								<%-- <th>序号</th>--%>
-									<th width="20%">文件要求</th>
-									<th width="35%">文件描述/文件</th>
-									<th width="20%">文件类型</th>
-									<th width="160px">上传时间</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_attachment">
-						<c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr id="file_attachment_${fileAttachment.id}_tr" onclick="listTr(this)">
-								<td style="display:none">${fileAttachment.id}</td>
-								<td style="display:none">${fileAttachment.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileAttachment.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open ' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-<%--								<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>--%>
-								<td>
-<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileAttachment.attachName}</div></div>--%>
-	<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileAttachment.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileAttachment.attachTypes}</div>
-								</td>
-								<td></td>
-								<td></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}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileAttachment.fileFlag}</td>
-							</tr>
-							<c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_attachment_${fileAttachment.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectReportRecord.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-<%--									<td>--%>
-<%--										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>--%>
-<%--									</td>--%>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
-
-
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-									<td class="op-td" style="text-align:center;">
-											${workClientAttachment.fileSize}
-									</td>
-									<td class="op-td">
-										<div class="op-btn-box" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-
-												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>依据性文件</h2></div>
-				<div id="addFile_gistdata" style="display: none" class="upload-progress">
-					<span id="fileName_gistdata" ></span>
-					<span id="_gistdata" ></span>
-					<b><span id="baifenbi_gistdata" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
-				<span id="gistdata_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="gistdata_upTable" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-								<%-- <th>序号</th>--%>
-									<th width="20%">文件要求</th>
-									<th width="35%">文件描述/文件</th>
-									<th width="20%">文件类型</th>
-									<th width="160px">上传时间</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_gistdata">
-						<c:forEach items="${projectReportRecord.fileGistdataList}" var = "fileGistdata" varStatus="status">
-							<tr  id="file_gistdata_${fileGistdata.id}_tr" onclick="listTr(this)">
-									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none">${fileGistdata.id}</td>
-								<td style="display:none">${fileGistdata.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileGistdata.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-<%--								<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>--%>
-<%--								<td></td>--%>
-								<td>
-<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileGistdata.attachName}</div></div>--%>
-	<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileGistdata.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileGistdata.attachTypes}</div>
-								</td>
-								<td></td>
-								<td></td>
-								<td></td>
-								<td class="op-td">
-									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileGistdata.fileFlag}</td>
 
-							</tr>
-							<c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_gistdata_${fileGistdata.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectReportRecord.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-<%--									<td>--%>
-<%--										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>--%>
-<%--									</td>--%>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
+			<%-- showAddButton="true" 显示添加按钮 --%>
+			<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+			<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+			<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+			<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="成果文件"
+					onChangeFunc="insertTitle"
+					fileList="${projectReportRecord.fileAttachmentList}"
+					projectId="${project.id}"
+					uploadMode="${projectReportRecord.uploadMode}"
+					moduleId="attachment"
+					showEditBtn="true"/>
+
+			<%-- showAddButton="true" 显示添加按钮 --%>
+			<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+			<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+			<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+			<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="依据性文件"
+					onChangeFunc="gistdataInsertTitle"
+					fileList="${projectReportRecord.fileGistdataList}"
+					projectId="${project.id}"
+					uploadMode="${projectReportRecord.uploadMode}"
+					moduleId="gistdata"
+					showEditBtn="true"/>
+
+			<%-- showAddButton="true" 显示添加按钮 --%>
+			<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+			<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+			<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+			<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="其他文件"
+					onChangeFunc="otherInsertTitle"
+					fileList="${projectReportRecord.fileOtherList}"
+					projectId="${project.id}"
+					uploadMode="${projectReportRecord.uploadMode}"
+					moduleId="other"
+					showEditBtn="true"/>
 
 
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-									<td class="op-td" style="text-align:center;">
-											${workClientAttachment.fileSize}
-									</td>
-									<td class="op-td">
-										<div class="op-btn-box" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
 
-												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>其他文件</h2></div>
-				<div id="addFile_other" style="display: none" class="upload-progress">
-					<span id="fileName_other" ></span>
-					<span id="_other" ></span>
-					<b><span id="baifenbi_other" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
-				<span id="other_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable_other" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-								<%-- <th>序号</th>--%>
-									<th width="20%">文件要求</th>
-									<th width="35%">文件描述/文件</th>
-									<th width="20%">文件类型</th>
-									<th width="160px">上传时间</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_other">
-						<c:forEach items="${projectReportRecord.fileOtherList}" var = "fileOther" varStatus="status">
-							<tr id="file_other_${fileOther.id}_tr" onclick="listTr(this)">
-									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none">${fileOther.id}</td>
-								<td style="display:none">${fileOther.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileOther.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open ' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-<%--								<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>--%>
-								<td>
-<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileOther.attachName}</div></div>--%>
-	<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileOther.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileOther.attachTypes}</div>
-								</td>
-								<td></td>
-								<td></td>
-								<td></td>
-								<td class="op-td">
-									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileOther.fileFlag}</td>
-
-							</tr>
-							<c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_other_${fileOther.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectReportRecord.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-<%--									<td>--%>
-<%--										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>--%>
-<%--									</td>--%>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
-
-
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-									<td class="op-td" style="text-align:center;">
-											${workClientAttachment.fileSize}
-									</td>
-									<td class="op-td">
-										<div class="op-btn-box" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-
-												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>${projectNotifyType}审批流程</h2></div>
 				<div class="layui-item layui-col-xs12 form-table-container" >

+ 55 - 492
src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/recordTwo/projectReportRecordUrgentModifyApply.jsp

@@ -57,11 +57,12 @@
 				}
 				var leng = $("#file_attachment tr").length;
 				var boolFlag = true;
+				var rows = $("#file_attachment tr"); // 获取当前组件的所有行
 				for(var i=0; i<leng; i++) {
-					var numberStr = $("#file_attachment tr").eq(i).find("td:first").html();
-					var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
-					var name = $("#file_attachment tr").eq(i).find("td:eq(2)").html();
-					var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
+					var row = rows.eq(i);
+					var numberStr = row.find("td:eq(0) .foid").html(); // 组件中存储ID的元素是class="foid"
+					var second = row.find("td:eq(1)").html(); // 第二列(隐藏列,存储mustFlag)
+					var fileFlag = row.find("td:last").html(); // 最后一列(隐藏列,存储fileFlag)
 					if(second == 1){
 						if(numberStr != undefined && numberStr !=null && numberStr !=''){
 							if (fileFlag==1){
@@ -74,11 +75,14 @@
 					}
 				}
 				if(boolFlag){
+					var rows = $("#file_gistdata tr"); // 获取当前组件的所有行
 					var gistdata = $("#file_gistdata tr").length;
 					for(var i=0; i<gistdata; i++) {
-						var numberStr = $("#file_gistdata tr").eq(i).find("td:first").html();
-						var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
-						var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
+						var row = rows.eq(i);
+						var numberStr = row.find("td:eq(0) .foid").html(); // 组件中存储ID的元素是class="foid"
+						var second = row.find("td:eq(1)").html(); // 第二列(隐藏列,存储mustFlag)
+						var fileFlag = row.find("td:last").html(); // 最后一列(隐藏列,存储fileFlag)
+
 						if(second == 1){
 							if(numberStr != undefined && numberStr !=null && numberStr !=''){
 								if (fileFlag==1){
@@ -92,11 +96,13 @@
 					}
 				}
 				if(boolFlag){
+					var rows = $("#file_other tr"); // 获取当前组件的所有行
 					var other = $("#file_other tr").length;
 					for(var i=0; i<other; i++) {
-						var numberStr = $("#file_other tr").eq(i).find("td:first").html();
-						var second = $("#file_other tr").eq(i).find("td:eq(1)").html();
-						var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
+						var row = rows.eq(i);
+						var numberStr = row.find("td:eq(0) .foid").html(); // 组件中存储ID的元素是class="foid"
+						var second = row.find("td:eq(1)").html(); // 第二列(隐藏列,存储mustFlag)
+						var fileFlag = row.find("td:last").html(); // 最后一列(隐藏列,存储fileFlag)
 
 						if(second == 1){
 							if(numberStr != undefined && numberStr !=null && numberStr !=''){
@@ -662,499 +668,56 @@
 				</div>
 			</div>
 
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>成果文件</h2></div>
-				<div id="addFile_attachment" style="display: none" class="upload-progress">
-					<span id="fileName_attachment" ></span>
-					<span id="_attachment" ></span>
-					<b><span id="baifenbi_attachment" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-				<span id="attachment_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-								<%-- <th>序号</th>--%>
-									<th width="20%">文件要求</th>
-									<th width="35%">文件描述/文件</th>
-									<th width="20%">文件类型</th>
-									<th width="160px">上传时间</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_attachment">
-						<c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr id="file_attachment_${fileAttachment.id}_tr" onclick="listTr(this)">
-								<td style="display:none">${fileAttachment.id}</td>
-								<td style="display:none">${fileAttachment.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileAttachment.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open ' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-<%--								<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>--%>
-								<td>
-<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileAttachment.attachName}</div></div>--%>
-	<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileAttachment.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileAttachment.attachTypes}</div>
-								</td>
-								<td></td>
-								<td></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}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileAttachment.fileFlag}</td>
-							</tr>
-							<c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_attachment_${fileAttachment.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectReportRecord.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-<%--									<td>--%>
-<%--										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>--%>
-<%--									</td>--%>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
 
 
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-									<td class="op-td" style="text-align:center;">
-											${workClientAttachment.fileSize}
-									</td>
-									<td class="op-td">
-										<div class="op-btn-box" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
+			<%-- showAddButton="true" 显示添加按钮 --%>
+			<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+			<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+			<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+			<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="成果文件"
+					onChangeFunc="insertTitle"
+					fileList="${projectReportRecord.fileAttachmentList}"
+					projectId="${project.id}"
+					uploadMode="${projectReportRecord.uploadMode}"
+					moduleId="attachment"
+					showEditBtn="true"/>
 
-												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
+			<%-- showAddButton="true" 显示添加按钮 --%>
+			<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+			<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+			<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+			<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="依据性文件"
+					onChangeFunc="gistdataInsertTitle"
+					fileList="${projectReportRecord.fileGistdataList}"
+					projectId="${project.id}"
+					uploadMode="${projectReportRecord.uploadMode}"
+					moduleId="gistdata"
+					showEditBtn="true"/>
 
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>依据性文件</h2></div>
-				<div id="addFile_gistdata" style="display: none" class="upload-progress">
-					<span id="fileName_gistdata" ></span>
-					<span id="_gistdata" ></span>
-					<b><span id="baifenbi_gistdata" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
-				<span id="gistdata_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="gistdata_upTable" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-								<%-- <th>序号</th>--%>
-									<th width="20%">文件要求</th>
-									<th width="35%">文件描述/文件</th>
-									<th width="20%">文件类型</th>
-									<th width="160px">上传时间</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_gistdata">
-						<c:forEach items="${projectReportRecord.fileGistdataList}" var = "fileGistdata" varStatus="status">
-							<tr  id="file_gistdata_${fileGistdata.id}_tr" onclick="listTr(this)">
-									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none">${fileGistdata.id}</td>
-								<td style="display:none">${fileGistdata.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileGistdata.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-<%--								<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>--%>
-<%--								<td></td>--%>
-								<td>
-<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileGistdata.attachName}</div></div>--%>
-	<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileGistdata.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileGistdata.attachTypes}</div>
-								</td>
-								<td></td>
-								<td></td>
-								<td></td>
-								<td class="op-td">
-									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileGistdata.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileGistdata.fileFlag}</td>
+			<%-- showAddButton="true" 显示添加按钮 --%>
+			<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+			<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+			<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+			<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="其他文件"
+					onChangeFunc="otherInsertTitle"
+					fileList="${projectReportRecord.fileOtherList}"
+					projectId="${project.id}"
+					uploadMode="${projectReportRecord.uploadMode}"
+					moduleId="other"
+					showEditBtn="true"/>
 
-							</tr>
-							<c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_gistdata_${fileGistdata.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectReportRecord.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-<%--									<td>--%>
-<%--										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>--%>
-<%--									</td>--%>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
 
 
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-									<td class="op-td" style="text-align:center;">
-											${workClientAttachment.fileSize}
-									</td>
-									<td class="op-td">
-										<div class="op-btn-box" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-
-												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>其他文件</h2></div>
-				<div id="addFile_other" style="display: none" class="upload-progress">
-					<span id="fileName_other" ></span>
-					<span id="_other" ></span>
-					<b><span id="baifenbi_other" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
-				<span id="other_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable_other" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-								<%-- <th>序号</th>--%>
-									<th width="20%">文件要求</th>
-									<th width="35%">文件描述/文件</th>
-									<th width="20%">文件类型</th>
-									<th width="160px">上传时间</th>
-									<th width="120px">文件大小(M)</th>
-									<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_other">
-						<c:forEach items="${projectReportRecord.fileOtherList}" var = "fileOther" varStatus="status">
-							<tr id="file_other_${fileOther.id}_tr" onclick="listTr(this)">
-									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none">${fileOther.id}</td>
-								<td style="display:none">${fileOther.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileOther.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open ' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-<%--								<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>--%>
-								<td>
-<%--									<div><span class="file_nei">内容:</span><div class="file_neirong">${fileOther.attachName}</div></div>--%>
-	<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileOther.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileOther.attachTypes}</div>
-								</td>
-								<td></td>
-								<td></td>
-								<td></td>
-								<td class="op-td">
-									<div class="op-btn-box" >
-										<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileOther.id}&projectId=${project.id}&uploadMode=${projectReportRecord.uploadMode}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileOther.fileFlag}</td>
 
-							</tr>
-							<c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_other_${fileOther.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectReportRecord.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-<%--									<td>--%>
-<%--										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>--%>
-<%--									</td>--%>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
 
 
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-									<td class="op-td" style="text-align:center;">
-											${workClientAttachment.fileSize}
-									</td>
-									<td class="op-td">
-										<div class="op-btn-box" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectReportRecord.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
 
-												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
 			<div class="form-group layui-row">
 				<div class="form-group-label"><h2>${projectNotifyType}审批流程</h2></div>
 				<div class="layui-item layui-col-xs12 form-table-container" >

+ 30 - 469
src/main/webapp/webpage/modules/ruralprojectrecords/record/projectRepordDescriptionAudit.jsp

@@ -1615,478 +1615,39 @@
 					</c:if>
 				</div>
 				<div class="form-group layui-row first hide" id="AccessoryView">
-					<div class="form-group layui-row">
-						<div class="form-group-label"><h2>成果文件</h2></div>
-						<div class="layui-item nav-btns">
-						</div>
-						<div id="addFile_attachment" style="display: none" class="upload-progress">
-							<span id="fileName_attachment" ></span>
-							<span id="_attachment" ></span>
-							<b><span id="baifenbi_attachment" ></span></b>
-							<div class="progress">
-								<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-								</div>
-							</div>
-						</div>
-						<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-						<span id="attachment_title"></span>
-						<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-							<table id="upTable" class="table table-bordered table-condensed">
-								<thead>
-								<tr>
-									<th width="30%">文件类型</th>
-									<th width="">文件描述/文件</th>
-									<th width="100px">文件大小(M)</th>
-									<th width="150px">操作</th>
-								</tr>
-								</thead>
-								<tbody id="file_attachment">
-								<c:forEach items="${materialDefectRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-									<tr id="${fileAttachment.id}" pid="${fileAttachment.parent.id}">
-										<c:choose>
-											<c:when test="${fileAttachment.mustFlag == 1}">
-												<td class="tabMove" style="text-align: left;"><span style="color: red">* </span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-											</c:when>
-											<c:otherwise>
-												<c:choose>
-													<c:when test="${fileAttachment.flag == 0}">
-														<td class="tabMove" style="text-align: left;">${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-													</c:when>
-													<c:otherwise>
-														<td></td>
-													</c:otherwise>
-												</c:choose>
-											</c:otherwise>
-										</c:choose>
-										<td>
-											<c:choose>
-												<c:when test="${fileAttachment.flag == 0}">
-													<%--															<div><span class="file_nei">内容:</span><div class="file_neirong">${fileAttachment.attachName}</div></div>--%>
-													<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileAttachment.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileAttachment.attachTypes}</div>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${projectcontentinfo.uploadMode == 2}">
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'jpg')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'png')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'gif')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'bmp')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'jpeg')}">
-																	<img src="${fileAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileAttachment.temporaryUrl}','90%','90%')" alt="${fileAttachment.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)"  onclick="openPreview('${fileAttachment.temporaryUrl}',1)">${fileAttachment.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.temporaryUrl}',3)">${fileAttachment.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.temporaryUrl}',2)">${fileAttachment.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'jpg')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'png')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'gif')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'bmp')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'jpeg')}">
-																	<img src="${fileAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileAttachment.url}','90%','90%')" alt="${fileAttachment.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',1)">${fileAttachment.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',3)">${fileAttachment.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',2)">${fileAttachment.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-													<%--											<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileAttachment.url}','90%','90%')">${fileAttachment.attachName} ; </a>--%>
-												</c:otherwise>
-											</c:choose>
-										</td>
-										<td class="op-td" style="text-align:center;">
-												${fileAttachment.fileSize}
-										</td>
-										<td class="op-td" style="text-align:center;">
-											<div class="op-btn-box" >
-												<c:choose>
-													<c:when test="${fileAttachment.flag == 0}">
 
-													</c:when>
-													<c:otherwise>
+					<!-- 成果文件模块引用 -->
+					<table:otherFileDisplay
+							title="成果文件"
+							onChangeFunc="insertTitle"
+							fileList="${materialDefectRecord.fileAttachmentList}"
+							uploadMode="${materialDefectRecord.uploadMode}"
+							moduleId="other"
+							projectContentInfo="${materialDefectRecord}"
+							projectReportRecord="${materialDefectRecord}"/>
+
+					<!-- 依据性文件模块引用 -->
+					<table:otherFileDisplay
+							title="依据性文件"
+							onChangeFunc="gistdataInsertTitle"
+							fileList="${materialDefectRecord.fileGistdataList}"
+							uploadMode="${materialDefectRecord.uploadMode}"
+							moduleId="other"
+							projectContentInfo="${materialDefectRecord}"
+							projectReportRecord="${materialDefectRecord}"/>
+
+
+					<!-- 其他文件模块引用 -->
+					<table:otherFileDisplay
+							title="其他文件"
+							onChangeFunc="otherInsertTitle"
+							fileList="${materialDefectRecord.fileOtherList}"
+							uploadMode="${materialDefectRecord.uploadMode}"
+							moduleId="other"
+							projectContentInfo="${materialDefectRecord}"
+							projectReportRecord="${materialDefectRecord}"/>
 
-														<%--附件下载删除--%>
-														<c:choose>
-															<c:when test="${materialDefectRecord.uploadMode == 2}">
-																<c:choose>
-																	<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-																		<a href="${fileAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:when>
-																	<c:otherwise>
-																		<a href="${fileAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:otherwise>
-																</c:choose>
-															</c:when>
-															<c:otherwise>
-																<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-															</c:otherwise>
-														</c:choose>
-													</c:otherwise>
-												</c:choose>
-											</div>
-										</td>
-									</tr>
-								</c:forEach>
-								</tbody>
-							</table>
-						</div>
-					</div>
-					<div class="form-group layui-row">
-						<div class="form-group-label"><h2>依据性文件</h2></div>
-						<div class="layui-item nav-btns">
-								<%--<a id="gistdata_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>--%>
-						</div>
-						<div id="addFile_gistdata" style="display: none" class="upload-progress">
-							<span id="fileName_gistdata" ></span>
-							<span id="_gistdata" ></span>
-							<b><span id="baifenbi_gistdata" ></span></b>
-							<div class="progress">
-								<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
-								</div>
-							</div>
-						</div>
-						<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
-						<span id="gistdata_title"></span>
-						<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-							<table id="gistdata_upTable" class="table table-bordered table-condensed">
-								<thead>
-								<tr>
-									<th width="30%">文件类型</th>
-									<th width="">文件描述/文件</th>
-									<th width="100px">文件大小(M)</th>
-									<th width="150px">操作</th>
-								</tr>
-								</thead>
-								<tbody id="file_gistdata">
-								<c:forEach items="${materialDefectRecord.fileGistdataList}" var = "fileGistdata" varStatus="status">
-									<tr id="${fileGistdata.id}" pid="${fileGistdata.parent.id}">
-											<%-- <td>${status.index + 1}</td>--%>
-										<c:choose>
-											<c:when test="${fileGistdata.mustFlag == 1}">
-												<td class="tabMove" style="text-align: left;"><span style="color: red">* </span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-											</c:when>
-											<c:otherwise>
-												<c:choose>
-													<c:when test="${fileGistdata.flag == 0}">
-														<td class="tabMove" style="text-align: left;">${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-													</c:when>
-													<c:otherwise>
-														<td></td>
-													</c:otherwise>
-												</c:choose>
-											</c:otherwise>
-										</c:choose>
-										<td>
-											<c:choose>
-												<c:when test="${fileGistdata.flag == 0}">
-													<%--																	<div><span class="file_nei">内容:</span><div class="file_neirong">${fileGistdata.attachName}</div></div>--%>
-													<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileGistdata.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileGistdata.attachTypes}</div>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${projectcontentinfo.uploadMode == 2}">
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'jpg')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'png')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'gif')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'bmp')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'jpeg')}">
-																	<img src="${fileGistdata.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileGistdata.temporaryUrl}','90%','90%')" alt="${fileGistdata.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',1)">${fileGistdata.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',3)">${fileGistdata.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',2)">${fileGistdata.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'jpg')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'png')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'gif')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'bmp')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'jpeg')}">
-																	<img src="${fileGistdata.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileGistdata.url}','90%','90%')" alt="${fileGistdata.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',1)">${fileGistdata.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',3)">${fileGistdata.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',2)">${fileGistdata.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-													<%--												<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileGistdata.url}','90%','90%')">${fileGistdata.attachName} ; </a>--%>
-												</c:otherwise>
-											</c:choose>
-										</td>
-										<td class="op-td"  style="text-align:center;">
-												${fileGistdata.fileSize}
-										</td>
-										<td class="op-td"  style="text-align:center;">
-											<div class="op-btn-box" >
-												<c:choose>
-													<c:when test="${fileGistdata.flag == 0}">
-
-													</c:when>
-													<c:otherwise>
-
-														<%--附件下载删除--%>
-														<c:choose>
-															<c:when test="${materialDefectRecord.uploadMode == 2}">
-																<c:choose>
-																	<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'pdf')}">
-																		<a href="${fileGistdata.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:when>
-																	<c:otherwise>
-																		<a href="${fileGistdata.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:otherwise>
-																</c:choose>
-															</c:when>
-															<c:otherwise>
-																<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileGistdata.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-															</c:otherwise>
-														</c:choose>
-													</c:otherwise>
-												</c:choose>
-											</div>
-										</td>
-										<td style="display:none">${fileGistdata.id}</td>
-										<td style="display:none">${fileGistdata.mustFlag}</td>
-									</tr>
-								</c:forEach>
-								</tbody>
-							</table>
-						</div>
-					</div>
-					<div class="form-group layui-row">
-						<div class="form-group-label"><h2>其他文件</h2></div>
-						<div class="layui-item nav-btns">
-								<%--<a id="other_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>--%>
-						</div>
-						<div id="addFile_other" style="display: none" class="upload-progress">
-							<span id="fileName_other" ></span>
-							<span id="_other" ></span>
-							<b><span id="baifenbi_other" ></span></b>
-							<div class="progress">
-								<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
-								</div>
-							</div>
-						</div>
-						<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
-						<span id="other_title"></span>
-						<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-							<table id="upTable_other" class="table table-bordered table-condensed">
-								<thead>
-								<tr>
-									<th width="30%">文件类型</th>
-									<th width="">文件描述/文件</th>
-									<th width="100px">文件大小(M)</th>
-									<th width="150px">操作</th>
-								</tr>
-								</thead>
-								<tbody id="file_other">
-								<c:forEach items="${materialDefectRecord.fileOtherList}" var = "fileOther" varStatus="status">
-									<tr id="${fileOther.id}" pid="${fileOther.parent.id}">
-											<%-- <td>${status.index + 1}</td>--%>
-										<c:choose>
-											<c:when test="${fileOther.mustFlag == 1}">
-												<td class="tabMove" style="text-align: left;"><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-											</c:when>
-											<c:otherwise>
-												<c:choose>
-													<c:when test="${fileOther.flag == 0}">
-														<td class="tabMove" style="text-align: left;">${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-													</c:when>
-													<c:otherwise>
-														<td></td>
-													</c:otherwise>
-												</c:choose>
-											</c:otherwise>
-										</c:choose>
-										<td>
-											<c:choose>
-												<c:when test="${fileOther.flag == 0}">
-													<%--																	<div style="overflow: hidden"><span class="file_nei">内容:</span><div class="file_neirong">${fileOther.attachName}</div></div>--%>
-													<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileOther.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileOther.attachTypes}</div>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${projectcontentinfo.uploadMode == 2}">
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'jpg')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'png')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'gif')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'bmp')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'jpeg')}">
-																	<img src="${fileOther.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileOther.temporaryUrl}','90%','90%')" alt="${fileOther.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',1)">${fileOther.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',3)">${fileOther.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',2)">${fileOther.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'jpg')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'png')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'gif')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'bmp')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'jpeg')}">
-																	<img src="${fileOther.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileOther.url}','90%','90%')" alt="${fileOther.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',1)">${fileOther.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',3)">${fileOther.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',2)">${fileOther.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-													<!--													<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileOther.url}','90%','90%')">${fileOther.attachName} ; </a>-->
-												</c:otherwise>
-											</c:choose>
-										</td>
-										<td class="op-td" style="text-align:center;">
-												${fileOther.fileSize}
-										</td>
-										<td class="op-td" style="text-align:center;">
-											<div class="op-btn-box" >
-												<c:choose>
-													<c:when test="${fileOther.flag == 0}">
 
-													</c:when>
-													<c:otherwise>
-														<%--附件下载删除--%>
-														<c:choose>
-															<c:when test="${materialDefectRecord.uploadMode == 2}">
-																<c:choose>
-																	<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
-																		<a href="${fileOther.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:when>
-																	<c:otherwise>
-																		<a href="${fileOther.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:otherwise>
-																</c:choose>
-															</c:when>
-															<c:otherwise>
-																<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileOther.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-															</c:otherwise>
-														</c:choose>
-													</c:otherwise>
-												</c:choose>
-											</div>
-										</td>
-										<td style="display:none">${fileOther.id}</td>
-										<td style="display:none">${fileOther.mustFlag}</td>
-									</tr>
-								</c:forEach>
-								</tbody>
-							</table>
-						</div>
-					</div>
 				</div>
 			</div>
 

+ 57 - 848
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/judgementReport/projectRecordsJudgementForm.jsp

@@ -151,10 +151,12 @@
 										top.layer.msg("造价咨询营业收入必须大于0!", {icon: 0});
 										return false;
 									}
+									var rows = $("#file_attachment tr"); // 获取当前组件的所有行
 									for(var i=0; i<leng; i++) {
-										var numberStr = $("#file_attachment tr").eq(i).find("td:first").find(".faid").html();
-										var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
-										var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
+										var row = rows.eq(i);
+										var numberStr = row.find("td:eq(0) .foid").html(); // 组件中存储ID的元素是class="foid"
+										var second = row.find("td:eq(1)").html(); // 第二列(隐藏列,存储mustFlag)
+										var fileFlag = row.find("td:last").html(); // 最后一列(隐藏列,存储fileFlag)
 										if(second == 1){
 											if(numberStr != undefined && numberStr !=null && numberStr !=''){
 												if (fileFlag==1){
@@ -171,11 +173,13 @@
 										return false;
 									}
 									if(boolFlag){
+										var rows = $("#file_gistdata tr"); // 获取当前组件的所有行
 										var gistdata = $("#file_gistdata tr").length;
 										for(var i=0; i<gistdata; i++) {
-											var numberStr = $("#file_gistdata tr").eq(i).find("td:first").find(".fgid").html();
-											var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
-											var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
+											var row = rows.eq(i);
+											var numberStr = row.find("td:eq(0) .foid").html(); // 组件中存储ID的元素是class="foid"
+											var second = row.find("td:eq(1)").html(); // 第二列(隐藏列,存储mustFlag)
+											var fileFlag = row.find("td:last").html(); // 最后一列(隐藏列,存储fileFlag)
 
 											if(second == 1){
 												if(numberStr != undefined && numberStr !=null && numberStr !=''){
@@ -190,11 +194,13 @@
 										}
 									}
 									if(boolFlag){
+										var rows = $("#file_other tr"); // 获取当前组件的所有行
 										var other = $("#file_other tr").length;
 										for(var i=0; i<other; i++) {
-											var numberStr = $("#file_other tr").eq(i).find("td:first").find(".foid").html();
-											var second = $("#file_other tr").eq(i).find("td:eq(1)").html();
-											var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
+											var row = rows.eq(i);
+											var numberStr = row.find("td:eq(0) .foid").html(); // 组件中存储ID的元素是class="foid"
+											var second = row.find("td:eq(1)").html(); // 第二列(隐藏列,存储mustFlag)
+											var fileFlag = row.find("td:last").html(); // 最后一列(隐藏列,存储fileFlag)
 
 											if(second == 1){
 												if(numberStr != undefined && numberStr !=null && numberStr !=''){
@@ -1479,578 +1485,48 @@
 				</div>
 			</c:if>
 
-			<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=${projectRecords.id}&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>
-					<b><span id="baifenbi_attachment" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-				<span id="attachment_title"></span>--%>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-							<th width="20%">文件要求</th>
-							<th width="35%">文件描述/文件</th>
-							<th width="20%">文件类型</th>
-							<th width="160px">上传时间</th>
-							<th width="120px">文件大小(M)</th>
-							<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_attachment">
-						<c:forEach items="${projectcontentinfo.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr id="file_attachment_${fileAttachment.id}_tr_fu" onclick="listTr(this)">
-								<td style="display:none"><span class="faid">${fileAttachment.id}</span></td>
-								<td style="display:none">${fileAttachment.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileAttachment.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-<%--									<div style="overflow: hidden"><span class="file_nei">内容:</span><div class="file_neirong">${fileAttachment.attachName}</div></div>--%>
-									<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileAttachment.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileAttachment.attachTypes}</div>
-								</td>
-								<td></td>
-								<td></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=${projectRecords.id}&uploadMode=${projectcontentinfo.uploadMode}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileAttachment.fileFlag}</td>
-
-							</tr>
-							<c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_attachment_${fileAttachment.id}_tr_fu">
-									<td></td>
-										<c:choose>
-										<c:when test="${projectcontentinfo.uploadMode == 2}">
-										<c:choose>
-										<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-									<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-										</c:when>
-										<c:otherwise>
-										<c:choose>
-										<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-									<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-									</c:when>
-									<c:otherwise>
-										<c:choose>
-											<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-												<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-											</c:when>
-											<c:otherwise>
-												<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-											</c:otherwise>
-										</c:choose>
-									</c:otherwise>
-									</c:choose>
-									</c:otherwise>
-									</c:choose>
-									</c:when>
-									<c:otherwise>
-										<c:choose>
-											<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-												<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-											</c:when>
-											<c:otherwise>
-												<c:choose>
-													<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-														<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-													</c:when>
-													<c:otherwise>
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-															</c:when>
-															<c:otherwise>
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-															</c:otherwise>
-														</c:choose>
-													</c:otherwise>
-												</c:choose>
-											</c:otherwise>
-										</c:choose>
-									</c:otherwise>
-									</c:choose>
-<%--										<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>--%>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
-
-
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-
-									<td class="op-td">${workClientAttachment.fileSize}</td>
-									<td class="op-td">
-										<div class="op-btn-box" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectcontentinfo.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-
-												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<script type="text/template" id="fileAttachmentTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="fileAttachment{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
-
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>依据性文件</h2></div>
-<%--				<div 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=${projectRecords.id}&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>
-					<b><span id="baifenbi_gistdata" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
-				<span id="gistdata_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="gistdata_upTable" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-							<th width="20%">文件要求</th>
-							<th width="35%">文件描述/文件</th>
-							<th width="20%">文件类型</th>
-							<th width="160px">上传时间</th>
-							<th width="120px">文件大小(M)</th>
-							<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_gistdata">
-						<c:forEach items="${projectcontentinfo.fileGistdataList}" var = "fileGistdata" varStatus="status">
-							<tr  id="file_gistdata_${fileGistdata.id}_tr" onclick="listTr(this)">
-									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none"><span class="fgid">${fileGistdata.id}</span></td>
-								<td style="display:none">${fileGistdata.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileGistdata.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-<%--									<div style="overflow: hidden"><span class="file_nei">内容:</span><div class="file_neirong">${fileGistdata.attachName}</div></div>--%>
-	<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileGistdata.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileGistdata.attachTypes}</div>
-								</td>
-								<td></td>
-										<td></td>
-										<td></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}&uploadMode=${projectcontentinfo.uploadMode}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-										<td style="display:none">${fileGistdata.fileFlag}</td>
-
-							</tr>
-							<c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_gistdata_${fileGistdata.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectcontentinfo.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-<%--									<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a></td>--%>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
-
-
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-									<td class="op-td">
-										${workClientAttachment.fileSize}
-									</td>
-									<td class="op-td">
-										<div class="op-btn-box" >
-
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectcontentinfo.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-
-												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<script type="text/template" id="gistdataTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="gistdataTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
-
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>其他文件</h2></div>
-<%--				<div 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=${projectRecords.id}&reviewFee='+$('#reviewFee').val(),'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>
-					<b><span id="baifenbi_other" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
-				<span id="other_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable_other" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-							<th width="20%">文件要求</th>
-							<th width="35%">文件描述/文件</th>
-							<th width="20%">文件类型</th>
-							<th width="160px">上传时间</th>
-							<th width="120px">文件大小(M)</th>
-							<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_other">
-						<c:forEach items="${projectcontentinfo.fileOtherList}" var = "fileOther" varStatus="status">
-							<tr id="file_other_${fileOther.id}_tr" onclick="listTr(this)">
-									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none"><span class="foid">${fileOther.id}</span></td>
-								<td style="display:none">${fileOther.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileOther.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther	.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-<%--									<div style="overflow: hidden"><span class="file_nei">内容:</span><div class="file_neirong">${fileOther.attachName}</div></div>--%>
-	<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileOther.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileOther.attachTypes}</div>
-								</td>
-								<td></td>
-										<td></td>
-										<td></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}&uploadMode=${projectcontentinfo.uploadMode}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileOther.fileFlag}</td>
-							</tr>
-							<c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_other_${fileOther.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectcontentinfo.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
-
-
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-									<td>${workClientAttachment.fileSize}</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" >
-
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectcontentinfo.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-
-												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<script type="text/template" id="otherTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="otherTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
+				<%-- showAddButton="true" 显示添加按钮 --%>
+				<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+				<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+				<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+				<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="成果文件"
+					onChangeFunc="insertTitle"
+					fileList="${projectcontentinfo.fileAttachmentList}"
+					projectId="${projectRecords.id}"
+					uploadMode="${projectcontentinfo.uploadMode}"
+					moduleId="attachment"
+					showEditBtn="true"/>
+
+				<%-- showAddButton="true" 显示添加按钮 --%>
+				<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+				<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+				<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+				<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="依据性文件"
+					onChangeFunc="gistdataInsertTitle"
+					fileList="${projectcontentinfo.fileGistdataList}"
+					projectId="${projectRecords.id}"
+					uploadMode="${projectcontentinfo.uploadMode}"
+					moduleId="gistdata"
+					showEditBtn="true"/>
+
+
+				<%-- showAddButton="true" 显示添加按钮 --%>
+				<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+				<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+				<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+				<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="其他文件"
+					onChangeFunc="otherInsertTitle"
+					fileList="${projectcontentinfo.fileOtherList}"
+					projectId="${projectRecords.id}"
+					uploadMode="${projectcontentinfo.uploadMode}"
+					moduleId="other"
+					showEditBtn="true"/>
 
 			<div class="form-group layui-row">
 			<div class="form-group-label" style="overflow:hidden">
@@ -2257,273 +1733,6 @@
 </script>
 
 
-<script>
-	function openBill2(title,url,width,height,target,formId,tableId){
-		var rows = $(this).parent().prevAll().length + 1;
-		var frameIndex = parent.layer.getFrameIndex(window.name);
-		var urls = url+"&index="+frameIndex;
-		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
-			width='auto';
-			height='auto';
-		}else{//如果是PC端,根据用户设置的width和height显示。
-
-		}
-		top.layer.open({
-			type: 2,
-			area: [width, height],
-			title: title,
-			skin:"two-btns",
-			maxmin: false, //开启最大化最小化按钮
-			content: urls ,
-			btn: ['确定','关闭'],
-			yes: function(index, layero){
-				var body = top.layer.getChildFrame('body', index);
-				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
-				var inputForm = body.find('#inputForm');
-				var top_iframe;
-				if(target){
-					top_iframe = target;//如果指定了iframe,则在改frame中跳转
-				}else{
-					top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
-				}
-				inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
-				inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
-				var $document = iframeWin.contentWindow.document;
-
-				formSubmit2($document,formId,index,tableId);
-
-			},
-			cancel: function(index){
-			},
-			end:function () {
-				var reviewFee = $("#reviewFee").val();
-				$("#"+tableId).load(location.href+"&reviewFee="+reviewFee + " #"+tableId);
-			}
-		});
-	}
-	function formSubmit2($document,inputForm,index,tableId){
-
-		var validateForm = $($document.getElementById(inputForm)).validate({
-			submitHandler: function(form){
-				loading('正在提交,请稍等...');
-				form.submit();
-			},
-			errorContainer: "#messageBox",
-			errorPlacement: function(error, element) {
-				$($document.getElementById("#messageBox")).text("输入有误,请先更正。");
-				if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
-					error.appendTo(element.parent().parent());
-				} else {
-					error.insertAfter(element);
-				}
-			}
-		});
-		if(validateForm.form()){
-			var action = $document.getElementById(inputForm).action;
-			var handleInfo = $($document.getElementById(inputForm)).serialize();
-			$.ajax({
-				type : "POST",
-				url : action,
-				data : handleInfo,
-				//请求成功
-				success:function(data) {
-					var d = data;
-					//输出提示信息
-					if(d.str.length>0){
-						parent.layer.msg(d.str,{icon:1});
-					}
-					//刷新当前模块
-					var reviewFee = $("#reviewFee").val();
-					$("#"+tableId).load(location.href+"&reviewFee="+reviewFee + " #"+tableId);
-					//关闭当前页
-					top.layer.close(index)
-				}
-			});
-		}
-	}
-
-
-	//新增行方法
-	var fileAttachmentTpl = $("#fileAttachmentTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
-	var gistdataTpl = $("#gistdataTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
-	var otherTpl = $("#otherTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
-
-	function formAttachment(title,url,width,height,target,formId,divId){
-		var rows = $(this).parent().prevAll().length + 1;
-		var frameIndex = parent.layer.getFrameIndex(window.name);
-		var urls = url;
-		if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
-			width='auto';
-			height='auto';
-		}else{//如果是PC端,根据用户设置的width和height显示。
 
-		}
-		top.layer.open({
-			type: 2,
-			area: [width, height],
-			title: title,
-			skin:"two-btns",
-			maxmin: false, //开启最大化最小化按钮
-			content: urls ,
-			btn: ['确定','关闭'],
-			yes: function(index, layero){
-				var body = top.layer.getChildFrame('body', index);
-				var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
-				var inputForm = body.find('#inputForm');
-				var top_iframe;
-				inputForm.attr("action","${ctx}/projectTemplate/projectTemplate/getProjectTemplateInfo");//表单提交成功后,从服务器返回的url在当前tab中展示
-				var $document = iframeWin.contentWindow.document;
-				formSubmitAjax($document,formId,index,divId);
-
-			},
-			cancel: function(index){
-			}
-		});
-	}
-	function formSubmitAjax($document,inputForm,index,divId){
-		var validateForm = $($document.getElementById(inputForm)).validate({
-			submitHandler: function(form){
-				loading('正在提交,请稍等...');
-				form.submit();
-			},
-			errorContainer: "#messageBox",
-			errorPlacement: function(error, element) {
-				$($document.getElementById("#messageBox")).text("输入有误,请先更正。");
-				if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
-					error.appendTo(element.parent().parent());
-				} else {
-					error.insertAfter(element);
-				}
-			}
-		});
-		if(validateForm.form()){
-			$($document.getElementById(inputForm)).ajaxSubmit({
-				success:function(data) {
-					if(!data.success){
-						top.layer.msg("保存依据资料信息异常!",{icon:2});
-						return false;
-					}
-					var idx = ''
-					if(divId == 'file_attachment'){
-						idx = $("#file_attachment tr").length;
-						addRowBaseData("#file_attachment",idx,fileAttachmentTpl,data.body.projectAccessoryInfo);
-					}else if(divId == 'file_gistdata'){
-						idx = $("#file_gistdata tr").length;
-						addRowBaseData("#file_gistdata",idx,gistdataTpl,data.body.projectAccessoryInfo);
-					}else if(divId == 'file_other'){
-						idx = $("#file_other tr").length;
-						addRowBaseData("#file_other",idx,otherTpl,data.body.projectAccessoryInfo);
-					}
-					parent.layer.msg(data.msg,{icon:1});
-					top.layer.close(index)
-				}
-			});
-		}
-	}
-
-
-	function hasInArr(id,idArr) {
-		for(var i=0;i<idArr.length;i++){
-			if(id==$(idArr[i]).val()){
-				return true;
-			}
-		}
-		return false;
-	}
-	function existBaseData(id,length) {
-		for (var i=0;i<length;i++) {
-			var val = $('#file_attachment'+i+'_id').val();
-			if(id==val){
-				return true;
-			}
-		}
-		return false;
-	}
-
-	function delRowBaseData(obj, prefix,userId){
-		var id = $(prefix+"_id").val();
-		var currentUser = '${fns:getUser().id}';
-		var contentId = '${projectcontentinfo.projectContentData.id}';
-		console.log(contentId);
-		var condition = "${flag}";
-		$.ajax({
-			type:"post",
-			url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
-			data:{"contentId":contentId,"basedId":id,"condition":condition},
-			dataType:"json",
-			success:function(data){
-				if(data.success) {
-					if("according" == condition || "completion" == condition || "early" == condition || "claim" == condition || "design" == condition || "visa" == condition || "interim" == condition || "distribution" == condition || "material" == condition || "armor" == condition ){
-						$(obj).parent().parent().remove();
-					}else{
-						$(obj).parent().parent().remove();
-					}
-					if(data.body.inuse){
-						return;
-					}
-					if (currentUser == userId) {
-						confirmDelete('是否同步删除资料库的文件?','${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+id+'&id=${projectcontentinfo.id}&type=1');
-					}
-				}else {
-					top.layer.msg("删除依据资料失败!", {icon: 0});
-				}
-			}
-		})
-		return;
-	}
-
-	function delBaseData(obj, prefix,userId){
-		var id = $(prefix+"_id").val();
-		var currentUser = '${fns:getUser().id}';
-		var contentId = '${projectcontentinfo.projectContentData.id}';
-		console.log(contentId);
-		var condition = "${flag}";
-		$.ajax({
-			type:"post",
-			url:'${ctx}/projectcontentinfo/projectContentData/ajaxdelete',
-			data:{"contentId":contentId,"basedId":id,"condition":condition},
-			dataType:"json",
-			success:function(data){
-				if(data.success) {
-					if("according" == condition || "completion" == condition || "early" == condition || "claim" == condition || "design" == condition || "visa" == condition || "interim" == condition || "distribution" == condition || "material" == condition || "armor" == condition ){
-						$(obj).parent().parent().parent().remove();
-					}else{
-						$(obj).parent().parent().remove();
-					}
-					if(data.body.inuse){
-						return;
-					}
-					if (currentUser == userId) {
-						confirmDelete('是否同步删除资料库的文件?','${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+id+'&id=${projectcontentinfo.id}&type=1');
-					}
-				}else {
-					top.layer.msg("删除依据资料失败!", {icon: 0});
-				}
-			}
-		})
-		return;
-	}
-
-	function confirmDelete(mess, href){
-		top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
-			//do something
-			if (typeof href == 'function') {
-				href();
-			}else{
-				$.ajax({
-					url:href,
-					type:"post",
-					success:function(data){
-						if(data.success){
-							top.layer.msg("删除依据资料成功!", {icon: 0});
-						}
-					}
-				});
-			}
-			top.layer.close(index);
-		});
-		return false;
-	}
-</script>
 </body>
 </html>

+ 60 - 580
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/reportForm.jsp

@@ -115,11 +115,12 @@
 										top.layer.msg("请添加咨询员信息!", {icon: 0});
 										return false;
 									}
+									var rows = $("#file_attachment tr"); // 获取当前组件的所有行
 									for(var i=0; i<leng; i++) {
-										var numberStr = $("#file_attachment tr").eq(i).find("td:first").html();
-										var second = $("#file_attachment tr").eq(i).find("td:eq(1)").html();
-										var name = $("#file_attachment tr").eq(i).find("td:eq(2)").html();
-										var fileFlag = $("#file_attachment tr").eq(i).find("td:last").html();
+										var row = rows.eq(i);
+										var numberStr = row.find("td:eq(0) .foid").html(); // 组件中存储ID的元素是class="foid"
+										var second = row.find("td:eq(1)").html(); // 第二列(隐藏列,存储mustFlag)
+										var fileFlag = row.find("td:last").html(); // 最后一列(隐藏列,存储fileFlag)
 										if(second == 1){
 											if(numberStr != undefined && numberStr !=null && numberStr !=''){
 												if (fileFlag==1){
@@ -132,11 +133,14 @@
 										}
 									}
 									if(boolFlag){
+										var rows = $("#file_gistdata tr"); // 获取当前组件的所有行
 										var gistdata = $("#file_gistdata tr").length;
 										for(var i=0; i<gistdata; i++) {
-											var numberStr = $("#file_gistdata tr").eq(i).find("td:first").html();
-											var second = $("#file_gistdata tr").eq(i).find("td:eq(1)").html();
-											var fileFlag = $("#file_gistdata tr").eq(i).find("td:last").html();
+											var row = rows.eq(i);
+											var numberStr = row.find("td:eq(0) .foid").html(); // 组件中存储ID的元素是class="foid"
+											var second = row.find("td:eq(1)").html(); // 第二列(隐藏列,存储mustFlag)
+											var fileFlag = row.find("td:last").html(); // 最后一列(隐藏列,存储fileFlag)
+
 											if(second == 1){
 												if(numberStr != undefined && numberStr !=null && numberStr !=''){
 													if (fileFlag==1){
@@ -150,11 +154,14 @@
 										}
 									}
 									if(boolFlag){
-										var other = $("#ile_other tr").length;
+										var rows = $("#file_other tr"); // 获取当前组件的所有行
+										var other = $("#file_other tr").length;
 										for(var i=0; i<other; i++) {
-											var numberStr = $("#ile_other tr").eq(i).find("td:first").html();
-											var second = $("#ile_other tr").eq(i).find("td:eq(1)").html();
-											var fileFlag = $("#file_other tr").eq(i).find("td:last").html();
+											var row = rows.eq(i);
+											var numberStr = row.find("td:eq(0) .foid").html(); // 组件中存储ID的元素是class="foid"
+											var second = row.find("td:eq(1)").html(); // 第二列(隐藏列,存储mustFlag)
+											var fileFlag = row.find("td:last").html(); // 最后一列(隐藏列,存储fileFlag)
+
 											if(second == 1){
 												if(numberStr != undefined && numberStr !=null && numberStr !=''){
 													if (fileFlag==1){
@@ -1436,579 +1443,52 @@
 					</div>
 				</div>
 			</div>
-			<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=${projectRecords.id}&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>
-					<b><span id="baifenbi_attachment" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-				<span id="attachment_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-							<th width="20%">文件要求</th>
-							<th width="35%">文件描述/文件</th>
-							<th width="20%">文件类型</th>
-							<th width="160px">上传时间</th>
-							<th width="120px">文件大小(M)</th>
-							<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_attachment">
-						<c:forEach items="${projectcontentinfo.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr  id="file_attachment_${fileAttachment.id}_tr" onclick="listTr(this)">
-								<td style="display:none">${fileAttachment.id}</td>
-								<td style="display:none">${fileAttachment.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileAttachment.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-<%--									<div style="overflow: hidden"><span class="file_nei">内容:</span><div class="file_neirong">${fileAttachment.attachName}</div></div>--%>
-	<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileAttachment.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileAttachment.attachTypes}</div>
-								</td>
-								<td></td>
-								<td></td>
-								<td></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}&uploadMode=${projectcontentinfo.uploadMode}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileAttachment.fileFlag}</td>
-							</tr>
-							<c:forEach items="${fileAttachment.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_attachment_${fileAttachment.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectcontentinfo.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-<%--									<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a></td>--%>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
-
-
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-									<td>
-											${workClientAttachment.fileSize}
-									</td>
-									<td class="op-td" style="text-align: center">
-										<div class="op-btn-box" >
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectcontentinfo.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-
-												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<script type="text/template" id="fileAttachmentTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="fileAttachment{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
-
-
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>依据性文件</h2></div>
-<%--				<div 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=${projectRecords.id}&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>
-					<b><span id="baifenbi_gistdata" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
-				<span id="gistdata_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="gistdata_upTable" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr >
-							<th width="20%">文件要求</th>
-							<th width="35%">文件描述/文件</th>
-							<th width="20%">文件类型</th>
-							<th width="160px">上传时间</th>
-							<th width="120px">文件大小(M)</th>
-							<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_gistdata">
-						<c:forEach items="${projectcontentinfo.fileGistdataList}" var = "fileGistdata" varStatus="status">
-							<tr  id="file_gistdata_${fileGistdata.id}_tr" onclick="listTr(this)">
-									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none">${fileGistdata.id}</td>
-								<td style="display:none">${fileGistdata.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileGistdata.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-<%--									<div style="overflow: hidden"><span class="file_nei">内容:</span><div class="file_neirong">${fileGistdata.attachName}</div></div>--%>
-	<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileGistdata.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileGistdata.attachTypes}</div>
-								</td>
-								<td></td>
-								<td></td>
-								<td></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}&uploadMode=${projectcontentinfo.uploadMode}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileGistdata.fileFlag}</td>
-							</tr>
-							<c:forEach items="${fileGistdata.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_gistdata_${fileGistdata.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectcontentinfo.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-<%--									<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a></td>--%>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
 
 
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-									<td>
-											${workClientAttachment.fileSize}
-									</td>
-									<td class="op-td" style="text-align: center">
-										<div class="op-btn-box" >
-
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectcontentinfo.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-
-												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<script type="text/template" id="gistdataTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="gistdataTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
-
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>其他文件</h2></div>
-<%--				<div 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=${projectRecords.id}&reviewFee='+$('#reviewFee').val(),'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>
-					<b><span id="baifenbi_other" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
-				<span id="other_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable_other" class="table table-bordered table-condensed tree_table">
-						<thead>
-						<tr>
-							<th width="20%">文件要求</th>
-							<th width="35%">文件描述/文件</th>
-							<th width="20%">文件类型</th>
-							<th width="160px">上传时间</th>
-							<th width="120px">文件大小(M)</th>
-							<th width="100px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_other">
-						<c:forEach items="${projectcontentinfo.fileOtherList}" var = "fileOther" varStatus="status">
-							<tr  id="file_other_${fileOther.id}_tr" onclick="listTr(this)">
-									<%-- <td>${status.index + 1}</td>--%>
-								<td style="display:none">${fileOther.id}</td>
-								<td style="display:none">${fileOther.mustFlag}</td>
-								<c:choose>
-									<c:when test="${fileOther.mustFlag == 1}">
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther	.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<td class="tabMove" style="text-align: left;"><span class='default_open' style="padding-right: 15px; "></span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-									</c:otherwise>
-								</c:choose>
-								<td>
-<%--									<div style="overflow: hidden"><span class="file_nei">内容:</span><div class="file_neirong">${fileOther.attachName}</div></div>--%>
-	<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileOther.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileOther.attachTypes}</div>
-								</td>
-								<td></td>
-								<td></td>
-								<td></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=${fileOther.id}&projectId=${projectRecords.id}&uploadMode=${projectcontentinfo.uploadMode}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-									</div>
-								</td>
-								<td style="display:none">${fileOther.fileFlag}</td>
-							</tr>
-							<c:forEach items="${fileOther.workAttachments}" var = "workClientAttachment" varStatus="status">
-								<tr class="file_other_${fileOther.id}_tr">
-									<td></td>
-									<c:choose>
-										<c:when test="${projectcontentinfo.uploadMode == 2}">
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpg')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'png')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
-                                                           or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-													<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'zip')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jar')
-																					   or fn:containsIgnoreCase(workClientAttachment.attachmentName,'7z')}">
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',3)">${workClientAttachment.attachmentName}</a></td>
-																</c:when>
-																<c:otherwise>
-																	<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-										</c:otherwise>
-									</c:choose>
-<%--									<td><a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a></td>--%>
-									<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${workClientAttachment.description}')">${workClientAttachment.description}</td>
+			<%-- showAddButton="true" 显示添加按钮 --%>
+			<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+			<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+			<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+			<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="成果文件"
+					onChangeFunc="insertTitle"
+					fileList="${projectcontentinfo.fileAttachmentList}"
+					projectId="${projectRecords.id}"
+					uploadMode="${projectcontentinfo.uploadMode}"
+					moduleId="attachment"
+					showEditBtn="true"/>
+
+			<%-- showAddButton="true" 显示添加按钮 --%>
+			<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+			<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+			<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+			<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="依据性文件"
+					onChangeFunc="gistdataInsertTitle"
+					fileList="${projectcontentinfo.fileGistdataList}"
+					projectId="${projectRecords.id}"
+					uploadMode="${projectcontentinfo.uploadMode}"
+					moduleId="gistdata"
+					showEditBtn="true"/>
+
+
+			<%-- showAddButton="true" 显示添加按钮 --%>
+			<%-- parentId="13" 父级ID,根据实际业务传递 --%>
+			<%-- projectType="2" 项目类型,根据实际业务传递 --%>
+			<%-- reviewFeeSelector="reviewFee" 评审费用选择器ID --%>
+			<%-- showEditBtn="true" 显示编辑按钮 --%>
+			<table:otherFileInstallDisplay
+					title="其他文件"
+					onChangeFunc="otherInsertTitle"
+					fileList="${projectcontentinfo.fileOtherList}"
+					projectId="${projectRecords.id}"
+					uploadMode="${projectcontentinfo.uploadMode}"
+					moduleId="other"
+					showEditBtn="true"/>
 
 
-									<td class="op-td" style="text-align:center;">
-										<fmt:formatDate value="${workClientAttachment.createDate}" type="date"/>
-									</td>
-									<td>
-											${workClientAttachment.fileSize}
-									</td>
-									<td class="op-td" style="text-align: center">
-										<div class="op-btn-box" >
-
-												<%--附件下载删除--%>
-											<c:choose>
-												<c:when test="${projectcontentinfo.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-															<a href="${workClientAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:when>
-														<c:otherwise>
-															<a href="${workClientAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-												</c:otherwise>
-											</c:choose>
-
-												<%--											<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable',this)" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>--%>
-										</div>
-									</td>
-								</tr>
-							</c:forEach>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-			<script type="text/template" id="otherTpl">//<!--
-                <tr id="budgetList{{idx}}">
-                    <td class="hide">
-                        <input id="otherTpl{{idx}}_id" type="hidden" value="{{row.id}}" class="clientId"/>
-                    </td>
-                    <td class="hide">
-                        0
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachName}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachLength}}
-                    </td>
-                    <td style="text-align:center;">
-                        {{row.attachTypes}}
-                    </td>
-                    <td style="text-align:center;">
-
-                    </td>
-					<td class="op-td">
-						<div class="op-btn-box" >
-							<a href="javascript:void(0)"  onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentForm?attachmentId={{row.id}}&projectId=${projectRecords.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
-						</div>
-					</td>
-                </tr>//-->
-			</script>
 			<div class="form-group layui-row">
 				<div class="form-group-label" style="overflow:hidden">
 					<h2 style="float: left">自检</h2>

+ 27 - 533
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/reportedView.jsp

@@ -1660,545 +1660,39 @@
                 </div>
             </div>
             <div class="form-group layui-row first hide" id="AccessoryView">
-                <div class="form-group layui-row">
-                    <div class="form-group-label"><h2>成果文件</h2></div>
-                    <div class="layui-item nav-btns">
-                    </div>
-                    <div id="addFile_attachment" style="display: none" class="upload-progress">
-                        <span id="fileName_attachment" ></span>
-                        <span id="_attachment" ></span>
-                        <b><span id="baifenbi_attachment" ></span></b>
-                        <div class="progress">
-                            <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                            </div>
-                        </div>
-                    </div>
-                    <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-                    <span id="attachment_title"></span>
-                    <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                        <table id="upTable" class="table table-bordered table-condensed">
-                            <thead>
-                            <tr>
-                                <th width="20%">文件要求</th>
-                                <th width="35%">文件描述/文件</th>
-                                <th width="20%">文件类型</th>
-                                <th width="160px">上传时间</th>
-                                <th width="120px">文件大小(M)</th>
-                                <th width="100px">操作</th>
-                            </tr>
-                            </thead>
-                            <tbody id="file_attachment">
-                            <c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-                                <tr id="${fileAttachment.id}" pid="${fileAttachment.parent.id}">
-                                    <c:choose>
-                                        <c:when test="${fileAttachment.mustFlag == 1}">
-                                            <td class="tabMove" style="text-align: left;"><span style="color: red">* </span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-                                        </c:when>
-                                        <c:otherwise>
-                                            <c:choose>
-                                                <c:when test="${fileAttachment.flag == 0}">
-                                                    <td class="tabMove" style="text-align: left;">${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-                                                </c:when>
-                                                <c:otherwise>
-                                                    <td></td>
-                                                </c:otherwise>
-                                            </c:choose>
-                                        </c:otherwise>
-                                    </c:choose>
-                                    <td>
-                                        <c:choose>
-                                            <c:when test="${fileAttachment.flag == 0}">
-                                                <%--															<div><span class="file_nei">内容:</span><div class="file_neirong">${fileAttachment.attachName}</div></div>--%>
-                                                <div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileAttachment.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileAttachment.attachTypes}</div>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <c:choose>
-                                                    <c:when test="${projectcontentinfo.uploadMode == 2}">
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'jpg')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'png')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'gif')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'bmp')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'jpeg')}">
-                                                                <img src="${fileAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileAttachment.temporaryUrl}','90%','90%')" alt="${fileAttachment.attachName}">
-                                                            </c:when>
-                                                            <c:otherwise>
-                                                                <c:choose>
-                                                                    <c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-                                                                        <a class="attention-info" href="javascript:void(0)"  onclick="openPreview('${fileAttachment.temporaryUrl}',1)">${fileAttachment.attachName} ; </a>
-                                                                    </c:when>
-                                                                    <c:otherwise>
-                                                                        <c:choose>
-                                                                            <c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'7z')}">
-                                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.temporaryUrl}',3)">${fileAttachment.attachName}</a>
-                                                                            </c:when>
-                                                                            <c:otherwise>
-                                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.temporaryUrl}',2)">${fileAttachment.attachName}</a>
-                                                                            </c:otherwise>
-                                                                        </c:choose>
-                                                                    </c:otherwise>
-                                                                </c:choose>
-                                                            </c:otherwise>
-                                                        </c:choose>
-                                                    </c:when>
-                                                    <c:otherwise>
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'jpg')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'png')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'gif')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'bmp')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'jpeg')}">
-                                                                <img src="${fileAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileAttachment.url}','90%','90%')" alt="${fileAttachment.attachName}">
-                                                            </c:when>
-                                                            <c:otherwise>
-                                                                <c:choose>
-                                                                    <c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-                                                                        <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',1)">${fileAttachment.attachName} ; </a>
-                                                                    </c:when>
-                                                                    <c:otherwise>
-                                                                        <c:choose>
-                                                                            <c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'7z')}">
-                                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',3)">${fileAttachment.attachName}</a>
-                                                                            </c:when>
-                                                                            <c:otherwise>
-                                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',2)">${fileAttachment.attachName}</a>
-                                                                            </c:otherwise>
-                                                                        </c:choose>
-                                                                    </c:otherwise>
-                                                                </c:choose>
-                                                            </c:otherwise>
-                                                        </c:choose>
-                                                    </c:otherwise>
-                                                </c:choose>
-                                                <%--											<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileAttachment.url}','90%','90%')">${fileAttachment.attachName} ; </a>--%>
-                                            </c:otherwise>
-                                        </c:choose>
-                                    </td>
-
-
-                                    <c:choose>
-                                        <c:when test="${fileAttachment.flag == 0}">
-                                            <td class="op-td"></td>
-                                        </c:when>
-                                        <c:otherwise>
-                                            <td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${fileAttachment.description}')">${fileAttachment.description}</td>
-                                        </c:otherwise>
-                                    </c:choose>
-
-
-                                    <td class="op-td" style="text-align:center;">
-                                        <c:choose>
-                                            <c:when test="${fileAttachment.flag == 0}">
-                                                <div></div>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <fmt:formatDate value="${fileAttachment.createDate}" type="date"/>
-                                            </c:otherwise>
-                                        </c:choose>
-                                    </td>
-                                    <td class="op-td" style="text-align:center;">
-                                            ${fileAttachment.fileSize}
-                                    </td>
-                                    <td class="op-td" style="text-align:center;">
-                                        <div class="op-btn-box" >
-                                            <c:choose>
-                                                <c:when test="${fileAttachment.flag == 0}">
-
-                                                </c:when>
-                                                <c:otherwise>
-
-                                                    <%--附件下载删除--%>
-                                                    <c:choose>
-                                                        <c:when test="${projectReportRecord.uploadMode == 2}">
-                                                            <c:choose>
-                                                                <c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-                                                                    <a href="${fileAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                                </c:when>
-                                                                <c:otherwise>
-                                                                    <a href="${fileAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                                </c:otherwise>
-                                                            </c:choose>
-                                                        </c:when>
-                                                        <c:otherwise>
-                                                            <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                        </c:otherwise>
-                                                    </c:choose>
-                                                </c:otherwise>
-                                            </c:choose>
-                                        </div>
-                                    </td>
-                                </tr>
-                            </c:forEach>
-                            </tbody>
-                        </table>
-                    </div>
-                </div>
-                <div class="form-group layui-row">
-                    <div class="form-group-label"><h2>依据性文件</h2></div>
-                    <div class="layui-item nav-btns">
-                            <%--<a id="gistdata_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>--%>
-                    </div>
-                    <div id="addFile_gistdata" style="display: none" class="upload-progress">
-                        <span id="fileName_gistdata" ></span>
-                        <span id="_gistdata" ></span>
-                        <b><span id="baifenbi_gistdata" ></span></b>
-                        <div class="progress">
-                            <div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                            </div>
-                        </div>
-                    </div>
-                    <input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
-                    <span id="gistdata_title"></span>
-                    <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                        <table id="gistdata_upTable" class="table table-bordered table-condensed">
-                            <thead>
-                            <tr>
-                                <th width="20%">文件要求</th>
-                                <th width="35%">文件描述/文件</th>
-                                <th width="20%">文件类型</th>
-                                <th width="160px">上传时间</th>
-                                <th width="120px">文件大小(M)</th>
-                                <th width="100px">操作</th>
-                            </tr>
-                            </thead>
-                            <tbody id="file_gistdata">
-                            <c:forEach items="${projectReportRecord.fileGistdataList}" var = "fileGistdata" varStatus="status">
-                                <tr id="${fileGistdata.id}" pid="${fileGistdata.parent.id}">
-                                        <%-- <td>${status.index + 1}</td>--%>
-                                    <c:choose>
-                                        <c:when test="${fileGistdata.mustFlag == 1}">
-                                            <td class="tabMove" style="text-align: left;"><span style="color: red">* </span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-                                        </c:when>
-                                        <c:otherwise>
-                                            <c:choose>
-                                                <c:when test="${fileGistdata.flag == 0}">
-                                                    <td class="tabMove" style="text-align: left;">${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-                                                </c:when>
-                                                <c:otherwise>
-                                                    <td></td>
-                                                </c:otherwise>
-                                            </c:choose>
-                                        </c:otherwise>
-                                    </c:choose>
-                                    <td>
-                                        <c:choose>
-                                            <c:when test="${fileGistdata.flag == 0}">
-                                                <%--																	<div><span class="file_nei">内容:</span><div class="file_neirong">${fileGistdata.attachName}</div></div>--%>
-                                                <div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileGistdata.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileGistdata.attachTypes}</div>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <c:choose>
-                                                    <c:when test="${projectcontentinfo.uploadMode == 2}">
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'jpg')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'png')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'gif')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'bmp')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'jpeg')}">
-                                                                <img src="${fileGistdata.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileGistdata.temporaryUrl}','90%','90%')" alt="${fileGistdata.attachName}">
-                                                            </c:when>
-                                                            <c:otherwise>
-                                                                <c:choose>
-                                                                    <c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'pdf')}">
-                                                                        <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',1)">${fileGistdata.attachName} ; </a>
-                                                                    </c:when>
-                                                                    <c:otherwise>
-                                                                        <c:choose>
-                                                                            <c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'7z')}">
-                                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',3)">${fileGistdata.attachName}</a>
-                                                                            </c:when>
-                                                                            <c:otherwise>
-                                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',2)">${fileGistdata.attachName}</a>
-                                                                            </c:otherwise>
-                                                                        </c:choose>
-                                                                    </c:otherwise>
-                                                                </c:choose>
-                                                            </c:otherwise>
-                                                        </c:choose>
-                                                    </c:when>
-                                                    <c:otherwise>
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'jpg')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'png')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'gif')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'bmp')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'jpeg')}">
-                                                                <img src="${fileGistdata.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileGistdata.url}','90%','90%')" alt="${fileGistdata.attachName}">
-                                                            </c:when>
-                                                            <c:otherwise>
-                                                                <c:choose>
-                                                                    <c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'pdf')}">
-                                                                        <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',1)">${fileGistdata.attachName} ; </a>
-                                                                    </c:when>
-                                                                    <c:otherwise>
-                                                                        <c:choose>
-                                                                            <c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'7z')}">
-                                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',3)">${fileGistdata.attachName}</a>
-                                                                            </c:when>
-                                                                            <c:otherwise>
-                                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',2)">${fileGistdata.attachName}</a>
-                                                                            </c:otherwise>
-                                                                        </c:choose>
-                                                                    </c:otherwise>
-                                                                </c:choose>
-                                                            </c:otherwise>
-                                                        </c:choose>
-                                                    </c:otherwise>
-                                                </c:choose>
-                                                <%--												<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileGistdata.url}','90%','90%')">${fileGistdata.attachName} ; </a>--%>
-                                            </c:otherwise>
-                                        </c:choose>
-                                    </td>
 
 
-                                    <c:choose>
-                                        <c:when test="${fileGistdata.flag == 0}">
-                                            <td class="op-td"></td>
-                                        </c:when>
-                                        <c:otherwise>
-                                            <td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${fileGistdata.description}')">${fileGistdata.description}</td>
-                                        </c:otherwise>
-                                    </c:choose>
-                                    <td class="op-td" style="text-align:center;">
-                                        <c:choose>
-                                            <c:when test="${fileGistdata.flag == 0}">
-                                                <div></div>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <fmt:formatDate value="${fileGistdata.createDate}" type="date"/>
-                                            </c:otherwise>
-                                        </c:choose>
-                                    </td>
-                                    <td class="op-td"  style="text-align:center;">
-                                            ${fileGistdata.fileSize}
-                                    </td>
-                                    <td class="op-td"  style="text-align:center;">
-                                        <div class="op-btn-box" >
-                                            <c:choose>
-                                                <c:when test="${fileGistdata.flag == 0}">
 
-                                                </c:when>
-                                                <c:otherwise>
+                <!-- 成果文件模块引用 -->
+                <table:otherFileDisplay
+                        title="成果文件"
+                        onChangeFunc="insertTitle"
+                        fileList="${projectReportRecord.fileAttachmentList}"
+                        uploadMode="${projectReportRecord.uploadMode}"
+                        moduleId="other"
+                        projectContentInfo="${projectReportRecord}"
+                        projectReportRecord="${projectReportRecord}"/>
 
-                                                    <%--附件下载删除--%>
-                                                    <c:choose>
-                                                        <c:when test="${projectReportRecord.uploadMode == 2}">
-                                                            <c:choose>
-                                                                <c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'pdf')}">
-                                                                    <a href="${fileGistdata.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                                </c:when>
-                                                                <c:otherwise>
-                                                                    <a href="${fileGistdata.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                                </c:otherwise>
-                                                            </c:choose>
-                                                        </c:when>
-                                                        <c:otherwise>
-                                                            <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileGistdata.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                        </c:otherwise>
-                                                    </c:choose>
-                                                </c:otherwise>
-                                            </c:choose>
-                                        </div>
-                                    </td>
-                                    <td style="display:none">${fileGistdata.id}</td>
-                                    <td style="display:none">${fileGistdata.mustFlag}</td>
-                                </tr>
-                            </c:forEach>
-                            </tbody>
-                        </table>
-                    </div>
-                </div>
-                <div class="form-group layui-row">
-                    <div class="form-group-label"><h2>其他文件</h2></div>
-                    <div class="layui-item nav-btns">
-                            <%--<a id="other_btn" class="nav-btn nav-btn-add" title="添加附件"><i class="fa fa-plus"></i>&nbsp;添加附件</a>--%>
-                    </div>
-                    <div id="addFile_other" style="display: none" class="upload-progress">
-                        <span id="fileName_other" ></span>
-                        <span id="_other" ></span>
-                        <b><span id="baifenbi_other" ></span></b>
-                        <div class="progress">
-                            <div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
-                            </div>
-                        </div>
-                    </div>
-                    <input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
-                    <span id="other_title"></span>
-                    <div class="layui-item layui-col-xs12" style="padding:0 16px;">
-                        <table id="upTable_other" class="table table-bordered table-condensed">
-                            <thead>
-                            <tr>
-                                <th width="20%">文件要求</th>
-                                <th width="35%">文件描述/文件</th>
-                                <th width="20%">文件类型</th>
-                                <th width="160px">上传时间</th>
-                                <th width="120px">文件大小(M)</th>
-                                <th width="100px">操作</th>
-                            </tr>
-                            </thead>
-                            <tbody id="file_other">
-                            <c:forEach items="${projectReportRecord.fileOtherList}" var = "fileOther" varStatus="status">
-                                <tr id="${fileOther.id}" pid="${fileOther.parent.id}">
-                                        <%-- <td>${status.index + 1}</td>--%>
-                                    <c:choose>
-                                        <c:when test="${fileOther.mustFlag == 1}">
-                                            <td class="tabMove" style="text-align: left;"><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-                                        </c:when>
-                                        <c:otherwise>
-                                            <c:choose>
-                                                <c:when test="${fileOther.flag == 0}">
-                                                    <td class="tabMove" style="text-align: left;">${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-                                                </c:when>
-                                                <c:otherwise>
-                                                    <td></td>
-                                                </c:otherwise>
-                                            </c:choose>
-                                        </c:otherwise>
-                                    </c:choose>
-                                    <td>
-                                        <c:choose>
-                                            <c:when test="${fileOther.flag == 0}">
-                                                <%--																	<div style="overflow: hidden"><span class="file_nei">内容:</span><div class="file_neirong">${fileOther.attachName}</div></div>--%>
-                                                <div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileOther.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileOther.attachTypes}</div>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <c:choose>
-                                                    <c:when test="${projectcontentinfo.uploadMode == 2}">
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'jpg')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'png')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'gif')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'bmp')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'jpeg')}">
-                                                                <img src="${fileOther.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileOther.temporaryUrl}','90%','90%')" alt="${fileOther.attachName}">
-                                                            </c:when>
-                                                            <c:otherwise>
-                                                                <c:choose>
-                                                                    <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
-                                                                        <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',1)">${fileOther.attachName} ; </a>
-                                                                    </c:when>
-                                                                    <c:otherwise>
-                                                                        <c:choose>
-                                                                            <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'7z')}">
-                                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',3)">${fileOther.attachName}</a>
-                                                                            </c:when>
-                                                                            <c:otherwise>
-                                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',2)">${fileOther.attachName}</a>
-                                                                            </c:otherwise>
-                                                                        </c:choose>
-                                                                    </c:otherwise>
-                                                                </c:choose>
-                                                            </c:otherwise>
-                                                        </c:choose>
-                                                    </c:when>
-                                                    <c:otherwise>
-                                                        <c:choose>
-                                                            <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'jpg')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'png')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'gif')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'bmp')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'jpeg')}">
-                                                                <img src="${fileOther.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileOther.url}','90%','90%')" alt="${fileOther.attachName}">
-                                                            </c:when>
-                                                            <c:otherwise>
-                                                                <c:choose>
-                                                                    <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
-                                                                        <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',1)">${fileOther.attachName} ; </a>
-                                                                    </c:when>
-                                                                    <c:otherwise>
-                                                                        <c:choose>
-                                                                            <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'7z')}">
-                                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',3)">${fileOther.attachName}</a>
-                                                                            </c:when>
-                                                                            <c:otherwise>
-                                                                                <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',2)">${fileOther.attachName}</a>
-                                                                            </c:otherwise>
-                                                                        </c:choose>
-                                                                    </c:otherwise>
-                                                                </c:choose>
-                                                            </c:otherwise>
-                                                        </c:choose>
-                                                    </c:otherwise>
-                                                </c:choose>
-                                                <!--													<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileOther.url}','90%','90%')">${fileOther.attachName} ; </a>-->
-                                            </c:otherwise>
-                                        </c:choose>
-                                    </td>
+                <!-- 依据性文件模块引用 -->
+                <table:otherFileDisplay
+                        title="依据性文件"
+                        onChangeFunc="gistdataInsertTitle"
+                        fileList="${projectReportRecord.fileGistdataList}"
+                        uploadMode="${projectReportRecord.uploadMode}"
+                        moduleId="other"
+                        projectContentInfo="${projectReportRecord}"
+                        projectReportRecord="${projectReportRecord}"/>
 
-                                    <c:choose>
-                                        <c:when test="${fileOther.flag == 0}">
-                                            <td class="op-td"></td>
-                                        </c:when>
-                                        <c:otherwise>
-                                            <td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${fileOther.description}')">${fileOther.description}</td>
-                                        </c:otherwise>
-                                    </c:choose>
-                                    <td class="op-td" style="text-align:center;">
-                                        <c:choose>
-                                            <c:when test="${fileOther.flag == 0}">
-                                                <div></div>
-                                            </c:when>
-                                            <c:otherwise>
-                                                <fmt:formatDate value="${fileOther.createDate}" type="date"/>
-                                            </c:otherwise>
-                                        </c:choose>
-                                    </td>
-                                    <td class="op-td" style="text-align:center;">
-                                            ${fileOther.fileSize}
-                                    </td>
-                                    <td class="op-td" style="text-align:center;">
-                                        <div class="op-btn-box" >
-                                            <c:choose>
-                                                <c:when test="${fileOther.flag == 0}">
 
-                                                </c:when>
-                                                <c:otherwise>
-                                                    <%--附件下载删除--%>
-                                                    <c:choose>
-                                                        <c:when test="${projectReportRecord.uploadMode == 2}">
-                                                            <c:choose>
-                                                                <c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
-                                                                    <a href="${fileOther.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                                </c:when>
-                                                                <c:otherwise>
-                                                                    <a href="${fileOther.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                                </c:otherwise>
-                                                            </c:choose>
-                                                        </c:when>
-                                                        <c:otherwise>
-                                                            <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileOther.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-                                                        </c:otherwise>
-                                                    </c:choose>
-                                                </c:otherwise>
-                                            </c:choose>
-                                        </div>
-                                    </td>
-                                    <td style="display:none">${fileOther.id}</td>
-                                    <td style="display:none">${fileOther.mustFlag}</td>
-                                </tr>
-                            </c:forEach>
-                            </tbody>
-                        </table>
-                    </div>
-                </div>
+                <!-- 其他文件模块引用 -->
+                <table:otherFileDisplay
+                        title="其他文件"
+                        onChangeFunc="otherInsertTitle"
+                        fileList="${projectReportRecord.fileOtherList}"
+                        uploadMode="${projectReportRecord.uploadMode}"
+                        moduleId="other"
+                        projectContentInfo="${projectReportRecord}"
+                        projectReportRecord="${projectReportRecord}"/>
             </div>
 
         </div>

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

@@ -105,539 +105,40 @@
 		<form:hidden path="project.id"/>
 			<input type="hidden" id="reviewFee" value="${projectcontentinfo.projectReportData.reviewFee}">
 		<sys:message content="${message}"/>
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>成果文件</h2></div>
-				<div id="addFile_attachment" style="display: none" class="upload-progress">
-					<span id="fileName_attachment" ></span>
-					<span id="_attachment" ></span>
-					<b><span id="baifenbi_attachment" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
-				<span id="attachment_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable" class="table table-bordered table-condensed">
-						<thead>
-						<tr>
-							<th width="20%">文件要求</th>
-							<th width="30%">文件描述/文件</th>
-							<th width="20%">文件类型</th>
-							<th width="160px">上传时间</th>
-							<th width="120px">文件大小(M)</th>
-							<th width="180px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_attachment">
-						<c:forEach items="${projectcontentinfo.fileAttachmentList}" var = "fileAttachment" varStatus="status">
-							<tr id="${fileAttachment.id}" pid="${fileAttachment.parent.id}">
-								<c:choose>
-									<c:when test="${fileAttachment.mustFlag == 1}">
-										<td class="tabMove" style="text-align:left;"><span style="color: red">* </span>${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-									</c:when>
-									<c:otherwise>
-										<c:choose>
-											<c:when test="${fileAttachment.flag == 0}">
-												<td class="tabMove"  style="text-align:left;">${fileAttachment.attachName}<input type="hidden" value="${fileAttachment.attachName}"/></td>
-											</c:when>
-											<c:otherwise>
-												<td></td>
-											</c:otherwise>
-										</c:choose>
-									</c:otherwise>
-								</c:choose>
-								<td>
-									<c:choose>
-										<c:when test="${fileAttachment.flag == 0}">
-<%--											<div style="overflow: hidden"><span class="file_nei">内容:</span><div class="file_neirong">${fileAttachment.attachName}</div></div>--%>
-											<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileAttachment.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileAttachment.attachTypes}</div>
-										</c:when>
-										<c:otherwise>
-											<c:choose>
-												<c:when test="${projectcontentinfo.uploadMode == 2}">
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'jpg')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'png')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'gif')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'bmp')
-                                                           or fn:containsIgnoreCase(fileAttachment.attachName,'jpeg')}">
-															<img src="${fileAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileAttachment.temporaryUrl}','90%','90%')" alt="${fileAttachment.attachName}">
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-																	<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.temporaryUrl}',1)">${fileAttachment.attachName} ; </a>
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'7z')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.temporaryUrl}',3)">${fileAttachment.attachName}</a>
-																		</c:when>
-																		<c:otherwise>
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.temporaryUrl}',2)">${fileAttachment.attachName}</a>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'jpg')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'png')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'gif')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'bmp')
-																				   or fn:containsIgnoreCase(fileAttachment.attachName,'jpeg')}">
-															<img src="${fileAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileAttachment.url}','90%','90%')" alt="${fileAttachment.attachName}">
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-																	<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',1)">${fileAttachment.attachName} ; </a>
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileAttachment.attachName,'7z')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',3)">${fileAttachment.attachName}</a>
-																		</c:when>
-																		<c:otherwise>
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileAttachment.url}',2)">${fileAttachment.attachName}</a>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-												</c:otherwise>
-											</c:choose>
-<%--											<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileAttachment.url}','90%','90%')">${fileAttachment.attachName} ; </a>--%>
-										</c:otherwise>
-									</c:choose>
-								</td>
 
 
-								<c:choose>
-									<c:when test="${fileAttachment.flag == 0}">
-										<td class="op-td"></td>
-									</c:when>
-									<c:otherwise>
-										<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${fileAttachment.description}')">${fileAttachment.description}</td>
-									</c:otherwise>
-								</c:choose>
+			<!-- 成果文件模块引用 -->
+			<table:otherFileDisplay
+					title="成果文件"
+					onChangeFunc="insertTitle"
+					fileList="${projectcontentinfo.fileAttachmentList}"
+					uploadMode="${projectcontentinfo.uploadMode}"
+					moduleId="other"
+					projectContentInfo="${projectcontentinfo}"
+					projectReportRecord="${projectcontentinfo}"/>
+
+			<!-- 依据性文件模块引用 -->
+			<table:otherFileDisplay
+					title="依据性文件"
+					onChangeFunc="gistdataInsertTitle"
+					fileList="${projectcontentinfo.fileGistdataList}"
+					uploadMode="${projectcontentinfo.uploadMode}"
+					moduleId="other"
+					projectContentInfo="${projectcontentinfo}"
+					projectReportRecord="${projectcontentinfo}"/>
+
+
+			<!-- 其他文件模块引用 -->
+			<table:otherFileDisplay
+					title="其他文件"
+					onChangeFunc="otherInsertTitle"
+					fileList="${projectcontentinfo.fileOtherList}"
+					uploadMode="${projectcontentinfo.uploadMode}"
+					moduleId="other"
+					projectContentInfo="${projectcontentinfo}"
+					projectReportRecord="${projectcontentinfo}"/>
 
 
-								<td class="op-td" style="text-align:center;">
-									<c:choose>
-										<c:when test="${fileAttachment.flag == 0}">
-											<div></div>
-										</c:when>
-										<c:otherwise>
-											<fmt:formatDate value="${fileAttachment.createDate}" type="date"/>
-										</c:otherwise>
-									</c:choose>
-								</td>
-								<td>${fileAttachment.fileSize}</td>
-								<td class="op-td" style="text-align:center;">
-									<div class="op-btn-box" >
-										<c:choose>
-											<c:when test="${fileAttachment.flag == 0}">
-
-											</c:when>
-											<c:otherwise>
-												<%--附件下载删除--%>
-												<c:choose>
-													<c:when test="${projectcontentinfo.uploadMode == 2}">
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-																<a href="${fileAttachment.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-															</c:when>
-															<c:otherwise>
-																<a href="${fileAttachment.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-															</c:otherwise>
-														</c:choose>
-													</c:when>
-													<c:otherwise>
-														<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-													</c:otherwise>
-												</c:choose>
-												<c:if test="${fileAttachment.collectFlag != 1}">
-													<a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${fileAttachment.url}','${fileAttachment.createBy.id}','${fileAttachment.fileSize}')" class="op-btn op-btn-delete"  style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-												</c:if>
-											</c:otherwise>
-										</c:choose>
-									</div>
-								</td>
-							</tr>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-
-
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>依据性文件</h2></div>
-				<div id="addFile_gistdata" style="display: none" class="upload-progress">
-					<span id="fileName_gistdata" ></span>
-					<span id="_gistdata" ></span>
-					<b><span id="baifenbi_gistdata" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
-				<span id="gistdata_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="gistdata_upTable" class="table table-bordered table-condensed">
-						<thead>
-						<tr>
-							<th width="20%">文件要求</th>
-							<th width="30%">文件描述/文件</th>
-							<th width="20%">文件类型</th>
-							<th width="160px">上传时间</th>
-							<th width="120px">文件大小(M)</th>
-							<th width="180px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_gistdata">
-						<c:forEach items="${projectcontentinfo.fileGistdataList}" var = "fileGistdata" varStatus="status">
-							<tr id="${fileGistdata.id}" pid="${fileGistdata.parent.id}">
-									<%-- <td>${status.index + 1}</td>--%>
-										<c:choose>
-											<c:when test="${fileGistdata.mustFlag == 1}">
-												<td class="tabMove"  style="text-align:left;"><span style="color: red">* </span>${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-											</c:when>
-											<c:otherwise>
-												<c:choose>
-													<c:when test="${fileGistdata.flag == 0}">
-														<td class="tabMove"  style="text-align:left;">${fileGistdata.attachName}<input type="hidden" value="${fileGistdata.attachName}"/></td>
-													</c:when>
-													<c:otherwise>
-														<td></td>
-													</c:otherwise>
-												</c:choose>
-											</c:otherwise>
-										</c:choose>
-								<td>
-									<c:choose>
-										<c:when test="${fileGistdata.flag == 0}">
-<%--											<div style="overflow: hidden"><span class="file_nei">内容:</span><div class="file_neirong">${fileGistdata.attachName}</div></div>--%>
-											<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileGistdata.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileGistdata.attachTypes}</div>
-										</c:when>
-											<c:otherwise>
-												<c:choose>
-													<c:when test="${projectcontentinfo.uploadMode == 2}">
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'jpg')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'png')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'gif')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'bmp')
-                                                           or fn:containsIgnoreCase(fileGistdata.attachName,'jpeg')}">
-																<img src="${fileGistdata.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileGistdata.temporaryUrl}','90%','90%')" alt="${fileGistdata.attachName}">
-															</c:when>
-															<c:otherwise>
-																<c:choose>
-																	<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'pdf')}">
-																		<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',1)">${fileGistdata.attachName} ; </a>
-																	</c:when>
-																	<c:otherwise>
-																		<c:choose>
-																			<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'7z')}">
-																				<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',3)">${fileGistdata.attachName}</a>
-																			</c:when>
-																			<c:otherwise>
-																				<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.temporaryUrl}',2)">${fileGistdata.attachName}</a>
-																			</c:otherwise>
-																		</c:choose>
-																	</c:otherwise>
-																</c:choose>
-															</c:otherwise>
-														</c:choose>
-													</c:when>
-													<c:otherwise>
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'jpg')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'png')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'gif')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'bmp')
-																				   or fn:containsIgnoreCase(fileGistdata.attachName,'jpeg')}">
-																<img src="${fileGistdata.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileGistdata.url}','90%','90%')" alt="${fileGistdata.attachName}">
-															</c:when>
-															<c:otherwise>
-																<c:choose>
-																	<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-																		<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',1)">${fileGistdata.attachName} ; </a>
-																	</c:when>
-																	<c:otherwise>
-																		<c:choose>
-																			<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileGistdata.attachName,'7z')}">
-																				<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',3)">${fileGistdata.attachName}</a>
-																			</c:when>
-																			<c:otherwise>
-																				<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileGistdata.url}',2)">${fileGistdata.attachName}</a>
-																			</c:otherwise>
-																		</c:choose>
-																	</c:otherwise>
-																</c:choose>
-															</c:otherwise>
-														</c:choose>
-													</c:otherwise>
-												</c:choose>
-<%--												<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileGistdata.url}','90%','90%')">${fileGistdata.attachName} ; </a>--%>
-										</c:otherwise>
-									</c:choose>
-								</td>
-
-
-										<c:choose>
-											<c:when test="${fileGistdata.flag == 0}">
-												<td class="op-td"></td>
-											</c:when>
-											<c:otherwise>
-												<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${fileGistdata.description}')">${fileGistdata.description}</td>
-											</c:otherwise>
-										</c:choose>
-										<td class="op-td" style="text-align:center;">
-											<c:choose>
-												<c:when test="${fileGistdata.flag == 0}">
-													<div></div>
-												</c:when>
-												<c:otherwise>
-													<fmt:formatDate value="${fileGistdata.createDate}" type="date"/>
-												</c:otherwise>
-											</c:choose>
-										</td>
-								<td>${fileGistdata.fileSize}</td>
-								<td class="op-td"  style="text-align:center;">
-									<div class="op-btn-box" >
-										<c:choose>
-											<c:when test="${fileGistdata.flag == 0}">
-
-											</c:when>
-											<c:otherwise>
-												<%--附件下载删除--%>
-												<c:choose>
-													<c:when test="${projectcontentinfo.uploadMode == 2}">
-														<c:choose>
-															<c:when test="${fn:containsIgnoreCase(fileGistdata.attachName,'pdf')}">
-																<a href="${fileGistdata.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-															</c:when>
-															<c:otherwise>
-																<a href="${fileGistdata.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-															</c:otherwise>
-														</c:choose>
-													</c:when>
-													<c:otherwise>
-														<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileGistdata.temporaryUrl}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-													</c:otherwise>
-												</c:choose>
-												<c:if test="${fileGistdata.collectFlag != 1}">
-													<a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${fileGistdata.url}','${fileGistdata.createBy.id}','${fileGistdata.fileSize}')" class="op-btn op-btn-delete"  style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-												</c:if>
-											</c:otherwise>
-										</c:choose>
-									</div>
-								</td>
-							</tr>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-
-			<div class="form-group layui-row">
-				<div class="form-group-label"><h2>其他文件</h2></div>
-				<div id="addFile_other" style="display: none" class="upload-progress">
-					<span id="fileName_other" ></span>
-					<span id="_other" ></span>
-					<b><span id="baifenbi_other" ></span></b>
-					<div class="progress">
-						<div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
-						</div>
-					</div>
-				</div>
-				<input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
-				<span id="other_title"></span>
-				<div class="layui-item layui-col-xs12" style="padding:0 16px;">
-					<table id="upTable_other" class="table table-bordered table-condensed">
-						<thead>
-						<tr>
-							<th width="20%">文件要求</th>
-							<th width="30%">文件描述/文件</th>
-							<th width="20%">文件类型</th>
-							<th width="160px">上传时间</th>
-							<th width="120px">文件大小(M)</th>
-							<th width="180px">操作</th>
-						</tr>
-						</thead>
-						<tbody id="file_other">
-						<c:forEach items="${projectcontentinfo.fileOtherList}" var = "fileOther" varStatus="status">
-							<tr id="${fileOther.id}" pid="${fileOther.parent.id}">
-									<%-- <td>${status.index + 1}</td>--%>
-										<c:choose>
-											<c:when test="${fileOther.mustFlag == 1}">
-												<td class="tabMove"  style="text-align:left;"><span style="color: red">* </span>${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-											</c:when>
-											<c:otherwise>
-												<c:choose>
-													<c:when test="${fileOther.flag == 0}">
-														<td class="tabMove"  style="text-align:left;">${fileOther.attachName}<input type="hidden" value="${fileOther.attachName}"/></td>
-													</c:when>
-													<c:otherwise>
-														<td></td>
-													</c:otherwise>
-												</c:choose>
-											</c:otherwise>
-										</c:choose>
-										<td>
-											<c:choose>
-												<c:when test="${fileOther.flag == 0}">
-<%--													<div style="overflow: hidden"><span class="file_nei">内容:</span><div class="file_neirong">${fileOther.attachName}</div></div>--%>
-													<div style="white-space:normal; word-break:break-all;overflow:hidden;"><span style="font-weight: bold">文件格式及大小:</span>${fileOther.attachLength}M;</div><div style="white-space:normal; word-break:break-all;overflow:hidden;">  ${fileOther.attachTypes}</div>
-												</c:when>
-												<c:otherwise>
-													<c:choose>
-														<c:when test="${projectcontentinfo.uploadMode == 2}">
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'jpg')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'png')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'gif')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'bmp')
-                                                           or fn:containsIgnoreCase(fileOther.attachName,'jpeg')}">
-																	<img src="${fileOther.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileOther.temporaryUrl}','90%','90%')" alt="${fileOther.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',1)">${fileOther.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',3)">${fileOther.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.temporaryUrl}',2)">${fileOther.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:when>
-														<c:otherwise>
-															<c:choose>
-																<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'jpg')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'png')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'gif')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'bmp')
-																				   or fn:containsIgnoreCase(fileOther.attachName,'jpeg')}">
-																	<img src="${fileOther.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${fileOther.url}','90%','90%')" alt="${fileOther.attachName}">
-																</c:when>
-																<c:otherwise>
-																	<c:choose>
-																		<c:when test="${fn:containsIgnoreCase(fileAttachment.attachName,'pdf')}">
-																			<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',1)">${fileOther.attachName} ; </a>
-																		</c:when>
-																		<c:otherwise>
-																			<c:choose>
-																				<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'rar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'zip')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'jar')
-																					   or fn:containsIgnoreCase(fileOther.attachName,'7z')}">
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',3)">${fileOther.attachName}</a>
-																				</c:when>
-																				<c:otherwise>
-																					<a class="attention-info" href="javascript:void(0)" onclick="openPreview('${fileOther.url}',2)">${fileOther.attachName}</a>
-																				</c:otherwise>
-																			</c:choose>
-																		</c:otherwise>
-																	</c:choose>
-																</c:otherwise>
-															</c:choose>
-														</c:otherwise>
-													</c:choose>
-<%--													<a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${fileOther.url}','90%','90%')">${fileOther.attachName} ; </a>--%>
-												</c:otherwise>
-											</c:choose>
-										</td>
-
-
-										<c:choose>
-											<c:when test="${fileGistdata.flag == 0}">
-												<td class="op-td"></td>
-											</c:when>
-											<c:otherwise>
-												<td class="op-td" style="white-space:normal; word-break:break-all;overflow:hidden;" onclick="readOpenInfo('${fileOther.description}')">${fileOther.description}</td>
-											</c:otherwise>
-										</c:choose>
-										<td class="op-td" style="text-align:center;">
-											<c:choose>
-												<c:when test="${fileOther.flag == 0}">
-													<div></div>
-												</c:when>
-												<c:otherwise>
-													<fmt:formatDate value="${fileOther.createDate}" type="date"/>
-												</c:otherwise>
-											</c:choose>
-										</td>
-										<td>${fileOther.fileSize}</td>
-										<td class="op-td" style="text-align:center;">
-											<div class="op-btn-box" >
-												<c:choose>
-													<c:when test="${fileOther.flag == 0}">
-
-													</c:when>
-													<c:otherwise>
-														<%--附件下载删除--%>
-														<c:choose>
-															<c:when test="${projectcontentinfo.uploadMode == 2}">
-																<c:choose>
-																	<c:when test="${fn:containsIgnoreCase(fileOther.attachName,'pdf')}">
-																		<a href="${fileOther.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:when>
-																	<c:otherwise>
-																		<a href="${fileOther.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-																	</c:otherwise>
-																</c:choose>
-															</c:when>
-															<c:otherwise>
-																<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${fileOther.temporaryUrl}');" class="op-btn op-btn-download"><i class="fa fa-download"></i>&nbsp;下载</a>
-															</c:otherwise>
-														</c:choose>
-														<c:if test="${fileOther.collectFlag != 1}">
-															<a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${fileOther.url}','${fileOther.createBy.id}','${fileOther.fileSize}')" class="op-btn op-btn-delete"  style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i>&nbsp;收藏</a>
-														</c:if>
-													</c:otherwise>
-												</c:choose>
-											</div>
-										</td>
-							</tr>
-						</c:forEach>
-						</tbody>
-					</table>
-				</div>
-			</div>
-
 		<div class="form-group layui-row page-end"></div>
 		</form:form>
 	</div>