From 760b4f0509bbdc0605ea51060f4b844b315b625f Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期二, 06 五月 2025 15:45:42 +0800
Subject: [PATCH] Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop

---
 rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx |   31 ++++++++++++++++++++-----------
 1 files changed, 20 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..88563f3 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 />
+            <DeleteButton mutationMode="pessimistic" />
+            {/* <CloseButton /> */}
           </WrapperField>
         </StyledDatagrid>
       </List>
@@ -203,6 +204,15 @@
   )
 }
 export default AsnOrderList;
+
+const ODeleteButton = () => {
+  const record = useRecordContext();
+  
+  return (
+    record.exceStatus === 0 ? <DeleteButton /> : <></>
+  )
+
+}
 
 const MyButton = ({ setCreateDialog, setmodalType }) => {
   const record = useRecordContext();
@@ -225,6 +235,7 @@
   )
 }
 
+//鎶ユ
 const InspectionButton = () => {
   const record = useRecordContext();
   const notify = useNotify();
@@ -244,11 +255,8 @@
     }
   }
 
-
   return (
-    <Button onClick={inspection} label={"toolbar.inspection"}>
-      <ConstructionIcon />
-    </Button>
+      <ConfirmButton label={"toolbar.inspection"} color="secondary" startIcon={<ConstructionIcon />} onConfirm={inspection} />
   )
 }
 
@@ -332,6 +340,7 @@
   )
 }
 
+//瀹屾垚鍗曟嵁
 const CompleteButton = () => {
   const record = useRecordContext();
   const notify = useNotify();
@@ -348,10 +357,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 +382,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