<% include ../tender/tender_sub_menu.ejs %>
<div class="panel-content">
    <div class="panel-title">
        <div class="title-main d-flex justify-content-between">
            <div></div>
            <div>
                <% if (tender.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 (tender.ledger_status === auditConst.status.checking) { %>
                    <% if (curAuditor.audit_id === ctx.session.sessionUser.accountId) { %>
                        <a href="#sp-done" data-toggle="modal" data-target="#sp-done" class="btn btn-success btn-sm pull-right">审批通过</a>
                        <a href="#sp-back" data-toggle="modal" data-target="#sp-back" class="btn btn-warning btn-sm pull-right">审批退回</a>
                    <% } else {%>
                        <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 (tender.ledger_status === auditConst.status.checked) { %>
                <a href="#sp-list" data-toggle="modal" data-target="#sp-list" class="btn btn-outline-success btn-sm pull-right text-dark">审批通过</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 class="sjs-height-1" id="ledger-spread">
                </div>
                <% if (tender.measure_type === measureType.tz.value) { %>
                <div id="main-resize" r-Type="height" div1="#ledger-spread" div2="#main-bottom" store-id="audit-main" min="100"></div>
                <div class="bcontent-wrap" id="main-bottom">
                    <div class="bc-bar mb-1">
                        <ul class="nav nav-tabs">
                            <li class="nav-item">
                                <a class="nav-link active" href="javascript:void(0)">部位明细</a>
                            </li>
                        </ul>
                    </div>
                    <div class="sp-wrap" id="pos-spread">
                    </div>
                </div>
                <% } %>
            </div>
            <!--右栏-->
            <div class="c-body col-0" style="display: none;">
                <div class="tab-content">
                    <div id="deal-bills" class="tab-pane">
                        <div class="sjs-bar-1"></div>
                        <div class="sjs-sh-1" id="deal-bills-spread">
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--右侧菜单-->
        <div class="side-menu">
            <!--右侧菜单-->
            <ul class="nav flex-column right-nav">
                <li class="nav-item">
                    <a class="nav-link" href="javascript: void(0);" role="tab" content="#deal-bills">签约清单</a>
                </li>
            </ul>
        </div>
    </div>
</div>
<script type="text/javascript">
    const tender = JSON.parse('<%- JSON.stringify(tender) %>');
    const measureType = JSON.parse('<%- JSON.stringify(measureType) %>');
    let ledger = '<%- ledger %>';
    ledger = JSON.parse(ledger);
    let ledgerSpreadSetting = '<%- ledgerSpreadSetting %>';
    ledgerSpreadSetting = JSON.parse(ledgerSpreadSetting);
    let posSpreadSetting = JSON.parse('<%- posSpreadSetting %>');
</script>
<script>
    GC.Spread.Sheets.LicenseKey = "559432293813965#A0y3iTOzEDOzkjMyMDN9UTNiojIklkI1pjIEJCLi4TPB9mM5AFNTd4cvZ7SaJUVy3CWKtWYXx4VVhjMpp7dYNGdx2ia9sEVlZGOTh7NRlTUwkWR9wEV4gmbjBDZ4ElR8N7cGdHVvEWVBtCOwIGW0ZmeYVWVr3mI0IyUiwCMzETN8kzNzYTM0IicfJye&Qf35VfiEzRwEkI0IyQiwiIwEjL6ByUKBCZhVmcwNlI0IiTis7W0ICZyBlIsIyNyMzM5ADI5ADNwcTMwIjI0ICdyNkIsIibj9SbvNmL4N7bjRnch56ciojIz5GRiwiI8+Y9sWY9QmZ0Jyp96uL9v6L0wap9biY9qiq95q197Wr9g+89iojIh94Wiqi";
</script>