From a6fdbed4f31530c080b591d78c141e561db78967 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期一, 28 九月 2026 09:35:01 +0800
Subject: [PATCH] feat(inspection): 更新检测类型选项并移除湿度字段 - 将"委托试验"改为"委托检验",增加委托检测、实验室间比对、能力验证等检测类型 - 移除所有表单中的湿度相关字段及验证逻辑 - 在报告准备界面添加印章选择功能,支持MA章、报告章、骑缝章的位置选择 - 优化报告结果流程界面,增加报告下载功能和领报告相关信息字段 - 新增印章管理系统,支持印章的增删改查和图片上传功能
---
src/views/CNAS/process/reportResults/index.vue | 130 ++++++++++++++++++++++++++++++++++---------
1 files changed, 103 insertions(+), 27 deletions(-)
diff --git a/src/views/CNAS/process/reportResults/index.vue b/src/views/CNAS/process/reportResults/index.vue
index 88b1c7c..1752de6 100644
--- a/src/views/CNAS/process/reportResults/index.vue
+++ b/src/views/CNAS/process/reportResults/index.vue
@@ -21,27 +21,13 @@
<lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 270px)'"
:page="page" @pagination="pagination"></lims-table>
</div>
- <el-dialog :title="title" :visible.sync="addDialogVisible" width="400px" top="6vh">
+ <el-dialog :title="title" :visible.sync="addDialogVisible" width="520px" top="6vh" :close-on-click-modal="false">
<el-row>
<el-col :span="24" style="margin-bottom: 16px;">
<div class="search_thing">
<div class="search_label">妫�楠屾姤鍛婄紪鍙凤細</div>
<div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
v-model="addInfo.insReportCode"></el-input></div>
- </div>
- </el-col>
- <el-col :span="24" style="margin-bottom: 16px;">
- <div class="search_thing">
- <div class="search_label">椤垫暟锛�</div>
- <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="addInfo.pages"></el-input></div>
- </div>
- </el-col>
- <el-col :span="24" style="margin-bottom: 16px;">
- <div class="search_thing">
- <div class="search_label">鍙戦�佷唤鏁帮細</div>
- <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="addInfo.number"></el-input></div>
</div>
</el-col>
<el-col :span="24" style="margin-bottom: 16px;">
@@ -55,7 +41,7 @@
<div class="search_thing">
<div class="search_label">鍙戦�佹柟寮忥細</div>
<div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
- v-model="addInfo.method"></el-input></div>
+ v-model="addInfo.method" :disabled="!!addInfo.inspectionOrderId"></el-input></div>
</div>
</el-col>
<el-col :span="24" style="margin-bottom: 16px;">
@@ -66,6 +52,23 @@
value-format="yyyy-MM-dd" style="width: 100%;">
</el-date-picker>
</div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">棰嗘姤鍛婃棩鏈燂細</div>
+ <div class="search_input">
+ <el-date-picker v-model="addInfo.receiveDate" type="date" size="small" placeholder="閫夋嫨鏃ユ湡"
+ format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 100%;">
+ </el-date-picker>
+ </div>
+ </div>
+ </el-col>
+ <el-col :span="24" style="margin-bottom: 16px;">
+ <div class="search_thing">
+ <div class="search_label">棰嗘姤鍛婁汉锛�</div>
+ <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+ v-model="addInfo.receiveUser"></el-input></div>
</div>
</el-col>
<el-col :span="24" style="margin-bottom: 16px;">
@@ -99,6 +102,22 @@
<el-button type="primary" @click="handleAdd" :loading="addLoading">纭� 瀹�</el-button>
</span>
</el-dialog>
+ <el-dialog title="涓嬭浇鏈夌珷鎶ュ憡" :visible.sync="downloadDialogVisible" width="420px"
+ :close-on-click-modal="false" @closed="closeDownloadDialog">
+ <el-form label-width="90px">
+ <el-form-item label="鏂囦欢鏍煎紡锛�">
+ <el-radio-group v-model="selectedDownloadFormat">
+ <el-radio label="pdf">PDF锛堝惈楠戠紳绔狅級</el-radio>
+ <el-radio label="word">Word</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ </el-form>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="downloadDialogVisible = false">鍙� 娑�</el-button>
+ <el-button type="primary" :loading="downloadingReportId !== null"
+ @click="downloadSelectedReport">涓� 杞�</el-button>
+ </span>
+ </el-dialog>
</div>
</template>
@@ -109,7 +128,8 @@
doProcessReport,
addProcessReport,
pageProcessReport,
- delProcessReport
+ delProcessReport,
+ downloadStampedReport
} from '@/api/cnas/process/reportResults.js'
import {
selectUserCondition,
@@ -129,20 +149,21 @@
addDialogVisible: false,
addInfo: {},
addLoading: false,
+ downloadingReportId: null,
+ downloadDialogVisible: false,
+ downloadRow: null,
+ selectedDownloadFormat: 'pdf',
queryParams: {
insReportCode: ''
},
tableData: [],
column: [
{ label: "妫�楠屾姤鍛婄紪鍙�", prop: "insReportCode" },
- { label: "椤垫暟", prop: "pages", width: "120px" },
- {
- label: "鍙戦�佷唤鏁�",
- prop: "number",
- },
{ label: "鍙戝線浣曞", prop: "send" },
{ label: "鍙戦�佹柟寮�", prop: "method" },
{ label: "鍙戦�佹棩鏈�", prop: "sendTime" },
+ { label: "棰嗘姤鍛婃棩鏈�", prop: "receiveDate", width: "120px" },
+ { label: "棰嗘姤鍛婁汉", prop: "receiveUser", width: "110px" },
{ label: "鍙戦�佷汉", prop: "sendUserName" },
{ label: "绛炬敹浜�", prop: "signatory" },
{ label: "澶囨敞", prop: "remark" },
@@ -150,7 +171,16 @@
dataType: "action",
fixed: "right",
label: "鎿嶄綔",
+ width: "180px",
operation: [
+ {
+ name: "涓嬭浇",
+ type: "text",
+ disabled: (row) => this.downloadingReportId === row.id,
+ clickFun: (row) => {
+ this.handleDownload(row);
+ },
+ },
{
name: "缂栬緫",
type: "text",
@@ -242,7 +272,7 @@
delete this.addInfo.createTime
delete this.addInfo.createUser
delete this.addInfo.updateTime
- delete this.addInfo.updateUserer
+ delete this.addInfo.updateUser
delete this.addInfo.sendUserName
if (this.title == '鏂板') {
addProcessReport(this.addInfo).then(res => {
@@ -253,7 +283,9 @@
message: '鎿嶄綔鎴愬姛!'
});
this.refreshTable()
- }).catch(err => { })
+ }).catch(() => {
+ this.addLoading = false
+ })
} else {
doProcessReport(this.addInfo).then(res => {
this.addLoading = false
@@ -263,15 +295,59 @@
message: '鎿嶄綔鎴愬姛!'
});
this.refreshTable()
- }).catch(err => { })
+ }).catch(() => {
+ this.addLoading = false
+ })
}
},
handleWork(row) {
this.title = '淇敼'
- this.addInfo = row
- console.log(this.addInfo)
+ this.addInfo = { ...row }
this.addDialogVisible = true;
},
+ handleDownload(row) {
+ this.downloadRow = row
+ this.selectedDownloadFormat = 'pdf'
+ this.downloadDialogVisible = true
+ },
+ closeDownloadDialog() {
+ if (this.downloadingReportId === null) {
+ this.downloadRow = null
+ this.selectedDownloadFormat = 'pdf'
+ }
+ },
+ downloadSelectedReport() {
+ if (!this.downloadRow) {
+ return
+ }
+ const row = this.downloadRow
+ const format = this.selectedDownloadFormat
+ this.downloadingReportId = row.id
+ downloadStampedReport(row.id, format).then(res => {
+ if (res.type && res.type.includes('application/json')) {
+ const reader = new FileReader()
+ reader.onload = () => {
+ try {
+ this.$message.error(JSON.parse(reader.result).msg || '鏈夌珷鎶ュ憡涓嬭浇澶辫触')
+ } catch (e) {
+ this.$message.error('鏈夌珷鎶ュ憡涓嬭浇澶辫触')
+ }
+ }
+ reader.readAsText(res)
+ return
+ }
+ const extension = format === 'word' ? 'docx' : 'pdf'
+ this.$download.saveAs(res, `${row.insReportCode || '鏈夌珷鎶ュ憡'}.${extension}`)
+ this.downloadDialogVisible = false
+ }).catch(() => {
+ this.$message.error('鏈夌珷鎶ュ憡涓嬭浇澶辫触')
+ }).finally(() => {
+ this.downloadingReportId = null
+ if (!this.downloadDialogVisible) {
+ this.downloadRow = null
+ }
+ })
+ },
handleDelete(row) {
this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
confirmButtonText: "纭畾",
--
Gitblit v1.9.3