<!--弹出新建台帐修订-->
<div class="modal fade" id="add-bg" data-backdrop="static">
    <form class="modal-dialog" role="document" action="<%- preUrl + '/revise/add' %>" method="post">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">新建修订</h5>
            </div>
            <div class="modal-body">
                <h5>创建修订后，本期计量将暂时锁定，锁定后本期计量无法计量和上报，需修订完成后，才能解锁。</h5>
            </div>
            <div class="modal-footer">
                <input type="hidden" name="_csrf" value="<%= ctx.csrf %>" />
                <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                <button type="submit" class="btn btn-primary">确定新建</button>
            </div>
        </div>
    </form>
</div>

<% if (ledgerRevise.length > 0 && (ledgerRevise[0].status === auditConst.status.uncheck || ledgerRevise[0].status === auditConst.status.checkNo) && ctx.session.sessionUser.accountId === ledgerRevise[0].uid) { %>
<!--弹出作废-->
<div class="modal fade" id="remove" data-backdrop="static">
    <form class="modal-dialog" role="document" action="<%- preUrl + '/revise/cancel' %>" method="post" onsubmit="return $('#cancel-confirm').val() === '修订作废';">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">作废修订</h5>
            </div>
            <div class="modal-body">
                <div class="alert alert-danger">
                    修订 已有数据，请谨慎操作；
                    <br>作废后，数据无法恢复，请谨慎操作；
                    <br>确认作废，请在以下输入框输入"&nbsp;&nbsp;&nbsp;<b>修订作废</b>&nbsp;&nbsp;&nbsp;"，再点击“确认作废”按钮。
                </div>
                <div class="form-group">
                    <input class="form-control" placeholder="" type="text" id="cancel-confirm">
                </div>
            </div>
            <div class="modal-footer">
                <input type="hidden" name="_csrf" value="<%= ctx.csrf %>" />
                <button type="button" class="btn btn-secondary" data-dismiss="modal" >取消</button>
                <button type="submit" class="btn btn-danger">确认作废</button>
            </div>
        </div>
    </form>
</div>
<% } %>