<% 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="input-group input-group-sm mt-2">
                    <div class="input-group-prepend">
                        <span class="input-group-text" id="basic-addon1">表达式</span>
                    </div>
                    <input type="text" class="form-control m-0">
                </div>
            </div>
            <div class="ml-2">
                <button href="#row-view" class="btn btn-sm btn-light" data-toggle="modal" data-target="#row-view"><i class="fa fa-table"></i> 列显示</button>
            </div>
            <div class="ml-auto">
                <!--上报-->
                <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>
                <!--sjs 里调用变更令-->
                <a href="#use-bg" data-toggle="modal" data-target="#use-bg" class="bt btn-sm pull-right">调用变更令</a>
            </div>
        </div>
    </div>
    <div class="content-wrap pr-46">
        <div class="c-header p-0">
        </div>
        <div class="row w-100 sub-content">
            <div class="c-body col-8">
                <!--上部分-->
                <div class="sjs-height-1" id="stage-ledger">
                </div>
                <div id="main-resize" r-Type="height" div1="#stage-ledger" div2="#main-bottom" store-id="stage-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="#">部位明细</a>
                            </li>
                            <!--工程量清单模式操作-->
                            <% if (ctx.tender.data.measure_type === measureType.gcl) { %>
                            <li class="nav-item">
                                <div class="mt-1 ml-3">
                                    <a href="" class="btn btn-sm" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="插入"><i class="fa fa-sign-in" 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-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="" 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="" 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="" 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>
                            </li>
                            <% } %>
                        </ul>
                    </div>
                    <div class="sp-wrap" id="stage-pos">
                    </div>
                </div>
            </div>
            <div class="c-body col">
                <div class="tab-content">
                    <!--中间审批记录-->
                    <div id="spjilu" class="tab-pane active">
                        <div class="sjs-bar-1">
                            <table class="table table-bordered m-0">
                                <tr><th>清单编号</th><th>清单名称</th><th>上报数量</th></tr>
                                <tr><td>201-1</td><td>清理现场</td><td>10</td></tr>
                            </table>
                        </div>
                        <div class="sjs-sh-1">
                            <table class="table table-bordered">
                                <tr><th>审批人</th><th>审批数量</th><th>审批意见</th></tr>
                                <tr><td>张三</td><td>15</td><td>审批意见文本</td></tr>
                                <tr><td>王五</td><td>20</td><td>审批意见文本</td></tr>
                            </table>
                        </div>
                    </div>
                    <!--附件-->
                    <div id="fujian" class="tab-pane">
                        <div class="sjs-bar">
                            <ul class="nav nav-tabs">
                                <li class="nav-item">
                                    <a class="nav-link active" data-toggle="tab" href="#dqjiedian" role="tab">当前节点</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" data-toggle="tab" href="#syfujian" role="tab">所有附件</a>
                                </li>
                                <li class="nav-item ml-auto">
                                    <!--所有附件 翻页-->
                                    <a href="#"><i class="fa fa-chevron-left"></i></a> 1/10 <a href="#"><i class="fa fa-chevron-right"></i></a>
                                    <a href="#upload" data-toggle="modal" data-target="#upload"  class="btn btn-sm btn-outline-primary ml-3">上传</a>
                                </li>
                            </ul>
                        </div>
                        <div class="tab-content">
                            <div class="tab-pane active" id="dqjiedian">
                                <div class="sjs-height-3">
                                    <table class="table table-sm table-bordered table-hover">
                                        <tbody><tr><th>文件名</th><th width="80">上传</th></tr>
                                        <tr><td><a href="">asdasd.jpg</a></td><td>张三</td></tr>
                                        <tr><td><a href="">sd22d.jpg</a></td><td>张三</td></tr>
                                        </tbody></table>
                                </div>
                                <div class="sjs-bottom">
                                    <div class="tab-content">
                                        <div class="tab-pane active">
                                            <div class="sjs-bottom-2">
                                                <div class="d-flex justify-content-end mb-1">
                                                    <!--默认 有删除权限-->
                                                    <a href="#" class="btn btn-sm text-danger">删除</a>
                                                    <!--默认 有编辑权限-->
                                                    <a href="#" class="btn btn-sm btn-outline-primary">编辑</a>
                                                    <!--编辑模式-->
                                                    <a href="#" class="btn btn-sm btn-outline-success mr-1">保存</a>
                                                    <a href="#" class="btn btn-sm btn-outline-secondary">取消</a>
                                                </div>
                                                <!--显示信息-->
                                                <table class="table table-sm table-bordered">
                                                    <tbody>
                                                    <tr><th>文件名</th><td colspan="3">asdasd.jpg</td></tr>
                                                    <tr><th>所在节点</th><td colspan="3">1 第一部分 建筑安装工程非</td></tr>
                                                    <tr><td colspan="4"><a href="">下载附件</a></td></tr>
                                                    <tr><th>上传者</th><td>张三</td><th>上传时间</th><td>2018-10-20</td></tr>
                                                    <tr><th>备注</th><td colspan="3"></td></tr>
                                                    </tbody>
                                                </table>
                                                <!--编辑模式-->
                                                <div class="form-group">
                                                    <div class="input-group input-group-sm">
                                                        <div class="input-group-prepend">
                                                            <span class="input-group-text">文件名</span>
                                                        </div>
                                                        <input type="text" class="form-control" value="asdasd">
                                                        <div class="input-group-append">
                                                            <span class="input-group-text">.jpg</span>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <div class="input-group input-group-sm">
                                                        <div class="input-group-prepend">
                                                            <span class="input-group-text">所在节点</span>
                                                        </div>
                                                        <input type="text" class="form-control" value="1 第一部分 建筑安装工程非" readonly="">
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <div class="input-group input-group-sm">
                                                        <div class="input-group-prepend">
                                                            <span class="input-group-text">上传时间</span>
                                                        </div>
                                                        <input type="text" class="form-control" value="2018-10-20" readonly="">
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <div class="input-group input-group-sm">
                                                        <div class="input-group-prepend">
                                                            <span class="input-group-text">备注</span>
                                                        </div>
                                                        <input type="text" class="form-control" value="">
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label>替换文件</label>
                                                    <div class="custom-file">
                                                        <input type="file" class="custom-file-input" id="customFile">
                                                        <label class="custom-file-label" for="customFile">Choose file</label>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="tab-pane" id="syfujian">
                                <div class="sjs-height-3">
                                    <table class="table table-sm table-bordered table-hover">
                                        <tbody><tr><th>文件名</th><th width="80">上传</th></tr>
                                        <tr><td><a href="">asdasd.jpg</a></td><td>张三</td></tr>
                                        <tr><td><a href="">sd22d.jpg</a></td><td>张三</td></tr>
                                        </tbody></table>
                                </div>
                                <div class="sjs-bottom">
                                    <div class="tab-content">
                                        <div class="tab-pane active">
                                            <div class="sjs-bottom-2">
                                                <div class="d-flex justify-content-end mb-1">
                                                    <!--默认 有删除权限-->
                                                    <a href="#" class="btn btn-sm text-danger">删除</a>
                                                    <!--默认 有编辑权限-->
                                                    <a href="#" class="btn btn-sm btn-outline-primary">编辑</a>
                                                    <!--编辑模式-->
                                                    <a href="#" class="btn btn-sm btn-outline-success mr-1">保存</a>
                                                    <a href="#" class="btn btn-sm btn-outline-secondary">取消</a>
                                                </div>
                                                <!--显示信息-->
                                                <table class="table table-sm table-bordered">
                                                    <tbody>
                                                    <tr><th>文件名</th><td colspan="3">asdasd.jpg</td></tr>
                                                    <tr><th>所在节点</th><td colspan="3">1 第一部分 建筑安装工程非</td></tr>
                                                    <tr><td colspan="4"><a href="">下载附件</a></td></tr>
                                                    <tr><th>上传者</th><td>张三</td><th>上传时间</th><td>2018-10-20</td></tr>
                                                    <tr><th>备注</th><td colspan="3"></td></tr>
                                                    </tbody>
                                                </table>
                                                <!--编辑模式-->
                                                <div class="form-group">
                                                    <div class="input-group input-group-sm">
                                                        <div class="input-group-prepend">
                                                            <span class="input-group-text">文件名</span>
                                                        </div>
                                                        <input type="text" class="form-control" value="asdasd">
                                                        <div class="input-group-append">
                                                            <span class="input-group-text">.jpg</span>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <div class="input-group input-group-sm">
                                                        <div class="input-group-prepend">
                                                            <span class="input-group-text">所在节点</span>
                                                        </div>
                                                        <input type="text" class="form-control" value="1 第一部分 建筑安装工程非" readonly="">
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <div class="input-group input-group-sm">
                                                        <div class="input-group-prepend">
                                                            <span class="input-group-text">上传时间</span>
                                                        </div>
                                                        <input type="text" class="form-control" value="2018-10-20" readonly="">
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <div class="input-group input-group-sm">
                                                        <div class="input-group-prepend">
                                                            <span class="input-group-text">备注</span>
                                                        </div>
                                                        <input type="text" class="form-control" value="">
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label>替换文件</label>
                                                    <div class="custom-file">
                                                        <input type="file" class="custom-file-input" id="customFile">
                                                        <label class="custom-file-label" for="customFile">Choose file</label>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="side-menu">
            <!--右侧菜单-->
            <ul class="nav flex-column right-nav">
                <li class="nav-item">
                    <a class="nav-link active" data-toggle="tab" href="#spjilu" role="tab">审批记录</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" data-toggle="tab" href="#fujian" role="tab">附件</a>
                </li>
            </ul>
        </div>
    </div>
