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.
172 lines
12 KiB
XML
172 lines
12 KiB
XML
<Window x:Class="Aucma.Core.PrintTo.Views.SupplementPrintPageView"
|
|
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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
xmlns:local="clr-namespace:Aucma.Core.PrintTo.Views"
|
|
mc:Ignorable="d"
|
|
Background="#0C4CA3"
|
|
Title="条码补打" d:DesignHeight="600"
|
|
d:DesignWidth="1000">
|
|
|
|
<Window.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>
|
|
<Style TargetType="DataGrid">
|
|
<!--网格线颜色-->
|
|
<Setter Property="CanUserResizeColumns" Value="false"/>
|
|
<Setter Property="Background" Value="#1152AC" />
|
|
<Setter Property="BorderBrush" Value="#4285DE" />
|
|
<Setter Property="Foreground" Value="White"/>
|
|
<Setter Property="HorizontalGridLinesBrush">
|
|
<Setter.Value>
|
|
<SolidColorBrush Color="#4285DE"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="VerticalGridLinesBrush">
|
|
<Setter.Value>
|
|
<SolidColorBrush Color="#1152AC"/>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<!--列头标题栏样式-->
|
|
<Style TargetType="DataGridColumnHeader">
|
|
<!--<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>-->
|
|
<!--<Setter Property="Background" Value="#dddddd"/>
|
|
<Setter Property="Foreground" Value="Black"/>-->
|
|
<!--<Setter Property="BorderThickness" Value="1" />-->
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
<Setter Property="BorderBrush" Value="#dddddd" />
|
|
|
|
<Setter Property="Background" Value="#4285DE"/>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
</Style>
|
|
|
|
<!--单元格样式-->
|
|
<Style TargetType="DataGridCell">
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<Setter Property="BorderBrush" Value="Gray" />
|
|
<Setter Property="Height" Value="40"/>
|
|
<Setter Property="FontSize" Value="18"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type DataGridCell}">
|
|
<Grid Background="{TemplateBinding Background}" >
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter Property="Background" Value="#4285DE"/>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
|
|
</Style>
|
|
</Window.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="auto" VerticalAlignment="Center" Foreground="White" />
|
|
<TextBox x:Name="queryParam" Text="" PreviewMouseDown="queryParam_PreviewMouseDown" Style="{x:Null}" Width="200" HorizontalAlignment="Left" VerticalContentAlignment="Center" />
|
|
<Button Content="查询" Margin="9,0,4,0" Width="100" Command="{Binding QueryBarCodeCommand}" CommandParameter="{Binding ElementName=queryParam,Path=Text}"/>
|
|
</WrapPanel>
|
|
<UniformGrid Grid.Row="1" Margin="5 5 0 0" x:Name="HeightPanel">
|
|
<DataGrid x:Name="dgvMH" Height="{Binding Path=ActualHeight, ElementName=HeightPanel}" LoadingRow="dgvMH_LoadingRow"
|
|
HorizontalAlignment="Center" VerticalAlignment="Top" AlternationCount="2" RowHeaderWidth="0"
|
|
ItemsSource="{Binding Datalist}" ColumnWidth="*" AutoGenerateColumns="False" IsReadOnly="True" CanUserAddRows="False" SelectionMode="Single"
|
|
SelectedItem="{Binding SelectedCells, Mode=OneWayToSource}">
|
|
<DataGrid.Columns>
|
|
<DataGridTemplateColumn Width="55" Header="序号" >
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock Text="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow}}, Path=Header}" FontSize="18" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="10,0,0,0"></TextBlock>
|
|
</DataTemplate>
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
</DataGridTemplateColumn>
|
|
<DataGridTextColumn Width="*" Binding="{Binding ID}" Header="主键" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" Visibility="Collapsed" />
|
|
<DataGridTextColumn Width="*" Binding="{Binding OrderCode}" Header="订单号" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}" />
|
|
<DataGridTextColumn Width="1.5*" Binding="{Binding BarCode}" Header="物料条码" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
|
|
<DataGridTextColumn Width="1.5*" Binding="{Binding MaterialCode}" Header="物料编码" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
|
|
<DataGridTextColumn Width="2*" Binding="{Binding MaterialName}" Header="物料名称" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
|
|
<DataGridTextColumn Width="1*" Binding="{Binding PrintName}" Header="打印名称" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
|
|
<DataGridTextColumn Width="*" Binding="{Binding PrintTime ,StringFormat=\{0:yy-MM-dd HH:mm\}}" Header="打印时间" ElementStyle="{StaticResource DataGridTextColumnCenterSytle}"/>
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
</UniformGrid>
|
|
</Grid>
|
|
</Border>
|
|
</UniformGrid>
|
|
<UniformGrid Grid.Column="1" Margin="10 5 3 3">
|
|
<Border BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto"/>
|
|
<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 15">
|
|
<TextBlock Text="订单编码" FontSize="18" Foreground="white" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
<TextBox x:Name="ProductNo" Foreground="white" Text="{Binding SelectedItem.OrderCode, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="250"
|
|
materialDesign:HintAssist.Hint="订单编码" BorderBrush="White" />
|
|
</WrapPanel>
|
|
<WrapPanel Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
|
|
<TextBlock Text="物料编码" FontSize="18" Foreground="white" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
<TextBox x:Name="MaterialCode" Foreground="white" Text="{Binding SelectedItem.MaterialCode, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="250"
|
|
materialDesign:HintAssist.Hint="物料编码" BorderBrush="White" />
|
|
</WrapPanel>
|
|
<WrapPanel Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
|
|
<TextBlock Text="物料名称" FontSize="18" Foreground="white" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
<TextBox x:Name="MaterialName" Foreground="white" Text="{Binding SelectedItem.MaterialName, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="250"
|
|
materialDesign:HintAssist.Hint="物料名称" BorderBrush="White" />
|
|
</WrapPanel>
|
|
|
|
<WrapPanel Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
|
|
<TextBlock Text="打印条码" FontSize="18" Foreground="white" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
<TextBox x:Name="BarCode" Foreground="white" Text="{Binding SelectedItem.BarCode, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="250"
|
|
materialDesign:HintAssist.Hint="打印条码" BorderBrush="White" />
|
|
</WrapPanel>
|
|
<WrapPanel Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15">
|
|
<TextBlock Text="打印名称" FontSize="18" Foreground="white" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
<TextBox x:Name="PrintName" Foreground="white" Text="{Binding SelectedItem.PrintName, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="250"
|
|
materialDesign:HintAssist.Hint="打印名称" BorderBrush="White" />
|
|
</WrapPanel>
|
|
<WrapPanel Grid.Row="5" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 15" Visibility="Collapsed">
|
|
<TextBlock Text="打印主键" FontSize="18" Foreground="white" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
<TextBox x:Name="PrimaryKey" Foreground="white" Text="{Binding SelectedItem.ID, ElementName=dgvMH}" IsReadOnly="True" Margin="15 0 0 0 " FontSize="18" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="250" BorderBrush="White" />
|
|
</WrapPanel>
|
|
<WrapPanel Grid.Row="6" HorizontalAlignment="Center">
|
|
<Button
|
|
materialDesign:RippleAssist.IsDisabled="True"
|
|
Content="打印" Margin="0 0" Height="40" Command="{Binding PrintCommand}" CommandParameter="{Binding ElementName=PrimaryKey,Path=Text}"/>
|
|
</WrapPanel>
|
|
</Grid>
|
|
</Border>
|
|
</UniformGrid>
|
|
</Grid>
|
|
</Window>
|