From ec7bdf965d4d7be3483046ece279b4ceea182163 Mon Sep 17 00:00:00 2001
From: yaowanxin <3588231647@qq.com>
Date: 星期三, 31 十二月 2025 10:36:43 +0800
Subject: [PATCH] 按模版进行产品导入,引用模板下载,更新模板下载接口路径

---
 src/views/basicData/product/ImportExcel/index.vue |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/views/basicData/product/ImportExcel/index.vue b/src/views/basicData/product/ImportExcel/index.vue
index 0dc4ea6..fe77420 100644
--- a/src/views/basicData/product/ImportExcel/index.vue
+++ b/src/views/basicData/product/ImportExcel/index.vue
@@ -5,7 +5,7 @@
   <el-dialog v-model="upload.open" :title="upload.title">
     <FileUpload
       ref="fileUploadRef"
-      accept=".xlsx, .xls"
+      accept=".xlsx,.xls"
       :headers="upload.headers"
       :action="upload.url + '?updateSupport=' + upload.updateSupport"
       :disabled="upload.isUploading"
@@ -23,11 +23,12 @@
 </template>
 
 <script setup>
-import { reactive } from "vue";
+import { reactive, ref, getCurrentInstance } from "vue";
 import { getToken } from "@/utils/auth.js";
 import { FileUpload } from "@/components/Upload";
 import { ElMessage } from "element-plus";
 
+const { proxy } = getCurrentInstance();
 defineOptions({
   name: "浜у搧缁存姢瀵煎叆",
 });
@@ -45,6 +46,7 @@
   headers: { Authorization: "Bearer " + getToken() },
   // 涓婁紶鐨勫湴鍧�
   url: import.meta.env.VITE_APP_BASE_API + "/system/supplier/import",
+  updateSupport: true,
 });
 // 鐐瑰嚮瀵煎叆
 const handleImport = () => {
@@ -54,7 +56,7 @@
 
 // 涓嬭浇妯℃澘
 const downloadTemplate = () =>{
-  proxy.download("/basic/customer/downloadTemplate", {}, "浜у搧瀵煎叆妯℃澘.xlsx");
+  proxy.download("/basic/product/downloadTemplate", {}, "浜у搧瀵煎叆妯℃澘.xlsx");
 }
 
 const submitFileForm = () => {

--
Gitblit v1.9.3