|
|
@@ -1,128 +1,119 @@
|
|
|
<template>
|
|
|
<div class="quality-report-container">
|
|
|
- <div class="title">
|
|
|
- 质检报告
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 质检报告表格 -->
|
|
|
- <div style="display: flex; align-items: center; justify-content: space-between; font-size: 14px; margin-bottom: 10px;">
|
|
|
- <div>
|
|
|
- <span class="label">编号:</span>
|
|
|
- <span class="value">{{ reportData.code }}</span>
|
|
|
- </div>
|
|
|
+ <div v-if="reportData.reportNumber">
|
|
|
+ <div class="title">
|
|
|
+ 质检报告
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 质检报告表格 -->
|
|
|
+ <div style="display: flex; align-items: center; justify-content: space-between; font-size: 14px; margin-bottom: 10px;">
|
|
|
<div>
|
|
|
- <span class="label">报告单号:</span>
|
|
|
- <span class="value">{{ reportData.reportNumber }}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <table class="quality-report-table">
|
|
|
- <tbody>
|
|
|
- <tr>
|
|
|
- <td class="label">检品名称:</td>
|
|
|
- <td class="value">{{ reportData.productName }}</td>
|
|
|
- <td class="label">批号/序列号:</td>
|
|
|
- <td class="value"></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td class="label">规格型号:</td>
|
|
|
- <td class="value">{{ reportData.specification }}</td>
|
|
|
- <td class="label">数量:</td>
|
|
|
- <td class="value">{{ reportData.total }}</td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td class="label">请验日期:</td>
|
|
|
- <td class="value">{{ reportData.pleaseVerifyDate }}</td>
|
|
|
- <td class="label">请验部门:</td>
|
|
|
- <td class="value">{{ reportData.pleaseVerifyDepartment }}</td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td class="label">报告日期:</td>
|
|
|
- <td class="value">{{ reportData.reportDate }}</td>
|
|
|
- <td class="label">有效期:</td>
|
|
|
- <td class="value">{{ reportData.expirationDate }}</td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td class="label">检品来源:</td>
|
|
|
- <td class="value">{{ reportData.source }}</td>
|
|
|
- <td class="label">储存条件:</td>
|
|
|
- <td class="value">{{ reportData.storageCondition }}</td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td class="label">检验依据:</td>
|
|
|
- <td class="value" colspan="3">{{ reportData.inspectionBasis }}</td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
+ <span class="label">编号:</span>
|
|
|
+ <span class="value">{{ reportData.code }}</span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span class="label">报告单号:</span>
|
|
|
+ <span class="value">{{ reportData.reportNumber }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <table class="quality-report-table">
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td class="label">检品名称:</td>
|
|
|
+ <td class="value">{{ reportData.productName }}</td>
|
|
|
+ <td class="label">批号/序列号:</td>
|
|
|
+ <td class="value"></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="label">规格型号:</td>
|
|
|
+ <td class="value">{{ reportData.specification }}</td>
|
|
|
+ <td class="label">数量:</td>
|
|
|
+ <td class="value">{{ reportData.total }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="label">请验日期:</td>
|
|
|
+ <td class="value">{{ reportData.pleaseVerifyDate }}</td>
|
|
|
+ <td class="label">请验部门:</td>
|
|
|
+ <td class="value">{{ reportData.pleaseVerifyDepartment }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="label">报告日期:</td>
|
|
|
+ <td class="value">{{ reportData.reportDate }}</td>
|
|
|
+ <td class="label">有效期:</td>
|
|
|
+ <td class="value">{{ reportData.expirationDate }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="label">检品来源:</td>
|
|
|
+ <td class="value">{{ reportData.source }}</td>
|
|
|
+ <td class="label">储存条件:</td>
|
|
|
+ <td class="value">{{ reportData.storageCondition }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="label">检验依据:</td>
|
|
|
+ <td class="value" colspan="3">{{ reportData.inspectionBasis }}</td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
|
|
|
- <!-- 检验项目表格 -->
|
|
|
- <table class="quality-report-table">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th class="label">检验项目</th>
|
|
|
- <th class="label">标准规定</th>
|
|
|
- <th class="label">检验结果</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody>
|
|
|
- <tr v-for="item in reportDetail">
|
|
|
- <td class="value">{{ item.item }}</td>
|
|
|
- <td class="value">{{ item.standardRegulations }}</td>
|
|
|
- <td class="value">{{ item.results }}</td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
+ <!-- 检验项目表格 -->
|
|
|
+ <table class="quality-report-table">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th class="label">检验项目</th>
|
|
|
+ <th class="label">标准规定</th>
|
|
|
+ <th class="label">检验结果</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr v-for="item in reportDetail">
|
|
|
+ <td class="value">{{ item.item }}</td>
|
|
|
+ <td class="value">{{ item.standardRegulations }}</td>
|
|
|
+ <td class="value">{{ item.results }}</td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
|
|
|
- <!-- 结论表格 -->
|
|
|
- <table class="quality-report-table">
|
|
|
- <tbody>
|
|
|
- <tr>
|
|
|
- <td class="label">结论:</td>
|
|
|
- <td class="value" colspan="3">{{ reportData.conclusion }}</td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td class="label">备注:</td>
|
|
|
- <td class="value" colspan="3">{{ reportData.remarks }}</td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
+ <!-- 结论表格 -->
|
|
|
+ <table class="quality-report-table">
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td class="label">结论:</td>
|
|
|
+ <td class="value" colspan="3">{{ reportData.conclusion }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td class="label">备注:</td>
|
|
|
+ <td class="value" colspan="3">{{ reportData.remarks }}</td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
|
|
|
- <div style="display: flex; align-items: center; justify-content: space-between; font-size: 14px; margin-top: 10px;">
|
|
|
- <div>
|
|
|
- <span class="label">检验员/日期:</span>
|
|
|
- <span class="value">{{ reportData.inspector }}/{{ reportData.inspectionTime }}</span>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <span class="label">复核人/日期:</span>
|
|
|
- <span class="value">{{ reportData.reviewer }}/{{ reportData.reviewTime }}</span>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <span class="label">审核人/日期:</span>
|
|
|
- <span class="value">{{ reportData.checker }}/{{ reportData.approvedDate }}</span>
|
|
|
+ <div style="display: flex; align-items: center; justify-content: space-between; font-size: 14px; margin-top: 10px;">
|
|
|
+ <div>
|
|
|
+ <span class="label">检验员/日期:</span>
|
|
|
+ <span class="value">{{ reportData.inspector }}/{{ reportData.inspectionTime }}</span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span class="label">复核人/日期:</span>
|
|
|
+ <span class="value">{{ reportData.reviewer }}/{{ reportData.reviewTime }}</span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span class="label">审核人/日期:</span>
|
|
|
+ <span class="value">{{ reportData.checker }}/{{ reportData.approvedDate }}</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
- <!-- 签名表格 -->
|
|
|
- <!-- <table class="quality-report-table">
|
|
|
- <tbody>
|
|
|
- <tr>
|
|
|
- <td class="label">检验员/日期:</td>
|
|
|
- <td class="value">{{ reportData.inspector }}/{{ reportData.inspectionTime }}</td>
|
|
|
- <td class="label">复核人/日期:</td>
|
|
|
- <td class="value">{{ reportData.reviewer }}/{{ reportData.reviewTime }}</td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td class="label">审核人/日期:</td>
|
|
|
- <td class="value">{{ reportData.checker }}/{{ reportData.approvedDate }}</td>
|
|
|
- <td class="label"></td>
|
|
|
- <td class="value"></td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table> -->
|
|
|
+ <browse
|
|
|
+ v-else
|
|
|
+ :url="fileUrl"
|
|
|
+ ></browse>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getDetail, getListDetail } from '@/api/bpm/components/qualityReportApproval/qualityReportApproval';
|
|
|
+import { getDetail, getListDetail, getDetailById } from '@/api/bpm/components/qualityReportApproval/qualityReportApproval';
|
|
|
+import browse from '@/components/jimureport/browse.vue'
|
|
|
+import { getJmPrintViewUrl } from '@/components/jimureport//api.js';
|
|
|
+import { getToken } from '@/utils/token-util';
|
|
|
export default {
|
|
|
props: {
|
|
|
taskDefinitionKey: {
|
|
|
@@ -134,21 +125,46 @@ import { getDetail, getListDetail } from '@/api/bpm/components/qualityReportAppr
|
|
|
},
|
|
|
isView: {
|
|
|
default: ''
|
|
|
- }
|
|
|
+ },
|
|
|
+ businessCode: {
|
|
|
+ default: ''
|
|
|
+ },
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ browse
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
// 质检报告数据
|
|
|
reportData: {},
|
|
|
- reportDetail: []
|
|
|
+ reportDetail: [],
|
|
|
+ fileUrl: '',
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
- // 组件挂载时加载数据
|
|
|
- this.loadReportData();
|
|
|
- this.loadListDetail();
|
|
|
+ this.open()
|
|
|
},
|
|
|
methods: {
|
|
|
+ async open() {
|
|
|
+ const detail = await getDetailById(this.businessId);
|
|
|
+ // this.reportData = detail;
|
|
|
+ // this.showEditFlag = true;
|
|
|
+ console.log('detail~~~', detail);
|
|
|
+ if(detail.data.reportTemplateJson?.basicInfoData) {
|
|
|
+ this.reportData = detail.data.reportTemplateJson.basicInfoData;
|
|
|
+ this.reportDetail = detail.data.reportTemplateJson.inspectionItems;
|
|
|
+ } else {
|
|
|
+ // 组件挂载时加载数据
|
|
|
+ // this.loadReportData();
|
|
|
+ // this.loadListDetail();
|
|
|
+ console.log('this.businessCode~~~', this.businessCode);
|
|
|
+ let url = await getJmPrintViewUrl(this.businessCode);
|
|
|
+ this.fileUrl = `${url}?token=${getToken()}&id=${this.businessId}`;
|
|
|
+ console.log('fileUrl~~~', this.fileUrl);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
// 可以根据需要添加数据加载方法
|
|
|
async loadReportData() {
|
|
|
// // 从API获取质检报告数据
|