From ca23f2be97249ab82494983ee34636dcc28c8a19 Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期三, 02 四月 2025 10:13:52 +0800 Subject: [PATCH] 报检提示优化 --- rsf-admin/src/page/basicInfo/loc/LocList.jsx | 95 +++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 87 insertions(+), 8 deletions(-) diff --git a/rsf-admin/src/page/basicInfo/loc/LocList.jsx b/rsf-admin/src/page/basicInfo/loc/LocList.jsx index af7f744..c6a9228 100644 --- a/rsf-admin/src/page/basicInfo/loc/LocList.jsx +++ b/rsf-admin/src/page/basicInfo/loc/LocList.jsx @@ -75,7 +75,14 @@ }, '& .RaDatagrid-rowCell': { textAlign: 'left' - } + }, + '& .type .MuiTypography-root': { + whiteSpace: 'nowrap', + overflow: 'hidden', + textOverflow: 'ellipsis', + display: 'block', + width: '200px', + }, })); const filters = [ @@ -85,7 +92,6 @@ source="warehouseId" label="table.field.loc.warehouseId" reference="warehouse" - alwaysOn > <AutocompleteInput label="table.field.loc.warehouseId" @@ -97,7 +103,6 @@ source="areaId" label="table.field.loc.areaId" reference="warehouseAreas" - alwaysOn > <AutocompleteInput label="table.field.loc.areaId" @@ -201,7 +206,10 @@ align="left" bulkActionButtons={ <> - <BatchButton /> + <BatchWateButton /> + <BatchAreasButton /> + <BatchLocTypeButton /> + <BatchStatusButton /> <BindButton /> <SubzoneButton /> <BulkDeleteButton /> @@ -214,7 +222,7 @@ <NumberField source="warehouseId$" label="table.field.loc.warehouseId" /> <NumberField source="areaId$" label="table.field.loc.areaId" /> <TextField source="code" label="table.field.loc.code" /> - <TextField source="typeIds$" label="table.field.loc.type" /> + <TextField source="typeIds$" label="table.field.loc.type" cellClassName="type" /> {/* <TextField source="name" label="table.field.loc.name" /> */} {/* <NumberField source="flagLogic" label="table.field.loc.flagLogic" /> <TextField source="fucAtrrs" label="table.field.loc.fucAtrrs" /> @@ -298,7 +306,30 @@ ) } -const BatchButton = () => { +const BatchWateButton = () => { + const record = useRecordContext(); + const notify = useNotify(); + const refresh = useRefresh(); + + const [createDialog, setCreateDialog] = useState(false); + + return ( + <> + <Button onClick={() => setCreateDialog(true)} label={"toolbar.batchWarehouse"}> + <EditIcon /> + </Button> + + <BatchModal + open={createDialog} + setOpen={setCreateDialog} + fieldType={'warehouseId'} + /> + </> + + ) +} + +const BatchAreasButton = () => { const record = useRecordContext(); const notify = useNotify(); const refresh = useRefresh(); @@ -306,16 +337,64 @@ const [createDialog, setCreateDialog] = useState(false); - return ( <> - <Button onClick={() => setCreateDialog(true)} label={"toolbar.batch"}> + <Button onClick={() => setCreateDialog(true)} label={"toolbar.batchWarehouseAreas"}> <EditIcon /> </Button> <BatchModal open={createDialog} setOpen={setCreateDialog} + fieldType={'areaId'} + /> + </> + + ) +} + +const BatchLocTypeButton = () => { + const record = useRecordContext(); + const notify = useNotify(); + const refresh = useRefresh(); + + + const [createDialog, setCreateDialog] = useState(false); + + return ( + <> + <Button onClick={() => setCreateDialog(true)} label={"toolbar.batchLocType"}> + <EditIcon /> + </Button> + + <BatchModal + open={createDialog} + setOpen={setCreateDialog} + fieldType={'typeIds'} + /> + </> + + ) +} + +const BatchStatusButton = () => { + const record = useRecordContext(); + const notify = useNotify(); + const refresh = useRefresh(); + + + const [createDialog, setCreateDialog] = useState(false); + + return ( + <> + <Button onClick={() => setCreateDialog(true)} label={"toolbar.batchStatus"}> + <EditIcon /> + </Button> + + <BatchModal + open={createDialog} + setOpen={setCreateDialog} + fieldType={'status'} /> </> -- Gitblit v1.9.1