| | |
| | | ReferenceArrayInput, |
| | | AutocompleteInput, |
| | | DeleteButton, |
| | | useGetRecordId, |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | |
| | | <NumberInput source="checkId" label="table.field.checkDiffItem.checkId" />, |
| | | <TextInput source="orderCode" label="table.field.checkDiffItem.orderCode" />, |
| | | <TextInput source="maktx" label="table.field.checkDiffItem.maktx" />, |
| | |
| | | <NumberInput source="checkQty" label="table.field.checkDiffItem.checkQty" />, |
| | | <NumberInput source="exceStatus" label="table.field.checkDiffItem.exceStatus" />, |
| | | <TextInput source="reason" label="table.field.checkDiffItem.reason" />, |
| | | |
| | | <TextInput label="common.field.memo" source="memo" />, |
| | | <SelectInput |
| | | label="common.field.status" |
| | |
| | | |
| | | const CheckDiffItemList = () => { |
| | | const translate = useTranslate(); |
| | | |
| | | const orderId = useGetRecordId(); |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | |
| | |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | resource="checkDiffItem" |
| | | title={"menu.checkDiffItem"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | | empty={false} |
| | | filters={filters} |
| | | filter={{checkId: orderId}} |
| | | sort={{ field: "create_time", order: "desc" }} |
| | | actions={( |
| | | <TopToolbar> |
| | | <FilterButton /> |
| | | <MyCreateButton onClick={() => { setCreateDialog(true) }} /> |
| | | <SelectColumnsButton preferenceKey='checkDiffItem' /> |
| | | <MyExportButton /> |
| | | </TopToolbar> |
| | |
| | | > |
| | | <StyledDatagrid |
| | | preferenceKey='checkDiffItem' |
| | | bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />} |
| | | bulkActionButtons={false} |
| | | rowClick={(id, resource, record) => false} |
| | | expand={() => <CheckDiffItemPanel />} |
| | | expand={false} |
| | | expandSingle={true} |
| | | omit={['id', 'createTime', 'createBy', 'memo']} |
| | | > |
| | |
| | | <NumberField source="checkQty" label="table.field.checkDiffItem.checkQty" /> |
| | | <NumberField source="exceStatus" label="table.field.checkDiffItem.exceStatus" /> |
| | | <TextField source="reason" label="table.field.checkDiffItem.reason" /> |
| | | |
| | | <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}> |
| | | <TextField source="nickname" /> |
| | | </ReferenceField> |
| | |
| | | </WrapperField> |
| | | </StyledDatagrid> |
| | | </List> |
| | | <CheckDiffItemCreate |
| | | open={createDialog} |
| | | setOpen={setCreateDialog} |
| | | /> |
| | | <PageDrawer |
| | | title='CheckDiffItem Detail' |
| | | drawerVal={drawerVal} |
| | | setDrawerVal={setDrawerVal} |
| | | > |
| | | </PageDrawer> |
| | | </Box> |
| | | ) |
| | | } |