Browse Source

界面优化

LT069288 4 months ago
parent
commit
1ac9211674

+ 3 - 3
UniformMaterialManagementSystem/Models/ContractDetailModel.cs

@@ -35,10 +35,10 @@ namespace UniformMaterialManagementSystem.Models
         [ObservableProperty]
         private double _unInspectQty;
 
-        [ObservableProperty] 
+        [ObservableProperty]
         private double _shareInspectQty;//分摊报检数量
 
-        [ObservableProperty] 
+        [ObservableProperty]
         private string _signingDate;
 
         [ObservableProperty]
@@ -55,7 +55,7 @@ namespace UniformMaterialManagementSystem.Models
             MaterialName = detail.Material.Name;
             ContractQty = detail.ContractQty;
             InspectedQty = detail.InspectedQty;
-            UnInspectQty = ContractQty - InspectedQty;
+            UnInspectQty = ContractQty - InspectedQty + 200;
             SigningDate = detail.Contract.SigningDate.ToString("yyyy-MM-dd");
             InspectStatus = detail.InspectStatus;
         }

+ 7 - 7
UniformMaterialManagementSystem/ViewModels/InspectApplyPageViewModel.cs

@@ -569,9 +569,9 @@ namespace UniformMaterialManagementSystem.ViewModels
             double sum = 0;
             foreach (var detail in ContractDetails)
             {
-                sum += detail.UnInspectQty;
+                sum += detail.UnInspectQty + 200;   //每个合同可以多报检200米
             }
-            if (InspQuantity > sum + 200)
+            if (InspQuantity > sum)
             {
                 errorMessage.Append("报检数量超出合同信息中可报检数量!\n");
             }
@@ -602,7 +602,7 @@ namespace UniformMaterialManagementSystem.ViewModels
             /* 校验材料批次(材料批次相同,包号不重复) */
             if (InspectApplyDetails.Count == 0)
             {
-                errorMessage.Append("材料批次信息不允许为空!\n");
+                errorMessage.Append("材料包号信息不允许为空!\n");
             }
 
             var isRepeat = InspectApplyDetails.GroupBy(p => p.PacketNo).Any(g => g.Count() > 1);
@@ -698,10 +698,10 @@ namespace UniformMaterialManagementSystem.ViewModels
                 }
             }
             //没有扣减完成,则找到第一个合同单据完成剩余扣减
-            if (remainQty > 0)
-            {
-                contractDetails[0].ShareInspectQty += remainQty;
-            }
+            //if (remainQty > 0)
+            //{
+            //    contractDetails[0].ShareInspectQty += remainQty;
+            //}
         }
 
         /// <summary>

+ 2 - 1
UniformMaterialManagementSystem/ViewModels/SelectContractWindowViewModel.cs

@@ -26,7 +26,8 @@ namespace UniformMaterialManagementSystem.ViewModels
                 .Include(p => p.Contract)
                 .ThenInclude(t => t.PurchaseCompany)
                 .Where(r => r.MaterialGuid == InspectApplyUtil.MaterialGuid)
