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

MainControlView.xaml 13 KiB

пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
пре 2 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <UserControl x:Class="BPASmartClient.MilkWithTea.View.MainControlView"
  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:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:BPASmartClient.MilkWithTea.View"
  7. xmlns:vm="clr-namespace:BPASmartClient.MilkWithTea.ViewModel"
  8. xmlns:controls="clr-namespace:BPASmartClient.MilkWithTea.Control"
  9. xmlns:con="clr-namespace:BPASmartClient.CustomResource.Converters;assembly=BPASmartClient.CustomResource"
  10. mc:Ignorable="d"
  11. d:DesignHeight="800" d:DesignWidth="1400" Background="Transparent">
  12. <UserControl.DataContext>
  13. <vm:MainControlViewModel/>
  14. </UserControl.DataContext>
  15. <UserControl.Resources>
  16. <ResourceDictionary>
  17. <con:ColorConverter x:Key="ColorConverter" />
  18. <con:TextConverter x:Key="TextConverter" />
  19. <con:OpacityConverter x:Key="OpacityConverter"/>
  20. <Style TargetType="TextBlock">
  21. <Setter Property="FontSize" Value="28"/>
  22. <Setter Property="VerticalAlignment" Value="Center"/>
  23. <Setter Property="Foreground" Value="DarkSlateGray"/>
  24. <Setter Property="FontWeight" Value="Bold"/>
  25. </Style>
  26. <Style TargetType="{x:Type ListBox}">
  27. <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
  28. <Setter Property="BorderThickness" Value="0"/>
  29. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  30. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
  31. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
  32. <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
  33. <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
  34. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  35. <Setter Property="VerticalContentAlignment" Value="Center"/>
  36. <Setter Property="Template">
  37. <Setter.Value>
  38. <ControlTemplate TargetType="{x:Type ListBox}">
  39. <Border x:Name="Bd" BorderBrush="Transparent" BorderThickness="0"
  40. Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
  41. <ScrollViewer Focusable="false">
  42. <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Stretch"/>
  43. </ScrollViewer>
  44. </Border>
  45. <ControlTemplate.Triggers>
  46. <MultiTrigger>
  47. <MultiTrigger.Conditions>
  48. <Condition Property="IsGrouping" Value="true"/>
  49. </MultiTrigger.Conditions>
  50. <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
  51. </MultiTrigger>
  52. </ControlTemplate.Triggers>
  53. </ControlTemplate>
  54. </Setter.Value>
  55. </Setter>
  56. </Style>
  57. <Style TargetType="DataGridRow">
  58. <Setter Property="FontSize" Value="16"/>
  59. <Setter Property="VerticalAlignment" Value="Center"/>
  60. <Setter Property="Height" Value="28"/>
  61. <Style.Triggers>
  62. <Trigger Property="IsSelected" Value="True">
  63. <Setter Property="Foreground" Value="Black"/>
  64. </Trigger>
  65. <Trigger Property="IsMouseOver" Value="True">
  66. <Setter Property="Foreground" Value="White"/>
  67. <Setter Property="Background" Value="#4fade8" />
  68. </Trigger>
  69. </Style.Triggers>
  70. </Style>
  71. </ResourceDictionary>
  72. </UserControl.Resources>
  73. <Grid Background="#F3F6F9" Margin="20">
  74. <Grid.ColumnDefinitions>
  75. <ColumnDefinition Width="6*"/>
  76. <ColumnDefinition Width="1"/>
  77. <ColumnDefinition Width="3*"/>
  78. </Grid.ColumnDefinitions>
  79. <Grid.RowDefinitions>
  80. <RowDefinition Height="2*"/>
  81. <RowDefinition Height="60"/>
  82. <RowDefinition Height="280"/>
  83. <RowDefinition Height="*"/>
  84. </Grid.RowDefinitions>
  85. <GroupBox Header="订单队列" Style="{StaticResource GroupBoxStyle1}" FontSize="18">
  86. <DataGrid ItemsSource="{Binding orderStatusLists}"
  87. Grid.Row="1" AutoGenerateColumns="False" RowHeight="250"
  88. FrozenColumnCount="1" Margin="30,5"
  89. VerticalAlignment="Top" ForceCursor="False"
  90. IsReadOnly="True"
  91. CanUserResizeColumns="False" CanUserResizeRows="False" SelectionMode="Single"
  92. CanUserReorderColumns="False" RowHeaderWidth="0" CanUserAddRows="False">
  93. <DataGrid.Columns>
  94. <DataGridTextColumn Header="取餐号" Binding="{Binding OrderPush.SortNum}" Width="*"
  95. Foreground="{Binding OrderStatus, Converter={StaticResource ColorConverter}}">
  96. </DataGridTextColumn>
  97. <DataGridTextColumn Header="商品名" Binding="{Binding OrderPush.GoodsName}" Width="2*" Foreground="Black" />
  98. <DataGridTextColumn Header="开始时间" Binding="{Binding StartDate}" Width="2*" Foreground="Black"/>
  99. <DataGridTextColumn Header="结束时间" Binding="{Binding EndDate}" Width="2*" Foreground="Black"/>
  100. <DataGridTextColumn Header="制作状态" Binding="{Binding OrderStatus, Converter={StaticResource TextConverter}}" Width="2*" Foreground="Black"/>
  101. <DataGridTextColumn Header="完成时间" Binding="{Binding CompleteDate}" Width="2*" Foreground="Black" />
  102. </DataGrid.Columns>
  103. </DataGrid>
  104. </GroupBox>
  105. <GroupBox Grid.Row="2" Header="当前奶茶进度" Style="{StaticResource GroupBoxStyle1}" FontSize="18">
  106. <Grid >
  107. <Grid.ColumnDefinitions>
  108. <ColumnDefinition Width="220"/>
  109. <ColumnDefinition Width="200"/>
  110. <ColumnDefinition Width="200"/>
  111. <ColumnDefinition Width="*"/>
  112. </Grid.ColumnDefinitions>
  113. <TextBlock Grid.Column="1" Text="{Binding CurrentGood}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20"/>
  114. <controls:CircularProgressBar Grid.Column="2" Percent="{Binding MakePercent}" />
  115. </Grid>
  116. </GroupBox>
  117. <Border Grid.Column="1" Grid.RowSpan="5" BorderBrush="Black" BorderThickness="1" />
  118. <Grid Opacity="{Binding MakeEnable ,Converter= {StaticResource OpacityConverter}}" Grid.Column="2" Grid.RowSpan="5">
  119. <Grid.ColumnDefinitions>
  120. <ColumnDefinition Width="*"/>
  121. <ColumnDefinition Width="*"/>
  122. </Grid.ColumnDefinitions>
  123. <Grid.RowDefinitions>
  124. <RowDefinition Height="60"/>
  125. <RowDefinition Height="60"/>
  126. <RowDefinition Height="50"/>
  127. <RowDefinition Height="*"/>
  128. <RowDefinition Height="100"/>
  129. </Grid.RowDefinitions>
  130. <TextBlock Grid.ColumnSpan="2" Text="本地奶茶下单" HorizontalAlignment="Center" />
  131. <Border Grid.ColumnSpan="2" Grid.Row="1" Background="Transparent" Visibility="{Binding Visibility}" Margin="5">
  132. <Border Background="White" Height="50" CornerRadius="10" HorizontalAlignment="Stretch">
  133. <Grid Height="Auto">
  134. <Grid.ColumnDefinitions>
  135. <ColumnDefinition Width="50"/>
  136. <ColumnDefinition Width="*"/>
  137. </Grid.ColumnDefinitions>
  138. <TextBlock Text="&#xe62f;" FontFamily="/BPASmartClient.CustomResource;component/Fonts/MT/#iconfont" FontSize="28"
  139. VerticalAlignment="Center" HorizontalAlignment="Center"/>
  140. <TextBox Grid.Column="1" x:Name="searchQuery"
  141. HorizontalAlignment="Stretch" VerticalAlignment="Stretch" VerticalContentAlignment="Center" TextAlignment="Left"
  142. BorderThickness="0" Background="Transparent"
  143. IsEnabled="{Binding MakeEnable}"/>
  144. <TextBlock Grid.Column="1" Margin="3,0,0,0" Text="搜索本地奶茶" FontWeight="Bold" HorizontalAlignment="Left" TextAlignment="Left" VerticalAlignment="Center" Foreground="LightGray" IsHitTestVisible="False">
  145. <TextBlock.Style>
  146. <Style TargetType="{x:Type TextBlock}">
  147. <Setter Property="Visibility" Value="Collapsed"/>
  148. <Style.Triggers>
  149. <DataTrigger Binding="{Binding Text, ElementName=searchQuery}" Value="">
  150. <Setter Property="Visibility" Value="Visible"/>
  151. </DataTrigger>
  152. </Style.Triggers>
  153. </Style>
  154. </TextBlock.Style>
  155. </TextBlock>
  156. </Grid>
  157. </Border>
  158. </Border>
  159. <TextBlock Text="奶茶" Grid.Row="2" Margin="20,10" FontSize="22" />
  160. <TextBlock Text="配方" Grid.Row="2" Grid.Column="1" Margin="10" FontSize="22" />
  161. <Border BorderBrush="#D5DFE5" BorderThickness="4" Grid.Row="3" Margin="20,0,0,0">
  162. <ListBox ItemsSource="{Binding localTeaWithMilks}" SelectionChanged="ListBox_SelectionChanged" IsEnabled="{Binding MakeEnable}"
  163. Foreground="LightSlateGray">
  164. <ListBox.ItemTemplate>
  165. <DataTemplate >
  166. <Grid>
  167. <TextBlock Text="{Binding GoodNames}" Margin="5,10" FontSize="22"
  168. Background="Transparent" />
  169. </Grid>
  170. </DataTemplate>
  171. </ListBox.ItemTemplate>
  172. </ListBox>
  173. </Border>
  174. <ListBox x:Name="recipeList" Grid.Row="3" Grid.Column="1" Margin="5,10"
  175. ItemsSource="{Binding materialRecipes}" FontSize="18"
  176. Width="200" HorizontalAlignment="Left" Foreground="LightSlateGray">
  177. <ListBox.ItemTemplate>
  178. <DataTemplate >
  179. <Grid Width="180">
  180. <Grid.ColumnDefinitions>
  181. <ColumnDefinition Width="*"/>
  182. <ColumnDefinition Width="40"/>
  183. <ColumnDefinition Width="15"/>
  184. </Grid.ColumnDefinitions>
  185. <TextBlock Text="{Binding Material}" Margin="20,10" FontSize="16"/>
  186. <TextBlock Text="{Binding MaterialWeight}" Margin="5,10,0,10" Grid.Column="1" HorizontalAlignment="Left" />
  187. <TextBlock Text="g" Margin="0,10" HorizontalAlignment="Right" Grid.Column="2"/>
  188. </Grid>
  189. </DataTemplate>
  190. </ListBox.ItemTemplate>
  191. </ListBox>
  192. <Button Grid.Row="4" Style="{StaticResource buttonNormal}" VerticalAlignment="Top" Height="40" Width="150" Margin="20"
  193. Command="{Binding MakeGoodCommand}" IsEnabled="{Binding MakeEnable}">
  194. <Button.Content>
  195. <Grid>
  196. <Grid.ColumnDefinitions>
  197. <ColumnDefinition Width="30"/>
  198. <ColumnDefinition Width="*"/>
  199. </Grid.ColumnDefinitions>
  200. <TextBlock Text="&#xe607;" VerticalAlignment="Center" Foreground="White" FontSize="18" HorizontalAlignment="Center" FontFamily="/BPASmartClient.CustomResource;component/Fonts/MT/#iconfont"/>
  201. <TextBlock Grid.Column="1" Text="制作奶茶" TextAlignment="Left" VerticalAlignment="Center" FontWeight="Bold" Foreground="White" FontSize="16"/>
  202. </Grid>
  203. </Button.Content>
  204. </Button>
  205. </Grid>
  206. </Grid>
  207. </UserControl>