Merge branch 'main' of http://git.ts.e57.cn/chfei/29WxOrder
This commit is contained in:
commit
dc136e449e
14 files changed
+350
-144
No files matched your search
@@ -14,6 +14,8 @@ 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;
|
||||
|
||||
@@ -54,6 +54,8 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
/// </summary>
|
||||
public partial class PDDBuyerOrderReadCtrl : UserControl
|
||||
{
|
||||
private static readonly object locker = new object();
|
||||
|
||||
Dictionary<BuyerLoginInfo, PddPickInfo> dicPddPickInfo = new Dictionary<BuyerLoginInfo, PddPickInfo>();
|
||||
ConcurrentList<yh_sync_logistics> lstSyncLogistics = new ConcurrentList<yh_sync_logistics>();
|
||||
|
||||
@@ -1132,7 +1134,21 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
}
|
||||
|
||||
bool isUpdate = false;
|
||||
PddBuyerAfterSaleLiteInfo afterSale = lstPddBuyerAfterSaleInfoLite.ToList().FirstOrDefault(aft => aft.afterSalesId == af.afterSalesId);
|
||||
PddBuyerAfterSaleLiteInfo afterSale = null;
|
||||
//lock (locker)
|
||||
var success = false;
|
||||
for (int i = 0; i < 10 && success == false; i++)
|
||||
{
|
||||
Thread.Sleep(1);
|
||||
try
|
||||
{
|
||||
afterSale = lstPddBuyerAfterSaleInfoLite.ToList().FirstOrDefault(aft => aft.afterSalesId == af.afterSalesId);
|
||||
success = true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
if (afterSale == null)
|
||||
{
|
||||
isUpdate = true;
|
||||
|
||||
@@ -691,7 +691,8 @@
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
Foreground="#FFEE0099"
|
||||
Header="异常需重拍"
|
||||
d:Header="异常需重拍"
|
||||
Header="{Binding AbnormalTabTxt}"
|
||||
SizeChanged="TabItem_SizeChanged" />
|
||||
<TabItem
|
||||
MinWidth="60"
|
||||
@@ -877,7 +878,8 @@
|
||||
Background="#FF6666"
|
||||
BorderBrush="Transparent"
|
||||
Foreground="#FF2222"
|
||||
Header="需处理售后单"
|
||||
d:Header="需处理售后单"
|
||||
Header="{Binding EmergencyManualReturnOrderTabTxt}"
|
||||
SizeChanged="TabItem_SizeChanged">
|
||||
<Border
|
||||
Margin="4,0,4,4"
|
||||
@@ -1155,7 +1157,8 @@
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
Foreground="#FF7744"
|
||||
Header="退货仓自动售后单"
|
||||
d:Header="退货仓自动售后单"
|
||||
Header="{Binding EmergencyDistribReturnOrderTabTxt}"
|
||||
SizeChanged="TabItem_SizeChanged">
|
||||
<Border
|
||||
Margin="4,0,4,4"
|
||||
@@ -1290,7 +1293,8 @@
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
Foreground="#FFaa77"
|
||||
Header="售后完成单"
|
||||
d:Header="售后完成单"
|
||||
Header="{Binding RefundTabTxt}"
|
||||
SizeChanged="TabItem_SizeChanged">
|
||||
<Border
|
||||
Margin="4,0,4,4"
|
||||
@@ -1380,7 +1384,8 @@
|
||||
MinWidth="60"
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
Header="全部订单"
|
||||
d:Header="全部订单"
|
||||
Header="{Binding AllOrderTabTxt}"
|
||||
SizeChanged="TabItem_SizeChanged" />
|
||||
<!--<TabItem Header="发货异常">
|
||||
<Grid Background="#FFE5E5E5"/>
|
||||
@@ -1496,7 +1501,7 @@
|
||||
ScrollViewer.CanContentScroll="True"
|
||||
VirtualizingPanel.ScrollUnit="Pixel"
|
||||
VirtualizingStackPanel.IsVirtualizing="True"
|
||||
VirtualizingStackPanel.VirtualizationMode="Recycling">
|
||||
><!--VirtualizingStackPanel.VirtualizationMode="Recycling"-->
|
||||
<!-- 使用自定义属性模板去除ListBox高亮显示框 -->
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
|
||||
@@ -158,6 +158,73 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
}
|
||||
}
|
||||
}
|
||||
string refundTabTxt = "售后完成但";
|
||||
public string RefundTabTxt
|
||||
{
|
||||
get { return refundTabTxt; }
|
||||
set
|
||||
{
|
||||
if (refundTabTxt != value)
|
||||
{
|
||||
refundTabTxt = value;
|
||||
OnPropertyChanged(new PropertyChangedEventArgs("RefundTabTxt"));
|
||||
}
|
||||
}
|
||||
}
|
||||
string emergencyManualReturnOrderTxt = "需处理售后单";
|
||||
public string EmergencyManualReturnOrderTabTxt
|
||||
{
|
||||
get { return emergencyManualReturnOrderTxt; }
|
||||
set
|
||||
{
|
||||
if (emergencyManualReturnOrderTxt != value)
|
||||
{
|
||||
emergencyManualReturnOrderTxt = value;
|
||||
OnPropertyChanged(new PropertyChangedEventArgs("EmergencyManualReturnOrderTabTxt"));
|
||||
}
|
||||
}
|
||||
}
|
||||
string emergencyDistribReturnOrderTxt = "退货仓自动售后单";
|
||||
public string EmergencyDistribReturnOrderTabTxt
|
||||
{
|
||||
get { return emergencyDistribReturnOrderTxt; }
|
||||
set
|
||||
{
|
||||
if (emergencyDistribReturnOrderTxt != value)
|
||||
{
|
||||
emergencyDistribReturnOrderTxt = value;
|
||||
OnPropertyChanged(new PropertyChangedEventArgs("EmergencyDistribReturnOrderTabTxt"));
|
||||
}
|
||||
}
|
||||
}
|
||||
string abnormalTabTxt = "异常需重拍";
|
||||
|
||||
public string AbnormalTabTxt
|
||||
{
|
||||
get { return abnormalTabTxt; }
|
||||
set
|
||||
{
|
||||
if (abnormalTabTxt != value)
|
||||
{
|
||||
abnormalTabTxt = value;
|
||||
OnPropertyChanged(new PropertyChangedEventArgs("AbnormalTabTxt"));
|
||||
}
|
||||
}
|
||||
}
|
||||
string allOrderTabTxt = "全部订单";
|
||||
public string AllOrderTabTxt
|
||||
{
|
||||
get { return allOrderTabTxt; }
|
||||
set
|
||||
{
|
||||
if (allOrderTabTxt != value)
|
||||
{
|
||||
allOrderTabTxt = value;
|
||||
OnPropertyChanged(new PropertyChangedEventArgs("AllOrderTabTxt"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool IsAutoReadOrder = true;
|
||||
public DateTime nextGetOrderTime = DateTime.MinValue;
|
||||
@@ -1501,40 +1568,45 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
//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)
|
||||
//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 + ")"; }));
|
||||
//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)
|
||||
//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 + ")"; }));
|
||||
//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)
|
||||
//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 + ")"; }));
|
||||
//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)
|
||||
//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 + ")"; }));
|
||||
//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)
|
||||
//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 + ")"; }));
|
||||
//Dispatcher.Invoke(new Action(() => { tabItem.Header = "全部订单(" + lstCount + "|" + filteLstTmpCount + ")"; }));\
|
||||
AllOrderTabTxt = "全部订单(" + lstCount + "|" + filteLstTmpCount + ")";
|
||||
}
|
||||
//txtMsg.Text = "当前条件共计 " + GlobalConfig.lstFilterOrder.Count() + " 条订单记录";
|
||||
}
|
||||
@@ -2191,6 +2263,12 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
|
||||
private void tabOrderType_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
if (this.IsLoaded)
|
||||
{
|
||||
GlobalConfig.lstFilterOrder.Clear();
|
||||
GlobalConfig.lstFilterOrder = new ObservableCollection<oms_wei_order_info>();
|
||||
this.lbxOrder.ItemsSource = GlobalConfig.lstFilterOrder;
|
||||
}
|
||||
GlobalConfig.OrderTabHeaderStr = ((tabOrderType.SelectedItem as TabItem)?.Header).ParseToString();
|
||||
FilterOrders();
|
||||
}
|
||||
|
||||
@@ -45,14 +45,14 @@
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="6" />
|
||||
</Grid.RowDefinitions>
|
||||
<ItemsControl Grid.Row="1" ItemsSource="{Binding orderItems}">
|
||||
<!--<ItemsControl Grid.Row="1" ItemsSource="{Binding orderItems}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<!--<TextBlock Text="{Binding ProductName}" Margin="20,0,0,0"/>-->
|
||||
<local:OrderListRowItemCtrl DataContext="{Binding}" />
|
||||
<DataTemplate>
|
||||
<local:OrderListRowItemCtrl DataContext="{Binding}" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ItemsControl>-->
|
||||
<!--<TextBlock Text="{Binding ProductName}" Margin="20,0,0,0"/>-->
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
@@ -41,23 +41,23 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
|
||||
|
||||
private async void OrderListRowCtrl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
//await Task.Run(() => { });
|
||||
//
|
||||
//if (this.DataContext is oms_wei_order_info order)
|
||||
//{
|
||||
// int index = 0;
|
||||
// foreach (var orderItem in order.orderItems)
|
||||
// {
|
||||
// gridChildOrder.RowDefinitions.Insert(gridChildOrder.RowDefinitions.Count - 1, new RowDefinition() { Height = GridLength.Auto });
|
||||
// index++;
|
||||
// var rowItem = new OrderListRowItemCtrl() { DataContext = orderItem, Name = "rowItem" + index };
|
||||
// Grid.SetRow(rowItem, index);
|
||||
// this.gridChildOrder.Children.Add(rowItem);
|
||||
// if (index >= 5)
|
||||
// break;
|
||||
// }
|
||||
//}
|
||||
}
|
||||
await Task.Run(() => { Thread.Sleep(1); });
|
||||
|
||||
if (this.DataContext is oms_wei_order_info order && this.IsArrangeValid)
|
||||
{
|
||||
int index = 0;
|
||||
foreach (var orderItem in order.orderItems)
|
||||
{
|
||||
gridChildOrder.RowDefinitions.Insert(gridChildOrder.RowDefinitions.Count - 1, new RowDefinition() { Height = GridLength.Auto });
|
||||
index++;
|
||||
var rowItem = new OrderListRowItemCtrl() { DataContext = orderItem, Name = "rowItem" + index };
|
||||
Grid.SetRow(rowItem, index);
|
||||
this.gridChildOrder.Children.Add(rowItem);
|
||||
if (index >= 5)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckBox_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
@@ -234,16 +234,17 @@
|
||||
FontSize="12"
|
||||
Foreground="Gray"
|
||||
Text="隐藏标记" />
|
||||
<Path
|
||||
<Path
|
||||
Width="15"
|
||||
Height="15"
|
||||
Margin="2,0,0,0"
|
||||
d:Fill="SkyBlue"
|
||||
Data="M 0,0 L 1,0 L 1,1 L 10,1 L 7,4 L 10,7 L 1,7 L 1,12 L 0,12 Z"
|
||||
Fill="{Binding colour_flag, Converter={StaticResource flagColorConverter}}"
|
||||
Fill="{Binding ColourFlagBrush}"
|
||||
Stretch="Uniform" />
|
||||
|
||||
</WrapPanel>
|
||||
<!--ColourFlagBrush-->
|
||||
<!--Fill="{Binding colour_flag, Converter={StaticResource flagColorConverter}}"-->
|
||||
</WrapPanel>
|
||||
</Border>
|
||||
|
||||
|
||||
|
||||
@@ -536,7 +536,7 @@
|
||||
IsReadOnly="True"
|
||||
Text="{Binding ItemRefund.after_sale_order_id}"
|
||||
TextWrapping="Wrap"
|
||||
Visibility="{Binding Text, RelativeSource={RelativeSource Self}, Converter={StaticResource HasTextVisibility}}"
|
||||
Visibility="{Binding ItemRefund.AfterSaleOrderIdVisibility}"
|
||||
WaterMark="退款单号" />
|
||||
<Border
|
||||
Width="12"
|
||||
@@ -557,7 +557,7 @@
|
||||
</wpf:TitleContent>
|
||||
|
||||
<!-- 退货地址 -->
|
||||
<wpf:TitleContent Title="退货地址:" Visibility="{Binding RefundAddressStr, Converter={StaticResource HasTextVisibility}}">
|
||||
<wpf:TitleContent Title="退货地址:" Visibility="{Binding RefundAddressShortStrVisibility}">
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<uc:UcWaterMarkTextBox1
|
||||
x:Name="txtRefundAddress"
|
||||
@@ -566,7 +566,7 @@
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
IsReadOnly="True"
|
||||
Text="{Binding RefundAddressStr, Converter={StaticResource TextEllipsisConverter26}}"
|
||||
Text="{Binding RefundAddressShortStr}"
|
||||
TextWrapping="Wrap"
|
||||
ToolTip="{Binding RefundAddressStr}"
|
||||
WaterMark="退货地址" />
|
||||
@@ -613,7 +613,7 @@
|
||||
BorderBrush="{Binding BuyerTransitWaybillStatusBorderColor}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="2"
|
||||
Visibility="{Binding BuyerTransitWaybillStatusStr, Converter={StaticResource HasTextVisibility}}">
|
||||
Visibility="{Binding BuyerTransitWaybillStatusStrVisibility}">
|
||||
<TextBlock
|
||||
x:Name="txtBuyStatus"
|
||||
MinWidth="20"
|
||||
@@ -635,7 +635,7 @@
|
||||
BorderBrush="{Binding WarehouseWaybillStatusBorderColor}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="2"
|
||||
Visibility="{Binding WarehouseWaybillStatusStr, Converter={StaticResource HasTextVisibility}}">
|
||||
Visibility="{Binding WarehouseWaybillStatusStrVisibility}">
|
||||
<TextBlock
|
||||
x:Name="txtWarehouseStatus"
|
||||
MinWidth="20"
|
||||
@@ -655,7 +655,7 @@
|
||||
BorderBrush="{StaticResource pageColorBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="2"
|
||||
Visibility="{Binding TransitRefundVoidStatusStr, Converter={StaticResource HasTextVisibility}}">
|
||||
Visibility="{Binding TransitRefundVoidStatusStrVisibility}">
|
||||
<TextBlock
|
||||
MinWidth="20"
|
||||
Padding="0"
|
||||
@@ -674,7 +674,7 @@
|
||||
Cursor="Hand"
|
||||
Foreground="#0099ff"
|
||||
MouseLeftButtonUp="TransitOrderBuy_Click"
|
||||
Visibility="{Binding ElementName=txtTransitOrderBuyerStr, Path=Text, Converter={StaticResource HasTextVisibility}}">
|
||||
Visibility="{Binding ItemTransitOutOrderBuyerStrVisibility}">
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<uc:UcWaterMarkTextBox1
|
||||
x:Name="txtTransitOrderBuyerStr"
|
||||
|
||||
@@ -787,7 +787,8 @@ 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);
|
||||
BitmapImage bImg = AllBase.ImageBuild.LoadBitmipImageFromUrl(order_item.thumb_img + "?imageView2/1/w/100/format/webp|imageMogr2/auto-orient=");
|
||||
Thread.Sleep(Randomx.GetId(1000));
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user