150 lines
4.5 KiB
HTML
150 lines
4.5 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
|
||
|
||
<head>
|
||
<meta charset="UTF-8"/>
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||
<title>物料老鼠图</title>
|
||
<style>
|
||
@page {
|
||
size: A4;
|
||
margin: 0;
|
||
}
|
||
|
||
body {
|
||
font-family: SimSun, serif;
|
||
font-size: 9pt;
|
||
padding: 10px;
|
||
margin: 0 auto;
|
||
max-width: 100%;
|
||
}
|
||
|
||
.logo {
|
||
text-align: center;
|
||
}
|
||
|
||
.logo img {
|
||
height: 40px;
|
||
padding: 10px;
|
||
}
|
||
|
||
table {
|
||
width: 100%;
|
||
border-collapse: collapse;
|
||
border: 1px solid #000;
|
||
}
|
||
|
||
td {
|
||
border: 1px solid #000;
|
||
padding: 7px;
|
||
}
|
||
|
||
tr:first-child td {
|
||
border-top: none;
|
||
}
|
||
|
||
tr:last-child td {
|
||
border-bottom: none;
|
||
}
|
||
|
||
td:first-child {
|
||
border-left: none;
|
||
}
|
||
|
||
td:last-child {
|
||
border-right: none;
|
||
border-bottom: none;
|
||
}
|
||
|
||
.data-item {
|
||
width: 33.16207%;
|
||
float: left;
|
||
border-right: 1px solid #000;
|
||
}
|
||
|
||
.data-item-row-first {
|
||
border-left: 1px solid #000;
|
||
}
|
||
|
||
.cell-img {
|
||
display: table-cell;
|
||
vertical-align: middle;
|
||
text-align: center;
|
||
padding: 10px;
|
||
height: auto;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.cell-img img {
|
||
vertical-align: middle; /* 防止图片底部留空隙 */
|
||
height: auto;
|
||
}
|
||
|
||
.cell {
|
||
border-bottom: 1px solid #000;
|
||
padding: 7px;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.cell1 {
|
||
border-bottom: 1px solid #000;
|
||
padding: 7px;
|
||
height: 25px;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.container {
|
||
page-break-after: always;
|
||
}
|
||
|
||
.container:last-child {
|
||
page-break-after: auto;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="container" th:each="page,pageStat : ${pages}">
|
||
<div class="logo"><img alt="" src="../img/logo1.png"/></div>
|
||
<table>
|
||
<tr>
|
||
<td>清单编号:<span th:text="${info.no}">12255665451615</span></td>
|
||
<td>机台编号:<span th:text="${info.deviceNo}">1111</span></td>
|
||
<td>物料编号:<span th:text="${info.materialNo}">12255665451615</span></td>
|
||
<!-- 二维码:右侧固定 + 跨3行 -->
|
||
<td style="width: 120px; text-align: right; vertical-align: middle;" rowspan="3">
|
||
<img alt="二维码" style="width: 100px; height: 100px;" th:src="${info.qrCode}" src="../img/logo1.png"/>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
|
||
<td>销售订单号:<span th:text="${info.soNo}">1</span></td>
|
||
<td>客户名称:<span th:text="${info.customerName}">12255665451615</span></td>
|
||
</tr>
|
||
<tr>
|
||
|
||
<td>下单日期:<span th:text="${info.orderDay}">1</span></td>
|
||
<td>总重:<span th:text="${info.weight}">348.41</span></td>
|
||
<td>页码:<span th:text="${pageStat.count}">1</span>/<span th:text="${pageStat.size}">2</span></td>
|
||
</tr>
|
||
</table>
|
||
<div class="data-item" th:each="item,itemStat : ${page.datas}"
|
||
th:classappend="${itemStat.index % 3 == 0} ? 'data-item-row-first'">
|
||
<div class="cell" style="height: 300px;">
|
||
<div class="cell-img">
|
||
<img style="width: 200px;height: 280px;" alt=""
|
||
th:src="${!#strings.isEmpty(item.image)} ? ${item.image} : (${#strings.isEmpty(item.materialNo)} ? '' : 'http://192.168.163.83:9090/nflg-wms/template/none.png')"/>
|
||
</div>
|
||
</div>
|
||
<div class="cell">SAP编码:<span th:text="${item.materialNo}">2222222222</span></div>
|
||
<div class="cell1">图号:<span
|
||
th:text="${item.drawingNo}">图号图号图号图号图号图号图号图号图号图号图号图号图号图号图号图号</span>
|
||
</div>
|
||
<div class="cell1">名称:<span
|
||
th:text="${item.materialDescribe}">名称名称名称名称名称名称名称名称名称名名称名名称名称名称称名称名称名称称名称名称名称</span>
|
||
</div>
|
||
<div class="cell">数量:<span th:text="${item.num}">1</span> 重量:<span
|
||
th:text="${item.weight}">348.41</span></div>
|
||
</div>
|
||
</div>
|
||
</body>
|
||
</html> |