|
|
|
<Window x:Class="Aucma.Core.BoxFoam.Views.SplitPlanView"
|
|
|
|
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
|
|
mc:Ignorable="d"
|
|
|
|
Background="#1152AC"
|
|
|
|
Title="计划维护" FontFamily="Microsoft YaHei" Height="700" Width="900"
|
|
|
|
d:DesignHeight="800" WindowStartupLocation="CenterScreen"
|
|
|
|
d:DesignWidth="1500" ResizeMode="NoResize" Topmost="True" >
|
|
|
|
|
|
|
|
<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="BorderBrush" Value="#dddddd" />
|
|
|
|
<Setter Property="Height" Value="40"/>
|
|
|
|
<Setter Property="FontSize" Value="18"/>
|
|
|
|
<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="White" />
|
|
|
|
<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>
|
|
|
|
</Window.Resources>
|
|
|
|
|
|
|
|
<Border Grid.Row="1" Grid.Column="1" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Margin="5">
|
|
|
|
<Grid>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="0.6*"/>
|
|
|
|
<RowDefinition Height="9*"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" 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" Margin="1,0,5,5">
|
|
|
|
<Grid>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="0.1*"/>
|
|
|
|
<RowDefinition Height="0.2*"/>
|
|
|
|
<RowDefinition/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<WrapPanel Grid.Row="0" Margin="5" VerticalAlignment="Center">
|
|
|
|
<Label Content="工单编号" VerticalAlignment="Center" Foreground="White" FontSize="18" />
|
|
|
|
<TextBox x:Name="queryParam" PreviewMouseDoubleClick="queryParam_PreviewMouseDoubleClick" Text="{Binding Search,Mode=TwoWay}" Style="{x:Null}" Width="300" HorizontalAlignment="Left" VerticalContentAlignment="Center" Margin="10 0 5 0"/>
|
|
|
|
<Button Content="查 询" Command="{Binding QueryPlanCommand}" CommandParameter="{Binding Text, ElementName=queryParam}" Margin="5 0" />
|
|
|
|
<Button Content="重 置" Command="{Binding ResetCommand}" Margin="5 0" />
|
|
|
|
<Button Content="配 置" Command="{Binding SearchCriteriaSetCommand}" Margin="5 0" />
|
|
|
|
</WrapPanel>
|
|
|
|
|
|
|
|
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="1">
|
|
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="0.15*"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<StackPanel Grid.Column="0" VerticalAlignment="Center" Margin="10 0 0 0">
|
|
|
|
<TextBlock Text="快捷查询" VerticalAlignment="Center" Foreground="#FFFFFF" FontSize="18" />
|
|
|
|
</StackPanel>
|
|
|
|
<WrapPanel Grid.Column="1" VerticalAlignment="Center" Margin="0 5">
|
|
|
|
<ItemsControl ItemsSource="{Binding Configurations}">
|
|
|
|
<ItemsControl.ItemsPanel>
|
|
|
|
<ItemsPanelTemplate>
|
|
|
|
<WrapPanel Orientation="Horizontal" />
|
|
|
|
</ItemsPanelTemplate>
|
|
|
|
</ItemsControl.ItemsPanel>
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<RadioButton
|
|
|
|
Content="{Binding}"
|
|
|
|
Command="{Binding DataContext.RadioButtonCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}"
|
|
|
|
CommandParameter="{Binding}"
|
|
|
|
GroupName="MaterialTypeRadioButton"
|
|
|
|
Margin="25,0" FontSize="12" Foreground="#FFFFFF"/>
|
|
|
|
</DataTemplate>
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
</ItemsControl>
|
|
|
|
</WrapPanel>
|
|
|
|
</Grid>
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
<UniformGrid Grid.Row="2" Margin="5" >
|
|
|
|
<DataGrid ItemsSource="{Binding MaterialDataGrid}" Background="Transparent"
|
|
|
|
ColumnHeaderHeight="35" x:Name="dgvMH" FontSize="20"
|
|
|
|
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0"
|
|
|
|
GridLinesVisibility="None" VerticalAlignment="Stretch"
|
|
|
|
BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
|
|
|
|
Foreground="White" SelectedItem="{Binding SelectedDataItem}" MouseLeftButtonDown="dgvMH_MouseLeftButtonDown">
|
|
|
|
<!--ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.HorizontalScrollBarVisibility="Visible"-->
|
|
|
|
<DataGrid.Columns>
|
|
|
|
<DataGridTextColumn Binding="{Binding No}" Header="序号" Width="1*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
|
|
|
|
<DataGridTextColumn Binding="{Binding PlanCode}" Header="计划编号" Width="1*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
|
|
|
|
<DataGridTextColumn Binding="{Binding OrderCode}" Header="工单编号" Width="1*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
|
|
|
|
<DataGridTextColumn Binding="{Binding MaterialName}" Header="产品型号" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
|
|
|
|
<DataGridTextColumn Binding="{Binding PlanAmount}" Header="计划数量" Width="1*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
|
|
|
|
<DataGridTextColumn Binding="{Binding CompleteAmount}" Header="完成数量" Width="1*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
|
|
|
|
<DataGridTextColumn Binding="{Binding BeginTime,StringFormat=\{0:MM-dd HH:mm\}}" Header="开始时间" Width="1*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
|
|
|
|
</DataGrid.Columns>
|
|
|
|
</DataGrid>
|
|
|
|
</UniformGrid>
|
|
|
|
</Grid>
|
|
|
|
</Border>
|
|
|
|
</Grid>
|
|
|
|
</Border>
|
|
|
|
</Window>
|