skyouc
2025-03-21 65a30e30a0df5d92bdf5290a636db56ca79b9562
rsf-admin/src/page/basicInfo/loc/InitModal.jsx
@@ -19,6 +19,7 @@
    useCreateController,
    useListContext,
    useRefresh,
    SelectArrayInput
} from 'react-admin';
import {
    Dialog,
@@ -70,7 +71,8 @@
        "startBay": undefined,
        "startLev": undefined,
        "startRow": undefined,
        "type": ""
        "type": "",
        "typeIds": undefined,
    });
    const handleClose = (event, reason) => {
@@ -133,21 +135,14 @@
                                    value={formData.locType}
                                    onChange={(e) => handleChange(e.target.value, 'locType')}
                                    size="small"
                                    validate={[required()]}
                                    dictTypeCode="sys_width_type"
                                />
                            </Grid>
                            <Grid item xs={4}>
                                <DictionarySelect
                                    label={translate("table.field.loc.type")}
                                    name="type"
                                    value={formData.type}
                                    onChange={(e) => handleChange(e.target.value, 'type')}
                                    size="small"
                                    validate={[required()]}
                                    dictTypeCode="sys_loc_type"
                                />
                                <ReferenceArrayInput source="typeIds" reference="locType" >
                                    <SelectArrayInput label="table.field.loc.type" onChange={(e) => handleChange(e.target.value, 'typeIds')} />
                                </ReferenceArrayInput>
                            </Grid>
                            <Grid item xs={4}>
@@ -229,7 +224,7 @@
                <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 />}>
                            确认
                            {translate('toolbar.confirm')}
                        </Button>
                    </Box>
                </DialogActions>