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

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