| | |
| | | |
| | | const PurchaseEdit = () => { |
| | | const translate = useTranslate(); |
| | | |
| | | const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_in_stock_type')) || []; |
| | | const business = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_business_type'))?.filter(data => (data.group == '1')) || []; |
| | | return ( |
| | | <> |
| | | <Edit |
| | |
| | | defaultValues={{}} |
| | | // validate={(values) => { }} |
| | | > |
| | | <Grid container width={{ xs: '100%', xl: '80%' }} rowSpacing={3} columnSpacing={3}> |
| | | <Grid container width={{ xs: '100%', xl: '100%' }} rowSpacing={3} columnSpacing={3}> |
| | | <Grid item xs={18} md={10}> |
| | | <Typography variant="h6" gutterBottom> |
| | | {translate('common.edit.title.main')} |
| | |
| | | /> |
| | | </Stack> */} |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.purchase.type" |
| | | source="type$" |
| | | <AutocompleteInput |
| | | choices={dicts} |
| | | optionText="label" |
| | | label="table.field.asnOrder.type" |
| | | source="type" |
| | | optionValue="value" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | <AutocompleteInput |
| | | choices={business} |
| | | optionText="label" |
| | | label="table.field.asnOrder.wkType" |
| | | source="wkType" |
| | | optionValue="value" |
| | | parse={v => v} |
| | | /> |
| | | <TextInput |
| | | label="table.field.purchase.source" |
| | | source="source" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | <DateInput |
| | | label="table.field.purchase.preArr" |
| | | source="preArr" |
| | | /> |
| | | <NumberInput |
| | | label="table.field.purchase.anfme" |
| | |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.purchase.qty" |
| | | source="qty" |
| | | validate={required()} |
| | | /> |
| | | <NumberInput |
| | | label="table.field.purchase.workQty" |
| | | source="workQty" |
| | | validate={required()} |
| | | <TextInput |
| | | label="table.field.purchase.project" |
| | | source="project" |
| | | parse={v => v} |
| | | /> |
| | | <TextInput |
| | | label="table.field.purchase.channel" |
| | |
| | | source="platCode" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <DateInput |
| | | <DateInput |
| | | label="table.field.purchase.startTime" |
| | | source="startTime" |
| | | /> |
| | | <DateInput |
| | | label="table.field.purchase.endTime" |
| | | source="endTime" |
| | | /> |
| | | <TextInput |
| | | label="table.field.purchase.project" |
| | | source="project" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | </Grid> |
| | |
| | | </Grid> |
| | | </SimpleForm> |
| | | </Edit > |
| | | <PurchaseItemList /> |
| | | <PurchaseItemList /> |
| | | </> |
| | | ) |
| | | } |