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

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