index.ejs 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. <% include ./stage_sub_menu.ejs %>
  2. <div class="panel-content">
  3. <div class="panel-title">
  4. <div class="title-main d-flex">
  5. <div>
  6. <div class="d-inline-block">
  7. <div class="dropdown">
  8. <button class="btn btn-sm btn-light dropdown-toggle text-primary" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  9. <i class="fa fa-list-ol"></i> 显示层级
  10. </button>
  11. <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
  12. <a class="dropdown-item" name="showLevel" tag="1" href="javascirpt: void(0);">第一层</a>
  13. <a class="dropdown-item" name="showLevel" tag="2" href="javascirpt: void(0);">第二层</a>
  14. <a class="dropdown-item" name="showLevel" tag="3" href="javascirpt: void(0);">第三层</a>
  15. <a class="dropdown-item" name="showLevel" tag="4" href="javascirpt: void(0);">第四层</a>
  16. <a class="dropdown-item" name="showLevel" tag="5" href="javascirpt: void(0);">第五层</a>
  17. <a class="dropdown-item" name="showLevel" tag="last" href="javascirpt: void(0);">最底层</a>
  18. <a class="dropdown-item" name="showLevel" tag="leafXmj" href="javascirpt: void(0);">只显示项目节</a>
  19. <a class="dropdown-item" name="showLevel" tag="curMeasure" href="javascirpt: void(0);">只显示本期计量</a>
  20. </div>
  21. </div>
  22. </div>
  23. <div class="d-inline-block">
  24. <button href="#row-view" class="btn btn-sm btn-light" data-toggle="modal" data-target="#row-view"><i class="fa fa-table"></i> 列显示</button>
  25. </div>
  26. <div class="d-inline-block">
  27. <div class="input-group input-group-sm mt-2">
  28. <div class="input-group-prepend">
  29. <span class="input-group-text" id="basic-addon1">表达式</span>
  30. </div>
  31. <input type="text" class="form-control m-0" <% if (stage.readOnly) { %> readonly="" <% } %>>
  32. </div>
  33. </div>
  34. </div>
  35. <div class="ml-auto">
  36. <!--完成中间计量-->
  37. <% if (!ctx.stage.check_detail && !ctx.stage.readOnly) { %>
  38. <span class="text-success" id="locked-hint">已完成,请继续完成「上报审批」 <a href="/tender/<%- ctx.tender.id %>/measure/stage/<%- ctx.stage.order %>/detail/unlock">解锁编辑</a></span>
  39. <% } %>
  40. </div>
  41. </div>
  42. </div>
  43. <div class="content-wrap pr-46">
  44. <div class="c-header p-0">
  45. </div>
  46. <div class="row w-100 sub-content">
  47. <div id="main-view" class="c-body" style="width: 100%">
  48. <!--上部分-->
  49. <div class="sjs-height-1" id="stage-ledger">
  50. </div>
  51. <!--下部分-->
  52. <div class="bcontent-wrap" id="main-bottom">
  53. <div id="main-resize" class="resize-y" r-Type="height" div1="#stage-ledger" div2="#main-bottom" store-id="stage-main" store-version="1.0.0" min="100"></div>
  54. <div class="bc-bar mb-1">
  55. <ul class="nav nav-tabs">
  56. <li class="nav-item">
  57. <a class="nav-link active" href="#">部位明细</a>
  58. </li>
  59. <!--工程量清单模式操作-->
  60. <li class="nav-item">
  61. <div class="mt-1 ml-2">
  62. <div class="input-group input-group-sm">
  63. <div class="input-group-prepend">
  64. <div class="input-group-text">
  65. <div class="form-group form-check mb-0">
  66. <input type="checkbox" class="form-check-input group-checkbox" id="pos-over-search">
  67. <label class="form-check-label" for="pos-over-search">超计</label><!--勾选状态增加颜色text-danger-->
  68. </div>
  69. </div>
  70. <div class="input-group-text">
  71. <div class="form-group form-check mb-0">
  72. <input type="checkbox" class="form-check-input group-checkbox" id="pos-empty-search">
  73. <label class="form-check-label" for="pos-empty-search">漏计</label><!--勾选状态增加颜色text-warning-->
  74. </div>
  75. </div>
  76. </div>
  77. <input type="text" class="form-control" placeholder="按名称查找" id="pos-search-keyword">
  78. <!--搜索结果显示-->
  79. <div class="input-group-append" >
  80. <span class="input-group-text" id="pos-search-result">结果:0</span>
  81. </div>
  82. <div class="input-group-append" >
  83. <button class="btn btn-outline-secondary" type="button" title="上一个" id="pos-search-pre"><i class="fa fa-angle-double-left"></i></button>
  84. <button class="btn btn-outline-secondary" type="button" title="下一个" id="pos-search-next"><i class="fa fa-angle-double-right"></i></button>
  85. </div>
  86. </div>
  87. </div>
  88. </li>
  89. </ul>
  90. </div>
  91. <div class="sp-wrap" id="stage-pos">
  92. </div>
  93. </div>
  94. </div>
  95. <div id="tools-view" class="c-body" style="display: none; width: 33%;">
  96. <div class="resize-x" id="right-spr" r-Type="width" div1="#main-view" div2="#tools-view" title="调整大小" a-type="percent"><!--调整左右高度条--></div>
  97. <div class="tab-content">
  98. <!--查找定位-->
  99. <div id="search" class="tab-pane tab-select-show">
  100. <div class="sjs-bar-1">
  101. <div class="input-group input-group-sm">
  102. <div class="input-group-prepend">
  103. <div class="input-group-text">
  104. <input type="radio" name="searchType" id="over"> 超计
  105. </div>
  106. <div class="input-group-text">
  107. <input type="radio" name="searchType" id="empty"> 漏计
  108. </div>
  109. </div>
  110. <input type="text" class="form-control" placeholder="可查找 项目节编号 / 清单编号 /名称" id="keyword">
  111. <div class="input-group-append">
  112. <button class="btn btn-outline-secondary" type="button" id="searchLedger">搜索</button>
  113. </div>
  114. </div>
  115. </div>
  116. <div id="search-result" class="sjs-sh-1">
  117. </div>
  118. </div>
  119. <!--附件-->
  120. <div id="fujian" class="tab-pane tab-select-show">
  121. <div class="sjs-bar">
  122. <ul class="nav nav-tabs">
  123. <li class="nav-item">
  124. <a class="nav-link active" data-toggle="tab" href="#dqjiedian" role="tab" fujian-content="dqjiedian">当前节点</a>
  125. </li>
  126. <li class="nav-item">
  127. <a class="nav-link" data-toggle="tab" href="#syfujian" role="tab" fujian-content="syfujian">所有附件</a>
  128. </li>
  129. <li class="nav-item ml-auto">
  130. <!--所有附件 翻页-->
  131. <span id="showPage" style="display: none"><a href="javascript:void(0);" class="page-select" content="pre"><i class="fa fa-chevron-left"></i></a> <span id="currentPage">1</span>/<span id="totalPage">10</span> <a href="javascript:void(0);" class="page-select" content="next"><i class="fa fa-chevron-right"></i></a></span>
  132. <a href="#upload" data-toggle="modal" data-target="#upload" class="btn btn-sm btn-outline-primary ml-3">上传</a>
  133. </li>
  134. </ul>
  135. </div>
  136. <div class="tab-content">
  137. <div class="tab-pane active" id="dqjiedian">
  138. <div class="sjs-height-3" style="overflow:auto; overflow-x:hidden;">
  139. <table class="table table-sm table-bordered table-hover" style="word-break:break-all; table-layout: fixed">
  140. <tr><th>文件名</th><th width="80">上传</th></tr>
  141. <tbody id="nodelist-table" class="list-table">
  142. </tbody>
  143. </table>
  144. </div>
  145. </div>
  146. <div class="tab-pane" id="syfujian">
  147. <div class="sjs-height-3" style="overflow:auto; overflow-x:hidden;">
  148. <table class="table table-sm table-bordered table-hover" style="word-break:break-all; table-layout: fixed">
  149. <tr><th>文件名</th><th width="80">上传</th></tr>
  150. <tbody id="alllist-table" class="list-table">
  151. </tbody>
  152. </table>
  153. </div>
  154. </div>
  155. <div class="sjs-bottom">
  156. <br>
  157. <div class="tab-content" id="showAttachment" style="display: none" file-id="">
  158. <div class="sjs-bottom-2">
  159. <div class="d-flex justify-content-end mb-1" id="btn-att">
  160. <!--默认 有删除权限-->
  161. <a href="javascript:void(0);" content="del" class="btn btn-sm text-danger" style="display: none">删除</a>
  162. <!--默认 有编辑权限-->
  163. <a href="javascript:void(0);" content="edit" class="btn btn-sm btn-outline-primary" style="display: none">编辑</a>
  164. <!--编辑模式-->
  165. <a href="javascript:void(0);" content="save" class="btn btn-sm btn-outline-success mr-1" style="display: none">保存</a>
  166. <a href="javascript:void(0);" content="cancel" class="btn btn-sm btn-outline-secondary" style="display: none">取消</a>
  167. </div>
  168. <!--显示信息-->
  169. <table class="table table-sm table-bordered" id="show-att" style="word-break:break-all; table-layout: fixed">
  170. <tbody>
  171. <tr><th>文件名</th><td colspan="3">asdasd.jpg</td></tr>
  172. <tr><th>所在节点</th><td colspan="3">1 第一部分 建筑安装工程非</td></tr>
  173. <tr><td colspan="4"><a href="javascript:void(0);">下载附件</a></td></tr>
  174. <tr><th>上传者</th><td>张三</td><th>上传时间</th><td>2018-10-20</td></tr>
  175. <tr><th>备注</th><td colspan="3"></td></tr>
  176. </tbody>
  177. </table>
  178. <div id="edit-att" style="display: none">
  179. <!--编辑模式-->
  180. <div class="form-group">
  181. <div class="input-group input-group-sm">
  182. <div class="input-group-prepend">
  183. <span class="input-group-text">文件名</span>
  184. </div>
  185. <input type="text" class="form-control" value="asdasd">
  186. <div class="input-group-append">
  187. <span class="input-group-text">.jpg</span>
  188. </div>
  189. </div>
  190. </div>
  191. <div class="form-group">
  192. <div class="input-group input-group-sm">
  193. <div class="input-group-prepend">
  194. <span class="input-group-text">所在节点</span>
  195. </div>
  196. <input type="text" class="form-control" value="1 第一部分 建筑安装工程非" readonly="">
  197. </div>
  198. </div>
  199. <div class="form-group">
  200. <div class="input-group input-group-sm">
  201. <div class="input-group-prepend">
  202. <span class="input-group-text">上传时间</span>
  203. </div>
  204. <input type="text" class="form-control" value="2018-10-20" readonly="">
  205. </div>
  206. </div>
  207. <div class="form-group">
  208. <div class="input-group input-group-sm">
  209. <div class="input-group-prepend">
  210. <span class="input-group-text">备注</span>
  211. </div>
  212. <input type="text" class="form-control" value="">
  213. </div>
  214. </div>
  215. <div class="form-group">
  216. <label>替换文件</label>
  217. <div class="custom-file">
  218. <input type="file" class="custom-file-input" id="change-att-btn">
  219. <label class="custom-file-label" for="customFile">Choose file</label>
  220. </div>
  221. </div>
  222. </div>
  223. </div>
  224. </div>
  225. </div>
  226. </div>
  227. </div>
  228. </div>
  229. </div>
  230. </div>
  231. <div class="side-menu">
  232. <!--右侧菜单-->
  233. <ul class="nav flex-column right-nav">
  234. <li class="nav-item">
  235. <a class="nav-link" content="#search" href="javascript: void(0);">查找定位</a>
  236. </li>
  237. <li class="nav-item">
  238. <a class="nav-link" content="#fujian" href="javascript: void(0);">附件</a>
  239. </li>
  240. </ul>
  241. </div>
  242. </div>
  243. <div style="display: none">
  244. <img src="/public/images/ellipsis_horizontal.png" id="ellipsis-icon" />
  245. <img src="/public/images/icon-ok.png" id="icon-ok" />
  246. </div>
  247. </div>
  248. <script>
  249. String.prototype.replaceAll = function (FindText, RepText) {
  250. regExp = new RegExp(FindText, 'g');
  251. return this.replace(regExp, RepText);
  252. }
  253. const readOnly = <%- stage.readOnly %>;
  254. const ledgerSpreadSetting = JSON.parse('<%- JSON.stringify(ledgerSpread) %>');
  255. const posSpreadSetting = JSON.parse('<%- JSON.stringify(posSpread) %>');
  256. const tender = JSON.parse('<%- JSON.stringify(tender) %>');
  257. const tenderInfo = JSON.parse('<%- JSON.stringify(ctx.tender.info) %>');
  258. const measureType = JSON.parse('<%- JSON.stringify(measureType) %>');
  259. const stage = JSON.parse('<%- JSON.stringify(ctx.stage) %>');
  260. const ledgerData = JSON.parse('<%- JSON.stringify(ledgerData) %>');
  261. const whiteList = JSON.parse('<%- JSON.stringify(whiteList) %>');
  262. let attData = JSON.parse('<%- JSON.stringify(attData) %>');
  263. const userID = '<%- ctx.session.sessionUser.accountId %>';
  264. </script>
  265. <% if (ctx.stage.status === auditConst.status.uncheck && ctx.session.sessionUser.accountId === ctx.stage.user_id) {%>
  266. <script>
  267. const accountList = JSON.parse('<%- JSON.stringify(accountList) %>');
  268. </script>
  269. <% } %>