change -页面跳转并修改工单执行页

main
frankiecao 1 year ago
commit 9bfa45f719

@ -62,8 +62,8 @@
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Orientation="Horizontal"> <StackPanel Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Orientation="Horizontal">
<Button Content="工单执行" x:Name="Index" Command="{Binding ControlOnClickCommand}" CommandParameter="{Binding Name,ElementName=Index}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="10,0,10,0"/> <Button Content="工单执行" x:Name="Execute" Command="{Binding ControlOnClickCommand}" CommandParameter="{Binding Name,ElementName=Execute}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="10,0,10,0"/>
<Button Content="人员登录" x:Name="Generate" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Generate}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0"/> <Button Content="人员登录" x:Name="Employee" Command="{Binding ControlOnClickCommand}" CommandParameter="{Binding Name,ElementName=Employee}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0"/>
<Button Content="键 盘" Command="{Binding OpenSystemKeyboardCommand}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#FF11B514" BorderBrush="#FF11B514" Margin="0,0,10,0"/> <Button Content="键 盘" Command="{Binding OpenSystemKeyboardCommand}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#FF11B514" BorderBrush="#FF11B514" Margin="0,0,10,0"/>
<Button Content="最小化" x:Name="Minimized" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Minimized}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#FF9900" BorderBrush="#FF9900" Margin="0,0,10,0"/> <Button Content="最小化" x:Name="Minimized" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Minimized}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#FF9900" BorderBrush="#FF9900" Margin="0,0,10,0"/>
<Button Content="退 出" x:Name="Exit" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Exit}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#FF0033" BorderBrush="#FF0033" Margin="0,0,10,0"/> <Button Content="退 出" x:Name="Exit" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Exit}" Style="{StaticResource BUTTON_AGREE}" Width="100" Height="30" Background="#FF0033" BorderBrush="#FF0033" Margin="0,0,10,0"/>

@ -131,7 +131,7 @@
<Border.Effect> <Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/> <DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect> </Border.Effect>
<DataGrid Name="dataGrid" ItemsSource="{Binding RfidInfoDataGrid}" Background="Transparent" <DataGrid Name="dataGridPlanInfo" ItemsSource="{Binding RfidInfoDataGrid}" Background="Transparent"
FontSize="15" ColumnHeaderHeight="30" FontSize="15" ColumnHeaderHeight="30"
RowHeight="30" AutoGenerateColumns="False" RowHeaderWidth="0" RowHeight="30" AutoGenerateColumns="False" RowHeaderWidth="0"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Hidden" GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
@ -224,102 +224,23 @@
<TextBlock Text="工单明细" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/> <TextBlock Text="工单明细" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border> </Border>
<Border Grid.Row="3"> <Border Grid.Row="3">
<Grid> <DataGrid Name="dataGridPlanDetail" ItemsSource="{Binding RfidInfoDataGrid}" Background="Transparent"
<Grid.ColumnDefinitions> FontSize="15" ColumnHeaderHeight="30"
<ColumnDefinition/> RowHeight="30" AutoGenerateColumns="False" RowHeaderWidth="0"
<ColumnDefinition Width="2*"/> GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
<ColumnDefinition/> ScrollViewer.VerticalScrollBarVisibility="Hidden" BorderThickness="0" CanUserAddRows="False"
<ColumnDefinition Width="2*"/> Foreground="#FFFFFF" SelectedItem="{Binding SelectedDataItem}">
</Grid.ColumnDefinitions> <!--resourceStyle 399行修改选中字体颜色-->
<Grid.RowDefinitions> <DataGrid.Columns>
<RowDefinition/> <DataGridTextColumn Binding="{Binding baggageTagCode}" Header="序号" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<RowDefinition/> <DataGridTextColumn Binding="{Binding baggageTagCode}" Header="ERP订单编号" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<RowDefinition/> <DataGridTextColumn Binding="{Binding baggageTagCode}" Header="工单编号" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<RowDefinition/> <!--<DataGridTextColumn Binding="{Binding date,StringFormat=\{0:yyyy-MM-dd\}}" Header="工单编号" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>-->
<RowDefinition/> <DataGridTextColumn Binding="{Binding flightData}" Header="物料名称" Width="3*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<RowDefinition/> <DataGridTextColumn Binding="{Binding hualway}" Header="计划数量" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
</Grid.RowDefinitions> <DataGridTextColumn Binding="{Binding baggageTagCode}" Header="完成数量" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<Border Grid.Row="0" Grid.Column="0"> </DataGrid.Columns>
<TextBlock Text="计划数量" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/> </DataGrid>
</Border>
<Border Grid.Row="0" Grid.Column="1" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="0" Grid.Column="2">
<TextBlock Text="实际数量" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="0" Grid.Column="3" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="1" Grid.Column="0">
<TextBlock Text="实际开始时间" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" Grid.Column="1" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="1" Grid.Column="2">
<TextBlock Text="实际完成时间" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" Grid.Column="3" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="2" Grid.Column="0">
<TextBlock Text="当前班组班长" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="2" Grid.Column="1" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="2" Grid.Column="2">
<TextBlock Text="下一班组班长" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="2" Grid.Column="3" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="3" Grid.Column="0">
<TextBlock Text="创建人" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="3" Grid.Column="1" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="3" Grid.Column="2">
<TextBlock Text="创建时间" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="3" Grid.Column="3" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="4" Grid.Column="0">
<TextBlock Text="更新人" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="4" Grid.Column="1" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="4" Grid.Column="2">
<TextBlock Text="更新时间" FontSize="15" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="4" Grid.Column="3" Height="50" BorderBrush="#1254AB" BorderThickness="2" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
</Grid>
</Border> </Border>
</Grid> </Grid>
</Border> </Border>

