2026-05-06 15:30:31 +08:00
|
|
|
|
<UserControl x:Class="YY.Admin.Views.WeightRecord.WeightRecordOperationView"
|
|
|
|
|
|
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">
|
|
|
|
|
|
|
|
|
|
|
|
<UserControl.Resources>
|
|
|
|
|
|
<!-- 深色工业风面板背景 -->
|
|
|
|
|
|
<SolidColorBrush x:Key="PanelDarkBrush" Color="#1a1a2e"/>
|
|
|
|
|
|
<SolidColorBrush x:Key="WeightGreenBrush" Color="#00e676"/>
|
|
|
|
|
|
<SolidColorBrush x:Key="WeightOrangeBrush" Color="#ff9800"/>
|
|
|
|
|
|
<SolidColorBrush x:Key="SerialConnectedBrush" Color="#4caf50"/>
|
|
|
|
|
|
<SolidColorBrush x:Key="SerialDisconnectedBrush" Color="#f44336"/>
|
|
|
|
|
|
<SolidColorBrush x:Key="SectionBorderBrush" Color="#1890ff"/>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 分组标题样式(左侧蓝色色条) -->
|
|
|
|
|
|
<Style x:Key="SectionTitleStyle" TargetType="TextBlock">
|
|
|
|
|
|
<Setter Property="FontSize" Value="14"/>
|
|
|
|
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
<Setter Property="Margin" Value="10,0,0,0"/>
|
|
|
|
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 分组容器样式 -->
|
|
|
|
|
|
<Style x:Key="SectionBorderStyle" TargetType="Border">
|
|
|
|
|
|
<Setter Property="CornerRadius" Value="8"/>
|
|
|
|
|
|
<Setter Property="Background" Value="{DynamicResource ThirdlyRegionBrush}"/>
|
|
|
|
|
|
<Setter Property="Padding" Value="16"/>
|
|
|
|
|
|
<Setter Property="Margin" Value="0,0,0,12"/>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 采集按钮样式 -->
|
|
|
|
|
|
<Style x:Key="CaptureButtonStyle" TargetType="Button" BasedOn="{StaticResource ButtonSuccess}">
|
|
|
|
|
|
<Setter Property="Height" Value="36"/>
|
|
|
|
|
|
<Setter Property="Padding" Value="16,0"/>
|
|
|
|
|
|
<Setter Property="FontSize" Value="13"/>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
<Style x:Key="CaptureGrossButtonStyle" TargetType="Button" BasedOn="{StaticResource ButtonPrimary}">
|
|
|
|
|
|
<Setter Property="Height" Value="36"/>
|
|
|
|
|
|
<Setter Property="Padding" Value="16,0"/>
|
|
|
|
|
|
<Setter Property="FontSize" Value="13"/>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 已采集标签样式 -->
|
|
|
|
|
|
<Style x:Key="CapturedTagStyle" TargetType="Border">
|
|
|
|
|
|
<Setter Property="Background" Value="#4caf50"/>
|
|
|
|
|
|
<Setter Property="CornerRadius" Value="4"/>
|
|
|
|
|
|
<Setter Property="Padding" Value="10,4"/>
|
|
|
|
|
|
<Setter Property="Height" Value="36"/>
|
|
|
|
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</UserControl.Resources>
|
|
|
|
|
|
|
|
|
|
|
|
<Grid>
|
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
|
<!-- 标题区 -->
|
|
|
|
|
|
<RowDefinition Height="70"/>
|
|
|
|
|
|
<!-- 主体区 -->
|
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
|
<!-- 操作栏 -->
|
|
|
|
|
|
<RowDefinition Height="64"/>
|
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ══════════════════════ Row 0: 页面标题区 ══════════════════════ -->
|
|
|
|
|
|
<Border Grid.Row="0" Background="{DynamicResource RegionBrush}"
|
|
|
|
|
|
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
|
|
|
|
|
|
<Grid Margin="20,0">
|
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 左侧标题 -->
|
|
|
|
|
|
<StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center">
|
|
|
|
|
|
<Border Width="40" Height="40" CornerRadius="8" Background="{DynamicResource PrimaryBrush}" Margin="0,0,12,0">
|
|
|
|
|
|
<md:PackIcon Kind="ScaleBalance" Width="22" Height="22" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<StackPanel VerticalAlignment="Center">
|
|
|
|
|
|
<TextBlock Text="地磅称重操作" FontSize="18" FontWeight="Bold" Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
<TextBlock Text="实时称重数据录入" FontSize="12" Foreground="{DynamicResource SecondaryTextBrush}"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 右侧状态 -->
|
|
|
|
|
|
<StackPanel Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,8,0">
|
|
|
|
|
|
<!-- 串口状态 -->
|
|
|
|
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,20,0">
|
|
|
|
|
|
<Ellipse Width="10" Height="10" VerticalAlignment="Center" Margin="0,0,6,0">
|
|
|
|
|
|
<Ellipse.Style>
|
|
|
|
|
|
<Style TargetType="Ellipse">
|
|
|
|
|
|
<Setter Property="Fill" Value="{StaticResource SerialDisconnectedBrush}"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding IsSerialConnected}" Value="True">
|
|
|
|
|
|
<Setter Property="Fill" Value="{StaticResource SerialConnectedBrush}"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</Ellipse.Style>
|
|
|
|
|
|
</Ellipse>
|
|
|
|
|
|
<TextBlock Text="{Binding SerialStatusText}" FontSize="13"
|
|
|
|
|
|
Foreground="{DynamicResource SecondaryTextBrush}" VerticalAlignment="Center"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ══════════════════════ Row 1: 主体区(左监控 + 右表单) ══════════════════════ -->
|
|
|
|
|
|
<Grid Grid.Row="1" Margin="16,12,16,0">
|
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
|
<ColumnDefinition Width="2.2*"/>
|
|
|
|
|
|
<ColumnDefinition Width="12"/>
|
|
|
|
|
|
<ColumnDefinition Width="3*"/>
|
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ───── 左侧:实时监控面板 ───── -->
|
|
|
|
|
|
<ScrollViewer Grid.Column="0" VerticalScrollBarVisibility="Auto">
|
|
|
|
|
|
<StackPanel>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 实时重量显示 -->
|
|
|
|
|
|
<Border Style="{StaticResource SectionBorderStyle}">
|
|
|
|
|
|
<StackPanel>
|
|
|
|
|
|
<!-- 分组标题 -->
|
|
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="0,0,0,12">
|
|
|
|
|
|
<Border Width="4" Height="18" CornerRadius="2" Background="{StaticResource SectionBorderBrush}"/>
|
|
|
|
|
|
<TextBlock Text="实时重量" Style="{StaticResource SectionTitleStyle}"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 大屏重量显示 -->
|
|
|
|
|
|
<Border CornerRadius="12" Background="{StaticResource PanelDarkBrush}" Padding="16,20">
|
|
|
|
|
|
<StackPanel HorizontalAlignment="Center">
|
|
|
|
|
|
<!-- 重量数字 -->
|
|
|
|
|
|
<TextBlock Text="{Binding CurrentWeightDisplay}" FontFamily="Consolas"
|
|
|
|
|
|
FontSize="52" FontWeight="Bold" HorizontalAlignment="Center">
|
|
|
|
|
|
<TextBlock.Style>
|
|
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
|
|
<Setter Property="Foreground" Value="{StaticResource WeightGreenBrush}"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding IsWeightStable}" Value="False">
|
|
|
|
|
|
<Setter Property="Foreground" Value="{StaticResource WeightOrangeBrush}"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
<DataTrigger Binding="{Binding IsSerialConnected}" Value="False">
|
|
|
|
|
|
<Setter Property="Foreground" Value="#666"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</TextBlock.Style>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
<TextBlock Text="kg" FontFamily="Consolas" FontSize="22" HorizontalAlignment="Center"
|
|
|
|
|
|
Foreground="#888" Margin="0,0,0,8"/>
|
|
|
|
|
|
<!-- 稳定状态 -->
|
|
|
|
|
|
<Border CornerRadius="12" Padding="12,4" HorizontalAlignment="Center">
|
|
|
|
|
|
<Border.Style>
|
|
|
|
|
|
<Style TargetType="Border">
|
|
|
|
|
|
<Setter Property="Background" Value="#33ff9800"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding IsWeightStable}" Value="True">
|
|
|
|
|
|
<Setter Property="Background" Value="#3300e676"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</Border.Style>
|
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
|
|
<Ellipse Width="8" Height="8" VerticalAlignment="Center" Margin="0,0,6,0">
|
|
|
|
|
|
<Ellipse.Style>
|
|
|
|
|
|
<Style TargetType="Ellipse">
|
|
|
|
|
|
<Setter Property="Fill" Value="{StaticResource WeightOrangeBrush}"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding IsWeightStable}" Value="True">
|
|
|
|
|
|
<Setter Property="Fill" Value="{StaticResource WeightGreenBrush}"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</Ellipse.Style>
|
|
|
|
|
|
</Ellipse>
|
|
|
|
|
|
<TextBlock VerticalAlignment="Center" FontSize="13">
|
|
|
|
|
|
<TextBlock.Style>
|
|
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
|
|
<Setter Property="Text" Value="数据波动中"/>
|
|
|
|
|
|
<Setter Property="Foreground" Value="{StaticResource WeightOrangeBrush}"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding IsWeightStable}" Value="True">
|
|
|
|
|
|
<Setter Property="Text" Value="数据稳定"/>
|
|
|
|
|
|
<Setter Property="Foreground" Value="{StaticResource WeightGreenBrush}"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</TextBlock.Style>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 车牌识别 -->
|
|
|
|
|
|
<Border Style="{StaticResource SectionBorderStyle}">
|
|
|
|
|
|
<StackPanel>
|
|
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="0,0,0,12">
|
|
|
|
|
|
<Border Width="4" Height="18" CornerRadius="2" Background="{StaticResource SectionBorderBrush}"/>
|
|
|
|
|
|
<TextBlock Text="车牌识别" Style="{StaticResource SectionTitleStyle}"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 车牌显示区 -->
|
|
|
|
|
|
<Border CornerRadius="8" Padding="12,10" MinHeight="60">
|
|
|
|
|
|
<Border.Style>
|
|
|
|
|
|
<Style TargetType="Border">
|
|
|
|
|
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding HasPlate}" Value="True">
|
|
|
|
|
|
<Setter Property="Background" Value="#0D1890FF"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</Border.Style>
|
|
|
|
|
|
<Grid>
|
|
|
|
|
|
<!-- 未识别提示 -->
|
|
|
|
|
|
<TextBlock Text="等待车辆进入识别区域..." FontSize="13"
|
|
|
|
|
|
Foreground="{DynamicResource SecondaryTextBrush}"
|
|
|
|
|
|
HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
|
|
|
|
<TextBlock.Style>
|
|
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding HasPlate}" Value="True">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</TextBlock.Style>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 车牌样式(仿中国车牌) -->
|
|
|
|
|
|
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
|
|
|
|
<StackPanel.Style>
|
|
|
|
|
|
<Style TargetType="StackPanel">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding HasPlate}" Value="True">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</StackPanel.Style>
|
|
|
|
|
|
<Border Background="#003880" CornerRadius="6" Padding="16,8">
|
|
|
|
|
|
<TextBlock Text="{Binding DetectedPlate}" FontSize="28" FontWeight="Bold"
|
|
|
|
|
|
Foreground="White" FontFamily="Consolas"
|
|
|
|
|
|
HorizontalAlignment="Center"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Button Content="使用此车牌" Command="{Binding UseDetectedPlateCommand}"
|
|
|
|
|
|
Style="{StaticResource ButtonPrimary}"
|
|
|
|
|
|
Height="32" Margin="0,8,0,0" FontSize="12"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 操作日志 -->
|
|
|
|
|
|
<Border Style="{StaticResource SectionBorderStyle}">
|
|
|
|
|
|
<StackPanel>
|
|
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
|
|
|
|
|
|
<Border Width="4" Height="18" CornerRadius="2" Background="{StaticResource SectionBorderBrush}"/>
|
|
|
|
|
|
<TextBlock Text="操作日志" Style="{StaticResource SectionTitleStyle}"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
<ItemsControl ItemsSource="{Binding OperationLogs}">
|
|
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
|
<TextBlock Text="{Binding}" FontSize="12" Foreground="{DynamicResource SecondaryTextBrush}"
|
|
|
|
|
|
Margin="0,2" FontFamily="Consolas" TextWrapping="NoWrap"/>
|
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
|
|
</ItemsControl>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</ScrollViewer>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ───── 分隔线 ───── -->
|
|
|
|
|
|
<Border Grid.Column="1" Width="1" Background="{DynamicResource BorderBrush}" Margin="0,0,0,0"/>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ───── 右侧:信息录入表单 ───── -->
|
|
|
|
|
|
<Grid Grid.Column="2">
|
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 基本信息 -->
|
|
|
|
|
|
<Border Grid.Row="0" Style="{StaticResource SectionBorderStyle}" Margin="0,0,0,6" Padding="12,10">
|
|
|
|
|
|
<StackPanel>
|
|
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="0,0,0,6">
|
|
|
|
|
|
<Border Width="4" Height="18" CornerRadius="2" Background="{StaticResource SectionBorderBrush}"/>
|
|
|
|
|
|
<TextBlock Text="基本信息" Style="{StaticResource SectionTitleStyle}"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
<hc:Row Gutter="10">
|
|
|
|
|
|
<!-- 称重日期 -->
|
|
|
|
|
|
<hc:Col Span="12">
|
|
|
|
|
|
<hc:DatePicker SelectedDate="{Binding WeighDate}"
|
|
|
|
|
|
hc:InfoElement.Title="称重日期"
|
|
|
|
|
|
hc:InfoElement.TitleWidth="75"
|
|
|
|
|
|
hc:InfoElement.TitlePlacement="Left"
|
|
|
|
|
|
hc:InfoElement.Necessary="True"
|
|
|
|
|
|
hc:InfoElement.Symbol="*"
|
|
|
|
|
|
Margin="0,0,0,8"/>
|
|
|
|
|
|
</hc:Col>
|
|
|
|
|
|
<!-- 进出方向 -->
|
|
|
|
|
|
<hc:Col Span="12">
|
|
|
|
|
|
<hc:ComboBox SelectedValuePath="Value"
|
|
|
|
|
|
DisplayMemberPath="Key"
|
|
|
|
|
|
ItemsSource="{Binding InoutDirectionOptions}"
|
|
|
|
|
|
SelectedValue="{Binding InoutDirection}"
|
|
|
|
|
|
hc:InfoElement.Title="进出方向"
|
|
|
|
|
|
hc:InfoElement.TitleWidth="75"
|
|
|
|
|
|
hc:InfoElement.TitlePlacement="Left"
|
|
|
|
|
|
hc:InfoElement.Necessary="True"
|
|
|
|
|
|
hc:InfoElement.Symbol="*"
|
|
|
|
|
|
Margin="0,0,0,8"/>
|
|
|
|
|
|
</hc:Col>
|
|
|
|
|
|
<!-- 车牌号 -->
|
|
|
|
|
|
<hc:Col Span="24">
|
|
|
|
|
|
<hc:TextBox Text="{Binding PlateNumber, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
|
IsReadOnly="{Binding IsPlateNumberLocked}"
|
|
|
|
|
|
hc:InfoElement.Title="车牌号"
|
|
|
|
|
|
hc:InfoElement.TitleWidth="75"
|
|
|
|
|
|
hc:InfoElement.TitlePlacement="Left"
|
|
|
|
|
|
hc:InfoElement.Placeholder="手动输入或点击「使用此车牌」"
|
|
|
|
|
|
hc:InfoElement.Necessary="True"
|
|
|
|
|
|
hc:InfoElement.Symbol="*"
|
|
|
|
|
|
hc:InfoElement.ShowClearButton="True"
|
|
|
|
|
|
Margin="0,0,0,8"/>
|
|
|
|
|
|
</hc:Col>
|
|
|
|
|
|
<!-- 车辆档案匹配状态 -->
|
|
|
|
|
|
<hc:Col Span="24">
|
|
|
|
|
|
<hc:Col.Style>
|
|
|
|
|
|
<Style TargetType="hc:Col">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding ShowVehicleMatchHint}" Value="True">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</hc:Col.Style>
|
|
|
|
|
|
<Border CornerRadius="4" Padding="10,5" Margin="0,-6,0,8">
|
|
|
|
|
|
<Border.Style>
|
|
|
|
|
|
<Style TargetType="Border">
|
|
|
|
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding VehicleLookupStatus}" Value="Matched">
|
|
|
|
|
|
<Setter Property="Background" Value="#0D4caf50"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
<DataTrigger Binding="{Binding VehicleLookupStatus}" Value="NotFound">
|
|
|
|
|
|
<Setter Property="Background" Value="#0Dff9800"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
<DataTrigger Binding="{Binding VehicleLookupStatus}" Value="Searching">
|
|
|
|
|
|
<Setter Property="Background" Value="#0D1890ff"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</Border.Style>
|
|
|
|
|
|
<TextBlock Text="{Binding VehicleMatchText}" FontSize="12">
|
|
|
|
|
|
<TextBlock.Style>
|
|
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SecondaryTextBrush}"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding VehicleLookupStatus}" Value="Matched">
|
|
|
|
|
|
<Setter Property="Foreground" Value="#4caf50"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
<DataTrigger Binding="{Binding VehicleLookupStatus}" Value="NotFound">
|
|
|
|
|
|
<Setter Property="Foreground" Value="#ff9800"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
<DataTrigger Binding="{Binding VehicleLookupStatus}" Value="Searching">
|
|
|
|
|
|
<Setter Property="Foreground" Value="#1890ff"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</TextBlock.Style>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
</hc:Col>
|
|
|
|
|
|
<!-- 发货单位(供应商弹窗选择) -->
|
|
|
|
|
|
<hc:Col Span="24">
|
|
|
|
|
|
<Grid Margin="0,0,0,8">
|
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
|
<ColumnDefinition Width="75"/>
|
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
|
<ColumnDefinition Width="60"/>
|
|
|
|
|
|
<ColumnDefinition Width="32"/>
|
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
<TextBlock Grid.Column="0" Text="发货单位" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="14" Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
<Border Grid.Column="1" CornerRadius="4" Height="32"
|
|
|
|
|
|
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1"
|
|
|
|
|
|
Background="{DynamicResource ThirdlyRegionBrush}">
|
|
|
|
|
|
<TextBlock Text="{Binding SenderUnitDisplay}" VerticalAlignment="Center"
|
|
|
|
|
|
Margin="8,0" FontSize="13" TextTrimming="CharacterEllipsis">
|
|
|
|
|
|
<TextBlock.Style>
|
|
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SecondaryTextBrush}"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding HasSelectedSupplier}" Value="True">
|
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</TextBlock.Style>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Button Grid.Column="2" Content="选 择"
|
|
|
|
|
|
Command="{Binding OpenSupplierPickerCommand}"
|
|
|
|
|
|
Style="{StaticResource ButtonPrimary}"
|
|
|
|
|
|
Height="32" Margin="6,0,0,0" FontSize="12"/>
|
|
|
|
|
|
<Button Grid.Column="3" Command="{Binding ClearSupplierCommand}"
|
|
|
|
|
|
Style="{StaticResource ButtonIcon}"
|
|
|
|
|
|
Height="32" Width="28" Margin="4,0,0,0" Padding="0"
|
|
|
|
|
|
ToolTip="清除选择"
|
|
|
|
|
|
Foreground="{DynamicResource SecondaryTextBrush}"
|
|
|
|
|
|
hc:IconElement.Geometry="{StaticResource ErrorGeometry}"/>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</hc:Col>
|
|
|
|
|
|
<!-- 收货单位(客户弹窗选择) -->
|
|
|
|
|
|
<hc:Col Span="24">
|
|
|
|
|
|
<Grid Margin="0,0,0,8">
|
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
|
<ColumnDefinition Width="75"/>
|
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
|
<ColumnDefinition Width="60"/>
|
|
|
|
|
|
<ColumnDefinition Width="32"/>
|
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
<TextBlock Grid.Column="0" Text="收货单位" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="14" Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
<Border Grid.Column="1" CornerRadius="4" Height="32"
|
|
|
|
|
|
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1"
|
|
|
|
|
|
Background="{DynamicResource ThirdlyRegionBrush}">
|
|
|
|
|
|
<TextBlock Text="{Binding ReceiverUnitDisplay}" VerticalAlignment="Center"
|
|
|
|
|
|
Margin="8,0" FontSize="13" TextTrimming="CharacterEllipsis">
|
|
|
|
|
|
<TextBlock.Style>
|
|
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SecondaryTextBrush}"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding HasSelectedCustomer}" Value="True">
|
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</TextBlock.Style>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Button Grid.Column="2" Content="选 择"
|
|
|
|
|
|
Command="{Binding OpenCustomerPickerCommand}"
|
|
|
|
|
|
Style="{StaticResource ButtonSuccess}"
|
|
|
|
|
|
Height="32" Margin="6,0,0,0" FontSize="12"/>
|
|
|
|
|
|
<Button Grid.Column="3" Command="{Binding ClearCustomerCommand}"
|
|
|
|
|
|
Style="{StaticResource ButtonIcon}"
|
|
|
|
|
|
Height="32" Width="28" Margin="4,0,0,0" Padding="0"
|
|
|
|
|
|
ToolTip="清除选择"
|
|
|
|
|
|
Foreground="{DynamicResource SecondaryTextBrush}"
|
|
|
|
|
|
hc:IconElement.Geometry="{StaticResource ErrorGeometry}"/>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</hc:Col>
|
2026-05-07 17:53:48 +08:00
|
|
|
|
<!-- 密炼物料选择 -->
|
|
|
|
|
|
<hc:Col Span="24">
|
|
|
|
|
|
<Grid Margin="0,0,0,8">
|
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
|
<ColumnDefinition Width="75"/>
|
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
|
<ColumnDefinition Width="56"/>
|
|
|
|
|
|
<ColumnDefinition Width="60"/>
|
|
|
|
|
|
<ColumnDefinition Width="32"/>
|
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
<TextBlock Grid.Column="0" Text="密炼物料" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="14" Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
<Border Grid.Column="1" CornerRadius="4" Height="32"
|
|
|
|
|
|
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1"
|
|
|
|
|
|
Background="{DynamicResource ThirdlyRegionBrush}">
|
|
|
|
|
|
<TextBox Text="{Binding MixerMaterialNames, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
|
IsReadOnly="{Binding IsMixerMaterialReadOnly}"
|
|
|
|
|
|
VerticalContentAlignment="Center"
|
|
|
|
|
|
Margin="8,0"
|
|
|
|
|
|
BorderThickness="0"
|
|
|
|
|
|
Background="Transparent"
|
|
|
|
|
|
FontSize="13"
|
|
|
|
|
|
ToolTip="勾选“手动”可直接输入密炼物料名称"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<CheckBox Grid.Column="2" Content="手动"
|
|
|
|
|
|
IsChecked="{Binding IsMixerMaterialManual}"
|
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
|
HorizontalAlignment="Center"/>
|
|
|
|
|
|
<Button Grid.Column="3" Content="选 择"
|
|
|
|
|
|
Command="{Binding OpenMixerMaterialPickerCommand}"
|
|
|
|
|
|
Style="{StaticResource ButtonDefault}"
|
|
|
|
|
|
Height="32" Margin="6,0,0,0" FontSize="12"/>
|
|
|
|
|
|
<Button Grid.Column="4" Command="{Binding ClearMixerMaterialCommand}"
|
|
|
|
|
|
Style="{StaticResource ButtonIcon}"
|
|
|
|
|
|
Height="32" Width="28" Margin="4,0,0,0" Padding="0"
|
|
|
|
|
|
ToolTip="清除选择"
|
|
|
|
|
|
Foreground="{DynamicResource SecondaryTextBrush}"
|
|
|
|
|
|
hc:IconElement.Geometry="{StaticResource ErrorGeometry}"/>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</hc:Col>
|
2026-05-06 15:30:31 +08:00
|
|
|
|
<!-- 司机 -->
|
|
|
|
|
|
<hc:Col Span="12">
|
|
|
|
|
|
<hc:TextBox Text="{Binding DriverName, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
|
hc:InfoElement.Title="司机姓名"
|
|
|
|
|
|
hc:InfoElement.TitleWidth="75"
|
|
|
|
|
|
hc:InfoElement.TitlePlacement="Left"
|
|
|
|
|
|
hc:InfoElement.Placeholder="司机姓名"
|
|
|
|
|
|
hc:InfoElement.ShowClearButton="True"
|
|
|
|
|
|
Margin="0,0,0,0"/>
|
|
|
|
|
|
</hc:Col>
|
|
|
|
|
|
<!-- 手机号 -->
|
|
|
|
|
|
<hc:Col Span="12">
|
|
|
|
|
|
<hc:TextBox Text="{Binding DriverPhone, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
|
hc:InfoElement.Title="手机号码"
|
|
|
|
|
|
hc:InfoElement.TitleWidth="75"
|
|
|
|
|
|
hc:InfoElement.TitlePlacement="Left"
|
|
|
|
|
|
hc:InfoElement.Placeholder="手机号码"
|
|
|
|
|
|
hc:InfoElement.ShowClearButton="True"
|
|
|
|
|
|
Margin="0,0,0,0"/>
|
|
|
|
|
|
</hc:Col>
|
|
|
|
|
|
</hc:Row>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 重量信息 -->
|
|
|
|
|
|
<Border Grid.Row="1" Style="{StaticResource SectionBorderStyle}" Margin="0,0,0,0" Padding="12,10">
|
2026-05-06 16:24:59 +08:00
|
|
|
|
<Grid>
|
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
|
</Grid.RowDefinitions>
|
2026-05-18 15:55:11 +08:00
|
|
|
|
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="0,0,0,4" VerticalAlignment="Center">
|
2026-05-06 15:30:31 +08:00
|
|
|
|
<Border Width="4" Height="18" CornerRadius="2" Background="{StaticResource SectionBorderBrush}"/>
|
|
|
|
|
|
<TextBlock Text="重量信息" Style="{StaticResource SectionTitleStyle}"/>
|
2026-05-18 15:55:11 +08:00
|
|
|
|
<CheckBox Margin="16,0,0,0" VerticalAlignment="Center"
|
|
|
|
|
|
Content="手动输入重量"
|
|
|
|
|
|
IsChecked="{Binding IsManualWeightEntry, Mode=TwoWay}"/>
|
|
|
|
|
|
<TextBlock Margin="8,0,0,0" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="11" Foreground="#ff9800" Text="(仅限测试)"/>
|
2026-05-06 15:30:31 +08:00
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 毛重 / 皮重并排 -->
|
2026-05-06 16:24:59 +08:00
|
|
|
|
<Grid Grid.Row="1" Margin="0,0,0,8">
|
2026-05-06 15:30:31 +08:00
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
|
<ColumnDefinition Width="16"/>
|
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 毛重 -->
|
|
|
|
|
|
<StackPanel>
|
|
|
|
|
|
<StackPanel.Style>
|
|
|
|
|
|
<Style TargetType="StackPanel">
|
|
|
|
|
|
<Setter Property="Grid.Column" Value="0"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding InoutDirection}" Value="2">
|
|
|
|
|
|
<Setter Property="Grid.Column" Value="2"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</StackPanel.Style>
|
|
|
|
|
|
<TextBlock Text="毛 重(KG)" FontSize="12" Foreground="{DynamicResource SecondaryTextBrush}"
|
|
|
|
|
|
Margin="0,0,0,4" HorizontalAlignment="Center"/>
|
|
|
|
|
|
<Border CornerRadius="8" Padding="10,10" Background="{DynamicResource RegionBrush}">
|
2026-05-18 15:55:11 +08:00
|
|
|
|
<Grid MinHeight="40">
|
|
|
|
|
|
<TextBlock HorizontalAlignment="Center" FontSize="20" FontWeight="Bold"
|
|
|
|
|
|
FontFamily="Consolas" VerticalAlignment="Center">
|
|
|
|
|
|
<TextBlock.Text>
|
|
|
|
|
|
<Binding Path="GrossWeight" StringFormat="N2" TargetNullValue="—"/>
|
|
|
|
|
|
</TextBlock.Text>
|
|
|
|
|
|
<TextBlock.Style>
|
|
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SecondaryTextBrush}"/>
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding GrossWeightCaptured}" Value="True">
|
|
|
|
|
|
<Setter Property="Foreground" Value="#4caf50"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
<DataTrigger Binding="{Binding IsManualWeightEntry}" Value="True">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</TextBlock.Style>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
<hc:NumericUpDown Value="{Binding GrossWeight, Mode=TwoWay}"
|
|
|
|
|
|
Minimum="0"
|
|
|
|
|
|
DecimalPlaces="2"
|
|
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
|
|
VerticalAlignment="Center">
|
|
|
|
|
|
<hc:NumericUpDown.Style>
|
|
|
|
|
|
<Style TargetType="hc:NumericUpDown" BasedOn="{StaticResource NumericUpDownPlus}">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding IsManualWeightEntry}" Value="True">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</hc:NumericUpDown.Style>
|
|
|
|
|
|
</hc:NumericUpDown>
|
|
|
|
|
|
</Grid>
|
2026-05-06 15:30:31 +08:00
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Margin="0,6,0,0" Height="32" CornerRadius="6">
|
|
|
|
|
|
<Border.Style>
|
|
|
|
|
|
<Style TargetType="Border">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding GrossWeightCaptured}" Value="True">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
<Setter Property="Background" Value="#1A4caf50"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</Border.Style>
|
|
|
|
|
|
<TextBlock Text="✓ 已采集" Foreground="#4caf50" FontSize="13"
|
|
|
|
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Button Command="{Binding CaptureGrossWeightCommand}"
|
|
|
|
|
|
Margin="0,6,0,0"
|
|
|
|
|
|
HorizontalAlignment="Stretch">
|
|
|
|
|
|
<Button.Style>
|
|
|
|
|
|
<Style TargetType="Button" BasedOn="{StaticResource CaptureGrossButtonStyle}">
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding GrossWeightCaptured}" Value="True">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</Button.Style>
|
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
|
|
<md:PackIcon Kind="Truck" VerticalAlignment="Center" Margin="0,0,6,0"/>
|
|
|
|
|
|
<TextBlock Text="{Binding CaptureGrossButtonText}" VerticalAlignment="Center"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 皮重 -->
|
|
|
|
|
|
<StackPanel>
|
|
|
|
|
|
<StackPanel.Style>
|
|
|
|
|
|
<Style TargetType="StackPanel">
|
|
|
|
|
|
<Setter Property="Grid.Column" Value="2"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding InoutDirection}" Value="2">
|
|
|
|
|
|
<Setter Property="Grid.Column" Value="0"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</StackPanel.Style>
|
|
|
|
|
|
<TextBlock Text="皮 重(KG)" FontSize="12" Foreground="{DynamicResource SecondaryTextBrush}"
|
|
|
|
|
|
Margin="0,0,0,4" HorizontalAlignment="Center"/>
|
|
|
|
|
|
<Border CornerRadius="8" Padding="10,10" Background="{DynamicResource RegionBrush}">
|
2026-05-18 15:55:11 +08:00
|
|
|
|
<Grid MinHeight="40">
|
|
|
|
|
|
<TextBlock HorizontalAlignment="Center" FontSize="20" FontWeight="Bold"
|
|
|
|
|
|
FontFamily="Consolas" VerticalAlignment="Center">
|
|
|
|
|
|
<TextBlock.Text>
|
|
|
|
|
|
<Binding Path="TareWeight" StringFormat="N2" TargetNullValue="—"/>
|
|
|
|
|
|
</TextBlock.Text>
|
|
|
|
|
|
<TextBlock.Style>
|
|
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SecondaryTextBrush}"/>
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding TareWeightCaptured}" Value="True">
|
|
|
|
|
|
<Setter Property="Foreground" Value="#4caf50"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
<DataTrigger Binding="{Binding IsManualWeightEntry}" Value="True">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</TextBlock.Style>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
<hc:NumericUpDown Value="{Binding TareWeight, Mode=TwoWay}"
|
|
|
|
|
|
Minimum="0"
|
|
|
|
|
|
DecimalPlaces="2"
|
|
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
|
|
VerticalAlignment="Center">
|
|
|
|
|
|
<hc:NumericUpDown.Style>
|
|
|
|
|
|
<Style TargetType="hc:NumericUpDown" BasedOn="{StaticResource NumericUpDownPlus}">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding IsManualWeightEntry}" Value="True">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</hc:NumericUpDown.Style>
|
|
|
|
|
|
</hc:NumericUpDown>
|
|
|
|
|
|
</Grid>
|
2026-05-06 15:30:31 +08:00
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Margin="0,6,0,0" Height="32" CornerRadius="6">
|
|
|
|
|
|
<Border.Style>
|
|
|
|
|
|
<Style TargetType="Border">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding TareWeightCaptured}" Value="True">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
<Setter Property="Background" Value="#1A4caf50"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</Border.Style>
|
|
|
|
|
|
<TextBlock Text="✓ 已采集" Foreground="#4caf50" FontSize="13"
|
|
|
|
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Button Command="{Binding CaptureTareWeightCommand}"
|
|
|
|
|
|
Margin="0,6,0,0"
|
|
|
|
|
|
HorizontalAlignment="Stretch">
|
|
|
|
|
|
<Button.Style>
|
|
|
|
|
|
<Style TargetType="Button" BasedOn="{StaticResource CaptureButtonStyle}">
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding TareWeightCaptured}" Value="True">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</Button.Style>
|
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
|
|
<md:PackIcon Kind="TruckOutline" VerticalAlignment="Center" Margin="0,0,6,0"/>
|
|
|
|
|
|
<TextBlock Text="{Binding CaptureTareButtonText}" VerticalAlignment="Center"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 净重展示(横贯全宽) -->
|
2026-05-06 16:24:59 +08:00
|
|
|
|
<StackPanel Grid.Row="2" Margin="0,2,0,0">
|
2026-05-06 15:30:31 +08:00
|
|
|
|
<TextBlock Text="净 重 = 毛重 - 皮重 (KG)" FontSize="12"
|
|
|
|
|
|
Foreground="{DynamicResource SecondaryTextBrush}"
|
|
|
|
|
|
Margin="0,0,0,6" HorizontalAlignment="Center"/>
|
|
|
|
|
|
<Border CornerRadius="10" Padding="12,10" Background="#0D52c41a"
|
|
|
|
|
|
BorderBrush="#52c41a" BorderThickness="1.5">
|
|
|
|
|
|
<TextBlock Text="{Binding NetWeightDisplay}" FontSize="28" FontWeight="Bold"
|
|
|
|
|
|
FontFamily="Consolas" HorizontalAlignment="Center"
|
|
|
|
|
|
Foreground="#52c41a"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 最近称重榜单 -->
|
2026-05-06 16:24:59 +08:00
|
|
|
|
<Grid Grid.Row="3" Margin="0,8,0,0">
|
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
<TextBlock Grid.Row="0" Text="最近称重榜单"
|
2026-05-06 15:30:31 +08:00
|
|
|
|
FontSize="12"
|
|
|
|
|
|
Foreground="{DynamicResource SecondaryTextBrush}"
|
|
|
|
|
|
Margin="0,0,0,6"/>
|
2026-05-06 16:24:59 +08:00
|
|
|
|
<Border Grid.Row="1" CornerRadius="8"
|
2026-05-06 15:30:31 +08:00
|
|
|
|
Background="White"
|
|
|
|
|
|
BorderBrush="{DynamicResource BorderBrush}"
|
|
|
|
|
|
BorderThickness="1"
|
|
|
|
|
|
Padding="8,6">
|
|
|
|
|
|
<DataGrid ItemsSource="{Binding RecentWeightRecords}"
|
|
|
|
|
|
SelectedItem="{Binding SelectedRecentWeightRecord}"
|
|
|
|
|
|
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="White"
|
|
|
|
|
|
RowHeight="26"
|
|
|
|
|
|
ColumnHeaderHeight="28"
|
|
|
|
|
|
RowHeaderWidth="0"
|
|
|
|
|
|
MinHeight="80"
|
2026-05-06 16:24:59 +08:00
|
|
|
|
VerticalScrollBarVisibility="Auto">
|
2026-05-06 15:30:31 +08:00
|
|
|
|
<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="#FFEAF3FF"/>
|
|
|
|
|
|
<Setter Property="Foreground" Value="#1F1F1F"/>
|
|
|
|
|
|
<Setter Property="BorderBrush" Value="#FFD6E8FF"/>
|
|
|
|
|
|
</Trigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</DataGrid.RowStyle>
|
|
|
|
|
|
<DataGrid.CellStyle>
|
|
|
|
|
|
<Style TargetType="DataGridCell">
|
|
|
|
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
|
|
|
|
<Setter Property="Foreground" Value="#262626"/>
|
|
|
|
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<Trigger Property="IsSelected" Value="True">
|
|
|
|
|
|
<Setter Property="Background" Value="#FFEAF3FF"/>
|
|
|
|
|
|
<Setter Property="Foreground" Value="#1F1F1F"/>
|
|
|
|
|
|
</Trigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</DataGrid.CellStyle>
|
|
|
|
|
|
<DataGrid.Columns>
|
|
|
|
|
|
<DataGridTextColumn Header="榜单号" Binding="{Binding BillNo}" Width="2.2*"/>
|
|
|
|
|
|
<DataGridTextColumn Header="车辆" Binding="{Binding PlateNumber}" Width="1.3*"/>
|
|
|
|
|
|
<DataGridTextColumn Header="首称重量(KG)" Binding="{Binding FirstWeightDisplay}" Width="1*"/>
|
|
|
|
|
|
</DataGrid.Columns>
|
|
|
|
|
|
</DataGrid>
|
|
|
|
|
|
</Border>
|
2026-05-06 16:24:59 +08:00
|
|
|
|
</Grid>
|
|
|
|
|
|
</Grid>
|
2026-05-06 15:30:31 +08:00
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ══════════════════════ Row 2: 底部操作栏 ══════════════════════ -->
|
|
|
|
|
|
<Border Grid.Row="2" Background="{DynamicResource RegionBrush}"
|
|
|
|
|
|
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,1,0,0">
|
|
|
|
|
|
<Grid Margin="20,0">
|
|
|
|
|
|
<!-- 清空按钮(左) -->
|
|
|
|
|
|
<Button HorizontalAlignment="Left" VerticalAlignment="Center"
|
|
|
|
|
|
Command="{Binding ClearCommand}"
|
|
|
|
|
|
Style="{StaticResource ButtonDefault}"
|
|
|
|
|
|
Height="40" Padding="20,0">
|
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
|
|
<md:PackIcon Kind="TrashCanOutline" VerticalAlignment="Center" Margin="0,0,6,0"/>
|
|
|
|
|
|
<TextBlock Text="清空表单" VerticalAlignment="Center"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 保存按钮(右) -->
|
|
|
|
|
|
<Button HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
|
|
|
|
Command="{Binding SaveCommand}"
|
|
|
|
|
|
Style="{StaticResource ButtonSuccess}"
|
|
|
|
|
|
Height="40" Padding="28,0" FontSize="15">
|
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
|
|
<md:PackIcon Kind="ContentSave" VerticalAlignment="Center" Margin="0,0,8,0" Width="20" Height="20"/>
|
|
|
|
|
|
<TextBlock Text="保 存 记 录" VerticalAlignment="Center" FontWeight="SemiBold"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</UserControl>
|