Browse Source

变更立项及申请逻辑调整

laiguoran 3 years ago
parent
commit
be836c89d1
2 changed files with 8 additions and 4 deletions
  1. 4 0
      app/view/change/apply_modal.ejs
  2. 4 4
      app/view/setting/fun.ejs

+ 4 - 0
app/view/change/apply_modal.ejs

@@ -37,6 +37,7 @@
                         <div class="invalid-feedback" style="display: none" id="bjHint">您输入的编号已存在。</div>
                     </div>
                 </div>
+                <% if (ctx.session.sessionProject.page_show.openChangeProject) { %>
                 <div class="form-group">
                     <label>关联变更立项</label>
                     <select class="form-control form-control-sm" id="project-code">
@@ -46,6 +47,9 @@
                         <% } %>
                     </select>
                 </div>
+                <% } else { %>
+                    <input type="hidden" value="" id="project-code">
+                <% } %>
             </div>
             <div class="modal-footer">
                 <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal" id="addCancel">关闭</button>

+ 4 - 4
app/view/setting/fun.ejs

@@ -113,10 +113,10 @@
         autoFlashHeight();
     });
     const updateSetting = function (tab = false) {
-        if ($('#openChangeApply')[0].checked && !$('#openChangeProject')[0].checked && tab === 1) {
-            $('#openChangeApply').prop('checked', false);
-        } else if ($('#openChangeApply')[0].checked && !$('#openChangeProject')[0].checked && tab === 2) {
-            $('#openChangeProject').prop('checked', true);
+        if (!$('#openChangeApply')[0].checked && $('#openChangeProject')[0].checked && tab === 1) {
+            $('#openChangeApply').prop('checked', true);
+        } else if (!$('#openChangeApply')[0].checked && $('#openChangeProject')[0].checked && tab === 2) {
+            $('#openChangeProject').prop('checked', false);
         }
         postData('/setting/fun/update', {
             imType: parseInt($('[name=im_type]:checked').val()),