终端一体化运控平台
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 

515 строки
26 KiB

  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. Width="auto"
  102. Height="20"
  103. MinWidth="0"
  104. MinHeight="0"
  105. Margin="1"
  106. Padding="{TemplateBinding Padding}"
  107. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  108. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
  109. Background="Transparent"
  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. VerticalAlignment="Center"
  152. VerticalContentAlignment="Center"
  153. Content="使用本地配方配料"
  154. FontFamily="楷体"
  155. FontSize="20"
  156. Foreground="Aqua"
  157. IsChecked="{Binding IsUseLocalRecipe}" />
  158. <!--<pry:IcoButton
  159. Width="140"
  160. Margin="10"
  161. HorizontalAlignment="Left"
  162. Command="{Binding RefreshRecipe}"
  163. Content="刷新配方"
  164. FontSize="16"
  165. Foreground="Aqua"
  166. IcoText="&#xe626;"
  167. Style="{StaticResource IcoButtonStyle}" />-->
  168. <pry:IcoButton
  169. Width="140"
  170. Margin="10"
  171. HorizontalAlignment="Left"
  172. Command="{Binding NewRecipe}"
  173. Content="新建配方"
  174. FontSize="16"
  175. Foreground="Aqua"
  176. IcoText="&#xe626;"
  177. Style="{StaticResource IcoButtonStyle}" />
  178. <!--<pry:IcoButton
  179. Width="140"
  180. Margin="10"
  181. HorizontalAlignment="Left"
  182. Command="{Binding NewSimulateRecipe}"
  183. Content="新建模拟配方"
  184. FontSize="16"
  185. Foreground="Aqua"
  186. IcoText="&#xe626;"
  187. Style="{StaticResource IcoButtonStyle}" />-->
  188. <pry:IcoButton
  189. Grid.Column="3"
  190. Width="140"
  191. Margin="10"
  192. HorizontalAlignment="Left"
  193. Command="{Binding ClearAllRecipe}"
  194. Content="清除所有配方"
  195. FontSize="16"
  196. Foreground="Aqua"
  197. IcoText="&#xe635;"
  198. IsEnabled="True"
  199. Style="{StaticResource IcoButtonStyle}" />
  200. </StackPanel>
  201. <ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Disabled">
  202. <ListBox
  203. x:Name="recipeBox"
  204. Grid.Row="2"
  205. Margin="5"
  206. VerticalAlignment="Top"
  207. Background="Transparent"
  208. BorderThickness="0"
  209. ItemsSource="{Binding Recipes}"
  210. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  211. <ListBox.ItemsPanel>
  212. <ItemsPanelTemplate>
  213. <UniformGrid
  214. HorizontalAlignment="Left"
  215. VerticalAlignment="Top"
  216. Columns="8" />
  217. </ItemsPanelTemplate>
  218. </ListBox.ItemsPanel>
  219. <ListBox.GroupStyle>
  220. <GroupStyle>
  221. <GroupStyle.ContainerStyle>
  222. <Style BasedOn="{StaticResource ListBoxGroupStyle}" TargetType="{x:Type GroupItem}" />
  223. </GroupStyle.ContainerStyle>
  224. </GroupStyle>
  225. </ListBox.GroupStyle>
  226. <ListBox.ItemTemplate>
  227. <DataTemplate>
  228. <Grid
  229. Name="tt"
  230. Height="220"
  231. Margin="5">
  232. <Grid.RowDefinitions>
  233. <RowDefinition Height="30" />
  234. <RowDefinition Height="25" />
  235. <RowDefinition Height="25" />
  236. <RowDefinition Height="25" />
  237. <RowDefinition Height="25" />
  238. <RowDefinition Height="58" />
  239. <RowDefinition Height="2" />
  240. <RowDefinition Height="40" />
  241. </Grid.RowDefinitions>
  242. <Grid.ColumnDefinitions>
  243. <ColumnDefinition />
  244. <ColumnDefinition />
  245. </Grid.ColumnDefinitions>
  246. <Image
  247. Grid.RowSpan="8"
  248. Grid.ColumnSpan="2"
  249. Source="/BPASmartClient.CustomResource;component/Image/配方背景/竖背景框.png"
  250. Stretch="Fill" />
  251. <TextBlock
  252. Grid.Row="0"
  253. Grid.ColumnSpan="2"
  254. Margin="5,0,0,0"
  255. HorizontalAlignment="Center"
  256. VerticalAlignment="Center"
  257. FontSize="14"
  258. Foreground="#FF2AB2E7"
  259. Text="配方信息" />
  260. <TextBlock
  261. Grid.Row="1"
  262. Grid.Column="0"
  263. Margin="2,5,0,0"
  264. HorizontalAlignment="Center"
  265. VerticalAlignment="Center"
  266. FontSize="12"
  267. Foreground="#FF2AB2E7"
  268. Text="配方名称:" />
  269. <TextBlock
  270. Grid.Row="1"
  271. Grid.Column="1"
  272. Margin="2,5,0,0"
  273. HorizontalAlignment="Center"
  274. VerticalAlignment="Center"
  275. FontSize="12"
  276. Foreground="#FF2AB2E7"
  277. Text="{Binding RecipeName}" />
  278. <!--<TextBlock
  279. Grid.Row="5"
  280. Grid.Column="0"
  281. Margin="2,5,0,0"
  282. HorizontalAlignment="Center"
  283. VerticalAlignment="Center"
  284. FontSize="12"
  285. Foreground="#FF2AB2E7"
  286. Text="配方类别:" />-->
  287. <TextBlock
  288. Grid.Row="2"
  289. Grid.Column="1"
  290. Margin="2,5,0,0"
  291. HorizontalAlignment="Center"
  292. VerticalAlignment="Center"
  293. FontSize="12"
  294. Foreground="#FF2AB2E7"
  295. Text="{Binding RecipeCode}" />
  296. <TextBlock
  297. Grid.Row="3"
  298. Grid.Column="0"
  299. Margin="2,5,0,0"
  300. HorizontalAlignment="Center"
  301. VerticalAlignment="Center"
  302. FontSize="12"
  303. Foreground="#FF2AB2E7"
  304. Text="托盘编号:" />
  305. <TextBlock
  306. Grid.Row="3"
  307. Grid.Column="1"
  308. Margin="2,5,0,0"
  309. HorizontalAlignment="Center"
  310. VerticalAlignment="Center"
  311. FontSize="12"
  312. Foreground="#FF2AB2E7"
  313. Text="{Binding TrayCode}" />
  314. <TextBlock
  315. Grid.Row="4"
  316. Grid.Column="0"
  317. Margin="2,5,0,0"
  318. HorizontalAlignment="Center"
  319. VerticalAlignment="Center"
  320. FontSize="12"
  321. Foreground="#FF2AB2E7"
  322. Text="订单类型:" />
  323. <TextBlock
  324. Grid.Row="4"
  325. Grid.Column="1"
  326. Margin="2,5,0,0"
  327. HorizontalAlignment="Center"
  328. VerticalAlignment="Center"
  329. FontSize="12"
  330. Foreground="#FF2AB2E7"
  331. Text="{Binding OrderType}" />
  332. <!--<ScrollViewer
  333. Grid.Row="5"
  334. VerticalAlignment="Top"
  335. Background="Transparent"
  336. HorizontalScrollBarVisibility="Hidden"
  337. VerticalScrollBarVisibility="Hidden">
  338. <ItemsControl ItemsSource="{Binding RawMaterial}">
  339. <ItemsControl.ItemsPanel>
  340. <ItemsPanelTemplate>
  341. <StackPanel/>
  342. </ItemsPanelTemplate>
  343. </ItemsControl.ItemsPanel>
  344. <ItemsControl.ItemTemplate>
  345. <DataTemplate>
  346. <Expander Style="{StaticResource ExpanderStyle}" Margin="40,0,0,0">
  347. <Expander.Header>
  348. <StackPanel Orientation="Horizontal">
  349. <Border Width="15" Height="15" CornerRadius="15" HorizontalAlignment="Left" Margin="0,0,5,0">
  350. <Border.Background>
  351. <RadialGradientBrush>
  352. <GradientStop Color="#FF2AB2E7" Offset="0.5" />
  353. <GradientStop Color="White"/>
  354. </RadialGradientBrush>
  355. </Border.Background>
  356. </Border>
  357. <TextBlock Text="{Binding RawMaterialName }" Foreground="#FF2AB2E7" VerticalAlignment="Center" FontSize="14" />
  358. </StackPanel>
  359. </Expander.Header>
  360. <Expander.Content>
  361. <StackPanel Margin="36,0,0,0">
  362. <StackPanel Orientation="Horizontal">
  363. <TextBlock Text="原料桶号:" Foreground="#FF2AB2E7"/>
  364. <TextBlock Text="{Binding RawMaterialBarrelNum}" Foreground="#FF2AB2E7"/>
  365. </StackPanel>
  366. <StackPanel Orientation="Horizontal">
  367. <TextBlock Text="原料重量:" Foreground="#FF2AB2E7"/>
  368. <TextBlock Text="{Binding RawMaterialWeight}" Foreground="#FF2AB2E7"/>
  369. </StackPanel>
  370. </StackPanel>
  371. </Expander.Content>
  372. </Expander>
  373. </DataTemplate>
  374. </ItemsControl.ItemTemplate>
  375. </ItemsControl>
  376. </ScrollViewer>-->
  377. <TextBlock
  378. Grid.Row="5"
  379. Grid.Column="1"
  380. Margin="2,5,0,0"
  381. HorizontalAlignment="Center"
  382. VerticalAlignment="Center"
  383. FontSize="12"
  384. Foreground="#FF2AB2E7"
  385. Text="{Binding RecipeCategory}" />
  386. <TextBlock
  387. Grid.Row="2"
  388. Grid.Column="0"
  389. Margin="2,5,0,0"
  390. HorizontalAlignment="Center"
  391. VerticalAlignment="Center"
  392. FontSize="12"
  393. Foreground="#FF2AB2E7"
  394. Text="配方编号:" />
  395. <Image
  396. Grid.Row="6"
  397. Grid.ColumnSpan="2"
  398. Width="{Binding ElementName=tt, Path=ActualWidth}"
  399. Height="2"
  400. VerticalAlignment="Bottom"
  401. Source="/BPASmartClient.CustomResource;component/Image/直线.png"
  402. Stretch="Fill" />
  403. <Grid
  404. Name="gr"
  405. Grid.Row="7"
  406. Grid.ColumnSpan="2"
  407. Height="30"
  408. Margin="0,0,0,10"
  409. VerticalAlignment="Bottom"
  410. Background="Transparent">
  411. <Grid.ColumnDefinitions>
  412. <ColumnDefinition />
  413. <ColumnDefinition />
  414. </Grid.ColumnDefinitions>
  415. <!--<Image
  416. Height="2"
  417. Grid.ColumnSpan="2"
  418. Width="{Binding ElementName=gr, Path=ActualWidth}"
  419. VerticalAlignment="Top"
  420. Source="/BPASmartClient.CustomResource;component/Image/直线.png" />-->
  421. <!--<pry:IcoButton
  422. Grid.Column="1"
  423. Width="{Binding ElementName=gr, Path=ActualWidth}"
  424. Height="{Binding ElementName=gr, Path=ActualHeight}"
  425. Margin="4,4,4,0"
  426. HorizontalAlignment="Center"
  427. VerticalAlignment="Center"
  428. Background="#11F53F62"
  429. BorderThickness="0"
  430. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  431. CommandParameter="{Binding RecipCode}"
  432. Content="删除"
  433. EnterBackground="#22F53F62"
  434. FontStyle="Normal"
  435. Foreground="#FFF53F62"
  436. IcoText="&#xe68e;"
  437. Style="{StaticResource IcoButtonStyle}" />-->
  438. <pry:IcoButton
  439. Grid.Column="1"
  440. Width="{Binding ElementName=gr, Path=ActualWidth}"
  441. Height="{Binding ElementName=gr, Path=ActualHeight}"
  442. Margin="3,4,4,0"
  443. HorizontalAlignment="Center"
  444. VerticalAlignment="Center"
  445. Background="#11F53F62"
  446. BorderThickness="0"
  447. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  448. CommandParameter="{Binding RecipeCode}"
  449. Content="删除"
  450. EnterBackground="#22F53F62"
  451. Foreground="#FFF53F62"
  452. IcoText="&#xe68e;"
  453. Style="{StaticResource IcoButtonStyle}" />
  454. <pry:IcoButton
  455. Width="{Binding ElementName=gr, Path=ActualWidth}"
  456. Height="{Binding ElementName=gr, Path=ActualHeight}"
  457. Margin="3,4,4,0"
  458. HorizontalAlignment="Center"
  459. VerticalAlignment="Center"
  460. Background="#112AB2E7"
  461. BorderThickness="0"
  462. Command="{Binding DataContext.DetailsCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  463. CommandParameter="{Binding RecipeCode}"
  464. Content="编辑"
  465. EnterBackground="#222AB2E7"
  466. Foreground="#FF2AB2E7"
  467. IcoText="&#xe636;"
  468. Style="{StaticResource IcoButtonStyle}" />
  469. </Grid>
  470. </Grid>
  471. </DataTemplate>
  472. </ListBox.ItemTemplate>
  473. </ListBox>
  474. </ScrollViewer>
  475. </Grid>
  476. </UserControl>