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

RecipeSendDownView.xaml 51 KiB

2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
1 年之前
2 年之前
1 年之前
1 年之前
2 年之前
2 年之前
2 年之前
1 年之前
1 年之前
2 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
1 年之前
2 年之前
2 年之前
2 年之前
2 年之前
2 年之前
1 年之前
2 年之前
2 年之前
1 年之前
2 年之前
1 年之前
2 年之前
1 年之前
2 年之前
2 年之前
2 年之前
1 年之前
2 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965
  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
  409. Command="{Binding SelectRecipesCommand}"
  410. Content="筛选配方"
  411. Style="{StaticResource ButtonStyle}" />
  412. <Grid
  413. Name="ggr"
  414. Grid.Row="1"
  415. Margin="10">
  416. <pry:ImageBorder Width="{Binding ElementName=ggr, Path=ActualWidth}" Height="{Binding ElementName=ggr, Path=ActualHeight}" />
  417. <ListBox
  418. Margin="5"
  419. VerticalAlignment="Top"
  420. Background="Transparent"
  421. BorderThickness="0"
  422. ItemsSource="{Binding SelectedRecipes}"
  423. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  424. <ListBox.ItemsPanel>
  425. <ItemsPanelTemplate>
  426. <UniformGrid
  427. HorizontalAlignment="Left"
  428. VerticalAlignment="Top"
  429. Columns="6" />
  430. </ItemsPanelTemplate>
  431. </ListBox.ItemsPanel>
  432. <ListBox.ItemTemplate>
  433. <DataTemplate>
  434. <Grid
  435. Name="tt"
  436. Height="220"
  437. Margin="5">
  438. <Grid.RowDefinitions>
  439. <RowDefinition Height="30" />
  440. <RowDefinition Height="25" />
  441. <RowDefinition Height="25" />
  442. <RowDefinition Height="25" />
  443. <RowDefinition Height="25" />
  444. <RowDefinition Height="58" />
  445. <RowDefinition Height="2" />
  446. <RowDefinition Height="40" />
  447. </Grid.RowDefinitions>
  448. <Grid.ColumnDefinitions>
  449. <ColumnDefinition />
  450. <ColumnDefinition />
  451. </Grid.ColumnDefinitions>
  452. <Image
  453. Grid.RowSpan="8"
  454. Grid.ColumnSpan="2"
  455. Source="/BPASmartClient.CustomResource;component/Image/配方背景/竖背景框.png"
  456. Stretch="Fill" />
  457. <TextBlock
  458. Grid.Row="0"
  459. Grid.ColumnSpan="2"
  460. Margin="5,0,0,0"
  461. HorizontalAlignment="Center"
  462. VerticalAlignment="Center"
  463. FontSize="14"
  464. Foreground="#FF2AB2E7"
  465. Text="配方信息" />
  466. <TextBlock
  467. Grid.Row="1"
  468. Grid.Column="0"
  469. Margin="2,5,0,0"
  470. HorizontalAlignment="Center"
  471. VerticalAlignment="Center"
  472. FontSize="12"
  473. Foreground="#FF2AB2E7"
  474. Text="配方名称:" />
  475. <TextBlock
  476. Grid.Row="1"
  477. Grid.Column="1"
  478. Margin="2,5,0,0"
  479. HorizontalAlignment="Center"
  480. VerticalAlignment="Center"
  481. FontSize="12"
  482. Foreground="#FF2AB2E7"
  483. Text="{Binding RecipeName}" />
  484. <TextBlock
  485. Grid.Row="2"
  486. Grid.Column="0"
  487. Margin="2,5,0,0"
  488. HorizontalAlignment="Center"
  489. VerticalAlignment="Center"
  490. FontSize="12"
  491. Foreground="#FF2AB2E7"
  492. Text="配方编号:" />
  493. <TextBlock
  494. Grid.Row="2"
  495. Grid.Column="1"
  496. Margin="2,5,0,0"
  497. HorizontalAlignment="Center"
  498. VerticalAlignment="Center"
  499. FontSize="12"
  500. Foreground="#FF2AB2E7"
  501. Text="{Binding RecipeCode}" />
  502. <TextBlock
  503. Grid.Row="3"
  504. Grid.Column="0"
  505. Margin="2,5,0,0"
  506. HorizontalAlignment="Center"
  507. VerticalAlignment="Center"
  508. FontSize="12"
  509. Foreground="#FF2AB2E7"
  510. Text="托盘编号:" />
  511. <TextBlock
  512. Grid.Row="3"
  513. Grid.Column="1"
  514. Margin="2,5,0,0"
  515. HorizontalAlignment="Center"
  516. VerticalAlignment="Center"
  517. FontSize="12"
  518. Foreground="#FF2AB2E7"
  519. Text="{Binding TrayCode}" />
  520. <TextBlock
  521. Grid.Row="4"
  522. Grid.Column="0"
  523. Margin="2,5,0,0"
  524. HorizontalAlignment="Center"
  525. VerticalAlignment="Center"
  526. FontSize="12"
  527. Foreground="#FF2AB2E7"
  528. Text="订单类型:" />
  529. <TextBlock
  530. Grid.Row="4"
  531. Grid.Column="1"
  532. Margin="2,5,0,0"
  533. HorizontalAlignment="Center"
  534. VerticalAlignment="Center"
  535. FontSize="12"
  536. Foreground="#FF2AB2E7"
  537. Text="{Binding OrderType}" />
  538. <!--<ScrollViewer
  539. Grid.Row="2"
  540. VerticalAlignment="Top"
  541. Background="Transparent"
  542. HorizontalScrollBarVisibility="Hidden"
  543. VerticalScrollBarVisibility="Hidden">
  544. <ItemsControl ItemsSource="{Binding RawMaterial}">
  545. <ItemsControl.ItemsPanel>
  546. <ItemsPanelTemplate>
  547. <StackPanel/>
  548. </ItemsPanelTemplate>
  549. </ItemsControl.ItemsPanel>
  550. <ItemsControl.ItemTemplate>
  551. <DataTemplate>
  552. <Expander Style="{StaticResource ExpanderStyle}" Margin="40,0,0,0">
  553. <Expander.Header>
  554. <StackPanel Orientation="Horizontal">
  555. <Border Width="15" Height="15" CornerRadius="15" HorizontalAlignment="Left" Margin="0,0,5,0">
  556. <Border.Background>
  557. <RadialGradientBrush>
  558. <GradientStop Color="#FF2AB2E7" Offset="0.5" />
  559. <GradientStop Color="White"/>
  560. </RadialGradientBrush>
  561. </Border.Background>
  562. </Border>
  563. <TextBlock Text="{Binding RawMaterialName }" Foreground="#FF2AB2E7" VerticalAlignment="Center" FontSize="14"/>
  564. </StackPanel>
  565. </Expander.Header>
  566. <Expander.Content>
  567. <StackPanel Margin="36,0,0,0">
  568. <StackPanel Orientation="Horizontal">
  569. <TextBlock Text="原料桶号:" Foreground="#FF2AB2E7"/>
  570. <TextBlock Text="{Binding RawMaterialBarrelNum}" Foreground="#FF2AB2E7"/>
  571. </StackPanel>
  572. <StackPanel Orientation="Horizontal">
  573. <TextBlock Text="原料重量:" Foreground="#FF2AB2E7"/>
  574. <TextBlock Text="{Binding RawMaterialWeight}" Foreground="#FF2AB2E7"/>
  575. </StackPanel>
  576. </StackPanel>
  577. </Expander.Content>
  578. </Expander>
  579. </DataTemplate>
  580. </ItemsControl.ItemTemplate>
  581. </ItemsControl>
  582. </ScrollViewer>-->
  583. <Image
  584. Grid.Row="6"
  585. Grid.ColumnSpan="2"
  586. Width="{Binding ElementName=tt, Path=ActualWidth}"
  587. Height="2"
  588. VerticalAlignment="Bottom"
  589. Source="/BPASmartClient.CustomResource;component/Image/直线.png"
  590. Stretch="Fill" />
  591. <Grid
  592. Name="gr"
  593. Grid.Row="7"
  594. Grid.ColumnSpan="2"
  595. Height="30"
  596. Margin="0,0,0,10"
  597. VerticalAlignment="Bottom"
  598. Background="Transparent">
  599. <!--<Grid.ColumnDefinitions>
  600. <ColumnDefinition />
  601. <ColumnDefinition />
  602. </Grid.ColumnDefinitions>-->
  603. <!--<Image
  604. Height="2"
  605. Grid.ColumnSpan="2"
  606. Width="{Binding ElementName=gr, Path=ActualWidth}"
  607. VerticalAlignment="Top"
  608. Source="/BPASmartClient.CustomResource;component/Image/直线.png" />-->
  609. <pry:IcoButton
  610. Width="{Binding ElementName=gr, Path=ActualWidth}"
  611. Height="{Binding ElementName=gr, Path=ActualHeight}"
  612. Margin="4,4,4,0"
  613. HorizontalAlignment="Center"
  614. VerticalAlignment="Center"
  615. Background="#222bd06f"
  616. BorderThickness="0"
  617. Command="{Binding DataContext.StartCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  618. CommandParameter="{Binding RecipeName}"
  619. Content="配方下发"
  620. EnterBackground="#332bd06f"
  621. FontStyle="Normal"
  622. Foreground="#ff2bd06f"
  623. IcoText="&#xe6cf;"
  624. IsEnabled="{Binding IsEnable}"
  625. Style="{StaticResource IcoButtonStyle}" />
  626. <!--<pry:IcoButton
  627. Width="{Binding ElementName=gr, Path=ActualWidth}"
  628. Height="{Binding ElementName=gr, Path=ActualHeight}"
  629. Margin="4,4,3,0"
  630. HorizontalAlignment="Center"
  631. VerticalAlignment="Center"
  632. Background="#11F53F62"
  633. BorderThickness="0"
  634. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  635. CommandParameter="{Binding RecipCode}"
  636. Content="删除"
  637. EnterBackground="#22F53F62"
  638. FontStyle="Normal"
  639. Foreground="#FFF53F62"
  640. IcoText="&#xe68e;"
  641. Style="{StaticResource IcoButtonStyle}" />
  642. <pry:IcoButton
  643. Grid.Column="1"
  644. Width="{Binding ElementName=gr, Path=ActualWidth}"
  645. Height="{Binding ElementName=gr, Path=ActualHeight}"
  646. Margin="3,4,4,0"
  647. HorizontalAlignment="Center"
  648. VerticalAlignment="Center"
  649. Background="#112AB2E7"
  650. BorderThickness="0"
  651. Command="{Binding DataContext.DetailsCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  652. CommandParameter="{Binding RecipCode}"
  653. Content="编辑"
  654. EnterBackground="#222AB2E7"
  655. Foreground="#FF2AB2E7"
  656. IcoText="&#xe636;"
  657. Style="{StaticResource IcoButtonStyle}" />-->
  658. </Grid>
  659. <!--</StackPanel>-->
  660. </Grid>
  661. <!--<Grid Name="tt" Margin="5">
  662. <Grid.RowDefinitions>
  663. <RowDefinition Height="auto" />
  664. <RowDefinition Height="auto" />
  665. <RowDefinition />
  666. <RowDefinition />
  667. </Grid.RowDefinitions>
  668. <Image
  669. Grid.RowSpan="4"
  670. Source="/BPASmartClient.CustomResource;component/Image/配方背景/竖背景框.png"
  671. Stretch="Fill" />
  672. <TextBlock
  673. Grid.Row="0"
  674. Margin="2,5,0,0"
  675. HorizontalAlignment="Center"
  676. VerticalAlignment="Top"
  677. FontSize="18"
  678. Foreground="#FF2AB2E7"
  679. Text="{Binding RecipeName}" />
  680. <TextBlock
  681. Grid.Row="1"
  682. Margin="5,0,0,5"
  683. Foreground="#ffc000"
  684. Text="配方信息:" />
  685. <ScrollViewer
  686. Grid.Row="2"
  687. HorizontalScrollBarVisibility="Hidden"
  688. VerticalScrollBarVisibility="Hidden">
  689. <Grid>
  690. <Grid.ColumnDefinitions>
  691. <ColumnDefinition Width="auto" />
  692. <ColumnDefinition />
  693. </Grid.ColumnDefinitions>
  694. <ItemsControl ItemsSource="{Binding RawMaterials}">
  695. <ItemsControl.ItemTemplate>
  696. <DataTemplate>
  697. <Grid>
  698. <TextBlock
  699. Grid.Row="1"
  700. Margin="5,0,0,0"
  701. HorizontalAlignment="Right"
  702. VerticalAlignment="Center"
  703. Foreground="#aaffc000"
  704. Text="{Binding RawMaterialName}" />
  705. </Grid>
  706. </DataTemplate>
  707. </ItemsControl.ItemTemplate>
  708. </ItemsControl>
  709. <ItemsControl Grid.Column="1" ItemsSource="{Binding RawMaterials}">
  710. <ItemsControl.ItemTemplate>
  711. <DataTemplate>
  712. <StackPanel Orientation="Horizontal">
  713. <TextBlock
  714. Margin="5,0,0,0"
  715. HorizontalAlignment="Center"
  716. VerticalAlignment="Center"
  717. Foreground="#aaffc000"
  718. Text=":" />
  719. <TextBlock
  720. Margin="5,0,0,0"
  721. HorizontalAlignment="Center"
  722. VerticalAlignment="Center"
  723. Foreground="#aaffc000"
  724. Text="{Binding RawMaterialWeight}" />
  725. <TextBlock
  726. Margin="5,0,0,0"
  727. HorizontalAlignment="Center"
  728. VerticalAlignment="Center"
  729. Foreground="#aaffc000"
  730. Text="g" />
  731. </StackPanel>
  732. </DataTemplate>
  733. </ItemsControl.ItemTemplate>
  734. </ItemsControl>
  735. </Grid>
  736. </ScrollViewer>
  737. <Grid
  738. Name="grb"
  739. Grid.Row="3"
  740. Height="30"
  741. Margin="0,0,0,10"
  742. VerticalAlignment="Bottom"
  743. Background="Transparent">
  744. <Image
  745. Width="{Binding ElementName=grb, Path=ActualWidth}"
  746. VerticalAlignment="Top"
  747. StretchDirection="Both"
  748. Source="/BPASmartClient.CustomResource;component/Image/直线.png" />
  749. <pry:IcoButton
  750. Width="{Binding ElementName=grb, Path=ActualWidth}"
  751. Height="{Binding ElementName=grb, Path=ActualHeight}"
  752. Margin="4,4,4,0"
  753. HorizontalAlignment="Center"
  754. VerticalAlignment="Center"
  755. Background="#222bd06f"
  756. BorderThickness="0"
  757. Command="{Binding DataContext.StartCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  758. CommandParameter="{Binding RecipeName}"
  759. Content="配方下发"
  760. EnterBackground="#332bd06f"
  761. FontStyle="Normal"
  762. Foreground="#ff2bd06f"
  763. IcoText="&#xe6cf;"
  764. IsEnabled="{Binding IsEnable}"
  765. Style="{StaticResource IcoButtonStyle}" />
  766. </Grid>
  767. </Grid>-->
  768. </DataTemplate>
  769. </ListBox.ItemTemplate>
  770. </ListBox>
  771. </Grid>
  772. <!--<Grid
  773. Name="gr"
  774. Grid.Column="1"
  775. Margin="10">
  776. <Grid.RowDefinitions>
  777. <RowDefinition Height="50" />
  778. <RowDefinition />
  779. </Grid.RowDefinitions>
  780. <pry:ImageBorder
  781. Grid.RowSpan="2"
  782. Width="{Binding ElementName=gr, Path=ActualWidth}"
  783. Height="{Binding ElementName=gr, Path=ActualHeight}" />
  784. <Grid Margin="5">
  785. <Grid.ColumnDefinitions>
  786. <ColumnDefinition />
  787. <ColumnDefinition />
  788. <ColumnDefinition />
  789. </Grid.ColumnDefinitions>
  790. <RadioButton
  791. Click="RadioButtonWait_Click"
  792. Command="{Binding ChangeRecipeStateCommand}"
  793. Content="等待中"
  794. GroupName="state"
  795. IsChecked="True"
  796. Style="{DynamicResource RadioState}" />
  797. <RadioButton
  798. Grid.Column="1"
  799. Click="RadioButtonMaking_Click"
  800. Content="执行中"
  801. GroupName="state"
  802. Style="{DynamicResource RadioState}" />
  803. <RadioButton
  804. Grid.Column="2"
  805. Click="RadioButtonCompelete_Click"
  806. Content="已完成"
  807. GroupName="state"
  808. Style="{DynamicResource RadioState}" />
  809. </Grid>
  810. <ScrollViewer
  811. Grid.Row="1"
  812. HorizontalScrollBarVisibility="Hidden"
  813. VerticalScrollBarVisibility="Hidden">
  814. <Border>
  815. <Grid Grid.Row="1">
  816. <Grid x:Name="repiceListMaking" Margin="5">
  817. <Grid.RowDefinitions>
  818. <RowDefinition Height="30" />
  819. <RowDefinition />
  820. </Grid.RowDefinitions>
  821. <TextBlock
  822. Margin="10,0"
  823. HorizontalAlignment="Left"
  824. VerticalAlignment="Center"
  825. FontSize="18"
  826. Foreground="#FF2AB2E7"
  827. Text="{Binding CurrentRecipeName}" />
  828. <ItemsControl
  829. Grid.Row="1"
  830. Margin="50,0"
  831. ItemsSource="{Binding recipeProcesses}">
  832. <ItemsControl.ItemTemplate>
  833. <DataTemplate>
  834. <Grid Margin="5">
  835. <Grid.ColumnDefinitions>
  836. <ColumnDefinition />
  837. <ColumnDefinition Width="16" />
  838. <ColumnDefinition />
  839. </Grid.ColumnDefinitions>
  840. <TextBlock
  841. Margin="10,0,5,0"
  842. HorizontalAlignment="Left"
  843. VerticalAlignment="Center"
  844. FontSize="15"
  845. Foreground="#AA2AB2E7"
  846. Text="{Binding RawMaterialName}"
  847. ToolTip="{Binding RawMaterialSource, Converter={StaticResource IntToSourceConvert}}" />
  848. <TextBlock
  849. Grid.Column="1"
  850. Margin="0,0,5,0"
  851. HorizontalAlignment="Left"
  852. VerticalAlignment="Center"
  853. FontSize="15"
  854. Foreground="#AA2AB2E7"
  855. Text=":" />
  856. <Button
  857. Grid.Column="2"
  858. HorizontalAlignment="Center"
  859. VerticalAlignment="Center"
  860. Command="{Binding DataContext.ChangeRecipeStateCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  861. CommandParameter="{Binding RawMaterialId}"
  862. Content="{Binding RecipeStatus, Converter={StaticResource RunStatusConvert}}"
  863. IsEnabled="{Binding RawMaterialSource, Converter={StaticResource EnbleConvert}}"
  864. Style="{StaticResource materialMakingButton}" />
  865. </Grid>
  866. </DataTemplate>
  867. </ItemsControl.ItemTemplate>
  868. </ItemsControl>
  869. </Grid>
  870. -->
  871. <!--<TreeView x:Name="repiceListMaking" ItemsSource="{Binding RecipeProcesse}"
  872. ScrollViewer.VerticalScrollBarVisibility="Disabled" HorizontalAlignment="Stretch" Background="Wheat" ItemContainerStyle="{StaticResource recipeTreeItem}">
  873. </TreeView>-->
  874. <!-- 等待和已完成 -->
  875. <!--
  876. <TreeView
  877. x:Name="repiceList"
  878. HorizontalAlignment="Stretch"
  879. Background="Transparent"
  880. BorderThickness="0"
  881. ItemContainerStyle="{StaticResource recipeTreeItem}"
  882. ItemsSource="{Binding UserTreeWait}"
  883. ScrollViewer.VerticalScrollBarVisibility="Visible" />
  884. </Grid>
  885. </Border>
  886. </ScrollViewer>
  887. </Grid>-->
  888. </Grid>
  889. </UserControl>