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.

133 lines
10 KiB
XML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<UserControl x:Class="Admin.Core.Wpf.Views.IndexPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:local="clr-namespace:Admin.Core.Wpf.Views"
mc:Ignorable="d"
Background="#F4F4F4"
d:DesignHeight="900"
d:DesignWidth="800">
<UserControl.Resources>
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style x:Key="ColumnHeaderStyle" TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
</Style>
</UserControl.Resources>
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.8*"/>
<ColumnDefinition />
</Grid.ColumnDefinitions>
<UniformGrid Grid.Column="0" Margin="3" >
<Border BorderBrush="#0288d1" BorderThickness="1" Padding="5" CornerRadius="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition />
</Grid.RowDefinitions>
<WrapPanel Grid.Row="0" Margin="5 5 0 0">
<Label Content="查询条件" Width="60" VerticalAlignment="Center" />
<TextBox x:Name="queryParam" Text="" Style="{x:Null}" Width="200" HorizontalAlignment="Left" VerticalContentAlignment="Center" />
<Button Content="查询" Margin="9,0,4,0" Width="100" Command="{Binding QueryStringCommand}" CommandParameter="{Binding ElementName=queryParam,Path=Text}">
</Button>
</WrapPanel>
<UniformGrid Grid.Row="1" Margin="5 5 0 0" x:Name="HeightPanel">
<!--
AlternationCount="2" 表示两行交替显示背景色;
AutoGenerateColumns="False" 表示不让DataGrid自动生成列。如果设置成true则效果 多出了不需要的列;
HorizontalAlignment="Left" 不显示多余的空白列;
-->
<DataGrid x:Name="dgvMH" Height="{Binding Path=ActualHeight, ElementName=HeightPanel}"
HorizontalAlignment="Center" VerticalAlignment="Top" AlternationCount="2"
ItemsSource="{Binding Datalist}" ColumnWidth="*" AutoGenerateColumns="False" IsReadOnly="True" CanUserAddRows="False" SelectionMode="Single"
SelectedItem="{Binding SelectedCells, Mode=OneWayToSource}">
<DataGrid.Columns>
<DataGridTextColumn MinWidth="110" Binding="{Binding plan_code}" Header="计划编号" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
<DataGridTextColumn MinWidth="160" Binding="{Binding created_time}" Header="订单日期" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="110" Binding="{Binding material_code}" Header="物料编号" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="200" Binding="{Binding material_name}" Header="物料名称" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="100" Binding="{Binding plan_amount}" Header="订单量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="100" Binding="{Binding CompleteNum}" Header="完成量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="100" Binding="{Binding ErrorNum}" Header="异常量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="120" Binding="{Binding linerCodeNum}" Header="内胆码已打量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn MinWidth="120" Binding="{Binding BoxCodeNum}" Header="背板码已打量" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
</DataGrid.Columns>
</DataGrid>
</UniformGrid>
</Grid>
</Border>
</UniformGrid>
<UniformGrid Grid.Column="1" Margin="0 5 3 3">
<Border BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5">
<Grid Margin="0 30">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<WrapPanel Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0">
<TextBlock Text="订单编码" FontSize="15" Foreground="Gray" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox Grid.Row="0" x:Name="PlanCode" Text="{Binding SelectedItem.plan_code, ElementName=dgvMH}" IsReadOnly="True" FontSize="15" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Margin="15 0 0 0" MinWidth="400"
materialDesign:HintAssist.Hint="订单编码" />
</WrapPanel>
<WrapPanel Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
<TextBlock Text="物料编码" FontSize="15" Foreground="Gray" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="OrderNo" Text="{Binding SelectedItem.material_code, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0 " FontSize="15" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="{Binding Path=ActualWidth, ElementName=PlanCode}"
materialDesign:HintAssist.Hint="物料编码" />
</WrapPanel>
<WrapPanel Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
<TextBlock Text="物料名称" FontSize="15" Foreground="Gray" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="MaterialName" Text="{Binding SelectedItem.material_name, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0" FontSize="15" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="{Binding Path=ActualWidth, ElementName=PlanCode}"
materialDesign:HintAssist.Hint="物料名称" />
</WrapPanel>
<WrapPanel Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
<TextBlock Text="订单编码" FontSize="15" Foreground="Gray" HorizontalAlignment="Center" VerticalAlignment="Center" />
<TextBox x:Name="PlanAmount" Text="{Binding SelectedItem.plan_amount, ElementName=dgvMH}" Margin="15 0 0 0" materialDesign:HintAssist.Hint="打印数量" FontSize="15" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="{Binding Path=ActualWidth, ElementName=PlanCode}"
/>
</WrapPanel>
<GroupBox Grid.Row="4" Margin="30 10" Header="快速查询" Height="200" x:Name="GroupPanel">
<StackPanel >
<WrapPanel Height="120">
<RadioButton Content="内胆" Foreground="Gray" FontSize="15" x:Name="Liner" Margin="5 5" Command="{Binding RadioQueryCommand}" CommandParameter="{Binding ElementName=PlanCode}"/>
<RadioButton Content="箱壳" Foreground="Gray" FontSize="15" x:Name="BoxShell" Margin="5 5" Command="{Binding RadioQueryCommand}" CommandParameter="{Binding Name,ElementName=BoxShell}"/>
</WrapPanel>
<Button Content="添加" Style="{x:Null}" Foreground="White" BorderBrush="#0288d1" Background="#0288d1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Height="20" Width="30"/>
</StackPanel>
</GroupBox>
<WrapPanel Grid.Row="5" HorizontalAlignment="Center">
<Button
materialDesign:RippleAssist.IsDisabled="True"
Content="打印" Margin="0 0" Command="{Binding PrintCommand}" CommandParameter="{Binding ElementName=PlanCode,Path=Text}"/>
<Button
materialDesign:RippleAssist.IsDisabled="True"
Content="补打" Margin="10 0 0 0" Command="{Binding SupplementPrintCommand}"
IsEnabled="{Binding DataContext.ControlsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" CommandParameter="{Binding ElementName=PlanCode,Path=Text}"/>
<Button
materialDesign:RippleAssist.IsDisabled="True"
Content="续打" Margin="10 0 0 0" Command="{Binding SupplementPrintCommand}"
IsEnabled="{Binding DataContext.ControlsEnabled, RelativeSource={RelativeSource FindAncestor, AncestorType=Window}}" CommandParameter="{Binding ElementName=PlanCode,Path=Text}"/>
</WrapPanel>
</Grid>
</Border>
</UniformGrid>
</Grid>
</UserControl>