<div class="panel-content">
    <div class="panel-title fluid">
        <div class="title-main  d-flex justify-content-between"><!--工具-->
            <div>
                <div class="btn-group">
                    <a href="" class="btn btn-sm" data-toggle="tooltip" data-placement="bottom" title=""
                       data-original-title="复制"><i class="fa fa-files-o" aria-hidden="true"></i></a>
                    <a href="" class="btn btn-sm" data-toggle="tooltip" data-placement="bottom" title=""
                       data-original-title="剪切"><i class="fa fa-scissors" aria-hidden="true"></i></a>
                    <a href="" class="btn btn-sm" data-toggle="tooltip" data-placement="bottom" title=""
                       data-original-title="粘贴"><i class="fa fa-clipboard" aria-hidden="true"></i></a>
                    <a href="javascript:void(0)" id="delete" class="btn btn-sm" data-toggle="tooltip" data-placement="bottom" title=""
                       data-original-title="删除"><i class="fa fa-remove" aria-hidden="true"></i></a>
                    <a href="javascript:void(0)" id="up-level" class="btn btn-sm" data-toggle="tooltip" data-placement="bottom" title=""
                       data-original-title="升级"><i class="fa fa-arrow-left" aria-hidden="true"></i></a>
                    <a href="javascript:void(0)" id="down-level" class="btn btn-sm" data-toggle="tooltip" data-placement="bottom" title=""
                       data-original-title="降级"><i class="fa fa-arrow-right" aria-hidden="true"></i></a>
                    <a href="javascript:void(0)" id="down-move" class="btn btn-sm" data-toggle="tooltip" data-placement="bottom" title=""
                       data-original-title="下移"><i class="fa fa-arrow-down" aria-hidden="true"></i></a>
                    <a href="javascript:void(0)" id="up-move" class="btn btn-sm" data-toggle="tooltip" data-placement="bottom" title=""
                       data-original-title="上移"><i class="fa fa-arrow-up" aria-hidden="true"></i></a>
                </div>
                <div class="btn-group">
                    <div class="form-check-inline">
                        <label class="form-check-label">
                            <input type="checkbox" class="form-check-input">
                            审批过程
                        </label>
                    </div>
                    <div class="form-check-inline">
                        <label class="form-check-label">
                            <input type="checkbox" class="form-check-input">
                            台帐变更
                        </label>
                    </div>
                    <div class="form-check-inline">
                        <label class="form-check-label">
                            <input type="checkbox" class="form-check-input">
                            变更令
                        </label>
                    </div>
                </div>
            </div>
            <div>
                <% if (tenderData.ledger_status === auditConst.status.checkNo) { %>
                    <a href="#sp-list" data-toggle="modal" data-target="#sp-list" class="btn btn-outline-warning btn-sm pull-right text-dark">报审退回</a>
                <% } else if (tenderData.ledger_status === auditConst.status.checking) { %>
                    <a href="#sp-list" data-toggle="modal" data-target="#sp-list" class="btn btn-outline-warning btn-sm pull-right text-dark">审批中</a>
                <% } else if (tenderData.ledger_status === auditConst.status.checked) { %>
                    <a href="#sp-list" data-toggle="modal" data-target="#sp-list" class="btn btn-outline-secondary btn-sm pull-right">审批完成</a>
                <% } %>
                <% if (ctx.session.sessionUser.accountId === tenderData.user_id) { %>
                    <% if (tenderData.ledger_status === auditConst.status.uncheck) { %>
                        <a href="#sub-sp" data-toggle="modal" data-target="#sub-sp" class="btn btn-primary btn-sm pull-right">上报审批</a>
                    <% } else if (tenderData.ledger_status === auditConst.status.checkNo) { %>
                        <a href="#sub-sp" data-toggle="modal" data-target="#sub-sp2" class="btn btn-primary btn-sm pull-right">重新上报</a>
                    <% } %>
                <% } %>
            </div>
        </div>
    </div>
    <div class="content-wrap row pr-46">
        <div class="c-header p-0 col-12">
        </div>
        <!--核心内容（两栏）-->
        <div class="row w-100 sub-content">
            <!--左栏-->
            <div class="c-body col-12">
                <div id="ledger-spread" class="sjs-height-1"></div>
            </div>
            <div class="c-body col-0" style="display: none;">
                <div class="tab-content">
                    <div id="std-chapter" class="tab-pane active">
                        <select class="form-control form-control-sm"><option>0号计量台帐部位参考(项目节)</option></select>
                        <div id="std-chapter-spread" class="sjs-height-2">
                        </div>
                    </div>
                    <div id="std-bills" class="tab-pane">
                        <select class="form-control form-control-sm"><option>0号计量台帐部位参考(项目节)</option></select>
                        <div id="std-bills-spread" class="sjs-height-2">
                        </div>
                    </div>
                    <div id="deal-bills" class="tab-pane">
                        <a href="#upload-deal" data-toggle="modal" data-target="#upload-deal" class="btn btn-sm btn-primary">上传签约清单</a>
                        <div id="deal-bills-spread" class="sjs-height-2">
                        </div>
                    </div>
                    <% if (tenderData.ledger_status !== auditConst.status.uncheck) { %>
                    <div id="opinion" class="tab-pane">
                        <div class="side-bar">
                            <select class="form-control form-control-sm">
                                <% for (const a of auditors) { %>
                                <option value="<%- a.audit_id %>"><%- a.name %></option>
                                <% } %>
                            </select>
                        </div>
                        <div class="sjs-height-2" style="overflow:auto">
                            <legend><%- auditors[0].name %> 清单意见</legend>
                            <% for (const c of content) { %>
                            <div name="auditContent" class="card my-3">
                                <div class="card-body">
                                    <table class="table table-sm table-bordered mb-2">
                                        <% const bills = JSON.parse(c.rela_bills); %>
                                        <% for (const b of bills) { %>
                                        <tr bid="<%- b.ledger_id %>"><td><%- b.code ? b.code : b.b_code %></td><td><%- b.name %></td></tr>
                                        <% } %>
                                    </table>
                                    <p><%- c.content %></p>
                                    <span class="text-muted"><%- c.in_time.toLocaleString() %></span>
                                </div>
                            </div>
                            <% } %>
                        </div>
                    </div>
                    <% } %>
                </div>
            </div>
        </div>
        <!--右侧菜单-->
        <div class="side-menu">
            <ul class="nav flex-column right-nav" id="side-menu">
                <li class="nav-item">
                    <a class="nav-link" content="#std-chapter" href="javascript: void(0);">项目节</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" content="#std-bills" href="javascript: void(0);">工程量清单</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" content="#deal-bills" href="javascript: void(0);">签约清单</a>
                </li>
                <% if (tenderData.ledger_status !== auditConst.status.uncheck) { %>
                <li class="nav-item">
                    <a class="nav-link" content="#opinion" href="javascript: void(0);">清单意见</a>
                </li>
                <% } %>
            </ul>
        </div>
    </div>
