61 lines
2.0 KiB
HTML
61 lines
2.0 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
|
|
<head>
|
|
<meta charset="UTF-8"/>
|
|
<title>普通物料标签</title>
|
|
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
|
<style>
|
|
@page {
|
|
size: A4;
|
|
margin: 5mm; /* 关键!清除默认页边距 */
|
|
}
|
|
@media print {
|
|
body {
|
|
font-size: 9pt;
|
|
}
|
|
}
|
|
body {
|
|
font-family: SimSun, Arial, sans-serif;
|
|
font-size: 9pt;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
table {
|
|
margin: 3px;
|
|
border-collapse: collapse;
|
|
}
|
|
table, th, td {
|
|
border: 1px solid #000;
|
|
}
|
|
|
|
.title {
|
|
text-align: center;
|
|
display: table-cell;
|
|
vertical-align: middle;
|
|
}
|
|
.div-with-border {
|
|
border-bottom: 1px solid #000;
|
|
padding: 5px;
|
|
width: 200px;
|
|
text-align: left;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<table th:each="item, iterStat : ${list}" th:style="${iterStat.index == 0} ? 'page-break-before: auto;' : 'page-break-before: always;'">
|
|
<tr>
|
|
<td style="width: 150px;text-align: center;padding: 5px;">
|
|
<img height="120" th:src="${item.qrCode}" width="120"/>
|
|
<div th:text="${item.printNo}">20250227100950-0</div>
|
|
</td>
|
|
<td style="width: 200px;text-align: left;vertical-align: top">
|
|
<div class="title div-with-border"><img alt="logo" height="20" src="../../img/logo2.png" style="margin-right: 5px;" /></div>
|
|
<div class="div-with-border">SAP编码: <span th:text="${item.materialNo}"></span></div>
|
|
<div class="div-with-border">名称: <span th:text="${item.materialDesc}"></span></div>
|
|
<div class="div-with-border">数量: <span th:text="${item.printNum}"></span></div>
|
|
<div style="padding: 5px;">批次号: <span th:text="${item.batchNo}"></span></div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html> |