From fe88c3671515ab5ed0e66100fd1bf22102ffdc0c Mon Sep 17 00:00:00 2001 From: verou <857149855@qq.com> Date: 星期二, 08 四月 2025 11:05:31 +0800 Subject: [PATCH] Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop --- rsf-admin/src/page/basicInfo/loc/LocList.jsx | 96 +++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 87 insertions(+), 9 deletions(-) diff --git a/rsf-admin/src/page/basicInfo/loc/LocList.jsx b/rsf-admin/src/page/basicInfo/loc/LocList.jsx index af7f744..bac9056 100644 --- a/rsf-admin/src/page/basicInfo/loc/LocList.jsx +++ b/rsf-admin/src/page/basicInfo/loc/LocList.jsx @@ -75,17 +75,22 @@ }, '& .RaDatagrid-rowCell': { textAlign: 'left' - } + }, + '& .type .MuiTypography-root': { + whiteSpace: 'nowrap', + overflow: 'hidden', + textOverflow: 'ellipsis', + display: 'block', + width: '200px', + }, })); const filters = [ <SearchInput source="condition" alwaysOn />, - <ReferenceInput source="warehouseId" label="table.field.loc.warehouseId" reference="warehouse" - alwaysOn > <AutocompleteInput label="table.field.loc.warehouseId" @@ -97,7 +102,6 @@ source="areaId" label="table.field.loc.areaId" reference="warehouseAreas" - alwaysOn > <AutocompleteInput label="table.field.loc.areaId" @@ -201,7 +205,10 @@ align="left" bulkActionButtons={ <> - <BatchButton /> + <BatchWateButton /> + <BatchAreasButton /> + <BatchLocTypeButton /> + <BatchStatusButton /> <BindButton /> <SubzoneButton /> <BulkDeleteButton /> @@ -214,7 +221,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 +305,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 +336,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