Browse Source

Merge branch 'master' of https://git.xxb.lttc.cn/wangbc/UniformMaterialManagementSystem

宝臣 王 3 months ago
parent
commit
32cd6a203c

+ 1 - 1
UniformMaterialManagementSystem/ViewModels/InspectApplyPageViewModel.cs

@@ -482,7 +482,7 @@ namespace UniformMaterialManagementSystem.ViewModels
         [RelayCommand]
         private void ExportDetail()
         {
-            InspectApplyUtil.ExportBatchDetail(InspectApplyDetails, SelectedCompany.Name, SelectedMaterial.Name, BatchNo);
+            InspectApplyUtil.ExportBatchDetail(InspectApplyDetails, SelectedCompany?.Name, SelectedMaterial?.Name, BatchNo);
         }
 
         /// <summary>

+ 87 - 89
UniformMaterialManagementSystem/Views/InspectionReportPage.xaml

@@ -201,6 +201,81 @@
                                     </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 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>
@@ -306,95 +381,8 @@
             Width="2"
             HorizontalAlignment="Stretch" />
         <Grid Grid.Column="2" 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 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>
-                                <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>
-            </Border>
-            <ScrollViewer Grid.Row="1">
-                <Grid Grid.Row="1" Background="White">
+            <ScrollViewer>
+                <Grid Background="White">
                     <Grid.RowDefinitions>
                         <RowDefinition Height="50" />
                         <RowDefinition Height="35" />
@@ -905,6 +893,16 @@
                         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"

+ 1 - 0
UniformMaterialManagementSystem/Views/InspectionReportPage.xaml.cs

@@ -90,5 +90,6 @@ namespace UniformMaterialManagementSystem.Views
             names.Add(text);
             comboBox.SelectedItem = text;
         }
+
     }
 }

+ 76 - 89
UniformMaterialManagementSystem/Views/SampleRegistrationPage.xaml

@@ -200,6 +200,80 @@
                                         </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 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>
@@ -315,95 +389,8 @@
             Width="2"
             HorizontalAlignment="Stretch" />
         <Grid Grid.Column="2" 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 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>
-                                <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>
-            </Border>
-            <ScrollViewer Grid.Row="1">
-                <Grid Grid.Row="1" Background="White">
+            <ScrollViewer>
+                <Grid Background="White">
                     <Grid.RowDefinitions>
                         <RowDefinition Height="50" />
                         <RowDefinition Height="35" />