change - 界面及手动执行修改
parent
0264cea34b
commit
ca4168b8d6
@ -1,38 +1,108 @@
|
||||
<UserControl x:CompileBindings="False" xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:Class="Sln.Wcs.UI.Views.Base.StoreInfoListView">
|
||||
<Grid RowDefinitions="Auto,Auto,*" Margin="20,14,20,14" VerticalAlignment="Stretch">
|
||||
<Grid RowDefinitions="Auto,Auto,*" Margin="20,14,20,14" VerticalAlignment="Stretch" ClipToBounds="True">
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,Auto,Auto" Margin="0,0,0,8">
|
||||
<TextBox Grid.Column="0" Watermark="搜索仓库编号/名称..." Text="{Binding SearchText}" Width="220" Background="{DynamicResource CardBgBrush}" Foreground="{DynamicResource PrimaryTextBrush}" BorderBrush="{DynamicResource BorderBrush}" />
|
||||
<Button Grid.Column="1" Content="搜索" Command="{Binding SearchCommand}" Background="{DynamicResource PrimaryBgBrush}" Foreground="{DynamicResource SecondaryTextBrush}" Padding="14,6" Margin="12,0,6,0" />
|
||||
<Button Grid.Column="2" Content="新增" Command="{Binding AddCommand}" Background="{DynamicResource PrimaryBtnBrush}" Foreground="White" Padding="14,6" Margin="12,0,6,0" />
|
||||
</Grid>
|
||||
<Border Grid.Row="1" Background="{DynamicResource CardBgBrush}" Padding="8,6" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1">
|
||||
<Grid ColumnDefinitions="1.2*,1.5*,1*,1*,1*">
|
||||
<TextBlock Grid.Column="0" Text="仓库编号" FontSize="12" FontWeight="SemiBold" Foreground="{DynamicResource SecondaryTextBrush}" />
|
||||
<TextBlock Grid.Column="1" Text="仓库名称" FontSize="12" FontWeight="SemiBold" Foreground="{DynamicResource SecondaryTextBrush}" />
|
||||
<TextBlock Grid.Column="2" Text="仓库类型" FontSize="12" FontWeight="SemiBold" Foreground="{DynamicResource SecondaryTextBrush}" />
|
||||
<TextBlock Grid.Column="3" Text="备注" FontSize="12" FontWeight="SemiBold" Foreground="{DynamicResource SecondaryTextBrush}" />
|
||||
<TextBlock Grid.Column="4" Text="操作" FontSize="12" FontWeight="SemiBold" Foreground="{DynamicResource SecondaryTextBrush}" />
|
||||
<Grid ColumnDefinitions="0.4*,1.2*,1.5*,1*,1*,1*">
|
||||
<TextBlock Grid.Column="0" Text="序号" FontSize="12" FontWeight="SemiBold" Foreground="{DynamicResource SecondaryTextBrush}" />
|
||||
<TextBlock Grid.Column="1" Text="仓库编号" FontSize="12" FontWeight="SemiBold" Foreground="{DynamicResource SecondaryTextBrush}" />
|
||||
<TextBlock Grid.Column="2" Text="仓库名称" FontSize="12" FontWeight="SemiBold" Foreground="{DynamicResource SecondaryTextBrush}" />
|
||||
<TextBlock Grid.Column="3" Text="仓库类型" FontSize="12" FontWeight="SemiBold" Foreground="{DynamicResource SecondaryTextBrush}" />
|
||||
<TextBlock Grid.Column="4" Text="备注" FontSize="12" FontWeight="SemiBold" Foreground="{DynamicResource SecondaryTextBrush}" />
|
||||
<TextBlock Grid.Column="5" Text="操作" FontSize="12" FontWeight="SemiBold" Foreground="{DynamicResource SecondaryTextBrush}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
<ListBox Grid.Row="2" ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedItem, Mode=TwoWay}" Background="{DynamicResource SurfaceBgBrush}" Foreground="{DynamicResource PrimaryTextBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1,0,1,1">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border Padding="8,4" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
|
||||
<Grid ColumnDefinitions="1.2*,1.5*,1*,1*,1*">
|
||||
<TextBlock Grid.Column="0" Text="{Binding storeCode}" Foreground="{DynamicResource PrimaryTextBrush}" FontSize="12" VerticalAlignment="Center" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding storeName}" Foreground="{DynamicResource PrimaryTextBrush}" FontSize="12" VerticalAlignment="Center" />
|
||||
<TextBlock Grid.Column="2" Text="{Binding storeType}" Foreground="{DynamicResource SecondaryTextBrush}" FontSize="12" VerticalAlignment="Center" />
|
||||
<TextBlock Grid.Column="3" Text="{Binding remark}" Foreground="{DynamicResource MutedTextBrush}" FontSize="12" VerticalAlignment="Center" />
|
||||
<StackPanel Grid.Column="4" Orientation="Horizontal" Spacing="6">
|
||||
<Button Content="编辑" Tag="{Binding}" Click="Edit_Click" Background="{DynamicResource InfoBtnBrush}" Foreground="White" FontSize="11" Padding="8,3" />
|
||||
<Button Content="删除" Tag="{Binding}" Click="Delete_Click" Background="{DynamicResource DangerBtnBrush}" Foreground="White" FontSize="11" Padding="8,3" />
|
||||
<Grid ColumnDefinitions="0.4*,1.2*,1.5*,1*,1*,1*">
|
||||
<TextBlock Grid.Column="0" Text="{Binding RowIndex}" Foreground="{DynamicResource SecondaryTextBrush}" FontSize="12" VerticalAlignment="Center" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding storeCode}" Foreground="{DynamicResource PrimaryTextBrush}" FontSize="12" VerticalAlignment="Center" />
|
||||
<TextBlock Grid.Column="2" Text="{Binding storeName}" Foreground="{DynamicResource PrimaryTextBrush}" FontSize="12" VerticalAlignment="Center" />
|
||||
<TextBlock Grid.Column="3" Text="{Binding storeType}" Foreground="{DynamicResource SecondaryTextBrush}" FontSize="12" VerticalAlignment="Center" />
|
||||
<TextBlock Grid.Column="4" Text="{Binding remark}" Foreground="{DynamicResource MutedTextBrush}" FontSize="12" VerticalAlignment="Center" />
|
||||
<StackPanel Grid.Column="5" Orientation="Horizontal" Spacing="4">
|
||||
<Button Content="库位" Tag="{Binding}" Click="Locations_Click" Background="{DynamicResource TealBtnBrush}" Foreground="White" FontSize="11" Padding="6,3" />
|
||||
<Button Content="编辑" Tag="{Binding}" Click="Edit_Click" Background="{DynamicResource InfoBtnBrush}" Foreground="White" FontSize="11" Padding="6,3" />
|
||||
<Button Content="删除" Tag="{Binding}" Click="Delete_Click" Background="{DynamicResource DangerBtnBrush}" Foreground="White" FontSize="11" Padding="6,3" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<!-- Slide-out overlay panel -->
|
||||
<Panel Grid.Row="0" Grid.RowSpan="3" IsVisible="{Binding IsPanelOpen}" ZIndex="10">
|
||||
<Grid ColumnDefinitions="0.6*,1.4*">
|
||||
<Border Grid.Column="0" x:Name="Backdrop" Background="{DynamicResource OverlayBgBrush}" Opacity="0" PointerPressed="Backdrop_Pressed" />
|
||||
<Border Grid.Column="1" x:Name="SlideContent"
|
||||
Background="{DynamicResource CardBgBrush}"
|
||||
BorderBrush="{DynamicResource BorderBrush}"
|
||||
BorderThickness="1,0,0,0">
|
||||
<Border.RenderTransform>
|
||||
<TranslateTransform X="3000" />
|
||||
</Border.RenderTransform>
|
||||
<Grid RowDefinitions="Auto,*">
|
||||
<Border Grid.Row="0" Background="{DynamicResource PrimaryBgBrush}" Padding="14,10" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
|
||||
<Grid ColumnDefinitions="*,Auto,Auto">
|
||||
<TextBlock Grid.Column="0" Text="{Binding SlidePanelTitle}" FontSize="14" FontWeight="SemiBold" Foreground="{DynamicResource PrimaryTextBrush}" VerticalAlignment="Center" />
|
||||
<Button Grid.Column="1" Content="新增" Command="{Binding AddLocationCommand}" Background="{DynamicResource PrimaryBtnBrush}" Foreground="White" FontSize="12" Padding="12,5" Margin="0,0,10,0" />
|
||||
<Button Grid.Column="2" Content="✕" Click="ClosePanel_Click" Background="Transparent" Foreground="{DynamicResource SecondaryTextBrush}" FontSize="14" Padding="6,2" />
|
||||
</Grid>
|
||||
</Border>
|
||||
<Grid Grid.Row="1" RowDefinitions="Auto,*">
|
||||
<Border Grid.Row="0" Background="{DynamicResource CardBgBrush}" Padding="10,6" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
|
||||
<Grid ColumnDefinitions="0.4*,0.8*,0.5*,0.7*,0.4*,0.4*,0.4*,0.7*,1*,0.7*,0.5*,1*">
|
||||
<TextBlock Grid.Column="0" Text="序号" FontSize="11" FontWeight="SemiBold" Foreground="{DynamicResource SecondaryTextBrush}" />
|
||||
<TextBlock Grid.Column="1" Text="库位编号" FontSize="11" FontWeight="SemiBold" Foreground="{DynamicResource SecondaryTextBrush}" />
|
||||
<TextBlock Grid.Column="2" Text="库位名称" FontSize="11" FontWeight="SemiBold" Foreground="{DynamicResource SecondaryTextBrush}" />
|
||||
<TextBlock Grid.Column="3" Text="区域" FontSize="11" FontWeight="SemiBold" Foreground="{DynamicResource SecondaryTextBrush}" />
|
||||
<TextBlock Grid.Column="4" Text="排" FontSize="11" FontWeight="SemiBold" Foreground="{DynamicResource SecondaryTextBrush}" />
|
||||
<TextBlock Grid.Column="5" Text="列" FontSize="11" FontWeight="SemiBold" Foreground="{DynamicResource SecondaryTextBrush}" />
|
||||
<TextBlock Grid.Column="6" Text="层" FontSize="11" FontWeight="SemiBold" Foreground="{DynamicResource SecondaryTextBrush}" />
|
||||
<TextBlock Grid.Column="7" Text="AGV定位" FontSize="11" FontWeight="SemiBold" Foreground="{DynamicResource SecondaryTextBrush}" />
|
||||
<TextBlock Grid.Column="8" Text="物料编号" FontSize="11" FontWeight="SemiBold" Foreground="{DynamicResource SecondaryTextBrush}" />
|
||||
<TextBlock Grid.Column="9" Text="状态" FontSize="11" FontWeight="SemiBold" Foreground="{DynamicResource SecondaryTextBrush}" />
|
||||
<TextBlock Grid.Column="10" Text="启用" FontSize="11" FontWeight="SemiBold" Foreground="{DynamicResource SecondaryTextBrush}" />
|
||||
<TextBlock Grid.Column="11" Text="操作" FontSize="11" FontWeight="SemiBold" Foreground="{DynamicResource SecondaryTextBrush}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
<ListBox Grid.Row="1" ItemsSource="{Binding StoreLocations}" Background="Transparent" Foreground="{DynamicResource PrimaryTextBrush}" BorderThickness="0">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border Padding="10,5" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
|
||||
<Grid ColumnDefinitions="0.4*,0.8*,0.5*,0.7*,0.4*,0.4*,0.4*,0.7*,1*,0.7*,0.5*,1*">
|
||||
<TextBlock Grid.Column="0" Text="{Binding RowIndex}" Foreground="{DynamicResource SecondaryTextBrush}" FontSize="11" VerticalAlignment="Center" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding locationCode}" Foreground="{DynamicResource PrimaryTextBrush}" FontSize="11" VerticalAlignment="Center" />
|
||||
<TextBlock Grid.Column="2" Text="{Binding locationName}" Foreground="{DynamicResource PrimaryTextBrush}" FontSize="11" VerticalAlignment="Center" />
|
||||
<TextBlock Grid.Column="3" Text="{Binding locationArea}" Foreground="{DynamicResource SecondaryTextBrush}" FontSize="11" VerticalAlignment="Center" />
|
||||
<TextBlock Grid.Column="4" Text="{Binding locationRows}" Foreground="{DynamicResource SecondaryTextBrush}" FontSize="11" VerticalAlignment="Center" />
|
||||
<TextBlock Grid.Column="5" Text="{Binding locationColumns}" Foreground="{DynamicResource SecondaryTextBrush}" FontSize="11" VerticalAlignment="Center" />
|
||||
<TextBlock Grid.Column="6" Text="{Binding locationLayers}" Foreground="{DynamicResource SecondaryTextBrush}" FontSize="11" VerticalAlignment="Center" />
|
||||
<TextBlock Grid.Column="7" Text="{Binding agvPosition}" Foreground="{DynamicResource SecondaryTextBrush}" FontSize="11" VerticalAlignment="Center" />
|
||||
<TextBlock Grid.Column="8" Text="{Binding materialCode}" Foreground="{DynamicResource SecondaryTextBrush}" FontSize="11" VerticalAlignment="Center" />
|
||||
<TextBlock Grid.Column="9" Text="{Binding locationStatus, Converter={StaticResource CodeToText}, ConverterParameter=LocationStatus}" Foreground="{DynamicResource SecondaryTextBrush}" FontSize="11" VerticalAlignment="Center" />
|
||||
<TextBlock Grid.Column="10" Text="{Binding isFlag, Converter={StaticResource CodeToText}, ConverterParameter=IsFlag}" Foreground="{DynamicResource SecondaryTextBrush}" FontSize="11" VerticalAlignment="Center" />
|
||||
<StackPanel Grid.Column="11" Orientation="Horizontal" Spacing="4">
|
||||
<Button Content="编辑" Tag="{Binding}" Click="LocationEdit_Click" Background="{DynamicResource InfoBtnBrush}" Foreground="White" FontSize="11" Padding="6,3" />
|
||||
<Button Content="删除" Tag="{Binding}" Click="LocationDelete_Click" Background="{DynamicResource DangerBtnBrush}" Foreground="White" FontSize="11" Padding="6,3" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Panel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
Loading…
Reference in New Issue