From d086af5559dba52095d23e425be87d8f11f24814 Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期四, 17 七月 2025 16:32:47 +0800 Subject: [PATCH] #菜单、po单 --- rsf-admin/src/page/basicInfo/loc/LocList.jsx | 137 +++++++++++++++++++++++++-------------------- 1 files changed, 75 insertions(+), 62 deletions(-) diff --git a/rsf-admin/src/page/basicInfo/loc/LocList.jsx b/rsf-admin/src/page/basicInfo/loc/LocList.jsx index f2a1915..ea3a339 100644 --- a/rsf-admin/src/page/basicInfo/loc/LocList.jsx +++ b/rsf-admin/src/page/basicInfo/loc/LocList.jsx @@ -83,58 +83,7 @@ }, })); -const filters = [ - <SearchInput source="condition" alwaysOn />, - <ReferenceInput - source="warehouseId" - label="table.field.loc.warehouseId" - reference="warehouse" - > - <AutocompleteInput - label="table.field.loc.warehouseId" - optionText="name" - filterToQuery={(val) => ({ name: val })} - /> - </ReferenceInput>, - <ReferenceInput - source="areaId" - label="table.field.loc.areaId" - reference="warehouseAreas" - > - <AutocompleteInput - label="table.field.loc.areaId" - optionText="name" - filterToQuery={(val) => ({ name: val })} - /> - </ReferenceInput>, - <TextInput source="code" label="table.field.loc.code" />, - <TextInput source="type" label="table.field.loc.type" />, - <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="unit" label="table.field.loc.unit" />, - <TextInput source="size" label="table.field.loc.size" />, - <NumberInput source="row" label="table.field.loc.row" />, - <NumberInput source="col" label="table.field.loc.col" />, - <NumberInput source="lev" label="table.field.loc.lev" />, - <NumberInput source="channel" label="table.field.loc.channel" />, - <NumberInput source="maxParts" label="table.field.loc.maxParts" />, - <NumberInput source="maxPack" label="table.field.loc.maxPack" />, - <NumberInput source="flagLabelMange" label="table.field.loc.flagLabelMange" />, - <TextInput source="locAttrs" label="table.field.loc.locAttrs" />, - <TextInput label="common.field.memo" source="memo" />, - <SelectInput - label="common.field.status" - source="status" - choices={[ - { id: '1', name: 'common.enums.statusTrue' }, - { id: '0', name: 'common.enums.statusFalse' }, - ]} - resettable - />, -] const LocList = () => { const translate = useTranslate(); @@ -143,6 +92,69 @@ 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 filters = [ + <SearchInput source="condition" alwaysOn />, + <ReferenceInput + source="warehouseId" + label="table.field.loc.warehouseId" + reference="warehouse" + > + <AutocompleteInput + label="table.field.loc.warehouseId" + optionText="name" + filterToQuery={(val) => ({ name: val })} + /> + </ReferenceInput>, + <ReferenceInput + source="areaId" + label="table.field.loc.areaId" + reference="warehouseAreas" + > + <AutocompleteInput + label="table.field.loc.areaId" + optionText="name" + filterToQuery={(val) => ({ name: val })} + /> + </ReferenceInput>, + <AutocompleteInput + choices={dicts} + optionText="label" + label="table.field.loc.useStatus" + source="useStatus" + optionValue="value" + parse={v => v} + alwaysOn + />, + <TextInput source="code" label="table.field.loc.code" />, + <TextInput source="type" label="table.field.loc.type" />, + <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="unit" label="table.field.loc.unit" />, + <TextInput source="size" label="table.field.loc.size" />, + <NumberInput source="row" label="table.field.loc.row" />, + <NumberInput source="col" label="table.field.loc.col" />, + <NumberInput source="lev" label="table.field.loc.lev" />, + <NumberInput source="channel" label="table.field.loc.channel" />, + <NumberInput source="maxParts" label="table.field.loc.maxParts" />, + <NumberInput source="maxPack" label="table.field.loc.maxPack" />, + <NumberInput source="flagLabelMange" label="table.field.loc.flagLabelMange" />, + <TextInput source="locAttrs" label="table.field.loc.locAttrs" />, + + <TextInput label="common.field.memo" source="memo" />, + <SelectInput + label="common.field.status" + source="status" + choices={[ + { id: '1', name: 'common.enums.statusTrue' }, + { id: '0', name: 'common.enums.statusFalse' }, + ]} + resettable + />, + ] return ( <Box display="flex"> @@ -183,7 +195,7 @@ } onClick={() => { }} />} filters={filters} - sort={{ field: "create_time", order: "desc" }} + sort={{ field: "'row'" }} actions={( <TopToolbar> <FilterButton /> @@ -211,18 +223,19 @@ </> } rowClick={() => false} - omit={['id', 'createTime', 'createBy', 'memo', 'updateTime', 'updateBy']} + omit={['id', 'createTime', 'createBy', 'memo', 'updateTime', 'updateBy', 'length', 'width', 'height','statusBool','updateBy$','createBy$']} > <NumberField source="id" /> - <NumberField source="warehouseId$" label="table.field.loc.warehouseId" /> - <NumberField source="areaId$" label="table.field.loc.areaId" /> <TextField source="code" label="table.field.loc.code" /> + <NumberField source="warehouseId$" label="table.field.loc.warehouseId" /> + <NumberField source="areaId$" label="table.field.loc.areaId" /> <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" /> - <TextField source="barcode" label="table.field.loc.barcode" /> */} + */} {/* <TextField source="unit" label="table.field.loc.unit" /> */} + <TextField source="barcode" label="table.field.loc.barcode" /> <TextField source="length" label="table.field.loc.length" /> <TextField source="width" label="table.field.loc.width" /> <TextField source="height" label="table.field.loc.height" /> @@ -236,9 +249,9 @@ <NumberField source="flagLabelMange" label="table.field.loc.flagLabelMange" /> <TextField source="locAttrs" label="table.field.loc.locAttrs" /> */} <TextField source="useStatus$" label="table.field.loc.useStatus" /> - <TextField source="updateBy$" label="common.field.updateBy" /> + <TextField source="updateBy$" label="common.field.updateBy" /> <DateField source="updateTime" label="common.field.updateTime" showTime align="left" /> - <TextField source="createBy$" label="common.field.createBy" /> + <TextField source="createBy$" label="common.field.createBy" /> <DateField source="createTime" label="common.field.createTime" showTime align="left" /> <BooleanField source="statusBool" label="common.field.status" sortable={false} align="left" /> <TextField source="memo" label="common.field.memo" sortable={false} /> @@ -250,8 +263,8 @@ </StyledDatagrid> <InitModal - open={initDialog} - setOpen={setInitDialog} + open={initDialog} + setOpen={setInitDialog} /> </List> <LocCreate @@ -264,8 +277,8 @@ setDrawerVal={setDrawerVal} > </PageDrawer> - - + + </Box> ) } -- Gitblit v1.9.1