调整报告样式

This commit is contained in:
mgw
2025-03-14 11:13:50 +08:00
parent f66ff6339d
commit c23aa4de75
2 changed files with 13 additions and 11 deletions

View File

@@ -317,6 +317,7 @@ class QualityCheck(models.Model):
# 更新流水号
self.serial_number += 1
self.quality_manager = self.env.user.id
# 返回成功消息
return True

View File

@@ -4,8 +4,12 @@
<!-- 定义页眉模板 -->
<template id="report_quality_header">
<div class="header">
<div class="pdf-viewer-toolbar">
<div class="pdf-viewer-toolbar" style="display:flex;justify-content:space-between;align-items:center;">
<img t-if="o.company_id.favicon" t-att-src="image_data_uri(o.company_id.favicon)" style="max-height: 70px;" alt="Logo"/>
<div class="text-center">
<h2>出厂检验报告</h2>
</div>
<div class="float-right" style="text-align: right;">
<!-- 使用完整URL的二维码生成方式 -->
<t t-set="base_url" t-value="request.env['ir.config_parameter'].sudo().get_param('web.base.url')"/>
@@ -45,9 +49,6 @@
<div class="page">
<div class="text-center">
<h2>出厂检验报告</h2>
</div>
<!-- <div class="col-6">
<div t-if="o.company_id.favicon" class="float-right">
<img t-att-src="image_data_uri(o.company_id.favicon)" style="max-height: 45px;" alt="Logo"/>
@@ -81,20 +82,20 @@
<table class="table table-sm mt-2" style="border: 1px solid black;">
<thead>
<tr>
<th style="border: 1px solid black;" class="text-center">检测项目</th>
<th style="border: 1px solid black;" colspan="o.column_nums" class="text-center">测量值</th>
<th style="border: 1px solid black;" class="text-center">判定</th>
<th style="border: 1px solid black;" class="text-center">备注</th>
<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;"></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>
<!-- <th style="border: 1px solid black;"></th>
<th style="border: 1px solid black;"></th> -->
</tr>
</thead>
<tbody>