From b9a181c2b259589e90a443fe125ebef7eddb2202 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 10 七月 2025 11:13:37 +0800
Subject: [PATCH] 页面所有增删编辑操作,回车键会导致刷新,数据内容更改失败(取消回车键的触发)

---
 src/views/basicData/supplierManage/index.vue |   26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/src/views/basicData/supplierManage/index.vue b/src/views/basicData/supplierManage/index.vue
index 5aaed78..22216e3 100644
--- a/src/views/basicData/supplierManage/index.vue
+++ b/src/views/basicData/supplierManage/index.vue
@@ -35,8 +35,6 @@
         :isSelection="true"
         @selection-change="handleSelectionChange"
         :tableLoading="tableLoading"
-        @pagination="pagination"
-        :total="total"
       ></PIMTable>
     </div>
     <el-dialog
@@ -201,13 +199,13 @@
         <template #tip>
           <div class="el-upload__tip text-center">
             <span>浠呭厑璁稿鍏ls銆亁lsx鏍煎紡鏂囦欢銆�</span>
-            <el-link
+            <!-- <el-link
               type="primary"
               :underline="false"
               style="font-size: 12px; vertical-align: baseline"
               @click="importTemplate"
               >涓嬭浇妯℃澘</el-link
-            >
+            > -->
           </div>
         </template>
       </el-upload>
@@ -300,8 +298,8 @@
 const page = reactive({
   current: 1,
   size: 10,
+  total: 0,
 });
-const total = ref(0);
 
 // 鐢ㄦ埛淇℃伅琛ㄥ崟寮规鏁版嵁
 const operationType = ref("");
@@ -352,6 +350,7 @@
 };
 /** 鎻愪氦涓婁紶鏂囦欢 */
 function submitFileForm() {
+  console.log(upload.url + '?updateSupport=' + upload.updateSupport)
   proxy.$refs["uploadRef"].submit();
 }
 const getList = () => {
@@ -359,7 +358,7 @@
   listSupplier({ ...searchForm.value, ...page }).then((res) => {
     tableLoading.value = false;
     tableData.value = res.data.records;
-    total.value = res.data.total;
+    page.total = res.data.total;
   });
 };
 const upload = reactive({
@@ -369,6 +368,8 @@
   title: "",
   // 鏄惁绂佺敤涓婁紶
   isUploading: false,
+  // 鏄惁鏇存柊宸茬粡瀛樺湪鐨勭敤鎴锋暟鎹�
+  updateSupport: 1,
   // 璁剧疆涓婁紶鐨勮姹傚ご閮�
   headers: { Authorization: "Bearer " + getToken() },
   // 涓婁紶鐨勫湴鍧�
@@ -379,6 +380,19 @@
   upload.title = "渚涘簲鍟嗗鍏�";
   upload.open = true;
 }
+
+/**鏂囦欢涓婁紶涓鐞� */
+const handleFileUploadProgress = (event, file, fileList) => {
+  upload.isUploading = true;
+};
+
+/** 鏂囦欢涓婁紶鎴愬姛澶勭悊 */
+const handleFileSuccess = (response, file, fileList) => {
+  upload.open = false;
+  upload.isUploading = false;
+  proxy.$refs["uploadRef"].handleRemove(file);
+  getList();
+};
 // 琛ㄦ牸閫夋嫨鏁版嵁
 const handleSelectionChange = (selection) => {
   selectedRows.value = selection;

--
Gitblit v1.9.3