report.html 7.71 KB
<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg" style="padding:3px 0;" id="ddd">
<div class="container" style="color: #333;">
    <div class="row">
        <div>
            <span class="noprint" style="padding-left:20%;"><button type="button" onClick="a()"><i
                    class="fa fa-print"></i> 打印</button></span>
        </div>
        <table id="reportTable" width="45%" align="center" border="1" cellspacing="0" cellpadding="0"
               style="margin-top: 3px;text-align: center;margin-left: 4px">
            <thead>
            <tr>
                <td colspan="2">
                    <h3 align="center" style="font-size: 14px">武汉动力电池再生技术有限公司<span
                            th:text="${vehicleReceipt['vehicleDocumentType']}"></span></h3>
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center">
                    <span>过磅单号:<span th:text="${vehicleReceipt['materialBatch']}"></span></span>
                </td>
            </tr>
            <div id="">
                <tr style="">
                    <td colspan="1" class="">
                        <span>创建时间</span>
                    </td>
                    <td colspan="1" class=" ">
                        <span th:text="${#dates.format(vehicleReceipt.created,'yyyy-MM-dd HH:mm:ss')}"></span>
                    </td>
                </tr>
                <tr style="">
                    <td colspan="1" class=" ">
                        <span>车牌号</span>
                    </td>
                    <td colspan="1" class=" ">
                        <span th:text="${vehicleReceipt['carNumber']}"></span>
                    </td>
                </tr>
                <tr style="">
                    <td colspan="1" class=" ">
                        <span>物料编码</span>
                    </td>
                    <td colspan="1" class=" ">
                        <span th:text="${vehicleReceipt['materialCode']}"></span>
                    </td>
                </tr>
                <tr style="">
                    <td colspan="1" class=" ">
                        <span>物料名称</span>
                    </td>
                    <td colspan="1" class=" ">
                        <span th:text="${vehicleReceipt['materialName']}"></span>
                    </td>
                </tr>
                <tr style="">
                    <td colspan="1" class=" ">
                        <span>规格型号</span>
                    </td>
                    <td colspan="1" class=" ">
                        <span th:text="${vehicleReceipt['materialSpec']}"></span>
                    </td>
                </tr>
                <tr style="">
                    <td colspan="1" class=" ">
                        <span>备注</span>
                    </td>
                    <td colspan="1" class=" ">
                        <span th:text="${vehicleReceipt['remark']}"></span>
                    </td>
                </tr>
                <tr style="">
                    <td colspan="1" class=" ">
                        <span>供应商</span>
                    </td>
                    <td colspan="1" class=" ">
                        <span th:text="${vehicleReceipt['supplier']}"></span>
                    </td>
                </tr>
                <tr style="">
                    <td colspan="1" class=" ">
                        <span>毛重</span>
                    </td>
                    <td colspan="1" class=" ">
                        <span th:text="${vehicleReceipt['grossWeight']}"></span>KG
                    </td>
                </tr>
                <tr style="">
                    <td colspan="1" class=" ">
                        <span>皮重</span>
                    </td>
                    <td colspan="1" class=" ">
                        <span th:text="${vehicleReceipt['tareWeight']}"></span>KG
                    </td>
                </tr>

                <tr style="">
                    <td colspan="1" class=" ">
                        <span>净重</span>
                    </td>
                    <td colspan="1" class=" ">
                        <span th:text="${vehicleReceipt['netWeight']}"></span>KG
                    </td>
                </tr>
                <tr style="">
                    <td colspan="1" class=" ">
                        <span>结算重量</span>
                    </td>
                    <td colspan="1" class=" ">
                        <span></span>KG
                    </td>
                </tr>
                <tr style="">
                    <td colspan="1" class=" ">
                        <span> 司磅员</span>
                    </td>
                    <td colspan="1" class=" ">
                        <span th:text="${vehicleReceipt['createdBy']}"></span>
                    </td>
                </tr>
                <tr style="">
                    <td colspan="1" class=" ">
                        <span> 监磅员</span>
                    </td>
                    <td colspan="1" class=" ">
                        <span></span>
                    </td>
                </tr>
                <tr style="">
                    <td colspan="1" class=" ">
                        <span>送/收货员</span>
                    </td>
                    <td colspan="1" class=" ">
                        <span></span>
                    </td>
                </tr>
            </div>
        </table>
    </div>
</div>
<div th:include="include :: footer"></div>
<script type="text/javascript" src="../../../js/barcode/JsBarcode.all.js"></script>
<script type="text/javascript" src="//static.runoob.com/assets/qrcode/qrcode.min.js"></script>
<script th:inline="javascript">

    var  barcodeStyle = {
        format: "CODE128",//选择要使用的条形码类型
        width:1,//设置条之间的宽度
        height:30,//高度
        displayValue:true,//是否在条形码下方显示文字
        // text:"456",//覆盖显示的文本
        // fontOptions:"bold italic",//使文字加粗体或变斜体
        font:"monospace",//设置文本的字体fantasy
        textAlign:"center",//设置文本的水平对齐方式
        textPosition:"bottom",//设置文本的垂直位置
        textMargin:1,//设置条形码和文本之间的间距
        fontSize:10,//设置文本的大小
        background:"#ffffff",//设置条形码的背景
        lineColor:"#000000",//设置条和文本的颜色。
        margin:1//设置条形码周围的空白边距
    };

    // $("#receiptCode").JsBarcode($("#receiptCode").attr("data"), barcodeStyle);

    // for (var i=0; i<$('#reportTable tbody tr').length; i++){
    //     var barcodeText = $("#reportTable tbody tr:eq("+ i +") td:eq(0)").innerText;
    //     $("#reportTable tbody tr:eq("+ i +") td:eq(6) canvas").JsBarcode("6666", barcodeStyle);
    // }

    // $('#reportTable tbody tr').each(function(i) {
    //     var barcodeText = $(this).children()[0].innerText;
    //     JsBarcode($(this).children()[6].querySelector("img"), barcodeText, barcodeStyle);
    // });
    //

</script>
<style type="text/css">
    @media print {
        .noprint {
            display: none;
        }
    }
    #tr td span {
        border: 1px solid #000000;
    }
    .{
        border: 1px solid #000000;
    }
</style>
<script type="text/javascript" src="../../../js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="../../../js/jquery.jqprint-0.3.js"></script>
<script type="text/javascript">
    function a(){
        $("#ddd").jqprint();
    }

</script>
</body>
</html>