2026-05-09 18:25:34 +08:00
|
|
|
|
<UserControl x:Class="YY.Admin.Views.RawMaterialEntry.RawMaterialEntryOperationView"
|
|
|
|
|
|
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"
|
2026-05-11 14:32:44 +08:00
|
|
|
|
xmlns:ctrls="clr-namespace:YY.Admin.Controls"
|
|
|
|
|
|
xmlns:core="clr-namespace:YY.Admin.Core.Entity;assembly=YY.Admin.Core"
|
2026-05-14 10:43:51 +08:00
|
|
|
|
xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
|
2026-05-09 18:25:34 +08:00
|
|
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
|
|
|
|
prism:ViewModelLocator.AutoWireViewModel="True"
|
|
|
|
|
|
mc:Ignorable="d">
|
|
|
|
|
|
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<UserControl.Resources>
|
|
|
|
|
|
<!-- 右侧今日列表:单选行选中态浅蓝背景 -->
|
|
|
|
|
|
<Style x:Key="TodayEntryListBoxItemStyle" TargetType="ListBoxItem">
|
|
|
|
|
|
<Setter Property="Padding" Value="0"/>
|
|
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
|
|
|
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
|
<ControlTemplate TargetType="ListBoxItem">
|
|
|
|
|
|
<Border x:Name="Bd" Background="{TemplateBinding Background}" Padding="6,4">
|
|
|
|
|
|
<ContentPresenter/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
|
<Setter TargetName="Bd" Property="Background" Value="#FFF5F5F5"/>
|
|
|
|
|
|
</Trigger>
|
|
|
|
|
|
<Trigger Property="IsSelected" Value="True">
|
|
|
|
|
|
<Setter TargetName="Bd" Property="Background" Value="#E3F2FD"/>
|
|
|
|
|
|
</Trigger>
|
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
|
</Setter>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</UserControl.Resources>
|
|
|
|
|
|
|
2026-05-09 18:25:34 +08:00
|
|
|
|
<Grid Style="{StaticResource BaseViewStyle}">
|
|
|
|
|
|
<Grid.RowDefinitions>
|
2026-05-14 10:43:51 +08:00
|
|
|
|
<RowDefinition Height="Auto"/>
|
2026-05-09 18:25:34 +08:00
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<Grid Grid.Row="0" Margin="24,16,24,12">
|
2026-05-09 18:25:34 +08:00
|
|
|
|
<TextBlock FontSize="18"
|
|
|
|
|
|
Foreground="{DynamicResource PrimaryTextBrush}"
|
2026-05-11 14:32:44 +08:00
|
|
|
|
Text="{Binding DialogTitle}"
|
2026-05-09 18:25:34 +08:00
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
|
|
VerticalAlignment="Center"/>
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<!-- 收起/展开与右侧列表分离:置于页头右上,与标题同行 -->
|
|
|
|
|
|
<!-- 显式绑定 UserControl.DataContext:避免页眉 DataContext 非本页 ViewModel 时 Toggle 无效 -->
|
|
|
|
|
|
<Button HorizontalAlignment="Right"
|
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
|
Command="{Binding DataContext.ToggleRightPanelCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
|
|
|
|
Click="ToggleTodayPanelButton_OnClick"
|
|
|
|
|
|
Padding="12,6"
|
|
|
|
|
|
FontSize="12"
|
|
|
|
|
|
MinHeight="32">
|
|
|
|
|
|
<Button.Style>
|
|
|
|
|
|
<Style TargetType="Button" BasedOn="{StaticResource ButtonDefault}">
|
|
|
|
|
|
<Setter Property="Content" Value="收起"/>
|
|
|
|
|
|
<Setter Property="ToolTip" Value="收起右侧「今日入场」列表"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding DataContext.IsRightPanelExpanded, RelativeSource={RelativeSource AncestorType=UserControl}}" Value="False">
|
|
|
|
|
|
<Setter Property="Content" Value="展开"/>
|
|
|
|
|
|
<Setter Property="ToolTip" Value="展开右侧「今日入场」列表"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</Button.Style>
|
|
|
|
|
|
</Button>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
2026-05-14 10:43:51 +08:00
|
|
|
|
<!-- 打印机:PrintDot 桥接器,与「打印模板」页一致 -->
|
|
|
|
|
|
<Border Grid.Row="1" Margin="24,0,24,8" Padding="0,4,0,4" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
|
|
|
|
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
|
|
|
|
|
<TextBlock Text="打印机:" VerticalAlignment="Center" FontSize="13" Foreground="#333333" Margin="0,0,8,0"/>
|
|
|
|
|
|
<ComboBox ItemsSource="{Binding Printers}"
|
|
|
|
|
|
SelectedItem="{Binding SelectedPrinter}"
|
|
|
|
|
|
DisplayMemberPath="Name"
|
|
|
|
|
|
MinWidth="220" Height="30"
|
|
|
|
|
|
VerticalContentAlignment="Center"
|
|
|
|
|
|
hc:InfoElement.Placeholder="请选择打印机"/>
|
|
|
|
|
|
<Button Command="{Binding RefreshPrintersCommand}"
|
|
|
|
|
|
Height="30" Padding="10,0" Margin="10,0,0,0"
|
|
|
|
|
|
FontSize="12"
|
|
|
|
|
|
Style="{StaticResource ButtonDefault}"
|
|
|
|
|
|
Content="刷新打印机"/>
|
|
|
|
|
|
<TextBlock Text="{Binding PrinterStatus}"
|
|
|
|
|
|
Margin="12,0,0,0"
|
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="12"
|
|
|
|
|
|
Foreground="{DynamicResource SecondaryTextBrush}"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
|
|
<Grid Grid.Row="2" x:Name="MainSplitRoot">
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
|
<ColumnDefinition Width="*" MinWidth="320"/>
|
|
|
|
|
|
<ColumnDefinition x:Name="SplitterCol" Width="4"/>
|
|
|
|
|
|
<ColumnDefinition x:Name="RightPaneCol" Width="280" MinWidth="0"/>
|
|
|
|
|
|
</Grid.ColumnDefinitions>
|
2026-05-09 18:25:34 +08:00
|
|
|
|
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<hc:ScrollViewer Grid.Column="0" IsInertiaEnabled="True" HorizontalScrollBarVisibility="Disabled">
|
2026-05-09 18:25:34 +08:00
|
|
|
|
<StackPanel x:Name="RootPanel" Margin="24,8,24,8">
|
2026-05-12 14:06:07 +08:00
|
|
|
|
<DockPanel Margin="0,0,0,6">
|
|
|
|
|
|
<Button DockPanel.Dock="Right"
|
|
|
|
|
|
Content="重置"
|
|
|
|
|
|
Command="{Binding ResetCommand}"
|
|
|
|
|
|
Style="{StaticResource ButtonDefault}"
|
|
|
|
|
|
Width="80" Height="28" FontSize="12"/>
|
|
|
|
|
|
<TextBlock Text="基础资料"
|
|
|
|
|
|
FontSize="13"
|
|
|
|
|
|
FontWeight="SemiBold"
|
|
|
|
|
|
Foreground="{DynamicResource PrimaryTextBrush}"
|
|
|
|
|
|
VerticalAlignment="Center"/>
|
|
|
|
|
|
</DockPanel>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 带横竖线的表格式表单;已打印时整体禁用(IsTotalWeightEditable=false),IsEnabled 向下继承到所有子控件 -->
|
|
|
|
|
|
<Border BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Margin="0,0,0,8"
|
|
|
|
|
|
IsEnabled="{Binding IsTotalWeightEditable}">
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<Grid>
|
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
|
<RowDefinition Height="36"/> <!-- 密炼物料 -->
|
|
|
|
|
|
<RowDefinition Height="38"/> <!-- 批次号 / 入场时间 -->
|
|
|
|
|
|
<RowDefinition Height="36"/> <!-- 榜单号 -->
|
|
|
|
|
|
<RowDefinition Height="36"/> <!-- 供料客户 / 供应商名称 -->
|
|
|
|
|
|
<RowDefinition Height="36"/> <!-- 厂家物料名称 / 保质期 -->
|
2026-05-12 14:06:07 +08:00
|
|
|
|
<RowDefinition Height="40"/> <!-- 总重 / 总份数 — 多 4px 给 NumericUpDown 上下间距,否则 spinner 箭头会被裁切 -->
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<RowDefinition Height="36"/> <!-- 每份总重 / 每份包数 -->
|
|
|
|
|
|
<RowDefinition Height="36"/> <!-- 库位 / 卸货人 -->
|
|
|
|
|
|
<RowDefinition Height="60"/> <!-- 备注 -->
|
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
|
<ColumnDefinition Width="90"/>
|
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
|
<ColumnDefinition Width="90"/>
|
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ===== Row 0: 密炼物料 ===== -->
|
|
|
|
|
|
<Border Grid.Row="0" Grid.Column="0"
|
|
|
|
|
|
Background="{DynamicResource SecondaryRegionBrush}"
|
|
|
|
|
|
BorderThickness="0,0,1,1" BorderBrush="{DynamicResource BorderBrush}">
|
|
|
|
|
|
<TextBlock Text="密炼物料" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="12" Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="3"
|
|
|
|
|
|
BorderThickness="0,0,0,1" BorderBrush="{DynamicResource BorderBrush}" Padding="6,0">
|
|
|
|
|
|
<Grid>
|
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
<TextBlock Grid.Column="0" Text="{Binding SelectedMaterialDisplay}"
|
|
|
|
|
|
VerticalAlignment="Center" FontSize="13" TextTrimming="CharacterEllipsis">
|
2026-05-09 18:25:34 +08:00
|
|
|
|
<TextBlock.Style>
|
|
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SecondaryTextBrush}"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding HasSelectedMaterial}" Value="True">
|
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</TextBlock.Style>
|
|
|
|
|
|
</TextBlock>
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<Button Grid.Column="1" Content="选 择"
|
|
|
|
|
|
Command="{Binding OpenMaterialPickerCommand}"
|
|
|
|
|
|
Style="{StaticResource ButtonPrimary}"
|
|
|
|
|
|
Height="26" Margin="6,0,0,0" FontSize="12" Padding="10,0"/>
|
|
|
|
|
|
<Button Grid.Column="2"
|
|
|
|
|
|
Command="{Binding ClearMaterialCommand}"
|
|
|
|
|
|
Style="{StaticResource ButtonIcon}"
|
|
|
|
|
|
Height="26" Width="24" Margin="4,0,0,0" Padding="0"
|
|
|
|
|
|
ToolTip="清除物料"
|
|
|
|
|
|
Foreground="{DynamicResource SecondaryTextBrush}"
|
|
|
|
|
|
hc:IconElement.Geometry="{StaticResource ErrorGeometry}"/>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Border>
|
2026-05-09 18:25:34 +08:00
|
|
|
|
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<!-- ===== Row 1: 批次号 / 入场时间 ===== -->
|
|
|
|
|
|
<Border Grid.Row="1" Grid.Column="0"
|
|
|
|
|
|
Background="{DynamicResource SecondaryRegionBrush}"
|
|
|
|
|
|
BorderThickness="0,0,1,1" BorderBrush="{DynamicResource BorderBrush}">
|
|
|
|
|
|
<TextBlock Text="批次号" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="12" Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Row="1" Grid.Column="1"
|
|
|
|
|
|
BorderThickness="0,0,1,1" BorderBrush="{DynamicResource BorderBrush}" Padding="6,0">
|
|
|
|
|
|
<TextBlock Text="{Binding Entry.BatchNo}" VerticalAlignment="Center" FontSize="13"
|
|
|
|
|
|
Foreground="{DynamicResource SecondaryTextBrush}" TextTrimming="CharacterEllipsis"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Row="1" Grid.Column="2"
|
|
|
|
|
|
Background="{DynamicResource SecondaryRegionBrush}"
|
|
|
|
|
|
BorderThickness="0,0,1,1" BorderBrush="{DynamicResource BorderBrush}">
|
|
|
|
|
|
<TextBlock Text="入场时间" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="12" Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Row="1" Grid.Column="3"
|
|
|
|
|
|
BorderThickness="0,0,0,1" BorderBrush="{DynamicResource BorderBrush}" Padding="4,3">
|
|
|
|
|
|
<!-- 自定义日期时间选择器:日历 + 时/分/秒 三列 + 此刻/确定 -->
|
|
|
|
|
|
<ctrls:DateTimeListPicker SelectedDateTime="{Binding Entry.EntryTime, Mode=TwoWay}"
|
|
|
|
|
|
DateTimeFormat="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
|
Placeholder="请选择入场时间"/>
|
|
|
|
|
|
</Border>
|
2026-05-09 18:25:34 +08:00
|
|
|
|
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<!-- ===== Row 2: 榜单号 ===== -->
|
|
|
|
|
|
<Border Grid.Row="2" Grid.Column="0"
|
|
|
|
|
|
Background="{DynamicResource SecondaryRegionBrush}"
|
|
|
|
|
|
BorderThickness="0,0,1,1" BorderBrush="{DynamicResource BorderBrush}">
|
|
|
|
|
|
<TextBlock Text="榜单号" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="12" Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="3"
|
|
|
|
|
|
BorderThickness="0,0,0,1" BorderBrush="{DynamicResource BorderBrush}" Padding="6,0">
|
|
|
|
|
|
<Grid>
|
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
<TextBlock Grid.Column="0" Text="{Binding Entry.BillNo}"
|
|
|
|
|
|
VerticalAlignment="Center" FontSize="13" TextTrimming="CharacterEllipsis"
|
2026-05-09 18:25:34 +08:00
|
|
|
|
Foreground="{DynamicResource PrimaryTextBrush}"/>
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<Button Grid.Column="1" Content="选 择"
|
|
|
|
|
|
Command="{Binding OpenWeightRecordPickerCommand}"
|
|
|
|
|
|
Style="{StaticResource ButtonPrimary}"
|
|
|
|
|
|
Height="26" Margin="6,0,0,0" FontSize="12" Padding="10,0"/>
|
|
|
|
|
|
<Button Grid.Column="2"
|
|
|
|
|
|
Command="{Binding ClearWeightRecordCommand}"
|
|
|
|
|
|
Style="{StaticResource ButtonIcon}"
|
|
|
|
|
|
Height="26" Width="24" Margin="4,0,0,0" Padding="0"
|
|
|
|
|
|
ToolTip="清除榜单"
|
|
|
|
|
|
Foreground="{DynamicResource SecondaryTextBrush}"
|
|
|
|
|
|
hc:IconElement.Geometry="{StaticResource ErrorGeometry}"/>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Border>
|
2026-05-09 18:25:34 +08:00
|
|
|
|
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<!-- ===== Row 3: 供料客户 / 供应商名称 ===== -->
|
|
|
|
|
|
<Border Grid.Row="3" Grid.Column="0"
|
|
|
|
|
|
Background="{DynamicResource SecondaryRegionBrush}"
|
|
|
|
|
|
BorderThickness="0,0,1,1" BorderBrush="{DynamicResource BorderBrush}">
|
|
|
|
|
|
<TextBlock Text="供料客户" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="12" Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Row="3" Grid.Column="1"
|
|
|
|
|
|
BorderThickness="0,0,1,1" BorderBrush="{DynamicResource BorderBrush}" Padding="4,0">
|
|
|
|
|
|
<Grid>
|
|
|
|
|
|
<TextBox Text="{Binding Entry.SupplyCustomer, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
|
VerticalContentAlignment="Center" BorderThickness="0" Background="Transparent"
|
|
|
|
|
|
FontSize="13" Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
<TextBlock IsHitTestVisible="False" VerticalAlignment="Center" Margin="4,0"
|
|
|
|
|
|
FontSize="13" Foreground="{DynamicResource SecondaryTextBrush}" Opacity="0.6"
|
|
|
|
|
|
Text="请填写供料客户">
|
|
|
|
|
|
<TextBlock.Style>
|
|
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding Entry.SupplyCustomer}" Value="">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
<DataTrigger Binding="{Binding Entry.SupplyCustomer}" Value="{x:Null}">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</TextBlock.Style>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Row="3" Grid.Column="2"
|
|
|
|
|
|
Background="{DynamicResource SecondaryRegionBrush}"
|
|
|
|
|
|
BorderThickness="0,0,1,1" BorderBrush="{DynamicResource BorderBrush}">
|
|
|
|
|
|
<TextBlock Text="供应商名称" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="12" Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Row="3" Grid.Column="3"
|
2026-05-12 14:06:07 +08:00
|
|
|
|
BorderThickness="0,0,0,1" BorderBrush="{DynamicResource BorderBrush}" Padding="6,0">
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<Grid>
|
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
<Grid Grid.Column="0">
|
|
|
|
|
|
<TextBox Text="{Binding Entry.SupplierName, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
|
VerticalContentAlignment="Center" BorderThickness="0" Background="Transparent"
|
|
|
|
|
|
FontSize="13" Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
<TextBlock IsHitTestVisible="False" VerticalAlignment="Center" Margin="4,0"
|
|
|
|
|
|
FontSize="13" Foreground="{DynamicResource SecondaryTextBrush}" Opacity="0.6"
|
|
|
|
|
|
Text="自动带出,或手动选择/填写">
|
|
|
|
|
|
<TextBlock.Style>
|
|
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding Entry.SupplierName}" Value="">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
<DataTrigger Binding="{Binding Entry.SupplierName}" Value="{x:Null}">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</TextBlock.Style>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
</Grid>
|
2026-05-12 14:06:07 +08:00
|
|
|
|
<!-- 与「密炼物料 / 榜单号」两行的「选择 + 清除」按钮参数完全一致:右端齐平 + 内外边距统一 -->
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<Button Grid.Column="1" Content="选 择"
|
|
|
|
|
|
Command="{Binding OpenSupplierPickerCommand}"
|
|
|
|
|
|
Style="{StaticResource ButtonPrimary}"
|
2026-05-12 14:06:07 +08:00
|
|
|
|
Height="26" Margin="6,0,0,0" FontSize="12" Padding="10,0"/>
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<Button Grid.Column="2"
|
|
|
|
|
|
Command="{Binding ClearSupplierCommand}"
|
|
|
|
|
|
Style="{StaticResource ButtonIcon}"
|
2026-05-12 14:06:07 +08:00
|
|
|
|
Height="26" Width="24" Margin="4,0,0,0" Padding="0"
|
2026-05-11 14:32:44 +08:00
|
|
|
|
ToolTip="清除供应商"
|
|
|
|
|
|
Foreground="{DynamicResource SecondaryTextBrush}"
|
|
|
|
|
|
hc:IconElement.Geometry="{StaticResource ErrorGeometry}"/>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Border>
|
2026-05-09 18:25:34 +08:00
|
|
|
|
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<!-- ===== Row 4: 厂家物料名称 / 保质期 ===== -->
|
|
|
|
|
|
<Border Grid.Row="4" Grid.Column="0"
|
|
|
|
|
|
Background="{DynamicResource SecondaryRegionBrush}"
|
|
|
|
|
|
BorderThickness="0,0,1,1" BorderBrush="{DynamicResource BorderBrush}">
|
|
|
|
|
|
<TextBlock Text="厂家物料名称" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="11" Foreground="{DynamicResource PrimaryTextBrush}"
|
|
|
|
|
|
TextWrapping="Wrap" TextAlignment="Center"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Row="4" Grid.Column="1"
|
|
|
|
|
|
BorderThickness="0,0,1,1" BorderBrush="{DynamicResource BorderBrush}" Padding="6,0">
|
|
|
|
|
|
<TextBlock Text="{Binding Entry.ManufacturerMaterialName}" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="13" Foreground="{DynamicResource SecondaryTextBrush}" TextTrimming="CharacterEllipsis"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Row="4" Grid.Column="2"
|
|
|
|
|
|
Background="{DynamicResource SecondaryRegionBrush}"
|
|
|
|
|
|
BorderThickness="0,0,1,1" BorderBrush="{DynamicResource BorderBrush}">
|
|
|
|
|
|
<TextBlock Text="保质期" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="12" Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Row="4" Grid.Column="3"
|
|
|
|
|
|
BorderThickness="0,0,0,1" BorderBrush="{DynamicResource BorderBrush}" Padding="6,0">
|
|
|
|
|
|
<TextBlock Text="{Binding Entry.ShelfLife}" VerticalAlignment="Center" FontSize="13"
|
|
|
|
|
|
Foreground="{DynamicResource SecondaryTextBrush}" TextTrimming="CharacterEllipsis"/>
|
|
|
|
|
|
</Border>
|
2026-05-09 18:25:34 +08:00
|
|
|
|
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<!-- ===== Row 5: 总重(KG) / 总份数 ===== -->
|
|
|
|
|
|
<Border Grid.Row="5" Grid.Column="0"
|
|
|
|
|
|
Background="{DynamicResource SecondaryRegionBrush}"
|
|
|
|
|
|
BorderThickness="0,0,1,1" BorderBrush="{DynamicResource BorderBrush}">
|
|
|
|
|
|
<TextBlock Text="总重(KG)" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="12" Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Row="5" Grid.Column="1"
|
2026-05-12 14:06:07 +08:00
|
|
|
|
BorderThickness="0,0,1,1" BorderBrush="{DynamicResource BorderBrush}" Padding="4,2">
|
|
|
|
|
|
<!--
|
|
|
|
|
|
显式 Height + VerticalAlignment=Center 避免被 Border 拉伸到 36+px,
|
|
|
|
|
|
否则 HandyControl 的 NumericUpDownPlus 内置 spinner 会被压扁导致箭头显示不全。
|
|
|
|
|
|
-->
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<hc:NumericUpDown Value="{Binding TotalWeightInput}"
|
|
|
|
|
|
Minimum="0" DecimalPlaces="2"
|
2026-05-12 14:06:07 +08:00
|
|
|
|
Height="30" VerticalAlignment="Center"
|
2026-05-11 14:32:44 +08:00
|
|
|
|
Style="{StaticResource NumericUpDownPlus}"
|
|
|
|
|
|
hc:InfoElement.Placeholder="请输入总重"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Row="5" Grid.Column="2"
|
|
|
|
|
|
Background="{DynamicResource SecondaryRegionBrush}"
|
|
|
|
|
|
BorderThickness="0,0,1,1" BorderBrush="{DynamicResource BorderBrush}">
|
|
|
|
|
|
<TextBlock Text="总份数" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="12" Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Row="5" Grid.Column="3"
|
|
|
|
|
|
BorderThickness="0,0,0,1" BorderBrush="{DynamicResource BorderBrush}" Padding="6,0">
|
2026-05-12 14:06:07 +08:00
|
|
|
|
<!-- 由拆码明细聚合而来:未维护明细时显示灰色占位提示,提示用户操作路径 -->
|
|
|
|
|
|
<Grid>
|
|
|
|
|
|
<TextBlock Text="{Binding SplitTotalPortionsDisplay}" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="13" Foreground="{DynamicResource SecondaryTextBrush}"
|
|
|
|
|
|
TextTrimming="CharacterEllipsis"/>
|
|
|
|
|
|
<TextBlock Text="由拆码明细自动生成" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="12" Foreground="#BFBFBF" FontStyle="Italic"
|
|
|
|
|
|
IsHitTestVisible="False">
|
|
|
|
|
|
<TextBlock.Style>
|
|
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding SplitTotalPortionsDisplay}" Value="">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</TextBlock.Style>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
</Grid>
|
2026-05-11 14:32:44 +08:00
|
|
|
|
</Border>
|
2026-05-09 18:25:34 +08:00
|
|
|
|
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<!-- ===== Row 6: 每份总重(KG) / 每份包数 ===== -->
|
|
|
|
|
|
<Border Grid.Row="6" Grid.Column="0"
|
|
|
|
|
|
Background="{DynamicResource SecondaryRegionBrush}"
|
|
|
|
|
|
BorderThickness="0,0,1,1" BorderBrush="{DynamicResource BorderBrush}">
|
|
|
|
|
|
<TextBlock Text="每份总重(KG)" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="11" Foreground="{DynamicResource PrimaryTextBrush}"
|
|
|
|
|
|
TextWrapping="Wrap" TextAlignment="Center"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Row="6" Grid.Column="1"
|
|
|
|
|
|
BorderThickness="0,0,1,1" BorderBrush="{DynamicResource BorderBrush}" Padding="6,0">
|
2026-05-12 14:06:07 +08:00
|
|
|
|
<Grid>
|
|
|
|
|
|
<TextBlock Text="{Binding SplitPortionWeightDisplay}" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="13" Foreground="{DynamicResource SecondaryTextBrush}"
|
|
|
|
|
|
TextTrimming="CharacterEllipsis"/>
|
|
|
|
|
|
<TextBlock Text="由拆码明细自动生成" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="12" Foreground="#BFBFBF" FontStyle="Italic"
|
|
|
|
|
|
IsHitTestVisible="False">
|
|
|
|
|
|
<TextBlock.Style>
|
|
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding SplitPortionWeightDisplay}" Value="">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</TextBlock.Style>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
</Grid>
|
2026-05-11 14:32:44 +08:00
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Row="6" Grid.Column="2"
|
|
|
|
|
|
Background="{DynamicResource SecondaryRegionBrush}"
|
|
|
|
|
|
BorderThickness="0,0,1,1" BorderBrush="{DynamicResource BorderBrush}">
|
|
|
|
|
|
<TextBlock Text="每份包数" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="12" Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Row="6" Grid.Column="3"
|
|
|
|
|
|
BorderThickness="0,0,0,1" BorderBrush="{DynamicResource BorderBrush}" Padding="6,0">
|
2026-05-12 14:06:07 +08:00
|
|
|
|
<Grid>
|
|
|
|
|
|
<TextBlock Text="{Binding SplitPortionPackagesDisplay}" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="13" Foreground="{DynamicResource SecondaryTextBrush}"
|
|
|
|
|
|
TextTrimming="CharacterEllipsis"/>
|
|
|
|
|
|
<TextBlock Text="由拆码明细自动生成" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="12" Foreground="#BFBFBF" FontStyle="Italic"
|
|
|
|
|
|
IsHitTestVisible="False">
|
|
|
|
|
|
<TextBlock.Style>
|
|
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding SplitPortionPackagesDisplay}" Value="">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</TextBlock.Style>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
</Grid>
|
2026-05-11 14:32:44 +08:00
|
|
|
|
</Border>
|
2026-05-09 18:25:34 +08:00
|
|
|
|
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<!-- ===== Row 7: 库位 / 卸货人 ===== -->
|
|
|
|
|
|
<Border Grid.Row="7" Grid.Column="0"
|
|
|
|
|
|
Background="{DynamicResource SecondaryRegionBrush}"
|
|
|
|
|
|
BorderThickness="0,0,1,1" BorderBrush="{DynamicResource BorderBrush}">
|
|
|
|
|
|
<TextBlock Text="库位" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="12" Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Row="7" Grid.Column="1"
|
|
|
|
|
|
BorderThickness="0,0,1,1" BorderBrush="{DynamicResource BorderBrush}" Padding="4,0">
|
|
|
|
|
|
<Grid>
|
|
|
|
|
|
<TextBox Text="{Binding Entry.WarehouseLocation, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
|
VerticalContentAlignment="Center" BorderThickness="0" Background="Transparent"
|
|
|
|
|
|
FontSize="13" Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
<TextBlock IsHitTestVisible="False" VerticalAlignment="Center" Margin="4,0"
|
|
|
|
|
|
FontSize="13" Foreground="{DynamicResource SecondaryTextBrush}" Opacity="0.6"
|
|
|
|
|
|
Text="请填写库位">
|
|
|
|
|
|
<TextBlock.Style>
|
|
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding Entry.WarehouseLocation}" Value="">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
<DataTrigger Binding="{Binding Entry.WarehouseLocation}" Value="{x:Null}">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</TextBlock.Style>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Row="7" Grid.Column="2"
|
|
|
|
|
|
Background="{DynamicResource SecondaryRegionBrush}"
|
|
|
|
|
|
BorderThickness="0,0,1,1" BorderBrush="{DynamicResource BorderBrush}">
|
|
|
|
|
|
<TextBlock Text="卸货人" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="12" Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Row="7" Grid.Column="3"
|
|
|
|
|
|
BorderThickness="0,0,0,1" BorderBrush="{DynamicResource BorderBrush}" Padding="4,0">
|
|
|
|
|
|
<Grid>
|
|
|
|
|
|
<TextBox Text="{Binding Entry.UnloadOperator, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
|
VerticalContentAlignment="Center" BorderThickness="0" Background="Transparent"
|
|
|
|
|
|
FontSize="13" Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
<TextBlock IsHitTestVisible="False" VerticalAlignment="Center" Margin="4,0"
|
|
|
|
|
|
FontSize="13" Foreground="{DynamicResource SecondaryTextBrush}" Opacity="0.6"
|
|
|
|
|
|
Text="请填写卸货人">
|
|
|
|
|
|
<TextBlock.Style>
|
|
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding Entry.UnloadOperator}" Value="">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
<DataTrigger Binding="{Binding Entry.UnloadOperator}" Value="{x:Null}">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</TextBlock.Style>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Border>
|
2026-05-09 18:25:34 +08:00
|
|
|
|
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<!-- ===== Row 8: 备注(末行,无内部底边线) ===== -->
|
|
|
|
|
|
<Border Grid.Row="8" Grid.Column="0"
|
|
|
|
|
|
Background="{DynamicResource SecondaryRegionBrush}"
|
|
|
|
|
|
BorderThickness="0,0,1,0" BorderBrush="{DynamicResource BorderBrush}">
|
|
|
|
|
|
<TextBlock Text="备注" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="12" Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Row="8" Grid.Column="1" Grid.ColumnSpan="3" Padding="4,4">
|
|
|
|
|
|
<Grid>
|
|
|
|
|
|
<TextBox Text="{Binding Entry.Remark, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
|
TextWrapping="Wrap" AcceptsReturn="True"
|
|
|
|
|
|
VerticalScrollBarVisibility="Auto"
|
|
|
|
|
|
BorderThickness="0" Background="Transparent"
|
|
|
|
|
|
FontSize="13" VerticalContentAlignment="Top"
|
|
|
|
|
|
Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
<TextBlock IsHitTestVisible="False" VerticalAlignment="Top" Margin="4,0"
|
|
|
|
|
|
FontSize="13" Foreground="{DynamicResource SecondaryTextBrush}" Opacity="0.6"
|
|
|
|
|
|
Text="请填写备注">
|
|
|
|
|
|
<TextBlock.Style>
|
|
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding Entry.Remark}" Value="">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
<DataTrigger Binding="{Binding Entry.Remark}" Value="{x:Null}">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</TextBlock.Style>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Border>
|
2026-05-09 18:25:34 +08:00
|
|
|
|
|
2026-05-11 14:32:44 +08:00
|
|
|
|
</Grid>
|
|
|
|
|
|
</Border>
|
2026-05-09 18:25:34 +08:00
|
|
|
|
|
2026-05-09 19:10:42 +08:00
|
|
|
|
<StackPanel>
|
|
|
|
|
|
<StackPanel.Style>
|
|
|
|
|
|
<Style TargetType="StackPanel">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
<Setter Property="Margin" Value="0"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding IsSpecialAdoptionValue}" Value="1">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
<Setter Property="Margin" Value="0,0,0,4"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</StackPanel.Style>
|
|
|
|
|
|
<hc:Row Gutter="16">
|
|
|
|
|
|
<hc:Col Span="8">
|
|
|
|
|
|
<hc:TextBox Text="{Binding Entry.SpecialAdoptionOperator, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
|
Height="34"
|
|
|
|
|
|
hc:InfoElement.Title="特采操作人"
|
|
|
|
|
|
hc:InfoElement.TitleWidth="80"
|
|
|
|
|
|
hc:InfoElement.TitlePlacement="Left"
|
|
|
|
|
|
hc:InfoElement.Placeholder="请输入特采操作人"
|
|
|
|
|
|
hc:InfoElement.ShowClearButton="True"
|
|
|
|
|
|
Margin="0,0,0,4"/>
|
|
|
|
|
|
</hc:Col>
|
|
|
|
|
|
<hc:Col Span="8">
|
|
|
|
|
|
<DockPanel Margin="0,0,0,4" LastChildFill="True">
|
|
|
|
|
|
<TextBlock DockPanel.Dock="Left" Text="特采时间" Width="80"
|
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
|
Foreground="{DynamicResource PrimaryTextBrush}"/>
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<ctrls:DateTimeListPicker SelectedDateTime="{Binding Entry.SpecialAdoptionTime, Mode=TwoWay}"
|
|
|
|
|
|
DateTimeFormat="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
|
Placeholder="请选择特采时间"/>
|
2026-05-09 19:10:42 +08:00
|
|
|
|
</DockPanel>
|
|
|
|
|
|
</hc:Col>
|
|
|
|
|
|
</hc:Row>
|
|
|
|
|
|
|
|
|
|
|
|
<hc:TextBox Text="{Binding Entry.SpecialAdoptionReason, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
|
hc:InfoElement.Title="特采原因"
|
|
|
|
|
|
hc:InfoElement.TitleWidth="80"
|
|
|
|
|
|
hc:InfoElement.TitlePlacement="Left"
|
|
|
|
|
|
hc:InfoElement.Placeholder="请输入特采原因"
|
|
|
|
|
|
hc:InfoElement.ShowClearButton="True"
|
|
|
|
|
|
TextWrapping="Wrap"
|
|
|
|
|
|
AcceptsReturn="True"
|
|
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
|
|
Height="64"
|
|
|
|
|
|
VerticalScrollBarVisibility="Auto"
|
|
|
|
|
|
Margin="0,0,0,4"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
2026-05-09 18:25:34 +08:00
|
|
|
|
<!-- 拆码明细:移出 hc:Row 避免被行高限制裁剪 -->
|
2026-05-09 19:10:42 +08:00
|
|
|
|
<Border BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" CornerRadius="6" Padding="12" Margin="0,0,0,8">
|
2026-05-09 18:25:34 +08:00
|
|
|
|
<StackPanel>
|
|
|
|
|
|
<DockPanel Margin="0,0,0,10">
|
|
|
|
|
|
<TextBlock Text="拆码明细"
|
|
|
|
|
|
FontSize="14"
|
|
|
|
|
|
FontWeight="SemiBold"
|
|
|
|
|
|
Foreground="{DynamicResource PrimaryTextBrush}"
|
|
|
|
|
|
VerticalAlignment="Center"/>
|
2026-05-12 14:06:07 +08:00
|
|
|
|
<!-- 右侧按钮组:新增明细(始终可用,支持「继续拆码」) + 重新拆码(仅编辑态可用) -->
|
|
|
|
|
|
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal" HorizontalAlignment="Right">
|
|
|
|
|
|
<!--
|
|
|
|
|
|
「新增明细」:始终可用。
|
|
|
|
|
|
已打印记录上点击 → 追加一行 HasCard=false 的可编辑行;
|
|
|
|
|
|
再点「生成原材料卡片」时按 HasCard 过滤,只对新增的行加卡(条码从已有数 +1 续编)。
|
|
|
|
|
|
-->
|
|
|
|
|
|
<Button Content="新增明细"
|
|
|
|
|
|
Command="{Binding AddSplitDetailCommand}"
|
|
|
|
|
|
Style="{StaticResource ButtonPrimary}"
|
|
|
|
|
|
Height="30"
|
|
|
|
|
|
Padding="10,0"
|
|
|
|
|
|
FontSize="12"
|
|
|
|
|
|
ToolTip="新增一行待拆码明细。已打印记录追加新行时支持「继续拆码」"/>
|
|
|
|
|
|
<Button Content="重新拆码"
|
|
|
|
|
|
Command="{Binding ResplitCommand}"
|
|
|
|
|
|
Style="{StaticResource ButtonWarning}"
|
|
|
|
|
|
Height="30"
|
|
|
|
|
|
Padding="10,0"
|
|
|
|
|
|
Margin="8,0,0,0"
|
|
|
|
|
|
FontSize="12"
|
|
|
|
|
|
ToolTip="清除该入场记录已生成的原材料卡片并清空明细,重新进行拆码"/>
|
|
|
|
|
|
</StackPanel>
|
2026-05-09 18:25:34 +08:00
|
|
|
|
</DockPanel>
|
|
|
|
|
|
|
2026-05-09 19:10:42 +08:00
|
|
|
|
<StackPanel>
|
|
|
|
|
|
<!-- 表头 -->
|
|
|
|
|
|
<Grid Background="{DynamicResource SecondaryRegionBrush}" Height="40">
|
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
|
<ColumnDefinition Width="80"/>
|
|
|
|
|
|
<ColumnDefinition Width="130"/>
|
|
|
|
|
|
<ColumnDefinition Width="100"/>
|
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
|
<ColumnDefinition Width="90"/>
|
2026-05-12 14:06:07 +08:00
|
|
|
|
<ColumnDefinition Width="90"/>
|
2026-05-09 19:10:42 +08:00
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
<TextBlock Grid.Column="0" Text="份数"
|
|
|
|
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
|
|
FontWeight="SemiBold" FontSize="13"
|
|
|
|
|
|
Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
<TextBlock Grid.Column="1" Text="每份重量(KG)"
|
|
|
|
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
|
|
FontWeight="SemiBold" FontSize="13"
|
|
|
|
|
|
Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
<TextBlock Grid.Column="2" Text="每份包数"
|
|
|
|
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
|
|
FontWeight="SemiBold" FontSize="13"
|
|
|
|
|
|
Foreground="{DynamicResource PrimaryTextBrush}"/>
|
2026-05-12 14:06:07 +08:00
|
|
|
|
<!-- 库位列:保存时非必填;点击「生成原材料卡片」时必填,ToolTip 给出说明 -->
|
2026-05-09 19:10:42 +08:00
|
|
|
|
<TextBlock Grid.Column="3" Text="库位"
|
2026-05-12 14:06:07 +08:00
|
|
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
|
|
FontWeight="SemiBold" FontSize="13"
|
|
|
|
|
|
Foreground="{DynamicResource PrimaryTextBrush}"
|
|
|
|
|
|
ToolTip="生成原材料卡片时为必填项"/>
|
|
|
|
|
|
<TextBlock Grid.Column="4" Text="打印标记"
|
2026-05-09 19:10:42 +08:00
|
|
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
|
|
FontWeight="SemiBold" FontSize="13"
|
|
|
|
|
|
Foreground="{DynamicResource PrimaryTextBrush}"/>
|
2026-05-12 14:06:07 +08:00
|
|
|
|
<TextBlock Grid.Column="5" Text="操作"
|
2026-05-09 19:10:42 +08:00
|
|
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
|
|
FontWeight="SemiBold" FontSize="13"
|
|
|
|
|
|
Foreground="{DynamicResource PrimaryTextBrush}"/>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 空状态提示 -->
|
|
|
|
|
|
<TextBlock Text="暂无明细,请点击「新增明细」添加"
|
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
|
Foreground="{DynamicResource SecondaryTextBrush}"
|
|
|
|
|
|
FontSize="12"
|
|
|
|
|
|
Margin="0,14">
|
|
|
|
|
|
<TextBlock.Style>
|
|
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding SplitCodeDetails.Count}" Value="0">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</TextBlock.Style>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<!-- 数据行:行高对齐表头 40px,输入框给足上下边距避免边框被裁切 -->
|
2026-05-09 19:10:42 +08:00
|
|
|
|
<ItemsControl ItemsSource="{Binding SplitCodeDetails}">
|
|
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
|
|
<DataTemplate>
|
2026-05-12 14:06:07 +08:00
|
|
|
|
<DataTemplate.Resources>
|
|
|
|
|
|
<!--
|
|
|
|
|
|
已生成卡片的「行」锁定样式(HasCard==true):
|
|
|
|
|
|
把份数 / 每份重量 / 每份包数 三个 TextBox 设为只读 + 淡灰背景。
|
|
|
|
|
|
配合"该行隐藏删除按钮 + 库位按钮禁用"形成完整防护,避免改了行内数值后
|
|
|
|
|
|
与已生成的原材料卡片数据脱节。
|
|
|
|
|
|
业务流程:用户在已打印记录上想继续拆码 → 新增行(HasCard=false 可编辑)
|
|
|
|
|
|
→ 点「生成原材料卡片」只对未生成行加卡(条码续号续接)。
|
|
|
|
|
|
-->
|
|
|
|
|
|
<Style x:Key="LockableSplitTextBoxStyle" TargetType="TextBox">
|
|
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
|
|
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
|
|
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
|
|
|
|
<Setter Property="Height" Value="32"/>
|
|
|
|
|
|
<Setter Property="BorderBrush" Value="#D9D9D9"/>
|
|
|
|
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
|
|
|
|
<Setter Property="Background" Value="White"/>
|
|
|
|
|
|
<Setter Property="FontSize" Value="13"/>
|
|
|
|
|
|
<Setter Property="Margin" Value="4,0"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding HasCard}" Value="True">
|
|
|
|
|
|
<Setter Property="IsReadOnly" Value="True"/>
|
|
|
|
|
|
<Setter Property="Background" Value="#F5F5F5"/>
|
|
|
|
|
|
<Setter Property="Foreground" Value="#8C8C8C"/>
|
|
|
|
|
|
<Setter Property="ToolTip" Value="该行已生成原材料卡片,不可修改。如需调整请先点「重新拆码」清空全部卡片"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</DataTemplate.Resources>
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<Grid Height="44">
|
2026-05-09 19:10:42 +08:00
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
|
<ColumnDefinition Width="80"/>
|
|
|
|
|
|
<ColumnDefinition Width="130"/>
|
|
|
|
|
|
<ColumnDefinition Width="100"/>
|
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
|
<ColumnDefinition Width="90"/>
|
2026-05-12 14:06:07 +08:00
|
|
|
|
<ColumnDefinition Width="90"/>
|
2026-05-09 19:10:42 +08:00
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
<Border Grid.Column="0" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
|
|
|
|
|
|
<TextBox Text="{Binding Portions, UpdateSourceTrigger=PropertyChanged}"
|
2026-05-12 14:06:07 +08:00
|
|
|
|
Style="{StaticResource LockableSplitTextBoxStyle}"/>
|
2026-05-09 19:10:42 +08:00
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Column="1" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
|
|
|
|
|
|
<TextBox Text="{Binding PortionWeight, UpdateSourceTrigger=PropertyChanged}"
|
2026-05-12 14:06:07 +08:00
|
|
|
|
Style="{StaticResource LockableSplitTextBoxStyle}"/>
|
2026-05-09 19:10:42 +08:00
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Column="2" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
|
|
|
|
|
|
<TextBox Text="{Binding PortionPackages, UpdateSourceTrigger=PropertyChanged}"
|
2026-05-12 14:06:07 +08:00
|
|
|
|
Style="{StaticResource LockableSplitTextBoxStyle}"/>
|
2026-05-09 19:10:42 +08:00
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Column="3" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
|
2026-05-12 14:06:07 +08:00
|
|
|
|
<!--
|
|
|
|
|
|
InputBindings 内 RelativeSource 不在可视树中,查找会静默失败。
|
|
|
|
|
|
改用 Button + ControlTemplate:Command 写在 Button 元素上,可视树正常,RelativeSource 可靠。
|
|
|
|
|
|
-->
|
|
|
|
|
|
<Button Command="{Binding DataContext.OpenWarehouseAreaPickerCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}"
|
|
|
|
|
|
CommandParameter="{Binding}"
|
|
|
|
|
|
Cursor="Hand"
|
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
|
Height="32"
|
|
|
|
|
|
Margin="4,0"
|
|
|
|
|
|
Focusable="False">
|
|
|
|
|
|
<!-- 行级锁定:HasCard==true(该行已生成卡片)时禁用,与三个数字字段一致 -->
|
|
|
|
|
|
<Button.Style>
|
|
|
|
|
|
<Style TargetType="Button">
|
|
|
|
|
|
<Setter Property="IsEnabled" Value="True"/>
|
|
|
|
|
|
<Setter Property="ToolTip" Value="点击选择库区"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding HasCard}" Value="True">
|
|
|
|
|
|
<Setter Property="IsEnabled" Value="False"/>
|
|
|
|
|
|
<Setter Property="ToolTip" Value="该行已生成原材料卡片,不可修改。如需调整请先点「重新拆码」清空全部卡片"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</Button.Style>
|
|
|
|
|
|
<Button.Template>
|
|
|
|
|
|
<!-- 视觉与同行的 TextBox 对齐:相同高度/边框色/圆角/字号,内容水平居中 -->
|
|
|
|
|
|
<ControlTemplate TargetType="Button">
|
|
|
|
|
|
<Border x:Name="Bd"
|
|
|
|
|
|
BorderBrush="#D9D9D9" BorderThickness="1"
|
|
|
|
|
|
CornerRadius="2"
|
|
|
|
|
|
Background="White">
|
|
|
|
|
|
<Grid>
|
|
|
|
|
|
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="13" TextTrimming="CharacterEllipsis"
|
|
|
|
|
|
Text="{Binding WarehouseLocation}">
|
|
|
|
|
|
<TextBlock.Style>
|
|
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
|
|
<Setter Property="Foreground" Value="#1F1F1F"/>
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding WarehouseLocation}" Value="">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
<DataTrigger Binding="{Binding WarehouseLocation}" Value="{x:Null}">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</TextBlock.Style>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
|
|
FontSize="13" Text="点击选择库区" Foreground="#BFBFBF">
|
|
|
|
|
|
<TextBlock.Style>
|
|
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding WarehouseLocation}" Value="">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
<DataTrigger Binding="{Binding WarehouseLocation}" Value="{x:Null}">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</TextBlock.Style>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
|
<Setter TargetName="Bd" Property="BorderBrush" Value="#4096FF"/>
|
|
|
|
|
|
</Trigger>
|
|
|
|
|
|
<Trigger Property="IsPressed" Value="True">
|
|
|
|
|
|
<Setter TargetName="Bd" Property="Background" Value="#F0F7FF"/>
|
|
|
|
|
|
</Trigger>
|
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
|
</Button.Template>
|
|
|
|
|
|
</Button>
|
2026-05-09 19:10:42 +08:00
|
|
|
|
</Border>
|
2026-05-12 14:06:07 +08:00
|
|
|
|
<!--
|
|
|
|
|
|
打印标记列:行级状态(HasCard),与「继续拆码」流程契合。
|
|
|
|
|
|
旧行(已生成卡片)显示绿色「已打印」;新增的待生成行显示灰色「未打印」。
|
|
|
|
|
|
-->
|
2026-05-09 19:10:42 +08:00
|
|
|
|
<Border Grid.Column="4" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
|
2026-05-12 14:06:07 +08:00
|
|
|
|
<Grid>
|
|
|
|
|
|
<Border CornerRadius="2" Padding="6,2" VerticalAlignment="Center" HorizontalAlignment="Center">
|
|
|
|
|
|
<Border.Style>
|
|
|
|
|
|
<Style TargetType="Border">
|
|
|
|
|
|
<Setter Property="Background" Value="#F5F5F5"/>
|
|
|
|
|
|
<Setter Property="BorderBrush" Value="#D9D9D9"/>
|
|
|
|
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding HasCard}" Value="True">
|
|
|
|
|
|
<Setter Property="Background" Value="#F6FFED"/>
|
|
|
|
|
|
<Setter Property="BorderBrush" Value="#B7EB8F"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</Border.Style>
|
|
|
|
|
|
<TextBlock VerticalAlignment="Center" FontSize="12">
|
|
|
|
|
|
<TextBlock.Style>
|
|
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
|
|
<Setter Property="Text" Value="未打印"/>
|
|
|
|
|
|
<Setter Property="Foreground" Value="#8C8C8C"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding HasCard}" Value="True">
|
|
|
|
|
|
<Setter Property="Text" Value="已打印"/>
|
|
|
|
|
|
<Setter Property="Foreground" Value="#52C41A"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</TextBlock.Style>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Border Grid.Column="5" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
|
|
|
|
|
|
<!-- 行级:HasCard==true(该行已生成卡片)时隐藏删除按钮,新增的待生成行可正常删除 -->
|
2026-05-09 19:10:42 +08:00
|
|
|
|
<Button Content="删除"
|
|
|
|
|
|
Command="{Binding DataContext.RemoveSplitDetailCommand, RelativeSource={RelativeSource AncestorType=ItemsControl}}"
|
|
|
|
|
|
CommandParameter="{Binding}"
|
2026-05-11 14:32:44 +08:00
|
|
|
|
VerticalAlignment="Center" Height="28"
|
2026-05-12 14:06:07 +08:00
|
|
|
|
Padding="6,0" Margin="12,0" FontSize="11">
|
|
|
|
|
|
<Button.Style>
|
|
|
|
|
|
<Style TargetType="Button" BasedOn="{StaticResource ButtonDanger}">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Visible"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding HasCard}" Value="True">
|
|
|
|
|
|
<Setter Property="Visibility" Value="Collapsed"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</Button.Style>
|
|
|
|
|
|
</Button>
|
2026-05-09 19:10:42 +08:00
|
|
|
|
</Border>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
|
|
</ItemsControl>
|
|
|
|
|
|
</StackPanel>
|
2026-05-09 18:25:34 +08:00
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
</StackPanel>
|
2026-05-11 14:32:44 +08:00
|
|
|
|
</hc:ScrollViewer>
|
|
|
|
|
|
|
|
|
|
|
|
<GridSplitter x:Name="RightPaneSplitter"
|
|
|
|
|
|
Grid.Column="1"
|
|
|
|
|
|
Width="4"
|
|
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
|
|
VerticalAlignment="Stretch"
|
|
|
|
|
|
ResizeBehavior="PreviousAndNext"
|
|
|
|
|
|
ShowsPreview="True"
|
|
|
|
|
|
Cursor="SizeWE"
|
|
|
|
|
|
Background="{DynamicResource RegionBrush}"
|
|
|
|
|
|
PreviewStyle="{StaticResource GridSplitterPreviewStyle}"
|
|
|
|
|
|
DragCompleted="RightPaneSplitter_OnDragCompleted"/>
|
|
|
|
|
|
|
|
|
|
|
|
<Border Grid.Column="2"
|
|
|
|
|
|
BorderBrush="{DynamicResource BorderBrush}"
|
|
|
|
|
|
BorderThickness="1,0,0,0"
|
|
|
|
|
|
Background="{DynamicResource RegionBrush}">
|
2026-05-14 10:43:51 +08:00
|
|
|
|
<Grid>
|
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
|
<RowDefinition Height="*" MinHeight="120"/>
|
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
|
|
|
|
<DockPanel Grid.Row="0" LastChildFill="True">
|
2026-05-12 14:06:07 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- ===== 标题 + 日期筛选 ===== -->
|
|
|
|
|
|
<Border DockPanel.Dock="Top" BorderBrush="{DynamicResource BorderBrush}"
|
|
|
|
|
|
BorderThickness="0,0,0,1" Padding="8,6">
|
|
|
|
|
|
<StackPanel>
|
|
|
|
|
|
<DockPanel>
|
|
|
|
|
|
<StackPanel>
|
|
|
|
|
|
<TextBlock Text="原料入场记录" FontWeight="SemiBold" FontSize="13"
|
2026-05-11 14:32:44 +08:00
|
|
|
|
Foreground="{DynamicResource PrimaryTextBrush}"/>
|
2026-05-12 14:06:07 +08:00
|
|
|
|
<TextBlock Text="点击记录可回填到左侧表单" FontSize="11" Opacity="0.65"
|
|
|
|
|
|
Foreground="{DynamicResource SecondaryTextBrush}"/>
|
2026-05-11 14:32:44 +08:00
|
|
|
|
</StackPanel>
|
2026-05-12 14:06:07 +08:00
|
|
|
|
<Button DockPanel.Dock="Right" Content="刷新" Margin="4,0,0,0"
|
2026-05-11 14:32:44 +08:00
|
|
|
|
Command="{Binding RefreshTodayEntriesCommand}"
|
2026-05-12 14:06:07 +08:00
|
|
|
|
Style="{StaticResource ButtonPrimary}"
|
|
|
|
|
|
Padding="8,2" FontSize="11" Height="26"
|
|
|
|
|
|
VerticalAlignment="Top"/>
|
|
|
|
|
|
</DockPanel>
|
|
|
|
|
|
<ComboBox ItemsSource="{Binding DateRangeOptions}"
|
|
|
|
|
|
SelectedItem="{Binding SelectedDateRange}"
|
|
|
|
|
|
Margin="0,6,0,0" Height="26" FontSize="12"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Border>
|
2026-05-11 14:32:44 +08:00
|
|
|
|
|
2026-05-12 14:06:07 +08:00
|
|
|
|
<!-- ===== 入场记录列表(卡片式,支持换行) ===== -->
|
|
|
|
|
|
<ListBox ItemsSource="{Binding TodayEntries}"
|
|
|
|
|
|
SelectedItem="{Binding SelectedTodayEntry, Mode=TwoWay}"
|
|
|
|
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
|
|
|
|
BorderThickness="0"
|
|
|
|
|
|
Background="Transparent"
|
|
|
|
|
|
ItemContainerStyle="{StaticResource TodayEntryListBoxItemStyle}">
|
|
|
|
|
|
<ListBox.ItemTemplate>
|
|
|
|
|
|
<DataTemplate DataType="{x:Type core:MesXslRawMaterialEntry}">
|
|
|
|
|
|
<Border BorderBrush="{DynamicResource BorderBrush}"
|
|
|
|
|
|
BorderThickness="0,0,0,1" Padding="8,8">
|
|
|
|
|
|
<StackPanel>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 第一行:条码 + 打印状态 -->
|
|
|
|
|
|
<DockPanel>
|
|
|
|
|
|
<TextBlock DockPanel.Dock="Right"
|
|
|
|
|
|
Text="{Binding PrintFlagText}"
|
|
|
|
|
|
FontSize="13" Margin="6,0,0,0"
|
|
|
|
|
|
Foreground="{DynamicResource SecondaryTextBrush}"
|
|
|
|
|
|
VerticalAlignment="Top"/>
|
|
|
|
|
|
<TextBlock FontSize="14" TextWrapping="Wrap"
|
|
|
|
|
|
Foreground="{DynamicResource PrimaryTextBrush}"
|
|
|
|
|
|
ToolTip="{Binding Barcode}">
|
|
|
|
|
|
<Run Text="条码:" FontWeight="SemiBold"/>
|
|
|
|
|
|
<Run Text="{Binding Barcode}"/>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
</DockPanel>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 第二行:榜单号 -->
|
|
|
|
|
|
<TextBlock FontSize="14" TextWrapping="Wrap"
|
|
|
|
|
|
Margin="0,5,0,0"
|
|
|
|
|
|
Foreground="{DynamicResource PrimaryTextBrush}"
|
|
|
|
|
|
ToolTip="{Binding BillNo}">
|
|
|
|
|
|
<Run Text="榜单号:" FontWeight="SemiBold"/>
|
|
|
|
|
|
<Run Text="{Binding BillNo}"/>
|
|
|
|
|
|
</TextBlock>
|
2026-05-11 14:32:44 +08:00
|
|
|
|
|
2026-05-12 14:06:07 +08:00
|
|
|
|
<!-- 第三行:批次号(加黑加粗) -->
|
|
|
|
|
|
<TextBlock FontSize="14" TextWrapping="Wrap"
|
|
|
|
|
|
FontWeight="Bold"
|
|
|
|
|
|
Margin="0,5,0,0"
|
2026-05-11 14:32:44 +08:00
|
|
|
|
Foreground="{DynamicResource PrimaryTextBrush}"
|
2026-05-12 14:06:07 +08:00
|
|
|
|
ToolTip="{Binding BatchNo}">
|
|
|
|
|
|
<Run Text="批次号:"/>
|
|
|
|
|
|
<Run Text="{Binding BatchNo}"/>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 物料 + 总重 -->
|
|
|
|
|
|
<DockPanel Margin="0,5,0,0">
|
|
|
|
|
|
<TextBlock DockPanel.Dock="Right"
|
|
|
|
|
|
FontSize="13" Margin="6,0,0,0"
|
|
|
|
|
|
Foreground="{DynamicResource SecondaryTextBrush}"
|
|
|
|
|
|
ToolTip="{Binding TotalWeight, StringFormat={}{0:0.##} KG}"
|
|
|
|
|
|
VerticalAlignment="Top">
|
|
|
|
|
|
<Run Text="总重:" FontWeight="SemiBold"/>
|
|
|
|
|
|
<Run Text="{Binding TotalWeight, StringFormat={}{0:0.##}KG}"/>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
<TextBlock FontSize="14" TextWrapping="Wrap"
|
|
|
|
|
|
Foreground="{DynamicResource SecondaryTextBrush}"
|
|
|
|
|
|
ToolTip="{Binding MaterialName}">
|
|
|
|
|
|
<Run Text="物料:" FontWeight="SemiBold"/>
|
|
|
|
|
|
<Run Text="{Binding MaterialName}"/>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
</DockPanel>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 供应商 -->
|
|
|
|
|
|
<TextBlock FontSize="13" TextWrapping="Wrap"
|
|
|
|
|
|
Margin="0,4,0,0" Opacity="0.7"
|
2026-05-11 14:32:44 +08:00
|
|
|
|
Foreground="{DynamicResource SecondaryTextBrush}"
|
2026-05-12 14:06:07 +08:00
|
|
|
|
ToolTip="{Binding SupplierName}">
|
|
|
|
|
|
<Run Text="供应商:" FontWeight="SemiBold"/>
|
|
|
|
|
|
<Run Text="{Binding SupplierName}"/>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
|
</ListBox.ItemTemplate>
|
|
|
|
|
|
</ListBox>
|
|
|
|
|
|
|
2026-05-14 10:43:51 +08:00
|
|
|
|
</DockPanel>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ===== 下方:入场标签实时打印预览(可折叠,仅画布无 JSON) ===== -->
|
|
|
|
|
|
<StackPanel Grid.Row="1" Margin="0,4,0,0" VerticalAlignment="Bottom">
|
|
|
|
|
|
<Border BorderBrush="{DynamicResource BorderBrush}"
|
|
|
|
|
|
BorderThickness="1"
|
|
|
|
|
|
CornerRadius="6,6,0,0"
|
|
|
|
|
|
Background="{DynamicResource SecondaryRegionBrush}"
|
|
|
|
|
|
Padding="10,8">
|
|
|
|
|
|
<Grid>
|
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
<TextBlock Grid.Column="0"
|
|
|
|
|
|
Text="入场标签打印预览"
|
|
|
|
|
|
FontWeight="SemiBold"
|
|
|
|
|
|
FontSize="12"
|
|
|
|
|
|
VerticalAlignment="Center"/>
|
|
|
|
|
|
<TextBlock Grid.Column="1"
|
|
|
|
|
|
Text="{Binding PrintPreviewStatus}"
|
|
|
|
|
|
TextTrimming="CharacterEllipsis"
|
|
|
|
|
|
FontSize="10"
|
|
|
|
|
|
Opacity="0.72"
|
|
|
|
|
|
Margin="8,0,10,0"
|
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
|
Foreground="{DynamicResource SecondaryTextBrush}"/>
|
2026-05-14 11:25:17 +08:00
|
|
|
|
<StackPanel Grid.Column="2"
|
|
|
|
|
|
Orientation="Horizontal"
|
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
|
HorizontalAlignment="Right">
|
|
|
|
|
|
<StackPanel Orientation="Horizontal"
|
|
|
|
|
|
Margin="0,0,8,0"
|
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
|
Visibility="{Binding IsPrintPreviewExpanded, Converter={StaticResource Boolean2VisibilityConverter}}">
|
|
|
|
|
|
<Button Content="-"
|
|
|
|
|
|
Width="24"
|
|
|
|
|
|
Height="24"
|
|
|
|
|
|
Padding="0"
|
|
|
|
|
|
FontSize="12"
|
|
|
|
|
|
Command="{Binding ZoomOutPrintPreviewCommand}"
|
|
|
|
|
|
Style="{StaticResource ButtonDefault}"
|
|
|
|
|
|
ToolTip="缩小预览"/>
|
|
|
|
|
|
<Button Content="{Binding PrintPreviewZoomText}"
|
|
|
|
|
|
MinWidth="56"
|
|
|
|
|
|
Height="24"
|
|
|
|
|
|
Margin="4,0,4,0"
|
|
|
|
|
|
Padding="10,0"
|
|
|
|
|
|
FontSize="11"
|
|
|
|
|
|
Command="{Binding ResetPrintPreviewZoomCommand}"
|
|
|
|
|
|
Style="{StaticResource ButtonDefault}"
|
|
|
|
|
|
ToolTip="重置为 70%"/>
|
|
|
|
|
|
<Button Content="+"
|
|
|
|
|
|
Width="24"
|
|
|
|
|
|
Height="24"
|
|
|
|
|
|
Padding="0"
|
|
|
|
|
|
FontSize="12"
|
|
|
|
|
|
Command="{Binding ZoomInPrintPreviewCommand}"
|
|
|
|
|
|
Style="{StaticResource ButtonDefault}"
|
|
|
|
|
|
ToolTip="放大预览"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
<ToggleButton IsChecked="{Binding IsPrintPreviewExpanded, Mode=TwoWay}"
|
|
|
|
|
|
MinWidth="56"
|
|
|
|
|
|
Height="24"
|
|
|
|
|
|
Background="Transparent"
|
|
|
|
|
|
BorderThickness="1"
|
|
|
|
|
|
Padding="8,0"
|
|
|
|
|
|
FocusVisualStyle="{x:Null}"
|
|
|
|
|
|
Cursor="Hand"
|
|
|
|
|
|
VerticalAlignment="Center">
|
|
|
|
|
|
<ToggleButton.Template>
|
|
|
|
|
|
<ControlTemplate TargetType="ToggleButton">
|
|
|
|
|
|
<Border Background="{TemplateBinding Background}"
|
|
|
|
|
|
BorderBrush="{DynamicResource BorderBrush}"
|
|
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
|
|
CornerRadius="2"
|
|
|
|
|
|
Padding="{TemplateBinding Padding}">
|
|
|
|
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
|
</ToggleButton.Template>
|
|
|
|
|
|
<TextBlock FontSize="12"
|
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
|
HorizontalAlignment="Center">
|
|
|
|
|
|
<TextBlock.Style>
|
|
|
|
|
|
<Style TargetType="TextBlock">
|
|
|
|
|
|
<Setter Property="Text" Value="展开"/>
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
|
<DataTrigger Binding="{Binding IsChecked, RelativeSource={RelativeSource AncestorType=ToggleButton}}" Value="True">
|
|
|
|
|
|
<Setter Property="Text" Value="折叠"/>
|
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
|
</Style>
|
|
|
|
|
|
</TextBlock.Style>
|
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
</ToggleButton>
|
|
|
|
|
|
</StackPanel>
|
2026-05-14 10:43:51 +08:00
|
|
|
|
</Grid>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
<Border BorderBrush="{DynamicResource BorderBrush}"
|
|
|
|
|
|
BorderThickness="1,0,1,1"
|
|
|
|
|
|
CornerRadius="0,0,2,2"
|
|
|
|
|
|
Padding="0"
|
|
|
|
|
|
MinHeight="200"
|
|
|
|
|
|
MaxHeight="420"
|
|
|
|
|
|
Background="#525659"
|
2026-05-15 15:46:25 +08:00
|
|
|
|
Visibility="{Binding IsPrintPreviewWebAreaVisible, Converter={StaticResource Boolean2VisibilityConverter}}">
|
2026-05-14 10:43:51 +08:00
|
|
|
|
<wv2:WebView2 x:Name="PrintPreviewWebView"
|
|
|
|
|
|
DefaultBackgroundColor="#FF525659"/>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Grid>
|
2026-05-11 14:32:44 +08:00
|
|
|
|
</Border>
|
|
|
|
|
|
</Grid>
|
2026-05-09 18:25:34 +08:00
|
|
|
|
|
2026-05-14 10:43:51 +08:00
|
|
|
|
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,12,0,20">
|
|
|
|
|
|
<Button Content="保存并打印入场记录"
|
|
|
|
|
|
Command="{Binding SaveAndPrintCommand}"
|
|
|
|
|
|
Style="{StaticResource ButtonPrimary}"
|
|
|
|
|
|
IsEnabled="{Binding IsNotActionBusy}"
|
|
|
|
|
|
Width="168" Margin="0,0,15,0"
|
|
|
|
|
|
ToolTip="保存成功后直接发送到已选打印机(不弹预览窗口)"/>
|
|
|
|
|
|
<Button Content="保存"
|
|
|
|
|
|
Command="{Binding SaveCommand}"
|
|
|
|
|
|
Style="{StaticResource ButtonDefault}"
|
|
|
|
|
|
IsEnabled="{Binding IsNotActionBusy}"
|
|
|
|
|
|
Width="100" Margin="0,0,15,0"/>
|
2026-05-11 14:32:44 +08:00
|
|
|
|
<Button Content="生成原材料卡片"
|
|
|
|
|
|
Command="{Binding GenerateRawMaterialCardsCommand}"
|
|
|
|
|
|
Style="{StaticResource ButtonDefault}"
|
|
|
|
|
|
Width="130"
|
|
|
|
|
|
IsEnabled="{Binding CanGenerateCards}"
|
|
|
|
|
|
ToolTip="根据拆码明细生成原材料卡片(需先保存入场记录)"/>
|
2026-05-09 18:25:34 +08:00
|
|
|
|
</StackPanel>
|
2026-05-14 10:43:51 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 底部动作按钮忙碌遮罩:保存/保存并打印/生成时显示,禁止重复点击 -->
|
|
|
|
|
|
<Border Grid.RowSpan="4"
|
|
|
|
|
|
Panel.ZIndex="999"
|
|
|
|
|
|
Background="#66000000"
|
|
|
|
|
|
Visibility="{Binding IsActionBusy, Converter={StaticResource Boolean2VisibilityConverter}}">
|
|
|
|
|
|
<Border Width="220"
|
|
|
|
|
|
Height="120"
|
|
|
|
|
|
CornerRadius="8"
|
|
|
|
|
|
Background="#F2FFFFFF"
|
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
|
Padding="16">
|
|
|
|
|
|
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
|
|
|
|
<hc:LoadingCircle Width="42" Height="42"/>
|
|
|
|
|
|
<TextBlock Text="{Binding ActionBusyText}"
|
|
|
|
|
|
Margin="0,14,0,0"
|
|
|
|
|
|
FontSize="14"
|
|
|
|
|
|
FontWeight="SemiBold"
|
|
|
|
|
|
Foreground="{DynamicResource PrimaryTextBrush}"
|
|
|
|
|
|
HorizontalAlignment="Center"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
</Border>
|
2026-05-09 18:25:34 +08:00
|
|
|
|
</Grid>
|
|
|
|
|
|
</UserControl>
|