change -修改完善

main
frankiecao 1 year ago
commit c09168469b

@ -41,14 +41,14 @@ namespace SlnMesnac.WPF.ViewModel
private bool isUse = false; private bool isUse = false;
private int status = 0;//0是上班1是下班 private int status = 0;//0是上班1是下班
public static HidUtils hidUtils; public static HidUtils hidUtils;
public static bool isOnDuty = false; public static bool isOnDuty = false;//是否有班组当班
private List<string> uniqueStrings = new List<string>(); private List<string> uniqueStrings = new List<string>();
private List<DateTime> timestamps = new List<DateTime>(); private List<DateTime> timestamps = new List<DateTime>();
/// <summary> /// <summary>
/// 按钮文字转换事件 /// 按钮文字转换事件
/// </summary> /// </summary>
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler PropertyChanged = delegate { };
#region 定义命令 #region 定义命令
/// <summary> /// <summary>

@ -163,8 +163,9 @@ namespace SlnMesnac.WPF.ViewModel
})); }));
} }
// 新增的执行事件 /// <summary>
/// 新增的执行事件
/// </summary>
private void Execute() private void Execute()
{ {
//判断是否有班组当班,查询打卡记录表4小时内最后一次打卡类型为上班的班组 //判断是否有班组当班,查询打卡记录表4小时内最后一次打卡类型为上班的班组

@ -50,6 +50,8 @@ namespace SlnMesnac.WPF.ViewModel
/// 初始化 /// 初始化
/// </summary> /// </summary>
private void Init() private void Init()
{
if(planInfo != null)
{ {
planDetail = _prodPlanDetailService.GetPlanDetailsByPlanCode(planInfo.PlanCode); planDetail = _prodPlanDetailService.GetPlanDetailsByPlanCode(planInfo.PlanCode);
//_recordStaffAttendanceService.GetLastestOffRecord(); //_recordStaffAttendanceService.GetLastestOffRecord();
@ -108,6 +110,7 @@ namespace SlnMesnac.WPF.ViewModel
} }
}; };
} }
}
#region 参数 #region 参数

