ProductionStatement.xaml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. <UserControl x:Class="TeamAAS_VP.Views.Statistics.ProductionStatement"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:prism="http://prismlibrary.com/"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels.Statistics"
  8. xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
  9. xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
  10. xmlns:oxy="http://oxyplot.org/wpf"
  11. xmlns:lex="http://wpflocalizeextension.codeplex.com"
  12. lex:LocalizeDictionary.DesignCulture="zh-CN"
  13. lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
  14. lex:ResxLocalizationProvider.DefaultDictionary="Lang"
  15. prism:ViewModelLocator.AutoWireViewModel="True"
  16. HorizontalAlignment="Stretch"
  17. VerticalAlignment="Stretch"
  18. FontFamily="{DynamicResource DefaultFont}"
  19. mc:Ignorable="d"
  20. d:DataContext="{d:DesignInstance Type=vm:AlarmQueryViewModel}"
  21. d:Height="600"
  22. d:Width="1024"
  23. d:Background="White">
  24. <b:Interaction.Triggers>
  25. <b:EventTrigger EventName="Loaded">
  26. <b:InvokeCommandAction Command="{Binding LoadedCommand}" />
  27. </b:EventTrigger>
  28. </b:Interaction.Triggers>
  29. <Grid>
  30. <Grid.ColumnDefinitions>
  31. <ColumnDefinition Width="200" />
  32. <ColumnDefinition Width="*" />
  33. </Grid.ColumnDefinitions>
  34. <StackPanel Grid.Column="0"
  35. Orientation="Vertical"
  36. Margin="10">
  37. <Grid>
  38. <Grid.ColumnDefinitions>
  39. <ColumnDefinition Width="auto" />
  40. <ColumnDefinition Width="*" />
  41. </Grid.ColumnDefinitions>
  42. <Grid.RowDefinitions>
  43. <RowDefinition Height="auto" />
  44. <RowDefinition Height="auto" />
  45. <RowDefinition Height="auto" />
  46. <RowDefinition Height="auto" />
  47. <RowDefinition Height="auto" />
  48. <RowDefinition Height="auto" />
  49. <RowDefinition Height="auto" />
  50. <RowDefinition Height="auto" />
  51. </Grid.RowDefinitions>
  52. <oxy:PlotView Grid.Row="0"
  53. Grid.Column="0"
  54. Grid.ColumnSpan="2"
  55. Model="{Binding YieldChartModel}"
  56. Width="180"
  57. Height="180"
  58. Background="Transparent" />
  59. <TextBlock Grid.Row="1"
  60. Text="{lex:Loc 总产能,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
  61. VerticalAlignment="Center"
  62. Margin="5" />
  63. <TextBox Grid.Row="1"
  64. Grid.Column="1"
  65. Text="{Binding TotalCount}"
  66. IsReadOnly="True"
  67. BorderBrush="Gray"
  68. TextAlignment="Center"
  69. BorderThickness="1"
  70. Margin="5" />
  71. <TextBlock Grid.Row="2"
  72. Text="{lex:Loc 月产能,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
  73. VerticalAlignment="Center"
  74. Margin="5" />
  75. <TextBox Grid.Row="2"
  76. Grid.Column="1"
  77. Text="{Binding MonthCount}"
  78. IsReadOnly="True"
  79. BorderBrush="Gray"
  80. TextAlignment="Center"
  81. BorderThickness="1"
  82. Margin="5" />
  83. <TextBlock Grid.Row="3"
  84. Text="{lex:Loc 周产能,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
  85. VerticalAlignment="Center"
  86. Margin="5" />
  87. <TextBox Grid.Row="3"
  88. Grid.Column="1"
  89. Text="{Binding WeekCount}"
  90. IsReadOnly="True"
  91. BorderBrush="Gray"
  92. TextAlignment="Center"
  93. BorderThickness="1"
  94. Margin="5" />
  95. <TextBlock Grid.Row="4"
  96. Text="{lex:Loc 日产能,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
  97. VerticalAlignment="Center"
  98. Margin="5" />
  99. <TextBox Grid.Row="4"
  100. Grid.Column="1"
  101. Text="{Binding DayCount}"
  102. IsReadOnly="True"
  103. BorderBrush="Gray"
  104. TextAlignment="Center"
  105. BorderThickness="1"
  106. Margin="5" />
  107. <TextBlock Grid.Row="5"
  108. Text="{lex:Loc 抛料数,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
  109. VerticalAlignment="Center"
  110. Margin="5" />
  111. <TextBox Grid.Row="5"
  112. Grid.Column="1"
  113. Text="{Binding ThrowNumber}"
  114. IsReadOnly="True"
  115. BorderBrush="Gray"
  116. TextAlignment="Center"
  117. BorderThickness="1"
  118. Margin="5" />
  119. <TextBlock Grid.Row="6"
  120. Text="{lex:Loc NG数量,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
  121. VerticalAlignment="Center"
  122. Margin="5" />
  123. <TextBox Grid.Row="6"
  124. Grid.Column="1"
  125. Text="{Binding NgNumber}"
  126. IsReadOnly="True"
  127. BorderBrush="Gray"
  128. TextAlignment="Center"
  129. BorderThickness="1"
  130. Margin="5" />
  131. <TextBlock Grid.Row="7"
  132. Text="{lex:Loc 良率,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
  133. VerticalAlignment="Center"
  134. Margin="5" />
  135. <TextBox Grid.Row="7"
  136. Grid.Column="1"
  137. Text="{Binding Yield,StringFormat={}{0:F2}%}"
  138. IsReadOnly="True"
  139. BorderBrush="Gray"
  140. TextAlignment="Center"
  141. BorderThickness="1"
  142. Margin="5" />
  143. </Grid>
  144. <Button Content="{lex:Loc 生成报表}"
  145. Margin="10"
  146. materialDesign:ButtonAssist.CornerRadius="10"
  147. Style="{StaticResource MaterialDesignRaisedButton}" />
  148. <StackPanel Orientation="Horizontal"
  149. Margin="2,100,2,2">
  150. <TextBlock Text="连续小时数:"
  151. Width="80"
  152. VerticalAlignment="Center" />
  153. <TextBox x:Name="txtConsecutiveHours"
  154. Width="100"
  155. Text="{Binding HourNumber}" />
  156. </StackPanel>
  157. <StackPanel Orientation="Horizontal"
  158. Margin="2,5,2,2">
  159. <TextBlock Text="目标产能:"
  160. Width="80"
  161. VerticalAlignment="Center" />
  162. <TextBox x:Name="txtTargetCapacity"
  163. Width="100"
  164. Text="{Binding UphNumber}" />
  165. </StackPanel>
  166. <Button Content="保存配置"
  167. Width="120"
  168. Height="35"
  169. Margin="10"
  170. Command="{Binding SaveConfigCommand}" />
  171. </StackPanel>
  172. <ScrollViewer Grid.Column="1">
  173. <StackPanel Orientation="Vertical">
  174. <Border Background="#FFFFFF"
  175. CornerRadius="8"
  176. Margin="0,0,0,0"
  177. Padding="1">
  178. <StackPanel Orientation="Horizontal"
  179. HorizontalAlignment="Center"
  180. Margin="0">
  181. <!-- 良率 -->
  182. <StackPanel>
  183. <TextBlock Text="良率"
  184. Foreground="#2D2D30"
  185. FontSize="12"
  186. Margin="30,0,30,0"
  187. Opacity="0.8" />
  188. <TextBlock x:Name="TxtYieldRate"
  189. Foreground="#00FF00"
  190. FontSize="24"
  191. Margin="30,0,30,0"
  192. Text="{Binding NowYieldt}" />
  193. </StackPanel>
  194. <!-- 总数 -->
  195. <StackPanel>
  196. <TextBlock Text="总检测数"
  197. Foreground="#2D2D30"
  198. FontSize="12"
  199. Margin="30,0,30,0"
  200. Opacity="0.8" />
  201. <TextBlock x:Name="TxtTotalCount"
  202. Foreground="#2D2D30"
  203. FontSize="24"
  204. Margin="30,0,30,0"
  205. Text="{Binding NowNumbers}" />
  206. </StackPanel>
  207. <!-- 合格数 -->
  208. <StackPanel>
  209. <TextBlock Text="合格数量"
  210. Foreground="#2D2D30"
  211. FontSize="12"
  212. Margin="30,0,30,0"
  213. Opacity="0.8" />
  214. <TextBlock x:Name="TxtOkCount"
  215. Foreground="#00FF00"
  216. FontSize="24"
  217. Margin="30,0,30,0"
  218. Text="{Binding NowOkNumbers}" />
  219. </StackPanel>
  220. <!-- 不合格数 -->
  221. <StackPanel>
  222. <TextBlock Text="不良数量"
  223. Foreground="#2D2D30"
  224. FontSize="12"
  225. Margin="30,0,30,0"
  226. Opacity="0.8" />
  227. <TextBlock x:Name="TxtNgCount"
  228. Foreground="#FF4444"
  229. FontSize="24"
  230. Margin="30,0,30,0"
  231. Text="{Binding NowNgNumbers}" />
  232. </StackPanel>
  233. </StackPanel>
  234. </Border>
  235. <oxy:PlotView Model="{Binding WeekChartModel}"
  236. Background="Transparent"
  237. Height="300" />
  238. <oxy:PlotView Model="{Binding DayChartModel}"
  239. Background="Transparent"
  240. Height="300" />
  241. <oxy:PlotView Model="{Binding MonthChartModel}"
  242. Background="Transparent"
  243. Height="300" />
  244. </StackPanel>
  245. </ScrollViewer>
  246. <Button Grid.Column="1"
  247. Margin="16"
  248. HorizontalAlignment="Right"
  249. VerticalAlignment="Center"
  250. Command="{x:Static materialDesign:Transitioner.MoveNextCommand}"
  251. Style="{StaticResource MaterialDesignFloatingActionSecondaryButton}">
  252. <materialDesign:PackIcon Kind="StepForward" />
  253. </Button>
  254. </Grid>
  255. </UserControl>