StatementPage.xaml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <UserControl x:Class="LogoForceTestApp.Modules.MainModule.Views.StatementPage"
  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:oxy="http://oxyplot.org/wpf"
  8. xmlns:hc="https://handyorg.github.io/handycontrol"
  9. xmlns:viewmodels="clr-namespace:LogoForceTestApp.Modules.MainModule.ViewModels"
  10. d:DataContext="{d:DesignInstance Type=viewmodels:StatementPageViewModel}"
  11. mc:Ignorable="d"
  12. d:DesignHeight="450" d:DesignWidth="800">
  13. <UserControl.Resources>
  14. <ResourceDictionary>
  15. <ResourceDictionary.MergedDictionaries>
  16. <ResourceDictionary Source="/LogoForceTestApp.Modules.MainModule;component/Dictionary/ButtonStyle.xaml" />
  17. </ResourceDictionary.MergedDictionaries>
  18. </ResourceDictionary>
  19. </UserControl.Resources>
  20. <Grid>
  21. <Grid.RowDefinitions>
  22. <RowDefinition Height="auto" />
  23. <RowDefinition Height="*" />
  24. <RowDefinition Height="auto" />
  25. </Grid.RowDefinitions>
  26. <StackPanel Orientation="Horizontal">
  27. <hc:DatePicker Margin="4,0"
  28. hc:InfoElement.Title="选择开始时间"
  29. SelectedDate="{Binding SelectedStartDate}" />
  30. <hc:DatePicker Margin="4,0"
  31. hc:InfoElement.Title="选择结束时间"
  32. SelectedDate="{Binding SelectedEndDate}" />
  33. <TextBlock Text="产品码:"
  34. Margin="5"
  35. FontSize="16"
  36. VerticalAlignment="Center" />
  37. <TextBox Width="300"
  38. VerticalAlignment="Center"
  39. FontSize="20"
  40. Text="{Binding ProCode,UpdateSourceTrigger=PropertyChanged}"
  41. Margin="4,0" />
  42. <Button Margin="4,0"
  43. VerticalAlignment="Center"
  44. Command="{Binding QueryCommand}"
  45. FontSize="14"
  46. Content="查询" />
  47. </StackPanel>
  48. <DataGrid Grid.Row="1"
  49. AutoGenerateColumns="False"
  50. IsReadOnly="True"
  51. ItemsSource="{Binding InfNew}">
  52. <DataGrid.Columns>
  53. <DataGridTextColumn Binding="{Binding CreateTime}"
  54. Header="日期" />
  55. <DataGridTextColumn Binding="{Binding OperatorCode}"
  56. Header="员工ID" />
  57. <DataGridTextColumn Binding="{Binding WorkDev}"
  58. Header="工作机台" />
  59. <DataGridTextColumn Binding="{Binding OrderNo}"
  60. Header="订单编号" />
  61. <DataGridTextColumn Binding="{Binding ProType}"
  62. Header="产品型号" />
  63. <DataGridTextColumn Binding="{Binding ProCode}"
  64. Header="产品码" />
  65. <DataGridTextColumn Binding="{Binding TestResult}"
  66. Header="检测结果" />
  67. <DataGridTextColumn Binding="{Binding SpendTime}"
  68. Header="用时(秒)" />
  69. <DataGridTextColumn Binding="{Binding ItemCode}"
  70. Header="物料码" />
  71. </DataGrid.Columns>
  72. </DataGrid>
  73. <hc:Pagination Grid.Row="2"
  74. HorizontalAlignment="Center"
  75. IsJumpEnabled="True"
  76. MaxPageCount="{Binding MaxCount}"
  77. PageIndex="{Binding PageIndex}">
  78. <hc:Interaction.Triggers>
  79. <hc:EventTrigger EventName="PageUpdated">
  80. <hc:EventToCommand Command="{Binding PageUpdatedCmd}"
  81. PassEventArgsToCommand="True" />
  82. </hc:EventTrigger>
  83. </hc:Interaction.Triggers>
  84. </hc:Pagination>
  85. </Grid>
  86. </UserControl>