Administrator 2 months ago
parent
commit
c3aed2461a
  1. 2
      InfoPage.xaml.cs
  2. 157
      QueryPage.xaml
  3. 10
      QueryPage.xaml.cs

2
InfoPage.xaml.cs

@ -96,8 +96,6 @@ public partial class InfoPage : ContentPage
if (context is InfoItem item) if (context is InfoItem item)
{ {
// DisplayAlert("提示", $"你点击了工单: {item.MachineName}", "确定");
await Navigation.PushAsync(new InfoDetail(item)); await Navigation.PushAsync(new InfoDetail(item));
} }
} }

157
QueryPage.xaml

@ -6,50 +6,33 @@
<Grid> <Grid>
<VerticalStackLayout> <VerticalStackLayout>
<Grid RowDefinitions="Auto, *" ColumnDefinitions="*, Auto"> <Grid RowDefinitions="Auto, *" ColumnDefinitions="*, Auto">
<Border Grid.Row="0" <Border Grid.Row="0" Grid.Column="0" Stroke="#CCCCCC"
Grid.Column="0" StrokeThickness="1" StrokeShape="RoundRectangle 10"
Stroke="#CCCCCC" BackgroundColor="White" Padding="0,0"
StrokeThickness="1" VerticalOptions="Center" Margin="10,10,0,10">
StrokeShape="RoundRectangle 10" <Entry x:Name="ResultEntry" Grid.Row="0"
BackgroundColor="White" Grid.Column="0" FontSize="Medium"
Padding="0,0" Placeholder="等待扫码..." VerticalOptions="Center"
VerticalOptions="Center" BackgroundColor="Transparent" Margin="0,0,0,0" />
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> </Border>
<!--扫码按钮--> <!--扫码按钮-->
<Button Grid.Row="0" <Button Grid.Row="0" Grid.Column="1" Clicked="OnScanButtonClicked"
Grid.Column="1" BackgroundColor="Transparent" WidthRequest="60"
Clicked="OnScanButtonClicked" HeightRequest="60" Margin="10">
BackgroundColor="Transparent"
WidthRequest="60"
HeightRequest="60"
Margin="10">
<Button.ImageSource> <Button.ImageSource>
<!-- 设置图标 --> <!-- 设置图标 -->
<FileImageSource File="lucidescanline.png" /> <FileImageSource File="lucidescanline.png" />
</Button.ImageSource> </Button.ImageSource>
</Button> </Button>
<StackLayout Grid.Row="1" Grid.Column="0" >
<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> </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> <Grid>
<CollectionView x:Name="CardCollectionView" <CollectionView x:Name="CardCollectionView"
ItemsSource="{Binding DyelotItems}" ItemsSource="{Binding DyelotItems}"
@ -61,34 +44,38 @@
<Border BackgroundColor="White" <Border BackgroundColor="White"
Stroke="#CCCCCC" StrokeThickness="1" Stroke="#CCCCCC" StrokeThickness="1"
Margin="10,0,10,10" StrokeShape="RoundRectangle 10"> Margin="10,0,10,10" StrokeShape="RoundRectangle 10">
<Grid Padding="15"> <VerticalStackLayout>
<VerticalStackLayout> <HorizontalStackLayout>
<HorizontalStackLayout> <Label Text="工单: " FontAttributes="Bold" FontSize="22" TextColor="Black"/>
<Label Text="工单: " FontAttributes="Bold" FontSize="22" TextColor="Black"/> <Label Text="{Binding Dyelot}" FontAttributes="Bold" FontSize="22" TextColor="Gray"/>
<Label Text="{Binding Dyelot}" FontAttributes="Bold" FontSize="22" TextColor="Gray"/> <Label Text="@" FontAttributes="Bold" FontSize="22" TextColor="Black"/>
</HorizontalStackLayout> <Label Text="{Binding ReDye}" FontAttributes="Bold" FontSize="22" TextColor="Gray"/>
<HorizontalStackLayout> </HorizontalStackLayout>
<Label Text="机台: " FontAttributes="Bold" FontSize="22" TextColor="Black"/> <HorizontalStackLayout>
<Label Text="{Binding Machine}" FontAttributes="Bold" FontSize="22" TextColor="Gray"/> <Label Text="机台: " FontAttributes="Bold" FontSize="22" TextColor="Black"/>
</HorizontalStackLayout> <Label Text="{Binding Machine}" FontAttributes="Bold" FontSize="22" TextColor="Gray"/>
<HorizontalStackLayout> </HorizontalStackLayout>
<Label Text="下单时间: " FontAttributes="Bold" FontSize="22" TextColor="Black"/> <HorizontalStackLayout>
<Label Text="{Binding CreationTime}" FontAttributes="Bold" FontSize="22" TextColor="Gray"/> <Label Text="下单时间: " FontAttributes="Bold" FontSize="22" TextColor="Black"/>
</HorizontalStackLayout> <Label Text="{Binding CreationTime}" FontAttributes="Bold" FontSize="22" TextColor="Gray"/>
<HorizontalStackLayout> </HorizontalStackLayout>
<Label Text="面料: " FontAttributes="Bold" FontSize="22" TextColor="Black"/> <HorizontalStackLayout>
<Label Text="{Binding FabricName}" FontAttributes="Bold" FontSize="22" TextColor="Gray"/> <Label Text="工艺: " FontAttributes="Bold" FontSize="22" TextColor="Black"/>
</HorizontalStackLayout> <Label Text="{Binding FabricName}" FontAttributes="Bold" FontSize="22" TextColor="Gray"/>
<HorizontalStackLayout> </HorizontalStackLayout>
<Label Text="颜色: " FontAttributes="Bold" FontSize="22" TextColor="Black"/> <HorizontalStackLayout>
<Label Text="{Binding ColorName}" FontAttributes="Bold" FontSize="22" TextColor="Gray"/> <Label Text="面料: " FontAttributes="Bold" FontSize="22" TextColor="Black"/>
</HorizontalStackLayout> <Label Text="{Binding FabricName}" FontAttributes="Bold" FontSize="22" TextColor="Gray"/>
<HorizontalStackLayout> </HorizontalStackLayout>
<Label Text="客户: " FontAttributes="Bold" FontSize="22" TextColor="Black"/> <HorizontalStackLayout>
<Label Text="{Binding CustomerName}" FontAttributes="Bold" FontSize="22" TextColor="Gray"/> <Label Text="颜色: " FontAttributes="Bold" FontSize="22" TextColor="Black"/>
</HorizontalStackLayout> <Label Text="{Binding ColorName}" FontAttributes="Bold" FontSize="22" TextColor="Gray"/>
</VerticalStackLayout> </HorizontalStackLayout>
</Grid> <HorizontalStackLayout>
<Label Text="客户: " FontAttributes="Bold" FontSize="22" TextColor="Black"/>
<Label Text="{Binding CustomerName}" FontAttributes="Bold" FontSize="22" TextColor="Gray"/>
</HorizontalStackLayout>
</VerticalStackLayout>
<Border.GestureRecognizers> <Border.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/> <TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/>
</Border.GestureRecognizers> </Border.GestureRecognizers>
@ -96,41 +83,7 @@
</DataTemplate> </DataTemplate>
</CollectionView.ItemTemplate> </CollectionView.ItemTemplate>
</CollectionView> </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> </Grid>
</VerticalStackLayout> </VerticalStackLayout>
<!-- 查询中动画页面 --> <!-- 查询中动画页面 -->
@ -143,10 +96,8 @@
Color="#512BD4" Color="#512BD4"
HorizontalOptions="Center" HorizontalOptions="Center"
VerticalOptions="Center" /> VerticalOptions="Center" />
<Label Text="查询中..." <Label Text="查询中..." FontAttributes="Bold"
FontAttributes="Bold" FontSize="24" TextColor="Black"/>
FontSize="24"
TextColor="Black"/>
</VerticalStackLayout> </VerticalStackLayout>
</Grid> </Grid>
</Grid> </Grid>

10
QueryPage.xaml.cs

@ -25,9 +25,17 @@ public partial class QueryPage : ContentPage
await Navigation.PushAsync(new ScanPage(0)); await Navigation.PushAsync(new ScanPage(0));
} }
private void TapGestureRecognizer_Tapped(object sender, TappedEventArgs e) private async void TapGestureRecognizer_Tapped(object sender, TappedEventArgs e)
{ {
if (sender is Microsoft.Maui.Controls.BindableObject bindable)
{
var context = bindable.BindingContext;
if (context is DyelotItem item)
{
//await Navigation.PushAsync(new QueryDetail(item));
}
}
} }
//信息回复 //信息回复

Loading…
Cancel
Save