    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="UTF-8">
        <title>出库单</title>
        <script type="text/javascript" src="static/easyui1552/jquery.min.js"></script>
        <style>
            caption{
                font-size:20px;
                font-weight:bold;
                margin-bottom:10px;
            }
            table,th,tr,td{
                border:1px solid black;
            	border-collapse: collapse;
            	text-align:center;
            	padding:10px;
            }
        </style>        
    </head>
    <body>
    <button onclick="doPrint()">打印</button>
    <p style="padding:10px;"></p>
    <!--startprint-->
    <table border="1" width="80%">
    <caption>出库单信息</caption>
    <thead>
        <tr>
            <td colspan="2" style="text-align:left;font-weight:bold;">拣货明细</td>
             <td colspan="3" style="text-align:left;">要货单：<?=$docouthead['docout_get_number']?></td>
              <td colspan="3" style="text-align:left;">出库单：<?=$docouthead['docout_number']?></td>
        </tr>
        <tr>
            <th>货品名称</th>	
            <th>货品编号</th>	
            <th>基本单位</th>
            <th>货品状态</th>
            <th>货品数量</th>
            <th>批注</th>
            <th>库存ID</th>
            <th>拣货定位</th>
        </tr>
    </thead>
    <tbody>
	<?php foreach ($docoutlist as $item): ?>
        <tr>
            <td><?=$item->goods_name?></td>
            <td><?=$item->goods_code?></td>
            <td><?=$item->goods_unit?></td>
            <td><?=$item->goods_status?></td>
            <td><?=$item->goods_nums?></td>
            <td><?=$item->goods_postil?></td>
            <td><?=$item->inventory_id?></td>
            <td><?=$item->block_name?></td>
        </tr>
    <?php endforeach; ?>    

                
    </tbody>
</table>

<!--endprint-->
</body>
<script>
    function doPrint() {
        bdhtml=window.document.body.innerHTML;
        sprnstr="<!--startprint-->"; //开始打印标识字符串有17个字符
        eprnstr="<!--endprint-->"; //结束打印标识字符串
        prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17); //从开始打印标识之后的内容
        prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr)); //截取开始标识和结束标识之间的内容
        window.document.body.innerHTML=prnhtml; //把需要打印的指定内容赋给body.innerHTML
        window.print(); //调用浏览器的打印功能打印指定区域
        window.document.body.innerHTML=bdhtml; // 最后还原页面
    }
</script>
    </html>