From e0699ce1a404b1d819d7ef0b40cfd2631bb964d1 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期四, 12 三月 2026 17:56:06 +0800
Subject: [PATCH] 问题修改

---
 src/views/basicData/product/index.vue |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/src/views/basicData/product/index.vue b/src/views/basicData/product/index.vue
index c4c8f06..538687f 100644
--- a/src/views/basicData/product/index.vue
+++ b/src/views/basicData/product/index.vue
@@ -12,6 +12,9 @@
         <el-button type="primary"
                    @click="openProDia1('addOne')"
                    style="margin-left: 10px">鏂板浜у搧澶х被</el-button>
+        <el-button type="primary"
+                   @click="getloadData"
+                   style="margin-left: 10px">鎷夊彇鏁版嵁</el-button>
       </div>
       <div ref="containerRef">
         <el-tree ref="tree"
@@ -280,6 +283,7 @@
     addOrEditProductConfig,
     updateOrEditProductConfig,
     delProductConfig,
+    loadData,
   } from "@/api/basicData/newProduct.js";
   import ImportExcel from "./ImportExcel/index.vue";
 
@@ -301,6 +305,20 @@
   const expandedKeys = ref([]);
   const inventoryCategoryList = ref([]);
   const materialTypeList = ref([]);
+
+  const getloadData = () => {
+    loadData()
+      .then(res => {
+        getInventoryCategoryList();
+        getMaterialTypeList();
+        getProductTreeList();
+        tableData.value = [];
+        isShowButton.value = false;
+      })
+      .catch(err => {
+        console.error("鎷夊彇澶辫触:", err);
+      });
+  };
 
   // 鑾峰彇瀛樿揣绫诲埆鍒楄〃
   const getInventoryCategoryList = () => {
@@ -561,12 +579,14 @@
             proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
             closeConfigDia();
             getProductTreeList();
+            getMaterialTypeList();
           });
         } else {
           addOrEditProductConfig(params).then(res => {
             proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
             closeConfigDia();
             getProductTreeList();
+            getMaterialTypeList();
           });
         }
       }
@@ -772,8 +792,8 @@
     gap: 20px;
   }
   .left {
-    width: 450px;
-    min-width: 450px;
+    width: 465px;
+    min-width: 465px;
     background: #ffffff;
     border-radius: 8px;
     box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);

--
Gitblit v1.9.3