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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  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. </ul>
  63. <!--导航-->
  64. <div class="title">
  65. <h1>附件回收站</h1>
  66. </div>
  67. <!--文件管理-->
  68. <div class="filesWrap">
  69. <div class="filesList">
  70. <table class="table table-striped table-hover">
  71. <thead>
  72. <tr>
  73. <th width="">文件名</th>
  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="40">操作</th>
  81. </tr>
  82. </thead>
  83. <tbody>
  84. <tr>
  85. <!-- loop itemMeasureArray -->
  86. <td width=""><span class="fileico ico-jpg"></span><a
  87. fileext="{{itemMeasureArray' value.fileext}}"
  88. imnid="{{itemMeasureArray' value.imnid}}"
  89. iaid="{{itemMeasureArray' value.iaid}}"
  90. filename="{{itemMeasureArray' value.filename}}"
  91. realname="{{itemMeasureArray' value.realname}}"
  92. intime="{{formatDate(itemMeasureArray' value.intime,'Y-m-d')}}"
  93. tips="{{itemMeasureArray' value.tips}}"
  94. href="#"
  95. numpname="第{{ToChinaseNum(itemMeasureArray' value.numpname)}}期"
  96. id="fname_{{itemMeasureArray' value.imnid}}"
  97. href="#">{{itemMeasureArray' value.filename}}</a></td>
  98. <td>第{{ToChinaseNum(itemMeasureArray' value.numpname)}}期</td>
  99. <!--<td>{{itemMeasureArray' value.pmname}}</td>-->
  100. <td width="">{{itemMeasureArray' value.realname}}</td>
  101. <td width="">{{formatDate(itemMeasureArray' value.intime,'Y-m-d')}}</td>
  102. <td class="text-error">{{itemMeasureArray' value.delname}}</td>
  103. <td class="text-error">{{formatDate(itemMeasureArray' value.deltime,'Y-m-d')}}</td>
  104. <td>
  105. <div class="btn-group">
  106. <a class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#">
  107. <span class="caret"></span>
  108. </a>
  109. <ul class="dropdown-menu">
  110. <!--<li><a><i class="icon-eye-open"></i>&nbsp;预览</a></li>-->
  111. <li><a id="down_{{itemMeasureArray' value.imnid}}" iaid="{{itemMeasureArray' value.iaid}}"><i
  112. class="icon-download-alt"></i>&nbsp;下载</a></li>
  113. <li><a id="recovery_{{itemMeasureArray' value.imnid}}"
  114. imnid="{{itemMeasureArray' value.imnid}}" href="#"
  115. data-toggle="modal"><i class="icon-repeat"></i>&nbsp;恢复</a>
  116. </li>
  117. </ul>
  118. </div>
  119. </td>
  120. </tr>
  121. <!-- endloop -->
  122. </tbody>
  123. </table>
  124. <div class="pagination">
  125. <ul>
  126. {{pager}}
  127. <!--<li class="disabled"><a href="#">&laquo;</a></li>-->
  128. <!--<li class="active"><a href="#">1</a></li>-->
  129. <!--<li><a href="#">2</a></li>-->
  130. <!--<li><a href="#">3</a></li>-->
  131. <!--<li><a href="#">4</a></li>-->
  132. <!--<li><a href="#">5</a></li>-->
  133. </ul>
  134. </div>
  135. </div>
  136. <div class="filesDetail hide">
  137. <input type="hidden" id="imnid" value="0"/>
  138. <table class="table table-striped">
  139. <thead>
  140. <tr>
  141. <th colspan="4">文件详情</th>
  142. </tr>
  143. </thead>
  144. <tr>
  145. <th width="60">文件名</th>
  146. <td colspan="3" id="fn"> K0+800-K1+000图纸</td>
  147. </tr>
  148. <tr>
  149. <th width="60">格式</th>
  150. <td id="fileico"><span class="fileico ico-jpg"></span>.jpg</td>
  151. <th width="60">所在期</th>
  152. <td id="numpname2">第二期</td>
  153. </tr>
  154. <tr>
  155. <th width="60">上传者</th>
  156. <td id="realname">陈工</td>
  157. <th width="60">上传时间</th>
  158. <td id="intime">2014-11-20 14:20</td>
  159. </tr>
  160. <tr>
  161. <th width="60">备注/描述</th>
  162. <td colspan="3" id="tips">内容内容内容内容</td>
  163. </tr>
  164. <tr>
  165. <th width="60">更多操作</th>
  166. <td colspan="3">
  167. <button class="btn btn-mini btn-danger" type="button" href="#file-del"
  168. data-toggle="modal"><i class="icon-remove icon-white"></i>彻底删除
  169. </button>
  170. </td>
  171. </tr>
  172. </table>
  173. </div>
  174. </div>
  175. <!--文件管理-->
  176. </div>
  177. <!--内容-->
  178. </div>
  179. </div>
  180. <!-- 替换弹出 -->
  181. <div id="file-replace" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
  182. aria-hidden="true">
  183. <div class="modal-header">
  184. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
  185. <h3 id="myModalLabel">文件恢复</h3>
  186. </div>
  187. <div class="modal-body">
  188. <h5 class="text-success">恢复成功。</h5>
  189. </div>
  190. <div class="modal-footer">
  191. <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
  192. </div>
  193. </div>
  194. <!-- 替换弹出 -->
  195. <!-- 删除弹出 -->
  196. <div id="file-del" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
  197. aria-hidden="true">
  198. <div class="modal-header">
  199. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
  200. <h3 id="myModalLabel">文件删除</h3>
  201. </div>
  202. <div class="modal-body">
  203. <h5 class="text-error">彻底删除无法还原,所有清单下挂的该文件都将移除。</h5>
  204. </div>
  205. <div class="modal-footer">
  206. <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
  207. <button id="del" class="btn btn-danger">确定删除</button>
  208. </div>
  209. </div>
  210. </div>
  211. <!-- 删除弹出 -->
  212. <!-- 删除弹出 -->
  213. <div id="file-del2" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
  214. aria-hidden="true">
  215. <div class="modal-header">
  216. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
  217. <h3 id="myModalLabel">文件删除</h3>
  218. </div>
  219. <div class="modal-body">
  220. <h5 class="text-warning">文件上传者才有彻底删除权限。</h5>
  221. </div>
  222. <div class="modal-footer">
  223. <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
  224. </div>
  225. </div>
  226. </div>
  227. <!-- 删除弹出 -->
  228. <script type="text/javascript">autoFlashHeight();</script>
  229. <script type="text/javascript">
  230. $(document).ready(function () {
  231. $("a[id^='fname_']").click(function () {
  232. var fileext = $(this).attr('fileext');
  233. var filename = $(this).attr('filename');
  234. var realname = $(this).attr('realname');
  235. var intime = $(this).attr('intime');
  236. var tips = $(this).attr('tips');
  237. var numpname = $(this).attr('numpname');
  238. var imnid = $(this).attr('imnid');
  239. var iaid = $(this).attr('iaid');
  240. $("#fn").html(filename);
  241. $("#fileico").html(fileext);
  242. $("#realname").html(realname);
  243. $("#intime").html(intime);
  244. $("#tips").html(tips);
  245. $("#numpname2").html(numpname);
  246. $("#imnid").val(imnid);
  247. $(".filesDetail").show();
  248. });
  249. $("#filedown").click(function () {
  250. var file_data = $('#file').prop('files')[0];
  251. var form_data = new FormData();
  252. form_data.append('file', file_data);
  253. form_data.append('optype', 'replace');
  254. var imnid = $("#fid").val();
  255. form_data.append('imnid', imnid);
  256. $.ajax({
  257. type: "POST",
  258. dataType: "text",
  259. cache: false,
  260. contentType: false,
  261. data: form_data,
  262. url: "/sproject/{{pid}}/section/{{pmid}}/files",
  263. processData: false,
  264. success: function (data) {
  265. if (data['status'] == 1) {
  266. window.location.href = "{{rootUrl}}sproject/{{pid}}/section/{{pmid}}/files";
  267. }
  268. }
  269. });
  270. });
  271. $("a[id^='recovery_']").click(function () {
  272. var imnid = $(this).attr('imnid');
  273. $.ajax({
  274. type: "POST",
  275. dataType: "json",
  276. cache: false,
  277. data: {"imnid": imnid, "optype": 'reconvery'},
  278. url: "/sproject/{{pid}}/section/{{pmid}}/files/recover",
  279. success: function (data) {
  280. if (data['status'] == 1) {
  281. $("#file-replace").show();
  282. window.location.href = "{{rootUrl}}sproject/{{pid}}/section/{{pmid}}/files/recover";
  283. }
  284. }
  285. });
  286. });
  287. $("#del").click(function () {
  288. var imnid = $("#imnid").val();
  289. $.ajax({
  290. type: "POST",
  291. dataType: "json",
  292. cache: false,
  293. data: {"imnid": imnid, "optype": 'del'},
  294. url: "/sproject/{{pid}}/section/{{pmid}}/files/recover",
  295. success: function (data) {
  296. if (data['status'] == 1) {
  297. $("#file-del").modal('hide');
  298. window.location.href = "{{rootUrl}}sproject/{{pid}}/section/{{pmid}}/files/recover";
  299. }
  300. if (data['status'] == 2) {
  301. $("#file-del2").modal('show');
  302. $("#file-del").modal('hide');
  303. }
  304. }
  305. });
  306. });
  307. $("a[id^='down_']").click(function () {
  308. var iaid = $(this).attr('iaid');
  309. window.location.href = "{{rootUrl}}sproject/section/get/" + iaid + "/attachment";
  310. });
  311. });
  312. </script>
  313. </body>