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