From 73d2ddaa437c174423409667650355632e4a5bbf Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期一, 24 二月 2025 10:22:13 +0800
Subject: [PATCH] #新增 1. 新增数据字典管理功能 2. 新增字典数据集管理功能 3. 删除库存,库存信息管理功能

---
 rsf-admin/src/page/dictData/DictDataList.jsx |   50 ++++++++++++++++++++++----------------------------
 1 files changed, 22 insertions(+), 28 deletions(-)

diff --git a/rsf-admin/src/page/stock/StockList.jsx b/rsf-admin/src/page/dictData/DictDataList.jsx
similarity index 72%
copy from rsf-admin/src/page/stock/StockList.jsx
copy to rsf-admin/src/page/dictData/DictDataList.jsx
index a6f49fa..d20971b 100644
--- a/rsf-admin/src/page/stock/StockList.jsx
+++ b/rsf-admin/src/page/dictData/DictDataList.jsx
@@ -34,8 +34,8 @@
 } from 'react-admin';
 import { Box, Typography, Card, Stack } from '@mui/material';
 import { styled } from '@mui/material/styles';
-import StockCreate from "./StockCreate";
-import StockPanel from "./StockPanel";
+import DictDataCreate from "./DictDataCreate";
+import DictDataPanel from "./DictDataPanel";
 import EmptyData from "../components/EmptyData";
 import MyCreateButton from "../components/MyCreateButton";
 import MyExportButton from '../components/MyExportButton';
@@ -63,15 +63,12 @@
     <DateInput label='common.time.after' source="timeStart" alwaysOn />,
     <DateInput label='common.time.before' source="timeEnd" alwaysOn />,
 
-    <TextInput source="asnOrder" label="table.field.stock.asnOrder" />,
-    <TextInput source="erpToken" label="table.field.stock.erpToken" />,
-    <TextInput source="erpOrder" label="table.field.stock.erpOrder" />,
-    <TextInput source="erpStkAdr" label="table.field.stock.erpStkAdr" />,
-    <TextInput source="contractId" label="table.field.stock.contractId" />,
-    <TextInput source="lockReason" label="table.field.stock.lockReason" />,
-    <NumberInput source="lockStatus" label="table.field.stock.lockStatus" />,
-    <TextInput source="locker" label="table.field.stock.locker" />,
-    <DateInput source="lockedTime" label="table.field.stock.lockedTime" />,
+    <TextInput source="dictTypeId" label="table.field.dictData.dictTypeId" />,
+    <TextInput source="dictTypeCode" label="table.field.dictData.dictTypeCode" />,
+    <TextInput source="value" label="table.field.dictData.value" />,
+    <TextInput source="label" label="table.field.dictData.label" />,
+    <NumberInput source="sort" label="table.field.dictData.sort" />,
+    <TextInput source="color" label="table.field.dictData.color" />,
 
     <TextInput label="common.field.memo" source="memo" />,
     <SelectInput
@@ -85,7 +82,7 @@
     />,
 ]
 
-const StockList = () => {
+const DictDataList = () => {
     const translate = useTranslate();
 
     const [createDialog, setCreateDialog] = useState(false);
@@ -102,7 +99,7 @@
                         }),
                     marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0,
                 }}
-                title={"menu.stock"}
+                title={"menu.dictData"}
                 empty={<EmptyData onClick={() => { setCreateDialog(true) }} />}
                 filters={filters}
                 sort={{ field: "create_time", order: "desc" }}
@@ -110,30 +107,27 @@
                     <TopToolbar>
                         <FilterButton />
                         <MyCreateButton onClick={() => { setCreateDialog(true) }} />
-                        <SelectColumnsButton preferenceKey='stock' />
+                        <SelectColumnsButton preferenceKey='dictData' />
                         <MyExportButton />
                     </TopToolbar>
                 )}
                 perPage={DEFAULT_PAGE_SIZE}
             >
                 <StyledDatagrid
-                    preferenceKey='stock'
+                    preferenceKey='dictData'
                     bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />}
                     rowClick={(id, resource, record) => false}
-                    expand={() => <StockPanel />}
+                    expand={() => <DictDataPanel />}
                     expandSingle={true}
                     omit={['id', 'createTime', 'createBy', 'memo']}
                 >
                     <NumberField source="id" />
-                    <TextField source="asnOrder" label="table.field.stock.asnOrder" />
-                    <TextField source="erpToken" label="table.field.stock.erpToken" />
-                    <TextField source="erpOrder" label="table.field.stock.erpOrder" />
-                    <TextField source="erpStkAdr" label="table.field.stock.erpStkAdr" />
-                    <TextField source="contractId" label="table.field.stock.contractId" />
-                    <TextField source="lockReason" label="table.field.stock.lockReason" />
-                    <NumberField source="lockStatus" label="table.field.stock.lockStatus" />
-                    <TextField source="locker" label="table.field.stock.locker" />
-                    <DateField source="lockedTime" label="table.field.stock.lockedTime" showTime />
+                    <TextField source="dictTypeId" label="table.field.dictData.dictTypeId" />
+                    <TextField source="dictTypeCode" label="table.field.dictData.dictTypeCode" />
+                    <TextField source="value" label="table.field.dictData.value" />
+                    <TextField source="label" label="table.field.dictData.label" />
+                    <NumberField source="sort" label="table.field.dictData.sort" />
+                    <TextField source="color" label="table.field.dictData.color" />
 
                     <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}>
                         <TextField source="nickname" />
@@ -151,12 +145,12 @@
                     </WrapperField>
                 </StyledDatagrid>
             </List>
-            <StockCreate
+            <DictDataCreate
                 open={createDialog}
                 setOpen={setCreateDialog}
             />
             <PageDrawer
-                title='Stock Detail'
+                title='DictData Detail'
                 drawerVal={drawerVal}
                 setDrawerVal={setDrawerVal}
             >
@@ -165,4 +159,4 @@
     )
 }
 
-export default StockList;
+export default DictDataList;

--
Gitblit v1.9.1