终端一体化运控平台
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

950 wiersze
51 KiB

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