<hc:Window x:Class="智能仓储WCS管理系统.OutInventoryDocumentMatDetailView"
        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="800" 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 BorderBrush="Gray" Background="WhiteSmoke" CornerRadius="5" BorderThickness="1">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
                <RowDefinition Height="auto"></RowDefinition>
            </Grid.RowDefinitions>
            <TextBlock FontSize="24" 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"/>

            <Grid Margin="5,0" Grid.Row="1" >
                <DataGrid Grid.Row="1" SelectedCellsChanged="DataGrid_SelectedCellsChanged"
                              ItemsSource="{Binding DataGridItemSource}" 
                              RowHeight="39" 
                              AutoGenerateColumns="False" Name="dg1"  FontSize="13">
                    <DataGrid.Columns>
                        <DataGridTextColumn  IsReadOnly="True"  Header="序号" Binding="{Binding RowNumber}"></DataGridTextColumn>
                        <DataGridTextColumn  Header="库位" MaxWidth="120" Binding="{Binding StoreCode}"></DataGridTextColumn>
                        <DataGridTextColumn  Header="物料编码" MaxWidth="150" Binding="{Binding MatCode}"></DataGridTextColumn>
                        <DataGridTextColumn  Header="物料名称" MaxWidth="150" Binding="{Binding MatName}"></DataGridTextColumn>
                        <DataGridTextColumn  Header="数量" Binding="{Binding MatQty}"></DataGridTextColumn>
                        <DataGridTextColumn  Header="物料规格" MaxWidth="150" Binding="{Binding MatSpec}"></DataGridTextColumn>
                        <DataGridTextColumn  Header="物料批次" MaxWidth="150" Binding="{Binding MatBatch}"></DataGridTextColumn>
                        <DataGridTextColumn  Header="物料SN" MaxWidth="150" Binding="{Binding MatSN}"></DataGridTextColumn>
                        <DataGridTextColumn  Header="是否已发" MaxWidth="100" Binding="{Binding IsSended}"></DataGridTextColumn>
                        <DataGridTextColumn  Header="操作人" MaxWidth="150" Binding="{Binding OpUser}"></DataGridTextColumn>
                    </DataGrid.Columns>
                </DataGrid>
            </Grid>

            <StackPanel Margin="5" x:Name="spacingPanel" Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
                <Button Margin="5" Content="确认" FontSize="18" Click="closeClick"/>
            </StackPanel>
        </Grid>
    </Border>
</hc:Window>
