fun.ejs 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <% include ./sub_menu.ejs %>
  2. <div class="panel-content">
  3. <div class="panel-title">
  4. <div class="title-main">
  5. <h2>功能设置</h2>
  6. </div>
  7. </div>
  8. <div class="content-wrap">
  9. <div class="c-body">
  10. <div class="sjs-height-0">
  11. <div class="row m-0 mt-3">
  12. <div class="col-6">
  13. <div class="card mb-3">
  14. <div class="card-body">
  15. <h5 class="card-title">超计控制</h5>
  16. <div class="form-group mb-4">
  17. <div>
  18. <div class="form-check form-check-inline">
  19. <input class="form-check-input" type="checkbox" id="ban_over" name="ban_over" <% if (funRela.banOver) { %>checked<% } %> onchange="updateSetting();">
  20. <label class="form-check-label" for="ban_over">超计时限制上报审批/审批通过</label>
  21. </div>
  22. <div class="form-check form-check-inline">
  23. <input class="form-check-input" type="checkbox" id="hint_over" name="hint_over" <% if (funRela.hintOver) { %>checked<% } %> onchange="updateSetting();">
  24. <label class="form-check-label" for="hint_over">超计时标红显示</label>
  25. </div>
  26. </div>
  27. </div>
  28. </div>
  29. </div>
  30. <div class="card mb-3">
  31. <div class="card-body">
  32. <h5 class="card-title">中间计量模式设置</h5>
  33. <div class="form-group mb-4">
  34. <div>
  35. <% for (const i in imType) { %>
  36. <div class="form-check form-check-inline">
  37. <input class="form-check-input" type="radio" id="radio_<%- i %>" value="<%- imType[i].value %>" <% if (funRela.imType === imType[i].value) { %>checked<% } %> name="im_type" onchange="updateSetting();">
  38. <label class="form-check-label" for="radio_<%- i %>" name="im_type"><%- imType[i].name %></label>
  39. </div>
  40. <% } %>
  41. </div>
  42. <div class="mt-3">
  43. <label class="form-text alert alert-danger">切换模式,仅对未开始第一期计量的标段生效。</label>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. <div class="row">
  49. <div class="col-6">
  50. <div class="card mb-3">
  51. <div class="card-body">
  52. <h5 class="card-title">工程变更</h5>
  53. <div class="form-group mb-1">
  54. <div class="form-check form-check-inline">
  55. <input class="form-check-input" type="checkbox" id="openChangeProject" <% if(ctx.session.sessionProject.page_show.openChangeProject) { %>checked<% } %> onchange="updateSetting(1);">
  56. <label class="form-check-label" for="openChangeProject">显示「变更立项」页面</label>
  57. </div>
  58. </div>
  59. <div class="form-group mb-1">
  60. <div class="form-check form-check-inline">
  61. <input class="form-check-input" type="checkbox" id="openChangeApply" <% if(ctx.session.sessionProject.page_show.openChangeApply) { %>checked<% } %> onchange="updateSetting(2);">
  62. <label class="form-check-label" for="openChangeApply">显示「变更申请」页面</label>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. <div class="col-6">
  69. <div class="card mb-3">
  70. <div class="card-body">
  71. <h5 class="card-title">材料调差</h5>
  72. <div class="form-group mb-1">
  73. <div class="form-check form-check-inline">
  74. <input class="form-check-input" type="checkbox" id="openMaterialTax" <% if(ctx.session.sessionProject.page_show.openMaterialTax) { %>checked<% } %> onchange="updateSetting();">
  75. <label class="form-check-label" for="openMaterialTax">使用材料税</label>
  76. </div>
  77. </div>
  78. <div class="form-group mb-1">
  79. <div class="form-check form-check-inline">
  80. <input class="form-check-input" type="checkbox" id="openMaterialChecklist" <% if(ctx.session.sessionProject.page_show.openMaterialChecklist) { %>checked<% } %> onchange="updateSetting();">
  81. <label class="form-check-label" for="openMaterialChecklist">开启「清单设置」添加调差工料功能</label>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. <div class="card mb-3">
  89. <div class="card-body">
  90. <h5 class="card-title">动态决算</h5>
  91. <div class="form-group mb-4">
  92. <div>
  93. <div class="form-check form-check-inline">
  94. <input class="form-check-input" type="checkbox" id="need_gcl" name="need_gcl" <% if (funRela.needGcl) { %>checked<% } %> onchange="updateSetting();">
  95. <label class="form-check-label" for="need_gcl">显示清单信息</label>
  96. </div>
  97. </div>
  98. <div class="mt-3">
  99. <label class="form-text alert alert-danger">做施工图三级清单预算时,请进行勾选。</label>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. <script src="/public/js/setting.js"></script>
  111. <script>
  112. $(() => {
  113. autoFlashHeight();
  114. });
  115. const updateSetting = function (tab = false) {
  116. if ($('#openChangeApply')[0].checked && !$('#openChangeProject')[0].checked && tab === 1) {
  117. $('#openChangeApply').prop('checked', false);
  118. } else if ($('#openChangeApply')[0].checked && !$('#openChangeProject')[0].checked && tab === 2) {
  119. $('#openChangeProject').prop('checked', true);
  120. }
  121. postData('/setting/fun/update', {
  122. imType: parseInt($('[name=im_type]:checked').val()),
  123. banOver: $('[name=ban_over]')[0].checked,
  124. hintOver: $('#hint_over')[0].checked,
  125. needGcl: $('#need_gcl')[0].checked,
  126. openChangeProject: $('#openChangeProject')[0].checked,
  127. openChangeApply: $('#openChangeApply')[0].checked,
  128. openMaterialTax: $('#openMaterialTax')[0].checked,
  129. openMaterialChecklist: $('#openMaterialChecklist')[0].checked,
  130. });
  131. }
  132. </script>