add-扫描入库界面添加物料型号显示

master
liuwf 2 years ago
parent b348146b12
commit 7159b0e3dd

@ -1919,28 +1919,33 @@
<RowDefinition Height="167*"/>
<RowDefinition Height="167*"/>
<RowDefinition Height="167*"/>
<RowDefinition Height="167*"/>
<RowDefinition Height="166.667"/>
<RowDefinition Height="167*"/>
<RowDefinition Height="167*"/>
<RowDefinition Height="83*"/>
<RowDefinition Height="167*"/>
</Grid.RowDefinitions>
<TextBlock Text="扫描入库" FontSize="50" Grid.ColumnSpan="6" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBlock Text="扫描料箱号:" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="75"/>
<TextBlock Text="扫描条码号:" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="75"/>
<TextBlock Text="入库数量:" Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="75"/>
<hc:TextBox x:Name="txtInBox" hc:InfoElement.ShowClearButton="True" FontSize="50" LostFocus="txtInBox_TextChanged" TextChanged="txtInBox_TextChanged" Width="700" HorizontalAlignment="Left" VerticalAlignment="Center" Height="130" Grid.Row="1" Grid.Column="3" Grid.ColumnSpan="3"/>
<TextBlock Text="物料名称:" Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="75"/>
<TextBlock Text="物料规格:" Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="75"/>
<TextBlock Text="入库数量:" Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="75"/>
<hc:TextBox x:Name="txtInBox" hc:InfoElement.ShowClearButton="True" FontSize="50" LostFocus="txtInBox_TextChanged" TextChanged="txtInBox_TextChanged" Width="700" HorizontalAlignment="Left" VerticalAlignment="Center" Height="100" Grid.Row="1" Grid.Column="3" Grid.ColumnSpan="3"/>
<Button Click="barClear_Click" HorizontalAlignment="Right" Height="100" Panel.ZIndex="1" Width="100" Margin="0,0,130,0" Grid.Column="5" Grid.Row="2">
<Image Source="..\Resources\cancel.png"/>
</Button>
<Button Click="boxClear_Click" HorizontalAlignment="Right" Height="100" Panel.ZIndex="1" Width="100" Margin="0,0,130,0" Grid.Column="5" Grid.Row="1">
<Image Source="..\Resources\cancel.png"/>
</Button>
<hc:TextBox x:Name="txtInBarCode" hc:InfoElement.ShowClearButton="True" FontSize="50" LostFocus="txtInBarCode_TextChanged" TextChanged="txtInBarCode_TextChanged" Width="700" HorizontalAlignment="Left" VerticalAlignment="Center" Height="130" Grid.Row="2" Grid.Column="3" Grid.ColumnSpan="3"/>
<hc:TextBox x:Name="txtInScan" FontSize="50" IsReadOnly="True" Width="700" HorizontalAlignment="Left" VerticalAlignment="Center" Height="130" Grid.Row="3" Grid.Column="3" Grid.ColumnSpan="3" />
<Button Content="确认入库" Grid.Row="4" Grid.ColumnSpan="6" Width="500" Height="100" FontSize="50" Background="#346DFF" Foreground="White" Click="InRawBaseLocaltion_Click"/>
<Button Content="一键收料" Grid.Row="5" Grid.ColumnSpan="6" Width="500" Height="100" FontSize="50" Background="#346DFF" Foreground="White" Click="callPlc_Click"/>
<TextBlock Grid.Row="6" Text="提示信息:" HorizontalAlignment="Center" Grid.Column="1" Grid.ColumnSpan="1" Width="250" Height="100" FontSize="50" Foreground="White" />
<TextBlock x:Name="MsgText" Grid.Row="6" FontSize="40" Grid.ColumnSpan="5" Width="800" Height="60" Foreground="White" HorizontalAlignment="Right" />
<hc:TextBox x:Name="txtInBarCode" hc:InfoElement.ShowClearButton="True" FontSize="50" LostFocus="txtInBarCode_TextChanged" TextChanged="txtInBarCode_TextChanged" Width="700" HorizontalAlignment="Left" VerticalAlignment="Center" Height="100" Grid.Row="2" Grid.Column="3" Grid.ColumnSpan="3"/>
<hc:TextBox x:Name="materialName" IsReadOnly="True" hc:InfoElement.ShowClearButton="True" FontSize="50" Width="700" HorizontalAlignment="Left" VerticalAlignment="Center" Height="100" Grid.Row="3" Grid.Column="3" Grid.ColumnSpan="3"/>
<hc:TextBox x:Name="materialSpec" IsReadOnly="True" hc:InfoElement.ShowClearButton="True" FontSize="50" Width="700" HorizontalAlignment="Left" VerticalAlignment="Center" Height="100" Grid.Row="4" Grid.Column="3" Grid.ColumnSpan="3"/>
<hc:TextBox x:Name="txtInScan" FontSize="50" IsReadOnly="True" Width="700" HorizontalAlignment="Left" VerticalAlignment="Center" Height="100" Grid.Row="5" Grid.Column="3" Grid.ColumnSpan="3" />
<Button Content="确认入库" Grid.Row="6" Grid.ColumnSpan="6" Width="300" Height="100" FontSize="50" Background="#346DFF" Foreground="White" Click="InRawBaseLocaltion_Click"/>
<Button Content="一键收料" Grid.Row="7" Grid.ColumnSpan="6" Width="300" Height="100" FontSize="50" Background="#346DFF" Foreground="White" Click="callPlc_Click" HorizontalAlignment="Right"/>
<TextBlock Grid.Row="7" Text="提示信息:" HorizontalAlignment="Center" Grid.Column="1" Grid.ColumnSpan="1" Width="250" Height="100" FontSize="50" Foreground="White" />
<TextBlock x:Name="MsgText" Grid.Row="7" FontSize="50" Grid.ColumnSpan="5" Width="800" Height="100" Foreground="White" HorizontalAlignment="Right" />
<Button Content="执行CTU入库任务" Visibility="Hidden" Click="btnCtuInConfirmBox_Click" Grid.Row="5" Grid.ColumnSpan="6" Width="500" Height="100" FontSize="50" Background="#346DFF" Foreground="White"/>
</Grid>
</StackPanel>

