|
@@ -0,0 +1,746 @@
|
|
|
+<UserControl
|
|
|
+ x:Class="UniformMaterialManagementSystem.Views.SampleRegistration.SampleRegistrationManagePage"
|
|
|
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
+ xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
|
|
+ xmlns:behaviors="clr-namespace:UniformMaterialManagementSystem.Behaviors"
|
|
|
+ xmlns:control="http://FilterDataGrid.Control.com/2024"
|
|
|
+ xmlns:converters="clr-namespace:UniformMaterialManagementSystem.Converters"
|
|
|
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
+ xmlns:filterDataGrid="http://FilterDataGrid.Control.com/2024"
|
|
|
+ xmlns:local="clr-namespace:UniformMaterialManagementSystem.Views"
|
|
|
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
+ xmlns:utils="clr-namespace:UniformMaterialManagementSystem.Utils"
|
|
|
+ d:DesignHeight="450"
|
|
|
+ d:DesignWidth="800"
|
|
|
+ mc:Ignorable="d">
|
|
|
+
|
|
|
+ <UserControl.Resources>
|
|
|
+ <converters:ContentToBoolConverter x:Key="ContentToBoolConverter" />
|
|
|
+ <!-- 定义一个全局的TextBlock样式 -->
|
|
|
+ <Style TargetType="TextBlock">
|
|
|
+ <Setter Property="FontSize" Value="14" />
|
|
|
+ <Setter Property="Margin" Value="5" />
|
|
|
+ <Setter Property="VerticalAlignment" Value="Center" />
|
|
|
+ <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationErrorTemplate}" />
|
|
|
+ </Style>
|
|
|
+ <Style TargetType="RadioButton">
|
|
|
+ <Setter Property="FontSize" Value="14" />
|
|
|
+ <Setter Property="VerticalAlignment" Value="Center" />
|
|
|
+ </Style>
|
|
|
+ <Style TargetType="ComboBox">
|
|
|
+ <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationErrorTemplate}" />
|
|
|
+ </Style>
|
|
|
+ <Style TargetType="DatePicker">
|
|
|
+ <Setter Property="Height" Value="25" />
|
|
|
+ <Setter Property="FontSize" Value="14" />
|
|
|
+ <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationErrorTemplate}" />
|
|
|
+ </Style>
|
|
|
+ <Style TargetType="TextBox">
|
|
|
+ <Setter Property="Height" Value="25" />
|
|
|
+ <Setter Property="FontSize" Value="14" />
|
|
|
+ <Setter Property="VerticalContentAlignment" Value="Center" />
|
|
|
+ <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationErrorTemplate}" />
|
|
|
+ </Style>
|
|
|
+ <ControlTemplate x:Key="CustomColumnHeaderTemplate" TargetType="DataGridColumnHeader">
|
|
|
+ <Border BorderBrush="LightSlateGray" BorderThickness="0,0,1,1">
|
|
|
+ <Grid>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition />
|
|
|
+ <ColumnDefinition Width="Auto" />
|
|
|
+ <ColumnDefinition Width="Auto" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Border
|
|
|
+ Grid.Column="0"
|
|
|
+ BorderBrush="#E9ECF1"
|
|
|
+ BorderThickness="0,0,0,1">
|
|
|
+ <ContentPresenter
|
|
|
+ Margin="5,0"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+ </Border>
|
|
|
+ <Path
|
|
|
+ x:Name="SortArrow"
|
|
|
+ Grid.Column="1"
|
|
|
+ Margin="0,0,5,0"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Data="M 0 0 L 10 0 L 5 5 Z"
|
|
|
+ Fill="Gray"
|
|
|
+ Visibility="Collapsed" />
|
|
|
+ <Thumb
|
|
|
+ x:Name="PART_RightHeaderGripper"
|
|
|
+ Grid.Column="2"
|
|
|
+ Width="1"
|
|
|
+ Height="25"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ BorderBrush="#E9ECF1"
|
|
|
+ BorderThickness="1"
|
|
|
+ Cursor="SizeWE" />
|
|
|
+ </Grid>
|
|
|
+ </Border>
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger Property="SortDirection" Value="Ascending">
|
|
|
+ <Setter TargetName="SortArrow" Property="Data" Value="M 0 5 L 10 5 L 5 0 Z" />
|
|
|
+ <Setter TargetName="SortArrow" Property="Visibility" Value="Visible" />
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="SortDirection" Value="Descending">
|
|
|
+ <Setter TargetName="SortArrow" Property="Data" Value="M 0 0 L 10 0 L 5 5 Z" />
|
|
|
+ <Setter TargetName="SortArrow" Property="Visibility" Value="Visible" />
|
|
|
+ </Trigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+
|
|
|
+ <Style x:Key="CustomColumnHeaderStyle" TargetType="DataGridColumnHeader">
|
|
|
+ <Setter Property="Background" Value="White" />
|
|
|
+ <Setter Property="Foreground" Value="Black" />
|
|
|
+ <Setter Property="FontWeight" Value="Bold" />
|
|
|
+ <Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
|
+ <Setter Property="VerticalContentAlignment" Value="Center" />
|
|
|
+ <Setter Property="Height" Value="40" />
|
|
|
+ <Setter Property="Template" Value="{StaticResource CustomColumnHeaderTemplate}" />
|
|
|
+ </Style>
|
|
|
+
|
|
|
+ <Style x:Key="CustomRowHeaderStyle" TargetType="DataGridRowHeader">
|
|
|
+ <Setter Property="Background" Value="White" />
|
|
|
+ <Setter Property="Foreground" Value="Black" />
|
|
|
+ <Setter Property="BorderThickness" Value="0,0,1,1" />
|
|
|
+ <Setter Property="BorderBrush" Value="LightSlateGray" />
|
|
|
+ </Style>
|
|
|
+
|
|
|
+ <Style x:Key="CustomRowStyle" TargetType="DataGridRow">
|
|
|
+ <Setter Property="Background" Value="White" />
|
|
|
+ <Setter Property="FontSize" Value="13" />
|
|
|
+ <Setter Property="Height" Value="26" />
|
|
|
+
|
|
|
+ <Style.Triggers>
|
|
|
+ <Trigger Property="AlternationIndex" Value="1">
|
|
|
+ <Setter Property="Background" Value="WhiteSmoke" />
|
|
|
+ </Trigger>
|
|
|
+ <Trigger Property="IsSelected" Value="True">
|
|
|
+ <Setter Property="Background" Value="LightBlue" />
|
|
|
+ </Trigger>
|
|
|
+ </Style.Triggers>
|
|
|
+ </Style>
|
|
|
+ <Style
|
|
|
+ x:Key="CustomCellStyle"
|
|
|
+ BasedOn="{StaticResource {x:Type DataGridCell}}"
|
|
|
+ TargetType="DataGridCell">
|
|
|
+ <Setter Property="Background" Value="White" />
|
|
|
+ <Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
|
+ <Setter Property="VerticalContentAlignment" Value="Center" />
|
|
|
+ <Setter Property="Padding" Value="10" />
|
|
|
+ <Style.Triggers>
|
|
|
+ <Trigger Property="IsSelected" Value="True">
|
|
|
+ <Setter Property="Background" Value="LightBlue" />
|
|
|
+ <Setter Property="Foreground" Value="Black" />
|
|
|
+ </Trigger>
|
|
|
+ </Style.Triggers>
|
|
|
+ </Style>
|
|
|
+
|
|
|
+ </UserControl.Resources>
|
|
|
+ <Grid>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ <ColumnDefinition Width="Auto" />
|
|
|
+ <ColumnDefinition Width="2*" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <Grid Grid.Column="0">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="Auto" />
|
|
|
+ <RowDefinition Height="*" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Grid Grid.Row="0">
|
|
|
+ <!-- 菜单项 -->
|
|
|
+ <Border
|
|
|
+ Grid.Row="0"
|
|
|
+ BorderBrush="Gray"
|
|
|
+ BorderThickness="1">
|
|
|
+ <ToolBarPanel>
|
|
|
+ <ToolBar Background="White" ToolBarTray.IsLocked="True">
|
|
|
+
|
|
|
+ <Button Command="{Binding LoadDataCommand}">
|
|
|
+ <Button.Template>
|
|
|
+ <ControlTemplate>
|
|
|
+ <Border
|
|
|
+ Width="45"
|
|
|
+ Background="{TemplateBinding Background}"
|
|
|
+ CornerRadius="5">
|
|
|
+ <StackPanel HorizontalAlignment="Center" Orientation="Vertical">
|
|
|
+ <TextBlock
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ FontFamily="{StaticResource FluentSystemIconsRegular}"
|
|
|
+ FontSize="20"
|
|
|
+ Text="{x:Static utils:RegularFontUtil.Arrow_Clockwise_12}" />
|
|
|
+ <TextBlock Text=" 刷新 " />
|
|
|
+ </StackPanel>
|
|
|
+ </Border>
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger Property="IsMouseOver" Value="True">
|
|
|
+ <Setter Property="Background" Value="LightGray" />
|
|
|
+ </Trigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Button.Template>
|
|
|
+ </Button>
|
|
|
+ <Separator />
|
|
|
+ <!--<Button Command="{Binding AddSampleRegistrationCommand}">
|
|
|
+ <Button.Template>
|
|
|
+ <ControlTemplate>
|
|
|
+ <Border
|
|
|
+ Width="40"
|
|
|
+ Background="{TemplateBinding Background}"
|
|
|
+ CornerRadius="5">
|
|
|
+ <StackPanel HorizontalAlignment="Center" Orientation="Vertical">
|
|
|
+ <TextBlock
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ FontFamily="{StaticResource FluentSystemIconsRegular}"
|
|
|
+ FontSize="20"
|
|
|
+ Text="{x:Static utils:RegularFontUtil.Add_Circle_32}" />
|
|
|
+ <TextBlock Text="新增" />
|
|
|
+ </StackPanel>
|
|
|
+ </Border>
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger Property="IsMouseOver" Value="True">
|
|
|
+ <Setter Property="Background" Value="LightGray" />
|
|
|
+ </Trigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Button.Template>
|
|
|
+ </Button>-->
|
|
|
+ <!--<Button Command="{Binding SaveSampleRegistrationCommand}">
|
|
|
+ <Button.Template>
|
|
|
+ <ControlTemplate>
|
|
|
+ <Border
|
|
|
+ Width="40"
|
|
|
+ Background="{TemplateBinding Background}"
|
|
|
+ CornerRadius="5">
|
|
|
+ <StackPanel HorizontalAlignment="Center" Orientation="Vertical">
|
|
|
+ <TextBlock
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ FontFamily="{StaticResource FluentSystemIconsRegular}"
|
|
|
+ FontSize="20"
|
|
|
+ Text="{x:Static utils:RegularFontUtil.Save_32}" />
|
|
|
+ <TextBlock Text="保存" />
|
|
|
+ </StackPanel>
|
|
|
+ </Border>
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger Property="IsMouseOver" Value="True">
|
|
|
+ <Setter Property="Background" Value="LightGray" />
|
|
|
+ </Trigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Button.Template>
|
|
|
+ </Button>-->
|
|
|
+ <Button Command="{Binding RemoveSampleRegistrationCommand}">
|
|
|
+ <Button.Template>
|
|
|
+ <ControlTemplate>
|
|
|
+ <Border
|
|
|
+ Width="70"
|
|
|
+ Background="{TemplateBinding Background}"
|
|
|
+ CornerRadius="5">
|
|
|
+ <StackPanel HorizontalAlignment="Center" Orientation="Vertical">
|
|
|
+ <TextBlock
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ FontFamily="{StaticResource FluentSystemIconsRegular}"
|
|
|
+ FontSize="20"
|
|
|
+ Text="{x:Static utils:RegularFontUtil.Delete_48}" />
|
|
|
+ <TextBlock Text="删除登记表" />
|
|
|
+ </StackPanel>
|
|
|
+ </Border>
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger Property="IsMouseOver" Value="True">
|
|
|
+ <Setter Property="Background" Value="LightGray" />
|
|
|
+ </Trigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Button.Template>
|
|
|
+ </Button>
|
|
|
+ <Separator />
|
|
|
+ <Button Command="{Binding ExportSampleRegistrationCommand}">
|
|
|
+ <Button.Template>
|
|
|
+ <ControlTemplate>
|
|
|
+ <Border
|
|
|
+ Width="60"
|
|
|
+ Background="{TemplateBinding Background}"
|
|
|
+ CornerRadius="5">
|
|
|
+ <StackPanel HorizontalAlignment="Center" Orientation="Vertical">
|
|
|
+ <TextBlock
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ FontFamily="{StaticResource FluentSystemIconsRegular}"
|
|
|
+ FontSize="20"
|
|
|
+ Text="{x:Static utils:RegularFontUtil.Dock_20}" />
|
|
|
+ <TextBlock Text="导出登记表" />
|
|
|
+ </StackPanel>
|
|
|
+ </Border>
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger Property="IsMouseOver" Value="True">
|
|
|
+ <Setter Property="Background" Value="LightGray" />
|
|
|
+ </Trigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Button.Template>
|
|
|
+ </Button>
|
|
|
+
|
|
|
+ </ToolBar>
|
|
|
+ </ToolBarPanel>
|
|
|
+ </Border>
|
|
|
+ </Grid>
|
|
|
+ <filterDataGrid:FilterDataGrid
|
|
|
+ x:Name="DataGridMain"
|
|
|
+ Grid.Row="1"
|
|
|
+ behaviors:DataGridBehavior.RowNumbers="True"
|
|
|
+ AutoGenerateColumns="False"
|
|
|
+ Background="White"
|
|
|
+ CanUserAddRows="False"
|
|
|
+ CanUserReorderColumns="True"
|
|
|
+ CellStyle="{StaticResource CustomCellStyle}"
|
|
|
+ ColumnHeaderStyle="{StaticResource CustomColumnHeaderStyle}"
|
|
|
+ FilterLanguage="SimplifiedChinese"
|
|
|
+ HeadersVisibility="All"
|
|
|
+ HorizontalGridLinesBrush="LightSlateGray"
|
|
|
+ ItemsSource="{Binding SampleRegistrations, Mode=TwoWay}"
|
|
|
+ RowHeaderStyle="{StaticResource CustomRowHeaderStyle}"
|
|
|
+ RowStyle="{StaticResource CustomRowStyle}"
|
|
|
+ SelectedItem="{Binding SelectedSampleRegistration, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
+ SelectionChanged="DataGridMain_OnSelectionChanged"
|
|
|
+ SelectionMode="Single"
|
|
|
+ ShowRowsCount="True"
|
|
|
+ ShowStatusBar="True"
|
|
|
+ VerticalGridLinesBrush="LightSlateGray">
|
|
|
+
|
|
|
+ <!-- 选择行事件 -->
|
|
|
+ <!--<b:Interaction.Triggers>
|
|
|
+ <b:EventTrigger EventName="SelectionChanged">
|
|
|
+ <b:InvokeCommandAction Command="{Binding SampleRegistrationSelectionChangedCommand}" CommandParameter="{Binding ElementName=DataGridMain, Path=SelectedItem}" />
|
|
|
+ </b:EventTrigger>
|
|
|
+ </b:Interaction.Triggers>-->
|
|
|
+
|
|
|
+ <control:FilterDataGrid.Resources>
|
|
|
+ <!-- 非编辑模式下文本居中的样式 -->
|
|
|
+ <Style x:Key="TextColumnElementStyle" TargetType="TextBlock">
|
|
|
+ <Setter Property="HorizontalAlignment" Value="Center" />
|
|
|
+ <Setter Property="VerticalAlignment" Value="Center" />
|
|
|
+ <Setter Property="TextAlignment" Value="Center" />
|
|
|
+ </Style>
|
|
|
+
|
|
|
+ <!-- 编辑模式下文本居中的样式 -->
|
|
|
+ <Style x:Key="TextColumnEditingElementStyle" TargetType="TextBox">
|
|
|
+ <Setter Property="HorizontalAlignment" Value="Stretch" />
|
|
|
+ <Setter Property="VerticalAlignment" Value="Stretch" />
|
|
|
+ <Setter Property="VerticalContentAlignment" Value="Center" />
|
|
|
+ </Style>
|
|
|
+ </control:FilterDataGrid.Resources>
|
|
|
+
|
|
|
+ <control:FilterDataGrid.Columns>
|
|
|
+ <DataGridTextColumn
|
|
|
+ Width="60"
|
|
|
+ Binding="{Binding Year}"
|
|
|
+ EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
|
+ ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
+ Header="工作年度"
|
|
|
+ IsReadOnly="True" />
|
|
|
+ <control:FilterDataGridTextColumn
|
|
|
+ Width="300"
|
|
|
+ Binding="{Binding SampleNo}"
|
|
|
+ EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
|
+ ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
+ Header="抽样登记表编号"
|
|
|
+ IsColumnFiltered="True"
|
|
|
+ IsReadOnly="True" />
|
|
|
+ <control:FilterDataGridTextColumn
|
|
|
+ Width="200"
|
|
|
+ Binding="{Binding InspectApply.Company}"
|
|
|
+ EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
|
+ ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
+ Header="生产企业"
|
|
|
+ IsColumnFiltered="True"
|
|
|
+ IsReadOnly="True" />
|
|
|
+ <control:FilterDataGridTextColumn
|
|
|
+ Width="120"
|
|
|
+ Binding="{Binding EditTime, StringFormat=yyyy-MM-dd}"
|
|
|
+ EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
|
+ ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
+ Header="抽样时间"
|
|
|
+ IsColumnFiltered="True"
|
|
|
+ IsReadOnly="True" />
|
|
|
+ <control:FilterDataGridTextColumn
|
|
|
+ Width="200"
|
|
|
+ Binding="{Binding BatchNo}"
|
|
|
+ EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
|
+ ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
+ Header="批号"
|
|
|
+ IsColumnFiltered="True"
|
|
|
+ IsReadOnly="True" />
|
|
|
+ <control:FilterDataGridTextColumn
|
|
|
+ Width="120"
|
|
|
+ Binding="{Binding PacketNo}"
|
|
|
+ EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
|
+ ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
+ Header="包号"
|
|
|
+ IsColumnFiltered="True"
|
|
|
+ IsReadOnly="True" />
|
|
|
+
|
|
|
+ <control:FilterDataGridTextColumn
|
|
|
+ Width="100"
|
|
|
+ Binding="{Binding EditUser}"
|
|
|
+ EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
|
+ ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
+ Header="承办人"
|
|
|
+ IsColumnFiltered="True"
|
|
|
+ IsReadOnly="True" />
|
|
|
+
|
|
|
+ </control:FilterDataGrid.Columns>
|
|
|
+ </filterDataGrid:FilterDataGrid>
|
|
|
+ </Grid>
|
|
|
+
|
|
|
+ <GridSplitter
|
|
|
+ Grid.Column="1"
|
|
|
+ Width="2"
|
|
|
+ HorizontalAlignment="Stretch" />
|
|
|
+ <Grid Grid.Column="2" Background="White">
|
|
|
+ <ScrollViewer>
|
|
|
+ <Grid Background="White">
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="50" />
|
|
|
+ <RowDefinition Height="40" />
|
|
|
+ <RowDefinition Height="40" />
|
|
|
+ <RowDefinition Height="40" />
|
|
|
+ <RowDefinition Height="45" />
|
|
|
+ <RowDefinition Height="40" />
|
|
|
+ <RowDefinition Height="40" />
|
|
|
+ <RowDefinition Height="80" />
|
|
|
+ <RowDefinition Height="40" />
|
|
|
+ <RowDefinition Height="150" />
|
|
|
+ <RowDefinition Height="40" />
|
|
|
+ <RowDefinition Height="40" />
|
|
|
+
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="2*" />
|
|
|
+ <ColumnDefinition Width="3*" />
|
|
|
+ <ColumnDefinition Width="3*" />
|
|
|
+ <ColumnDefinition Width="3*" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+
|
|
|
+ <TextBlock
|
|
|
+ Grid.Row="0"
|
|
|
+ Grid.Column="0"
|
|
|
+ Grid.ColumnSpan="5"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontSize="25"
|
|
|
+ Text="被装材料产品抽样信息登记表" />
|
|
|
+ <TextBlock
|
|
|
+ Grid.Row="1"
|
|
|
+ Grid.Column="0"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Text="编号:" />
|
|
|
+ <TextBlock
|
|
|
+ Grid.Row="1"
|
|
|
+ Grid.Column="1"
|
|
|
+ Grid.ColumnSpan="3"
|
|
|
+ Text="{Binding SelectedSampleRegistration.SampleNo}" />
|
|
|
+ <TextBlock
|
|
|
+ Grid.Row="2"
|
|
|
+ Grid.Column="0"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Text="*单位:" />
|
|
|
+ <TextBox
|
|
|
+ Grid.Row="2"
|
|
|
+ Grid.Column="1"
|
|
|
+ IsReadOnly="True"
|
|
|
+ Text="{Binding SelectedSampleRegistration.Department, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
+ <TextBlock
|
|
|
+ Grid.Row="2"
|
|
|
+ Grid.Column="2"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Text="*时间:" />
|
|
|
+ <DatePicker
|
|
|
+ Grid.Row="2"
|
|
|
+ Grid.Column="3"
|
|
|
+ IsEnabled="False"
|
|
|
+ Text="{Binding SelectedSampleRegistration.EditTime, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
+ <TextBlock
|
|
|
+ Grid.Row="3"
|
|
|
+ Grid.Column="0"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Text="类别:" />
|
|
|
+ <Grid
|
|
|
+ Grid.Row="3"
|
|
|
+ Grid.Column="1"
|
|
|
+ Grid.ColumnSpan="3"
|
|
|
+ Background="White"
|
|
|
+ IsEnabled="False">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <RadioButton
|
|
|
+ x:Name="FirstSelected"
|
|
|
+ Grid.Column="0"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ Content="首批检验"
|
|
|
+ GroupName="CategoryGroup"
|
|
|
+ IsChecked="{Binding SelectedSampleRegistration.InspectApply.InspCategory, Converter={StaticResource ContentToBoolConverter}, ConverterParameter=首批检验}" />
|
|
|
+ <RadioButton
|
|
|
+ x:Name="SecondSelected"
|
|
|
+ Grid.Column="1"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ Content="出厂检验"
|
|
|
+ GroupName="CategoryGroup"
|
|
|
+ IsChecked="{Binding SelectedSampleRegistration.InspectApply.InspCategory, Converter={StaticResource ContentToBoolConverter}, ConverterParameter=出厂检验}" />
|
|
|
+ </Grid>
|
|
|
+ <TextBlock
|
|
|
+ Grid.Row="4"
|
|
|
+ Grid.Column="0"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Text="样品名称:"
|
|
|
+ TextWrapping="Wrap" />
|
|
|
+ <TextBlock
|
|
|
+ Grid.Row="4"
|
|
|
+ Grid.Column="1"
|
|
|
+ Text="{Binding SelectedSampleRegistration.InspectApply.Material.Name}"
|
|
|
+ TextWrapping="Wrap" />
|
|
|
+ <TextBlock
|
|
|
+ Grid.Row="4"
|
|
|
+ Grid.Column="2"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Text="生产企业:"
|
|
|
+ TextWrapping="Wrap" />
|
|
|
+ <TextBlock
|
|
|
+ Grid.Row="4"
|
|
|
+ Grid.Column="3"
|
|
|
+ Text="{Binding SelectedSampleRegistration.InspectApply.Company}"
|
|
|
+ TextWrapping="Wrap" />
|
|
|
+ <TextBlock
|
|
|
+ Grid.Row="5"
|
|
|
+ Grid.Column="0"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Text="样品生产日期:"
|
|
|
+ TextWrapping="Wrap" />
|
|
|
+ <DatePicker
|
|
|
+ Grid.Row="5"
|
|
|
+ Grid.Column="1"
|
|
|
+ IsEnabled="False"
|
|
|
+ Text="{Binding SelectedSampleRegistration.EditTime, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
+ <TextBlock
|
|
|
+ Grid.Row="5"
|
|
|
+ Grid.Column="2"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Text="*批号:" />
|
|
|
+ <TextBlock
|
|
|
+ Grid.Row="5"
|
|
|
+ Grid.Column="3"
|
|
|
+ Text="{Binding SelectedSampleRegistration.BatchNo}"
|
|
|
+ TextWrapping="Wrap" />
|
|
|
+ <TextBlock
|
|
|
+ Grid.Row="6"
|
|
|
+ Grid.Column="0"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Text="包号:" />
|
|
|
+ <TextBox
|
|
|
+ Grid.Row="6"
|
|
|
+ Grid.Column="1"
|
|
|
+ IsReadOnly="True"
|
|
|
+ Text="{Binding SelectedSampleRegistration.PacketNo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
+ <TextBlock
|
|
|
+ Grid.Row="6"
|
|
|
+ Grid.Column="2"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Text="数量:" />
|
|
|
+ <Grid
|
|
|
+ Grid.Row="6"
|
|
|
+ Grid.Column="3"
|
|
|
+ Background="White">
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ <ColumnDefinition Width="Auto" />
|
|
|
+ <ColumnDefinition Width="Auto" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <TextBox
|
|
|
+ Grid.Column="0"
|
|
|
+ IsReadOnly="True"
|
|
|
+ Text="{Binding SelectedSampleRegistration.Quantity, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
+ <TextBlock Grid.Column="1" Text="{Binding SelectedSampleRegistration.InspectApply.Material.MeasureUnit}" />
|
|
|
+ <TextBlock Grid.Column="2" Text="共3份" />
|
|
|
+ </Grid>
|
|
|
+ <TextBlock
|
|
|
+ Grid.Row="7"
|
|
|
+ Grid.Column="0"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Text="检测项目:"
|
|
|
+ TextWrapping="Wrap" />
|
|
|
+ <GroupBox
|
|
|
+ Grid.Row="7"
|
|
|
+ Grid.Column="1"
|
|
|
+ Grid.ColumnSpan="3"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Header="检测项目"
|
|
|
+ IsEnabled="False">
|
|
|
+
|
|
|
+ <WrapPanel
|
|
|
+ AllowDrop="True"
|
|
|
+ FlowDirection="LeftToRight"
|
|
|
+ Orientation="Horizontal">
|
|
|
+ <RadioButton
|
|
|
+ x:Name="TestAllRadioButton"
|
|
|
+ Padding="10,0,10,0"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Content="全检"
|
|
|
+ GroupName="TestingItemGroup"
|
|
|
+ IsChecked="{Binding SelectedSampleRegistration.TestingItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource ContentToBoolConverter}, ConverterParameter=全检}" />
|
|
|
+ <RadioButton
|
|
|
+ x:Name="MandatoryTestRadioButton"
|
|
|
+ Padding="10,0,10,0"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Content="强制性指标"
|
|
|
+ GroupName="TestingItemGroup"
|
|
|
+ IsChecked="{Binding SelectedSampleRegistration.TestingItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource ContentToBoolConverter}, ConverterParameter=强制性指标}" />
|
|
|
+ <RadioButton
|
|
|
+ x:Name="ColorFastnessRadioButton"
|
|
|
+ Padding="10,0,10,0"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Content="色牢度"
|
|
|
+ GroupName="TestingItemGroup"
|
|
|
+ IsChecked="{Binding SelectedSampleRegistration.TestingItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource ContentToBoolConverter}, ConverterParameter=色牢度}" />
|
|
|
+ <RadioButton
|
|
|
+ x:Name="SpectrumRadioButton"
|
|
|
+ Padding="10,0,10,0"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Content="光谱"
|
|
|
+ GroupName="TestingItemGroup"
|
|
|
+ IsChecked="{Binding SelectedSampleRegistration.TestingItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource ContentToBoolConverter}, ConverterParameter=光谱}" />
|
|
|
+ <RadioButton
|
|
|
+ x:Name="ReferenceRadioButton"
|
|
|
+ Padding="10,0,10,0"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Content="参考性指标"
|
|
|
+ GroupName="TestingItemGroup"
|
|
|
+ IsChecked="{Binding SelectedSampleRegistration.TestingItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource ContentToBoolConverter}, ConverterParameter=参考性指标}" />
|
|
|
+ <RadioButton
|
|
|
+ x:Name="SingleRadioButton"
|
|
|
+ Padding="10,0,10,0"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Content="单项指标"
|
|
|
+ GroupName="TestingItemGroup"
|
|
|
+ IsChecked="{Binding SelectedSampleRegistration.TestingItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource ContentToBoolConverter}, ConverterParameter=单项指标}" />
|
|
|
+ <TextBox Width="200" Text="{Binding SelectedSampleRegistration.SingleIndexItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
+ </WrapPanel>
|
|
|
+ </GroupBox>
|
|
|
+ <Button
|
|
|
+ Grid.Row="8"
|
|
|
+ Grid.Column="1"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ Command="{Binding RandomInspectionOrgCommand}"
|
|
|
+ Foreground="Gray"
|
|
|
+ IsEnabled="False">
|
|
|
+ <Button.Template>
|
|
|
+ <ControlTemplate>
|
|
|
+ <Border
|
|
|
+ Width="140"
|
|
|
+ Height="30"
|
|
|
+ Background="{TemplateBinding Background}"
|
|
|
+ CornerRadius="5">
|
|
|
+ <StackPanel
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Orientation="Horizontal">
|
|
|
+ <TextBlock VerticalAlignment="Center" Text="抽取检测机构" />
|
|
|
+ <TextBlock
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ FontFamily="{StaticResource FluentSystemIconsRegular}"
|
|
|
+ FontSize="20"
|
|
|
+ Text="{x:Static utils:RegularFontUtil.Tap_Double_24}" />
|
|
|
+ </StackPanel>
|
|
|
+ </Border>
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger Property="IsMouseOver" Value="True">
|
|
|
+ <Setter Property="Background" Value="LightGray" />
|
|
|
+ </Trigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Button.Template>
|
|
|
+ </Button>
|
|
|
+ <TextBlock
|
|
|
+ Grid.Row="8"
|
|
|
+ Grid.Column="2"
|
|
|
+ Grid.ColumnSpan="2"
|
|
|
+ HorizontalAlignment="Left"
|
|
|
+ Foreground="DimGray"
|
|
|
+ Text="{Binding SelectedSampleRegistration.RandomTip, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
+ TextWrapping="Wrap" />
|
|
|
+ <TextBlock
|
|
|
+ Grid.Row="9"
|
|
|
+ Grid.Column="0"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Text="检测机构:"
|
|
|
+ TextWrapping="Wrap" />
|
|
|
+ <TextBox
|
|
|
+ Grid.Row="9"
|
|
|
+ Grid.Column="1"
|
|
|
+ Grid.ColumnSpan="3"
|
|
|
+ Height="150"
|
|
|
+ AcceptsReturn="True"
|
|
|
+ IsReadOnly="True"
|
|
|
+ Text="{Binding SelectedSampleRegistration.InspectionOrganization, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
+ TextWrapping="Wrap"
|
|
|
+ VerticalScrollBarVisibility="Auto" />
|
|
|
+ <TextBlock
|
|
|
+ Grid.Row="10"
|
|
|
+ Grid.Column="0"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Text="*生产企业人员:"
|
|
|
+ TextWrapping="Wrap" />
|
|
|
+ <TextBox
|
|
|
+ Grid.Row="10"
|
|
|
+ Grid.Column="1"
|
|
|
+ Grid.ColumnSpan="3"
|
|
|
+ IsReadOnly="True"
|
|
|
+ Text="{Binding SelectedSampleRegistration.ProductUsers, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
+ <TextBlock
|
|
|
+ Grid.Row="11"
|
|
|
+ Grid.Column="0"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Text="*承办人:"
|
|
|
+ TextWrapping="Wrap" />
|
|
|
+ <TextBox
|
|
|
+ Grid.Row="11"
|
|
|
+ Grid.Column="1"
|
|
|
+ IsReadOnly="True"
|
|
|
+ Text="{Binding SelectedSampleRegistration.EditUser, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
+ <TextBlock
|
|
|
+ Grid.Row="11"
|
|
|
+ Grid.Column="2"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ VerticalAlignment="Center"
|
|
|
+ Text="*联系电话:" />
|
|
|
+ <TextBox
|
|
|
+ Grid.Row="11"
|
|
|
+ Grid.Column="3"
|
|
|
+ IsReadOnly="True"
|
|
|
+ Text="{Binding SelectedSampleRegistration.Telephone, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
+ </Grid>
|
|
|
+ </ScrollViewer>
|
|
|
+
|
|
|
+
|
|
|
+ </Grid>
|
|
|
+
|
|
|
+ </Grid>
|
|
|
+</UserControl>
|