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

123 lines
6.6 KiB

  1. <UserControl x:Class="BPASmartClient.JXJFoodBigStation.View.BomOfMaterialView"
  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:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:vm="clr-namespace:BPASmartClient.JXJFoodBigStation.ViewModel"
  8. mc:Ignorable="d"
  9. d:DesignHeight="1080" d:DesignWidth="1920">
  10. <UserControl.DataContext>
  11. <vm:BomOfMaterialViewModel />
  12. </UserControl.DataContext>
  13. <Grid Margin="10">
  14. <Grid.RowDefinitions>
  15. <RowDefinition Height="50" />
  16. <RowDefinition Height="40" />
  17. <RowDefinition />
  18. </Grid.RowDefinitions>
  19. <!--#region 表格标题栏设置-->
  20. <Grid>
  21. <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal">
  22. <pry:IcoButton
  23. Margin="5"
  24. Command="{Binding AddMaterial}"
  25. Content="新增数据"
  26. FontSize="28"
  27. Foreground="Aqua"
  28. Style="{StaticResource IcoButtonStyle}" />
  29. <pry:IcoButton
  30. Margin="5"
  31. Command="{Binding SaveMaterials}"
  32. Content="保存参数"
  33. FontSize="28"
  34. Foreground="Aqua"
  35. Style="{StaticResource IcoButtonStyle}" />
  36. </StackPanel>
  37. </Grid>
  38. <Grid
  39. Grid.Row="1"
  40. Margin="0,10,0,0"
  41. Background="#ff0C255F">
  42. <Grid.ColumnDefinitions>
  43. <ColumnDefinition Width="1*"/>
  44. <ColumnDefinition Width="1*"/>
  45. <ColumnDefinition Width="1*"/>
  46. <ColumnDefinition Width="1*"/>
  47. </Grid.ColumnDefinitions>
  48. <Grid Grid.Column="0">
  49. <TextBlock Text="序号" FontSize="24" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"/>
  50. <Border BorderThickness="1,1,1,1" Cursor="SizeWE" />
  51. </Grid>
  52. <TextBlock Grid.Column="1" FontSize="24" Text="原料编号" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
  53. <TextBlock Grid.Column="2" FontSize="24" Text="原料名称" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
  54. <TextBlock Grid.Column="3" FontSize="24" Text="操作" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
  55. </Grid>
  56. <Grid Grid.Row="2">
  57. <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Visible" >
  58. <ItemsControl ItemsSource="{Binding RawMaterialInfo}" Foreground="Aqua">
  59. <ItemsControl.ItemTemplate>
  60. <DataTemplate>
  61. <Grid Name="gr" >
  62. <Grid.ColumnDefinitions>
  63. <ColumnDefinition />
  64. <ColumnDefinition />
  65. <ColumnDefinition />
  66. <ColumnDefinition />
  67. </Grid.ColumnDefinitions>
  68. <Grid Grid.Column="0" Margin="5">
  69. <TextBlock
  70. FontSize="16"
  71. HorizontalAlignment="Center"
  72. VerticalAlignment="Center"
  73. Text="{Binding RawMaterialCount}" />
  74. </Grid>
  75. <Grid Grid.Column="1" Margin="5">
  76. <TextBox
  77. FontSize="16"
  78. HorizontalAlignment="Center"
  79. VerticalAlignment="Center"
  80. Text="{Binding RawMaterialName}" />
  81. </Grid>
  82. <Grid Grid.Column="2">
  83. <TextBox
  84. Width="200"
  85. FontSize="16"
  86. HorizontalAlignment="Center"
  87. VerticalAlignment="Center"
  88. Text="{Binding RawMaterialChineseName}" />
  89. </Grid>
  90. <Grid Grid.Column="3">
  91. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  92. <pry:IcoButton
  93. Margin="3,4,4,0"
  94. HorizontalAlignment="Center"
  95. VerticalAlignment="Center"
  96. Background="#11F53F62"
  97. BorderThickness="0"
  98. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  99. CommandParameter="{Binding RawMaterialCount}"
  100. Content="删除"
  101. EnterBackground="#22F53F62"
  102. Foreground="#FFF53F62"
  103. IcoText="&#xe68e;"
  104. Style="{StaticResource IcoButtonStyle}" />
  105. </StackPanel>
  106. </Grid>
  107. </Grid>
  108. <DataTemplate.Triggers>
  109. <Trigger Property="IsMouseOver" Value="true">
  110. <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
  111. </Trigger>
  112. </DataTemplate.Triggers>
  113. </DataTemplate>
  114. </ItemsControl.ItemTemplate>
  115. </ItemsControl>
  116. </ScrollViewer>
  117. </Grid>
  118. </Grid>
  119. </UserControl>