-                .Where(r => r.Contract.CompanyGuid == App.CurrentUser.CompanyGuid);
+                .Where(r => r.Contract.CompanyGuid == App.CurrentUser.CompanyGuid)
+                .Where(r=>r.Contract.ExportStatus);
 
             foreach (var detail in query)
             {

+ 24 - 14
UniformMaterialManagementSystem/Views/ContractPage.xaml

@@ -1377,7 +1377,7 @@
                                 Grid.Column="0"
                                 HorizontalAlignment="Right"
                                 Text="*合同明细:" />
-                            <DataGrid
+                            <control:FilterDataGrid
                                 x:Name="DataGridDetail"
                                 Grid.Row="6"
                                 Grid.Column="1"
@@ -1394,8 +1394,10 @@
                                 RowHeaderStyle="{StaticResource CustomRowHeaderStyle}"
                                 RowStyle="{StaticResource CustomRowStyle}"
                                 SelectionMode="Single"
+                                ShowRowsCount="True"
+                                ShowStatusBar="True"
                                 VerticalGridLinesBrush="LightSlateGray">
-                                <DataGrid.Resources>
+                                <control:FilterDataGrid.Resources>
                                     <!--  非编辑模式下文本居中的样式  -->
                                     <Style x:Key="TextColumnElementStyle" TargetType="TextBlock">
                                         <Setter Property="HorizontalAlignment" Value="Center" />
@@ -1408,66 +1410,74 @@
                                         <Setter Property="VerticalAlignment" Value="Stretch" />
                                         <Setter Property="VerticalContentAlignment" Value="Center" />
                                     </Style>
-                                </DataGrid.Resources>
-                                <DataGrid.Columns>
-                                    <DataGridTextColumn
+                                </control:FilterDataGrid.Resources>
+                                <control:FilterDataGrid.Columns>
+                                    <control:FilterDataGridTextColumn
                                         Width="300"
                                         Binding="{Binding Material.Name}"
                                         EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
                                         ElementStyle="{StaticResource TextColumnElementStyle}"
                                         Header="材料名称"
+                                        IsColumnFiltered="True"
                                         IsReadOnly="True" />
-                                    <DataGridTextColumn
+                                    <control:FilterDataGridNumericColumn
                                         Width="150"
                                         Binding="{Binding ContractQty}"
                                         EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
                                         ElementStyle="{StaticResource TextColumnElementStyle}"
                                         Header="成交数量"
+                                        IsColumnFiltered="True"
                                         IsReadOnly="True" />
-                                    <DataGridTextColumn
+                                    <control:FilterDataGridTextColumn
                                         Width="80"
                                         Binding="{Binding Material.MeasureUnit}"
                                         EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
                                         ElementStyle="{StaticResource TextColumnElementStyle}"
                                         Header="计量单位"
+                                        IsColumnFiltered="True"
                                         IsReadOnly="True" />
-                                    <DataGridTextColumn
+                                    <control:FilterDataGridTextColumn
                                         Width="150"
                                         Binding="{Binding DeliveryTime, StringFormat=yyyy-MM-dd}"
                                         EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
                                         ElementStyle="{StaticResource TextColumnElementStyle}"
                                         Header="交货时限"
+                                        IsColumnFiltered="True"
                                         IsReadOnly="True" />
-                                    <DataGridTextColumn
+                                    <control:FilterDataGridNumericColumn
                                         Width="100"
                                         Binding="{Binding UnitPrice}"
                                         EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
                                         ElementStyle="{StaticResource TextColumnElementStyle}"
                                         Header="单价"
+                                        IsColumnFiltered="True"
                                         IsReadOnly="True" />
-                                    <DataGridTextColumn
+                                    <control:FilterDataGridNumericColumn
                                         Width="100"
                                         Binding="{Binding InspectedQty}"
                                         EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
                                         ElementStyle="{StaticResource TextColumnElementStyle}"
                                         Header="已报检数量"
+                                        IsColumnFiltered="True"
                                         IsReadOnly="True" />
-                                    <DataGridTextColumn
+                                    <control:FilterDataGridNumericColumn
                                         Width="100"
                                         Binding="{Binding ShippedQuantity}"
                                         EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
                                         ElementStyle="{StaticResource TextColumnElementStyle}"
                                         Header="已发货数量"
+                                        IsColumnFiltered="True"
                                         IsReadOnly="True" />
-                                    <DataGridTextColumn
+                                    <control:FilterDataGridTextColumn
                                         Width="130"
                                         Binding="{Binding InspectStatus}"
                                         EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
                                         ElementStyle="{StaticResource TextColumnElementStyle}"
                                         Header="报检状态"
+                                        IsColumnFiltered="True"
                                         IsReadOnly="True" />
-                                </DataGrid.Columns>
-                            </DataGrid>
+                                </control:FilterDataGrid.Columns>
+                            </control:FilterDataGrid>
                         </Grid>
                     </Border>
                 </Grid>

File diff suppressed because it is too large
+ 591 - 580
UniformMaterialManagementSystem/Views/InspectApplyPage.xaml


+ 411 - 410
UniformMaterialManagementSystem/Views/InspectionRecordPage.xaml

@@ -469,263 +469,265 @@
                             <ColumnDefinition Width="*" />
                         </Grid.ColumnDefinitions>
                         <!--  左侧  -->
-                        <Border
-                            Grid.Column="0"
-                            Padding="10,10,20,10"
-                            BorderBrush="Gray"
-                            BorderThickness="1">
-                            <Grid Background="White">
-                                <Grid.RowDefinitions>
-                                    <RowDefinition Height="Auto" />
-                                    <RowDefinition Height="35" />
-                                    <RowDefinition Height="35" />
-                                    <RowDefinition Height="35" />
-                                    <RowDefinition Height="35" />
-                                    <RowDefinition Height="35" />
-                                    <RowDefinition Height="35" />
-                                    <RowDefinition Height="45" />
-                                    <RowDefinition Height="160" />
-                                    <RowDefinition Height="*" />
-                                </Grid.RowDefinitions>
-                                <Grid.ColumnDefinitions>
-                                    <ColumnDefinition Width="3*" />
-                                    <ColumnDefinition Width="5*" />
-                                    <ColumnDefinition Width="4*" />
-                                    <ColumnDefinition Width="5*" />
-                                </Grid.ColumnDefinitions>
-                                <Label
-                                    Grid.Row="0"
-                                    Grid.Column="0"
-                                    Grid.ColumnSpan="4"
-                                    HorizontalAlignment="Center"
-                                    VerticalAlignment="Center"
-                                    FontSize="25">
-                                    军需物资质量检验申请表
-                                </Label>
-                                <TextBlock
-                                    Grid.Row="1"
-                                    Grid.Column="0"
-                                    HorizontalAlignment="Right"
-                                    VerticalAlignment="Center">
-                                    申请编号:
-                                </TextBlock>
-                                <TextBlock
-                                    Grid.Row="1"
-                                    Grid.Column="1"
-                                    Grid.ColumnSpan="3"
-                                    Text="{Binding InspectApply.ApplyNo}" />
-                                <TextBlock
-                                    Grid.Row="2"
-                                    Grid.Column="0"
-                                    HorizontalAlignment="Right"
-                                    VerticalAlignment="Center">
-                                    *检验类别:
-                                </TextBlock>
-                                <StackPanel
-                                    Grid.Row="2"
-                                    Grid.Column="1"
-                                    Grid.ColumnSpan="3"
-                                    VerticalAlignment="Center">
-                                    <Grid VerticalAlignment="Center" Background="White">
+                        <ScrollViewer Grid.Column="0" VerticalScrollBarVisibility="Auto">
+                            <Border
+                                Grid.Column="0"
+                                Padding="10,10,20,10"
+                                BorderBrush="Gray"
+                                BorderThickness="1">
+                                <Grid Background="White">
+                                    <Grid.RowDefinitions>
+                                        <RowDefinition Height="Auto" />
+                                        <RowDefinition Height="35" />
+                                        <RowDefinition Height="35" />
+                                        <RowDefinition Height="35" />
+                                        <RowDefinition Height="35" />
+                                        <RowDefinition Height="35" />
+                                        <RowDefinition Height="35" />
+                                        <RowDefinition Height="45" />
+                                        <RowDefinition Height="200" />
+                                        <RowDefinition Height="300" />
+                                    </Grid.RowDefinitions>
+                                    <Grid.ColumnDefinitions>
+                                        <ColumnDefinition Width="3*" />
+                                        <ColumnDefinition Width="5*" />
+                                        <ColumnDefinition Width="4*" />
+                                        <ColumnDefinition Width="5*" />
+                                    </Grid.ColumnDefinitions>
+                                    <Label
+                                        Grid.Row="0"
+                                        Grid.Column="0"
+                                        Grid.ColumnSpan="4"
+                                        HorizontalAlignment="Center"
+                                        VerticalAlignment="Center"
+                                        FontSize="25">
+                                        军需物资质量检验申请表
+                                    </Label>
+                                    <TextBlock
+                                        Grid.Row="1"
+                                        Grid.Column="0"
+                                        HorizontalAlignment="Right"
+                                        VerticalAlignment="Center">
+                                        申请编号:
+                                    </TextBlock>
+                                    <TextBlock
+                                        Grid.Row="1"
+                                        Grid.Column="1"
+                                        Grid.ColumnSpan="3"
+                                        Text="{Binding InspectApply.ApplyNo}" />
+                                    <TextBlock
+                                        Grid.Row="2"
+                                        Grid.Column="0"
+                                        HorizontalAlignment="Right"
+                                        VerticalAlignment="Center">
+                                        *检验类别:
+                                    </TextBlock>
+                                    <StackPanel
+                                        Grid.Row="2"
+                                        Grid.Column="1"
+                                        Grid.ColumnSpan="3"
+                                        VerticalAlignment="Center">
+                                        <Grid VerticalAlignment="Center" Background="White">
+                                            <Grid.ColumnDefinitions>
+                                                <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"
+                                                IsChecked="True"
+                                                IsEnabled="False" />
+                                            <TextBox
+                                                x:Name="InspectTypeText"
+                                                Grid.Column="2"
+                                                Text="{Binding InspectApply.InspCategory, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                                TextChanged="InspectTypeText_TextChanged"
+                                                Visibility="Collapsed" />
+                                        </Grid>
+                                    </StackPanel>
+                                    <TextBlock
+                                        Grid.Row="3"
+                                        Grid.Column="0"
+                                        HorizontalAlignment="Right"
+                                        VerticalAlignment="Center">
+                                        *产品名称:
+                                    </TextBlock>
+                                    <ComboBox
+                                        x:Name="MaterialComboBox"
+                                        Grid.Row="3"
+                                        Grid.Column="1"
+                                        Height="25"
+                                        DisplayMemberPath="Name"
+                                        FontSize="14"
+                                        IsEnabled="False"
+                                        ItemsSource="{Binding Materials}"
+                                        SelectedItem="{Binding InspectApply.Material, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
+                                    <TextBlock
+                                        Grid.Row="3"
+                                        Grid.Column="2"
+                                        HorizontalAlignment="Right"
+                                        VerticalAlignment="Center">
+                                        *生产企业:
+                                    </TextBlock>
+                                    <ComboBox
+                                        x:Name="CompanyComboBox"
+                                        Grid.Row="3"
+                                        Grid.Column="3"
+                                        Height="25"
+                                        FontSize="14"
+                                        IsEnabled="False"
+                                        ItemsSource="{Binding Companies}"
+                                        SelectedItem="{Binding InspectApply.Company, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
+
+                                    <TextBlock
+                                        Grid.Row="4"
+                                        Grid.Column="0"
+                                        HorizontalAlignment="Right"
+                                        VerticalAlignment="Center">
+                                        *报检数量:
+                                    </TextBlock>
+                                    <Grid
+                                        Grid.Row="4"
+                                        Grid.Column="1"
+                                        Background="White">
                                         <Grid.ColumnDefinitions>
+                                            <ColumnDefinition Width="3*" />
                                             <ColumnDefinition Width="*" />
+                                        </Grid.ColumnDefinitions>
+                                        <TextBox
+                                            x:Name="InspQuantityText"
+                                            Grid.Column="0"
+                                            Height="25"
+                                            VerticalAlignment="Center"
+                                            VerticalContentAlignment="Center"
+                                            FontSize="14"
+                                            IsEnabled="False"
+                                            Text="{Binding InspectApply.InspQuantity, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
+                                        <TextBlock Grid.Column="1" Text="{Binding InspectApply.Material.MeasureUnit, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" />
+                                    </Grid>
+                                    <TextBlock
+                                        Grid.Row="4"
+                                        Grid.Column="2"
+                                        HorizontalAlignment="Right"
+                                        VerticalAlignment="Center">
+                                        *申请检验时间:
+                                    </TextBlock>
+                                    <DatePicker
+                                        Grid.Row="4"
+                                        Grid.Column="3"
+                                        Height="25"
+                                        FontSize="14"
+                                        IsEnabled="False"
+                                        SelectedDate="{Binding InspectApply.InspDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
+                                    <TextBlock
+                                        Grid.Row="5"
+                                        Grid.Column="0"
+                                        HorizontalAlignment="Right"
+                                        VerticalAlignment="Center">
+                                        *生产日期:
+                                    </TextBlock>
+                                    <Grid
+                                        Grid.Row="5"
+                                        Grid.Column="1"
+                                        Background="White">
+                                        <Grid.ColumnDefinitions>
                                             <ColumnDefinition Width="*" />
+                                            <ColumnDefinition Width="Auto" />
                                             <ColumnDefinition Width="*" />
                                         </Grid.ColumnDefinitions>
-                                        <RadioButton
-                                            x:Name="FirstRadioButton"
+                                        <DatePicker
+                                            x:Name="StartProductDatePicker"
                                             Grid.Column="0"
-                                            Content="报样检验"
-                                            GroupName="InspectType"
-                                            IsEnabled="False" />
-                                        <RadioButton
-                                            x:Name="SecondRadioButton"
-                                            Grid.Column="1"
-                                            Content="首批检验"
-                                            GroupName="InspectType"
-                                            IsEnabled="False" />
-                                        <RadioButton
-                                            x:Name="ThirdRadioButton"
+                                            Height="25"
+                                            FontSize="14"
+                                            IsEnabled="False"
+                                            SelectedDate="{Binding InspectApply.StartProductDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
+                                        <TextBlock Grid.Column="1" Text="至" />
+                                        <DatePicker
+                                            x:Name="EndProductDatePicker"
                                             Grid.Column="2"
-                                            Content="出厂检验"
-                                            GroupName="InspectType"
-                                            IsChecked="True"
-                                            IsEnabled="False" />
-                                        <TextBox
-                                            x:Name="InspectTypeText"
-                                            Grid.Column="2"
-                                            Text="{Binding InspectApply.InspCategory, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                                            TextChanged="InspectTypeText_TextChanged"
-                                            Visibility="Collapsed" />
+                                            Height="25"
+                                            FontSize="14"
+                                            IsEnabled="False"
+                                            SelectedDate="{Binding InspectApply.EndProductDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                                     </Grid>
-                                </StackPanel>
-                                <TextBlock
-                                    Grid.Row="3"
-                                    Grid.Column="0"
-                                    HorizontalAlignment="Right"
-                                    VerticalAlignment="Center">
-                                    *产品名称:
-                                </TextBlock>
-                                <ComboBox
-                                    x:Name="MaterialComboBox"
-                                    Grid.Row="3"
-                                    Grid.Column="1"
-                                    Height="25"
-                                    DisplayMemberPath="Name"
-                                    FontSize="14"
-                                    IsEnabled="False"
-                                    ItemsSource="{Binding Materials}"
-                                    SelectedItem="{Binding InspectApply.Material, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
-                                <TextBlock
-                                    Grid.Row="3"
-                                    Grid.Column="2"
-                                    HorizontalAlignment="Right"
-                                    VerticalAlignment="Center">
-                                    *生产企业:
-                                </TextBlock>
-                                <ComboBox
-                                    x:Name="CompanyComboBox"
-                                    Grid.Row="3"
-                                    Grid.Column="3"
-                                    Height="25"
-                                    FontSize="14"
-                                    IsEnabled="False"
-                                    ItemsSource="{Binding Companies}"
-                                    SelectedItem="{Binding InspectApply.Company, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
-
-                                <TextBlock
-                                    Grid.Row="4"
-                                    Grid.Column="0"
-                                    HorizontalAlignment="Right"
-                                    VerticalAlignment="Center">
-                                    *报检数量:
-                                </TextBlock>
-                                <Grid
-                                    Grid.Row="4"
-                                    Grid.Column="1"
-                                    Background="White">
-                                    <Grid.ColumnDefinitions>
-                                        <ColumnDefinition Width="3*" />
-                                        <ColumnDefinition Width="*" />
-                                    </Grid.ColumnDefinitions>
-                                    <TextBox
-                                        x:Name="InspQuantityText"
-                                        Grid.Column="0"
+                                    <TextBlock
+                                        Grid.Row="5"
+                                        Grid.Column="2"
+                                        HorizontalAlignment="Right"
+                                        VerticalAlignment="Center">
+                                        *工作年度:
+                                    </TextBlock>
+                                    <ComboBox
+                                        x:Name="YearComboBox"
+                                        Grid.Row="5"
+                                        Grid.Column="3"
                                         Height="25"
-                                        VerticalAlignment="Center"
-                                        VerticalContentAlignment="Center"
-                                        FontSize="14"
+                                        Padding="5,0,0,0"
                                         IsEnabled="False"
-                                        Text="{Binding InspectApply.InspQuantity, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
-                                    <TextBlock Grid.Column="1" Text="{Binding InspectApply.Material.MeasureUnit, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" />
-                                </Grid>
-                                <TextBlock
-                                    Grid.Row="4"
-                                    Grid.Column="2"
-                                    HorizontalAlignment="Right"
-                                    VerticalAlignment="Center">
-                                    *申请检验时间:
-                                </TextBlock>
-                                <DatePicker
-                                    Grid.Row="4"
-                                    Grid.Column="3"
-                                    Height="25"
-                                    FontSize="14"
-                                    IsEnabled="False"
-                                    SelectedDate="{Binding InspectApply.InspDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
-                                <TextBlock
-                                    Grid.Row="5"
-                                    Grid.Column="0"
-                                    HorizontalAlignment="Right"
-                                    VerticalAlignment="Center">
-                                    *生产日期:
-                                </TextBlock>
-                                <Grid
-                                    Grid.Row="5"
-                                    Grid.Column="1"
-                                    Background="White">
-                                    <Grid.ColumnDefinitions>
-                                        <ColumnDefinition Width="*" />
-                                        <ColumnDefinition Width="Auto" />
-                                        <ColumnDefinition Width="*" />
-                                    </Grid.ColumnDefinitions>
-                                    <DatePicker
-                                        x:Name="StartProductDatePicker"
+                                        ItemsSource="{Binding Years}"
+                                        SelectedItem="{Binding InspectApply.Year, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
+                                    <TextBlock
+                                        Grid.Row="6"
                                         Grid.Column="0"
+                                        HorizontalAlignment="Right"
+                                        VerticalAlignment="Center"
+                                        Text="*订购方检测报告编号:"
+                                        TextWrapping="Wrap" />
+                                    <TextBox
+                                        Grid.Row="6"
+                                        Grid.Column="1"
                                         Height="25"
-                                        FontSize="14"
+                                        VerticalContentAlignment="Center"
+                                        FontSize="13"
                                         IsEnabled="False"
-                                        SelectedDate="{Binding InspectApply.StartProductDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
-                                    <TextBlock Grid.Column="1" Text="至" />
-                                    <DatePicker
-                                        x:Name="EndProductDatePicker"
+                                        Text="{Binding InspectApply.InspReportNo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
+                                    <TextBlock
+                                        Grid.Row="6"
                                         Grid.Column="2"
+                                        HorizontalAlignment="Right"
+                                        VerticalAlignment="Center"
+                                        Text="*材料批号:" />
+                                    <TextBox
+                                        Grid.Row="6"
+                                        Grid.Column="3"
                                         Height="25"
-                                        FontSize="14"
+                                        VerticalContentAlignment="Center"
+                                        FontSize="13"
                                         IsEnabled="False"
-                                        SelectedDate="{Binding InspectApply.EndProductDate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
-                                </Grid>
-                                <TextBlock
-                                    Grid.Row="5"
-                                    Grid.Column="2"
-                                    HorizontalAlignment="Right"
-                                    VerticalAlignment="Center">
-                                    *工作年度:
-                                </TextBlock>
-                                <ComboBox
-                                    x:Name="YearComboBox"
-                                    Grid.Row="5"
-                                    Grid.Column="3"
-                                    Height="25"
-                                    Padding="5,0,0,0"
-                                    IsEnabled="False"
-                                    ItemsSource="{Binding Years}"
-                                    SelectedItem="{Binding InspectApply.Year, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
-                                <TextBlock
-                                    Grid.Row="6"
-                                    Grid.Column="0"
-                                    HorizontalAlignment="Right"
-                                    VerticalAlignment="Center"
-                                    Text="*订购方检测报告编号:" />
-                                <TextBox
-                                    Grid.Row="6"
-                                    Grid.Column="1"
-                                    Height="25"
-                                    VerticalContentAlignment="Center"
-                                    FontSize="13"
-                                    IsEnabled="False"
-                                    Text="{Binding InspectApply.InspReportNo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
-                                <TextBlock
-                                    Grid.Row="6"
-                                    Grid.Column="2"
-                                    HorizontalAlignment="Right"
-                                    VerticalAlignment="Center"
-                                    Text="*材料批号:" />
-                                <TextBox
-                                    Grid.Row="6"
-                                    Grid.Column="3"
-                                    Height="25"
-                                    VerticalContentAlignment="Center"
-                                    FontSize="13"
-                                    IsEnabled="False"
-                                    Text="{Binding InspectApply.BatchNo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
-                                <TextBlock
-                                    Grid.Row="7"
-                                    Grid.Column="0"
-                                    HorizontalAlignment="Right"
-                                    TextWrapping="Wrap">
-                                    订购方检测报告:
-                                </TextBlock>
-                                <Border
-                                    Grid.Row="7"
-                                    Grid.Column="1"
-                                    Grid.ColumnSpan="3"
-                                    VerticalAlignment="Center">
-                                    <StackPanel
-                                        Background="White"
-                                        FlowDirection="LeftToRight"
-                                        Orientation="Horizontal">
-                                        <!--<Button
+                                        Text="{Binding InspectApply.BatchNo, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
+                                    <TextBlock
+                                        Grid.Row="7"
+                                        Grid.Column="0"
+                                        HorizontalAlignment="Right"
+                                        TextWrapping="Wrap">
+                                        订购方检测报告:
+                                    </TextBlock>
+                                    <Border
+                                        Grid.Row="7"
+                                        Grid.Column="1"
+                                        Grid.ColumnSpan="3"
+                                        VerticalAlignment="Center">
+                                        <StackPanel
+                                            Background="White"
+                                            FlowDirection="LeftToRight"
+                                            Orientation="Horizontal">
+                                            <!--<Button
                                             x:Name="UploadAttachmentButton"
                                             Margin="3"
                                             Command="{Binding UploadAttachmentCommand}"
@@ -754,34 +756,34 @@
                                                 </ControlTemplate>
                                             </Button.Template>
                                         </Button>-->
-                                        <Button
-                                            x:Name="DownLoadAttachmentButton"
-                                            Margin="3"
-                                            Command="{Binding DownLoadAttachmentCommand}">
-                                            <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.Document_Arrow_Down_16}" />
-                                                            <TextBlock Text="下载附件" />
-                                                        </StackPanel>
-                                                    </Border>
-                                                    <ControlTemplate.Triggers>
-                                                        <Trigger Property="IsMouseOver" Value="True">
-                                                            <Setter Property="Background" Value="LightGray" />
-                                                        </Trigger>
-                                                    </ControlTemplate.Triggers>
-                                                </ControlTemplate>
-                                            </Button.Template>
-                                        </Button>
-                                        <!--<Button
+                                            <Button
+                                                x:Name="DownLoadAttachmentButton"
+                                                Margin="3"
+                                                Command="{Binding DownLoadAttachmentCommand}">
+                                                <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.Document_Arrow_Down_16}" />
+                                                                <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="RemoveAttachmentButton"
                                             Margin="3"
                                             Command="{Binding RemoveAttachmentCommand}"
