终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

279 lines
12 KiB

  1. <Window
  2. x:Class="BPASmartClient.JXJFoodSmallStation.View.NewLocalRecipeView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:BPASmartClient.JXJFoodSmallStation.View"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:vm="clr-namespace:BPASmartClient.JXJFoodSmallStation.ViewModel"
  9. Title="NewRemoteRecipeView"
  10. Width="900"
  11. Height="645"
  12. AllowsTransparency="True"
  13. Background="{x:Null}"
  14. Topmost="True"
  15. WindowStartupLocation="CenterScreen"
  16. WindowStyle="None"
  17. mc:Ignorable="d">
  18. <Window.DataContext>
  19. <vm:NewLocalRecipeViewModel />
  20. </Window.DataContext>
  21. <Window.Resources>
  22. <ResourceDictionary>
  23. <ResourceDictionary.MergedDictionaries>
  24. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
  25. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
  26. <ResourceDictionary>
  27. <!--#region ListBox样式-->
  28. <Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
  29. <Setter Property="OverridesDefaultStyle" Value="True" />
  30. <Setter Property="SnapsToDevicePixels" Value="True" />
  31. <Setter Property="BorderBrush" Value="{x:Null}" />
  32. <Setter Property="Foreground" Value="White" />
  33. <Setter Property="FontSize" Value="20" />
  34. <Setter Property="HorizontalContentAlignment" Value="Center" />
  35. <Setter Property="VerticalContentAlignment" Value="Center" />
  36. <Setter Property="Template">
  37. <Setter.Value>
  38. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  39. <Border x:Name="border" CornerRadius="8">
  40. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
  41. </Border>
  42. </ControlTemplate>
  43. </Setter.Value>
  44. </Setter>
  45. </Style>
  46. <!--#endregion-->
  47. </ResourceDictionary>
  48. </ResourceDictionary.MergedDictionaries>
  49. </ResourceDictionary>
  50. </Window.Resources>
  51. <Border
  52. Name="br"
  53. BorderBrush="#0CADF5"
  54. BorderThickness="2">
  55. <Border.Background>
  56. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/bg.png" />
  57. <!--<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/弹窗2.png" />-->
  58. </Border.Background>
  59. <Grid Margin="10">
  60. <Grid.RowDefinitions>
  61. <RowDefinition Height="40" />
  62. <RowDefinition Height="40" />
  63. <RowDefinition Height="40" />
  64. <RowDefinition />
  65. </Grid.RowDefinitions>
  66. <Grid Grid.Row="0">
  67. <Grid.ColumnDefinitions>
  68. <ColumnDefinition />
  69. <ColumnDefinition />
  70. </Grid.ColumnDefinitions>
  71. <StackPanel
  72. Grid.Column="0"
  73. VerticalAlignment="Center"
  74. Orientation="Horizontal">
  75. <TextBlock
  76. Width="100"
  77. Margin="10,0,10,0"
  78. Background="Transparent"
  79. FontSize="20"
  80. Foreground="#FF2AB2E7"
  81. Text="配方名称:" />
  82. <TextBox
  83. Width="120"
  84. Height="30"
  85. FontSize="16"
  86. Text="{Binding RecipeName}" />
  87. </StackPanel>
  88. <WrapPanel
  89. Grid.Column="1"
  90. HorizontalAlignment="Left"
  91. VerticalAlignment="Center">
  92. <TextBlock
  93. Width="100"
  94. Margin="2,0,10,0"
  95. Background="Transparent"
  96. FontSize="20"
  97. Foreground="#FF2AB2E7"
  98. Text="配方编码:" />
  99. <TextBox
  100. Width="120"
  101. Height="30"
  102. FontSize="16"
  103. Text="{Binding RecipeCode}" />
  104. </WrapPanel>
  105. </Grid>
  106. <Grid Grid.Row="1">
  107. <Grid.ColumnDefinitions>
  108. <ColumnDefinition Width="1*" />
  109. <ColumnDefinition Width="1*" />
  110. </Grid.ColumnDefinitions>
  111. <WrapPanel Grid.Column="0" VerticalAlignment="Center">
  112. <TextBlock
  113. Width="100"
  114. Margin="10,0,10,0"
  115. Background="Transparent"
  116. FontSize="20"
  117. Foreground="#FF2AB2E7"
  118. Text="托盘编号:" />
  119. <TextBox
  120. Width="120"
  121. Height="30"
  122. FontSize="16"
  123. Text="{Binding TrayNum}" />
  124. </WrapPanel>
  125. <WrapPanel
  126. Grid.Column="1"
  127. HorizontalAlignment="Left"
  128. Orientation="Horizontal">
  129. <Button
  130. Width="80"
  131. Height="40"
  132. Margin="2,0,2,0"
  133. Command="{Binding AddCommand}"
  134. Content="添加小料"
  135. FontSize="16"
  136. Style="{StaticResource ImageButtonStyle}" />
  137. <Button
  138. Width="80"
  139. Height="40"
  140. Margin="2,0,2,0"
  141. Command="{Binding AddFLCommand}"
  142. Content="添加粉料"
  143. FontSize="16"
  144. Style="{StaticResource ImageButtonStyle}" />
  145. <Button
  146. Width="80"
  147. Height="40"
  148. Margin="2,0,2,0"
  149. Command="{Binding SaveCommand}"
  150. Content="保存配方"
  151. FontSize="16"
  152. Style="{StaticResource ImageButtonStyle}" />
  153. <Button
  154. Name="Close"
  155. Width="80"
  156. Height="40"
  157. Margin="2,0,2,0"
  158. Content="取消"
  159. FontSize="16"
  160. Style="{StaticResource ImageButtonStyle}" />
  161. </WrapPanel>
  162. </Grid>
  163. <!--#region 表格标题栏设置-->
  164. <Grid
  165. Grid.Row="2"
  166. Margin="0,10,0,0"
  167. Background="#ff0C255F">
  168. <Grid.ColumnDefinitions>
  169. <ColumnDefinition Width="1*" />
  170. <ColumnDefinition Width="1*" />
  171. <ColumnDefinition Width="1*" />
  172. <ColumnDefinition Width="1*" />
  173. <ColumnDefinition Width="1*" />
  174. <ColumnDefinition Width="1*" />
  175. </Grid.ColumnDefinitions>
  176. <Grid Grid.Column="0">
  177. <TextBlock
  178. HorizontalAlignment="Center"
  179. FontSize="16"
  180. Text="原料名称" />
  181. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  182. </Grid>
  183. <Grid Grid.Column="1">
  184. <TextBlock
  185. HorizontalAlignment="Center"
  186. FontSize="16"
  187. Text="原料类型" />
  188. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  189. </Grid>
  190. <TextBlock
  191. Grid.Column="2"
  192. HorizontalAlignment="Center"
  193. FontSize="16"
  194. Text="原料位置" />
  195. <Grid Grid.Column="3">
  196. <TextBlock
  197. HorizontalAlignment="Center"
  198. FontSize="16"
  199. Text="原料桶号" />
  200. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  201. </Grid>
  202. <TextBlock
  203. Grid.Column="4"
  204. HorizontalAlignment="Center"
  205. FontSize="16"
  206. Text="原料重量(kg)" />
  207. <Grid Grid.Column="5">
  208. <TextBlock
  209. HorizontalAlignment="Center"
  210. FontSize="16"
  211. Text="功能操作" />
  212. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  213. </Grid>
  214. <Border Grid.ColumnSpan="10" BorderThickness="1,0,1,0" />
  215. </Grid>
  216. <Grid Grid.Row="3">
  217. <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
  218. <ItemsControl ItemsSource="{Binding AllRawMaterial}">
  219. <ItemsControl.ItemTemplate>
  220. <DataTemplate>
  221. <Grid Name="gr">
  222. <Grid.ColumnDefinitions>
  223. <ColumnDefinition />
  224. <ColumnDefinition />
  225. <ColumnDefinition />
  226. <ColumnDefinition />
  227. <ColumnDefinition />
  228. <ColumnDefinition />
  229. </Grid.ColumnDefinitions>
  230. <Grid Grid.Column="0">
  231. <TextBox Text="{Binding RawMaterialName}" />
  232. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  233. </Grid>
  234. <Grid Grid.Column="1">
  235. <TextBox Text="{Binding RawMaterialType}" />
  236. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  237. </Grid>
  238. <TextBox Grid.Column="2" Text="{Binding RawMaterialLocation}" />
  239. <Grid Grid.Column="3">
  240. <TextBox Text="{Binding RawMaterialBarrelNum}" />
  241. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  242. </Grid>
  243. <TextBox Grid.Column="4" Text="{Binding RawMaterialWeight}" />
  244. <Grid Grid.Column="5">
  245. <Button
  246. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  247. CommandParameter="{Binding RawMaterialLocation}"
  248. Content="删除"
  249. FontSize="16" />
  250. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  251. </Grid>
  252. <Border Grid.ColumnSpan="10" BorderThickness="1,0,1,1" />
  253. </Grid>
  254. <DataTemplate.Triggers>
  255. <Trigger Property="IsMouseOver" Value="true">
  256. <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
  257. </Trigger>
  258. </DataTemplate.Triggers>
  259. </DataTemplate>
  260. </ItemsControl.ItemTemplate>
  261. </ItemsControl>
  262. </ScrollViewer>
  263. </Grid>
  264. </Grid>
  265. </Border>
  266. </Window>