916 lines
31 KiB
XML
916 lines
31 KiB
XML
<UserControl
|
||
x:Class="_29WxOrderWpf.Ctrls.PDDInvoice.PDDInvoiceView"
|
||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
xmlns:comm="WxOrder.Framework"
|
||
xmlns:common="WxOrder.Framework"
|
||
xmlns:converters="clr-namespace:_29WxOrderWpf.Converters"
|
||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
xmlns:vm="clr-namespace:_29WxOrderWpf.Ctrls.PDDInvoice.ViewModels"
|
||
xmlns:wpf="clr-namespace:WPFCommon.Controls;assembly=WPFCommon"
|
||
comm:DialogWindowProperty.ResizeMode="CanResizeWithGrip"
|
||
comm:DialogWindowProperty.ShowMinButton="True"
|
||
common:DialogWindowProperty.Height="720"
|
||
common:DialogWindowProperty.Width="1260"
|
||
d:DataContext="{d:DesignInstance Type=vm:PDDInvoiceViewModel,
|
||
IsDesignTimeCreatable=True}"
|
||
d:DesignHeight="720"
|
||
d:DesignWidth="1960"
|
||
Background="White"
|
||
mc:Ignorable="d">
|
||
|
||
<UserControl.Resources>
|
||
<BooleanToVisibilityConverter x:Key="BooleanToVisibility" />
|
||
<converters:ImageUrlToBitmapImageConverter x:Key="ImageUrlToBitmapImageConverter" />
|
||
<converters:InverseVisibleToVisibilityConverter x:Key="InverseBooleanToVisibility" />
|
||
<converters:ImageLoadRequestConverter x:Key="ImageLoadRequestConverter" />
|
||
<!-- 原型配色 -->
|
||
<SolidColorBrush x:Key="PageBgBrush" Color="#F5F6F8" />
|
||
<SolidColorBrush x:Key="CardBgBrush" Color="#FFFFFF" />
|
||
<SolidColorBrush x:Key="RowBgBrush" Color="#FAFAFA" />
|
||
<SolidColorBrush x:Key="SplitLineBrush" Color="#EBEEF5" />
|
||
<SolidColorBrush x:Key="InputBorderBrush" Color="#DCDFE6" />
|
||
<SolidColorBrush x:Key="PrimaryBrush" Color="#409EFF" />
|
||
<SolidColorBrush x:Key="PrimaryHoverBrush" Color="#66B1FF" />
|
||
<SolidColorBrush x:Key="TextPrimaryBrush" Color="#333333" />
|
||
<SolidColorBrush x:Key="TextNormalBrush" Color="#666666" />
|
||
<SolidColorBrush x:Key="TextSecondaryBrush" Color="#909399" />
|
||
<SolidColorBrush x:Key="TextPlaceholderBrush" Color="#C0C4CC" />
|
||
<SolidColorBrush x:Key="AmountBrush" Color="#F56C6C" />
|
||
<SolidColorBrush x:Key="SuccessBrush" Color="#67C23A" />
|
||
<SolidColorBrush x:Key="WarningBrush" Color="#E6A23C" />
|
||
|
||
<!-- 表头单元格 -->
|
||
<Style x:Key="HeaderCellTextStyle" TargetType="TextBlock">
|
||
<Setter Property="FontSize" Value="13" />
|
||
<Setter Property="Foreground" Value="{StaticResource TextNormalBrush}" />
|
||
<Setter Property="VerticalAlignment" Value="Center" />
|
||
</Style>
|
||
|
||
<!-- 搜索 / 表单输入框 -->
|
||
<Style x:Key="SearchTextBoxStyle" TargetType="TextBox">
|
||
<Setter Property="Height" Value="30" />
|
||
<Setter Property="Padding" Value="12,0" />
|
||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||
<Setter Property="FontSize" Value="13" />
|
||
<Setter Property="Foreground" Value="{StaticResource TextPrimaryBrush}" />
|
||
<Setter Property="Background" Value="White" />
|
||
<Setter Property="BorderBrush" Value="{StaticResource InputBorderBrush}" />
|
||
<Setter Property="BorderThickness" Value="1" />
|
||
<Setter Property="Template">
|
||
<Setter.Value>
|
||
<ControlTemplate TargetType="TextBox">
|
||
<Border
|
||
x:Name="border"
|
||
Background="{TemplateBinding Background}"
|
||
BorderBrush="{TemplateBinding BorderBrush}"
|
||
BorderThickness="{TemplateBinding BorderThickness}"
|
||
CornerRadius="4">
|
||
<ScrollViewer x:Name="PART_ContentHost" Margin="{TemplateBinding Padding}" />
|
||
</Border>
|
||
<ControlTemplate.Triggers>
|
||
<Trigger Property="IsKeyboardFocused" Value="True">
|
||
<Setter TargetName="border" Property="BorderBrush" Value="{StaticResource PrimaryBrush}" />
|
||
</Trigger>
|
||
<Trigger Property="IsEnabled" Value="False">
|
||
<Setter TargetName="border" Property="Opacity" Value="0.6" />
|
||
</Trigger>
|
||
</ControlTemplate.Triggers>
|
||
</ControlTemplate>
|
||
</Setter.Value>
|
||
</Setter>
|
||
</Style>
|
||
<Style BasedOn="{StaticResource BasePageButtonStyle}" TargetType="Button">
|
||
<Setter Property="Height" Value="30" />
|
||
</Style>
|
||
<!-- 文字链接按钮 -->
|
||
<Style x:Key="LinkButtonStyle" TargetType="Button">
|
||
<Setter Property="Background" Value="Transparent" />
|
||
<Setter Property="BorderThickness" Value="0" />
|
||
<Setter Property="Foreground" Value="{StaticResource PrimaryBrush}" />
|
||
<Setter Property="FontSize" Value="13" />
|
||
<Setter Property="Cursor" Value="Hand" />
|
||
<Setter Property="Padding" Value="0" />
|
||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||
<Setter Property="Template">
|
||
<Setter.Value>
|
||
<ControlTemplate TargetType="Button">
|
||
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
|
||
<ControlTemplate.Triggers>
|
||
<Trigger Property="IsMouseOver" Value="True">
|
||
<Setter Property="Foreground" Value="{StaticResource PrimaryHoverBrush}" />
|
||
</Trigger>
|
||
</ControlTemplate.Triggers>
|
||
</ControlTemplate>
|
||
</Setter.Value>
|
||
</Setter>
|
||
</Style>
|
||
|
||
<!-- 弹窗遮罩 -->
|
||
<Style x:Key="ModalMaskStyle" TargetType="Border">
|
||
<Setter Property="Background" Value="#80000000" />
|
||
<Setter Property="Panel.ZIndex" Value="100" />
|
||
</Style>
|
||
|
||
<!-- 发票详情 标签 / 值 -->
|
||
<Style x:Key="DetailLabelStyle" TargetType="TextBlock">
|
||
<Setter Property="Width" Value="100" />
|
||
<Setter Property="FontSize" Value="14" />
|
||
<Setter Property="Foreground" Value="{StaticResource TextSecondaryBrush}" />
|
||
<Setter Property="VerticalAlignment" Value="Center" />
|
||
</Style>
|
||
<Style x:Key="DetailValueStyle" TargetType="TextBlock">
|
||
<Setter Property="FontSize" Value="14" />
|
||
<Setter Property="Foreground" Value="{StaticResource TextPrimaryBrush}" />
|
||
<Setter Property="VerticalAlignment" Value="Center" />
|
||
</Style>
|
||
</UserControl.Resources>
|
||
<Border Padding="10,10,10,0">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="30" />
|
||
<RowDefinition Height="*" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
|
||
<!-- 功能区域 -->
|
||
<Border Grid.Row="0">
|
||
|
||
<wpf:SpacingStackPanel Background="{StaticResource CardBgBrush}" HorizontalSpacing="10">
|
||
<Grid Width="200">
|
||
<TextBox
|
||
x:Name="txtSearch"
|
||
Padding="5,0,0,0"
|
||
KeyDown="txtSearch_KeyDown"
|
||
Style="{StaticResource SearchTextBoxStyle}"
|
||
Text="{Binding SearchText, UpdateSourceTrigger=PropertyChanged}" />
|
||
<TextBlock
|
||
Padding="12,0,0,0"
|
||
VerticalAlignment="Center"
|
||
FontSize="13"
|
||
Foreground="{StaticResource TextPlaceholderBrush}"
|
||
IsHitTestVisible="False"
|
||
Text="请输入订单号 / 商品名称"
|
||
Visibility="{Binding Text, ElementName=txtSearch, Converter={StaticResource NotHasTextVisibility}}" />
|
||
</Grid>
|
||
<wpf:TitleContent
|
||
Title="发票状态"
|
||
Placement="Left"
|
||
TitleVerticalAlignment="Center">
|
||
<ComboBox
|
||
Width="100"
|
||
Height="30"
|
||
d:SelectedIndex="0"
|
||
SelectedIndex="{Binding InvoiceStatus}"
|
||
Style="{StaticResource RoundedComboBox}">
|
||
<ComboBoxItem Content="全部" />
|
||
<ComboBoxItem Content="待开票" />
|
||
<ComboBoxItem Content="已申请" />
|
||
</ComboBox>
|
||
|
||
</wpf:TitleContent>
|
||
<wpf:TitleContent
|
||
Title="时间范围:"
|
||
HorizontalContentAlignment="Center"
|
||
Placement="Left"
|
||
TitleVerticalAlignment="Center">
|
||
<WrapPanel>
|
||
<DatePicker
|
||
Height="30"
|
||
VerticalAlignment="Center"
|
||
VerticalContentAlignment="Center"
|
||
d:SelectedDate="2026/01/01"
|
||
SelectedDate="{Binding StartTime}" />
|
||
<Border
|
||
Width="5"
|
||
Height="1"
|
||
BorderBrush="LightGray"
|
||
BorderThickness="1" />
|
||
<DatePicker
|
||
Height="30"
|
||
VerticalAlignment="Center"
|
||
VerticalContentAlignment="Center"
|
||
d:SelectedDate="2026/01/01"
|
||
SelectedDate="{Binding EndTime}" />
|
||
|
||
</WrapPanel>
|
||
</wpf:TitleContent>
|
||
<Button
|
||
Width="50"
|
||
Command="{Binding SearchCommand}"
|
||
Content="搜索" />
|
||
<Button
|
||
Command="{Binding ResetCommand}"
|
||
Content="重置"
|
||
Style="{StaticResource LinkButtonStyle}" />
|
||
|
||
<wpf:TitleContent
|
||
Title="买手号:"
|
||
Placement="Left"
|
||
TitleVerticalAlignment="Center">
|
||
<ComboBox
|
||
Width="150"
|
||
Height="28"
|
||
DisplayMemberPath="buyer_nick"
|
||
ItemsSource="{Binding BuyerLoginList}"
|
||
SelectedItem="{Binding SelectedBuyer}"
|
||
Style="{StaticResource RoundedComboBox}" />
|
||
</wpf:TitleContent>
|
||
<Button
|
||
Padding="5,0"
|
||
Command="{Binding ReadOrderCommand}"
|
||
Content="读取订单"
|
||
Visibility="{Binding IsReadOrder, Converter={StaticResource Boolean2VisibilityReConverter}}" />
|
||
<Button
|
||
Height="30"
|
||
Padding="5,0"
|
||
Command="{Binding StopReadOrderCommand}"
|
||
Content="停止读单"
|
||
Style="{StaticResource BasePageButtonStyle}"
|
||
Visibility="{Binding IsReadOrder, Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||
<Button
|
||
Padding="10,0"
|
||
Command="{Binding BatchInvoiceCommand}"
|
||
Content="批量开票"
|
||
Visibility="{Binding IsBatchInvoicing, Converter={StaticResource Boolean2VisibilityReConverter}}" />
|
||
<Button
|
||
Padding="10,0"
|
||
Command="{Binding StopBatchInvoiceCommand}"
|
||
Content="停止开票"
|
||
Visibility="{Binding IsBatchInvoicing, Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||
<Button
|
||
Padding="10,0"
|
||
Command="{Binding ShowSettingDialogCommand}"
|
||
Content="设置"
|
||
Style="{StaticResource BasePageButtonLightStyle}" />
|
||
|
||
<!--<wpf:TitleContent
|
||
Title="公司:"
|
||
Placement="Left"
|
||
TitleVerticalAlignment="Center">
|
||
<TextBox
|
||
Width="150"
|
||
Height="30"
|
||
Padding="5,0"
|
||
VerticalContentAlignment="Center"
|
||
Text="{Binding InvoiceTitle}" />
|
||
</wpf:TitleContent>
|
||
<wpf:TitleContent
|
||
Title="税号:"
|
||
Placement="Left"
|
||
TitleVerticalAlignment="Center">
|
||
<TextBox
|
||
Width="150"
|
||
Height="30"
|
||
Padding="5,0"
|
||
VerticalContentAlignment="Center"
|
||
Text="{Binding TaxNo}" />
|
||
</wpf:TitleContent>
|
||
<wpf:TitleContent
|
||
Title="最大金额:"
|
||
VerticalContentAlignment="Center"
|
||
Placement="Left"
|
||
TitleVerticalAlignment="Center">
|
||
<wpf:NumberBox
|
||
Width="80"
|
||
Maximum="999999"
|
||
Minimum="0"
|
||
Value="{Binding MaxAmount}" />
|
||
</wpf:TitleContent>-->
|
||
<CheckBox
|
||
VerticalContentAlignment="Center"
|
||
Content="显示订单窗口"
|
||
IsChecked="{Binding IsOrderListDialogOpen}" />
|
||
|
||
</wpf:SpacingStackPanel>
|
||
</Border>
|
||
<!-- 订单列表(已移除分页与订单分组) -->
|
||
<Border
|
||
Grid.Row="1"
|
||
Height="Auto"
|
||
Margin="0,10,0,0"
|
||
VerticalAlignment="Stretch"
|
||
Background="{StaticResource CardBgBrush}"
|
||
CornerRadius="6">
|
||
<Grid>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="*" />
|
||
</Grid.RowDefinitions>
|
||
|
||
|
||
<!-- 表头 -->
|
||
<Border
|
||
Grid.Row="0"
|
||
Padding="20,10"
|
||
Background="{StaticResource RowBgBrush}"
|
||
BorderBrush="{StaticResource SplitLineBrush}"
|
||
BorderThickness="0,0,0,1">
|
||
<Grid>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="30" />
|
||
<ColumnDefinition Width="3*" />
|
||
<ColumnDefinition Width="10" />
|
||
<ColumnDefinition Width="80" />
|
||
<ColumnDefinition Width="1*" />
|
||
<ColumnDefinition Width="1.2*" />
|
||
<ColumnDefinition Width="80" />
|
||
</Grid.ColumnDefinitions>
|
||
<StackPanel
|
||
Grid.Column="0"
|
||
HorizontalAlignment="Center"
|
||
VerticalAlignment="Center"
|
||
Orientation="Horizontal">
|
||
<CheckBox
|
||
VerticalAlignment="Center"
|
||
FontSize="13"
|
||
Foreground="{StaticResource TextNormalBrush}"
|
||
IsChecked="{Binding IsSelectAll}" />
|
||
<!--<Button
|
||
Margin="8,0,0,0"
|
||
VerticalAlignment="Center"
|
||
Command="{Binding InvertSelectionCommand}"
|
||
Content="反选"
|
||
Style="{StaticResource LinkButtonStyle}" />-->
|
||
</StackPanel>
|
||
<WrapPanel Grid.Column="1">
|
||
<TextBlock Style="{StaticResource HeaderCellTextStyle}" Text="商品信息" />
|
||
<TextBlock Margin="10,0,0,0" Style="{StaticResource HeaderCellTextStyle}">
|
||
<TextBlock.Text>
|
||
<MultiBinding StringFormat="({0}/{1})">
|
||
<Binding Path="SelectedCount" />
|
||
<Binding Path="Orders.Count" />
|
||
</MultiBinding>
|
||
</TextBlock.Text>
|
||
</TextBlock>
|
||
<TextBlock
|
||
Margin="10,0,0,0"
|
||
FontSize="14"
|
||
FontWeight="Black"
|
||
Foreground="{StaticResource SuccessBrush}"
|
||
Text="{Binding AmountTotal, StringFormat='已开 {0} 金额'}" />
|
||
</WrapPanel>
|
||
<TextBlock
|
||
Grid.Column="3"
|
||
Style="{StaticResource HeaderCellTextStyle}"
|
||
Text="数量" />
|
||
<TextBlock
|
||
Grid.Column="4"
|
||
Style="{StaticResource HeaderCellTextStyle}"
|
||
Text="实付金额" />
|
||
<WrapPanel Grid.Column="5">
|
||
<TextBlock
|
||
Margin="0,0,20,0"
|
||
Style="{StaticResource HeaderCellTextStyle}"
|
||
Text="发票" />
|
||
<TextBlock Foreground="{StaticResource SuccessBrush}" Text="{Binding InvoicedAmountTotal, StringFormat='已开:¥{0:N2}'}" />
|
||
<TextBlock
|
||
Margin="5,0"
|
||
Foreground="LightGray"
|
||
Text="/" />
|
||
<TextBlock Foreground="{StaticResource AmountBrush}" Text="{Binding UninvoicedAmountTotal, StringFormat='未开:¥{0:N2}'}" />
|
||
</WrapPanel>
|
||
|
||
<TextBlock
|
||
Grid.Column="6"
|
||
Style="{StaticResource HeaderCellTextStyle}"
|
||
Text="操作" />
|
||
</Grid>
|
||
</Border>
|
||
<Grid Grid.Row="1">
|
||
<Border Background="White">
|
||
<!-- 列表(虚拟化滚动加载) -->
|
||
<ItemsControl
|
||
x:Name="itemsControl"
|
||
Margin="0,2,0,-2"
|
||
Padding="0"
|
||
HorizontalContentAlignment="Stretch"
|
||
ItemsSource="{Binding OrdersView}">
|
||
<ItemsControl.Template>
|
||
<ControlTemplate TargetType="ItemsControl">
|
||
<ScrollViewer
|
||
x:Name="PART_ScrollViewer"
|
||
CanContentScroll="True"
|
||
HorizontalScrollBarVisibility="Disabled"
|
||
ScrollChanged="ScrollViewer_ScrollChanged"
|
||
VerticalScrollBarVisibility="Auto">
|
||
<ItemsPresenter />
|
||
</ScrollViewer>
|
||
</ControlTemplate>
|
||
</ItemsControl.Template>
|
||
<ItemsControl.ItemsPanel>
|
||
<ItemsPanelTemplate>
|
||
<VirtualizingStackPanel
|
||
CacheLength="1,1"
|
||
CacheLengthUnit="Page"
|
||
IsVirtualizing="True"
|
||
ScrollUnit="Pixel"
|
||
VirtualizationMode="Recycling" />
|
||
</ItemsPanelTemplate>
|
||
</ItemsControl.ItemsPanel>
|
||
<ItemsControl.ItemTemplate>
|
||
<DataTemplate>
|
||
<Border BorderBrush="{StaticResource SplitLineBrush}" BorderThickness="0,0,0,1">
|
||
<Border.Style>
|
||
<Style TargetType="Border">
|
||
<Setter Property="Background" Value="Transparent" />
|
||
<Style.Triggers>
|
||
<DataTrigger Binding="{Binding IsSelected}" Value="True">
|
||
<Setter Property="Background" Value="#ECF5FF" />
|
||
</DataTrigger>
|
||
</Style.Triggers>
|
||
</Style>
|
||
</Border.Style>
|
||
<StackPanel>
|
||
<!-- 订单信息栏 -->
|
||
<Border Padding="20,12" Background="{StaticResource RowBgBrush}">
|
||
<StackPanel Orientation="Horizontal">
|
||
<TextBlock
|
||
FontSize="12"
|
||
Foreground="{StaticResource TextNormalBrush}"
|
||
Text="{Binding order_sn, StringFormat=订单号:{0}}" />
|
||
<TextBlock
|
||
Margin="28,0,0,0"
|
||
FontSize="12"
|
||
Foreground="{StaticResource TextNormalBrush}"
|
||
Text="{Binding OrderTime, StringFormat=下单时间:{0:yyyy-MM-dd}}" />
|
||
<TextBlock
|
||
Margin="28,0,0,0"
|
||
FontSize="12"
|
||
Foreground="{StaticResource TextNormalBrush}"
|
||
Text="{Binding order_status_prompt}" />
|
||
</StackPanel>
|
||
</Border>
|
||
|
||
<!-- 订单内容 -->
|
||
<Border Padding="20">
|
||
<Grid>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="30" />
|
||
<ColumnDefinition Width="3*" />
|
||
<ColumnDefinition Width="10" />
|
||
<ColumnDefinition Width="80" />
|
||
<ColumnDefinition Width="1*" />
|
||
<ColumnDefinition Width="1.2*" />
|
||
<ColumnDefinition Width="80" />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<!-- 勾选 -->
|
||
<CheckBox
|
||
Grid.Column="0"
|
||
HorizontalAlignment="Center"
|
||
VerticalAlignment="Center"
|
||
IsChecked="{Binding IsSelected}" />
|
||
|
||
<!-- 商品 -->
|
||
<Grid Grid.Column="1" VerticalAlignment="Center">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="72" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
<Border
|
||
Width="72"
|
||
Height="72"
|
||
Background="#EEEEEE"
|
||
CornerRadius="5">
|
||
<Image Stretch="UniformToFill">
|
||
<converters:AsyncImageLoader.Request>
|
||
<MultiBinding Converter="{StaticResource ImageLoadRequestConverter}">
|
||
<Binding Path="ThumbUrl" />
|
||
<Binding Path="DataContext.IsLoadImage" RelativeSource="{RelativeSource AncestorType=UserControl}" />
|
||
</MultiBinding>
|
||
</converters:AsyncImageLoader.Request>
|
||
</Image>
|
||
<!--<Image
|
||
converters:AsyncImageLoader.IsLoadImage="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=DataContext.IsLoadImage}"
|
||
converters:AsyncImageLoader.SourceUrl="{Binding ThumbUrl}"
|
||
Stretch="UniformToFill">
|
||
-->
|
||
<!--<Image.Source>
|
||
<MultiBinding Converter="{StaticResource ImageUrlToBitmapImageConverter}" Mode="OneWay">
|
||
<Binding IsAsync="True" Path="ThumbUrl" />
|
||
<Binding Path="DataContext.IsLoadImage" RelativeSource="{RelativeSource AncestorType=UserControl}" />
|
||
</MultiBinding>
|
||
</Image.Source>-->
|
||
<!--
|
||
</Image>-->
|
||
</Border>
|
||
<StackPanel
|
||
Grid.Column="1"
|
||
Margin="14,0,0,0"
|
||
VerticalAlignment="Center">
|
||
<TextBlock
|
||
MaxHeight="44"
|
||
FontSize="14"
|
||
Foreground="{StaticResource TextPrimaryBrush}"
|
||
LineHeight="22"
|
||
Text="{Binding GoodsName}"
|
||
TextTrimming="CharacterEllipsis"
|
||
TextWrapping="Wrap" />
|
||
|
||
</StackPanel>
|
||
</Grid>
|
||
|
||
|
||
<!-- 数量 -->
|
||
<TextBlock
|
||
Grid.Column="3"
|
||
VerticalAlignment="Center"
|
||
FontSize="13"
|
||
Foreground="{StaticResource TextPrimaryBrush}"
|
||
Text="{Binding Quantity, StringFormat=×{0}}" />
|
||
|
||
<!-- 实付金额 -->
|
||
<TextBlock
|
||
Grid.Column="4"
|
||
VerticalAlignment="Center"
|
||
FontSize="16"
|
||
FontWeight="SemiBold"
|
||
Foreground="{StaticResource AmountBrush}"
|
||
Text="{Binding DisplayAmount}" />
|
||
|
||
<!-- 发票 -->
|
||
<StackPanel Grid.Column="5" VerticalAlignment="Center">
|
||
<TextBlock FontSize="13" Text="{Binding InvoiceStatusText}">
|
||
<TextBlock.Style>
|
||
<Style TargetType="TextBlock">
|
||
<Setter Property="Foreground" Value="{StaticResource WarningBrush}" />
|
||
<Style.Triggers>
|
||
<DataTrigger Binding="{Binding IsInvoiced}" Value="True">
|
||
<Setter Property="Foreground" Value="{StaticResource SuccessBrush}" />
|
||
</DataTrigger>
|
||
</Style.Triggers>
|
||
</Style>
|
||
</TextBlock.Style>
|
||
</TextBlock>
|
||
</StackPanel>
|
||
|
||
<!-- 操作 -->
|
||
<StackPanel Grid.Column="6" VerticalAlignment="Center">
|
||
<Button
|
||
d:Visibility="Visible"
|
||
Command="{Binding DataContext.ShowInvoiceCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||
CommandParameter="{Binding}"
|
||
Content="查看发票"
|
||
Style="{StaticResource LinkButtonStyle}"
|
||
Visibility="{Binding IsInvoiced, Converter={StaticResource BooleanToVisibility}}" />
|
||
<Button
|
||
Margin="0,5"
|
||
Command="{Binding DataContext.OpenInvoiceCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||
CommandParameter="{Binding}"
|
||
Content="申请开票"
|
||
Style="{StaticResource LinkButtonStyle}"
|
||
Visibility="{Binding IsInvoiced, Converter={StaticResource InverseBooleanToVisibility}}" />
|
||
<Button
|
||
Command="{Binding DataContext.ViewOrderCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
|
||
CommandParameter="{Binding}"
|
||
Content="查看订单"
|
||
Style="{StaticResource LinkButtonStyle}" />
|
||
</StackPanel>
|
||
</Grid>
|
||
</Border>
|
||
</StackPanel>
|
||
</Border>
|
||
</DataTemplate>
|
||
</ItemsControl.ItemTemplate>
|
||
</ItemsControl>
|
||
</Border>
|
||
<Border
|
||
Grid.Row="1"
|
||
Panel.ZIndex="{Binding BrowserZIndex}"
|
||
d:Panel.ZIndex="-10"
|
||
Style="{StaticResource ModalMaskStyle}">
|
||
<Grid>
|
||
<ContentControl
|
||
Grid.Row="0"
|
||
Width="400"
|
||
Height="600"
|
||
Background="White"
|
||
Content="{Binding Browser}" />
|
||
</Grid>
|
||
</Border>
|
||
<Border
|
||
Grid.Row="1"
|
||
Panel.ZIndex="{Binding BrowserDetailZIndex}"
|
||
d:Panel.ZIndex="-10"
|
||
Style="{StaticResource ModalMaskStyle}">
|
||
<Grid
|
||
Width="400"
|
||
Height="600"
|
||
Background="White">
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="*" />
|
||
</Grid.RowDefinitions>
|
||
<Border
|
||
Padding="10"
|
||
BorderBrush="LightGray"
|
||
BorderThickness="0,0,0,1">
|
||
<Grid>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="*" />
|
||
<ColumnDefinition Width="50" />
|
||
</Grid.ColumnDefinitions>
|
||
<TextBlock
|
||
FontSize="16"
|
||
FontWeight="Black"
|
||
Text="{Binding SelectedOrder.GoodsName}" />
|
||
<StackPanel
|
||
Grid.Column="1"
|
||
HorizontalAlignment="Right"
|
||
Orientation="Horizontal">
|
||
<Button
|
||
Command="{Binding CloseInvoiceDetailCommand}"
|
||
Content="关闭"
|
||
Style="{StaticResource LinkButtonStyle}" />
|
||
</StackPanel>
|
||
</Grid>
|
||
</Border>
|
||
<ContentControl Grid.Row="1" Content="{Binding BrowserDetail}" />
|
||
|
||
</Grid>
|
||
|
||
</Border>
|
||
</Grid>
|
||
|
||
</Grid>
|
||
</Border>
|
||
|
||
<Grid
|
||
Grid.Row="2"
|
||
Height="18"
|
||
Margin="-10,5,-10,0"
|
||
Background="{StaticResource pageColorBrush}">
|
||
<ProgressBar
|
||
VerticalAlignment="Stretch"
|
||
d:IsIndeterminate="False"
|
||
d:Maximum="100"
|
||
d:Value="10"
|
||
Background="Transparent"
|
||
BorderThickness="0"
|
||
Foreground="#FFA680"
|
||
Maximum="{Binding ProgressMaximum}"
|
||
Value="{Binding ProgressValue}" />
|
||
<Grid Margin="10,0">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition />
|
||
<ColumnDefinition />
|
||
</Grid.ColumnDefinitions>
|
||
|
||
<TextBox
|
||
Grid.Column="0"
|
||
Margin="4,0,0,0"
|
||
VerticalAlignment="Center"
|
||
d:Text="共计:{}"
|
||
Background="Transparent"
|
||
BorderThickness="0"
|
||
Foreground="White"
|
||
IsReadOnly="True"
|
||
Text="{Binding BottomMsg}" />
|
||
<TextBox
|
||
Grid.Column="1"
|
||
Margin="4,0,0,0"
|
||
VerticalAlignment="Center"
|
||
HorizontalContentAlignment="Right"
|
||
d:Text="共计:{}"
|
||
Background="Transparent"
|
||
BorderThickness="0"
|
||
Foreground="White"
|
||
IsReadOnly="True"
|
||
Text="{Binding BottomRMsg}" />
|
||
</Grid>
|
||
|
||
</Grid>
|
||
<!-- 开票弹窗 -->
|
||
<!--<Border
|
||
Grid.RowSpan="3"
|
||
Style="{StaticResource ModalMaskStyle}"
|
||
Visibility="{Binding IsInvoiceDialogOpen, Converter={StaticResource BooleanToVisibility}}">
|
||
<Border
|
||
Width="520"
|
||
Padding="24"
|
||
HorizontalAlignment="Center"
|
||
VerticalAlignment="Center"
|
||
Background="White"
|
||
CornerRadius="8">
|
||
<StackPanel>
|
||
<TextBlock
|
||
Margin="0,0,0,24"
|
||
FontSize="18"
|
||
FontWeight="SemiBold"
|
||
Foreground="{StaticResource TextPrimaryBrush}"
|
||
Text="开具发票" />
|
||
|
||
<Grid Margin="0,0,0,16">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="90" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
<TextBlock
|
||
VerticalAlignment="Center"
|
||
FontSize="13"
|
||
Foreground="{StaticResource TextNormalBrush}"
|
||
Text="订单号" />
|
||
<TextBlock
|
||
Grid.Column="1"
|
||
VerticalAlignment="Center"
|
||
FontSize="13"
|
||
Foreground="{StaticResource TextPrimaryBrush}"
|
||
Text="{Binding SelectedOrder.order_sn}" />
|
||
</Grid>
|
||
|
||
<Grid Margin="0,0,0,16">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="90" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
<TextBlock
|
||
VerticalAlignment="Center"
|
||
FontSize="13"
|
||
Foreground="{StaticResource TextNormalBrush}"
|
||
Text="发票类型" />
|
||
<ComboBox
|
||
Grid.Column="1"
|
||
Height="36"
|
||
Padding="10,0"
|
||
VerticalContentAlignment="Center"
|
||
FontSize="13"
|
||
SelectedValue="{Binding InvoiceType}"
|
||
SelectedValuePath="Content">
|
||
<ComboBoxItem Content="电子普通发票" />
|
||
<ComboBoxItem Content="增值税专用发票" />
|
||
</ComboBox>
|
||
</Grid>
|
||
|
||
<Grid Margin="0,0,0,16">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="90" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
<TextBlock
|
||
VerticalAlignment="Center"
|
||
FontSize="13"
|
||
Foreground="{StaticResource TextNormalBrush}"
|
||
Text="发票抬头" />
|
||
<TextBox
|
||
Grid.Column="1"
|
||
Style="{StaticResource SearchTextBoxStyle}"
|
||
Text="{Binding InvoiceTitle}" />
|
||
</Grid>
|
||
|
||
<Grid Margin="0,0,0,16">
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="90" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
<TextBlock
|
||
VerticalAlignment="Center"
|
||
FontSize="13"
|
||
Foreground="{StaticResource TextNormalBrush}"
|
||
Text="税号" />
|
||
<TextBox
|
||
Grid.Column="1"
|
||
Style="{StaticResource SearchTextBoxStyle}"
|
||
Text="{Binding TaxNo}" />
|
||
</Grid>
|
||
|
||
<StackPanel
|
||
Margin="0,25,0,0"
|
||
HorizontalAlignment="Right"
|
||
Orientation="Horizontal">
|
||
<Button
|
||
Command="{Binding CloseInvoiceDialogCommand}"
|
||
Content="取消"
|
||
Style="{StaticResource DefaultButtonStyle}" />
|
||
<Button
|
||
Margin="10,0,0,0"
|
||
Command="{Binding ConfirmInvoiceCommand}"
|
||
Content="确认开票"
|
||
Style="{StaticResource PrimaryButtonStyle}" />
|
||
</StackPanel>
|
||
</StackPanel>
|
||
</Border>
|
||
</Border>-->
|
||
|
||
<!-- 发票信息弹窗 -->
|
||
<!--<Border
|
||
Grid.RowSpan="3"
|
||
Style="{StaticResource ModalMaskStyle}"
|
||
Visibility="{Binding IsInvoiceDetailOpen, Converter={StaticResource BooleanToVisibility}}">
|
||
<Border
|
||
Width="520"
|
||
Padding="24"
|
||
HorizontalAlignment="Center"
|
||
VerticalAlignment="Center"
|
||
Background="White"
|
||
CornerRadius="8">
|
||
<StackPanel>
|
||
<TextBlock
|
||
Margin="0,0,0,24"
|
||
FontSize="18"
|
||
FontWeight="SemiBold"
|
||
Foreground="{StaticResource TextPrimaryBrush}"
|
||
Text="发票信息" />
|
||
|
||
<Grid>
|
||
<Grid.ColumnDefinitions>
|
||
<ColumnDefinition Width="Auto" />
|
||
<ColumnDefinition Width="*" />
|
||
</Grid.ColumnDefinitions>
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="30" />
|
||
<RowDefinition Height="30" />
|
||
<RowDefinition Height="30" />
|
||
<RowDefinition Height="30" />
|
||
<RowDefinition Height="30" />
|
||
<RowDefinition Height="30" />
|
||
<RowDefinition Height="30" />
|
||
</Grid.RowDefinitions>
|
||
|
||
<TextBlock
|
||
Grid.Row="0"
|
||
Style="{StaticResource DetailLabelStyle}"
|
||
Text="订单号:" />
|
||
<TextBlock
|
||
Grid.Row="0"
|
||
Grid.Column="1"
|
||
Style="{StaticResource DetailValueStyle}"
|
||
Text="{Binding SelectedOrder.OrderNo}" />
|
||
|
||
<TextBlock
|
||
Grid.Row="1"
|
||
Style="{StaticResource DetailLabelStyle}"
|
||
Text="发票类型:" />
|
||
<TextBlock
|
||
Grid.Row="1"
|
||
Grid.Column="1"
|
||
Style="{StaticResource DetailValueStyle}"
|
||
Text="{Binding SelectedOrder.InvoiceType}" />
|
||
|
||
<TextBlock
|
||
Grid.Row="2"
|
||
Style="{StaticResource DetailLabelStyle}"
|
||
Text="发票号码:" />
|
||
<TextBlock
|
||
Grid.Row="2"
|
||
Grid.Column="1"
|
||
Style="{StaticResource DetailValueStyle}"
|
||
Text="{Binding SelectedOrder.InvoiceNo}" />
|
||
|
||
<TextBlock
|
||
Grid.Row="3"
|
||
Style="{StaticResource DetailLabelStyle}"
|
||
Text="发票抬头:" />
|
||
<TextBlock
|
||
Grid.Row="3"
|
||
Grid.Column="1"
|
||
Style="{StaticResource DetailValueStyle}"
|
||
Text="{Binding SelectedOrder.InvoiceTitle}" />
|
||
|
||
<TextBlock
|
||
Grid.Row="4"
|
||
Style="{StaticResource DetailLabelStyle}"
|
||
Text="税号:" />
|
||
<TextBlock
|
||
Grid.Row="4"
|
||
Grid.Column="1"
|
||
Style="{StaticResource DetailValueStyle}"
|
||
Text="{Binding SelectedOrder.TaxNo}" />
|
||
|
||
<TextBlock
|
||
Grid.Row="5"
|
||
Style="{StaticResource DetailLabelStyle}"
|
||
Text="开票金额:" />
|
||
<TextBlock
|
||
Grid.Row="5"
|
||
Grid.Column="1"
|
||
Style="{StaticResource DetailValueStyle}"
|
||
Text="{Binding SelectedOrder.InvoiceAmountText}" />
|
||
|
||
<TextBlock
|
||
Grid.Row="6"
|
||
Style="{StaticResource DetailLabelStyle}"
|
||
Text="开票时间:" />
|
||
<TextBlock
|
||
Grid.Row="6"
|
||
Grid.Column="1"
|
||
Style="{StaticResource DetailValueStyle}"
|
||
Text="{Binding SelectedOrder.InvoiceTime}" />
|
||
</Grid>
|
||
|
||
<StackPanel
|
||
Margin="0,25,0,0"
|
||
HorizontalAlignment="Right"
|
||
Orientation="Horizontal">
|
||
<Button
|
||
Command="{Binding CloseInvoiceDetailCommand}"
|
||
Content="关闭"
|
||
Style="{StaticResource DefaultButtonStyle}" />
|
||
</StackPanel>
|
||
</StackPanel>
|
||
</Border>
|
||
</Border>-->
|
||
</Grid>
|
||
</Border>
|
||
</UserControl> |