OutboundFinishedSearchPage.xaml
3.7 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
x:Class="IndustrialControl.Pages.OutboundFinishedSearchPage"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Name="Page"
Shell.NavBarIsVisible="True">
<ScrollView>
<VerticalStackLayout Spacing="12" Padding="12">
<!-- 查询区域 -->
<Grid ColumnDefinitions="*,Auto" RowDefinitions="Auto,Auto" ColumnSpacing="8" RowSpacing="8">
<Entry x:Name="OrderEntry"
Grid.Row="0" Grid.Column="0"
Placeholder="请扫描输入出库单条码"
Text="{Binding SearchOrderNo}" />
<Button Grid.Row="0" Grid.Column="1"
Text="查询"
Command="{Binding SearchCommand}" />
<Grid Grid.Row="1" Grid.ColumnSpan="2" ColumnDefinitions="Auto,*,Auto,*" ColumnSpacing="8">
<Label Grid.Column="0" Text="开始:" VerticalTextAlignment="Center"/>
<DatePicker Grid.Column="1" Date="{Binding StartDate}" />
<Label Grid.Column="2" Text="结束:" VerticalTextAlignment="Center"/>
<DatePicker Grid.Column="3" Date="{Binding EndDate}" />
</Grid>
</Grid>
<!-- 列表区域 -->
<CollectionView Grid.Row="1"
ItemsSource="{Binding Orders}"
SelectionMode="Single"
SelectedItem="{Binding SelectedOrder, Mode=TwoWay}">
<CollectionView.ItemTemplate>
<DataTemplate>
<Frame Margin="0,8,0,0" Padding="12" HasShadow="True" CornerRadius="10">
<!-- 点击整卡片:直接调用 VM 的 GoOutboundCommand,并把当前项作为参数 -->
<Frame.GestureRecognizers>
<TapGestureRecognizer
Command="{Binding BindingContext.GoOutboundCommand, Source={x:Reference Page}}"
CommandParameter="{Binding .}" />
</Frame.GestureRecognizers>
<Grid RowDefinitions="Auto,Auto,Auto,Auto,Auto"
ColumnDefinitions="Auto,*" ColumnSpacing="8">
<Label Grid.Row="0" Grid.Column="0" Text="出库单号:" FontAttributes="Bold"/>
<Label Grid.Row="0" Grid.Column="1" Text="{Binding outstockNo}"/>
<Label Grid.Row="1" Grid.Column="0" Text="出库单类型:" FontAttributes="Bold"/>
<Label Grid.Row="1" Grid.Column="1" Text="{Binding orderTypeName}" />
<Label Grid.Row="2" Grid.Column="0" Text="关联发货号:" FontAttributes="Bold"/>
<Label Grid.Row="2" Grid.Column="1" Text="{Binding deliveryNo}" />
<Label Grid.Row="3" Grid.Column="0" Text="关联销售号:" FontAttributes="Bold"/>
<Label Grid.Row="3" Grid.Column="1" Text="{Binding arrivalNo}" />
<Label Grid.Row="4" Grid.Column="0" Text="创建日期:" FontAttributes="Bold"/>
<Label Grid.Row="4" Grid.Column="1" Text="{Binding createdTime}" />
</Grid>
</Frame>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</VerticalStackLayout>
</ScrollView>
</ContentPage>