From cc9a586e2f5c01b606bfc6d541c5e1dbd6de6700 Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期二, 06 一月 2026 11:27:21 +0800
Subject: [PATCH] 1

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs |   13 ++++++++-----
 项目代码/WIDESEA_WMSClient/src/extension/outbound/extend/NoStockOut.vue              |   13 ++++++++++---
 2 files changed, 18 insertions(+), 8 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/NoStockOut.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/NoStockOut.vue"
index ec9dd47..d19a48e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/NoStockOut.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/extend/NoStockOut.vue"
@@ -333,9 +333,10 @@
     const purchaseOrderNo = await getPurchaseOrderByBarcode(barcode);
     if (purchaseOrderNo) {
       orderForm.purchaseOrderNo = purchaseOrderNo;
-      ElMessage.success(`鎴愬姛鏌ヨ鍒伴噰璐崟锛�${purchaseOrderNo}`);
     } else {
       ElMessage.info("鏈煡璇㈠埌璇ユ潯鐮佸搴旂殑閲囪喘鍗曞彿锛岀户缁獙璇佹潯鐮佹湁鏁堟��");
+      formData.barcode = ""; // 鏂板锛氶獙璇佸け璐ユ椂娓呯┖杈撳叆妗�
+      nextTick(() => barcodeInputRef.value?.focus()); // 鏂板锛氳仛鐒︽潯鐮佽緭鍏ユ
     }
 
     // 姝ラ2锛氶獙璇佹潯鐮佸苟鑾峰彇鐗╂枡淇℃伅
@@ -348,6 +349,8 @@
     if (validateRes.status === true) {
       if (!Array.isArray(validateRes.data) || validateRes.data.length === 0) {
         ElMessage.warning("璇ユ潯鐮侀獙璇佹垚鍔燂紝浣嗘湭杩斿洖鐗╂枡淇℃伅");
+        formData.barcode = ""; // 鏂板锛氭棤鐗╂枡淇℃伅鏃朵篃娓呯┖杈撳叆妗�
+        nextTick(() => barcodeInputRef.value?.focus()); // 鏂板锛氳仛鐒︽潯鐮佹
       } else {
         const newItems = validateRes.data.map(item => ({
           barcode: item.barcode || '',
@@ -360,14 +363,18 @@
         }));
         scannedBarcodes.value.push(...newItems);
         ElMessage.success(`鎵弿鎴愬姛锛屾柊澧� ${newItems.length} 鏉$墿鏂欎俊鎭紝绱 ${scannedBarcodes.value.length} 鏉);
+        formData.barcode = "";
       }
-      formData.barcode = "";
     } else {
       ElMessage.error("鎵弿澶辫触锛�" + (validateRes.message || '鏉$爜楠岃瘉澶辫触'));
+      formData.barcode = ""; // 鏂板锛氶獙璇佸け璐ユ椂娓呯┖杈撳叆妗�
+      nextTick(() => barcodeInputRef.value?.focus()); // 鏂板锛氳仛鐒︽潯鐮佽緭鍏ユ
     }
   } catch (error) {
     ElMessage.error(error.message);
-    formData.barcode = "";
+    formData.barcode = ""; // 淇濈暀锛氭帴鍙e紓甯告椂娓呯┖
+    // 鏂板锛氬紓甯告椂涔熷己鍒惰仛鐒︽潯鐮佹
+    nextTick(() => barcodeInputRef.value?.focus());
   } finally {
     loading.value = false;
     // 鎵弿瀹屾垚鍚庡缁堣仛鐒︽潯鐮佽緭鍏ユ锛堟柟渚胯繛缁壂鎻忥級
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs"
index 586cd82..6312766 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundPickingService.cs"
@@ -2390,7 +2390,7 @@
 
                     if (matchedCode == null)
                     {
-                        return WebResponseContent.Instance.Error($"鍦ㄥ嚭搴撳崟鐨勭墿鏂欑紪鐮佷腑鏈壘鍒颁笌閲囪喘鍗曚腑鐨剓item.MaterielCode} 瀵瑰簲鐨勭墿鏂欍��");
+                        return WebResponseContent.Instance.Error($"鍦ㄥ嚭搴撳崟鐨勭墿鏂欑紪鐮佷腑鏈壘鍒颁笌閲囪喘鍗曚腑鐨剓item.MaterielCode} 瀵瑰簲鐨勭墿鏂欍�傛垨鐗╂枡{item.MaterielCode}鍙嚭鏁伴噺婧㈠嚭{(matchedCode.LockQuantity + matchedCode.MoveQty + matchedCode.NoStockOutQty)-matchedCode.OrderQuantity }");
                     }
                     if (!matchedCode.BatchNo.IsNullOrEmpty() && matchedCode.BatchNo != "")
                     {
@@ -2683,6 +2683,7 @@
                 {
                     item.LockQuantity = item.NoStockOutQty;
                     item.OverOutQuantity = item.NoStockOutQty;
+                    item.CurrentDeliveryQty = item.OverOutQuantity;
                     //娣诲姞鍥炰紶MES鍙傛暟
                     List<Barcodes> barcodesList = new List<Barcodes>();
                     List<Barcodes> documentsNOList = new List<Barcodes>();
@@ -2774,7 +2775,7 @@
                         BusinessType = "3",
                         FactoryArea = inboundOrder.FactoryArea,
                         OperationType = 1,
-                        Operator = inboundOrder.Operator,
+                        Operator = App.User.UserName,
                         OrderNo = inboundOrder.UpperOrderNo,
                         fromWarehouse = allocate?.FromWarehouse ?? "",
                         toWarehouse = allocate?.ToWarehouse ?? "",
@@ -2790,11 +2791,13 @@
 
                     if (response != null && response.IsSuccess)
                     {
-                        _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 1 });
+                        _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 1 })
+                            .Where(it => it.OrderId == inboundOrder.Id).ExecuteCommand(); ;
                     }
                     else
                     {
-                        _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 2 });
+                        _inboundOrderRepository.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 2 })
+                            .Where(it => it.OrderId == inboundOrder.Id).ExecuteCommand(); ;
                         return content.Error("鍥炰紶MES澶辫触");
                     }
                 }
@@ -2807,7 +2810,7 @@
                         business_type = inboundOrder.BusinessType,
                         factoryArea = inboundOrder.FactoryArea,
                         operationType = 1,
-                        Operator = inboundOrder.Operator,
+                        Operator = App.User.UserName,
                         orderNo = inboundOrder.UpperOrderNo,
                         status = inboundOrder.OrderStatus,
                         details = NoStockOutFeedbackInboundDetailsModelDto(detail)

--
Gitblit v1.9.3