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(() =>
|
||||
{
|
||||
|
||||
@@ -149,12 +149,19 @@ namespace AllBase.Helper
|
||||
|
||||
public static SolidColorBrush GrayBrush = new SolidColorBrush(Color.FromArgb(255, 127, 127, 127));
|
||||
|
||||
public static SolidColorBrush GreenTextBrush = new SolidColorBrush(Color.FromArgb(255, 103, 194, 58));
|
||||
public static SolidColorBrush RedTextBrush = new SolidColorBrush(Color.FromArgb(255, 250, 71, 51));
|
||||
public static SolidColorBrush GreenTextBrush = new SolidColorBrush(Color.FromArgb(255, 103, 194, 58));
|
||||
public static SolidColorBrush GreenTextBrush50 = new SolidColorBrush(Color.FromArgb(50, 103, 194, 58));
|
||||
public static SolidColorBrush GreenTextBrush26 = new SolidColorBrush(Color.FromArgb(26, 103, 194, 58));
|
||||
public static SolidColorBrush RedTextBrush = new SolidColorBrush(Color.FromArgb(255, 250, 71, 51));
|
||||
public static SolidColorBrush RedTextBrush205 = new SolidColorBrush(Color.FromArgb(205, 250, 71, 51));
|
||||
public static SolidColorBrush RedTextBrush50 = new SolidColorBrush(Color.FromArgb(50, 250, 71, 51));
|
||||
public static SolidColorBrush RedTextBrush50 = new SolidColorBrush(Color.FromArgb(50, 250, 71, 51));
|
||||
public static SolidColorBrush RedTextBrush26 = new SolidColorBrush(Color.FromArgb(26, 250, 71, 51));
|
||||
public static SolidColorBrush LightRedTextBrush = new SolidColorBrush(Color.FromArgb(255, 245, 108, 108));
|
||||
public static SolidColorBrush LightOrangeTextBrush = new SolidColorBrush(Color.FromArgb(255, 230, 162, 60));
|
||||
|
||||
public static SolidColorBrush CyanBrush = new SolidColorBrush(Color.FromArgb(255, 3, 151, 181));
|
||||
public static SolidColorBrush CyanBrush50 = new SolidColorBrush(Color.FromArgb(50, 3, 151, 181));
|
||||
public static SolidColorBrush CyanBrush26 = new SolidColorBrush(Color.FromArgb(26, 3, 151, 181));
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
using AllBase.Helper;
|
||||
using AllBase.Model.MvvmBaseClasses;
|
||||
using NaiBa.Util.Extension;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace AllBase.Model.DBModel
|
||||
{
|
||||
@@ -16,17 +18,18 @@ namespace AllBase.Model.DBModel
|
||||
set { }
|
||||
}
|
||||
public string OutOrderBuyerStr
|
||||
{
|
||||
get
|
||||
{
|
||||
return GlobalConfig.PDDBuyerLoginList.FirstOrDefault(b => b.buyer_id == buyer_account)?.buyer_name ??
|
||||
GlobalConfig.TaobaoBuyerLoginList.FirstOrDefault(b => b.buyer_id == buyer_account)?.buyer_name ?? buyer_account;
|
||||
}
|
||||
set { }
|
||||
{
|
||||
get { return this.GetValue(x => x.OutOrderBuyerStr); }
|
||||
set { this.SetValue(x => x.OutOrderBuyerStr, value); }
|
||||
}
|
||||
public void SetOutOrderBuyerStr()
|
||||
{
|
||||
OutOrderBuyerStr = GlobalConfig.PDDBuyerLoginList.FirstOrDefault(b => b.buyer_id == buyer_account)?.buyer_name ??
|
||||
GlobalConfig.TaobaoBuyerLoginList.FirstOrDefault(b => b.buyer_id == buyer_account)?.buyer_name ?? buyer_account;
|
||||
}
|
||||
|
||||
|
||||
public long id { get; set; }
|
||||
public long id { get; set; }
|
||||
public string out_order_no { get; set; }
|
||||
public string order_no { get; set; }
|
||||
public string order_sku_id { get; set; }
|
||||
|
||||
@@ -10,9 +10,11 @@ using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
|
||||
using Color = System.Windows.Media.Color;
|
||||
|
||||
@@ -126,24 +128,26 @@ namespace AllBase.Model.DBModel
|
||||
|
||||
public string orderStatusStr
|
||||
{
|
||||
get
|
||||
{
|
||||
//状态10 待付款;20 待发货;21 部分发货;30 待收货;100 完成;200 全部商品售后之后,订单取消;250 未付款用户主动取消或超时未付款订单自动取消;
|
||||
if (status == 10)
|
||||
return "待付款";
|
||||
if (status == 21)
|
||||
return "部分发货";
|
||||
if (status == 30)
|
||||
return "待收货";
|
||||
if (status == 100)
|
||||
return "完成";
|
||||
if (status == 200)
|
||||
return "已取消";
|
||||
if (status == 250)
|
||||
return "未付款已取消";
|
||||
return "未知状态";
|
||||
}
|
||||
set { }
|
||||
get { return this.GetValue(x => x.orderStatusStr); }
|
||||
set { this.SetValue(x => x.orderStatusStr, value); }
|
||||
}
|
||||
public void SetOrderStatusStr()
|
||||
{
|
||||
//状态10 待付款;20 待发货;21 部分发货;30 待收货;100 完成;200 全部商品售后之后,订单取消;250 未付款用户主动取消或超时未付款订单自动取消;
|
||||
if (status == 10)
|
||||
orderStatusStr = "待付款";
|
||||
else if (status == 21)
|
||||
orderStatusStr = "部分发货";
|
||||
else if (status == 30)
|
||||
orderStatusStr = "待收货";
|
||||
else if (status == 100)
|
||||
orderStatusStr = "完成";
|
||||
else if (status == 200)
|
||||
orderStatusStr = "已取消";
|
||||
else if (status == 250)
|
||||
orderStatusStr = "未付款已取消";
|
||||
else
|
||||
orderStatusStr = "未知状态";
|
||||
}
|
||||
|
||||
public string RefundTypeStr
|
||||
@@ -230,65 +234,67 @@ namespace AllBase.Model.DBModel
|
||||
/// </summary>
|
||||
public string DeliveryDeadlineStr
|
||||
{
|
||||
get
|
||||
get { return this.GetValue(x => x.DeliveryDeadlineStr); }
|
||||
set { this.SetValue(x => x.DeliveryDeadlineStr, value); }
|
||||
}
|
||||
public void SetDeliveryDeadlineStr()
|
||||
{
|
||||
if (this.status == 20 || this.status == 21)
|
||||
{
|
||||
if (this.status == 20 || this.status == 21)
|
||||
var deadlineTime = BaseClass.StampToDateTime(delivery_deadline.ParseToInt());
|
||||
var nowTime = DateTime.Now;
|
||||
if (deadlineTime < nowTime)
|
||||
DeliveryDeadlineStr = "已超时";
|
||||
else
|
||||
{
|
||||
var deadlineTime = BaseClass.StampToDateTime(delivery_deadline.ParseToInt());
|
||||
var nowTime = DateTime.Now;
|
||||
if (deadlineTime < nowTime)
|
||||
return "已超时";
|
||||
|
||||
var timeSpan = BaseClass.StampToDateTime(delivery_deadline.ParseToInt()) - nowTime;
|
||||
var durationStr = Math.Floor(timeSpan.TotalHours).ParseToInt() + "时" + timeSpan.Minutes + "分" + timeSpan.Seconds + "秒";
|
||||
return durationStr;
|
||||
DeliveryDeadlineStr = durationStr;
|
||||
}
|
||||
if (/*this.out_shipped == 1 */this.ship_done_time.ParseToInt() > 0)
|
||||
return "已发货";
|
||||
else
|
||||
return "未发货";
|
||||
}
|
||||
set { }
|
||||
else if (/*this.out_shipped == 1 */this.ship_done_time.ParseToInt() > 0)
|
||||
DeliveryDeadlineStr = "已发货";
|
||||
else
|
||||
DeliveryDeadlineStr = "未发货";
|
||||
}
|
||||
|
||||
public SolidColorBrush StatusBoxForeColor
|
||||
{
|
||||
get
|
||||
{
|
||||
if (DeliveryDeadlineStatusStr == "退款中" || DeliveryDeadlineStr == "已超时")
|
||||
return new SolidColorBrush(Color.FromRgb(250, 71, 51)); // #fa4733
|
||||
else if (DeliveryDeadlineStatusStr == "退款完成" || DeliveryDeadlineStr == "已发货")
|
||||
return new SolidColorBrush(Color.FromRgb(103, 194, 58)); // #67c23a
|
||||
else
|
||||
return new SolidColorBrush(Color.FromRgb(3, 151, 181)); // #0397b5
|
||||
}
|
||||
set { }
|
||||
get { return this.GetValue(x => x.StatusBoxForeColor); }
|
||||
set { this.SetValue(x => x.StatusBoxForeColor, value); }
|
||||
}
|
||||
public SolidColorBrush StatusBoxBackColor
|
||||
{
|
||||
get
|
||||
{
|
||||
if (DeliveryDeadlineStatusStr == "退款中" || DeliveryDeadlineStr == "已超时")
|
||||
return new SolidColorBrush(Color.FromArgb(26, 250, 71, 51)); // #fa4733 0.2
|
||||
else if (DeliveryDeadlineStatusStr == "退款完成" || DeliveryDeadlineStr == "已发货")
|
||||
return new SolidColorBrush(Color.FromArgb(26, 103, 194, 58)); // #67c23a 0.2
|
||||
else
|
||||
return new SolidColorBrush(Color.FromArgb(26, 3, 151, 181)); // #0397b5 0.2
|
||||
}
|
||||
set { }
|
||||
get { return this.GetValue(x => x.StatusBoxBackColor); }
|
||||
set { this.SetValue(x => x.StatusBoxBackColor, value); }
|
||||
}
|
||||
public SolidColorBrush StatusBoxBorderColor
|
||||
{
|
||||
get
|
||||
{
|
||||
if (DeliveryDeadlineStatusStr == "退款中" || DeliveryDeadlineStr == "已超时")
|
||||
return new SolidColorBrush(Color.FromArgb(50, 250, 71, 51)); // #fa4733 0.2
|
||||
else if (DeliveryDeadlineStatusStr == "退款完成" || DeliveryDeadlineStr == "已发货")
|
||||
return new SolidColorBrush(Color.FromArgb(50, 103, 194, 58)); // #67c23a 0.2
|
||||
else
|
||||
return new SolidColorBrush(Color.FromArgb(50, 3, 151, 181)); // #0397b5 0.2
|
||||
}
|
||||
set { }
|
||||
get { return this.GetValue(x => x.StatusBoxBorderColor); }
|
||||
set { this.SetValue(x => x.StatusBoxBorderColor, value); }
|
||||
}
|
||||
public void SetStatusBoxColor()
|
||||
{
|
||||
if (DeliveryDeadlineStatusStr == "退款中" || DeliveryDeadlineStr == "已超时")
|
||||
StatusBoxForeColor = GlobalConfig.RedTextBrush; // #fa4733 250, 71, 51
|
||||
else if (DeliveryDeadlineStatusStr == "退款完成" || DeliveryDeadlineStr == "已发货")
|
||||
StatusBoxForeColor = GlobalConfig.GreenTextBrush; // #67c23a 103, 194, 58
|
||||
else
|
||||
StatusBoxForeColor = GlobalConfig.CyanBrush; // #0397b5 3, 151, 181
|
||||
|
||||
if (DeliveryDeadlineStatusStr == "退款中" || DeliveryDeadlineStr == "已超时")
|
||||
StatusBoxBackColor = GlobalConfig.RedTextBrush26; // #fa4733 0.2 26, 250, 71, 51
|
||||
else if (DeliveryDeadlineStatusStr == "退款完成" || DeliveryDeadlineStr == "已发货")
|
||||
StatusBoxBackColor = GlobalConfig.GreenTextBrush26; // #67c23a 0.2 26, 103, 194, 58
|
||||
else
|
||||
StatusBoxBackColor = GlobalConfig.CyanBrush26; // #0397b5 0.2 26, 3, 151, 181
|
||||
|
||||
if (DeliveryDeadlineStatusStr == "退款中" || DeliveryDeadlineStr == "已超时")
|
||||
StatusBoxBorderColor = GlobalConfig.RedTextBrush50; // #fa4733 0.2 50, 250, 71, 51
|
||||
else if (DeliveryDeadlineStatusStr == "退款完成" || DeliveryDeadlineStr == "已发货")
|
||||
StatusBoxBorderColor = GlobalConfig.GreenTextBrush50; // #67c23a 0.2 50, 103, 194, 58
|
||||
else
|
||||
StatusBoxBorderColor = GlobalConfig.CyanBrush50; // #0397b5 0.2 50, 3, 151, 181
|
||||
}
|
||||
|
||||
public string AddressStr
|
||||
@@ -583,6 +589,11 @@ namespace AllBase.Model.DBModel
|
||||
get { return this.GetValue(x => x.colour_flag); }
|
||||
set { this.SetValue(x => x.colour_flag, value); }
|
||||
}
|
||||
public SolidColorBrush ColourFlagBrush
|
||||
{
|
||||
get { return this.GetValue(x => x.ColourFlagBrush); }
|
||||
set { this.SetValue(x => x.ColourFlagBrush, value); }
|
||||
}
|
||||
/// <summary>
|
||||
/// 旗帜备注时间
|
||||
/// </summary>
|
||||
@@ -680,6 +691,8 @@ namespace AllBase.Model.DBModel
|
||||
|
||||
public void SetOrderTextProperty()
|
||||
{
|
||||
SetOrderStatusStr();
|
||||
|
||||
Shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == shop_id.ParseToString());
|
||||
|
||||
if (this.orderItems.Any(oi => oi.OrderItemExt?.buy_type == "直发") && this.orderItems.Any(oi => oi.ItemTransitOrderWithVoid != null))
|
||||
@@ -728,9 +741,28 @@ namespace AllBase.Model.DBModel
|
||||
IsShowTransitExtraPackagesBtn = true;
|
||||
|
||||
SetDeliveryDeadlineStatusStr();
|
||||
SetOutExpressNo();
|
||||
SetDeliveryDeadlineStr();
|
||||
SetStatusBoxColor();
|
||||
SetOutExpressNo();
|
||||
SetShipDoneTimeStr();
|
||||
}
|
||||
SetColorBrush();
|
||||
}
|
||||
|
||||
public void SetColorBrush()
|
||||
{
|
||||
if (this.colour_flag.ParseToInt() == 2)
|
||||
ColourFlagBrush = (SolidColorBrush)Application.Current.Resources["FlagRedBrush"];
|
||||
else if (colour_flag.ParseToInt() == 3)
|
||||
ColourFlagBrush = (SolidColorBrush)Application.Current.Resources["FlagOrangeBrush"];
|
||||
else if (colour_flag.ParseToInt() == 4)
|
||||
ColourFlagBrush = (SolidColorBrush)Application.Current.Resources["FlagGreenBrush"];
|
||||
else if (colour_flag.ParseToInt() == 5)
|
||||
ColourFlagBrush = (SolidColorBrush)Application.Current.Resources["FlagBlueBrush"];
|
||||
else if (colour_flag.ParseToInt() == 6)
|
||||
ColourFlagBrush = (SolidColorBrush)Application.Current.Resources["FlagPurpleBrush"];
|
||||
else
|
||||
ColourFlagBrush = (SolidColorBrush)Application.Current.Resources["FlagGrayBrush"];
|
||||
}
|
||||
|
||||
public bool GetIsWaitBuy()
|
||||
{
|
||||
|
||||
@@ -137,11 +137,32 @@ namespace AllBase.Model.DBModel
|
||||
set { this.SetValue(x => x.ItemRefund, value); }
|
||||
}
|
||||
public string RefundAddressStr
|
||||
{
|
||||
get { return this.GetValue(x => x.RefundAddressStr); }
|
||||
set { this.SetValue(x => x.RefundAddressStr, value); }
|
||||
}
|
||||
public void SetItemRefund()
|
||||
{
|
||||
get { return this.GetValue(x => x.RefundAddressStr); }
|
||||
set
|
||||
{
|
||||
this.SetValue(x => x.RefundAddressStr, value);
|
||||
|
||||
if (value.ParseToString().Length > 26)
|
||||
RefundAddressShortStr = string.Join("", value.ParseToString().Take(26)) + "…";
|
||||
else
|
||||
RefundAddressShortStr = value.ParseToString();
|
||||
|
||||
RefundAddressShortStrVisibility = RefundAddressShortStr.IsNullOrEmpty() ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
public string RefundAddressShortStr
|
||||
{
|
||||
get { return this.GetValue(x => x.RefundAddressShortStr); }
|
||||
set { this.SetValue(x => x.RefundAddressShortStr, value); }
|
||||
}
|
||||
public Visibility RefundAddressShortStrVisibility
|
||||
{
|
||||
get { return this.GetValue(x => x.RefundAddressShortStrVisibility); }
|
||||
set { this.SetValue(x => x.RefundAddressShortStrVisibility, value); }
|
||||
}
|
||||
|
||||
public void SetItemRefund()
|
||||
{
|
||||
if (ItemOrder?.refundItems?.Count == 1)
|
||||
ItemRefund = ItemOrder?.refundItems?.FirstOrDefault();
|
||||
@@ -234,7 +255,12 @@ namespace AllBase.Model.DBModel
|
||||
get { return this.GetValue(x => x.ItemTransitOrderWithVoid); }
|
||||
set { this.SetValue(x => x.ItemTransitOrderWithVoid, value); }
|
||||
}
|
||||
public List<oms_wei_external_procurement_after_sale_info> ItemTransitOrderAfterSales { get; set; } = new List<oms_wei_external_procurement_after_sale_info>();
|
||||
public Visibility ItemTransitOutOrderBuyerStrVisibility
|
||||
{
|
||||
get { return this.GetValue(x => x.ItemTransitOutOrderBuyerStrVisibility); }
|
||||
set { this.SetValue(x => x.ItemTransitOutOrderBuyerStrVisibility, value); }
|
||||
}
|
||||
public List<oms_wei_external_procurement_after_sale_info> ItemTransitOrderAfterSales { get; set; } = new List<oms_wei_external_procurement_after_sale_info>();
|
||||
public oms_wei_external_procurement_after_sale_info ItemTransitOrderAfterSale
|
||||
{
|
||||
get { return this.GetValue(x => x.ItemTransitOrderAfterSale); }
|
||||
@@ -533,9 +559,15 @@ namespace AllBase.Model.DBModel
|
||||
public string BuyerTransitWaybillStatusStr
|
||||
{
|
||||
get { return this.GetValue(x => x.BuyerTransitWaybillStatusStr); }
|
||||
set { this.SetValue(x => x.BuyerTransitWaybillStatusStr, value); }
|
||||
set { this.SetValue(x => x.BuyerTransitWaybillStatusStr, value); BuyerTransitWaybillStatusStrVisibility = value.IsNullOrEmpty() ? Visibility.Collapsed : Visibility.Visible; }
|
||||
}
|
||||
public void SetBuyerTransitWaybillStatusStr()
|
||||
public Visibility BuyerTransitWaybillStatusStrVisibility
|
||||
{
|
||||
get { return this.GetValue(x => x.BuyerTransitWaybillStatusStrVisibility); }
|
||||
set { this.SetValue(x => x.BuyerTransitWaybillStatusStrVisibility, value); }
|
||||
}
|
||||
|
||||
public void SetBuyerTransitWaybillStatusStr()
|
||||
{
|
||||
BuyerTransitWaybillStatusStr = "";
|
||||
|
||||
@@ -642,9 +674,15 @@ namespace AllBase.Model.DBModel
|
||||
public string WarehouseWaybillStatusStr
|
||||
{
|
||||
get { return this.GetValue(x => x.WarehouseWaybillStatusStr); }
|
||||
set { this.SetValue(x => x.WarehouseWaybillStatusStr, value); }
|
||||
set { this.SetValue(x => x.WarehouseWaybillStatusStr, value); WarehouseWaybillStatusStrVisibility = value.IsNullOrEmpty() ? Visibility.Collapsed : Visibility.Visible; }
|
||||
}
|
||||
public void SetWarehouseWaybillStatusStr()
|
||||
public Visibility WarehouseWaybillStatusStrVisibility
|
||||
{
|
||||
get { return this.GetValue(x => x.WarehouseWaybillStatusStrVisibility); }
|
||||
set { this.SetValue(x => x.WarehouseWaybillStatusStrVisibility, value); }
|
||||
}
|
||||
|
||||
public void SetWarehouseWaybillStatusStr()
|
||||
{
|
||||
if (order_id == "3737682230178873344")
|
||||
{
|
||||
@@ -763,7 +801,12 @@ namespace AllBase.Model.DBModel
|
||||
public string TransitRefundVoidStatusStr
|
||||
{
|
||||
get { return this.GetValue(x => x.TransitRefundVoidStatusStr); }
|
||||
set { this.SetValue(x => x.TransitRefundVoidStatusStr, value); }
|
||||
set { this.SetValue(x => x.TransitRefundVoidStatusStr, value); TransitRefundVoidStatusStrVisibility = string.IsNullOrWhiteSpace(value) ? Visibility.Collapsed : Visibility.Visible; }
|
||||
}
|
||||
public Visibility TransitRefundVoidStatusStrVisibility
|
||||
{
|
||||
get { return this.GetValue(x => x.TransitRefundVoidStatusStrVisibility); }
|
||||
set { this.SetValue(x => x.TransitRefundVoidStatusStrVisibility, value); }
|
||||
}
|
||||
public void SetTransitRefundStatusStr()
|
||||
{
|
||||
@@ -803,6 +846,8 @@ namespace AllBase.Model.DBModel
|
||||
// return "中转作废失败";
|
||||
if (ItemTransitOrderWithVoid?.order_void_status == 1)
|
||||
TransitRefundVoidStatusStr = "中转已作废";
|
||||
else
|
||||
TransitRefundVoidStatusStr = "";
|
||||
}
|
||||
|
||||
|
||||
@@ -1531,6 +1576,15 @@ namespace AllBase.Model.DBModel
|
||||
SetOutOrderTimeQualifiedStr();
|
||||
CalcOrderPrice();
|
||||
SetOrderItemStatusAndColor();
|
||||
|
||||
if (this.ItemTransitOrders != null)
|
||||
{
|
||||
foreach (var tOrder in this.ItemTransitOrders)
|
||||
{
|
||||
tOrder.SetOutOrderBuyerStr();
|
||||
}
|
||||
ItemTransitOutOrderBuyerStrVisibility = (ItemTransitOrderWithVoid?.OutOrderBuyerStr).IsNullOrEmpty() ? Visibility.Collapsed : Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> 初始化物流明细信息 </summary>
|
||||
|
||||
@@ -50,12 +50,19 @@ namespace AllBase.Model.DBModel
|
||||
get { return this.GetValue(x => x.ReasonTextStrVisibility); }
|
||||
set { this.SetValue(x => x.ReasonTextStrVisibility, value); }
|
||||
}
|
||||
|
||||
|
||||
public Visibility AfterSaleOrderIdVisibility
|
||||
{
|
||||
get { return this.GetValue(x => x.ReasonTextStrVisibility); }
|
||||
set { this.SetValue(x => x.ReasonTextStrVisibility, value); }
|
||||
}
|
||||
|
||||
public long id { get; set; }
|
||||
public long? shop_id { get; set; }
|
||||
public string after_sale_order_id { get; set; }
|
||||
public string after_sale_order_id
|
||||
{
|
||||
get { return this.GetValue(x => x.after_sale_order_id); }
|
||||
set { this.SetValue(x => x.after_sale_order_id, value); ReasonTextStrVisibility = value.IsNullOrEmpty() ? Visibility.Collapsed : Visibility.Visible; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 售后单当前状态,参考:
|
||||
/// USER_CANCELD 用户取消申请
|
||||
|
||||
Reference in new issue
Block a user