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.

104 lines
5.0 KiB
XML

<Window
x:Class="XGLFinishPro.Views.LanJu_Material"
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:local="clr-namespace:XGLFinishPro.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:hc="https://handyorg.github.io/handycontrol"
Width="1920"
Height="800"
mc:Ignorable="d" Loaded="Window_Loaded" WindowStartupLocation="CenterScreen" WindowStyle="None">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<hc:ThemeResources />
<hc:Theme />
</ResourceDictionary.MergedDictionaries>
<Style x:Key="CustomCellStyle" TargetType="DataGridCell">
<Setter Property="Foreground" Value="Black" />
<Setter Property="TextBlock.TextAlignment" Value="Center" />
<Setter Property="TextBlock.FontSize" Value="22" />
</Style>
</ResourceDictionary>
</Window.Resources>
<Viewbox Stretch="Fill">
<Canvas
Width="1920"
Height="800"
Background="#F2F3F5">
<Grid
Width="1920"
Height="800"
Margin="0">
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label
Grid.Row="0"
Width="175"
Height="37"
Margin="25,20,0,25"
HorizontalAlignment="Left"
VerticalAlignment="Center">
<TextBlock
FontSize="22"
FontWeight="Bold"
Text="工单物料" />
</Label>
<Button
Grid.Row="0"
Width="90"
Height="44"
Margin="0,20,25,25"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Background="#2B7EE6" Click="Button_Click">
<TextBlock
FontSize="20"
Foreground="White"
Text="关闭" />
</Button>
<DataGrid
x:Name="dgMaterialInfo"
Grid.Row="1"
Width="1870"
Height="612"
Margin="25,0"
LoadingRow="DataGrid_LoadingRow"
CellStyle="{StaticResource CustomCellStyle}"
HeadersVisibility="Column"
AutoGenerateColumns="False" FontSize="20" IsReadOnly="True" CanUserAddRows="False" VerticalContentAlignment="Center" HorizontalContentAlignment="Center">
<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>
<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="Left" VerticalAlignment="Center" Margin="10,0,0,0"></TextBlock>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Width="250" Header="物料编码" Binding="{Binding material_code}" />
<DataGridTextColumn Width="550" Header="物料名称" Binding="{Binding material_name}" />
<DataGridTextColumn Width="250" Header="规格型号" Binding="{Binding product_spc}" />
<DataGridTextColumn Width="250" Header="数量" Binding="{Binding quantity}" />
<DataGridTextColumn Width="250" Header="备货单单号" Binding="{Binding workorder_code}" />
<DataGridTextColumn Width="*" Header="是否准备完成" Binding="{Binding material_code}" Visibility="Collapsed"/>
</DataGrid.Columns>
</DataGrid>
</Grid>
</Canvas>
</Viewbox>
</Window>