You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
164 lines
12 KiB
XML
164 lines
12 KiB
XML
<UserControl x:CompileBindings="False" xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
x:Class="Sln.Wcs.UI.Views.Task.ManualTaskView">
|
|
<Grid RowDefinitions="*,Auto" Margin="20,14,20,14">
|
|
|
|
<!-- 上部:任务列表 + 明细 -->
|
|
<Grid Grid.Row="0" ColumnDefinitions="1.2*,1*" Margin="0,0,0,14">
|
|
|
|
<!-- 左侧:任务列表 -->
|
|
<Border Grid.Column="0" CornerRadius="8" Padding="14" Background="{DynamicResource CardBgBrush}"
|
|
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Margin="0,0,8,0">
|
|
<Grid RowDefinitions="Auto,Auto,*">
|
|
<StackPanel Grid.Row="0" Orientation="Horizontal" Spacing="8" Margin="0,0,0,10">
|
|
<Rectangle Width="3" Height="18" Fill="#4FC3F7" RadiusX="2" RadiusY="2" />
|
|
<TextBlock Text="手动任务列表" FontSize="14" FontWeight="SemiBold"
|
|
Foreground="{DynamicResource PrimaryTextBrush}" />
|
|
<Button Content="刷新" Command="{Binding LoadCommand}"
|
|
Background="{DynamicResource TealBtnBrush}" Foreground="White"
|
|
FontSize="11" Padding="10,4" HorizontalAlignment="Right" />
|
|
</StackPanel>
|
|
|
|
<!-- 列表头 -->
|
|
<Border Grid.Row="1" Background="{DynamicResource PrimaryBgBrush}" Padding="8,6"
|
|
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
|
|
<Grid ColumnDefinitions="1.4*,0.8*,0.8*,1.2*,1.2*,0.8*">
|
|
<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}" />
|
|
</Grid>
|
|
</Border>
|
|
|
|
<ListBox Grid.Row="2" ItemsSource="{Binding Tasks}" SelectedItem="{Binding SelectedTask, Mode=TwoWay}"
|
|
Background="Transparent" Foreground="{DynamicResource PrimaryTextBrush}" BorderThickness="0">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border Padding="8,5" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1"
|
|
Background="Transparent">
|
|
<Grid ColumnDefinitions="1.4*,0.8*,0.8*,1.2*,1.2*,0.8*">
|
|
<TextBlock Grid.Column="0" Text="{Binding taskCode}"
|
|
Foreground="{DynamicResource PrimaryTextBrush}" FontSize="12" VerticalAlignment="Center" />
|
|
<TextBlock Grid.Column="1" Text="{Binding taskType}"
|
|
Foreground="{DynamicResource SecondaryTextBrush}" FontSize="12" VerticalAlignment="Center" />
|
|
<TextBlock Grid.Column="2" Text="{Binding taskCategory}"
|
|
Foreground="{DynamicResource SecondaryTextBrush}" FontSize="12" VerticalAlignment="Center" />
|
|
<TextBlock Grid.Column="3" Text="{Binding startPoint}"
|
|
Foreground="{DynamicResource AccentTextBrush}" FontSize="12" VerticalAlignment="Center" />
|
|
<TextBlock Grid.Column="4" Text="{Binding endPoint}"
|
|
Foreground="{DynamicResource AccentTextBrush}" FontSize="12" VerticalAlignment="Center" />
|
|
<TextBlock Grid.Column="5" Text="{Binding taskSteps}"
|
|
Foreground="{DynamicResource PrimaryTextBrush}" FontSize="12" VerticalAlignment="Center" />
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- 右侧:明细列表 -->
|
|
<Border Grid.Column="1" CornerRadius="8" Padding="14" Background="{DynamicResource CardBgBrush}"
|
|
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" Margin="8,0,0,0">
|
|
<Grid RowDefinitions="Auto,Auto,*">
|
|
<StackPanel Grid.Row="0" Orientation="Horizontal" Spacing="8" Margin="0,0,0,10">
|
|
<Rectangle Width="3" Height="18" Fill="#4FC3F7" RadiusX="2" RadiusY="2" />
|
|
<TextBlock Text="任务明细" FontSize="14" FontWeight="SemiBold"
|
|
Foreground="{DynamicResource PrimaryTextBrush}" />
|
|
</StackPanel>
|
|
|
|
<!-- 明细表头 -->
|
|
<Border Grid.Row="1" Background="{DynamicResource PrimaryBgBrush}" Padding="8,6"
|
|
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
|
|
<Grid ColumnDefinitions="0.5*,1.2*,1.2*,0.7*,0.7*,0.7*">
|
|
<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}" />
|
|
</Grid>
|
|
</Border>
|
|
|
|
<ListBox Grid.Row="2" ItemsSource="{Binding Details}"
|
|
Background="Transparent" Foreground="{DynamicResource PrimaryTextBrush}" BorderThickness="0">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border Padding="8,5" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,0,1">
|
|
<Grid ColumnDefinitions="0.5*,1.2*,1.2*,0.7*,0.7*,0.7*">
|
|
<TextBlock Grid.Column="0" Text="{Binding objId}"
|
|
Foreground="{DynamicResource SecondaryTextBrush}" FontSize="11" VerticalAlignment="Center" />
|
|
<TextBlock Grid.Column="1" Text="{Binding startPoint}"
|
|
Foreground="{DynamicResource AccentTextBrush}" FontSize="11" VerticalAlignment="Center" />
|
|
<TextBlock Grid.Column="2" Text="{Binding endPoint}"
|
|
Foreground="{DynamicResource AccentTextBrush}" FontSize="11" VerticalAlignment="Center" />
|
|
<TextBlock Grid.Column="3" Text="{Binding deviceType}"
|
|
Foreground="{DynamicResource SecondaryTextBrush}" FontSize="11" VerticalAlignment="Center" />
|
|
<TextBlock Grid.Column="4" Text="{Binding taskStatus}"
|
|
Foreground="{DynamicResource SecondaryTextBrush}" FontSize="11" VerticalAlignment="Center" />
|
|
<TextBlock Grid.Column="5" Text="{Binding executionMode}"
|
|
Foreground="{DynamicResource PrimaryTextBrush}" FontSize="11" VerticalAlignment="Center" />
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
|
|
<!-- 下部:操作区 -->
|
|
<Border Grid.Row="1" CornerRadius="8" Padding="18" Background="{DynamicResource CardBgBrush}"
|
|
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1">
|
|
<Grid ColumnDefinitions="Auto,Auto,Auto,Auto,*">
|
|
<Button Grid.Column="0" Content="任务执行" Command="{Binding ExecuteTaskCommand}"
|
|
IsEnabled="{Binding !TaskExecuted}"
|
|
Background="{DynamicResource PrimaryBtnBrush}" Foreground="White"
|
|
FontSize="13" Padding="20,10" />
|
|
<Button Grid.Column="1" Content="物料到位" Command="{Binding MaterialReadyCommand}"
|
|
IsEnabled="{Binding !IsMaterialReady}"
|
|
Background="#FF9800" Foreground="White"
|
|
FontSize="13" Padding="20,10" Margin="16,0,0,0" />
|
|
|
|
<!-- 设备状态显示 -->
|
|
<Border Grid.Column="2" CornerRadius="6" Padding="14,8" Margin="24,0,0,0"
|
|
Background="#1A1A2E" BorderBrush="#4FC3F7" BorderThickness="1">
|
|
<StackPanel Orientation="Horizontal" Spacing="20">
|
|
<StackPanel Orientation="Horizontal" Spacing="6">
|
|
<TextBlock Text="提升机:" FontSize="12" FontWeight="SemiBold"
|
|
Foreground="#4FC3F7" VerticalAlignment="Center" />
|
|
<TextBlock Text="{Binding HoistInfo}" FontSize="14" FontWeight="Bold"
|
|
Foreground="#FFFFFF" VerticalAlignment="Center" />
|
|
</StackPanel>
|
|
<Border Width="1" Background="#333" Margin="4,2" />
|
|
<StackPanel Orientation="Horizontal" Spacing="6">
|
|
<TextBlock Text="接驳位:" FontSize="12" FontWeight="SemiBold"
|
|
Foreground="#4FC3F7" VerticalAlignment="Center" />
|
|
<TextBlock Text="{Binding DockingPoint}" FontSize="14" FontWeight="Bold"
|
|
Foreground="#FFFFFF" VerticalAlignment="Center" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<TextBlock Grid.Column="4" Text="{Binding StatusText}" FontSize="12"
|
|
Foreground="{DynamicResource AccentTextBrush}"
|
|
VerticalAlignment="Center" TextWrapping="Wrap" Margin="24,0,0,0" />
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</UserControl>
|