From 8fa94157065826a8f1086856fc002fbefd173a77 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期五, 08 八月 2025 10:41:00 +0800
Subject: [PATCH] 日库存次数统计
---
rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx | 56 +++++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 41 insertions(+), 15 deletions(-)
diff --git a/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx b/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx
index 2a7d658..d33ad5f 100644
--- a/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx
+++ b/rsf-admin/src/page/basicInfo/matnr/MatnrList.jsx
@@ -67,7 +67,7 @@
'& .RaDatagrid-row': {
cursor: 'auto'
},
- '& .RaList-content': {
+ '& .RaList-content': {
width: '200px'
},
'& .RaList-main': {
@@ -97,7 +97,6 @@
const filters = [
<SearchInput source="condition" alwaysOn />,
-
<TextInput source="name" label="table.field.matnr.name" alwaysOn />,
<TextInput source="code" label="table.field.matnr.code" alwaysOn />,
<ReferenceInput source="shipperId$" label="table.field.matnr.shipperId" reference="shipper">
@@ -140,7 +139,6 @@
<NumberInput source="valid" label="table.field.matnr.valid" />,
<NumberInput source="validWarn" label="table.field.matnr.validWarn" />,
<NumberInput source="flagCheck" label="table.field.matnr.flagCheck" />,
-
<TextInput label="common.field.memo" source="memo" />,
<SelectInput
label="common.field.status"
@@ -157,10 +155,8 @@
const translate = useTranslate();
const notify = useNotify();
const { isLoading } = useListContext();
-
const [columns, setColumns] = useState([]);
const refresh = useRefresh();
-
useEffect(() => {
getDynamicFields();
}, []);
@@ -173,8 +169,8 @@
if (code === 200) {
const arr = [
<NumberField key="id" source="id" />,
- <TooltipField key="name" source="name" label="table.field.matnr.name" cellClassName="name" />,
<TextField key="code" source="code" label="table.field.matnr.code" />,
+ <TooltipField key="name" source="name" label="table.field.matnr.name" cellClassName="name" />,
<TextField key="shipperId$" source="shipperId$" label="table.field.matnr.shipperId" />,
<ReferenceField key="groupId" source="groupId" label="table.field.matnr.groupId" reference="matnrGroup" link={false} sortable={false}>
<TextField source="name" />
@@ -211,10 +207,19 @@
const fields = data.map(el => <TextField key={el.fields} source={`extendFields.[${el.fields}]`} label={el.fieldsAlise} />)
const opt = <WrapperField key="opt" cellClassName="fixed" className="fixed" label="common.field.opt">
<EditButton sx={{ padding: '1px', fontSize: '.75rem' }} />
- <EnableButton />
+ <PrintButton />
</WrapperField>
setColumns([...arr, ...fields, opt]);
-
+ //filters娣诲姞杩囨护瀛楁
+ data.map(el => {
+ var i =0;
+ filters.map((item) =>{
+ if(item.key === el.fields){
+ i = 1;
+ }
+ })
+ i===0 && filters.push(<TextInput key={el.fields} source={el.fields} label={el.fieldsAlise} />)
+ })
} else {
notify(msg);
}
@@ -247,14 +252,14 @@
<BatchStatusButton />
<BatchLevelButton />
<BindButton />
- <PrintButton />
+ <BatchPrintButton />
<BulkDeleteButton mutationMode={OPERATE_MODE} />
</>}
rowClick={(id, resource, record) => false}
- omit={['id', 'shipperId', 'platCode', 'spec', 'model', 'weight', 'color', 'describle'
- , 'nromNum', 'unit', 'purchaseUnit', 'stockUnit', 'stockLeval', 'isLabelMange', 'safeQty'
+ omit={['id', 'shipperId', 'platCode', 'model', 'weight', 'color', 'describle'
+ , 'nromNum', 'unit', 'purchaseUnit', 'stockUnit', 'isLabelMange', 'safeQty'
, 'minQty', 'maxQty', 'stagn', 'valid', 'validWarn', 'flagCheck', 'updateTime', 'updateBy'
- , 'createTime', 'createBy', 'memo', 'rglarId', 'groupId', 'stockLevel']}
+ , 'createTime', 'createBy', 'memo', 'rglarId', 'groupId','statusBool', 'stockLeval$']}
>
{columns.map((column) => column)}
</StyledDatagrid>}
@@ -265,7 +270,6 @@
const MatnrList = () => {
const translate = useTranslate();
-
const [createDialog, setCreateDialog] = useState(false);
const [drawerVal, setDrawerVal] = useState(false);
const notify = useNotify();
@@ -419,7 +423,6 @@
const notify = useNotify();
const refresh = useRefresh();
-
const [createDialog, setCreateDialog] = useState(false);
return (
@@ -461,7 +464,7 @@
)
}
-const PrintButton = () => {
+const BatchPrintButton = () => {
const record = useRecordContext();
const { resource, selectedIds } = useListContext();
const notify = useNotify();
@@ -484,6 +487,29 @@
)
}
+const PrintButton = () => {
+ const record = useRecordContext();
+
+ const notify = useNotify();
+ const refresh = useRefresh();
+
+ const [createDialog, setCreateDialog] = useState(false);
+
+ return (
+ <>
+ <Button color="secondary" onClick={() => setCreateDialog(true)} label={"toolbar.print"}>
+ <PrintIcon />
+ </Button>
+
+ <PrintModal
+ open={createDialog}
+ setOpen={setCreateDialog}
+ rows={[record.id]}
+ />
+ </>
+ )
+}
+
const BindButton = () => {
const record = useRecordContext();
const notify = useNotify();
--
Gitblit v1.9.1