From 29be8639dc16b5d82bddc6099b1fa5cdca75f77a Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 20 十月 2026 16:28:22 +0800
Subject: [PATCH] feat(import): 统一导入弹框与模板,修复模板日期格式及上传报错

---
 src/views/CNAS/process/ensureResults/qualityControlPlan/components/detailFormDialog.vue |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/detailFormDialog.vue b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/detailFormDialog.vue
index 0cafc96..ac8d0e0 100644
--- a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/detailFormDialog.vue
+++ b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/detailFormDialog.vue
@@ -38,7 +38,7 @@
         </el-col>
         <el-col :span="12">
           <el-form-item label="鐩戠潱鍘熷洜" prop="superviseReason">
-            <el-input v-model="form.superviseReason" clearable disabled size="small"></el-input>
+            <el-input v-model="form.superviseReason" clearable placeholder="璇疯緭鍏ョ洃鐫e師鍥�" size="small"></el-input>
           </el-form-item>
         </el-col>
         <el-col :span="12">
@@ -94,15 +94,10 @@
   },
   // 鏂规硶闆嗗悎
   methods: {
-    openDia(type, row, causeType) {
+    openDia(type, row) {
       this.formDia = true
       this.operationType = type
       this.getUserList()
-      if (causeType == 1) {
-        this.form.superviseReason = '瀹氭湡鐩戠潱'
-      } else {
-        this.form.superviseReason = '鍔ㄦ�佺洃鐫�'
-      }
       if (type === 'edit') {
         this.searchInfo(row)
       }
@@ -115,6 +110,12 @@
     },
     searchInfo (row) {
       this.form = {...row}
+      // 瀵煎叆鐨勫巻鍙叉暟鎹彲鑳芥槸瀹屾暣鏃ユ湡锛�2026/3/15锛夛紝鏈堜唤閫夋嫨鍣ㄩ渶瑕� YYYY.M 鎵嶈兘鍥炴樉
+      const text = row.superviseTime ? String(row.superviseTime).trim() : ''
+      const matched = text.match(/^(\d{4})\s*[./骞�-]\s*(\d{1,2})(?:\s*[./鏈�-]\s*\d{1,2}\s*鏃�?)?$/)
+      if (matched && Number(matched[2]) >= 1 && Number(matched[2]) <= 12) {
+        this.form.superviseTime = `${matched[1]}.${Number(matched[2])}`
+      }
     },
     // 鎻愪氦琛ㄥ崟
     submitForm () {

--
Gitblit v1.9.3