|
|
|
|
<UserControl
|
|
|
|
|
x:Class="XGLFinishPro.Views.LanJu_InOut"
|
|
|
|
|
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:local="clr-namespace:XGLFinishPro.Views"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
xmlns:convert="clr-namespace:XGLFinishPro.Tools"
|
|
|
|
|
Width="1920"
|
|
|
|
|
MinHeight="230"
|
|
|
|
|
Height="290"
|
|
|
|
|
mc:Ignorable="d" Loaded="UserControl_Loaded">
|
|
|
|
|
<UserControl.Resources>
|
|
|
|
|
<Style x:Key="CustomCellStyle" TargetType="DataGridCell">
|
|
|
|
|
<Setter Property="Foreground" Value="Black" />
|
|
|
|
|
<Setter Property="TextBlock.TextAlignment" Value="Center" />
|
|
|
|
|
<Setter Property="TextBlock.FontSize" Value="22" />
|
|
|
|
|
</Style>
|
|
|
|
|
<convert:MyValueConverter x:Key="MyConverter"/>
|
|
|
|
|
<convert:OrderInOutConverter x:Key="TaskCodeConverter"/>
|
|
|
|
|
<convert:BtnBackGroundColorConverter x:Key="ButtonContentToBackgroundColorConverter"/>
|
|
|
|
|
<SolidColorBrush x:Key="EvenRowBackground" Color="#E0E0E0"/>
|
|
|
|
|
<SolidColorBrush x:Key="OddRowBackground" Color="#FFFFFF"/>
|
|
|
|
|
<Style x:Key="DataGridRowStyle" TargetType="DataGridRow">
|
|
|
|
|
<Setter Property="Background" Value="{StaticResource EvenRowBackground}"/>
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
<Trigger Property="ItemsControl.AlternationIndex" Value="1">
|
|
|
|
|
<Setter Property="Background" Value="{StaticResource OddRowBackground}"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
</Style>
|
|
|
|
|
</UserControl.Resources>
|
|
|
|
|
<!--<Viewbox Stretch="Fill">-->
|
|
|
|
|
<!--<Canvas
|
|
|
|
|
Width="1920"
|
|
|
|
|
MinHeight="330"
|
|
|
|
|
Height="430"
|
|
|
|
|
Background="#F2F3F5">-->
|
|
|
|
|
<Grid
|
|
|
|
|
Width="1920"
|
|
|
|
|
Margin="0"
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
VerticalAlignment="Center">
|
|
|
|
|
<DataGrid
|
|
|
|
|
x:Name="dgInOutRecord"
|
|
|
|
|
Width="1870"
|
|
|
|
|
Margin="0"
|
|
|
|
|
CellStyle="{StaticResource CustomCellStyle}"
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
VerticalAlignment="Top"
|
|
|
|
|
IsReadOnly="True"
|
|
|
|
|
CanUserAddRows="False"
|
|
|
|
|
AlternatingRowBackground="{StaticResource OddRowBackground}"
|
|
|
|
|
AlternationCount="2"
|
|
|
|
|
RowStyle="{StaticResource DataGridRowStyle}"
|
|
|
|
|
LoadingRow="dgInOutRecord_LoadingRow"
|
|
|
|
|
SelectionChanged="dgInOutRecord_SelectionChanged"
|
|
|
|
|
HeadersVisibility="Column"
|
|
|
|
|
AutoGenerateColumns="False">
|
|
|
|
|
<DataGrid.ColumnHeaderStyle >
|
|
|
|
|
<Style TargetType="DataGridColumnHeader">
|
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
|
|
|
<Setter Property="Height" Value="48" />
|
|
|
|
|
<Setter Property="FontSize" Value="20" />
|
|
|
|
|
<Setter Property="Foreground" Value="White" />
|
|
|
|
|
<Setter Property="Background" Value="#2B7EE6" />
|
|
|
|
|
</Style>
|
|
|
|
|
</DataGrid.ColumnHeaderStyle>
|
|
|
|
|
<DataGrid.Columns>
|
|
|
|
|
<DataGridTemplateColumn Header=" 序号" Width="70" MinWidth="10" IsReadOnly="True">
|
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<TextBlock Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow}}, Path=Header}" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10,0,0,0"></TextBlock>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
|
<!--<DataGridTextColumn Width="250" Header="操作" />-->
|
|
|
|
|
<!--<DataGridTextColumn Width="250" Header="开始时间" Binding="{Binding begin, StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}"/>
|
|
|
|
|
<DataGridTextColumn Width="250" Header="结束时间" Binding="{Binding beout, StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}"/>
|
|
|
|
|
<DataGridTextColumn Width="*" Header="工单/SFC" Binding="{Binding workorder_code}"/>
|
|
|
|
|
<DataGridTextColumn Width="250" Header="工单数量" Binding="{Binding car_num}"/>
|
|
|
|
|
<DataGridTextColumn Width="250" Header="人员" Binding="{Binding create_by}"/>-->
|
|
|
|
|
|
|
|
|
|
<DataGridTextColumn Width="250" Header="工单/SFC" Binding="{Binding workorder_id}" Visibility="Collapsed"/>
|
|
|
|
|
<DataGridTextColumn Width="300" Header="工单/SFC" Binding="{Binding workorder_code}" />
|
|
|
|
|
<DataGridTextColumn Width="120" Header="RFID" Binding="{Binding rfid}"/>
|
|
|
|
|
<DataGridTextColumn Width="250" Header="产品名称" Binding="{Binding product_name}" />
|
|
|
|
|
<DataGridTextColumn Width="250" Header="产品型号" Binding="{Binding product_code}" />
|
|
|
|
|
<DataGridTextColumn Width="80" Header="数量" Binding="{Binding car_num}" />
|
|
|
|
|
<DataGridTextColumn Width="250" Header="完成时间" Binding="{Binding update_time, StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}" />
|
|
|
|
|
<DataGridTextColumn Width="60" Header="状态" Binding="{Binding status,Converter={StaticResource MyConverter}}" >
|
|
|
|
|
</DataGridTextColumn>
|
|
|
|
|
<DataGridTextColumn Width="340" Header="流转码" Binding="{Binding work_batch_code}" />
|
|
|
|
|
<DataGridTextColumn Width="60" Header="出入" Binding="{Binding taskcode,Converter={StaticResource TaskCodeConverter}}"/>
|
|
|
|
|
</DataGrid.Columns>
|
|
|
|
|
</DataGrid>
|
|
|
|
|
</Grid>
|
|
|
|
|
<!--</Canvas>-->
|
|
|
|
|
<!--</Viewbox>-->
|
|
|
|
|
</UserControl>
|