<% 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 class="d-inline-block">
                    <div class="form-group">
                        <button class="btn btn-sm btn-light text-primary" href="#choose" data-toggle="modal" data-target="#choose">设置生成规则</button>
                    </div>
                </div>
            </div>
            <div>
                <!--上报-->
                <a href="#sub-sp" data-toggle="modal" data-target="#sub-sp" class="btn btn-primary btn-sm pull-right">上报审批</a>
                <a href="#sub-sp2" data-toggle="modal" data-target="#sub-sp2" class="btn btn-primary btn-sm pull-right">重新上报</a>
                <!--状态显示-->
                <!-- <a href="#sp-list" data-toggle="modal" data-target="#sp-list" class="btn btn-outline-success btn-sm pull-right">审批完成</a>
                <a href="#sp-list" data-toggle="modal" data-target="#sp-list" class="btn btn-outline-secondary btn-sm pull-right">审批中</a>
                <a href="#sp-list" data-toggle="modal" data-target="#sp-list" class="btn btn-outline-warning btn-sm pull-right text-muted">审批退回</a> -->
                <!--审批操作-->
                <!-- <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> -->
            </div>
        </div>
    </div>
    <div class="content-wrap">
        <div class="c-header p-0">
        </div>
        <div class="row w-100 sub-content">
            <!--左栏-->
            <div class="c-body col-8">
                <!--上部分-->
                <div class="sjs-height-0">
                    <table class="table table-sm table-bordered">
                        <thead>
                        <tr><th>编号</th><th>中间计量表号</th><th>交工证书/凭证号</th><th>分部分项工程</th><th>本期计量数量/金额</th></tr>
                        </thead>
                        <tbody id="im-list">
                        </tbody>
                    </table>
                </div>
            </div>
            <!--右栏-->
            <div class="c-body col">
                <div class="side-bar-1 sjs-bar">
                    <ul class="nav nav-tabs">
                        <li class="nav-item">
                            <a class="nav-link active" data-toggle="tab" href="#zhongjian" role="tab">中间计量数据</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" data-toggle="tab" href="#xmujmx" role="tab">项目节明细</a>
                        </li>
                    </ul>
                </div>
                <div class="tab-content">
                    <div class="tab-pane active" id="zhongjian">
                        <div class="sjs-sh-1" style="overflow: auto;">
                            <div class="d-flex justify-content-end mt-1 mr-1">
                                <a href="#" class="btn btn-sm btn-outline-primary" id="edit-detail">编辑</a>
                                <a href="#" class="btn btn-sm btn-outline-success mr-1" id="save-detail">保存</a>
                                <a href="#" class="btn btn-sm btn-outline-secondary" id="cancel-detail">取消</a>
                            </div>
                            <div class="form-group">
                                <label>变更令号：</label>
                                <input class="form-control form-control-sm" type="text" readonly="" id="bgl-code">
                            </div>
                            <div class="form-group">
                                <label>部位：</label>
                                <input class="form-control form-control-sm" type="text" readonly="" value="" id="bw-name">
                            </div>
                            <div class="form-group">
                                <label>起始桩号：</label>
                                <input class="form-control form-control-sm" type="text" readonly="" value="" id="start-peg">
                            </div>
                            <div class="form-group">
                                <label>终止桩号：</label>
                                <input class="form-control form-control-sm" type="text" readonly="" value="" id="end-peg">
                            </div>
                            <div class="form-group">
                                <label>计量单元：</label>
                                <input class="form-control form-control-sm" type="text" readonly="" value="" id="unit-name">
                            </div>
                            <div class="form-group">
                                <label>图号：</label>
                                <input class="form-control form-control-sm" type="text" readonly="" value="" id="drawing-code">
                            </div>
                            <div class="form-group">
                                <label>计算式说明：</label>
                                <textarea class="form-control" readonly="" id="calc-memo"></textarea>
                            </div>
                            <div class="form-group">
                                <div class="d-flex justify-content-between my-3">
                                    <label>计算草图：</label>
                                    <a href="#edit-img" data-toggle="modal" data-target="#edit-img" id="modify-img">添加草图</a>
                                </div>
                                <p id="calc-img"><img src="" class="d-100" width="100%"></p>
                            </div>
                        </div>
                    </div>
                    <div class="tab-pane" id="xmujmx">
                        <div class="sjs-sh-1" style="overflow: auto;">
                            <div class="sjs-height-3">
                                <table class="table table-bordered">
                                    <tr><th>编号</th><th>名称</th></tr>
                                    <tr><td>1-4-1-5-1</td><td>桥台桩基础</td></tr>
                                    <tr><td>1-4-1-5-2</td><td>桥台桩基础</td></tr>
                                </table>
                            </div>
                            <div class="sjs-bottom">
                                <ul class="nav nav-tabs">
                                    <li class="nav-item">
                                        <a class="nav-link active">部位明细</a>
                                    </li>
                                </ul>
                                <div class="tab-content">
                                    <div class="tab-pane active">
                                        <div class="sjs-bottom-2">
                                            <table class="table table-sm table-bordered">
                                                <tr><th>部位</th><th>台帐数量</th><th>本期计量数量</th></tr>
                                                <tr><td>0#桥台1#桩</td><td>126</td><td>40</td></tr>
                                                <tr><td>0#桥台2#桩</td><td>126</td><td>40</td></tr>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    GC.Spread.Sheets.LicenseKey = "559432293813965#A0y3iTOzEDOzkjMyMDN9UTNiojIklkI1pjIEJCLi4TPB9mM5AFNTd4cvZ7SaJUVy3CWKtWYXx4VVhjMpp7dYNGdx2ia9sEVlZGOTh7NRlTUwkWR9wEV4gmbjBDZ4ElR8N7cGdHVvEWVBtCOwIGW0ZmeYVWVr3mI0IyUiwCMzETN8kzNzYTM0IicfJye&Qf35VfiEzRwEkI0IyQiwiIwEjL6ByUKBCZhVmcwNlI0IiTis7W0ICZyBlIsIyNyMzM5ADI5ADNwcTMwIjI0ICdyNkIsIibj9SbvNmL4N7bjRnch56ciojIz5GRiwiI8+Y9sWY9QmZ0Jyp96uL9v6L0wap9biY9qiq95q197Wr9g+89iojIh94Wiqi";
</script>
<script>
    const stage = JSON.parse('<%- JSON.stringify(ctx.stage) %>');
    const imType = JSON.parse('<%- JSON.stringify(imType) %>');
</script>