-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomReportWindow.xaml
More file actions
200 lines (171 loc) · 13.1 KB
/
Copy pathCustomReportWindow.xaml
File metadata and controls
200 lines (171 loc) · 13.1 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<Window x:Class="MyPanelCarWashing.CustomReportWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:MyPanelCarWashing"
Title="Выборочный отчет"
WindowStartupLocation="CenterScreen"
ResizeMode="CanResize"
MinWidth="950" MinHeight="600"
Width="1050" Height="750"
Background="#F5F6FA"
BorderBrush="Black"
BorderThickness="1"
WindowStyle="None"
WindowState="Maximized"
Foreground="Black">
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="📊 Интервальный отчет" FontSize="24" FontWeight="Bold"
Foreground="#2C3E50" HorizontalAlignment="Center" Margin="0,0,0,15" Grid.Row="0"/>
<Grid Grid.Row="1" Margin="0,0,0,15">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Content="С:" VerticalAlignment="Center" Margin="0,0,5,0"/>
<local:CustomDatePicker x:Name="StartDatePicker" Grid.Column="1" Height="50" Width="350"/>
<Label Grid.Column="2" Content="По:" VerticalAlignment="Center" Margin="10,0,5,0"/>
<local:CustomDatePicker x:Name="EndDatePicker" Grid.Column="3" Height="50" Width="350"/>
<Button Grid.Column="4" Content="📊 Сформировать" Click="GenerateReportButton_Click"
Width="160" Height="35" Margin="15,0,0,0" Background="#3498DB" Foreground="White" Cursor="Hand"/>
</Grid>
<ScrollViewer Grid.Row="2" VerticalScrollBarVisibility="Auto" Background="White">
<StackPanel>
<StackPanel x:Name="ReportContent" Visibility="Collapsed" Margin="10">
<Border Background="#E8F0FE" CornerRadius="10" Padding="15" Margin="0,0,0,15">
<StackPanel HorizontalAlignment="Left">
<TextBlock x:Name="PeriodText" FontSize="14" FontWeight="Bold" Foreground="#2C3E50"/>
<TextBlock x:Name="DaysCountText" FontSize="12" Foreground="#7F8C8D" Margin="0,5,0,0"/>
</StackPanel>
</Border>
<Border Background="#F8F9FA" CornerRadius="10" Padding="15" Margin="0,0,0,15">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" HorizontalAlignment="Center">
<TextBlock Text="🚗 Всего машин" FontSize="12" Foreground="#7F8C8D"/>
<TextBlock x:Name="TotalCarsText" FontSize="24" FontWeight="Bold" Foreground="#2C3E50" HorizontalAlignment="Center"/>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center">
<TextBlock Text="💰 Общая выручка" FontSize="12" Foreground="#7F8C8D"/>
<TextBlock x:Name="TotalRevenueText" FontSize="24" FontWeight="Bold" Foreground="#27AE60" HorizontalAlignment="Center"/>
</StackPanel>
<StackPanel Grid.Column="2" HorizontalAlignment="Center">
<TextBlock Text="👤 Мойщикам (Начислено)" FontSize="12" Foreground="#7F8C8D"/>
<TextBlock x:Name="TotalWasherText" FontSize="24" FontWeight="Bold" Foreground="#8E44AD" HorizontalAlignment="Center"/>
</StackPanel>
<StackPanel Grid.Column="3" HorizontalAlignment="Center">
<TextBlock Text="🏢 Компании (Грязными)" FontSize="12" Foreground="#7F8C8D"/>
<TextBlock x:Name="TotalCompanyText" FontSize="24" FontWeight="Bold" Foreground="#E67E22" HorizontalAlignment="Center"/>
</StackPanel>
<StackPanel Grid.Column="4" HorizontalAlignment="Center">
<TextBlock Text="Уникальных клиентов:" Width="150" FontWeight="Bold" Foreground="#34495E" TextAlignment="Center"/>
<TextBlock x:Name="UniqueClientsText" HorizontalAlignment="Center" FontSize="24" Text="0" FontWeight="Bold" Foreground="#2980B9"/>
</StackPanel>
<StackPanel Grid.Column="5" HorizontalAlignment="Center">
<TextBlock Text="Новых клиентов:" Width="150" FontWeight="Bold" Foreground="#34495E" TextAlignment="Center"/>
<TextBlock x:Name="NewClientsText" HorizontalAlignment="Center" FontSize="24" Text="0" FontWeight="Bold" Foreground="#27AE60"/>
</StackPanel>
</Grid>
</Border>
<Border Background="#34495E" CornerRadius="10" Padding="15" Margin="0,0,0,15">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" HorizontalAlignment="Center">
<TextBlock Text="📉 Расходы (Химия, нужды)" FontSize="12" Foreground="#BDC3C7" HorizontalAlignment="Center"/>
<TextBlock x:Name="TotalExpensesText" FontSize="20" FontWeight="Bold" Foreground="#E74C3C" HorizontalAlignment="Center"/>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center">
<TextBlock Text="👤 Уже выдано авансов" FontSize="12" Foreground="#BDC3C7" HorizontalAlignment="Center"/>
<TextBlock x:Name="TotalAdvancesText" FontSize="20" FontWeight="Bold" Foreground="#F39C12" HorizontalAlignment="Center"/>
</StackPanel>
<StackPanel Grid.Column="2" HorizontalAlignment="Center">
<TextBlock Text="💎 Чистая прибыль (ЧПКО)" FontSize="12" Foreground="#BDC3C7" HorizontalAlignment="Center"/>
<TextBlock x:Name="NetProfitText" FontSize="24" FontWeight="Bold" Foreground="#2ECC71" HorizontalAlignment="Center"/>
</StackPanel>
</Grid>
</Border>
<TextBlock Text="💰 Зарплатная ведомость" FontSize="16" FontWeight="Bold" Foreground="#2C3E50" Margin="0,15,0,5"/>
<TextBlock Text="(Расчет с учетом минималки и выданных авансов)" FontSize="11" Foreground="#7F8C8D" Margin="0,0,0,10"/>
<ListView x:Name="EmployeesSalaryList" Height="200" Background="White">
<ListView.View>
<GridView>
<GridViewColumn Header="Сотрудник" Width="200" DisplayMemberBinding="{Binding EmployeeName}"/>
<GridViewColumn Header="Машин" Width="80" DisplayMemberBinding="{Binding CarsWashed}"/>
<GridViewColumn Header="Начислено ЗП" Width="140" DisplayMemberBinding="{Binding Earnings, StringFormat={}{0:N0} ₽}"/>
<GridViewColumn Header="Взято авансов" Width="130" DisplayMemberBinding="{Binding Advances, StringFormat={}{0:N0} ₽}"/>
<GridViewColumn Header="К ВЫПЛАТЕ" Width="150" DisplayMemberBinding="{Binding ToPay, StringFormat={}{0:N0} ₽}"/>
</GridView>
</ListView.View>
</ListView>
<TextBlock Text="💳 Способы оплаты" FontSize="16" FontWeight="Bold" Foreground="#2C3E50" Margin="0,20,0,10"/>
<Border Background="#F8F9FA" CornerRadius="10" Padding="15" Margin="0,0,0,15">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" Background="White" CornerRadius="8" Padding="10" Margin="5">
<StackPanel HorizontalAlignment="Center">
<TextBlock Text="💵 Наличные" FontSize="12" FontWeight="SemiBold" Foreground="#2C3E50"/>
<TextBlock x:Name="CustomCashCountText" FontSize="20" FontWeight="Bold" Foreground="#27AE60" HorizontalAlignment="Center"/>
<TextBlock x:Name="CustomCashAmountText" FontSize="12" Foreground="#7F8C8D"/>
</StackPanel>
</Border>
<Border Grid.Column="1" Background="White" CornerRadius="8" Padding="10" Margin="5">
<StackPanel HorizontalAlignment="Center">
<TextBlock Text="💳 Карта" FontSize="12" FontWeight="SemiBold" Foreground="#2C3E50"/>
<TextBlock x:Name="CustomCardCountText" FontSize="20" FontWeight="Bold" Foreground="#27AE60" HorizontalAlignment="Center"/>
<TextBlock x:Name="CustomCardAmountText" FontSize="12" Foreground="#7F8C8D"/>
</StackPanel>
</Border>
<Border Grid.Column="2" Background="White" CornerRadius="8" Padding="10" Margin="5">
<StackPanel HorizontalAlignment="Center">
<TextBlock Text="📱 Перевод" FontSize="12" FontWeight="SemiBold" Foreground="#2C3E50"/>
<TextBlock x:Name="CustomTransferCountText" FontSize="20" FontWeight="Bold" Foreground="#27AE60" HorizontalAlignment="Center"/>
<TextBlock x:Name="CustomTransferAmountText" FontSize="12" Foreground="#7F8C8D"/>
</StackPanel>
</Border>
<Border Grid.Column="3" Background="White" CornerRadius="8" Padding="10" Margin="5">
<StackPanel HorizontalAlignment="Center">
<TextBlock Text="📱 QR-код" FontSize="12" FontWeight="SemiBold" Foreground="#2C3E50"/>
<TextBlock x:Name="CustomQrCountText" FontSize="20" FontWeight="Bold" Foreground="#27AE60" HorizontalAlignment="Center"/>
<TextBlock x:Name="CustomQrAmountText" FontSize="12" Foreground="#7F8C8D"/>
</StackPanel>
</Border>
</Grid>
</Border>
</StackPanel>
<TextBlock x:Name="NoDataText" Text="Выберите период и нажмите 'Сформировать'"
FontSize="14" Foreground="#7F8C8D" HorizontalAlignment="Center"
Margin="0,100,0,0"/>
</StackPanel>
</ScrollViewer>
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,20,0,0">
<Button Content="📄 Экспорт в Excel" Click="ExportButton_Click" Width="150" Height="35"
Margin="5" Background="#27AE60" Foreground="White" Cursor="Hand"/>
<Button Content="✖ Закрыть" Click="CloseButton_Click" Width="120" Height="35"
Margin="5" Background="#E74C3C" Foreground="White" Cursor="Hand"/>
</StackPanel>
</Grid>
</Window>