index.ejs 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <% include ./settle_menu.ejs %>
  2. <div class="panel-content">
  3. <div class="panel-title">
  4. <div class="title-main d-flex">
  5. <% include ./settle_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 id="bills-tag" class="tab-pane tab-select-show">
  74. </div>
  75. <!--附件-->
  76. <div id="fujian" class="tab-pane tab-select-show">
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. <div class="side-menu">
  82. <!--右侧菜单-->
  83. <ul class="nav flex-column right-nav">
  84. <li class="nav-item">
  85. <a class="nav-link" content="#search" href="javascript: void(0);">查找定位</a>
  86. </li>
  87. <li class="nav-item">
  88. <a class="nav-link" content="#bills-tag" href="javascript: void(0);">书签</a>
  89. </li>
  90. <li class="nav-item">
  91. <a class="nav-link" content="#fujian" href="javascript: void(0);">附件</a>
  92. </li>
  93. </ul>
  94. </div>
  95. </div>
  96. </div>
  97. <div style="display: none">
  98. <img src="/public/images/ellipsis_horizontal.png" id="ellipsis-icon" />
  99. <img src="/public/images/icon-ok.png" id="icon-ok" />
  100. <img src="/public/images/file_clip.png" id="rela-file-icon">
  101. <img src="/public/images/file_clip_hover.png" id="rela-file-hover">
  102. </div>
  103. <script>
  104. const readOnly = <%- settle.readOnly %>;
  105. const auditConst = JSON.parse(JSON.stringify('<%- auditConst %>'));
  106. const tenderName = '<%- ctx.tender.name %>';
  107. const settleOrder = <%- ctx.settle.settle_order %>;
  108. const settleComplete = <%- (ctx.settle.audit_status === auditConst.status.checked ? 1 : 0 )%>;
  109. const tenderInfo = JSON.parse(unescape('<%- escape(JSON.stringify(ctx.tender.info)) %>'));
  110. const thousandth = <%- ctx.tender.info.display.thousandth %>;
  111. const thirdParty = JSON.parse('<%- JSON.stringify(thirdParty) %>');
  112. const settleStatusHint = JSON.parse('<%- JSON.stringify(settleStatusHint )%>');
  113. const settleStatus = JSON.parse('<%- JSON.stringify(settleStatus )%>');
  114. const settleStatusColor = JSON.parse('<%- JSON.stringify(settleStatusColor )%>');
  115. const billsSpreadSetting = {
  116. cols: [
  117. {title: '结算状态', colSpan: '1', rowSpan: '2', field: 'settle_status', hAlign: 1, width: 60, formatter: '@', readOnly: true, getValue: function(data) {
  118. // return data.b_code ? '' : settleStatusHint[data.settle_status] || ''
  119. return settleStatusHint[data.settle_status] || '';
  120. }},
  121. {title: '项目节编号', colSpan: '1', rowSpan: '2', field: 'code', hAlign: 0, width: 145, formatter: '@', readOnly: true, cellType: 'tree'},
  122. {title: '清单编号', colSpan: '1', rowSpan: '2', field: 'b_code', hAlign: 0, width: 70, formatter: '@', readOnly: true},
  123. {title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 185, formatter: '@', readOnly: true},
  124. {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 60, formatter: '@', readOnly: true, cellType: 'unit'},
  125. {title: '单价', colSpan: '1', rowSpan: '2', field: 'unit_price', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  126. {title: '台账|数量', colSpan: '2|1', rowSpan: '1|1', field: 'quantity', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  127. {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'total_price', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  128. {title: '本期合同结算|数量', colSpan: '2|1', rowSpan: '1|1', field: 'cur_contract_qty', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  129. {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'cur_contract_tp', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  130. {title: '本期数量变更|数量', colSpan: '2|1', rowSpan: '1|1', field: 'cur_qc_qty', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  131. {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'cur_qc_tp', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  132. {title: '本期完成结算|数量', colSpan: '3|1', rowSpan: '1|1', field: 'cur_gather_qty', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  133. {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'cur_gather_tp', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  134. {title: '|完成率(%)', colSpan: '1', rowSpan: '|1', field: 'cur_final_1_percent', hAlign: 2, width: 80, readOnly: true, type: 'Number'},
  135. {title: '截止本期合同结算|数量', colSpan: '2|1', rowSpan: '1|1', field: 'end_contract_qty', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  136. {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'end_contract_tp', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  137. {title: '截止本期数量变更|数量', colSpan: '2|1', rowSpan: '1|1', field: 'end_qc_qty', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  138. {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'end_qc_tp', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  139. {title: '截止本期完成结算|数量', colSpan: '3|1', rowSpan: '1|1', field: 'end_gather_qty', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  140. {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'end_gather_tp', hAlign: 2, width: 60, readOnly: true, type: 'Number'},
  141. {title: '|完成率(%)', colSpan: '1', rowSpan: '|1', field: 'end_final_1_percent', hAlign: 2, width: 80, readOnly: true, type: 'Number'},
  142. {title: '图(册)号', colSpan: '1', rowSpan: '2', field: 'drawing_code', hAlign: 0, width: 80, formatter: '@', readOnly: true},
  143. {title: '备注', colSpan: '1', rowSpan: '2', field: 'memo', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip', readOnly: true},
  144. <% if (ctx.session.sessionProject.gxby) { %>
  145. {title: '工序报验', colSpan: '1', rowSpan: '2', field: 'gxby', hAlign: 1, width: 80, formatter: '@', readOnly: true},
  146. <% } %>
  147. <% if (ctx.session.sessionProject.dagl) { %>
  148. {title: '档案管理', colSpan: '1', rowSpan: '2', field: 'dagl', hAlign: 1, width: 80, formatter: '@', readOnly: true},
  149. <% } %>
  150. ],
  151. emptyRows: 0,
  152. headRows: 2,
  153. headRowHeight: [25, 25],
  154. defaultRowHeight: 21,
  155. headerFont: '12px 微软雅黑',
  156. font: '12px 微软雅黑',
  157. frozenColCount: 5,
  158. frozenLineColor: '#93b5e4',
  159. readOnly,
  160. getForeColor: function(sheet, data, row, col, foreColor) {
  161. if (col.field === 'settle_status') {
  162. return data ? settleStatusColor[data.settle_status] || foreColor : foreColor;
  163. } else {
  164. return foreColor;
  165. }
  166. }
  167. };
  168. const posSpreadSetting = {
  169. cols: [
  170. {title: '结算状态', colSpan: '1', rowSpan: '2', field: 'settle_status', hAlign: 1, width: 60, formatter: '@', readOnly: true, getValue: function(data) { return settleStatusHint[data.settle_status] || '' }},
  171. {title: '计量单元', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 180, formatter: '@', readOnly: true},
  172. {title: '位置', colSpan: '1', rowSpan: '2', field: 'position', hAlign: 0, width: 60, formatter: '@', readOnly: true},
  173. {title: '台账数量', colSpan: '1', rowSpan: '2', field: 'quantity', hAlign: 2, width: 60, formatter: '@', readOnly: true},
  174. {title: '本期结算|合同', colSpan: '3|1', rowSpan: '1|1', field: 'cur_contract_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},
  175. {title: '|数量变更', colSpan: '|1', rowSpan: '|1', field: 'cur_qc_qty', hAlign: 2, width: 80, type: 'Number', readOnly: true},
  176. {title: '|完成', colSpan: '|1', rowSpan: '|1', field: 'cur_gather_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},
  177. {title: '截止本期结算|合同', colSpan: '3|1', rowSpan: '1|1', field: 'end_contract_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},
  178. {title: '|数量变更', colSpan: '|1', rowSpan: '|1', field: 'end_qc_qty', hAlign: 2, width: 80, type: 'Number', readOnly: true},
  179. {title: '|完成', colSpan: '|1', rowSpan: '|1', field: 'end_gather_qty', hAlign: 2, width: 60, type: 'Number', readOnly: true},
  180. {title: '图册号', colSpan: '1', rowSpan: '2', field: 'drawing_code', hAlign: 0, width: 80, formatter: '@'},
  181. <% if (ctx.session.sessionProject.gxby) { %>
  182. {title: '工序报验', colSpan: '1', rowSpan: '2', field: 'gxby', hAlign: 1, width: 80, formatter: '@', readOnly: true},
  183. <% } %>
  184. <% if (ctx.session.sessionProject.dagl) { %>
  185. {title: '档案管理', colSpan: '1', rowSpan: '2', field: 'dagl', hAlign: 1, width: 80, formatter: '@', readOnly: true},
  186. <% } %>
  187. ],
  188. emptyRows: 0,
  189. headRows: 2,
  190. headRowHeight: [25, 25],
  191. headColWidth: [30],
  192. defaultRowHeight: 21,
  193. headerFont: '12px 微软雅黑',
  194. font: '12px 微软雅黑',
  195. readOnly,
  196. getForeColor: function(sheet, data, row, col, foreColor) {
  197. if (col.field === 'settle_status') {
  198. return data ? settleStatusColor[data.settle_status] || foreColor : foreColor;
  199. } else {
  200. return foreColor;
  201. }
  202. }
  203. };
  204. </script>