From d086af5559dba52095d23e425be87d8f11f24814 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期四, 17 七月 2025 16:32:47 +0800
Subject: [PATCH] #菜单、po单

---
 rsf-admin/src/page/components/ImportModal.jsx |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/rsf-admin/src/page/components/ImportModal.jsx b/rsf-admin/src/page/components/ImportModal.jsx
index ea75029..caee07f 100644
--- a/rsf-admin/src/page/components/ImportModal.jsx
+++ b/rsf-admin/src/page/components/ImportModal.jsx
@@ -21,8 +21,8 @@
 import { usePapaParse } from './usePapaParse';
 import MatnrList from '../basicInfo/matnr/MatnrList';
 import request from '@/utils/request'
-
-const ImportModal = ({ open, onClose, importTemp, useCodeImport, onceBatch = 10, value, parmas = {} }) => {
+import ImportExportOutlinedIcon from '@mui/icons-material/ImportExportOutlined';
+const ImportModal = ({ open, onClose, importTemp, useCodeImport, onceBatch = 10, value, parmas = {}}) => {
     const refresh = useRefresh();
     const translate = useTranslate();
 
@@ -57,17 +57,17 @@
         }
         form.append('file', file);
         const { data: { code, data, msg } } = await request.post(`/${value}/import`, form)
-
         if (code === 200) {
             handleClose()
-        } else {
             notify(msg);
-
+            refresh()
+        } else {
+            handleClose()
+            notify(msg);
+            refresh()
         }
 
     };
-
-
 
     const handleClose = () => {
         reset();
@@ -86,6 +86,7 @@
         const url = window.URL.createObjectURL(
             new Blob([res.data], { type: res.headers["content-type"] }),
         );
+
         const link = document.createElement("a");
         link.href = url;
         link.setAttribute("download", `${value}.xlsx`);
@@ -221,6 +222,7 @@
                 <Toolbar
                     sx={{
                         width: '100%',
+                        justifyContent: 'end'
                     }}
                 >
                     {importer.state === 'idle' ? (
@@ -228,6 +230,8 @@
                             <Button
                                 label="common.action.import.title"
                                 variant="contained"
+                                startIcon={<ImportExportOutlinedIcon />}
+                                size='medium'
                                 onClick={startImport}
                                 disabled={!file}
                             />

--
Gitblit v1.9.1