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

245 рядки
10 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.MorkCL.View.ItemStorageView"
  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:local="clr-namespace:BPASmartClient.MorkCL.View"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  9. xmlns:vm="clr-namespace:BPASmartClient.MorkCL.ViewModel"
  10. xmlns:converter="clr-namespace:BPASmartClient.MorkCL.Converter"
  11. Name="库位状态"
  12. d:DesignHeight="900"
  13. d:DesignWidth="1200"
  14. mc:Ignorable="d">
  15. <UserControl.DataContext>
  16. <vm:ItemStorageViewModel />
  17. </UserControl.DataContext>
  18. <UserControl.Resources>
  19. <ResourceDictionary>
  20. <ResourceDictionary.MergedDictionaries>
  21. <ResourceDictionary Source="/BPASmartClient.MorkCL;component/CustomStyle/CustomStyle.xaml" />
  22. </ResourceDictionary.MergedDictionaries>
  23. <converter:Bool2VisibilityConverter x:Key="Bool2VisibilityConverter" />
  24. </ResourceDictionary>
  25. </UserControl.Resources>
  26. <Grid>
  27. <Grid.ColumnDefinitions>
  28. <ColumnDefinition Width="200" />
  29. <ColumnDefinition Width="1*" />
  30. </Grid.ColumnDefinitions>
  31. <Grid.RowDefinitions>
  32. <RowDefinition Height="0.3*" />
  33. <RowDefinition Height="0.7*" />
  34. </Grid.RowDefinitions>
  35. <!--#region 入库电子称状态-->
  36. <pry:ImageBorder Margin="5,15" />
  37. <StackPanel Margin="15,20">
  38. <TextBlock Width="200" Text="{Binding ScaleCurrentWeight, StringFormat=当前重量:{0:F2} Kg}" />
  39. <Button
  40. Height="40"
  41. Margin="0,30"
  42. Command="{Binding InitialStorageCommand}"
  43. Content="清空全部库位" />
  44. <Button
  45. Height="50"
  46. Margin="0,10"
  47. Command="{Binding ModifySelectStorageCommand}"
  48. CommandParameter="{Binding ElementName=List_Ingre, Path=SelectedIndex}"
  49. Content="修改所选库位信息" />
  50. <Button
  51. Height="40"
  52. Command="{Binding ClearSelectStorageCommand}"
  53. CommandParameter="{Binding ElementName=List_Ingre, Path=SelectedIndex}"
  54. Content="清空所选库位信息" />
  55. </StackPanel>
  56. <!--#endregion-->
  57. <!--#region 入库操作-->
  58. <pry:ImageBorder Grid.Row="1" Margin="5,15" />
  59. <StackPanel Grid.Row="1" Margin="15,20">
  60. <TextBlock Text="入库名称:" />
  61. <ComboBox
  62. x:Name="cmbSelectName"
  63. Height="50"
  64. Margin="0,5"
  65. DisplayMemberPath="Name"
  66. FontSize="26"
  67. IsEditable="False"
  68. ItemsSource="{Binding Ingredients}" />
  69. <Button
  70. Height="40"
  71. Margin="0,10"
  72. Command="{Binding InStorageCommand}"
  73. CommandParameter="{Binding ElementName=cmbSelectName, Path=SelectedItem}"
  74. Content="入库" />
  75. <!--<Button
  76. Height="40"
  77. Margin="0,30,0,10"
  78. Command="{Binding WeigherTareCommand}"
  79. Content="电子秤除皮"/>-->
  80. <Button
  81. Height="40"
  82. Margin="0,10"
  83. Command="{Binding WeigherZeroCommand}"
  84. Content="电子秤置零" />
  85. </StackPanel>
  86. <!--#endregion-->
  87. <!--#region 辅料仓不需要显示,整体注释。-->
  88. <!--<pry:ImageBorder Grid.Column="1" Margin="15" Visibility="Collapsed"/>
  89. <ItemsControl
  90. Grid.Column="1"
  91. Margin="3"
  92. Background="Transparent"
  93. BorderThickness="1"
  94. ItemsSource="{Binding AccessoriesItorage}" Visibility="Collapsed"
  95. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  96. <ItemsControl.ItemsPanel>
  97. <ItemsPanelTemplate>
  98. <UniformGrid
  99. HorizontalAlignment="Center"
  100. VerticalAlignment="Center"
  101. Columns="8" />
  102. </ItemsPanelTemplate>
  103. </ItemsControl.ItemsPanel>
  104. <ItemsControl.ItemTemplate>
  105. <DataTemplate>
  106. <Border Margin="5" Background="Transparent">
  107. <Grid Height="180">
  108. <Grid.RowDefinitions>
  109. <RowDefinition />
  110. <RowDefinition />
  111. </Grid.RowDefinitions>
  112. <TextBlock
  113. Margin="0,0,0,25"
  114. HorizontalAlignment="Center"
  115. VerticalAlignment="Bottom"
  116. FontSize="25"
  117. Foreground="#ffccd61f"
  118. Text="{Binding Name}" />
  119. <TextBlock
  120. Grid.Row="1"
  121. Margin="0,0,0,35"
  122. HorizontalAlignment="Center"
  123. FontSize="20"
  124. Foreground="#FF0084FF"
  125. Text="{Binding Weight, StringFormat={}{0} g}" />
  126. <StackPanel
  127. Grid.Row="1"
  128. Margin="0,25"
  129. HorizontalAlignment="Center"
  130. Orientation="Horizontal">
  131. <TextBlock
  132. FontSize="20"
  133. Foreground="#FF0084FF"
  134. Text="{Binding ID, StringFormat={}{0} 号仓}" />
  135. </StackPanel>
  136. <Image
  137. Grid.RowSpan="2"
  138. Source="/BPASmartClient.CustomResource;component/Image/光柱.png"
  139. Stretch="Fill" />
  140. </Grid>
  141. </Border>
  142. </DataTemplate>
  143. </ItemsControl.ItemTemplate>
  144. </ItemsControl>-->
  145. <!--#endregion-->
  146. <!--#region 原料仓-->
  147. <pry:ImageBorder
  148. Grid.Row="0"
  149. Grid.RowSpan="2"
  150. Grid.Column="1" />
  151. <ListView
  152. x:Name="List_Ingre"
  153. Grid.Row="0"
  154. Grid.RowSpan="2"
  155. Grid.Column="1"
  156. Margin="3"
  157. Background="Transparent"
  158. BorderThickness="0"
  159. ItemsSource="{Binding IngredientsItorage}"
  160. ScrollViewer.HorizontalScrollBarVisibility="Disabled"
  161. ScrollViewer.VerticalScrollBarVisibility="Disabled"
  162. SelectionMode="Single">
  163. <ListView.ItemsPanel>
  164. <ItemsPanelTemplate>
  165. <UniformGrid
  166. HorizontalAlignment="Center"
  167. VerticalAlignment="Center"
  168. Columns="3"
  169. Rows="4">
  170. <UniformGrid.LayoutTransform>
  171. <TransformGroup>
  172. <RotateTransform Angle="90" />
  173. <ScaleTransform ScaleX="-1" />
  174. </TransformGroup>
  175. </UniformGrid.LayoutTransform>
  176. </UniformGrid>
  177. </ItemsPanelTemplate>
  178. </ListView.ItemsPanel>
  179. <ListView.ItemTemplate>
  180. <DataTemplate>
  181. <Border Margin="5" Background="Transparent">
  182. <Grid>
  183. <Grid.RowDefinitions>
  184. <RowDefinition />
  185. <RowDefinition />
  186. </Grid.RowDefinitions>
  187. <Grid.LayoutTransform>
  188. <TransformGroup>
  189. <RotateTransform Angle="-90" />
  190. <ScaleTransform ScaleX="1" ScaleY="-1" />
  191. </TransformGroup>
  192. </Grid.LayoutTransform>
  193. <TextBlock
  194. Margin="0,0,0,55"
  195. HorizontalAlignment="Center"
  196. VerticalAlignment="Bottom"
  197. FontSize="25"
  198. Foreground="#ffccd61f"
  199. Text="{Binding Name}" />
  200. <TextBlock
  201. Grid.Row="1"
  202. Margin="0,0,0,35"
  203. HorizontalAlignment="Center"
  204. FontSize="20"
  205. Foreground="#FF0084FF"
  206. Text="{Binding Weight, StringFormat={}{0} Kg}" />
  207. <!--<StackPanel
  208. Grid.Row="1"
  209. Margin="0,25"
  210. HorizontalAlignment="Center"
  211. Orientation="Horizontal">
  212. <TextBlock
  213. FontSize="20"
  214. Foreground="#FF0084FF"
  215. Text="{Binding ID, StringFormat={}{0} 号仓}" />
  216. </StackPanel>-->
  217. <Image
  218. Grid.RowSpan="2"
  219. Source="/BPASmartClient.CustomResource;component/Image/光柱.png"
  220. Stretch="Fill" />
  221. </Grid>
  222. </Border>
  223. </DataTemplate>
  224. </ListView.ItemTemplate>
  225. </ListView>
  226. <!--#endregion-->
  227. </Grid>
  228. </UserControl>