终端一体化运控平台
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.

NewLocalRecipeView.xaml 11 KiB

2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  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="700"
  11. Height="520"
  12. AllowsTransparency="True"
  13. Background="{x:Null}"
  14. Topmost="false"
  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></ColumnDefinition>
  69. <ColumnDefinition></ColumnDefinition>
  70. </Grid.ColumnDefinitions>
  71. <StackPanel VerticalAlignment="Center" Grid.Column="0" Orientation="Horizontal">
  72. <TextBlock
  73. Width="100"
  74. Margin="10,0,10,0"
  75. Background="Transparent"
  76. FontSize="20"
  77. Foreground="#FF2AB2E7"
  78. Text="配方名称:" />
  79. <TextBox
  80. Width="120"
  81. Height="30"
  82. FontSize="16"
  83. Text="{Binding RecipeName}" />
  84. </StackPanel>
  85. <WrapPanel VerticalAlignment="Center" Grid.Column="1">
  86. <TextBlock
  87. Width="100"
  88. Margin="10,0,10,0"
  89. Background="Transparent"
  90. FontSize="20"
  91. Foreground="#FF2AB2E7"
  92. Text="配方编码:" />
  93. <TextBox
  94. Width="120"
  95. Height="30"
  96. FontSize="16"
  97. Text="{Binding RecipeCode}" />
  98. </WrapPanel>
  99. </Grid>
  100. <Grid Grid.Row="1">
  101. <Grid.ColumnDefinitions>
  102. <ColumnDefinition Width="1*" />
  103. <ColumnDefinition Width="1*" />
  104. </Grid.ColumnDefinitions>
  105. <WrapPanel VerticalAlignment="Center" Grid.Column="0">
  106. <TextBlock
  107. Width="100"
  108. Margin="10,0,10,0"
  109. Background="Transparent"
  110. FontSize="20"
  111. Foreground="#FF2AB2E7"
  112. Text="托盘编号:" />
  113. <TextBox
  114. Width="120"
  115. Height="30"
  116. FontSize="16"
  117. Text="{Binding TrayNum}" />
  118. </WrapPanel>
  119. <WrapPanel HorizontalAlignment="Right" Orientation="Horizontal" Grid.Column="1">
  120. <Button
  121. Width="100"
  122. Height="40"
  123. Margin="5,0,5,0"
  124. Command="{Binding AddCommand}"
  125. Content="添加原料"
  126. FontSize="20"
  127. Style="{StaticResource ImageButtonStyle}" />
  128. <Button
  129. Width="100"
  130. Height="40"
  131. Margin="5,0,10,0"
  132. Command="{Binding SaveCommand}"
  133. Content="保存配方"
  134. FontSize="20"
  135. Style="{StaticResource ImageButtonStyle}" />
  136. <Button
  137. Name ="Close"
  138. Width="100"
  139. Height="40"
  140. Margin="5,0,5,0"
  141. Content="取消"
  142. FontSize="20"
  143. Style="{StaticResource ImageButtonStyle}" />
  144. </WrapPanel>
  145. </Grid>
  146. <!--#region 表格标题栏设置-->
  147. <Grid
  148. Grid.Row="2"
  149. Margin="0,10,0,0"
  150. Background="#ff0C255F">
  151. <Grid.ColumnDefinitions>
  152. <ColumnDefinition Width="1*"/>
  153. <ColumnDefinition Width="1*"/>
  154. <ColumnDefinition Width="1*"/>
  155. <ColumnDefinition Width="1*"/>
  156. <ColumnDefinition Width="1*"/>
  157. </Grid.ColumnDefinitions>
  158. <Grid Grid.Column="0">
  159. <TextBlock Text="原料名称" HorizontalAlignment="Center" />
  160. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  161. </Grid>
  162. <TextBlock Grid.Column="1" Text="原料位置" HorizontalAlignment="Center" />
  163. <Grid Grid.Column="2">
  164. <TextBlock Text="原料桶号" HorizontalAlignment="Center" />
  165. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  166. </Grid>
  167. <TextBlock Grid.Column="3" Text="原料重量" HorizontalAlignment="Center" />
  168. <Grid Grid.Column="4">
  169. <TextBlock Text="功能操作" HorizontalAlignment="Center" />
  170. <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
  171. </Grid>
  172. <Border Grid.ColumnSpan="10" BorderThickness="1,0,1,0" />
  173. </Grid>
  174. <Grid Grid.Row="3">
  175. <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
  176. <ItemsControl ItemsSource="{Binding RawMaterial}">
  177. <ItemsControl.ItemTemplate>
  178. <DataTemplate>
  179. <Grid Name="gr">
  180. <Grid.ColumnDefinitions>
  181. <ColumnDefinition />
  182. <ColumnDefinition />
  183. <ColumnDefinition />
  184. <ColumnDefinition />
  185. <ColumnDefinition />
  186. </Grid.ColumnDefinitions>
  187. <Grid Grid.Column="0">
  188. <TextBox
  189. Text="{Binding RawMaterialName}" />
  190. <Border
  191. BorderThickness="1,0,1,0"
  192. Cursor="SizeWE" />
  193. </Grid>
  194. <TextBox
  195. Grid.Column="1"
  196. Text="{Binding RawMaterialLocation }" />
  197. <Grid Grid.Column="2">
  198. <TextBox
  199. Text="{Binding RawMaterialBarrelNum}" />
  200. <Border
  201. BorderThickness="1,0,1,0"
  202. Cursor="SizeWE" />
  203. </Grid>
  204. <TextBox
  205. Grid.Column="3"
  206. Text="{Binding RawMaterialWeight}" />
  207. <Grid Grid.Column="4">
  208. <Button
  209. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  210. CommandParameter="{Binding RawMaterialLocation}"
  211. Content="删除"
  212. FontSize="16" />
  213. <Border
  214. BorderThickness="1,0,1,0"
  215. Cursor="SizeWE" />
  216. </Grid>
  217. <Border
  218. Grid.ColumnSpan="10"
  219. BorderThickness="1,0,1,1" />
  220. </Grid>
  221. <DataTemplate.Triggers>
  222. <Trigger Property="IsMouseOver" Value="true">
  223. <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
  224. </Trigger>
  225. </DataTemplate.Triggers>
  226. </DataTemplate>
  227. </ItemsControl.ItemTemplate>
  228. </ItemsControl>
  229. </ScrollViewer>
  230. </Grid>
  231. </Grid>
  232. </Border>
  233. </Window>