report.html 8.13 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>
<style>
    table {
        white-space: normal;
    }
    /*table tr th{
        border: 1px solid #000000;
    }
    tbody tr td{
        border: 1px solid #000000;
    }*/
    .thClass{
        border: 1px solid #000000;
    }
    .tdClass{
        border: 1px solid #000000;
    }
</style>
<body class="white-bg" style="padding:5px 0;" id="ddd">
<div class="container" style="color: #333;">
    <div class="row">
        <table id="reportTable" width="98%" border="0" cellspacing="0" cellpadding="0" class="dy-report">
            <thead style="display:table-header-group;">
            <tr>
                <td colspan="5">
                    <span style="width:15%;float:left;padding-top: 0px;"><img id="logoimg" style="width:120px;"  th:src="@{/img/dl-logo.jpg}"></span>
                    <span style="width:76%;text-align:right;font-size:24px;float:left;padding-top:0px;">格林美(武汉)动力电池再生技术有限公司</span>
                </td>
                <td rowspan="2">
                    <span style="padding-top:0px;width:100%;float:right; text-align: right">
                        <img id="receiptCode" width="60px" th:src="@{'/image/'+${receiptHeader.code}}"></span>
                </td>
            </tr>
            <tr>
                <td colspan="6">

                    <span style="width:55%;text-align:right;font-size:24px;float:left;padding-top:0px;" th:text="${receiptHeader['receiptTypeName']}"></span>

                </td>
            </tr>
            <tr style="padding:15px 0 5px 0;">
                <td colspan="6">
                    <span style="width:20%; float:left;" th:text="${#dates.format(receiptHeader.created,'yyyy-MM-dd HH:mm:ss')}"></span>
                    <div style=" float:right; text-align:right">
                        <span>明细条数:<span th:text="${receiptHeader['totalLines']}"></span></span>
                    </div>
                </td>
            </tr>
            <tr style="padding:15px 0 5px 0;border-bottom:1px solid #606060">
                <td colspan="6">
                    <span style="width:100%;text-align:left">供应商:<span th:text="${receiptHeader['supplierName']}"></span></span>
                    <div style=" float:right; text-align:right">

                        <span style="padding-left:10px;">明细总数:<span th:text="${#numbers.formatInteger(receiptHeader['totalQty'],0)}"></span></span>
                        <span class="noprint" style="padding-left:20px;"><button type="button" onClick="a()"><i class="fa fa-print"></i> 打印</button></span>
                    </div>
                </td>
                <!--<td colspan="2">
                    <span>供应商:<span th:text="${receiptHeader['supplierName']}"></span></span>
                </td>
                <td colspan="2">
                    <span style=" float:left;" th:text="${#dates.format(receiptHeader.created,'yyyy-MM-dd HH:mm:ss')}"></span>
                </td>
                <td colspan="2">
                    <div style="width:100%; float:right; text-align:right">
                        <span>明细条数:<span th:text="${receiptHeader['totalLines']}"></span></span>
                        <span style="padding-left:10px;">明细总数:<span th:text="${receiptHeader['totalQty']}"></span></span>
                        <span class="noprint" style="padding-left:20px;"><button type="button" onClick="a()"><i class="fa fa-print"></i> 打印</button></span>
                    </div>
                </td>-->
            </tr>
            <tr >
                <th class="thClass">物料编码</th>
                <th class="thClass">物料名称</th>
                <th class="thClass">物料单位</th>
                <!--<th width="10%">批次</th>
                <th width="9%">批号</th>-->
                <!--<th width="">工程号</th>-->
                <th class="thClass">数量</th>
                <th class="thClass">磅单编号</th>
                <th class="thClass">电池类型</th>
                <!--<th width="">电池种类</th>
                <th width="">批号</th>-->
                <!--<th width="">供应商</th>-->
                <!--<th width="">国家编码</th>
                <th width="">回收人</th>
                <th width="">电池二维码</th>-->
                <!--<th width="21%">条码</th>-->
            </tr>
            </thead>
            <tbody>
            <tr th:each="row,rowStat : ${details}" >
                <td class="tdClass" th:text="${row.materialCode}"></td>
                <td class="tdClass" th:text="${row.materialName}"></td>
                <td class="tdClass" th:text="${row.materialUnit}"></td>
                <!--<td th:text="${row.batch}"></td>
                <td th:text="${row.lot}"></td>
                <td th:text="${row.projectNo}"></td>-->
                <td class="tdClass" th:text="${#numbers.formatInteger(row.qty,0)}"></td>
                <td class="tdClass" th:text="${row.poundCode}"></td>
                <td class="tdClass" th:text="${row.batteryTypesName}"></td>
                <!--<td th:text="${row.batteryPackTypeName}"></td>
                <td th:text="${row.lot}"></td>-->
               <!-- <td th:text="${row.companyName}"></td>-->
                <!--<td th:text="${row.countryCode}"></td>
                <td th:text="${row.recycler}"></td>
                <td><img width="80px" th:src="@{'/image/'+${row.batteryPackTwoCode}}"></td>-->
                <!--<td><img th:src="@{'/image/'+${row.materialCode}}"></td>-->
            </tr>
            </tbody>

            <tr>
                <td colspan="6">
                    <span style="width:28%;text-align:right;float:left;padding-top:10px;">仓管:</span>
                    <span style="width:38%;text-align:right;float:left;padding-top:10px;">审核:</span>
                </td>
            </tr>
        </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:40,//高度
        displayValue:true,//是否在条形码下方显示文字
        // text:"456",//覆盖显示的文本
        // fontOptions:"bold italic",//使文字加粗体或变斜体
        font:"monospace",//设置文本的字体fantasy
        textAlign:"center",//设置文本的水平对齐方式
        textPosition:"bottom",//设置文本的垂直位置
        textMargin:1,//设置条形码和文本之间的间距
        fontSize:12,//设置文本的大小
        background:"#ffffff",//设置条形码的背景
        lineColor:"#000000",//设置条和文本的颜色。
        margin:1//设置条形码周围的空白边距
    };
    function formatClearDecimal(v) {

    }
    // $("#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;}
    }
    .thClass{
        border: 1px solid #000000;
    }
    .tdClass{
        border: 1px solid #000000;
    }
    #logoimg{
        /*width:150px;*/
    }
</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>