add.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <%include ./common.html %>
  2. <div class="panel-content">
  3. <div class="panel-title">
  4. <div class="title-main">
  5. <h2>重庆版<span class="text-muted pull-right">已发布 2017-08-04</span><a href="javascript:void(0);" class="btn btn-primary btn-sm pull-right" id="save">发布版本</a></h2>
  6. </div>
  7. </div>
  8. <div class="content-wrap">
  9. <div class="c-header" style="padding:0">
  10. <ul class="nav nav-tabs">
  11. <% valuationList.forEach(function(valuation) { %>
  12. <li role="presentation" <% if (valuation._id.toString() === valuationId) { %>class="active"<% } %>><a href="/version/valuation/<%= section %>/<%= valuation._id %>"><%= valuation.name %></a></li>
  13. <% }) %>
  14. </ul>
  15. </div>
  16. <div class="c-body">
  17. <form method="post" action="/version/save-valuation" enctype="application/x-www-form-urlencoded21">
  18. <div class=" row">
  19. <div class="col-md-4">
  20. <div class="form-group">
  21. <label>名称</label>
  22. <div class="input-group">
  23. <input type="text" class="form-control" value="<%= valuationData.name %>" name="name">
  24. <span class="input-group-btn">
  25. <button class="btn btn-default" type="button" id="save-valuation">保存</button>
  26. </span>
  27. </div>
  28. </div>
  29. </div>
  30. <div class="col-md-12">
  31. <legend>
  32. <div class="form-group row">
  33. <label class="col-sm-2 col-form-label">工程专业</label>
  34. <div class="col-sm-3">
  35. <select class="form-control" name="engineering">
  36. <option value="">请选择工程</option>
  37. <% engineeringList.forEach(function(engineering) {%>
  38. <option value="<%= engineering.value %>" <% if (engineering.value === valuationData.engineering) {%>selected="selected"<% } %>><%= engineering.name %></option>
  39. <% }) %>
  40. </select>
  41. </div>
  42. </div>
  43. </legend>
  44. </div>
  45. <div class="col-md-4">
  46. <div class="form-group">
  47. <label>标准清单</label>
  48. <div class="bill-list">
  49. <% if (valuationData.bill_lib.length > 0) { %>
  50. <% valuationData.bill_lib.forEach(function (bill){ %>
  51. <p class="form-control-static">
  52. <a class="pull-right text-danger remove-lib" data-model="bill" title="移除">
  53. <span class="glyphicon glyphicon-remove"></span>
  54. </a>
  55. <input type="hidden" name="bill_lib" data-id="<%= bill.id %>" value="<%= JSON.stringify({id: bill.id, name: bill.name}) %>">
  56. <%= bill.name %>
  57. </p>
  58. <% }) %>
  59. <% } %>
  60. </div>
  61. <a class="btn btn-link btn-sm add-version" href="javascript:void(0)" data-model="bill">添加</a>
  62. </div>
  63. <div class="form-group">
  64. <label>定额库</label>
  65. <div class="ration-list">
  66. <% if (valuationData.ration_lib.length > 0) { %>
  67. <% valuationData.ration_lib.forEach(function (ration){ %>
  68. <p class="form-control-static">
  69. <a class="pull-right text-danger remove-lib" data-model="ration" title="移除" data-id="<%= ration.id %>">
  70. <span class="glyphicon glyphicon-remove"></span>
  71. </a>
  72. <input type="hidden" name="ration_lib" data-id="<%= ration.id %>" value="<%= JSON.stringify({id: ration.id, name: ration.name}) %>">
  73. <%= ration.name %>
  74. </p>
  75. <% }) %>
  76. <% } %>
  77. </div>
  78. <a href="#" class="btn btn-link btn-sm add-version" data-model="ration">添加</a>
  79. </div>
  80. </div>
  81. <div class="col-md-8">
  82. <legend>造价书列设置<a href="javascript:void(0)" data-toggle="modal" data-target="#set-column" class="btn btn-primary btn-sm pull-right">设置</a></legend>
  83. <div>
  84. S JS预览在此
  85. </div>
  86. </div>
  87. </div>
  88. <input type="hidden" name="section" value="<%= section %>" id="section">
  89. <input type="hidden" name="id" value="<%= valuationId %>">
  90. </form>
  91. </div>
  92. </div>
  93. </div>
  94. <script type="text/javascript">
  95. let province = '<%- province %>';
  96. let billList = '<%- billList %>';
  97. let rationList = '<%- rationList %>';
  98. </script>
  99. <script type="text/javascript" src="/web/users/js/version.js"></script>