调整报告页码
This commit is contained in:
@@ -61,6 +61,25 @@
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- 定义页脚模板无页码 -->
|
||||
<template id="html_report_quality_footer">
|
||||
<div class="footer">
|
||||
<div style="border-top: 3px solid black;"></div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<p>售后服务: <span t-field="o.company_id.phone"/></p>
|
||||
<p>公司名称: <span t-field="o.company_id.name"/></p>
|
||||
<p>加工工厂: <span t-field="o.company_id.factory_name"/></p>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<p>公司网址: <span t-field="o.company_id.website"/></p>
|
||||
<p>公司邮箱: <span t-field="o.company_id.email"/></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template id="report_quality_inspection">
|
||||
<t t-call="web.html_container">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
@@ -73,7 +92,6 @@
|
||||
<table class="table table-sm o_main_table mt-4" style="border: 1px solid black;">
|
||||
<tr>
|
||||
<td style="width: 15%; border: 1px solid black;"><strong>产品名称:</strong></td>
|
||||
<!-- <td style="width: 35%; border: 1px solid black;"><span t-field="o.product_id.name"/></td> -->
|
||||
<td style="width: 35%; border: 1px solid black;"><span t-field="o.part_name"/></td>
|
||||
<td style="width: 15%; border: 1px solid black;"><strong>材料:</strong></td>
|
||||
<td style="width: 35%; border: 1px solid black;"><span t-field="o.material_name"/></td>
|
||||
@@ -188,4 +206,131 @@
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<template id="html_report_quality_inspection">
|
||||
<t t-call="web.html_container">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-call="web.basic_layout">
|
||||
<t t-call="sf_quality.report_quality_header"/>
|
||||
|
||||
|
||||
<div class="page" style="min-height: 800px; position: relative; padding-bottom: 250px;">
|
||||
|
||||
<table class="table table-sm o_main_table mt-4" style="border: 1px solid black;">
|
||||
<tr>
|
||||
<td style="width: 15%; border: 1px solid black;"><strong>产品名称:</strong></td>
|
||||
<td style="width: 35%; border: 1px solid black;"><span t-field="o.part_name"/></td>
|
||||
<td style="width: 15%; border: 1px solid black;"><strong>材料:</strong></td>
|
||||
<td style="width: 35%; border: 1px solid black;"><span t-field="o.material_name"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border: 1px solid black;"><strong>图号:</strong></td>
|
||||
<td style="border: 1px solid black;"><span t-field="o.part_number"/></td>
|
||||
<td style="border: 1px solid black;"><strong>日期:</strong></td>
|
||||
<td style="border: 1px solid black;"><span t-field="o.write_date"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border: 1px solid black;"><strong>总数量:</strong></td>
|
||||
<td style="border: 1px solid black;"><span t-field="o.total_qty"/></td>
|
||||
<td style="border: 1px solid black;"><strong>检验数量:</strong></td>
|
||||
<td style="border: 1px solid black;"><span t-field="o.check_qty"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h4 class="text-center mt-4">检验结果</h4>
|
||||
<div class="" style="position: relative;">
|
||||
<table class="table table-sm mt-2" style="border: 1px solid black;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="border: 1px solid black;" class="text-center" rowspan="2">检测项目<br/>(图示尺寸)</th>
|
||||
<th style="border: 1px solid black;" t-att-colspan="o.column_nums" class="text-center">测量值</th>
|
||||
<th style="border: 1px solid black; vertical-align: middle;" class="text-center" rowspan="2">判定</th>
|
||||
<th style="border: 1px solid black; vertical-align: middle;" class="text-center" rowspan="2">备注</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<!-- <th style="border: 1px solid black;"></th> -->
|
||||
<th style="border: 1px solid black;" t-if="o.column_nums >= 1" class="text-center">1</th>
|
||||
<th style="border: 1px solid black;" t-if="o.column_nums >= 2" class="text-center">2</th>
|
||||
<th style="border: 1px solid black;" t-if="o.column_nums >= 3" class="text-center">3</th>
|
||||
<th style="border: 1px solid black;" t-if="o.column_nums >= 4" class="text-center">4</th>
|
||||
<th style="border: 1px solid black;" t-if="o.column_nums >= 5" class="text-center">5</th>
|
||||
<!-- <th style="border: 1px solid black;"></th>
|
||||
<th style="border: 1px solid black;"></th> -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr t-foreach="o.measure_line_ids" t-as="line">
|
||||
<td style="border: 1px solid black;" class="text-center"><span t-field="line.measure_item"/></td>
|
||||
<td style="border: 1px solid black;" t-if="o.column_nums >= 1" class="text-center"><span t-field="line.measure_value1"/></td>
|
||||
<td style="border: 1px solid black;" t-if="o.column_nums >= 2" class="text-center"><span t-field="line.measure_value2"/></td>
|
||||
<td style="border: 1px solid black;" t-if="o.column_nums >= 3" class="text-center"><span t-field="line.measure_value3"/></td>
|
||||
<td style="border: 1px solid black;" t-if="o.column_nums >= 4" class="text-center"><span t-field="line.measure_value4"/></td>
|
||||
<td style="border: 1px solid black;" t-if="o.column_nums >= 5" class="text-center"><span t-field="line.measure_value5"/></td>
|
||||
<td style="border: 1px solid black;" class="text-center"><span t-field="line.measure_result"/></td>
|
||||
<td style="border: 1px solid black;" class="text-center"><span t-field="line.remark"/></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<img src="/sf_quality/static/img/pass.png" style="width: 200px; height: 200px;position: absolute; bottom: 20px; right: 20%;"/>
|
||||
|
||||
</div>
|
||||
<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>
|
||||
|
||||
<div class="row mt-4">
|
||||
<div class="col-6">
|
||||
<p><strong>操作员: </strong> <span t-field="o.measure_operator"/></p>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<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>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- 页脚固定在底部 -->
|
||||
<!-- <div style="position: absolute; bottom: 0; left: 0; right: 0;"> -->
|
||||
<t t-call="sf_quality.html_report_quality_footer"/>
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
</odoo>
|
||||
@@ -18,7 +18,7 @@
|
||||
<field name="name">预览检验报告</field>
|
||||
<field name="model">quality.check</field>
|
||||
<field name="report_type">qweb-html</field>
|
||||
<field name="report_name">sf_quality.report_quality_inspection</field>
|
||||
<field name="report_name">sf_quality.html_report_quality_inspection</field>
|
||||
<field name="binding_type">report</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user