@@ -810,158 +812,157 @@
                                                 </ControlTemplate>
                                             </Button.Template>
                                         </Button>-->
-                                        <Separator />
-                                        <TextBlock
-                                            x:Name="UnAttachmentText"
-                                            HorizontalAlignment="Center"
-                                            FontFamily="{StaticResource FluentSystemIconsRegular}"
-                                            FontSize="20"
-                                            Text="{x:Static utils:RegularFontUtil.Document_Split_Hint_Off_16}" />
-                                        <TextBlock
-                                            x:Name="AttachmentText"
-                                            HorizontalAlignment="Center"
-                                            FontFamily="{StaticResource FluentSystemIconsRegular}"
-                                            FontSize="20"
-                                            Text="{x:Static utils:RegularFontUtil.Attach_24}" />
-                                        <TextBlock
-                                            x:Name="UnUploadText"
-                                            FontSize="12"
-                                            FontWeight="Bold"
-                                            Foreground="Red"
-                                            Text="附件未上传" />
+                                            <Separator />
+                                            <TextBlock
+                                                x:Name="UnAttachmentText"
+                                                HorizontalAlignment="Center"
+                                                FontFamily="{StaticResource FluentSystemIconsRegular}"
+                                                FontSize="20"
+                                                Text="{x:Static utils:RegularFontUtil.Document_Split_Hint_Off_16}" />
+                                            <TextBlock
+                                                x:Name="AttachmentText"
+                                                HorizontalAlignment="Center"
+                                                FontFamily="{StaticResource FluentSystemIconsRegular}"
+                                                FontSize="20"
+                                                Text="{x:Static utils:RegularFontUtil.Attach_24}" />
+                                            <TextBlock
+                                                x:Name="UnUploadText"
+                                                FontSize="12"
+                                                FontWeight="Bold"
+                                                Foreground="Red"
+                                                Text="附件未上传" />
 
