Browse Source

fix: 预付款审批弹窗退回上一级文案错误

lanjianrong 4 years ago
parent
commit
de4d20b081
1 changed files with 19 additions and 19 deletions
  1. 19 19
      app/view/advance/modal_audit.ejs

+ 19 - 19
app/view/advance/modal_audit.ejs

@@ -74,7 +74,7 @@
                         </div>
                     </div>
                     <div class="col-8 modal-height-500" style="overflow: auto">
-                        <% auditHistory.forEach((auditors, idx) => { %>
+                        <% auditHistory.forEach((history, idx) => { %>
                             <!-- 展开/收起历史流程 -->
                         <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
                             <div class="text-right">
@@ -84,7 +84,7 @@
                         <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
                             <div class="text-center text-muted"><%- idx+1 %>#</div>
                             <ul class="timeline-list list-unstyled mt-2">
-                                <% auditors.forEach((auditor, index) => { %>
+                                <% history.forEach((auditor, index) => { %>
                                 <% if (index === 0) { %>
                                 <li class="timeline-list-item pb-2">
                                     <div class="timeline-item-date">
@@ -112,7 +112,7 @@
                                     <div class="timeline-item-date">
                                         <%- ctx.helper.formatDate(auditor.end_time) %>
                                     </div>
-                                    <% if(index < auditors.length - 1) { %>
+                                    <% if(index < history.length - 1) { %>
                                     <div class="timeline-item-tail"></div>
                                     <% } %>
                                     <% if(auditor.status === auditConst.status.checked) { %>
@@ -156,7 +156,7 @@
                                     <div class="timeline-item-date">
                                         <%- ctx.helper.formatDate(auditor.end_time) %>
                                     </div>
-                                    <% if(index < auditors.length - 1) { %>
+                                    <% if(index < history.length - 1) { %>
                                     <div class="timeline-item-tail"></div>
                                     <% } %>
                                     <% if(auditor.status === auditConst.status.checked) { %>
@@ -184,7 +184,7 @@
                                                             class="pull-right
                                                                             <%- auditConst.statusClass[auditor.status] %>"><%- auditor.status !== auditConst.status.uncheck ? auditConst.statusString[auditor.status] : ''%>
                                                             <%- auditor.status === auditConst.status.checkNo ? advance.user.name : '' %>
-                                                            <%- auditor.status === auditConst.status.checkNoPre ? auditors[index-1].name : '' %>
+                                                            <%- auditor.status === auditConst.status.checkNoPre ? history[index-1].name : '' %>
                                                         </span>
                                                     </p>
                                                     <p class="text-muted mb-0"><%- auditor.role %></p>
@@ -253,7 +253,7 @@
                                 </div>
                             </div>
                             <div class="col-8 modal-height-500" style="overflow: auto">
-                                <% auditHistory.forEach((auditors, idx) => { %>
+                                <% auditHistory.forEach((history, idx) => { %>
                                     <!-- 展开/收起历史流程 -->
                                 <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
                                     <div class="text-right">
@@ -263,7 +263,7 @@
                                 <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
                                     <div class="text-center text-muted"><%- idx+1 %>#</div>
                                     <ul class="timeline-list list-unstyled mt-2">
-                                        <% auditors.forEach((auditor, index) => { %>
+                                        <% history.forEach((auditor, index) => { %>
                                         <% if (index === 0) { %>
                                         <li class="timeline-list-item pb-2">
                                             <div class="timeline-item-date">
@@ -291,7 +291,7 @@
                                             <div class="timeline-item-date">
                                                 <%- ctx.helper.formatDate(auditor.end_time) %>
                                             </div>
-                                            <% if(index < auditors.length - 1) { %>
+                                            <% if(index < history.length - 1) { %>
                                             <div class="timeline-item-tail"></div>
                                             <% } %>
                                             <% if(auditor.status === auditConst.status.checked) { %>
@@ -340,7 +340,7 @@
                                             <div class="timeline-item-date">
                                                 <%- ctx.helper.formatDate(auditor.end_time) %>
                                             </div>
-                                            <% if(index < auditors.length - 1) { %>
+                                            <% if(index < history.length - 1) { %>
                                             <div class="timeline-item-tail"></div>
                                             <% } %>
                                             <% if(auditor.status === auditConst.status.checked) { %>
@@ -368,7 +368,7 @@
                                                                     class="pull-right
                                                                                     <%- auditConst.statusClass[auditor.status] %>"><%- auditor.status !== auditConst.status.uncheck ? auditConst.statusString[auditor.status] : ''%>
                                                                     <%- auditor.status === auditConst.status.checkNo ? advance.user.name : '' %>
-                                                                    <%- auditor.status === auditConst.status.checkNoPre ? auditors[index-1].name : '' %>
+                                                                    <%- auditor.status === auditConst.status.checkNoPre ? history[index-1].name : '' %>
                                                                 </span>
                                                             </p>
                                                             <p class="text-muted mb-0"><%- auditor.role %></p>
@@ -445,7 +445,7 @@
                                 </div>
                             </div>
                             <div class="col-8 modal-height-500" style="overflow: auto">
-                                <% auditHistory.forEach((auditors, idx) => { %>
+                                <% auditHistory.forEach((history, idx) => { %>
                                     <!-- 展开/收起历史流程 -->
                                 <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
                                     <div class="text-right">
@@ -455,7 +455,7 @@
                                 <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
                                     <div class="text-center text-muted"><%- idx+1 %>#</div>
                                     <ul class="timeline-list list-unstyled mt-2">
-                                        <% auditors.forEach((auditor, index) => { %>
+                                        <% history.forEach((auditor, index) => { %>
                                         <% if (index === 0) { %>
                                         <li class="timeline-list-item pb-2">
                                             <div class="timeline-item-date">
@@ -483,7 +483,7 @@
                                             <div class="timeline-item-date">
                                                 <%- ctx.helper.formatDate(auditor.end_time) %>
                                             </div>
-                                            <% if(index < auditors.length - 1) { %>
+                                            <% if(index < history.length - 1) { %>
                                             <div class="timeline-item-tail"></div>
                                             <% } %>
                                             <% if(auditor.status === auditConst.status.checked) { %>
@@ -529,13 +529,13 @@
                                                                 <label class="form-check-label" for="inlineRadio1">退回原报
                                                                     <%- ctx.advance.user.name %></label>
                                                             </div>
-                                                            <% if (auditor.order > 1 && auditor.audit_id !== auditors[0].audit_id) { %>
+                                                            <% if (auditor.sort > 1 && auditor.audit_id !== history[0].audit_id) { %>
                                                             <div class="form-check form-check-inline">
                                                                 <input class="form-check-input" type="radio" name="checkType"
                                                                     id="inlineRadio2"
                                                                     value="<%- auditConst.status.checkNoPre %>">
                                                                 <label class="form-check-label" for="inlineRadio2">退回上一审批人
-                                                                    <%- auditors[index-1].name %></label>
+                                                                    <%- auditors.find(item => item.order === auditor.sort-1).name %></label>
                                                             </div>
                                                             <% } %>
                                                         </div>
@@ -553,7 +553,7 @@
                                             <div class="timeline-item-date">
                                                 <%- ctx.helper.formatDate(auditor.end_time) %>
                                             </div>
-                                            <% if(index < auditors.length - 1) { %>
+                                            <% if(index < history.length - 1) { %>
                                             <div class="timeline-item-tail"></div>
                                             <% } %>
                                             <% if(auditor.status === auditConst.status.checked) { %>
@@ -581,7 +581,7 @@
                                                                     class="pull-right
                                                                                     <%- auditConst.statusClass[auditor.status] %>"><%- auditor.status !== auditConst.status.uncheck ? auditConst.statusString[auditor.status] : ''%>
                                                                     <%- auditor.status === auditConst.status.checkNo ? advance.user.name : '' %>
-                                                                    <%- auditor.status === auditConst.status.checkNoPre ? auditors[index-1].name : '' %>
+                                                                    <%- auditor.status === auditConst.status.checkNoPre ? history[index-1].name : '' %>
                                                                 </span>
                                                             </p>
                                                             <p class="text-muted mb-0"><%- auditor.role %></p>
@@ -603,13 +603,13 @@
                                                                         <label class="form-check-label" for="inlineRadio1">退回原报
                                                                             <%- ctx.advance.user.name %></label>
                                                                     </div>
-                                                                    <% if (auditor.order > 1 && auditor.audit_id !== auditors[0].audit_id) { %>
+                                                                    <% if (auditor.sort > 1 && auditor.audit_id !== history[0].audit_id) { %>
                                                                     <div class="form-check form-check-inline">
                                                                         <input class="form-check-input" type="radio" name="checkType"
                                                                             id="inlineRadio2"
                                                                             value="<%- auditConst.status.checkNoPre %>">
                                                                         <label class="form-check-label" for="inlineRadio2">退回上一审批人
-                                                                            <%- auditors[index-1].name %></label>
+                                                                            <%- auditors.find(item => item.order === auditor.sort-1).name %></label>
                                                                     </div>
                                                                     <% } %>
                                                                 </div>