gather.ejs 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <% include ./list_menu.ejs %>
  2. <div class="panel-content">
  3. <div class="panel-title">
  4. <div class="title-main d-flex">
  5. <% include ./list_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="javascript: void(0);">第一层</a>
  14. <a class="dropdown-item" name="showLevel" tag="2" href="javascript: void(0);">第二层</a>
  15. <a class="dropdown-item" name="showLevel" tag="3" href="javascript: void(0);">第三层</a>
  16. <a class="dropdown-item" name="showLevel" tag="4" href="javascript: void(0);">第四层</a>
  17. <a class="dropdown-item" name="showLevel" tag="5" href="javascript: void(0);">第五层</a>
  18. <a class="dropdown-item" name="showLevel" tag="last" href="javascript: void(0);">最底层</a>
  19. </div>
  20. </div>
  21. </div>
  22. </div>
  23. <div class="ml-auto">
  24. </div>
  25. </div>
  26. </div>
  27. <div class="content-wrap pr-46">
  28. <div class="c-header p-0">
  29. </div>
  30. <div class="row w-100 sub-content">
  31. <div id="left-view" class="c-body" style="width: 100%">
  32. <!--上部分-->
  33. <div class="sjs-height-1" id="settle-bills">
  34. </div>
  35. <!--下部分-->
  36. <div class="bcontent-wrap" id="main-bottom">
  37. <div id="main-resize" class="resize-y" r-Type="height" div1="#settle-bills" div2="#main-bottom" store-id="settle-main" store-version="1.0.0" min="100"></div>
  38. <div class="bc-bar mb-1">
  39. <ul class="nav nav-tabs">
  40. <li class="nav-item">
  41. <a class="nav-link active" href="#">计量单元</a>
  42. </li>
  43. </ul>
  44. </div>
  45. <div class="sp-wrap" id="settle-pos">
  46. </div>
  47. </div>
  48. </div>
  49. <div id="right-view" class="c-body" style="display: none; width: 33%;">
  50. <div class="resize-x" id="right-spr" r-Type="width" div1="#left-view" div2="#right-view" title="调整大小" a-type="percent"><!--调整左右高度条--></div>
  51. <div class="tab-content">
  52. <!--查找定位-->
  53. <div id="search" class="tab-pane tab-select-show">
  54. <div class="sjs-bar-1">
  55. <div class="input-group input-group-sm pb-1">
  56. <div class="input-group-prepend">
  57. <div class="input-group-text">
  58. <input type="radio" name="searchType" id="over"> 超计
  59. </div>
  60. <div class="input-group-text">
  61. <input type="radio" name="searchType" id="empty"> 漏计
  62. </div>
  63. </div>
  64. <input type="text" class="form-control form-control-sm" placeholder="可查找 项目节编号 / 清单编号 /名称" id="keyword">
  65. <div class="input-group-append">
  66. <button class="btn btn-outline-secondary btn-sm" type="button" id="searchLedger">搜索</button>
  67. </div>
  68. </div>
  69. </div>
  70. <div id="search-result" class="sjs-sh-1">
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. <div class="side-menu">
  77. <!--右侧菜单-->
  78. <ul class="nav flex-column right-nav">
  79. <li class="nav-item">
  80. <a class="nav-link" content="#search" href="javascript: void(0);">查找定位</a>
  81. </li>
  82. </ul>
  83. </div>
  84. </div>
  85. </div>
  86. <div style="display: none">
  87. <img src="/public/images/ellipsis_horizontal.png" id="ellipsis-icon" />
  88. <img src="/public/images/icon-ok.png" id="icon-ok" />
  89. <img src="/public/images/file_clip.png" id="rela-file-icon">
  90. <img src="/public/images/file_clip_hover.png" id="rela-file-hover">
  91. </div>
  92. <script>
  93. const readOnly = true;
  94. const tenderName = '<%- ctx.tender.name %>';
  95. const tenderInfo = JSON.parse(unescape('<%- escape(JSON.stringify(ctx.tender.info)) %>'));
  96. const thousandth = <%- ctx.tender.info.display.thousandth %>;
  97. const thirdParty = JSON.parse('<%- JSON.stringify(thirdParty) %>');
  98. const settleStatusHint = JSON.parse('<%- JSON.stringify(settleStatusHint )%>');
  99. const settleStatus = JSON.parse('<%- JSON.stringify(settleStatus )%>');
  100. const settleStatusColor = JSON.parse('<%- JSON.stringify(settleStatusColor )%>');
  101. const billsSpreadSetting = {
  102. cols: [
  103. {title: '结算状态', colSpan: '1', rowSpan: '2', field: 'settle_status', hAlign: 1, width: 60, formatter: '@', readOnly: true, getValue: function(data) {
  104. // return data.b_code ? '' : settleStatusHint[data.settle_status] || ''
  105. return settleStatusHint[data.settle_status] || '';
  106. }},
  107. {title: '项目节编号', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 145, formatter: '@', readOnly: true, cellType: 'tree'},
  108. {title: '清单编号', colSpan: '1', rowSpan: '2', field: 'b_code', hAlign: 0, width: 70, formatter: '@', readOnly: true},
  109. {title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 185, formatter: '@', readOnly: true},
  110. {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 60, formatter: '@', readOnly: true, cellType: 'unit'},
  111. {title: '单价', colSpan: '1', rowSpan: '2', field: 'unit_price', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  112. {title: '台账|数量', colSpan: '2|1', rowSpan: '1|1', field: 'quantity', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  113. {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'total_price', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  114. {title: '本期合同结算|数量', colSpan: '2|1', rowSpan: '1|1', field: 'cur_contract_qty', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  115. {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'cur_contract_tp', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  116. {title: '本期数量变更|数量', colSpan: '2|1', rowSpan: '1|1', field: 'cur_qc_qty', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  117. {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'cur_qc_tp', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  118. {title: '本期完成结算|数量', colSpan: '3|1', rowSpan: '1|1', field: 'cur_gather_qty', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  119. {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'cur_gather_tp', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  120. {title: '|完成率(%)', colSpan: '1', rowSpan: '|1', field: 'cur_final_1_percent', hAlign: 2, width: 80, readOnly: true, type: 'Number'},
  121. {title: '截止本期合同结算|数量', colSpan: '2|1', rowSpan: '1|1', field: 'end_contract_qty', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  122. {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'end_contract_tp', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  123. {title: '截止本期数量变更|数量', colSpan: '2|1', rowSpan: '1|1', field: 'end_qc_qty', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  124. {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'end_qc_tp', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  125. {title: '截止本期完成结算|数量', colSpan: '3|1', rowSpan: '1|1', field: 'end_gather_qty', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  126. {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'end_gather_tp', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  127. {title: '|完成率(%)', colSpan: '1', rowSpan: '|1', field: 'end_final_1_percent', hAlign: 2, width: 80, readOnly: true, type: 'Number'},
  128. {title: '图(册)号', colSpan: '1', rowSpan: '2', field: 'drawing_code', hAlign: 0, width: 80, formatter: '@', readOnly: true},
  129. {title: '备注', colSpan: '1', rowSpan: '2', field: 'memo', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip', readOnly: true},
  130. <% if (ctx.session.sessionProject.gxby) { %>
  131. {title: '工序报验', colSpan: '1', rowSpan: '2', field: 'gxby', hAlign: 1, width: 80, formatter: '@', readOnly: true},
  132. <% } %>
  133. <% if (ctx.session.sessionProject.dagl) { %>
  134. {title: '档案管理', colSpan: '1', rowSpan: '2', field: 'dagl', hAlign: 1, width: 80, formatter: '@', readOnly: true},
  135. <% } %>
  136. ],
  137. emptyRows: 0,
  138. headRows: 2,
  139. headRowHeight: [25, 25],
  140. defaultRowHeight: 21,
  141. headerFont: '12px 微软雅黑',
  142. font: '12px 微软雅黑',
  143. frozenColCount: 5,
  144. frozenLineColor: '#93b5e4',
  145. readOnly: true,
  146. getForeColor: function(sheet, data, row, col, foreColor) {
  147. if (col.field === 'settle_status') {
  148. return data ? settleStatusColor[data.settle_status] || foreColor : foreColor;
  149. } else {
  150. return foreColor;
  151. }
  152. }
  153. };
  154. const posSpreadSetting = {
  155. cols: [
  156. {title: '结算状态', colSpan: '1', rowSpan: '2', field: 'settle_status', hAlign: 1, width: 60, formatter: '@', readOnly: true, getValue: function(data) { return settleStatusHint[data.settle_status] || '' }},
  157. {title: '计量单元', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 180, formatter: '@', readOnly: true},
  158. {title: '位置', colSpan: '1', rowSpan: '2', field: 'position', hAlign: 0, width: 60, formatter: '@', readOnly: true},
  159. {title: '台账数量', colSpan: '1', rowSpan: '2', field: 'quantity', hAlign: 2, width: 60, formatter: '@', readOnly: true},
  160. {title: '本期结算|合同', colSpan: '3|1', rowSpan: '1|1', field: 'cur_contract_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},
  161. {title: '|数量变更', colSpan: '|1', rowSpan: '|1', field: 'cur_qc_qty', hAlign: 2, width: 80, type: 'Number', readOnly: true},
  162. {title: '|完成', colSpan: '|1', rowSpan: '|1', field: 'cur_gather_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},
  163. {title: '截止本期结算|合同', colSpan: '3|1', rowSpan: '1|1', field: 'end_contract_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},
  164. {title: '|数量变更', colSpan: '|1', rowSpan: '|1', field: 'end_qc_qty', hAlign: 2, width: 80, type: 'Number', readOnly: true},
  165. {title: '|完成', colSpan: '|1', rowSpan: '|1', field: 'end_gather_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},
  166. {title: '图册号', colSpan: '1', rowSpan: '2', field: 'drawing_code', hAlign: 0, width: 80, formatter: '@'},
  167. <% if (ctx.session.sessionProject.gxby) { %>
  168. {title: '工序报验', colSpan: '1', rowSpan: '2', field: 'gxby', hAlign: 1, width: 80, formatter: '@', readOnly: true},
  169. <% } %>
  170. <% if (ctx.session.sessionProject.dagl) { %>
  171. {title: '档案管理', colSpan: '1', rowSpan: '2', field: 'dagl', hAlign: 1, width: 80, formatter: '@', readOnly: true},
  172. <% } %>
  173. ],
  174. emptyRows: 0,
  175. headRows: 2,
  176. headRowHeight: [25, 25],
  177. headColWidth: [30],
  178. defaultRowHeight: 21,
  179. headerFont: '12px 微软雅黑',
  180. font: '12px 微软雅黑',
  181. readOnly: true,
  182. getForeColor: function(sheet, data, row, col, foreColor) {
  183. if (col.field === 'settle_status') {
  184. return data ? settleStatusColor[data.settle_status] || foreColor : foreColor;
  185. } else {
  186. return foreColor;
  187. }
  188. }
  189. };
  190. </script>