利润统计 功能开放

统计页面增加新的统计功能
This commit is contained in:
chfei committed 2026-08-07 18:52:33 +08:00
1 parent f12a7f14ea
commit d25374956e
10 files changed
+571 -323

No files matched your search

@@ -5,7 +5,8 @@
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}"
d:DataContext="{d:DesignInstance Type=vm:ShopRevenueStatisticsViewModel,
IsDesignTimeCreatable=True}"
mc:Ignorable="d">
<UserControl.Resources>
<!-- 卡片样式(白底、圆角、阴影) -->
@@ -26,25 +27,14 @@
</Style>
</UserControl.Resources>
<!-- 汇总卡片(2 行 x 5 列) -->
<Grid Margin="3,8,3,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- 汇总卡片(2 行 x 6 列) -->
<UniformGrid
Margin="3,8,3,0"
Columns="7"
Rows="2">
<!-- 销售额 -->
<Border
Grid.Row="0"
Grid.Column="0"
Style="{StaticResource CardBorderStyle}">
<Border Style="{StaticResource CardBorderStyle}">
<StackPanel>
<TextBlock
FontSize="14"
@@ -65,10 +55,7 @@
</Border>
<!-- 有效订单 -->
<Border
Grid.Row="0"
Grid.Column="1"
Style="{StaticResource CardBorderStyle}">
<Border Style="{StaticResource CardBorderStyle}">
<StackPanel>
<TextBlock
FontSize="14"
@@ -88,11 +75,29 @@
</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
Grid.Row="0"
Grid.Column="2"
Style="{StaticResource CardBorderStyle}">
<Border Style="{StaticResource CardBorderStyle}">
<StackPanel>
<TextBlock
FontSize="14"
@@ -111,108 +116,28 @@
Text="实际利润" />
</StackPanel>
</Border>
<!-- 退款金额 -->
<Border
Grid.Row="0"
Grid.Column="3"
Style="{StaticResource CardBorderStyle}">
<!-- 平均利润率 -->
<Border Style="{StaticResource CardBorderStyle}">
<StackPanel>
<TextBlock
FontSize="14"
Foreground="#888888"
Text="退款金额" />
Text="平均利润率" />
<TextBlock
Margin="0,12,0,0"
FontSize="30"
FontWeight="Bold"
Foreground="#333333"
Text="{Binding Summary.RefundAmount, StringFormat={}¥{0:N2}}" />
Text="{Binding Summary.AverageProfitRate, StringFormat={}{0:0.00}%}" />
<TextBlock
Margin="0,10,0,0"
FontSize="12"
Foreground="#999999"
Text="统计期间退款" />
Text="利润 / 采购金额" />
</StackPanel>
</Border>
<!-- 商品销量 -->
<Border
Grid.Row="0"
Grid.Column="4"
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.ProductSalesVolume, StringFormat={}{0:N0}}" />
<TextBlock
Margin="0,10,0,0"
FontSize="12"
Foreground="#999999"
Text="有效销量" />
</StackPanel>
</Border>
<!-- 平台服务费总额 -->
<Border
Grid.Row="1"
Grid.Column="0"
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
Grid.Row="1"
Grid.Column="1"
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>
<!-- 客单价 -->
<Border
Grid.Row="1"
Grid.Column="2"
Style="{StaticResource CardBorderStyle}">
<Border Style="{StaticResource CardBorderStyle}">
<StackPanel>
<TextBlock
FontSize="14"
@@ -232,11 +157,135 @@
</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
Grid.Row="1"
Grid.Column="3"
Style="{StaticResource CardBorderStyle}">
<Border Style="{StaticResource CardBorderStyle}">
<StackPanel>
<TextBlock
FontSize="14"
@@ -256,28 +305,27 @@
</StackPanel>
</Border>
<!-- 平均利润率 -->
<Border
Grid.Row="1"
Grid.Column="4"
Style="{StaticResource CardBorderStyle}">
<!-- 达人佣金 -->
<Border Style="{StaticResource CardBorderStyle}">
<StackPanel>
<TextBlock
FontSize="14"
Foreground="#888888"
Text="平均利润率" />
Text="达人佣金" />
<TextBlock
Margin="0,12,0,0"
FontSize="30"
FontWeight="Bold"
Foreground="#333333"
Text="{Binding Summary.AverageProfitRate, StringFormat={}{0:0.00}%}" />
Text="{Binding Summary.Commission, StringFormat={}¥{0:N2}}" />
<TextBlock
Margin="0,10,0,0"
FontSize="12"
Foreground="#999999"
Text="利润 / 采购金额" />
Text="佣金支出" />
</StackPanel>
</Border>
</Grid>
</UniformGrid>
</UserControl>