liuwf 1 year ago
parent a4e3b4b7e0
commit 690793c516

@ -2240,48 +2240,52 @@
</DataGrid.ColumnHeaderStyle> </DataGrid.ColumnHeaderStyle>
</DataGrid> </DataGrid>
</Border> </Border>
<TextBlock Text="扫描出库:" Grid.Column="3" Grid.RowSpan="2" Foreground="White" FontSize="50" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.ColumnSpan="6"/> <!--<TextBlock Text="扫描出库:" Grid.Column="3" Grid.RowSpan="2" Foreground="White" FontSize="50" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.ColumnSpan="6"/>-->
<TextBlock Text="待执行CTU任务数:" Visibility="Hidden" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Right" VerticalAlignment="Center" FontSize="50"/> <TextBlock Text="待执行CTU任务数:" Visibility="Hidden" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Right" VerticalAlignment="Center" FontSize="50"/>
<TextBlock x:Name="outTaskCount" Visibility="Hidden" Grid.Row="1" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="75"/> <TextBlock x:Name="outTaskCount" Visibility="Hidden" Grid.Row="1" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="75"/>
<Button Content="执行CTU出库任务" Visibility="Hidden" Grid.Row="1" Grid.Column="3" Grid.ColumnSpan="2" Width="500" Height="100" FontSize="50" Background="#346DFF" Foreground="White" Click="ExecuteCtuTask_Click"/> <Button Content="执行CTU出库任务" Visibility="Hidden" Grid.Row="1" Grid.Column="3" Grid.ColumnSpan="2" Width="500" Height="100" FontSize="50" Background="#346DFF" Foreground="White" Click="ExecuteCtuTask_Click"/>
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="6"> <StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="6">
<TextBlock Text="扫描料箱号:" Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="75"/> <TextBlock Text="扫描料箱号:" Width="350" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="60"/>
<Grid> <Grid>
<hc:TextBox hc:InfoElement.ShowClearButton="True" x:Name="txtOutBox" FontSize="50" LostFocus="txtOutBox_TextChanged" Width="700" HorizontalAlignment="Left" VerticalAlignment="Center" Height="130" Grid.Row="2" Grid.Column="3" Grid.ColumnSpan="3"/> <hc:TextBox hc:InfoElement.ShowClearButton="True" x:Name="txtOutBox" FontSize="50" TextChanged="txtOutBox_TextChanged" Width="700" HorizontalAlignment="Left" VerticalAlignment="Center" Height="130" Grid.Row="2" Grid.Column="3" Grid.ColumnSpan="3" />
<Button Click="boxOutClear_Click" HorizontalAlignment="Right" Height="100" Panel.ZIndex="1" Width="100" Margin="0,0,0,0" Grid.Column="5" Grid.Row="2"> <Button Click="boxOutClear_Click" HorizontalAlignment="Right" Height="100" Panel.ZIndex="1" Width="100" Margin="0,0,0,0" Grid.Column="5" Grid.Row="2">
<Image Source="..\Resources\cancel.png"/> <Image Source="..\Resources\cancel.png"/>
</Button> </Button>
</Grid> </Grid>
<Button Content="选择出库" Background="#346DFF" Grid.ColumnSpan="6" Grid.Row="1" Foreground="White" FontSize="50" Margin="20,0,0,0" Height="100" Width="250" Click="SelectOutBtn_Click"/>
<Button Content="继续出库" Background="#346DFF" Grid.ColumnSpan="6" Grid.Row="1" Foreground="White" FontSize="50" Margin="20,0,0,0" Height="100" Width="250" Click="ContineOutBtn_Click"/>
</StackPanel> </StackPanel>
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="6"> <StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Grid.Row="1" Grid.ColumnSpan="6">
<!--<TextBlock Text="扫描料箱号:" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="75"/> <TextBlock Text="扫描条码号:" Width="350" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="60"/>
<Grid> <Grid>
<hc:TextBox hc:InfoElement.ShowClearButton="True" x:Name="txtOutBox" FontSize="50" LostFocus="txtOutBox_TextChanged" Width="700" HorizontalAlignment="Left" VerticalAlignment="Center" Height="130" Grid.Row="2" Grid.Column="3" Grid.ColumnSpan="3"/> <hc:TextBox hc:InfoElement.ShowClearButton="True" x:Name="txtOutBarCode" FontSize="50" TextChanged="txtOutBarCode_TextChanged" Width="700" HorizontalAlignment="Left" VerticalAlignment="Center" Height="130" Grid.Row="3" Grid.Column="3" Grid.ColumnSpan="3"/>
<Button Click="boxOutClear_Click" HorizontalAlignment="Right" Height="100" Panel.ZIndex="1" Width="100" Margin="0,0,0,0" Grid.Column="5" Grid.Row="2">
<Image Source="..\Resources\cancel.png"/>
</Button>
</Grid>-->
<Button Content="选择出库" Background="#346DFF" Grid.ColumnSpan="6" Grid.Row="1" Foreground="White" FontSize="50" Margin="20,0,0,0" Height="100" Width="250" Click="SelectOutBtn_Click"/>
<Button Content="继续出库" Background="#346DFF" Grid.ColumnSpan="6" Grid.Row="1" Foreground="White" FontSize="50" Margin="20,0,0,0" Height="100" Width="250" Click="ContineOutBtn_Click"/>
</StackPanel>
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Grid.Row="3" Grid.ColumnSpan="6">
<TextBlock Text="扫描条码号:" Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="75"/>
<Grid>
<hc:TextBox hc:InfoElement.ShowClearButton="True" x:Name="txtOutBarCode" FontSize="50" LostFocus="txtOutBarCode_TextChanged" Width="700" HorizontalAlignment="Left" VerticalAlignment="Center" Height="130" Grid.Row="3" Grid.Column="3" Grid.ColumnSpan="3"/>
<Button Click="barOutClear_Click" HorizontalAlignment="Right" Height="100" Panel.ZIndex="1" Width="100" Margin="0,0,0,0" Grid.Column="5" Grid.Row="3"> <Button Click="barOutClear_Click" HorizontalAlignment="Right" Height="100" Panel.ZIndex="1" Width="100" Margin="0,0,0,0" Grid.Column="5" Grid.Row="3">
<Image Source="..\Resources\cancel.png"/> <Image Source="..\Resources\cancel.png"/>
</Button> </Button>
</Grid> </Grid>
</StackPanel>
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="6">
<TextBlock Width="350" Text="物料名称:" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="60"/>
<Grid>
<hc:TextBox hc:InfoElement.ShowClearButton="True" IsReadOnly="True" x:Name="outMaterialNameTxt" FontSize="50" LostFocus="txtOutBox_TextChanged" Width="700" HorizontalAlignment="Left" VerticalAlignment="Center" Height="130" Grid.Row="2" Grid.Column="3" Grid.ColumnSpan="3"/>
</Grid>
<Button Content="选择出库" Background="#346DFF" Grid.ColumnSpan="6" Grid.Row="1" Foreground="White" FontSize="50" Margin="20,0,0,0" Height="100" Width="250" Click="SelectOutBtn_Click"/>
<Button Content="继续出库" Background="#346DFF" Grid.ColumnSpan="6" Grid.Row="1" Foreground="White" FontSize="50" Margin="20,0,0,0" Height="100" Width="250" Click="ContineOutBtn_Click"/>
</StackPanel>
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Grid.Row="3" Grid.ColumnSpan="6">
<TextBlock Text="物料规格:" Width="350" Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="60"/>
<Grid>
<hc:TextBox hc:InfoElement.ShowClearButton="True" IsReadOnly="True" x:Name="outMaterialSpecTxt" FontSize="50" LostFocus="txtOutBarCode_TextChanged" Width="700" HorizontalAlignment="Left" VerticalAlignment="Center" Height="130" Grid.Row="3" Grid.Column="3" Grid.ColumnSpan="3"/>
</Grid>
<Button Content="确认出库" Grid.Column="4" Grid.Row="5" Grid.ColumnSpan="2" Width="400" Height="100" Margin="100,0,0,0" FontSize="35" Background="#346DFF" Foreground="White" Click="OutRawBaseLocaltion_Click"/> <Button Content="确认出库" Grid.Column="4" Grid.Row="5" Grid.ColumnSpan="2" Width="400" Height="100" Margin="100,0,0,0" FontSize="35" Background="#346DFF" Foreground="White" Click="OutRawBaseLocaltion_Click"/>
</StackPanel> </StackPanel>
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Grid.Row="4" Grid.ColumnSpan="6"> <StackPanel HorizontalAlignment="Left" Orientation="Horizontal" Grid.Row="4" Grid.ColumnSpan="6">
<TextBlock Text="出库数量:" Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="75"/> <TextBlock Text="出库数量:" Width="350" Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="60"/>
<Grid> <Grid>
<hc:TextBox x:Name="txtOutScan" Margin="80,0,0,0" IsReadOnly="True" FontSize="50" Width="700" HorizontalAlignment="Left" VerticalAlignment="Center" Height="130" Grid.Row="4" Grid.Column="3" Grid.ColumnSpan="3" /> <hc:TextBox x:Name="txtOutScan" Margin="0,0,0,0" IsReadOnly="True" FontSize="50" Width="700" HorizontalAlignment="Left" VerticalAlignment="Center" Height="130" Grid.Row="4" Grid.Column="3" Grid.ColumnSpan="3" KeyDown="OutEnter" />
</Grid> </Grid>
<Button Content="背负式小车捡料完成" Grid.Column="4" Grid.Row="6" Grid.ColumnSpan="2" Width="400" Height="100" Margin="100,0,0,0" FontSize="35" Background="#346DFF" Foreground="White" Click="btnBearConfirmBox_Click"/> <Button Content="背负式小车捡料完成" Grid.Column="4" Grid.Row="6" Grid.ColumnSpan="2" Width="400" Height="100" Margin="100,0,0,0" FontSize="35" Background="#346DFF" Foreground="White" Click="btnBearConfirmBox_Click"/>

