<hc:Window x:Class="智能仓储WCS管理系统.MXOutOrderView"
        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"
        mc:Ignorable="d"
        xmlns:hc="https://handyorg.github.io/handycontrol"
        Height="500" Width="900" WindowStyle="None" BorderThickness="0"  Background="{x:Null}" AllowsTransparency="True" WindowStartupLocation="CenterScreen" Opacity="1">
    <hc:Window.Resources>
        <ResourceDictionary>
            <Style TargetType="Button" BasedOn="{StaticResource ButtonDefault}">
                <Setter Property="Padding" Value="25,0"></Setter>
            </Style>
        </ResourceDictionary>
    </hc:Window.Resources>

    <Border BorderThickness="1.5" BorderBrush="Black" Background="AliceBlue" CornerRadius="10" >
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="1.5*"></RowDefinition>
                <RowDefinition Height="1.5*"></RowDefinition>
                <RowDefinition Height="9*"></RowDefinition>
                <RowDefinition Height="1.5*"></RowDefinition>
                <RowDefinition Height="1.5*"></RowDefinition>
            </Grid.RowDefinitions>
            <TextBlock FontSize="25" Name="Title" Text="选 择 发 料 单" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Center"/>
            <Button Margin="-5,-1" Visibility="{Binding IsClose,Converter={StaticResource Boolean2VisibilityConverter}}" Style="{StaticResource ButtonIcon}" hc:IconElement.Geometry="{StaticResource CloseGeometry}" HorizontalAlignment="Right" VerticalAlignment="Top" Click="closeClick"/>

            <Border Grid.Row="1" Margin="2 2 2 0" Background="LightGray"  Padding="0">
                <Border   Background="AliceBlue" Padding="0">
                    <Grid >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="0.8*"></ColumnDefinition>
                            <ColumnDefinition Width="*"></ColumnDefinition>
                            <ColumnDefinition Width="0.8*"></ColumnDefinition>
                            <ColumnDefinition Width="*"></ColumnDefinition>
                            <ColumnDefinition Width="*"></ColumnDefinition>
                            <ColumnDefinition Width="*"></ColumnDefinition>
                            <ColumnDefinition Width="*"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition></RowDefinition>
                        </Grid.RowDefinitions>


                        <TextBlock Grid.Row="5" Grid.Column="0" Margin="2" FontSize="20" HorizontalAlignment="Right" VerticalAlignment="Center" Text="订单号：">
                        </TextBlock>
                        <TextBox MinWidth="120"  Grid.Column="1" MaxWidth="120" Text="{Binding OrderProdNumber}" FontSize="20" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Black" ></TextBox>
                        <TextBlock  Grid.Column="2"  Margin="10 2 2 2" FontSize="20" HorizontalAlignment="Right" VerticalAlignment="Center" Text="工单号：">
                        </TextBlock>
                        <TextBox  Grid.Column="3" MinWidth="120" MaxWidth="120" Text="{Binding OrderWorkNumber}" PreviewTextInput="txtMatQty1_PreviewTextInput" Name="txtMatQty1" FontSize="20" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Black" >
                        </TextBox>
                        <TextBlock  Grid.Column="4"  Margin="10 2 2 2" FontSize="20" HorizontalAlignment="Right" VerticalAlignment="Center" Text="领料单号：">
                        </TextBlock>
                        <TextBox  Grid.Column="5" MinWidth="120" MaxWidth="120" Text="{Binding PickBillNumber}" PreviewTextInput="txtMatQty1_PreviewTextInput" FontSize="20" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="Black" >
                        </TextBox>

                        <Button  Grid.Column="6" Style="{StaticResource ButtonSuccess}"
                                            Command="{Binding BtnSearchCommand}"
                                            hc:BorderElement.CornerRadius="10" 
                                            MinHeight="35" FontSize="20" Content="&#xE8B9; 搜索" FontFamily="{StaticResource IconFont}"  />


                        <!--</StackPanel>-->
                    </Grid>
                </Border>
                <!--</TabItem>-->
            </Border>

            <Grid Margin="5,0" Grid.Row="2" >
                <DataGrid Grid.Row="1" SelectedCellsChanged="DataGrid_SelectedCellsChanged"
                              RowHeight="39" ItemsSource="{Binding DataGridItemSource}"
                              AutoGenerateColumns="False" Name="dg1"  FontSize="13">
                    <DataGrid.Columns>
                        <DataGridTemplateColumn CanUserResize="False">
                            <DataGridTemplateColumn.CellTemplate>
                                <DataTemplate>
                                    <RadioButton Width="30" Height="30"  
                                         GroupName="111222333"
                                         IsChecked="{Binding IsSelected , UpdateSourceTrigger=PropertyChanged}"/>
                                </DataTemplate>
                            </DataGridTemplateColumn.CellTemplate>

                        </DataGridTemplateColumn>
                        <DataGridTextColumn IsReadOnly="True" Header="订单号" Binding="{Binding orderProdNumbers}"></DataGridTextColumn>
                        <DataGridTextColumn IsReadOnly="True" Header="工单号" Binding="{Binding orderWorkNumbers}"></DataGridTextColumn>
                        <DataGridTextColumn IsReadOnly="True" Header="领料单号" Binding="{Binding pickBillNumber}"></DataGridTextColumn>
                        <DataGridTextColumn IsReadOnly="True" Header="类型" Binding="{Binding dictTypeStr}"></DataGridTextColumn>
                        <DataGridTextColumn IsReadOnly="True" Header="状态" Binding="{Binding dictStatusStr}"></DataGridTextColumn>
                        <DataGridTextColumn IsReadOnly="True" Header="创建时间" Binding="{Binding createdDt}"></DataGridTextColumn>
                        <DataGridTextColumn IsReadOnly="True" Header="创建人" Binding="{Binding createdBy}"></DataGridTextColumn>
                       
                    </DataGrid.Columns>
                </DataGrid>
            </Grid>

            <StackPanel Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Left" Orientation="Horizontal">
                <TextBlock Margin="3" Text="仓库代码：" VerticalAlignment="Center" FontSize="26"></TextBlock>
                <TextBox Margin="3" Name="txtWarehouseCode"  FontSize="26" MinWidth="120" MaxWidth="120" Text="{Binding WarehouseCode}"></TextBox>
            </StackPanel>

            <StackPanel Margin="3" x:Name="spacingPanel" Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                <Button Margin="0" Content="全部发料" Background="ForestGreen" Foreground="White" MinHeight="40" FontSize="21" Click="comfirmClick">
                </Button>

                <TextBlock Margin="13 0 0 0" VerticalAlignment="Center" FontSize="20" Text="  AB面选择："></TextBlock>

                <ComboBox Name="reportSideCbx">
                    <ComboBoxItem></ComboBoxItem>
                    <ComboBoxItem>A</ComboBoxItem>
                    <ComboBoxItem>B</ComboBoxItem>
                </ComboBox>
                
                <Button Margin="0" Content="首盘发料" Background="RosyBrown" Foreground="White" MinHeight="40" FontSize="21" Click="comfirmClick">
                </Button>
                <Button Margin="0" Content="后续料" Background="RoyalBlue" Foreground="White" MinHeight="40" FontSize="21" Click="comfirmClick">
                </Button>
                <TextBlock Margin="13" Text=""></TextBlock>
                <Button Margin="0" Content="取消"  Background="CadetBlue" Foreground="White"  MinHeight="40" FontSize="21" Click="closeClick"/>
            </StackPanel>
        </Grid>
    </Border>
</hc:Window>