-                                        <TextBox
-                                            x:Name="IsUploadText"
-                                            Text="{Binding IsUpload, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                                            TextChanged="IsUploadText_TextChanged"
-                                            Visibility="Collapsed" />
-                                        <TextBlock
-                                            x:Name="UploadedText"
-                                            FontSize="12"
-                                            FontWeight="Bold"
-                                            Foreground="Green"
-                                            Text="附件已上传"
-                                            Visibility="Collapsed" />
-                                        <!--<TextBlock
+                                            <TextBox
+                                                x:Name="IsUploadText"
+                                                Text="{Binding IsUpload, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                                TextChanged="IsUploadText_TextChanged"
+                                                Visibility="Collapsed" />
+                                            <TextBlock
+                                                x:Name="UploadedText"
+                                                FontSize="12"
+                                                FontWeight="Bold"
+                                                Foreground="Green"
+                                                Text="附件已上传"
+                                                Visibility="Collapsed" />
+                                            <!--<TextBlock
                                             FontSize="12"
                                             Foreground="Red"
                                             Text="(*请选择PDF格式文件上传)" />-->
-                                    </StackPanel>
+                                        </StackPanel>
 
-                                </Border>
+                                    </Border>
 
-                                <TextBlock
-                                    Grid.Row="8"
-                                    Grid.Column="0"
-                                    HorizontalAlignment="Right"
-                                    AllowDrop="True"
-                                    TextWrapping="Wrap">
-                                    *申请检验准备情况说明:
-                                </TextBlock>
-                                <ScrollViewer
-                                    Grid.Row="8"
-                                    Grid.Column="1"
-                                    Grid.ColumnSpan="3"
-                                    HorizontalScrollBarVisibility="Auto"
-                                    VerticalScrollBarVisibility="Auto">
-                                    <TextBox
-                                        x:Name="ApplyDescriptionTextBox"
-                                        Height="150"
-                                        Padding="5"
-                                        FontSize="14"
-                                        IsEnabled="False"
-                                        Text="{Binding InspectApply.ApplyDescription, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
-                                        TextWrapping="Wrap" />
-                                </ScrollViewer>
+                                    <TextBlock
+                                        Grid.Row="8"
+                                        Grid.Column="0"
+                                        HorizontalAlignment="Right"
+                                        AllowDrop="True"
+                                        TextWrapping="Wrap">
+                                        *申请检验准备情况说明:
+                                    </TextBlock>
+                                    <ScrollViewer
+                                        Grid.Row="8"
+                                        Grid.Column="1"
+                                        Grid.ColumnSpan="3"
+                                        VerticalScrollBarVisibility="Auto">
+                                        <TextBox
+                                            x:Name="ApplyDescriptionTextBox"
+                                            Padding="5"
+                                            FontSize="14"
+                                            IsEnabled="False"
+                                            Text="{Binding InspectApply.ApplyDescription, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                            TextWrapping="Wrap" />
+                                    </ScrollViewer>
 
