终端一体化运控平台
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

251 lignes
13 KiB

  1. <UserControl x:Class="BPASmartClient.JXJFoodSmallStation.View.BomOfMaterialView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:con="clr-namespace:BPASmartClient.JXJFoodSmallStation.Converter"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:vm="clr-namespace:BPASmartClient.JXJFoodSmallStation.ViewModel"
  9. mc:Ignorable="d"
  10. d:DesignHeight="1080" d:DesignWidth="1920">
  11. <UserControl.DataContext>
  12. <vm:BomOfMaterialViewModel />
  13. </UserControl.DataContext>
  14. <UserControl.Resources>
  15. <SolidColorBrush x:Key="tabColor" Color="#FF2AB2E7" />
  16. <!--<SolidColorBrush x:Key="bordColor" Color="#33ffffff" />-->
  17. <SolidColorBrush x:Key="bordColor" Color="#332AB2E7" />
  18. <con:DataTableRedundantConverter x:Key="tabConvert" />
  19. <Style x:Key="RowRadioButtonStyle" TargetType="{x:Type RadioButton}">
  20. <Setter Property="Template">
  21. <Setter.Value>
  22. <ControlTemplate TargetType="{x:Type RadioButton}">
  23. <Border
  24. x:Name="NvaBor"
  25. Background="Transparent"
  26. BorderBrush="#FF2AB2E7"
  27. BorderThickness="0">
  28. <ContentControl
  29. Margin="10,4"
  30. HorizontalAlignment="Center"
  31. VerticalAlignment="Center"
  32. HorizontalContentAlignment="Center"
  33. VerticalContentAlignment="Center"
  34. Content="{TemplateBinding Content}"
  35. FontSize="16" />
  36. </Border>
  37. <ControlTemplate.Triggers>
  38. <Trigger Property="IsChecked" Value="True">
  39. <Setter TargetName="NvaBor" Property="Background" Value="#22ffffff" />
  40. <Setter TargetName="NvaBor" Property="BorderThickness" Value="0" />
  41. </Trigger>
  42. <MultiTrigger>
  43. <MultiTrigger.Conditions>
  44. <Condition Property="IsChecked" Value="false" />
  45. <Condition Property="IsMouseOver" Value="True" />
  46. </MultiTrigger.Conditions>
  47. <MultiTrigger.Setters>
  48. <Setter TargetName="NvaBor" Property="Background" Value="#22ffffff" />
  49. </MultiTrigger.Setters>
  50. </MultiTrigger>
  51. </ControlTemplate.Triggers>
  52. </ControlTemplate>
  53. </Setter.Value>
  54. </Setter>
  55. </Style>
  56. <Style x:Key="InputTextboxStyle" TargetType="TextBox">
  57. <Setter Property="Margin" Value="5,0,0,0" />
  58. <Setter Property="BorderThickness" Value="0" />
  59. <Setter Property="HorizontalAlignment" Value="Left" />
  60. <Setter Property="Width" Value="150" />
  61. <Setter Property="Height" Value="40" />
  62. <Setter Property="CaretBrush" Value="{StaticResource TitleBorderColor}" />
  63. <Setter Property="Foreground" Value="{StaticResource TitleBorderColor}" />
  64. <Setter Property="VerticalContentAlignment" Value="Center" />
  65. <Setter Property="FontSize" Value="14" />
  66. <Setter Property="Background" Value="Transparent" />
  67. <Setter Property="VerticalAlignment" Value="Center" />
  68. </Style>
  69. <Style x:Key="ControlButtonStyle" TargetType="Button">
  70. <Setter Property="Margin" Value="0" />
  71. <Setter Property="FontSize" Value="18" />
  72. <Setter Property="Foreground" Value="#FFF53F62" />
  73. <Setter Property="FontWeight" Value="SemiBold" />
  74. <Setter Property="FontFamily" Value="楷体" />
  75. <Setter Property="VerticalContentAlignment" Value="Center" />
  76. <Setter Property="Template">
  77. <Setter.Value>
  78. <ControlTemplate TargetType="Button">
  79. <Border
  80. Name="TitleBarBr"
  81. BorderBrush="#00c2f4"
  82. BorderThickness="0"
  83. CornerRadius="0"
  84. Opacity="0.8">
  85. <ContentPresenter
  86. Margin="{TemplateBinding Margin}"
  87. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  88. VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
  89. <Border.Background>
  90. <ImageBrush
  91. ImageSource="/BPASmartClient.CustomResource;component/Image/组合边框1.1.png"
  92. Opacity="0.8"
  93. Stretch="Fill" />
  94. </Border.Background>
  95. </Border>
  96. <ControlTemplate.Triggers>
  97. <Trigger Property="IsMouseOver" Value="true">
  98. <Setter TargetName="TitleBarBr" Property="Opacity" Value="1" />
  99. </Trigger>
  100. </ControlTemplate.Triggers>
  101. </ControlTemplate>
  102. </Setter.Value>
  103. </Setter>
  104. </Style>
  105. <Style x:Key="TitleTextblockStyle" TargetType="TextBlock">
  106. <Setter Property="FontSize" Value="16" />
  107. <Setter Property="HorizontalAlignment" Value="Center" />
  108. <Setter Property="VerticalAlignment" Value="Center" />
  109. <Setter Property="Foreground" Value="{StaticResource tabColor}" />
  110. <Setter Property="FontFamily" Value="楷体" />
  111. <Setter Property="FontWeight" Value="SemiBold" />
  112. </Style>
  113. </UserControl.Resources>
  114. <Grid Margin="10">
  115. <Grid.RowDefinitions>
  116. <RowDefinition Height="60" />
  117. <RowDefinition Height="40" />
  118. <RowDefinition />
  119. </Grid.RowDefinitions>
  120. <!--#region 表格标题栏设置-->
  121. <Grid>
  122. <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
  123. <Button
  124. Height="50"
  125. Margin="5"
  126. Command="{Binding GetBomMaterialData}"
  127. Content="拉取本地数据"
  128. FontSize="28"
  129. Foreground="Aqua"
  130. Style="{StaticResource ImageButtonStyle}" />
  131. <Button
  132. Height="50"
  133. Margin="5"
  134. Command="{Binding DeleteAllMaterial}"
  135. Content="删除所有数据"
  136. FontSize="28"
  137. Foreground="Aqua"
  138. Style="{StaticResource ImageButtonStyle}" />
  139. <Button
  140. Height="50"
  141. Margin="5"
  142. Command="{Binding AddMaterial}"
  143. Content="新增数据"
  144. FontSize="28"
  145. Foreground="Aqua"
  146. Style="{StaticResource ImageButtonStyle}" />
  147. <Button
  148. Height="50"
  149. Margin="5"
  150. Command="{Binding SaveMaterials}"
  151. Content="保存参数"
  152. FontSize="28"
  153. Foreground="Aqua"
  154. Style="{StaticResource ImageButtonStyle}" />
  155. </StackPanel>
  156. </Grid>
  157. <Grid
  158. Grid.Row="1"
  159. Margin="0,10,0,0"
  160. Background="#ff0C255F">
  161. <Grid.ColumnDefinitions>
  162. <ColumnDefinition Width="1*"/>
  163. <ColumnDefinition Width="1*"/>
  164. <ColumnDefinition Width="1*"/>
  165. <ColumnDefinition Width="1*"/>
  166. </Grid.ColumnDefinitions>
  167. <Grid Grid.Column="0">
  168. <TextBlock Text="序号" FontSize="24" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua"/>
  169. <!--<Border BorderThickness="1,1,1,1" Cursor="SizeWE"
  170. BorderBrush="{StaticResource bordColor}" />-->
  171. </Grid>
  172. <TextBlock Grid.Column="1" FontSize="24" Text="原料编号" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
  173. <TextBlock Grid.Column="2" FontSize="24" Text="原料名称" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
  174. <TextBlock Grid.Column="3" FontSize="24" Text="操作" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" />
  175. </Grid>
  176. <Grid Grid.Row="2">
  177. <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Visible" >
  178. <ItemsControl ItemsSource="{Binding RawMaterialInfo}" Foreground="Aqua">
  179. <ItemsControl.ItemTemplate>
  180. <DataTemplate>
  181. <Grid Name="gr" >
  182. <Grid.ColumnDefinitions>
  183. <ColumnDefinition />
  184. <ColumnDefinition />
  185. <ColumnDefinition />
  186. <ColumnDefinition />
  187. </Grid.ColumnDefinitions>
  188. <Grid Grid.Column="0" Margin="5">
  189. <TextBlock
  190. FontSize="16"
  191. HorizontalAlignment="Center"
  192. VerticalAlignment="Center"
  193. Text="{Binding Count}" />
  194. </Grid>
  195. <Grid Grid.Column="1" Margin="5">
  196. <TextBox
  197. Width="50"
  198. FontSize="16"
  199. HorizontalAlignment="Center"
  200. VerticalAlignment="Center"
  201. Text="{Binding MaterialCode}" />
  202. </Grid>
  203. <Grid Grid.Column="2" Margin="5">
  204. <TextBox
  205. Width="200"
  206. FontSize="16"
  207. HorizontalAlignment="Center"
  208. VerticalAlignment="Center"
  209. Text="{Binding MaterialName}" />
  210. </Grid>
  211. <Grid Grid.Column="3" Margin="5">
  212. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  213. <pry:IcoButton
  214. Margin="3,4,4,0"
  215. HorizontalAlignment="Center"
  216. VerticalAlignment="Center"
  217. Background="#11F53F62"
  218. BorderThickness="0"
  219. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  220. CommandParameter="{Binding Count}"
  221. Content="删除"
  222. EnterBackground="#22F53F62"
  223. Foreground="#FFF53F62"
  224. IcoText="&#xe68e;"
  225. Style="{StaticResource IcoButtonStyle}" />
  226. </StackPanel>
  227. </Grid>
  228. </Grid>
  229. <DataTemplate.Triggers>
  230. <Trigger Property="IsMouseOver" Value="true">
  231. <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
  232. </Trigger>
  233. </DataTemplate.Triggers>
  234. </DataTemplate>
  235. </ItemsControl.ItemTemplate>
  236. </ItemsControl>
  237. </ScrollViewer>
  238. </Grid>
  239. </Grid>
  240. </UserControl>