QualityTracing.xaml 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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 ProNo}"
  60. Header="产品编号" />
  61. <DataGridTextColumn Binding="{Binding OperatorCode}"
  62. Header="员工码" />
  63. <DataGridTextColumn Binding="{Binding SpendTime}"
  64. Header="用时" />
  65. <DataGridTextColumn Binding="{Binding ProType}"
  66. Header="产品型号" />
  67. <DataGridTextColumn Binding="{Binding ProCode}"
  68. Header="物料码" />
  69. </DataGrid.Columns>
  70. </DataGrid>
  71. <hc:Pagination Grid.Row="2"
  72. HorizontalAlignment="Center"
  73. IsJumpEnabled="True"
  74. MaxPageCount="{Binding MaxCount}"
  75. PageIndex="{Binding PageIndex}">
  76. <hc:Interaction.Triggers>
  77. <hc:EventTrigger EventName="PageUpdated">
  78. <hc:EventToCommand Command="{Binding PageUpdatedCmd}"
  79. PassEventArgsToCommand="True" />
  80. </hc:EventTrigger>
  81. </hc:Interaction.Triggers>
  82. </hc:Pagination>
  83. </Grid>
  84. </UserControl>