发票助手修改,增加时间范围,增加上次读取历史,修复bug
This commit is contained in:
1 parent
b42c17c013
commit
9e62672013
8 files changed
+729
-218
No files matched your search
@@ -16,15 +16,15 @@
|
||||
d:DataContext="{d:DesignInstance Type=vm:PDDInvoiceViewModel,
|
||||
IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="720"
|
||||
d:DesignWidth="1260"
|
||||
d:DesignWidth="1960"
|
||||
Background="White"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<UserControl.Resources>
|
||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibility" />
|
||||
<converters:ImageUrlToBitmapImageConverter x:Key="ImageUrlToBitmapImage" />
|
||||
<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" />
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
<!-- 搜索 / 表单输入框 -->
|
||||
<Style x:Key="SearchTextBoxStyle" TargetType="TextBox">
|
||||
<Setter Property="Height" Value="36" />
|
||||
<Setter Property="Height" Value="30" />
|
||||
<Setter Property="Padding" Value="12,0" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
@@ -81,76 +81,9 @@
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- 主按钮 -->
|
||||
<Style x:Key="PrimaryButtonStyle" TargetType="Button">
|
||||
<Setter Property="Height" Value="36" />
|
||||
<Setter Property="Padding" Value="18,0" />
|
||||
<Setter Property="Foreground" Value="White" />
|
||||
<Setter Property="Background" Value="{StaticResource PrimaryBrush}" />
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border
|
||||
x:Name="border"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{TemplateBinding Background}"
|
||||
CornerRadius="4">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="border" Property="Background" Value="{StaticResource PrimaryHoverBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter TargetName="border" Property="Opacity" Value="0.8" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter TargetName="border" Property="Opacity" Value="0.5" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style BasedOn="{StaticResource BasePageButtonStyle}" TargetType="Button">
|
||||
<Setter Property="Height" Value="30" />
|
||||
</Style>
|
||||
|
||||
<!-- 默认按钮 -->
|
||||
<Style x:Key="DefaultButtonStyle" TargetType="Button">
|
||||
<Setter Property="Height" Value="36" />
|
||||
<Setter Property="Padding" Value="18,0" />
|
||||
<Setter Property="Foreground" Value="{StaticResource TextNormalBrush}" />
|
||||
<Setter Property="Background" Value="White" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource InputBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border
|
||||
x:Name="border"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="4">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="border" Property="Background" Value="#F5F7FA" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter TargetName="border" Property="Opacity" Value="0.8" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- 文字链接按钮 -->
|
||||
<Style x:Key="LinkButtonStyle" TargetType="Button">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
@@ -196,7 +129,7 @@
|
||||
<Border Padding="10,10,10,0">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="30" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
@@ -205,10 +138,9 @@
|
||||
<Border Grid.Row="0">
|
||||
|
||||
<wpf:SpacingStackPanel Background="{StaticResource CardBgBrush}" HorizontalSpacing="10">
|
||||
<Grid Width="300">
|
||||
<Grid Width="200">
|
||||
<TextBox
|
||||
x:Name="txtSearch"
|
||||
Height="30"
|
||||
Padding="5,0,0,0"
|
||||
KeyDown="txtSearch_KeyDown"
|
||||
Style="{StaticResource SearchTextBoxStyle}"
|
||||
@@ -228,7 +160,7 @@
|
||||
TitleVerticalAlignment="Center">
|
||||
<ComboBox
|
||||
Width="100"
|
||||
Height="28"
|
||||
Height="30"
|
||||
d:SelectedIndex="0"
|
||||
SelectedIndex="{Binding InvoiceStatus}"
|
||||
Style="{StaticResource RoundedComboBox}">
|
||||
@@ -238,17 +170,40 @@
|
||||
</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"
|
||||
Height="30"
|
||||
Command="{Binding SearchCommand}"
|
||||
Content="搜索"
|
||||
Style="{StaticResource BasePageButtonStyle}" />
|
||||
Content="搜索" />
|
||||
<Button
|
||||
Height="30"
|
||||
Command="{Binding ResetCommand}"
|
||||
Content="重置"
|
||||
Style="{StaticResource DefaultButtonStyle}" />
|
||||
Style="{StaticResource LinkButtonStyle}" />
|
||||
|
||||
<wpf:TitleContent
|
||||
Title="买手号:"
|
||||
@@ -263,11 +218,9 @@
|
||||
Style="{StaticResource RoundedComboBox}" />
|
||||
</wpf:TitleContent>
|
||||
<Button
|
||||
Height="30"
|
||||
Padding="5,0"
|
||||
Command="{Binding ReadOrderCommand}"
|
||||
Content="读取订单"
|
||||
Style="{StaticResource BasePageButtonStyle}"
|
||||
Visibility="{Binding IsReadOrder, Converter={StaticResource Boolean2VisibilityReConverter}}" />
|
||||
<Button
|
||||
Height="30"
|
||||
@@ -277,13 +230,16 @@
|
||||
Style="{StaticResource BasePageButtonStyle}"
|
||||
Visibility="{Binding IsReadOrder, Converter={StaticResource Boolean2VisibilityConverter}}" />
|
||||
<Button
|
||||
Height="30"
|
||||
Padding="10,0"
|
||||
Command="{Binding BatchInvoiceCommand}"
|
||||
Content="批量开票"
|
||||
Style="{StaticResource BasePageButtonStyle}" />
|
||||
Content="批量开票" />
|
||||
<Button
|
||||
Padding="10,0"
|
||||
Command="{Binding ShowSettingDialogCommand}"
|
||||
Content="设置"
|
||||
Style="{StaticResource BasePageButtonLightStyle}" />
|
||||
|
||||
<wpf:TitleContent
|
||||
<!--<wpf:TitleContent
|
||||
Title="公司:"
|
||||
Placement="Left"
|
||||
TitleVerticalAlignment="Center">
|
||||
@@ -315,11 +271,12 @@
|
||||
Maximum="999999"
|
||||
Minimum="0"
|
||||
Value="{Binding MaxAmount}" />
|
||||
</wpf:TitleContent>
|
||||
</wpf:TitleContent>-->
|
||||
<CheckBox
|
||||
VerticalContentAlignment="Center"
|
||||
Content="显示订单窗口"
|
||||
IsChecked="{Binding IsOrderListDialogOpen}" />
|
||||
|
||||
</wpf:SpacingStackPanel>
|
||||
</Border>
|
||||
<!-- 订单列表(已移除分页与订单分组) -->
|
||||
@@ -419,6 +376,7 @@
|
||||
<Border Background="White">
|
||||
<!-- 列表(虚拟化滚动加载) -->
|
||||
<ItemsControl
|
||||
x:Name="itemsControl"
|
||||
Margin="0,2,0,-2"
|
||||
Padding="0"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
@@ -426,8 +384,10 @@
|
||||
<ItemsControl.Template>
|
||||
<ControlTemplate TargetType="ItemsControl">
|
||||
<ScrollViewer
|
||||
x:Name="PART_ScrollViewer"
|
||||
CanContentScroll="True"
|
||||
HorizontalScrollBarVisibility="Disabled"
|
||||
ScrollChanged="ScrollViewer_ScrollChanged"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<ItemsPresenter />
|
||||
</ScrollViewer>
|
||||
@@ -508,7 +468,27 @@
|
||||
Height="72"
|
||||
Background="#EEEEEE"
|
||||
CornerRadius="5">
|
||||
<Image Source="{Binding ThumbUrl, Converter={StaticResource ImageUrlToBitmapImage}, IsAsync=True}" Stretch="UniformToFill" />
|
||||
<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"
|
||||
@@ -668,13 +648,12 @@
|
||||
Value="{Binding ProgressValue}" />
|
||||
<Grid Margin="10,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="100*" />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBox
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Grid.Column="0"
|
||||
Margin="4,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
d:Text="共计:{}"
|
||||
@@ -683,6 +662,17 @@
|
||||
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>
|
||||
|
||||
Reference in new issue
Block a user