index.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <%include ./common.html %>
  2. <div class="panel-content">
  3. <% if(Object.keys(selectedCompilation).length > 0) {%>
  4. <div class="panel-title">
  5. <div class="title-main">
  6. <h2>
  7. <%= selectedCompilation.name %>
  8. <% if(selectedCompilation.is_release) {%>
  9. <span class="text-muted" style="margin-left: 5px;">已发布 <%= moment(selectedCompilation.release_time).format('YYYY-MM-DD')%></span>
  10. <% } %>
  11. <a href="javascript:void(0);" data-id="<%= selectedCompilation._id %>" data-status="<%= selectedCompilation.is_release ? 0 : 1 %>" class="btn btn-primary btn-sm pull-right" id="release"><% if(selectedCompilation.is_release) {%>取消<% }else{ %>发布<% } %>编办</a>
  12. </h2>
  13. </div>
  14. </div>
  15. <div class="content-wrap">
  16. <div class="c-header" style="padding:0">
  17. <ul class="nav nav-tabs">
  18. <li role="presentation" class="active"><a href="#bill" aria-controls="bill" role="tab" data-toggle="tab">清单计价</a></li>
  19. <li role="presentation"><a href="#ration" aria-controls="ration" role="tab" data-toggle="tab">定额计价</a></li>
  20. </ul>
  21. </div>
  22. <div class="c-body tab-content">
  23. <div class="tab-pane active" role="tabpanel" id="bill">
  24. <a class="btn btn-default btn-sm" href="#" data-toggle="modal" data-target="#valuation-dialog"><span class="glyphicon glyphicon-plus"></span> 添加计价规则</a>
  25. <table class="table">
  26. <thead>
  27. <tr>
  28. <th>计价规则</th>
  29. <th>启用/禁用</th>
  30. <th>适用类型</th>
  31. <th>操作</th>
  32. </tr>
  33. </thead>
  34. <tbody>
  35. <% if (selectedCompilation.bill_valuation.length > 0) { %>
  36. <% selectedCompilation.bill_valuation.forEach(function(bill) { %>
  37. <tr>
  38. <td><%= bill.name %></td>
  39. <td>
  40. <% if (bill.enable) { %>
  41. <div class="btn-group enable" data-id="<%= bill.id %>">
  42. <button class="btn btn-success disabled" disabled="disabled">已开启</button>
  43. <button class="btn btn-default" title="禁用">禁用</button>
  44. </div>
  45. <% }else { %>
  46. <div class="btn-group enable" data-id="<%= bill.id %>">
  47. <button class="btn btn-default" title="开启">开启</button>
  48. <button class="btn btn-danger disabled" disabled="disabled">已禁用</button>
  49. </div>
  50. <% } %>
  51. </td>
  52. <td>
  53. <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_gusuan" <% if (bill.fileTypes && bill.fileTypes.includes(15)) { %> checked <% } %> /> 估算
  54. <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_estimate" <% if (bill.fileTypes && bill.fileTypes.includes(5)) { %> checked <% } %> /> 概算
  55. <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_submission" <% if (bill.fileTypes && bill.fileTypes.includes(1)) { %> checked <% } %> /> 预算
  56. <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_changeBudget" <% if (bill.fileTypes && bill.fileTypes.includes(4)) { %> checked <% } %> /> 变更预算
  57. <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_settlement" <% if (bill.fileTypes && bill.fileTypes.includes(10)) { %> checked <% } %> /> 结算
  58. <input type="checkbox" data-id="<%= bill.id %>" class="fileType" id="<%= bill.id %>_finalSettlement" <% if (bill.fileTypes && bill.fileTypes.includes(21)) { %> checked <% } %> /> 结算决算
  59. </td>
  60. <td>
  61. <a class="copy-bill-valuation" data-id="<%= bill.id %>" href="javascript:void(0);" class="btn btn-sm">拷贝</a>
  62. <a href="/compilation/valuation/bill/<%= bill.id %>" class="btn btn-sm">编辑</a>
  63. <a onclick="$('#del').attr('selectedId', '<%= bill.id %>')" href="#" data-id="<%= bill.id %>" data-toggle="modal" data-target="#del" class="btn btn-sm text-danger">删除</a>
  64. <!--<a href="/compilation/valuation/bill/delete/<%= bill.id %>" class="btn btn-sm text-danger">删除</a>-->
  65. </td>
  66. </tr>
  67. <% }) %>
  68. <% } %>
  69. </tbody>
  70. </table>
  71. </div>
  72. <div class="tab-pane" role="tabpanel" id="ration">
  73. <a class="btn btn-default btn-sm" href="javascript:void(0)" data-toggle="modal" data-target="#valuation-dialog"><span class="glyphicon glyphicon-plus"></span> 添加计价规则</a>
  74. <table class="table">
  75. <thead>
  76. <tr>
  77. <th>计价规则</th>
  78. <th>启用/禁用</th>
  79. <th>适用类型</th>
  80. <th>操作</th>
  81. </tr>
  82. </thead>
  83. <tbody>
  84. <% if (selectedCompilation.ration_valuation.length > 0) { %>
  85. <% selectedCompilation.ration_valuation.forEach(function(ration) { %>
  86. <tr>
  87. <td><%= ration.name %></td>
  88. <td>
  89. <% if (ration.enable) { %>
  90. <div class="btn-group enable" data-id="<%= ration.id %>">
  91. <button class="btn btn-success disabled" disabled="disabled">已开启</button>
  92. <button class="btn btn-default" title="禁用">禁用</button>
  93. </div>
  94. <% }else { %>
  95. <div class="btn-group enable" data-id="<%= ration.id %>">
  96. <button class="btn btn-default" title="开启">开启</button>
  97. <button class="btn btn-danger disabled" disabled="disabled">已禁用</button>
  98. </div>
  99. <% } %>
  100. </td>
  101. <td>
  102. </td>
  103. <td>
  104. <a class="copy-ration-valuation" data-id="<%= ration.id %>" href="javascript:void(0);" class="btn btn-sm">拷贝</a>
  105. <a href="/compilation/valuation/ration/<%= ration.id %>" class="btn btn-sm">编辑</a>
  106. <a href="/compilation/valuation/ration/delete/<%= ration.id %>" class="btn btn-sm text-danger">删除</a>
  107. </td>
  108. </tr>
  109. <% }) %>
  110. <% } %>
  111. </tbody>
  112. </table>
  113. </div>
  114. <table class="table">
  115. <tr><td><p>软件版本介绍</p><textarea id="description" class="form-control" placeholder="请简要描述改版本"><%= selectedCompilation.description%></textarea></td></tr>
  116. <tr><td><span>重写路径:</span><input class="form-control" type="text" id="overWriteUrl" value="<%= selectedCompilation.overWriteUrl%>"></td></tr>
  117. <tr><td><span>例题建设项目ID:</span><input class="form-control" type="text" id="example" value="<%= selectedCompilation.example%>"></td></tr>
  118. <tr><td><p>显示办事处销售信息</p>
  119. <div style="position:relative; display:inline-block; width:200px;" id="category-dropdown-wrap">
  120. <button type="button" class="btn btn-default btn-block" id="category-dropdown-btn"
  121. style="text-align:left; padding-right:24px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; position:relative;">
  122. <span id="category-label">请选择</span>
  123. <span class="caret" style="position:absolute; right:10px; top:50%; margin-top:-2px;"></span>
  124. </button>
  125. <div id="category-panel" style="display:none; position:absolute; z-index:1000; background:#fff; border:1px solid #ccc; border-radius:4px; min-width:200px; max-height:400px; overflow-y:auto; box-shadow:0 6px 12px rgba(0,0,0,.175);">
  126. <ul id="category-tree" style="list-style:none; padding:5px 0; margin:0;"></ul>
  127. </div>
  128. </div>
  129. <input type="hidden" id="category-select" value="<%= selectedCompilation.categoryID || '' %>">
  130. </td></tr>
  131. <tr><td><p>默认工程所在地</p>
  132. <select class="form-control" style="width:200px" id="location-select">
  133. <option value=""></option>
  134. <% locationList.forEach(function(location) { %>
  135. <option value="<%= location %>" <% if (selectedCompilation.defaultLocation !== undefined && location === selectedCompilation.defaultLocation) { %>selected="selected"<% } %> ><%= location %></option>
  136. <% }) %>
  137. </select>
  138. </td></tr>
  139. <tr>
  140. <td>
  141. <p>
  142. <span> 提供免费版:</span> <input type="checkbox" id="freeUse" <% if (selectedCompilation.freeUse) { %> checked <% } %>>
  143. <span style="margin-left: 60px;"> 定制编办:</span> <input type="checkbox" id="customMade" <% if (selectedCompilation.customMade) { %> checked <% } %>>
  144. </p>
  145. </td>
  146. </tr>
  147. <tr>
  148. <td>
  149. <div style="display: inline-block;">
  150. <p>编办地区</p>
  151. <input class="form-control" type="text" style="width: 200px;" id="compilationArea"
  152. value="<%= selectedCompilation.compilationArea%>" />
  153. </div>
  154. </td>
  155. </tr>
  156. <tr><td><span>版本号:</span><input class="form-control" type="text" id="edition" value="<%= selectedCompilation.edition%>"></td></tr>
  157. <tr>
  158. <td><span>序号:</span><input class="form-control" type="number" id="serialNumber" value="<%= selectedCompilation.serialNumber%>">
  159. </td>
  160. </tr>
  161. </table>
  162. </div>
  163. <input type="hidden" name="id" value="<%= selectedCompilation._id %>" id="compilation-id">
  164. <% } %>
  165. </div>
  166. </div>
  167. <input type="hidden" id="category-list-json" value="<%- (JSON.stringify(categoryList || [])).replace(/"/g, '&quot;') %>">
  168. <input type="hidden" id="category-current-id" value="<%= selectedCompilation.categoryID || '' %>">
  169. <script type="text/javascript" src="/web/users/js/compilation.js"></script>
  170. <%include ../compilation/modal.html %>