2026-05-09 18:25:34 +08:00
|
|
|
<UserControl x:Class="YY.Admin.Views.RawMaterialEntry.WeightRecordPickerDialogView"
|
|
|
|
|
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:hc="https://handyorg.github.io/handycontrol"
|
|
|
|
|
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
|
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
|
|
|
prism:ViewModelLocator.AutoWireViewModel="True"
|
|
|
|
|
mc:Ignorable="d"
|
|
|
|
|
Width="760">
|
|
|
|
|
|
|
|
|
|
<Grid Background="{DynamicResource ThirdlyRegionBrush}">
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
<RowDefinition Height="360"/>
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
|
|
<hc:SimplePanel Margin="20,16,20,12">
|
|
|
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
|
|
|
|
<Border Width="32" Height="32" CornerRadius="6" Background="{DynamicResource PrimaryBrush}" Margin="0,0,10,0">
|
|
|
|
|
<md:PackIcon Kind="FileDocumentOutline" Width="18" Height="18" Foreground="White"
|
|
|
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
|
|
|
</Border>
|
|
|
|
|
<TextBlock Text="选择榜单号(自动带出供应商)" FontSize="16" FontWeight="SemiBold"
|
|
|
|
|
Foreground="{DynamicResource PrimaryTextBrush}" VerticalAlignment="Center"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<Button Width="22" Height="22" Command="hc:ControlCommands.Close"
|
|
|
|
|
Style="{StaticResource ButtonIcon}"
|
|
|
|
|
Foreground="{DynamicResource PrimaryBrush}"
|
|
|
|
|
hc:IconElement.Geometry="{StaticResource ErrorGeometry}"
|
|
|
|
|
Padding="0" HorizontalAlignment="Right" VerticalAlignment="Center"/>
|
|
|
|
|
</hc:SimplePanel>
|
|
|
|
|
|
|
|
|
|
<Border Grid.Row="1" Background="{DynamicResource RegionBrush}" Padding="16,10">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
<ColumnDefinition Width="80"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<hc:TextBox Text="{Binding SearchBillNo, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
hc:InfoElement.Placeholder="输入榜单号搜索..."
|
|
|
|
|
hc:InfoElement.ShowClearButton="True"
|
|
|
|
|
Margin="0,0,8,0">
|
|
|
|
|
<hc:TextBox.InputBindings>
|
|
|
|
|
<KeyBinding Key="Enter" Command="{Binding SearchCommand}"/>
|
|
|
|
|
</hc:TextBox.InputBindings>
|
|
|
|
|
</hc:TextBox>
|
|
|
|
|
<hc:TextBox Grid.Column="1"
|
|
|
|
|
Text="{Binding SearchPlateNumber, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
hc:InfoElement.Placeholder="输入车牌号搜索..."
|
|
|
|
|
hc:InfoElement.ShowClearButton="True"
|
|
|
|
|
Margin="0,0,8,0">
|
|
|
|
|
<hc:TextBox.InputBindings>
|
|
|
|
|
<KeyBinding Key="Enter" Command="{Binding SearchCommand}"/>
|
|
|
|
|
</hc:TextBox.InputBindings>
|
|
|
|
|
</hc:TextBox>
|
|
|
|
|
<Button Grid.Column="2" Command="{Binding SearchCommand}"
|
|
|
|
|
IsEnabled="{Binding IsLoading, Converter={StaticResource Boolean2BooleanReConverter}}"
|
|
|
|
|
Style="{StaticResource ButtonPrimary}" Height="32">
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
|
<md:PackIcon Kind="Magnify" Width="14" Height="14" VerticalAlignment="Center" Margin="0,0,4,0"/>
|
|
|
|
|
<TextBlock Text="搜索" FontSize="13" VerticalAlignment="Center"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Button>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
<DataGrid x:Name="WeightRecordsGrid"
|
|
|
|
|
Grid.Row="2"
|
|
|
|
|
Margin="16,8,16,0"
|
|
|
|
|
ItemsSource="{Binding Records}"
|
|
|
|
|
SelectedItem="{Binding SelectedRecord}"
|
|
|
|
|
AutoGenerateColumns="False"
|
|
|
|
|
CanUserAddRows="False"
|
|
|
|
|
CanUserDeleteRows="False"
|
|
|
|
|
CanUserResizeRows="False"
|
|
|
|
|
HeadersVisibility="Column"
|
|
|
|
|
SelectionMode="Single"
|
|
|
|
|
SelectionUnit="FullRow"
|
|
|
|
|
IsReadOnly="True"
|
|
|
|
|
GridLinesVisibility="Horizontal"
|
|
|
|
|
HorizontalGridLinesBrush="#FFEDEFF2"
|
|
|
|
|
VerticalGridLinesBrush="Transparent"
|
|
|
|
|
Background="White"
|
|
|
|
|
RowBackground="White"
|
|
|
|
|
AlternatingRowBackground="#FAFCFF"
|
|
|
|
|
RowHeight="32"
|
|
|
|
|
ColumnHeaderHeight="34"
|
|
|
|
|
RowHeaderWidth="0"
|
|
|
|
|
MouseDoubleClick="WeightRecordsGrid_MouseDoubleClick">
|
|
|
|
|
<DataGrid.Resources>
|
|
|
|
|
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#EAF3FF"/>
|
|
|
|
|
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="#1F1F1F"/>
|
|
|
|
|
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="#EAF3FF"/>
|
|
|
|
|
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="#1F1F1F"/>
|
|
|
|
|
</DataGrid.Resources>
|
|
|
|
|
<DataGrid.ColumnHeaderStyle>
|
|
|
|
|
<Style TargetType="DataGridColumnHeader">
|
|
|
|
|
<Setter Property="Background" Value="#F5F7FA"/>
|
|
|
|
|
<Setter Property="Foreground" Value="#606266"/>
|
|
|
|
|
<Setter Property="FontSize" Value="13"/>
|
|
|
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
|
|
|
<Setter Property="Padding" Value="8,0"/>
|
|
|
|
|
<Setter Property="BorderBrush" Value="#EBEEF5"/>
|
|
|
|
|
<Setter Property="BorderThickness" Value="0,0,0,1"/>
|
|
|
|
|
</Style>
|
|
|
|
|
</DataGrid.ColumnHeaderStyle>
|
|
|
|
|
<DataGrid.RowStyle>
|
|
|
|
|
<Style TargetType="DataGridRow">
|
|
|
|
|
<Setter Property="Background" Value="White"/>
|
|
|
|
|
<Setter Property="Foreground" Value="#262626"/>
|
|
|
|
|
<Setter Property="BorderBrush" Value="#FFEDEFF2"/>
|
|
|
|
|
<Setter Property="BorderThickness" Value="0,0,0,1"/>
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
<Trigger Property="IsSelected" Value="True">
|
|
|
|
|
<Setter Property="Background" Value="#EAF3FF"/>
|
|
|
|
|
<Setter Property="Foreground" Value="#1F1F1F"/>
|
|
|
|
|
<Setter Property="BorderBrush" Value="#D6E8FF"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
<Setter Property="Background" Value="#F5F9FF"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
</Style>
|
|
|
|
|
</DataGrid.RowStyle>
|
|
|
|
|
<DataGrid.CellStyle>
|
|
|
|
|
<Style TargetType="DataGridCell">
|
|
|
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
|
|
|
<Setter Property="Padding" Value="8,0"/>
|
|
|
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
|
|
|
|
</Style>
|
|
|
|
|
</DataGrid.CellStyle>
|
|
|
|
|
<DataGrid.Columns>
|
|
|
|
|
<DataGridTextColumn Header="榜单号" Binding="{Binding BillNo}" Width="180"/>
|
2026-05-12 14:06:07 +08:00
|
|
|
<DataGridTextColumn Header="车牌号" Binding="{Binding PlateNumber}" Width="100"/>
|
2026-05-09 18:25:34 +08:00
|
|
|
<DataGridTextColumn Header="供应商(发货单位)" Binding="{Binding SenderUnit}" Width="*"/>
|
2026-05-12 14:06:07 +08:00
|
|
|
<DataGridTextColumn Header="净重(KG)" Binding="{Binding NetWeight, StringFormat=N2}" Width="90"/>
|
|
|
|
|
<DataGridTextColumn Header="已入场(KG)" Binding="{Binding EnteredWeight, StringFormat=N2}" Width="100"/>
|
2026-06-02 16:28:51 +08:00
|
|
|
<DataGridTextColumn Header="货物皮重" Binding="{Binding CargoTareWeight, StringFormat=N2}" Width="90"/>
|
2026-05-12 14:06:07 +08:00
|
|
|
<DataGridTextColumn Header="称重日期" Binding="{Binding WeighDate, StringFormat='yyyy-MM-dd'}" Width="110"/>
|
2026-05-09 18:25:34 +08:00
|
|
|
</DataGrid.Columns>
|
|
|
|
|
</DataGrid>
|
|
|
|
|
|
|
|
|
|
<Border Grid.Row="3" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,1,0,0"
|
|
|
|
|
Padding="16,12">
|
|
|
|
|
<Grid>
|
|
|
|
|
<TextBlock VerticalAlignment="Center" FontSize="13" MaxWidth="420"
|
|
|
|
|
TextTrimming="CharacterEllipsis" HorizontalAlignment="Left"
|
|
|
|
|
Text="{Binding SelectedRecordDisplay}">
|
|
|
|
|
<TextBlock.Style>
|
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SecondaryTextBrush}"/>
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
<DataTrigger Binding="{Binding HasSelectedRecord}" Value="True">
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}"/>
|
|
|
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
</Style>
|
|
|
|
|
</TextBlock.Style>
|
|
|
|
|
</TextBlock>
|
|
|
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
|
|
|
|
<Button Content="取 消" Command="{Binding CancelCommand}"
|
|
|
|
|
Style="{StaticResource ButtonDefault}" Width="88" Margin="0,0,12,0" Height="34"/>
|
|
|
|
|
<Button Content="确认选择" Command="{Binding ConfirmCommand}"
|
|
|
|
|
Style="{StaticResource ButtonPrimary}" Width="100" Height="34"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
</Grid>
|
|
|
|
|
</UserControl>
|