| | |
| | | import MyField from "../components/MyField"; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE } from '@/config/setting'; |
| | | import * as Common from '@/utils/common'; |
| | | import ImportButton from '../components/ImportButton' |
| | | import { useRouteImport } from './useRouteImport'; |
| | | |
| | | import * as importTemp from './importTemp.csv?raw'; |
| | | const IMPORT_TEMP_URL = `data:text/csv;name=crm_contacts_sample.csv;charset=utf-8,${encodeURIComponent(importTemp.default)}`; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | |
| | | <TextInput source="uuid" label="table.field.route.uuid" />, |
| | | <TextInput source="name" label="table.field.route.name" />, |
| | | <ReferenceInput source="startCode" label="table.field.route.startCode" reference="code"> |
| | | <ReferenceInput source="startCode" label="table.field.route.startCode" reference="code" alwaysOn> |
| | | <AutocompleteInput label="table.field.route.startCode" optionText="data" filterToQuery={(val) => ({ data: val })} /> |
| | | </ReferenceInput>, |
| | | <ReferenceInput source="endCode" label="table.field.route.endCode" reference="code"> |
| | | <ReferenceInput source="endCode" label="table.field.route.endCode" reference="code" alwaysOn> |
| | | <AutocompleteInput label="table.field.route.endCode" optionText="data" filterToQuery={(val) => ({ data: val })} /> |
| | | </ReferenceInput>, |
| | | <TextInput source="codeArr" label="table.field.route.codeArr" />, |
| | |
| | | { id: 1, name: '正向' }, |
| | | { id: 2, name: '反向' }, |
| | | ]} |
| | | alwaysOn |
| | | />, |
| | | |
| | | <TextInput label="common.field.memo" source="memo" />, |
| | |
| | | <FilterButton /> |
| | | <MyCreateButton onClick={() => { setCreateDialog(true) }} /> |
| | | <SelectColumnsButton preferenceKey='route' /> |
| | | <ImportButton importTemp={IMPORT_TEMP_URL} useCodeImport={useRouteImport} onceBatch={10} /> |
| | | <MyExportButton /> |
| | | </TopToolbar> |
| | | )} |