hb
This commit is contained in:
commit
fe87aece4e
16 files changed
+373
-226
No files matched your search
@@ -144,7 +144,6 @@ namespace _29WxOrderWpf
|
||||
#endregion
|
||||
|
||||
new MainWindow().Show();
|
||||
//new OrderSupportTicketWindow().Show();
|
||||
}
|
||||
|
||||
//static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
|
||||
|
||||
@@ -14,8 +14,6 @@ namespace _29WxOrderWpf.Converters
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return Visibility.Collapsed;
|
||||
|
||||
if (value == null)
|
||||
return Visibility.Collapsed;
|
||||
return !value.ParseToString().Trim().IsNullOrEmpty() ? Visibility.Visible : Visibility.Collapsed;
|
||||
|
||||
@@ -1264,7 +1264,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
{
|
||||
// 退款状态有变化才发起修改(退款状态不能从退款成功变成未退款)
|
||||
PddBuyerAfterSaleLiteInfo afterSaleRefundSuccessExist = null;
|
||||
afterSaleRefundSuccessExist = lstPddBuyerAfterSaleInfoLite.FirstOrDefault(a => a.afterSalesId != afterSale.afterSalesId &&
|
||||
afterSaleRefundSuccessExist = lstPddBuyerAfterSaleInfoLite.ToList().FirstOrDefault(a => a.afterSalesId != afterSale.afterSalesId &&
|
||||
a.orderSn == afterSale.orderSn && (a.AfterSaleStatusStr.Contains("退款成功") || a.AfterSaleStatusStr.Contains("交易已取消")));
|
||||
|
||||
if ((afterSaleRefundSuccessExist == null || afterSale.AfterSaleStatusStr == afterSaleRefundSuccessExist.AfterSaleStatusStr) &&
|
||||
|
||||
@@ -18,14 +18,6 @@
|
||||
<ColumnDefinition Width="auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image
|
||||
Width="24"
|
||||
Height="24"
|
||||
Margin="4,0,0,0"
|
||||
Cursor="Hand"
|
||||
MouseLeftButtonUp="Image_MouseLeftButtonUp"
|
||||
Source="{StaticResource imgBuyerOrder}" />
|
||||
|
||||
|
||||
|
||||
<wpf:SpacingStackPanel
|
||||
@@ -34,7 +26,16 @@
|
||||
Orientation="Vertical"
|
||||
VerticalSpacing="2">
|
||||
<WrapPanel x:Name="wpPddBuyer">
|
||||
<CheckBox
|
||||
|
||||
<Image
|
||||
Width="24"
|
||||
Height="24"
|
||||
Margin="4,0,0,0"
|
||||
Cursor="Hand"
|
||||
MouseLeftButtonUp="Image_MouseLeftButtonUp"
|
||||
Source="{StaticResource imgBuyerOrder}" />
|
||||
|
||||
<CheckBox
|
||||
x:Name="chkPddBuyerLogin"
|
||||
Margin="2,2,2,2"
|
||||
HorizontalAlignment="Left"
|
||||
@@ -121,7 +122,16 @@
|
||||
d:Visibility="Visible"
|
||||
Visibility="Visible">
|
||||
|
||||
<CheckBox
|
||||
<Image
|
||||
x:Name="imgTb"
|
||||
Width="24"
|
||||
Height="24"
|
||||
Margin="4,0,0,0"
|
||||
Cursor="Hand"
|
||||
MouseLeftButtonUp="imgTb_MouseLeftButtonUp"
|
||||
Source="{StaticResource imgBuyerOrder}" />
|
||||
|
||||
<CheckBox
|
||||
x:Name="chkTbBuyerLogin"
|
||||
Margin="2,2,2,2"
|
||||
HorizontalAlignment="Left"
|
||||
|
||||
@@ -152,36 +152,47 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
int buyZIndex = 2;
|
||||
private void Image_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (/*wpPddBuyer.Visibility == Visibility.Visible*/ chkPddBuyerLogin.IsChecked == true)
|
||||
{
|
||||
if (MainWindow.Instance.gridTbBuyerOrderReadCtrl.Visibility != Visibility.Visible)
|
||||
MainWindow.Instance.gridTbBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||
if (Panel.GetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl) < 1)
|
||||
Panel.SetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl, 1);
|
||||
else
|
||||
Panel.SetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl, -1);
|
||||
|
||||
Panel.SetZIndex(MainWindow.Instance.pddBuyerOrderReadCtrl, buyZIndex++);
|
||||
MainWindow.Instance.pddBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||
MainWindow.Instance.tbBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||
}
|
||||
else if (/*wpTaobaoBuyer.Visibility == Visibility.Visible*/ chkTbBuyerLogin.IsChecked == true)
|
||||
{
|
||||
if (MainWindow.Instance.gridTbBuyerOrderReadCtrl.Visibility != Visibility.Visible)
|
||||
MainWindow.Instance.gridTbBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||
if (Panel.GetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl) < 1)
|
||||
Panel.SetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl, 1);
|
||||
else
|
||||
Panel.SetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl, -1);
|
||||
|
||||
Panel.SetZIndex(MainWindow.Instance.tbBuyerOrderReadCtrl, buyZIndex++);
|
||||
MainWindow.Instance.pddBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||
MainWindow.Instance.tbBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||
}
|
||||
if (MainWindow.Instance.gridTbBuyerOrderReadCtrl.Visibility != Visibility.Visible)
|
||||
MainWindow.Instance.gridTbBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||
if (Panel.GetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl) < 1)
|
||||
Panel.SetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl, 1);
|
||||
else
|
||||
{
|
||||
Panel.SetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl, -1);
|
||||
}
|
||||
|
||||
Panel.SetZIndex(MainWindow.Instance.pddBuyerOrderReadCtrl, buyZIndex++);
|
||||
MainWindow.Instance.pddBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||
MainWindow.Instance.tbBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||
|
||||
//if (/*wpPddBuyer.Visibility == Visibility.Visible*/ chkPddBuyerLogin.IsChecked == true)
|
||||
//{
|
||||
// if (MainWindow.Instance.gridTbBuyerOrderReadCtrl.Visibility != Visibility.Visible)
|
||||
// MainWindow.Instance.gridTbBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||
// if (Panel.GetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl) < 1)
|
||||
// Panel.SetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl, 1);
|
||||
// else
|
||||
// Panel.SetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl, -1);
|
||||
|
||||
// Panel.SetZIndex(MainWindow.Instance.pddBuyerOrderReadCtrl, buyZIndex++);
|
||||
// MainWindow.Instance.pddBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||
// MainWindow.Instance.tbBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||
//}
|
||||
//else if (/*wpTaobaoBuyer.Visibility == Visibility.Visible*/ chkTbBuyerLogin.IsChecked == true)
|
||||
//{
|
||||
// if (MainWindow.Instance.gridTbBuyerOrderReadCtrl.Visibility != Visibility.Visible)
|
||||
// MainWindow.Instance.gridTbBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||
// if (Panel.GetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl) < 1)
|
||||
// Panel.SetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl, 1);
|
||||
// else
|
||||
// Panel.SetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl, -1);
|
||||
|
||||
// Panel.SetZIndex(MainWindow.Instance.tbBuyerOrderReadCtrl, buyZIndex++);
|
||||
// MainWindow.Instance.pddBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||
// MainWindow.Instance.tbBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// Panel.SetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl, -1);
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
@@ -324,8 +335,9 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
}
|
||||
}
|
||||
|
||||
private void chkBuyerLogin_Click(object sender, RoutedEventArgs e)
|
||||
private async void chkBuyerLogin_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
if (sender == chkPddBuyerLogin)
|
||||
{
|
||||
chkPddBuyerLogin.IsChecked = true;
|
||||
@@ -337,8 +349,11 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
//OrderListCtrl.InitOrderObservableProp(order);
|
||||
foreach (var orderItem in order.orderItems)
|
||||
{
|
||||
orderItem.UpdateOrderItemBuyButton();
|
||||
orderItem.SetAbnormalAndDirectBtnVisibility();
|
||||
await Task.Run(() =>
|
||||
{
|
||||
orderItem.UpdateOrderItemBuyButton();
|
||||
orderItem.SetAbnormalAndDirectBtnVisibility();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -353,11 +368,28 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
//OrderListCtrl.InitOrderObservableProp(order);
|
||||
foreach (var orderItem in order.orderItems)
|
||||
{
|
||||
orderItem.UpdateOrderItemBuyButton();
|
||||
orderItem.SetAbnormalAndDirectBtnVisibility();
|
||||
await Task.Run(() =>
|
||||
{
|
||||
orderItem.UpdateOrderItemBuyButton();
|
||||
orderItem.SetAbnormalAndDirectBtnVisibility();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void imgTb_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (MainWindow.Instance.gridTbBuyerOrderReadCtrl.Visibility != Visibility.Visible)
|
||||
MainWindow.Instance.gridTbBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||
if (Panel.GetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl) < 1)
|
||||
Panel.SetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl, 1);
|
||||
else
|
||||
Panel.SetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl, -1);
|
||||
|
||||
Panel.SetZIndex(MainWindow.Instance.tbBuyerOrderReadCtrl, buyZIndex++);
|
||||
MainWindow.Instance.pddBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||
MainWindow.Instance.tbBuyerOrderReadCtrl.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -270,22 +270,6 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
Thread.Sleep(1);
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
if (cefShowShopOrderLstWebBrowser == null)
|
||||
{
|
||||
cefShowShopOrderLstWebBrowser = WPFCEFBrowser.CreateChromiumWebBrowser("about:blank", false);
|
||||
LocalResourceRequestHandler resourceRequestHandler = new LocalResourceRequestHandler();
|
||||
resourceRequestHandler.ResourceLoadCompleteEvent += RequestHandler_ResourceLoadComplete;
|
||||
resourceRequestHandler.BeforeResourceLoadEvent += RequestHandler_BeforeResourceLoad;
|
||||
cefShowShopOrderLstWebBrowser.RequestHandler = new LocalRequestHandler(resourceRequestHandler);
|
||||
var lifeSapnHandler = new LocalLifeSpanHandler(PopWindowType.SelfWindow);
|
||||
cefShowShopOrderLstWebBrowser.LifeSpanHandler = lifeSapnHandler;
|
||||
cefShowShopOrderLstWebBrowser.KeyboardHandler = new CefKeyboardHandler();
|
||||
cefShowShopOrderLstWebBrowser.FrameLoadEnd += CefWebBrowser_FrameLoadEnd;
|
||||
cefShowShopOrderLstWebBrowser.AddressChanged += CefWebBrowser_AddressChanged;
|
||||
cefShowShopOrderLstWebBrowser.LoadError += CefWebBrowser_LoadError;
|
||||
Grid.SetRow(cefShowShopOrderLstWebBrowser, 0);
|
||||
this.GridCef.Children.Add(cefShowShopOrderLstWebBrowser);
|
||||
}
|
||||
if (cefWebBrowser == null)
|
||||
{
|
||||
cefWebBrowser = WPFCEFBrowser.CreateChromiumWebBrowser("about:blank", false);
|
||||
@@ -305,6 +289,22 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
if (buyer.wpf_browser == null)
|
||||
buyer.wpf_browser = cefWebBrowser;
|
||||
|
||||
if (cefShowShopOrderLstWebBrowser == null)
|
||||
{
|
||||
cefShowShopOrderLstWebBrowser = WPFCEFBrowser.CreateChromiumWebBrowser("about:blank", false);
|
||||
LocalResourceRequestHandler resourceRequestHandler = new LocalResourceRequestHandler();
|
||||
resourceRequestHandler.ResourceLoadCompleteEvent += RequestHandler_ResourceLoadComplete;
|
||||
resourceRequestHandler.BeforeResourceLoadEvent += RequestHandler_BeforeResourceLoad;
|
||||
cefShowShopOrderLstWebBrowser.RequestHandler = new LocalRequestHandler(resourceRequestHandler);
|
||||
var lifeSapnHandler = new LocalLifeSpanHandler(PopWindowType.SelfWindow);
|
||||
cefShowShopOrderLstWebBrowser.LifeSpanHandler = lifeSapnHandler;
|
||||
cefShowShopOrderLstWebBrowser.KeyboardHandler = new CefKeyboardHandler();
|
||||
cefShowShopOrderLstWebBrowser.FrameLoadEnd += CefWebBrowser_FrameLoadEnd;
|
||||
cefShowShopOrderLstWebBrowser.AddressChanged += CefWebBrowser_AddressChanged;
|
||||
cefShowShopOrderLstWebBrowser.LoadError += CefWebBrowser_LoadError;
|
||||
Grid.SetRow(cefShowShopOrderLstWebBrowser, 0);
|
||||
this.GridCef.Children.Add(cefShowShopOrderLstWebBrowser);
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
@@ -2674,7 +2674,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
Panel.SetZIndex(MainWindow.Instance.gridTbBuyerOrderReadCtrl, -1);
|
||||
}
|
||||
|
||||
private void CheckBox_Click(object sender, RoutedEventArgs e)
|
||||
private async void CheckBox_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is CheckBox chk)
|
||||
{
|
||||
@@ -2695,18 +2695,18 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
//t.Wait();
|
||||
foreach (var cook in cookieLst)
|
||||
{
|
||||
var t = WPFCEFBrowser.SetCookieAsync(cook.Domain.Trim('.'), cook.Name + "=" + cook.Value + ";", cefShowShopOrderLstWebBrowser.GetCookieManager(null));
|
||||
t.Wait(5000);
|
||||
await WPFCEFBrowser.SetCookieAsync(cook.Domain.Trim('.'), cook.Name + "=" + cook.Value + ";", cefShowShopOrderLstWebBrowser.GetCookieManager(null));
|
||||
}
|
||||
|
||||
Panel.SetZIndex(this.cefShowShopOrderLstWebBrowser, maxZIndex++);
|
||||
cefShowShopOrderLstWebBrowser.Load("https://buyertrade.taobao.com/trade/itemlist/list_bought_items.htm?");
|
||||
}
|
||||
}
|
||||
}
|
||||
//if (e.Source)
|
||||
}
|
||||
|
||||
private void txtBuyerNick_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
private async void txtBuyerNick_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (sender is TextBox txt)
|
||||
{
|
||||
@@ -2727,11 +2727,11 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
//t.Wait();
|
||||
foreach (var cook in cookieLst)
|
||||
{
|
||||
var t = WPFCEFBrowser.SetCookieAsync(cook.Domain.Trim('.'), cook.Name + "=" + cook.Value + ";", cefShowShopOrderLstWebBrowser.GetCookieManager(null));
|
||||
t.Wait(5000);
|
||||
await WPFCEFBrowser.SetCookieAsync(cook.Domain.Trim('.'), cook.Name + "=" + cook.Value + ";", cefShowShopOrderLstWebBrowser.GetCookieManager(null));
|
||||
}
|
||||
|
||||
Panel.SetZIndex(this.cefShowShopOrderLstWebBrowser, maxZIndex++);
|
||||
cefShowShopOrderLstWebBrowser.Load("https://buyertrade.taobao.com/trade/itemlist/list_bought_items.htm?");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,6 +60,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
/// </summary>
|
||||
public partial class OrderListCtrl : UserControl, INotifyPropertyChanged
|
||||
{
|
||||
private static readonly object locker = new object();
|
||||
|
||||
public static bool IsAutoBuy { get; set; } = false;
|
||||
public CheckBox chkSelectAll = null;
|
||||
OrderFilterConfig _orderFilterConfig;
|
||||
@@ -506,7 +508,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
var pddBuyMapLst = buyMapList.Where(m => m.platform == "pdd").ToList();
|
||||
item.PddBuyMap = pddBuyMapLst.FirstOrDefault(b => b.sku_code == item.out_sku_id && b.spu_code == item.out_product_id);
|
||||
if (item.PddBuyMap == null)
|
||||
item.PddBuyMap = pddBuyMapLst.FirstOrDefault(b => b.sku_code == item.SkuAttrStr && b.spu_code == item.out_product_id);
|
||||
item.PddBuyMap = pddBuyMapLst.FirstOrDefault(b => b.sku_code == item.SkuAttrStr && b.spu_code == item.out_product_id);
|
||||
if (item.PddBuyMap == null)
|
||||
item.PddBuyMap = pddBuyMapLst.FirstOrDefault(b => b.sku_code == item.out_sku_id && b.spu_code == item.product_id);
|
||||
if (item.PddBuyMap == null)
|
||||
@@ -1019,15 +1021,14 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
else
|
||||
{
|
||||
oms_wei_ewaybill_path_list = JsonHelper.DeserializeJsonToList<oms_wei_ewaybill_path>(JObject.Parse(html)["data"].ParseToString()).OrderByDescending(p => p.update_time).ToList();
|
||||
return oms_wei_ewaybill_path_list;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
if (oms_wei_ewaybill_path_list == null)
|
||||
oms_wei_ewaybill_path_list = new List<oms_wei_ewaybill_path>();
|
||||
return oms_wei_ewaybill_path_list;
|
||||
return new List<oms_wei_ewaybill_path>();
|
||||
}
|
||||
|
||||
public static List<WXBuyMapInfo> GetBuyProdMap(List<oms_wei_order_item_info> orderItems)
|
||||
@@ -1075,6 +1076,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
}
|
||||
catch
|
||||
{
|
||||
return new List<WXBuyMapInfo>();
|
||||
}
|
||||
}
|
||||
return GlobalConfig.BuyMapList.Where(m => orderItems.Any(oi => m.spu_code == oi.out_product_id || m.spu_code == oi.product_id)).ToList();
|
||||
@@ -1544,71 +1546,46 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
|
||||
TabItem tabItem = null;
|
||||
List<TabItem> tabItems = this.tabOrderType.Items.Cast<TabItem>().ToList();
|
||||
//Dispatcher.Invoke(new Action(() => { tabItem = tabItems.FirstOrDefault(t => t.Header.ParseToString().StartsWith("待采购")); }));
|
||||
//if (tabItem != null)
|
||||
{
|
||||
var lstCount = userOrderLst.Where(r => r.IsWaitBuy).Count();
|
||||
var filteLstTmpCount = userOrderLst.Where(o => !GetOrderIsFilter(o, "待采购")).Count();
|
||||
//Dispatcher.Invoke(new Action(() => { tabItem.Header = "待采购(" + lstCount + "|" + filteLstTmpCount + ")"; }));
|
||||
WaitBuyTabTxt = "待采购(" + lstCount + "|" + filteLstTmpCount + ")";
|
||||
}
|
||||
//Dispatcher.Invoke(new Action(() => { tabItem = tabItems.FirstOrDefault(t => t.Header.ParseToString().StartsWith("待发货")); }));
|
||||
//if (tabItem != null)
|
||||
{
|
||||
var lstCount = userOrderLst.Where(r => r.IsWaitSend).Count();
|
||||
var filteLstTmpCount = userOrderLst.Where(o => !GetOrderIsFilter(o, "待发货")).Count();
|
||||
//Dispatcher.Invoke(new Action(() => { tabItem.Header = "待发货(" + lstCount + "|" + filteLstTmpCount + ")"; }));
|
||||
WaitSendTabTxt = "待发货(" + lstCount + "|" + filteLstTmpCount + ")";
|
||||
}
|
||||
//Dispatcher.Invoke(new Action(() => { tabItem = tabItems.FirstOrDefault(t => t.Header.ParseToString().StartsWith("待收货")); }));
|
||||
//if (tabItem != null)
|
||||
{
|
||||
var lstCount = userOrderLst.Where(r => r.IsWaitReceive).Count();
|
||||
var filteLstTmpCount = userOrderLst.Where(o => !GetOrderIsFilter(o, "待收货")).Count();
|
||||
//Dispatcher.Invoke(new Action(() => { tabItem.Header = "待收货(" + lstCount + "|" + filteLstTmpCount + ")"; }));
|
||||
WaitReceiveTabTxt = "待收货(" + lstCount + "|" + filteLstTmpCount + ")";
|
||||
}
|
||||
//Dispatcher.Invoke(new Action(() => { tabItem = tabItems.FirstOrDefault(t => t.Header.ParseToString().StartsWith("售后完成单")); }));
|
||||
//if (tabItem != null)
|
||||
{
|
||||
var lstCount = userOrderLst.Where(r => r.IsRefund).Count();
|
||||
var filteLstTmpCount = userOrderLst.Where(o => !GetOrderIsFilter(o, "售后完成单")).Count();
|
||||
//Dispatcher.Invoke(new Action(() => { tabItem.Header = "售后完成单(" + lstCount + "|" + filteLstTmpCount + ")"; }));
|
||||
RefundTabTxt = "售后完成单(" + lstCount + "|" + filteLstTmpCount + ")";
|
||||
}
|
||||
//Dispatcher.Invoke(new Action(() => { tabItem = tabItems.FirstOrDefault(t => t.Header.ParseToString().StartsWith("需处理售后单")); }));
|
||||
//if (tabItem != null)
|
||||
{
|
||||
var lstCount = userOrderLst.Where(r => r.IsEmergencyManualReturnOrder).Count();
|
||||
var filteLstTmpCount = userOrderLst.Where(o => !GetOrderIsFilter(o, "需处理售后单")).Count();
|
||||
//Dispatcher.Invoke(new Action(() => { tabItem.Header = "需处理售后单(" + lstCount + "|" + filteLstTmpCount + ")"; }));
|
||||
EmergencyManualReturnOrderTabTxt = "需处理售后单(" + lstCount + "|" + filteLstTmpCount + ")";
|
||||
}
|
||||
//Dispatcher.Invoke(new Action(() => { tabItem = tabItems.FirstOrDefault(t => t.Header.ParseToString().StartsWith("退货仓自动售后单")); }));
|
||||
//if (tabItem != null)
|
||||
{
|
||||
var lstCount = userOrderLst.Where(r => r.IsEmergencyDistribReturnOrder).Count();
|
||||
var filteLstTmpCount = userOrderLst.Where(o => !GetOrderIsFilter(o, "退货仓自动售后单")).Count();
|
||||
//Dispatcher.Invoke(new Action(() => { tabItem.Header = "退货仓自动售后单(" + lstCount + "|" + filteLstTmpCount + ")"; }));
|
||||
EmergencyDistribReturnOrderTabTxt = "退货仓自动售后单(" + lstCount + "|" + filteLstTmpCount + ")";
|
||||
}
|
||||
//Dispatcher.Invoke(new Action(() => { tabItem = tabItems.FirstOrDefault(t => t.Header.ParseToString().StartsWith("异常需重拍")); }));
|
||||
//if (tabItem != null)
|
||||
{
|
||||
var lstCount = userOrderLst.Where(r => r.IsAbnormal).Count();
|
||||
var filteLstTmpCount = userOrderLst.Where(o => !GetOrderIsFilter(o, "异常需重拍")).Count();
|
||||
//Dispatcher.Invoke(new Action(() => { tabItem.Header = "异常需重拍(" + lstCount + "|" + filteLstTmpCount + ")"; }));
|
||||
AbnormalTabTxt = "异常需重拍(" + lstCount + "|" + filteLstTmpCount + ")";
|
||||
}
|
||||
//Dispatcher.Invoke(new Action(() => { tabItem = tabItems.FirstOrDefault(t => t.Header.ParseToString().StartsWith("全部订单")); }));
|
||||
//if (tabItem != null)
|
||||
{
|
||||
var lstCount = userOrderLst.Count();
|
||||
var filteLstTmpCount = userOrderLst.Where(o => !GetOrderIsFilter(o, "全部订单")).Count();
|
||||
//Dispatcher.Invoke(new Action(() => { tabItem.Header = "全部订单(" + lstCount + "|" + filteLstTmpCount + ")"; }));\
|
||||
AllOrderTabTxt = "全部订单(" + lstCount + "|" + filteLstTmpCount + ")";
|
||||
}
|
||||
//txtMsg.Text = "当前条件共计 " + GlobalConfig.lstFilterOrder.Count() + " 条订单记录";
|
||||
}
|
||||
|
||||
CancellationTokenSource TokenSource = null;
|
||||
@@ -1626,6 +1603,18 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
if (this.lbxOrder == null)
|
||||
return;
|
||||
|
||||
if (token.IsCancellationRequested)
|
||||
return;
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
GlobalConfig.lstFilterOrder.Clear();
|
||||
//GlobalConfig.lstFilterOrder = new ObservableCollection<oms_wei_order_info>(orderLstTmp);
|
||||
GlobalConfig.lstFilterOrder = new ObservableCollection<oms_wei_order_info>();
|
||||
this.lbxOrder.ItemsSource = GlobalConfig.lstFilterOrder;
|
||||
}));
|
||||
|
||||
if (token.IsCancellationRequested)
|
||||
return;
|
||||
var orderLstTmp = new List<oms_wei_order_info>();
|
||||
if (GlobalConfig.OrderTabHeaderStr.StartsWith("需处理售后单") || GlobalConfig.OrderTabHeaderStr.StartsWith("退货仓自动售后单"))
|
||||
orderLstTmp = GlobalConfig.lstOrder.Where(o => !GetOrderIsFilter(o)).OrderByDescending(o => o.RefundDatetime).ToList();
|
||||
@@ -1634,23 +1623,23 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
else
|
||||
orderLstTmp = GlobalConfig.lstOrder.Where(o => !GetOrderIsFilter(o)).OrderByDescending(o => o.create_time).ToList();
|
||||
|
||||
//Task.Run(() => {
|
||||
if (token.IsCancellationRequested)
|
||||
return;
|
||||
disPlayOrderTabOrderCount();
|
||||
//});
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
GlobalConfig.lstFilterOrder.Clear();
|
||||
}));
|
||||
|
||||
int n = 0;
|
||||
foreach (var order in orderLstTmp)
|
||||
{
|
||||
if (n++ % 100 == 0)
|
||||
Thread.Sleep(1);
|
||||
|
||||
if (token.IsCancellationRequested)
|
||||
break;
|
||||
|
||||
if (!GlobalConfig.lstFilterOrder.ToList().Any(o => o.order_id == order.order_id))
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
GlobalConfig.lstFilterOrder.Add(order);
|
||||
}));
|
||||
{
|
||||
Dispatcher.Invoke(() => { GlobalConfig.lstFilterOrder.Add(order); });
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -1690,11 +1679,14 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
else
|
||||
nextOrder = GlobalConfig.lstFilterOrder.ToList().FirstOrDefault(o => o.create_time < order.create_time);
|
||||
|
||||
var index = -1;
|
||||
if (nextOrder != null)
|
||||
index = GlobalConfig.lstFilterOrder.IndexOf(nextOrder);
|
||||
Dispatcher.Invoke(() =>
|
||||
{
|
||||
if (nextOrder != null)
|
||||
if (nextOrder != null && index >= 0 && GlobalConfig.lstFilterOrder.Count > index)
|
||||
{
|
||||
GlobalConfig.lstFilterOrder.Insert(GlobalConfig.lstFilterOrder.IndexOf(nextOrder), order);
|
||||
GlobalConfig.lstFilterOrder.Insert(index, order);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -466,7 +466,7 @@
|
||||
Background="Transparent"
|
||||
Foreground="#f56c6c"
|
||||
Text="{Binding ItemRefund.ReasonTextStr}"
|
||||
Visibility="{Binding ItemRefund.ReasonTextStrVisibility}" />
|
||||
Visibility="{Binding RefundReasonTextStrVisibility}" />
|
||||
|
||||
<!-- 售后结果 -->
|
||||
<TextBlock
|
||||
@@ -536,7 +536,7 @@
|
||||
IsReadOnly="True"
|
||||
Text="{Binding ItemRefund.after_sale_order_id}"
|
||||
TextWrapping="Wrap"
|
||||
Visibility="{Binding ItemRefund.AfterSaleOrderIdVisibility}"
|
||||
Visibility="{Binding RefundAfterSaleOrderIdVisibility}"
|
||||
WaterMark="退款单号" />
|
||||
<Border
|
||||
Width="12"
|
||||
@@ -702,7 +702,7 @@
|
||||
BorderBrush="{Binding TransitRefundStatusBackColor}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="2"
|
||||
Visibility="{Binding TransitRefundStatusStr, Converter={StaticResource HasTextVisibility}}">
|
||||
Visibility="{Binding TransitRefundStatusStrVisibility}">
|
||||
<TextBlock
|
||||
x:Name="txtRefundStatus"
|
||||
MinWidth="20"
|
||||
@@ -722,7 +722,7 @@
|
||||
Title="采购单号:"
|
||||
Cursor="Hand"
|
||||
Foreground="#0099ff"
|
||||
Visibility="{Binding ElementName=txtTransitOrderNumStr, Path=Text, Converter={StaticResource HasTextVisibility}}">
|
||||
Visibility="{Binding ItemTransitOutOrderNoStrVisibility}">
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<uc:UcWaterMarkTextBox1
|
||||
x:Name="txtTransitOrderNumStr"
|
||||
@@ -746,8 +746,7 @@
|
||||
Background="Transparent"
|
||||
Cursor="Hand"
|
||||
MouseLeftButtonDown="Path_MouseLeftButtonDown"
|
||||
Tag="{Binding order_id}"
|
||||
Visibility="{Binding ElementName=txtTransitOrderBuyerStr, Path=Text, Converter={StaticResource HasTextVisibility}}">
|
||||
Tag="{Binding order_id}">
|
||||
<Path
|
||||
Data="M80 432a128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128h-384a128 128 0 0 1-128-128v-384z m128-64a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64h-384z M816 144h-384a64 64 0 0 0-64 64 32 32 0 0 1-64 0 128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128 32 32 0 0 1 0-64 64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64z"
|
||||
Fill="{StaticResource PageLinkBrush}"
|
||||
@@ -762,7 +761,7 @@
|
||||
x:Name="wpBuyTime"
|
||||
Title="采购时间:"
|
||||
Foreground="{Binding OutOrderTimeQualifiedBrush}"
|
||||
Visibility="{Binding ElementName=txtOutOrderTimeQualifiedStr, Path=Text, Converter={StaticResource HasTextVisibility}}">
|
||||
Visibility="{Binding OutOrderTimeQualifiedStrVisibility}">
|
||||
<uc:UcWaterMarkTextBox1
|
||||
x:Name="txtOutOrderTimeQualifiedStr"
|
||||
Margin="-2,0"
|
||||
@@ -781,7 +780,7 @@
|
||||
<wpf:TitleContent
|
||||
Title="取号物流:"
|
||||
Foreground="{StaticResource PageOkBrush}"
|
||||
Visibility="{Binding TransitOrderWaybillToWareHouseStr, Converter={StaticResource HasTextVisibility}}">
|
||||
Visibility="{Binding TransitOrderWaybillToWareHouseStrVisibility}">
|
||||
<uc:UcWaterMarkTextBox1
|
||||
Margin="-2,0"
|
||||
Padding="0"
|
||||
@@ -811,7 +810,7 @@
|
||||
</wpf:TitleContent>
|
||||
|
||||
<!-- 仓库物流 -->
|
||||
<wpf:TitleContent Title="仓库物流:" Visibility="{Binding TransitOrderWaybillFromWareHouseStr, Converter={StaticResource HasTextVisibility}}">
|
||||
<wpf:TitleContent Title="仓库物流:" Visibility="{Binding TransitOrderWaybillFromWareHouseStrVisibility}">
|
||||
<WrapPanel>
|
||||
<uc:UcWaterMarkTextBox1
|
||||
Margin="-2,0"
|
||||
@@ -835,7 +834,7 @@
|
||||
</wpf:TitleContent>
|
||||
|
||||
<!-- 仓库物流 -->
|
||||
<wpf:TitleContent Title="补发物流:" Visibility="{Binding TransitExtraPackageWaybillStr, Converter={StaticResource HasTextVisibility}}">
|
||||
<wpf:TitleContent Title="补发物流:" Visibility="{Binding TransitExtraPackageWaybillStrVisibility}">
|
||||
<WrapPanel>
|
||||
<uc:UcWaterMarkTextBox1
|
||||
Margin="-2,0"
|
||||
@@ -855,7 +854,7 @@
|
||||
Click="btnVoidTransitExtraOrder_Click"
|
||||
Content="{Binding TransitExtraPackageWaybillBtnStr}"
|
||||
Style="{StaticResource LinkButton}"
|
||||
Visibility="{Binding TransitExtraPackageWaybillBtnStr, Converter={StaticResource HasTextVisibility}}" />
|
||||
Visibility="{Binding TransitExtraPackageWaybillBtnStrVisibility}" />
|
||||
</WrapPanel>
|
||||
</wpf:TitleContent>
|
||||
|
||||
@@ -942,7 +941,7 @@
|
||||
<wpf:TitleContent
|
||||
x:Name="wpDirectBuyTime"
|
||||
Title="外采时间:"
|
||||
Visibility="{Binding ElementName=txtDirectOrderBuyTimeStr, Path=Text, Converter={StaticResource HasTextVisibility}}">
|
||||
Visibility="{Binding DirectOrderBuyTimeStrVisibility}">
|
||||
<uc:UcWaterMarkTextBox1
|
||||
x:Name="txtDirectOrderBuyTimeStr"
|
||||
Margin="-2,2"
|
||||
@@ -1293,7 +1292,7 @@
|
||||
</wpf:TitleContent>
|
||||
|
||||
<!-- 总店地址 -->
|
||||
<wpf:TitleContent Title="总店地址:" Visibility="{Binding PddBuyerAfterSaleAddressStr, Converter={StaticResource HasTextVisibility}}">
|
||||
<wpf:TitleContent Title="总店地址:" Visibility="{Binding PddBuyerAfterSaleAddressStrVisibility}">
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<uc:UcWaterMarkTextBox1
|
||||
x:Name="txtBuyerRefundAddress"
|
||||
@@ -1303,10 +1302,9 @@
|
||||
Background="Transparent"
|
||||
BorderThickness="1"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding PddBuyerAfterSaleAddressStr, Converter={StaticResource TextEllipsisConverter}}"
|
||||
Text="{Binding PddBuyerAfterSaleAddressShortStr}"
|
||||
TextWrapping="Wrap"
|
||||
ToolTip="{Binding PddBuyerAfterSaleAddressStr}"
|
||||
Visibility="{Binding Text, RelativeSource={RelativeSource Self}, Converter={StaticResource HasTextVisibility}}"
|
||||
WaterMark="总店退货地址" />
|
||||
<Border
|
||||
Width="12"
|
||||
@@ -1326,7 +1324,7 @@
|
||||
</wpf:TitleContent>
|
||||
|
||||
<!-- 直发总店 -->
|
||||
<wpf:TitleContent Title="直发总店:" Visibility="{Binding DirectPddBuyerAfterSaleAddressStr, Converter={StaticResource HasTextVisibility}}">
|
||||
<wpf:TitleContent Title="直发总店:" Visibility="{Binding DirectPddBuyerAfterSaleAddressStrVisibility}">
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<uc:UcWaterMarkTextBox1
|
||||
x:Name="txtDirectBuyerRefundAddress"
|
||||
@@ -1336,10 +1334,9 @@
|
||||
Background="Transparent"
|
||||
BorderThickness="1"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding DirectPddBuyerAfterSaleAddressStr, Converter={StaticResource TextEllipsisConverter}}"
|
||||
Text="{Binding DirectPddBuyerAfterSaleAddressShortStr}"
|
||||
TextWrapping="Wrap"
|
||||
ToolTip="{Binding DirectPddBuyerAfterSaleAddressStr}"
|
||||
Visibility="{Binding Text, RelativeSource={RelativeSource Self}, Converter={StaticResource HasTextVisibility}}"
|
||||
WaterMark="总店退货地址" />
|
||||
<Border
|
||||
Width="12"
|
||||
|
||||
@@ -787,8 +787,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
// 异步加载图片防止卡顿
|
||||
// 缩略图在有的电脑上无法显示
|
||||
//BitmapImage bImg = ImageUrlToBitmapImageConverter.LoadImageFromUrl(order_item.thumb_img + "?imageView2/1/w/100/format/webp|imageMogr2/auto-orient=");
|
||||
//BitmapImage bImg = AllBase.ImageBuild.LoadBitmipImageFromUrl(order_item.thumb_img);
|
||||
BitmapImage bImg = AllBase.ImageBuild.LoadBitmipImageFromUrl(order_item.thumb_img + "?imageView2/1/w/100/format/webp|imageMogr2/auto-orient=");
|
||||
BitmapImage bImg = AllBase.ImageBuild.LoadBitmipImageFromUrl(order_item.thumb_img, 100, 100);
|
||||
Thread.Sleep(Randomx.GetId(1000));
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user