</div>
<script>
    GC.Spread.Sheets.LicenseKey = "559432293813965#A0y3iTOzEDOzkjMyMDN9UTNiojIklkI1pjIEJCLi4TPB9mM5AFNTd4cvZ7SaJUVy3CWKtWYXx4VVhjMpp7dYNGdx2ia9sEVlZGOTh7NRlTUwkWR9wEV4gmbjBDZ4ElR8N7cGdHVvEWVBtCOwIGW0ZmeYVWVr3mI0IyUiwCMzETN8kzNzYTM0IicfJye&Qf35VfiEzRwEkI0IyQiwiIwEjL6ByUKBCZhVmcwNlI0IiTis7W0ICZyBlIsIyNyMzM5ADI5ADNwcTMwIjI0ICdyNkIsIibj9SbvNmL4N7bjRnch56ciojIz5GRiwiI8+Y9sWY9QmZ0Jyp96uL9v6L0wap9biY9qiq95q197Wr9g+89iojIh94Wiqi";
</script>
<script>
    const ledgerSpreadSetting = JSON.parse('<%- JSON.stringify(ledgerSpread) %>');
    const posSpreadSetting = JSON.parse('<%- JSON.stringify(posSpread) %>');
    const tender = JSON.parse('<%- JSON.stringify(tender) %>');
    const measureType = JSON.parse('<%- JSON.stringify(measureType) %>');
    const stage = JSON.parse('<%- JSON.stringify(ctx.stage) %>');
    const ledgerData = JSON.parse('<%- JSON.stringify(ledgerData) %>');
    const curStageData = JSON.parse('<%- JSON.stringify(curStageData) %>');
</script>