@ -108,12 +108,13 @@ namespace SlnMesnac.WPF.ViewModel
/// 确认命令 /// 确认命令
/// </summary> /// </summary>
public ICommand ConfirmCommand { get; private set; } public ICommand ConfirmCommand { get; private set; }
/// <summary> /// <summary>
/// 确认事件 /// 确认事件
/// </summary> /// </summary>
private void Confirm() private void Confirm()
{ {
if(EmployeeLoginViewModel.isOnDuty == true) if(EmployeeLoginViewModel.isOnDuty == true)//是否有班组当班,无当班时操作无效
{ {
string newAmount = NewAmountText; string newAmount = NewAmountText;
if (newAmount != null) if (newAmount != null)
@ -161,7 +162,8 @@ namespace SlnMesnac.WPF.ViewModel
public ICommand EndPlanCommand { get; private set; } public ICommand EndPlanCommand { get; private set; }
private void EndPlan() private void EndPlan()
{ {
if(EmployeeLoginViewModel.isOnDuty == true) //判断工单实际产量与目标产量的差距,满足才能执行结束
if(EmployeeLoginViewModel.isOnDuty == true)//是否有班组当班,无当班时操作无效
{ {
if (planDetail != null && planInfo != null) if (planDetail != null && planInfo != null)
{ {

@ -15,6 +15,9 @@ namespace SlnMesnac.WPF.ViewModel
/// </summary> /// </summary>
public event PropertyChangedEventHandler PropertyChanged = delegate { }; public event PropertyChangedEventHandler PropertyChanged = delegate { };
/// <summary>
/// 显示工艺信息,需要讨论显示哪些数据
/// </summary>
public TechnologicalViewModel() public TechnologicalViewModel()
{ {
Information1 = "001"; Information1 = "001";
@ -24,8 +27,7 @@ namespace SlnMesnac.WPF.ViewModel
Information5 = "005"; Information5 = "005";
} }
#region 界面参数
#region
/// <summary> /// <summary>
/// 信息1 /// 信息1
/// </summary> /// </summary>

@ -6,7 +6,73 @@
xmlns:local="clr-namespace:SlnMesnac.WPF.Views" xmlns:local="clr-namespace:SlnMesnac.WPF.Views"
WindowStartupLocation="CenterOwner" Background="Transparent" ResizeMode="NoResize" FontWeight="ExtraLight" WindowStartupLocation="CenterOwner" Background="Transparent" ResizeMode="NoResize" FontWeight="ExtraLight"
mc:Ignorable="d" mc:Ignorable="d"
Title="TechnologicalWin" Height="1000" Width="600"> Title="TechnologicalWin" Width="1280" Height="720" >
<WindowChrome.WindowChrome>
<WindowChrome GlassFrameThickness="-1"/>
</WindowChrome.WindowChrome>
<Window.Resources>
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="FontSize" Value="20"/>
</Style>
<Style TargetType="DataGrid">
<!--网格线颜色-->
<Setter Property="CanUserResizeColumns" Value="false"/>
<Setter Property="Background" Value="#1152AC" />
<Setter Property="BorderBrush" Value="#4285DE" />
<Setter Property="Foreground" Value="White"/>
<Setter Property="HorizontalGridLinesBrush">
<Setter.Value>
<SolidColorBrush Color="#4285DE"/>
</Setter.Value>
</Setter>
<Setter Property="VerticalGridLinesBrush">
<Setter.Value>
<SolidColorBrush Color="#1152AC"/>
</Setter.Value>
</Setter>
</Style>
<!--列头标题栏样式-->
<Style TargetType="DataGridColumnHeader">
<!--<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>-->
<!--<Setter Property="Background" Value="#dddddd"/>
<Setter Property="Foreground" Value="Black"/>-->
<!--<Setter Property="BorderThickness" Value="1" />-->
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="BorderBrush" Value="#4285DE" />
<Setter Property="Height" Value="40"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="Background" Value="#4285DE"/>
<Setter Property="Foreground" Value="White"/>
</Style>
<!--单元格样式-->
<Style TargetType="DataGridCell">
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="BorderBrush" Value="#4285DE" />
<Setter Property="Height" Value="40"/>
<Setter Property="FontSize" Value="18"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Grid Background="{TemplateBinding Background}" >
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#4285DE"/>
<!--<Setter Property="Foreground" Value="#dddddd"/>-->
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition/> <RowDefinition/>
@ -26,16 +92,16 @@
<ColumnDefinition/> <ColumnDefinition/>
<ColumnDefinition/> <ColumnDefinition/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Text="信息1" FontSize="30" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock> <TextBlock Grid.Row="0" Grid.Column="0" Text="信息1" FontSize="30" Foreground="#1254AB" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
<TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding Information1}" FontSize="30" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock> <TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding Information1}" FontSize="30" Foreground="#1254AB" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
<TextBlock Grid.Row="1" Grid.Column="0" Text="信息2" FontSize="30" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock> <TextBlock Grid.Row="1" Grid.Column="0" Text="信息2" FontSize="30" Foreground="#1254AB" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding Information2}" FontSize="30" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock> <TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding Information2}" FontSize="30" Foreground="#1254AB" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
<TextBlock Grid.Row="2" Grid.Column="0" Text="信息3" FontSize="30" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock> <TextBlock Grid.Row="2" Grid.Column="0" Text="信息3" FontSize="30" Foreground="#1254AB" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
<TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding Information3}" FontSize="30" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock> <TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding Information3}" FontSize="30" Foreground="#1254AB" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
<TextBlock Grid.Row="3" Grid.Column="0" Text="信息4" FontSize="30" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock> <TextBlock Grid.Row="3" Grid.Column="0" Text="信息4" FontSize="30" Foreground="#1254AB" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
<TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding Information4}" FontSize="30" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock> <TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding Information4}" FontSize="30" Foreground="#1254AB" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
<TextBlock Grid.Row="4" Grid.Column="0" Text="信息5" FontSize="30" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock> <TextBlock Grid.Row="4" Grid.Column="0" Text="信息5" FontSize="30" Foreground="#1254AB" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
<TextBlock Grid.Row="4" Grid.Column="1" Text="{Binding Information5}" FontSize="30" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock> <TextBlock Grid.Row="4" Grid.Column="1" Text="{Binding Information5}" FontSize="30" Foreground="#1254AB" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
</Grid> </Grid>
</Border> </Border>
</Grid> </Grid>

Loading…
Cancel
Save