@ -1,4 +1,5 @@
using System; using SlnMesnac.WPF.Views;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
@ -24,5 +25,19 @@ namespace SlnMesnac.WPF.Page
{ {
InitializeComponent(); InitializeComponent();
} }
#region 弹出工单信息窗口
/// <summary>
/// 弹出工单信息窗口
/// </summary>
private void ShowPlanDetailWin()
{
PlanDetailWin planDetailWin = new PlanDetailWin();
//planDetailWin.Owner = this;
planDetailWin.ShowDialog();
}
#endregion
} }
} }

@ -21,15 +21,17 @@ namespace SlnMesnac.WPF.ViewModel
private readonly ExecutePage _executePage = new ExecutePage(); private readonly ExecutePage _executePage = new ExecutePage();
#region 参数定义 #region 参数定义
/// <summary> ///// <summary>
/// PLC设备状态 ///// PLC设备状态
/// </summary> ///// </summary>
private int _PlcStatus = 0; //private int _PlcStatus = 0;
public int PlcStatus //public int PlcStatus
{ //{
get { return _PlcStatus; } // get { return _PlcStatus; }
set { _PlcStatus = value; RaisePropertyChanged(nameof(PlcStatus)); } // set { _PlcStatus = value; RaisePropertyChanged(nameof(PlcStatus)); }
} //}
/// <summary> /// <summary>
/// 箱壳扫码器状态 /// 箱壳扫码器状态
/// </summary> /// </summary>
@ -83,8 +85,8 @@ namespace SlnMesnac.WPF.ViewModel
public MainWindowViewModel() public MainWindowViewModel()
{ {
UserContent = _employeeLoginPage; //UserContent = _employeeLoginPage;
//UserContent = _executePage; UserContent = _executePage;
_logger = App.ServiceProvider.GetService<ILogger<MainWindowViewModel>>(); _logger = App.ServiceProvider.GetService<ILogger<MainWindowViewModel>>();
var info = App.ServiceProvider.GetService<StringChange>(); var info = App.ServiceProvider.GetService<StringChange>();
@ -150,12 +152,23 @@ namespace SlnMesnac.WPF.ViewModel
{ {
string info = obj as string; string info = obj as string;
//UserContent = inStoreInfoControl; //UserContent = inStoreInfoControl;
switch (info)
{
case "Execute":
UserContent = _executePage;
break;
case "Employee":
UserContent = _employeeLoginPage;
break;
default:
UserContent = _executePage;
break;
}
} }
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogError("界面跳转逻辑异常", ex); _logger.LogError("界面跳转逻辑异常", ex);
} }
} }
} }
} }

