<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'>赠酒申报审批单 (No:{{no}})</span>
    <span class='input-group-btn'>
        <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'>
        <div class="logo_img" style="width:15%;margin-left:3%;">
                <img style="width:100%;margin-left:3%;" src="/media/logo/内参logo.png">
        </div>
        <p class='tt' style="text-align: center;font-size:22px;font-weight: 600">赠酒申报审批单
            <span style="font-size:18px">(No:{{no}})</span></p>
        <div>
            <span class='tt' style='font-size:20px;margin-right:20px;'>申请部门：{{o.department.name}}</span>
            <span class='tm pull-right'>申请时间：{{o.dt}}</span>
        </div>
        <table class="table" style='border-collapse: collapse;text-align: center;'>
            <tbody>
                <tr>
                    <td style='width:35%;' colspan="2">赠与单位名称</td>
                    <td colspan="3">{{o.entity}}</td>
                    <td colspan="1">核销数量</td>
                    <td colspan="1">{{qty| floatformat:'2'}}箱</td>
                </tr>
                <tr>
                    <td colspan="2">赠予人姓名</td>
                    <td colspan="3">{{o.receiver}}</td>
                    <td colspan="1">联系电话</td>
                    <td colspan="1">{{o.cellphone}}</td>
                </tr>
                <tr>
                    <td colspan="2">品&emsp;名</td>
                    <td colspan="3">规&emsp;格</td>
                    <td colspan="1">数量（瓶）</td>
                    <td colspan="1">折合件数</td>
                </tr>
                {% for p in products %}
                <tr>
                    <td colspan="2">{{p.name}} </td>
                    <td colspan="2">{{p.spec}} </td>
                    <td colspan="2">{{p.qty}}</td>
                    <td colspan="2">{{p.qty_x}}</td>
                </tr>
                {% endfor %}


            </tbody>
        </table>
        <div style="margin-left:2% ">
            <span class='tt' style='font-size:20px;margin-right:5%;'>部门审批：</span>
            <span class='tt' style='font-size:20px;margin-right:5%;'>分管领导：</span>
            <span class='tt' style='font-size:20px;margin-right:5%;'>总经理：</span>
        </div>
        <div style="margin-left:2% ">
            <span class='tt' style='font-size:20px;margin-right:5%;'>出库人：</span>
            <span class='tt' style='font-size:20px;margin-right:5%;'>领取签收：</span>
        </div>
    </div>
</div>
