From bfc43ca0e4683c1c0322a6cad5d5be2bc07decc3 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期四, 24 七月 2025 15:00:44 +0800
Subject: [PATCH] 新增调拔单功能 盘点功能优化

---
 rsf-admin/src/page/work/outBound/OutBoundList.jsx |   42 +++++++++++++++++++++++-------------------
 1 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/rsf-admin/src/page/work/outBound/OutBoundList.jsx b/rsf-admin/src/page/work/outBound/OutBoundList.jsx
index 9fd898b..348571c 100644
--- a/rsf-admin/src/page/work/outBound/OutBoundList.jsx
+++ b/rsf-admin/src/page/work/outBound/OutBoundList.jsx
@@ -64,7 +64,6 @@
 import { number } from "prop-types";
 
 const OutBoundList = () => {
-
     const [createDialog, setCreateDialog] = useState(false);
     const [tabelData, setTableData] = useState([]);
     const [selectedRows, setSelectedRows] = useState([]);
@@ -128,7 +127,6 @@
                                         label={translate("table.field.outBound.outSta")}
                                         onChange={(e) => {
                                             setSta(e.target.value);
-                                            console.log("绔欑偣宸查�夋嫨:", e.target.value);
                                         }}
                                         size="small"
                                         type="[101,103]"
@@ -182,13 +180,12 @@
         http(sta, data);
     }
     const http = async (sta, items) => {
-        console.log(items);
-
-        const filter = items.filter(item => (item.outQty + item.workQty) > item.anfme);
-        if (filter.length > 0) {
-            notify(translate('toolbar.request.error.out_stock_qty'))
-            return
-        }
+        // const filZores = items.filter(item => item.outQty  <= 0.0);
+        // const filter = items.filter(item => (item.outQty + item.workQty) > item.anfme);
+        // if (filter.length > 0 || filZores.length > 0) {
+        //     notify(translate('toolbar.request.error.out_stock_qty'))
+        //     return
+        // }
         const { data: { code, data, msg } } = await request.post(`/locItem/generate/task`, { siteNo: sta, items: items });
         if (code === 200) {
             notify(msg);
@@ -222,7 +219,8 @@
             width: 100,
             type: 'number',
             editable: true,
-            headerClassName: "custom",
+            headerClassName: "custom",            
+            
         },
         {
             field: 'anfme',
@@ -231,13 +229,13 @@
             width: 100,
             editable: false,
         },
-        {
-            field: 'workQty',
-            headerName: translate('table.field.locItem.workQty'),
-            width: 100,
-            type: 'number',
-            editable: false,
-        },
+        // {
+        //     field: 'workQty',
+        //     headerName: translate('table.field.locItem.workQty'),
+        //     width: 100,
+        //     type: 'number',
+        //     editable: false,
+        // },
         {
             field: 'locCode',
             headerName: translate('table.field.locItem.locCode'),
@@ -315,6 +313,12 @@
 
 
     const processRowUpdate = (newRow, oldRow) => {
+        // 纭繚outQty涓嶅皬浜�0
+        if (newRow.outQty <= 0) {
+            notify(translate('request.error.qty_not_negative'), { type: 'error', messageArgs: { _: translate('request.error.qty_not_negative') } });
+            return oldRow; // 濡傛灉灏忎簬0锛屼繚鎸佸師鍊间笉鍙�
+        }
+        
         const rows = tabelData.map((r) =>
             r.id === newRow.id ? { ...newRow } : r
         )
@@ -348,9 +352,9 @@
                         },
                     },
                 }}
-                pageSizeOptions={[10, 25, 50, 100]}
+                pageSizeOptions={[15, 25, 50, 100]}
                 editMode="row"
-                checkboxSelection
+                checkboxSelection = {false}
                 onRowSelectionModelChange={handleSelectionChange}
                 selectionModel={selectedRows}
                 sx={{

--
Gitblit v1.9.1