From 60a665f3c576f8fe368ddfaabc9117a9c5dd47bf Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期六, 02 八月 2025 09:56:30 +0800 Subject: [PATCH] Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop --- rsf-admin/src/page/locPreview/LocPreviewList.jsx | 53 ++++++++++++++++++++++++----------------------------- 1 files changed, 24 insertions(+), 29 deletions(-) diff --git a/rsf-admin/src/page/locItem/LocItemList.jsx b/rsf-admin/src/page/locPreview/LocPreviewList.jsx similarity index 91% rename from rsf-admin/src/page/locItem/LocItemList.jsx rename to rsf-admin/src/page/locPreview/LocPreviewList.jsx index 49f35cc..a30d41a 100644 --- a/rsf-admin/src/page/locItem/LocItemList.jsx +++ b/rsf-admin/src/page/locPreview/LocPreviewList.jsx @@ -35,11 +35,11 @@ Button, useList, } from 'react-admin'; +import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; import { Box, Typography, Card, Stack } from '@mui/material'; -import { styled } from '@mui/material/styles'; import MyCreateButton from "../components/MyCreateButton"; import MyExportButton from '../components/MyExportButton'; -import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; +import { styled } from '@mui/material/styles'; import LocListAside from "./LocListAside"; const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ @@ -62,24 +62,21 @@ width: 'auto', }, '& .MuiTableCell-root': { - whiteSpace: 'nowrap', - overflow: 'visible', - textOverflow: 'unset' - } + whiteSpace: 'nowrap', + overflow: 'visible', + textOverflow: 'unset' + } })); - - -const LocItemList = () => { - const translate = useTranslate(); - const notify = useNotify(); - const refresh = useRefresh(); +const LocPreviewList = () => { + const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_loc_use_stas')) || []; + const locType = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_loc_type')) || []; const [createDialog, setCreateDialog] = useState(false); const [drawerVal, setDrawerVal] = useState(false); const [initDialog, setInitDialog] = useState(false); - const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_loc_use_stas')) || []; - const locType = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_loc_type')) || []; - + const translate = useTranslate(); + const refresh = useRefresh(); + const notify = useNotify(); const filters = [ <SearchInput source="condition" alwaysOn />, @@ -112,7 +109,7 @@ source="useStatus" optionValue="value" parse={v => v} - + alwaysOn />, <TextInput source="code" label="table.field.loc.code" />, <AutocompleteInput @@ -122,10 +119,11 @@ source="type" optionValue="value" parse={v => v} - />, <TextInput source="name" label="table.field.loc.name" />, + />, + <TextInput source="name" label="table.field.loc.name" />, <NumberInput source="flagLogic" label="table.field.loc.flagLogic" />, <TextInput source="fucAtrrs" label="table.field.loc.fucAtrrs" />, - <TextInput source="barcode" label="table.field.loc.barcode" />, + <TextInput source="barcode" label="table.field.loc.barcode" alwaysOn/>, <TextInput source="unit" label="table.field.loc.unit" />, <TextInput source="size" label="table.field.loc.size" />, <NumberInput source="row" label="table.field.loc.row" />, @@ -148,8 +146,6 @@ />, ] - - return ( <Box display="flex"> <List @@ -161,28 +157,27 @@ }), marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, }} - storeKey="locItem" - resource="loc" - title={"menu.locItem"} + storeKey="locPreview" + resource="locPreview" + title={"menu.locPreview"} empty={false} filters={filters} - filter={{ useStatus: 'F' }} sort={{ field: "create_time", order: "desc" }} actions={( <TopToolbar> <FilterButton /> - {/* <SelectColumnsButton preferenceKey='loc' /> */} + <SelectColumnsButton preferenceKey='locPreview' /> </TopToolbar> )} perPage={DEFAULT_PAGE_SIZE} aside={<LocListAside />} > <StyledDatagrid - preferenceKey='locItem' + preferenceKey='locPreview' align="left" bulkActionButtons={false} rowClick={() => false} - omit={['id', 'createTime', 'createBy$', 'memo', 'updateTime', 'updateBy','statusBool','length','width','height']} + omit={['id', 'createTime', 'createBy$', 'memo', 'updateTime', 'updateBy', 'statusBool', 'length', 'width', 'height']} > <NumberField source="id" /> <NumberField source="warehouseId$" label="table.field.loc.warehouseId" /> @@ -205,7 +200,7 @@ <BooleanField source="statusBool" label="common.field.status" sortable={false} align="left" /> <TextField source="memo" label="common.field.memo" sortable={false} /> <WrapperField cellClassName="opt" label="common.field.opt"> - <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} resource="locItem" label="toolbar.detail" /> + <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} label="toolbar.detail" /> </WrapperField> </StyledDatagrid> </List> @@ -213,4 +208,4 @@ ) } -export default LocItemList; \ No newline at end of file +export default LocPreviewList; \ No newline at end of file -- Gitblit v1.9.1