|
@@ -157,14 +157,162 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="form-group layui-row">
|
|
|
|
+ <div class="form-group-label"><h2>报告文件</h2></div>
|
|
|
|
+ <div id="addFile_attachment" style="display: none" class="upload-progress">
|
|
|
|
+ <span id="fileName_attachment" ></span>
|
|
|
|
+ <span id="_attachment" ></span>
|
|
|
|
+ <b><span id="baifenbi_attachment" ></span></b>
|
|
|
|
+ <div class="progress">
|
|
|
|
+ <div id="jindutiao_attachment" class="progress-bar" style="width: 0%" aria-valuenow="0">
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <input id="attachment_file" type="file" name="attachment_file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitle(this.value);"/>
|
|
|
|
+ <span id="attachment_title"></span>
|
|
|
|
+ <div class="layui-item layui-col-xs12" style="padding:0 16px;">
|
|
|
|
+ <table id="upTable" class="table table-bordered table-condensed details">
|
|
|
|
+ <thead>
|
|
|
|
+ <tr>
|
|
|
|
+ <%-- <th>序号</th>--%>
|
|
|
|
+ <th>电子件名称</th>
|
|
|
|
+ <th width="100px">最大容量(M)</th>
|
|
|
|
+ <th width="18%">类型限制</th>
|
|
|
|
+ <th>文件名</th>
|
|
|
|
+ <th width="150px">操作</th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody id="file_attachment">
|
|
|
|
+ <c:forEach items="${projectReportRecord.fileAttachmentList}" var = "fileAttachment" varStatus="status">
|
|
|
|
+ <tr>
|
|
|
|
+ <td style="display:none">${fileAttachment.id}</td>
|
|
|
|
+ <td>${fileAttachment.attachName}</td>
|
|
|
|
+ <td>${fileAttachment.attachLength}</td>
|
|
|
|
+ <td>${fileAttachment.attachTypes}</td>
|
|
|
|
+ <td>
|
|
|
|
+ <c:forEach items="${fileAttachment.workAttachments}" var = "workAttachment" varStatus="status">
|
|
|
|
+ <a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
|
|
|
|
+ </c:forEach>
|
|
|
|
+ </td>
|
|
|
|
+ <td class="op-td">
|
|
|
|
+ <div class="op-btn-box" >
|
|
|
|
+ <a href="javascript:void(0)" onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileAttachment.id}&projectId=${project.id}','70%','80%',false,'inputForm','upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
|
|
|
|
+ </div>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ </c:forEach>
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
|
|
<div class="form-group layui-row">
|
|
<div class="form-group layui-row">
|
|
|
|
+ <div class="form-group-label"><h2>依据性资料</h2></div>
|
|
|
|
+ <div id="addFile_gistdata" style="display: none" class="upload-progress">
|
|
|
|
+ <span id="fileName_gistdata" ></span>
|
|
|
|
+ <span id="_gistdata" ></span>
|
|
|
|
+ <b><span id="baifenbi_gistdata" ></span></b>
|
|
|
|
+ <div class="progress">
|
|
|
|
+ <div id="jindutiao_gistdata" class="progress-bar" style="width: 0%" aria-valuenow="0">
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <input id="gistdata_file" type="file" name="gistdata_file" multiple="multiple" style="display: none;" onChange="if(this.value)gistdataInsertTitle(this.value);"/>
|
|
|
|
+ <span id="gistdata_title"></span>
|
|
|
|
+ <div class="layui-item layui-col-xs12" style="padding:0 16px;">
|
|
|
|
+ <table id="gistdata_upTable" class="table table-bordered table-condensed details">
|
|
|
|
+ <thead>
|
|
|
|
+ <tr>
|
|
|
|
+ <%-- <th>序号</th>--%>
|
|
|
|
+ <th>电子件名称</th>
|
|
|
|
+ <th width="100px">最大容量(M)</th>
|
|
|
|
+ <th width="18%">类型限制</th>
|
|
|
|
+ <th>文件名</th>
|
|
|
|
+ <th width="150px">操作</th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody id="file_gistdata">
|
|
|
|
+ <c:forEach items="${projectReportRecord.fileGistdataList}" var = "fileGistdata" varStatus="status">
|
|
|
|
+ <tr>
|
|
|
|
+ <%-- <td>${status.index + 1}</td>--%>
|
|
|
|
+ <td style="display:none">${fileGistdata.id}</td>
|
|
|
|
+ <td>${fileGistdata.attachName}</td>
|
|
|
|
+ <td>${fileGistdata.attachLength}</td>
|
|
|
|
+ <td>${fileGistdata.attachTypes}</td>
|
|
|
|
+ <td>
|
|
|
|
+ <c:forEach items="${fileGistdata.workAttachments}" var = "workAttachment" varStatus="status">
|
|
|
|
+ <a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
|
|
|
|
+ </c:forEach>
|
|
|
|
+ </td>
|
|
|
|
+ <td class="op-td">
|
|
|
|
+ <div class="op-btn-box" >
|
|
|
|
+ <a href="javascript:void(0)" onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileGistdata.id}&projectId=${projectcontentinfo.project.id}','70%','80%',false,'inputForm','gistdata_upTable')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
|
|
|
|
+ </div>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ </c:forEach>
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="form-group layui-row">
|
|
|
|
+ <div class="form-group-label"><h2>其他文件</h2></div>
|
|
|
|
+ <div id="addFile_other" style="display: none" class="upload-progress">
|
|
|
|
+ <span id="fileName_other" ></span>
|
|
|
|
+ <span id="_other" ></span>
|
|
|
|
+ <b><span id="baifenbi_other" ></span></b>
|
|
|
|
+ <div class="progress">
|
|
|
|
+ <div id="jindutiao_other" class="progress-bar" style="width: 0%" aria-valuenow="0">
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <input id="other_file" type="file" name="other_file" multiple="multiple" style="display: none;" onChange="if(this.value)otherInsertTitle(this.value);"/>
|
|
|
|
+ <span id="other_title"></span>
|
|
|
|
+ <div class="layui-item layui-col-xs12" style="padding:0 16px;">
|
|
|
|
+ <table id="upTable_other" class="table table-bordered table-condensed details">
|
|
|
|
+ <thead>
|
|
|
|
+ <tr>
|
|
|
|
+ <%-- <th>序号</th>--%>
|
|
|
|
+ <th>电子件名称</th>
|
|
|
|
+ <th width="100px">最大容量(M)</th>
|
|
|
|
+ <th width="18%">类型限制</th>
|
|
|
|
+ <th>文件名</th>
|
|
|
|
+ <th width="150px">操作</th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody id="file_other">
|
|
|
|
+ <c:forEach items="${projectReportRecord.fileOtherList}" var = "fileOther" varStatus="status">
|
|
|
|
+ <tr>
|
|
|
|
+ <%-- <td>${status.index + 1}</td>--%>
|
|
|
|
+ <td style="display:none">${fileOther.id}</td>
|
|
|
|
+ <td>${fileOther.attachName}</td>
|
|
|
|
+ <td>${fileOther.attachLength}</td>
|
|
|
|
+ <td>${fileOther.attachTypes}</td>
|
|
|
|
+ <td>
|
|
|
|
+ <c:forEach items="${fileOther.workAttachments}" var = "workAttachment" varStatus="status">
|
|
|
|
+ <a class="attention-info" href="javascript:void(0)" onclick="preview('预览','${workAttachment.url}','90%','90%')">${workAttachment.attachmentName} ; </a>
|
|
|
|
+ </c:forEach>
|
|
|
|
+ </td>
|
|
|
|
+ <td class="op-td">
|
|
|
|
+ <div class="op-btn-box" >
|
|
|
|
+ <a href="javascript:void(0)" onclick="openBill2('编辑附件', '${ctx}/projectAccessory/projectAccessory/workAttachmentView?attachmentId=${fileOther.id}&projectId=${projectcontentinfo.project.id}','70%','80%',false,'inputForm','upTable_other')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>
|
|
|
|
+ </div>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ </c:forEach>
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <%--<div class="form-group layui-row">
|
|
<div class="form-group-label"><h2>附件信息列表</h2></div>
|
|
<div class="form-group-label"><h2>附件信息列表</h2></div>
|
|
|
|
|
|
<div class="layui-item layui-col-xs12 form-table-container">
|
|
<div class="layui-item layui-col-xs12 form-table-container">
|
|
<table id="permissionTable" class="layui-table" lay-filter="permissionTable"></table>
|
|
<table id="permissionTable" class="layui-table" lay-filter="permissionTable"></table>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
|
|
+ </div>--%>
|
|
|
|
|
|
<%--<div class="form-group layui-row">
|
|
<%--<div class="form-group layui-row">
|
|
<div class="form-group-label"><h2>附件信息</h2></div>
|
|
<div class="form-group-label"><h2>附件信息</h2></div>
|
|
@@ -222,6 +370,130 @@
|
|
<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
|
|
<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 src="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.js" charset="utf-8"></script>
|
|
<script>
|
|
<script>
|
|
|
|
+ function openBill2(title,url,width,height,target,formId,tableId){
|
|
|
|
+ var rows = $(this).parent().prevAll().length + 1;
|
|
|
|
+ var frameIndex = parent.layer.getFrameIndex(window.name);
|
|
|
|
+ var urls = url+"&index="+frameIndex;
|
|
|
|
+ if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
|
|
|
|
+ width='auto';
|
|
|
|
+ height='auto';
|
|
|
|
+ }else{//如果是PC端,根据用户设置的width和height显示。
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ top.layer.open({
|
|
|
|
+ type: 2,
|
|
|
|
+ area: [width, height],
|
|
|
|
+ title: title,
|
|
|
|
+ skin:"two-btns",
|
|
|
|
+ maxmin: false, //开启最大化最小化按钮
|
|
|
|
+ content: urls ,
|
|
|
|
+ btn: ['确定','关闭'],
|
|
|
|
+ yes: function(index, layero){
|
|
|
|
+ var body = top.layer.getChildFrame('body', index);
|
|
|
|
+ var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
|
|
|
+ var inputForm = body.find('#inputForm');
|
|
|
|
+ var top_iframe;
|
|
|
|
+ if(target){
|
|
|
|
+ top_iframe = target;//如果指定了iframe,则在改frame中跳转
|
|
|
|
+ }else{
|
|
|
|
+ top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
|
|
|
|
+ }
|
|
|
|
+ inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
|
+ inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
|
+ var $document = iframeWin.contentWindow.document;
|
|
|
|
+
|
|
|
|
+ formSubmit2($document,formId,index,tableId);
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ cancel: function(index){
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ function formSubmit2($document,inputForm,index,tableId){
|
|
|
|
+
|
|
|
|
+ var validateForm = $($document.getElementById(inputForm)).validate({
|
|
|
|
+ submitHandler: function(form){
|
|
|
|
+ loading('正在提交,请稍等...');
|
|
|
|
+ form.submit();
|
|
|
|
+ },
|
|
|
|
+ errorContainer: "#messageBox",
|
|
|
|
+ errorPlacement: function(error, element) {
|
|
|
|
+ $($document.getElementById("#messageBox")).text("输入有误,请先更正。");
|
|
|
|
+ if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
|
|
|
|
+ error.appendTo(element.parent().parent());
|
|
|
|
+ } else {
|
|
|
|
+ error.insertAfter(element);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ if(validateForm.form()){
|
|
|
|
+ $($document.getElementById(inputForm)).ajaxSubmit({
|
|
|
|
+ success:function(data) {
|
|
|
|
+ var d = data;
|
|
|
|
+ //输出提示信息
|
|
|
|
+ if(d.str.length>0){
|
|
|
|
+ parent.layer.msg(d.str,{icon:1});
|
|
|
|
+ }
|
|
|
|
+ $("#"+tableId).load(location.href + " #"+tableId);
|
|
|
|
+ //关闭当前页
|
|
|
|
+ top.layer.close(index)
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function formAttachment(title,url,width,height,target,formId){
|
|
|
|
+ var rows = $(this).parent().prevAll().length + 1;
|
|
|
|
+ var frameIndex = parent.layer.getFrameIndex(window.name);
|
|
|
|
+ var urls = url;
|
|
|
|
+ if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
|
|
|
|
+ width='auto';
|
|
|
|
+ height='auto';
|
|
|
|
+ }else{//如果是PC端,根据用户设置的width和height显示。
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ top.layer.open({
|
|
|
|
+ type: 2,
|
|
|
|
+ area: [width, height],
|
|
|
|
+ title: title,
|
|
|
|
+ skin:"two-btns",
|
|
|
|
+ maxmin: false, //开启最大化最小化按钮
|
|
|
|
+ content: urls ,
|
|
|
|
+ btn: ['确定','关闭'],
|
|
|
|
+ yes: function(index, layero){
|
|
|
|
+ var body = top.layer.getChildFrame('body', index);
|
|
|
|
+ var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
|
|
|
+ var inputForm = body.find('#inputForm');
|
|
|
|
+ var top_iframe;
|
|
|
|
+ if(target){
|
|
|
|
+ top_iframe = target;//如果指定了iframe,则在改frame中跳转
|
|
|
|
+ }else{
|
|
|
|
+ top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
|
|
|
|
+ }
|
|
|
|
+ inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
|
+ inputForm.attr("action","${ctx}/projectAccessory/projectAccessory/saveWorkAttachment");//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
|
+ var $document = iframeWin.contentWindow.document;
|
|
|
|
+ var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
|
|
|
+ var item = iframeWin.getSelectedItem();
|
|
|
|
+ setValuee(item);
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ cancel: function(index){
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ function setValuee(obj){
|
|
|
|
+ for(var i=0;i<obj.length;i++){
|
|
|
|
+ var idArr = $("#file_attachment tr:visible .clientId");
|
|
|
|
+ if(obj[i].id!=''&&!hasInArr(obj[i].id,idArr)){
|
|
|
|
+ addRowBaseData("#workBaseDataList",workBaseDataRowIdx,workBaseDataTpl,obj[i]);
|
|
|
|
+ $("#workBaseDataList"+workBaseDataRowIdx+"_nature").html("引用");
|
|
|
|
+ workBaseDataRowIdx=workBaseDataRowIdx+1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+</script>
|
|
|
|
+<%--<script>
|
|
/*使用模块加载的方式 加载文件*/
|
|
/*使用模块加载的方式 加载文件*/
|
|
layui.config({
|
|
layui.config({
|
|
base: '${ctx}/resoueces/css/layui/module/'
|
|
base: '${ctx}/resoueces/css/layui/module/'
|
|
@@ -374,6 +646,6 @@
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-</script>
|
|
|
|
|
|
+</script>--%>
|
|
</body>
|
|
</body>
|
|
</html>
|
|
</html>
|