修复线上pdf版本报告变形

This commit is contained in:
mgw
2025-03-24 13:35:43 +08:00
parent e7b4f51736
commit 85789d137b

View File

@@ -31,7 +31,7 @@
<!-- 定义页脚模板 -->
<template id="report_quality_footer">
<div class="footer">
<div style="border-top: 2px solid black;"></div>
<div style="border-top: 3px solid black;"></div>
<div class="row">
<div class="col-6">
@@ -44,10 +44,10 @@
<p>加工工厂: <span t-field="o.company_id.factory_name"/></p>
</div>
</div>
<div style="border-top: 2px solid black;"></div>
<!-- <div class="text-center">
<!-- <div style="border-top: 2px solid black;"></div> -->
<div class="text-center">
<span><span class="page"/> 页/共 <span class="topage"/></span>
</div> -->
</div>
</div>
</template>
<template id="report_quality_inspection">
@@ -57,7 +57,7 @@
<t t-call="sf_quality.report_quality_header"/>
<div class="page">
<div class="page" style="min-height: 800px; position: relative; padding-bottom: 150px;">
<table class="table table-sm o_main_table mt-4" style="border: 1px solid black;">
<tr>
@@ -117,36 +117,35 @@
<img src="/sf_quality/static/img/pass.png" style="width: 200px; height: 200px;position: absolute; bottom: 20px; right: 20%;"/>
</div>
<div class="row mt-4">
<div class="col-12">
<h5 style="font-size: 18px;">检验结论:
<span t-if="o.report_result == 'OK'" style="margin-left: 30px;">
<svg width="20" height="20" style="vertical-align: -3px;">
<rect x="1" y="1" width="18" height="18" fill="none" stroke="black" stroke-width="1.5"/>
<path d="M4 10 L9 15 L16 6" stroke="black" stroke-width="2" fill="none"/>
</svg>
<span style="margin-left: 5px;">合格</span>
</span>
<span t-else="" style="margin-left: 30px;">
<svg width="20" height="20" style="vertical-align: -3px;">
<rect x="1" y="1" width="18" height="18" fill="none" stroke="black" stroke-width="1.5"/>
</svg>
<span style="margin-left: 5px;">合格</span>
</span>
<span t-if="o.report_result == 'NG'" style="margin-left: 50px;">
<svg width="20" height="20" style="vertical-align: -3px;">
<rect x="1" y="1" width="18" height="18" fill="none" stroke="black" stroke-width="1.5"/>
<path d="M4 10 L9 15 L16 6" stroke="black" stroke-width="2" fill="none"/>
</svg>
<span style="margin-left: 5px;">不合格</span>
</span>
<span t-else="" style="margin-left: 50px;">
<svg width="20" height="20" style="vertical-align: -3px;">
<rect x="1" y="1" width="18" height="18" fill="none" stroke="black" stroke-width="1.5"/>
</svg>
<span style="margin-left: 5px;">不合格</span>
</span>
</h5>
<div style="clear: both; margin-top: 30px; padding-top: 10px;">
<div style="display: inline-block;">
<span style="font-size: 18px; font-weight: bold;">检验结论: </span>
<span t-if="o.report_result == 'OK'" style="margin-left: 30px; display: inline-block;">
<svg width="20" height="20" style="vertical-align: middle;">
<rect x="1" y="1" width="18" height="18" fill="none" stroke="black" stroke-width="1.5"/>
<path d="M4 10 L9 15 L16 6" stroke="black" stroke-width="2" fill="none"/>
</svg>
<span style="margin-left: 5px;">合格</span>
</span>
<span t-else="" style="margin-left: 30px; display: inline-block;">
<svg width="20" height="20" style="vertical-align: middle;">
<rect x="1" y="1" width="18" height="18" fill="none" stroke="black" stroke-width="1.5"/>
</svg>
<span style="margin-left: 5px;">合格</span>
</span>
<span t-if="o.report_result == 'NG'" style="margin-left: 50px; display: inline-block;">
<svg width="20" height="20" style="vertical-align: middle;">
<rect x="1" y="1" width="18" height="18" fill="none" stroke="black" stroke-width="1.5"/>
<path d="M4 10 L9 15 L16 6" stroke="black" stroke-width="2" fill="none"/>
</svg>
<span style="margin-left: 5px;">不合格</span>
</span>
<span t-else="" style="margin-left: 50px; display: inline-block;">
<svg width="20" height="20" style="vertical-align: middle;">
<rect x="1" y="1" width="18" height="18" fill="none" stroke="black" stroke-width="1.5"/>
</svg>
<span style="margin-left: 5px;">不合格</span>
</span>
</div>
</div>
@@ -158,17 +157,20 @@
<p><strong>质检员: </strong> <span t-field="o.quality_manager"/></p>
</div>
</div>
<div style="border-top: 3px solid black;"></div>
<!-- 添加合格标签 -->
<!-- <div class="row mt-5">
<div class="col-12 text-center">
<p>(以下空白)</p>
<p></p>
</div>
</div> -->
<!-- 调用自定义页脚 -->
<!-- 页脚固定在底部 -->
<!-- <div style="position: absolute; bottom: 0; left: 0; right: 0;"> -->
<t t-call="sf_quality.report_quality_footer"/>
<!-- </div> -->
</div>
</t>
</t>