</div>
<script type="text/javascript">
    let ledger = '<%- ledger %>';
    ledger = JSON.parse(ledger);
    let ledgerSpreadSetting = '<%- ledgerSpreadSetting %>';
    ledgerSpreadSetting = JSON.parse(ledgerSpreadSetting);
    ledgerSpreadSetting.readOnly = <%- tenderData.user_id !== ctx.session.sessionUser.accountId || tenderData.ledger_status === auditConst.status.checking || tenderData.ledger_status === auditConst.status.checked %>;
</script>
<script src="/public/js/spreadjs/sheets/gc.spread.sheets.all.10.0.1.min.js"></script>
<script>
    GC.Spread.Sheets.LicenseKey = "559432293813965#A0y3iTOzEDOzkjMyMDN9UTNiojIklkI1pjIEJCLi4TPB9mM5AFNTd4cvZ7SaJUVy3CWKtWYXx4VVhjMpp7dYNGdx2ia9sEVlZGOTh7NRlTUwkWR9wEV4gmbjBDZ4ElR8N7cGdHVvEWVBtCOwIGW0ZmeYVWVr3mI0IyUiwCMzETN8kzNzYTM0IicfJye&Qf35VfiEzRwEkI0IyQiwiIwEjL6ByUKBCZhVmcwNlI0IiTis7W0ICZyBlIsIyNyMzM5ADI5ADNwcTMwIjI0ICdyNkIsIibj9SbvNmL4N7bjRnch56ciojIz5GRiwiI8+Y9sWY9QmZ0Jyp96uL9v6L0wap9biY9qiq95q197Wr9g+89iojIh94Wiqi";
</script>
<script src="/public/js/spreadjs_rela/spreadjs_zh<%= min %>.js"></script>
<script src="/public/js/spreadjs_rela/extend_celltype.js"></script>
<script src="/public/js/path_tree<%= min %>.js"></script>
<script src="/public/js/ledger.js"></script>