浏览代码

审核比较

MaiXinRong 5 年之前
父节点
当前提交
43de410d7d
共有 2 个文件被更改,包括 6 次插入2 次删除
  1. 4 1
      app/public/js/stage_compare.js
  2. 2 1
      app/view/stage/compare_modal.ejs

+ 4 - 1
app/public/js/stage_compare.js

@@ -141,7 +141,10 @@ $(document).ready(function () {
 
     postData(window.location.pathname + '/load', {main: true, roles: scRoles}, function (result) {
         for (const r of scRoles) {
-            if (r != 0) $('input[audit-order=' + r + ']')[0].checked = true;
+            if (r && r != 0) {
+                const check = $('input[audit-order=' + r + ']')[0];
+                if (check) check.checked = true;
+            }
         }
         scTree.loadDatas(result.main.ledger);
         scPos.loadDatas(result.main.pos);

+ 2 - 1
app/view/stage/compare_modal.ejs

@@ -10,7 +10,8 @@
                 <table class="table table-sm">
                     <tr><th>审批人</th><th width="90">选择</th></tr>
                     <% for (const [i, a] of ctx.stage.auditors.entries()) { %>
-                    <% if (a.status === auditConst.status.checked || a.aid === ctx.session.sessionUser.accountId) { %>
+                    <% if (a.status === auditConst.status.checked || a.status === auditConst.status.checkNoPre ||
+                            (a.status === auditConst.status.checking && a.aid === ctx.session.sessionUser.accountId)) { %>
                     <tr auditorId="<%- a.aid %>"><td><%- a.name %></td><td><input type="checkbox" audit-order="<%- i + 1 %>"></td></tr>
                     <% } %>
                     <% } %>