<div class="contarl-box">
    <% if (ctx.stage.status === auditConst.status.uncheck) { %>
        <% if (ctx.session.sessionUser.accountId === ctx.stage.user_id) {%>
            <a href="javascript: void(0);" target="#sub-sp" class="btn btn-primary btn-sm btn-block">上报审批</a>
        <% } %>
    <% } else if (ctx.stage.status === auditConst.status.checking) { %>
        <% if (ctx.stage.curAuditor && ctx.stage.curAuditor.aid === ctx.session.sessionUser.accountId) { %>
            <a href="javascript: void(0);" target="#sp-done" class="btn btn-success btn-sm btn-block">审批通过</a>
            <a href="#sp-back" data-toggle="modal" data-target="#sp-back" class="btn btn-warning btn-sm btn-block">审批退回</a>
        <% } else { %>
            <a href="#sp-list" data-toggle="modal" data-target="#sp-list" class="btn btn-outline-secondary btn-sm btn-block">审批中</a>
        <% } %>
    <% } else if (ctx.stage.status === auditConst.status.checked) { %>
        <a href="#sp-list" data-toggle="modal" data-target="#sp-list" class="btn btn-outline-secondary btn-sm btn-block">审批完成</a>
    <% } else if (ctx.stage.status === auditConst.status.checkNo) { %>
        <a href="#sp-list" data-toggle="modal" data-target="#sp-list" class="btn btn-outline-warning btn-sm btn-block text-muted">审批退回</a>
        <% if (ctx.session.sessionUser.accountId === ctx.stage.user_id) { %>
            <a href="javascript: void(0);" target="#sp-list2" class="btn btn-primary btn-sm btn-block">重新上报</a>
        <% } %>
    <% } else if (ctx.stage.status === auditConst.status.checkNoPre) { %>
        <a href="#sp-list" data-toggle="modal" data-target="#sp-list" class="btn btn-outline-warning btn-sm btn-block text-muted">审批退回</a>
        <% if (ctx.session.sessionUser.accountId === ctx.stage.curAuditor.aid) { %>
            <a href="javascript: void(0);" target="#sp-done" class="btn btn-success btn-sm btn-block">审批通过</a>
            <a href="#sp-back" data-toggle="modal" data-target="#sp-back" class="btn btn-warning btn-sm btn-block">审批退回</a>
        <% } %>
    <% } %>
</div>
