report.html 3.27 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <head th:include="include :: header"></head>
<title>文字</title>
<!--<link href="css/bootstrap.min.css" rel="stylesheet" />-->
<!--<link href="css/font-awesome.min.css" rel="stylesheet" />-->
<!--&lt;!&ndash;[if IE]>-->
<!--<link href="css/font-awesome-ie7.min.css" rel="stylesheet" />-->
<!--<![endif]&ndash;&gt;-->

<style type="text/css">
.table-bordered td,.table-bordered th{border:1px solid #000!important}
</style>
</head>

<body id="ddd">
<div style="width:60%; float:right; text-align:right">
    <span class="noprint" style="padding-left:20px;"><button type="button" onClick="a()"><i class="fa fa-print"></i> 打印</button></span>
</div>
    <div class="container" style=" width:320px;height:228px;">
       <span class="row">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="dy-report table table-bordered" >
      <caption style="font-size:18px;text-align:center; color:#000;">长沙华恒机器人系统有限公司</caption>
     <tbody>
        <tr>
        <td width="23%" scope="col">存货编码</td>
        <td colspan="2" scope="col" style="text-align:center">
            <span class="sb" th:text="${receiptDetail.materialCode}"></span>
        </td>
      </tr>
      <tr style="vertical-align:middle">
        <td>存货名称</td>
        <td width="41%" style="text-align:center">
            <span class="sb1" th:text="${material.name}"></span>
        </td>
          <td rowspan="3">
          <img width="36%" rowspan="3" align="center" valign="middle" style="vertical-align:middle; padding:4px;" />
              <span id="qrcode"></span>
          </td>
      </tr>
      <tr>
        <td>规格型号</td>
        <td style="text-align:center">
            <span class="sb2" th:text="${material.specification}"></span>
        </td>
        </tr>
      <tr>
        <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
        <td style="text-align:center">
            <!--<input name="" type="text" style="line-height:18px;  border:0; text-align:center;" th:text="${receiptDetail.qty}"/>-->
            <input id="qty" name="qty" th:field="*{receiptDetail.qty}" class="form-control sb3" type="text" style="text-align:center" />
        </td>
        </tr>
     </tbody>
    </table>
    </div>
</div>
<div th:include="include :: footer"></div>
<style type="text/css">
    @media print {
        .noprint{display:none;}
    }
</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" src="../../../js/qrcode/jquery-qrcode-0.14.0.min.js"></script>
<script type="text/javascript">
function a(){
	// $("#ddd").jqprint();
    window.print();
}
var code_text= $(".sb").text() +'/' + $(".sb1").text() + '/' + $(".sb2").text() + '/' +$(".sb3").val();
$("#qrcode").qrcode({
    text: code_text, //任意内容
    size:77
});
// console.log($("#sb").text());

$('table').each(function(i) {
    // $(this).html(table);
    // console.log($(".sb").text());
});

</script>

</body>
</html>