From 2ba05033837f468ba9d3f8fc60855dacbf527cb2 Mon Sep 17 00:00:00 2001 From: zhang <zc857179121@qq.com> Date: 星期三, 17 九月 2025 15:00:30 +0800 Subject: [PATCH] 跑酷 --- rsf-admin/src/page/orders/wave/WaveItemList.jsx | 85 +----------------------------------------- 1 files changed, 3 insertions(+), 82 deletions(-) diff --git a/rsf-admin/src/page/orders/wave/WaveItemList.jsx b/rsf-admin/src/page/orders/wave/WaveItemList.jsx index 0439bed..c7a9dcf 100644 --- a/rsf-admin/src/page/orders/wave/WaveItemList.jsx +++ b/rsf-admin/src/page/orders/wave/WaveItemList.jsx @@ -6,31 +6,19 @@ 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, @@ -122,15 +110,11 @@ > <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" /> @@ -148,12 +132,8 @@ <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 @@ -182,66 +162,7 @@ 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 />} /> : <></> - ) -} \ No newline at end of file -- Gitblit v1.9.1