|  |  | 
 |  |  | import CustomerTopToolBar from "../components/EditTopToolBar"; | 
 |  |  | import MemoInput from "../components/MemoInput"; | 
 |  |  | import StatusSelectInput from "../components/StatusSelectInput"; | 
 |  |  | import DictionarySelect from "../components/DictionarySelect"; | 
 |  |  | import DictSelect from "../components/DictSelect"; | 
 |  |  |  | 
 |  |  | const FormToolbar = () => { | 
 |  |  |     const { getValues } = useFormContext(); | 
 |  |  | 
 |  |  |  | 
 |  |  | const WarehouseAreasEdit = () => { | 
 |  |  |     const translate = useTranslate(); | 
 |  |  |     const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_ware_areas_type')) || []; | 
 |  |  |  | 
 |  |  |     return ( | 
 |  |  |         <Edit | 
 |  |  | 
 |  |  |                 defaultValues={{}} | 
 |  |  |             // validate={(values) => { }} | 
 |  |  |             > | 
 |  |  |                 <Grid container width={{ xs: '100%', xl: '80%' }} rowSpacing={3} columnSpacing={3}> | 
 |  |  |                     <Grid item xs={12} md={8}> | 
 |  |  |                 <Grid container width={{ xs: '100%', xl: '100%' }} rowSpacing={3} columnSpacing={3}> | 
 |  |  |                     <Grid item xs={16} md={10}> | 
 |  |  |                         <Typography variant="h6" gutterBottom> | 
 |  |  |                             {translate('common.edit.title.main')} | 
 |  |  |                         </Typography> | 
 |  |  |                         <Stack direction='row' gap={2}> | 
 |  |  |                         {/* <Stack direction='row' gap={2}> | 
 |  |  |                             <TextInput | 
 |  |  |                                 label="table.field.warehouseAreas.uuid" | 
 |  |  |                                 source="uuid" | 
 |  |  |                                 parse={v => v} | 
 |  |  |                                 validate={[required()]} | 
 |  |  |                                 autoFocus | 
 |  |  |                             /> | 
 |  |  |                         </Stack> | 
 |  |  |                         <Stack direction='row' gap={2}> | 
 |  |  |                         </Stack> */} | 
 |  |  |                         <Stack xs={16} direction='row' gap={2}> | 
 |  |  |                             <TextInput | 
 |  |  |                                 label="table.field.warehouseAreas.name" | 
 |  |  |                                 source="name" | 
 |  |  |                                 validate={[required()]} | 
 |  |  |                                 parse={v => v} | 
 |  |  |                             /> | 
 |  |  |                         </Stack> | 
 |  |  |                         <Stack direction='row' gap={2}> | 
 |  |  |                             <TextInput | 
 |  |  |                                 label="table.field.warehouseAreas.code" | 
 |  |  |                                 source="code" | 
 |  |  |                                 validate={[required()]} | 
 |  |  |                                 parse={v => v} | 
 |  |  |                             /> | 
 |  |  |                             <DictionarySelect | 
 |  |  |                                 label='table.field.warehouseAreas.type' | 
 |  |  |                                 name="type" | 
 |  |  |                                 dictTypeCode="sys_ware_areas_type" | 
 |  |  |                                 alwaysOn                                 | 
 |  |  |                             /> | 
 |  |  |                             <ReferenceInput | 
 |  |  |                                 source="warehouseId" | 
 |  |  |                                 reference="warehouse" | 
 |  |  |                             > | 
 |  |  |                                 <AutocompleteInput | 
 |  |  |                                     label="table.field.warehouseAreas.wareId" | 
 |  |  |                                     optionText="name" | 
 |  |  |                                     optionValue="id" | 
 |  |  |                                     validate={[required()]} | 
 |  |  |                                     filterToQuery={(val) => ({ name: val })} | 
 |  |  |                                 /> | 
 |  |  |                             </ReferenceInput> | 
 |  |  |                         </Stack> | 
 |  |  |                         <Stack direction='row' gap={2}> | 
 |  |  |                             <ReferenceInput | 
 |  |  |                                 source="shipperId" | 
 |  |  |                                 reference="shipper" | 
 |  |  |                                 perPage={REFERENCE_INPUT_PAGESIZE} | 
 |  |  |                                 reference="companys" | 
 |  |  |                                 filter={{ type: 'shipper' }} | 
 |  |  |                             > | 
 |  |  |                                 <AutocompleteInput | 
 |  |  |                                     label="table.field.warehouseAreas.shipperId" | 
 |  |  | 
 |  |  |                                     filterToQuery={(val) => ({ name: val })} | 
 |  |  |                                 /> | 
 |  |  |                             </ReferenceInput> | 
 |  |  |                         </Stack> | 
 |  |  |                         <Stack direction='row' gap={2}> | 
 |  |  |                             <NumberInput | 
 |  |  |                                 label="table.field.warehouseAreas.supplierId" | 
 |  |  |                             <ReferenceInput | 
 |  |  |                                 source="supplierId" | 
 |  |  |                             /> | 
 |  |  |                         </Stack> | 
 |  |  |                         <Stack direction='row' gap={2}> | 
 |  |  |                                 reference="companys" | 
 |  |  |                                 filter={{ type: 'supplier' }} | 
 |  |  |                             > | 
 |  |  |                                 <AutocompleteInput | 
 |  |  |                                     label="table.field.warehouseAreas.supplierId" | 
 |  |  |                                     optionText="name" | 
 |  |  |                                     filterToQuery={(val) => ({ name: val })} | 
 |  |  |                                 /> | 
 |  |  |                             </ReferenceInput> | 
 |  |  |                             <SelectInput | 
 |  |  |                                 label="table.field.warehouseAreas.flagMinus" | 
 |  |  |                                 source="flagMinus" | 
 |  |  |                                 validate={[required()]} | 
 |  |  |                                 choices={[ | 
 |  |  |                                     { id: 0, name: '否' }, | 
 |  |  |                                     { id:  1, name: '是' }, | 
 |  |  |                                     { id: 1, name: '是' }, | 
 |  |  |                                 ]} | 
 |  |  |                             /> | 
 |  |  |                         </Stack> | 
 |  |  |                         <Stack direction='row' gap={2}> | 
 |  |  |                             <SelectInput | 
 |  |  |                                 label="table.field.warehouseAreas.flagLabelMange" | 
 |  |  |                                 source="flagLabelMange" | 
 |  |  |                                 validate={[required()]} | 
 |  |  |                                 choices={[ | 
 |  |  |                                     { id: 0, name: ' 否' }, | 
 |  |  |                                     { id:  1, name: ' 是' }, | 
 |  |  |                                     { id: 1, name: ' 是' }, | 
 |  |  |                                 ]} | 
 |  |  |                                 validate={required()} | 
 |  |  |                             /> | 
 |  |  |                         </Stack> | 
 |  |  |                         <Stack direction='row' gap={2}> | 
 |  |  |                             <SelectInput | 
 |  |  |                                 label="table.field.warehouseAreas.flagMix" | 
 |  |  |                                 source="flagMix" | 
 |  |  |                                 validate={[required()]} | 
 |  |  |                                 choices={[ | 
 |  |  |                                     { id: 0, name: '否' }, | 
 |  |  |                                     { id:  1, name: '是' }, | 
 |  |  |                                     { id: 1, name: '是' }, | 
 |  |  |                                 ]} | 
 |  |  |                                 validate={required()} | 
 |  |  |                             /> | 
 |  |  |                         </Stack> | 
 |  |  |  | 
 |  |  |                     </Grid> | 
 |  |  |                     <Grid item xs={12} md={4}> | 
 |  |  |                     <Grid item xs={8} md={2}> | 
 |  |  |                         <Typography variant="h6" gutterBottom> | 
 |  |  |                             {translate('common.edit.title.common')} | 
 |  |  |                         </Typography> |