Merge branch 'front' into devlop
| | |
| | | DATA_PROVIDER_SPRING, |
| | | } from "./config/setting"; |
| | | import ResourceContent from "./page/ResourceContent"; |
| | | import { getSystemInfo, getSystemDicts } from "@/api/auth"; |
| | | import { getSystemInfo, getSystemDicts, tenants } from "@/api/auth"; |
| | | |
| | | const i18nProvider = polyglotI18nProvider( |
| | | (locale) => { |
| | |
| | | getSystemInfo().then((data) => { |
| | | localStorage.setItem("system", JSON.stringify(data)); |
| | | }) |
| | | getSystemDicts().then(data => { |
| | | localStorage.setItem('sys_dicts', JSON.stringify(data)); |
| | | }) |
| | | }, []); |
| | | |
| | | return ( |
| | |
| | | |
| | | const translate = useTranslate(); |
| | | const notify = useNotify(); |
| | | const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_companys_type')) || []; |
| | | |
| | | const handleClose = (event, reason) => { |
| | | if (reason !== "backdropClick") { |
| | |
| | | </DialogTitle> |
| | | <DialogContent sx={{ mt: 2 }}> |
| | | <Grid container rowSpacing={2} columnSpacing={2}> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | {/* <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.companys.code" |
| | | source="code" |
| | | parse={v => v} |
| | | autoFocus |
| | | /> |
| | | </Grid> |
| | | </Grid> */} |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.companys.name" |
| | |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | <AutocompleteInput |
| | | choices={dicts} |
| | | optionText="label" |
| | | label="table.field.companys.type" |
| | | source="type" |
| | | optionValue="value" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | validate={[required()]} /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | |
| | | |
| | | const CompanysEdit = () => { |
| | | const translate = useTranslate(); |
| | | const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_companys_type')) || []; |
| | | |
| | | return ( |
| | | <Edit |
| | |
| | | <Typography variant="h6" gutterBottom> |
| | | {translate('common.edit.title.main')} |
| | | </Typography> |
| | | <Stack direction='row' gap={2}> |
| | | {/* <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.companys.code" |
| | | source="code" |
| | | parse={v => v} |
| | | autoFocus |
| | | /> |
| | | </Stack> |
| | | </Stack> */} |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.companys.name" |
| | |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | <AutocompleteInput |
| | | choices={dicts} |
| | | optionText="label" |
| | | label="table.field.companys.type" |
| | | source="type" |
| | | optionValue="value" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | validate={[required()]} /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | |
| | | <TextInput source="code" label="table.field.companys.code" />, |
| | | <TextInput source="name" label="table.field.companys.name" />, |
| | |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.companys"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | |
| | | omit={['id', 'createTime', 'createBy', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <TextField source="code" label="table.field.companys.code" /> |
| | | {/* <TextField source="code" label="table.field.companys.code" /> */} |
| | | <TextField source="name" label="table.field.companys.name" /> |
| | | <TextField source="nameEn" label="table.field.companys.nameEn" /> |
| | | <TextField source="breifCode" label="table.field.companys.breifCode" /> |
| | |
| | | 'status': null |
| | | }); |
| | | |
| | | const { selectedIds } = useListContext(); |
| | | const { selectedIds, onUnselectItems } = useListContext(); |
| | | |
| | | const handleClose = (event, reason) => { |
| | | if (reason !== "backdropClick") { |
| | | setOpen(false); |
| | | reset() |
| | | refresh(); |
| | | onUnselectItems() |
| | | } |
| | | }; |
| | | |
| | |
| | | label={translate("table.field.loc.type")} |
| | | name="type" |
| | | value={formData.type} |
| | | onChange={(e) => handleChange(+e.target.value, 'type')} |
| | | onChange={(e) => handleChange(e.target.value, 'type')} |
| | | size="small" |
| | | dictTypeCode="sys_loc_type" |
| | | /> |
| | |
| | | 'status': null |
| | | }); |
| | | |
| | | const { selectedIds } = useListContext(); |
| | | const { selectedIds, onUnselectItems } = useListContext(); |
| | | |
| | | const handleClose = (event, reason) => { |
| | | if (reason !== "backdropClick") { |
| | | setOpen(false); |
| | | reset() |
| | | refresh(); |
| | | onUnselectItems() |
| | | } |
| | | }; |
| | | |
| | |
| | | |
| | | const translate = useTranslate(); |
| | | const notify = useNotify(); |
| | | const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_ware_areas_type')) || []; |
| | | const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_container_type')) || []; |
| | | const handleClose = (event, reason) => { |
| | | if (reason !== "backdropClick") { |
| | | setOpen(false); |
| | |
| | | |
| | | const ContainerEdit = () => { |
| | | const translate = useTranslate(); |
| | | const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_ware_areas_type')) || []; |
| | | const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_container_type')) || []; |
| | | |
| | | return ( |
| | | <Edit |
| | |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | |
| | | <TextInput source="code" label="table.field.container.code" />, |
| | | <TextInput source="name" label="table.field.container.name" />, |
| | |
| | | omit={['id', 'createTime', 'createBy', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <TextField source="code" label="table.field.container.code" /> |
| | | {/* <TextField source="code" label="table.field.container.code" /> */} |
| | | <TextField source="name" label="table.field.container.name" /> |
| | | <NumberField source="type" label="table.field.container.typeId" /> |
| | | <NumberField source="used" label="table.field.container.used" /> |
| | |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | |
| | | <TextInput source="code" label="table.field.contract.code" />, |
| | | <TextInput source="name" label="table.field.contract.name" />, |
| | |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.contract"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <ReferenceInput source="shipperId" reference="companys"> |
| | | <ReferenceInput source="shipperId" reference="companys" filter={{ type: 'shipper' }}> |
| | | <AutocompleteInput |
| | | label="table.field.warehouseAreas.shipperId" |
| | | optionText="name" |
| | |
| | | </ReferenceInput> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <ReferenceInput source="supplierId" reference="companys"> |
| | | <ReferenceInput source="supplierId" reference="companys" filter={{ type: 'supplier' }}> |
| | | <AutocompleteInput |
| | | label="table.field.warehouseAreas.supplierId" |
| | | optionText="name" |
| | |
| | | source="shipperId" |
| | | reference="companys" |
| | | perPage={REFERENCE_INPUT_PAGESIZE} |
| | | filter={{ type: 'shipper' }} |
| | | > |
| | | <AutocompleteInput |
| | | label="table.field.warehouseAreas.shipperId" |
| | |
| | | <ReferenceInput |
| | | source="supplierId" |
| | | reference="companys" |
| | | filter={{ type: 'supplier' }} |
| | | > |
| | | <AutocompleteInput |
| | | label="table.field.warehouseAreas.supplierId" |