20240717
parent
702649c670
commit
464524d845
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,81 @@
|
||||
<Window x:Class="Khd.Core.Wpf.TaskForm.Inventory.InventoryTaskEditForm"
|
||||
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:local="clr-namespace:Khd.Core.Wpf.TaskForm.Inventory"
|
||||
mc:Ignorable="d"
|
||||
Background="#333333"
|
||||
Closed="Window_Closed"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
WindowStyle="None"
|
||||
Loaded="Window_Loaded"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Height="450" Width="800">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="7*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<TextBlock Text="料箱号:" FontSize="30" Foreground="White" />
|
||||
<TextBlock x:Name="ContainerNo" FontSize="30" Foreground="White" Margin="5,0,0,0"/>
|
||||
</StackPanel>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border BorderBrush="White" BorderThickness="2" CornerRadius="5" Padding="10">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="5*" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="该物料原库存信息" FontSize="24" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
<TextBlock x:Name="MaterialSpec" Grid.Row="1" FontSize="16" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="Wrap" MaxWidth="400"/>
|
||||
<Grid Grid.Row="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="6*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="条码" FontSize="16" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
<TextBlock Text="数量" FontSize="16" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="2"/>
|
||||
<TextBlock x:Name="BarCode" Grid.Row="1" FontSize="16" Foreground="White" VerticalAlignment="Top" HorizontalAlignment="Center" TextWrapping="Wrap"/>
|
||||
<TextBlock x:Name="Count" Grid.Column="2" Grid.Row="1" FontSize="16" Foreground="White" VerticalAlignment="Top" HorizontalAlignment="Center" TextWrapping="Wrap"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
<Border BorderBrush="White" Grid.Column="1" BorderThickness="2" CornerRadius="5" Padding="10">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="6*" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="该物料新库存信息" FontSize="24" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="1">
|
||||
<TextBox x:Name="NewBarCode" Width="250" FontSize="20" hc:InfoElement.Placeholder="请扫描条码" Style="{StaticResource TextBoxExtend}" />
|
||||
<RepeatButton x:Name="ScanButton" Content="添加" Style="{StaticResource RepeatButtonPrimary}" Width="100" Margin="20,0,0,0" Click="ScanButton_Click" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Vertical" Grid.Row="2" Margin="0,20,0,0">
|
||||
<GroupBox Height="200" Header="条码" Padding="10">
|
||||
<Border Background="{DynamicResource RegionBrush}" CornerRadius="4">
|
||||
<TextBlock x:Name="BarCodeList" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</Border>
|
||||
</GroupBox>
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,20,0,0">
|
||||
<Button x:Name="SaveButton" Content="保存" Style="{StaticResource ButtonPrimary}" Width="100" Click="SaveButton_Click" />
|
||||
<Button x:Name="CancelButton" Content="取消" Style="{StaticResource ButtonPrimary}" Width="100" Margin="20,0,0,0" Click="CancelButton_Click" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
||||
@ -0,0 +1,120 @@
|
||||
<Window x:Class="Khd.Core.Wpf.TaskForm.InventoryTaskForm"
|
||||
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:local="clr-namespace:Khd.Core.Wpf.TaskForm"
|
||||
mc:Ignorable="d"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
Background="#333333"
|
||||
Loaded="Window_Loaded"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Height="900" Width="1500">
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<!--<hc:ThemeResources/>
|
||||
<hc:Theme/>-->
|
||||
<ResourceDictionary Source="/CSS/SearchBtnClass.xaml" />
|
||||
<ResourceDictionary Source="/CSS/SearchTextClass.xaml" />
|
||||
<ResourceDictionary Source="/CSS/DataGridClass.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<Style x:Key="dgCell" TargetType="TextBlock" BasedOn="{x:Null}">
|
||||
<Setter Property="TextAlignment" Value="Center" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Orientation="Horizontal" Margin="5">
|
||||
<TextBlock Text="请选择容器编号:" FontSize="30" Foreground="White" VerticalAlignment="Center"/>
|
||||
<ComboBox x:Name="ContainerCodeBox" IsEditable="True" Style="{StaticResource ComboBoxExtend}" Width="300" hc:InfoElement.Placeholder="容器编码" hc:InfoElement.TitlePlacement="Left" hc:InfoElement.Necessary="True" FontSize="30" />
|
||||
<Button x:Name="SearchBtn" Content="搜索" FontSize="30" Height="50" Foreground="White" Width="100" Background="#2196F3" Margin="10,0,0,0" Click="SearchBtn_Click"/>
|
||||
</StackPanel>
|
||||
<DataGrid
|
||||
Style="{StaticResource DataGridStyle}"
|
||||
Grid.Row="1"
|
||||
x:Name="InventoryDataGrid"
|
||||
AlternationCount="2"
|
||||
AutoGenerateColumns="False"
|
||||
MinRowHeight="50"
|
||||
Background="Transparent"
|
||||
CanUserAddRows="False"
|
||||
GridLinesVisibility="None"
|
||||
CanUserReorderColumns="False"
|
||||
CanUserResizeColumns="False"
|
||||
CanUserResizeRows="False"
|
||||
Focusable="False"
|
||||
HeadersVisibility="Column"
|
||||
IsReadOnly="True"
|
||||
VerticalAlignment="Stretch"
|
||||
RowHeaderWidth="0"
|
||||
SelectionMode="Single" FontSize="16"
|
||||
Visibility="Visible"
|
||||
>
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="库位号" Binding="{Binding LocationCode}" ElementStyle="{StaticResource dgCell}" Width="200*"/>
|
||||
<DataGridTextColumn Header="料箱号" Binding="{Binding ContainerNo}" ElementStyle="{StaticResource dgCell}" Width="200*"/>
|
||||
<DataGridTextColumn Header="物料编码" Binding="{Binding MaterialId}" ElementStyle="{StaticResource dgCell}" Width="120*"/>
|
||||
<DataGridTemplateColumn
|
||||
Width="350*"
|
||||
CanUserSort="False"
|
||||
Header="物料描述"
|
||||
IsReadOnly="True" >
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding MaterialName}" ToolTip="{Binding MaterialName}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20" />
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTextColumn Header="库存数量" Binding="{Binding StockAmount}" ElementStyle="{StaticResource dgCell}" Width="120*"/>
|
||||
<DataGridTextColumn Header="实际数量" Binding="{Binding RealAmount}" ElementStyle="{StaticResource dgCell}" Width="120*"/>
|
||||
<DataGridTemplateColumn Header="操作">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Content="编辑" Foreground="White" Width="75" Background="#2196F3" Click="EditBtn_Click"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
<DataGrid.CellStyle>
|
||||
<Style TargetType="{x:Type DataGridCell}">
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="Background" Value="#333333" />
|
||||
</Style>
|
||||
|
||||
</DataGrid.CellStyle>
|
||||
<DataGrid.RowStyle>
|
||||
<Style TargetType="{x:Type DataGridRow}">
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
<Setter Property="Background" Value="#333333" />
|
||||
</Style>
|
||||
</DataGrid.RowStyle>
|
||||
<DataGrid.RowHeaderStyle>
|
||||
<Style TargetType="{x:Type DataGridRowHeader}">
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="Background" Value="#333333" />
|
||||
|
||||
</Style>
|
||||
</DataGrid.RowHeaderStyle>
|
||||
<DataGrid.ColumnHeaderStyle>
|
||||
<Style TargetType="{x:Type DataGridColumnHeader}">
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="Background" Value="#333333" />
|
||||
<Setter Property="Margin" Value="0,0,0,0" />
|
||||
<Setter Property="BorderThickness" Value="5" />
|
||||
<Setter Property="BorderBrush" Value="#333333" />
|
||||
<Setter Property="FontSize" Value="20" />
|
||||
</Style>
|
||||
</DataGrid.ColumnHeaderStyle>
|
||||
</DataGrid>
|
||||
</Grid>
|
||||
</Window>
|
||||
Loading…
Reference in New Issue