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/systemManagement/documentRecords/distributionCollectionRecord.vue |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue b/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue
index 765b4d1..4b3344a 100644
--- a/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue
+++ b/src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue
@@ -20,10 +20,7 @@
       </div>
       <div>
         <el-button size="small" type="primary" @click="openAdd">鏂板</el-button>
-        <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx'
-                   :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload'
-                   :on-success="handleSuccessUp" style="display:inline-block;margin: 0 8px;">
-          <el-button type="primary" size="small">瀵煎叆</el-button></el-upload>
+        <el-button type="primary" size="small" style="margin: 0 8px" @click="$refs.importDialog.open()">瀵煎叆</el-button>
         <el-button size="small" type="primary" @click="handleDown" :loading="outLoading">瀵煎嚭</el-button>
       </div>
     </div>
@@ -124,11 +121,22 @@
         <el-button type="primary" @click="handleAdd" :loading="addLoading">纭� 瀹�</el-button>
       </span></template>
     </el-dialog>
+    <import-dialog
+      ref="importDialog"
+      title="瀵煎叆鏂囦欢鍙戞斁鍥炴敹璁板綍"
+      :action="action"
+      accept=".doc,.docx"
+      template-url="/import-templates/鏂囦欢鍙戞斁鍥炴敹璁板綍瀵煎叆妯℃澘.docx"
+      template-name="鏂囦欢鍙戞斁鍥炴敹璁板綍瀵煎叆妯℃澘.docx"
+      :tips="['璇峰嬁鍒犻櫎琛ㄥご鎴栧鍒犲垪锛屾暟鎹粠绗� 3 琛屽紑濮嬪~鍐�', '鎺ユ敹浜恒�佺鏀朵汉濉啓绯荤粺鐢ㄦ埛濮撳悕', '鎺ユ敹鏃ユ湡銆佺鏀舵棩鏈熸牸寮忥細YYYY-MM-DD']"
+      @success="refreshTable"
+    />
   </div>
 </template>
 
 <script>
 import limsTable from "@/components/Table/lims-table.vue";
+import ImportDialog from '@/components/ImportDialog/index.vue'
 import {
   getYearAndMonthAndDays
 } from '@/utils/date'
@@ -150,7 +158,8 @@
 export default {
   name: 'DistributionCollectionRecord',
   components: {
-    limsTable
+    limsTable,
+    ImportDialog
   },
   data() {
     return {

--
Gitblit v1.9.3