340 lines
22 KiB
XML
340 lines
22 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<!-- 定义页眉模板 -->
|
|
<template id="report_quality_header">
|
|
<div class="header" style="position: relative; height: 180px; margin-bottom: 20px;">
|
|
<!-- Logo -->
|
|
<div style="position: absolute; top: 0; left: 0;">
|
|
<img t-if="o.company_id.favicon" t-att-src="image_data_uri(o.company_id.favicon)" style="max-height: 70px;" alt="Logo"/>
|
|
</div>
|
|
|
|
<!-- 标题 -->
|
|
<div style="position: absolute; top: 80px; left: 0; right: 0; width: 100%;">
|
|
<h2 style="margin: 0 auto; font-size: 33px; text-align: center; width: 200px;">出厂检验报告</h2>
|
|
</div>
|
|
|
|
<!-- 二维码和报告编号 -->
|
|
<div style="position: absolute; top: 0; right: 0; text-align: right;">
|
|
<t t-if="o.report_number_id">
|
|
<img t-att-src="'/report/barcode/QR/%s' % o.get_report_url()" style="width:100px;height:100px"/>
|
|
<div style="font-size: 14px; margin-top: 5px;">
|
|
报告编号:<span t-field="o.report_number_id"/>
|
|
</div>
|
|
<div style="font-size: 12px; margin-top: 5px;">
|
|
扫描二维码查看PDF报告
|
|
</div>
|
|
</t>
|
|
<t t-else="">
|
|
<img t-att-src="'/report/barcode/QR/%s' % o.get_report_url()" style="width:100px;height:100px"/>
|
|
<div style="font-size: 14px; margin-top: 5px;">
|
|
报告编号:<span>ceshi</span>
|
|
</div>
|
|
<div style="font-size: 12px; margin-top: 5px;">
|
|
扫描二维码查看PDF报告
|
|
</div>
|
|
</t>
|
|
</div>
|
|
|
|
</div>
|
|
</template>
|
|
|
|
<!-- 定义页脚模板 -->
|
|
<template id="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 style="border-top: 2px solid black;"></div> -->
|
|
<div class="text-center">
|
|
<span>第<span class="page"/> 页/共 <span class="topage"/>页</span>
|
|
</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 style="border-top: 2px solid black;"></div> -->
|
|
<div class="text-center">
|
|
<span>第<span>1</span> 页/共 <span>1</span>页</span>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
<template id="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.report_quality_footer"/>
|
|
<!-- </div> -->
|
|
</div>
|
|
</t>
|
|
</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> |