|
@@ -22,18 +22,34 @@
|
|
|
<div class="mainContent">
|
|
|
<div class="title clearfix">
|
|
|
<ul class="nav nav-pills">
|
|
|
- <li class="dropdown"><a title="返回" href="{{rootUrl}}rproject/{{pid}}/section"><span
|
|
|
+ <li class="dropdown"><a title="返回" href="{{rootUrl}}project/{{currproArray.pid}}/section"><span
|
|
|
class="closePanel" aria-hidden="true" data-icon="Z"></span></a></li>
|
|
|
<li class="dropdown">
|
|
|
- <a href="{{rootUrl}}sproject/{{currproArray.pid}}/section" data-toggle="dropdown"
|
|
|
+
|
|
|
+ </li>
|
|
|
+ <li class="dropdown">
|
|
|
+ <a href="{{rootUrl}}project/{{currproArray.pid}}/section" data-toggle="dropdown"
|
|
|
+ class="dropdown-toggle">
|
|
|
+ {{currconArray.stname}}<b class="caret"></b>
|
|
|
+ </a>
|
|
|
+ <ul class="dropdown-menu">
|
|
|
+ <!-- loop allconArray -->
|
|
|
+ <li><a href="{{rootUrl}}project/{{currproArray.pid}}/section">{{allconArray' value.stname}}</a></li>
|
|
|
+ <!-- endloop -->
|
|
|
+ </ul>
|
|
|
+ </li>
|
|
|
+ <li class="dropdown">
|
|
|
+ <a href="{{rootUrl}}project/{{currproArray.pid}}/section" data-toggle="dropdown"
|
|
|
class="dropdown-toggle">
|
|
|
- {{currproArray.pname}}<b class="caret"></b>
|
|
|
+ {{curractmeasureArray.pmname}}<b class="caret"></b>
|
|
|
</a>
|
|
|
<ul class="dropdown-menu">
|
|
|
- <!-- loop allproArray -->
|
|
|
- <li><a href="{{rootUrl}}sproject/{{allproArray' value.pid}}/section">{{allproArray'
|
|
|
- value.pname}}</a></li>
|
|
|
+ <!-- loop allactmeasureArray -->
|
|
|
+ <li>
|
|
|
+ <a href="{{rootUrl}}project/{{currproArray.pid}}/section/{{allactmeasureArray' value.pmid}}/detail">{{allactmeasureArray' value.pmname}}</a></li>
|
|
|
<!-- endloop -->
|
|
|
+ <!-- <li class="divider"></li>
|
|
|
+ <li><a href="#">共18标段,查看更多</a></li>-->
|
|
|
</ul>
|
|
|
</li>
|
|
|
</ul>
|
|
@@ -43,9 +59,7 @@
|
|
|
<li>
|
|
|
<a href="{{rootUrl}}rproject/{{pid}}/section/{{pmid}}/detail">标段概况</a>
|
|
|
</li>
|
|
|
- <li class="active">
|
|
|
- <a href="/rproject/{{pid}}/section/{{pmid}}/files/{{mpid}}">附件</a>
|
|
|
- </li>
|
|
|
+ <li class="active"><a href="{{rootUrl}}rproject/{{pid}}/section/{{pmid}}/files">附件</a></li>
|
|
|
<!-- if {{mpid}}>0 -->
|
|
|
<li>
|
|
|
<a href="{{rootUrl}}rproject/{{pid}}/section/{{pmid}}/report/{{mpid}}">审批</a>
|
|
@@ -53,6 +67,28 @@
|
|
|
<!-- endif -->
|
|
|
</ul>
|
|
|
<!--导航-->
|
|
|
+ <!--筛选工具-->
|
|
|
+ <div class="clearfix">
|
|
|
+ <form class="form-inline">
|
|
|
+ <select id="numpname" class="span2">
|
|
|
+ <option value="0">不限期数</option>
|
|
|
+ <!-- loop groupArray -->
|
|
|
+ <option <!-- if {{num}} == {{groupArray' value.mpid}} --> selected <!-- endif -->
|
|
|
+ value="{{groupArray' value.mpid}}">第{{ToChinaseNum(groupArray' value.numpname)}}期
|
|
|
+ </option>
|
|
|
+ <!-- endloop -->
|
|
|
+ </select>
|
|
|
+ <select id="uploaduser" class="span2">
|
|
|
+ <option value="0">上传者</option>
|
|
|
+ <!-- loop owneridArray -->
|
|
|
+ <option <!-- if {{user}} == {{owneridArray' value.iaid}} --> selected <!-- endif -->
|
|
|
+ value="{{owneridArray' value.iaid}}">{{owneridArray' value.name}}</option>
|
|
|
+ <!-- endloop -->
|
|
|
+ </select>
|
|
|
+ <a href="/rproject/{{pid}}/section/{{pmid}}/files/recover" class="fR">附件回收站</a>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ <!--筛选工具-->
|
|
|
<!--文件管理-->
|
|
|
<div class="filesWrap">
|
|
|
<div class="filesList">
|
|
@@ -60,52 +96,72 @@
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th width="">文件名</th>
|
|
|
+ <th width="">期</th>
|
|
|
<th width="">节点</th>
|
|
|
<th width="">上传者</th>
|
|
|
<th width="">上传时间</th>
|
|
|
+ <th width="40">操作</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
- <!-- loop itematta -->
|
|
|
+ <!-- loop itemMeasureArray -->
|
|
|
<tr>
|
|
|
- <td width=""><span class="fileico ico-{{itematta' value.fileext}}"></span><a
|
|
|
- fileext="{{itematta' value.fileext}}"
|
|
|
+ <td width=""><span class="fileico ico-jpg"></span><a
|
|
|
+ fileext="{{itemMeasureArray' value.fileext}}"
|
|
|
+ imnid="{{itematta' value.imnid}}"
|
|
|
iaid="{{itematta' value.iaid}}"
|
|
|
- filename="{{itematta' value.filename}}"
|
|
|
- realname="{{itematta' value.realname}}"
|
|
|
- intime="{{formatDate(itematta' value.intime,'Y-m-d')}}"
|
|
|
- tips="{{itematta' value.tips}}"
|
|
|
+ filename="{{itemMeasureArray' value.filename}}"
|
|
|
+ realname="{{itemMeasureArray' value.realname}}"
|
|
|
+ intime="{{formatDate(itemMeasureArray' value.intime,'Y-m-d')}}"
|
|
|
+ tips="{{itemMeasureArray' value.tips}}"
|
|
|
href="#"
|
|
|
- numpname="第{{ToChinaseNum(itematta' value.numpname)}}期"
|
|
|
- id="fname_{{itematta' value.imnid}}">{{itematta' value.filename}}</a></td>
|
|
|
- <td>{{itematta' value.pmname}}</td>
|
|
|
- <td width="">{{itematta' value.realname}}</td>
|
|
|
- <td width="">{{formatDate(itematta' value.intime,'Y-m-d')}}</td>
|
|
|
+ numpname="第{{ToChinaseNum(itemMeasureArray' value.numpname)}}期"
|
|
|
+ id="fname_{{itemMeasureArray' value.imnid}}">{{itemMeasureArray' value.filename}}</a></td>
|
|
|
+ <td>第{{ToChinaseNum(itemMeasureArray' value.numpname)}}期</td>
|
|
|
+ <td>{{itemMeasureArray' value.pmname}}</td>
|
|
|
+ <td width="">{{itemMeasureArray' value.realname}}</td>
|
|
|
+ <td width="">{{formatDate(itemMeasureArray' value.intime,'Y-m-d')}}</td>
|
|
|
+ <td>
|
|
|
+ <div class="btn-group">
|
|
|
+ <a imnid="{{itemMeasureArray' value.imnid}}"
|
|
|
+ id="dropdown_{{itemMeasureArray' value.imnid}}"
|
|
|
+ class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#">
|
|
|
+ <span class="caret"></span>
|
|
|
+ </a>
|
|
|
+ <ul class="dropdown-menu">
|
|
|
+ <li><a><i class="icon-eye-open"></i> 预览</a></li>
|
|
|
+ <li><a href="#file-edit" data-toggle="modal"><i class="icon-pencil"></i> 编辑</a>
|
|
|
+ </li>
|
|
|
+ <li><a><i class="icon-download-alt"></i> 下载</a></li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
</tr>
|
|
|
<!-- endloop -->
|
|
|
</tbody>
|
|
|
</table>
|
|
|
+ <div class="pagination">
|
|
|
+ <ul>
|
|
|
+ {{pager}}
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="filesDetail">
|
|
|
+ <div class="filesDetail hide">
|
|
|
<table class="table table-striped">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th colspan="4">文件详情</th>
|
|
|
- <input type="hidden" value="" id="uuid"/>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tr>
|
|
|
<th width="60">文件名</th>
|
|
|
- <td colspan="3"><a href="#" id="filename" target="_blank">K0+800-K1+000图纸</a><span
|
|
|
- class="fR"><button
|
|
|
- class="btn btn-mini btn-primary" id="filedown"
|
|
|
- type="button">下载</button></span></td>
|
|
|
+ <td colspan="3" id="fn"> K0+800-K1+000图纸</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th width="60">格式</th>
|
|
|
- <td id="fileext"><span class="fileico ico-jpg"></span>.jpg</td>
|
|
|
- <th width="60">所在类</th>
|
|
|
- <td>台帐附件</td>
|
|
|
+ <td id="fileico"><span class="fileico ico-jpg"></span>.jpg</td>
|
|
|
+ <th width="60">所在期</th>
|
|
|
+ <td id="numpname">第二期</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th width="60">上传者</th>
|
|
@@ -115,7 +171,24 @@
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th width="60">备注/描述</th>
|
|
|
- <td id="tips" colspan="3">内容内容内容内容</td>
|
|
|
+ <td colspan="3" id="tips">内容内容内容内容</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th width="60">更多操作</th>
|
|
|
+ <td colspan="3">
|
|
|
+ <button class="btn btn-mini btn-primary" type="button" href="#file-replace"
|
|
|
+ data-toggle="modal"><i class="icon-retweet icon-white"></i>替换
|
|
|
+ </button>
|
|
|
+ <button class="btn btn-mini btn-info" id="historyAtt" type="button" href="#file-history"
|
|
|
+ data-toggle="modal"><i class="icon-time icon-white"></i>历史版本
|
|
|
+ </button>
|
|
|
+
|
|
|
+ <button id="del_{{itemMeasureArray' value.imnid}}"
|
|
|
+ imnid="{{itemMeasureArray' value.imnid}}" class="btn btn-mini btn-danger"
|
|
|
+ type="button" href="#file-del"
|
|
|
+ data-toggle="modal"><i class="icon-remove icon-white"></i>删除
|
|
|
+ </button>
|
|
|
+ </td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
</div>
|
|
@@ -125,6 +198,97 @@
|
|
|
<!--内容-->
|
|
|
</div>
|
|
|
</div>
|
|
|
+<!-- 编辑弹出 -->
|
|
|
+<div id="file-edit" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
|
|
|
+ aria-hidden="true">
|
|
|
+ <div class="modal-header">
|
|
|
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
+ <h3 id="myModalLabel">文件编辑</h3>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <div class="form">
|
|
|
+ <form class="form-horizontal">
|
|
|
+ <input type="hidden" id="upimnid" name="upimnid" value=""/>
|
|
|
+ <div class="control-group">
|
|
|
+ <label class="control-label" for="inputEmail">文件名称</label>
|
|
|
+ <div class="controls">
|
|
|
+ <input name="upfilename" id="upfilename" type="text"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="control-group">
|
|
|
+ <label class="control-label" for="inputEmail">备注/描述</label>
|
|
|
+ <div class="controls">
|
|
|
+ <textarea name="upfiledesc" id="upfiledesc"></textarea>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
|
|
|
+ <button id="updateFileDesc" class="btn btn-primary">确定修改</button>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<!-- 编辑弹出 -->
|
|
|
+<!-- 替换弹出 -->
|
|
|
+<div id="file-replace" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
|
|
|
+ aria-hidden="true">
|
|
|
+ <div class="modal-header">
|
|
|
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
+ <h3 id="myModalLabel">文件替换</h3>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <div class="form">
|
|
|
+ <form class="form-horizontal">
|
|
|
+ <input type="hidden" name="fid" value="0" id="fid"/>
|
|
|
+ <div class="control-group">
|
|
|
+ <label class="control-label" for="inputEmail">选择文件</label>
|
|
|
+ <div class="controls">
|
|
|
+ <input name="file" id="file" type="file">
|
|
|
+ <span class="help-block">替换新文件后,所有已下挂该文件的清单都将更新。</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
|
|
|
+ <button id="btreplacefile" class="btn btn-primary">确定替换</button>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+<!-- 替换弹出 -->
|
|
|
+<!-- 删除弹出 -->
|
|
|
+<div id="file-del" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
|
|
|
+ aria-hidden="true">
|
|
|
+ <div class="modal-header">
|
|
|
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
+ <h3 id="myModalLabel">文件删除</h3>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <h5 class="text-success">文件删除成功,您可以在附件回收站恢复它。</h5>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+</div>
|
|
|
+<!-- 删除弹出 -->
|
|
|
+<!-- 历史版本弹出 -->
|
|
|
+<div id="file-history" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
|
|
|
+ aria-hidden="true">
|
|
|
+ <input type="hidden" name="iaid" value="0" id="iaid"/>
|
|
|
+ <div class="modal-header">
|
|
|
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
+ <h3 id="myModalLabel">历史版本</h3>
|
|
|
+ </div>
|
|
|
+ <div id="historyHTML" class="modal-body">
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
|
|
|
+ </div>
|
|
|
+</div>
|
|
|
+</div>
|
|
|
+<!-- 历史版本1弹出 -->
|
|
|
<script type="text/javascript">autoFlashHeight();</script>
|
|
|
<script type="text/javascript">
|
|
|
$(document).ready(function () {
|
|
@@ -135,19 +299,144 @@
|
|
|
var intime = $(this).attr('intime');
|
|
|
var tips = $(this).attr('tips');
|
|
|
var numpname = $(this).attr('numpname');
|
|
|
+ var imnid = $(this).attr('imnid');
|
|
|
var iaid = $(this).attr('iaid');
|
|
|
- $("#filename").html(filename);
|
|
|
+ $("#fn").html(filename);
|
|
|
$("#fileico").html(fileext);
|
|
|
$("#realname").html(realname);
|
|
|
$("#intime").html(intime);
|
|
|
$("#tips").html(tips);
|
|
|
$("#numpname").html(numpname);
|
|
|
- $("#fileext").html(fileext);
|
|
|
- $("#uuid").val(iaid);
|
|
|
+ $(".filesDetail").show();
|
|
|
+ $("#fid").val(imnid);
|
|
|
+ $("#iaid").val(iaid);
|
|
|
+ });
|
|
|
+
|
|
|
+ $("a[id^='dropdown_']").click(function () {
|
|
|
+ var imnid = $(this).attr('imnid');
|
|
|
+ $("#upimnid").val(imnid);
|
|
|
+ });
|
|
|
+
|
|
|
+ $("button[id^='del_']").click(function () {
|
|
|
+ var imnid = $(this).attr('imnid');
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ dataType: "json",
|
|
|
+ cache: false,
|
|
|
+ data: {"imnid": imnid, "optype": 'del'},
|
|
|
+ url: "/rproject/{{pid}}/section/{{pmid}}/files",
|
|
|
+ success: function (data) {
|
|
|
+ if (data['status'] == 1) {
|
|
|
+ window.location.href = "{{rootUrl}}rproject/{{pid}}/section/{{pmid}}/files";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ $("#updateFileDesc").click(function () {
|
|
|
+ var upfilename = $("#upfilename").val();
|
|
|
+ var upfiledesc = $("#upfiledesc").val();
|
|
|
+ var imnid = $("#upimnid").val();
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ dataType: "json",
|
|
|
+ cache: false,
|
|
|
+ data: {"upimnid": imnid, "filename": upfilename, "filedesc": upfiledesc},
|
|
|
+ url: "/rproject/{{pid}}/section/{{pmid}}/files",
|
|
|
+ success: function (data) {
|
|
|
+ if (data['status'] == 1) {
|
|
|
+ window.location.href = "{{rootUrl}}rproject/{{pid}}/section/{{pmid}}/files";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ $("#btreplacefile").click(function () {
|
|
|
+ var file_data = $('#file').prop('files')[0];
|
|
|
+ var form_data = new FormData();
|
|
|
+ form_data.append('file', file_data);
|
|
|
+ form_data.append('optype', 'replace');
|
|
|
+ var imnid = $("#fid").val();
|
|
|
+ form_data.append('imnid', imnid);
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ dataType: "text",
|
|
|
+ cache: false,
|
|
|
+ contentType: false,
|
|
|
+ data: form_data,
|
|
|
+ url: "/rproject/{{pid}}/section/{{pmid}}/files",
|
|
|
+ processData: false,
|
|
|
+ success: function (data) {
|
|
|
+ if (data['status'] == 1) {
|
|
|
+ window.location.href = "{{rootUrl}}rproject/{{pid}}/section/{{pmid}}/files";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ $("#historyAtt").click(function () {
|
|
|
+ var iaid = $("#iaid").val();
|
|
|
+ $("#historyHTML").html('');
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ dataType: "json",
|
|
|
+ cache: false,
|
|
|
+ data: {"iaid": iaid},
|
|
|
+ url: "/rproject/section/" + iaid + "/file",
|
|
|
+ success: function (data) {
|
|
|
+ $("#historyHTML").html(data['html']);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ $("#numpname").change(function () {
|
|
|
+ var localurl = window.location.href;
|
|
|
+ var page = localurl.indexOf("/page/");
|
|
|
+ var user = localurl.indexOf("user/");
|
|
|
+ if (page != "-1") {
|
|
|
+ if (user != "-1") {
|
|
|
+ var nowurl = localurl.replace(/\/num\/\d+/, "");
|
|
|
+ var url = nowurl + "/num/" + $(this).val();
|
|
|
+ window.location.href = url;
|
|
|
+ } else {
|
|
|
+ var nowurl = localurl.replace(/num\/\d+/, "");
|
|
|
+ var url = nowurl + "num/" + $(this).val();
|
|
|
+ window.location.href = url;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (user != "-1") {
|
|
|
+ var url = window.location.href + "num/" + $(this).val() + "/page/1";
|
|
|
+ window.location.href = url;
|
|
|
+ } else {
|
|
|
+ var url = window.location.href + "/num/" + $(this).val() + "/page/1";
|
|
|
+ window.location.href = url;
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
- $("#filedown").click(function () {
|
|
|
- var uuid = $("#uuid").val();
|
|
|
- location.href = "{{rootUrl}}rproject/section/get/" + uuid + "/attachment";
|
|
|
+
|
|
|
+ $("#uploaduser").change(function () {
|
|
|
+ var localurl = window.location.href;
|
|
|
+ var page = localurl.indexOf("page/");
|
|
|
+ var num = localurl.indexOf("num/");
|
|
|
+ if (page != "-1") {
|
|
|
+ if (num != "-1") {
|
|
|
+ var nowurl = localurl.replace(/\/user\/\d+/, "");
|
|
|
+ var url = nowurl + "/user/" + $(this).val();
|
|
|
+ window.location.href = url;
|
|
|
+ } else {
|
|
|
+ var nowurl = localurl.replace(/user\/\d+/, "");
|
|
|
+ var url = nowurl + "user/" + $(this).val();
|
|
|
+ window.location.href = url;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (num != "-1") {
|
|
|
+ var url = window.location.href + "user/" + $(this).val() + "/page/1";
|
|
|
+ window.location.href = url;
|
|
|
+ } else {
|
|
|
+ var url = window.location.href + "/user/" + $(this).val() + "/page/1";
|
|
|
+ window.location.href = url;
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
});
|
|
|
</script>
|