s-project-section-files-recover.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. <!DOCTYPE html>
  2. <html lang=zh-cn>
  3. <head>
  4. <meta charset=utf-8>
  5. <title>纵横计量支付系统</title>
  6. <meta name=description content=计量支付>
  7. <meta name=copyright content=smartcost.com.cn>
  8. <link rel=stylesheet href={{rootUrl}}global/css/fixedheadertable.css>
  9. <script src={{rootUrl}}global/js/jquery.fixedheadertable.js></script>
  10. <link rel=stylesheet href="{{rootUrl}}global/css/bootstrap.css">
  11. <link rel=stylesheet href="{{rootUrl}}global/css/style.css">
  12. <script src="{{rootUrl}}global/js/jquery-1.9.1.min.js"></script>
  13. <script src="{{rootUrl}}global/js/bootstrap.js"></script>
  14. <script src="{{rootUrl}}global/js/jl.js"></script>
  15. </head>
  16. <body>
  17. <!-- include "top" -->
  18. <div class="wrapContent">
  19. <!-- include "left" -->
  20. <div class="mainContainer">
  21. <!--内容-->
  22. <div class="mainContent">
  23. <div class="title clearfix">
  24. <ul class="nav nav-pills">
  25. <li class="dropdown"><a title="返回" href="{{rootUrl}}project/{{currproArray.pid}}/section"><span
  26. class="closePanel" aria-hidden="true" data-icon="Z"></span></a></li>
  27. <li class="dropdown">
  28. </li>
  29. <li class="dropdown">
  30. <a href="{{rootUrl}}project/{{currproArray.pid}}/section" data-toggle="dropdown"
  31. class="dropdown-toggle">
  32. {{currconArray.stname}}<b class="caret"></b>
  33. </a>
  34. <ul class="dropdown-menu">
  35. <!-- loop allconArray -->
  36. <li><a href="{{rootUrl}}project/{{currproArray.pid}}/section">{{allconArray' value.stname}}</a></li>
  37. <!-- endloop -->
  38. </ul>
  39. </li>
  40. <li class="dropdown">
  41. <a href="{{rootUrl}}project/{{currproArray.pid}}/section" data-toggle="dropdown"
  42. class="dropdown-toggle">
  43. {{curractmeasureArray.pmname}}<b class="caret"></b>
  44. </a>
  45. <ul class="dropdown-menu">
  46. <!-- loop allactmeasureArray -->
  47. <li>
  48. <a href="{{rootUrl}}project/{{currproArray.pid}}/section/{{allactmeasureArray' value.pmid}}/detail">{{allactmeasureArray' value.pmname}}</a></li>
  49. <!-- endloop -->
  50. <!-- <li class="divider"></li>
  51. <li><a href="#">共18标段,查看更多</a></li>-->
  52. </ul>
  53. </li>
  54. </ul>
  55. </div>
  56. <!--导航-->
  57. <ul class="nav nav-tabs">
  58. <li>
  59. <a href="{{rootUrl}}sproject/{{pid}}/section/{{pmid}}/detail">标段概况</a>
  60. </li>
  61. <li class="active"><a href="{{rootUrl}}project/{{pid}}/section/{{pmid}}/files">附件</a></li>
  62. <!-- if {{imediateSwitch}} == 1 --><li><a href="{{rootUrl}}sproject/{{pid}}/section/{{pmid}}/intermediate">中间计量草图</a></li><!-- endif -->
  63. </ul>
  64. <!--导航-->
  65. <div class="title">
  66. <h1>附件回收站</h1>
  67. </div>
  68. <!--文件管理-->
  69. <div class="filesWrap">
  70. <div class="filesList">
  71. <table class="table table-striped table-hover">
  72. <thead>
  73. <tr>
  74. <th width="">文件名</th>
  75. <th width="">期</th>
  76. <!--<th width="">节点</th>-->
  77. <th width="">上传者</th>
  78. <th width="">上传时间</th>
  79. <th width="">删除</th>
  80. <th width="">删除时间</th>
  81. <th width="40">操作</th>
  82. </tr>
  83. </thead>
  84. <tbody>
  85. <tr>
  86. <!-- loop itemMeasureArray -->
  87. <td width=""><span class="fileico ico-jpg"></span><a
  88. fileext="{{itemMeasureArray' value.fileext}}"
  89. imnid="{{itemMeasureArray' value.imnid}}"
  90. iaid="{{itemMeasureArray' value.iaid}}"
  91. filename="{{itemMeasureArray' value.filename}}"
  92. realname="{{itemMeasureArray' value.realname}}"
  93. intime="{{formatDate(itemMeasureArray' value.intime,'Y-m-d')}}"
  94. tips="{{itemMeasureArray' value.tips}}"
  95. href="#"
  96. numpname="第{{ToChinaseNum(itemMeasureArray' value.numpname)}}期"
  97. id="fname_{{itemMeasureArray' value.imnid}}"
  98. href="#">{{itemMeasureArray' value.filename}}</a></td>
  99. <td>第{{ToChinaseNum(itemMeasureArray' value.numpname)}}期</td>
  100. <!--<td>{{itemMeasureArray' value.pmname}}</td>-->
  101. <td width="">{{itemMeasureArray' value.realname}}</td>
  102. <td width="">{{formatDate(itemMeasureArray' value.intime,'Y-m-d')}}</td>
  103. <td class="text-error">{{itemMeasureArray' value.delname}}</td>
  104. <td class="text-error">{{formatDate(itemMeasureArray' value.deltime,'Y-m-d')}}</td>
  105. <td>
  106. <div class="btn-group">
  107. <a class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#">
  108. <span class="caret"></span>
  109. </a>
  110. <ul class="dropdown-menu">
  111. <!--<li><a><i class="icon-eye-open"></i>&nbsp;预览</a></li>-->
  112. <li><a id="down_{{itemMeasureArray' value.imnid}}" iaid="{{itemMeasureArray' value.iaid}}"><i
  113. class="icon-download-alt"></i>&nbsp;下载</a></li>
  114. <li><a id="recovery_{{itemMeasureArray' value.imnid}}"
  115. imnid="{{itemMeasureArray' value.imnid}}" href="#"
  116. data-toggle="modal"><i class="icon-repeat"></i>&nbsp;恢复</a>
  117. </li>
  118. </ul>
  119. </div>
  120. </td>
  121. </tr>
  122. <!-- endloop -->
  123. </tbody>
  124. </table>
  125. <nav aria-label="Page navigation">
  126. <ul class="pagination">
  127. {{pager}}
  128. </ul>
  129. </nav>
  130. </div>
  131. <div class="filesDetail" style="display: none">
  132. <input type="hidden" id="imnid" value="0"/>
  133. <table class="table table-striped">
  134. <thead>
  135. <tr>
  136. <th colspan="4">文件详情</th>
  137. </tr>
  138. </thead>
  139. <tr>
  140. <th width="60">文件名</th>
  141. <td colspan="3" id="fn"> K0+800-K1+000图纸</td>
  142. </tr>
  143. <tr>
  144. <th width="60">格式</th>
  145. <td id="fileico"><span class="fileico ico-jpg"></span>.jpg</td>
  146. <th width="60">所在期</th>
  147. <td id="numpname2">第二期</td>
  148. </tr>
  149. <tr>
  150. <th width="60">上传者</th>
  151. <td id="realname">陈工</td>
  152. <th width="60">上传时间</th>
  153. <td id="intime">2014-11-20 14:20</td>
  154. </tr>
  155. <tr>
  156. <th width="60">备注/描述</th>
  157. <td colspan="3" id="tips">内容内容内容内容</td>
  158. </tr>
  159. <tr>
  160. <th width="60">更多操作</th>
  161. <td colspan="3">
  162. <button class="btn btn-mini btn-danger" type="button" href="#file-del"
  163. data-toggle="modal"><i class="icon-remove icon-white"></i>彻底删除
  164. </button>
  165. </td>
  166. </tr>
  167. </table>
  168. </div>
  169. </div>
  170. <!--文件管理-->
  171. </div>
  172. <!--内容-->
  173. </div>
  174. </div>
  175. <!-- 替换弹出 -->
  176. <div id="file-replace" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
  177. aria-hidden="true">
  178. <div class="modal-dialog">
  179. <div class="modal-content">
  180. <div class="modal-header">
  181. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
  182. <h4 class="modal-title">文件恢复</h4>
  183. </div>
  184. <div class="modal-body">
  185. <h5 class="text-success">恢复成功。</h5>
  186. </div>
  187. <div class="modal-footer">
  188. <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
  189. </div>
  190. </div>
  191. </div>
  192. </div>
  193. <!-- 替换弹出 -->
  194. <!-- 删除弹出 -->
  195. <div id="file-del" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
  196. aria-hidden="true">
  197. <div class="modal-dialog">
  198. <div class="modal-content">
  199. <div class="modal-header">
  200. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
  201. <h4 class="modal-title">文件删除</h4>
  202. </div>
  203. <div class="modal-body">
  204. <h5 class="text-danger">彻底删除无法还原,所有清单下挂的该文件都将移除。</h5>
  205. </div>
  206. <div class="modal-footer">
  207. <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
  208. <button id="del" class="btn btn-danger">确定删除</button>
  209. </div>
  210. </div>
  211. </div>
  212. </div>
  213. <!-- 删除弹出 -->
  214. <!-- 删除弹出 -->
  215. <div id="file-del2" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
  216. aria-hidden="true">
  217. <div class="modal-dialog">
  218. <div class="modal-content">
  219. <div class="modal-header">
  220. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
  221. <h4 class="modal-title">文件删除</h4>
  222. </div>
  223. <div class="modal-body">
  224. <h5 class="text-warning">文件上传者才有彻底删除权限。</h5>
  225. </div>
  226. <div class="modal-footer">
  227. <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
  228. </div>
  229. </div>
  230. </div>
  231. </div>
  232. <!-- 删除弹出 -->
  233. <script type="text/javascript">autoFlashHeight();</script>
  234. <script type="text/javascript">
  235. $(document).ready(function () {
  236. $("a[id^='fname_']").click(function () {
  237. var fileext = $(this).attr('fileext');
  238. var filename = $(this).attr('filename');
  239. var realname = $(this).attr('realname');
  240. var intime = $(this).attr('intime');
  241. var tips = $(this).attr('tips');
  242. var numpname = $(this).attr('numpname');
  243. var imnid = $(this).attr('imnid');
  244. var iaid = $(this).attr('iaid');
  245. $("#fn").html(filename);
  246. $("#fileico").html(fileext);
  247. $("#realname").html(realname);
  248. $("#intime").html(intime);
  249. $("#tips").html(tips);
  250. $("#numpname2").html(numpname);
  251. $("#imnid").val(imnid);
  252. $(".filesDetail").show();
  253. });
  254. $("#filedown").click(function () {
  255. var file_data = $('#file').prop('files')[0];
  256. var form_data = new FormData();
  257. form_data.append('file', file_data);
  258. form_data.append('optype', 'replace');
  259. var imnid = $("#fid").val();
  260. form_data.append('imnid', imnid);
  261. $.ajax({
  262. type: "POST",
  263. dataType: "text",
  264. cache: false,
  265. contentType: false,
  266. data: form_data,
  267. url: "/sproject/{{pid}}/section/{{pmid}}/files",
  268. processData: false,
  269. success: function (data) {
  270. if (data['status'] == 1) {
  271. window.location.href = "{{rootUrl}}sproject/{{pid}}/section/{{pmid}}/files";
  272. }
  273. }
  274. });
  275. });
  276. $("a[id^='recovery_']").click(function () {
  277. var imnid = $(this).attr('imnid');
  278. $.ajax({
  279. type: "POST",
  280. dataType: "json",
  281. cache: false,
  282. data: {"imnid": imnid, "optype": 'reconvery'},
  283. url: "/sproject/{{pid}}/section/{{pmid}}/files/recover",
  284. success: function (data) {
  285. if (data['status'] == 1) {
  286. $("#file-replace").show();
  287. window.location.href = "{{rootUrl}}sproject/{{pid}}/section/{{pmid}}/files/recover";
  288. }
  289. }
  290. });
  291. });
  292. $("#del").click(function () {
  293. var imnid = $("#imnid").val();
  294. $.ajax({
  295. type: "POST",
  296. dataType: "json",
  297. cache: false,
  298. data: {"imnid": imnid, "optype": 'del'},
  299. url: "/sproject/{{pid}}/section/{{pmid}}/files/recover",
  300. success: function (data) {
  301. if (data['status'] == 1) {
  302. $("#file-del").modal('hide');
  303. window.location.href = "{{rootUrl}}sproject/{{pid}}/section/{{pmid}}/files/recover";
  304. }
  305. if (data['status'] == 2) {
  306. $("#file-del2").modal('show');
  307. $("#file-del").modal('hide');
  308. }
  309. }
  310. });
  311. });
  312. $("a[id^='down_']").click(function () {
  313. var iaid = $(this).attr('iaid');
  314. window.location.href = "{{rootUrl}}sproject/section/get/" + iaid + "/attachment";
  315. });
  316. });
  317. </script>
  318. </body>