From 81021cabe80842d66001b89ad8290cc42a2fcd16 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期二, 06 五月 2025 17:47:09 +0800
Subject: [PATCH] 组拖筛选条件删除
---
rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx | 32 +++++++++++++++++++++-----------
1 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx b/rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx
index 345c3a1..8d20039 100644
--- a/rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx
+++ b/rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx
@@ -132,7 +132,7 @@
title={"menu.asnOrder"}
empty={false}
filters={filters}
- filter={{deleted: 0}}
+ filter={{ deleted: 0 }}
sort={{ field: "create_time", order: "desc" }}
actions={(
<TopToolbar>
@@ -183,7 +183,8 @@
<MyButton setCreateDialog={setCreateDialog} setmodalType={setmodalType} />
<InspectionButton />
<CompleteButton />
- <CloseButton />
+ <ODeleteButton />
+ {/* <CloseButton /> */}
</WrapperField>
</StyledDatagrid>
</List>
@@ -204,6 +205,14 @@
}
export default AsnOrderList;
+const ODeleteButton = () => {
+ const record = useRecordContext();
+ return (
+ record.exceStatus === 0 ? <DeleteButton mutationMode="pessimistic"/> : <></>
+ )
+
+}
+
const MyButton = ({ setCreateDialog, setmodalType }) => {
const record = useRecordContext();
const handleEditClick = (btn) => {
@@ -214,6 +223,7 @@
};
return (
+ record.exceStatus === 1 || record.exceStatus === 0 ?
<Button
color="primary"
startIcon={<EditIcon />}
@@ -222,9 +232,11 @@
label={'ra.action.edit'}
>
</Button>
+ : <></>
)
}
+//鎶ユ
const InspectionButton = () => {
const record = useRecordContext();
const notify = useNotify();
@@ -244,11 +256,8 @@
}
}
-
return (
- <Button onClick={inspection} label={"toolbar.inspection"}>
- <ConstructionIcon />
- </Button>
+ <ConfirmButton label={"toolbar.inspection"} color="secondary" startIcon={<ConstructionIcon />} onConfirm={inspection} />
)
}
@@ -332,6 +341,7 @@
)
}
+//瀹屾垚鍗曟嵁
const CompleteButton = () => {
const record = useRecordContext();
const notify = useNotify();
@@ -348,10 +358,10 @@
}
return (
- record.exceStatus === 1 && (record.anfme === record.qty ? <Button onClick={requestComplete} label={"toolbar.complete"} color="success">
- <TaskIcon />
- </Button> : <ConfirmButton label={"toolbar.complete"} color="success" data={'褰撳墠鏀惰揣鏁伴噺灏忎簬璁″垝鏁伴噺锛屾槸鍚︾‘璁ゅ畬鎴�'} startIcon={<TaskIcon />} onConfirm={requestComplete} />)
-
+ // record.exceStatus === 1 && (record.anfme === record.qty ? <Button onClick={requestComplete} label={"toolbar.complete"} color="secondary">
+ // <TaskIcon />
+ // </Button> : )
+ record.exceStatus === 1 ? <ConfirmButton label={"toolbar.complete"} color="secondary" startIcon={<TaskIcon />} onConfirm={requestComplete} /> : <></>
)
@@ -373,6 +383,6 @@
}
return (
- <ConfirmButton label={"toolbar.close"} color="error" data={'纭鏄惁鍏抽棴锛�'} startIcon={<CloseIcon />} onConfirm={requestClose} />
+ <ConfirmButton label={"toolbar.close"} color="error" startIcon={<CloseIcon />} onConfirm={requestClose} />
)
}
--
Gitblit v1.9.1