| | |
| | | DateInput, |
| | | SelectInput, |
| | | ReferenceInput, |
| | | SelectArrayInput, |
| | | ReferenceArrayInput, |
| | | AutocompleteInput, |
| | | SaveButton, |
| | |
| | | required, |
| | | useRecordContext, |
| | | DeleteButton, |
| | | useNotify, |
| | | } from 'react-admin'; |
| | | import { useWatch, useFormContext } from "react-hook-form"; |
| | | import { Stack, Grid, Box, Typography } from '@mui/material'; |
| | |
| | | import CustomerTopToolBar from "../../components/EditTopToolBar"; |
| | | import MemoInput from "../../components/MemoInput"; |
| | | import StatusSelectInput from "../../components/StatusSelectInput"; |
| | | import request from '@/utils/request'; |
| | | |
| | | const FormToolbar = () => { |
| | | const { getValues } = useFormContext(); |
| | |
| | | const LocEdit = () => { |
| | | const translate = useTranslate(); |
| | | const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_loc_type')) || []; |
| | | |
| | | |
| | | return ( |
| | | <Edit |
| | | redirect="list" |
| | |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <AutocompleteInput |
| | | {/* <AutocompleteInput |
| | | choices={dicts} |
| | | source="type" |
| | | optionText="label" |
| | |
| | | optionValue="value" |
| | | parse={v => v} |
| | | validate={[required()]} |
| | | /> |
| | | /> */} |
| | | <ReferenceArrayInput source="typeIds" reference="locType" > |
| | | <SelectArrayInput label="table.field.loc.type" /> |
| | | </ReferenceArrayInput> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | |
| | | |
| | | </Grid> |
| | | </Grid> |
| | | <Grid item xs={12} md={2}> |