change-条码绑定放行按钮,泡前库型号设置加显示名称

dev
liuwf 10 months ago
parent ccd9516ae1
commit 6a73860f5b

@ -418,7 +418,7 @@ namespace Aucma.Core.BoxFoam.Business
info = info.Where(x => x.SpaceStatus == 1 && x.SpaceCapacity > (x.SpaceStock + x.OnRouteAmount)).ToList();
if(info.Count > 0)
{
result = info.OrderByDescending(x => x.SpaceStock).OrderBy(x => x.SpaceCode).First();
result = info.OrderByDescending(x => x.SpaceStock).First();
}
}
}

@ -95,37 +95,57 @@
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition Height="2*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="100 0 0 0 ">
<Label Content="MES条码 " FontSize="20" Foreground="#FFFFFF"/>
<TextBox TextWrapping="Wrap" Text="{Binding Code1}" Width="300" FontSize="20" Foreground="#FFFFFF"/>
<Label Content="扫描时间 " FontSize="20" Foreground="#FFFFFF"/>
<TextBox TextWrapping="Wrap" Text="{Binding Code1Time}" Width="250" FontSize="20" Foreground="#FFFFFF"/>
<!--<Label Content="订单号 " FontSize="20" Foreground="#FFFFFF"/>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="7*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center" Margin="100 0 0 0 ">
<Label Content="MES条码 " FontSize="20" Foreground="#FFFFFF"/>
<TextBox TextWrapping="Wrap" Text="{Binding Code1}" Width="300" FontSize="20" Foreground="#FFFFFF"/>
<Label Content="扫描时间 " FontSize="20" Foreground="#FFFFFF"/>
<TextBox TextWrapping="Wrap" Text="{Binding Code1Time}" Width="250" FontSize="20" Foreground="#FFFFFF"/>
<!--<Label Content="订单号 " FontSize="20" Foreground="#FFFFFF"/>
<TextBox TextWrapping="Wrap" Width="300" FontSize="20" Foreground="#FFFFFF"/>-->
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="100 0 0 0 ">
<Label Content="成品条码 " FontSize="20" Foreground="#FFFFFF"/>
<TextBox TextWrapping="Wrap" Text="{Binding Code2}" Width="300" FontSize="20" Foreground="#FFFFFF"/>
<Label Content="扫描时间 " FontSize="20" Foreground="#FFFFFF"/>
<TextBox TextWrapping="Wrap" Text="{Binding Code2Time}" Width="250" FontSize="20" Foreground="#FFFFFF"/>
<!--<Label Content="型号 " FontSize="20" Foreground="#FFFFFF"/>
</StackPanel>
</Grid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="7*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center" Margin="100 0 0 0 ">
<Label Content="成品条码 " FontSize="20" Foreground="#FFFFFF"/>
<TextBox TextWrapping="Wrap" Text="{Binding Code2}" Width="300" FontSize="20" Foreground="#FFFFFF"/>
<Label Content="扫描时间 " FontSize="20" Foreground="#FFFFFF"/>
<TextBox TextWrapping="Wrap" Text="{Binding Code2Time}" Width="250" FontSize="20" Foreground="#FFFFFF"/>
<!--<Label Content="型号 " FontSize="20" Foreground="#FFFFFF"/>
<TextBox TextWrapping="Wrap" Width="300" FontSize="20" Foreground="#FFFFFF"/>-->
</StackPanel>
</StackPanel>
</Grid>
<Grid Grid.Row="2" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="7*"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="0" Margin="15 120 0 0" Width="100" Height="40" FontSize="20" Cursor="Hand" Content="放 行" Background="#FF9900" BorderBrush="#FF9900" Click="Button_Click" />
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center" Margin="100 0 0 0 ">
<Label Content="提示信息 " FontSize="20" Foreground="#FFFFFF"/>
<StackPanel Grid.Row="2" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="100 0 0 0 ">
<Label Content="提示信息 " FontSize="20" Foreground="#FFFFFF"/>
<TextBox TextWrapping="Wrap" IsReadOnly="True" Text="{Binding BindingInfo}" Width="600" Height="200" FontSize="18" Foreground="#FFFFFF"/>
</StackPanel>
</Grid>
<TextBox TextWrapping="Wrap" Text="{Binding BindingInfo}" Width="600" Height="200" FontSize="18" Foreground="#FFFFFF"/>
</StackPanel>
<Button Margin="10,51,420,80" Width="80" Grid.Row="2" Cursor="Hand" Content="放 行" Background="#FF9900" BorderBrush="#FF9900" Click="Button_Click">
</Button>
</Grid>
<Grid Grid.Column="1">
<Grid.RowDefinitions>

@ -37,7 +37,14 @@ namespace Aucma.Core.CodeBinding.Views
private void Button_Click(object sender, RoutedEventArgs e)
{
SendPlcPass();
if (SendPlcPass())
{
MessageBox.Show("放行成功");
}
else
{
MessageBox.Show("放行失败plc未连接");
}
}
/// <summary>
@ -59,11 +66,17 @@ namespace Aucma.Core.CodeBinding.Views
// 报警信号复位
obj.plc.WriteInt16("D7101", "0");
result = true;
}
else
{
result = false;
}
}
catch (Exception ex)
{
result = false;
// log.Error("下发plc停止信号方法出现异常,ex:" + ex);
}
return result;

Loading…
Cancel
Save