change-page

dev
liuwf 1 year ago
parent c14cb72360
commit 3c0c01f28e

@ -30,6 +30,8 @@ using Admin.Core.Service;
using System.Windows.Forms.VisualStyles;
using Microsoft.IdentityModel.Logging;
using Aucma.Core.ProductOffLine.Business;
using System.Windows.Media;
/*
*
@ -172,7 +174,7 @@ namespace Aucma.Core.ProductOffLine.ViewModels
private void LoadProduct()
{
ChartValues<double> achievement = new ChartValues<double>();
ProductionHourList = new List<string>();
App.Current.Dispatcher.BeginInvoke((Action)(() =>
{
Achievement.Clear();
@ -209,10 +211,17 @@ namespace Aucma.Core.ProductOffLine.ViewModels
column.DataLabels = true;
column.Title = "型号";
column.Values = achievement;
column.Foreground = Brushes.White;
ModelStatistics.Add(column);
MaterialNameList = new List<string>()
{
"SC-230,11W/H成品",
"SC-439箱体",
"SC-439U壳",
"SC-439背板",
"SC-439VAM,元气森林,C",
};
ProductionHourList = new List<string>()
{
"12",
@ -232,7 +241,7 @@ namespace Aucma.Core.ProductOffLine.ViewModels
column2.DataLabels = true;
column2.Title = "产量";
column2.Values = achievement2;
column2.Foreground = Brushes.White;
Achievement.Add(column2);
}
@ -277,6 +286,19 @@ namespace Aucma.Core.ProductOffLine.ViewModels
}
#endregion
#region 型号统计柱状图X轴日期
/// <summary>
/// 型号统计柱状图X轴日期
/// </summary>
private List<string> materialNameList;
public List<string> MaterialNameList
{
get { return materialNameList; }
set { materialNameList = value; }
}
#endregion
/// <summary>
/// 扫描的条码处理
/// </summary>

@ -12,9 +12,114 @@
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style x:Key="ColumnHeaderStyle" TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="Background" Value="#dddddd"/>
<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="BorderBrush" Value="#dddddd" />
<Setter Property="Height" Value="40"/>
<Setter Property="FontSize" Value="14"/>
<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="Gray" />
<Setter Property="Height" Value="40"/>
<Setter Property="FontSize" Value="12"/>
<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>
<Style TargetType="{x:Type Slider}">
<Style.Resources>
<!-- 重写重复触发按钮的样式 -->
<Style x:Key="RepeatButtonStyle" TargetType="{x:Type RepeatButton}">
<Setter Property="Focusable" Value="false" />
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Padding" Value="0" />
<Setter Property="Width" Value="30" />
</Style>
</Style.Resources>
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
<Setter Property="SmallChange" Value="1" />
<!-- 重写Slider的模板 -->
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Slider}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBox Grid.RowSpan="2" Height="Auto" Margin="0" Padding="0" VerticalAlignment="Stretch"
VerticalContentAlignment="Center" Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Value}">
<!-- 给TextBox绑定上下命令 -->
<TextBox.InputBindings>
<KeyBinding Gesture="Up" Command="{x:Static Slider.IncreaseSmall}" />
<KeyBinding Gesture="Down" Command="{x:Static Slider.DecreaseSmall}" />
<KeyBinding Gesture="PageUp" Command="{x:Static Slider.IncreaseLarge}" />
<KeyBinding Gesture="PageDown" Command="{x:Static Slider.DecreaseLarge}" />
</TextBox.InputBindings>
</TextBox>
<RepeatButton Grid.Row="0" Grid.Column="1" Command="{x:Static Slider.IncreaseSmall}"
Style="{StaticResource RepeatButtonStyle}">
<Path Data="M4,0 L0,4 8,4 Z" Fill="Black" />
</RepeatButton>
<RepeatButton Grid.Row="1" Grid.Column="1" Command="{x:Static Slider.DecreaseSmall}"
Style="{StaticResource RepeatButtonStyle}">
<Path Data="M0,0 L4,4 8,0 Z" Fill="Black" />
</RepeatButton>
<!-- 由于Slider的内部实现要求存在这些必要组件,所以必须保留,但是设置为隐藏即可 -->
<Border x:Name="TrackBackground" Visibility="Collapsed">
<Rectangle x:Name="PART_SelectionRange" Visibility="Collapsed" />
</Border>
<Thumb x:Name="Thumb" Visibility="Collapsed" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type DatePickerTextBox}">
<Setter Property="Background" Value="#0288d1" />
</Style>
</UserControl.Resources>
@ -45,29 +150,29 @@
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="1.2*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="1.2*"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.Row="0" Grid.Column="0" Background="#0288d1">
<Border Grid.Row="0" Grid.Column="0" Background="#1157b9">
<TextBlock Text="当前工位" Foreground="White"/>
</Border>
<Border Grid.Row="1" Grid.RowSpan="3" Grid.Column="0" Background="#0288d1">
<TextBlock Text="成品下线扫描" Foreground="White" FontWeight="Bold" FontSize="18"/>
<Border Grid.Row="1" Grid.RowSpan="3" Grid.Column="0" Background="#1157b9">
<TextBlock Text="成品下线" Foreground="White" FontWeight="Bold" FontSize="25"/>
</Border>
<Border Grid.Row="0" Grid.Column="1" Background="#0288d1">
<Border Grid.Row="0" Grid.Column="1" Background="#1157b9">
<TextBlock Text="产品条码" Foreground="White" />
</Border>
<Border Grid.Row="1" Grid.Column="1" Background="#0288d1">
<Border Grid.Row="1" Grid.Column="1" Background="#1157b9">
<TextBlock Text="产品型号" Foreground="White" />
</Border>
<Border Grid.Row="2" Grid.Column="1" Background="#0288d1">
<Border Grid.Row="2" Grid.Column="1" Background="#1157b9">
<TextBlock Text="订单数量" Foreground="White" />
</Border>
<Border Grid.Row="3" Grid.Column="1" Background="#0288d1">
<Border Grid.Row="3" Grid.Column="1" Background="#1157b9">
<TextBlock Text="提示信息" Foreground="White" />
</Border>
<Border Grid.Row="0" Grid.Column="2">
@ -82,13 +187,13 @@
<Border Grid.Row="3" Grid.Column="2" Grid.ColumnSpan="3">
<TextBlock Text="获取信息成功3127991000093D8U0050 返回值 : Y.上传条码失败E,条码重复,上传条码失败E,条码重复上传" Foreground="White"/>
</Border>
<Border Grid.Row="0" Grid.Column="3" Background="#0288d1">
<Border Grid.Row="0" Grid.Column="3" Background="#1157b9">
<TextBlock Text="扫描时间" Foreground="White" />
</Border>
<Border Grid.Row="1" Grid.Column="3" Background="#0288d1">
<Border Grid.Row="1" Grid.Column="3" Background="#1157b9">
<TextBlock Text="订单编号" Foreground="White" />
</Border>
<Border Grid.Row="2" Grid.Column="3" Background="#0288d1">
<Border Grid.Row="2" Grid.Column="3" Background="#1157b9">
<TextBlock Text="订单已上传" Foreground="White" />
</Border>
<Border Grid.Row="0" Grid.Column="4">
@ -100,13 +205,13 @@
<Border Grid.Row="2" Grid.Column="4">
<TextBlock Text="48" Foreground="White"/>
</Border>
<Border Grid.Row="0" Grid.Column="5" Background="#0288d1">
<Border Grid.Row="0" Grid.Column="5" Background="#1157b9">
<TextBlock Text="下线产量" Foreground="White" />
</Border>
<Border Grid.Row="1" Grid.RowSpan="2" Grid.Column="5">
<TextBlock Text="255" Foreground="White"/>
<TextBlock Text="255" Foreground="White" FontSize="40"/>
</Border>
<Border Grid.Row="3" Grid.Column="4" Grid.ColumnSpan="2" Height="39" Margin="164,0,0,0" VerticalAlignment="Bottom">
<Border Grid.Row="3" Grid.Column="5" Height="39" VerticalAlignment="Center">
<WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<RadioButton Content="A库" Margin="5 0" Foreground="White"/>
<RadioButton Content="B库" Margin="5 0" Foreground="White" />
@ -133,7 +238,7 @@
<RowDefinition Height="1*"/>
<RowDefinition Height="9*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Background="Transparent" Margin="1,1,5,5" >
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Background="#1157b9" Margin="1,1,5,5" >
<TextBlock Text="当日小时产量统计" FontSize="15" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" >
@ -165,7 +270,7 @@
<RowDefinition Height="1*"/>
<RowDefinition Height="9*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Background="Transparent" Margin="1,1,5,5" >
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Background="#1157b9" Margin="1,1,5,5" >
<TextBlock Text="当日型号产量统计" FontSize="15" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" >
@ -193,21 +298,11 @@
</Grid>
</Border>
<Border Grid.Row="2">
<DataGrid Grid.Row="0" ItemsSource="{Binding PlanInfoDataGrid}" Background="#00000000"
ColumnHeaderHeight="35"
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0" AlternationCount="2"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
<DataGrid Grid.Row="0" ItemsSource="{Binding PlanInfoDataGrid}" ColumnHeaderHeight="35" Height="{Binding Path=ActualHeight, ElementName=ScanPanel}"
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
Foreground="White" >
<!-- 表头剧中-->
<DataGrid.ColumnHeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Center">
</Setter>
<Setter Property="Background" Value="Transparent" />
</Style>
</DataGrid.ColumnHeaderStyle>
<!--修改选中字体颜色-->
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding No}" Header="序号" Width="1*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Binding="{Binding PlanCode}" Header="订单编号" Width="3*" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>

Loading…
Cancel
Save