From 25975d7ec42b1691512ff6f29041bd3bd1a4a1e3 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期一, 12 一月 2026 14:32:57 +0800
Subject: [PATCH] fix: 消息通知接口联调,页面跳转

---
 src/views/basicData/customerFile/index.vue |   98 +++++++++++++++++++++++++++++++------------------
 1 files changed, 62 insertions(+), 36 deletions(-)

diff --git a/src/views/basicData/customerFile/index.vue b/src/views/basicData/customerFile/index.vue
index ea75164..0f39e25 100644
--- a/src/views/basicData/customerFile/index.vue
+++ b/src/views/basicData/customerFile/index.vue
@@ -47,14 +47,11 @@
         @pagination="pagination"
       ></PIMTable>
     </div>
-    <FormDialog
+    <el-dialog
       v-model="dialogFormVisible"
-      :title="(type) => type === 'add' ? '鏂板瀹㈡埛淇℃伅' : '缂栬緫瀹㈡埛淇℃伅'"
-      :operation-type="operationType"
+      :title="operationType === 'add' ? '鏂板瀹㈡埛淇℃伅' : '缂栬緫瀹㈡埛淇℃伅'"
       width="70%"
       @close="closeDia"
-      @confirm="submitForm"
-      @cancel="closeDia"
     >
       <el-form
         :model="form"
@@ -196,31 +193,63 @@
           </el-col>
         </el-row>
       </el-form>
-    </FormDialog>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" @click="submitForm">纭</el-button>
+          <el-button @click="closeDia">鍙栨秷</el-button>
+        </div>
+      </template>
+    </el-dialog>
     <!-- 鐢ㄦ埛瀵煎叆瀵硅瘽妗� -->
-    <ImportDialog
-      ref="importDialogRef"
-      v-model="upload.open"
+    <el-dialog
       :title="upload.title"
+      v-model="upload.open"
       width="400px"
-      :action="upload.url"
-      :headers="upload.headers"
-      :disabled="upload.isUploading"
-      :before-upload="upload.beforeUpload"
-      :on-progress="upload.onProgress"
-      :on-success="upload.onSuccess"
-      :on-error="upload.onError"
-      :on-change="upload.onChange"
-      @confirm="submitFileForm"
-      @cancel="handleImportCancel"
-      @download-template="importTemplate"
-    />
+      append-to-body
+    >
+      <el-upload
+        ref="uploadRef"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url + '?updateSupport=' + upload.updateSupport"
+        :disabled="upload.isUploading"
+        :before-upload="upload.beforeUpload"
+        :on-progress="upload.onProgress"
+        :on-success="upload.onSuccess"
+        :on-error="upload.onError"
+        :on-change="upload.onChange"
+        :auto-upload="false"
+        drag
+      >
+        <el-icon class="el-icon--upload"><upload-filled /></el-icon>
+        <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
+        <template #tip>
+          <div class="el-upload__tip text-center">
+            <span>浠呭厑璁稿鍏ls銆亁lsx鏍煎紡鏂囦欢銆�</span>
+            <el-link
+              type="primary"
+              :underline="false"
+              style="font-size: 12px; vertical-align: baseline"
+              @click="importTemplate"
+              >涓嬭浇妯℃澘</el-link
+            >
+          </div>
+        </template>
+      </el-upload>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" @click="submitFileForm">纭� 瀹�</el-button>
+          <el-button @click="upload.open = false">鍙� 娑�</el-button>
+        </div>
+      </template>
+    </el-dialog>
   </div>
 </template>
 
 <script setup>
 import {onMounted, ref} from "vue";
-import { Search, Close } from "@element-plus/icons-vue";
+import { Search } from "@element-plus/icons-vue";
 import {
   addCustomer,
   delCustomer,
@@ -232,9 +261,6 @@
 import { userListNoPage } from "@/api/system/user.js";
 import useUserStore from "@/store/modules/user";
 import { getToken } from "@/utils/auth.js";
-import { getCurrentDate } from "@/utils/index.js";
-import FormDialog from "@/components/Dialog/FormDialog.vue";
-import ImportDialog from "@/components/Dialog/ImportDialog.vue";
 const { proxy } = getCurrentInstance();
 const userStore = useUserStore();
 
@@ -312,7 +338,6 @@
 const selectedRows = ref([]);
 const userList = ref([]);
 const tableLoading = ref(false);
-const importDialogRef = ref(null);
 const page = reactive({
   current: 1,
   size: 100,
@@ -401,9 +426,7 @@
     if(response.code === 200){
       proxy.$modal.msgSuccess("鏂囦欢涓婁紶鎴愬姛");
       upload.open = false;
-      if (importDialogRef.value) {
-        importDialogRef.value.clearFiles();
-      }
+      proxy.$refs["uploadRef"].clearFiles();
       getList();
     }else if(response.code === 500){
       proxy.$modal.msgError(response.msg);
@@ -461,13 +484,7 @@
 /** 鎻愪氦涓婁紶鏂囦欢 */
 function submitFileForm() {
   upload.isUploading = true;
-  if (importDialogRef.value) {
-    importDialogRef.value.submit();
-  }
-}
-/** 鍙栨秷瀵煎叆 */
-function handleImportCancel() {
-  upload.open = false;
+  proxy.$refs["uploadRef"].submit();
 }
 /** 瀵煎叆鎸夐挳鎿嶄綔 */
 function handleImport() {
@@ -597,6 +614,15 @@
     });
 };
 
+// 鑾峰彇褰撳墠鏃ユ湡骞舵牸寮忓寲涓� YYYY-MM-DD
+function getCurrentDate() {
+  const today = new Date();
+  const year = today.getFullYear();
+  const month = String(today.getMonth() + 1).padStart(2, "0"); // 鏈堜唤浠�0寮�濮�
+  const day = String(today.getDate()).padStart(2, "0");
+  return `${year}-${month}-${day}`;
+}
+
 onMounted(() => {
 	getList();
 });

--
Gitblit v1.9.3