From baa5bdca332564deef950002f2cc0d4d061cf3fa Mon Sep 17 00:00:00 2001 From: verou <857149855@qq.com> Date: 星期二, 18 三月 2025 14:25:26 +0800 Subject: [PATCH] feat:物料批量操作 --- rsf-admin/src/page/basicInfo/loc/LocList.jsx | 38 +++----------------------------------- 1 files changed, 3 insertions(+), 35 deletions(-) diff --git a/rsf-admin/src/page/basicInfo/loc/LocList.jsx b/rsf-admin/src/page/basicInfo/loc/LocList.jsx index b9b2578..c64bbb7 100644 --- a/rsf-admin/src/page/basicInfo/loc/LocList.jsx +++ b/rsf-admin/src/page/basicInfo/loc/LocList.jsx @@ -142,7 +142,7 @@ } rowClick={() => false} expand={() => <LocPanel />} - omit={['id', 'createTime', 'createBy', 'memo']} + omit={['id', 'createTime', 'createBy', 'memo', 'updateTime', 'updateBy']} > <NumberField source="id" /> <NumberField source="warehouseId$" label="table.field.loc.warehouseId" /> @@ -228,8 +228,7 @@ const record = useRecordContext(); const notify = useNotify(); const refresh = useRefresh(); - const { selectedIds } = useListContext(); - console.log(selectedIds) + const [createDialog, setCreateDialog] = useState(false); @@ -246,35 +245,4 @@ </> ) -} -const CustomBulkActionButton = () => { - const { selectedIds } = useListContext(); - const notify = useNotify(); - const refresh = useRefresh(); - - const handleCustomBulkAction = async () => { - if (selectedIds.length === 0) { - notify('璇烽�夋嫨瑕佹搷浣滅殑璁板綍'); - return; - } - // 杩欓噷鍐欏叿浣撶殑鎵归噺鎿嶄綔閫昏緫锛屼緥濡傚悜鏈嶅姟鍣ㄥ彂閫佽姹� - try { - const res = await request.post('/loc/bulk-action', { ids: selectedIds }); - if (res?.data?.code === 200) { - refresh(); - notify('鎵归噺鎿嶄綔鎴愬姛'); - } else { - notify(res.data.msg); - } - } catch (error) { - notify('鎵归噺鎿嶄綔澶辫触锛岃绋嶅悗閲嶈瘯'); - } - }; - - return ( - <Button onClick={handleCustomBulkAction} label="鑷畾涔夋壒閲忔搷浣�"> - {/* 鍙互娣诲姞鑷畾涔夊浘鏍� */} - <EditIcon /> - </Button> - ); -}; \ No newline at end of file +} \ No newline at end of file -- Gitblit v1.9.1