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

584 lines
33 KiB

  1. <Window
  2. x:Class="BPASmartClient.JXJFoodBigStation.View.RecipeInfosView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:BPASmartClient.JXJFoodBigStation.View"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:vm="clr-namespace:BPASmartClient.JXJFoodBigStation.ViewModel"
  9. Title="RecipeInfosView"
  10. Width="1000"
  11. Height="620"
  12. AllowsTransparency="True"
  13. Background="{x:Null}"
  14. Topmost="True"
  15. WindowStartupLocation="CenterScreen"
  16. WindowStyle="None"
  17. mc:Ignorable="d">
  18. <Window.DataContext>
  19. <vm:RecipeInfosViewModel />
  20. </Window.DataContext>
  21. <Window.Resources>
  22. <ResourceDictionary>
  23. <ResourceDictionary.MergedDictionaries>
  24. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
  25. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
  26. <ResourceDictionary>
  27. <!--#region ListBox样式-->
  28. <!--<Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
  29. <Setter Property="OverridesDefaultStyle" Value="True" />
  30. <Setter Property="SnapsToDevicePixels" Value="True" />
  31. <Setter Property="BorderBrush" Value="{x:Null}" />
  32. <Setter Property="Foreground" Value="White" />
  33. <Setter Property="FontSize" Value="20" />
  34. <Setter Property="HorizontalContentAlignment" Value="Center" />
  35. <Setter Property="VerticalContentAlignment" Value="Center" />
  36. <Setter Property="Template">
  37. <Setter.Value>
  38. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  39. <Border x:Name="border" CornerRadius="8">
  40. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
  41. </Border>
  42. </ControlTemplate>
  43. </Setter.Value>
  44. </Setter>
  45. </Style>-->
  46. <!--#endregion-->
  47. </ResourceDictionary>
  48. </ResourceDictionary.MergedDictionaries>
  49. </ResourceDictionary>
  50. </Window.Resources>
  51. <!--<Border Name="br" BorderThickness="1" >
  52. <Border.Background>
  53. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/bg.png" />
  54. </Border.Background>
  55. <Grid>
  56. <Grid.RowDefinitions>
  57. <RowDefinition />
  58. </Grid.RowDefinitions>
  59. <Grid Grid.Row="1">
  60. <Grid.RowDefinitions>
  61. <RowDefinition Height="30" />
  62. <RowDefinition Height="30" />
  63. <RowDefinition Height="30" />
  64. <RowDefinition />
  65. <RowDefinition Height="40" />
  66. </Grid.RowDefinitions>
  67. <WrapPanel>
  68. <TextBlock Margin="10,0,0,0" Background="Transparent" FontSize="20" Foreground="#FF2AB2E7" Text="配方名称:" />
  69. <TextBlock Margin="10,0,0,0" Background="Transparent" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding RecipeName}" />
  70. </WrapPanel>
  71. <WrapPanel Grid.Row="1">
  72. <TextBlock Margin="10,0,0,0" Background="Transparent" FontSize="20" Foreground="#FF2AB2E7" Text="配方编号:" />
  73. <TextBlock Grid.Row="1" Margin="10,0,0,0" Background="Transparent" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding RecipeCode}" />
  74. </WrapPanel>
  75. <WrapPanel Grid.Row="2">
  76. <TextBlock Margin="10,0,0,0" Background="Transparent" FontSize="20" Foreground="#FF2AB2E7" Text="托盘编号:" />
  77. <TextBlock Grid.Row="1" Margin="10,0,0,0" Background="Transparent" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding TrayCode}" />
  78. </WrapPanel>
  79. <Grid Grid.Row="3">
  80. <Grid.RowDefinitions>
  81. <RowDefinition></RowDefinition>
  82. </Grid.RowDefinitions>
  83. <Grid.ColumnDefinitions>
  84. <ColumnDefinition Width="2*"/>
  85. <ColumnDefinition Width="9*"/>
  86. </Grid.ColumnDefinitions>
  87. <TextBlock Grid.Row="0" HorizontalAlignment="Center">大料站</TextBlock>
  88. <Grid Grid.Column="1">
  89. <Grid.RowDefinitions>
  90. <RowDefinition Height="20"></RowDefinition>
  91. <RowDefinition Height="9*"></RowDefinition>
  92. </Grid.RowDefinitions>
  93. <Grid Grid.Row="0" >
  94. <Grid.ColumnDefinitions>
  95. <ColumnDefinition Width="2*"/>
  96. <ColumnDefinition Width="2*"/>
  97. <ColumnDefinition Width="2*"/>
  98. </Grid.ColumnDefinitions>
  99. <TextBlock FontSize="16" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Top">原料桶号</TextBlock>
  100. <TextBlock FontSize="16" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Top">原料位置</TextBlock>
  101. <TextBlock FontSize="16" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Top">原料重量</TextBlock>
  102. </Grid>
  103. <ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Auto" >
  104. <ItemsControl ItemsSource="{Binding RawMaterialsInfo}" >
  105. <ItemsControl.ItemTemplate>
  106. <DataTemplate>
  107. <Grid x:Name="grb" Height="25" >
  108. <Grid.ColumnDefinitions>
  109. <ColumnDefinition Width="2*"/>
  110. <ColumnDefinition Width="2*"/>
  111. <ColumnDefinition Width="2*"/>
  112. </Grid.ColumnDefinitions>
  113. <TextBlock Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding RawMaterialBarrelNum}"></TextBlock>
  114. <TextBlock Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding RawMaterialLocation}"></TextBlock>
  115. <TextBlock Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding RawMaterialWeight}"></TextBlock>
  116. </Grid>
  117. <DataTemplate.Triggers>
  118. <Trigger Property="IsMouseOver" Value="true">
  119. <Setter TargetName="grb" Property="Background" Value="#112AB2E7" />
  120. </Trigger>
  121. </DataTemplate.Triggers>
  122. </DataTemplate>
  123. </ItemsControl.ItemTemplate>
  124. </ItemsControl>
  125. </ScrollViewer>
  126. </Grid>
  127. </Grid>
  128. <Grid Grid.Row="4">
  129. <Button Command="{Binding ReturnPage}" Width="200" >返回</Button>
  130. </Grid>
  131. </Grid>
  132. </Grid>
  133. </Border>-->
  134. <!--<Border Name="br">
  135. <Border.Background>
  136. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/bg.png" />
  137. </Border.Background>
  138. <Grid >
  139. <Grid.RowDefinitions>
  140. <RowDefinition Height="50"></RowDefinition>
  141. <RowDefinition Height="88"></RowDefinition>
  142. <RowDefinition Height="40"></RowDefinition>
  143. <RowDefinition></RowDefinition>
  144. </Grid.RowDefinitions>
  145. <TextBlock Text="大料站配方信息" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FF2AB2E7" FontSize="22" Margin="0,10"></TextBlock>
  146. <UniformGrid Grid.Row="1" Columns="2" Margin="0,0,0,8">
  147. <StackPanel Orientation="Vertical" Margin="0,0,-13,0">
  148. <StackPanel Orientation="Horizontal" Margin="0,8">
  149. <TextBlock Text="请输入配方名称:" Foreground="#FF2AB2E7" FontSize="16" Margin="5,0,5,0" VerticalAlignment="Center"></TextBlock>
  150. <TextBox Text="{Binding RecipeName}" Width="150" Height="30" BorderThickness="1" Background="Transparent" Foreground="Orange"
  151. VerticalContentAlignment="Center"
  152. BorderBrush="#FF2AB2E7" VerticalAlignment="Center" FontSize="16" ></TextBox>
  153. </StackPanel>
  154. <StackPanel Orientation="Horizontal">
  155. <TextBlock Text="请输入托盘编号:" Foreground="#FF2AB2E7" FontSize="16" Margin="5,0,5,0" VerticalAlignment="Center"></TextBlock>
  156. <TextBox Text="{Binding TrayCode}" InputMethod.IsInputMethodEnabled="False" Width="150" Height="30" BorderThickness="1" Background="Transparent" Foreground="Orange"
  157. VerticalContentAlignment="Center"
  158. BorderBrush="#FF2AB2E7" VerticalAlignment="Center" FontSize="16" ></TextBox>
  159. </StackPanel>
  160. </StackPanel>
  161. <Grid Width="260" HorizontalAlignment="Right">
  162. <Grid.RowDefinitions>
  163. <RowDefinition/>
  164. <RowDefinition/>
  165. </Grid.RowDefinitions>
  166. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,5,5,0">
  167. <Button Content="添加原料" Width="120" Margin="0,0,10,0" Height="30" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Cursor="Hand" Command="{Binding AddRecipe}" ></Button>
  168. <Button Content="确认更新" Height="30" Width="120" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Command="{Binding Comfirm}"></Button>
  169. </StackPanel>
  170. <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Right" Margin="0,3,5,0">
  171. <Button Content="另存为" Height="30" Width="120" Margin="0,0,10,0" Command="{Binding SaveAs}" Cursor="Hand"/>
  172. <Button Click="Button_Click" Content="取消" Height="30" FontSize="20" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Width="120" Cursor="Hand"></Button>
  173. </StackPanel>
  174. </Grid>
  175. </UniformGrid>
  176. <Grid Grid.Row="2" Background="#FF2AB2E7" Margin="0,0,0,10">
  177. <Grid.ColumnDefinitions>
  178. <ColumnDefinition Width="130"/>
  179. <ColumnDefinition Width="145"/>
  180. <ColumnDefinition Width="145"/>
  181. <ColumnDefinition/>
  182. </Grid.ColumnDefinitions>
  183. <TextBlock Text="原料桶号" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontSize="14"/>
  184. <GridSplitter></GridSplitter>
  185. <TextBlock Grid.Column="1" Text="原料位置" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontSize="14"/>
  186. <GridSplitter Grid.Column="1"></GridSplitter>
  187. <TextBlock Grid.Column="2" Text="原料重量" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White" FontSize="14"></TextBlock>
  188. <GridSplitter Grid.Column="2"></GridSplitter>
  189. <TextBlock Grid.Column="3" Text="操作" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White" FontSize="14"/>
  190. </Grid>
  191. <ScrollViewer Grid.Row="3" VerticalScrollBarVisibility="Hidden">
  192. <ItemsControl ItemsSource="{Binding RawMaterialsInfo}">
  193. <ItemsControl.ItemsPanel>
  194. <ItemsPanelTemplate>
  195. <StackPanel></StackPanel>
  196. </ItemsPanelTemplate>
  197. </ItemsControl.ItemsPanel>
  198. <ItemsControl.ItemTemplate>
  199. <DataTemplate>
  200. <RadioButton>
  201. <RadioButton.Template>
  202. <ControlTemplate>
  203. <Grid>
  204. <Grid.ColumnDefinitions>
  205. <ColumnDefinition Width="130"/>
  206. <ColumnDefinition Width="145"></ColumnDefinition>
  207. <ColumnDefinition Width="145"></ColumnDefinition>
  208. <ColumnDefinition></ColumnDefinition>
  209. </Grid.ColumnDefinitions>
  210. <ComboBox ItemsSource="{Binding DataContext.materialNames,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}" Text="{Binding RawMaterialBarrelNum}" Margin="5,0,0,5" Width="120" FontSize="14" KeyUp="ComboBox_KeyUp" LostFocus="ComboBox_LostFocus" >
  211. <ComboBox.ItemContainerStyle>
  212. <Style TargetType="{x:Type ComboBoxItem}">
  213. <Setter Property="Background" Value="White" />
  214. <Setter Property="Foreground" Value="#e69519"/>
  215. </Style>
  216. </ComboBox.ItemContainerStyle>
  217. </ComboBox>
  218. <StackPanel Grid.Column="1" Orientation="Horizontal" >
  219. <TextBox Text="{Binding RawMaterialLocation}" Background="Transparent" FontSize="14"
  220. BorderBrush="#e69519" Foreground="LightGray" Width="135" Margin="5,0,0,5" ></TextBox>
  221. </StackPanel>
  222. <StackPanel Orientation="Horizontal" Grid.Column="2">
  223. <TextBox Text="{Binding RawMaterialWeight}" Background="Transparent" FontSize="14"
  224. BorderBrush="#e69519" Foreground="LightGray" Width="125" Margin="5,0,0,5" ></TextBox>
  225. <TextBlock VerticalAlignment="Center" Margin="4,0,0,5" Text="g" Foreground="#e69519" ></TextBlock>
  226. </StackPanel>
  227. <Button Grid.Column="3"
  228. Content="删除"
  229. Width="94"
  230. FontSize="14"
  231. Margin="10,0,20,5"
  232. Background="Transparent"
  233. BorderBrush="#e69519" Foreground="LightGray" HorizontalAlignment="Right"
  234. Command="{Binding DataContext.RemoveRecipe,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}"
  235. CommandParameter="{Binding MaterialCode}"></Button>
  236. </Grid>
  237. </ControlTemplate>
  238. </RadioButton.Template>
  239. </RadioButton>
  240. </DataTemplate>
  241. </ItemsControl.ItemTemplate>
  242. </ItemsControl>
  243. </ScrollViewer>
  244. </Grid>
  245. </Border>-->
  246. <Border
  247. Name="br"
  248. BorderBrush="#0CADF5"
  249. BorderThickness="2">
  250. <Border.Background>
  251. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/bg.png" />
  252. </Border.Background>
  253. <Grid>
  254. <Grid.RowDefinitions>
  255. <RowDefinition Height="50" />
  256. <RowDefinition Height="85" />
  257. <RowDefinition Height="40" />
  258. <RowDefinition />
  259. </Grid.RowDefinitions>
  260. <TextBlock
  261. Margin="0,10"
  262. HorizontalAlignment="Center"
  263. VerticalAlignment="Center"
  264. FontSize="25"
  265. Foreground="#FF2AB2E7"
  266. Text="大配料站配方信息" />
  267. <UniformGrid
  268. Grid.Row="1"
  269. Margin="0,0,0,5"
  270. Columns="3">
  271. <StackPanel Orientation="Vertical">
  272. <StackPanel Margin="0,8" Orientation="Horizontal">
  273. <TextBlock
  274. Margin="10,0,5,0"
  275. VerticalAlignment="Center"
  276. FontSize="18"
  277. Foreground="#FF2AB2E7"
  278. Text="请输入配方名称:" />
  279. <TextBox
  280. Width="170"
  281. Height="30"
  282. VerticalAlignment="Center"
  283. VerticalContentAlignment="Center"
  284. Background="Transparent"
  285. BorderBrush="#FF2AB2E7"
  286. BorderThickness="1"
  287. FontSize="16"
  288. Foreground="Orange"
  289. Text="{Binding RecipeName}" />
  290. </StackPanel>
  291. <StackPanel Orientation="Horizontal">
  292. <TextBlock
  293. Margin="10,0,5,0"
  294. VerticalAlignment="Center"
  295. FontSize="18"
  296. Foreground="#FF2AB2E7"
  297. Text="请输入托盘编号:" />
  298. <TextBox
  299. Width="170"
  300. Height="30"
  301. VerticalAlignment="Center"
  302. VerticalContentAlignment="Center"
  303. Background="Transparent"
  304. BorderBrush="#FF2AB2E7"
  305. BorderThickness="1"
  306. FontSize="16"
  307. Foreground="Orange"
  308. InputMethod.IsInputMethodEnabled="False"
  309. Text="{Binding TrayCode}" />
  310. </StackPanel>
  311. </StackPanel>
  312. <StackPanel Margin="0,8" Orientation="Horizontal">
  313. <TextBlock
  314. Margin="10,0,5,0"
  315. VerticalAlignment="Center"
  316. FontSize="18"
  317. Foreground="#FF2AB2E7"
  318. Text="请选择配方类别:" />
  319. <ComboBox
  320. Width="170"
  321. Height="30"
  322. VerticalAlignment="Center"
  323. VerticalContentAlignment="Center"
  324. Background="Transparent"
  325. BorderBrush="#FF2AB2E7"
  326. BorderThickness="1"
  327. FontSize="16"
  328. Foreground="Orange"
  329. IsReadOnly="False"
  330. ItemsSource="{Binding Categorys}"
  331. Text="{Binding RecipeCategory}" />
  332. </StackPanel>
  333. <Grid>
  334. <Grid.RowDefinitions>
  335. <RowDefinition />
  336. <RowDefinition />
  337. </Grid.RowDefinitions>
  338. <StackPanel
  339. Margin="0,4,0,0"
  340. HorizontalAlignment="Center"
  341. Orientation="Horizontal">
  342. <CheckBox
  343. Width="140"
  344. Height="30"
  345. Margin="0,0,10,0"
  346. Padding="10,0"
  347. HorizontalContentAlignment="Center"
  348. Content="是否洗桶"
  349. FontSize="16"
  350. Foreground="#FF2AB2E7"
  351. IsChecked="{Binding IsWashingBarrel}" />
  352. <Button
  353. Width="140"
  354. Height="30"
  355. Margin="0,0,10,0"
  356. Background="Transparent"
  357. BorderBrush="#FF2AB2E7"
  358. Command="{Binding AddRecipe}"
  359. Content="添加原料"
  360. Cursor="Hand"
  361. Foreground="#FF2AB2E7" />
  362. </StackPanel>
  363. <StackPanel
  364. Grid.Row="1"
  365. Margin="0,4,0,0"
  366. HorizontalAlignment="Center"
  367. Orientation="Horizontal">
  368. <Button
  369. Width="140"
  370. Height="30"
  371. Margin="0,0,10,0"
  372. Background="Transparent"
  373. BorderBrush="#FF2AB2E7"
  374. Command="{Binding Comfirm}"
  375. Content="确认"
  376. Foreground="#FF2AB2E7" />
  377. <Button
  378. Width="140"
  379. Height="30"
  380. Margin="0,0,10,0"
  381. Background="Transparent"
  382. BorderBrush="#FF2AB2E7"
  383. Click="Button_Click"
  384. Content="取消"
  385. Cursor="Hand"
  386. FontSize="20"
  387. Foreground="#FF2AB2E7" />
  388. </StackPanel>
  389. </Grid>
  390. </UniformGrid>
  391. <Grid
  392. Grid.Row="2"
  393. Margin="0,0,0,10"
  394. Background="#FF2AB2E7">
  395. <Grid.ColumnDefinitions>
  396. <ColumnDefinition />
  397. <ColumnDefinition />
  398. <ColumnDefinition />
  399. <ColumnDefinition />
  400. <ColumnDefinition />
  401. <ColumnDefinition Width="120" />
  402. </Grid.ColumnDefinitions>
  403. <TextBlock
  404. Grid.Column="0"
  405. HorizontalAlignment="Center"
  406. VerticalAlignment="Center"
  407. Foreground="White"
  408. Text="原料位置" />
  409. <GridSplitter />
  410. <TextBlock
  411. Grid.Column="1"
  412. HorizontalAlignment="Center"
  413. VerticalAlignment="Center"
  414. Foreground="White"
  415. Text="原料名称" />
  416. <GridSplitter Grid.Column="1" />
  417. <TextBlock
  418. Grid.Column="2"
  419. HorizontalAlignment="Center"
  420. VerticalAlignment="Center"
  421. Foreground="White"
  422. Text="原料中文名" />
  423. <GridSplitter Grid.Column="1" />
  424. <TextBlock
  425. Grid.Column="3"
  426. HorizontalAlignment="Center"
  427. VerticalAlignment="Center"
  428. Foreground="White"
  429. Text="托盘桶号" />
  430. <GridSplitter Grid.Column="2" />
  431. <TextBlock
  432. Grid.Column="4"
  433. HorizontalAlignment="Center"
  434. VerticalAlignment="Center"
  435. Foreground="White"
  436. Text="原料重量" />
  437. <GridSplitter Grid.Column="3" />
  438. <TextBlock
  439. Grid.Column="5"
  440. HorizontalAlignment="Center"
  441. VerticalAlignment="Center"
  442. Foreground="White"
  443. Text="操作" />
  444. </Grid>
  445. <ScrollViewer Grid.Row="3" VerticalScrollBarVisibility="Hidden">
  446. <ItemsControl ItemsSource="{Binding RawMaterialsInfo}">
  447. <ItemsControl.ItemsPanel>
  448. <ItemsPanelTemplate>
  449. <StackPanel />
  450. </ItemsPanelTemplate>
  451. </ItemsControl.ItemsPanel>
  452. <ItemsControl.ItemTemplate>
  453. <DataTemplate>
  454. <RadioButton>
  455. <RadioButton.Template>
  456. <ControlTemplate>
  457. <Grid>
  458. <Grid.ColumnDefinitions>
  459. <ColumnDefinition />
  460. <ColumnDefinition />
  461. <ColumnDefinition />
  462. <ColumnDefinition />
  463. <ColumnDefinition />
  464. <ColumnDefinition Width="120" />
  465. </Grid.ColumnDefinitions>
  466. <!--<ComboBox ItemsSource="{Binding DataContext.materialNames,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}" Text="{Binding RawMaterialLocation}" Margin="10,0,0,10" Width="190" FontSize="14" KeyUp="ComboBox_KeyUp" LostFocus="ComboBox_LostFocus">
  467. <ComboBox.ItemContainerStyle>
  468. <Style TargetType="{x:Type ComboBoxItem}">
  469. <Setter Property="Background" Value="White" />
  470. <Setter Property="Foreground" Value="#e69519"/>
  471. </Style>
  472. </ComboBox.ItemContainerStyle>-->
  473. <!--</ComboBox>-->
  474. <ComboBox
  475. Margin="3"
  476. VerticalAlignment="Center"
  477. BorderBrush="#FF074B92"
  478. BorderThickness="1"
  479. FontFamily="楷体"
  480. FontSize="14"
  481. Foreground="LightGray"
  482. IsEditable="False"
  483. ItemsSource="{Binding DataContext.RawMaterialLocation, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  484. MouseLeave="ComboBox_MouseLeave"
  485. SelectedValue="{Binding RawMaterialLocation}"
  486. Style="{StaticResource ComboBoxStyle}"
  487. Text="{Binding RawMaterialLocation}" />
  488. <StackPanel
  489. Grid.Column="1"
  490. HorizontalAlignment="Center"
  491. VerticalAlignment="Center"
  492. Orientation="Horizontal">
  493. <TextBlock
  494. Grid.Column="1"
  495. Background="Transparent"
  496. FontSize="14"
  497. Foreground="LightGray"
  498. Text="{Binding RawMaterialName}" />
  499. </StackPanel>
  500. <StackPanel
  501. Grid.Column="2"
  502. HorizontalAlignment="Center"
  503. VerticalAlignment="Center"
  504. Orientation="Horizontal">
  505. <TextBlock
  506. Grid.Column="1"
  507. Background="Transparent"
  508. FontSize="14"
  509. Foreground="LightGray"
  510. Text="{Binding RawMaterialChineseName}" />
  511. </StackPanel>
  512. <!--<TextBox Text="{Binding RawMaterialName}" Background="Transparent" FontSize="14"
  513. BorderBrush="#e69519" Foreground="LightGray" Width="190" Margin="10,0,0,10" ></TextBox>-->
  514. <StackPanel
  515. Grid.Column="3"
  516. Margin="3"
  517. HorizontalAlignment="Center"
  518. Orientation="Horizontal">
  519. <TextBox
  520. Width="120"
  521. Background="Transparent"
  522. BorderBrush="#e69519"
  523. FontSize="14"
  524. Foreground="LightGray"
  525. Text="{Binding RawMaterialBarrelNum}" />
  526. </StackPanel>
  527. <StackPanel
  528. Grid.Column="4"
  529. Margin="3"
  530. HorizontalAlignment="Center"
  531. Orientation="Horizontal">
  532. <TextBox
  533. Width="120"
  534. Background="Transparent"
  535. BorderBrush="#e69519"
  536. FontSize="14"
  537. Foreground="LightGray"
  538. Text="{Binding RawMaterialWeight}" />
  539. <TextBlock
  540. Margin="4,0,0,0"
  541. VerticalAlignment="Center"
  542. FontSize="14"
  543. Foreground="#e69519"
  544. Text="Kg" />
  545. </StackPanel>
  546. <Button
  547. Grid.Column="5"
  548. Width="94"
  549. HorizontalAlignment="Center"
  550. Background="Transparent"
  551. BorderBrush="#e69519"
  552. Command="{Binding DataContext.RemoveRecipe, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ItemsControl}}"
  553. CommandParameter="{Binding RawMaterialLocation}"
  554. Content="删除"
  555. FontSize="14"
  556. Foreground="LightGray" />
  557. </Grid>
  558. </ControlTemplate>
  559. </RadioButton.Template>
  560. </RadioButton>
  561. </DataTemplate>
  562. </ItemsControl.ItemTemplate>
  563. </ItemsControl>
  564. </ScrollViewer>
  565. </Grid>
  566. </Border>
  567. </Window>