skyouc
2025-03-26 1f5173508a63509985b27d94660f6ad251d18e6e
rsf-admin/src/page/basicInfo/loc/BatchModal.jsx
@@ -55,7 +55,7 @@
import StatusSelectInput from "../../components/StatusSelectInput";
const BatchModal = ({ open, setOpen }) => {
const BatchModal = ({ open, setOpen, fieldType }) => {
    const refresh = useRefresh();
    const translate = useTranslate();
@@ -128,14 +128,15 @@
    }
    return (
        <Dialog open={open} maxWidth="md" fullWidth>
        <Dialog open={open} maxWidth="xs" fullWidth>
            <Form onSubmit={handleSubmit}>
                <DialogCloseButton onClose={handleClose} />
                <DialogTitle>{translate('toolbar.batch')}</DialogTitle>
                <DialogContent sx={{ mt: 2 }}>
                    <Box sx={{ display: 'flex', flexDirection: 'column', gap: 3 }}>
                        <Grid container spacing={2}>
                            <Grid item xs={4}>
                            {fieldType === 'warehouseId' &&
                                <Grid item xs={6}>
                                <ReferenceInput
                                    source="warehouseId"
                                    reference="warehouse"
@@ -143,19 +144,17 @@
                                    <AutocompleteInput
                                        label="table.field.loc.warehouseId"
                                        optionText="name"
                                        onChange={(value) => handleChange(value, 'warehouseId')}
                                        value={formData.warehouseId}
                                        filterToQuery={(val) => ({ name: val })}
                                    />
                                </ReferenceInput>
                            </Grid>
                            <Grid item xs={4}>
                            }
                            {fieldType === 'areaId' &&
                                <Grid item xs={6}>
                                <ReferenceInput
                                    source="areaId"
                                    reference="warehouseAreas"
                                    filter={{ warehouseId: formData.warehouseId }}
                                >
                                    <AutocompleteInput
                                        label="table.field.loc.areaId"
@@ -167,8 +166,9 @@
                                </ReferenceInput>
                            </Grid>
                            <Grid item xs={4}>
                            }
                            {fieldType === 'typeIds' &&
                                <Grid item xs={6}>
                                {/* <DictionarySelect
                                    label={translate("table.field.loc.type")}
                                    name="type"
@@ -181,15 +181,17 @@
                                    <SelectArrayInput label="table.field.loc.type" onChange={(e) => handleChange(e.target.value, 'typeIds')} />
                                </ReferenceArrayInput>
                            </Grid>
                            }
                            <Grid item xs={4}>
                            {fieldType === 'status' &&
                                <Grid item xs={6}>
                                <StatusSelectInput
                                    onChange={(e) => handleChange(e.target.value, 'status')}
                                    defaultValue={''}
                                    require={false}
                                />
                            </Grid>
                            }
                        </Grid>
                    </Box>