MainPage.xaml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  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 OperatorCode}"
  74. Header="员工ID" />
  75. <DataGridTextColumn Width="*"
  76. Binding="{Binding WorkDev}"
  77. Header="作业机台" />
  78. <DataGridTextColumn Width="*"
  79. Binding="{Binding OrderNo}"
  80. Header="订单编号" />
  81. <DataGridTextColumn Width="*"
  82. Binding="{Binding ProType}"
  83. Header="产品类型" />
  84. <DataGridTextColumn Width="*"
  85. Binding="{Binding SpendTime}"
  86. Header="用时" />
  87. <DataGridTextColumn Width="1.5*"
  88. Binding="{Binding ItemCode}"
  89. Header="物料码" />
  90. </DataGrid.Columns>
  91. </DataGrid>
  92. </GroupBox>
  93. </Grid>
  94. <Grid Grid.Column="1">
  95. <Grid.RowDefinitions>
  96. <RowDefinition />
  97. <RowDefinition />
  98. </Grid.RowDefinitions>
  99. <!--<GroupBox Grid.Column="1"
  100. Grid.Row="0"
  101. Header="二维码">
  102. <StackPanel Orientation="Horizontal">
  103. <TextBox Width="230"
  104. Height="40"
  105. FontSize="22"
  106. VerticalAlignment="Center"
  107. Margin="5"
  108. Text="{Binding InQR,UpdateSourceTrigger=PropertyChanged}" />
  109. <Button Content="生成二维码"
  110. VerticalAlignment="Center"
  111. Margin="5"
  112. Width="130"
  113. Height="40"
  114. FontSize="22"
  115. Style="{StaticResource BtnStyle}"
  116. Command="{Binding QRCommand}" />
  117. <Image Source="{Binding QrImage}"
  118. Margin="3" />
  119. </StackPanel>
  120. </GroupBox>-->
  121. <GroupBox Grid.Column="1"
  122. Grid.Row="0"
  123. Header="看板设置">
  124. <Grid>
  125. <Grid.RowDefinitions>
  126. <RowDefinition />
  127. <RowDefinition />
  128. <RowDefinition />
  129. </Grid.RowDefinitions>
  130. <!--#region 线边仓 -->
  131. <Border BorderThickness="0,0,0,1"
  132. BorderBrush="LightGray"
  133. Grid.Row="0">
  134. <Grid>
  135. <Grid.ColumnDefinitions>
  136. <ColumnDefinition />
  137. <ColumnDefinition />
  138. </Grid.ColumnDefinitions>
  139. <Grid.RowDefinitions>
  140. <RowDefinition />
  141. <RowDefinition />
  142. </Grid.RowDefinitions>
  143. <StackPanel Orientation="Horizontal"
  144. Grid.Column="0"
  145. Grid.Row="0">
  146. <TextBlock Text="缺料订单数"
  147. VerticalAlignment="Center"
  148. FontSize="16"
  149. Margin="5" />
  150. <TextBox Width="200"
  151. Height="40"
  152. FontSize="16"
  153. VerticalAlignment="Center"
  154. Margin="5"
  155. Text="{Binding LackHouse,UpdateSourceTrigger=PropertyChanged}" />
  156. </StackPanel>
  157. <StackPanel Orientation="Horizontal"
  158. Grid.Column="1"
  159. Grid.Row="0">
  160. <TextBlock Text="已领料订单数"
  161. VerticalAlignment="Center"
  162. FontSize="16"
  163. Margin="5" />
  164. <TextBox Width="200"
  165. Height="40"
  166. FontSize="16"
  167. VerticalAlignment="Center"
  168. Margin="5"
  169. Text="{Binding UsedHouse,UpdateSourceTrigger=PropertyChanged}" />
  170. </StackPanel>
  171. <StackPanel Orientation="Horizontal"
  172. Grid.Column="0"
  173. Grid.Row="1">
  174. <TextBlock Text="当日订单数"
  175. VerticalAlignment="Center"
  176. FontSize="16"
  177. Margin="5" />
  178. <TextBox Width="200"
  179. Height="40"
  180. FontSize="16"
  181. VerticalAlignment="Center"
  182. Margin="5"
  183. Text="{Binding TotalHouse,UpdateSourceTrigger=PropertyChanged}" />
  184. </StackPanel>
  185. <Button Content="上传线边仓(当日)"
  186. VerticalAlignment="Center"
  187. Margin="5"
  188. Width="200"
  189. Height="40"
  190. FontSize="16"
  191. Style="{StaticResource BtnStyle}"
  192. Command="{Binding HouseCommand}"
  193. Grid.Column="1"
  194. Grid.Row="1" />
  195. </Grid>
  196. </Border>
  197. <!--#endregion-->
  198. <!--#region 出勤 -->
  199. <Border BorderThickness="0,0,0,1"
  200. BorderBrush="LightGray"
  201. Grid.Row="1">
  202. <Grid>
  203. <Grid.ColumnDefinitions>
  204. <ColumnDefinition />
  205. <ColumnDefinition />
  206. </Grid.ColumnDefinitions>
  207. <Grid.RowDefinitions>
  208. <RowDefinition />
  209. <RowDefinition />
  210. </Grid.RowDefinitions>
  211. <StackPanel Orientation="Horizontal"
  212. Grid.Column="0"
  213. Grid.Row="0">
  214. <TextBlock Text="实到人数"
  215. VerticalAlignment="Center"
  216. FontSize="16"
  217. Margin="5" />
  218. <TextBox Width="200"
  219. Height="40"
  220. FontSize="16"
  221. VerticalAlignment="Center"
  222. Margin="5"
  223. Text="{Binding ActPer,UpdateSourceTrigger=PropertyChanged}" />
  224. </StackPanel>
  225. <StackPanel Orientation="Horizontal"
  226. Grid.Column="1"
  227. Grid.Row="0">
  228. <TextBlock Text="请假人数"
  229. VerticalAlignment="Center"
  230. FontSize="16"
  231. Margin="5" />
  232. <TextBox Width="200"
  233. Height="40"
  234. FontSize="16"
  235. VerticalAlignment="Center"
  236. Margin="5"
  237. Text="{Binding FallPer,UpdateSourceTrigger=PropertyChanged}" />
  238. </StackPanel>
  239. <StackPanel Orientation="Horizontal"
  240. Grid.Column="0"
  241. Grid.Row="1">
  242. <TextBlock Text="旷工人数"
  243. VerticalAlignment="Center"
  244. FontSize="16"
  245. Margin="5" />
  246. <TextBox Width="200"
  247. Height="40"
  248. FontSize="16"
  249. VerticalAlignment="Center"
  250. Margin="5"
  251. Text="{Binding AbsPer,UpdateSourceTrigger=PropertyChanged}" />
  252. </StackPanel>
  253. <Button Content="上传出勤信息"
  254. VerticalAlignment="Center"
  255. Margin="5"
  256. Width="200"
  257. Height="40"
  258. FontSize="16"
  259. Style="{StaticResource BtnStyle}"
  260. Command="{Binding OutWorkCommand}"
  261. Grid.Column="1"
  262. Grid.Row="1" />
  263. </Grid>
  264. </Border>
  265. <!--#endregion-->
  266. <!--#region 当前生产订单 -->
  267. <Border BorderThickness="0,0,0,0"
  268. BorderBrush="LightGray"
  269. Grid.Row="2">
  270. <Grid>
  271. <Grid.ColumnDefinitions>
  272. <ColumnDefinition />
  273. <ColumnDefinition />
  274. </Grid.ColumnDefinitions>
  275. <Grid.RowDefinitions>
  276. <RowDefinition />
  277. </Grid.RowDefinitions>
  278. <StackPanel Orientation="Horizontal"
  279. Grid.Column="0"
  280. Grid.Row="0"
  281. HorizontalAlignment="Center"
  282. VerticalAlignment="Center">
  283. <TextBlock Text="订单"
  284. VerticalAlignment="Center" />
  285. <TextBox Width="200"
  286. Height="40"
  287. FontSize="16"
  288. VerticalAlignment="Center"
  289. HorizontalAlignment="Center"
  290. Margin="5"
  291. Text="{Binding Order,UpdateSourceTrigger=PropertyChanged}" />
  292. </StackPanel>
  293. <Button Content="确认当前生产订单"
  294. VerticalAlignment="Center"
  295. Margin="5"
  296. Width="200"
  297. Height="40"
  298. FontSize="16"
  299. Style="{StaticResource BtnStyle}"
  300. Command="{Binding OrderCommand}"
  301. Grid.Column="1"
  302. Grid.Row="0" />
  303. <StackPanel Orientation="Horizontal"
  304. Grid.Column="0"
  305. Grid.Row="1"
  306. HorizontalAlignment="Center"
  307. VerticalAlignment="Center">
  308. <!--<TextBlock Text="客户"
  309. VerticalAlignment="Center" />
  310. <hc:ComboBox HorizontalAlignment="Center"
  311. VerticalAlignment="Center"
  312. Margin="4,0"
  313. Width="200"
  314. Height="40"
  315. SelectedItem="{Binding SelectedClientName}"
  316. ItemsSource="{Binding ClientNames}"
  317. FontSize="16" />-->
  318. </StackPanel>
  319. <!--<Button Content="添加新客户"
  320. VerticalAlignment="Center"
  321. Margin="5"
  322. Width="200"
  323. Height="40"
  324. FontSize="16"
  325. Style="{StaticResource BtnStyle}"
  326. Command="{Binding AddClientCommand}"
  327. Grid.Column="1"
  328. Grid.Row="1" />-->
  329. </Grid>
  330. </Border>
  331. <!--#endregion-->
  332. </Grid>
  333. </GroupBox>
  334. <GroupBox Grid.Column="1"
  335. Grid.Row="1"
  336. Header="日志">
  337. <ListBox x:Name="ListBoxMessage" />
  338. </GroupBox>
  339. </Grid>
  340. </Grid>
  341. </UserControl>