|
@@ -30,9 +30,14 @@
|
|
<Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationErrorTemplate}" />
|
|
<Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationErrorTemplate}" />
|
|
</Style>
|
|
</Style>
|
|
<Style TargetType="DatePicker">
|
|
<Style TargetType="DatePicker">
|
|
|
|
+ <Setter Property="Height" Value="25" />
|
|
|
|
+ <Setter Property="FontSize" Value="14" />
|
|
<Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationErrorTemplate}" />
|
|
<Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationErrorTemplate}" />
|
|
</Style>
|
|
</Style>
|
|
<Style TargetType="TextBox">
|
|
<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}" />
|
|
<Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationErrorTemplate}" />
|
|
</Style>
|
|
</Style>
|
|
<ControlTemplate x:Key="CustomColumnHeaderTemplate" TargetType="DataGridColumnHeader">
|
|
<ControlTemplate x:Key="CustomColumnHeaderTemplate" TargetType="DataGridColumnHeader">
|
|
@@ -214,7 +219,7 @@
|
|
FilterLanguage="SimplifiedChinese"
|
|
FilterLanguage="SimplifiedChinese"
|
|
HeadersVisibility="All"
|
|
HeadersVisibility="All"
|
|
HorizontalGridLinesBrush="LightSlateGray"
|
|
HorizontalGridLinesBrush="LightSlateGray"
|
|
- ItemsSource="{Binding InspectApplies, Mode=TwoWay}"
|
|
|
|
|
|
+ ItemsSource="{Binding InspectionReports, Mode=TwoWay}"
|
|
RowHeaderStyle="{StaticResource CustomRowHeaderStyle}"
|
|
RowHeaderStyle="{StaticResource CustomRowHeaderStyle}"
|
|
RowStyle="{StaticResource CustomRowStyle}"
|
|
RowStyle="{StaticResource CustomRowStyle}"
|
|
SelectionMode="Single"
|
|
SelectionMode="Single"
|
|
@@ -225,7 +230,7 @@
|
|
<!-- 选择行事件 -->
|
|
<!-- 选择行事件 -->
|
|
<b:Interaction.Triggers>
|
|
<b:Interaction.Triggers>
|
|
<b:EventTrigger EventName="SelectionChanged">
|
|
<b:EventTrigger EventName="SelectionChanged">
|
|
- <b:InvokeCommandAction Command="{Binding InspectApplySelectionChangedCommand}" CommandParameter="{Binding ElementName=DataGridMain, Path=SelectedItem}" />
|
|
|
|
|
|
+ <b:InvokeCommandAction Command="{Binding InspectionReportSelectionChangedCommand}" CommandParameter="{Binding ElementName=DataGridMain, Path=SelectedItem}" />
|
|
</b:EventTrigger>
|
|
</b:EventTrigger>
|
|
</b:Interaction.Triggers>
|
|
</b:Interaction.Triggers>
|
|
|
|
|
|
@@ -254,73 +259,44 @@
|
|
<control:FilterDataGrid.Columns>
|
|
<control:FilterDataGrid.Columns>
|
|
<DataGridTextColumn
|
|
<DataGridTextColumn
|
|
Width="60"
|
|
Width="60"
|
|
- Binding="{Binding Year}"
|
|
|
|
|
|
+ Binding="{Binding InspectApply.Year}"
|
|
EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
Header="工作年度"
|
|
Header="工作年度"
|
|
IsReadOnly="True" />
|
|
IsReadOnly="True" />
|
|
<control:FilterDataGridTextColumn
|
|
<control:FilterDataGridTextColumn
|
|
Width="300"
|
|
Width="300"
|
|
- Binding="{Binding ApplyNo}"
|
|
|
|
|
|
+ Binding="{Binding ReportNo}"
|
|
EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
- Header="检验申请表编号"
|
|
|
|
|
|
+ Header="检验报告编号"
|
|
IsColumnFiltered="True"
|
|
IsColumnFiltered="True"
|
|
IsReadOnly="True" />
|
|
IsReadOnly="True" />
|
|
<control:FilterDataGridTextColumn
|
|
<control:FilterDataGridTextColumn
|
|
Width="120"
|
|
Width="120"
|
|
- Binding="{Binding InspCategory}"
|
|
|
|
|
|
+ Binding="{Binding ReportTime}"
|
|
EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
- Header="检验类别"
|
|
|
|
|
|
+ Header="检验时间"
|
|
IsColumnFiltered="True"
|
|
IsColumnFiltered="True"
|
|
IsReadOnly="True" />
|
|
IsReadOnly="True" />
|
|
<control:FilterDataGridTextColumn
|
|
<control:FilterDataGridTextColumn
|
|
- Width="300"
|
|
|
|
- Binding="{Binding ProductName}"
|
|
|
|
|
|
+ Width="100"
|
|
|
|
+ Binding="{Binding Conclusion}"
|
|
EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
- Header="产品名称"
|
|
|
|
|
|
+ Header="检验结论"
|
|
IsColumnFiltered="True"
|
|
IsColumnFiltered="True"
|
|
IsReadOnly="True" />
|
|
IsReadOnly="True" />
|
|
<control:FilterDataGridTextColumn
|
|
<control:FilterDataGridTextColumn
|
|
- Width="200"
|
|
|
|
- Binding="{Binding Company}"
|
|
|
|
- EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
|
- Header="生产企业"
|
|
|
|
- IsColumnFiltered="True"
|
|
|
|
- IsReadOnly="True" />
|
|
|
|
- <control:FilterDataGridNumericColumn
|
|
|
|
- Width="150"
|
|
|
|
- Binding="{Binding InspQuantity}"
|
|
|
|
|
|
+ Width="100"
|
|
|
|
+ Binding="{Binding EditUser}"
|
|
EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
- Header="报检数量"
|
|
|
|
|
|
+ Header="承办人"
|
|
IsColumnFiltered="True"
|
|
IsColumnFiltered="True"
|
|
IsReadOnly="True" />
|
|
IsReadOnly="True" />
|
|
- <control:FilterDataGridTextColumn
|
|
|
|
- Width="150"
|
|
|
|
- Binding="{Binding InspDate, StringFormat=yyyy-MM-dd}"
|
|
|
|
- EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
|
- Header="申请时间"
|
|
|
|
- IsColumnFiltered="True"
|
|
|
|
- IsReadOnly="True" />
|
|
|
|
- <control:FilterDataGridTextColumn
|
|
|
|
- Width="150"
|
|
|
|
- Binding="{Binding ApplyUser}"
|
|
|
|
- EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
|
|
|
|
- ElementStyle="{StaticResource TextColumnElementStyle}"
|
|
|
|
- Header="录入人"
|
|
|
|
- IsColumnFiltered="True"
|
|
|
|
- IsReadOnly="True" />
|
|
|
|
- <control:FilterDataGridCheckBoxColumn
|
|
|
|
- Width="130"
|
|
|
|
- Binding="{Binding ReportStatus}"
|
|
|
|
- ElementStyle="{StaticResource CheckBoxColumnElementStyle}"
|
|
|
|
- Header="检验报告生成状态"
|
|
|
|
- IsColumnFiltered="True" />
|
|
|
|
|
|
+
|
|
</control:FilterDataGrid.Columns>
|
|
</control:FilterDataGrid.Columns>
|
|
</filterDataGrid:FilterDataGrid>
|
|
</filterDataGrid:FilterDataGrid>
|
|
</Grid>
|
|
</Grid>
|
|
@@ -341,7 +317,31 @@
|
|
BorderThickness="1">
|
|
BorderThickness="1">
|
|
<ToolBarPanel>
|
|
<ToolBarPanel>
|
|
<ToolBar Background="White" ToolBarTray.IsLocked="True">
|
|
<ToolBar Background="White" ToolBarTray.IsLocked="True">
|
|
- <Button Command="{Binding SaveInspectApplyCommand}">
|
|
|
|
|
|
+ <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 Command="{Binding SaveInspectionReportCommand}">
|
|
<Button.Template>
|
|
<Button.Template>
|
|
<ControlTemplate>
|
|
<ControlTemplate>
|
|
<Border
|
|
<Border
|
|
@@ -353,7 +353,7 @@
|
|
HorizontalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
FontFamily="{StaticResource FluentSystemIconsRegular}"
|
|
FontFamily="{StaticResource FluentSystemIconsRegular}"
|
|
FontSize="20"
|
|
FontSize="20"
|
|
- Text="{x:Static utils:RegularFontUtil.Save_Arrow_Right_20}" />
|
|
|
|
|
|
+ Text="{x:Static utils:RegularFontUtil.Save_32}" />
|
|
<TextBlock Text="保存" />
|
|
<TextBlock Text="保存" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
</Border>
|
|
@@ -365,33 +365,550 @@
|
|
</ControlTemplate>
|
|
</ControlTemplate>
|
|
</Button.Template>
|
|
</Button.Template>
|
|
</Button>
|
|
</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>
|
|
</ToolBar>
|
|
</ToolBarPanel>
|
|
</ToolBarPanel>
|
|
</Border>
|
|
</Border>
|
|
- <Grid Grid.Row="1" Background="White">
|
|
|
|
- <Grid.RowDefinitions>
|
|
|
|
- <RowDefinition Height="50" />
|
|
|
|
- <RowDefinition Height="30" />
|
|
|
|
- <RowDefinition Height="30" />
|
|
|
|
- <RowDefinition Height="30" />
|
|
|
|
- </Grid.RowDefinitions>
|
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
|
- <ColumnDefinition Width="*" />
|
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
|
|
|
+ <ScrollViewer Grid.Row="1">
|
|
|
|
+ <Grid Grid.Row="1" Background="White">
|
|
|
|
+ <Grid.RowDefinitions>
|
|
|
|
+ <RowDefinition Height="50" />
|
|
|
|
+ <RowDefinition Height="35" />
|
|
|
|
+ <RowDefinition Height="35" />
|
|
|
|
+ <RowDefinition Height="35" />
|
|
|
|
+ <RowDefinition Height="35" />
|
|
|
|
+ <RowDefinition Height="35" />
|
|
|
|
+ <RowDefinition Height="60" />
|
|
|
|
+ <RowDefinition Height="35" />
|
|
|
|
+ <RowDefinition Height="150" />
|
|
|
|
+ <RowDefinition Height="170" />
|
|
|
|
+ <RowDefinition Height="200" />
|
|
|
|
+ <RowDefinition Height="35" />
|
|
|
|
+ </Grid.RowDefinitions>
|
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
|
+ <ColumnDefinition Width="2*" />
|
|
|
|
+ <ColumnDefinition Width="2*" />
|
|
|
|
+ <ColumnDefinition Width="2*" />
|
|
|
|
+ <ColumnDefinition Width="2*" />
|
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
|
|
|
- <TextBlock
|
|
|
|
- Grid.Row="0"
|
|
|
|
- Grid.Column="0"
|
|
|
|
- Grid.ColumnSpan="4"
|
|
|
|
- HorizontalAlignment="Center"
|
|
|
|
- VerticalAlignment="Center"
|
|
|
|
- FontSize="25"
|
|
|
|
- Text="军需物资质量监督检验报告" />
|
|
|
|
|
|
+ <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="检验报告编号:" />
|
|
|
|
+ <TextBox
|
|
|
|
+ Grid.Row="1"
|
|
|
|
+ Grid.Column="1"
|
|
|
|
+ IsReadOnly="True"
|
|
|
|
+ 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}" />
|
|
|
|
+ <TextBlock
|
|
|
|
+ Grid.Row="4"
|
|
|
|
+ Grid.Column="2"
|
|
|
|
+ HorizontalAlignment="Right"
|
|
|
|
+ Text="生产企业:" />
|
|
|
|
+ <TextBlock
|
|
|
|
+ Grid.Row="4"
|
|
|
|
+ Grid.Column="3"
|
|
|
|
+ Text="{Binding SelectedInspectionReport.InspectApply.Company}" />
|
|
|
|
+ <TextBlock
|
|
|
|
+ Grid.Row="5"
|
|
|
|
+ Grid.Column="0"
|
|
|
|
+ HorizontalAlignment="Right"
|
|
|
|
+ Text="产品数量:" />
|
|
|
|
+ <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="Auto" />
|
|
|
|
+ <ColumnDefinition Width="Auto" />
|
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
|
+ <TextBlock Grid.Column="0" Text="{Binding SelectedInspectionReport.InspectApply.StartProductDate, StringFormat=yyyy年MM月}" />
|
|
|
|
+ <TextBlock Grid.Column="1" Text="至" />
|
|
|
|
+ <TextBlock Grid.Column="2" Text="{Binding SelectedInspectionReport.InspectApply.EndProductDate, StringFormat=yyyy年MM月}" />
|
|
|
|
+ </Grid>
|
|
|
|
+ <TextBlock
|
|
|
|
+ Grid.Row="6"
|
|
|
|
+ Grid.Column="0"
|
|
|
|
+ HorizontalAlignment="Right"
|
|
|
|
+ Text="采购机构:" />
|
|
|
|
+ <TextBox
|
|
|
|
+ Grid.Row="6"
|
|
|
|
+ Grid.Column="1"
|
|
|
|
+ Height="60"
|
|
|
|
+ IsReadOnly="True"
|
|
|
|
+ Text="{Binding 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 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"
|
|
|
|
+ Text="{Binding SelectedInspectionReport.ReportBasis, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
|
+ <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>
|
|
|
|
|
|
- </Grid>
|
|
|
|
|
|
+ <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>
|
|
|
|
+
|
|
|
|
+ <Style x:Key="CheckBoxColumnElementStyle" TargetType="CheckBox">
|
|
|
|
+ <Setter Property="HorizontalAlignment" Value="Center" />
|
|
|
|
+ <Setter Property="VerticalAlignment" Value="Center" />
|
|
|
|
+ <Setter Property="IsEnabled" Value="False" />
|
|
|
|
+ </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
|
|
|
|
+ Height="25"
|
|
|
|
+ Background="White"
|
|
|
|
+ IsEditable="True"
|
|
|
|
+ ItemsSource="{Binding DataContext.UserNames, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
|
|
|
+ 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="承办人:" />
|
|
|
|
+ <TextBox
|
|
|
|
+ Grid.Row="11"
|
|
|
|
+ Grid.Column="1"
|
|
|
|
+ Text="{Binding SelectedInspectionReport.EditUser, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
|
+ </Grid>
|
|
|
|
+ </ScrollViewer>
|
|
|
|
|
|
|
|
|
|
</Grid>
|
|
</Grid>
|