From 3799e9f3fc8abaafa95094c8c987a8d9da3eb2a9 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期二, 06 五月 2025 13:11:19 +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, 17 insertions(+), 14 deletions(-)

diff --git a/rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx b/rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx
index 4644ed6..19c2d3f 100644
--- a/rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx
+++ b/rsf-admin/src/page/orders/asnOrder/AsnOrderList.jsx
@@ -114,6 +114,8 @@
   const [modalType, setmodalType] = useState(0);
   const [select, setSelect] = useState(0);
   const billReload = useRef();
+  const notify = useNotify();
+  const refresh = useRefresh();
   const dicts = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_business_type')) || [];
   return (
     <Box display="flex">
@@ -128,16 +130,16 @@
           marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0,
         }}
         title={"menu.asnOrder"}
-        empty={<EmptyData onClick={() => { setCreateDialog(true); setmodalType(0) }} />}
+        empty={false}
         filters={filters}
-        filter={{deleted: 0}}
+        filter={{ deleted: 0 }}
         sort={{ field: "create_time", order: "desc" }}
         actions={(
           <TopToolbar>
             <FilterButton />
             <MyCreateButton onClick={() => { setCreateDialog(true); setmodalType(0) }} />
             <SelectColumnsButton preferenceKey='asnOrder' />
-            <ImportButton value={'asnOrderItem'}  />
+            <ImportButton value={'asnOrderItem'} />
             <MyExportButton />
           </TopToolbar>
         )}
@@ -181,7 +183,8 @@
             <MyButton setCreateDialog={setCreateDialog} setmodalType={setmodalType} />
             <InspectionButton />
             <CompleteButton />
-            <CloseButton />
+            <DeleteButton mutationMode="pessimistic" />
+            {/* <CloseButton /> */}
           </WrapperField>
         </StyledDatagrid>
       </List>
@@ -223,6 +226,7 @@
   )
 }
 
+//鎶ユ
 const InspectionButton = () => {
   const record = useRecordContext();
   const notify = useNotify();
@@ -242,11 +246,8 @@
     }
   }
 
-
   return (
-    <Button onClick={inspection} label={"toolbar.inspection"}>
-      <ConstructionIcon />
-    </Button>
+    <ConfirmButton label={"toolbar.inspection"} color="secondary" startIcon={<ConstructionIcon />} onConfirm={inspection} />
   )
 }
 
@@ -254,10 +255,11 @@
   const { selectedIds, onUnselectItems, data } = useListContext();
   const notify = useNotify();
   const refresh = useRefresh();
+  const translate = useTranslate();
   const inspection = (btn) => {
     btn.stopPropagation();
     if (selectedIds.length === 0) {
-      notify('璇烽�夋嫨閫氱煡鍗�');
+      notify(translate("request.error.select_error_order"));
       return;
     } else {
       const rows = data.filter((item) => selectedIds.includes(item.id))
@@ -329,6 +331,7 @@
   )
 }
 
+//瀹屾垚鍗曟嵁
 const CompleteButton = () => {
   const record = useRecordContext();
   const notify = useNotify();
@@ -345,10 +348,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> : )
+    <ConfirmButton label={"toolbar.complete"} color="secondary"  startIcon={<TaskIcon />} onConfirm={requestComplete} />
   )
 
 
@@ -370,6 +373,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