542 lines
24 KiB
XML
542 lines
24 KiB
XML
<UserControl
|
|
x:Class="OrpaonEMS.App.Views.YuPuReportView"
|
|
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:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
xmlns:keyboard="clr-namespace:KeyBoard.WPF.Behavior;assembly=KeyBoard.WPF"
|
|
xmlns:local="clr-namespace:OrpaonEMS.App.Views"
|
|
xmlns:localConverter="clr-namespace:OrpaonEMS.Core.Converts;assembly=OrpaonEMS.Core"
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
xmlns:sys="clr-namespace:System;assembly=netstandard"
|
|
Width="960"
|
|
Height="700"
|
|
mc:Ignorable="d">
|
|
<UserControl.Resources>
|
|
<localConverter:ElePvConverter x:Key="ElePvConverter" />
|
|
<localConverter:RatioConverter x:Key="RatioConverter" />
|
|
</UserControl.Resources>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="50" />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition Height="auto" />
|
|
</Grid.RowDefinitions>
|
|
<StackPanel
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<ComboBox
|
|
Width="80"
|
|
FontSize="16"
|
|
SelectedItem="{Binding SelectedYear, Mode=TwoWay}">
|
|
<ComboBox.ItemsSource>
|
|
<x:Array Type="{x:Type sys:String}">
|
|
<sys:String>2023年</sys:String>
|
|
<sys:String>2024年</sys:String>
|
|
<sys:String>2025年</sys:String>
|
|
<sys:String>2026年</sys:String>
|
|
<sys:String>2027年</sys:String>
|
|
<sys:String>2028年</sys:String>
|
|
<sys:String>2029年</sys:String>
|
|
<sys:String>2030年</sys:String>
|
|
<sys:String>2031年</sys:String>
|
|
<sys:String>2032年</sys:String>
|
|
<sys:String>2033年</sys:String>
|
|
<sys:String>2034年</sys:String>
|
|
<sys:String>2035年</sys:String>
|
|
<sys:String>2036年</sys:String>
|
|
<sys:String>2037年</sys:String>
|
|
<sys:String>2038年</sys:String>
|
|
<sys:String>2039年</sys:String>
|
|
<sys:String>2040年</sys:String>
|
|
</x:Array>
|
|
</ComboBox.ItemsSource>
|
|
</ComboBox>
|
|
|
|
<Label
|
|
Margin="5,0"
|
|
VerticalAlignment="Center"
|
|
HorizontalContentAlignment="Center"
|
|
Content="搜索时间:"
|
|
FontSize="16" />
|
|
<ComboBox
|
|
Width="60"
|
|
FontSize="16"
|
|
SelectedItem="{Binding SelectedStartMonth, Mode=TwoWay}">
|
|
<ComboBox.ItemsSource>
|
|
<x:Array Type="{x:Type sys:String}">
|
|
<sys:String>1月</sys:String>
|
|
<sys:String>2月</sys:String>
|
|
<sys:String>3月</sys:String>
|
|
<sys:String>4月</sys:String>
|
|
<sys:String>5月</sys:String>
|
|
<sys:String>6月</sys:String>
|
|
<sys:String>7月</sys:String>
|
|
<sys:String>8月</sys:String>
|
|
<sys:String>9月</sys:String>
|
|
<sys:String>10月</sys:String>
|
|
<sys:String>11月</sys:String>
|
|
<sys:String>12月</sys:String>
|
|
</x:Array>
|
|
</ComboBox.ItemsSource>
|
|
</ComboBox>
|
|
<TextBlock
|
|
Margin="10,0"
|
|
VerticalAlignment="Center"
|
|
FontSize="16"
|
|
Text="到" />
|
|
<ComboBox
|
|
Width="60"
|
|
FontSize="16"
|
|
SelectedItem="{Binding SelectedEndMonth, Mode=TwoWay}">
|
|
<ComboBox.ItemsSource>
|
|
<x:Array Type="{x:Type sys:String}">
|
|
<sys:String>1月</sys:String>
|
|
<sys:String>2月</sys:String>
|
|
<sys:String>3月</sys:String>
|
|
<sys:String>4月</sys:String>
|
|
<sys:String>5月</sys:String>
|
|
<sys:String>6月</sys:String>
|
|
<sys:String>7月</sys:String>
|
|
<sys:String>8月</sys:String>
|
|
<sys:String>9月</sys:String>
|
|
<sys:String>10月</sys:String>
|
|
<sys:String>11月</sys:String>
|
|
<sys:String>12月</sys:String>
|
|
</x:Array>
|
|
</ComboBox.ItemsSource>
|
|
</ComboBox>
|
|
|
|
<Button
|
|
Margin="30,0"
|
|
Command="{Binding EleFeesCmd}"
|
|
Content="开始计算" />
|
|
|
|
<Label
|
|
Margin="5,0"
|
|
VerticalAlignment="Center"
|
|
HorizontalContentAlignment="Center"
|
|
Content="光伏价格(单位:元):"
|
|
FontSize="16" />
|
|
<TextBox Width="80" Text="{Binding SolarPrice}" />
|
|
<!--<DatePicker
|
|
Width="120"
|
|
Margin="10,0,10,0"
|
|
materialDesign:HintAssist.Hint="结束时间"
|
|
SelectedDate="{Binding SearchEndDate, Mode=TwoWay}"
|
|
Style="{StaticResource MaterialDesignFloatingHintDatePicker}" />-->
|
|
</StackPanel>
|
|
<!--<ListBox
|
|
x:Name="RadioButtonGroupChoiceChipSecondaryOutline"
|
|
HorizontalAlignment="Center"
|
|
Style="{StaticResource MaterialDesignChoiceChipSecondaryOutlineListBox}">
|
|
<ListBoxItem Content="日" />
|
|
<ListBoxItem Content="月" IsSelected="True" />
|
|
<ListBoxItem Content="季度" />
|
|
<ListBoxItem Content="年" IsEnabled="True" />
|
|
</ListBox>-->
|
|
|
|
<Border
|
|
Grid.Row="1"
|
|
Margin="5,5"
|
|
Background="White"
|
|
CornerRadius="10">
|
|
<Border.Effect>
|
|
<DropShadowEffect
|
|
BlurRadius="20"
|
|
Direction="280"
|
|
Opacity="0.4"
|
|
ShadowDepth="0"
|
|
Color="DarkGray" />
|
|
</Border.Effect>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="40" />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
|
|
<StackPanel
|
|
Margin="3,2"
|
|
HorizontalAlignment="Right"
|
|
Orientation="Horizontal">
|
|
|
|
<Button
|
|
Width="60"
|
|
Margin="5,0"
|
|
Command="{Binding PeakValleyConfigAddCmd}"
|
|
Content="新增" />
|
|
<Button
|
|
Width="60"
|
|
Margin="5,0"
|
|
Content=""
|
|
FontFamily="../Assets/Fonts/#iconfont" />
|
|
<Button
|
|
Width="60"
|
|
Margin="5,0"
|
|
Content=""
|
|
FontFamily="../Assets/Fonts/#iconfont" />
|
|
</StackPanel>
|
|
|
|
<Border
|
|
Grid.Row="1"
|
|
Margin="2,0"
|
|
BorderBrush="Gray"
|
|
BorderThickness="1">
|
|
<DataGrid
|
|
x:Name="ConfigDatagrid"
|
|
AutoGenerateColumns="False"
|
|
IsReadOnly="True"
|
|
ItemsSource="{Binding ListPeakValleyDtoItems}"
|
|
ScrollViewer.CanContentScroll="True"
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
|
SelectionMode="Extended">
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn
|
|
Width="100"
|
|
Binding="{Binding Index}"
|
|
Header="序号" />
|
|
<DataGridTextColumn
|
|
Width="200"
|
|
Binding="{Binding ElePV, Converter={StaticResource ElePvConverter}}"
|
|
Header="类型" />
|
|
<DataGridTextColumn
|
|
Width="100"
|
|
Binding="{Binding StartTime}"
|
|
Header="开始时间" />
|
|
<DataGridTextColumn
|
|
Width="100"
|
|
Binding="{Binding EndTime}"
|
|
Header="结束时间" />
|
|
<DataGridTextColumn
|
|
Width="100"
|
|
Binding="{Binding Price}"
|
|
Header="价格" />
|
|
<DataGridCheckBoxColumn
|
|
Width="100"
|
|
Binding="{Binding Enable}"
|
|
Header="启用" />
|
|
<DataGridTemplateColumn Header="操作">
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
|
|
<!-- 框 -->
|
|
<Button
|
|
Margin="5,0"
|
|
Command="{Binding DataContext.PeakValleyConfigEditCmd, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
|
|
CommandParameter="{Binding}"
|
|
Content="编辑" />
|
|
<Button
|
|
Margin="5,0"
|
|
Command="{Binding DataContext.PeakValleyConfigDeleteCmd, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
|
|
CommandParameter="{Binding}"
|
|
Content="删除" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
</DataGridTemplateColumn>
|
|
</DataGrid.Columns>
|
|
<i:Interaction.Triggers>
|
|
<i:EventTrigger EventName="SelectionChanged">
|
|
<prism:InvokeCommandAction Command="{Binding GridSelectionChangedCmd}" CommandParameter="{Binding ElementName=ConfigDatagrid, Path=SelectedItem}" />
|
|
</i:EventTrigger>
|
|
</i:Interaction.Triggers>
|
|
|
|
<!--<DataGrid.RowStyle>
|
|
<Style TargetType="{x:Type DataGridRow}">
|
|
<Style.Triggers>
|
|
<Trigger Property="ItemsControl.AlternationIndex" Value="0">
|
|
<Setter Property="Background" Value="AliceBlue" />
|
|
</Trigger>
|
|
<Trigger Property="ItemsControl.AlternationIndex" Value="1">
|
|
<Setter Property="Background" Value="#FFF2F2F2" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</DataGrid.RowStyle>-->
|
|
</DataGrid>
|
|
</Border>
|
|
|
|
</Grid>
|
|
</Border>
|
|
|
|
<Border
|
|
Grid.Row="2"
|
|
Margin="5,5"
|
|
Background="White"
|
|
CornerRadius="10">
|
|
<Border.Effect>
|
|
<DropShadowEffect
|
|
BlurRadius="20"
|
|
Direction="280"
|
|
Opacity="0.4"
|
|
ShadowDepth="0"
|
|
Color="DarkGray" />
|
|
</Border.Effect>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="40" />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
|
|
<TextBlock
|
|
Margin="15,0"
|
|
FontSize="26"
|
|
Text="费用统计" />
|
|
|
|
<Grid Grid.Row="1">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="0.4*" />
|
|
<ColumnDefinition Width="0.4*" />
|
|
<ColumnDefinition Width="0.5*" />
|
|
<ColumnDefinition Width="0.5*" />
|
|
<ColumnDefinition Width="0.6*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<StackPanel
|
|
Grid.ColumnSpan="4"
|
|
HorizontalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock
|
|
HorizontalAlignment="Center"
|
|
FontSize="26"
|
|
Text="管理大楼1" />
|
|
</StackPanel>
|
|
<StackPanel
|
|
Grid.Column="5"
|
|
HorizontalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock
|
|
HorizontalAlignment="Center"
|
|
FontSize="26"
|
|
Text="管理大楼2" />
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
Grid.Row="1"
|
|
Margin="5,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock FontSize="18" Text="尖峰充电:" />
|
|
<TextBlock FontSize="18" Text="{Binding YuPuEleFees.TopPeakChargPw, StringFormat=0.00}" />
|
|
</StackPanel>
|
|
<StackPanel
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Margin="5,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock FontSize="18" Text="尖峰放电:" />
|
|
<TextBlock FontSize="18" Text="{Binding YuPuEleFees.TopPeakDisChargPw, StringFormat=0.00}" />
|
|
</StackPanel>
|
|
<StackPanel
|
|
Grid.Row="1"
|
|
Grid.Column="2"
|
|
Margin="5,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock FontSize="18" Text="尖峰充电费用:" />
|
|
<TextBlock FontSize="18" Text="{Binding YuPuEleFees.TopPeakCharg, StringFormat=0.00}" />
|
|
</StackPanel>
|
|
<StackPanel
|
|
Grid.Row="1"
|
|
Grid.Column="3"
|
|
Margin="5,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock FontSize="18" Text="尖峰放电费用:" />
|
|
<TextBlock FontSize="18" Text="{Binding YuPuEleFees.TopPeakDisCharg, StringFormat=0.00}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
Grid.Row="2"
|
|
Margin="5,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock FontSize="18" Text="峰充电:" />
|
|
<TextBlock FontSize="18" Text="{Binding YuPuEleFees.PeakChargPw, StringFormat=0.00}" />
|
|
</StackPanel>
|
|
<StackPanel
|
|
Grid.Row="2"
|
|
Grid.Column="1"
|
|
Margin="5,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock FontSize="18" Text="峰放电:" />
|
|
<TextBlock FontSize="18" Text="{Binding YuPuEleFees.PeakDisChargPw, StringFormat=0.00}" />
|
|
</StackPanel>
|
|
<StackPanel
|
|
Grid.Row="2"
|
|
Grid.Column="2"
|
|
Margin="5,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock FontSize="18" Text="峰充电费用:" />
|
|
<TextBlock FontSize="18" Text="{Binding YuPuEleFees.PeakCharg, StringFormat=0.00}" />
|
|
</StackPanel>
|
|
<StackPanel
|
|
Grid.Row="2"
|
|
Grid.Column="3"
|
|
Margin="5,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock FontSize="18" Text="峰放电费用:" />
|
|
<TextBlock FontSize="18" Text="{Binding YuPuEleFees.PeakDisCharg, StringFormat=0.00}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
Grid.Row="3"
|
|
Margin="5,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock FontSize="18" Text="平充电:" />
|
|
<TextBlock FontSize="18" Text="{Binding YuPuEleFees.FlatChargPw, StringFormat=0.00}" />
|
|
</StackPanel>
|
|
<StackPanel
|
|
Grid.Row="3"
|
|
Grid.Column="1"
|
|
Margin="5,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock FontSize="18" Text="平放电:" />
|
|
<TextBlock FontSize="18" Text="{Binding YuPuEleFees.FlatDisChargPw, StringFormat=0.00}" />
|
|
</StackPanel>
|
|
<StackPanel
|
|
Grid.Row="3"
|
|
Grid.Column="2"
|
|
Margin="5,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock FontSize="18" Text="平充电费用:" />
|
|
<TextBlock FontSize="18" Text="{Binding YuPuEleFees.FlatCharg, StringFormat=0.00}" />
|
|
</StackPanel>
|
|
<StackPanel
|
|
Grid.Row="3"
|
|
Grid.Column="3"
|
|
Margin="5,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock FontSize="18" Text="平放电费用:" />
|
|
<TextBlock FontSize="18" Text="{Binding YuPuEleFees.FlatDisCharg, StringFormat=0.00}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
Grid.Row="4"
|
|
Margin="5,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock FontSize="18" Text="谷充电:" />
|
|
<TextBlock FontSize="18" Text="{Binding YuPuEleFees.ValleyChargPw, StringFormat=0.00}" />
|
|
</StackPanel>
|
|
<StackPanel
|
|
Grid.Row="4"
|
|
Grid.Column="1"
|
|
Margin="5,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock FontSize="18" Text="谷放电:" />
|
|
<TextBlock FontSize="18" Text="{Binding YuPuEleFees.ValleyDisChargPw, StringFormat=0.00}" />
|
|
</StackPanel>
|
|
<StackPanel
|
|
Grid.Row="4"
|
|
Grid.Column="2"
|
|
Margin="5,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock FontSize="18" Text="谷充电费用:" />
|
|
<TextBlock FontSize="18" Text="{Binding YuPuEleFees.ValleyCharg, StringFormat=0.00}" />
|
|
</StackPanel>
|
|
<StackPanel
|
|
Grid.Row="4"
|
|
Grid.Column="3"
|
|
Margin="5,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock FontSize="18" Text="谷放电费用:" />
|
|
<TextBlock FontSize="18" Text="{Binding YuPuEleFees.ValleyDisCharg, StringFormat=0.00}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
Grid.Row="5"
|
|
Grid.ColumnSpan="4"
|
|
Margin="5,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock FontSize="18" Text="储能收益:" />
|
|
<TextBlock FontSize="18" Text="{Binding YuPuEleFees.ManageTotalEleFees, StringFormat=0.00}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
Grid.Row="1"
|
|
Grid.Column="4"
|
|
Margin="5,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock FontSize="17" Text="光伏供管理大楼2电量:" />
|
|
<TextBlock FontSize="18" Text="{Binding YuPuEleFees.TaxSolarDisChargPw, StringFormat=0.0}" />
|
|
</StackPanel>
|
|
<StackPanel
|
|
Grid.Row="2"
|
|
Grid.Column="4"
|
|
Margin="5,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock FontSize="17" Text="光伏发电单价:" />
|
|
<TextBlock FontSize="18" Text="{Binding SolarPrice}" />
|
|
</StackPanel>
|
|
<StackPanel
|
|
Grid.Row="3"
|
|
Grid.Column="4"
|
|
Margin="5,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock FontSize="17" Text="光伏发电收益:" />
|
|
<TextBlock FontSize="18" Text="{Binding YuPuEleFees.TaxSolarDisCharg, StringFormat=0.0}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
Grid.Row="6"
|
|
Grid.Column="1"
|
|
Grid.ColumnSpan="4"
|
|
Margin="5,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock FontSize="17" Text="节能公司收益:(光伏发电收益+储能收益) * 0.95=" />
|
|
<TextBlock FontSize="18" Text="{Binding YuPuEleFees.TotalEleFees, StringFormat=0.0}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
</Grid>
|
|
</Border>
|
|
|
|
<StackPanel />
|
|
|
|
<StackPanel
|
|
Grid.Row="3"
|
|
HorizontalAlignment="Right"
|
|
Orientation="Horizontal">
|
|
<Button
|
|
Margin="10,10"
|
|
Command="{Binding SaveCmd}"
|
|
Content="确定" />
|
|
<Button
|
|
Margin="10,0"
|
|
Command="{Binding CancelCmd}"
|
|
Content="取消" />
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
</UserControl>
|