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

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

    <%- ctx.change.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) {%>
    <% } 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) {%>
    <% } else if(auditor.status === auditConst.status.checking) { %>
    <% } else { %>
    <% } %>

    <%- auditor.name %> <%- auditor.status !== auditConst.status.uncheck ? auditConst.statusString[auditor.status] : ''%> <%- auditor.status === auditConst.status.checkNo ? ctx.change.user.name : '' %>

    <%- auditor.role %>

    <% if (auditor.opinion) { %>

    <%- auditor.opinion %>

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