Files
29WxOrder/29WxOrderWpf/Ctrls/Statistics/RevenueSummaryCards.xaml
T
chfei d25374956e 利润统计 功能开放
统计页面增加新的统计功能
2026-08-07 18:52:33 +08:00

331 lines
8.2 KiB
XML

<UserControl
x:Class="_29WxOrderWpf.Ctrls.Statistics.RevenueSummaryCards"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:_29WxOrderWpf.Ctrls.Statistics.ViewModels"
d:DataContext="{d:DesignInstance Type=vm:ShopRevenueStatisticsViewModel,
IsDesignTimeCreatable=True}"
mc:Ignorable="d">
<UserControl.Resources>
<!-- 卡片样式(白底、圆角、阴影) -->
<Style x:Key="CardBorderStyle" TargetType="Border">
<Setter Property="Background" Value="White" />
<Setter Property="CornerRadius" Value="8" />
<Setter Property="Padding" Value="18" />
<Setter Property="Margin" Value="4" />
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect
BlurRadius="10"
Opacity="0.08"
ShadowDepth="2"
Color="#000000" />
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<!-- 汇总卡片(2 行 x 6 列) -->
<UniformGrid
Margin="3,8,3,0"
Columns="7"
Rows="2">
<!-- 销售额 -->
<Border Style="{StaticResource CardBorderStyle}">
<StackPanel>
<TextBlock
FontSize="14"
Foreground="#888888"
Text="销售额" />
<TextBlock
Margin="0,12,0,0"
FontSize="30"
FontWeight="Bold"
Foreground="#333333"
Text="{Binding Summary.SalesAmount, StringFormat={}¥{0:N2}}" />
<TextBlock
Margin="0,10,0,0"
FontSize="12"
Foreground="#999999"
Text="最终有效销售额" />
</StackPanel>
</Border>
<!-- 有效订单 -->
<Border Style="{StaticResource CardBorderStyle}">
<StackPanel>
<TextBlock
FontSize="14"
Foreground="#888888"
Text="有效订单" />
<TextBlock
Margin="0,12,0,0"
FontSize="30"
FontWeight="Bold"
Foreground="#333333"
Text="{Binding Summary.ValidOrderCount, StringFormat={}{0:N0}}" />
<TextBlock
Margin="0,10,0,0"
FontSize="12"
Foreground="#999999"
Text="已扣除退款订单" />
</StackPanel>
</Border>
<!-- 采购金额 -->
<Border Style="{StaticResource CardBorderStyle}">
<StackPanel>
<TextBlock
FontSize="14"
Foreground="#888888"
Text="采购金额" />
<TextBlock
Margin="0,12,0,0"
FontSize="30"
FontWeight="Bold"
Foreground="#333333"
Text="{Binding Summary.BuyerPaymentAmount, StringFormat={}¥{0:N2}}" />
<TextBlock
Margin="0,10,0,0"
FontSize="12"
Foreground="#999999"
Text="采购付款金额" />
</StackPanel>
</Border>
<!-- 利润 -->
<Border Style="{StaticResource CardBorderStyle}">
<StackPanel>
<TextBlock
FontSize="14"
Foreground="#888888"
Text="利润" />
<TextBlock
Margin="0,12,0,0"
FontSize="30"
FontWeight="Bold"
Foreground="#333333"
Text="{Binding Summary.Profit, StringFormat={}¥{0:N2}}" />
<TextBlock
Margin="0,10,0,0"
FontSize="12"
Foreground="#999999"
Text="实际利润" />
</StackPanel>
</Border>
<!-- 平均利润率 -->
<Border Style="{StaticResource CardBorderStyle}">
<StackPanel>
<TextBlock
FontSize="14"
Foreground="#888888"
Text="平均利润率" />
<TextBlock
Margin="0,12,0,0"
FontSize="30"
FontWeight="Bold"
Foreground="#333333"
Text="{Binding Summary.AverageProfitRate, StringFormat={}{0:0.00}%}" />
<TextBlock
Margin="0,10,0,0"
FontSize="12"
Foreground="#999999"
Text="利润 / 采购金额" />
</StackPanel>
</Border>
<!-- 客单价 -->
<Border Style="{StaticResource CardBorderStyle}">
<StackPanel>
<TextBlock
FontSize="14"
Foreground="#888888"
Text="客单价" />
<TextBlock
Margin="0,12,0,0"
FontSize="30"
FontWeight="Bold"
Foreground="#333333"
Text="{Binding Summary.AvgOrderAmount, StringFormat={}¥{0:N2}}" />
<TextBlock
Margin="0,10,0,0"
FontSize="12"
Foreground="#999999"
Text="平均每单金额" />
</StackPanel>
</Border>
<!-- 平台服务费总额 -->
<Border Style="{StaticResource CardBorderStyle}">
<StackPanel>
<TextBlock
FontSize="14"
Foreground="#888888"
Text="平台服务费总额" />
<TextBlock
Margin="0,12,0,0"
FontSize="30"
FontWeight="Bold"
Foreground="#333333"
Text="{Binding Summary.PlatformFeeTotal, StringFormat={}¥{0:N2}}" />
<TextBlock
Margin="0,10,0,0"
FontSize="12"
Foreground="#999999"
Text="预计技术服务费" />
</StackPanel>
</Border>
<!-- 退款金额 -->
<Border Style="{StaticResource CardBorderStyle}">
<StackPanel>
<TextBlock
FontSize="14"
Foreground="#888888"
Text="退款金额" />
<TextBlock
Margin="0,12,0,0"
FontSize="30"
FontWeight="Bold"
Foreground="#333333"
Text="{Binding Summary.RefundAmount, StringFormat={}¥{0:N2}}" />
<TextBlock
Margin="0,10,0,0"
FontSize="12"
Foreground="#999999"
Text="统计期间退款" />
</StackPanel>
</Border>
<!-- 退款订单 -->
<Border Style="{StaticResource CardBorderStyle}">
<StackPanel>
<TextBlock
FontSize="14"
Foreground="#888888"
Text="退款订单" />
<TextBlock
Margin="0,12,0,0"
FontSize="30"
FontWeight="Bold"
Foreground="#333333"
Text="{Binding Summary.RefundOrderCount, StringFormat={}{0:N0}}" />
<TextBlock
Margin="0,10,0,0"
FontSize="12"
Foreground="#999999"
Text="退款订单" />
</StackPanel>
</Border>
<!-- 采购退款成功金额 -->
<Border Style="{StaticResource CardBorderStyle}">
<StackPanel>
<TextBlock
FontSize="14"
Foreground="#888888"
Text="总采购金额" />
<TextBlock
Margin="0,12,0,0"
FontSize="30"
FontWeight="Bold"
Foreground="#333333"
Text="{Binding Summary.BuyerRefundAmount, StringFormat={}¥{0:N2}}" />
<TextBlock
Margin="0,10,0,0"
FontSize="12"
Foreground="#999999"
Text="售后采购金额" />
</StackPanel>
</Border>
<!-- 采购退款成功金额 -->
<Border Style="{StaticResource CardBorderStyle}">
<StackPanel>
<TextBlock
FontSize="14"
Foreground="#888888"
Text="已退回采购金额" />
<TextBlock
Margin="0,12,0,0"
FontSize="30"
FontWeight="Bold"
Foreground="#333333"
Text="{Binding Summary.BuyerRefundSuccessedAmount, StringFormat={}¥{0:N2}}" />
<TextBlock
Margin="0,10,0,0"
FontSize="12"
Foreground="#999999"
Text="售后已退回金额" />
</StackPanel>
</Border>
<!-- 采购退款成功金额 -->
<Border Style="{StaticResource CardBorderStyle}">
<StackPanel>
<TextBlock
FontSize="14"
Foreground="#888888"
Text="待退回采购金额" />
<TextBlock
Margin="0,12,0,0"
FontSize="30"
FontWeight="Bold"
Foreground="#333333"
Text="{Binding Summary.BuyerRefundRemainingAmount, StringFormat={}¥{0:N2}}" />
<TextBlock
Margin="0,10,0,0"
FontSize="12"
Foreground="#999999"
Text="待退回采购金额" />
</StackPanel>
</Border>
<!-- 退款率 -->
<Border Style="{StaticResource CardBorderStyle}">
<StackPanel>
<TextBlock
FontSize="14"
Foreground="#888888"
Text="退款率" />
<TextBlock
Margin="0,12,0,0"
FontSize="30"
FontWeight="Bold"
Foreground="#333333"
Text="{Binding Summary.RefundRate, StringFormat={}{0:0.00}%}" />
<TextBlock
Margin="0,10,0,0"
FontSize="12"
Foreground="#999999"
Text="退款订单占比" />
</StackPanel>
</Border>
<!-- 达人佣金 -->
<Border Style="{StaticResource CardBorderStyle}">
<StackPanel>
<TextBlock
FontSize="14"
Foreground="#888888"
Text="达人佣金" />
<TextBlock
Margin="0,12,0,0"
FontSize="30"
FontWeight="Bold"
Foreground="#333333"
Text="{Binding Summary.Commission, StringFormat={}¥{0:N2}}" />
<TextBlock
Margin="0,10,0,0"
FontSize="12"
Foreground="#999999"
Text="佣金支出" />
</StackPanel>
</Border>
</UniformGrid>
</UserControl>