@ -0,0 +1,119 @@
<Window x:Class="SlnMesnac.WPF.Views.PlanDetailWin"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SlnMesnac.WPF.Views"
WindowStartupLocation="CenterOwner" Background="Transparent" ResizeMode="NoResize" FontWeight="ExtraLight"
mc:Ignorable="d"
Title="PlanDetailWin" Height="450" Width="800">
<WindowChrome.WindowChrome>
<WindowChrome GlassFrameThickness="-1"/>
</WindowChrome.WindowChrome>
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="5*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0">
<TextBlock Text="工单信息" FontSize="20" Foreground="#1254AB" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" VerticalAlignment="Top" Margin="10,0,10,10">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Border Grid.Row="0" Grid.Column="0" HorizontalAlignment="Right" Margin="20">
<TextBlock Text="工单编号" FontSize="15" Foreground="#1254AB" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="0" Grid.Column="1" Height="50" BorderBrush="White" BorderThickness="2" CornerRadius="5" Margin="0,0,20,0">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="0" Grid.Column="2" HorizontalAlignment="Right" Margin="20">
<TextBlock Text="ERP订单编号" FontSize="15" Foreground="#1254AB" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="0" Grid.Column="3" Height="50" BorderBrush="White" BorderThickness="2" CornerRadius="5" Margin="0,0,20,0">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="1" Grid.Column="0" HorizontalAlignment="Right" Margin="20">
<TextBlock Text="物料编号" FontSize="15" Foreground="#1254AB" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" Grid.Column="1" Height="50" BorderBrush="White" BorderThickness="2" CornerRadius="5" Margin="0,0,20,0">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="1" Grid.Column="2" HorizontalAlignment="Right" Margin="20">
<TextBlock Text="物料名称" FontSize="15" Foreground="#1254AB" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" Grid.Column="3" Height="50" BorderBrush="White" BorderThickness="2" CornerRadius="5" Margin="0,0,20,0">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" Margin="20">
<TextBlock Text="计划工位" FontSize="15" Foreground="#1254AB" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="2" Grid.Column="1" Height="50" BorderBrush="White" BorderThickness="2" CornerRadius="5" Margin="0,0,20,0">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="2" Grid.Column="2" HorizontalAlignment="Right" Margin="20">
<TextBlock Text="计划班组" FontSize="15" Foreground="#1254AB" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="2" Grid.Column="3" Height="50" BorderBrush="White" BorderThickness="2" CornerRadius="5" Margin="0,0,20,0">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Margin="20">
<TextBlock Text="计划数量" FontSize="15" Foreground="#1254AB" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="3" Grid.Column="1" Height="50" BorderBrush="White" BorderThickness="2" CornerRadius="5" Margin="0,0,20,0">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="3" Grid.Column="2" HorizontalAlignment="Right" Margin="20">
<TextBlock Text="完成数量" FontSize="15" Foreground="#1254AB" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="3" Grid.Column="3" Height="50" BorderBrush="White" BorderThickness="2" CornerRadius="5" Margin="0,0,20,0">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="4" Grid.Column="0" HorizontalAlignment="Right" Margin="20">
<TextBlock Text="实际开始时间" FontSize="15" Foreground="#1254AB" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="4" Grid.Column="1" Height="50" BorderBrush="White" BorderThickness="2" CornerRadius="5" Margin="0,0,20,0">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
<Border Grid.Row="4" Grid.Column="2" HorizontalAlignment="Right" Margin="20">
<TextBlock Text="实际完成时间" FontSize="15" Foreground="#1254AB" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="4" Grid.Column="3" Height="50" BorderBrush="White" BorderThickness="2" CornerRadius="5" Margin="0,0,20,0">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
</Border>
</Grid>
</Border>
</Grid>
</Window>

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace SlnMesnac.WPF.Views
{
/// <summary>
/// PlanDetailWin.xaml 的交互逻辑
/// </summary>
public partial class PlanDetailWin : Window
{
public PlanDetailWin()
{
InitializeComponent();
}
}
}
Loading…
Cancel
Save