|
@@ -7,914 +7,21 @@
|
|
|
xmlns:control="http://FilterDataGrid.Control.com/2024"
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
xmlns:filterDataGrid="http://FilterDataGrid.Control.com/2024"
|
|
|
+ xmlns:inspectionReport="clr-namespace:UniformMaterialManagementSystem.Views.InspectionReport"
|
|
|
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>
|
|
|
- <!-- 定义一个全局的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" />
|
|
|
- <Setter Property="Padding" Value="5,0,5,0" />
|
|
|
- </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">
|
|
|
- <Grid Background="White">
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="Auto" />
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
- <StackPanel
|
|
|
- Grid.Column="0"
|
|
|
- FlowDirection="LeftToRight"
|
|
|
- Orientation="Horizontal">
|
|
|
-
|
|
|
- <TextBlock Text="工作年度:" />
|
|
|
- <ComboBox
|
|
|
- Width="120"
|
|
|
- Height="23"
|
|
|
- IsEditable="True"
|
|
|
- ItemsSource="{Binding Years}"
|
|
|
- SelectedItem="{Binding SelectedYear, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
-
|
|
|
- </StackPanel>
|
|
|
- <ToolBarPanel Grid.Column="1">
|
|
|
- <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.Document_Search_16}" />
|
|
|
- <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 AddInspectionReportCommand}">
|
|
|
- <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
|
|
|
- x:Name="SaveButton"
|
|
|
- Click="SaveButton_OnClick"
|
|
|
- Command="{Binding SaveInspectionReportCommand}">
|
|
|
- <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>
|
|
|
- <Separator />
|
|
|
- <Button Command="{Binding ExportInspectionReportCommand}">
|
|
|
- <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>
|
|
|
- </Grid>
|
|
|
- </Border>
|
|
|
- </Grid>
|
|
|
- <filterDataGrid:FilterDataGrid
|
|
|
- x:Name="DataGridMain"
|
|
|
- Grid.Row="1"
|
|
|
- behaviors:DataGridBehavior.RowNumbers="True"
|
|
|
- AutoGenerateColumns="False"
|
|
|
- Background="White"
|
|
|
- CanUserAddRows="False"
|
|
|
- CanUserReorderColumns="True"
|
|
|
- CanUserResizeColumns="True"
|
|
|
- CanUserResizeRows="False"
|
|
|
- CellStyle="{StaticResource CustomCellStyle}"
|
|
|
- ColumnHeaderStyle="{StaticResource CustomColumnHeaderStyle}"
|
|
|
- FilterLanguage="SimplifiedChinese"
|
|
|
- HeadersVisibility="All"
|
|
|
- HorizontalGridLinesBrush="LightSlateGray"
|
|
|
- ItemsSource="{Binding InspectionReports, Mode=TwoWay}"
|
|
|
- RowHeaderStyle="{StaticResource CustomRowHeaderStyle}"
|
|
|
- RowStyle="{StaticResource CustomRowStyle}"
|
|
|
- SelectedItem="{Binding SelectedInspectionReport, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
- SelectionMode="Single"
|
|
|
- ShowRowsCount="True"
|
|
|
- ShowStatusBar="True"
|
|
|
- VerticalGridLinesBrush="LightSlateGray">
|
|
|
-
|
|
|
- <!-- 选择行事件 -->
|
|
|
- <!--<b:Interaction.Triggers>
|
|
|
- <b:EventTrigger EventName="SelectionChanged">
|
|
|
- <b:InvokeCommandAction Command="{Binding InspectionReportSelectionChangedCommand}" 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 InspectApply.Year}"
|
|
|
- EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
- Header="工作年度"
|
|
|
- IsReadOnly="True" />
|
|
|
- <control:FilterDataGridTextColumn
|
|
|
- Width="300"
|
|
|
- Binding="{Binding ReportNo}"
|
|
|
- EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
- Header="检验报告编号"
|
|
|
- IsColumnFiltered="True"
|
|
|
- IsReadOnly="True" />
|
|
|
- <control:FilterDataGridTextColumn
|
|
|
- Width="120"
|
|
|
- Binding="{Binding ReportTime}"
|
|
|
- EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
- Header="检验时间"
|
|
|
- IsColumnFiltered="True"
|
|
|
- IsReadOnly="True" />
|
|
|
- <control:FilterDataGridTextColumn
|
|
|
- Width="100"
|
|
|
- Binding="{Binding Conclusion}"
|
|
|
- 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="40" />
|
|
|
- <RowDefinition Height="40" />
|
|
|
- <RowDefinition Height="60" />
|
|
|
- <RowDefinition Height="40" />
|
|
|
- <RowDefinition Height="150" />
|
|
|
- <RowDefinition Height="170" />
|
|
|
- <RowDefinition Height="200" />
|
|
|
- <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"
|
|
|
- Text="检验报告编号:"
|
|
|
- TextWrapping="Wrap" />
|
|
|
- <TextBlock
|
|
|
- Grid.Row="1"
|
|
|
- Grid.Column="1"
|
|
|
- Grid.ColumnSpan="3"
|
|
|
- Text="{Binding SelectedInspectionReport.ReportNo}" />
|
|
|
- <TextBlock
|
|
|
- Grid.Row="2"
|
|
|
- Grid.Column="0"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- Text="*检验部门:" />
|
|
|
- <TextBox
|
|
|
- Grid.Row="2"
|
|
|
- Grid.Column="1"
|
|
|
- Text="{Binding SelectedInspectionReport.Department, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
- <TextBlock
|
|
|
- Grid.Row="2"
|
|
|
- Grid.Column="2"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- Text="*检验时间:" />
|
|
|
- <DatePicker
|
|
|
- Grid.Row="2"
|
|
|
- Grid.Column="3"
|
|
|
- Text="{Binding SelectedInspectionReport.ReportTime, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
- <TextBlock
|
|
|
- Grid.Row="3"
|
|
|
- Grid.Column="0"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- Text="检验类别:" />
|
|
|
- <StackPanel
|
|
|
- Grid.Row="3"
|
|
|
- Grid.Column="1"
|
|
|
- Grid.ColumnSpan="3"
|
|
|
- VerticalAlignment="Center">
|
|
|
- <Grid VerticalAlignment="Center" Background="White">
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
- <RadioButton
|
|
|
- x:Name="FirstRadioButton"
|
|
|
- Grid.Column="0"
|
|
|
- Content="报样检验"
|
|
|
- GroupName="InspectType"
|
|
|
- IsEnabled="False" />
|
|
|
- <RadioButton
|
|
|
- x:Name="SecondRadioButton"
|
|
|
- Grid.Column="1"
|
|
|
- Content="首批检验"
|
|
|
- GroupName="InspectType"
|
|
|
- IsEnabled="False" />
|
|
|
- <RadioButton
|
|
|
- x:Name="ThirdRadioButton"
|
|
|
- Grid.Column="2"
|
|
|
- Content="生产过程"
|
|
|
- GroupName="InspectType"
|
|
|
- IsEnabled="False" />
|
|
|
- <RadioButton
|
|
|
- x:Name="ForthRadioButton"
|
|
|
- Grid.Column="3"
|
|
|
- Content="出厂检验"
|
|
|
- GroupName="InspectType"
|
|
|
- IsEnabled="False" />
|
|
|
- <TextBox
|
|
|
- x:Name="InspectTypeText"
|
|
|
- Grid.Column="0"
|
|
|
- Text="{Binding SelectedInspectionReport.InspectApply.InspCategory, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
- TextChanged="InspectTypeText_TextChanged"
|
|
|
- Visibility="Collapsed" />
|
|
|
- </Grid>
|
|
|
- </StackPanel>
|
|
|
- <TextBlock
|
|
|
- Grid.Row="4"
|
|
|
- Grid.Column="0"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- Text="产品名称:" />
|
|
|
- <TextBlock
|
|
|
- Grid.Row="4"
|
|
|
- Grid.Column="1"
|
|
|
- Text="{Binding SelectedInspectionReport.InspectApply.Material.Name}"
|
|
|
- TextWrapping="Wrap" />
|
|
|
- <TextBlock
|
|
|
- Grid.Row="4"
|
|
|
- Grid.Column="2"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- Text="生产企业:" />
|
|
|
- <TextBlock
|
|
|
- Grid.Row="4"
|
|
|
- Grid.Column="3"
|
|
|
- Text="{Binding SelectedInspectionReport.InspectApply.Company}"
|
|
|
- TextWrapping="Wrap" />
|
|
|
- <TextBlock
|
|
|
- Grid.Row="5"
|
|
|
- Grid.Column="0"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- Text="产品数量:"
|
|
|
- TextWrapping="Wrap" />
|
|
|
- <Grid
|
|
|
- Grid.Row="5"
|
|
|
- Grid.Column="1"
|
|
|
- Background="White">
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="Auto" />
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
- <TextBlock Grid.Column="0" Text="{Binding SelectedInspectionReport.InspectApply.InspQuantity}" />
|
|
|
- <TextBlock Grid.Column="1" Text="{Binding SelectedInspectionReport.InspectApply.Material.MeasureUnit}" />
|
|
|
- </Grid>
|
|
|
- <TextBlock
|
|
|
- Grid.Row="5"
|
|
|
- Grid.Column="2"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- Text="生产日期:" />
|
|
|
- <Grid
|
|
|
- Grid.Row="5"
|
|
|
- Grid.Column="3"
|
|
|
- Background="White">
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
- <ColumnDefinition Width="Auto" />
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
- <TextBlock
|
|
|
- Grid.Column="0"
|
|
|
- Text="{Binding SelectedInspectionReport.InspectApply.StartProductDate, StringFormat=yyyy-MM-dd}"
|
|
|
- TextWrapping="Wrap" />
|
|
|
- <TextBlock Grid.Column="1" Text="至" />
|
|
|
- <TextBlock
|
|
|
- Grid.Column="2"
|
|
|
- Text="{Binding SelectedInspectionReport.InspectApply.EndProductDate, StringFormat=yyyy-MM-dd}"
|
|
|
- TextWrapping="Wrap" />
|
|
|
- </Grid>
|
|
|
- <TextBlock
|
|
|
- Grid.Row="6"
|
|
|
- Grid.Column="0"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- Text="采购机构:" />
|
|
|
- <TextBox
|
|
|
- Grid.Row="6"
|
|
|
- Grid.Column="1"
|
|
|
- Height="60"
|
|
|
- IsReadOnly="True"
|
|
|
- Text="{Binding SelectedInspectionReport.PurchaseCompanyNames}"
|
|
|
- TextWrapping="Wrap"
|
|
|
- VerticalScrollBarVisibility="Auto" />
|
|
|
- <TextBlock
|
|
|
- Grid.Row="6"
|
|
|
- Grid.Column="2"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- Text="合同编号:" />
|
|
|
- <TextBox
|
|
|
- Grid.Row="6"
|
|
|
- Grid.Column="3"
|
|
|
- Height="60"
|
|
|
- IsReadOnly="True"
|
|
|
- Text="{Binding SelectedInspectionReport.ContractNos}"
|
|
|
- TextWrapping="Wrap"
|
|
|
- VerticalScrollBarVisibility="Auto" />
|
|
|
- <TextBlock
|
|
|
- Grid.Row="7"
|
|
|
- Grid.Column="0"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- Text="*检验依据:" />
|
|
|
- <TextBox
|
|
|
- Grid.Row="7"
|
|
|
- Grid.Column="1"
|
|
|
- Grid.ColumnSpan="3"
|
|
|
- HorizontalScrollBarVisibility="Auto"
|
|
|
- Text="{Binding SelectedInspectionReport.ReportBasis, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
- TextWrapping="Wrap" />
|
|
|
- <TextBlock
|
|
|
- Grid.Row="8"
|
|
|
- Grid.Column="0"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- VerticalAlignment="Center"
|
|
|
- Text="*检验情况及主要问题:"
|
|
|
- TextWrapping="Wrap" />
|
|
|
- <Grid
|
|
|
- Grid.Row="8"
|
|
|
- Grid.Column="1"
|
|
|
- Grid.ColumnSpan="3"
|
|
|
- Background="White">
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="30" />
|
|
|
- <RowDefinition Height="*" />
|
|
|
- </Grid.RowDefinitions>
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="Auto" />
|
|
|
- <ColumnDefinition Width="Auto" />
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
- <RadioButton
|
|
|
- x:Name="IsSampleRadioButton"
|
|
|
- Grid.Row="0"
|
|
|
- Grid.Column="0"
|
|
|
- Padding="10,0,10,0"
|
|
|
- VerticalContentAlignment="Center"
|
|
|
- Content="抽样送检"
|
|
|
- Foreground="Red"
|
|
|
- GroupName="IsSampleGroup" />
|
|
|
- <RadioButton
|
|
|
- x:Name="NotSampleRadioButton"
|
|
|
- Grid.Row="0"
|
|
|
- Grid.Column="1"
|
|
|
- Padding="10,0,10,0"
|
|
|
- VerticalContentAlignment="Center"
|
|
|
- Content="未抽样送检"
|
|
|
- GroupName="IsSampleGroup" />
|
|
|
- <TextBox
|
|
|
- x:Name="IsSampleTextBox"
|
|
|
- Grid.Row="0"
|
|
|
- Grid.Column="2"
|
|
|
- Text="{Binding SelectedInspectionReport.IsSample, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
- TextChanged="IsSampleTextBox_TextChanged"
|
|
|
- Visibility="Collapsed" />
|
|
|
- <TextBox
|
|
|
- Grid.Row="1"
|
|
|
- Grid.Column="0"
|
|
|
- Grid.ColumnSpan="3"
|
|
|
- Height="120"
|
|
|
- HorizontalContentAlignment="Left"
|
|
|
- VerticalContentAlignment="Top"
|
|
|
- AcceptsReturn="True"
|
|
|
- Text="{Binding SelectedInspectionReport.ReportDesc, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
- TextWrapping="Wrap"
|
|
|
- VerticalScrollBarVisibility="Auto" />
|
|
|
- </Grid>
|
|
|
- <TextBlock
|
|
|
- Grid.Row="9"
|
|
|
- Grid.Column="0"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- Text="*检验结论:" />
|
|
|
- <Grid
|
|
|
- Grid.Row="9"
|
|
|
- Grid.Column="1"
|
|
|
- Grid.ColumnSpan="3"
|
|
|
- Background="White">
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="30" />
|
|
|
- <RowDefinition Height="*" />
|
|
|
- </Grid.RowDefinitions>
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="Auto" />
|
|
|
- <ColumnDefinition Width="Auto" />
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
- <RadioButton
|
|
|
- x:Name="FirstQualifiedRadioButton"
|
|
|
- Grid.Row="0"
|
|
|
- Grid.Column="0"
|
|
|
- Padding="10,0,10,0"
|
|
|
- VerticalContentAlignment="Center"
|
|
|
- Checked="ConclusionGroupRadioButton_Checked"
|
|
|
- Content="合格"
|
|
|
- Foreground="Green"
|
|
|
- GroupName="ConclusionGroup"
|
|
|
- IsChecked="True" />
|
|
|
- <RadioButton
|
|
|
- x:Name="SecondQualifiedRadioButton"
|
|
|
- Grid.Row="0"
|
|
|
- Grid.Column="1"
|
|
|
- Padding="10,0,10,0"
|
|
|
- VerticalContentAlignment="Center"
|
|
|
- Checked="ConclusionGroupRadioButton_Checked"
|
|
|
- Content="合格(初测不合格,复测合格)"
|
|
|
- Foreground="DarkOrange"
|
|
|
- GroupName="ConclusionGroup" />
|
|
|
- <RadioButton
|
|
|
- x:Name="UnQualifiedRadioButton"
|
|
|
- Grid.Row="0"
|
|
|
- Grid.Column="2"
|
|
|
- Padding="10,0,10,0"
|
|
|
- VerticalContentAlignment="Center"
|
|
|
- Checked="ConclusionGroupRadioButton_Checked"
|
|
|
- Content="不合格"
|
|
|
- Foreground="Red"
|
|
|
- GroupName="ConclusionGroup" />
|
|
|
- <TextBox
|
|
|
- x:Name="ConclusionTextBox"
|
|
|
- Grid.Row="0"
|
|
|
- Grid.Column="2"
|
|
|
- Text="{Binding SelectedInspectionReport.Conclusion, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
- TextChanged="ConclusionTextBox_TextChanged"
|
|
|
- Visibility="Collapsed" />
|
|
|
- <TextBox
|
|
|
- Grid.Row="1"
|
|
|
- Grid.Column="0"
|
|
|
- Grid.ColumnSpan="3"
|
|
|
- Height="120"
|
|
|
- HorizontalContentAlignment="Left"
|
|
|
- VerticalContentAlignment="Top"
|
|
|
- AcceptsReturn="True"
|
|
|
- Text="{Binding SelectedInspectionReport.ConclusionDesc, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
- TextWrapping="Wrap"
|
|
|
- VerticalScrollBarVisibility="Auto" />
|
|
|
- </Grid>
|
|
|
- <TextBlock
|
|
|
- Grid.Row="10"
|
|
|
- Grid.Column="0"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- VerticalAlignment="Center"
|
|
|
- Text="*验收组:" />
|
|
|
- <Grid
|
|
|
- Grid.Row="10"
|
|
|
- Grid.Column="1"
|
|
|
- Grid.ColumnSpan="3"
|
|
|
- Background="White">
|
|
|
- <Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="Auto" />
|
|
|
- <RowDefinition Height="*" />
|
|
|
- </Grid.RowDefinitions>
|
|
|
- <!-- 子菜单项 -->
|
|
|
- <Border
|
|
|
- Grid.Row="0"
|
|
|
- BorderBrush="Gray"
|
|
|
- BorderThickness="1">
|
|
|
- <ToolBarPanel>
|
|
|
- <ToolBar Background="White" ToolBarTray.IsLocked="True">
|
|
|
- <Button HorizontalContentAlignment="Center" Command="{Binding AddInspectionReportDetailCommand}">
|
|
|
- <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_Square_20}" />
|
|
|
- <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 RemoveInspectionReportDetailCommand}">
|
|
|
- <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.Dismiss_Square_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>
|
|
|
- <DataGrid
|
|
|
- x:Name="DataGridDetail"
|
|
|
- Grid.Row="1"
|
|
|
- behaviors:DataGridBehavior.RowNumbers="True"
|
|
|
- AutoGenerateColumns="False"
|
|
|
- Background="White"
|
|
|
- CanUserAddRows="False"
|
|
|
- CanUserReorderColumns="True"
|
|
|
- CellStyle="{StaticResource CustomCellStyle}"
|
|
|
- ColumnHeaderStyle="{StaticResource CustomColumnHeaderStyle}"
|
|
|
- HeadersVisibility="All"
|
|
|
- HorizontalGridLinesBrush="LightSlateGray"
|
|
|
- ItemsSource="{Binding SelectedInspectionReport.InspectionReportDetails, Mode=TwoWay}"
|
|
|
- RowHeaderStyle="{StaticResource CustomRowHeaderStyle}"
|
|
|
- RowStyle="{StaticResource CustomRowStyle}"
|
|
|
- SelectionMode="Single"
|
|
|
- VerticalGridLinesBrush="LightSlateGray">
|
|
|
- <!-- 选择行事件 -->
|
|
|
- <b:Interaction.Triggers>
|
|
|
- <b:EventTrigger EventName="SelectionChanged">
|
|
|
- <b:InvokeCommandAction Command="{Binding SelectedInspectionReportDetailChangedCommand}" CommandParameter="{Binding ElementName=DataGridDetail, Path=SelectedItem}" />
|
|
|
- </b:EventTrigger>
|
|
|
- </b:Interaction.Triggers>
|
|
|
-
|
|
|
- <DataGrid.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>
|
|
|
- </DataGrid.Resources>
|
|
|
- <DataGrid.Columns>
|
|
|
- <DataGridTemplateColumn Width="100" Header="检验组">
|
|
|
- <DataGridTemplateColumn.CellTemplate>
|
|
|
- <DataTemplate>
|
|
|
- <TextBlock
|
|
|
- HorizontalAlignment="Center"
|
|
|
- VerticalAlignment="Center"
|
|
|
- Text="{Binding JobCategory}" />
|
|
|
- </DataTemplate>
|
|
|
- </DataGridTemplateColumn.CellTemplate>
|
|
|
- <DataGridTemplateColumn.CellEditingTemplate>
|
|
|
- <DataTemplate>
|
|
|
- <ComboBox
|
|
|
- Height="25"
|
|
|
- Background="White"
|
|
|
- ItemsSource="{Binding DataContext.JobCategories, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
|
- SelectedItem="{Binding JobCategory, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
- </DataTemplate>
|
|
|
- </DataGridTemplateColumn.CellEditingTemplate>
|
|
|
- </DataGridTemplateColumn>
|
|
|
-
|
|
|
- <!--<DataGridTextColumn
|
|
|
- Width="100"
|
|
|
- Binding="{Binding JobCategory, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
- EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
- Header="检验组" />-->
|
|
|
-
|
|
|
- <DataGridTextColumn
|
|
|
- Width="300"
|
|
|
- Binding="{Binding SupervisionUnit, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
- EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
- Header="单位" />
|
|
|
-
|
|
|
- <!--<DataGridTextColumn
|
|
|
- Width="100"
|
|
|
- Binding="{Binding Inspector, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
- EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
- Header="姓名" />-->
|
|
|
- <DataGridTemplateColumn Width="100" Header="姓名">
|
|
|
- <DataGridTemplateColumn.CellTemplate>
|
|
|
- <DataTemplate>
|
|
|
- <TextBlock
|
|
|
- HorizontalAlignment="Center"
|
|
|
- VerticalAlignment="Center"
|
|
|
- Text="{Binding Inspector}" />
|
|
|
- </DataTemplate>
|
|
|
- </DataGridTemplateColumn.CellTemplate>
|
|
|
- <DataGridTemplateColumn.CellEditingTemplate>
|
|
|
- <DataTemplate>
|
|
|
- <ComboBox
|
|
|
- x:Name="Name"
|
|
|
- Height="25"
|
|
|
- Background="White"
|
|
|
- IsEditable="True"
|
|
|
- ItemsSource="{Binding DataContext.UserNames, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
|
- LostFocus="Name_OnLostFocus"
|
|
|
- SelectedItem="{Binding Inspector, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
- </DataTemplate>
|
|
|
- </DataGridTemplateColumn.CellEditingTemplate>
|
|
|
- </DataGridTemplateColumn>
|
|
|
- </DataGrid.Columns>
|
|
|
- </DataGrid>
|
|
|
- </Grid>
|
|
|
- <TextBlock
|
|
|
- Grid.Row="11"
|
|
|
- Grid.Column="0"
|
|
|
- HorizontalAlignment="Right"
|
|
|
- Text="承办人:" />
|
|
|
-
|
|
|
- <!--<ComboBox
|
|
|
- x:Name="EditUserComboBox"
|
|
|
- Grid.Row="11"
|
|
|
- Grid.Column="1"
|
|
|
- Height="25"
|
|
|
- IsEditable="True"
|
|
|
- ItemsSource="{Binding DataContext.UserNames, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
|
- LostFocus="Name_OnLostFocus"
|
|
|
- SelectedItem="{Binding SelectedInspectionReport.EditUser, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />-->
|
|
|
- <TextBox
|
|
|
- Grid.Row="11"
|
|
|
- Grid.Column="1"
|
|
|
- Text="{Binding SelectedInspectionReport.EditUser, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
- </Grid>
|
|
|
- </ScrollViewer>
|
|
|
- </Grid>
|
|
|
+ <Grid Background="White">
|
|
|
+ <TabControl>
|
|
|
+ <TabItem Header="检验报告录入">
|
|
|
+ <inspectionReport:InspectionReportInputPage />
|
|
|
+ </TabItem>
|
|
|
+ <TabItem Header="检验报告管理">
|
|
|
+ <inspectionReport:InspectionReportManagePage />
|
|
|
+ </TabItem>
|
|
|
+ </TabControl>
|
|
|
</Grid>
|
|
|
</UserControl>
|