From 5c90daa2c919f3f07df0a154ff91f0e015bf8d66 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期四, 24 七月 2025 17:07:28 +0800
Subject: [PATCH] Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop
---
rsf-admin/src/page/basicInfo/locType/LocTypeList.jsx | 38 ++++++++++++++++++++++++++++++++++----
1 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/rsf-admin/src/page/basicInfo/locType/LocTypeList.jsx b/rsf-admin/src/page/basicInfo/locType/LocTypeList.jsx
index 5b30be7..2fed32b 100644
--- a/rsf-admin/src/page/basicInfo/locType/LocTypeList.jsx
+++ b/rsf-admin/src/page/basicInfo/locType/LocTypeList.jsx
@@ -31,6 +31,9 @@
ReferenceArrayInput,
AutocompleteInput,
DeleteButton,
+ useRefresh,
+ Button,
+ useList
} from 'react-admin';
import { Box, Typography, Card, Stack } from '@mui/material';
import { styled } from '@mui/material/styles';
@@ -42,6 +45,8 @@
import PageDrawer from "../../components/PageDrawer";
import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting';
import * as Common from '@/utils/common';
+import BindModal from "./BindModal";
+import LinkIcon from '@mui/icons-material/Link';
const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
'& .css-1vooibu-MuiSvgIcon-root': {
@@ -109,15 +114,17 @@
>
<StyledDatagrid
preferenceKey='locType'
- bulkActionButtons={() => <BulkDeleteButton mutationMode={OPERATE_MODE} />}
+ bulkActionButtons={<>
+ <BindButton />
+ <BulkDeleteButton />
+ </>}
rowClick={(id, resource, record) => false}
- expand={() => <LocTypePanel />}
- expandSingle={true}
- omit={['id', 'createTime', 'createBy', 'memo']}
+ omit={['id', 'createTime', 'createBy', 'memo','statusBool','updateBy']}
>
<NumberField source="id" />
{/* <TextField source="uuid" label="table.field.locType.uuid" /> */}
<TextField source="name" label="table.field.locType.name" />
+ <TextField source="code" label="table.field.locType.code" />
<TextField source="regex" label="table.field.locType.regex" />
<ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}>
@@ -151,3 +158,26 @@
}
export default LocTypeList;
+
+const BindButton = () => {
+ const record = useRecordContext();
+ const notify = useNotify();
+ const refresh = useRefresh();
+
+
+ const [createDialog, setCreateDialog] = useState(false);
+
+ return (
+ <>
+ <Button onClick={() => setCreateDialog(true)} label={"toolbar.bindmatnr"}>
+ <LinkIcon />
+ </Button>
+
+ <BindModal
+ open={createDialog}
+ setOpen={setCreateDialog}
+ />
+ </>
+
+ )
+}
--
Gitblit v1.9.1