-                                <TextBlock
-                                    Grid.Row="9"
-                                    Grid.Column="0"
-                                    HorizontalAlignment="Right"
-                                    Text="合同信息:" />
-                                <Grid
-                                    Grid.Row="9"
-                                    Grid.Column="1"
-                                    Grid.ColumnSpan="3">
-                                    <Grid.RowDefinitions>
-                                        <RowDefinition Height="*" />
-                                    </Grid.RowDefinitions>
-                                    <control:FilterDataGrid
-                                        x:Name="DataGridContract"
-                                        Grid.Row="0"
-                                        behaviors:DataGridBehavior.RowNumbers="True"
-                                        AutoGenerateColumns="False"
-                                        Background="White"
-                                        CanUserAddRows="False"
-                                        CanUserReorderColumns="True"
-                                        CanUserResizeColumns="True"
-                                        CellStyle="{StaticResource CustomCellStyle}"
-                                        ColumnHeaderStyle="{StaticResource CustomColumnHeaderStyle}"
-                                        FilterLanguage="SimplifiedChinese"
-                                        HeadersVisibility="All"
-                                        HorizontalGridLinesBrush="LightSlateGray"
-                                        ItemsSource="{Binding InspectApply.InspectApplyContractDetails, Mode=TwoWay}"
-                                        RowHeaderStyle="{StaticResource CustomRowHeaderStyle}"
-                                        RowStyle="{StaticResource CustomRowStyle}"
-                                        SelectionMode="Single"
-                                        ShowRowsCount="True"
-                                        ShowStatusBar="True"
-                                        VerticalGridLinesBrush="LightSlateGray">
+                                    <TextBlock
+                                        Grid.Row="9"
+                                        Grid.Column="0"
+                                        HorizontalAlignment="Right"
+                                        Text="合同信息:" />
+                                    <Grid
+                                        Grid.Row="9"
+                                        Grid.Column="1"
+                                        Grid.ColumnSpan="3">
+                                        <Grid.RowDefinitions>
+                                            <RowDefinition Height="*" />
+                                        </Grid.RowDefinitions>
+                                        <control:FilterDataGrid
+                                            x:Name="DataGridContract"
+                                            Grid.Row="0"
+                                            behaviors:DataGridBehavior.RowNumbers="True"
+                                            AutoGenerateColumns="False"
+                                            Background="White"
+                                            CanUserAddRows="False"
+                                            CanUserReorderColumns="True"
+                                            CanUserResizeColumns="True"
+                                            CellStyle="{StaticResource CustomCellStyle}"
+                                            ColumnHeaderStyle="{StaticResource CustomColumnHeaderStyle}"
+                                            FilterLanguage="SimplifiedChinese"
+                                            HeadersVisibility="All"
+                                            HorizontalGridLinesBrush="LightSlateGray"
+                                            ItemsSource="{Binding InspectApply.InspectApplyContractDetails, Mode=TwoWay}"
+                                            RowHeaderStyle="{StaticResource CustomRowHeaderStyle}"
+                                            RowStyle="{StaticResource CustomRowStyle}"
+                                            SelectionMode="Single"
+                                            ShowRowsCount="True"
+                                            ShowStatusBar="True"
+                                            VerticalGridLinesBrush="LightSlateGray">
 
