@ -3,11 +3,14 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:local="clr-namespace:XGLFinishPro.Views"
xmlns:local="clr-namespace:XGLFinishPro.Views"
xmlns:convert="clr-namespace:XGLFinishPro.Tools"
xmlns:convert="clr-namespace:XGLFinishPro.Tools"
mc:Ignorable="d"
mc:Ignorable="d"
Title="CheckUserWin" Height="9 50" Width="1350" WindowStartupLocation="CenterScreen" WindowStyle="None" Loaded="Window_Loaded">
Title="CheckUserWin" Height="7 50" Width="1350" WindowStartupLocation="CenterScreen" WindowStyle="None" Loaded="Window_Loaded">
<Window.Resources>
<Window.Resources>
<ResourceDictionary>
<!--ComboBox下拉按钮-->
<!--ComboBox下拉按钮-->
<Style TargetType="ToggleButton" x:Key="ComboxStyleBtn">
<Style TargetType="ToggleButton" x:Key="ComboxStyleBtn">
<Setter Property="Template">
<Setter Property="Template">
@ -98,19 +101,29 @@
</Style>
</Style>
<Style TargetType="TextBox">
<Style TargetType="TextBox">
<Setter Property="Height" Value="40"/>
<Setter Property="Height" Value="40"/>
<Setter Property="Margin" Value="5"/>
<Setter Property="Margin" Value="5"/>
<Setter Property="Background" Value="Red"></Setter>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Template" >
<Setter.Value>
<ControlTemplate TargetType="TextBox">
<Border BorderThickness="2" CornerRadius="8" Background="#f2f3f5">
<ScrollViewer x:Name="PART_ContentHost" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Style>
<Style TargetType="Label">
<Style TargetType="Label">
<Setter Property="Margin" Value="15,0,0,0"/>
<Setter Property="Margin" Value="15,0,0,0"/>
<Setter Property="Foreground" Value="Black"/>
</Style>
</Style>
<Style x:Key="CustomCellStyle" TargetType="DataGridCell">
<Style x:Key="CustomCellStyle" TargetType="DataGridCell">
<Setter Property="Foreground" Value="Black" />
<Setter Property="Foreground" Value="Black" />
<Setter Property="TextBlock.TextAlignment" Value="Center" />
<Setter Property="TextBlock.TextAlignment" Value="Center" />
<Setter Property="TextBlock.FontSize" Value="22" />
<Setter Property="TextBlock.FontSize" Value="22" />
<Setter Property="BorderThickness" Value="0 0 1 1" />
<Setter Property="BorderThickness" Value="0 0 1 1" />
<Setter Property="BorderBrush" Value="LightGray" />
</Style>
</Style>
<SolidColorBrush x:Key="EvenRowBackground" Color="#E0E0E0"/>
<SolidColorBrush x:Key="EvenRowBackground" Color="#E0E0E0"/>
<SolidColorBrush x:Key="OddRowBackground" Color="#FFFFFF"/>
<SolidColorBrush x:Key="OddRowBackground" Color="#FFFFFF"/>
@ -118,6 +131,8 @@
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="BorderBrush" Value="LightGray"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Background" Value="{StaticResource EvenRowBackground}"/>
<Setter Property="Background" Value="{StaticResource EvenRowBackground}"/>
<Style.Triggers>
<Style.Triggers>
<Trigger Property="ItemsControl.AlternationIndex" Value="1">
<Trigger Property="ItemsControl.AlternationIndex" Value="1">
@ -125,6 +140,58 @@
</Trigger>
</Trigger>
</Style.Triggers>
</Style.Triggers>
</Style>
</Style>
<Style x:Key="btnKey" TargetType="Button">
<Setter Property="Width" Value="120"/>
<Setter Property="Height" Value="43"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="22"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="Template" >
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="Back" Background="#2B7EE6" BorderThickness="2" CornerRadius="10">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Back" Property="Background" Value="#3697A4"></Setter>
<Setter TargetName="Back" Property="BorderBrush" Value="#3697A4"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="btnCancelKey" TargetType="Button">
<Setter Property="Width" Value="120"/>
<Setter Property="Height" Value="43"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="FontSize" Value="22"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="Template" >
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="Back" Background="#f2f3f5" BorderThickness="2" CornerRadius="10">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Back" Property="Background" Value="#3697A4"></Setter>
<Setter TargetName="Back" Property="BorderBrush" Value="#3697A4"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</Window.Resources>
</Window.Resources>
<Grid >
<Grid >
<Grid.ColumnDefinitions>
<Grid.ColumnDefinitions>
@ -133,10 +200,10 @@
</Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="40"/>
<RowDefinition Height="35 0"/>
<RowDefinition Height="20 0"/>
<RowDefinition Height="55 0"/>
<RowDefinition Height="50 0"/>
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.ColumnSpan="2" x:Name="lbTitle" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Content="报工" FontWeight="Bold"></Label>
<Label Grid.Row="0" Grid.ColumnSpan="2" x:Name="lbTitle" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="Black" Fo ntSize="24" Content="报工" FontWeight="Bold"></Label>
<ScrollViewer x:Name="scrollViewer" Grid.Row="1" Grid.ColumnSpan="2" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
<ScrollViewer x:Name="scrollViewer" Grid.Row="1" Grid.ColumnSpan="2" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
<Grid x:Name="MyGrid" Grid.Row="1" Grid.ColumnSpan="2">
<Grid x:Name="MyGrid" Grid.Row="1" Grid.ColumnSpan="2">
@ -184,12 +251,12 @@
<Label Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Content="母单人数:"></Label>
<Label Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Content="母单人数:"></Label>
<TextBox x:Name="txtFOUserCount" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Width="260" TextChanged="txtFOUserCount_TextChanged"></TextBox>
<TextBox x:Name="txtFOUserCount" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Width="260" TextChanged="txtFOUserCount_TextChanged"></TextBox>
</StackPanel>-->
</StackPanel>-->
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="12 " Grid.Column="0" Grid.ColumnSpan="2">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="13 " Grid.Column="0" Grid.ColumnSpan="2">
<Label Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Content="成本中心:"></Label>
<Label Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Content="成本中心:"></Label>
<ComboBox x:Name="comboBoxCostCenter" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Width="360" Height="50"
<ComboBox x:Name="comboBoxCostCenter" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Width="360" Height="50"
Style="{StaticResource ComboBoxStyle}" SelectionChanged="comboBoxCostCenter_SelectionChanged"></ComboBox>
Style="{StaticResource ComboBoxStyle}" SelectionChanged="comboBoxCostCenter_SelectionChanged"></ComboBox>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="13" Grid.Column="0 " Grid.ColumnSpan="2">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Row="13" Grid.Column="1 " Grid.ColumnSpan="2">
<Label Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Content="批 次 号:"></Label>
<Label Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Content="批 次 号:"></Label>
<ComboBox x:Name="comboBoxBatch" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Margin="2,5,0,0" Width="360" Height="50" Style="{StaticResource ComboBoxStyle}"></ComboBox>
<ComboBox x:Name="comboBoxBatch" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24" Margin="2,5,0,0" Width="360" Height="50" Style="{StaticResource ComboBoxStyle}"></ComboBox>
<Label Content="* 不选批次号则默认为该工单报工" Foreground="Red" VerticalAlignment="Center"></Label>
<Label Content="* 不选批次号则默认为该工单报工" Foreground="Red" VerticalAlignment="Center"></Label>
@ -211,11 +278,14 @@
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="40 0"/>
<RowDefinition Height="38 0"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<DataGrid x:Name="dgConsumeInfo" Grid.Row="0" Grid.ColumnSpan="2" Background="#0000"
<DataGrid x:Name="dgConsumeInfo" Grid.Row="0" Grid.ColumnSpan="2" Background="#0000"
GridLinesVisibility="All" HorizontalGridLinesBrush="AliceBlue" VerticalGridLinesBrush="AliceBlue"
AlternatingRowBackground="LightGray"
RowBackground="White"
LoadingRow="dgConsumeInfo_LoadingRow"
LoadingRow="dgConsumeInfo_LoadingRow"
CanUserAddRows="False"
CanUserAddRows="False"
AutoGenerateColumns="False"
AutoGenerateColumns="False"
@ -225,22 +295,12 @@
RowStyle="{StaticResource DataGridRowStyle}"
RowStyle="{StaticResource DataGridRowStyle}"
CellStyle="{StaticResource CustomCellStyle}" MinRowHeight="35">
CellStyle="{StaticResource CustomCellStyle}" MinRowHeight="35">
<DataGrid.ColumnHeaderStyle >
<DataGrid.ColumnHeaderStyle >
<!--<Style TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="Height" Value="48" />
<Setter Property="FontSize" Value="20" />
<Setter Property="Foreground" Value="Black" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Background" Value="#0000" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" Value="Gray" />
</Style>-->
<Style TargetType="DataGridColumnHeader">
<Style TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="Height" Value="48" />
<Setter Property="Height" Value="48" />
<Setter Property="FontSize" Value="20" />
<Setter Property="FontSize" Value="20" />
<Setter Property="Foreground" Value="White " />
<Setter Property="Foreground" Value="Gray" />
<Setter Property="Background" Value="#2B7EE6 " />
<Setter Property="Background" Value="#f7f9fe" />
</Style>
</Style>
</DataGrid.ColumnHeaderStyle>
</DataGrid.ColumnHeaderStyle>
<DataGrid.Columns>
<DataGrid.Columns>
@ -251,31 +311,30 @@
</DataTemplate>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGridTemplateColumn>
<!--如果新增列,需要调整用量的取值序号-->
<DataGridTextColumn Width="250" Header="组件编码" Binding="{Binding material_code1}" IsReadOnly="True"/>
<DataGridTextColumn Width="250" Header="组件编码" Binding="{Binding material_code1}" IsReadOnly="True"/>
<DataGridTextColumn Width="250" Header="组件编码" Binding="{Binding material_code}" Visibility="Hidden" IsReadOnly="True"/>
<DataGridTextColumn Width="250" Header="组件编码" Binding="{Binding material_code}" Visibility="Hidden" IsReadOnly="True"/>
<DataGridTextColumn Width="350" Header="组件名称" Binding="{Binding material_name}" IsReadOnly="True"/>
<DataGridTextColumn Width="350" Header="组件名称" Binding="{Binding material_name}" IsReadOnly="True"/>
<DataGridTextColumn Width="100" Header="单位" Binding="{Binding unit}" />
<DataGridTextColumn Width="100" Header="单位" Binding="{Binding unit}" IsReadOnly="True" />
<DataGridTextColumn Width="100" Header="反冲标识" Binding="{Binding recoil}"/>
<DataGridTextColumn Width="100" Header="反冲标识" Binding="{Binding recoil}" IsReadOnly="True" />
<DataGridTextColumn Width="120" Header="领取数" Binding="{Binding quantity}" IsReadOnly="True" />
<DataGridTextColumn Width="120" Header="领取数" Binding="{Binding quantity}" IsReadOnly="True" />
<DataGridTextColumn Width="120" Header="用量" Binding="{Binding qty}" IsReadOnly="False">
<DataGridTextColumn Width="120" Header="实际用量" Binding="{Binding qty}" IsReadOnly="False"></DataGridTextColumn>
<DataGridTextColumn Width="100" Header="母单" Binding="{Binding parent_work_order}" IsReadOnly="True" Visibility="Hidden"/>
</DataGridTextColumn>
<DataGridTextColumn Width="180" Header="母单" Binding="{Binding workorder_code_sap}" IsReadOnly="True" />
<DataGridTextColumn Width="100" Header="母单" Binding="{Binding parent_work_order}" />
<DataGridTextColumn Width="100" Header="备注" Binding="{Binding remark}" IsReadOnly="False" />
<DataGridTextColumn Width="150" Header="备注" Binding="{Binding remark}" IsReadOnly="False" />
<!--<DataGridTextColumn Width="250" Header="物料组" Binding="{Binding productGroup}" IsReadOnly="True"/>
<!--<DataGridTextColumn Width="250" Header="物料组" Binding="{Binding productGroup}" IsReadOnly="True"/>
<DataGridTextColumn Width="250" Header="组名称" Binding="{Binding productGroupName}" IsReadOnly="True"/>-->
<DataGridTextColumn Width="250" Header="组名称" Binding="{Binding productGroupName}" IsReadOnly="True"/>-->
</DataGrid.Columns>
</DataGrid.Columns>
</DataGrid>
</DataGrid>
<Label x:Name="tbMsg" Width="600" Height="60" Grid.Row="1" Grid.ColumnSpan="2" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" FontSize="24" Foreground="Red" FontWeight="Bold"></Label>
<Label x:Name="tbMsg" Width="600" Height="40" Grid.Row="1" Grid.ColumnSpan="2" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" FontSize="24" Foreground="Red" FontWeight="Bold"></Label>
<CheckBox Content="最终报工" Height="auto" Margin="15,0,0,0" FontSize="10" ToolTip="选择后将结束该工单" Grid.Row="1" IsChecked="False" HorizontalAlignment="Left" VerticalContentAlignment="Center" Click="xuanze9_Click" Name="xuanze9" Checked="xuanze9_Checked">
<CheckBox Content="最终报工" Height="auto" Grid.Row="2" Margin="15,2 0,0,0" FontSize="10" ToolTip="选择后将结束该工单" IsChecked="False" HorizontalAlignment="Left" VerticalContentAlignment="Center" Click="xuanze9_Click" Name="xuanze9" Checked="xuanze9_Checked">
<CheckBox.LayoutTransform >
<CheckBox.LayoutTransform >
<ScaleTransform ScaleX="2" ScaleY="2" />
<ScaleTransform ScaleX="2" ScaleY="2" />
</CheckBox.LayoutTransform>
</CheckBox.LayoutTransform>
</CheckBox>
</CheckBox>
<Button x:Name="btnOK" Grid.Row="2" Grid.Column="0" Width="120" Height="43" Content="确定" Margin="3,-20,0,0" Background="#2F82E7" Foreground="White" FontSize="22" FontWeight="Bold" Click="btnOK_Click"/>
<Button x:Name="btnOK" Grid.Row="2" Grid.Column="1" Style="{StaticResource btnKey}" Content="确定" Margin="30,20,20,0" Click="btnOK_Click"/>
<Button x:Name="btnCancel" Grid.Row="2" Grid.Column="1" Width="120" Height="43" Content="取消" Margin="3,-20,0,0" FontWeight="Bold" FontSize="22" Click="btnCancel_Click"/>
<Button x:Name="btnCancel" Grid.Row="2" Grid.Column="1" Style="{StaticResource btnCancelKey}" Background="Gray" Content="取消" Margin="30,20,170,0" Click="btnCancel_Click"/>
</Grid>
</Grid>
</Grid>
</Grid>
</Window>
</Window>