终端一体化运控平台
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

487 rindas
25 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.JXJFoodBigStation.View.RecipeReceiveView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:control="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:local="clr-namespace:BPASmartClient.JXJFoodBigStation.View"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  10. xmlns:vm="clr-namespace:BPASmartClient.JXJFoodBigStation.ViewModel"
  11. d:DesignHeight="450"
  12. d:DesignWidth="800"
  13. mc:Ignorable="d">
  14. <UserControl.DataContext>
  15. <vm:RecipeReceiveViewModel/>
  16. </UserControl.DataContext>
  17. <UserControl.Resources>
  18. <SolidColorBrush x:Key="BorderSolid" Color="#5523CACA" />
  19. <SolidColorBrush x:Key="FontColor" Color="#FF2AB2E7" />
  20. <SolidColorBrush x:Key="TitleFontColor" Color="#ddd" />
  21. <SolidColorBrush x:Key="CursorColor" Color="Aqua" />
  22. <SolidColorBrush x:Key="TitleBorderColor" Color="#FF2AB2E7" />
  23. <SolidColorBrush x:Key="TextBlockForeground" Color="#9934F7F7" />
  24. <Style x:Key="TextBlockStyle" TargetType="TextBlock">
  25. <Setter Property="FontFamily" Value="楷体" />
  26. <Setter Property="FontSize" Value="20" />
  27. <Setter Property="Background" Value="Transparent" />
  28. <!--<Setter Property="Foreground" Value="{StaticResource FontColor}" />-->
  29. <Setter Property="VerticalAlignment" Value="Center" />
  30. <Setter Property="HorizontalAlignment" Value="Center" />
  31. </Style>
  32. <Style x:Key="buttonStyle" TargetType="Button">
  33. <Setter Property="Background" Value="Transparent" />
  34. <Setter Property="FontSize" Value="16" />
  35. <Setter Property="Foreground" Value="Aqua" />
  36. <Setter Property="HorizontalAlignment" Value="Center" />
  37. <Setter Property="BorderThickness" Value="0" />
  38. </Style>
  39. <!--#region 下拉列表样式-->
  40. <Style x:Key="ToggleButtonStyle" TargetType="{x:Type ToggleButton}">
  41. <Setter Property="FocusVisualStyle" Value="{x:Null}" />
  42. <!--<Setter Property="Height" Value="10" />-->
  43. <Setter Property="HorizontalContentAlignment" Value="Left" />
  44. <Setter Property="VerticalContentAlignment" Value="Top" />
  45. <Setter Property="Padding" Value="10,10" />
  46. <Setter Property="Template">
  47. <Setter.Value>
  48. <ControlTemplate TargetType="{x:Type ToggleButton}">
  49. <Grid>
  50. <Border
  51. x:Name="border2"
  52. Width="auto"
  53. Margin="{TemplateBinding Padding}"
  54. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  55. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  56. Background="{TemplateBinding Background}">
  57. <ContentPresenter
  58. Margin="{TemplateBinding Padding}"
  59. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  60. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  61. RecognizesAccessKey="True"
  62. SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
  63. </Border>
  64. </Grid>
  65. <ControlTemplate.Triggers>
  66. <!--<Trigger Property="IsPressed" Value="true">
  67. <Setter Property="Background" Value="#FFd2e7f4" />
  68. </Trigger>
  69. <Trigger Property="IsChecked" Value="true">
  70. <Setter TargetName="border2" Property="Background" Value="#191E36" />
  71. </Trigger>
  72. <Trigger Property="IsChecked" Value="false">
  73. <Setter TargetName="border2" Property="Background" Value="#191E36" />
  74. </Trigger>-->
  75. <!--<Trigger Property="IsEnabled" Value="false">
  76. <Setter Property="Foreground" Value="White" />
  77. </Trigger>-->
  78. <Trigger Property="IsMouseOver" Value="True">
  79. <Setter TargetName="border2" Property="Background" Value="#191E36" />
  80. </Trigger>
  81. <Trigger Property="IsMouseOver" Value="False">
  82. <Setter TargetName="border2" Property="Background" Value="Transparent" />
  83. </Trigger>
  84. </ControlTemplate.Triggers>
  85. </ControlTemplate>
  86. </Setter.Value>
  87. </Setter>
  88. </Style>
  89. <Style x:Key="ExpanderStyle" TargetType="{x:Type Expander}">
  90. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
  91. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  92. <Setter Property="VerticalContentAlignment" Value="Stretch" />
  93. <Setter Property="BorderBrush" Value="Transparent" />
  94. <Setter Property="BorderThickness" Value="1" />
  95. <Setter Property="Template">
  96. <Setter.Value>
  97. <ControlTemplate TargetType="{x:Type Expander}">
  98. <DockPanel>
  99. <ToggleButton
  100. x:Name="HeaderSite"
  101. Height="20"
  102. Width="auto"
  103. MinWidth="0"
  104. MinHeight="0"
  105. Margin="1"
  106. Padding="{TemplateBinding Padding}"
  107. Background="Transparent"
  108. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  109. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
  110. Content="{TemplateBinding Header}"
  111. ContentTemplate="{TemplateBinding HeaderTemplate}"
  112. ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
  113. DockPanel.Dock="Top"
  114. FontFamily="{TemplateBinding FontFamily}"
  115. FontSize="{TemplateBinding FontSize}"
  116. FontStretch="{TemplateBinding FontStretch}"
  117. FontStyle="{TemplateBinding FontStyle}"
  118. FontWeight="{TemplateBinding FontWeight}"
  119. Foreground="{TemplateBinding Foreground}"
  120. IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
  121. Style="{StaticResource ToggleButtonStyle}" />
  122. <ContentPresenter
  123. x:Name="ExpandSite"
  124. Margin="{TemplateBinding Padding}"
  125. HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  126. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
  127. DockPanel.Dock="Left"
  128. Focusable="false"
  129. Visibility="Visible" />
  130. </DockPanel>
  131. <ControlTemplate.Triggers>
  132. <Trigger Property="IsExpanded" Value="True">
  133. <Setter TargetName="ExpandSite" Property="Visibility" Value="Collapsed" />
  134. </Trigger>
  135. </ControlTemplate.Triggers>
  136. </ControlTemplate>
  137. </Setter.Value>
  138. </Setter>
  139. </Style>
  140. <!--#endregion-->
  141. </UserControl.Resources>
  142. <Grid>
  143. <Grid.RowDefinitions>
  144. <RowDefinition Height="50"/>
  145. <RowDefinition />
  146. </Grid.RowDefinitions>
  147. <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
  148. <CheckBox
  149. x:Name="IsUseLocalRecipe"
  150. Margin="0,0,10,0"
  151. Content="使用本地配方配料"
  152. FontFamily="楷体"
  153. VerticalAlignment="Center"
  154. Foreground="Aqua"
  155. IsChecked="{Binding IsUseLocalRecipe}" />
  156. <!--<pry:IcoButton
  157. Width="140"
  158. Margin="10"
  159. HorizontalAlignment="Left"
  160. Command="{Binding RefreshRecipe}"
  161. Content="刷新配方"
  162. FontSize="16"
  163. Foreground="Aqua"
  164. IcoText="&#xe626;"
  165. Style="{StaticResource IcoButtonStyle}" />-->
  166. <pry:IcoButton
  167. Width="140"
  168. Margin="10"
  169. HorizontalAlignment="Left"
  170. Command="{Binding NewRecipe}"
  171. Content="新建配方"
  172. FontSize="16"
  173. Foreground="Aqua"
  174. IcoText="&#xe626;"
  175. Style="{StaticResource IcoButtonStyle}" />
  176. <!--<pry:IcoButton
  177. Width="140"
  178. Margin="10"
  179. HorizontalAlignment="Left"
  180. Command="{Binding NewSimulateRecipe}"
  181. Content="新建模拟配方"
  182. FontSize="16"
  183. Foreground="Aqua"
  184. IcoText="&#xe626;"
  185. Style="{StaticResource IcoButtonStyle}" />-->
  186. <pry:IcoButton
  187. Grid.Column="3"
  188. Width="140"
  189. Margin="10"
  190. HorizontalAlignment="Left"
  191. Command="{Binding ClearAllRecipe}"
  192. Content="清除所有配方"
  193. FontSize="16"
  194. Foreground="Aqua"
  195. IcoText="&#xe635;"
  196. IsEnabled="True"
  197. Style="{StaticResource IcoButtonStyle}" />
  198. </StackPanel>
  199. <ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Hidden">
  200. <ListBox
  201. Grid.Row="2"
  202. Margin="5"
  203. VerticalAlignment="Top"
  204. Background="Transparent"
  205. BorderThickness="0"
  206. ItemsSource="{Binding Recipes}"
  207. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  208. <ListBox.ItemsPanel>
  209. <ItemsPanelTemplate>
  210. <UniformGrid
  211. HorizontalAlignment="Left"
  212. VerticalAlignment="Top"
  213. Columns="8" />
  214. </ItemsPanelTemplate>
  215. </ListBox.ItemsPanel>
  216. <ListBox.ItemTemplate>
  217. <DataTemplate>
  218. <Grid
  219. Name="tt"
  220. Height="220"
  221. Margin="5">
  222. <Grid.RowDefinitions>
  223. <RowDefinition Height="30" />
  224. <RowDefinition Height="25" />
  225. <RowDefinition Height="25" />
  226. <RowDefinition Height="25" />
  227. <RowDefinition Height="25" />
  228. <RowDefinition Height="58" />
  229. <RowDefinition Height="2" />
  230. <RowDefinition Height="40" />
  231. </Grid.RowDefinitions>
  232. <Grid.ColumnDefinitions>
  233. <ColumnDefinition></ColumnDefinition>
  234. <ColumnDefinition></ColumnDefinition>
  235. </Grid.ColumnDefinitions>
  236. <Image
  237. Grid.RowSpan="8"
  238. Grid.ColumnSpan="2"
  239. Source="/BPASmartClient.CustomResource;component/Image/配方背景/竖背景框.png"
  240. Stretch="Fill" />
  241. <TextBlock
  242. Grid.Row="0"
  243. Grid.ColumnSpan="2"
  244. FontSize="14"
  245. Margin="5,0,0,0"
  246. HorizontalAlignment="Center"
  247. VerticalAlignment="Center"
  248. Foreground="#FF2AB2E7"
  249. Text="配方信息" />
  250. <TextBlock
  251. Grid.Row="1"
  252. Grid.Column="0"
  253. Margin="2,5,0,0"
  254. HorizontalAlignment="Center"
  255. VerticalAlignment="Center"
  256. FontSize="12"
  257. Foreground="#FF2AB2E7"
  258. Text="配方名称:" />
  259. <TextBlock
  260. Grid.Row="1"
  261. Grid.Column="1"
  262. Margin="2,5,0,0"
  263. HorizontalAlignment="Center"
  264. VerticalAlignment="Center"
  265. FontSize="12"
  266. Foreground="#FF2AB2E7"
  267. Text="{Binding RecipeName}" />
  268. <TextBlock
  269. Grid.Row="2"
  270. Grid.Column="0"
  271. Margin="2,5,0,0"
  272. HorizontalAlignment="Center"
  273. VerticalAlignment="Center"
  274. FontSize="12"
  275. Foreground="#FF2AB2E7"
  276. Text="配方编号:" />
  277. <TextBlock
  278. Grid.Row="2"
  279. Grid.Column="1"
  280. Margin="2,5,0,0"
  281. HorizontalAlignment="Center"
  282. VerticalAlignment="Center"
  283. FontSize="12"
  284. Foreground="#FF2AB2E7"
  285. Text="{Binding RecipeCode}" />
  286. <TextBlock
  287. Grid.Row="3"
  288. Grid.Column="0"
  289. Margin="2,5,0,0"
  290. HorizontalAlignment="Center"
  291. VerticalAlignment="Center"
  292. FontSize="12"
  293. Foreground="#FF2AB2E7"
  294. Text="托盘编号:" />
  295. <TextBlock
  296. Grid.Row="3"
  297. Grid.Column="1"
  298. Margin="2,5,0,0"
  299. HorizontalAlignment="Center"
  300. VerticalAlignment="Center"
  301. FontSize="12"
  302. Foreground="#FF2AB2E7"
  303. Text="{Binding TrayCode}" />
  304. <TextBlock
  305. Grid.Row="4"
  306. Grid.Column="0"
  307. Margin="2,5,0,0"
  308. HorizontalAlignment="Center"
  309. VerticalAlignment="Center"
  310. FontSize="12"
  311. Foreground="#FF2AB2E7"
  312. Text="订单类型:" />
  313. <TextBlock
  314. Grid.Row="4"
  315. Grid.Column="1"
  316. Margin="2,5,0,0"
  317. HorizontalAlignment="Center"
  318. VerticalAlignment="Center"
  319. FontSize="12"
  320. Foreground="#FF2AB2E7"
  321. Text="{Binding OrderType}" />
  322. <!--<ScrollViewer
  323. Grid.Row="5"
  324. VerticalAlignment="Top"
  325. Background="Transparent"
  326. HorizontalScrollBarVisibility="Hidden"
  327. VerticalScrollBarVisibility="Hidden">
  328. <ItemsControl ItemsSource="{Binding RawMaterial}">
  329. <ItemsControl.ItemsPanel>
  330. <ItemsPanelTemplate>
  331. <StackPanel/>
  332. </ItemsPanelTemplate>
  333. </ItemsControl.ItemsPanel>
  334. <ItemsControl.ItemTemplate>
  335. <DataTemplate>
  336. <Expander Style="{StaticResource ExpanderStyle}" Margin="40,0,0,0">
  337. <Expander.Header>
  338. <StackPanel Orientation="Horizontal">
  339. <Border Width="15" Height="15" CornerRadius="15" HorizontalAlignment="Left" Margin="0,0,5,0">
  340. <Border.Background>
  341. <RadialGradientBrush>
  342. <GradientStop Color="#FF2AB2E7" Offset="0.5" />
  343. <GradientStop Color="White"/>
  344. </RadialGradientBrush>
  345. </Border.Background>
  346. </Border>
  347. <TextBlock Text="{Binding RawMaterialName }" Foreground="#FF2AB2E7" VerticalAlignment="Center" FontSize="14" />
  348. </StackPanel>
  349. </Expander.Header>
  350. <Expander.Content>
  351. <StackPanel Margin="36,0,0,0">
  352. <StackPanel Orientation="Horizontal">
  353. <TextBlock Text="原料桶号:" Foreground="#FF2AB2E7"/>
  354. <TextBlock Text="{Binding RawMaterialBarrelNum}" Foreground="#FF2AB2E7"/>
  355. </StackPanel>
  356. <StackPanel Orientation="Horizontal">
  357. <TextBlock Text="原料重量:" Foreground="#FF2AB2E7"/>
  358. <TextBlock Text="{Binding RawMaterialWeight}" Foreground="#FF2AB2E7"/>
  359. </StackPanel>
  360. </StackPanel>
  361. </Expander.Content>
  362. </Expander>
  363. </DataTemplate>
  364. </ItemsControl.ItemTemplate>
  365. </ItemsControl>
  366. </ScrollViewer>-->
  367. <Image
  368. Grid.Row="6"
  369. Grid.ColumnSpan="2"
  370. Width="{Binding ElementName=tt, Path=ActualWidth}"
  371. Height="2"
  372. VerticalAlignment="Bottom"
  373. Source="/BPASmartClient.CustomResource;component/Image/直线.png"
  374. Stretch="Fill" />
  375. <Grid
  376. Name="gr"
  377. Grid.Row="7"
  378. Grid.ColumnSpan="2"
  379. Height="30"
  380. Margin="0,0,0,10"
  381. VerticalAlignment="Bottom"
  382. Background="Transparent">
  383. <Grid.ColumnDefinitions>
  384. <ColumnDefinition />
  385. <ColumnDefinition />
  386. </Grid.ColumnDefinitions>
  387. <!--<Image
  388. Height="2"
  389. Grid.ColumnSpan="2"
  390. Width="{Binding ElementName=gr, Path=ActualWidth}"
  391. VerticalAlignment="Top"
  392. Source="/BPASmartClient.CustomResource;component/Image/直线.png" />-->
  393. <!--<pry:IcoButton
  394. Grid.Column="1"
  395. Width="{Binding ElementName=gr, Path=ActualWidth}"
  396. Height="{Binding ElementName=gr, Path=ActualHeight}"
  397. Margin="4,4,4,0"
  398. HorizontalAlignment="Center"
  399. VerticalAlignment="Center"
  400. Background="#11F53F62"
  401. BorderThickness="0"
  402. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  403. CommandParameter="{Binding RecipCode}"
  404. Content="删除"
  405. EnterBackground="#22F53F62"
  406. FontStyle="Normal"
  407. Foreground="#FFF53F62"
  408. IcoText="&#xe68e;"
  409. Style="{StaticResource IcoButtonStyle}" />-->
  410. <pry:IcoButton
  411. Grid.Column="1"
  412. Width="{Binding ElementName=gr, Path=ActualWidth}"
  413. Height="{Binding ElementName=gr, Path=ActualHeight}"
  414. Margin="3,4,4,0"
  415. HorizontalAlignment="Center"
  416. VerticalAlignment="Center"
  417. Background="#11F53F62"
  418. BorderThickness="0"
  419. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  420. CommandParameter="{Binding RecipeCode}"
  421. Content="删除"
  422. EnterBackground="#22F53F62"
  423. Foreground="#FFF53F62"
  424. IcoText="&#xe68e;"
  425. Style="{StaticResource IcoButtonStyle}" />
  426. <pry:IcoButton
  427. Width="{Binding ElementName=gr, Path=ActualWidth}"
  428. Height="{Binding ElementName=gr, Path=ActualHeight}"
  429. Margin="3,4,4,0"
  430. HorizontalAlignment="Center"
  431. VerticalAlignment="Center"
  432. Background="#112AB2E7"
  433. BorderThickness="0"
  434. Command="{Binding DataContext.DetailsCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  435. CommandParameter="{Binding RecipeCode}"
  436. Content="编辑"
  437. EnterBackground="#222AB2E7"
  438. Foreground="#FF2AB2E7"
  439. IcoText="&#xe636;"
  440. Style="{StaticResource IcoButtonStyle}" />
  441. </Grid>
  442. </Grid>
  443. </DataTemplate>
  444. </ListBox.ItemTemplate>
  445. </ListBox>
  446. </ScrollViewer>
  447. </Grid>
  448. </UserControl>