BinListPage.xaml
2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:srv="clr-namespace:IndustrialControl.Services"
x:Class="IndustrialControl.Pages.BinListPage"
Title="选择库位"
BackgroundColor="White">
<Grid RowDefinitions="Auto,Auto,*" Padding="12">
<!-- 标题行 -->
<Grid ColumnDefinitions="*,Auto" Padding="0,0,0,8">
<Label Text="选择库位" FontSize="18" FontAttributes="Bold" />
<Button Text="关闭" Clicked="OnCloseClicked" BackgroundColor="Transparent" />
</Grid>
<!-- 表头 -->
<Grid BackgroundColor="#F5F6F7" Padding="8" ColumnDefinitions="*,*,*,*,*,*,80">
<Label Text="库位编号" FontAttributes="Bold"/>
<Label Grid.Column="1" Text="仓库名称" FontAttributes="Bold"/>
<Label Grid.Column="2" Text="仓库编码" FontAttributes="Bold"/>
<Label Grid.Column="3" Text="层数" FontAttributes="Bold"/>
<Label Grid.Column="4" Text="货架" FontAttributes="Bold"/>
<Label Grid.Column="5" Text="分区" FontAttributes="Bold"/>
<Label Grid.Column="6" Text="操作" FontAttributes="Bold" HorizontalTextAlignment="Center"/>
</Grid>
<!-- 列表 -->
<CollectionView Grid.Row="2" ItemsSource="{Binding Bins}" SelectionMode="None">
<CollectionView.EmptyView>
<Label Text="该货架下暂无库位" TextColor="#999" Margin="12"/>
</CollectionView.EmptyView>
<CollectionView.ItemTemplate>
<DataTemplate x:DataType="srv:BinInfo">
<Grid Padding="8" ColumnDefinitions="*,*,*,*,*,*,80" BackgroundColor="White">
<Label Text="{Binding BinCode}" />
<Label Grid.Column="1" Text="{Binding WarehouseName}" />
<Label Grid.Column="2" Text="{Binding WarehouseCode}" />
<Label Grid.Column="3" Text="{Binding Layer}" />
<Label Grid.Column="4" Text="{Binding Shelf}" />
<Label Grid.Column="5" Text="{Binding Zone}" />
<Button Grid.Column="6" Text="选择" Clicked="OnPickClicked" />
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</Grid>
</ContentPage>