-                                        <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>
+                                            <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>
+                                                <!--  编辑模式下文本居中的样式  -->
+                                                <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>
-                                            <control:FilterDataGridTextColumn
-                                                Width="2*"
-                                                Binding="{Binding PurchaseCompany}"
-                                                EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
-                                                ElementStyle="{StaticResource TextColumnElementStyle}"
-                                                Header="采购机构"
-                                                IsColumnFiltered="True"
-                                                IsReadOnly="True" />
-                                            <control:FilterDataGridTextColumn
-                                                Width="2*"
-                                                Binding="{Binding ContractNo}"
-                                                EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
-                                                ElementStyle="{StaticResource TextColumnElementStyle}"
-                                                Header="合同编号"
-                                                IsColumnFiltered="True"
-                                                IsReadOnly="True" />
-                                            <control:FilterDataGridTextColumn
-                                                Width="*"
-                                                Binding="{Binding SigningDate}"
-                                                EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
-                                                ElementStyle="{StaticResource TextColumnElementStyle}"
-                                                Header="合同签订时间"
-                                                IsColumnFiltered="True"
-                                                IsReadOnly="True" />
-                                            <control:FilterDataGridNumericColumn
-                                                Width="*"
-                                                Binding="{Binding InspectQty}"
-                                                EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
-                                                ElementStyle="{StaticResource TextColumnElementStyle}"
-                                                Header="报检数量"
-                                                IsColumnFiltered="True"
-                                                IsReadOnly="True" />
-                                        </control:FilterDataGrid.Columns>
-                                    </control:FilterDataGrid>
+                                            <control:FilterDataGrid.Columns>
+                                                <control:FilterDataGridTextColumn
+                                                    Width="2*"
+                                                    Binding="{Binding PurchaseCompany}"
+                                                    EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
+                                                    ElementStyle="{StaticResource TextColumnElementStyle}"
+                                                    Header="采购机构"
+                                                    IsColumnFiltered="True"
+                                                    IsReadOnly="True" />
+                                                <control:FilterDataGridTextColumn
+                                                    Width="2*"
+                                                    Binding="{Binding ContractNo}"
+                                                    EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
+                                                    ElementStyle="{StaticResource TextColumnElementStyle}"
+                                                    Header="合同编号"
+                                                    IsColumnFiltered="True"
+                                                    IsReadOnly="True" />
+                                                <control:FilterDataGridTextColumn
+                                                    Width="*"
+                                                    Binding="{Binding SigningDate}"
+                                                    EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
+                                                    ElementStyle="{StaticResource TextColumnElementStyle}"
+                                                    Header="合同签订时间"
+                                                    IsColumnFiltered="True"
+                                                    IsReadOnly="True" />
+                                                <control:FilterDataGridNumericColumn
+                                                    Width="*"
+                                                    Binding="{Binding InspectQty}"
+                                                    EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
+                                                    ElementStyle="{StaticResource TextColumnElementStyle}"
+                                                    Header="报检数量"
+                                                    IsColumnFiltered="True"
+                                                    IsReadOnly="True" />
+                                            </control:FilterDataGrid.Columns>
+                                        </control:FilterDataGrid>
+                                    </Grid>
                                 </Grid>
