终端一体化运控平台
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

379 行
25 KiB

  1. <Window
  2. x:Class="BPASmartClient.JXJFoodBigStation.View.RecipeInfosView"
  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.JXJFoodBigStation.View"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:vm="clr-namespace:BPASmartClient.JXJFoodBigStation.ViewModel"
  9. Title="RecipeInfosView"
  10. Width="800"
  11. Height="550"
  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:RecipeInfosViewModel />
  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 Name="br" BorderThickness="1" >
  52. <Border.Background>
  53. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/bg.png" />
  54. </Border.Background>
  55. <Grid>
  56. <Grid.RowDefinitions>
  57. <RowDefinition />
  58. </Grid.RowDefinitions>
  59. <Grid Grid.Row="1">
  60. <Grid.RowDefinitions>
  61. <RowDefinition Height="30" />
  62. <RowDefinition Height="30" />
  63. <RowDefinition Height="30" />
  64. <RowDefinition />
  65. <RowDefinition Height="40" />
  66. </Grid.RowDefinitions>
  67. <WrapPanel>
  68. <TextBlock Margin="10,0,0,0" Background="Transparent" FontSize="20" Foreground="#FF2AB2E7" Text="配方名称:" />
  69. <TextBlock Margin="10,0,0,0" Background="Transparent" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding RecipeName}" />
  70. </WrapPanel>
  71. <WrapPanel Grid.Row="1">
  72. <TextBlock Margin="10,0,0,0" Background="Transparent" FontSize="20" Foreground="#FF2AB2E7" Text="配方编号:" />
  73. <TextBlock Grid.Row="1" Margin="10,0,0,0" Background="Transparent" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding RecipeCode}" />
  74. </WrapPanel>
  75. <WrapPanel Grid.Row="2">
  76. <TextBlock Margin="10,0,0,0" Background="Transparent" FontSize="20" Foreground="#FF2AB2E7" Text="托盘编号:" />
  77. <TextBlock Grid.Row="1" Margin="10,0,0,0" Background="Transparent" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding TrayCode}" />
  78. </WrapPanel>
  79. <Grid Grid.Row="3">
  80. <Grid.RowDefinitions>
  81. <RowDefinition></RowDefinition>
  82. </Grid.RowDefinitions>
  83. <Grid.ColumnDefinitions>
  84. <ColumnDefinition Width="2*"/>
  85. <ColumnDefinition Width="9*"/>
  86. </Grid.ColumnDefinitions>
  87. <TextBlock Grid.Row="0" HorizontalAlignment="Center">大料站</TextBlock>
  88. <Grid Grid.Column="1">
  89. <Grid.RowDefinitions>
  90. <RowDefinition Height="20"></RowDefinition>
  91. <RowDefinition Height="9*"></RowDefinition>
  92. </Grid.RowDefinitions>
  93. <Grid Grid.Row="0" >
  94. <Grid.ColumnDefinitions>
  95. <ColumnDefinition Width="2*"/>
  96. <ColumnDefinition Width="2*"/>
  97. <ColumnDefinition Width="2*"/>
  98. </Grid.ColumnDefinitions>
  99. <TextBlock FontSize="16" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Top">原料桶号</TextBlock>
  100. <TextBlock FontSize="16" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Top">原料位置</TextBlock>
  101. <TextBlock FontSize="16" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Top">原料重量</TextBlock>
  102. </Grid>
  103. <ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Auto" >
  104. <ItemsControl ItemsSource="{Binding RawMaterialsInfo}" >
  105. <ItemsControl.ItemTemplate>
  106. <DataTemplate>
  107. <Grid x:Name="grb" Height="25" >
  108. <Grid.ColumnDefinitions>
  109. <ColumnDefinition Width="2*"/>
  110. <ColumnDefinition Width="2*"/>
  111. <ColumnDefinition Width="2*"/>
  112. </Grid.ColumnDefinitions>
  113. <TextBlock Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding RawMaterialBarrelNum}"></TextBlock>
  114. <TextBlock Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding RawMaterialLocation}"></TextBlock>
  115. <TextBlock Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding RawMaterialWeight}"></TextBlock>
  116. </Grid>
  117. <DataTemplate.Triggers>
  118. <Trigger Property="IsMouseOver" Value="true">
  119. <Setter TargetName="grb" Property="Background" Value="#112AB2E7" />
  120. </Trigger>
  121. </DataTemplate.Triggers>
  122. </DataTemplate>
  123. </ItemsControl.ItemTemplate>
  124. </ItemsControl>
  125. </ScrollViewer>
  126. </Grid>
  127. </Grid>
  128. <Grid Grid.Row="4">
  129. <Button Command="{Binding ReturnPage}" Width="200" >返回</Button>
  130. </Grid>
  131. </Grid>
  132. </Grid>
  133. </Border>-->
  134. <!--<Border Name="br">
  135. <Border.Background>
  136. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/bg.png" />
  137. </Border.Background>
  138. <Grid >
  139. <Grid.RowDefinitions>
  140. <RowDefinition Height="50"></RowDefinition>
  141. <RowDefinition Height="88"></RowDefinition>
  142. <RowDefinition Height="40"></RowDefinition>
  143. <RowDefinition></RowDefinition>
  144. </Grid.RowDefinitions>
  145. <TextBlock Text="大料站配方信息" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FF2AB2E7" FontSize="22" Margin="0,10"></TextBlock>
  146. <UniformGrid Grid.Row="1" Columns="2" Margin="0,0,0,8">
  147. <StackPanel Orientation="Vertical" Margin="0,0,-13,0">
  148. <StackPanel Orientation="Horizontal" Margin="0,8">
  149. <TextBlock Text="请输入配方名称:" Foreground="#FF2AB2E7" FontSize="16" Margin="5,0,5,0" VerticalAlignment="Center"></TextBlock>
  150. <TextBox Text="{Binding RecipeName}" Width="150" Height="30" BorderThickness="1" Background="Transparent" Foreground="Orange"
  151. VerticalContentAlignment="Center"
  152. BorderBrush="#FF2AB2E7" VerticalAlignment="Center" FontSize="16" ></TextBox>
  153. </StackPanel>
  154. <StackPanel Orientation="Horizontal">
  155. <TextBlock Text="请输入托盘编号:" Foreground="#FF2AB2E7" FontSize="16" Margin="5,0,5,0" VerticalAlignment="Center"></TextBlock>
  156. <TextBox Text="{Binding TrayCode}" InputMethod.IsInputMethodEnabled="False" Width="150" Height="30" BorderThickness="1" Background="Transparent" Foreground="Orange"
  157. VerticalContentAlignment="Center"
  158. BorderBrush="#FF2AB2E7" VerticalAlignment="Center" FontSize="16" ></TextBox>
  159. </StackPanel>
  160. </StackPanel>
  161. <Grid Width="260" HorizontalAlignment="Right">
  162. <Grid.RowDefinitions>
  163. <RowDefinition/>
  164. <RowDefinition/>
  165. </Grid.RowDefinitions>
  166. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,5,5,0">
  167. <Button Content="添加原料" Width="120" Margin="0,0,10,0" Height="30" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Cursor="Hand" Command="{Binding AddRecipe}" ></Button>
  168. <Button Content="确认更新" Height="30" Width="120" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Command="{Binding Comfirm}"></Button>
  169. </StackPanel>
  170. <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Right" Margin="0,3,5,0">
  171. <Button Content="另存为" Height="30" Width="120" Margin="0,0,10,0" Command="{Binding SaveAs}" Cursor="Hand"/>
  172. <Button Click="Button_Click" Content="取消" Height="30" FontSize="20" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Width="120" Cursor="Hand"></Button>
  173. </StackPanel>
  174. </Grid>
  175. </UniformGrid>
  176. <Grid Grid.Row="2" Background="#FF2AB2E7" Margin="0,0,0,10">
  177. <Grid.ColumnDefinitions>
  178. <ColumnDefinition Width="130"/>
  179. <ColumnDefinition Width="145"/>
  180. <ColumnDefinition Width="145"/>
  181. <ColumnDefinition/>
  182. </Grid.ColumnDefinitions>
  183. <TextBlock Text="原料桶号" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontSize="14"/>
  184. <GridSplitter></GridSplitter>
  185. <TextBlock Grid.Column="1" Text="原料位置" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontSize="14"/>
  186. <GridSplitter Grid.Column="1"></GridSplitter>
  187. <TextBlock Grid.Column="2" Text="原料重量" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White" FontSize="14"></TextBlock>
  188. <GridSplitter Grid.Column="2"></GridSplitter>
  189. <TextBlock Grid.Column="3" Text="操作" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White" FontSize="14"/>
  190. </Grid>
  191. <ScrollViewer Grid.Row="3" VerticalScrollBarVisibility="Hidden">
  192. <ItemsControl ItemsSource="{Binding RawMaterialsInfo}">
  193. <ItemsControl.ItemsPanel>
  194. <ItemsPanelTemplate>
  195. <StackPanel></StackPanel>
  196. </ItemsPanelTemplate>
  197. </ItemsControl.ItemsPanel>
  198. <ItemsControl.ItemTemplate>
  199. <DataTemplate>
  200. <RadioButton>
  201. <RadioButton.Template>
  202. <ControlTemplate>
  203. <Grid>
  204. <Grid.ColumnDefinitions>
  205. <ColumnDefinition Width="130"/>
  206. <ColumnDefinition Width="145"></ColumnDefinition>
  207. <ColumnDefinition Width="145"></ColumnDefinition>
  208. <ColumnDefinition></ColumnDefinition>
  209. </Grid.ColumnDefinitions>
  210. <ComboBox ItemsSource="{Binding DataContext.materialNames,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}" Text="{Binding RawMaterialBarrelNum}" Margin="5,0,0,5" Width="120" FontSize="14" KeyUp="ComboBox_KeyUp" LostFocus="ComboBox_LostFocus" >
  211. <ComboBox.ItemContainerStyle>
  212. <Style TargetType="{x:Type ComboBoxItem}">
  213. <Setter Property="Background" Value="White" />
  214. <Setter Property="Foreground" Value="#e69519"/>
  215. </Style>
  216. </ComboBox.ItemContainerStyle>
  217. </ComboBox>
  218. <StackPanel Grid.Column="1" Orientation="Horizontal" >
  219. <TextBox Text="{Binding RawMaterialLocation}" Background="Transparent" FontSize="14"
  220. BorderBrush="#e69519" Foreground="LightGray" Width="135" Margin="5,0,0,5" ></TextBox>
  221. </StackPanel>
  222. <StackPanel Orientation="Horizontal" Grid.Column="2">
  223. <TextBox Text="{Binding RawMaterialWeight}" Background="Transparent" FontSize="14"
  224. BorderBrush="#e69519" Foreground="LightGray" Width="125" Margin="5,0,0,5" ></TextBox>
  225. <TextBlock VerticalAlignment="Center" Margin="4,0,0,5" Text="g" Foreground="#e69519" ></TextBlock>
  226. </StackPanel>
  227. <Button Grid.Column="3"
  228. Content="删除"
  229. Width="94"
  230. FontSize="14"
  231. Margin="10,0,20,5"
  232. Background="Transparent"
  233. BorderBrush="#e69519" Foreground="LightGray" HorizontalAlignment="Right"
  234. Command="{Binding DataContext.RemoveRecipe,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}"
  235. CommandParameter="{Binding MaterialCode}"></Button>
  236. </Grid>
  237. </ControlTemplate>
  238. </RadioButton.Template>
  239. </RadioButton>
  240. </DataTemplate>
  241. </ItemsControl.ItemTemplate>
  242. </ItemsControl>
  243. </ScrollViewer>
  244. </Grid>
  245. </Border>-->
  246. <Border Name="br" BorderThickness="2" BorderBrush="#0CADF5">
  247. <Border.Background>
  248. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/bg.png" />
  249. </Border.Background>
  250. <Grid >
  251. <Grid.RowDefinitions>
  252. <RowDefinition Height="50"></RowDefinition>
  253. <RowDefinition Height="85"></RowDefinition>
  254. <RowDefinition Height="40"></RowDefinition>
  255. <RowDefinition></RowDefinition>
  256. </Grid.RowDefinitions>
  257. <TextBlock Text="大配料站配方信息" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FF2AB2E7" FontSize="25" Margin="0,10"></TextBlock>
  258. <UniformGrid Grid.Row="1" Columns="2" Margin="0,0,0,5">
  259. <StackPanel Orientation="Vertical" >
  260. <StackPanel Orientation="Horizontal" Margin="0,8">
  261. <TextBlock Text="请输入配方名称:" Foreground="#FF2AB2E7" FontSize="18" Margin="10,0,5,0" VerticalAlignment="Center"></TextBlock>
  262. <TextBox Text="{Binding RecipeName}" Width="230" Height="30" BorderThickness="1" Background="Transparent" Foreground="Orange"
  263. VerticalContentAlignment="Center"
  264. BorderBrush="#FF2AB2E7" VerticalAlignment="Center" FontSize="16" ></TextBox>
  265. </StackPanel>
  266. <StackPanel Orientation="Horizontal">
  267. <TextBlock Text="请输入托盘编号:" Foreground="#FF2AB2E7" FontSize="18" Margin="10,0,5,0" VerticalAlignment="Center"></TextBlock>
  268. <TextBox Text="{Binding TrayCode}" InputMethod.IsInputMethodEnabled="False" Width="230" Height="30" BorderThickness="1" Background="Transparent" Foreground="Orange"
  269. VerticalContentAlignment="Center"
  270. BorderBrush="#FF2AB2E7" VerticalAlignment="Center" FontSize="16" ></TextBox>
  271. </StackPanel>
  272. </StackPanel>
  273. <Grid>
  274. <Grid.RowDefinitions>
  275. <RowDefinition/>
  276. <RowDefinition/>
  277. </Grid.RowDefinitions>
  278. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,4,0,0">
  279. <Button Content="添加原料" Width="180" Margin="0,0,10,0" Height="30" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Cursor="Hand" Command="{Binding AddRecipe}" ></Button>
  280. <Button Content="确认更新" Height="30" Width="180" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Command="{Binding Comfirm}"></Button>
  281. </StackPanel>
  282. <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0,4,0,0" HorizontalAlignment="Center">
  283. <Button Content="另存为" Height="30" Width="180" Margin="0,0,10,0" Command="{Binding SaveAs}" Cursor="Hand"/>
  284. <Button Click="Button_Click" Content="取消" Height="30" FontSize="20" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Width="180" Cursor="Hand"></Button>
  285. </StackPanel>
  286. </Grid>
  287. </UniformGrid>
  288. <Grid Grid.Row="2" Background="#FF2AB2E7" Margin="0,0,0,10">
  289. <Grid.ColumnDefinitions>
  290. <ColumnDefinition Width="210"/>
  291. <ColumnDefinition Width="225"/>
  292. <ColumnDefinition Width="225"/>
  293. <ColumnDefinition/>
  294. </Grid.ColumnDefinitions>
  295. <TextBlock Text="原料名称" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"/>
  296. <GridSplitter></GridSplitter>
  297. <TextBlock Grid.Column="1" Text="托盘桶号" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"/>
  298. <GridSplitter Grid.Column="1"></GridSplitter>
  299. <TextBlock Grid.Column="2" Text="原料重量" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"></TextBlock>
  300. <GridSplitter Grid.Column="2"></GridSplitter>
  301. <TextBlock Grid.Column="3" Text="操作" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
  302. </Grid>
  303. <ScrollViewer Grid.Row="3" VerticalScrollBarVisibility="Hidden">
  304. <ItemsControl ItemsSource="{Binding RawMaterialsInfo}">
  305. <ItemsControl.ItemsPanel>
  306. <ItemsPanelTemplate>
  307. <StackPanel></StackPanel>
  308. </ItemsPanelTemplate>
  309. </ItemsControl.ItemsPanel>
  310. <ItemsControl.ItemTemplate>
  311. <DataTemplate>
  312. <RadioButton>
  313. <RadioButton.Template>
  314. <ControlTemplate>
  315. <Grid>
  316. <Grid.ColumnDefinitions>
  317. <ColumnDefinition Width="210"/>
  318. <ColumnDefinition Width="210"></ColumnDefinition>
  319. <ColumnDefinition Width="225"></ColumnDefinition>
  320. <ColumnDefinition></ColumnDefinition>
  321. </Grid.ColumnDefinitions>
  322. <!--<ComboBox ItemsSource="{Binding DataContext.materialNames,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}" Text="{Binding RawMaterialLocation}" Margin="10,0,0,10" Width="190" FontSize="14" KeyUp="ComboBox_KeyUp" LostFocus="ComboBox_LostFocus">
  323. <ComboBox.ItemContainerStyle>
  324. <Style TargetType="{x:Type ComboBoxItem}">
  325. <Setter Property="Background" Value="White" />
  326. <Setter Property="Foreground" Value="#e69519"/>
  327. </Style>
  328. </ComboBox.ItemContainerStyle>-->
  329. <!--</ComboBox>-->
  330. <TextBox Text="{Binding RawMaterialName}" Background="Transparent" FontSize="14"
  331. BorderBrush="#e69519" Foreground="LightGray" Width="190" Margin="10,0,0,10" ></TextBox>
  332. <StackPanel Grid.Column="1" Orientation="Horizontal" >
  333. <TextBox Text="{Binding RawMaterialBarrelNum}" Background="Transparent" FontSize="14"
  334. BorderBrush="#e69519" Foreground="LightGray" Width="170" Margin="35,0,0,10" ></TextBox>
  335. </StackPanel>
  336. <StackPanel Orientation="Horizontal" Grid.Column="2">
  337. <TextBox Text="{Binding RawMaterialWeight}" Background="Transparent" FontSize="14"
  338. BorderBrush="#e69519" Foreground="LightGray" Width="170" Margin="35,0,0,10" ></TextBox>
  339. <TextBlock VerticalAlignment="Center" Margin="4,0,0,10" Text="Kg" Foreground="#e69519" ></TextBlock>
  340. </StackPanel>
  341. <Button Grid.Column="3"
  342. Content="删除"
  343. Width="94"
  344. FontSize="14"
  345. Margin="0,0,20,10"
  346. Background="Transparent"
  347. BorderBrush="#e69519" Foreground="LightGray" HorizontalAlignment="Right"
  348. Command="{Binding DataContext.RemoveRecipe,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}"
  349. CommandParameter="{Binding RawMaterialName}"></Button>
  350. </Grid>
  351. </ControlTemplate>
  352. </RadioButton.Template>
  353. </RadioButton>
  354. </DataTemplate>
  355. </ItemsControl.ItemTemplate>
  356. </ItemsControl>
  357. </ScrollViewer>
  358. </Grid>
  359. </Border>
  360. </Window>