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(); } } }