终端一体化运控平台
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

RecipeReceiveView.xaml 20 KiB

2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
2 anni fa
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  1. <UserControl
  2. x:Class="BPASmartClient.JXJFoodBigStation.View.RecipeReceiveView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:control="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:local="clr-namespace:BPASmartClient.JXJFoodBigStation.View"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  10. xmlns:vm="clr-namespace:BPASmartClient.JXJFoodBigStation.ViewModel"
  11. d:DesignHeight="450"
  12. d:DesignWidth="800"
  13. mc:Ignorable="d">
  14. <UserControl.DataContext>
  15. <vm:RecipeReceiveViewModel/>
  16. </UserControl.DataContext>
  17. <UserControl.Resources>
  18. <SolidColorBrush x:Key="BorderSolid" Color="#5523CACA" />
  19. <SolidColorBrush x:Key="FontColor" Color="#FF2AB2E7" />
  20. <SolidColorBrush x:Key="TitleFontColor" Color="#ddd" />
  21. <SolidColorBrush x:Key="CursorColor" Color="Aqua" />
  22. <SolidColorBrush x:Key="TitleBorderColor" Color="#FF2AB2E7" />
  23. <SolidColorBrush x:Key="TextBlockForeground" Color="#9934F7F7" />
  24. <Style x:Key="TextBlockStyle" TargetType="TextBlock">
  25. <Setter Property="FontFamily" Value="楷体" />
  26. <Setter Property="FontSize" Value="20" />
  27. <Setter Property="Background" Value="Transparent" />
  28. <!--<Setter Property="Foreground" Value="{StaticResource FontColor}" />-->
  29. <Setter Property="VerticalAlignment" Value="Center" />
  30. <Setter Property="HorizontalAlignment" Value="Center" />
  31. </Style>
  32. <Style x:Key="buttonStyle" TargetType="Button">
  33. <Setter Property="Background" Value="Transparent" />
  34. <Setter Property="FontSize" Value="16" />
  35. <Setter Property="Foreground" Value="Aqua" />
  36. <Setter Property="HorizontalAlignment" Value="Center" />
  37. <Setter Property="BorderThickness" Value="0" />
  38. </Style>
  39. <!--#region 下拉列表样式-->
  40. <Style x:Key="ToggleButtonStyle" TargetType="{x:Type ToggleButton}">
  41. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  42. <!--<Setter Property="Height" Value="10" />-->
  43. <Setter Property="HorizontalContentAlignment" Value="Left" />
  44. <Setter Property="VerticalContentAlignment" Value="Top" />
  45. <Setter Property="Padding" Value="10,10" />
  46. <Setter Property="Template">
  47. <Setter.Value>
  48. <ControlTemplate TargetType="{x:Type ToggleButton}">
  49. <Grid>
  50. <Border
  51. x:Name="border2"
  52. Width="auto"
  53. Margin="{TemplateBinding Padding}"
  54. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  55. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  56. Background="{TemplateBinding Background}">
  57. <ContentPresenter
  58. Margin="{TemplateBinding Padding}"
  59. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  60. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  61. RecognizesAccessKey="True"
  62. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  63. </Border>
  64. </Grid>
  65. <ControlTemplate.Triggers>
  66. <!--<Trigger Property="IsPressed" Value="true">
  67. <Setter Property="Background" Value="#FFd2e7f4" />
  68. </Trigger>
  69. <Trigger Property="IsChecked" Value="true">
  70. <Setter TargetName="border2" Property="Background" Value="#191E36" />
  71. </Trigger>
  72. <Trigger Property="IsChecked" Value="false">
  73. <Setter TargetName="border2" Property="Background" Value="#191E36" />
  74. </Trigger>-->
  75. <!--<Trigger Property="IsEnabled" Value="false">
  76. <Setter Property="Foreground" Value="White" />
  77. </Trigger>-->
  78. <Trigger Property="IsMouseOver" Value="True">
  79. <Setter TargetName="border2" Property="Background" Value="#191E36" />
  80. </Trigger>
  81. <Trigger Property="IsMouseOver" Value="False">
  82. <Setter TargetName="border2" Property="Background" Value="Transparent" />
  83. </Trigger>
  84. </ControlTemplate.Triggers>
  85. </ControlTemplate>
  86. </Setter.Value>
  87. </Setter>
  88. </Style>
  89. <Style x:Key="ExpanderStyle" TargetType="{x:Type Expander}">
  90. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  91. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  92. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  93. <Setter Property="BorderBrush" Value="Transparent" />
  94. <Setter Property="BorderThickness" Value="1" />
  95. <Setter Property="Template">
  96. <Setter.Value>
  97. <ControlTemplate TargetType="{x:Type Expander}">
  98. <DockPanel>
  99. <ToggleButton
  100. x:Name="HeaderSite"
  101. Height="20"
  102. Width="auto"
  103. MinWidth="0"
  104. MinHeight="0"
  105. Margin="1"
  106. Padding="{TemplateBinding Padding}"
  107. Background="Transparent"
  108. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  109. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
  110. Content="{TemplateBinding Header}"
  111. ContentTemplate="{TemplateBinding HeaderTemplate}"
  112. ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
  113. DockPanel.Dock="Top"
  114. FontFamily="{TemplateBinding FontFamily}"
  115. FontSize="{TemplateBinding FontSize}"
  116. FontStretch="{TemplateBinding FontStretch}"
  117. FontStyle="{TemplateBinding FontStyle}"
  118. FontWeight="{TemplateBinding FontWeight}"
  119. Foreground="{TemplateBinding Foreground}"
  120. IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  121. Style="{StaticResource ToggleButtonStyle}" />
  122. <ContentPresenter
  123. x:Name="ExpandSite"
  124. Margin="{TemplateBinding Padding}"
  125. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  126. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  127. DockPanel.Dock="Left"
  128. Focusable="false"
  129. Visibility="Visible" />
  130. </DockPanel>
  131. <ControlTemplate.Triggers>
  132. <Trigger Property="IsExpanded" Value="True">
  133. <Setter TargetName="ExpandSite" Property="Visibility" Value="Collapsed" />
  134. </Trigger>
  135. </ControlTemplate.Triggers>
  136. </ControlTemplate>
  137. </Setter.Value>
  138. </Setter>
  139. </Style>
  140. <!--#endregion-->
  141. </UserControl.Resources>
  142. <Grid>
  143. <Grid.RowDefinitions>
  144. <RowDefinition Height="50"/>
  145. <RowDefinition />
  146. </Grid.RowDefinitions>
  147. <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
  148. <CheckBox
  149. x:Name="IsUseLocalRecipe"
  150. Margin="0,0,10,0"
  151. Content="应用本地配方"
  152. FontFamily="楷体"
  153. VerticalAlignment="Center"
  154. Foreground="Aqua"
  155. IsChecked="{Binding IsUseLocalRecipe}" />
  156. <pry:IcoButton
  157. Width="140"
  158. Margin="10"
  159. HorizontalAlignment="Left"
  160. Command="{Binding NewRecipe}"
  161. Content="新建配方"
  162. FontSize="16"
  163. Foreground="Aqua"
  164. IcoText="&#xe626;"
  165. Style="{StaticResource IcoButtonStyle}" />
  166. <!--<pry:IcoButton
  167. Width="140"
  168. Margin="10"
  169. HorizontalAlignment="Left"
  170. Command="{Binding NewSimulateRecipe}"
  171. Content="新建模拟配方"
  172. FontSize="16"
  173. Foreground="Aqua"
  174. IcoText="&#xe626;"
  175. Style="{StaticResource IcoButtonStyle}" />-->
  176. <pry:IcoButton
  177. Grid.Column="3"
  178. Width="140"
  179. Margin="10"
  180. HorizontalAlignment="Left"
  181. Command="{Binding ClearAllRecipe}"
  182. Content="清除所有配方"
  183. FontSize="16"
  184. Foreground="Aqua"
  185. IcoText="&#xe635;"
  186. IsEnabled="True"
  187. Style="{StaticResource IcoButtonStyle}" />
  188. </StackPanel>
  189. <ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Hidden">
  190. <ListBox
  191. Grid.Row="2"
  192. Margin="5"
  193. VerticalAlignment="Top"
  194. Background="Transparent"
  195. BorderThickness="0"
  196. ItemsSource="{Binding Recipes}"
  197. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  198. <ListBox.ItemsPanel>
  199. <ItemsPanelTemplate>
  200. <UniformGrid
  201. HorizontalAlignment="Left"
  202. VerticalAlignment="Top"
  203. Columns="8" />
  204. </ItemsPanelTemplate>
  205. </ListBox.ItemsPanel>
  206. <ListBox.ItemTemplate>
  207. <DataTemplate>
  208. <Grid
  209. Name="tt"
  210. Height="220"
  211. Margin="5">
  212. <Grid.RowDefinitions>
  213. <RowDefinition Height="30" />
  214. <RowDefinition Height="20" />
  215. <RowDefinition Height="128" />
  216. <RowDefinition Height="2" />
  217. <RowDefinition Height="40" />
  218. </Grid.RowDefinitions>
  219. <Image
  220. Grid.RowSpan="5"
  221. Source="/BPASmartClient.CustomResource;component/Image/配方背景/竖背景框.png"
  222. Stretch="Fill" />
  223. <TextBlock
  224. Grid.Row="0"
  225. Margin="2,5,0,0"
  226. HorizontalAlignment="Center"
  227. VerticalAlignment="Top"
  228. FontSize="18"
  229. Foreground="#FF2AB2E7"
  230. Text="{Binding RecipeName}" />
  231. <TextBlock
  232. Grid.Row="1"
  233. FontSize="16"
  234. Margin="5,0,0,0"
  235. VerticalAlignment="Top"
  236. Foreground="#FF2AB2E7"
  237. Text="配方信息:" />
  238. <ScrollViewer
  239. Grid.Row="2"
  240. VerticalAlignment="Top"
  241. Background="Transparent"
  242. HorizontalScrollBarVisibility="Hidden"
  243. VerticalScrollBarVisibility="Hidden">
  244. <ItemsControl ItemsSource="{Binding RawMaterial}">
  245. <ItemsControl.ItemsPanel>
  246. <ItemsPanelTemplate>
  247. <StackPanel/>
  248. </ItemsPanelTemplate>
  249. </ItemsControl.ItemsPanel>
  250. <ItemsControl.ItemTemplate>
  251. <DataTemplate>
  252. <Expander Style="{StaticResource ExpanderStyle}" Margin="40,0,0,0">
  253. <Expander.Header>
  254. <StackPanel Orientation="Horizontal">
  255. <Border Width="15" Height="15" CornerRadius="15" HorizontalAlignment="Left" Margin="0,0,5,0">
  256. <Border.Background>
  257. <RadialGradientBrush>
  258. <GradientStop Color="#FF2AB2E7" Offset="0.5" />
  259. <GradientStop Color="White"/>
  260. </RadialGradientBrush>
  261. </Border.Background>
  262. </Border>
  263. <TextBlock Text="{Binding RawMaterialName }" Foreground="#FF2AB2E7" VerticalAlignment="Center" FontSize="14" />
  264. </StackPanel>
  265. </Expander.Header>
  266. <Expander.Content>
  267. <StackPanel Margin="36,0,0,0">
  268. <StackPanel Orientation="Horizontal">
  269. <TextBlock Text="托盘桶号:" Foreground="#FF2AB2E7"/>
  270. <TextBlock Text="{Binding RawMaterialBarrelNum}" Foreground="#FF2AB2E7"/>
  271. </StackPanel>
  272. <StackPanel Orientation="Horizontal">
  273. <TextBlock Text="原料重量:" Foreground="#FF2AB2E7"/>
  274. <TextBlock Text="{Binding RawMaterialWeight}" Foreground="#FF2AB2E7"/>
  275. </StackPanel>
  276. </StackPanel>
  277. </Expander.Content>
  278. </Expander>
  279. </DataTemplate>
  280. </ItemsControl.ItemTemplate>
  281. </ItemsControl>
  282. </ScrollViewer>
  283. <Image
  284. Grid.Row="3"
  285. Width="{Binding ElementName=tt, Path=ActualWidth}"
  286. Height="2"
  287. VerticalAlignment="Bottom"
  288. Source="/BPASmartClient.CustomResource;component/Image/直线.png"
  289. Stretch="Fill" />
  290. <Grid
  291. Name="gr"
  292. Grid.Row="4"
  293. Height="30"
  294. Margin="0,0,0,10"
  295. VerticalAlignment="Bottom"
  296. Background="Transparent">
  297. <Grid.ColumnDefinitions>
  298. <ColumnDefinition />
  299. <ColumnDefinition />
  300. </Grid.ColumnDefinitions>
  301. <!--<Image
  302. Height="2"
  303. Grid.ColumnSpan="2"
  304. Width="{Binding ElementName=gr, Path=ActualWidth}"
  305. VerticalAlignment="Top"
  306. Source="/BPASmartClient.CustomResource;component/Image/直线.png" />-->
  307. <!--<pry:IcoButton
  308. Grid.Column="1"
  309. Width="{Binding ElementName=gr, Path=ActualWidth}"
  310. Height="{Binding ElementName=gr, Path=ActualHeight}"
  311. Margin="4,4,4,0"
  312. HorizontalAlignment="Center"
  313. VerticalAlignment="Center"
  314. Background="#11F53F62"
  315. BorderThickness="0"
  316. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  317. CommandParameter="{Binding RecipCode}"
  318. Content="删除"
  319. EnterBackground="#22F53F62"
  320. FontStyle="Normal"
  321. Foreground="#FFF53F62"
  322. IcoText="&#xe68e;"
  323. Style="{StaticResource IcoButtonStyle}" />-->
  324. <pry:IcoButton
  325. Grid.Column="1"
  326. Width="{Binding ElementName=gr, Path=ActualWidth}"
  327. Height="{Binding ElementName=gr, Path=ActualHeight}"
  328. Margin="3,4,4,0"
  329. HorizontalAlignment="Center"
  330. VerticalAlignment="Center"
  331. Background="#11F53F62"
  332. BorderThickness="0"
  333. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  334. CommandParameter="{Binding RecipeCode}"
  335. Content="删除"
  336. EnterBackground="#22F53F62"
  337. Foreground="#FFF53F62"
  338. IcoText="&#xe68e;"
  339. Style="{StaticResource IcoButtonStyle}" />
  340. <pry:IcoButton
  341. Width="{Binding ElementName=gr, Path=ActualWidth}"
  342. Height="{Binding ElementName=gr, Path=ActualHeight}"
  343. Margin="3,4,4,0"
  344. HorizontalAlignment="Center"
  345. VerticalAlignment="Center"
  346. Background="#112AB2E7"
  347. BorderThickness="0"
  348. Command="{Binding DataContext.DetailsCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  349. CommandParameter="{Binding RecipeCode}"
  350. Content="编辑"
  351. EnterBackground="#222AB2E7"
  352. Foreground="#FF2AB2E7"
  353. IcoText="&#xe636;"
  354. Style="{StaticResource IcoButtonStyle}" />
  355. </Grid>
  356. </Grid>
  357. </DataTemplate>
  358. </ListBox.ItemTemplate>
  359. </ListBox>
  360. </ScrollViewer>
  361. </Grid>
  362. </UserControl>