210 lines
6.7 KiB
HTML
210 lines
6.7 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>出库单</title>
|
||
<style>
|
||
@page {
|
||
size: A4 portrait;
|
||
margin: 10mm;
|
||
}
|
||
@media print {
|
||
.no-print {
|
||
display: none;
|
||
}
|
||
.remask,.company-name{
|
||
border: none;
|
||
}
|
||
.page-break {
|
||
page-break-after: always; /* 在此元素后强制分页 */
|
||
break-after: page; /* 新的标准属性 */
|
||
}
|
||
|
||
.page-break-before {
|
||
page-break-before: always; /* 在此元素前强制分页 */
|
||
break-before: page;
|
||
}
|
||
|
||
.avoid-break {
|
||
page-break-inside: avoid; /* 避免在此元素内部分页 */
|
||
break-inside: avoid;
|
||
}
|
||
}
|
||
body {
|
||
font-family: Arial, sans-serif;
|
||
margin: 0;
|
||
padding: 0;
|
||
width: 210mm;
|
||
height: 148mm;
|
||
}
|
||
.container {
|
||
width: 100%;
|
||
margin: 0 auto;
|
||
padding: 5mm;
|
||
position: relative;
|
||
overflow: hidden;
|
||
}
|
||
.header {
|
||
text-align: center;
|
||
margin-bottom: 10px;
|
||
}
|
||
.logo{
|
||
width: 60mm;
|
||
top: 5mm;
|
||
position: absolute;
|
||
}
|
||
.remask{
|
||
margin-top: 10mm;
|
||
font-weight: bold;
|
||
width: 100%;
|
||
}
|
||
.company-name {
|
||
width: 100%;
|
||
text-align: center;
|
||
font-size: 22px;
|
||
font-weight: bold;
|
||
margin-bottom: 5px;
|
||
height: 7mm;
|
||
}
|
||
.document-title {
|
||
font-size: 24px;
|
||
font-weight: bold;
|
||
margin: 10px 0;
|
||
}
|
||
.document-info {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
margin-bottom: 15px;
|
||
font-size: 14px;
|
||
}
|
||
.document-no {
|
||
font-weight: bold;
|
||
}
|
||
.customer-info {
|
||
margin-bottom: 15px;
|
||
font-size: 14px;
|
||
}
|
||
table {
|
||
width: 100%;
|
||
border-collapse: collapse;
|
||
margin-bottom: 20px;
|
||
font-size: 12px;
|
||
}
|
||
th, td {
|
||
border: 1px solid #000;
|
||
padding: 8px 5px;
|
||
text-align: center;
|
||
}
|
||
th {
|
||
background-color: #f2f2f2;
|
||
font-weight: bold;
|
||
}
|
||
.signature-area {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
margin-top: 30px;
|
||
}
|
||
.signature {
|
||
width: 30%;
|
||
text-align: center;
|
||
font-size: 14px;
|
||
}
|
||
.barcode {
|
||
font-family: 'Libre Barcode 39', cursive;
|
||
font-size: 18px;
|
||
}
|
||
.product-name {
|
||
min-width: 120px;
|
||
}
|
||
.ercode{
|
||
width: 20mm;height: 20mm;position: absolute;right: 5mm;top: 5mm;
|
||
}
|
||
|
||
.no-print {
|
||
position: fixed;
|
||
top: 2cm;
|
||
right: 2cm;
|
||
text-align: center;
|
||
height: 20mm;
|
||
line-height: 20mm;
|
||
margin-top: 5mm;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
{foreach $list as $key=>$vo}
|
||
<div class="container">
|
||
<div class="header">
|
||
<input value="{$vo['title']}" class="company-name"/>
|
||
<div class="document-title">出库单</div>
|
||
</div>
|
||
<img src="http://ye4s.file.gzxunren.com/uploads/20250621/c3c9c6e9e6dcebcd8bbb032e7a90a275.jpg" class="logo"/>
|
||
<img class="ercode" src="/qrcode/build?text={$vo['code']}&label=&logo=0&labelalignment=center&foreground=%23000000&background=%23ffffff&size=300&padding=10&logosize=50&labelfontsize=14&errorcorrection=medium"></img>
|
||
<div class="document-info">
|
||
<div>出库单号:{$vo['newcode']}</div>
|
||
<div>NO:{$formattedDate}</div>
|
||
</div>
|
||
<div class="customer-info">
|
||
客户名称:{$vo['kfname']}
|
||
<span style="margin-left:2cm">地址:{$vo['ADDRESS']}</span>
|
||
<span style="float:right">出库方式:{$vo['POSTNAME']}</span>
|
||
</div>
|
||
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th width="15%">条码</th>
|
||
<th width="25%">商品名称</th>
|
||
<th width="10%">规格</th>
|
||
<th width="5%">单位</th>
|
||
<th width="5%">数量</th>
|
||
<th width="5%">单价</th>
|
||
<th width="5%">金额</th>
|
||
<th width="8%">批次号</th>
|
||
<th width="28%">备注</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
{foreach $vo["list"] as $r}
|
||
<tr>
|
||
<td class="barcode" contenteditable="true">{$r["BARCODE"]}</td>
|
||
<td class="product-name" contenteditable="true">{$r["NAME"]}</td>
|
||
<td contenteditable="true">{$r["STYLE"]}</td>
|
||
<td contenteditable="true"></td>
|
||
<td contenteditable="true">{$r["COUNT"]}</td>
|
||
<td contenteditable="true"></td>
|
||
<td contenteditable="true"></td>
|
||
<td contenteditable="true"></td>
|
||
<td contenteditable="true"></td>
|
||
</tr>
|
||
{/foreach}
|
||
</tbody>
|
||
</table>
|
||
|
||
<div class="signature-area">
|
||
<div class="signature">审核:________________</div>
|
||
<div class="signature">仓库:________________</div>
|
||
<div class="signature">签收:________________</div>
|
||
</div>
|
||
<textarea placeholder="备注" class="remask">{$vo['remask']}</textarea>
|
||
</div>
|
||
<div class="page-break"></div>
|
||
|
||
{/foreach}
|
||
|
||
<div class="no-print">
|
||
<button onclick="selectA5()">切换A5</button>
|
||
<button onclick="select3L()">切换三联</button>
|
||
<button onclick="window.print();">打印</button>
|
||
</div>
|
||
<script>
|
||
function selectA5() {
|
||
window.location.href = window.location.href.replace('/page/A4', '');
|
||
}
|
||
function select3L(){
|
||
window.location.href = window.location.href + '/page/3L';
|
||
}
|
||
</script>
|
||
</body>
|
||
</html> |