You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

419 lines
25 KiB
Plaintext

<Window x:Class="XGLFinishPro.Views.PieceSalaryCalWin"
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:local="clr-namespace:XGLFinishPro.Views"
xmlns:hc="https://handyorg.github.io/handycontrol"
mc:Ignorable="d"
Title="计件薪资" Height="800" Width="1200" WindowStartupLocation="CenterScreen" WindowStyle="None" Loaded="Window_Loaded" Closing="Window_Closing">
<Window.Resources>
<SolidColorBrush x:Key="EvenRowBackground" Color="#E0E0E0"/>
<SolidColorBrush x:Key="OddRowBackground" Color="#FFFFFF"/>
<Style x:Key="DataGridTextCenterColumnStyle" TargetType="DataGridCell" BasedOn="{StaticResource DataGridCellStyle}">
<Setter Property="HorizontalContentAlignment" Value="Center"/>
</Style>
<Style x:Key="ColumnHeaderGripperStyle" TargetType="DataGridColumnHeader"/>
<Style x:Key="DataGridRowStyle" TargetType="DataGridRow">
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Background" Value="{StaticResource EvenRowBackground}"/>
<Style.Triggers>
<Trigger Property="ItemsControl.AlternationIndex" Value="1">
<Setter Property="Background" Value="{StaticResource OddRowBackground}"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="CustomCellStyle" TargetType="DataGridCell">
<Setter Property="Foreground" Value="Black" />
<Setter Property="TextBlock.TextAlignment" Value="Center" />
<Setter Property="TextBlock.FontSize" Value="22" />
</Style>
<Style x:Key="ApplicantList_ListBox_Style" TargetType="{x:Type ListBox}">
<Setter Property="Background" Value="#00000000"/>
<Setter Property="BorderBrush" Value="#00000000"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
<Setter Property="ScrollViewer.PanningMode" Value="Both"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<!--<Setter Property="ItemContainerStyle" Value="{DynamicResource ApplicantList_ListBoxItem_Style}" />-->
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<!--<WrapPanel Orientation="Horizontal" IsItemsHost="True" />-->
<UniformGrid Columns="4"/>
<!--设置横向Horizontal 纵向Vertical显示-->
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="btnKey" TargetType="Button">
<Setter Property="Width" Value="150" />
<Setter Property="Height" Value="60" />
<Setter Property="Margin" Value="5.5"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="Template" >
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="#2B7EE6" BorderThickness="2" CornerRadius="10">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ApplicantList_ListBoxItem_Style" TargetType="{x:Type ListBoxItem}">
<Setter Property="Margin" Value="10,10,10,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border x:Name="Bd" BorderThickness="3"
Width="120"
Height="40"
Margin="2,0,0,0"
Style="{DynamicResource ListBoxItemNormalBackground_Border_Style}">
<Grid >
<Image Source="../Resources/leaf.png" Margin="223,-82,0,0" Width="50"/>
<TextBlock Text="{Binding childprocess_code}"
VerticalAlignment="Center"
Margin="10,0,0,0" FontWeight="Bold" Foreground="Black"
Style="{DynamicResource ListBoxItemContent_TextBlock_Style}"/>
<TextBlock Text="{Binding childprocess_name}"
VerticalAlignment="Center"
2 years ago
Margin="55,0,0,0" FontWeight="Bold" Foreground="Black"
Style="{DynamicResource ListBoxItemContent_TextBlock_Style}"/>
<Grid
Margin="-15,12,0,0"
Width="90"
Height="102"
VerticalAlignment="Top"
HorizontalAlignment="Left" >
<Image Source="../Resources/circular.png" Width="10" Height="10" Margin="0,-62,0,0"/>
<Image Source="../Resources/circular.png" Width="10" Height="10" Margin="0,-22,0,0"/>
<Image Source="../Resources/circular.png" Width="10" Height="10" Margin="0,18,0,0"/>
<Image Source="../Resources/circular.png" Width="10" Height="10" Margin="0,56,0,0"/>
<!--<Image Source="../Resources/lanjuLogo.png" VerticalAlignment="Stretch"/>-->
<!--<StackPanel Orientation="Vertical">
<TextBlock Text="{Binding rfid_no}" FontSize="18"
Foreground="{Binding rfid_no,Converter={StaticResource ForeGroundBatchType}}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<Image Source="..\Img\1.png"></Image>
</StackPanel>-->
</Grid>
</Grid>
</Border>
<!--控件触发器-->
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="true">
<Setter Property="Background" TargetName="Bd">
<Setter.Value>
<!--LinearGradientBrush,渐变线画笔-->
<LinearGradientBrush
StartPoint="0.4,0"
EndPoint="0.4,1">
<LinearGradientBrush.GradientStops>
<!--GradientStops渐变线停止GradientStopCollection渐变线停止集合点-->
<GradientStopCollection>
<GradientStop
Color="#FFffeeac"
Offset="0" />
<GradientStop
Color="#FFfbe178"
Offset="0.4" />
<GradientStop
Color="#FFfbe178"
Offset="0.6" />
<GradientStop
Color="#FFfffbd9"
Offset="1" />
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="BorderBrush" TargetName="Bd" Value="RoyalBlue"></Setter>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="Bd">
<Setter.Value>
<!--LinearGradientBrush,渐变线画笔-->
<LinearGradientBrush
StartPoint="0.4,0"
EndPoint="0.4,1">
<LinearGradientBrush.GradientStops>
<!--GradientStops渐变线停止GradientStopCollection渐变线停止集合点-->
<GradientStopCollection>
<GradientStop
Color="#FFC2E0FF"
Offset="0" />
<GradientStop
Color="#FFC2E0dF"
Offset="0.4" />
<GradientStop
Color="#FFC2E0dF"
Offset="0.6" />
<GradientStop
Color="#FFfffbd9"
Offset="1" />
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="{x:Type Border}" x:Key="ListBoxItemHeadBackground_Border_Style">
<Setter Property="BitmapEffect">
<Setter.Value>
<DropShadowBitmapEffect Color="Black" Direction="340" ShadowDepth="7" Softness="0.1" Opacity="0.3"/>
</Setter.Value>
</Setter>
<Setter Property="Background" >
<Setter.Value>
<LinearGradientBrush
StartPoint="0.4,0"
EndPoint="0.4,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop
Color="#FFffeeac"
Offset="0" />
<GradientStop
Color="#FFfbe178"
Offset="0.4" />
<GradientStop
Color="#FFfbe178"
Offset="0.6" />
<GradientStop
Color="#FFfffbd9"
Offset="1" />
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Style>
<!--字体样式-->
<Style x:Key="Title_TextBlock_Style" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="34"/>
<Setter Property="FontFamily" Value="微软雅黑"/>
<Setter Property="Foreground" Value="#FFFFFFFF"/>
</Style>
<Style x:Key="Copyright_TextBlock_Style" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="12"/>
<Setter Property="FontFamily" Value="宋体"/>
<Setter Property="Foreground" Value="#FF939393"/>
</Style>
<Style x:Key="ChirdrenControlTitle_TextBlock_Style" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="14"/>
<Setter Property="FontFamily" Value="微软雅黑"/>
<Setter Property="Foreground" Value="#FFFFFFFF"/>
</Style>
<Style x:Key="ListBoxItemName_TextBlock_Style" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="14"/>
<Setter Property="FontFamily" Value="微软雅黑"/>
<Setter Property="Foreground" Value="#000000"/>
<Setter Property="TextWrapping" Value="Wrap"/>
</Style>
<Style x:Key="ListBoxItemContent_TextBlock_Style" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="14"/>
<Setter Property="FontFamily" Value="微软雅黑"/>
<Setter Property="Foreground" Value="#333333"/>
<Setter Property="TextWrapping" Value="Wrap"/>
</Style>
<!--ListBox元素边框样式-->
<Style x:Key="ListBoxItemNormalBackground_Border_Style" TargetType="{x:Type Border}">
<Setter Property="BorderThickness" Value="1" />
<Setter Property="CornerRadius" Value="5" />
<Setter Property="BorderBrush" Value="#E1E1E1"/>
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush StartPoint="0.5,0"
EndPoint="0.5,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Color="#FFffffff"
Offset="0" />
<GradientStop Color="#FFE4E4E4"
Offset="0.96" />
<GradientStop Color="#FFe4e4e4"
Offset="1" />
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect Color="#9e9e9e"
Direction="315"
ShadowDepth="3"
Opacity="1" />
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid Background="#F2F3F5">
<Grid.RowDefinitions>
<RowDefinition Height="0.1*"/>
<RowDefinition Height="0.45*"></RowDefinition>
<RowDefinition Height="0.45*"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<!--<Button x:Name="btnStepConfirm1" Style="{StaticResource btnKey}" Background="#2B7EE6" Width="100" Height="40" Click="btnConfirm_Click">
<StackPanel Orientation="Horizontal">
<Image Source="/Resources/green.png" Width="30" Height="30"/>
<TextBlock Text="确认" VerticalAlignment="Center" Margin="15,0,0,0"/>
</StackPanel>
</Button>-->
<CheckBox x:Name="btnSelectStep" Visibility="Collapsed" Grid.Row="0" Content="选择工序" FontSize="16" HorizontalAlignment="Left" Width="100" Height="30" Margin="10,0,0,0" FontWeight="Bold" Background="#2B7EE6"
Click="btnSelectStep_Click">
</CheckBox>
<Popup Grid.Row="1" Grid.RowSpan="2" IsOpen="{Binding ElementName=btnSelectStep,Path=IsChecked,UpdateSourceTrigger=PropertyChanged}" PlacementTarget="{Binding ElementName=btnSelectStep}">
<StackPanel Orientation="Vertical">
<ListBox x:Name="lstBoxStep" Style="{DynamicResource ApplicantList_ListBox_Style}" ItemContainerStyle="{DynamicResource ApplicantList_ListBoxItem_Style}" SelectionMode="Multiple">
</ListBox>
<Button x:Name="btnStepConfirm" Style="{StaticResource btnKey}" Background="#2B7EE6" Content="确认" Width="100" Height="30" Click="btnConfirm_Click"/>
</StackPanel>
</Popup>
2 years ago
<ListBox x:Name="lstSelectedStep" Grid.Row="1" Grid.Column="0" Background="#F2F3F5" Style="{DynamicResource ApplicantList_ListBox_Style}"
ItemContainerStyle="{DynamicResource ApplicantList_ListBoxItem_Style}" SelectionMode="Single" SelectionChanged="lstSelectedStep_SelectionChanged">
</ListBox>
<Grid Grid.Row="0" Grid.RowSpan="2" Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="0.15*"/>
<RowDefinition Height="0.85*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Row="0" Grid.Column ="0" Orientation="Horizontal" Margin="5">
<TextBlock Text="请输入用户名或者ID" VerticalAlignment="Center"/>
<TextBox x:Name="txtP" Width="120" Height="30" FontSize="18" VerticalAlignment="Center" VerticalContentAlignment="Center" TextChanged="txtP_TextChanged"/>
<Button x:Name="btnQueryUser" Content="查询" FontWeight="Bold" Width="100" Height="40" Style="{StaticResource btnKey}" Click="btnQueryUser_Click" Visibility="Collapsed"/>
<Button x:Name="btnUserConfirm" Content="确认" FontWeight="Bold" Width="100" Height="40" Style="{StaticResource btnKey}" Click="btnUserConfirm_Click"/>
<Button x:Name="btnCloseWin" Content="关闭" FontWeight="Bold" Width="100" Height="40" Style="{StaticResource btnKey}" Click="btnCloseWin_Click"/>
</StackPanel>
<DataGrid
Grid.Row="1" Grid.Column ="0" Grid.ColumnSpan="2"
x:Name="dgUserInfo"
MinWidth="200"
MinHeight="260"
Width="560"
Height="340"
RowStyle="{StaticResource DataGridRowStyle}"
Margin="10,10,0,5"
MaxHeight="400"
AlternationCount="2"
FontSize="18"
LoadingRow="dgWorkOrderInfo_LoadingRow"
HeadersVisibility="Column"
HorizontalAlignment="Left"
VerticalAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True"
AutoGenerateColumns="False" CanUserAddRows="False" SelectionMode="Extended" SelectionUnit="FullRow" SelectionChanged="dgUserInfo_SelectionChanged">
<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>
<!-- 添加选择列 , RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}}IsChecked="{Binding IsSelected ,Mode=TwoWay,RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}}}"-->
<DataGridTemplateColumn Width="50">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<CheckBox x:Name="cb_child" Click="cb_child_Click" IsChecked="{Binding IsChecked}" HorizontalAlignment="Left" VerticalAlignment="Center" VerticalContentAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header=" 序号" Width="80" 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="130" Header="用户编码" Binding="{Binding user_name}"/>
<DataGridTextColumn Width="190" Header="用户名称" Binding="{Binding nick_name}"/>
</DataGrid.Columns>
</DataGrid>
</Grid>
<GroupBox Grid.Row="2" Grid.Column ="0" Grid.ColumnSpan ="2" Header="已分配的数据">
<DataGrid
x:Name="dgCreatedUserInfo"
MinWidth="400"
MinHeight="320"
RowStyle="{StaticResource DataGridRowStyle}"
Margin="10,0,0,5"
MaxHeight="400"
AlternationCount="2"
FontSize="18"
LoadingRow="dgWorkOrderInfo_LoadingRow"
HeadersVisibility="Column"
HorizontalAlignment="Left"
VerticalAlignment="Center" VerticalContentAlignment="Center" IsReadOnly="True"
AutoGenerateColumns="False" CanUserAddRows="False" SelectionMode="Extended" SelectionUnit="FullRow" SelectionChanged="dgUserInfo_SelectionChanged">
<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>
<!-- 添加选择列 , RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}}IsChecked="{Binding IsSelected ,Mode=TwoWay,RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}}}"-->
<DataGridTemplateColumn Header=" 序号" Width="80" 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="100" Header="订单编码" Binding="{Binding workorder_code_sap}"/>
<DataGridTextColumn Width="100" Header="用户编码" Binding="{Binding user_name}"/>
<DataGridTextColumn Width="100" Header="用户名称" Binding="{Binding nick_name}"/>
<DataGridTextColumn Width="150" Header="产品编码" Binding="{Binding product_code}"/>
<DataGridTextColumn Width="200" Header="产品名称" Binding="{Binding product_name}"/>
<DataGridTextColumn Width="80" Header="工序编码" Binding="{Binding childprocess_code}"/>
<DataGridTextColumn Width="80" Header="工序名称" Binding="{Binding childprocess_name}"/>
<DataGridTextColumn Width="80" Header="线体" Binding="{Binding line_code}"/>
<DataGridTextColumn Width="185" Header="创建时间" Binding="{Binding create_time, StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}"/>
</DataGrid.Columns>
</DataGrid>
</GroupBox>
<StackPanel Grid.Row="3" Grid.Column ="0" Grid.ColumnSpan ="2" VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Horizontal" Margin="5">
<TextBlock x:Name="msgBox" Text="" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" Foreground="Red"/>
</StackPanel>
</Grid>
</Window>