调整报告样式
This commit is contained in:
@@ -112,3 +112,9 @@ class QualityReportController(http.Controller):
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
return request.not_found()
|
return request.not_found()
|
||||||
|
|
||||||
|
@http.route('/quality/report/not_published', type='http', auth='public')
|
||||||
|
def get_not_published_report(self, **kw):
|
||||||
|
"""提供未发布报告的控制器"""
|
||||||
|
return "报告尚未发布"
|
||||||
|
|
||||||
|
|||||||
@@ -461,7 +461,8 @@ class QualityCheck(models.Model):
|
|||||||
if self.report_number_id:
|
if self.report_number_id:
|
||||||
print(f"{base_url}/quality/report/{self.report_number_id.id}")
|
print(f"{base_url}/quality/report/{self.report_number_id.id}")
|
||||||
return f"{base_url}/quality/report/{self.report_number_id.id}"
|
return f"{base_url}/quality/report/{self.report_number_id.id}"
|
||||||
return False
|
else:
|
||||||
|
return f"{base_url}/quality/report/not_published"
|
||||||
|
|
||||||
def upload_factory_report(self):
|
def upload_factory_report(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -16,13 +16,24 @@
|
|||||||
|
|
||||||
<!-- 二维码和报告编号 -->
|
<!-- 二维码和报告编号 -->
|
||||||
<div style="position: absolute; top: 0; right: 0; text-align: right;">
|
<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"/>
|
<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;">
|
<div style="font-size: 14px; margin-top: 5px;">
|
||||||
报告编号:<span t-if="o.report_number_id" t-field="o.report_number_name"/><span t-else="">ceshi</span>
|
报告编号:<span t-field="o.report_number_id"/>
|
||||||
</div>
|
</div>
|
||||||
<div style="font-size: 12px; margin-top: 5px;">
|
<div style="font-size: 12px; margin-top: 5px;">
|
||||||
扫描二维码查看PDF报告
|
扫描二维码查看PDF报告
|
||||||
</div>
|
</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>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user