终端一体化运控平台
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

RecipeReceiveView.xaml 26 KiB

před 2 roky
před 2 roky
před 2 roky
před 2 roky
před 2 roky
před 1 rokem
před 2 roky
před 1 rokem
před 1 rokem
před 2 roky
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 1 rokem
před 2 roky
před 2 roky
před 1 rokem
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512
  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. Width="auto"
  102. Height="20"
  103. MinWidth="0"
  104. MinHeight="0"
  105. Margin="1"
  106. Padding="{TemplateBinding Padding}"
  107. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  108. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
  109. Background="Transparent"
  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. VerticalAlignment="Center"
  152. Content="使用本地配方配料"
  153. FontFamily="楷体"
  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="Disabled">
  200. <ListBox
  201. x:Name="recipeBox"
  202. Grid.Row="2"
  203. Margin="5"
  204. VerticalAlignment="Top"
  205. Background="Transparent"
  206. BorderThickness="0"
  207. ItemsSource="{Binding Recipes}"
  208. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  209. <ListBox.ItemsPanel>
  210. <ItemsPanelTemplate>
  211. <UniformGrid
  212. HorizontalAlignment="Left"
  213. VerticalAlignment="Top"
  214. Columns="8" />
  215. </ItemsPanelTemplate>
  216. </ListBox.ItemsPanel>
  217. <ListBox.GroupStyle>
  218. <GroupStyle>
  219. <GroupStyle.ContainerStyle>
  220. <Style BasedOn="{StaticResource ListBoxGroupStyle}" TargetType="{x:Type GroupItem}" />
  221. </GroupStyle.ContainerStyle>
  222. </GroupStyle>
  223. </ListBox.GroupStyle>
  224. <ListBox.ItemTemplate>
  225. <DataTemplate>
  226. <Grid
  227. Name="tt"
  228. Height="220"
  229. Margin="5">
  230. <Grid.RowDefinitions>
  231. <RowDefinition Height="30" />
  232. <RowDefinition Height="25" />
  233. <RowDefinition Height="25" />
  234. <RowDefinition Height="25" />
  235. <RowDefinition Height="25" />
  236. <RowDefinition Height="58" />
  237. <RowDefinition Height="2" />
  238. <RowDefinition Height="40" />
  239. </Grid.RowDefinitions>
  240. <Grid.ColumnDefinitions>
  241. <ColumnDefinition />
  242. <ColumnDefinition />
  243. </Grid.ColumnDefinitions>
  244. <Image
  245. Grid.RowSpan="8"
  246. Grid.ColumnSpan="2"
  247. Source="/BPASmartClient.CustomResource;component/Image/配方背景/竖背景框.png"
  248. Stretch="Fill" />
  249. <TextBlock
  250. Grid.Row="0"
  251. Grid.ColumnSpan="2"
  252. Margin="5,0,0,0"
  253. HorizontalAlignment="Center"
  254. VerticalAlignment="Center"
  255. FontSize="14"
  256. Foreground="#FF2AB2E7"
  257. Text="配方信息" />
  258. <TextBlock
  259. Grid.Row="1"
  260. Grid.Column="0"
  261. Margin="2,5,0,0"
  262. HorizontalAlignment="Center"
  263. VerticalAlignment="Center"
  264. FontSize="12"
  265. Foreground="#FF2AB2E7"
  266. Text="配方名称:" />
  267. <TextBlock
  268. Grid.Row="1"
  269. Grid.Column="1"
  270. Margin="2,5,0,0"
  271. HorizontalAlignment="Center"
  272. VerticalAlignment="Center"
  273. FontSize="12"
  274. Foreground="#FF2AB2E7"
  275. Text="{Binding RecipeName}" />
  276. <TextBlock
  277. Grid.Row="5"
  278. Grid.Column="0"
  279. Margin="2,5,0,0"
  280. HorizontalAlignment="Center"
  281. VerticalAlignment="Center"
  282. FontSize="12"
  283. Foreground="#FF2AB2E7"
  284. Text="配方类别:" />
  285. <TextBlock
  286. Grid.Row="2"
  287. Grid.Column="1"
  288. Margin="2,5,0,0"
  289. HorizontalAlignment="Center"
  290. VerticalAlignment="Center"
  291. FontSize="12"
  292. Foreground="#FF2AB2E7"
  293. Text="{Binding RecipeCode}" />
  294. <TextBlock
  295. Grid.Row="3"
  296. Grid.Column="0"
  297. Margin="2,5,0,0"
  298. HorizontalAlignment="Center"
  299. VerticalAlignment="Center"
  300. FontSize="12"
  301. Foreground="#FF2AB2E7"
  302. Text="托盘编号:" />
  303. <TextBlock
  304. Grid.Row="3"
  305. Grid.Column="1"
  306. Margin="2,5,0,0"
  307. HorizontalAlignment="Center"
  308. VerticalAlignment="Center"
  309. FontSize="12"
  310. Foreground="#FF2AB2E7"
  311. Text="{Binding TrayCode}" />
  312. <TextBlock
  313. Grid.Row="4"
  314. Grid.Column="0"
  315. Margin="2,5,0,0"
  316. HorizontalAlignment="Center"
  317. VerticalAlignment="Center"
  318. FontSize="12"
  319. Foreground="#FF2AB2E7"
  320. Text="订单类型:" />
  321. <TextBlock
  322. Grid.Row="4"
  323. Grid.Column="1"
  324. Margin="2,5,0,0"
  325. HorizontalAlignment="Center"
  326. VerticalAlignment="Center"
  327. FontSize="12"
  328. Foreground="#FF2AB2E7"
  329. Text="{Binding OrderType}" />
  330. <!--<ScrollViewer
  331. Grid.Row="5"
  332. VerticalAlignment="Top"
  333. Background="Transparent"
  334. HorizontalScrollBarVisibility="Hidden"
  335. VerticalScrollBarVisibility="Hidden">
  336. <ItemsControl ItemsSource="{Binding RawMaterial}">
  337. <ItemsControl.ItemsPanel>
  338. <ItemsPanelTemplate>
  339. <StackPanel/>
  340. </ItemsPanelTemplate>
  341. </ItemsControl.ItemsPanel>
  342. <ItemsControl.ItemTemplate>
  343. <DataTemplate>
  344. <Expander Style="{StaticResource ExpanderStyle}" Margin="40,0,0,0">
  345. <Expander.Header>
  346. <StackPanel Orientation="Horizontal">
  347. <Border Width="15" Height="15" CornerRadius="15" HorizontalAlignment="Left" Margin="0,0,5,0">
  348. <Border.Background>
  349. <RadialGradientBrush>
  350. <GradientStop Color="#FF2AB2E7" Offset="0.5" />
  351. <GradientStop Color="White"/>
  352. </RadialGradientBrush>
  353. </Border.Background>
  354. </Border>
  355. <TextBlock Text="{Binding RawMaterialName }" Foreground="#FF2AB2E7" VerticalAlignment="Center" FontSize="14" />
  356. </StackPanel>
  357. </Expander.Header>
  358. <Expander.Content>
  359. <StackPanel Margin="36,0,0,0">
  360. <StackPanel Orientation="Horizontal">
  361. <TextBlock Text="原料桶号:" Foreground="#FF2AB2E7"/>
  362. <TextBlock Text="{Binding RawMaterialBarrelNum}" Foreground="#FF2AB2E7"/>
  363. </StackPanel>
  364. <StackPanel Orientation="Horizontal">
  365. <TextBlock Text="原料重量:" Foreground="#FF2AB2E7"/>
  366. <TextBlock Text="{Binding RawMaterialWeight}" Foreground="#FF2AB2E7"/>
  367. </StackPanel>
  368. </StackPanel>
  369. </Expander.Content>
  370. </Expander>
  371. </DataTemplate>
  372. </ItemsControl.ItemTemplate>
  373. </ItemsControl>
  374. </ScrollViewer>-->
  375. <TextBlock
  376. Grid.Row="5"
  377. Grid.Column="1"
  378. Margin="2,5,0,0"
  379. HorizontalAlignment="Center"
  380. VerticalAlignment="Center"
  381. FontSize="12"
  382. Foreground="#FF2AB2E7"
  383. Text="{Binding RecipeCategory}" />
  384. <TextBlock
  385. Grid.Row="2"
  386. Grid.Column="0"
  387. Margin="2,5,0,0"
  388. HorizontalAlignment="Center"
  389. VerticalAlignment="Center"
  390. FontSize="12"
  391. Foreground="#FF2AB2E7"
  392. Text="配方编号:" />
  393. <Image
  394. Grid.Row="6"
  395. Grid.ColumnSpan="2"
  396. Width="{Binding ElementName=tt, Path=ActualWidth}"
  397. Height="2"
  398. VerticalAlignment="Bottom"
  399. Source="/BPASmartClient.CustomResource;component/Image/直线.png"
  400. Stretch="Fill" />
  401. <Grid
  402. Name="gr"
  403. Grid.Row="7"
  404. Grid.ColumnSpan="2"
  405. Height="30"
  406. Margin="0,0,0,10"
  407. VerticalAlignment="Bottom"
  408. Background="Transparent">
  409. <Grid.ColumnDefinitions>
  410. <ColumnDefinition />
  411. <ColumnDefinition />
  412. </Grid.ColumnDefinitions>
  413. <!--<Image
  414. Height="2"
  415. Grid.ColumnSpan="2"
  416. Width="{Binding ElementName=gr, Path=ActualWidth}"
  417. VerticalAlignment="Top"
  418. Source="/BPASmartClient.CustomResource;component/Image/直线.png" />-->
  419. <!--<pry:IcoButton
  420. Grid.Column="1"
  421. Width="{Binding ElementName=gr, Path=ActualWidth}"
  422. Height="{Binding ElementName=gr, Path=ActualHeight}"
  423. Margin="4,4,4,0"
  424. HorizontalAlignment="Center"
  425. VerticalAlignment="Center"
  426. Background="#11F53F62"
  427. BorderThickness="0"
  428. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  429. CommandParameter="{Binding RecipCode}"
  430. Content="删除"
  431. EnterBackground="#22F53F62"
  432. FontStyle="Normal"
  433. Foreground="#FFF53F62"
  434. IcoText="&#xe68e;"
  435. Style="{StaticResource IcoButtonStyle}" />-->
  436. <pry:IcoButton
  437. Grid.Column="1"
  438. Width="{Binding ElementName=gr, Path=ActualWidth}"
  439. Height="{Binding ElementName=gr, Path=ActualHeight}"
  440. Margin="3,4,4,0"
  441. HorizontalAlignment="Center"
  442. VerticalAlignment="Center"
  443. Background="#11F53F62"
  444. BorderThickness="0"
  445. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  446. CommandParameter="{Binding RecipeCode}"
  447. Content="删除"
  448. EnterBackground="#22F53F62"
  449. Foreground="#FFF53F62"
  450. IcoText="&#xe68e;"
  451. Style="{StaticResource IcoButtonStyle}" />
  452. <pry:IcoButton
  453. Width="{Binding ElementName=gr, Path=ActualWidth}"
  454. Height="{Binding ElementName=gr, Path=ActualHeight}"
  455. Margin="3,4,4,0"
  456. HorizontalAlignment="Center"
  457. VerticalAlignment="Center"
  458. Background="#112AB2E7"
  459. BorderThickness="0"
  460. Command="{Binding DataContext.DetailsCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
  461. CommandParameter="{Binding RecipeCode}"
  462. Content="编辑"
  463. EnterBackground="#222AB2E7"
  464. Foreground="#FF2AB2E7"
  465. IcoText="&#xe636;"
  466. Style="{StaticResource IcoButtonStyle}" />
  467. </Grid>
  468. </Grid>
  469. </DataTemplate>
  470. </ListBox.ItemTemplate>
  471. </ListBox>
  472. </ScrollViewer>
  473. </Grid>
  474. </UserControl>