退料单、领料单签字打印区域调整

This commit is contained in:
syruan 2025-12-02 17:49:09 +08:00
parent 6aa406829c
commit 529142ed1c
3 changed files with 107 additions and 33 deletions

View File

@ -43,6 +43,7 @@ function getDetailsById() {
$('#phone').html(obj.phone);
$('#backTime').html(obj.backTime);
$('#remark').html(obj.remark);
$('#projectName').html(obj.projectName);
setFileTable(obj.fileList);
}
}
@ -355,22 +356,14 @@ function downLoadFile(obj) {
// 打印
function print() {
/* Print('#body', {
onStart: function () {
console.log('onStart', new Date())
},
onEnd: function () {
console.log('onEnd', new Date())
}
}) */
$("#main-box").print({
globalStyles: true,
mediaPrint: false,
noPrintSelector: ".no-print",
iframe: true,
append: null,
prepend: null,
manuallyCopyFormValues: true,
deferred: $.Deferred()
});
$("#main-box").print({
globalStyles: true,
mediaPrint: false,
noPrintSelector: ".no-print",
iframe: true,
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

@ -29,15 +29,65 @@
width: 50px;
height: 50px;
}
@media print {
.layui-table-page {
visibility: hidden;
}
/* 签字区域样式 */
#signature-box {
width: 100%;
margin-top: 30px;
flex-direction: column;
align-items: baseline;
justify-content: space-evenly;
}
.layui-table-cell{
width: 145px;
}
}
.signature-table {
margin-top: 10px;
}
.signature-table td {
vertical-align: top;
padding: 15px 10px;
}
@media print {
.layui-table-page {
visibility: hidden;
}
.layui-table-cell{
width: 145px;
}
/* 签字区域打印样式 */
#signature-box {
page-break-inside: avoid;
break-inside: avoid;
margin-top: 20px;
}
/* 确保各个区块不会强制分页 */
#basic-box,
#file-box,
#fhjj-box,
#signature-box {
page-break-inside: avoid;
break-inside: avoid;
}
.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;
}
.no-print {
display: none !important;
}
}
</style>
<body id="body">
@ -51,7 +101,7 @@
</div>
</div>
<div>
<button type="button" class="layui-btn layui-bg-blue no-print" onclick="print()">打印</button>
<button type="button" class="layui-btn layui-bg-blue no-print" onclick="print()">打印2</button>
</div>
</div>
<div id="basic-box">
@ -76,10 +126,12 @@
<td id="backTime"></td>
</tr>
<tr>
<th colspan="5">备注</th>
<th colspan="3">备注</th>
<th colspan="2">工程名称</th>
</tr>
<tr>
<td colspan="5" id="remark"></td>
<td colspan="3" id="remark"></td>
<td colspan="2" id="projectName"></td>
</tr>
</table>
</div>
@ -152,6 +204,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.7.1.min.js" charset="utf-8"></script>

View File

@ -182,6 +182,10 @@
<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>
@ -194,10 +198,6 @@
<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>