QualityTracing.xaml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <UserControl x:Class="LogoForceTestApp.Modules.MainModule.Views.QualityTracing"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:LogoForceTestApp.Modules.MainModule.Views"
  7. xmlns:viewmodels="clr-namespace:LogoForceTestApp.Modules.MainModule.ViewModels"
  8. xmlns:hc="https://handyorg.github.io/handycontrol"
  9. d:DataContext="{d:DesignInstance Type=viewmodels:QualityTracingViewModel}"
  10. mc:Ignorable="d"
  11. d:DesignHeight="450" d:DesignWidth="800">
  12. <Grid>
  13. <Grid.RowDefinitions>
  14. <RowDefinition Height="auto" />
  15. <RowDefinition Height="*" />
  16. <RowDefinition Height="auto" />
  17. </Grid.RowDefinitions>
  18. <StackPanel Orientation="Horizontal">
  19. <hc:DatePicker Margin="4,0"
  20. hc:InfoElement.Title="选择开始时间"
  21. SelectedDate="{Binding SelectedStartDate}" />
  22. <hc:DatePicker Margin="4,0"
  23. hc:InfoElement.Title="选择结束时间"
  24. SelectedDate="{Binding SelectedEndDate}" />
  25. <TextBox Width="200"
  26. VerticalAlignment="Center"
  27. FontSize="20"
  28. Text="{Binding OperatorCode,UpdateSourceTrigger=PropertyChanged}"
  29. Margin="4,0"/>
  30. <Button Margin="4,0"
  31. VerticalAlignment="Center"
  32. Command="{Binding QueryCommand}"
  33. FontSize="14"
  34. Content="查询" />
  35. <TextBlock VerticalAlignment="Center"
  36. FontSize="20"
  37. Margin="4,0"
  38. Text="生产总数:" />
  39. <TextBlock Text="{Binding AllNumber}"
  40. FontSize="20"
  41. Margin="4,0"
  42. VerticalAlignment="Center" />
  43. <TextBlock Text="总用时:"
  44. FontSize="20"
  45. Margin="20,4,0,0"
  46. VerticalAlignment="Center" />
  47. <TextBlock Text="{Binding GeneralTime}"
  48. FontSize="20"
  49. Margin="4,0"
  50. VerticalAlignment="Center" />
  51. </StackPanel>
  52. <DataGrid Grid.Row="1"
  53. AutoGenerateColumns="False"
  54. IsReadOnly="True"
  55. ItemsSource="{Binding InfNew}">
  56. <DataGrid.Columns>
  57. <DataGridTextColumn Binding="{Binding CreateTime}"
  58. Header="日期" />
  59. <DataGridTextColumn Binding="{Binding ProCode}"
  60. Header="产品码" />
  61. <DataGridTextColumn Binding="{Binding OperatorCode}"
  62. Header="员工码" />
  63. <DataGridTextColumn Binding="{Binding SpendTime}"
  64. Header="用时" />
  65. </DataGrid.Columns>
  66. </DataGrid>
  67. <hc:Pagination Grid.Row="2"
  68. HorizontalAlignment="Center"
  69. IsJumpEnabled="True"
  70. MaxPageCount="{Binding MaxCount}"
  71. PageIndex="{Binding PageIndex}">
  72. <hc:Interaction.Triggers>
  73. <hc:EventTrigger EventName="PageUpdated">
  74. <hc:EventToCommand Command="{Binding PageUpdatedCmd}"
  75. PassEventArgsToCommand="True" />
  76. </hc:EventTrigger>
  77. </hc:Interaction.Triggers>
  78. </hc:Pagination>
  79. </Grid>
  80. </UserControl>