w-project-section-files.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  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}}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}}project/{{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="w-project-section-measure.html">计量台帐</a></li>-->
  63. </ul>
  64. <!--导航-->
  65. <!--筛选工具-->
  66. <div class="clearfix">
  67. <form class="form-inline">
  68. <select class="span2">
  69. <option>不限期数</option>
  70. <option>第二期</option>
  71. <option>第一期</option>
  72. </select>
  73. <select class="span2">
  74. <option>上传者</option>
  75. <option>陈特</option>
  76. <option>任杰</option>
  77. </select>
  78. <select class="span2">
  79. <option>清单</option>
  80. <option>203-1-a 挖土方</option>
  81. </select>
  82. <a href="/project/{{pid}}/section/{{pmid}}/files/recover" class="fR">附件回收站</a>
  83. </form>
  84. </div>
  85. <!--筛选工具-->
  86. <!--文件管理-->
  87. <div class="filesWrap">
  88. <div class="filesList">
  89. <table class="table table-striped table-hover">
  90. <thead>
  91. <tr>
  92. <th width="">文件名</th>
  93. <th width="">期</th>
  94. <th width="">节点</th>
  95. <th width="">上传者</th>
  96. <th width="">上传时间</th>
  97. <th width="40">操作</th>
  98. </tr>
  99. </thead>
  100. <tbody>
  101. <!-- loop itemMeasureArray -->
  102. <tr>
  103. <td width=""><span class="fileico ico-jpg"></span><a
  104. fileext="{{itemMeasureArray' value.fileext}}"
  105. imnid="{{itematta' value.imnid}}"
  106. filename="{{itemMeasureArray' value.filename}}"
  107. realname="{{itemMeasureArray' value.realname}}"
  108. intime="{{formatDate(itemMeasureArray' value.intime,'Y-m-d')}}"
  109. tips="{{itemMeasureArray' value.tips}}"
  110. href="#"
  111. numpname="第{{ToChinaseNum(itemMeasureArray' value.numpname)}}期"
  112. id="fname_{{itemMeasureArray' value.imnid}}">{{itemMeasureArray' value.filename}}</a></td>
  113. <td>第{{ToChinaseNum(itemMeasureArray' value.numpname)}}期</td>
  114. <td>{{itemMeasureArray' value.pmname}}</td>
  115. <td width="">{{itemMeasureArray' value.realname}}</td>
  116. <td width="">{{formatDate(itemMeasureArray' value.intime,'Y-m-d')}}</td>
  117. <td>
  118. <div class="btn-group">
  119. <a imnid="{{itemMeasureArray' value.imnid}}"
  120. id="dropdown_{{itemMeasureArray' value.imnid}}"
  121. class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#">
  122. <span class="caret"></span>
  123. </a>
  124. <ul class="dropdown-menu">
  125. <li><a><i class="icon-eye-open"></i>&nbsp;预览</a></li>
  126. <li><a href="#file-edit" data-toggle="modal"><i class="icon-pencil"></i>&nbsp;编辑</a>
  127. </li>
  128. <li><a><i class="icon-download-alt"></i>&nbsp;下载</a></li>
  129. </ul>
  130. </div>
  131. </td>
  132. </tr>
  133. <!-- endloop -->
  134. </tbody>
  135. </table>
  136. <div class="pagination">
  137. <ul>
  138. <li class="disabled"><a href="#">&laquo;</a></li>
  139. <li class="active"><a href="#">1</a></li>
  140. <li><a href="#">2</a></li>
  141. <li><a href="#">3</a></li>
  142. <li><a href="#">4</a></li>
  143. <li><a href="#">5</a></li>
  144. </ul>
  145. </div>
  146. </div>
  147. <div class="filesDetail hide">
  148. <table class="table table-striped">
  149. <thead>
  150. <tr>
  151. <th colspan="4">文件详情</th>
  152. </tr>
  153. </thead>
  154. <tr>
  155. <th width="60">文件名</th>
  156. <td colspan="3" id="fn"> K0+800-K1+000图纸</td>
  157. </tr>
  158. <tr>
  159. <th width="60">格式</th>
  160. <td id="fileico"><span class="fileico ico-jpg"></span>.jpg</td>
  161. <th width="60">所在期</th>
  162. <td id="numpname">第二期</td>
  163. </tr>
  164. <tr>
  165. <th width="60">上传者</th>
  166. <td id="realname">陈工</td>
  167. <th width="60">上传时间</th>
  168. <td id="intime">2014-11-20 14:20</td>
  169. </tr>
  170. <tr>
  171. <th width="60">备注/描述</th>
  172. <td colspan="3" id="tips">内容内容内容内容</td>
  173. </tr>
  174. <tr>
  175. <th width="60">更多操作</th>
  176. <td colspan="3">
  177. <button class="btn btn-mini btn-primary" type="button" href="#file-replace"
  178. data-toggle="modal"><i class="icon-retweet icon-white"></i>替换
  179. </button>
  180. <button class="btn btn-mini btn-info" type="button" href="#file-history"
  181. data-toggle="modal"><i class="icon-time icon-white"></i>历史版本
  182. </button>
  183. &nbsp;&nbsp;&nbsp;&nbsp;
  184. <button id="del_{{itemMeasureArray' value.imnid}}"
  185. imnid="{{itemMeasureArray' value.imnid}}" class="btn btn-mini btn-danger"
  186. type="button" href="#file-del"
  187. data-toggle="modal"><i class="icon-remove icon-white"></i>删除
  188. </button>
  189. </td>
  190. </tr>
  191. </table>
  192. </div>
  193. </div>
  194. <!--文件管理-->
  195. </div>
  196. <!--内容-->
  197. </div>
  198. </div>
  199. <!-- 编辑弹出 -->
  200. <div id="file-edit" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
  201. aria-hidden="true">
  202. <div class="modal-header">
  203. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
  204. <h3 id="myModalLabel">文件编辑</h3>
  205. </div>
  206. <div class="modal-body">
  207. <div class="form">
  208. <form class="form-horizontal">
  209. <input type="hidden" id="upimnid" name="upimnid" value=""/>
  210. <div class="control-group">
  211. <label class="control-label" for="inputEmail">文件名称</label>
  212. <div class="controls">
  213. <input name="upfilename" id="upfilename" type="text"/>
  214. </div>
  215. </div>
  216. <div class="control-group">
  217. <label class="control-label" for="inputEmail">备注/描述</label>
  218. <div class="controls">
  219. <textarea name="upfiledesc" id="upfiledesc"></textarea>
  220. </div>
  221. </div>
  222. </form>
  223. </div>
  224. </div>
  225. <div class="modal-footer">
  226. <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
  227. <button id="updateFileDesc" class="btn btn-primary">确定修改</button>
  228. </div>
  229. </div>
  230. <!-- 编辑弹出 -->
  231. <!-- 替换弹出 -->
  232. <div id="file-replace" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
  233. aria-hidden="true">
  234. <div class="modal-header">
  235. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
  236. <h3 id="myModalLabel">文件替换</h3>
  237. </div>
  238. <div class="modal-body">
  239. <div class="form">
  240. <form class="form-horizontal">
  241. <input type="hidden" name="fid" value="0" id="fid"/>
  242. <div class="control-group">
  243. <label class="control-label" for="inputEmail">选择文件</label>
  244. <div class="controls">
  245. <input name="file" id="file" type="file">
  246. <span class="help-block">替换新文件后,所有已下挂该文件的清单都将更新。</span>
  247. </div>
  248. </div>
  249. </form>
  250. </div>
  251. </div>
  252. <div class="modal-footer">
  253. <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
  254. <button id="btreplacefile" class="btn btn-primary">确定替换</button>
  255. </div>
  256. </div>
  257. <!-- 替换弹出 -->
  258. <!-- 删除弹出 -->
  259. <div id="file-del" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
  260. aria-hidden="true">
  261. <div class="modal-header">
  262. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
  263. <h3 id="myModalLabel">文件删除</h3>
  264. </div>
  265. <div class="modal-body">
  266. <h5 class="text-success">文件删除成功,您可以在附件回收站恢复它。</h5>
  267. </div>
  268. <div class="modal-footer">
  269. <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
  270. </div>
  271. </div>
  272. </div>
  273. <!-- 删除弹出 -->
  274. <!-- 历史版本弹出 -->
  275. <div id="file-history" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
  276. aria-hidden="true">
  277. <div class="modal-header">
  278. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
  279. <h3 id="myModalLabel">历史版本</h3>
  280. </div>
  281. <div class="modal-body">
  282. </div>
  283. <div class="modal-footer">
  284. <button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
  285. </div>
  286. </div>
  287. </div>
  288. <!-- 历史版本1弹出 -->
  289. <script type="text/javascript">autoFlashHeight();</script>
  290. <script type="text/javascript">
  291. $(document).ready(function () {
  292. $("a[id^='fname_']").click(function () {
  293. var fileext = $(this).attr('fileext');
  294. var filename = $(this).attr('filename');
  295. var realname = $(this).attr('realname');
  296. var intime = $(this).attr('intime');
  297. var tips = $(this).attr('tips');
  298. var numpname = $(this).attr('numpname');
  299. var imnid = $(this).attr('imnid');
  300. $("#fn").html(filename);
  301. $("#fileico").html(fileext);
  302. $("#realname").html(realname);
  303. $("#intime").html(intime);
  304. $("#tips").html(tips);
  305. $("#numpname").html(numpname);
  306. $(".filesDetail").show();
  307. $("#fid").val(imnid);
  308. });
  309. $("a[id^='dropdown_']").click(function () {
  310. var imnid = $(this).attr('imnid');
  311. $("#upimnid").val(imnid);
  312. });
  313. $("button[id^='del_']").click(function () {
  314. var imnid = $(this).attr('imnid');
  315. $.ajax({
  316. type: "POST",
  317. dataType: "json",
  318. cache: false,
  319. data: {"imnid": imnid, "optype": 'del'},
  320. url: "/project/{{pid}}/section/{{pmid}}/files",
  321. success: function (data) {
  322. if (data['status'] == 1) {
  323. window.location.href = "{{rootUrl}}project/{{pid}}/section/{{pmid}}/files";
  324. }
  325. }
  326. });
  327. });
  328. $("#updateFileDesc").click(function () {
  329. var upfilename = $("#upfilename").val();
  330. var upfiledesc = $("#upfiledesc").val();
  331. var imnid = $("#upimnid").val();
  332. $.ajax({
  333. type: "POST",
  334. dataType: "json",
  335. cache: false,
  336. data: {"upimnid": imnid, "filename": upfilename, "filedesc": upfiledesc},
  337. url: "/project/{{pid}}/section/{{pmid}}/files",
  338. success: function (data) {
  339. if (data['status'] == 1) {
  340. window.location.href = "{{rootUrl}}project/{{pid}}/section/{{pmid}}/files";
  341. }
  342. }
  343. });
  344. });
  345. $("#btreplacefile").click(function () {
  346. var file_data = $('#file').prop('files')[0];
  347. var form_data = new FormData();
  348. form_data.append('file', file_data);
  349. form_data.append('optype', 'replace');
  350. var imnid = $("#fid").val();
  351. form_data.append('imnid', imnid);
  352. $.ajax({
  353. type: "POST",
  354. dataType: "text",
  355. cache: false,
  356. contentType: false,
  357. data: form_data,
  358. url: "/project/{{pid}}/section/{{pmid}}/files",
  359. processData: false,
  360. success: function (data) {
  361. if (data['status'] == 1) {
  362. window.location.href = "{{rootUrl}}project/{{pid}}/section/{{pmid}}/files";
  363. }
  364. }
  365. });
  366. });
  367. });
  368. </script>
  369. </body>