优化读单卡顿问题
This commit is contained in:
1 parent
8e88e0f5d7
commit
bcc934c1ba
14 files changed
+586
-31
No files matched your search
@@ -1138,6 +1138,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
{
|
||||
foreach (var shop in GlobalConfig.ShopLoginList)
|
||||
{
|
||||
var index = GlobalConfig.ShopLoginList.IndexOf(shop);
|
||||
if (shop.LoginStatus == "登录成功")
|
||||
ShopBLL.CheckShopLogin(shop);
|
||||
if (shop.LoginStatus != "登录成功")
|
||||
@@ -1257,7 +1258,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
orderItem.OrderItemExt = orderExt;
|
||||
|
||||
InitOrderObservableProp(order);
|
||||
MainWindow.Instance.orderListCtrl.FilterOneOrder(order, true);
|
||||
MainWindow.Instance.orderListCtrl.FilterOneOrder(order);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1267,6 +1268,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
BaseMsgWindow.ShowAnimateMessage("订单扩展信息查询失败 " + ex.Message, "Error", 5);
|
||||
}
|
||||
}
|
||||
disPlayOrderTabOrderCount();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -646,6 +646,8 @@
|
||||
BorderBrush="{Binding WarehouseWaybillStatusBorderColor}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="2"
|
||||
Cursor="Hand"
|
||||
MouseUp="borderWarehouseStatas_MouseUp"
|
||||
Visibility="{Binding WarehouseWaybillStatusStrVisibility}">
|
||||
<TextBlock
|
||||
x:Name="txtWarehouseStatus"
|
||||
@@ -778,6 +780,7 @@
|
||||
Margin="-2,0"
|
||||
Padding="0"
|
||||
VerticalAlignment="Top"
|
||||
d:Text="2026-10-09 15:59:59"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Foreground="{Binding OutOrderTimeQualifiedBrush}"
|
||||
@@ -796,6 +799,7 @@
|
||||
Margin="-2,0"
|
||||
Padding="0"
|
||||
VerticalAlignment="Top"
|
||||
d:Text="JTSD-JT12345678"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Foreground="{StaticResource PageOkBrush}"
|
||||
@@ -827,6 +831,7 @@
|
||||
Margin="-2,0"
|
||||
Padding="0"
|
||||
VerticalAlignment="Center"
|
||||
d:Text="YD-3123456789999"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
IsReadOnly="True"
|
||||
|
||||
@@ -2132,6 +2132,27 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
}.ShowDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private async void borderWarehouseStatas_MouseUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
//if (this.DataContext is oms_wei_order_item_info orderItem)
|
||||
//{
|
||||
// oms_wei_order_item_transit_info transitInfo = new oms_wei_order_item_transit_info()
|
||||
// {
|
||||
// OrderItem = orderItem,
|
||||
// };
|
||||
|
||||
// OrderTransitListCtrl OrderTransitListCtrl = new OrderTransitListCtrl(transitInfo);
|
||||
// new DialogWindow()
|
||||
// {
|
||||
// Title = "仓库订单详情 - 当前订单 " + orderItem.order_id,
|
||||
// Content = OrderTransitListCtrl,
|
||||
// Width = SystemParameters.PrimaryScreenWidth < 1920 ? SystemParameters.PrimaryScreenWidth : SystemParameters.PrimaryScreenWidth * 90 / 100,
|
||||
// Height = SystemParameters.PrimaryScreenHeight * 90 / 100,
|
||||
// WindowStartupLocation = WindowStartupLocation.CenterScreen,
|
||||
// }.ShowDialog();
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
<UserControl
|
||||
x:Class="_29WxOrderWpf.Ctrls.OrderCtrls.OrderTransitListCtrl"
|
||||
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.Ctrls.OrderCtrls"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:wpf="WPFCommon"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
Background="White"
|
||||
Foreground="DimGray"
|
||||
Loaded="OrderTransitListCtrl_Loaded"
|
||||
mc:Ignorable="d">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Height="30" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="10,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="店铺:" />
|
||||
<TextBox
|
||||
VerticalContentAlignment="Center"
|
||||
d:Text="音诉云仓"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Foreground="DimGray"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding ShopNameStr}" />
|
||||
<TextBlock
|
||||
Margin="10,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Text="订单号:" />
|
||||
<TextBox
|
||||
VerticalContentAlignment="Center"
|
||||
d:Text="3700000000000000"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Foreground="DimGray"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding OrderIdStr}" />
|
||||
</StackPanel>
|
||||
<ListBox
|
||||
x:Name="lbxTransitList"
|
||||
Grid.Row="4"
|
||||
Margin="7,0,7,0"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
BorderThickness="0">
|
||||
<!-- 使用自定义属性模板去除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>
|
||||
<!-- 此处绑定将数据源传递给子自定义控件 -->
|
||||
<local:OrderTransitListDetailCtrl DataContext="{Binding}" />
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,59 @@
|
||||
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.Ctrls.OrderCtrls;
|
||||
|
||||
/// <summary>
|
||||
/// OrderTransitListCtrl.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class OrderTransitListCtrl : UserControl
|
||||
{
|
||||
OrderTransitListCtrlViewModel ViewModel;
|
||||
|
||||
public OrderTransitListCtrl(oms_wei_order_item_transit_info transitInfo)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
ViewModel = new OrderTransitListCtrlViewModel(transitInfo);
|
||||
ViewModel.RequestClose += ViewModel_RequestClose;
|
||||
|
||||
DataContext = ViewModel;
|
||||
this.lbxTransitList.ItemsSource = ViewModel.TransitInfo.OrderItemTransitDetailList;
|
||||
}
|
||||
|
||||
private void ViewModel_RequestClose()
|
||||
{
|
||||
Window parentWindow = Window.GetWindow(this);
|
||||
if (this.IsLoaded && parentWindow != null)
|
||||
parentWindow.Close();
|
||||
}
|
||||
|
||||
private void OrderTransitListCtrl_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Window parentWindow = Window.GetWindow(this);
|
||||
if (parentWindow != null)
|
||||
{
|
||||
parentWindow.Closed += ChangeWaybillView_Closed;
|
||||
}
|
||||
ViewModel.Start();
|
||||
}
|
||||
|
||||
private void ChangeWaybillView_Closed(object sender, EventArgs e)
|
||||
{
|
||||
ViewModel.Stop();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
using AllBase.Model.DBModel;
|
||||
using AllBase.Model.MvvmBaseClasses;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace _29WxOrderWpf.Ctrls.OrderCtrls;
|
||||
|
||||
public class OrderTransitListCtrlViewModel : PropertyNotifyObject
|
||||
{
|
||||
private volatile bool _isWindowLoaded = false;
|
||||
|
||||
public oms_wei_order_item_transit_info TransitInfo
|
||||
{
|
||||
get { return this.GetValue(x => x.TransitInfo); }
|
||||
set { this.SetValue(x => x.TransitInfo, value); }
|
||||
}
|
||||
public oms_wei_order_item_info OrderItem
|
||||
{
|
||||
get { return this.GetValue(x => x.OrderItem); }
|
||||
set { this.SetValue(x => x.OrderItem, value); }
|
||||
}
|
||||
public string OrderIdStr
|
||||
{
|
||||
get { return this.GetValue(x => x.OrderIdStr); }
|
||||
set { this.SetValue(x => x.OrderIdStr, value); }
|
||||
}
|
||||
public string ShopNameStr
|
||||
{
|
||||
get { return this.GetValue(x => x.ShopNameStr); }
|
||||
set { this.SetValue(x => x.ShopNameStr, value); }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>请求关闭窗口</summary>
|
||||
public event Action RequestClose;
|
||||
|
||||
public OrderTransitListCtrlViewModel(oms_wei_order_item_transit_info transitInfo)
|
||||
{
|
||||
TransitInfo = transitInfo;
|
||||
OrderItem = transitInfo?.OrderItem;
|
||||
OrderIdStr = OrderItem?.order_id;
|
||||
ShopNameStr = OrderItem?.ItemOrder?.Shop?.ShopAccount;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 窗口加载完成时调用
|
||||
/// </summary>
|
||||
public void Start()
|
||||
{
|
||||
_isWindowLoaded = true;
|
||||
}
|
||||
/// <summary>
|
||||
/// 窗口关闭时调用,停止后台任务
|
||||
/// </summary>
|
||||
public void Stop()
|
||||
{
|
||||
_isWindowLoaded = false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
<UserControl
|
||||
x:Class="_29WxOrderWpf.Ctrls.OrderCtrls.OrderTransitListDetailCtrl"
|
||||
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.Ctrls.OrderCtrls"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="280"
|
||||
d:DesignWidth="800"
|
||||
Background="White"
|
||||
mc:Ignorable="d">
|
||||
<Border
|
||||
MinHeight="50"
|
||||
Margin="5"
|
||||
BorderBrush="SkyBlue"
|
||||
BorderThickness="1"
|
||||
CornerRadius="10">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Border Background="LightSkyBlue" CornerRadius="8,8,0,0">
|
||||
<StackPanel MinHeight="30" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="10,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Text="仓库订单号" />
|
||||
<TextBox
|
||||
VerticalContentAlignment="Center"
|
||||
d:Text="261008-123456789012345"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Foreground="DimGray"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding OrderCode}" />
|
||||
<TextBlock
|
||||
Margin="10,0,0,0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
d:Text="仓库类型"
|
||||
Text="{Binding TransitTypeStr}" />
|
||||
<TextBox
|
||||
VerticalContentAlignment="Center"
|
||||
d:Text="261008-123456789012345"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Foreground="DimGray"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding OrderCode}" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,27 @@
|
||||
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.Ctrls.OrderCtrls;
|
||||
|
||||
/// <summary>
|
||||
/// OrderTransitListDetailCtrl.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class OrderTransitListDetailCtrl : UserControl
|
||||
{
|
||||
public OrderTransitListDetailCtrl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user