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

113 lines
6.2 KiB

  1. <Window x:Class="BPASmart.RecipeManagement.View.CreateOrder"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:BPASmart.RecipeManagement.View"
  7. xmlns:vm="clr-namespace:BPASmart.RecipeManagement.ViewModel"
  8. mc:Ignorable="d"
  9. Title="CreateOrder" Height="250" Width="400" WindowStartupLocation="CenterScreen" WindowStyle="None" Background="White" MouseLeftButtonDown="Window_MouseLeftButtonDown">
  10. <Window.DataContext>
  11. <vm:CreateOrderViewModel/>
  12. </Window.DataContext>
  13. <Window.Resources>
  14. </Window.Resources>
  15. <Grid>
  16. <Grid.RowDefinitions>
  17. <RowDefinition Height="40"/>
  18. <RowDefinition Height="*"/>
  19. <RowDefinition Height="40"/>
  20. </Grid.RowDefinitions>
  21. <Button Content="增加配方" Width="100" Height="30" HorizontalAlignment="Right" Margin="10,0"
  22. Background="#58B0ED" Foreground="White" Command="{Binding AddRecipeCommand}"/>
  23. <Border Grid.Row="1" BorderBrush="#B0E2FF" BorderThickness="0,1">
  24. <ItemsControl ItemsSource="{Binding recipes}" Grid.Row="1" HorizontalAlignment="Center">
  25. <ItemsControl.ItemTemplate>
  26. <DataTemplate>
  27. <RadioButton GroupName="all">
  28. <RadioButton.Template>
  29. <ControlTemplate TargetType="RadioButton">
  30. <Grid Name="gr" Height="40">
  31. <Grid.ColumnDefinitions>
  32. <ColumnDefinition Width="150"/>
  33. <ColumnDefinition Width="100" />
  34. <ColumnDefinition Width="60" />
  35. </Grid.ColumnDefinitions>
  36. <ComboBox
  37. Name="cb"
  38. Grid.Column="0"
  39. Margin="3,1"
  40. VerticalAlignment="Center"
  41. BorderBrush="Black"
  42. BorderThickness="1"
  43. FontFamily="楷体"
  44. FontSize="20"
  45. Foreground="Black"
  46. IsEditable="False"
  47. ItemsSource="{Binding DataContext.recipesName, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  48. SelectedItem="{Binding Name}"
  49. />
  50. <StackPanel
  51. Grid.Column="1"
  52. VerticalAlignment="Center"
  53. Orientation="Horizontal">
  54. <TextBox
  55. Name="tb"
  56. Grid.Column="1"
  57. Width="60"
  58. Height="29"
  59. Margin="3,1"
  60. VerticalAlignment="Center"
  61. FontSize="20"
  62. Text="{Binding RecipeCount}" />
  63. <TextBlock
  64. Grid.Column="1"
  65. Margin="0,0,8,4"
  66. HorizontalAlignment="Right"
  67. VerticalAlignment="Center"
  68. FontSize="20"
  69. Text="单" />
  70. </StackPanel>
  71. <Button
  72. Grid.Column="2"
  73. Width="50"
  74. Height="24"
  75. Foreground="White"
  76. FontSize="14"
  77. Background="#58B0ED"
  78. Command="{Binding DataContext.DeleteCommand, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}"
  79. CommandParameter="{Binding ID}"
  80. Content="删 除" />
  81. </Grid>
  82. </ControlTemplate>
  83. </RadioButton.Template>
  84. </RadioButton>
  85. </DataTemplate>
  86. </ItemsControl.ItemTemplate>
  87. </ItemsControl>
  88. </Border>
  89. <StackPanel Grid.Row="4" Grid.ColumnSpan="3" Orientation="Horizontal"
  90. HorizontalAlignment="Center" VerticalAlignment="Center">
  91. <Button Content="保存" Foreground="White" FontSize="22" Width="120" Height="30" Margin="10,2" Background="#58B0ED"
  92. Command="{Binding SaveCommand}"/>
  93. <Button Content="取消" Foreground="White" FontSize="22" Width="120" Height="30" Margin="10,2" Background="#58B0ED"
  94. Click="Button_Click"/>
  95. </StackPanel>
  96. </Grid>
  97. </Window>