@ -1495,7 +1495,8 @@ namespace Khd.Core.Wpf.Form
txtInBox.Text = string.Empty;
txtInBarCode.Text = string.Empty;
txtInScan.Text = string.Empty;
materialName.Text = string.Empty;
materialSpec.Text = string.Empty;
return;
}
@ -1506,6 +1507,8 @@ namespace Khd.Core.Wpf.Form
txtInBox.Text = string.Empty;
txtInBarCode.Text = string.Empty;
txtInScan.Text = string.Empty;
materialName.Text = string.Empty;
materialSpec.Text = string.Empty;
txtInBox.Focus();
return;
}
@ -1518,6 +1521,8 @@ namespace Khd.Core.Wpf.Form
txtInBox.Text = string.Empty;
txtInBarCode.Text = string.Empty;
txtInScan.Text = string.Empty;
materialName.Text = string.Empty;
materialSpec.Text = string.Empty;
txtInBox.Focus();
return;
}
@ -1566,7 +1571,9 @@ namespace Khd.Core.Wpf.Form
txtInBox.Text = string.Empty;
txtInBarCode.Text = string.Empty;
txtInScan.Text = string.Empty;
materialName.Text = string.Empty;
materialSpec.Text = string.Empty;
}
else
{
@ -1579,7 +1586,9 @@ namespace Khd.Core.Wpf.Form
txtInBox.Text = string.Empty;
txtInBarCode.Text = string.Empty;
txtInScan.Text = string.Empty;
MsgText.Text = "入库失败";
materialName.Text = string.Empty;
materialSpec.Text = string.Empty;
MsgText.Text = "入库异常"+ ex;
txtInBarCode.Focus();
}
}
@ -1679,7 +1688,12 @@ namespace Khd.Core.Wpf.Form
{
string containerCode = txtInBox.Text;
if (containerCode.Length >= 1) MsgText.Text = string.Empty;
if (containerCode.Length >= 1)
{
MsgText.Text = string.Empty;
txtInScan.Text = string.Empty;
}
if (containerCode.Length < 15)
return;
if (!string.IsNullOrEmpty(containerCode))
@ -1718,7 +1732,8 @@ namespace Khd.Core.Wpf.Form
{
try
{
materialName.Text = string.Empty;
materialSpec.Text = string.Empty;
string barCode = txtInBarCode.Text;
if (barCode.Length < 19) return;
@ -1750,10 +1765,10 @@ namespace Khd.Core.Wpf.Form
}
else
{
txtInScan.Text = (material.batchFlag == "1") ? "" : "1.00";
txtInScan.Text = (material.batchFlag == "1") ? "" : "1.00";
materialName.Text = mesBaseMaterialInfo.MaterialName;
materialSpec.Text = mesBaseMaterialInfo.MaterialSpec;
if (mesBaseMaterialInfo.BatchFlag == "0")
{
txtInScan.IsReadOnly = true;

Loading…
Cancel
Save