From bfc43ca0e4683c1c0322a6cad5d5be2bc07decc3 Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期四, 24 七月 2025 15:00:44 +0800 Subject: [PATCH] 新增调拔单功能 盘点功能优化 --- rsf-admin/src/page/orders/wave/WaveItemList.jsx | 81 ---------------------------------------- 1 files changed, 1 insertions(+), 80 deletions(-) diff --git a/rsf-admin/src/page/orders/wave/WaveItemList.jsx b/rsf-admin/src/page/orders/wave/WaveItemList.jsx index 0439bed..e5c302b 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,11 +110,7 @@ > <StyledDatagrid preferenceKey='waveItem' - bulkActionButtons={ - <> - <BulkStartButton /> - </> - } + bulkActionButtons={false} rowClick={(id, resource, record) => false} expand={false} expandSingle={false} @@ -150,10 +134,6 @@ <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> </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