| | |
| | | TextField, |
| | | NumberField, |
| | | DateField, |
| | | useRefresh, |
| | | BooleanField, |
| | | ReferenceField, |
| | | TextInput, |
| | | Button, |
| | | DateTimeInput, |
| | | DateInput, |
| | | SelectInput, |
| | |
| | | DeleteButton, |
| | | } from 'react-admin'; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting.js'; |
| | | import { Box, Typography, Card, Stack, } from '@mui/material'; |
| | | import MyCreateButton from "../../components/MyCreateButton.jsx"; |
| | | import MyExportButton from '../../components/MyExportButton.jsx'; |
| | | import PageEditDrawer from "../../components/PageEditDrawer"; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import ConfirmButton from '../../components/ConfirmButton'; |
| | | import PageDrawer from "../../components/PageDrawer.jsx"; |
| | | import EmptyData from "../../components/EmptyData.jsx"; |
| | | import AddTaskIcon from '@mui/icons-material/AddTask'; |
| | | import MyField from "../../components/MyField.jsx"; |
| | | import TransferOrders from "./TransferOrders.jsx"; |
| | | import TransferCreate from "./TransferCreate.jsx"; |
| | | import { styled } from '@mui/material/styles'; |
| | | import TransferPanel from "./TransferPanel.jsx"; |
| | | import * as Common from '@/utils/common.js'; |
| | | import ManualCreate from "./ManualCreate.jsx"; |
| | | import { styled } from '@mui/material/styles'; |
| | | import * as Common from '@/utils/common.js'; |
| | | import request from '@/utils/request'; |
| | | |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | const translate = useTranslate(); |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | const [select, setSelect] = useState({}); |
| | | |
| | | return ( |
| | | <Box display="flex"> |
| | |
| | | preferenceKey='transfer' |
| | | bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />} |
| | | rowClick={(id, resource, record) => false} |
| | | expand={() => <TransferPanel />} |
| | | expand={() => <TransferOrders />} |
| | | expandSingle={true} |
| | | omit={['id', 'createTime', 'createBy$', 'memo', 'orgWareId', 'tarWareId', 'orgAreaId', 'tarAreaId']} |
| | | > |
| | |
| | | <WrapperField cellClassName="opt" label="common.field.opt"> |
| | | <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} /> |
| | | <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} /> |
| | | <PublicButton setDrawerVal={setDrawerVal} drawerVal={drawerVal} setSelect={setSelect} /> |
| | | </WrapperField> |
| | | </StyledDatagrid> |
| | | </List> |
| | |
| | | } |
| | | |
| | | export default TransferList; |
| | | |
| | | //下发执行 |
| | | const PublicButton = ({ setDrawerVal, setSelect }) => { |
| | | const record = useRecordContext(); |
| | | const refresh = useRefresh(); |
| | | const taskEvent = async () => { |
| | | const { data: { code, data, msg } } = await request.post(`/transfer/pub/outStock`, record); |
| | | if (code === 200) { |
| | | notify(msg); |
| | | refresh() |
| | | } else { |
| | | notify(msg); |
| | | } |
| | | refresh(); |
| | | } |
| | | |
| | | return ( |
| | | <ConfirmButton label={"toolbar.publicWorking"} startIcon={<AddTaskIcon />} onConfirm={taskEvent} size={"small"} /> |
| | | ) |
| | | } |