From 5d9a3141d4b3677bf8155da16b435d2a8818793b Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期五, 23 十月 2026 17:44:08 +0800
Subject: [PATCH] feat(report): 引入 SuperDoc 在线编辑器实现报告审核功能 支持审核页面直接编辑报告 - 新增检测报告与检验报告切换功能,切换时自动保存当前编辑内容 - 检测时间从单日选择改为日期范围选择,兼容历史单日数据回显 - 标准模型新增标准要求值字段,复制模板时携带完整表单数据 - 产品委托单下载报告按钮增加可用性状态控制
---
src/views/CNAS/resourceDemand/device/component/addYearPlanDia.vue | 26 ++++++++++++++++++++++++--
1 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/src/views/CNAS/resourceDemand/device/component/addYearPlanDia.vue b/src/views/CNAS/resourceDemand/device/component/addYearPlanDia.vue
index 3269482..09a92ea 100644
--- a/src/views/CNAS/resourceDemand/device/component/addYearPlanDia.vue
+++ b/src/views/CNAS/resourceDemand/device/component/addYearPlanDia.vue
@@ -162,7 +162,13 @@
this.selectionRows = selection
},
changeMachineName() {
- this.selectionRows.map(val => {
+ const existingIds = new Set(this.calibrationPlanDetailList.map(item => item.deviceId))
+ let skipped = 0
+ this.selectionRows.forEach(val => {
+ if (existingIds.has(val.id)) {
+ skipped++
+ return
+ }
// 灏� val.nextCalibrationDate 杞崲涓� Date 瀵硅薄骞跺噺鍘� 5 澶�
let nextCalibrationDate = val.nextCalibrationDate ? new Date(val.nextCalibrationDate) : null;
if (nextCalibrationDate) {
@@ -177,7 +183,11 @@
verificationUnit: val.calibrationServices,
deviceAmount: 1
})
+ existingIds.add(val.id)
})
+ if (skipped > 0) {
+ this.$message.warning(`宸茶烦杩� ${skipped} 鍙板凡鍦ㄨ鍒掍腑鐨勮澶嘸)
+ }
this.addEquipDia = false
this.rowDrop()
},
@@ -209,6 +219,18 @@
},
// 鎻愪氦鏂板
submitForm() {
+ if (!this.form.planName) {
+ this.$message.warning('璇疯緭鍏ヨ鍒掑悕绉�')
+ return
+ }
+ if (!this.form.planYear) {
+ this.$message.warning('璇烽�夋嫨骞翠唤')
+ return
+ }
+ if (!this.calibrationPlanDetailList.length) {
+ this.$message.warning('璇锋坊鍔犺澶�')
+ return
+ }
this.form.calibrationPlanDetailList = this.HaveJson(this.calibrationPlanDetailList)
this.submitFormLoading = true
if (this.operationType === 'add') {
@@ -225,7 +247,7 @@
} else {
updateDeviceCalibrationPlan(this.form).then(res => {
if (res.code == 200) {
- this.$message.success('鏂板鎴愬姛')
+ this.$message.success('淇敼鎴愬姛')
this.closeDialog()
this.$emit('closeDia')
}
--
Gitblit v1.9.3