|  |  |  | 
|---|
|  |  |  | DeleteButton, | 
|---|
|  |  |  | useGetOne, | 
|---|
|  |  |  | useGetRecordId, | 
|---|
|  |  |  | SimpleForm, | 
|---|
|  |  |  | } from 'react-admin'; | 
|---|
|  |  |  | import { Box, Typography, Card, Stack } from '@mui/material'; | 
|---|
|  |  |  | import { styled } from '@mui/material/styles'; | 
|---|
|  |  |  | import DeliveryItemCreate from "./DeliveryItemCreate"; | 
|---|
|  |  |  | import EmptyData from "../../components/EmptyData"; | 
|---|
|  |  |  | import MyCreateButton from "../../components/MyCreateButton"; | 
|---|
|  |  |  | import MyExportButton from '../../components/MyExportButton'; | 
|---|
|  |  |  | import PageDrawer from "../../components/PageDrawer"; | 
|---|
|  |  |  | import MyField from "../../components/MyField"; | 
|---|
|  |  |  | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; | 
|---|
|  |  |  | import * as Common from '@/utils/common'; | 
|---|
|  |  |  | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_ITEM_PAGE_SIZE } from '@/config/setting'; | 
|---|
|  |  |  | import DeliveryItemEdit from "./DeliveryItemEdit"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ | 
|---|
|  |  |  | 
|---|
|  |  |  | '& .RaDatagrid-row': { | 
|---|
|  |  |  | cursor: 'auto' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | '& .column-name': { | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | '& .opt': { | 
|---|
|  |  |  | width: 200 | 
|---|
|  |  |  | width: 150 | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | '& .MuiTableCell-root': { | 
|---|
|  |  |  | whiteSpace: 'nowrap', | 
|---|
|  |  |  | overflow: 'visible', | 
|---|
|  |  |  | textOverflow: 'unset' | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | })); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const filters = [ | 
|---|
|  |  |  | <SearchInput source="condition" alwaysOn />, | 
|---|
|  |  |  | <DateInput label='common.time.after' source="timeStart" alwaysOn />, | 
|---|
|  |  |  | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <NumberInput source="deliveryId" label="table.field.deliveryItem.deliveryId" />, | 
|---|
|  |  |  | <DateInput label='common.time.after' source="timeStart" />, | 
|---|
|  |  |  | <DateInput label='common.time.before' source="timeEnd" />, | 
|---|
|  |  |  | <TextInput source="platItemId" label="table.field.deliveryItem.platItemId" />, | 
|---|
|  |  |  | <TextInput source="matnrCode" label="table.field.deliveryItem.matnrCode" />, | 
|---|
|  |  |  | <TextInput source="matnrName" label="table.field.deliveryItem.matnrName" />, | 
|---|
|  |  |  | <TextInput source="fieldsIndex" label="table.field.deliveryItem.fieldsIndex" />, | 
|---|
|  |  |  | <TextInput source="unit" label="table.field.deliveryItem.unit" />, | 
|---|
|  |  |  | <NumberInput source="anfme" label="table.field.deliveryItem.anfme" />, | 
|---|
|  |  |  | <NumberInput source="qty" label="table.field.deliveryItem.qty" />, | 
|---|
|  |  |  | <NumberInput source="nromQty" label="table.field.deliveryItem.nromQty" />, | 
|---|
|  |  |  | <NumberInput source="printQty" label="table.field.deliveryItem.printQty" />, | 
|---|
|  |  |  | <TextInput source="splrName" label="table.field.deliveryItem.splrName" />, | 
|---|
|  |  |  | <TextInput source="splrCode" label="table.field.deliveryItem.splrCode" />, | 
|---|
|  |  |  | <TextInput source="splrBatch" label="table.field.deliveryItem.splrBatch" />, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <TextInput label="common.field.memo" source="memo" />, | 
|---|
|  |  |  | <SelectInput | 
|---|
|  |  |  | label="common.field.status" | 
|---|
|  |  |  | source="status" | 
|---|
|  |  |  | 
|---|
|  |  |  | title={"menu.deliveryItem"} | 
|---|
|  |  |  | empty={false} | 
|---|
|  |  |  | filters={filters} | 
|---|
|  |  |  | filter={{deliveryId: doId}} | 
|---|
|  |  |  | filter={{ deliveryId: doId }} | 
|---|
|  |  |  | sort={{ field: "create_time", order: "desc" }} | 
|---|
|  |  |  | actions={( | 
|---|
|  |  |  | <TopToolbar> | 
|---|
|  |  |  | <FilterButton /> | 
|---|
|  |  |  | <MyCreateButton onClick={() => { setCreateDialog(true) }} /> | 
|---|
|  |  |  | <SelectColumnsButton preferenceKey='deliveryItem' /> | 
|---|
|  |  |  | <MyExportButton /> | 
|---|
|  |  |  | {/* <MyExportButton /> */} | 
|---|
|  |  |  | </TopToolbar> | 
|---|
|  |  |  | )} | 
|---|
|  |  |  | perPage={DEFAULT_PAGE_SIZE} | 
|---|
|  |  |  | perPage={DEFAULT_ITEM_PAGE_SIZE} | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <StyledDatagrid | 
|---|
|  |  |  | preferenceKey='deliveryItem' | 
|---|
|  |  |  | 
|---|
|  |  |  | }} | 
|---|
|  |  |  | expand={false} | 
|---|
|  |  |  | expandSingle={true} | 
|---|
|  |  |  | omit={['id', 'createTime','deliveryId','fieldsIndex','qty', 'printQty', 'nromQty', 'createBy', 'memo']} | 
|---|
|  |  |  | omit={['id', 'createTime', 'deliveryId', 'fieldsIndex', 'printQty', 'nromQty', 'createBy', 'memo','statusBool','createBy$','splrCode']} | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <NumberField source="id" /> | 
|---|
|  |  |  | <NumberField source="deliveryId" label="table.field.deliveryItem.deliveryId" /> | 
|---|
|  |  |  | <TextField source="platItemId" label="table.field.deliveryItem.platItemId" /> | 
|---|
|  |  |  | <TextField source="matnrCode" label="table.field.deliveryItem.matnrCode" /> | 
|---|
|  |  |  | <TextField source="matnrName" label="table.field.deliveryItem.matnrName" /> | 
|---|
|  |  |  | <TextField source="maktx" label="table.field.deliveryItem.matnrName" /> | 
|---|
|  |  |  | <TextField source="fieldsIndex" label="table.field.deliveryItem.fieldsIndex" /> | 
|---|
|  |  |  | <TextField source="unit" label="table.field.deliveryItem.unit" /> | 
|---|
|  |  |  | <NumberField source="anfme" label="table.field.deliveryItem.anfme" /> | 
|---|
|  |  |  | <NumberField source="workQty" label="table.field.deliveryItem.workQty" /> | 
|---|
|  |  |  | <NumberField source="qty" label="table.field.deliveryItem.qty" /> | 
|---|
|  |  |  | <NumberField source="nromQty" label="table.field.deliveryItem.nromQty" /> | 
|---|
|  |  |  | <NumberField source="printQty" label="table.field.deliveryItem.printQty" /> | 
|---|
|  |  |  | <TextField source="unit" label="table.field.deliveryItem.unit" /> | 
|---|
|  |  |  | <TextField source="splrName" label="table.field.deliveryItem.splrName" /> | 
|---|
|  |  |  | <TextField source="splrCode" label="table.field.deliveryItem.splrCode" /> | 
|---|
|  |  |  | <TextField source="splrBatch" label="table.field.deliveryItem.splrBatch" /> | 
|---|
|  |  |  | <TextField source="updateBy$" label="common.field.updateBy"  /> | 
|---|
|  |  |  | <TextField source="updateBy$" label="common.field.updateBy" /> | 
|---|
|  |  |  | <DateField source="updateTime" label="common.field.updateTime" showTime /> | 
|---|
|  |  |  | <TextField source="createBy$" label="common.field.createBy"  /> | 
|---|
|  |  |  | <TextField source="createBy$" label="common.field.createBy" /> | 
|---|
|  |  |  | <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} /> | 
|---|
|  |  |  | 
|---|
|  |  |  | </WrapperField> | 
|---|
|  |  |  | </StyledDatagrid> | 
|---|
|  |  |  | </List> | 
|---|
|  |  |  | <DeliveryItemEdit | 
|---|
|  |  |  | <DeliveryItemEdit | 
|---|
|  |  |  | open={editDialog} | 
|---|
|  |  |  | setOpen={setEditDialog} | 
|---|
|  |  |  | record={select} | 
|---|