fun.ejs 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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. <div class="form-check form-check-inline">
  36. <input class="form-check-input" type="checkbox" id="minusNoValue" name="minusNoValue" <% if (funRela.minusNoValue) { %>checked<% } %> onchange="updateSetting();">
  37. <label class="form-check-label" for="minusNoValue">计量不计价</label>
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. <div class="card mb-3">
  44. <div class="card-body">
  45. <h5 class="card-title">中间计量模式设置</h5>
  46. <div class="form-group mb-4">
  47. <div>
  48. <% for (const i in imType) { %>
  49. <div class="form-check form-check-inline">
  50. <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();">
  51. <label class="form-check-label" for="radio_<%- i %>" name="im_type"><%- imType[i].name %></label>
  52. </div>
  53. <% } %>
  54. </div>
  55. <div class="mt-3">
  56. <label class="form-text alert alert-danger">切换模式,仅对未开始第一期计量的标段生效。</label>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. <div class="row">
  62. <div class="col-6">
  63. <div class="card mb-3">
  64. <div class="card-body">
  65. <h5 class="card-title">工程变更</h5>
  66. <div class="form-group mb-1">
  67. <div class="form-check form-check-inline">
  68. <input class="form-check-input" type="checkbox" id="openChangeProject" <% if(ctx.session.sessionProject.page_show.openChangeProject) { %>checked<% } %> onchange="updateSetting(1);">
  69. <label class="form-check-label" for="openChangeProject">显示「变更立项」页面</label>
  70. </div>
  71. </div>
  72. <div class="form-group mb-1">
  73. <div class="form-check form-check-inline">
  74. <input class="form-check-input" type="checkbox" id="openChangeApply" <% if(ctx.session.sessionProject.page_show.openChangeApply) { %>checked<% } %> onchange="updateSetting(2);">
  75. <label class="form-check-label" for="openChangeApply">显示「变更申请」页面</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="openChangePlan" <% if(ctx.session.sessionProject.page_show.openChangePlan) { %>checked<% } %> onchange="updateSetting(3);">
  81. <label class="form-check-label" for="openChangePlan">显示「变更方案」页面</label>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. <div class="col-6">
  88. <div class="card mb-3">
  89. <div class="card-body">
  90. <h5 class="card-title">材料调差</h5>
  91. <div class="form-group mb-1">
  92. <div class="form-check form-check-inline">
  93. <input class="form-check-input" type="checkbox" id="openMaterialTax" <% if(ctx.session.sessionProject.page_show.openMaterialTax) { %>checked<% } %> onchange="updateSetting();">
  94. <label class="form-check-label" for="openMaterialTax">使用材料税</label>
  95. </div>
  96. </div>
  97. <div class="form-group mb-1">
  98. <div class="form-check form-check-inline">
  99. <input class="form-check-input" type="checkbox" id="openMaterialChecklist" <% if(ctx.session.sessionProject.page_show.openMaterialChecklist) { %>checked<% } %> onchange="updateSetting();">
  100. <label class="form-check-label" for="openMaterialChecklist">开启「批量设置调差清单」添加调差工料功能</label>
  101. </div>
  102. </div>
  103. <div class="form-group mb-1">
  104. <div class="form-check form-check-inline">
  105. <input class="form-check-input" type="checkbox" id="openMaterialSelf" <% if(ctx.session.sessionProject.page_show.openMaterialSelf) { %>checked<% } %> onchange="updateSetting();">
  106. <label class="form-check-label" for="openMaterialSelf">开启调差清单-所属项目节「单独添加工料」功能
  107. <a href="javascript:void(0);" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="开启该选项,调差清单的所属项目节,允许单独添加工料"><i class="fa fa-question-circle "></i></a></label>
  108. </div>
  109. </div>
  110. <div class="form-group mb-1">
  111. <div class="form-check form-check-inline">
  112. <input class="form-check-input" type="checkbox" id="openMaterialEditForAudit" <% if(ctx.session.sessionProject.page_show.openMaterialEditForAudit) { %>checked<% } %> onchange="updateSetting();">
  113. <label class="form-check-label" for="openMaterialEditForAudit">开启「审核人修改数据」功能
  114. <a href="javascript:void(0);" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="开启该选项,审核人允许修改部分调差工料数据"><i class="fa fa-question-circle "></i></a></label>
  115. </div>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. <div class="card mb-3">
  122. <div class="card-body">
  123. <h5 class="card-title">动态决算</h5>
  124. <div class="form-group mb-4">
  125. <div>
  126. <div class="form-check form-check-inline">
  127. <input class="form-check-input" type="checkbox" id="need_gcl" name="need_gcl" <% if (funRela.needGcl) { %>checked<% } %> onchange="updateSetting();">
  128. <label class="form-check-label" for="need_gcl">显示清单信息</label>
  129. </div>
  130. </div>
  131. <div class="mt-3">
  132. <label class="form-text alert alert-danger">做施工图三级清单预算时,请进行勾选。</label>
  133. </div>
  134. </div>
  135. </div>
  136. </div>
  137. </div>
  138. </div>
  139. </div>
  140. </div>
  141. </div>
  142. </div>
  143. <script src="/public/js/setting.js"></script>
  144. <script>
  145. $(() => {
  146. autoFlashHeight();
  147. });
  148. const updateSetting = function (tab = false) {
  149. if (!$('#openChangeApply')[0].checked && $('#openChangeProject')[0].checked && tab === 1) {
  150. $('#openChangeApply').prop('checked', true);
  151. $('#openChangePlan').prop('checked', true);
  152. } else if (!$('#openChangeApply')[0].checked && $('#openChangeProject')[0].checked && tab === 2) {
  153. $('#openChangeProject').prop('checked', false);
  154. }
  155. if (!$('#openChangePlan')[0].checked && $('#openChangeApply')[0].checked && tab === 2) {
  156. $('#openChangePlan').prop('checked', true);
  157. } else if (!$('#openChangePlan')[0].checked && $('#openChangeApply')[0].checked && tab === 3) {
  158. $('#openChangeApply').prop('checked', false);
  159. $('#openChangeProject').prop('checked', false);
  160. }
  161. postData('/setting/fun/update', {
  162. imType: parseInt($('[name=im_type]:checked').val()),
  163. banOver: $('[name=ban_over]')[0].checked,
  164. hintOver: $('#hint_over')[0].checked,
  165. minusNoValue: $('[name=minusNoValue]')[0].checked,
  166. needGcl: $('#need_gcl')[0].checked,
  167. openChangeProject: $('#openChangeProject')[0].checked,
  168. openChangeApply: $('#openChangeApply')[0].checked,
  169. openChangePlan: $('#openChangePlan')[0].checked,
  170. openMaterialTax: $('#openMaterialTax')[0].checked,
  171. openMaterialChecklist: $('#openMaterialChecklist')[0].checked,
  172. openMaterialSelf: $('#openMaterialSelf')[0].checked,
  173. openMaterialEditForAudit: $('#openMaterialEditForAudit')[0].checked,
  174. });
  175. }
  176. </script>