-                            </Grid>
-                        </Border>
+                            </Border>
+                        </ScrollViewer>
                     </Grid>
                 </Border>
             </Grid>

+ 32 - 20
UniformMaterialManagementSystem/Views/SelectContractWindow.xaml

@@ -3,8 +3,10 @@
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     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"
@@ -183,7 +185,7 @@
         </Border>
 
         <!--  表格  -->
-        <DataGrid
+        <control:FilterDataGrid
             x:Name="DataGridMain"
             Grid.Row="1"
             behaviors:DataGridBehavior.RowNumbers="True"
@@ -194,15 +196,18 @@
             CanUserResizeColumns="True"
             CellStyle="{StaticResource CustomCellStyle}"
             ColumnHeaderStyle="{StaticResource CustomColumnHeaderStyle}"
+            FilterLanguage="SimplifiedChinese"
             HeadersVisibility="All"
             HorizontalGridLinesBrush="LightSlateGray"
             ItemsSource="{Binding ContractDetails, Mode=TwoWay}"
             RowHeaderStyle="{StaticResource CustomRowHeaderStyle}"
             RowStyle="{StaticResource CustomRowStyle}"
             SelectionUnit="FullRow"
+            ShowRowsCount="True"
+            ShowStatusBar="True"
             VerticalGridLinesBrush="LightSlateGray">
 
