From 1db9b292fa7d458573714864f0541ba6314d3eb9 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期日, 13 九月 2026 13:52:10 +0800
Subject: [PATCH] fix: 基础产品导入修改
---
src/views/basicData/product/ImportExcel/index.vue | 21 +++------------------
1 files changed, 3 insertions(+), 18 deletions(-)
diff --git a/src/views/basicData/product/ImportExcel/index.vue b/src/views/basicData/product/ImportExcel/index.vue
index 2afbb64..90f569c 100644
--- a/src/views/basicData/product/ImportExcel/index.vue
+++ b/src/views/basicData/product/ImportExcel/index.vue
@@ -26,36 +26,21 @@
name: "浜у搧缁存姢瀵煎叆",
});
-const props = defineProps({
- productId: { type: [String, Number], default: "" },
-});
const emits = defineEmits(["uploadSuccess"]);
const fileUploadRef = ref();
const upload = reactive({
- // 鏄惁鏄剧ず寮瑰嚭灞傦紙渚涘簲鍟嗗鍏ワ級
open: false,
- // 寮瑰嚭灞傛爣棰橈紙渚涘簲鍟嗗鍏ワ級
- title: "",
+ title: "浜у搧瀵煎叆",
// 鏄惁绂佺敤涓婁紶
isUploading: false,
// 璁剧疆涓婁紶鐨勮姹傚ご閮�
headers: { Authorization: "Bearer " + getToken() },
});
-// 涓婁紶鐨勫湴鍧�锛堟惡甯� productId 鍙傛暟锛屼紶缁欏悗绔殑 importProduct 鎺ュ彛锛�
-const uploadUrl = computed(
- () =>
- import.meta.env.VITE_APP_BASE_API +
- "/basic/product/import" +
- (props.productId ? `?productId=${props.productId}` : "")
-);
+// 涓婁紶鐨勫湴鍧�
+const uploadUrl = computed(() => import.meta.env.VITE_APP_BASE_API + "/basic/product/import");
// 鐐瑰嚮瀵煎叆
const handleImport = () => {
- if (!props.productId) {
- ElMessage({ message: "璇峰厛閫夋嫨浜у搧", type: "warning" });
- return;
- }
upload.open = true;
- upload.title = "浜у搧瀵煎叆";
};
const submitFileForm = () => {
--
Gitblit v1.9.3