| | |
| | | useGetOne, |
| | | } from 'react-admin'; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import { Box, Typography, Card, Stack, Switch } from '@mui/material'; |
| | | import MyCreateButton from "@/page/components/MyCreateButton"; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import ReviseLogItemList from "./ReviseLogItemList"; |
| | | import SelectLocsRevise from "./SelectLocsRevise"; |
| | | import EditIcon from '@mui/icons-material/Edit'; |
| | | import LocsReviseDetl from "./LocsReviseDetl"; |
| | | import { styled } from '@mui/material/styles'; |
| | | import * as Common from '@/utils/common'; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | const ReviseLogList = ({ record }) => { |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | const [checked, setChecked] = useState(true); |
| | | const [item, setItem] = useState(); |
| | | const translate = useTranslate(); |
| | | const orderId = useGetRecordId(); |
| | |
| | | sort={{ field: "create_time", order: "desc" }} |
| | | actions={( |
| | | <TopToolbar> |
| | | <DiffShowButton checked={checked} setChecked={setChecked}/> |
| | | <FilterButton /> |
| | | <CreateItemButton setCreateDialog={setCreateDialog} record={record} /> |
| | | <SelectColumnsButton preferenceKey='check' /> |
| | |
| | | |
| | | export default ReviseLogList; |
| | | |
| | | //显示差异开关 |
| | | const DiffShowButton = ({checked, setChecked}) => { |
| | | const handleChange = (event) => { |
| | | setChecked(event.target.checked); |
| | | }; |
| | | |
| | | return ( |
| | | <> |
| | | <Switch |
| | | checked={checked} |
| | | size="small" |
| | | onChange={handleChange} |
| | | slotProps={{ input: { 'aria-label': 'controlled' } }} |
| | | /> |
| | | </> |
| | | ) |
| | | } |
| | | |
| | | |
| | | const CreateItemButton = ({ setCreateDialog, record }) => { |
| | | return ( |
| | | record?.exceStatus < 2 ? <MyCreateButton onClick={() => { setCreateDialog(true); }} /> : <></> |