首次上传
This commit is contained in:
+404
@@ -0,0 +1,404 @@
|
||||
<UserControl x:Class="MECF.Framework.UI.Client.CenterViews.Operations.LotHistory.LotHistoryView"
|
||||
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:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
||||
xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
xmlns:micro="clr-namespace:Caliburn.Micro"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="750" d:DesignWidth="1800">
|
||||
<Grid Margin="10,0,0,0" IsEnabled="{Binding IsPermission}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="300"/>
|
||||
<RowDefinition Height="300"/>
|
||||
<RowDefinition Height="170"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<Grid Grid.Row="0" HorizontalAlignment="Left" Width="1024">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="600"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel Grid.Column="0" Orientation="Vertical">
|
||||
<DataGrid AutoGenerateColumns="False" Name="datagridRunningJobs" ItemsSource="{Binding RunningJobs}"
|
||||
SelectedItem="{Binding SelectedRunLot}"
|
||||
CanUserAddRows="False" CanUserResizeColumns="True" CanUserResizeRows="False" HorizontalAlignment="Left"
|
||||
FontFamily="Arial" Height="100" FontSize="12" Width="550" Margin="5">
|
||||
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Width="300" Binding="{Binding Name, Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True" CanUserResize="False" >
|
||||
<DataGridTextColumn.HeaderTemplate >
|
||||
<DataTemplate>
|
||||
<TextBlock Text="Lot In Process" />
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="ToolTip" Value="{Binding Name}" />
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Width="180" Binding="{Binding StartTime, Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True" CanUserResize="False" >
|
||||
<DataGridTextColumn.HeaderTemplate >
|
||||
<DataTemplate>
|
||||
<TextBlock Text="Start Time" />
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="ToolTip" Value="{Binding StartTime}" />
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="SelectionChanged">
|
||||
<micro:ActionMessage MethodName="WaferRunningChanged">
|
||||
<micro:Parameter Value="{Binding ElementName=datagridRunningJobs, Path=SelectedItem}"/>
|
||||
</micro:ActionMessage>
|
||||
</i:EventTrigger>
|
||||
<i:EventTrigger EventName="PreviewMouseDown">
|
||||
<micro:ActionMessage MethodName="WaferRunningChanged">
|
||||
<micro:Parameter Value="{Binding ElementName=datagridRunningJobs, Path=SelectedItem}"/>
|
||||
</micro:ActionMessage>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</DataGrid>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<toolkit:DateTimePicker Format="ShortDate" FontSize="14"
|
||||
FormatString="yyyy/MM/dd"
|
||||
TimeFormat="Custom"
|
||||
AutoCloseCalendar="True"
|
||||
Grid.Row="0" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="3"
|
||||
Value="{Binding Path=HistoryJobDate, Mode=TwoWay }" Height="30" Width="200" />
|
||||
<Button Content="Filter" Width="120" Height="30" Margin="3" Command="{Binding FilterHistoryCommand}"></Button>
|
||||
</StackPanel>
|
||||
|
||||
<DataGrid AutoGenerateColumns="False" Name="gridHistoryLot" ItemsSource="{Binding HistoryJobs}"
|
||||
CanUserAddRows="False" CanUserResizeColumns="True" CanUserResizeRows="False" HorizontalAlignment="Left"
|
||||
SelectedItem="{Binding SelectedHistoryLot}"
|
||||
FontFamily="Arial" FontSize="12" Width="550" Height="150" Margin="5">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Width="300" Binding="{Binding Name, Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True" CanUserResize="False" >
|
||||
<DataGridTextColumn.HeaderTemplate >
|
||||
<DataTemplate>
|
||||
<TextBlock Text="Completed Lot" />
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="ToolTip" Value="{Binding Name}" />
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Width="180" Binding="{Binding StartTime, Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True" CanUserResize="False" >
|
||||
<DataGridTextColumn.HeaderTemplate >
|
||||
<DataTemplate>
|
||||
<TextBlock Text="Start Time" />
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="ToolTip" Value="{Binding StartTime}" />
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="SelectionChanged">
|
||||
<micro:ActionMessage MethodName="HistoryLotChanged">
|
||||
<micro:Parameter Value="{Binding ElementName=gridHistoryLot, Path=SelectedItem}"/>
|
||||
</micro:ActionMessage>
|
||||
</i:EventTrigger>
|
||||
<i:EventTrigger EventName="PreviewMouseDown">
|
||||
<micro:ActionMessage MethodName="HistoryLotChanged">
|
||||
<micro:Parameter Value="{Binding ElementName=gridHistoryLot, Path=SelectedItem}"/>
|
||||
</micro:ActionMessage>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</DataGrid>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="380"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Margin="20, 0,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="160"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Grid.Row="0" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,1,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
|
||||
<TextBlock Text="Lot Name" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="15" FontFamily="Arial" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<Border Grid.Row="0" Grid.Column="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
|
||||
<TextBlock Text="{Binding Current.Name}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="15" FontFamily="Arial" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
|
||||
<Border Grid.Row="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
|
||||
<TextBlock Text="Start Time" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="15" FontFamily="Arial" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<Border Grid.Row="1" Grid.Column="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
|
||||
<TextBlock Text="{Binding Current.StartTime}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="15" FontFamily="Arial" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
|
||||
<Border Grid.Row="2" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
|
||||
<TextBlock Text="End Time" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="15" FontFamily="Arial" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<Border Grid.Row="2" Grid.Column="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
|
||||
<TextBlock Text="{Binding Current.EndTime}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="15" FontFamily="Arial" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
|
||||
<Border Grid.Row="3" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
|
||||
<TextBlock Text="Input Port" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="15" FontFamily="Arial" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<Border Grid.Row="3" Grid.Column="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
|
||||
<TextBlock Text="{Binding Current.PortIn}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="15" FontFamily="Arial" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
|
||||
<Border Grid.Row="4" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
|
||||
<TextBlock Text="Output Port" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="15" FontFamily="Arial" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<Border Grid.Row="4" Grid.Column="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
|
||||
<TextBlock Text="{Binding Current.PortOut}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="15" FontFamily="Arial" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
|
||||
<Border Grid.Row="5" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
|
||||
<TextBlock Text="Total Wafer" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="15" FontFamily="Arial" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<Border Grid.Row="5" Grid.Column="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
|
||||
<TextBlock Text="{Binding Current.TotalWafer}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="15" FontFamily="Arial" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
|
||||
|
||||
|
||||
<Border Grid.Row="6" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
|
||||
<TextBlock Text="Unprocessed Wafer " TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="15" FontFamily="Arial" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<Border Grid.Row="6" Grid.Column="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
|
||||
<TextBlock Text="{Binding Current.UnprocessedWafer}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="15" FontFamily="Arial" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
|
||||
|
||||
<Border Grid.Row="7" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
|
||||
<TextBlock Text="Aborted Wafer " TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="15" FontFamily="Arial" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<Border Grid.Row="7" Grid.Column="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
|
||||
<TextBlock Text="{Binding Current.AbortWafer}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="15" FontFamily="Arial" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<GridSplitter HorizontalAlignment="Left" Margin="5,0,0,0" Height="4" ResizeDirection="Rows" Grid.Row="1" VerticalAlignment="Top" Background="DarkGray" Width="1300">
|
||||
|
||||
</GridSplitter>
|
||||
<DataGrid Grid.Row="1" AutoGenerateColumns="False" Name="dataGrid_LotList" ItemsSource="{Binding Wafers}"
|
||||
SelectedItem="{Binding CurrentWafer}"
|
||||
CanUserAddRows="False" CanUserResizeColumns="True" CanUserResizeRows="False" HorizontalAlignment="Left"
|
||||
FontFamily="Arial" FontSize="12" Margin="5,5,0,0" Width="1300">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Width="250" CanUserSort="True" Binding="{Binding WaferID, Mode=OneWay}" CanUserReorder="False" IsReadOnly="True" CanUserResize="False" >
|
||||
<DataGridTextColumn.HeaderTemplate >
|
||||
<DataTemplate>
|
||||
<TextBlock Text="Wafer ID" />
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="ToolTip" Value="{Binding WaferID}" />
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Width="80" CanUserSort="True" Binding="{Binding Slot, Mode=OneWay}" CanUserReorder="False" IsReadOnly="True" CanUserResize="False" >
|
||||
<DataGridTextColumn.HeaderTemplate >
|
||||
<DataTemplate>
|
||||
<TextBlock Text="Slot#" />
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="ToolTip" Value="{Binding Slot}" />
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
|
||||
|
||||
<DataGridTextColumn Width="120" CanUserSort="True" Binding="{Binding Status, Mode=OneWay}" CanUserReorder="False" IsReadOnly="True" CanUserResize="False" >
|
||||
<DataGridTextColumn.HeaderTemplate >
|
||||
<DataTemplate>
|
||||
<TextBlock Text="Status" />
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="ToolTip" Value="{Binding Status}" />
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Width="300" Binding="{Binding SequenceName, Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True" CanUserResize="False" >
|
||||
<DataGridTextColumn.HeaderTemplate >
|
||||
<DataTemplate>
|
||||
<TextBlock Text="Sequence Name" />
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="ToolTip" Value="{Binding SequenceName}" />
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Width="120" CanUserSort="True" Binding="{Binding LotID, Mode=OneWay}" CanUserReorder="False" IsReadOnly="True" CanUserResize="False" >
|
||||
<DataGridTextColumn.HeaderTemplate >
|
||||
<DataTemplate>
|
||||
<TextBlock Text="Lot ID" />
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="ToolTip" Value="{Binding LotID}" />
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Width="120" CanUserSort="True" Binding="{Binding NotchAngle, Mode=OneWay}" CanUserReorder="False" IsReadOnly="True" CanUserResize="False" >
|
||||
<DataGridTextColumn.HeaderTemplate >
|
||||
<DataTemplate>
|
||||
<TextBlock Text="Notch Angle" />
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="ToolTip" Value="{Binding NotchAngle}" />
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
|
||||
<DataGridTextColumn Width="120" CanUserSort="True" Binding="{Binding CarrierID, Mode=OneWay}" CanUserReorder="False" IsReadOnly="True" CanUserResize="False" >
|
||||
<DataGridTextColumn.HeaderTemplate >
|
||||
<DataTemplate>
|
||||
<TextBlock Text="Carrier ID" />
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="ToolTip" Value="{Binding CarrierID}" />
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
|
||||
|
||||
</DataGrid.Columns>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="SelectionChanged">
|
||||
<micro:ActionMessage MethodName="WaferHistoryChanged">
|
||||
<micro:Parameter Value="{Binding ElementName=dataGrid_LotList, Path=SelectedItem}"/>
|
||||
</micro:ActionMessage>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</DataGrid>
|
||||
|
||||
<GridSplitter HorizontalAlignment="Left" Height="4" ResizeDirection="Rows" Grid.Row="2" VerticalAlignment="Top" Background="DarkGray" Width="1300">
|
||||
|
||||
</GridSplitter>
|
||||
<Grid Grid.Row="2" Margin="5,6,0,0" HorizontalAlignment="Left" Width="1300">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1300"/>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<DataGrid AutoGenerateColumns="False" CanUserAddRows="False" CanUserResizeRows="False" CanUserResizeColumns="True" ItemsSource="{Binding Movements}"
|
||||
FontFamily="Arial" FontSize="12">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Width="100" Binding="{Binding Time, Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True" CanUserResize="False" >
|
||||
<DataGridTextColumn.HeaderTemplate >
|
||||
<DataTemplate>
|
||||
<TextBlock Text="Time" />
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="ToolTip" Value="{Binding Time}" />
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Width="100" Binding="{Binding Station, Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True" CanUserResize="False" >
|
||||
<DataGridTextColumn.HeaderTemplate >
|
||||
<DataTemplate>
|
||||
<TextBlock Text="Station" />
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="ToolTip" Value="{Binding Station}" />
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Width="100" Binding="{Binding Slot, Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True" CanUserResize="False" >
|
||||
<DataGridTextColumn.HeaderTemplate >
|
||||
<DataTemplate>
|
||||
<TextBlock Text="Slot" />
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="ToolTip" Value="{Binding Slot}" />
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
<DataGridTextColumn Width="100" Binding="{Binding Status, Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True" CanUserResize="False" >
|
||||
<DataGridTextColumn.HeaderTemplate >
|
||||
<DataTemplate>
|
||||
<TextBlock Text="Status" />
|
||||
</DataTemplate>
|
||||
</DataGridTextColumn.HeaderTemplate>
|
||||
<DataGridTextColumn.CellStyle>
|
||||
<Style TargetType="DataGridCell">
|
||||
<Setter Property="ToolTip" Value="{Binding Status}" />
|
||||
</Style>
|
||||
</DataGridTextColumn.CellStyle>
|
||||
</DataGridTextColumn>
|
||||
</DataGrid.Columns>
|
||||
|
||||
</DataGrid>
|
||||
|
||||
<!--<s:SciChartSurface x:Name="sciChart" BorderBrush="Gray" Grid.Column="1" Width="500"
|
||||
s:ThemeManager.Theme="ExpressionLight"
|
||||
RenderableSeries="{Binding RenderableSeries}" Annotations="{Binding Annotations}">
|
||||
<s:SciChartSurface.XAxis>
|
||||
<s:NumericAxis AxisTitle="Number of Samples (per Series)" AutoRange="Always"/>
|
||||
</s:SciChartSurface.XAxis>
|
||||
<s:SciChartSurface.YAxis>
|
||||
<s:NumericAxis AxisTitle="Value" AutoRange="Never" AxisAlignment="Left" VisibleRange="0,8" LabelProvider="{Binding YLabelProvider}" />
|
||||
</s:SciChartSurface.YAxis>
|
||||
|
||||
<s:SciChartSurface.ChartModifier>
|
||||
|
||||
<s:ModifierGroup ExecuteOn="MouseDoubleClick">
|
||||
<s:CursorModifier IsEnabled="True" ShowTooltipOn="MouseOver" ShowAxisLabels="True" SourceMode="AllSeries" ShowTooltip="False" />
|
||||
</s:ModifierGroup>
|
||||
</s:SciChartSurface.ChartModifier>
|
||||
|
||||
</s:SciChartSurface>-->
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace MECF.Framework.UI.Client.CenterViews.Operations.LotHistory
|
||||
{
|
||||
/// <summary>
|
||||
/// WaferHistoryView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class LotHistoryView : UserControl
|
||||
{
|
||||
public LotHistoryView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
+471
@@ -0,0 +1,471 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using Aitex.Core.RT.Log;
|
||||
using Aitex.Core.UI.MVVM;
|
||||
using Aitex.Core.Util;
|
||||
using MECF.Framework.Common.CommonData;
|
||||
using MECF.Framework.Common.DataCenter;
|
||||
using MECF.Framework.UI.Client.CenterViews.DataLogs.WaferHistory;
|
||||
using MECF.Framework.UI.Client.ClientBase;
|
||||
using SciChart.Core.Extensions;
|
||||
|
||||
namespace MECF.Framework.UI.Client.CenterViews.Operations.LotHistory
|
||||
{
|
||||
//public class WaferHistoryDetail
|
||||
//{
|
||||
// public string Guid { get; set; }
|
||||
// public string CreateTime { get; set; }
|
||||
// public string DeleteTime { get; set; }
|
||||
// public string LoadPort { get; set; }
|
||||
// public string Slot { get; set; }
|
||||
// public string CarrierID { get; set; }
|
||||
// public string LotID { get; set; }
|
||||
// public string WaferID { get; set; }
|
||||
// public string Status { get; set; }
|
||||
//}
|
||||
|
||||
//public class WaferMovement
|
||||
//{
|
||||
// public string Time { get; set; }
|
||||
// public string Station { get; set; }
|
||||
// public string Slot { get; set; }
|
||||
// public string Status { get; set; }
|
||||
//}
|
||||
|
||||
/*
|
||||
*
|
||||
* start_time timestamp without time zone,
|
||||
end_time timestamp without time zone,
|
||||
carrier_data_guid text,
|
||||
name text,
|
||||
input_port text,
|
||||
output_port text,
|
||||
total_wafer_count integer,
|
||||
abort_wafer_count integer,
|
||||
unprocessed_wafer_count integer,
|
||||
CONSTRAINT pj_data_pkey PRIMARY KEY (guid)
|
||||
*/
|
||||
public class CJItem:NotifiableItem
|
||||
{
|
||||
public string Guid { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string StartTime { get; set; }
|
||||
public string EndTime { get; set; }
|
||||
public string CarrierId { get; set; }
|
||||
public string TotalWafer { get; set; }
|
||||
public string PortIn { get; set; }
|
||||
public string PortOut { get; set; }
|
||||
public string AbortedWafer { get; set; }
|
||||
public string UnprocessedWafer { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class LotHistoryViewModel : UiViewModelBase
|
||||
{
|
||||
private DateTime _historyDate;
|
||||
|
||||
public DateTime HistoryJobDate
|
||||
{
|
||||
get { return _historyDate; }
|
||||
set
|
||||
{
|
||||
_historyDate = value;
|
||||
UpdateHistoryList(value);
|
||||
}
|
||||
}
|
||||
|
||||
private CJItem _selectedHistoryLot;
|
||||
|
||||
public CJItem SelectedHistoryLot
|
||||
{
|
||||
get { return _selectedHistoryLot; }
|
||||
set
|
||||
{
|
||||
if (_selectedHistoryLot != value)
|
||||
{
|
||||
_selectedHistoryLot = value;
|
||||
HistoryLotChanged(value);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public CJItem Current { get; set; }
|
||||
|
||||
private WaferHistoryDetail _currentWafer;
|
||||
public WaferHistoryDetail CurrentWafer
|
||||
{
|
||||
get { return _currentWafer; }
|
||||
set
|
||||
{
|
||||
if (_currentWafer != value)
|
||||
{
|
||||
_currentWafer = value;
|
||||
WaferHistoryChanged(value);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
private CJItem _selectedRunningLot;
|
||||
|
||||
public CJItem SelectedRunLot
|
||||
{
|
||||
get { return _selectedRunningLot; }
|
||||
set
|
||||
{
|
||||
if (_selectedRunningLot != value)
|
||||
{
|
||||
_selectedRunningLot = value;
|
||||
RunLotChanged(value);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
public CJItem RunningJob { get; set; }
|
||||
|
||||
|
||||
public ObservableCollection<WaferHistoryDetail> Wafers { get; set; }
|
||||
public ObservableCollection<WaferMovement> Movements { get; set; }
|
||||
|
||||
public ObservableCollection<CJItem> RunningJobs { get; set; }
|
||||
|
||||
public ObservableCollection<CJItem> HistoryJobs { get; set; }
|
||||
|
||||
public ICommand FilterHistoryCommand { get; set; }
|
||||
|
||||
[Subscription("Scheduler.CjIdList")]
|
||||
public List<string> RunningCjIdList { get; set; }
|
||||
|
||||
public LotHistoryViewModel()
|
||||
{
|
||||
this.DisplayName = "Lot History";
|
||||
var now = DateTime.Now;
|
||||
|
||||
this.HistoryJobDate = new DateTime(now.Year, now.Month, now.Day, 0, 0, 0, 0);
|
||||
|
||||
this.Wafers = new ObservableCollection<WaferHistoryDetail>();
|
||||
this.Movements = new ObservableCollection<WaferMovement>();
|
||||
|
||||
RunningJobs = new ObservableCollection<CJItem>();
|
||||
HistoryJobs = new ObservableCollection<CJItem>();
|
||||
|
||||
FilterHistoryCommand = new DelegateCommand<object>(PerformFilter);
|
||||
}
|
||||
|
||||
private void PerformFilter(object obj)
|
||||
{
|
||||
UpdateHistoryList(HistoryJobDate);
|
||||
}
|
||||
|
||||
protected override void OnInitialize()
|
||||
{
|
||||
base.OnInitialize();
|
||||
|
||||
}
|
||||
|
||||
protected override void InvokeBeforeUpdateProperty(Dictionary<string, object> data)
|
||||
{
|
||||
base.InvokeBeforeUpdateProperty(data);
|
||||
|
||||
//foreach (var pj in RunningPjIdList)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected override void InvokeAfterUpdateProperty(Dictionary<string, object> data)
|
||||
{
|
||||
base.InvokeAfterUpdateProperty(data);
|
||||
|
||||
try
|
||||
{
|
||||
List<string> alreadyExistList = Array.ConvertAll(RunningJobs.ToArray(), x => x.Guid).ToList();
|
||||
foreach (var o in RunningCjIdList)
|
||||
{
|
||||
if (!alreadyExistList.Contains(o))
|
||||
{
|
||||
RunningJobs.Add(GetCJ(o));
|
||||
}
|
||||
else
|
||||
{
|
||||
alreadyExistList.Remove(o);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var id in alreadyExistList)
|
||||
{
|
||||
RunningJobs.RemoveWhere(x => x.Guid == id);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LOG.Write(ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void WaferRunningChanged(CJItem date)
|
||||
{
|
||||
Current = date;
|
||||
NotifyOfPropertyChange(nameof(Current));
|
||||
if (Current != null)
|
||||
{
|
||||
Current.InvokePropertyChanged();
|
||||
|
||||
Query(Current.Guid);
|
||||
}
|
||||
else
|
||||
{
|
||||
Wafers.Clear();
|
||||
Movements.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
public void HistoryLotChanged(CJItem date)
|
||||
{
|
||||
Current = date;
|
||||
NotifyOfPropertyChange(nameof(Current));
|
||||
if (Current != null)
|
||||
{
|
||||
Current.InvokePropertyChanged();
|
||||
|
||||
Query(Current.Guid);
|
||||
}
|
||||
else
|
||||
{
|
||||
Wafers.Clear();
|
||||
Movements.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
public void RunLotChanged(CJItem date)
|
||||
{
|
||||
HistoryLotChanged(date);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void UpdateHistoryList(DateTime date)
|
||||
{
|
||||
try
|
||||
{
|
||||
var from = new DateTime(date.Year, date.Month, date.Day, 0,0,0);
|
||||
var to = new DateTime(date.Year, date.Month, date.Day, 23, 59,59);
|
||||
|
||||
string sql = string.Format(
|
||||
"SELECT * FROM \"cj_data\" where \"start_time\" >= '{0}' and \"start_time\" <= '{1}' order by \"start_time\" ASC;",
|
||||
from.ToString("yyyy/MM/dd HH:mm:ss.fff"), to.ToString("yyyy/MM/dd HH:mm:ss.fff"));
|
||||
|
||||
|
||||
DataTable dbData = QueryDataClient.Instance.Service.QueryData(sql);
|
||||
|
||||
Application.Current.Dispatcher.BeginInvoke(new Action(() =>
|
||||
{
|
||||
HistoryJobs.Clear();
|
||||
|
||||
if (dbData == null || dbData.Rows.Count == 0)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < dbData.Rows.Count; i++)
|
||||
{
|
||||
var cjItem = new CJItem();
|
||||
|
||||
cjItem.Guid = dbData.Rows[i]["guid"].ToString();
|
||||
|
||||
cjItem.Name = dbData.Rows[i]["name"].ToString();
|
||||
cjItem.PortIn = dbData.Rows[i]["input_port"].ToString();
|
||||
cjItem.PortOut = dbData.Rows[i]["output_port"].ToString();
|
||||
|
||||
cjItem.TotalWafer = dbData.Rows[i]["total_wafer_count"].ToString();
|
||||
cjItem.AbortedWafer = dbData.Rows[i]["abort_wafer_count"].ToString();
|
||||
cjItem.UnprocessedWafer = dbData.Rows[i]["unprocessed_wafer_count"].ToString();
|
||||
|
||||
if (!dbData.Rows[i]["start_time"].Equals(DBNull.Value))
|
||||
cjItem.StartTime = ((DateTime)dbData.Rows[i]["start_time"]).ToString("HH:mm:ss");
|
||||
|
||||
if (!dbData.Rows[i]["end_time"].Equals(DBNull.Value))
|
||||
cjItem.EndTime = ((DateTime)dbData.Rows[i]["end_time"]).ToString("HH:mm:ss");
|
||||
|
||||
HistoryJobs.Add(cjItem);
|
||||
}
|
||||
|
||||
|
||||
}));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOG.Write(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public CJItem GetCJ(string guid)
|
||||
{
|
||||
CJItem cjItem = new CJItem();
|
||||
|
||||
try
|
||||
{
|
||||
string sql = string.Format(
|
||||
"SELECT * FROM \"cj_data\" where \"guid\" = '{0}' order by \"start_time\" ASC;",
|
||||
guid);
|
||||
|
||||
DataTable dbData = QueryDataClient.Instance.Service.QueryData(sql);
|
||||
|
||||
Application.Current.Dispatcher.BeginInvoke(new Action(() =>
|
||||
{
|
||||
if (dbData == null || dbData.Rows.Count == 0)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < dbData.Rows.Count; i++)
|
||||
{
|
||||
//pjItem = new PJItem();
|
||||
cjItem.Guid = dbData.Rows[i]["guid"].ToString();
|
||||
cjItem.Name = dbData.Rows[i]["name"].ToString();
|
||||
cjItem.PortIn = dbData.Rows[i]["input_port"].ToString();
|
||||
cjItem.PortOut = dbData.Rows[i]["output_port"].ToString();
|
||||
|
||||
cjItem.TotalWafer = dbData.Rows[i]["total_wafer_count"].ToString();
|
||||
cjItem.AbortedWafer = dbData.Rows[i]["abort_wafer_count"].ToString();
|
||||
cjItem.UnprocessedWafer = dbData.Rows[i]["unprocessed_wafer_count"].ToString();
|
||||
|
||||
|
||||
if (!dbData.Rows[i]["start_time"].Equals(DBNull.Value))
|
||||
cjItem.StartTime = ((DateTime)dbData.Rows[i]["start_time"]).ToString("HH:mm:ss");
|
||||
|
||||
if (!dbData.Rows[i]["end_time"].Equals(DBNull.Value))
|
||||
cjItem.EndTime = ((DateTime)dbData.Rows[i]["end_time"]).ToString("HH:mm:ss");
|
||||
|
||||
}
|
||||
|
||||
|
||||
}));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOG.Write(e);
|
||||
}
|
||||
|
||||
return cjItem;
|
||||
}
|
||||
|
||||
public void Query(string cjID)
|
||||
{
|
||||
try
|
||||
{
|
||||
string sql = string.Format(
|
||||
"SELECT * FROM \"wafer_data\",\"carrier_data\" where \"lot_data_guid\" = '{0}' and \"wafer_data\".\"carrier_data_guid\"=\"carrier_data\".\"guid\" order by \"create_time\" ASC, \"create_station\" ASC,\"create_slot\" ASC;",
|
||||
cjID);
|
||||
|
||||
DataTable dbData = QueryDataClient.Instance.Service.QueryData(sql);
|
||||
|
||||
Application.Current.Dispatcher.BeginInvoke(new Action(() =>
|
||||
{
|
||||
Wafers.Clear();
|
||||
try
|
||||
{
|
||||
if (dbData == null || dbData.Rows.Count == 0)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < dbData.Rows.Count; i++)
|
||||
{
|
||||
WaferHistoryDetail item = new WaferHistoryDetail();
|
||||
|
||||
item.Guid = dbData.Rows[i]["guid"].ToString();
|
||||
item.LoadPort = dbData.Rows[i]["create_station"].ToString();
|
||||
item.Slot = dbData.Rows[i]["create_slot"].ToString();
|
||||
|
||||
item.CarrierID = dbData.Rows[i]["rfid"].ToString();
|
||||
|
||||
item.LotID = dbData.Rows[i]["lot_id"].ToString();
|
||||
item.WaferID = dbData.Rows[i]["wafer_id"].ToString();
|
||||
|
||||
item.Status = dbData.Rows[i]["process_status"].ToString();
|
||||
|
||||
item.NotchAngle = dbData.Rows[i]["notch_angle"].ToString();
|
||||
item.SequenceName = dbData.Rows[i]["sequence_name"].ToString();
|
||||
item.LotId = dbData.Rows[i]["lot_id"].ToString();
|
||||
|
||||
if (!dbData.Rows[i]["create_time"].Equals(DBNull.Value))
|
||||
item.CreateTime = ((DateTime)dbData.Rows[i]["create_time"]).ToString("HH:mm:ss.fff");
|
||||
|
||||
if (!dbData.Rows[i]["delete_time"].Equals(DBNull.Value))
|
||||
item.DeleteTime = ((DateTime)dbData.Rows[i]["delete_time"]).ToString("HH:mm:ss.fff");
|
||||
|
||||
Wafers.Add(item);
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LOG.Write(ex);
|
||||
}
|
||||
|
||||
}));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOG.Write(e);
|
||||
}
|
||||
}
|
||||
public void WaferHistoryChanged( WaferHistoryDetail detail)
|
||||
{
|
||||
try
|
||||
|
||||
{
|
||||
|
||||
if (detail == null)
|
||||
{
|
||||
Application.Current.Dispatcher.BeginInvoke(new Action(() =>
|
||||
{
|
||||
Movements.Clear();
|
||||
}));
|
||||
return;
|
||||
}
|
||||
string sql = string.Format(
|
||||
"SELECT * FROM \"wafer_move_history\" where \"wafer_data_guid\" = '{0}' order by \"arrive_time\" ASC;",
|
||||
detail.Guid);
|
||||
|
||||
DataTable dbData = QueryDataClient.Instance.Service.QueryData(sql);
|
||||
|
||||
Application.Current.Dispatcher.BeginInvoke(new Action(() =>
|
||||
{
|
||||
Movements.Clear();
|
||||
|
||||
if (dbData == null || dbData.Rows.Count == 0)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < dbData.Rows.Count; i++)
|
||||
{
|
||||
WaferMovement item = new WaferMovement();
|
||||
|
||||
item.Station = dbData.Rows[i]["station"].ToString();
|
||||
item.Slot = dbData.Rows[i]["slot"].ToString();
|
||||
item.Status = dbData.Rows[i]["status"].ToString();
|
||||
|
||||
|
||||
if (!dbData.Rows[i]["arrive_time"].Equals(DBNull.Value))
|
||||
item.Time = ((DateTime)dbData.Rows[i]["arrive_time"]).ToString("HH:mm:ss.fff");
|
||||
|
||||
Movements.Add(item);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOG.Write(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user