|
|
@@ -1,660 +1,380 @@
|
|
|
<template>
|
|
|
- <ele-modal
|
|
|
- :visible="visible"
|
|
|
- v-if="visible"
|
|
|
- title="检测报告"
|
|
|
- width="70%"
|
|
|
- append-to-body
|
|
|
- :before-close="cancel"
|
|
|
- :maxable="true"
|
|
|
- >
|
|
|
- <div v-if="isView && processInstanceId" class="switch">
|
|
|
- <div class="switch_left">
|
|
|
- <ul>
|
|
|
- <li
|
|
|
- v-for="item in tabOptions"
|
|
|
- :key="item.key"
|
|
|
- :class="{ active: activeComp == item.key }"
|
|
|
- @click="activeComp = item.key"
|
|
|
- >
|
|
|
- {{ item.name }}
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div
|
|
|
- v-show="activeComp === 'main'"
|
|
|
- id="printSection"
|
|
|
- style="padding: 20px; background-color: white"
|
|
|
+ <div id="printSection" style="padding: 20px; background-color: white">
|
|
|
+ <h2 style="text-align: center; font-size: 24px; margin-bottom: 10px"
|
|
|
+ >湖南特瑞精密医疗器器械有限公司</h2
|
|
|
+ >
|
|
|
+ <h1
|
|
|
+ style="
|
|
|
+ text-align: center;
|
|
|
+ font-size: 24px;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ font-weight: bold;
|
|
|
+ "
|
|
|
+ >成品检验报告</h1
|
|
|
>
|
|
|
- <h2 style="text-align: center; font-size: 24px; margin-bottom: 10px"
|
|
|
- >湖南特瑞精密医疗器器械有限公司</h2
|
|
|
- >
|
|
|
- <h1
|
|
|
- style="
|
|
|
- text-align: center;
|
|
|
- font-size: 24px;
|
|
|
- margin-bottom: 20px;
|
|
|
- font-weight: bold;
|
|
|
- "
|
|
|
- >成品检验报告</h1
|
|
|
- >
|
|
|
|
|
|
- <!-- 编号和报告单号 -->
|
|
|
- <div style="margin-bottom: 5px">
|
|
|
- <el-row style="display: flex">
|
|
|
- <el-col :span="12" style="width: 50%">
|
|
|
- <div style="display: flex; align-items: center">
|
|
|
- <span style="font-weight: bold; margin-right: 10px"
|
|
|
- >报告编号:</span
|
|
|
- >
|
|
|
- <span style="flex: 1">{{ basicInfoData.code }}</span>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12" style="width: 50%">
|
|
|
- <div
|
|
|
- style="
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: flex-end;
|
|
|
- "
|
|
|
- >
|
|
|
- <span style="font-weight: bold; margin-right: 10px"
|
|
|
- >表单编号:</span
|
|
|
- >
|
|
|
+ <!-- 编号和报告单号 -->
|
|
|
+ <div style="margin-bottom: 5px">
|
|
|
+ <el-row style="display: flex">
|
|
|
+ <el-col :span="12" style="width: 50%">
|
|
|
+ <div style="display: flex; align-items: center">
|
|
|
+ <span style="font-weight: bold; margin-right: 10px">报告编号:</span>
|
|
|
+ <span style="flex: 1">{{ basicInfoData.code }}</span>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" style="width: 50%">
|
|
|
+ <div
|
|
|
+ style="
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: flex-end;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <span style="font-weight: bold; margin-right: 10px">表单编号:</span>
|
|
|
+
|
|
|
+ <span v-if="isView">
|
|
|
+ {{ basicInfoData.reportNumber }}
|
|
|
+ </span>
|
|
|
+ <span v-else>
|
|
|
+ <el-input
|
|
|
+ v-model="basicInfoData.reportNumber"
|
|
|
+ placeholder="请输入报告编号"
|
|
|
+ ></el-input>
|
|
|
+ </span>
|
|
|
+ <span style="font-weight: bold; margin-left: 3px">
|
|
|
+ <span> 版本:</span>
|
|
|
|
|
|
<span v-if="isView">
|
|
|
- {{ basicInfoData.reportNumber }}
|
|
|
+ {{ basicInfoData.version }}
|
|
|
</span>
|
|
|
<span v-else>
|
|
|
<el-input
|
|
|
- v-model="basicInfoData.reportNumber"
|
|
|
- placeholder="请输入报告编号"
|
|
|
+ style="width: 120px"
|
|
|
+ v-model="basicInfoData.version"
|
|
|
+ placeholder="请输入版本"
|
|
|
></el-input>
|
|
|
</span>
|
|
|
- <span style="font-weight: bold; margin-left: 3px">
|
|
|
- 版本:{{ basicInfoData.version }}</span
|
|
|
- >
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 基本信息表格 -->
|
|
|
+ <table
|
|
|
+ class="basic-info-table"
|
|
|
+ style="width: 100%; border-collapse: collapse; border: 1px solid #ccc"
|
|
|
+ >
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
+ >产品名称</td
|
|
|
+ >
|
|
|
+ <td style="border: 1px solid #ccc; padding: 8px">{{
|
|
|
+ basicInfoData.productName
|
|
|
+ }}</td>
|
|
|
+ <td style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
+ >生产批号</td
|
|
|
+ >
|
|
|
+ <td style="border: 1px solid #ccc; padding: 8px">{{
|
|
|
+ basicInfoData.batchNo
|
|
|
+ }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
+ >规格型号</td
|
|
|
+ >
|
|
|
+ <td style="border: 1px solid #ccc; padding: 8px"
|
|
|
+ >{{ basicInfoData.specification }}/{{ basicInfoData.modelType }}</td
|
|
|
+ >
|
|
|
+ <td style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
+ >灭菌批号</td
|
|
|
+ >
|
|
|
+ <td style="border: 1px solid #ccc; padding: 8px"
|
|
|
+ ><span style="flex: 1">
|
|
|
+ <div v-if="isView">
|
|
|
+ {{ basicInfoData.reportNumber1 }}
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ <el-input
|
|
|
+ v-model="basicInfoData.reportNumber1"
|
|
|
+ placeholder="请输入报告编号"
|
|
|
+ ></el-input>
|
|
|
+ </div> </span
|
|
|
+ ></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
+ >产品数量</td
|
|
|
+ >
|
|
|
+ <td style="border: 1px solid #ccc; padding: 8px"
|
|
|
+ >{{ basicInfoData.total }}{{ basicInfoData.sampleMeasureUnit }}</td
|
|
|
+ >
|
|
|
+ <td style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
+ >抽检数量</td
|
|
|
+ >
|
|
|
+ <td style="border: 1px solid #ccc; padding: 8px"
|
|
|
+ >{{ basicInfoData.sampleQuantity
|
|
|
+ }}{{ basicInfoData.sampleMeasureUnit }}</td
|
|
|
+ >
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
+ >包装规格</td
|
|
|
+ >
|
|
|
+ <td style="border: 1px solid #ccc; padding: 8px">{{
|
|
|
+ basicInfoData.packingSpecification
|
|
|
+ }}</td>
|
|
|
+ <td style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
+ >生产日期</td
|
|
|
+ >
|
|
|
+ <td style="border: 1px solid #ccc; padding: 8px">
|
|
|
+ <div v-if="!isView">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="basicInfoData.manufactureTime"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择日期"
|
|
|
+ />
|
|
|
</div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
+ <div v-else>{{ basicInfoData.manufactureTime }}</div></td
|
|
|
+ >
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
+ >有效期</td
|
|
|
+ >
|
|
|
+ <td style="border: 1px solid #ccc; padding: 8px">
|
|
|
+ <div v-if="!isView">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="basicInfoData.expirationDate"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择日期"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div v-else>{{ basicInfoData.expirationDate || '/' }}</div>
|
|
|
+ </td>
|
|
|
+ <td style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
+ >报告日期</td
|
|
|
+ >
|
|
|
+ <td style="border: 1px solid #ccc; padding: 8px">
|
|
|
+ <div v-if="!isView">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="basicInfoData.reportDate"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择日期"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div v-else>{{ basicInfoData.reportDate }}</div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
+ >检验依据</td
|
|
|
+ >
|
|
|
+ <td style="border: 1px solid #ccc; padding: 8px" colspan="3">
|
|
|
+ <div v-if="!isView">
|
|
|
+ <el-input
|
|
|
+ v-model="basicInfoData.inspectionBasis"
|
|
|
+ placeholder="请输入检验依据"
|
|
|
+ ></el-input>
|
|
|
+ </div>
|
|
|
+ <div v-else>{{ basicInfoData.inspectionBasis }}</div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
|
|
|
- <!-- 基本信息表格 -->
|
|
|
- <table
|
|
|
- class="basic-info-table"
|
|
|
- style="width: 100%; border-collapse: collapse; border: 1px solid #ccc"
|
|
|
- >
|
|
|
- <tbody>
|
|
|
- <tr>
|
|
|
- <td style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
- >产品名称</td
|
|
|
- >
|
|
|
- <td style="border: 1px solid #ccc; padding: 8px">{{
|
|
|
- basicInfoData.productName
|
|
|
- }}</td>
|
|
|
- <td style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
- >生产批号</td
|
|
|
- >
|
|
|
- <td style="border: 1px solid #ccc; padding: 8px">{{
|
|
|
- basicInfoData.batchNo
|
|
|
- }}</td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
- >规格型号</td
|
|
|
- >
|
|
|
- <td style="border: 1px solid #ccc; padding: 8px"
|
|
|
- >{{ basicInfoData.specification }}/{{
|
|
|
- basicInfoData.modelType
|
|
|
- }}</td
|
|
|
- >
|
|
|
- <td style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
- >灭菌批号</td
|
|
|
- >
|
|
|
- <td style="border: 1px solid #ccc; padding: 8px"
|
|
|
- ><span style="flex: 1">
|
|
|
- <div v-if="isView">
|
|
|
- {{ basicInfoData.reportNumber1 }}
|
|
|
- </div>
|
|
|
- <div v-else>
|
|
|
- <el-input
|
|
|
- v-model="basicInfoData.reportNumber1"
|
|
|
- placeholder="请输入报告编号"
|
|
|
- ></el-input>
|
|
|
- </div> </span
|
|
|
- ></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
- >产品数量</td
|
|
|
- >
|
|
|
- <td style="border: 1px solid #ccc; padding: 8px"
|
|
|
- >{{ basicInfoData.total
|
|
|
- }}{{ basicInfoData.sampleMeasureUnit }}</td
|
|
|
- >
|
|
|
- <td style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
- >抽检数量</td
|
|
|
- >
|
|
|
- <td style="border: 1px solid #ccc; padding: 8px"
|
|
|
- >{{ basicInfoData.sampleQuantity
|
|
|
- }}{{ basicInfoData.sampleMeasureUnit }}</td
|
|
|
- >
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
- >包装规格</td
|
|
|
- >
|
|
|
- <td style="border: 1px solid #ccc; padding: 8px">{{
|
|
|
- basicInfoData.packingSpecification
|
|
|
- }}</td>
|
|
|
- <td style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
- >生产日期</td
|
|
|
+ <!-- 检验项目表格 -->
|
|
|
+ <table
|
|
|
+ class="inspection-items-table"
|
|
|
+ style="
|
|
|
+ width: 100%;
|
|
|
+ border-collapse: collapse;
|
|
|
+ border: 1px solid #ccc;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
+ >检验项目</th
|
|
|
+ >
|
|
|
+ <th style="border: 1px solid #ccc; padding: 8px">标准要求</th>
|
|
|
+ <th style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
+ >检验结果</th
|
|
|
+ >
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr v-for="(item, index) in inspectionItems" :key="index">
|
|
|
+ <td
|
|
|
+ style="
|
|
|
+ width: 150px;
|
|
|
+ border: 1px solid #ccc;
|
|
|
+ padding: 8px;
|
|
|
+ min-height: 37px;
|
|
|
+ "
|
|
|
+ >{{ item.item }}</td
|
|
|
+ >
|
|
|
+ <td style="border: 1px solid #ccc; padding: 8px">{{
|
|
|
+ item.standardRegulations
|
|
|
+ }}</td>
|
|
|
+ <td style="width: 150px; border: 1px solid #ccc; padding: 8px">{{
|
|
|
+ item.results
|
|
|
+ }}</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td style="width: 120px; border: 1px solid #ccc; padding: 8px"
|
|
|
+ >结论</td
|
|
|
+ >
|
|
|
+ <td style="border: 1px solid #ccc; padding: 8px" :colspan="2">
|
|
|
+ <div v-if="!isView">
|
|
|
+ <el-input
|
|
|
+ v-model="basicInfoData.conclusion"
|
|
|
+ placeholder="请输入结论"
|
|
|
+ ></el-input>
|
|
|
+ </div>
|
|
|
+ <div v-else>{{ basicInfoData.conclusion || '' }}</div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td style="width: 120px; border: 1px solid #ccc; padding: 8px"
|
|
|
+ >备注</td
|
|
|
+ >
|
|
|
+ <td style="border: 1px solid #ccc; padding: 8px" :colspan="2">
|
|
|
+ <div v-if="!isView">
|
|
|
+ <el-input
|
|
|
+ v-model="basicInfoData.remarks"
|
|
|
+ placeholder="请输入备注"
|
|
|
+ ></el-input>
|
|
|
+ </div>
|
|
|
+ <div v-else>{{ basicInfoData.remarks || '' }}</div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ <!-- 签名区域 -->
|
|
|
+ <div style="margin-top: 20px">
|
|
|
+ <el-row :gutter="20" style="display: flex; align-items: center">
|
|
|
+ <el-col :span="8">
|
|
|
+ <div style="display: flex; align-items: center; margin-bottom: 10px">
|
|
|
+ <span style="font-weight: bold; min-width: 100px"
|
|
|
+ >检验员/日期:</span
|
|
|
>
|
|
|
- <td style="border: 1px solid #ccc; padding: 8px">
|
|
|
- <div v-if="!isView">
|
|
|
+ <span style="flex: 1">
|
|
|
+ <div v-if="!isView" style="display: flex; align-items: center">
|
|
|
+ <el-input
|
|
|
+ v-model="basicInfoData.inspector"
|
|
|
+ placeholder="请输入检验员"
|
|
|
+ style="width: 140px"
|
|
|
+ ></el-input>
|
|
|
<el-date-picker
|
|
|
- v-model="basicInfoData.manufactureTime"
|
|
|
+ v-model="basicInfoData.inspectionTime"
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
placeholder="选择日期"
|
|
|
+ style="width: 160px"
|
|
|
/>
|
|
|
</div>
|
|
|
- <div v-else>{{ basicInfoData.manufactureTime }}</div></td
|
|
|
- >
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
- >有效期</td
|
|
|
+ <div v-else
|
|
|
+ >{{ basicInfoData.inspector || '' }} /
|
|
|
+ {{ basicInfoData.inspectionTime || '' }}</div
|
|
|
+ >
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <div style="display: flex; align-items: center; margin-bottom: 10px">
|
|
|
+ <span style="font-weight: bold; min-width: 100px"
|
|
|
+ >复核人/日期:</span
|
|
|
>
|
|
|
- <td style="border: 1px solid #ccc; padding: 8px">
|
|
|
- <div v-if="!isView">
|
|
|
+ <span style="flex: 1">
|
|
|
+ <div v-if="!isView" style="display: flex; align-items: center">
|
|
|
+ <el-input
|
|
|
+ v-model="basicInfoData.reviewer"
|
|
|
+ placeholder="请输入复核人"
|
|
|
+ style="width: 140px"
|
|
|
+ ></el-input>
|
|
|
<el-date-picker
|
|
|
- v-model="basicInfoData.expirationDate"
|
|
|
+ v-model="basicInfoData.reviewTime"
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
placeholder="选择日期"
|
|
|
+ style="width: 160px"
|
|
|
/>
|
|
|
</div>
|
|
|
- <div v-else>{{ basicInfoData.expirationDate || '/' }}</div>
|
|
|
- </td>
|
|
|
- <td style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
- >报告日期</td
|
|
|
+ <div v-else
|
|
|
+ >{{ basicInfoData.reviewer || '' }} /
|
|
|
+ {{ basicInfoData.reviewTime || '' }}</div
|
|
|
+ >
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <div style="display: flex; align-items: center; margin-bottom: 10px">
|
|
|
+ <span style="font-weight: bold; min-width: 100px"
|
|
|
+ >审核人/日期:</span
|
|
|
>
|
|
|
- <td style="border: 1px solid #ccc; padding: 8px">
|
|
|
- <div v-if="!isView">
|
|
|
+ <span style="flex: 1">
|
|
|
+ <div v-if="!isView" style="display: flex; align-items: center">
|
|
|
+ <el-input
|
|
|
+ v-model="basicInfoData.checker"
|
|
|
+ placeholder="请输入审核人"
|
|
|
+ style="width: 140px"
|
|
|
+ ></el-input>
|
|
|
<el-date-picker
|
|
|
- v-model="basicInfoData.reportDate"
|
|
|
+ v-model="basicInfoData.approvedDate"
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
placeholder="选择日期"
|
|
|
+ style="width: 160px"
|
|
|
/>
|
|
|
</div>
|
|
|
- <div v-else>{{ basicInfoData.reportDate }}</div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
- >检验依据</td
|
|
|
- >
|
|
|
- <td style="border: 1px solid #ccc; padding: 8px" colspan="3">
|
|
|
- <div v-if="!isView">
|
|
|
- <el-input
|
|
|
- v-model="basicInfoData.inspectionBasis"
|
|
|
- placeholder="请输入检验依据"
|
|
|
- ></el-input>
|
|
|
- </div>
|
|
|
- <div v-else>{{ basicInfoData.inspectionBasis }}</div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
-
|
|
|
- <!-- 检验项目表格 -->
|
|
|
- <table
|
|
|
- class="inspection-items-table"
|
|
|
- style="
|
|
|
- width: 100%;
|
|
|
- border-collapse: collapse;
|
|
|
- border: 1px solid #ccc;
|
|
|
- margin-bottom: 20px;
|
|
|
- "
|
|
|
- >
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
- >检验项目</th
|
|
|
- >
|
|
|
- <th style="border: 1px solid #ccc; padding: 8px">标准要求</th>
|
|
|
- <th style="width: 150px; border: 1px solid #ccc; padding: 8px"
|
|
|
- >检验结果</th
|
|
|
- >
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody>
|
|
|
- <tr v-for="(item, index) in inspectionItems" :key="index">
|
|
|
- <td
|
|
|
- style="
|
|
|
- width: 150px;
|
|
|
- border: 1px solid #ccc;
|
|
|
- padding: 8px;
|
|
|
- min-height: 37px;
|
|
|
- "
|
|
|
- >{{ item.item }}</td
|
|
|
- >
|
|
|
- <td style="border: 1px solid #ccc; padding: 8px">{{
|
|
|
- item.standardRegulations
|
|
|
- }}</td>
|
|
|
- <td style="width: 150px; border: 1px solid #ccc; padding: 8px">{{
|
|
|
- item.results
|
|
|
- }}</td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="width: 120px; border: 1px solid #ccc; padding: 8px"
|
|
|
- >结论</td
|
|
|
- >
|
|
|
- <td style="border: 1px solid #ccc; padding: 8px" :colspan="2">
|
|
|
- <div v-if="!isView">
|
|
|
- <el-input
|
|
|
- v-model="basicInfoData.conclusion"
|
|
|
- placeholder="请输入结论"
|
|
|
- ></el-input>
|
|
|
- </div>
|
|
|
- <div v-else>{{ basicInfoData.conclusion || '' }}</div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="width: 120px; border: 1px solid #ccc; padding: 8px"
|
|
|
- >备注</td
|
|
|
- >
|
|
|
- <td style="border: 1px solid #ccc; padding: 8px" :colspan="2">
|
|
|
- <div v-if="!isView">
|
|
|
- <el-input
|
|
|
- v-model="basicInfoData.remarks"
|
|
|
- placeholder="请输入备注"
|
|
|
- ></el-input>
|
|
|
- </div>
|
|
|
- <div v-else>{{ basicInfoData.remarks || '' }}</div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- <!-- 签名区域 -->
|
|
|
- <div style="margin-top: 20px">
|
|
|
- <el-row :gutter="20" style="display: flex; align-items: center">
|
|
|
- <el-col :span="8">
|
|
|
- <div
|
|
|
- style="display: flex; align-items: center; margin-bottom: 10px"
|
|
|
- >
|
|
|
- <span style="font-weight: bold; min-width: 100px"
|
|
|
- >检验员/日期:</span
|
|
|
- >
|
|
|
- <span style="flex: 1">
|
|
|
- <div v-if="!isView" style="display: flex; align-items: center">
|
|
|
- <el-input
|
|
|
- v-model="basicInfoData.inspector"
|
|
|
- placeholder="请输入检验员"
|
|
|
- style="width: 140px"
|
|
|
- ></el-input>
|
|
|
- <el-date-picker
|
|
|
- v-model="basicInfoData.inspectionTime"
|
|
|
- type="date"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- placeholder="选择日期"
|
|
|
- style="width: 160px"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div v-else
|
|
|
- >{{ basicInfoData.inspector || '' }} /
|
|
|
- {{ basicInfoData.inspectionTime || '' }}</div
|
|
|
- >
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <div
|
|
|
- style="display: flex; align-items: center; margin-bottom: 10px"
|
|
|
- >
|
|
|
- <span style="font-weight: bold; min-width: 100px"
|
|
|
- >复核人/日期:</span
|
|
|
- >
|
|
|
- <span style="flex: 1">
|
|
|
- <div v-if="!isView" style="display: flex; align-items: center">
|
|
|
- <el-input
|
|
|
- v-model="basicInfoData.reviewer"
|
|
|
- placeholder="请输入复核人"
|
|
|
- style="width: 140px"
|
|
|
- ></el-input>
|
|
|
- <el-date-picker
|
|
|
- v-model="basicInfoData.reviewTime"
|
|
|
- type="date"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- placeholder="选择日期"
|
|
|
- style="width: 160px"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div v-else
|
|
|
- >{{ basicInfoData.reviewer || '' }} /
|
|
|
- {{ basicInfoData.reviewTime || '' }}</div
|
|
|
- >
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <div
|
|
|
- style="display: flex; align-items: center; margin-bottom: 10px"
|
|
|
- >
|
|
|
- <span style="font-weight: bold; min-width: 100px"
|
|
|
- >审核人/日期:</span
|
|
|
+ <div v-else
|
|
|
+ >{{ basicInfoData.checker || '' }} /
|
|
|
+ {{ basicInfoData.approvedDate || '' }}</div
|
|
|
>
|
|
|
- <span style="flex: 1">
|
|
|
- <div v-if="!isView" style="display: flex; align-items: center">
|
|
|
- <el-input
|
|
|
- v-model="basicInfoData.checker"
|
|
|
- placeholder="请输入审核人"
|
|
|
- style="width: 140px"
|
|
|
- ></el-input>
|
|
|
- <el-date-picker
|
|
|
- v-model="basicInfoData.approvedDate"
|
|
|
- type="date"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- placeholder="选择日期"
|
|
|
- style="width: 160px"
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div v-else
|
|
|
- >{{ basicInfoData.checker || '' }} /
|
|
|
- {{ basicInfoData.approvedDate || '' }}</div
|
|
|
- >
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</div>
|
|
|
- <bpmDetail
|
|
|
- v-if="activeComp === 'bpm' && processInstanceId"
|
|
|
- :id="processInstanceId"
|
|
|
- ></bpmDetail>
|
|
|
- <template v-slot:footer>
|
|
|
- <el-button v-if="isView" type="primary" @click="print" v-loading="loading"
|
|
|
- >打印</el-button
|
|
|
- >
|
|
|
- <el-button v-if="!isView" type="primary" @click="save" v-loading="loading"
|
|
|
- >确认</el-button
|
|
|
- >
|
|
|
- <el-button @click="cancel">关闭</el-button>
|
|
|
- </template>
|
|
|
- </ele-modal>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import {
|
|
|
- queryInspectionReportData,
|
|
|
- queryInspectionReportList,
|
|
|
- generateReport
|
|
|
- } from '@/api/inspectionReport';
|
|
|
- import bpmDetail from '@/views/bpm/processInstance/detail.vue';
|
|
|
-
|
|
|
- import { getCode } from '@/api/login';
|
|
|
-
|
|
|
export default {
|
|
|
name: 'QualityReport',
|
|
|
props: {
|
|
|
isView: {
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
- },
|
|
|
- visible: {
|
|
|
- type: Boolean,
|
|
|
- default: false
|
|
|
- },
|
|
|
- row: {
|
|
|
- type: Object,
|
|
|
- default: () => {}
|
|
|
- },
|
|
|
- item: {
|
|
|
- type: Object,
|
|
|
- default: () => {}
|
|
|
- },
|
|
|
- type: ''
|
|
|
- },
|
|
|
- components: {
|
|
|
- bpmDetail
|
|
|
+ }
|
|
|
},
|
|
|
+
|
|
|
data() {
|
|
|
return {
|
|
|
- // visible: false,
|
|
|
- loading: false,
|
|
|
- currentRow: {}, // 存储当前行数据
|
|
|
- templateItem: {}, // 存储当前模板项数据
|
|
|
// 基本信息数据
|
|
|
basicInfoData: {},
|
|
|
|
|
|
// 检验项目
|
|
|
- inspectionItems: [],
|
|
|
- tabOptions: [
|
|
|
- { key: 'main', name: '业务详情' },
|
|
|
- { key: 'bpm', name: '流程详情' }
|
|
|
- ],
|
|
|
- activeComp: 'main',
|
|
|
- processInstanceId: '',
|
|
|
- reportApprovalTaskVos: []
|
|
|
+ inspectionItems: []
|
|
|
};
|
|
|
},
|
|
|
- watch: {
|
|
|
- visible: {
|
|
|
- handler: function (val) {
|
|
|
- console.log('visible~~~', val);
|
|
|
- if (val) {
|
|
|
- this.open(this.row, this.item);
|
|
|
- }
|
|
|
- },
|
|
|
- deep: true,
|
|
|
- immediate: true
|
|
|
- }
|
|
|
- },
|
|
|
- created() {
|
|
|
- // 页面加载时可以在这里添加数据初始化逻辑
|
|
|
- },
|
|
|
+
|
|
|
methods: {
|
|
|
/* 打开质检报告 */
|
|
|
- async open(row, item) {
|
|
|
- this.currentRow = row;
|
|
|
- this.templateItem = item || row;
|
|
|
- console.log('currentRow~~~', this.currentRow, this.templateItem);
|
|
|
- this.processInstanceId = row.reportProcessInstanceId;
|
|
|
- this.reportApprovalTaskVos = row.reportApprovalTaskVos;
|
|
|
-
|
|
|
- // this.visible = true;
|
|
|
- if (this.currentRow.reportTemplateJson?.basicInfoData) {
|
|
|
- this.basicInfoData =
|
|
|
- this.currentRow.reportTemplateJson.basicInfoData || {};
|
|
|
- this.inspectionItems =
|
|
|
- this.currentRow.reportTemplateJson.inspectionItems || [];
|
|
|
-
|
|
|
- const reviewTime =
|
|
|
- this.reportApprovalTaskVos?.[
|
|
|
- this.reportApprovalTaskVos.length - 2
|
|
|
- ]?.endTime?.split(' ')[0] || '';
|
|
|
- const approvedDate =
|
|
|
- this.reportApprovalTaskVos?.[
|
|
|
- this.reportApprovalTaskVos.length - 3
|
|
|
- ]?.endTime?.split(' ')[0] || '';
|
|
|
- const reviewer =
|
|
|
- this.reportApprovalTaskVos?.[this.reportApprovalTaskVos.length - 2]
|
|
|
- ?.approvalUserName || '';
|
|
|
- const checker =
|
|
|
- this.reportApprovalTaskVos?.[this.reportApprovalTaskVos.length - 3]
|
|
|
- ?.approvalUserName || '';
|
|
|
-
|
|
|
- this.$set(
|
|
|
- this.basicInfoData,
|
|
|
- 'inspectionTime',
|
|
|
- this.basicInfoData.inspectionTime?.split(' ')[0] || ''
|
|
|
- );
|
|
|
- this.$set(
|
|
|
- this.basicInfoData,
|
|
|
- 'reviewTime',
|
|
|
- this.basicInfoData.reviewTime?.split(' ')[0] || reviewTime || ''
|
|
|
- );
|
|
|
- this.$set(
|
|
|
- this.basicInfoData,
|
|
|
- 'approvedDate',
|
|
|
- this.basicInfoData.approvedDate?.split(' ')[0] || approvedDate || ''
|
|
|
- );
|
|
|
- this.$set(
|
|
|
- this.basicInfoData,
|
|
|
- 'reviewer',
|
|
|
- this.basicInfoData.reviewer || reviewer || ''
|
|
|
- );
|
|
|
- this.$set(
|
|
|
- this.basicInfoData,
|
|
|
- 'checker',
|
|
|
- this.basicInfoData.checker || checker || ''
|
|
|
- );
|
|
|
- } else {
|
|
|
- this.getBasicInfo();
|
|
|
- this.getInspectionItems();
|
|
|
- }
|
|
|
- },
|
|
|
- getBasicInfo() {
|
|
|
- queryInspectionReportData({
|
|
|
- id: this.currentRow.id,
|
|
|
- type: this.type
|
|
|
- }).then((res) => {
|
|
|
- this.basicInfoData = res;
|
|
|
- this.basicInfoData.reportCode = res.reportCode || '';
|
|
|
- this.basicInfoData.version =
|
|
|
- this.templateItem.versionSymbol +
|
|
|
- this.templateItem.bigVersion +
|
|
|
- this.templateItem.versionMark +
|
|
|
- this.templateItem.smallVersion;
|
|
|
- const reviewTime =
|
|
|
- this.reportApprovalTaskVos?.[
|
|
|
- this.reportApprovalTaskVos.length - 2
|
|
|
- ]?.endTime?.split(' ')[0] || '';
|
|
|
- const approvedDate =
|
|
|
- this.reportApprovalTaskVos?.[
|
|
|
- this.reportApprovalTaskVos.length - 3
|
|
|
- ]?.endTime?.split(' ')[0] || '';
|
|
|
- const reviewer =
|
|
|
- this.reportApprovalTaskVos?.[this.reportApprovalTaskVos.length - 2]
|
|
|
- ?.approvalUserName || '';
|
|
|
- const checker =
|
|
|
- this.reportApprovalTaskVos?.[this.reportApprovalTaskVos.length - 3]
|
|
|
- ?.approvalUserName || '';
|
|
|
-
|
|
|
- this.$set(
|
|
|
- this.basicInfoData,
|
|
|
- 'inspectionTime',
|
|
|
- this.basicInfoData.inspectionTime?.split(' ')[0] || ''
|
|
|
- );
|
|
|
- this.$set(
|
|
|
- this.basicInfoData,
|
|
|
- 'reviewTime',
|
|
|
- this.basicInfoData.reviewTime?.split(' ')[0] || reviewTime || ''
|
|
|
- );
|
|
|
- this.$set(
|
|
|
- this.basicInfoData,
|
|
|
- 'approvedDate',
|
|
|
- this.basicInfoData.approvedDate?.split(' ')[0] || approvedDate || ''
|
|
|
- );
|
|
|
- this.$set(
|
|
|
- this.basicInfoData,
|
|
|
- 'reviewer',
|
|
|
- this.basicInfoData.reviewer || reviewer || ''
|
|
|
- );
|
|
|
- this.$set(
|
|
|
- this.basicInfoData,
|
|
|
- 'checker',
|
|
|
- this.basicInfoData.checker || checker || ''
|
|
|
- );
|
|
|
- if (!this.basicInfoData.reportNumber) {
|
|
|
- getCode('quality_Inspection_report_number').then((res) => {
|
|
|
- this.$set(this.basicInfoData, 'reportNumber', res);
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- getInspectionItems() {
|
|
|
- queryInspectionReportList({
|
|
|
- id: this.currentRow.id,
|
|
|
- type: this.type
|
|
|
- }).then((res) => {
|
|
|
- this.inspectionItems = res;
|
|
|
- });
|
|
|
+ async init(basicInfoData, inspectionItems) {
|
|
|
+ this.$set(this, 'basicInfoData', basicInfoData);
|
|
|
+ this.$set(this, 'inspectionItems', inspectionItems);
|
|
|
},
|
|
|
|
|
|
- cancel() {
|
|
|
- // this.visible = false;
|
|
|
- this.$emit('update:visible', false);
|
|
|
- },
|
|
|
/* 保存编辑 */
|
|
|
- save() {
|
|
|
- this.loading = true;
|
|
|
- this.isView = true;
|
|
|
-
|
|
|
- this.$nextTick(() => {
|
|
|
- const printSection = document.getElementById('printSection');
|
|
|
-
|
|
|
- const params = {
|
|
|
- id: this.currentRow.id,
|
|
|
- type: this.type,
|
|
|
- reportTemplateId: this.templateItem.id,
|
|
|
- reportTemplateCode:
|
|
|
- this.templateItem.code || this.templateItem.reportTemplateCode,
|
|
|
- reportTemplateName:
|
|
|
- this.templateItem.name || this.templateItem.reportTemplateName,
|
|
|
- reportTemplateJson: {
|
|
|
- template: printSection.innerHTML,
|
|
|
- basicInfoData: this.basicInfoData,
|
|
|
- inspectionItems: this.inspectionItems
|
|
|
- }
|
|
|
- };
|
|
|
- generateReport(params)
|
|
|
- .then((res) => {
|
|
|
- this.loading = false;
|
|
|
- this.isView = false;
|
|
|
-
|
|
|
- this.$message({
|
|
|
- message: '保存成功',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- this.$emit('reload');
|
|
|
- this.cancel();
|
|
|
- // this.$emit('update:visible', false);
|
|
|
- // this.visible = false;
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- this.loading = false;
|
|
|
- this.isView = false;
|
|
|
-
|
|
|
- this.$message({
|
|
|
- message: err.message,
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
- /* 打印 */
|
|
|
- print() {
|
|
|
- const printSection = document.getElementById('printSection');
|
|
|
- console.log('printSection', printSection.innerHTML);
|
|
|
- // 创建打印任务
|
|
|
- const printWindow = window.open('', '_blank');
|
|
|
- printWindow.document.open();
|
|
|
- printWindow.document.write('<html><head><title>打印预览</title>');
|
|
|
- printWindow.document.write(
|
|
|
- '<link rel="stylesheet" href="your-stylesheet-url.css" type="text/css" />'
|
|
|
- );
|
|
|
- printWindow.document.write('</head><body>');
|
|
|
- printWindow.document.write(printSection.innerHTML);
|
|
|
- printWindow.document.write('</body></html>');
|
|
|
- printWindow.document.close();
|
|
|
- printWindow.onload = function () {
|
|
|
- printWindow.print();
|
|
|
- };
|
|
|
+ getValue() {
|
|
|
+ return this.basicInfoData;
|
|
|
}
|
|
|
}
|
|
|
};
|