桌面端胶料快检实验标准添加
This commit is contained in:
@@ -0,0 +1,301 @@
|
||||
<UserControl x:Class="YY.Admin.Views.RubberQuickTest.RubberQuickTestOperationView"
|
||||
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/"
|
||||
xmlns:lvc="clr-namespace:LiveChartsCore.SkiaSharpView.WPF;assembly=LiveChartsCore.SkiaSharpView.WPF"
|
||||
prism:ViewModelLocator.AutoWireViewModel="True"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<UserControl.Resources>
|
||||
<Style x:Key="SectionBorderStyle" TargetType="Border">
|
||||
<Setter Property="CornerRadius" Value="8"/>
|
||||
<Setter Property="Background" Value="{DynamicResource ThirdlyRegionBrush}"/>
|
||||
<Setter Property="Padding" Value="12"/>
|
||||
<Setter Property="Margin" Value="0,0,0,10"/>
|
||||
</Style>
|
||||
<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="8,0,0,0"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Grid Margin="12">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="64"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="56"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- 标题 -->
|
||||
<Border Grid.Row="0" Background="{DynamicResource RegionBrush}"
|
||||
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1" Margin="-12,0,-12,8">
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="20,0">
|
||||
<Border Width="40" Height="40" CornerRadius="8" Background="{DynamicResource PrimaryBrush}" Margin="0,0,12,0">
|
||||
<md:PackIcon Kind="Flask" Width="22" Height="22" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<StackPanel>
|
||||
<TextBlock Text="快检记录" FontSize="18" FontWeight="Bold"/>
|
||||
<TextBlock Text="密炼快检试验操作台" FontSize="12" Foreground="{DynamicResource SecondaryTextBrush}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- 主体 2:1 -->
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="12"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- 左侧:曲线 + 试验结果 -->
|
||||
<ScrollViewer Grid.Column="0" VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel>
|
||||
<Border Style="{StaticResource SectionBorderStyle}">
|
||||
<StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,8">
|
||||
<Border Width="4" Height="18" CornerRadius="2" Background="#1890ff"/>
|
||||
<TextBlock Text="温度(℃)曲线" Style="{StaticResource SectionTitleStyle}"/>
|
||||
<Button Content="刷新演示" Command="{Binding RefreshChartDemoCommand}" Style="{StaticResource ButtonDefault}" Height="28" Padding="10,0" Margin="12,0,0,0"/>
|
||||
</StackPanel>
|
||||
<TextBlock Text="{Binding ChartDemoHint}" FontSize="11" Foreground="{DynamicResource SecondaryTextBrush}" Margin="0,0,0,6"/>
|
||||
<Border Height="220" CornerRadius="4">
|
||||
<lvc:CartesianChart Series="{Binding TemperatureSeries}"
|
||||
XAxes="{Binding TemperatureXAxes}"
|
||||
YAxes="{Binding TemperatureYAxes}"
|
||||
LegendPosition="Top"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Style="{StaticResource SectionBorderStyle}">
|
||||
<StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,8">
|
||||
<Border Width="4" Height="18" CornerRadius="2" Background="#1890ff"/>
|
||||
<TextBlock Text="S'(dNm)曲线" Style="{StaticResource SectionTitleStyle}"/>
|
||||
</StackPanel>
|
||||
<Border Height="200" CornerRadius="4">
|
||||
<lvc:CartesianChart Series="{Binding TorqueSeries}"
|
||||
XAxes="{Binding TorqueXAxes}"
|
||||
YAxes="{Binding TorqueYAxes}"
|
||||
LegendPosition="Top"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border Style="{StaticResource SectionBorderStyle}">
|
||||
<StackPanel>
|
||||
<Grid Margin="0,0,0,8">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Border Width="4" Height="18" CornerRadius="2" Background="#1890ff"/>
|
||||
<TextBlock Text="试验结果" Style="{StaticResource SectionTitleStyle}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Content="新增检验行" Command="{Binding AddInspectRowCommand}" Style="{StaticResource ButtonPrimary}" Height="28" Padding="10,0" Margin="0,0,8,0"/>
|
||||
<Button Content="删除选中行" Command="{Binding RemoveInspectRowCommand}" Style="{StaticResource ButtonDanger}" Height="28" Padding="10,0"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<DataGrid x:Name="InspectResultGrid"
|
||||
ItemsSource="{Binding InspectRows}"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserAddRows="False"
|
||||
CanUserDeleteRows="False"
|
||||
HeadersVisibility="Column"
|
||||
MinHeight="160"
|
||||
SelectionMode="Single"
|
||||
IsReadOnly="False"
|
||||
SelectionChanged="InspectResultGrid_SelectionChanged">
|
||||
</DataGrid>
|
||||
<TextBlock Text="请手填各数据点检测值,系统将根据数据标准上下限自动判定合格/不合格" FontSize="11" Foreground="{DynamicResource SecondaryTextBrush}" Margin="0,6,0,0"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
<!-- 右侧 -->
|
||||
<ScrollViewer Grid.Column="2" VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel>
|
||||
<!-- 实时数据 -->
|
||||
<Border Style="{StaticResource SectionBorderStyle}">
|
||||
<StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,12">
|
||||
<Border Width="4" Height="18" CornerRadius="2" Background="#52c41a"/>
|
||||
<TextBlock Text="实时数据" Style="{StaticResource SectionTitleStyle}"/>
|
||||
</StackPanel>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="上模温度(℃)" Foreground="{DynamicResource SecondaryTextBrush}" Margin="0,0,0,4"/>
|
||||
<TextBlock Grid.Row="1" Text="{Binding UpperMoldTemp, StringFormat={}{0:N2}}" FontSize="28" FontWeight="Bold" FontFamily="Consolas"/>
|
||||
<TextBlock Grid.Column="1" Text="下模温度(℃)" Foreground="{DynamicResource SecondaryTextBrush}" Margin="0,0,0,4"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding LowerMoldTemp, StringFormat={}{0:N2}}" FontSize="28" FontWeight="Bold" FontFamily="Consolas"/>
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="S'(dNm)" Foreground="{DynamicResource SecondaryTextBrush}" Margin="0,12,0,4"/>
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Margin="0,32,0,0" Text="{Binding TorqueS, StringFormat={}{0:N2}}" FontSize="28" FontWeight="Bold" FontFamily="Consolas"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- 试验信息 -->
|
||||
<Border Style="{StaticResource SectionBorderStyle}">
|
||||
<StackPanel>
|
||||
<Grid Margin="0,0,0,12">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Border Width="4" Height="18" CornerRadius="2" Background="#1890ff"/>
|
||||
<TextBlock Text="试验信息" Style="{StaticResource SectionTitleStyle}"/>
|
||||
</StackPanel>
|
||||
<Button Content="刷新计划" Command="{Binding RefreshPlansCommand}"
|
||||
Style="{StaticResource ButtonDefault}" Height="26" Padding="8,0"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
|
||||
<hc:Row Gutter="10">
|
||||
<!-- 密炼日期 -->
|
||||
<hc:Col Span="12">
|
||||
<hc:DatePicker SelectedDate="{Binding MixingDate}"
|
||||
hc:InfoElement.Title="密炼日期"
|
||||
hc:InfoElement.TitleWidth="90"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.Necessary="True"
|
||||
hc:InfoElement.Symbol="*"
|
||||
Margin="0,0,0,8"/>
|
||||
</hc:Col>
|
||||
<!-- 密炼机台 -->
|
||||
<hc:Col Span="12">
|
||||
<hc:ComboBox ItemsSource="{Binding MachineOptions}"
|
||||
SelectedItem="{Binding SelectedMachine}"
|
||||
hc:InfoElement.Title="密炼机台"
|
||||
hc:InfoElement.TitleWidth="90"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.Placeholder="请先选择密炼日期"
|
||||
hc:InfoElement.Necessary="True"
|
||||
hc:InfoElement.Symbol="*"
|
||||
Margin="0,0,0,8"/>
|
||||
</hc:Col>
|
||||
<!-- 班次 -->
|
||||
<hc:Col Span="12">
|
||||
<hc:ComboBox ItemsSource="{Binding ShiftOptions}"
|
||||
SelectedItem="{Binding SelectedShift}"
|
||||
DisplayMemberPath="Name"
|
||||
hc:InfoElement.Title="班次"
|
||||
hc:InfoElement.TitleWidth="90"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.Placeholder="请先选择机台"
|
||||
hc:InfoElement.Necessary="True"
|
||||
hc:InfoElement.Symbol="*"
|
||||
Margin="0,0,0,8"/>
|
||||
</hc:Col>
|
||||
<!-- 密炼生产计划 -->
|
||||
<hc:Col Span="24">
|
||||
<hc:ComboBox ItemsSource="{Binding PlanOptions}"
|
||||
SelectedItem="{Binding SelectedPlan}"
|
||||
DisplayMemberPath="DisplayText"
|
||||
hc:InfoElement.Title="密炼计划"
|
||||
hc:InfoElement.TitleWidth="90"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.Placeholder="按日期、机台、班次筛选后选择"
|
||||
hc:InfoElement.Necessary="True"
|
||||
hc:InfoElement.Symbol="*"
|
||||
Margin="0,0,0,8"/>
|
||||
</hc:Col>
|
||||
<!-- 生产订单号 -->
|
||||
<hc:Col Span="12">
|
||||
<hc:TextBox Text="{Binding ProductionOrderNo, Mode=OneWay}"
|
||||
IsReadOnly="True"
|
||||
hc:InfoElement.Title="生产订单号"
|
||||
hc:InfoElement.TitleWidth="90"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.Placeholder="选择计划后自动带出"
|
||||
hc:InfoElement.Necessary="True"
|
||||
hc:InfoElement.Symbol="*"
|
||||
Margin="0,0,0,8"/>
|
||||
</hc:Col>
|
||||
<!-- 胶料名称 -->
|
||||
<hc:Col Span="12">
|
||||
<hc:TextBox Text="{Binding RubberMaterialName, Mode=OneWay}"
|
||||
IsReadOnly="True"
|
||||
hc:InfoElement.Title="胶料名称"
|
||||
hc:InfoElement.TitleWidth="90"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.Placeholder="选择计划后自动带出"
|
||||
Margin="0,0,0,8"/>
|
||||
</hc:Col>
|
||||
<!-- 车次 -->
|
||||
<hc:Col Span="12">
|
||||
<hc:TextBox Text="{Binding TrainNo, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.Title="车次"
|
||||
hc:InfoElement.TitleWidth="90"
|
||||
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="12">
|
||||
<hc:TextBox Text="{Binding InspectTimesText, UpdateSourceTrigger=PropertyChanged}"
|
||||
hc:InfoElement.Title="试验次数"
|
||||
hc:InfoElement.TitleWidth="90"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.Placeholder="默认 1,可修改"
|
||||
hc:InfoElement.Necessary="True"
|
||||
hc:InfoElement.Symbol="*"
|
||||
hc:InfoElement.ShowClearButton="True"
|
||||
Margin="0,0,0,0"/>
|
||||
</hc:Col>
|
||||
</hc:Row>
|
||||
|
||||
<TextBlock Text="按密炼日期 → 机台 → 班次筛选生产计划;胶料名称用于匹配快检实验标准"
|
||||
FontSize="11"
|
||||
Foreground="{DynamicResource SecondaryTextBrush}"
|
||||
Margin="0,8,0,0"
|
||||
TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- 数据标准 -->
|
||||
<Border Style="{StaticResource SectionBorderStyle}">
|
||||
<StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,8">
|
||||
<Border Width="4" Height="18" CornerRadius="2" Background="#faad14"/>
|
||||
<TextBlock Text="数据标准" Style="{StaticResource SectionTitleStyle}"/>
|
||||
</StackPanel>
|
||||
<DataGrid ItemsSource="{Binding DataPointColumns}"
|
||||
AutoGenerateColumns="False"
|
||||
IsReadOnly="True"
|
||||
HeadersVisibility="Column"
|
||||
MaxHeight="240">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="数据点" Binding="{Binding PointName}" Width="*"/>
|
||||
<DataGridTextColumn Header="下限值" Binding="{Binding LowerLimit}" Width="70"/>
|
||||
<DataGridTextColumn Header="上限值" Binding="{Binding UpperLimit}" Width="70"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
|
||||
<!-- 底部操作 -->
|
||||
<Border Grid.Row="2" Background="{DynamicResource RegionBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,1,0,0" Margin="-12,8,-12,-12">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="20,0">
|
||||
<Button Content="保存快检记录" Command="{Binding SaveCommand}" Style="{StaticResource ButtonPrimary}" Height="36" Width="140"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,72 @@
|
||||
using System.Windows.Controls;
|
||||
using YY.Admin.ViewModels.RubberQuickTest;
|
||||
|
||||
namespace YY.Admin.Views.RubberQuickTest;
|
||||
|
||||
public partial class RubberQuickTestOperationView : UserControl
|
||||
{
|
||||
private RubberQuickTestOperationViewModel? _vm;
|
||||
|
||||
public RubberQuickTestOperationView()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContextChanged += OnDataContextChanged;
|
||||
}
|
||||
|
||||
private void OnDataContextChanged(object sender, System.Windows.DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
if (_vm != null)
|
||||
_vm.InspectColumnsChanged -= RebuildInspectColumns;
|
||||
_vm = DataContext as RubberQuickTestOperationViewModel;
|
||||
if (_vm != null)
|
||||
{
|
||||
_vm.InspectColumnsChanged += RebuildInspectColumns;
|
||||
RebuildInspectColumns();
|
||||
}
|
||||
}
|
||||
|
||||
private void RebuildInspectColumns()
|
||||
{
|
||||
if (_vm == null) return;
|
||||
|
||||
InspectResultGrid.Columns.Clear();
|
||||
InspectResultGrid.Columns.Add(new DataGridTextColumn
|
||||
{
|
||||
Header = "编号",
|
||||
Binding = new System.Windows.Data.Binding("RowNo"),
|
||||
IsReadOnly = true,
|
||||
Width = 80
|
||||
});
|
||||
|
||||
for (int i = 0; i < _vm.DataPointColumns.Count; i++)
|
||||
{
|
||||
var col = _vm.DataPointColumns[i];
|
||||
var binding = new System.Windows.Data.Binding($"Cells[{i}].Value")
|
||||
{
|
||||
UpdateSourceTrigger = System.Windows.Data.UpdateSourceTrigger.PropertyChanged,
|
||||
Mode = System.Windows.Data.BindingMode.TwoWay
|
||||
};
|
||||
InspectResultGrid.Columns.Add(new DataGridTextColumn
|
||||
{
|
||||
Header = col.PointName ?? $"点{i + 1}",
|
||||
Binding = binding,
|
||||
Width = 90,
|
||||
IsReadOnly = false
|
||||
});
|
||||
}
|
||||
|
||||
InspectResultGrid.Columns.Add(new DataGridTextColumn
|
||||
{
|
||||
Header = "实验结果",
|
||||
Binding = new System.Windows.Data.Binding("InspectResultText"),
|
||||
IsReadOnly = true,
|
||||
Width = 90
|
||||
});
|
||||
}
|
||||
|
||||
private void InspectResultGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
if (_vm == null) return;
|
||||
_vm.SelectedInspectRow = InspectResultGrid.SelectedItem as QuickTestInspectRowViewModel;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
<UserControl x:Class="YY.Admin.Views.RubberQuickTestStd.RubberQuickTestStdDetailDialogView"
|
||||
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:prism="http://prismlibrary.com/"
|
||||
prism:ViewModelLocator.AutoWireViewModel="True"
|
||||
mc:Ignorable="d"
|
||||
Width="900"
|
||||
MinHeight="520">
|
||||
|
||||
<Grid Background="{DynamicResource ThirdlyRegionBrush}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<hc:SimplePanel Margin="20">
|
||||
<TextBlock FontSize="18" Foreground="{DynamicResource PrimaryTextBrush}"
|
||||
Text="胶料快检实验标准详情" HorizontalAlignment="Left"/>
|
||||
<Button Width="22" Height="22" Command="hc:ControlCommands.Close"
|
||||
Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource PrimaryBrush}"
|
||||
hc:IconElement.Geometry="{StaticResource ErrorGeometry}"
|
||||
Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top"/>
|
||||
</hc:SimplePanel>
|
||||
|
||||
<hc:ScrollViewer Grid.Row="1" IsInertiaEnabled="True">
|
||||
<StackPanel Margin="20,0,20,0">
|
||||
<hc:Row Gutter="10">
|
||||
<hc:Col Span="12">
|
||||
<hc:TextBox Text="{Binding Std.StdName, Mode=OneWay}" IsReadOnly="True"
|
||||
hc:InfoElement.Title="标准名称" hc:InfoElement.TitleWidth="90" hc:InfoElement.TitlePlacement="Left"
|
||||
Margin="0,0,0,12"/>
|
||||
</hc:Col>
|
||||
<hc:Col Span="12">
|
||||
<hc:TextBox Text="{Binding Std.TestMethodName, Mode=OneWay}" IsReadOnly="True"
|
||||
hc:InfoElement.Title="实验方法" hc:InfoElement.TitleWidth="90" hc:InfoElement.TitlePlacement="Left"
|
||||
Margin="0,0,0,12"/>
|
||||
</hc:Col>
|
||||
<hc:Col Span="12">
|
||||
<hc:TextBox Text="{Binding Std.RubberMaterialName, Mode=OneWay}" IsReadOnly="True"
|
||||
hc:InfoElement.Title="胶料名称" hc:InfoElement.TitleWidth="90" hc:InfoElement.TitlePlacement="Left"
|
||||
Margin="0,0,0,12"/>
|
||||
</hc:Col>
|
||||
<hc:Col Span="12">
|
||||
<hc:TextBox Text="{Binding Std.IssueNumber, Mode=OneWay}" IsReadOnly="True"
|
||||
hc:InfoElement.Title="发行编号" hc:InfoElement.TitleWidth="90" hc:InfoElement.TitlePlacement="Left"
|
||||
Margin="0,0,0,12"/>
|
||||
</hc:Col>
|
||||
<hc:Col Span="12">
|
||||
<hc:TextBox Text="{Binding Std.IssueDate, Mode=OneWay, StringFormat={}{0:yyyy-MM-dd}}" IsReadOnly="True"
|
||||
hc:InfoElement.Title="发行日期" hc:InfoElement.TitleWidth="90" hc:InfoElement.TitlePlacement="Left"
|
||||
Margin="0,0,0,12"/>
|
||||
</hc:Col>
|
||||
<hc:Col Span="12">
|
||||
<hc:TextBox Text="{Binding Std.IssueDeptName, Mode=OneWay}" IsReadOnly="True"
|
||||
hc:InfoElement.Title="发行部门" hc:InfoElement.TitleWidth="90" hc:InfoElement.TitlePlacement="Left"
|
||||
Margin="0,0,0,12"/>
|
||||
</hc:Col>
|
||||
<hc:Col Span="12">
|
||||
<hc:TextBox Text="{Binding Std.EnableStatusText, Mode=OneWay}" IsReadOnly="True"
|
||||
hc:InfoElement.Title="启用状态" hc:InfoElement.TitleWidth="90" hc:InfoElement.TitlePlacement="Left"
|
||||
Margin="0,0,0,12"/>
|
||||
</hc:Col>
|
||||
<hc:Col Span="12">
|
||||
<hc:TextBox Text="{Binding Std.AuditStatusText, Mode=OneWay}" IsReadOnly="True"
|
||||
hc:InfoElement.Title="审核状态" hc:InfoElement.TitleWidth="90" hc:InfoElement.TitlePlacement="Left"
|
||||
Margin="0,0,0,12"/>
|
||||
</hc:Col>
|
||||
</hc:Row>
|
||||
|
||||
<TextBlock Text="标准明细(数据点上下限)" FontWeight="SemiBold" Margin="0,8,0,8"/>
|
||||
<DataGrid ItemsSource="{Binding Lines}"
|
||||
AutoGenerateColumns="False"
|
||||
IsReadOnly="True"
|
||||
HeadersVisibility="Column"
|
||||
MaxHeight="280"
|
||||
CanUserAddRows="False">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="数据点" Binding="{Binding PointName}" Width="*"/>
|
||||
<DataGridTextColumn Header="下限值" Binding="{Binding LowerLimit}" Width="90"/>
|
||||
<DataGridTextColumn Header="下警告" Binding="{Binding LowerWarn}" Width="90"/>
|
||||
<DataGridTextColumn Header="目标值" Binding="{Binding TargetValue}" Width="90"/>
|
||||
<DataGridTextColumn Header="上警告" Binding="{Binding UpperWarn}" Width="90"/>
|
||||
<DataGridTextColumn Header="上限值" Binding="{Binding UpperLimit}" Width="90"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</StackPanel>
|
||||
</hc:ScrollViewer>
|
||||
|
||||
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="20">
|
||||
<Button Content="关闭" Command="{Binding CloseCommand}" Style="{StaticResource ButtonPrimary}" Width="100"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace YY.Admin.Views.RubberQuickTestStd;
|
||||
|
||||
public partial class RubberQuickTestStdDetailDialogView : UserControl
|
||||
{
|
||||
public RubberQuickTestStdDetailDialogView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
<UserControl x:Class="YY.Admin.Views.RubberQuickTestStd.RubberQuickTestStdListView"
|
||||
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">
|
||||
|
||||
<Grid Style="{StaticResource BaseViewStyle}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Grid.Row="0" CornerRadius="4" Margin="0 0 -10 0">
|
||||
<hc:Row>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=8, Md=6, Lg=6, Xl=4}">
|
||||
<hc:TextBox Text="{Binding FilterStdName, UpdateSourceTrigger=PropertyChanged}"
|
||||
Margin="0 0 10 10"
|
||||
hc:InfoElement.Title="标准名称"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.TitleWidth="75"
|
||||
hc:InfoElement.Placeholder="实验标准名称"
|
||||
hc:InfoElement.ShowClearButton="True"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=8, Md=6, Lg=6, Xl=4}">
|
||||
<hc:TextBox Text="{Binding FilterRubberMaterialName, UpdateSourceTrigger=PropertyChanged}"
|
||||
Margin="0 0 10 10"
|
||||
hc:InfoElement.Title="胶料名称"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.TitleWidth="75"
|
||||
hc:InfoElement.Placeholder="胶料名称"
|
||||
hc:InfoElement.ShowClearButton="True"/>
|
||||
</hc:Col>
|
||||
<hc:Col Layout="{hc:ColLayout Xs=12, Sm=8, Md=6, Lg=6, Xl=4}">
|
||||
<hc:ComboBox SelectedValuePath="Value"
|
||||
DisplayMemberPath="Key"
|
||||
ItemsSource="{Binding EnableStatusOptions}"
|
||||
SelectedValue="{Binding FilterEnableStatus}"
|
||||
Margin="0 0 10 10"
|
||||
hc:InfoElement.Title="启用状态"
|
||||
hc:InfoElement.TitlePlacement="Left"
|
||||
hc:InfoElement.TitleWidth="75"
|
||||
hc:InfoElement.Placeholder="全部"
|
||||
hc:InfoElement.ShowClearButton="True"/>
|
||||
</hc:Col>
|
||||
</hc:Row>
|
||||
</Border>
|
||||
|
||||
<Border Grid.Row="1" Margin="0,10">
|
||||
<hc:UniformSpacingPanel Spacing="10">
|
||||
<Button Style="{StaticResource ButtonPrimary}" Command="{Binding SearchCommand}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<md:PackIcon Kind="Search"/>
|
||||
<TextBlock Text="搜索" Style="{StaticResource IconButtonStyle}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Style="{StaticResource ButtonDefault}" Command="{Binding ResetCommand}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<md:PackIcon Kind="Refresh"/>
|
||||
<TextBlock Text="重置" Style="{StaticResource IconButtonStyle}"/>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<TextBlock Text="数据来自 MES,桌面端只读;断网时显示本地缓存"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource SecondaryTextBrush}"
|
||||
FontSize="12"/>
|
||||
</hc:UniformSpacingPanel>
|
||||
</Border>
|
||||
|
||||
<DataGrid Grid.Row="2"
|
||||
ItemsSource="{Binding Items}"
|
||||
AutoGenerateColumns="False"
|
||||
IsReadOnly="True"
|
||||
CanUserAddRows="False"
|
||||
SelectionMode="Single"
|
||||
GridLinesVisibility="Horizontal"
|
||||
HorizontalGridLinesBrush="#FFEDEDED"
|
||||
VerticalGridLinesBrush="Transparent"
|
||||
HeadersVisibility="All"
|
||||
ColumnHeaderStyle="{StaticResource CusDataGridColumnHeaderStyle}"
|
||||
Style="{StaticResource CusDataGridStyle}"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
HorizontalScrollBarVisibility="Auto">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="实验标准名称" Binding="{Binding StdName}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="180"/>
|
||||
<DataGridTextColumn Header="实验方法" Binding="{Binding TestMethodName}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="140"/>
|
||||
<DataGridTextColumn Header="胶料名称" Binding="{Binding RubberMaterialName}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="140"/>
|
||||
<DataGridTextColumn Header="发行编号" Binding="{Binding IssueNumber}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="120"/>
|
||||
<DataGridTextColumn Header="发行部门" Binding="{Binding IssueDeptName}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="120"/>
|
||||
<DataGridTextColumn Header="启用状态" Binding="{Binding EnableStatusText}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="90"/>
|
||||
<DataGridTextColumn Header="审核状态" Binding="{Binding AuditStatusText}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="90"/>
|
||||
<DataGridTextColumn Header="创建人" Binding="{Binding CreateBy}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="100"/>
|
||||
<DataGridTextColumn Header="创建时间" Binding="{Binding CreateTime, StringFormat={}{0:yyyy-MM-dd HH:mm}}" CellStyle="{StaticResource CusDataGridCellStyle}" Width="150"/>
|
||||
<DataGridTemplateColumn Header="操作" Width="100" CellStyle="{StaticResource CusOperDataGridCellStyle}">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Border Style="{DynamicResource DataGridOpeButtonStyle}">
|
||||
<Border.InputBindings>
|
||||
<MouseBinding Command="{Binding DataContext.ViewDetailCommand, RelativeSource={RelativeSource AncestorType=DataGrid}}"
|
||||
CommandParameter="{Binding}" MouseAction="LeftClick"/>
|
||||
</Border.InputBindings>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<md:PackIcon Kind="EyeOutline" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="详情" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,0,0">
|
||||
<TextBlock Text="{Binding Total, StringFormat=共 {0} 条}" VerticalAlignment="Center" Margin="0,0,16,0"
|
||||
Foreground="{DynamicResource SecondaryTextBrush}"/>
|
||||
<Button Content="上一页" Command="{Binding PrevPageCommand}" Style="{StaticResource ButtonDefault}" Margin="0,0,4,0" Width="80"/>
|
||||
<TextBlock Text="{Binding PageNo, StringFormat=第 {0} 页}" VerticalAlignment="Center" Margin="8,0"
|
||||
Foreground="{DynamicResource PrimaryTextBrush}"/>
|
||||
<Button Content="下一页" Command="{Binding NextPageCommand}" Style="{StaticResource ButtonDefault}" Width="80"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace YY.Admin.Views.RubberQuickTestStd;
|
||||
|
||||
public partial class RubberQuickTestStdListView : UserControl
|
||||
{
|
||||
public RubberQuickTestStdListView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user