1显示最新一条物流信息和展示完整物流轨迹 2优化订单48小时或72小时过滤逻辑
This commit is contained in:
1 parent
f3fa093709
commit
db6774dbda
12 files changed
+749
-33
No files matched your search
@@ -0,0 +1,115 @@
|
||||
<UserControl
|
||||
x:Class="_29WxOrderWpf.Views.EWaybillPathListView"
|
||||
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:local="clr-namespace:_29WxOrderWpf.Views"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
Height="auto"
|
||||
d:DesignHeight="80"
|
||||
d:DesignWidth="600"
|
||||
mc:Ignorable="d">
|
||||
<Grid>
|
||||
<Border
|
||||
Margin="4"
|
||||
BorderBrush="LightGray"
|
||||
BorderThickness="0,0,0,1"
|
||||
CornerRadius="0">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto" />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image
|
||||
x:Name="imgSku"
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Width="20"
|
||||
Height="20"
|
||||
Margin="8"
|
||||
Cursor="Hand"
|
||||
MouseDown="imgSku_MouseDown"
|
||||
MouseEnter="imgSku_MouseEnter"
|
||||
MouseLeave="imgSku_MouseLeave" />
|
||||
<Grid
|
||||
Grid.Column="1"
|
||||
Margin="0,8"
|
||||
VerticalAlignment="Center">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<WrapPanel Grid.Row="0" Visibility="{Binding node_desc, Converter={StaticResource HasTextVisibility}}">
|
||||
<TextBox
|
||||
VerticalAlignment="Top"
|
||||
d:Opacity="0.5"
|
||||
d:Visibility="Visible"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
FontWeight="Bold"
|
||||
IsReadOnly="True"
|
||||
Text="物流信息:"
|
||||
TextWrapping="Wrap"
|
||||
Visibility="Collapsed" />
|
||||
<TextBox
|
||||
Grid.Row="0"
|
||||
VerticalAlignment="Top"
|
||||
d:Opacity="0.5"
|
||||
d:Text="已送达"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
FontWeight="Bold"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding node_desc}"
|
||||
TextWrapping="Wrap" />
|
||||
</WrapPanel>
|
||||
|
||||
<WrapPanel Grid.Row="1" Visibility="{Binding UpdateTimeStr, Converter={StaticResource HasTextVisibility}}" Margin="4">
|
||||
<TextBox
|
||||
VerticalAlignment="Top"
|
||||
d:Opacity="0.5"
|
||||
d:Visibility="Visible"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
IsReadOnly="True"
|
||||
Text="更新时间:"
|
||||
TextWrapping="Wrap"
|
||||
Visibility="Collapsed" />
|
||||
<TextBox
|
||||
Grid.Row="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
d:Opacity="0.5"
|
||||
d:Text="2000/1/1 0:0:0"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding UpdateTimeStr}"
|
||||
TextWrapping="Wrap" />
|
||||
</WrapPanel>
|
||||
</Grid>
|
||||
<Button
|
||||
x:Name="btnAdd"
|
||||
Grid.Column="100"
|
||||
MinWidth="18"
|
||||
MinHeight="28"
|
||||
Margin="8"
|
||||
Padding="4"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Content=""
|
||||
Style="{StaticResource BasePageButtonStyle}"
|
||||
Visibility="Hidden" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace _29WxOrderWpf.Views;
|
||||
|
||||
/// <summary>
|
||||
/// EWaybillPathListView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class EWaybillPathListView : UserControl
|
||||
{
|
||||
public EWaybillPathListView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void imgSku_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void imgSku_MouseEnter(object sender, MouseEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void imgSku_MouseLeave(object sender, MouseEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
<UserControl
|
||||
x:Class="_29WxOrderWpf.Views.EWaybillPathView"
|
||||
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:local="clr-namespace:_29WxOrderWpf.Views"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
x:Name="EWaybillPathCtrl"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800" Loaded="EWaybillPathCtrl_Loaded"
|
||||
Background="White"
|
||||
mc:Ignorable="d">
|
||||
<Grid Margin="24,24,24,24">
|
||||
<WrapPanel
|
||||
Margin="0,0,0,20"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="top">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Top"
|
||||
FontSize="15"
|
||||
Foreground="#333333"
|
||||
Text="订单 " />
|
||||
<TextBox
|
||||
x:Name="txtOrderId"
|
||||
VerticalContentAlignment="Center"
|
||||
d:Text="1111111"
|
||||
BorderBrush="#D0D0D0"
|
||||
BorderThickness="0"
|
||||
FontSize="14"
|
||||
Text="{Binding OrderId, UpdateSourceTrigger=PropertyChanged}"
|
||||
VerticalScrollBarVisibility="Auto" />
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Top"
|
||||
FontSize="15"
|
||||
Foreground="#333333"
|
||||
Text=" 物流明细" />
|
||||
</WrapPanel>
|
||||
|
||||
<Grid Margin="24,24,24,24">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Margin="24,24,24,24">
|
||||
<Grid>
|
||||
<WrapPanel>
|
||||
<TextBlock FontSize="14" Text="物流公司:" />
|
||||
<TextBox
|
||||
x:Name="txtExpressName"
|
||||
VerticalContentAlignment="Center"
|
||||
d:Text="物流公司:"
|
||||
BorderBrush="#D0D0D0"
|
||||
BorderThickness="0"
|
||||
FontSize="14"
|
||||
Text="{Binding ExpressName, UpdateSourceTrigger=PropertyChanged}"
|
||||
VerticalScrollBarVisibility="Auto" />
|
||||
</WrapPanel>
|
||||
<Image
|
||||
x:Name="imgLoading"
|
||||
Width="20"
|
||||
Height="20"
|
||||
HorizontalAlignment="Right"
|
||||
IsEnabled="False"
|
||||
Source="{StaticResource imgLoadingPic}"
|
||||
Visibility="{Binding IsGetWaybillPath, Converter={StaticResource visibleToVisibilityConverter}}">
|
||||
<Image.RenderTransform>
|
||||
<RotateTransform Angle="45" CenterX="10" CenterY="10" />
|
||||
</Image.RenderTransform>
|
||||
<Image.Triggers>
|
||||
<EventTrigger RoutedEvent="Image.Loaded">
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<DoubleAnimation
|
||||
RepeatBehavior="Forever"
|
||||
Storyboard.TargetName="imgLoading"
|
||||
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
|
||||
From="0"
|
||||
To="360"
|
||||
Duration="0:0:3" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</EventTrigger>
|
||||
</Image.Triggers>
|
||||
</Image>
|
||||
</Grid>
|
||||
<WrapPanel>
|
||||
<TextBlock FontSize="14" Text="物流编码:" />
|
||||
<TextBox
|
||||
x:Name="txtWaybillId"
|
||||
VerticalContentAlignment="Center"
|
||||
d:Text="物流编码:"
|
||||
BorderBrush="#D0D0D0"
|
||||
BorderThickness="0"
|
||||
FontSize="14"
|
||||
Text="{Binding WaybillId, UpdateSourceTrigger=PropertyChanged}"
|
||||
VerticalScrollBarVisibility="Auto" />
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
<ListBox
|
||||
x:Name="lbxSku"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Margin="7,0,7,0"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
BorderThickness="0"
|
||||
ItemsSource="{Binding WaybillPathInfos}"
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
VirtualizingPanel.ScrollUnit="Pixel">
|
||||
<!-- 使用自定义属性模板去除ListBox高亮显示框 -->
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ListBoxItem">
|
||||
<ContentPresenter
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<!-- 此处绑定将数据源传递给子自定义控件OrderListRowCtrl -->
|
||||
<local:EWaybillPathListView
|
||||
VerticalAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
DataContext="{Binding}" />
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,42 @@
|
||||
using _29WxOrderWpf.ViewModels;
|
||||
using AllBase.Model.DBModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace _29WxOrderWpf.Views;
|
||||
|
||||
/// <summary>
|
||||
/// EWaybillPathView.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class EWaybillPathView : UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// 视图模型
|
||||
/// </summary>
|
||||
public EWaybillPathViewModel ViewModel { get; }
|
||||
|
||||
public EWaybillPathView(oms_wei_order_info _order, string _waybillId, string _expressName)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
ViewModel = new EWaybillPathViewModel(_order, _waybillId, _expressName);
|
||||
DataContext = ViewModel;
|
||||
}
|
||||
|
||||
private void EWaybillPathCtrl_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ViewModel.Start();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user