|  |  |  | 
|---|
|  |  |  | const DeliveryEdit = () => { | 
|---|
|  |  |  | const translate = useTranslate(); | 
|---|
|  |  |  | const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_order_type')) || []; | 
|---|
|  |  |  | const business = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_business_type')) || []; | 
|---|
|  |  |  | const business = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_business_type' && dict.group == 2)) || []; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return ( | 
|---|
|  |  |  | <> | 
|---|
|  |  |  | 
|---|
|  |  |  | <SimpleForm | 
|---|
|  |  |  | shouldUnregister | 
|---|
|  |  |  | warnWhenUnsavedChanges | 
|---|
|  |  |  | toolbar={<FormToolbar />} | 
|---|
|  |  |  | toolbar={false} | 
|---|
|  |  |  | mode="onTouched" | 
|---|
|  |  |  | sx={{ | 
|---|
|  |  |  | "& .MuiFormLabel-root.MuiInputLabel-root.Mui-disabled": { | 
|---|
|  |  |  | bgcolor: 'white', | 
|---|
|  |  |  | WebkitTextFillColor: "rgba(0, 0, 0)" | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | "& .MuiInputBase-input.MuiFilledInput-input.Mui-disabled": { | 
|---|
|  |  |  | bgcolor: 'white', | 
|---|
|  |  |  | WebkitTextFillColor: "rgba(0, 0, 0)" | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | "& .MuiFilledInput-root.MuiInputBase-sizeSmall": { | 
|---|
|  |  |  | bgcolor: 'white', | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }} | 
|---|
|  |  |  | defaultValues={{}} | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <Grid container width={{ xs: '100%', xl: '100%' }} rowSpacing={3} columnSpacing={3}> | 
|---|
|  |  |  | 
|---|
|  |  |  | label="table.field.delivery.code" | 
|---|
|  |  |  | source="code" | 
|---|
|  |  |  | parse={v => v} | 
|---|
|  |  |  | autoFocus | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <TextInput | 
|---|
|  |  |  | label="table.field.delivery.platId" | 
|---|
|  |  |  | source="platId" | 
|---|
|  |  |  | parse={v => v} | 
|---|
|  |  |  | readOnly | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <AutocompleteInput | 
|---|
|  |  |  | choices={dicts} | 
|---|
|  |  |  | 
|---|
|  |  |  | source="wkType" | 
|---|
|  |  |  | optionValue="value" | 
|---|
|  |  |  | parse={v => v} | 
|---|
|  |  |  | readOnly | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </Stack> | 
|---|
|  |  |  | <Stack direction='row' gap={2}> | 
|---|
|  |  |  | <TextInput | 
|---|
|  |  |  | label="table.field.delivery.source" | 
|---|
|  |  |  | source="source" | 
|---|
|  |  |  | parse={v => v} | 
|---|
|  |  |  | validate={required()} | 
|---|
|  |  |  | readOnly | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </Stack> | 
|---|
|  |  |  | <Stack direction='row' gap={2}> | 
|---|
|  |  |  | <NumberInput | 
|---|
|  |  |  | label="table.field.delivery.anfme" | 
|---|
|  |  |  | source="anfme" | 
|---|
|  |  |  | validate={required()} | 
|---|
|  |  |  | readOnly | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <NumberInput | 
|---|
|  |  |  | label="table.field.delivery.qty" | 
|---|
|  |  |  | source="qty" | 
|---|
|  |  |  | readOnly | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <NumberInput | 
|---|
|  |  |  | label="table.field.delivery.workQty" | 
|---|
|  |  |  | source="workQty" | 
|---|
|  |  |  | readOnly | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <TextInput | 
|---|
|  |  |  | label="table.field.delivery.platId" | 
|---|
|  |  |  | source="platId" | 
|---|
|  |  |  | parse={v => v} | 
|---|
|  |  |  | readOnly | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <TextInput | 
|---|
|  |  |  | label="table.field.delivery.platCode" | 
|---|
|  |  |  | source="platCode" | 
|---|
|  |  |  | parse={v => v} | 
|---|
|  |  |  | readOnly | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </Stack> | 
|---|
|  |  |  | <Stack direction='row' gap={2}> | 
|---|
|  |  |  | <DateInput | 
|---|
|  |  |  | label="table.field.delivery.startTime" | 
|---|
|  |  |  | source="startTime" | 
|---|
|  |  |  | readOnly | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <DateInput | 
|---|
|  |  |  | label="table.field.delivery.endTime" | 
|---|
|  |  |  | source="endTime" | 
|---|
|  |  |  | readOnly | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </Stack> | 
|---|
|  |  |  | </Grid> | 
|---|
|  |  |  | <Grid item xs={8} md={2}> | 
|---|
|  |  |  | <Typography variant="h6" gutterBottom> | 
|---|
|  |  |  | {translate('common.edit.title.common')} | 
|---|
|  |  |  | </Typography> | 
|---|
|  |  |  | <StatusSelectInput /> | 
|---|
|  |  |  | <Box mt="2em" /> | 
|---|
|  |  |  | <MemoInput /> | 
|---|
|  |  |  | </Grid> | 
|---|
|  |  |  | </Grid> | 
|---|
|  |  |  | </SimpleForm> | 
|---|