index.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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. <select class="form-control" style="width:200px" id="category-select">
  120. <% categoryList.forEach(function(category) { %>
  121. <option value="<%= category.id %>" <% if (selectedCompilation.categoryID !== undefined && category.id === selectedCompilation.categoryID) { %>selected="selected"<% } %> ><%= category.name %></option>
  122. <% }) %>
  123. </select>
  124. </td></tr>
  125. <tr><td><p>默认工程所在地</p>
  126. <select class="form-control" style="width:200px" id="location-select">
  127. <option value=""></option>
  128. <% locationList.forEach(function(location) { %>
  129. <option value="<%= location %>" <% if (selectedCompilation.defaultLocation !== undefined && location === selectedCompilation.defaultLocation) { %>selected="selected"<% } %> ><%= location %></option>
  130. <% }) %>
  131. </select>
  132. </td></tr>
  133. <tr>
  134. <td>
  135. <p>
  136. <span> 提供免费版:</span> <input type="checkbox" id="freeUse" <% if (selectedCompilation.freeUse) { %> checked <% } %>>
  137. <span style="margin-left: 60px;"> 定制编办:</span> <input type="checkbox" id="customMade" <% if (selectedCompilation.customMade) { %> checked <% } %>>
  138. </p>
  139. </td>
  140. </tr>
  141. <tr>
  142. <td>
  143. <div style="display: inline-block;">
  144. <p>编办地区</p>
  145. <input class="form-control" type="text" style="width: 200px;" id="compilationArea"
  146. value="<%= selectedCompilation.compilationArea%>" />
  147. </div>
  148. </td>
  149. </tr>
  150. <tr><td><span>版本号:</span><input class="form-control" type="text" id="edition" value="<%= selectedCompilation.edition%>"></td></tr>
  151. <tr>
  152. <td><span>序号:</span><input class="form-control" type="number" id="serialNumber" value="<%= selectedCompilation.serialNumber%>">
  153. </td>
  154. </tr>
  155. </table>
  156. </div>
  157. <input type="hidden" name="id" value="<%= selectedCompilation._id %>" id="compilation-id">
  158. <% } %>
  159. </div>
  160. </div>
  161. <script type="text/javascript" src="/web/users/js/compilation.js"></script>
  162. <%include ../compilation/modal.html %>