ReportPage.xaml 4.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  4. x:Class="practiceApplicaiton.ReportPage"
  5. Title="Отчёт по бронированиям">
  6. <Grid RowDefinitions="Auto,*,Auto" Padding="16" RowSpacing="10">
  7. <!-- Фильтр дат -->
  8. <Frame Grid.Row="0" BackgroundColor="White" CornerRadius="10"
  9. Padding="16" BorderColor="#E0E0E0">
  10. <Grid ColumnDefinitions="*,*,Auto" ColumnSpacing="10">
  11. <VerticalStackLayout Grid.Column="0">
  12. <Label Text="С" FontAttributes="Bold" TextColor="#2E4057"/>
  13. <DatePicker x:Name="DateFrom" BackgroundColor="Gray" TextColor="#4472C4"/>
  14. </VerticalStackLayout>
  15. <VerticalStackLayout Grid.Column="1">
  16. <Label Text="По" FontAttributes="Bold" TextColor="#2E4057"/>
  17. <DatePicker x:Name="DateTo" BackgroundColor="Gray" TextColor="#4472C4"/>
  18. </VerticalStackLayout>
  19. <Button Grid.Column="2" Text="Показать"
  20. BackgroundColor="#4472C4" TextColor="White"
  21. CornerRadius="8" VerticalOptions="End"
  22. Clicked="OnGenerateClicked"/>
  23. </Grid>
  24. </Frame>
  25. <!-- Список -->
  26. <CollectionView Grid.Row="1" x:Name="ReportList">
  27. <CollectionView.Header>
  28. <Grid ColumnDefinitions="*,80,80,100" Padding="8,4"
  29. BackgroundColor="#2E4057">
  30. <Label Grid.Column="0" Text="Клиент / Комната"
  31. TextColor="#4472C4" FontAttributes="Bold"/>
  32. <Label Grid.Column="1" Text="Заезд"
  33. TextColor="#4472C4" FontAttributes="Bold" HorizontalOptions="Center"/>
  34. <Label Grid.Column="2" Text="Ночей"
  35. TextColor="#4472C4" FontAttributes="Bold" HorizontalOptions="Center"/>
  36. <Label Grid.Column="3" Text="Итого"
  37. TextColor="#4472C4" FontAttributes="Bold" HorizontalOptions="End"/>
  38. </Grid>
  39. </CollectionView.Header>
  40. <CollectionView.ItemTemplate>
  41. <DataTemplate>
  42. <Grid ColumnDefinitions="*,80,80,100" Padding="8,6"
  43. BackgroundColor="White">
  44. <VerticalStackLayout Grid.Column="0">
  45. <Label Text="{Binding ClientFullName}" FontAttributes="Bold" FontSize="13" TextColor="#4472C4"/>
  46. <Label TextColor="#777" FontSize="12">
  47. <Label.FormattedText>
  48. <FormattedString>
  49. <Span Text="Ком. " TextColor="#4472C4"/>
  50. <Span Text="{Binding RoomNumber}" TextColor="#4472C4"/>
  51. <Span Text=" · " TextColor="#4472C4"/>
  52. <Span Text="{Binding RoomType}" TextColor="#4472C4"/>
  53. </FormattedString>
  54. </Label.FormattedText>
  55. </Label>
  56. </VerticalStackLayout>
  57. <Label Grid.Column="1"
  58. Text="{Binding CheckInDate, StringFormat='{0:dd.MM}'}"
  59. HorizontalOptions="Center" VerticalOptions="Center" TextColor="#4472C4"/>
  60. <Label Grid.Column="2"
  61. Text="{Binding Nights}" TextColor="#4472C4"
  62. HorizontalOptions="Center" VerticalOptions="Center"/>
  63. <Label Grid.Column="3"
  64. Text="{Binding TotalCost, StringFormat='{0:N0} ₽'}"
  65. FontAttributes="Bold" TextColor="#2E4057"
  66. HorizontalOptions="End" VerticalOptions="Center"/>
  67. </Grid>
  68. </DataTemplate>
  69. </CollectionView.ItemTemplate>
  70. </CollectionView>
  71. <!-- Итог -->
  72. <Frame Grid.Row="2" BackgroundColor="#2E4057" CornerRadius="10" Padding="16">
  73. <Grid ColumnDefinitions="*,Auto">
  74. <Label Text="Итого за период:" TextColor="#E0E0E0"
  75. FontAttributes="Bold" FontSize="16"/>
  76. <Label Grid.Column="1" x:Name="TotalLabel"
  77. Text="0 ₽" TextColor="#FFF2CC"
  78. FontAttributes="Bold" FontSize="18"/>
  79. </Grid>
  80. </Frame>
  81. </Grid>
  82. </ContentPage>