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

963 rivejä
51 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.JXJFoodBigStation.View.RecipeSendDownView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:con="clr-namespace:BPASmartClient.JXJFoodBigStation.Converter"
  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:RecipeSendDownViewModel />
  16. </UserControl.DataContext>
  17. <UserControl.Resources>
  18. <con:EnbleConvert x:Key="EnbleConvert" />
  19. <con:IntToSourceConvert x:Key="IntToSourceConvert" />
  20. <con:RunStatusConvert x:Key="RunStatusConvert" />
  21. <Style x:Key="UserItemContainerStyle" TargetType="ListBoxItem">
  22. <Style.Resources>
  23. <!-- SelectedItem with focus -->
  24. <SolidColorBrush
  25. x:Key="{x:Static SystemColors.HighlightBrushKey}"
  26. Opacity=".4"
  27. Color="White" />
  28. <!-- SelectedItem without focus -->
  29. <SolidColorBrush
  30. x:Key="{x:Static SystemColors.ControlBrushKey}"
  31. Opacity=".4"
  32. Color="White" />
  33. </Style.Resources>
  34. <!-- 设置触发器 -->
  35. <Style.Triggers>
  36. <Trigger Property="IsMouseOver" Value="true">
  37. <Setter Property="Background" Value="White" />
  38. <Setter Property="Foreground" Value="White" />
  39. </Trigger>
  40. <Trigger Property="IsFocused" Value="true">
  41. <Setter Property="Background" Value="White" />
  42. <Setter Property="Foreground" Value="White" />
  43. </Trigger>
  44. </Style.Triggers>
  45. </Style>
  46. <Style x:Key="RadioState" TargetType="RadioButton">
  47. <Setter Property="Margin" Value="1" />
  48. <Setter Property="Background" Value="Transparent" />
  49. <Setter Property="Foreground" Value="#ddd" />
  50. <Setter Property="VerticalContentAlignment" Value="Bottom" />
  51. <Setter Property="Margin" Value="2,5" />
  52. <Setter Property="FontSize" Value="16" />
  53. <Setter Property="FontFamily" Value="Consolas" />
  54. <Setter Property="Template">
  55. <Setter.Value>
  56. <ControlTemplate TargetType="RadioButton">
  57. <Border
  58. Name="radiobutton"
  59. Background="{TemplateBinding Background}"
  60. CornerRadius="5"
  61. Opacity="0.85">
  62. <Grid>
  63. <!--<Border
  64. x:Name="back_border"
  65. BorderBrush="Black"
  66. BorderThickness="0"
  67. CornerRadius="1">
  68. <Border.Effect>
  69. <BlurEffect KernelType="Gaussian" Radius="2" />
  70. </Border.Effect>
  71. </Border>
  72. <Border
  73. x:Name="fore_border"
  74. Margin="2"
  75. BorderBrush="White"
  76. BorderThickness="0"
  77. CornerRadius="{Binding ElementName=button, Path=CornerRadius}"
  78. Opacity="0.7">
  79. <Border.Effect>
  80. <BlurEffect KernelType="Gaussian" Radius="2" />
  81. </Border.Effect>
  82. </Border>-->
  83. <ContentPresenter
  84. HorizontalAlignment="Center"
  85. VerticalAlignment="Center"
  86. Content="{TemplateBinding Content}"
  87. TextBlock.FontFamily="{TemplateBinding FontFamily}"
  88. TextBlock.FontSize="{TemplateBinding FontSize}"
  89. TextBlock.Foreground="{TemplateBinding Foreground}" />
  90. <Image
  91. Name="im"
  92. Source="/BPASmartClient.CustomResource;component/Image/按钮/组 8.png"
  93. Stretch="Fill" />
  94. </Grid>
  95. </Border>
  96. <ControlTemplate.Triggers>
  97. <Trigger Property="IsChecked" Value="True">
  98. <!--<Setter TargetName="back_border" Property="BorderThickness" Value="1,0,1,1" />
  99. <Setter TargetName="back_border" Property="CornerRadius" Value="5" />
  100. <Setter TargetName="fore_border" Property="BorderThickness" Value="0,2,0,0" />
  101. <Setter Property="Background" Value=" #4169E1" />-->
  102. <Setter TargetName="im" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/按钮/组 7.png" />
  103. </Trigger>
  104. <Trigger Property="IsChecked" Value="False">
  105. <Setter TargetName="im" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/按钮/组 8.png" />
  106. </Trigger>
  107. <Trigger Property="IsMouseOver" Value="True">
  108. <!--<Setter TargetName="back_border" Property="BorderBrush" Value="white" />
  109. <Setter TargetName="back_border" Property="BorderThickness" Value="1,1,1,1" />-->
  110. <Setter TargetName="radiobutton" Property="Opacity" Value="1" />
  111. <!--<Setter TargetName="im" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/按钮背景蓝色.png" />-->
  112. </Trigger>
  113. </ControlTemplate.Triggers>
  114. </ControlTemplate>
  115. </Setter.Value>
  116. </Setter>
  117. </Style>
  118. <Style x:Key="materialMakingButton" TargetType="Button">
  119. <Setter Property="Background" Value="Transparent" />
  120. <Setter Property="FontSize" Value="16" />
  121. <Setter Property="Foreground" Value="#CD5555" />
  122. <Setter Property="BorderThickness" Value="0" />
  123. <Setter Property="HorizontalAlignment" Value="Left" />
  124. <Setter Property="Template">
  125. <Setter.Value>
  126. <ControlTemplate>
  127. <Border
  128. x:Name="brState"
  129. Padding="2"
  130. BorderBrush="White"
  131. BorderThickness="0">
  132. <TextBlock
  133. x:Name="txState"
  134. Margin="1"
  135. HorizontalAlignment="Center"
  136. VerticalAlignment="Center"
  137. Text="{Binding RecipeStatus, Converter={StaticResource RunStatusConvert}}" />
  138. </Border>
  139. <ControlTemplate.Triggers>
  140. <Trigger Property="IsEnabled" Value="True">
  141. <Setter TargetName="brState" Property="BorderThickness" Value="0" />
  142. <Setter TargetName="brState" Property="CornerRadius" Value="5" />
  143. <Setter TargetName="brState" Property="Background" Value="#F0FFFF" />
  144. <Setter TargetName="txState" Property="Foreground" Value="#CD5555" />
  145. </Trigger>
  146. <DataTrigger Binding="{Binding RecipeStatus}" Value="3">
  147. <Setter TargetName="brState" Property="Background" Value="#F0FFFF" />
  148. <Setter TargetName="txState" Property="Foreground" Value="#3CB371" />
  149. </DataTrigger>
  150. <DataTrigger Binding="{Binding RecipeStatus}" Value="2">
  151. <Setter TargetName="txState" Property="Foreground" Value="Aqua" />
  152. </DataTrigger>
  153. <MultiTrigger>
  154. <MultiTrigger.Conditions>
  155. <Condition Property="IsMouseOver" Value="True" />
  156. <Condition Property="IsEnabled" Value="True" />
  157. </MultiTrigger.Conditions>
  158. <Setter TargetName="txState" Property="FontSize" Value="17 " />
  159. </MultiTrigger>
  160. </ControlTemplate.Triggers>
  161. </ControlTemplate>
  162. </Setter.Value>
  163. </Setter>
  164. <Style.Triggers />
  165. </Style>
  166. <DataTemplate x:Key="TreeItemTemplate" DataType="TreeViewItem">
  167. <Grid Height="28" Margin="50,0,0,0">
  168. <Grid.ColumnDefinitions>
  169. <ColumnDefinition Width="*" />
  170. <ColumnDefinition Width="*" />
  171. </Grid.ColumnDefinitions>
  172. <TextBlock
  173. Margin="10,0"
  174. HorizontalAlignment="Left"
  175. VerticalAlignment="Center"
  176. FontSize="15"
  177. Foreground="#aa2AB2E7"
  178. Text="原料:" />
  179. <TextBlock
  180. Grid.Column="1"
  181. Margin="10,0"
  182. HorizontalAlignment="Left"
  183. VerticalAlignment="Center"
  184. FontSize="15"
  185. Foreground="#aa2AB2E7"
  186. Text="{Binding RawMaterialName}" />
  187. </Grid>
  188. </DataTemplate>
  189. <Style x:Key="recipeTreeItem" TargetType="TreeViewItem">
  190. <Setter Property="Background" Value="Transparent" />
  191. <Setter Property="BorderThickness" Value="0" />
  192. <Setter Property="IsExpanded" Value="True" />
  193. <Setter Property="HeaderTemplate">
  194. <Setter.Value>
  195. <HierarchicalDataTemplate ItemTemplate="{StaticResource TreeItemTemplate}" ItemsSource="{Binding RawMaterials, Mode=TwoWay}">
  196. <StackPanel
  197. Height="28"
  198. HorizontalAlignment="Left"
  199. VerticalAlignment="Center"
  200. Orientation="Horizontal">
  201. <TextBlock
  202. Margin="5,0,0,0"
  203. VerticalAlignment="Center"
  204. FontSize="15"
  205. Foreground="#FF2AB2E7"
  206. Text="配方:" />
  207. <TextBlock
  208. Margin="5,0,0,0"
  209. VerticalAlignment="Center"
  210. FontSize="15"
  211. Foreground="#FF2AB2E7"
  212. Text="{Binding RecipeName}" />
  213. </StackPanel>
  214. </HierarchicalDataTemplate>
  215. </Setter.Value>
  216. </Setter>
  217. <Setter Property="Template">
  218. <Setter.Value>
  219. <ControlTemplate TargetType="{x:Type TreeViewItem}">
  220. <Grid>
  221. <Grid.ColumnDefinitions>
  222. <ColumnDefinition Width="Auto" />
  223. <ColumnDefinition Width="*" />
  224. </Grid.ColumnDefinitions>
  225. <Grid.RowDefinitions>
  226. <RowDefinition Height="Auto" />
  227. <RowDefinition />
  228. </Grid.RowDefinitions>
  229. <Border
  230. x:Name="Bd"
  231. Grid.Column="0"
  232. Padding="{TemplateBinding Padding}"
  233. Background="{TemplateBinding Background}"
  234. BorderBrush="{TemplateBinding BorderBrush}"
  235. BorderThickness="{TemplateBinding BorderThickness}">
  236. <ContentPresenter
  237. x:Name="PART_Header"
  238. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  239. ContentSource="Header" />
  240. </Border>
  241. <ItemsPresenter
  242. x:Name="ItemsHost"
  243. Grid.Row="1"
  244. Grid.Column="0"
  245. Grid.ColumnSpan="2"
  246. Visibility="Collapsed" />
  247. <VisualStateManager.VisualStateGroups>
  248. <VisualStateGroup x:Name="SelectionStates">
  249. <VisualState x:Name="Selected">
  250. <Storyboard>
  251. <ColorAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
  252. <EasingColorKeyFrame KeyTime="0" Value="Transparent" />
  253. </ColorAnimationUsingKeyFrames>
  254. </Storyboard>
  255. </VisualState>
  256. <VisualState x:Name="Unselected" />
  257. <VisualState x:Name="SelectedInactive">
  258. <Storyboard>
  259. <ColorAnimationUsingKeyFrames Storyboard.TargetName="Bd" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
  260. <EasingColorKeyFrame KeyTime="0" Value="Transparent" />
  261. </ColorAnimationUsingKeyFrames>
  262. </Storyboard>
  263. </VisualState>
  264. </VisualStateGroup>
  265. <VisualStateGroup x:Name="ExpansionStates">
  266. <VisualState x:Name="Expanded">
  267. <Storyboard>
  268. <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ItemsHost" Storyboard.TargetProperty="(UIElement.Visibility)">
  269. <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
  270. </ObjectAnimationUsingKeyFrames>
  271. </Storyboard>
  272. </VisualState>
  273. <VisualState x:Name="Collapsed" />
  274. </VisualStateGroup>
  275. </VisualStateManager.VisualStateGroups>
  276. </Grid>
  277. <ControlTemplate.Triggers>
  278. <MultiTrigger>
  279. <MultiTrigger.Conditions>
  280. <Condition Property="HasHeader" Value="false" />
  281. <Condition Property="Width" Value="Auto" />
  282. </MultiTrigger.Conditions>
  283. <Setter TargetName="PART_Header" Property="MinWidth" Value="75" />
  284. </MultiTrigger>
  285. <MultiTrigger>
  286. <MultiTrigger.Conditions>
  287. <Condition Property="HasHeader" Value="false" />
  288. <Condition Property="Height" Value="Auto" />
  289. </MultiTrigger.Conditions>
  290. <Setter TargetName="PART_Header" Property="MinHeight" Value="19" />
  291. </MultiTrigger>
  292. </ControlTemplate.Triggers>
  293. </ControlTemplate>
  294. </Setter.Value>
  295. </Setter>
  296. </Style>
  297. <!--#region 下拉列表样式-->
  298. <Style x:Key="ToggleButtonStyle" TargetType="{x:Type ToggleButton}">
  299. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  300. <!--<Setter Property="Height" Value="10" />-->
  301. <Setter Property="HorizontalContentAlignment" Value="Left" />
  302. <Setter Property="VerticalContentAlignment" Value="Top" />
  303. <Setter Property="Padding" Value="10,10" />
  304. <Setter Property="Template">
  305. <Setter.Value>
  306. <ControlTemplate TargetType="{x:Type ToggleButton}">
  307. <Grid>
  308. <Border
  309. x:Name="border2"
  310. Width="auto"
  311. Margin="{TemplateBinding Padding}"
  312. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  313. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  314. Background="{TemplateBinding Background}">
  315. <ContentPresenter
  316. Margin="{TemplateBinding Padding}"
  317. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  318. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  319. RecognizesAccessKey="True"
  320. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  321. </Border>
  322. </Grid>
  323. <ControlTemplate.Triggers>
  324. <!--<Trigger Property="IsPressed" Value="true">
  325. <Setter Property="Background" Value="#FFd2e7f4" />
  326. </Trigger>
  327. <Trigger Property="IsChecked" Value="true">
  328. <Setter TargetName="border2" Property="Background" Value="#191E36" />
  329. </Trigger>
  330. <Trigger Property="IsChecked" Value="false">
  331. <Setter TargetName="border2" Property="Background" Value="#191E36" />
  332. </Trigger>-->
  333. <!--<Trigger Property="IsEnabled" Value="false">
  334. <Setter Property="Foreground" Value="White" />
  335. </Trigger>-->
  336. <Trigger Property="IsMouseOver" Value="True">
  337. <Setter TargetName="border2" Property="Background" Value="#191E36" />
  338. </Trigger>
  339. <Trigger Property="IsMouseOver" Value="False">
  340. <Setter TargetName="border2" Property="Background" Value="Transparent" />
  341. </Trigger>
  342. </ControlTemplate.Triggers>
  343. </ControlTemplate>
  344. </Setter.Value>
  345. </Setter>
  346. </Style>
  347. <Style x:Key="ExpanderStyle" TargetType="{x:Type Expander}">
  348. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  349. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  350. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  351. <Setter Property="BorderBrush" Value="Transparent" />
  352. <Setter Property="BorderThickness" Value="1" />
  353. <Setter Property="Template">
  354. <Setter.Value>
  355. <ControlTemplate TargetType="{x:Type Expander}">
  356. <DockPanel>
  357. <ToggleButton
  358. x:Name="HeaderSite"
  359. Width="auto"
  360. Height="20"
  361. MinWidth="0"
  362. MinHeight="0"
  363. Margin="1"
  364. Padding="{TemplateBinding Padding}"
  365. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  366. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
  367. Background="Transparent"
  368. Content="{TemplateBinding Header}"
  369. ContentTemplate="{TemplateBinding HeaderTemplate}"
  370. ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
  371. DockPanel.Dock="Top"
  372. FontFamily="{TemplateBinding FontFamily}"
  373. FontSize="{TemplateBinding FontSize}"
  374. FontStretch="{TemplateBinding FontStretch}"
  375. FontStyle="{TemplateBinding FontStyle}"
  376. FontWeight="{TemplateBinding FontWeight}"
  377. Foreground="{TemplateBinding Foreground}"
  378. IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  379. Style="{StaticResource ToggleButtonStyle}" />
  380. <ContentPresenter
  381. x:Name="ExpandSite"
  382. Margin="{TemplateBinding Padding}"
  383. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  384. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  385. DockPanel.Dock="Left"
  386. Focusable="false"
  387. Visibility="Visible" />
  388. </DockPanel>
  389. <ControlTemplate.Triggers>
  390. <Trigger Property="IsExpanded" Value="True">
  391. <Setter TargetName="ExpandSite" Property="Visibility" Value="Collapsed" />
  392. </Trigger>
  393. </ControlTemplate.Triggers>
  394. </ControlTemplate>
  395. </Setter.Value>
  396. </Setter>
  397. </Style>
  398. <!--#endregion-->
  399. </UserControl.Resources>
  400. <Grid Margin="20">
  401. <Grid.ColumnDefinitions>
  402. <ColumnDefinition />
  403. </Grid.ColumnDefinitions>
  404. <Grid.RowDefinitions>
  405. <RowDefinition Height="40" />
  406. <RowDefinition Height="1*" />
  407. </Grid.RowDefinitions>
  408. <Button Content="筛选配方" Style="{StaticResource ButtonStyle}" Command="{Binding SelectRecipesCommand}" />
  409. <Grid
  410. Name="ggr"
  411. Grid.Row="1"
  412. Margin="10">
  413. <pry:ImageBorder Width="{Binding ElementName=ggr, Path=ActualWidth}" Height="{Binding ElementName=ggr, Path=ActualHeight}" />
  414. <ListBox
  415. Margin="5"
  416. VerticalAlignment="Top"
  417. Background="Transparent"
  418. BorderThickness="0"
  419. ItemsSource="{Binding SelectedRecipes}"
  420. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  421. <ListBox.ItemsPanel>
  422. <ItemsPanelTemplate>
  423. <UniformGrid
  424. HorizontalAlignment="Left"
  425. VerticalAlignment="Top"
  426. Columns="6" />
  427. </ItemsPanelTemplate>
  428. </ListBox.ItemsPanel>
  429. <ListBox.ItemTemplate>
  430. <DataTemplate>
  431. <Grid
  432. Name="tt"
  433. Height="220"
  434. Margin="5">
  435. <Grid.RowDefinitions>
  436. <RowDefinition Height="30" />
  437. <RowDefinition Height="25" />
  438. <RowDefinition Height="25" />
  439. <RowDefinition Height="25" />
  440. <RowDefinition Height="25" />
  441. <RowDefinition Height="58" />
  442. <RowDefinition Height="2" />
  443. <RowDefinition Height="40" />
  444. </Grid.RowDefinitions>
  445. <Grid.ColumnDefinitions>
  446. <ColumnDefinition />
  447. <ColumnDefinition />
  448. </Grid.ColumnDefinitions>
  449. <Image
  450. Grid.RowSpan="8"
  451. Grid.ColumnSpan="2"
  452. Source="/BPASmartClient.CustomResource;component/Image/配方背景/竖背景框.png"
  453. Stretch="Fill" />
  454. <TextBlock
  455. Grid.Row="0"
  456. Grid.ColumnSpan="2"
  457. Margin="5,0,0,0"
  458. HorizontalAlignment="Center"
  459. VerticalAlignment="Center"
  460. FontSize="14"
  461. Foreground="#FF2AB2E7"
  462. Text="配方信息" />
  463. <TextBlock
  464. Grid.Row="1"
  465. Grid.Column="0"
  466. Margin="2,5,0,0"
  467. HorizontalAlignment="Center"
  468. VerticalAlignment="Center"
  469. FontSize="12"
  470. Foreground="#FF2AB2E7"
  471. Text="配方名称:" />
  472. <TextBlock
  473. Grid.Row="1"
  474. Grid.Column="1"
  475. Margin="2,5,0,0"
  476. HorizontalAlignment="Center"
  477. VerticalAlignment="Center"
  478. FontSize="12"
  479. Foreground="#FF2AB2E7"
  480. Text="{Binding RecipeName}" />
  481. <TextBlock
  482. Grid.Row="2"
  483. Grid.Column="0"
  484. Margin="2,5,0,0"
  485. HorizontalAlignment="Center"
  486. VerticalAlignment="Center"
  487. FontSize="12"
  488. Foreground="#FF2AB2E7"
  489. Text="配方编号:" />
  490. <TextBlock
  491. Grid.Row="2"
  492. Grid.Column="1"
  493. Margin="2,5,0,0"
  494. HorizontalAlignment="Center"
  495. VerticalAlignment="Center"
  496. FontSize="12"
  497. Foreground="#FF2AB2E7"
  498. Text="{Binding RecipeCode}" />
  499. <TextBlock
  500. Grid.Row="3"
  501. Grid.Column="0"
  502. Margin="2,5,0,0"
  503. HorizontalAlignment="Center"
  504. VerticalAlignment="Center"
  505. FontSize="12"
  506. Foreground="#FF2AB2E7"
  507. Text="托盘编号:" />
  508. <TextBlock
  509. Grid.Row="3"
  510. Grid.Column="1"
  511. Margin="2,5,0,0"
  512. HorizontalAlignment="Center"
  513. VerticalAlignment="Center"
  514. FontSize="12"
  515. Foreground="#FF2AB2E7"
  516. Text="{Binding TrayCode}" />
  517. <TextBlock
  518. Grid.Row="4"
  519. Grid.Column="0"
  520. Margin="2,5,0,0"
  521. HorizontalAlignment="Center"
  522. VerticalAlignment="Center"
  523. FontSize="12"
  524. Foreground="#FF2AB2E7"
  525. Text="订单类型:" />
  526. <TextBlock
  527. Grid.Row="4"
  528. Grid.Column="1"
  529. Margin="2,5,0,0"
  530. HorizontalAlignment="Center"
  531. VerticalAlignment="Center"
  532. FontSize="12"
  533. Foreground="#FF2AB2E7"
  534. Text="{Binding OrderType}" />
  535. <!--<ScrollViewer
  536. Grid.Row="2"
  537. VerticalAlignment="Top"
  538. Background="Transparent"
  539. HorizontalScrollBarVisibility="Hidden"
  540. VerticalScrollBarVisibility="Hidden">
  541. <ItemsControl ItemsSource="{Binding RawMaterial}">
  542. <ItemsControl.ItemsPanel>
  543. <ItemsPanelTemplate>
  544. <StackPanel/>
  545. </ItemsPanelTemplate>
  546. </ItemsControl.ItemsPanel>
  547. <ItemsControl.ItemTemplate>
  548. <DataTemplate>
  549. <Expander Style="{StaticResource ExpanderStyle}" Margin="40,0,0,0">
  550. <Expander.Header>
  551. <StackPanel Orientation="Horizontal">
  552. <Border Width="15" Height="15" CornerRadius="15" HorizontalAlignment="Left" Margin="0,0,5,0">
  553. <Border.Background>
  554. <RadialGradientBrush>
  555. <GradientStop Color="#FF2AB2E7" Offset="0.5" />
  556. <GradientStop Color="White"/>
  557. </RadialGradientBrush>
  558. </Border.Background>
  559. </Border>
  560. <TextBlock Text="{Binding RawMaterialName }" Foreground="#FF2AB2E7" VerticalAlignment="Center" FontSize="14"/>
  561. </StackPanel>
  562. </Expander.Header>
  563. <Expander.Content>
  564. <StackPanel Margin="36,0,0,0">
  565. <StackPanel Orientation="Horizontal">
  566. <TextBlock Text="原料桶号:" Foreground="#FF2AB2E7"/>
  567. <TextBlock Text="{Binding RawMaterialBarrelNum}" Foreground="#FF2AB2E7"/>
  568. </StackPanel>
  569. <StackPanel Orientation="Horizontal">
  570. <TextBlock Text="原料重量:" Foreground="#FF2AB2E7"/>
  571. <TextBlock Text="{Binding RawMaterialWeight}" Foreground="#FF2AB2E7"/>
  572. </StackPanel>
  573. </StackPanel>
  574. </Expander.Content>
  575. </Expander>
  576. </DataTemplate>
  577. </ItemsControl.ItemTemplate>
  578. </ItemsControl>
  579. </ScrollViewer>-->
  580. <Image
  581. Grid.Row="6"
  582. Grid.ColumnSpan="2"
  583. Width="{Binding ElementName=tt, Path=ActualWidth}"
  584. Height="2"
  585. VerticalAlignment="Bottom"
  586. Source="/BPASmartClient.CustomResource;component/Image/直线.png"
  587. Stretch="Fill" />
  588. <Grid
  589. Name="gr"
  590. Grid.Row="7"
  591. Grid.ColumnSpan="2"
  592. Height="30"
  593. Margin="0,0,0,10"
  594. VerticalAlignment="Bottom"
  595. Background="Transparent">
  596. <!--<Grid.ColumnDefinitions>
  597. <ColumnDefinition />
  598. <ColumnDefinition />
  599. </Grid.ColumnDefinitions>-->
  600. <!--<Image
  601. Height="2"
  602. Grid.ColumnSpan="2"
  603. Width="{Binding ElementName=gr, Path=ActualWidth}"
  604. VerticalAlignment="Top"
  605. Source="/BPASmartClient.CustomResource;component/Image/直线.png" />-->
  606. <pry:IcoButton
  607. Width="{Binding ElementName=gr, Path=ActualWidth}"
  608. Height="{Binding ElementName=gr, Path=ActualHeight}"
  609. Margin="4,4,4,0"
  610. HorizontalAlignment="Center"
  611. VerticalAlignment="Center"
  612. Background="#222bd06f"
  613. BorderThickness="0"
  614. Command="{Binding DataContext.StartCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  615. CommandParameter="{Binding RecipeName}"
  616. Content="配方下发"
  617. EnterBackground="#332bd06f"
  618. FontStyle="Normal"
  619. Foreground="#ff2bd06f"
  620. IcoText="&#xe6cf;"
  621. IsEnabled="{Binding IsEnable}"
  622. Style="{StaticResource IcoButtonStyle}" />
  623. <!--<pry:IcoButton
  624. Width="{Binding ElementName=gr, Path=ActualWidth}"
  625. Height="{Binding ElementName=gr, Path=ActualHeight}"
  626. Margin="4,4,3,0"
  627. HorizontalAlignment="Center"
  628. VerticalAlignment="Center"
  629. Background="#11F53F62"
  630. BorderThickness="0"
  631. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  632. CommandParameter="{Binding RecipCode}"
  633. Content="删除"
  634. EnterBackground="#22F53F62"
  635. FontStyle="Normal"
  636. Foreground="#FFF53F62"
  637. IcoText="&#xe68e;"
  638. Style="{StaticResource IcoButtonStyle}" />
  639. <pry:IcoButton
  640. Grid.Column="1"
  641. Width="{Binding ElementName=gr, Path=ActualWidth}"
  642. Height="{Binding ElementName=gr, Path=ActualHeight}"
  643. Margin="3,4,4,0"
  644. HorizontalAlignment="Center"
  645. VerticalAlignment="Center"
  646. Background="#112AB2E7"
  647. BorderThickness="0"
  648. Command="{Binding DataContext.DetailsCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  649. CommandParameter="{Binding RecipCode}"
  650. Content="编辑"
  651. EnterBackground="#222AB2E7"
  652. Foreground="#FF2AB2E7"
  653. IcoText="&#xe636;"
  654. Style="{StaticResource IcoButtonStyle}" />-->
  655. </Grid>
  656. <!--</StackPanel>-->
  657. </Grid>
  658. <!--<Grid Name="tt" Margin="5">
  659. <Grid.RowDefinitions>
  660. <RowDefinition Height="auto" />
  661. <RowDefinition Height="auto" />
  662. <RowDefinition />
  663. <RowDefinition />
  664. </Grid.RowDefinitions>
  665. <Image
  666. Grid.RowSpan="4"
  667. Source="/BPASmartClient.CustomResource;component/Image/配方背景/竖背景框.png"
  668. Stretch="Fill" />
  669. <TextBlock
  670. Grid.Row="0"
  671. Margin="2,5,0,0"
  672. HorizontalAlignment="Center"
  673. VerticalAlignment="Top"
  674. FontSize="18"
  675. Foreground="#FF2AB2E7"
  676. Text="{Binding RecipeName}" />
  677. <TextBlock
  678. Grid.Row="1"
  679. Margin="5,0,0,5"
  680. Foreground="#ffc000"
  681. Text="配方信息:" />
  682. <ScrollViewer
  683. Grid.Row="2"
  684. HorizontalScrollBarVisibility="Hidden"
  685. VerticalScrollBarVisibility="Hidden">
  686. <Grid>
  687. <Grid.ColumnDefinitions>
  688. <ColumnDefinition Width="auto" />
  689. <ColumnDefinition />
  690. </Grid.ColumnDefinitions>
  691. <ItemsControl ItemsSource="{Binding RawMaterials}">
  692. <ItemsControl.ItemTemplate>
  693. <DataTemplate>
  694. <Grid>
  695. <TextBlock
  696. Grid.Row="1"
  697. Margin="5,0,0,0"
  698. HorizontalAlignment="Right"
  699. VerticalAlignment="Center"
  700. Foreground="#aaffc000"
  701. Text="{Binding RawMaterialName}" />
  702. </Grid>
  703. </DataTemplate>
  704. </ItemsControl.ItemTemplate>
  705. </ItemsControl>
  706. <ItemsControl Grid.Column="1" ItemsSource="{Binding RawMaterials}">
  707. <ItemsControl.ItemTemplate>
  708. <DataTemplate>
  709. <StackPanel Orientation="Horizontal">
  710. <TextBlock
  711. Margin="5,0,0,0"
  712. HorizontalAlignment="Center"
  713. VerticalAlignment="Center"
  714. Foreground="#aaffc000"
  715. Text=":" />
  716. <TextBlock
  717. Margin="5,0,0,0"
  718. HorizontalAlignment="Center"
  719. VerticalAlignment="Center"
  720. Foreground="#aaffc000"
  721. Text="{Binding RawMaterialWeight}" />
  722. <TextBlock
  723. Margin="5,0,0,0"
  724. HorizontalAlignment="Center"
  725. VerticalAlignment="Center"
  726. Foreground="#aaffc000"
  727. Text="g" />
  728. </StackPanel>
  729. </DataTemplate>
  730. </ItemsControl.ItemTemplate>
  731. </ItemsControl>
  732. </Grid>
  733. </ScrollViewer>
  734. <Grid
  735. Name="grb"
  736. Grid.Row="3"
  737. Height="30"
  738. Margin="0,0,0,10"
  739. VerticalAlignment="Bottom"
  740. Background="Transparent">
  741. <Image
  742. Width="{Binding ElementName=grb, Path=ActualWidth}"
  743. VerticalAlignment="Top"
  744. StretchDirection="Both"
  745. Source="/BPASmartClient.CustomResource;component/Image/直线.png" />
  746. <pry:IcoButton
  747. Width="{Binding ElementName=grb, Path=ActualWidth}"
  748. Height="{Binding ElementName=grb, Path=ActualHeight}"
  749. Margin="4,4,4,0"
  750. HorizontalAlignment="Center"
  751. VerticalAlignment="Center"
  752. Background="#222bd06f"
  753. BorderThickness="0"
  754. Command="{Binding DataContext.StartCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  755. CommandParameter="{Binding RecipeName}"
  756. Content="配方下发"
  757. EnterBackground="#332bd06f"
  758. FontStyle="Normal"
  759. Foreground="#ff2bd06f"
  760. IcoText="&#xe6cf;"
  761. IsEnabled="{Binding IsEnable}"
  762. Style="{StaticResource IcoButtonStyle}" />
  763. </Grid>
  764. </Grid>-->
  765. </DataTemplate>
  766. </ListBox.ItemTemplate>
  767. </ListBox>
  768. </Grid>
  769. <!--<Grid
  770. Name="gr"
  771. Grid.Column="1"
  772. Margin="10">
  773. <Grid.RowDefinitions>
  774. <RowDefinition Height="50" />
  775. <RowDefinition />
  776. </Grid.RowDefinitions>
  777. <pry:ImageBorder
  778. Grid.RowSpan="2"
  779. Width="{Binding ElementName=gr, Path=ActualWidth}"
  780. Height="{Binding ElementName=gr, Path=ActualHeight}" />
  781. <Grid Margin="5">
  782. <Grid.ColumnDefinitions>
  783. <ColumnDefinition />
  784. <ColumnDefinition />
  785. <ColumnDefinition />
  786. </Grid.ColumnDefinitions>
  787. <RadioButton
  788. Click="RadioButtonWait_Click"
  789. Command="{Binding ChangeRecipeStateCommand}"
  790. Content="等待中"
  791. GroupName="state"
  792. IsChecked="True"
  793. Style="{DynamicResource RadioState}" />
  794. <RadioButton
  795. Grid.Column="1"
  796. Click="RadioButtonMaking_Click"
  797. Content="执行中"
  798. GroupName="state"
  799. Style="{DynamicResource RadioState}" />
  800. <RadioButton
  801. Grid.Column="2"
  802. Click="RadioButtonCompelete_Click"
  803. Content="已完成"
  804. GroupName="state"
  805. Style="{DynamicResource RadioState}" />
  806. </Grid>
  807. <ScrollViewer
  808. Grid.Row="1"
  809. HorizontalScrollBarVisibility="Hidden"
  810. VerticalScrollBarVisibility="Hidden">
  811. <Border>
  812. <Grid Grid.Row="1">
  813. <Grid x:Name="repiceListMaking" Margin="5">
  814. <Grid.RowDefinitions>
  815. <RowDefinition Height="30" />
  816. <RowDefinition />
  817. </Grid.RowDefinitions>
  818. <TextBlock
  819. Margin="10,0"
  820. HorizontalAlignment="Left"
  821. VerticalAlignment="Center"
  822. FontSize="18"
  823. Foreground="#FF2AB2E7"
  824. Text="{Binding CurrentRecipeName}" />
  825. <ItemsControl
  826. Grid.Row="1"
  827. Margin="50,0"
  828. ItemsSource="{Binding recipeProcesses}">
  829. <ItemsControl.ItemTemplate>
  830. <DataTemplate>
  831. <Grid Margin="5">
  832. <Grid.ColumnDefinitions>
  833. <ColumnDefinition />
  834. <ColumnDefinition Width="16" />
  835. <ColumnDefinition />
  836. </Grid.ColumnDefinitions>
  837. <TextBlock
  838. Margin="10,0,5,0"
  839. HorizontalAlignment="Left"
  840. VerticalAlignment="Center"
  841. FontSize="15"
  842. Foreground="#AA2AB2E7"
  843. Text="{Binding RawMaterialName}"
  844. ToolTip="{Binding RawMaterialSource, Converter={StaticResource IntToSourceConvert}}" />
  845. <TextBlock
  846. Grid.Column="1"
  847. Margin="0,0,5,0"
  848. HorizontalAlignment="Left"
  849. VerticalAlignment="Center"
  850. FontSize="15"
  851. Foreground="#AA2AB2E7"
  852. Text=":" />
  853. <Button
  854. Grid.Column="2"
  855. HorizontalAlignment="Center"
  856. VerticalAlignment="Center"
  857. Command="{Binding DataContext.ChangeRecipeStateCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  858. CommandParameter="{Binding RawMaterialId}"
  859. Content="{Binding RecipeStatus, Converter={StaticResource RunStatusConvert}}"
  860. IsEnabled="{Binding RawMaterialSource, Converter={StaticResource EnbleConvert}}"
  861. Style="{StaticResource materialMakingButton}" />
  862. </Grid>
  863. </DataTemplate>
  864. </ItemsControl.ItemTemplate>
  865. </ItemsControl>
  866. </Grid>
  867. -->
  868. <!--<TreeView x:Name="repiceListMaking" ItemsSource="{Binding RecipeProcesse}"
  869. ScrollViewer.VerticalScrollBarVisibility="Disabled" HorizontalAlignment="Stretch" Background="Wheat" ItemContainerStyle="{StaticResource recipeTreeItem}">
  870. </TreeView>-->
  871. <!-- 等待和已完成 -->
  872. <!--
  873. <TreeView
  874. x:Name="repiceList"
  875. HorizontalAlignment="Stretch"
  876. Background="Transparent"
  877. BorderThickness="0"
  878. ItemContainerStyle="{StaticResource recipeTreeItem}"
  879. ItemsSource="{Binding UserTreeWait}"
  880. ScrollViewer.VerticalScrollBarVisibility="Visible" />
  881. </Grid>
  882. </Border>
  883. </ScrollViewer>
  884. </Grid>-->
  885. </Grid>
  886. </UserControl>