终端一体化运控平台
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 

156 рядки
7.2 KiB

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