From af9dba652725f40583835c75118bb7f6c411a80f Mon Sep 17 00:00:00 2001
From: Rodney Chen <rodney.chen@hotmail.com>
Date: 星期四, 13 三月 2025 14:15:56 +0800
Subject: [PATCH] 更新实体

---
 Tiger.Business.WMS/Transaction/In_Default.cs |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/Tiger.Business.WMS/Transaction/In_Default.cs b/Tiger.Business.WMS/Transaction/In_Default.cs
index 4ce9e9a..cf4d374 100644
--- a/Tiger.Business.WMS/Transaction/In_Default.cs
+++ b/Tiger.Business.WMS/Transaction/In_Default.cs
@@ -103,7 +103,7 @@
                     {
                         action.IsSuccessed = false;
                         //action.LocaleMsg = Biz.L("鐗╂枡缂栫爜[{0}]涓嶅瓨鍦ㄦ垨鑰呰鐗╂枡鏈惎鐢�");
-                        action.LocaleMsg = Biz.L("WMS.Default.ScanItem.ItemCodeNotExistsOrNotActive", inv.ItemInfo.ITEM_CODE.IsNullOrEmpty(inv.Barcode.ItemCode));
+                        action.LocaleMsg = Biz.L("WMS.Default.ScanItem.ItemCodeNotExistsOrNotActive", inv.ItemInfo?.ITEM_CODE.IsNullOrEmpty(inv.Barcode.ItemCode));
                         return action;
                     }
 
@@ -427,8 +427,8 @@
             //action.LocaleMsg = Biz.L($"鎵弿鏉$爜[{0}]涓婃灦鍒板偍浣峓{1}]鎴愬姛");
             action.LocaleMsg = Biz.L("WMS.Default.ScanItem.PutOnSucceeded", CurInvItem.SN, CurInvItem.Location.LOCATION_CODE);
 
-            //閲嶇疆宸ュ簭
-            ResetScan();
+            //閲嶇疆鎵爜淇℃伅
+            ResetScanInfo();
             return action;
         }
 
@@ -440,9 +440,17 @@
         public override void ResetScan()
         {
             base.ResetScan();
+            ResetScanInfo();
+            CurScanShelf = null;
+        }
+
+        /// <summary>
+        /// 閲嶇疆鎵爜淇℃伅
+        /// </summary>
+        public void ResetScanInfo()
+        {
             Command = null;
             CurInvItem = null;
-            CurScanShelf = null;
         }
 
         public override bool Close(bool needSaveHistoryLog = false)

--
Gitblit v1.9.3