From 7aa1d1fac96e4241ccf35aa3a19d95d62fab623b Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期五, 28 三月 2025 15:45:30 +0800
Subject: [PATCH] Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop

---
 rsf-admin/src/page/basicInfo/loc/InitModal.jsx |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/rsf-admin/src/page/basicInfo/loc/InitModal.jsx b/rsf-admin/src/page/basicInfo/loc/InitModal.jsx
index a02d8b9..c3c685a 100644
--- a/rsf-admin/src/page/basicInfo/loc/InitModal.jsx
+++ b/rsf-admin/src/page/basicInfo/loc/InitModal.jsx
@@ -61,6 +61,7 @@
 
 
     const notify = useNotify();
+    const [disabled, setDisabled] = useState(false)
 
     const [formData, setFormData] = useState({
         "warehouseId": null,
@@ -94,6 +95,7 @@
     };
 
     const handleSubmit = async () => {
+        setDisabled(true)
         const res = await request.post(`/loc/init`, formData);
         if (res?.data?.code === 200) {
             setOpen(false);
@@ -101,6 +103,7 @@
         } else {
             notify(res.data.msg);
         }
+        setDisabled(false)
     }
 
 
@@ -149,8 +152,8 @@
 
 
                             <Grid item xs={4}>
-                                <ReferenceArrayInput source="typeIds" reference="locType" >
-                                    <SelectArrayInput label="table.field.loc.type" onChange={(e) => handleChange(e.target.value, 'typeIds')} />
+                                <ReferenceArrayInput source="typeIds" reference="dictData" filter={{}}>
+                                    <SelectArrayInput label="table.field.loc.type" onChange={(e) => handleChange(e.target.value, 'typeIds')} validate={[required()]} />
                                 </ReferenceArrayInput>
                             </Grid>
 
@@ -232,10 +235,11 @@
                 </DialogContent>
                 <DialogActions sx={{ position: 'sticky', bottom: 0, backgroundColor: 'background.paper', zIndex: 1000 }}>
                     <Box sx={{ width: '100%', display: 'flex', justifyContent: 'space-between' }}>
-                        <Button type="submit" variant="contained" startIcon={<SaveIcon />}>
+                        <Button disabled={disabled} type="submit" variant="contained" startIcon={<SaveIcon />} >
                             {translate('toolbar.confirm')}
                         </Button>
                     </Box>
+
                 </DialogActions>
             </Form>
         </Dialog>

--
Gitblit v1.9.1