优化发货单打印、增加签字区域

This commit is contained in:
syruan 2025-07-18 15:26:08 +08:00
parent b1ecee4575
commit 5290e52d8a
3 changed files with 110 additions and 14 deletions

View File

@ -143,4 +143,81 @@ body {
.page-content {
width: 100%;
}
/* 签字区域样式 */
#signature-box {
width: 100%;
margin-top: 30px;
flex-direction: column;
align-items: baseline;
justify-content: space-evenly;
}
.signature-table {
margin-top: 10px;
}
.signature-table td {
vertical-align: top;
padding: 15px 10px;
}
@media print {
@page {
margin: 0;
size: auto;
}
body {
margin: 0;
padding: 10px;
}
.layuimini-container {
height: auto !important;
min-height: auto !important;
max-height: none !important;
}
.layuimini-main {
height: auto !important;
min-height: auto !important;
max-height: none !important;
}
.layui-table-page {
display: none !important;
}
.no-print {
display: none !important;
}
/* 避免分页断裂 */
table {
page-break-inside: avoid;
}
/* 确保各个区块不会强制分页 */
#basic-box,
#supplier-box,
#file-box,
#fhjj-box,
#signature-box {
page-break-inside: avoid;
break-inside: avoid;
}
/* 调整打印时的高度 */
#plan-basic-box {
height: auto !important;
}
/* 签字区域打印样式 */
#signature-box {
page-break-inside: avoid;
break-inside: avoid;
margin-top: 20px;
}
}

View File

@ -218,17 +218,7 @@ function exportExcel() {
exportExcelUtil(url, '采购发货明细', JSON.stringify(params));
}
// 打印
function print() {
Print('#table-box', {
onStart: function () {
console.log('onStart', new Date())
},
onEnd: function () {
console.log('onEnd', new Date())
}
})
}
// 预览文件
function viewFile(obj) {
@ -265,10 +255,10 @@ function print() {
$("#main-box").print({
globalStyles: true,
mediaPrint: false,
stylesheet: '../../../css/aq_demand_plan/apply_plan_detail.css',
stylesheet: '../../../css/aq_demand_plan/send_out_detail.css',
noPrintSelector: ".no-print",
iframe: true,
append: null,
append: '<style>@page { margin: 0; size: auto; } @media print { @page { margin: 0; size: auto; } html { margin: 0; height: auto; } body { margin: 0; height: auto; } .layuimini-container { height: auto !important; } }</style>',
prepend: null,
manuallyCopyFormValues: true,
deferred: $.Deferred()

View File

@ -27,7 +27,7 @@
#detail-box img {
width: 50px;
height: 50pz;
height: 50px;
}
</style>
@ -173,6 +173,35 @@
</div>
</div>
</div>
<!-- 签字区域 -->
<div id="signature-box">
<div class="title layout">
<span style="font-weight:700;text-decoration:none;color:#409EFF;"></span>
<p>签字确认</p>
</div>
<div id="signature-table-box">
<table class="classTable signature-table">
<tr>
<td style="width: 25%; text-align: center; height: 80px;">
<div style="margin-bottom: 10px; font-weight: bold;">领料人</div>
<div style="border-bottom: 1px solid #000; height: 30px; margin: 0 10px;"></div>
</td>
<td style="width: 25%; text-align: center; height: 80px;">
<div style="margin-bottom: 10px; font-weight: bold;">制单人</div>
<div style="border-bottom: 1px solid #000; height: 30px; margin: 0 10px;"></div>
</td>
<td style="width: 25%; text-align: center; height: 80px;">
<div style="margin-bottom: 10px; font-weight: bold;">审核人</div>
<div style="border-bottom: 1px solid #000; height: 30px; margin: 0 10px;"></div>
</td>
<td style="width: 25%; text-align: center; height: 80px;">
<div style="margin-bottom: 10px; font-weight: bold;">出库人</div>
<div style="border-bottom: 1px solid #000; height: 30px; margin: 0 10px;"></div>
</td>
</tr>
</table>
</div>
</div>
</div>
</body>
<script src="../../../lib/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script>