From df86f3b3d0c62c755935d7c34001e94b1ed4c266 Mon Sep 17 00:00:00 2001 From: liuwf Date: Tue, 6 Aug 2024 10:39:14 +0800 Subject: [PATCH] =?UTF-8?q?change-=E6=89=AB=E6=8F=8F=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Khd.Core.Wpf/Form/FormBoardT.xaml.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Khd.Core.Wpf/Form/FormBoardT.xaml.cs b/src/Khd.Core.Wpf/Form/FormBoardT.xaml.cs index 50d60ab..8fd0cdd 100644 --- a/src/Khd.Core.Wpf/Form/FormBoardT.xaml.cs +++ b/src/Khd.Core.Wpf/Form/FormBoardT.xaml.cs @@ -1882,7 +1882,8 @@ namespace Khd.Core.Wpf.Form { try { - + materialName.Text = string.Empty; + materialSpec.Text = string.Empty; string barCode = txtInBarCode.Text; if (barCode.Length < 19) return; @@ -1892,6 +1893,8 @@ namespace Khd.Core.Wpf.Form if (!string.IsNullOrEmpty(barCode)) { + + var material = dbContext.MesBaseBarcodeInfo.FirstOrDefault(t => t.barcodeInfo == barCode); if (material == null) { @@ -1914,8 +1917,8 @@ namespace Khd.Core.Wpf.Form { txtInScan.Text = (material.batchFlag == "1") ? "" : "1.00"; - - + materialName.Text = mesBaseMaterialInfo.MaterialName; + materialSpec.Text = mesBaseMaterialInfo.MaterialSpec; if (mesBaseMaterialInfo.BatchFlag == "0") { txtInScan.IsReadOnly = true; @@ -1924,6 +1927,7 @@ namespace Khd.Core.Wpf.Form { txtInScan.IsReadOnly = false; } + txtInScan.Focus(); } } }