You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
153 lines
8.5 KiB
153 lines
8.5 KiB
<?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"
|
|
x:Class="SunlightAggregationTerminal.QueryPage"
|
|
Title="">
|
|
<Grid>
|
|
<VerticalStackLayout>
|
|
<Grid RowDefinitions="Auto, *" ColumnDefinitions="*, Auto">
|
|
<Border Grid.Row="0"
|
|
Grid.Column="0"
|
|
Stroke="#CCCCCC"
|
|
StrokeThickness="1"
|
|
StrokeShape="RoundRectangle 10"
|
|
BackgroundColor="White"
|
|
Padding="0,0"
|
|
VerticalOptions="Center"
|
|
Margin="10,10,0,10">
|
|
<Entry x:Name="ResultEntry"
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
FontSize="Medium"
|
|
Placeholder="等待扫码..."
|
|
VerticalOptions="Center"
|
|
BackgroundColor="Transparent"
|
|
Margin="0,0,0,0" >
|
|
</Entry>
|
|
</Border>
|
|
<!--扫码按钮-->
|
|
<Button Grid.Row="0"
|
|
Grid.Column="1"
|
|
Clicked="OnScanButtonClicked"
|
|
BackgroundColor="Transparent"
|
|
WidthRequest="60"
|
|
HeightRequest="60"
|
|
Margin="10">
|
|
<Button.ImageSource>
|
|
<!-- 设置图标 -->
|
|
<FileImageSource File="lucidescanline.png" />
|
|
</Button.ImageSource>
|
|
</Button>
|
|
</Grid>
|
|
<StackLayout >
|
|
|
|
<HorizontalStackLayout>
|
|
<DatePicker Format="yyyy年MM月dd日" FontSize="18"/>
|
|
<Label Text="~" FontSize="32"/>
|
|
<DatePicker Format="yyyy年MM月dd日" FontSize="18"/>
|
|
<Button Text="搜索" Margin="5"/>
|
|
</HorizontalStackLayout>
|
|
|
|
</StackLayout>
|
|
|
|
<Grid>
|
|
<CollectionView x:Name="CardCollectionView"
|
|
ItemsSource="{Binding DyelotItems}"
|
|
RemainingItemsThreshold="5">
|
|
<!-- 保持滚动条 -->
|
|
<CollectionView.ItemTemplate>
|
|
<DataTemplate>
|
|
<!-- 这里定义单个卡片的 UI 结构 -->
|
|
<Border BackgroundColor="White"
|
|
Stroke="#CCCCCC" StrokeThickness="1"
|
|
Margin="10,0,10,10" StrokeShape="RoundRectangle 10">
|
|
<Grid Padding="15">
|
|
<VerticalStackLayout>
|
|
<HorizontalStackLayout>
|
|
<Label Text="工单: " FontAttributes="Bold" FontSize="22" TextColor="Black"/>
|
|
<Label Text="{Binding Dyelot}" FontAttributes="Bold" FontSize="22" TextColor="Gray"/>
|
|
</HorizontalStackLayout>
|
|
<HorizontalStackLayout>
|
|
<Label Text="机台: " FontAttributes="Bold" FontSize="22" TextColor="Black"/>
|
|
<Label Text="{Binding Machine}" FontAttributes="Bold" FontSize="22" TextColor="Gray"/>
|
|
</HorizontalStackLayout>
|
|
<HorizontalStackLayout>
|
|
<Label Text="下单时间: " FontAttributes="Bold" FontSize="22" TextColor="Black"/>
|
|
<Label Text="{Binding CreationTime}" FontAttributes="Bold" FontSize="22" TextColor="Gray"/>
|
|
</HorizontalStackLayout>
|
|
<HorizontalStackLayout>
|
|
<Label Text="面料: " FontAttributes="Bold" FontSize="22" TextColor="Black"/>
|
|
<Label Text="{Binding FabricName}" FontAttributes="Bold" FontSize="22" TextColor="Gray"/>
|
|
</HorizontalStackLayout>
|
|
<HorizontalStackLayout>
|
|
<Label Text="颜色: " FontAttributes="Bold" FontSize="22" TextColor="Black"/>
|
|
<Label Text="{Binding ColorName}" FontAttributes="Bold" FontSize="22" TextColor="Gray"/>
|
|
</HorizontalStackLayout>
|
|
<HorizontalStackLayout>
|
|
<Label Text="客户: " FontAttributes="Bold" FontSize="22" TextColor="Black"/>
|
|
<Label Text="{Binding CustomerName}" FontAttributes="Bold" FontSize="22" TextColor="Gray"/>
|
|
</HorizontalStackLayout>
|
|
</VerticalStackLayout>
|
|
</Grid>
|
|
<Border.GestureRecognizers>
|
|
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/>
|
|
</Border.GestureRecognizers>
|
|
</Border>
|
|
</DataTemplate>
|
|
</CollectionView.ItemTemplate>
|
|
</CollectionView>
|
|
|
|
|
|
|
|
<CollectionView ItemsSource="{Binding Items}" IsVisible="False">
|
|
<CollectionView.Header>
|
|
<!-- 表头 -->
|
|
<Grid BackgroundColor="Gray" Padding="10">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="2*" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Label Text="步骤" TextColor="White" FontAttributes="Bold" Grid.Column="0"/>
|
|
<Label Text="物料" TextColor="White" FontAttributes="Bold" Grid.Column="1"/>
|
|
<Label Text="状态" TextColor="White" FontAttributes="Bold" Grid.Column="2"/>
|
|
<Label Text="实际" TextColor="White" FontAttributes="Bold" Grid.Column="3"/>
|
|
<Label Text="时间" TextColor="White" FontAttributes="Bold" Grid.Column="4"/>
|
|
</Grid>
|
|
</CollectionView.Header>
|
|
|
|
<CollectionView.ItemTemplate>
|
|
<DataTemplate>
|
|
<!-- 数据行 -->
|
|
<Grid Padding="10" ColumnDefinitions="*,2*,*,*,*">
|
|
<Label Text="{Binding Id}" Grid.Column="0"/>
|
|
<Label Text="{Binding Name}" Grid.Column="1"/>
|
|
<Label Text="{Binding Start}" Grid.Column="2"/>
|
|
<Label Text="{Binding Value}" Grid.Column="3"/>
|
|
<Label Text="{Binding date}" Grid.Column="4"/>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</CollectionView.ItemTemplate>
|
|
</CollectionView>
|
|
</Grid>
|
|
</VerticalStackLayout>
|
|
<!-- 查询中动画页面 -->
|
|
<Grid x:Name="LoadingIndicator" BackgroundColor="Gray"
|
|
IsVisible="False" Opacity="0.9">
|
|
<VerticalStackLayout Padding="30" Spacing="10"
|
|
VerticalOptions="Center"
|
|
HorizontalOptions="Center">
|
|
<ActivityIndicator IsRunning="True"
|
|
Color="#512BD4"
|
|
HorizontalOptions="Center"
|
|
VerticalOptions="Center" />
|
|
<Label Text="查询中..."
|
|
FontAttributes="Bold"
|
|
FontSize="24"
|
|
TextColor="Black"/>
|
|
</VerticalStackLayout>
|
|
</Grid>
|
|
</Grid>
|
|
</ContentPage>
|