|  |  | 
 |  |  |     SearchInput, | 
 |  |  |     TopToolbar, | 
 |  |  |     SelectColumnsButton, | 
 |  |  |     EditButton, | 
 |  |  |     FilterButton, | 
 |  |  |     CreateButton, | 
 |  |  |     ExportButton, | 
 |  |  |     BulkDeleteButton, | 
 |  |  |     WrapperField, | 
 |  |  |     useRecordContext, | 
 |  |  |     useTranslate, | 
 |  |  |     useNotify, | 
 |  |  |     useListContext, | 
 |  |  |     FunctionField, | 
 |  |  |     TextField, | 
 |  |  |     NumberField, | 
 |  |  |     DateField, | 
 |  |  |     BooleanField, | 
 |  |  |     ReferenceField, | 
 |  |  |     TextInput, | 
 |  |  |     DateTimeInput, | 
 |  |  |     DateInput, | 
 |  |  |     SelectInput, | 
 |  |  |     NumberInput, | 
 |  |  |     ReferenceInput, | 
 |  |  |     ReferenceArrayInput, | 
 |  |  |     AutocompleteInput, | 
 |  |  |     DeleteButton, | 
 |  |  |     useGetRecordId, | 
 |  |  |     Button, | 
 |  |  |     useRefresh, | 
 |  |  | 
 |  |  |             > | 
 |  |  |                 <StyledDatagrid | 
 |  |  |                     preferenceKey='waveItem' | 
 |  |  |                     bulkActionButtons={ | 
 |  |  |                         <> | 
 |  |  |                             <BulkStartButton /> | 
 |  |  |                         </> | 
 |  |  |                     } | 
 |  |  |                     bulkActionButtons={false} | 
 |  |  |                     rowClick={(id, resource, record) => false} | 
 |  |  |                     expand={false} | 
 |  |  |                     expandSingle={false} | 
 |  |  |                     omit={['id', 'createTime', 'matnrId', 'waveId', 'batch', 'orderItemId', 'fieldsIndex', 'createBy', 'memo']} | 
 |  |  |                     omit={['id', 'createTime', 'matnrId', 'waveId', 'batch', 'orderItemId', 'fieldsIndex', 'createBy']} | 
 |  |  |                 > | 
 |  |  |                     <NumberField source="id" /> | 
 |  |  |                     <NumberField source="waveId" label="table.field.waveItem.waveId" /> | 
 |  |  | 
 |  |  |                     <DateField source="updateTime" label="common.field.updateTime" showTime /> | 
 |  |  |                     <TextField source="createBy$" label="common.field.createBy" /> | 
 |  |  |                     <DateField source="createTime" label="common.field.createTime" showTime /> | 
 |  |  |                     <TextField source="memo" label="common.field.memo" sortable={false} /> | 
 |  |  |                     <TextField source="exceStatus$" label="table.field.waveItem.exceStatus" /> | 
 |  |  |                     <WrapperField cellClassName="opt" label="common.field.opt"> | 
 |  |  |                         <PauseButton /> | 
 |  |  |                         <ContinueButton /> | 
 |  |  |                     </WrapperField> | 
 |  |  |                     <TextField source="memo" label="common.field.memo" sortable={false} /> | 
 |  |  |                 </StyledDatagrid> | 
 |  |  |             </List> | 
 |  |  |             <WaveItemEdit | 
 |  |  | 
 |  |  |         event.stopPropagation() | 
 |  |  |         setEditDialog(true) | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     return ( | 
 |  |  |         <Button label="ra.action.edit" onClick={editClick} startIcon={<ContentCreate />} /> | 
 |  |  |     ) | 
 |  |  | } | 
 |  |  |  | 
 |  |  |  | 
 |  |  | const BulkStartButton = () => { | 
 |  |  |     const { data, selectedIds, onUnselectItems } = useListContext(); | 
 |  |  |     const waveId = useGetRecordId(); | 
 |  |  |     const notify = useNotify(); | 
 |  |  |     const refresh = useRefresh() | 
 |  |  |     const startClick = async () => { | 
 |  |  |         onUnselectItems(); | 
 |  |  |         const { data: { code, data, msg } } = await request.post('/wave/selects/task', { wave: waveId, waveItem: selectedIds }); | 
 |  |  |         if (code === 200) { | 
 |  |  |             notify(msg); | 
 |  |  |             setAutoExce(false) | 
 |  |  |         } else { | 
 |  |  |             notify(msg); | 
 |  |  |         } | 
 |  |  |         refresh() | 
 |  |  |     } | 
 |  |  |     return ( | 
 |  |  |         <Button label="toolbar.publicWorking" onClick={startClick} startIcon={<PlayArrowOutlinedIcon />} variant="outlined" /> | 
 |  |  |     ) | 
 |  |  | } | 
 |  |  |  | 
 |  |  | const PauseButton = () => { | 
 |  |  |     const notify = useNotify() | 
 |  |  |     const refresh = useRefresh(); | 
 |  |  |     const record = useRecordContext(); | 
 |  |  |     const pauseClick = async () => { | 
 |  |  |         const { data: { code, data, msg } } = await request.post('/waveItem/pause/pub/' + record?.id); | 
 |  |  |         if (code === 200) { | 
 |  |  |             notify(msg); | 
 |  |  |         } else { | 
 |  |  |             notify(msg); | 
 |  |  |         } | 
 |  |  |         refresh() | 
 |  |  |     } | 
 |  |  |     return ( | 
 |  |  |         record?.exceStatus == 1 ? <Button label="toolbar.pause" onClick={pauseClick} startIcon={<StopCircleOutlinedIcon />} /> : <></> | 
 |  |  |     ) | 
 |  |  | } | 
 |  |  |  | 
 |  |  | const ContinueButton = () => { | 
 |  |  |     const notify = useNotify() | 
 |  |  |     const refresh = useRefresh(); | 
 |  |  |     const record = useRecordContext(); | 
 |  |  |     const continueClick = async () => { | 
 |  |  |         const { data: { code, data, msg } } = await request.post('/waveItem/continue/pub/' + record?.id); | 
 |  |  |         if (code === 200) { | 
 |  |  |             notify(msg); | 
 |  |  |         } else { | 
 |  |  |             notify(msg); | 
 |  |  |         } | 
 |  |  |         refresh() | 
 |  |  |     } | 
 |  |  |     return ( | 
 |  |  |         record?.exceStatus == 2 ? <Button label="toolbar.continuePub" onClick={continueClick} startIcon={<PauseCircleOutlineIcon />} /> : <></> | 
 |  |  |     ) | 
 |  |  | } |