MainPage.xaml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. <UserControl x:Class="LogoForceTestApp.Modules.MainModule.Views.MainPage"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:converter="clr-namespace:LogoForceTestApp.Modules.MainModule.Converters"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:hc="https://handyorg.github.io/handycontrol"
  7. xmlns:local="clr-namespace:LogoForceTestApp.Modules.MainModule.Views"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:oxyplot="http://oxyplot.org/wpf"
  10. xmlns:viewmodels="clr-namespace:LogoForceTestApp.Modules.MainModule.ViewModels"
  11. xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
  12. d:DataContext="{d:DesignInstance Type=viewmodels:MainPageViewModel}"
  13. d:DesignHeight="450"
  14. d:DesignWidth="800"
  15. mc:Ignorable="d">
  16. <UserControl.Resources>
  17. <ResourceDictionary>
  18. <ResourceDictionary.MergedDictionaries>
  19. <ResourceDictionary Source="/LogoForceTestApp.Modules.MainModule;component/Dictionary/ButtonStyle.xaml" />
  20. <ResourceDictionary>
  21. <converter:BooleanToBrush x:Key="BoolBrush" />
  22. </ResourceDictionary>
  23. </ResourceDictionary.MergedDictionaries>
  24. </ResourceDictionary>
  25. </UserControl.Resources>
  26. <Grid>
  27. <Grid.ColumnDefinitions>
  28. <ColumnDefinition Width="3*" />
  29. <ColumnDefinition Width="2*" />
  30. </Grid.ColumnDefinitions>
  31. <Grid>
  32. <Grid.RowDefinitions>
  33. <RowDefinition Height="Auto" />
  34. <RowDefinition Height="*" />
  35. </Grid.RowDefinitions>
  36. <!--<GroupBox Header="型号">
  37. <Grid>
  38. <Grid.RowDefinitions>
  39. <RowDefinition />
  40. <RowDefinition />
  41. </Grid.RowDefinitions>
  42. <StackPanel Margin="0,4"
  43. Orientation="Horizontal">
  44. <TextBlock Margin="4,0"
  45. VerticalAlignment="Center"
  46. Text="产品名称"
  47. FontSize="25" />
  48. <hc:ComboBox HorizontalAlignment="Center"
  49. VerticalAlignment="Center"
  50. Margin="4,0"
  51. Width="200"
  52. SelectedItem="{Binding SelectedConfigName}"
  53. ItemsSource="{Binding ConfigNames}"
  54. FontSize="22" />
  55. <Button Content="一键切换"
  56. VerticalAlignment="Center"
  57. Margin="5"
  58. Width="130"
  59. Height="40"
  60. FontSize="22"
  61. Style="{StaticResource BtnStyle}"
  62. Command="{Binding SwitchCommand}" />
  63. </StackPanel>
  64. </Grid>
  65. </GroupBox>-->
  66. <GroupBox Grid.Row="1"
  67. Header="显示">
  68. <DataGrid AutoGenerateColumns="False"
  69. IsReadOnly="True"
  70. ItemsSource="{Binding InforNew}">
  71. <DataGrid.Columns>
  72. <DataGridTextColumn Width="*"
  73. Binding="{Binding CreateTime}"
  74. Header="日期" />
  75. <DataGridTextColumn Width="*"
  76. Binding="{Binding ProNo}"
  77. Header="产品编号" />
  78. <DataGridTextColumn Width="*"
  79. Binding="{Binding OperatorCode}"
  80. Header="员工ID" />
  81. <DataGridTextColumn Width="*"
  82. Binding="{Binding SpendTime}"
  83. Header="用时" />
  84. <DataGridTextColumn Width="*"
  85. Binding="{Binding ProType}"
  86. Header="产品型号" />
  87. <DataGridTextColumn Width="*"
  88. Binding="{Binding ProCode}"
  89. Header="物料码" />
  90. </DataGrid.Columns>
  91. </DataGrid>
  92. </GroupBox>
  93. </Grid>
  94. <Grid Grid.Column="1">
  95. <Grid.RowDefinitions>
  96. <RowDefinition Height="150" />
  97. <RowDefinition />
  98. <RowDefinition />
  99. </Grid.RowDefinitions>
  100. <GroupBox Grid.Column="1"
  101. Grid.Row="0"
  102. Header="二维码">
  103. <StackPanel Orientation="Horizontal">
  104. <TextBox Width="230"
  105. Height="40"
  106. FontSize="22"
  107. VerticalAlignment="Center"
  108. Margin="5"
  109. Text="{Binding InQR,UpdateSourceTrigger=PropertyChanged}" />
  110. <Button Content="生成二维码"
  111. VerticalAlignment="Center"
  112. Margin="5"
  113. Width="130"
  114. Height="40"
  115. FontSize="22"
  116. Style="{StaticResource BtnStyle}"
  117. Command="{Binding QRCommand}" />
  118. <Image Source="{Binding QrImage}"
  119. Margin="3" />
  120. </StackPanel>
  121. </GroupBox>
  122. <GroupBox Grid.Column="1"
  123. Grid.Row="1"
  124. Header="看板设置">
  125. <Grid>
  126. <Grid.RowDefinitions>
  127. <RowDefinition />
  128. <RowDefinition />
  129. <RowDefinition />
  130. </Grid.RowDefinitions>
  131. <!--#region 线边仓 -->
  132. <Border BorderThickness="0,0,0,1"
  133. BorderBrush="#6A5ACD"
  134. Grid.Row="0">
  135. <Grid>
  136. <Grid.ColumnDefinitions>
  137. <ColumnDefinition />
  138. <ColumnDefinition />
  139. </Grid.ColumnDefinitions>
  140. <Grid.RowDefinitions>
  141. <RowDefinition />
  142. <RowDefinition />
  143. </Grid.RowDefinitions>
  144. <StackPanel Orientation="Horizontal"
  145. Grid.Column="0"
  146. Grid.Row="0">
  147. <TextBlock Text="缺料订单数"
  148. VerticalAlignment="Center"
  149. FontSize="20"
  150. Margin="5" />
  151. <TextBox Width="200"
  152. Height="40"
  153. FontSize="20"
  154. VerticalAlignment="Center"
  155. Margin="5"
  156. Text="{Binding LackHouse,UpdateSourceTrigger=PropertyChanged}" />
  157. </StackPanel>
  158. <StackPanel Orientation="Horizontal"
  159. Grid.Column="1"
  160. Grid.Row="0">
  161. <TextBlock Text="已领料订单数"
  162. VerticalAlignment="Center"
  163. FontSize="20"
  164. Margin="5" />
  165. <TextBox Width="200"
  166. Height="40"
  167. FontSize="20"
  168. VerticalAlignment="Center"
  169. Margin="5"
  170. Text="{Binding UsedHouse,UpdateSourceTrigger=PropertyChanged}" />
  171. </StackPanel>
  172. <StackPanel Orientation="Horizontal"
  173. Grid.Column="0"
  174. Grid.Row="1">
  175. <TextBlock Text="当日订单数"
  176. VerticalAlignment="Center"
  177. FontSize="20"
  178. Margin="5" />
  179. <TextBox Width="200"
  180. Height="40"
  181. FontSize="20"
  182. VerticalAlignment="Center"
  183. Margin="5"
  184. Text="{Binding TotalHouse,UpdateSourceTrigger=PropertyChanged}" />
  185. </StackPanel>
  186. <Button Content="上传线边仓(当日)"
  187. VerticalAlignment="Center"
  188. Margin="5"
  189. Width="180"
  190. Height="40"
  191. FontSize="20"
  192. Style="{StaticResource BtnStyle}"
  193. Command="{Binding HouseCommand}"
  194. Grid.Column="1"
  195. Grid.Row="1" />
  196. </Grid>
  197. </Border>
  198. <!--#endregion-->
  199. <!--#region 出勤 -->
  200. <Border BorderThickness="0,0,0,1"
  201. BorderBrush="#6A5ACD"
  202. Grid.Row="1">
  203. <Grid>
  204. <Grid.ColumnDefinitions>
  205. <ColumnDefinition />
  206. <ColumnDefinition />
  207. </Grid.ColumnDefinitions>
  208. <Grid.RowDefinitions>
  209. <RowDefinition />
  210. <RowDefinition />
  211. </Grid.RowDefinitions>
  212. <StackPanel Orientation="Horizontal"
  213. Grid.Column="0"
  214. Grid.Row="0">
  215. <TextBlock Text="实到人数"
  216. VerticalAlignment="Center"
  217. FontSize="20"
  218. Margin="5" />
  219. <TextBox Width="200"
  220. Height="40"
  221. FontSize="20"
  222. VerticalAlignment="Center"
  223. Margin="5"
  224. Text="{Binding ActPer,UpdateSourceTrigger=PropertyChanged}" />
  225. </StackPanel>
  226. <StackPanel Orientation="Horizontal"
  227. Grid.Column="1"
  228. Grid.Row="0">
  229. <TextBlock Text="请假人数"
  230. VerticalAlignment="Center"
  231. FontSize="20"
  232. Margin="5" />
  233. <TextBox Width="200"
  234. Height="40"
  235. FontSize="20"
  236. VerticalAlignment="Center"
  237. Margin="5"
  238. Text="{Binding FallPer,UpdateSourceTrigger=PropertyChanged}" />
  239. </StackPanel>
  240. <StackPanel Orientation="Horizontal"
  241. Grid.Column="0"
  242. Grid.Row="1">
  243. <TextBlock Text="旷工人数"
  244. VerticalAlignment="Center"
  245. FontSize="20"
  246. Margin="5" />
  247. <TextBox Width="200"
  248. Height="40"
  249. FontSize="20"
  250. VerticalAlignment="Center"
  251. Margin="5"
  252. Text="{Binding AbsPer,UpdateSourceTrigger=PropertyChanged}" />
  253. </StackPanel>
  254. <Button Content="上传出勤信息"
  255. VerticalAlignment="Center"
  256. Margin="5"
  257. Width="150"
  258. Height="40"
  259. FontSize="20"
  260. Style="{StaticResource BtnStyle}"
  261. Command="{Binding OutWorkCommand}"
  262. Grid.Column="1"
  263. Grid.Row="1" />
  264. </Grid>
  265. </Border>
  266. <!--#endregion-->
  267. <!--#region 当前生产订单 -->
  268. <Border BorderThickness="0,0,0,0"
  269. BorderBrush="#6A5ACD"
  270. Grid.Row="2">
  271. <Grid>
  272. <Grid.ColumnDefinitions>
  273. <ColumnDefinition />
  274. <ColumnDefinition />
  275. </Grid.ColumnDefinitions>
  276. <Grid.RowDefinitions>
  277. <RowDefinition />
  278. </Grid.RowDefinitions>
  279. <hc:ComboBox HorizontalAlignment="Center"
  280. VerticalAlignment="Center"
  281. Margin="4,0"
  282. Width="200"
  283. SelectedItem="{Binding SelectedOrderName}"
  284. ItemsSource="{Binding OrderNames}"
  285. FontSize="20"
  286. Grid.Column="0"
  287. Grid.Row="0" />
  288. <Button Content="确认当前生产订单"
  289. VerticalAlignment="Center"
  290. Margin="5"
  291. Width="200"
  292. Height="40"
  293. FontSize="20"
  294. Style="{StaticResource BtnStyle}"
  295. Command="{Binding OrderCommand}"
  296. Grid.Column="1"
  297. Grid.Row="0" />
  298. </Grid>
  299. </Border>
  300. <!--#endregion-->
  301. </Grid>
  302. </GroupBox>
  303. <GroupBox Grid.Column="1"
  304. Grid.Row="2"
  305. Header="日志">
  306. <ListBox x:Name="ListBoxMessage" />
  307. </GroupBox>
  308. </Grid>
  309. </Grid>
  310. </UserControl>