<style>
    .div-tb{
        margin-top:20px;
        height:150px;
        font-size:16px;
        color:black;
    }
    .div-tb table{
        width:100%;
    }
    .div-tb table td{
        height:50px;
    }

    .div-tb td img{
        height:100px;
    }

    #print-area .div-tb table tbody td{
        border: 1px solid black;
    }



    #pg-title .tt{
        color:black;
        font-weight:bold;
        font-size:20px;
        padding-right:20px;
    }
    table,tr,td{
        border:1px solid black;
    }

    td{
        position: relative;
    }
    td[class=first]:before{
        content: "";
        position: absolute;
        width: 1px;
        height:185px;
        top:0;
        left:0;
        background-color: black;
        display: block;
        transform: rotate(74.5deg);
        transform-origin: top;
    }

</style>

<script type="text/JavaScript" src="/static/js/jquery-print.min.js"></script>
<link rel="stylesheet" href="/static/css/print/inventorytickets.css" media="print">

<script type="text/javascript">
    $(document).ready(function(){

        $('.btn-print').click(function(){
            $("#print-area").print({
        	    globalStyles: false,
        	    mediaPrint: true,
        	    stylesheet: null,
        	    noPrintSelector: ".no-print",
        	    iframe: true,
        	    append: null,
        	    prepend: null,
        	    manuallyCopyFormValues: true,
        	    deferred: $.Deferred(),
        	    timeout: 750,
        	    title: null,
        	    doctype: '<!doctype html>'
	        });
        });
    });
</script>

<ol class="breadcrumb">
    <li>领用核销</li>
    <li>招待用酒审批</li>
</ol>
<div id='pg-title' style="display:flex;">
    <span class='tt'></span>
    <span class='input-group-btn pullright'>
        <a type="button" class='btn btn-primary btn-print'>
            <span class='glyphicon glyphicon-print' style='padding-right:5px;'>
        </span>打印</a>
    </span>
</div>

<div id='print-area'>


    <div class='div-tb'>
        <p class='tt' style="text-align: center;font-size:22px;font-weight: 600;">用酒申请单 (No:{{no}})</p>
        <table class="table" style='border-collapse: collapse;text-align: center;'>           
            <tbody>                
                <tr>
                    <td colspan="2" style='width:8%;'><b>总案流水号</b></td>
                    <td style='width:15%;'>{{o.schema_no}}</td>
                    <td colspan="2" style='width:8%;'><b>申请部门</b></td>
                    <td style='width:15%;'>{{o.department.name}}</td>
                    <td style='width:5%;'><b>申请人</b></td>
                    <td colspan="2" style='width:10%;'>{{o.staff.name}}</td>
                    <td style='width:10%;'><b>申请时间</b></td>
                    <td style='width:10%;'>{{o.dt}}</td>
                </tr>
                <tr>
                    <td colspan="2"><b>用酒原因</b></td>
                    <td colspan=6>{{o.reason}}</td>                    
                </tr>
                <tr>
                    <td colspan="2"><b>招待对象</b></td>
                    <td colspan="2">{{o.subject}}</td>    
                    <td colspan="2"><b>招待地点</b></td>
                    <td colspan="2">{{o.subject}}</td>  
                </tr>
                <tr>
                    <td colspan="8"><b>用酒明细</b></td>
                </tr>
                <tr>
                    <td colspan="2"><b>序号</b></td>
                    <td colspan="2"><b>品名</b></td>
                    <td colspan="2"><b>单位</b></td>
                    <td ><b>条码</b></td>
                    <td><b>扫码时间</b></td>
                </tr>
                
                {% for p in products %}
                <tr>
                    <td>{{ forloop.counter }}</td>
                    <td colspan="3">{{ p.name }} </td>
                    <td>{{p.spec}}</td>
                    <td colspan="2">{{p.label}}</td>
                    <td>{{p.time}}</td>
                </tr>
                {% endfor %}
                <tr>
                    <td colspan="2"><b>经办人</b></td>
                    <td></td>
                    <td><b>部门领导</b></td>
                    <td colspan="2"></td>
                    <td><b>总经理</b></td>
                    <td></td>
                </tr>

                <tr>
                    <td colspan="2"><b>出库人</b></td>
                    <td colspan="2"></td>
                    <td colspan="2"><b>领取签字</b></td>
                    <td colspan="2"></td>
                </tr>

            </tbody>
        </table>
        
    </div>
</div>
