审批流程
    <% auditors.forEach((item, idx) => { %> <% if (idx === 0) { %>
  • <%- item.name %> <%- item.role %> 原报
  • <% } else if(idx === auditors.length -1 && idx !== 0) { %>
  • <%- item.name %> <%- item.role %> 终审
  • <% } else {%>
  • <%- item.name %> <%- item.role %> <%= ctx.helper.transFormToChinese(idx) %>审
  • <% } %> <% }) %>
<% auditHistory.forEach((auditors, idx) => { %> <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
展开历史审批流程
<% } %>
<%- idx+1 %>#
    <% auditors.forEach((auditor, index) => { %> <% if (index === 0) { %>
  • <%- ctx.helper.formatDate(auditor.begin_time) %>

    <%- user.name %><%- idx !== 0 ? '重新' : '' %>上报审批

    <%- user.role %>

  • <%- ctx.helper.formatDate(auditor.end_time) %>
    <% if(index < auditors.length - 1) { %>
    <% } %> <% if(auditor.status === auditConst.status.checked) { %>
    <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
    <% } else if(auditor.status === auditConst.status.checking) { %>
    <% } else {%>
    <% } %>

    <%- auditor.name %><%- auditConst.statusString[auditor.status] %>

    <%- auditor.role %>

    <% if (auditor.opinion) { %>

    <%- auditor.opinion %>

    <% } %>
  • <% } else {%>
  • <%- ctx.helper.formatDate(auditor.end_time) %>
    <% if(index < auditors.length - 1) { %>
    <% } %> <% if(auditor.status === auditConst.status.checked) { %>
    <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
    <% } else if(auditor.status === auditConst.status.checking) { %>
    <% } else { %>
    <% } %>

    <%- auditor.name %> <%- auditor.status !== auditConst.status.uncheck ? auditConst.statusString[auditor.status] : ''%> <%- auditor.status === auditConst.status.checkNo ? user.name : '' %> <%- auditor.status === auditConst.status.checkNoPre ? auditors[index-1].name : '' %>

    <%- auditor.role %>

    <% if (auditor.opinion) { %>

    <%- auditor.opinion %>

    <% } %>
  • <% } %> <% }) %>
<% }) %>