{extend name="common/common2" /}
{block name="main"}
<style>
    .test-paper {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .test-paper-title {
        font-size: 24px;
        font-weight: bold;
    }
    .test-paper-user {
        font-size: 14px;
        margin-left: 100px;
        margin-top: 20px;
    }
    .title-text {
        font-size: 18px;
        font-weight: 600;
        margin-top: 30px;
    }
    .sub_title{
        font-size: 16px;
        font-weight: 600;
        margin-left: 20px;
        margin-bottom: 10px;
    }
    .sub_sub_title{
        font-size: 16px;
        font-weight: 500;
        margin-left: 20px;
        margin-bottom: 5px;
        margin-top: 5px;
    }
    .sub_sub_scored_box{
        font-size: 15px;
        margin-left: 30px;
        margin-top: 8px;
        margin-bottom: 8px;
    }
    .sub_sub_scored{

    }
    .sub_sub_reason{
        margin-left: 50px;
    }
    .create_time{
        text-align: right;
        margin-right: 100px;
        font-size: 16px;
        margin-top: 30px;
        margin-bottom: 50px;
    }
</style>
</style>
<div class="row">
    <div class="col-sm-12">
        <div class="ibox float-e-margins">

            <div class="ibox-content">

                <div class="ibox-tools">
                    <a onclick="window.history.back()" class="toback">返回上一页</a>
                </div>

                <div id="printer" style="margin-top: 30px;border: 1px solid #f1f1f1;padding: 10px">
                    <h2 style="text-align: center">{$info['supervise_title']}</h2>
<!--                    <h4 style="text-align: right">提交人:{$info['user_name']}</h4>-->
                    <table class="table table-bordered">
                        <thead>
                        <tr>
                            <th colspan="2" style="width:20%">考核目标</th>
                            <th style="width:120px">评分标准</th>
                            <th style="width:120px">考核标准</th>
                            <th style="width:50px">分值</th>
                            <th style="width:50px">得分</th>
                            <th style="width:50px">扣分</th>
                            <th style="width:60px">扣分原因</th>
                            <th style="width:80px">图片</th>
                        </tr>
                        </thead>
                        <tbody>
                        {foreach $arr as $k=>$v}
                        <tr>
                            {if condition="$v['title1']"}
                            <td rowspan="{$v['num1']}">{$v['title1']}</td>
                            {/if}
                            {if condition="$v['title2']"}
                            <td style="width:10%" rowspan="{$v['num2']}">{$v['title2']}</td>
                            <td style="width:10%" rowspan="{$v['num2']}">{$v['standard']}</td>
                            {/if}
                            <td style="width:15%">{$v['title3']}</td>
                            <td>{$v['score']}</td>
                            {if condition="$v['title2']"}
                             <td rowspan="{$v['num2']}">{$v['score_dec']}</td>
                              <td rowspan="{$v['num2']}">{$v['scored']}</td>
                            <td rowspan="{$v['num2']}" style="width:10%">{$v['reason']}</td>
                            <td rowspan="{$v['num2']}" style="width:20%">
                                {if condition = "$v['img']"}
                                {foreach $v['img'] as $kk=>$vv}
                                    <img src="{$vv}" alt="" width="50px" height="50px" onclick="open_img(this)">
                                {/foreach}
                                {/if}
                            </td>
                            {/if}
                        </tr>
                        {/foreach}
                        </tbody>
                    </table>
                    <h5 style="text-align: right">提交时间:{$info['create_time']} <text style="margin-left: 30px">总分:{$info['score1']}</text> <text style="margin-left: 30px">得分:{$info['score2']}</text> <text style="margin-left: 30px">扣分:{$info['score']}</text> <text style="margin-left: 30px">提交人:{$info['user_name']}</text>  </h5>
                </div>


                <div class="text-center">
                    <br>
                    <a href="javascript:;" class="btn btn-sm btn-primary" onclick="print()"><i class="glyphicon glyphicon-print"> 打印</i></a>
                </div>

            </div>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script src="/static/bootstrap-multiselect/docs/js/jquery-2.1.3.min.js"></script>
<script src="/static/browser.js"></script>
<script src="/static/jquery.jqprint-0.3.js"></script>
<script>
    function print(){
        $("#printer").jqprint();
    }

</script>
{/block}