You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AUCMA_SCADA/Aucma.Core.PalletizCX1/Views/StatisticsPageView.xaml

139 lines
8.3 KiB
XML

<UserControl x:Class="Aucma.Core.PalletizCX1.Views.StatisticsPageView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:local="clr-namespace:Aucma.Core.PalletizCX1.Views"
xmlns:cvt="clr-namespace:Aucma.Core.PalletizCX1.ConvertTo"
mc:Ignorable="d" FontFamily="Microsoft YaHei"
d:DesignHeight="1000"
d:DesignWidth="1800">
<UserControl.Resources>
<cvt:MultiBindingConverter x:Key="QueryConvert"></cvt:MultiBindingConverter>
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
<Setter Property="VerticalAlignment" Value="Center" />
</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="Left" />
<Setter Property="BorderBrush" Value="#dddddd" />
<Setter Property="Height" Value="40"/>
<Setter Property="FontSize" Value="20"/>
<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="18"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Grid Background="{TemplateBinding Background}" >
<ContentPresenter HorizontalAlignment="Left" 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 DatePickerTextBox}">
<Setter Property="Background" Value="#0288d1" />
</Style>
</UserControl.Resources>
<Border BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Background="Transparent" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0.8*"/>
<RowDefinition Height="9*"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Background="#1157b9" Margin="1,1,5,5" >
<TextBlock Text="扫描记录" FontSize="25" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="1,1,5,5">
<Grid Margin="10,5">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="8*"/>
</Grid.RowDefinitions>
<WrapPanel Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center">
<TextBlock Text="查询条件" Margin="10 0" Foreground="White" FontSize="18" VerticalAlignment="Center"/>
<TextBox x:Name="queryParam" Text="{Binding Search,Mode=TwoWay}" Style="{x:Null}" Width="300" HorizontalAlignment="Left" VerticalContentAlignment="Center" Margin="10 0 5 0"/>
<Button Content="查询" Margin="10 0" Command="{Binding ExecQueryCommand}" CommandParameter="{Binding Text, ElementName=queryParam}" Style="{StaticResource MaterialDesignRaisedSecondaryDarkButton}"/>
<!--<Button Margin="10 0"
Content="查询" Command="{Binding ExecQueryCommand}"
IsEnabled="{Binding DataContext.ControlsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}"
Style="{StaticResource MaterialDesignRaisedSecondaryDarkButton}"
ToolTip="Resource name: MaterialDesignRaisedSecondaryDarkButton">
<Button.CommandParameter>
<MultiBinding Converter="{StaticResource QueryConvert}">
<Binding ElementName="BeginTime" Path="Text"/>
<Binding ElementName="EndTime" Path="Text"/>
</MultiBinding>
</Button.CommandParameter>
</Button>-->
</WrapPanel>
<UniformGrid Grid.Row="1">
<DataGrid ItemsSource="{Binding MaterialDataGrid}"
ColumnHeaderHeight="45" FontSize="18"
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0" LoadingRow="DataGrid_LoadingRow"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Hidden"
ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
Foreground="White" >
<DataGrid.Columns>
<DataGridTemplateColumn Width="*" Header="序号" >
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow}}, Path=Header}" FontSize="18" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,0,0,0"></TextBlock>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Binding="{Binding BarCodeCode}" Header="成品条码" Width="3*" />
<DataGridTextColumn Binding="{Binding MaterialName}" Header="成品型号" Width="3*" />
<DataGridTextColumn Binding="{Binding StoreArea}" Header="区域" Width="1*" />
<DataGridTextColumn Binding="{Binding InStoreAmount}" Header="旋转角度" Width="*" />
<DataGridTextColumn Binding="{Binding InStoreTime,StringFormat=\{0:yyyy-MM-dd HH:mm\}}" Header="入库时间" Width="2*" />
</DataGrid.Columns>
</DataGrid>
</UniformGrid>
</Grid>
</Border>
</Grid>
</Border>
</UserControl>