-            <DataGrid.Resources>
+            <control:FilterDataGrid.Resources>
                 <!--  非编辑模式下文本居中的样式  -->
                 <Style x:Key="TextColumnElementStyle" TargetType="TextBlock">
                     <Setter Property="HorizontalAlignment" Value="Center" />
@@ -221,8 +226,8 @@
                     <Setter Property="HorizontalAlignment" Value="Center" />
                     <Setter Property="VerticalAlignment" Value="Center" />
                 </Style>
-            </DataGrid.Resources>
-            <DataGrid.Columns>
+            </control:FilterDataGrid.Resources>
+            <control:FilterDataGrid.Columns>
                 <DataGridTemplateColumn Width="50" Header="选择">
                     <DataGridTemplateColumn.CellTemplate>
                         <DataTemplate>
@@ -233,59 +238,66 @@
                         </DataTemplate>
                     </DataGridTemplateColumn.CellTemplate>
                 </DataGridTemplateColumn>
-                <DataGridTextColumn
-                    Width="2*"
+                <control:FilterDataGridTextColumn
+                    Width="200"
                     Binding="{Binding MaterialCompany, Mode=OneTime}"
                     EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
                     ElementStyle="{StaticResource TextColumnElementStyle}"
                     Header="材料企业"
+                    IsColumnFiltered="True"
                     IsReadOnly="True" />
-                <DataGridTextColumn
-                    Width="2*"
+                <control:FilterDataGridTextColumn
+                    Width="200"
                     Binding="{Binding PurchaseCompany, Mode=OneTime}"
                     EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
                     ElementStyle="{StaticResource TextColumnElementStyle}"
                     Header="采购机构"
+                    IsColumnFiltered="True"
                     IsReadOnly="True" />
-                <DataGridTextColumn
-                    Width="2*"
+                <control:FilterDataGridTextColumn
+                    Width="200"
                     Binding="{Binding ContractNo, Mode=OneTime}"
                     EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
                     ElementStyle="{StaticResource TextColumnElementStyle}"
                     Header="合同号"
+                    IsColumnFiltered="True"
                     IsReadOnly="True" />
-                <DataGridTextColumn
-                    Width="2*"
+                <control:FilterDataGridTextColumn
+                    Width="200"
                     Binding="{Binding MaterialName, Mode=OneTime}"
                     EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
                     ElementStyle="{StaticResource TextColumnElementStyle}"
                     Header="材料名称"
+                    IsColumnFiltered="True"
                     IsReadOnly="True" />
-                <DataGridTextColumn
-                    Width="*"
+                <control:FilterDataGridNumericColumn
+                    Width="100"
                     Binding="{Binding ContractQty, Mode=OneTime}"
                     EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
                     ElementStyle="{StaticResource TextColumnElementStyle}"
                     Header="成交数量"
+                    IsColumnFiltered="True"
                     IsReadOnly="True" />
-                <DataGridTextColumn
-                    Width="*"
+                <control:FilterDataGridNumericColumn
+                    Width="100"
                     Binding="{Binding InspectedQty, Mode=OneTime}"
                     EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
                     ElementStyle="{StaticResource TextColumnElementStyle}"
                     Header="已报检数量"
+                    IsColumnFiltered="True"
                     IsReadOnly="True" />
-                <DataGridTextColumn
-                    Width="*"
+                <control:FilterDataGridTextColumn
+                    Width="100"
                     Binding="{Binding InspectStatus, Mode=OneTime}"
                     EditingElementStyle="{StaticResource TextColumnEditingElementStyle}"
                     ElementStyle="{StaticResource TextColumnElementStyle}"
                     Header="报检状态"
+                    IsColumnFiltered="True"
                     IsReadOnly="True" />
 
 
-            </DataGrid.Columns>
-        </DataGrid>
+            </control:FilterDataGrid.Columns>
+        </control:FilterDataGrid>
 
 
     </Grid>

Some files were not shown because too many files changed in this diff