|
|
|
@ -6,9 +6,9 @@
|
|
|
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
|
|
|
mc:Ignorable="d"
|
|
|
|
|
Background="#1152AC"
|
|
|
|
|
Title="计划维护" FontFamily="Microsoft YaHei" Height="700" Width="900"
|
|
|
|
|
Title="计划维护" FontFamily="Microsoft YaHei" Height="900" Width="1500"
|
|
|
|
|
d:DesignHeight="800" WindowStartupLocation="CenterScreen"
|
|
|
|
|
d:DesignWidth="1500" ResizeMode="NoResize" Topmost="True" >
|
|
|
|
|
d:DesignWidth="1500" ResizeMode="NoResize" Topmost="False" Name="window">
|
|
|
|
|
|
|
|
|
|
<Window.Resources>
|
|
|
|
|
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
|
|
|
|
@ -121,84 +121,129 @@
|
|
|
|
|
</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_1" Text="{Binding Search, Mode=TwoWay}" Style="{x:Null}" Width="300" HorizontalAlignment="Left" VerticalContentAlignment="Center"/>
|
|
|
|
|
<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>
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="5*"/>
|
|
|
|
|
<ColumnDefinition Width="2*"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<Border Grid.Column="0" 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/>
|
|
|
|
|
</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_1" Text="{Binding Search, Mode=TwoWay}" Style="{x:Null}" Width="300" HorizontalAlignment="Left" VerticalContentAlignment="Center"/>
|
|
|
|
|
<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"
|
|
|
|
|
<UniformGrid Grid.Row="1" 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_1">
|
|
|
|
|
<!--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="MES工单编号" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
|
|
|
|
|
<!--<DataGridTextColumn Binding="{Binding OrderCode}" Header="SAP计划编号" Width="1*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>-->
|
|
|
|
|
<DataGridTextColumn Binding="{Binding MaterialName}" Header="产品型号" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
|
|
|
|
|
<!--ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.HorizontalScrollBarVisibility="Visible"-->
|
|
|
|
|
<DataGrid.Columns>
|
|
|
|
|
<DataGridTextColumn Binding="{Binding No}" Header="序号" Width="60" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
|
|
|
|
|
<DataGridTextColumn Binding="{Binding PlanCode}" Header="MES工单编号" Width="1*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
|
|
|
|
|
<!--<DataGridTextColumn Binding="{Binding OrderCode}" Header="SAP计划编号" Width="1*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>-->
|
|
|
|
|
<DataGridTextColumn Binding="{Binding MaterialName}" Header="产品型号" Width="2*" IsReadOnly="True" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
|
|
|
|
|
|
|
|
|
|
<DataGridTextColumn Binding="{Binding MaterialCode}" Header="物料编号" Width="1*" 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>
|
|
|
|
|
|
|
|
|
|
<Border Grid.Row="1" Grid.Column="1" BorderBrush="#1254AB" BorderThickness="3" CornerRadius="5" Background="Transparent" Margin="5,0,10,0">
|
|
|
|
|
<Border.Effect>
|
|
|
|
|
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
|
|
|
|
|
</Border.Effect>
|
|
|
|
|
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="1*"/>
|
|
|
|
|
<RowDefinition Height="1*"/>
|
|
|
|
|
<RowDefinition Height="1*"/>
|
|
|
|
|
<RowDefinition Height="1*"/>
|
|
|
|
|
<RowDefinition Height="1*"/>
|
|
|
|
|
<RowDefinition Height="3*"/>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center" Margin="20,0,0,0">
|
|
|
|
|
<TextBlock Text="产品编码:" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
|
|
|
<TextBox x:Name="MaterialCode" Text="{Binding PlanInfo.MaterialCode}" Foreground="white" BorderBrush="White" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="180"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<StackPanel Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Center" Margin="20,0,0,0">
|
|
|
|
|
<TextBlock Text="产品型号:" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
|
|
|
<TextBox x:Name="MaterialName" Text="{Binding PlanInfo.MaterialName}" Foreground="white" BorderBrush="White" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="180"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<StackPanel Grid.Row="3" Orientation="Horizontal" VerticalAlignment="Center" Margin="20,0,0,0">
|
|
|
|
|
<TextBlock Text="计划编号:" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
|
|
|
<TextBox Text="{Binding PlanInfo.PlanCode}" Foreground="white" BorderBrush="White" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="180"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<StackPanel Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Center" Margin="20,0,0,0">
|
|
|
|
|
<TextBlock Text="下达数量:" FontSize="18" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
|
|
|
<TextBox Text="{Binding TransmitAmount}" Foreground="white" BorderBrush="White" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" Width="180"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<Border Grid.Row="5" BorderBrush="Black" BorderThickness="0" Margin="10">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition/>
|
|
|
|
|
<ColumnDefinition Width="129.19"/>
|
|
|
|
|
<ColumnDefinition/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<Button Grid.Row="0" Grid.Column="0" Content="1" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="120"/>
|
|
|
|
|
<Button Grid.Row="0" Grid.Column="1" Content="2" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="120" />
|
|
|
|
|
<Button Grid.Row="0" Grid.Column="2" Content="3" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="120" />
|
|
|
|
|
<Button Grid.Row="1" Grid.Column="0" Content="4" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="120" />
|
|
|
|
|
<Button Grid.Row="1" Grid.Column="1" Content="5" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="120" />
|
|
|
|
|
<Button Grid.Row="1" Grid.Column="2" Content="6" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="120" />
|
|
|
|
|
<Button Grid.Row="2" Grid.Column="0" Content="7" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="120" />
|
|
|
|
|
<Button Grid.Row="2" Grid.Column="1" Content="8" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="120" />
|
|
|
|
|
<Button Grid.Row="2" Grid.Column="2" Content="9" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="120" />
|
|
|
|
|
<Button Grid.Row="3" Grid.Column="0" Content="0" FontSize="18" Margin="2,2" Command="{Binding KeypadButtonCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Content}" Height="70" Width="120" />
|
|
|
|
|
|
|
|
|
|
<Button Grid.Row="3" Grid.Column="2" Content="清除" FontSize="18" Margin="2,2" Background="#FF9900" Foreground="white" BorderBrush="#FF9900" Command="{Binding ClearTransmitAmountCommand}" Height="70" Width="120" />
|
|
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
<StackPanel Grid.Row="6" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
|
|
|
<Button Content="保存型号" FontSize="20" Command="{Binding SaveMaterialCodeBySpaceInfoCommand}" Foreground="white" Margin="0,0,10,0" Height="50" Width="110" />
|
|
|
|
|
<Button Content="下达计划" FontSize="20" Command="{Binding AddPlanInfoCommand}" Background="#FF36B5C1" BorderBrush="#FF36B5C1" Foreground="white" Margin="10,0,10,0" Height="50" Width="110" />
|
|
|
|
|
<Button Content="取 消" FontSize="20" Command="{Binding CloseWindowCommand}" CommandParameter="{Binding ElementName=window}" Background="#FF0033" BorderBrush="#FF0033" Foreground="white" Margin="10,0,0,0" Height="50" Width="110" />
|
|
|
|
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
<DataGridTextColumn Binding="{Binding MaterialCode}" Header="物料编号" Width="1*" 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>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Window>
|
|
|
|
|