bwtz.ejs 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. <% include ./stage_sub_menu.ejs %>
  2. <div class="panel-content">
  3. <div class="panel-title">
  4. <div class="title-main d-flex justify-content-between">
  5. <% include ./stage_sub_mini_menu.ejs %>
  6. <div>
  7. <div class="d-inline-block">
  8. <div class="dropdown">
  9. <button class="btn btn-sm btn-light dropdown-toggle text-primary" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  10. <i class="fa fa-list-ol"></i> 显示层级
  11. </button>
  12. <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
  13. <a class="dropdown-item" name="showLevel" tag="1" href="javascirpt: void(0);">第一层</a>
  14. <a class="dropdown-item" name="showLevel" tag="2" href="javascirpt: void(0);">第二层</a>
  15. <a class="dropdown-item" name="showLevel" tag="3" href="javascirpt: void(0);">第三层</a>
  16. <a class="dropdown-item" name="showLevel" tag="4" href="javascirpt: void(0);">第四层</a>
  17. <a class="dropdown-item" name="showLevel" tag="5" href="javascirpt: void(0);">第五层</a>
  18. <a class="dropdown-item" name="showLevel" tag="last" 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. <div class="dropdown">
  25. <button class="btn btn-sm btn-light dropdown-toggle text-primary" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  26. <i class="fa fa-list-ol"></i> 过滤数据
  27. </button>
  28. <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
  29. <a class="dropdown-item" href="javascirpt: void(0);" name="load-data" tag="cur">本期</a>
  30. <a class="dropdown-item" href="javascirpt: void(0);" name="load-data" tag="end">截止本期</a>
  31. <a class="dropdown-item" href="javascirpt: void(0);" name="load-data" tag="all">显示全部</a>
  32. </div>
  33. </div>
  34. </div>
  35. <div class="d-inline-block">
  36. <a id="exportBwtz" class="btn btn-primary btn-sm" href="javascript: void(0)">导出部位台账Excel</a>
  37. </div>
  38. <div class="d-inline-block ml-2">
  39. <div class="alert alert-warning p-1"><i class="fa Example of exclamation-circle fa-exclamation-circle "></i> 计量台账与部位台账金额,会存在数学误差,属正常现象。软件以计量台账金额为准。</div>
  40. </div>
  41. </div>
  42. <div class="ml-auto">
  43. </div>
  44. </div>
  45. </div>
  46. <div class="content-wrap pr-46">
  47. <div class="c-header p-0"></div>
  48. <div class="row w-100 sub-content">
  49. <div class="c-body" id="left-view" style="width: 100%">
  50. <div class="sjs-height-1" id="xmj-spread">
  51. </div>
  52. <div class="bcontent-wrap" id="main-bottom">
  53. <div id="main-resize" class="resize-y" r-Type="height" div1="#xmj-spread" div2="#main-bottom" store-id="stage-bwtz" 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" data-toggle="tab" href="#jldyjlqd" role="tab">计量单元/计量清单</a>
  58. </li>
  59. <li class="nav-item">
  60. <div class="d-inline-block ml-2">
  61. <a class="btn btn-sm btn-light">
  62. <div class="custom-control custom-checkbox">
  63. <input type="checkbox" class="custom-control-input" id="unit-show-1">
  64. <label class="custom-control-label text-primary" for="unit-show-1">只显示第一层</label>
  65. </div>
  66. </a>
  67. </div>
  68. <div class="d-inline-block">
  69. <div class="input-group input-group-sm ml-2">
  70. <div class="input-group-prepend">
  71. <span class="input-group-text" id="basic-addon1">数据筛选</span>
  72. </div>
  73. <input type="text" class="form-control form-control-sm m-0" id="unit-filter" placeholder="可根据 计量单元/清单编号/名称 筛选数据" style="width: 300px">
  74. </div>
  75. </div>
  76. <div class="d-inline-block ml-2">
  77. <div class="alert-warning p-1"><i class="fa Example of exclamation-circle fa-exclamation-circle "></i> 父项/子项任一符合,均显示</div>
  78. </div>
  79. </li>
  80. </ul>
  81. </div>
  82. <div class="sp-wrap" id="unit-spread">
  83. </div>
  84. </div>
  85. </div>
  86. <!--右栏-->
  87. <div class="c-body" id="right-view" style="display: none; width: 33%">
  88. <div class="resize-x" id="right-spr" r-Type="width" div1="#left-view" div2="#right-view" title="调整大小" a-type="percent"><!--调整左右高度条--></div>
  89. <div class="tab-content">
  90. <div id="search" class="tab-pane">
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. <!--右侧菜单-->
  96. <div class="side-menu">
  97. <!--右侧菜单-->
  98. <ul class="nav flex-column right-nav">
  99. <li class="nav-item">
  100. <a class="nav-link" href="javascript: void(0);" role="tab" content="#search">查找定位</a>
  101. </li>
  102. </ul>
  103. </div>
  104. </div>
  105. </div>
  106. <div style="display: none">
  107. <img src="/public/images/file_clip.png" id="rela-file-icon">
  108. <img src="/public/images/file_clip_hover.png" id="rela-file-hover">
  109. </div>
  110. <script>
  111. const thirdParty = JSON.parse('<%- JSON.stringify(thirdParty) %>');
  112. function getGxbyText(data) {
  113. const def = thirdParty.gxby.find(function (x) {
  114. return x.value === data.gxby_status;
  115. });
  116. return def ? def.name : '';
  117. }
  118. function getDaglText(data) {
  119. const def = thirdParty.dagl.find(function (x) {
  120. return x.value === data.dagl_status;
  121. });
  122. return def ? def.name : '';
  123. }
  124. function getColor (sheet, data, row, col, defaultColor) {
  125. if (!data) return defaultColor;
  126. if (col.field === 'gxby') {
  127. const def = thirdParty.gxby.find(function (x) {
  128. return x.value === data.gxby_status;
  129. });
  130. return (def && def.color) ? def.color : defaultColor;
  131. } else if (col.field === 'dagl') {
  132. const def = thirdParty.dagl.find(function (x) {
  133. return x.value === data.dagl_status;
  134. });
  135. return (def && def.color) ? def.color : defaultColor;
  136. }
  137. return defaultColor;
  138. }
  139. function imageClick (data, hitinfo) {
  140. data && data.dagl_url && window.open(data.dagl_url);
  141. }
  142. const xmjSpreadSetting = {
  143. cols: [
  144. {title: '项目节编号', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 145, formatter: '@', cellType: 'tree'},
  145. <% if (ex_memo1.show) { %>
  146. {title: '<%- ex_memo1.alias || ex_memo1.name %>', colSpan: '1', rowSpan: '2', field: 'ex_memo1', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
  147. <% } %>
  148. {title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 185, formatter: '@'},
  149. {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 60, formatter: '@', cellType: 'unit'},
  150. <% if (ctx.tender.info.display.ledger.dgnQty) { %>
  151. {title: '项目节数量|数量1', colSpan: '2|1', rowSpan: '1|1', field: 'dgn_qty1', hAlign: 2, width: 60, type: 'Number'},
  152. {title: '|数量2', colSpan: '|1', rowSpan: '|1', field: 'dgn_qty2', hAlign: 2, width: 60, type: 'Number'},
  153. {title: '经济指标', colSpan: '1', rowSpan: '2', field: 'dgn_price', hAlign: 2, width: 60, type: 'Number'},
  154. <% } %>
  155. {title: '台账金额', colSpan: '1', rowSpan: '2', field: 'total_price', hAlign: 2, width: 70, type: 'Number'},
  156. <% if (ctx.tender.info.display.stage.realComplete) { %>
  157. {title: '现场实际金额', colSpan: '1', rowSpan: '2', field: 'real_tp', hAlign: 2, width: 60, type: 'Number'},
  158. {title: '预计变更金额', colSpan: '1', rowSpan: '2', field: 'estimate_tp', hAlign: 2, width: 60, type: 'Number'},
  159. <% } %>
  160. {title: '本期计量金额|合同计量', colSpan: '3|1', rowSpan: '1|1', field: 'contract_tp', hAlign: 2, width: 70, type: 'Number'},
  161. {title: '|数量变更', colSpan: '|1', rowSpan: '|1', field: 'qc_tp', hAlign: 2, width: 70, type: 'Number'},
  162. {title: '|完成计量', colSpan: '|1', rowSpan: '|1', field: 'gather_tp', hAlign: 2, width: 70, type: 'Number'},
  163. {title: '截止本期计量金额|合同计量', colSpan: '4|1', rowSpan: '1|1', field: 'end_contract_tp', hAlign: 2, width: 70, type: 'Number'},
  164. {title: '|数量变更', colSpan: '|1', rowSpan: '|1', field: 'end_qc_tp', hAlign: 2, width: 70, type: 'Number'},
  165. {title: '|完成计量', colSpan: '|1', rowSpan: '|1', field: 'end_gather_tp', hAlign: 2, width: 70, type: 'Number'},
  166. {title: '|完成率(%)', colSpan: '|1', rowSpan: '|1', field: 'end_gather_percent', hAlign: 2, width: 70, type: 'Number'},
  167. {title: '图(册)号', colSpan: '1', rowSpan: '2', field: 'drawing_code', hAlign: 0, width: 80, formatter: '@'},
  168. {title: '本期批注', colSpan: '1', rowSpan: '2', field: 'postil', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
  169. {title: '备注', colSpan: '1', rowSpan: '2', field: 'memo', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
  170. <% if (ex_memo2.show) { %>
  171. {title: '<%- ex_memo2.alias || ex_memo2.name %>', colSpan: '1', rowSpan: '2', field: 'ex_memo2', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
  172. <% } %>
  173. <% if (ex_memo3.show) { %>
  174. {title: '<%- ex_memo3.alias || ex_memo3.name %>', colSpan: '1', rowSpan: '2', field: 'ex_memo3', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
  175. <% } %>
  176. <% if (ctx.session.sessionProject.gxby) { %>
  177. {title: '工序报验', colSpan: '1', rowSpan: '2', field: 'gxby', hAlign: 1, width: 80, formatter: '@', readOnly: true, getValue: getGxbyText},
  178. <% } %>
  179. <% if (ctx.session.sessionProject.dagl) { %>
  180. {
  181. title: '档案管理', colSpan: '1', rowSpan: '2', field: 'dagl', hAlign: 1, width: 80, formatter: '@',
  182. readOnly: true, getValue: getDaglText, cellType: 'activeImageBtn', normalImg: '#rela-file-icon', indent: 5,
  183. imgAlign: 2, showImage: function (data) { return data && data.dagl_url }
  184. },
  185. <% } %>
  186. ],
  187. emptyRows: 0,
  188. headRows: 2,
  189. headRowHeight: [25, 25],
  190. defaultRowHeight: 21,
  191. headerFont: '12px 微软雅黑',
  192. font: '12px 微软雅黑',
  193. readOnly: true,
  194. localCache: {
  195. key: 'stage-bwtz-xmj',
  196. colWidth: true,
  197. },
  198. getColor,
  199. imageClick,
  200. };
  201. const unitSpreadSetting = {
  202. cols: [
  203. {title: '计量单元', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 120, formatter: '@', cellType: 'tree'},
  204. {title: '清单编号', colSpan: '1', rowSpan: '2', field: 'b_code', hAlign: 0, width: 70, formatter: '@'},
  205. <% if (ex_memo1.show) { %>
  206. {title: '<%- ex_memo1.alias || ex_memo1.name %>', colSpan: '1', rowSpan: '2', field: 'ex_memo1_merge', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
  207. <% } %>
  208. {
  209. title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 185, formatter: '@',
  210. getValue: function (data) {
  211. return data.pos_name + data.name;
  212. }
  213. },
  214. {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 60, formatter: '@', cellType: 'unit'},
  215. {title: '单价', colSpan: '1', rowSpan: '2', field: 'unit_price', hAlign: 2, width: 60, type: 'Number'},
  216. {title: '台账|数量', colSpan: '2|1', rowSpan: '1|1', field: 'quantity', hAlign: 2, width: 60, type: 'Number'},
  217. {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'total_price', hAlign: 2, width: 60, type: 'Number'},
  218. <% if (ctx.tender.info.display.stage.realComplete) { %>
  219. {title: '现场实际|数量', colSpan: '2|1', rowSpan: '1|1', field: 'real_qty', hAlign: 2, width: 60, type: 'Number'},
  220. {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'real_tp', hAlign: 2, width: 60, type: 'Number'},
  221. {title: '预计变更|数量', colSpan: '2|1', rowSpan: '1|1', field: 'estimate_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},
  222. {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'estimate_tp', hAlign: 2, width: 60, type: 'Number'},
  223. <% } %>
  224. {title: '本期合同计量|数量', colSpan: '2|1', rowSpan: '1|1', field: 'contract_qty', hAlign: 2, width: 60, type: 'Number'},
  225. {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'contract_tp', hAlign: 2, width: 60, type: 'Number'},
  226. {title: '本期数量变更|数量', colSpan: '3|1', rowSpan: '1|1', field: 'qc_qty', hAlign: 2, width: 60, type: 'Number'},
  227. {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'qc_tp', hAlign: 2, width: 60, type: 'Number'},
  228. {title: '|变更令', colSpan: '|1', rowSpan: '|1', field: 'bgl_code', hAlign: 2, width: 60, formatter: '@', cellType: 'ellipsisAutoTip'},
  229. {title: '本期完成计量|数量', colSpan: '2|1', rowSpan: '1|1', field: 'gather_qty', hAlign: 2, width: 60, type: 'Number'},
  230. {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'gather_tp', hAlign: 2, width: 60, type: 'Number'},
  231. {title: '截止本期合同计量|数量', colSpan: '2|1', rowSpan: '1|1', field: 'end_contract_qty', hAlign: 2, width: 60, type: 'Number'},
  232. {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'end_contract_tp', hAlign: 2, width: 60, type: 'Number'},
  233. {title: '截止本期数量变更|数量', colSpan: '2|1', rowSpan: '1|1', field: 'end_qc_qty', hAlign: 2, width: 60, type: 'Number'},
  234. {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'end_qc_tp', hAlign: 2, width: 60, type: 'Number'},
  235. {title: '截止本期完成计量|数量', colSpan: '3|1', rowSpan: '1|1', field: 'end_gather_qty', hAlign: 2, width: 60, type: 'Number'},
  236. {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'end_gather_tp', hAlign: 2, width: 60, type: 'Number'},
  237. {title: '|完成率(%)', colSpan: '|1', rowSpan: '|1', field: 'end_gather_percent', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  238. {title: '图(册)号', colSpan: '1', rowSpan: '2', field: 'drawing_code_merge', hAlign: 0, width: 80, formatter: '@'},
  239. {title: '本期批注', colSpan: '1', rowSpan: '2', field: 'postil_merge', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
  240. {title: '备注', colSpan: '1', rowSpan: '2', field: 'memo_merge', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
  241. <% if (ex_memo2.show) { %>
  242. {title: '<%- ex_memo2.alias || ex_memo2.name %>', colSpan: '1', rowSpan: '2', field: 'ex_memo2_merge', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
  243. <% } %>
  244. <% if (ex_memo3.show) { %>
  245. {title: '<%- ex_memo3.alias || ex_memo3.name %>', colSpan: '1', rowSpan: '2', field: 'ex_memo3_merge', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'},
  246. <% } %>
  247. <% if (ctx.session.sessionProject.gxby) { %>
  248. {title: '工序报验', colSpan: '1', rowSpan: '2', field: 'gxby', hAlign: 1, width: 80, formatter: '@', readOnly: true, getValue: getGxbyText},
  249. <% } %>
  250. <% if (ctx.session.sessionProject.dagl) { %>
  251. {
  252. title: '档案管理', colSpan: '1', rowSpan: '2', field: 'dagl', hAlign: 1, width: 80, formatter: '@',
  253. readOnly: true, getValue: getDaglText, cellType: 'activeImageBtn', normalImg: '#rela-file-icon', indent: 5,
  254. imgAlign: 2, showImage: function (data) { return data && data.dagl_url }
  255. },
  256. <% } %>
  257. ],
  258. emptyRows: 0,
  259. headRows: 2,
  260. headRowHeight: [25, 25],
  261. defaultRowHeight: 21,
  262. headerFont: '12px 微软雅黑',
  263. font: '12px 微软雅黑',
  264. readOnly: true,
  265. localCache: {
  266. key: 'stage-bwtz-unit',
  267. colWidth: true,
  268. },
  269. getColor,
  270. imageClick,
  271. };
  272. const decimal = <%- ctx.tender.info.decimal.tp %>;
  273. const thousandth = <%- ctx.tender.info.display.thousandth %>;
  274. const gxby = <%- ctx.session.sessionProject.gxby %>;
  275. const dagl = <%- ctx.session.sessionProject.dagl %>;
  276. </script>