@ -26,6 +26,7 @@ using System.Threading.Tasks;
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Input; using System.Windows.Input;
using System.Windows.Media.Media3D;
using System.Windows.Threading; using System.Windows.Threading;
using Z.EntityFramework.Plus; using Z.EntityFramework.Plus;
@ -2047,6 +2048,9 @@ namespace Khd.Core.Wpf.Form
try try
{ {
string containerCode = txtOutBox.Text; string containerCode = txtOutBox.Text;
if (containerCode.Length < 15)
return;
if (!string.IsNullOrEmpty(containerCode)) if (!string.IsNullOrEmpty(containerCode))
{ {
using var scope = _host.Services.CreateScope(); using var scope = _host.Services.CreateScope();
@ -2078,8 +2082,11 @@ namespace Khd.Core.Wpf.Form
{ {
try try
{ {
outMaterialNameTxt.Text ="";
outMaterialSpecTxt.Text = "";
string barCode = txtOutBarCode.Text; string barCode = txtOutBarCode.Text;
string containerCode = txtOutBox.Text; string containerCode = txtOutBox.Text;
if (barCode.Length < 19) return;
if (!string.IsNullOrEmpty(containerCode)) if (!string.IsNullOrEmpty(containerCode))
{ {
if (!string.IsNullOrEmpty(barCode)) if (!string.IsNullOrEmpty(barCode))
@ -2104,8 +2111,16 @@ namespace Khd.Core.Wpf.Form
txtOutScan.Text = string.Empty; txtOutScan.Text = string.Empty;
txtOutBarCode.Focus(); txtOutBarCode.Focus();
} }
else else
{ {
var materialInfo = dbContext.MesBaseMaterialInfo.FirstOrDefault(t => t.MaterialId == wmsRawStock.materialId);
if (materialInfo != null)
{
outMaterialNameTxt.Text = materialInfo.MaterialName;
outMaterialSpecTxt.Text = materialInfo.MaterialSpec;
}
txtOutScan.Text = (mesBaseMaterialInfo.batchFlag == "1" ? (wmsRawStock.totalAmount - wmsRawStock.frozenAmount) : 1).ToString(); txtOutScan.Text = (mesBaseMaterialInfo.batchFlag == "1" ? (wmsRawStock.totalAmount - wmsRawStock.frozenAmount) : 1).ToString();
if (mesBaseMaterialInfo.batchFlag == "1") if (mesBaseMaterialInfo.batchFlag == "1")
{ {
@ -2140,6 +2155,13 @@ namespace Khd.Core.Wpf.Form
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
private void OutRawBaseLocaltion_Click(object sender, RoutedEventArgs e) private void OutRawBaseLocaltion_Click(object sender, RoutedEventArgs e)
{
OutRaw();
}
private void OutRaw()
{
try
{ {
if (!string.IsNullOrEmpty(txtOutBox.Text) && !string.IsNullOrEmpty(txtOutBarCode.Text)) if (!string.IsNullOrEmpty(txtOutBox.Text) && !string.IsNullOrEmpty(txtOutBarCode.Text))
{ {
@ -2242,6 +2264,9 @@ namespace Khd.Core.Wpf.Form
HandyControl.Controls.MessageBox.Error("该条码的销售订单不正确"); HandyControl.Controls.MessageBox.Error("该条码的销售订单不正确");
txtOutScan.Text = string.Empty; txtOutScan.Text = string.Empty;
txtOutBarCode.Text = string.Empty; txtOutBarCode.Text = string.Empty;
outMaterialSpecTxt.Text = string.Empty;
outMaterialNameTxt.Text = string.Empty;
txtOutBox.Focus();
return; return;
} }
} }
@ -2249,7 +2274,10 @@ namespace Khd.Core.Wpf.Form
HandyControl.Controls.MessageBox.Success("出库成功!"); HandyControl.Controls.MessageBox.Success("出库成功!");
txtOutScan.Text = string.Empty; txtOutScan.Text = string.Empty;
txtOutBarCode.Text = string.Empty; txtOutBarCode.Text = string.Empty;
outMaterialSpecTxt.Text = string.Empty;
outMaterialNameTxt.Text = string.Empty;
txtOutBarCode.Focus(); txtOutBarCode.Focus();
txtOutBox.Focus();
} }
else else
{ {
@ -2262,6 +2290,11 @@ namespace Khd.Core.Wpf.Form
HandyControl.Controls.MessageBox.Info("请先扫描容器号和条码!"); HandyControl.Controls.MessageBox.Info("请先扫描容器号和条码!");
} }
} }
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
/// <summary> /// <summary>
/// 搜索 /// 搜索
/// </summary> /// </summary>
@ -4029,6 +4062,13 @@ namespace Khd.Core.Wpf.Form
} }
} }
#endregion #endregion
private void OutEnter(object sender, KeyEventArgs e)
{
OutRaw();
}
} }
} }

Loading…
Cancel
Save