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

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