Selaa lähdekoodia

多人协同,被审批人确认锁定提示调整

MaiXinRong 2 vuotta sitten
vanhempi
commit
8dbb29e3fd
1 muutettua tiedostoa jossa 9 lisäystä ja 8 poistoa
  1. 9 8
      app/public/js/stage.js

+ 9 - 8
app/public/js/stage.js

@@ -373,7 +373,14 @@ $(document).ready(() => {
                 html.push(`<tr>`);
             }
             html.push(`<td>${p.node.code}</td>`, `<td>${p.node.name}</td>`);
-            html.push('<td>', p.check ? `已解锁` : `<a name="ledger-unlock" lid="${p.ledger_id}" href="javascript: void(0);">解锁</a>`, '</td>');
+
+            let lockedHint = '';
+            const lockedInfo = stageTree.getLockedInfo(p.node);
+            if (lockedInfo.length > 0) {
+                const lockedUser = lockedInfo.map(x => { return  x.name; });
+                lockedHint = ` (审批人 ${lockedUser.join(',')} 确认通过)`;
+            }
+            html.push('<td>', p.check ? `已解锁` : `<a name="ledger-unlock" lid="${p.ledger_id}" href="javascript: void(0);">解锁</a>`, lockedHint, '</td>');
             html.push('<td>', p.company, '</td>');
             if (stage.status === auditConst.status.checking && !checkUsed(stageTree, stagePos, p.node)) {
                 html.push('<td>', '本期未计量', '</td>');
@@ -384,13 +391,7 @@ $(document).ready(() => {
             } else if (p.check && !p.confirm && !readOnly) {
                 html.push('<td>', `<a name="ledger-confirm" href="javascript: void(0);" lid="${p.ledger_id}" class="btn btn-sm btn-success">确认</a>`, '</td>');
             } else {
-                const lockedInfo = stageTree.getLockedInfo(p.node);
-                if (lockedInfo.length > 0) {
-                    const lockedUser = lockedInfo.map(x => { return  x.name; });
-                    html.push('<td>', `审批人 ${lockedUser.join(',')} 确认通过`, '</td>');
-                } else {
-                    html.push('<td>', '</td>');
-                }
+                html.push('<td>', '</td>');
             }
             html.push('</tr>');
         }