<!--审批通过-->
<div class="modal fade" id="sp-done" data-backdrop="static">
    <div class="modal-dialog" role="document">
        <form class="modal-content" action="/ledger/audit/check" method="post">
            <div class="modal-header">
                <h5 class="modal-title">审批通过</h5>
            </div>
            <div class="modal-body">
                <div class="card mt-3">
                    <ul class="list-group list-group-flush">
                        <% for (let i = 0, iLen = auditors.length; i < iLen; i++) { %>
                        <li class="list-group-item" auditorId="<%- auditors[i].audit_id %>">
                            <% if (auditors[i].status !== auditConst.status.uncheck) { %>
                            <span class="<%- auditConst.statusClass[auditors[i].status] %> pull-right"><%- auditConst.statusString[auditors[i].status] %></span>
                            <% } %>
                            <h5 class="card-title"><%- auditors[i].audit_order %> <%- auditors[i].name %> <small class="text-muted"><%- auditors[i].role %></small></h5>
                            <% if (auditors[i].status === auditConst.status.checked) { %>
                            <p class="card-text"><%- auditors[i].opinion %> <%- auditors[i].end_time ? auditors[i].end_time.toLocaleString() : '' %></p>
                            <% } else if (auditors[i].status === auditConst.status.checking) { %>
                            <div class="form-group">
                                <label>审批意见<b class="text-danger">*</b></label>
                                <textarea class="form-control" name="opinion"></textarea>
                            </div>
                            <% } %>
                        </li>
                        <% } %>
                    </ul>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                <input type="hidden" name="_csrf" value="<%= ctx.csrf %>" />
                <input type="hidden" name="checkType" value="<%= auditConst.status.checked %>" />
                <button type="submit" class="btn btn-success" >确认通过</button>
            </div>
        </form>
    </div>
</div>
<!--审批退回-->
<div class="modal fade" id="sp-back" data-backdrop="static">
    <div class="modal-dialog" role="document">
        <form class="modal-content" action="/ledger/audit/check" method="post">
            <div class="modal-header">
                <h5 class="modal-title">审批退回</h5>
            </div>
            <div class="modal-body">
                <div class="card mt-3">
                    <ul class="list-group list-group-flush">
                        <% for (let i = 0, iLen = auditors.length; i < iLen; i++) { %>
                        <li class="list-group-item" auditorId="<%- auditors[i].audit_id %>">
                            <% if (auditors[i].status !== auditConst.status.uncheck) { %>
                            <span class="<%- auditConst.statusClass[auditors[i].status] %> pull-right"><%- auditConst.statusString[auditors[i].status] %></span>
                            <% } %>
                            <h5 class="card-title"><%- auditors[i].audit_order %> <%- auditors[i].name %> <small class="text-muted"><%- auditors[i].role %></small></h5>
                            <% if (auditors[i].status === auditConst.status.checked) { %>
                            <p class="card-text"><%- auditors[i].opinion %> <%- auditors[i].end_time ? auditors[i].end_time.toLocaleString() : '' %></p>
                            <% } else if (auditors[i].status === auditConst.status.checking) { %>
                            <div class="form-group">
                                <label>审批意见<b class="text-danger">*</b></label>
                                <textarea class="form-control" name="opinion"></textarea>
                            </div>
                            <% } %>
                        </li>
                        <% } %>
                    </ul>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                <input type="hidden" name="_csrf" value="<%= ctx.csrf %>" />
                <input type="hidden" name="checkType" value="<%= auditConst.status.checkNo %>" />
                <button type="submit" class="btn btn-warning" >确认退回</button>
            </div>
        </form>
    </div>
</div>