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

RecipeInfosView.xaml 28 KiB

1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  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 Name="br" BorderThickness="2" BorderBrush="#0CADF5">
  247. <Border.Background>
  248. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/bg.png" />
  249. </Border.Background>
  250. <Grid >
  251. <Grid.RowDefinitions>
  252. <RowDefinition Height="50"></RowDefinition>
  253. <RowDefinition Height="85"></RowDefinition>
  254. <RowDefinition Height="40"></RowDefinition>
  255. <RowDefinition></RowDefinition>
  256. </Grid.RowDefinitions>
  257. <TextBlock Text="大配料站配方信息" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FF2AB2E7" FontSize="25" Margin="0,10"></TextBlock>
  258. <UniformGrid Grid.Row="1" Columns="2" Margin="0,0,0,5">
  259. <StackPanel Orientation="Vertical" >
  260. <StackPanel Orientation="Horizontal" Margin="0,8">
  261. <TextBlock Text="请输入配方名称:" Foreground="#FF2AB2E7" FontSize="18" Margin="10,0,5,0" VerticalAlignment="Center"></TextBlock>
  262. <TextBox Text="{Binding RecipeName}" Width="230" Height="30" BorderThickness="1" Background="Transparent" Foreground="Orange"
  263. VerticalContentAlignment="Center"
  264. BorderBrush="#FF2AB2E7" VerticalAlignment="Center" FontSize="16" ></TextBox>
  265. </StackPanel>
  266. <StackPanel Orientation="Horizontal">
  267. <TextBlock Text="请输入托盘编号:" Foreground="#FF2AB2E7" FontSize="18" Margin="10,0,5,0" VerticalAlignment="Center"></TextBlock>
  268. <TextBox Text="{Binding TrayCode}" InputMethod.IsInputMethodEnabled="False" Width="230" Height="30" BorderThickness="1" Background="Transparent" Foreground="Orange"
  269. VerticalContentAlignment="Center"
  270. BorderBrush="#FF2AB2E7" VerticalAlignment="Center" FontSize="16" ></TextBox>
  271. </StackPanel>
  272. </StackPanel>
  273. <Grid>
  274. <Grid.RowDefinitions>
  275. <RowDefinition/>
  276. <RowDefinition/>
  277. </Grid.RowDefinitions>
  278. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,4,0,0">
  279. <CheckBox Content="是否洗桶" FontSize="16" Foreground="#FF2AB2E7" Height="30" Width="180" Margin="0,0,10,0" IsChecked="{Binding IsWashingBarrel}"/>
  280. <Button Content="添加原料" Width="180" Margin="0,0,10,0" Height="30" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Cursor="Hand" Command="{Binding AddRecipe}" ></Button>
  281. </StackPanel>
  282. <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0,4,0,0" HorizontalAlignment="Center">
  283. <Button Content="确认" Margin="0,0,10,0" Height="30" Width="180" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Command="{Binding Comfirm}"></Button>
  284. <Button Click="Button_Click" Content="取消" Margin="0,0,10,0" Height="30" FontSize="20" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Width="180" Cursor="Hand"></Button>
  285. </StackPanel>
  286. </Grid>
  287. </UniformGrid>
  288. <Grid Grid.Row="2" Background="#FF2AB2E7" Margin="0,0,0,10">
  289. <Grid.ColumnDefinitions>
  290. <ColumnDefinition/>
  291. <ColumnDefinition/>
  292. <ColumnDefinition/>
  293. <ColumnDefinition/>
  294. <ColumnDefinition/>
  295. <ColumnDefinition Width="120"/>
  296. </Grid.ColumnDefinitions>
  297. <TextBlock Grid.Column="0" Text="原料位置" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"/>
  298. <GridSplitter></GridSplitter>
  299. <TextBlock Grid.Column="1" Text="原料名称" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"/>
  300. <GridSplitter Grid.Column="1"></GridSplitter>
  301. <TextBlock Grid.Column="2" Text="原料中文名" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"/>
  302. <GridSplitter Grid.Column="1"></GridSplitter>
  303. <TextBlock Grid.Column="3" Text="托盘桶号" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"/>
  304. <GridSplitter Grid.Column="2"></GridSplitter>
  305. <TextBlock Grid.Column="4" Text="原料重量" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"></TextBlock>
  306. <GridSplitter Grid.Column="3"></GridSplitter>
  307. <TextBlock Grid.Column="5" Text="操作" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"/>
  308. </Grid>
  309. <ScrollViewer Grid.Row="3" VerticalScrollBarVisibility="Hidden">
  310. <ItemsControl ItemsSource="{Binding RawMaterialsInfo}">
  311. <ItemsControl.ItemsPanel>
  312. <ItemsPanelTemplate>
  313. <StackPanel></StackPanel>
  314. </ItemsPanelTemplate>
  315. </ItemsControl.ItemsPanel>
  316. <ItemsControl.ItemTemplate>
  317. <DataTemplate>
  318. <RadioButton>
  319. <RadioButton.Template>
  320. <ControlTemplate>
  321. <Grid>
  322. <Grid.ColumnDefinitions>
  323. <ColumnDefinition/>
  324. <ColumnDefinition></ColumnDefinition>
  325. <ColumnDefinition></ColumnDefinition>
  326. <ColumnDefinition></ColumnDefinition>
  327. <ColumnDefinition></ColumnDefinition>
  328. <ColumnDefinition Width="120"></ColumnDefinition>
  329. </Grid.ColumnDefinitions>
  330. <!--<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">
  331. <ComboBox.ItemContainerStyle>
  332. <Style TargetType="{x:Type ComboBoxItem}">
  333. <Setter Property="Background" Value="White" />
  334. <Setter Property="Foreground" Value="#e69519"/>
  335. </Style>
  336. </ComboBox.ItemContainerStyle>-->
  337. <!--</ComboBox>-->
  338. <ComboBox
  339. Margin="3"
  340. VerticalAlignment="Center"
  341. BorderBrush="#FF074B92"
  342. BorderThickness="1"
  343. FontFamily="楷体"
  344. FontSize="14"
  345. Foreground="LightGray"
  346. IsEditable="False"
  347. ItemsSource="{Binding DataContext.RawMaterialLocation, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  348. SelectedValue="{Binding RawMaterialLocation}"
  349. MouseLeave="ComboBox_MouseLeave"
  350. Style="{StaticResource ComboBoxStyle}"
  351. Text="{Binding RawMaterialLocation}"/>
  352. <StackPanel
  353. VerticalAlignment="Center" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Center" >
  354. <TextBlock Grid.Column="1" Text="{Binding RawMaterialName}" Background="Transparent" FontSize="14" Foreground="LightGray" ></TextBlock>
  355. </StackPanel>
  356. <StackPanel
  357. VerticalAlignment="Center" Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Center" >
  358. <TextBlock Grid.Column="1" Text="{Binding RawMaterialChineseName}" Background="Transparent" FontSize="14" Foreground="LightGray" ></TextBlock>
  359. </StackPanel>
  360. <!--<TextBox Text="{Binding RawMaterialName}" Background="Transparent" FontSize="14"
  361. BorderBrush="#e69519" Foreground="LightGray" Width="190" Margin="10,0,0,10" ></TextBox>-->
  362. <StackPanel
  363. Margin="3" Grid.Column="3" Orientation="Horizontal" HorizontalAlignment="Center">
  364. <TextBox Text="{Binding RawMaterialBarrelNum}" Background="Transparent" FontSize="14"
  365. BorderBrush="#e69519" Foreground="LightGray" Width="120" ></TextBox>
  366. </StackPanel>
  367. <StackPanel
  368. Margin="3" Orientation="Horizontal" Grid.Column="4" HorizontalAlignment="Center">
  369. <TextBox Text="{Binding RawMaterialWeight}" Background="Transparent" FontSize="14"
  370. BorderBrush="#e69519" Foreground="LightGray" Width="120" ></TextBox>
  371. <TextBlock FontSize="14" VerticalAlignment="Center" Margin="4,0,0,0" Text="Kg" Foreground="#e69519" ></TextBlock>
  372. </StackPanel>
  373. <Button Grid.Column="5"
  374. Content="删除"
  375. Width="94"
  376. FontSize="14"
  377. Background="Transparent"
  378. BorderBrush="#e69519" Foreground="LightGray" HorizontalAlignment="Center"
  379. Command="{Binding DataContext.RemoveRecipe,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}"
  380. CommandParameter="{Binding RawMaterialLocation}"></Button>
  381. </Grid>
  382. </ControlTemplate>
  383. </RadioButton.Template>
  384. </RadioButton>
  385. </DataTemplate>
  386. </ItemsControl.ItemTemplate>
  387. </ItemsControl>
  388. </ScrollViewer>
  389. </Grid>
  390. </Border>
  391. </Window>