| | |
| | | import MyExportButton from '../../components/MyExportButton'; |
| | | import InitButton from './InitButton'; |
| | | import BatchModal from './BatchModal'; |
| | | import SubzoneModal from './SubzoneModal'; |
| | | import PageDrawer from "../../components/PageDrawer"; |
| | | import MyField from "../../components/MyField"; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | |
| | | import DashboardIcon from '@mui/icons-material/Dashboard'; |
| | | import EditIcon from '@mui/icons-material/Edit'; |
| | | import request from '@/utils/request'; |
| | | |
| | | import DiscountIcon from '@mui/icons-material/Discount'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | |
| | | const LocList = () => { |
| | | const translate = useTranslate(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | |
| | | const dynamicFields = [ |
| | | { type: 'text', source: 'code', label: '测试1' }, |
| | | { type: 'text', source: 'type$', label: '测试2' }, |
| | | ]; |
| | | |
| | | return ( |
| | | <Box display="flex"> |
| | | <List |
| | |
| | | bulkActionButtons={ |
| | | <> |
| | | <BatchButton /> |
| | | <SubzoneButton /> |
| | | <BulkDeleteButton /> |
| | | </> |
| | | } |
| | | rowClick={() => false} |
| | | expand={() => <LocPanel />} |
| | | omit={['id', 'createTime', 'createBy', 'memo', 'updateTime', 'updateBy']} |
| | | > |
| | | <NumberField source="id" /> |
| | |
| | | <DateField source="createTime" label="common.field.createTime" showTime /> |
| | | <BooleanField source="statusBool" label="common.field.status" sortable={false} /> |
| | | <TextField source="memo" label="common.field.memo" sortable={false} /> |
| | | |
| | | {/* <DynamicField fields={dynamicFields} /> */} |
| | | |
| | | <WrapperField cellClassName="opt" label="common.field.opt"> |
| | | <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} /> |
| | |
| | | </> |
| | | |
| | | ) |
| | | } |
| | | |
| | | const SubzoneButton = () => { |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | |
| | | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | |
| | | return ( |
| | | <> |
| | | <Button onClick={() => setCreateDialog(true)} label={"toolbar.subzone"}> |
| | | <DiscountIcon /> |
| | | </Button> |
| | | |
| | | <SubzoneModal |
| | | open={createDialog} |
| | | setOpen={setCreateDialog} |
| | | /> |
| | | </> |
| | | |
| | | ) |
| | | } |