拍单信息优化 异常单逻辑优化,异常单直拍(50%)

This commit is contained in:
wule committed 2026-07-28 21:09:49 +08:00
1 parent e00209cb24
commit ac0430f3f7
25 files changed
+1584 -399

No files matched your search

+2
View File
@@ -8,6 +8,8 @@
<ResourceDictionary> <ResourceDictionary>
<converters:HasValueToVisibilityConverter x:Key="hasValueToVisibilityConverter" /> <converters:HasValueToVisibilityConverter x:Key="hasValueToVisibilityConverter" />
<converters:HasTextToVisibilityConverter x:Key="HasTextVisibility"/> <converters:HasTextToVisibilityConverter x:Key="HasTextVisibility"/>
<converters:TextEllipsisConverter x:Key="TextEllipsisConverter"/>
<converters:TextEllipsisConverter26 x:Key="TextEllipsisConverter26"/>
<converters:NotHasTextToVisibilityConverter x:Key="NotHasTextVisibility"/> <converters:NotHasTextToVisibilityConverter x:Key="NotHasTextVisibility"/>
<converters:VisibleToVisibilityConverter x:Key="visibleToVisibilityConverter"/> <converters:VisibleToVisibilityConverter x:Key="visibleToVisibilityConverter"/>
<converters:ImageUrlToBitmapImageConverter x:Key="ImageUrlToBitmapImage"/> <converters:ImageUrlToBitmapImageConverter x:Key="ImageUrlToBitmapImage"/>
+4 -4
View File
@@ -57,7 +57,7 @@ namespace _29WxOrderWpf
#region 贴牌 #region 贴牌
//本地缓存文件 //本地缓存文件
string IgPakFile = "locales/ig.pak";//贴牌客服端码 string IgPakFile = "locales/ig.pak";//贴牌客服端码
string OenVersionFile = "locales/igv.pak";//贴牌资源配置版本 string OemVersionFile = "locales/igv.pak";//贴牌资源配置版本
string IaPakFile = "locales/ia.pak";//logo string IaPakFile = "locales/ia.pak";//logo
//string IbPakFile = "locales/ib.pak";//ico //string IbPakFile = "locales/ib.pak";//ico
string IcPakFile = "locales/ic.pak";//功能配置 string IcPakFile = "locales/ic.pak";//功能配置
@@ -98,7 +98,7 @@ namespace _29WxOrderWpf
} }
// 待后续完善 // 待后续完善
OenMechanism(IgPakFile, OenVersionFile, IaPakFile, LogoPakFile, IcPakFile); OemMechanism(IgPakFile, OemVersionFile, IaPakFile, LogoPakFile, IcPakFile);
} }
#endregion #endregion
@@ -193,14 +193,14 @@ namespace _29WxOrderWpf
} }
/// <summary> /// <summary>
/// Oen贴牌机制 /// Oem贴牌机制
/// </summary> /// </summary>
/// <param name="sIgPakFile">贴牌商客户端码文件</param> /// <param name="sIgPakFile">贴牌商客户端码文件</param>
/// <param name="sOenVersionFile">贴牌配置版本号文件</param> /// <param name="sOenVersionFile">贴牌配置版本号文件</param>
/// <param name="sIaPakFile">ico本地缓存文件</param> /// <param name="sIaPakFile">ico本地缓存文件</param>
/// <param name="sIbPakFile">logo本地缓存文件</param> /// <param name="sIbPakFile">logo本地缓存文件</param>
/// <param name="sIcPakFile">贴牌配置本地缓存文件</param> /// <param name="sIcPakFile">贴牌配置本地缓存文件</param>
private void OenMechanism(string IgPakFile, string OenVersionFile, string IaPakFile, string logoBitmapFile, string IcPakFile) private void OemMechanism(string IgPakFile, string OemVersionFile, string IaPakFile, string logoBitmapFile, string IcPakFile)
{ {
return; return;
+18 -3
View File
@@ -1,4 +1,5 @@
using System; using AllBase.Helper;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
@@ -109,8 +110,21 @@ namespace _29WxOrderWpf.BaseWindows
DialogResult = false; DialogResult = false;
} }
public static void ShowAnimateMessage(string message) public static void ShowAnimateMessage(string message, string type = "Msg", int DurationSeconds = 1)
{ {
MainWindow.Instance.Dispatcher.Invoke(new Action(() =>
{
if (type.ToLower() == "msg")
{
MainWindow.Instance.borderMessage.BorderBrush = Application.Current.Resources["pageColorBrush"] as SolidColorBrush;
MainWindow.Instance.tbMessage.Foreground = Application.Current.Resources["pageColorBrush"] as SolidColorBrush;
}
if (type.ToLower() == "error")
{
MainWindow.Instance.borderMessage.BorderBrush = Application.Current.Resources["PageWarningBrush"] as SolidColorBrush;
MainWindow.Instance.tbMessage.Foreground = Application.Current.Resources["PageWarningBrush"] as SolidColorBrush;
}
MainWindow.Instance.tbMessage.Text = message; MainWindow.Instance.tbMessage.Text = message;
MainWindow.Instance.borderMessage.Visibility = Visibility.Visible; MainWindow.Instance.borderMessage.Visibility = Visibility.Visible;
// 创建Storyboard并添加动画 // 创建Storyboard并添加动画
@@ -127,7 +141,7 @@ namespace _29WxOrderWpf.BaseWindows
DoubleAnimation fadeInAnimation2 = new DoubleAnimation DoubleAnimation fadeInAnimation2 = new DoubleAnimation
{ {
BeginTime = new TimeSpan(0, 0, 1), BeginTime = new TimeSpan(0, 0, DurationSeconds),
From = 1, From = 1,
To = 0, To = 0,
Duration = new Duration(TimeSpan.FromSeconds(0.2)) // 持续时间2秒 Duration = new Duration(TimeSpan.FromSeconds(0.2)) // 持续时间2秒
@@ -137,6 +151,7 @@ namespace _29WxOrderWpf.BaseWindows
storyboard.Children.Add(fadeInAnimation2); storyboard.Children.Add(fadeInAnimation2);
// 开始动画 // 开始动画
storyboard.Begin(); storyboard.Begin();
}));
} }
} }
@@ -35,4 +35,38 @@ namespace _29WxOrderWpf.Converters
throw new NotImplementedException(); // 单向绑定可不实现 throw new NotImplementedException(); // 单向绑定可不实现
} }
} }
/// <summary>
/// 超出19个字的文本显示省略号
/// </summary>
public class TextEllipsisConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value.ParseToString().Length > 19)
return string.Join("", value.ParseToString().Take(19)) + "…";
return value.ParseToString();
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException(); // 单向绑定可不实现
}
}
/// <summary>
/// 超出26个字的文本显示省略号
/// </summary>
public class TextEllipsisConverter26 : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value.ParseToString().Length > 26)
return string.Join("", value.ParseToString().Take(26)) + "…";
return value.ParseToString();
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException(); // 单向绑定可不实现
}
}
} }
@@ -50,7 +50,7 @@
<RowDefinition></RowDefinition> <RowDefinition></RowDefinition>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Button Style="{StaticResource BasePageButtonStyle}" Margin="0,0,0,-10" Content="▼" VerticalContentAlignment="top" Width="60" Height="25" x:Name="btnHide" Click="btnHide_Click"/> <Button Style="{StaticResource BasePageButtonStyle}" Margin="0,0,0,-10" Content="▼" Padding="0,2,0,0" VerticalContentAlignment="top" Width="60" Height="25" x:Name="btnHide" Click="btnHide_Click"/>
<Grid x:Name="gridTable" Grid.Row="1" VerticalAlignment="Bottom" Visibility="Visible" Height="330" Margin="2" Background="White"> <Grid x:Name="gridTable" Grid.Row="1" VerticalAlignment="Bottom" Visibility="Visible" Height="330" Margin="2" Background="White">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="40"></RowDefinition> <RowDefinition Height="40"></RowDefinition>
@@ -492,7 +492,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
catch catch
{ {
} }
var orderItems = GetOrderItemInfo(order_ids); var orderItems = OrderListCtrl.GetOrderItemInfo(order_ids);
foreach (var orderItem in orderItems) foreach (var orderItem in orderItems)
{ {
var order = orders.FirstOrDefault(o => o.order_id == orderItem.order_id); var order = orders.FirstOrDefault(o => o.order_id == orderItem.order_id);
@@ -502,64 +502,34 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
return orders; return orders;
} }
/// <summary>
/// 读取订单详情信息 public static List<order_pdd_buyer_after_sale> GetOrderAfterSales(string order_ids)
/// </summary>
/// <param name="order_ids"></param>
/// <returns></returns>
List<oms_wei_order_item_info> GetOrderItemInfo(string order_ids)
{ {
Thread.Sleep(100); if (order_ids.IsNullOrEmpty())
var url1 = BaseClass.Build29WxObjString("order/get_erp_order_item_list"); return new List<order_pdd_buyer_after_sale>();
var data1 = UserLogin.GetSignaturex();
data1 += "&erp_order_id_in=" + order_ids; var url6 = BaseClass.Build29WxObjString("order/wx_get_buyer_after_sale_list");
data1 += "&page_size=" + 1000; var data6 = UserLogin.GetSignaturex();
var html1 = GetHtml.PostUtf8(url1, data1); data6 += "&wx_order_id_in=" + order_ids;
if (string.IsNullOrEmpty(html1) || !html1.Contains("\"code\":200")) var html6 = GetHtml.PostUtf8(url6, data6);
html1 = GetHtml.PostUtf8(url1, data1); if (string.IsNullOrEmpty(html6) || !html6.Contains("\"code\":200"))
if (string.IsNullOrEmpty(html1) || !html1.Contains("\"code\":200")) html6 = GetHtml.PostUtf8(url6, data6);
if (string.IsNullOrEmpty(html6) || !html6.Contains("\"code\":200"))
{ {
//BaseMsgWindow.ShowError("订单读取失败 " + BaseRegex.GetStringJson(ref html, "msg")); BaseMsgWindow.ShowAnimateMessage("订单读取失败(买手售后) " + BaseRegex.GetStringJson(ref html6, "msg"), "Error", 5);
//break;
} }
List<oms_wei_order_item_info> orderItems = new List<oms_wei_order_item_info>(); List<order_pdd_buyer_after_sale> pddBuyerAfterSales = new List<order_pdd_buyer_after_sale>();
try try
{ {
orderItems = JsonHelper.DeserializeJsonToList<oms_wei_order_item_info>(JObject.Parse(html1)["data"].ParseToString()); pddBuyerAfterSales = JsonHelper.DeserializeJsonToList<order_pdd_buyer_after_sale>(JObject.Parse(html6)["data"].ParseToString())
if (orderItems == null) .OrderByDescending(p => p.TransitCreateTime).ToList();
orderItems = new List<oms_wei_order_item_info>();
} }
catch catch { }
{ return pddBuyerAfterSales;
}
return orderItems;
} }
/// <summary> //void UpdateOrderStatus(PddBuyerOrderLiteInfo pdd_order, oms_wei_order_item_info wx_order_item, oms_wei_refund_info wx_refund_item, oms_wei_external_procurement_log_info wx_transit_order)
/// 读取售后单 void UpdateOrderStatus(PddBuyerOrderLiteInfo pdd_order, oms_wei_order_item_info wx_order_item, oms_wei_external_procurement_log_info wx_transit_order)
/// </summary>
/// <param name="order_ids"></param>
/// <returns></returns>
List<oms_wei_refund_info> GetOrderRefundInfo(string order_ids)
{
Thread.Sleep(100);
var url2 = BaseClass.Build29WxObjString("order/get_erp_refund_list");
var data2 = UserLogin.GetSignaturex();
data2 += "&erp_order_id_in=" + order_ids;
var html2 = GetHtml.PostUtf8(url2, data2);
if (string.IsNullOrEmpty(html2) || !html2.Contains("\"code\":200"))
html2 = GetHtml.PostUtf8(url2, data2);
if (string.IsNullOrEmpty(html2) || !html2.Contains("\"code\":200"))
{
//BaseMsgWindow.ShowError(MainWindow.Instance, "订单读取失败 " + BaseRegex.GetStringJson(ref html, "msg"));
//break;
}
List<oms_wei_refund_info> refunds = new List<oms_wei_refund_info>();
try { refunds = JsonHelper.DeserializeJsonToList<oms_wei_refund_info>(JObject.Parse(html2)["data"].ParseToString()); } catch { }
return refunds;
}
void UpdateOrderStatus(PddBuyerOrderLiteInfo pdd_order, oms_wei_order_item_info wx_order_item, oms_wei_refund_info wx_refund_item, oms_wei_external_procurement_log_info wx_transit_order)
{ {
pdd_order.ShopOrderIdStr = wx_order_item?.order_id ?? wx_transit_order?.order_no; pdd_order.ShopOrderIdStr = wx_order_item?.order_id ?? wx_transit_order?.order_no;
pdd_order.ShopOrderSkuIdStr = wx_order_item?.sku_id ?? wx_transit_order?.order_sku_id; pdd_order.ShopOrderSkuIdStr = wx_order_item?.sku_id ?? wx_transit_order?.order_sku_id;
@@ -594,7 +564,8 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
} }
void UpdateAfterSaleStatus(PddBuyerAfterSaleLiteInfo pdd_afterSale, oms_wei_order_item_info wx_order_item, oms_wei_refund_info wx_refund_item, oms_wei_external_procurement_log_info wx_transit_order) //void UpdateAfterSaleStatus(PddBuyerAfterSaleLiteInfo pdd_afterSale, oms_wei_order_item_info wx_order_item, oms_wei_refund_info wx_refund_item, oms_wei_external_procurement_log_info wx_transit_order)
void UpdateAfterSaleStatus(PddBuyerAfterSaleLiteInfo pdd_afterSale, oms_wei_order_item_info wx_order_item, oms_wei_external_procurement_log_info wx_transit_order, order_pdd_buyer_after_sale buyer_after_sale)
{ {
pdd_afterSale.ShopOrderIdStr = wx_order_item?.order_id ?? wx_transit_order?.order_no; pdd_afterSale.ShopOrderIdStr = wx_order_item?.order_id ?? wx_transit_order?.order_no;
pdd_afterSale.ShopOrderSkuIdStr = wx_order_item?.sku_id ?? wx_transit_order?.order_sku_id; pdd_afterSale.ShopOrderSkuIdStr = wx_order_item?.sku_id ?? wx_transit_order?.order_sku_id;
@@ -621,6 +592,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
pdd_afterSale.sendStatus = (pdd_afterSale.TransitOrderStatus + " " + pdd_afterSale.ShopOrderRefundStr).Trim(); pdd_afterSale.sendStatus = (pdd_afterSale.TransitOrderStatus + " " + pdd_afterSale.ShopOrderRefundStr).Trim();
pdd_afterSale.TransitCreateTime = wx_transit_order?.created_time ?? DateTime.MinValue; pdd_afterSale.TransitCreateTime = wx_transit_order?.created_time ?? DateTime.MinValue;
pdd_afterSale.TransitPickupTime = wx_transit_order?.pickup_time ?? DateTime.MaxValue.AddMonths(-1); pdd_afterSale.TransitPickupTime = wx_transit_order?.pickup_time ?? DateTime.MaxValue.AddMonths(-1);
pdd_afterSale.AfterSaleAddress = buyer_after_sale?.afterSaleAddress;
} }
@@ -677,7 +649,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
orderItem.ItemTransitOrders.AddRange(transitOrderList.Where(t => t.order_no == orderItem.order_id)); orderItem.ItemTransitOrders.AddRange(transitOrderList.Where(t => t.order_no == orderItem.order_id));
} }
} }
var refunds = GetOrderRefundInfo(order_ids); //var refunds = GetOrderRefundInfo(order_ids);
foreach (PddBuyerOrderLiteInfo o in list) foreach (PddBuyerOrderLiteInfo o in list)
{ {
@@ -690,9 +662,9 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
{ {
var shopOrder = orders.FirstOrDefault(o1 => o1.order_id == transit_item.order_no); var shopOrder = orders.FirstOrDefault(o1 => o1.order_id == transit_item.order_no);
var order_item = shopOrder?.orderItems.FirstOrDefault(oi => oi.ItemTransitOrders.Any(t1 => t1.out_order_no == o.order_sn)); var order_item = shopOrder?.orderItems.FirstOrDefault(oi => oi.ItemTransitOrders.Any(t1 => t1.out_order_no == o.order_sn));
var refund_item = refunds.FirstOrDefault(ri => ri.order_id == order_item?.order_id) ?? order_item?.ItemRefund; //var refund_item = refunds.FirstOrDefault(ri => ri.order_id == order_item?.order_id) ?? order_item?.ItemRefund;
UpdateOrderStatus(o, order_item, refund_item, transit_item); UpdateOrderStatus(o, order_item, transit_item);
} }
PddBuyerOrderLiteInfo order = null; PddBuyerOrderLiteInfo order = null;
@@ -843,7 +815,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
pre_allocated_order_no = order.PreAllocatedOrderNoStr.ParseToInt(), pre_allocated_order_no = order.PreAllocatedOrderNoStr.ParseToInt(),
tracking_number = order.tracking_number, tracking_number = order.tracking_number,
TransitCreateTime = order.TransitCreateTime, TransitCreateTime = order.TransitCreateTime,
TransitPickupTime = order.TransitPickupTime, //TransitPickupTime = order.TransitPickupTime,
wx_order_id = order.ShopOrderIdStr, wx_order_id = order.ShopOrderIdStr,
wx_sku_id = order.ShopOrderSkuIdStr, wx_sku_id = order.ShopOrderSkuIdStr,
}; };
@@ -860,7 +832,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
data3 += "&pre_allocated_order_no=" + pddBuyerOrder.pre_allocated_order_no; data3 += "&pre_allocated_order_no=" + pddBuyerOrder.pre_allocated_order_no;
data3 += "&tracking_number=" + pddBuyerOrder.tracking_number; data3 += "&tracking_number=" + pddBuyerOrder.tracking_number;
data3 += "&TransitCreateTime=" + pddBuyerOrder.TransitCreateTime.ToString("yyyy-MM-dd HH:mm:ss"); data3 += "&TransitCreateTime=" + pddBuyerOrder.TransitCreateTime.ToString("yyyy-MM-dd HH:mm:ss");
data3 += "&TransitPickupTime=" + pddBuyerOrder.TransitPickupTime.ToString("yyyy-MM-dd HH:mm:ss"); //data3 += "&TransitPickupTime=" + pddBuyerOrder.TransitPickupTime.ToString("yyyy-MM-dd HH:mm:ss");
data3 += "&wx_order_id=" + pddBuyerOrder.wx_order_id; data3 += "&wx_order_id=" + pddBuyerOrder.wx_order_id;
data3 += "&wx_sku_id=" + pddBuyerOrder.wx_sku_id; data3 += "&wx_sku_id=" + pddBuyerOrder.wx_sku_id;
var html3 = GetHtml.PostUtf8(url3, data3); var html3 = GetHtml.PostUtf8(url3, data3);
@@ -919,7 +891,10 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
orderItem.ItemTransitOrders.AddRange(transitOrderList.Where(t => t.order_no == orderItem.order_id)); orderItem.ItemTransitOrders.AddRange(transitOrderList.Where(t => t.order_no == orderItem.order_id));
} }
} }
var refunds = GetOrderRefundInfo(order_ids); //var refunds = GetOrderRefundInfo(order_ids);
var buyerAfterSales = GetOrderAfterSales(order_ids);
// 实时更新订单,暂时作废
//MainWindow.Instance.orderListCtrl.GetOrder(order_ids); //MainWindow.Instance.orderListCtrl.GetOrder(order_ids);
foreach (var af in list) foreach (var af in list)
@@ -936,17 +911,20 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
var transitItem = transitOrderList.FirstOrDefault(t1 => t1.out_order_no == af.orderSn); var transitItem = transitOrderList.FirstOrDefault(t1 => t1.out_order_no == af.orderSn);
oms_wei_order_info shopOrder = null; oms_wei_order_info shopOrder = null;
oms_wei_order_item_info orderItem = null; oms_wei_order_item_info orderItem = null;
oms_wei_refund_info refundItem = null; //oms_wei_refund_info refundItem = null;
order_pdd_buyer_after_sale buyerAfterSale = null;
if (transitItem != null) if (transitItem != null)
{ {
shopOrder = orders.FirstOrDefault(o1 => o1.order_id == transitItem.order_no); shopOrder = orders.FirstOrDefault(o1 => o1.order_id == transitItem.order_no);
orderItem = shopOrder?.orderItems.FirstOrDefault(oi => oi.ItemTransitOrders.Any(t1 => t1.out_order_no == af.orderSn)); orderItem = shopOrder?.orderItems.FirstOrDefault(oi => oi.ItemTransitOrders.Any(t1 => t1.out_order_no == af.orderSn));
refundItem = refunds.FirstOrDefault(ri => ri.order_id == orderItem?.order_id) ?? orderItem?.ItemRefund; buyerAfterSale = buyerAfterSales.FirstOrDefault(ba => ba.orderSn == transitItem.out_order_no && !ba.afterSaleAddress.IsNullOrEmpty());
//refundItem = refunds.FirstOrDefault(ri => ri.order_id == orderItem?.order_id) ?? orderItem?.ItemRefund;
//shopOrder = GlobalConfig.lstOrder.FirstOrDefault(o1 => o1.order_id == transitItem.order_no); //shopOrder = GlobalConfig.lstOrder.FirstOrDefault(o1 => o1.order_id == transitItem.order_no);
//orderItem = shopOrder?.orderItems.FirstOrDefault(oi => oi.ItemTransitOrders.Any(t1 => t1.out_order_no == af.orderSn)); //orderItem = shopOrder?.orderItems.FirstOrDefault(oi => oi.ItemTransitOrders.Any(t1 => t1.out_order_no == af.orderSn));
//refundItem = shopOrder?.refundItems.FirstOrDefault(ri => ri.order_id == orderItem?.order_id) ?? orderItem?.ItemRefund; //refundItem = shopOrder?.refundItems.FirstOrDefault(ri => ri.order_id == orderItem?.order_id) ?? orderItem?.ItemRefund;
UpdateAfterSaleStatus(af, orderItem, refundItem, transitItem); UpdateAfterSaleStatus(af, orderItem, transitItem, buyerAfterSale);
} }
bool isUpdate = false; bool isUpdate = false;
@@ -995,6 +973,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
afterSale.WxOrderVoidStatus = af.WxOrderVoidStatus; afterSale.WxOrderVoidStatus = af.WxOrderVoidStatus;
afterSale.PreAllocatedOrderNoStr = af.PreAllocatedOrderNoStr; afterSale.PreAllocatedOrderNoStr = af.PreAllocatedOrderNoStr;
afterSale.ShopOrderRefundStr = af.ShopOrderRefundStr; afterSale.ShopOrderRefundStr = af.ShopOrderRefundStr;
afterSale.AfterSaleAddress = af.AfterSaleAddress;
//afterSale.wxRefundStatus = af.wxRefundStatus; //afterSale.wxRefundStatus = af.wxRefundStatus;
// 移除,添加 自动更新列表显示 // 移除,添加 自动更新列表显示
@@ -1063,6 +1042,11 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
} }
// 如果中转仓表买手售后状态不等于买手售后单售后,更新仓库买手售后状态 // 如果中转仓表买手售后状态不等于买手售后单售后,更新仓库买手售后状态
else if (afterSale.TransitBuyerOrderRefundStatus != "买手退款成功" && afterSale.TransitBuyerOrderRefundStatus != afterSale.AfterSaleStatusStr) else if (afterSale.TransitBuyerOrderRefundStatus != "买手退款成功" && afterSale.TransitBuyerOrderRefundStatus != afterSale.AfterSaleStatusStr)
{
if (afterSale.AfterSaleStatusStr == "退款失败" && this.lstPddBuyerAfterSaleInfoLite.Any(a => a.orderSn == afterSale.orderSn && a.AfterSaleStatusStr != afterSale.AfterSaleStatusStr))
{
}
else
{ {
//if (!afterSale.AfterSaleStatusStr.Contains("关闭") && !afterSale.AfterSaleStatusStr.Contains("撤销") && !afterSale.AfterSaleStatusStr.Contains("失败")) //if (!afterSale.AfterSaleStatusStr.Contains("关闭") && !afterSale.AfterSaleStatusStr.Contains("撤销") && !afterSale.AfterSaleStatusStr.Contains("失败"))
var orderTmp = new PddBuyerOrderLiteInfo() { ShopOrderIdStr = afterSale.ShopOrderIdStr, order_sn = afterSale.orderSn }; var orderTmp = new PddBuyerOrderLiteInfo() { ShopOrderIdStr = afterSale.ShopOrderIdStr, order_sn = afterSale.orderSn };
@@ -1078,6 +1062,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
} }
} }
} }
}
// 买手已退款 // 买手已退款
if (afterSale.TransitBuyerOrderRefundStatus == "买手退款成功") if (afterSale.TransitBuyerOrderRefundStatus == "买手退款成功")
{ {
@@ -1100,6 +1085,55 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
} }
} }
} }
if (!string.IsNullOrEmpty(afterSale?.ShopOrderIdStr))
{
// 待用户发货 获取地址
if(string.IsNullOrWhiteSpace(afterSale.AfterSaleAddress))
{
}
}
// 记录到买手退货表
if (!string.IsNullOrEmpty(afterSale?.ShopOrderIdStr))
{
// 买手退款单状态记录到数据库
order_pdd_buyer_after_sale pddBuyerAfterSale = new order_pdd_buyer_after_sale()
{
buyerId = afterSale.buyerId,
buyerName = afterSale.buyerName,
orderAmount = (afterSale.listItemAmountVO?.orderAmount).ParseToInt(),
orderSn = afterSale.orderSn,
afterSalesId = afterSale.afterSalesId.ParseToString(),
orderDate = afterSale.orderDate,
pre_allocated_order_no = afterSale.PreAllocatedOrderNoStr.ParseToInt(),
TransitCreateTime = afterSale.TransitCreateTime,
//TransitPickupTime = order.TransitPickupTime,
wx_order_id = afterSale.ShopOrderIdStr,
wx_sku_id = afterSale.ShopOrderSkuIdStr,
refundAmount = afterSale.listItemAmountVO?.refundAmount,
statusText = afterSale.listItemStatusVO.statusText,
};
var url3 = BaseClass.Build29WxObjString("order/wx_add_mdy_buyer_after_sale");
var data3 = UserLogin.GetSignaturex();
data3 += "&wx_order_id=" + pddBuyerAfterSale.wx_order_id;
data3 += "&wx_sku_id=" + pddBuyerAfterSale.wx_sku_id;
data3 += "&TransitCreateTime=" + pddBuyerAfterSale.TransitCreateTime.ToString("yyyy-MM-dd HH:mm:ss");
data3 += "&pre_allocated_order_no=" + pddBuyerAfterSale.pre_allocated_order_no;
data3 += "&buyerId=" + pddBuyerAfterSale.buyerId;
data3 += "&buyerName=" + pddBuyerAfterSale.buyerName;
data3 += "&orderAmount=" + pddBuyerAfterSale.orderAmount;
data3 += "&orderSn=" + pddBuyerAfterSale.orderSn;
data3 += "&afterSalesId=" + pddBuyerAfterSale.afterSalesId;
data3 += "&orderDate=" + pddBuyerAfterSale.orderDate;
//data3 += "&TransitPickupTime=" + pddBuyerOrder.TransitPickupTime.ToString("yyyy-MM-dd HH:mm:ss");
data3 += "&refundAmount=" + pddBuyerAfterSale.refundAmount;
data3 += "&statusText=" + pddBuyerAfterSale.statusText;
var html3 = GetHtml.PostUtf8(url3, data3);
if (string.IsNullOrEmpty(html3) || !html3.Contains("\"code\":200"))
html3 = GetHtml.PostUtf8(url3, data3);
}
} }
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_buyer_after_sale_list", lstPddBuyerAfterSaleInfoLite); NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_buyer_after_sale_list", lstPddBuyerAfterSaleInfoLite);
} }
@@ -1450,7 +1484,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
orderItem.ItemTransitOrders.AddRange(transitOrderList.Where(t => t.order_no == orderItem.order_id)); orderItem.ItemTransitOrders.AddRange(transitOrderList.Where(t => t.order_no == orderItem.order_id));
} }
} }
var refunds = GetOrderRefundInfo(order_ids); //var refunds = GetOrderRefundInfo(order_ids);
// 查找店铺订单并更新店铺订单状态 // 查找店铺订单并更新店铺订单状态
//var ShopOrder = GlobalConfig.lstOrder.FirstOrDefault(o1 => o1.orderItems.Any(i1 => i1.ItemTransitOrders.Any(t1 => t1.out_order_no == buyerOrder.order_sn))); //var ShopOrder = GlobalConfig.lstOrder.FirstOrDefault(o1 => o1.orderItems.Any(i1 => i1.ItemTransitOrders.Any(t1 => t1.out_order_no == buyerOrder.order_sn)));
@@ -1461,9 +1495,9 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
{ {
var shopOrder = orders.FirstOrDefault(o => o.order_id == transit_item.order_no); var shopOrder = orders.FirstOrDefault(o => o.order_id == transit_item.order_no);
var order_item = shopOrder.orderItems.FirstOrDefault(oi => oi.ItemTransitOrders.Any(t1 => t1.out_order_no == buyerOrder.order_sn)); var order_item = shopOrder.orderItems.FirstOrDefault(oi => oi.ItemTransitOrders.Any(t1 => t1.out_order_no == buyerOrder.order_sn));
var refund_item = refunds.FirstOrDefault(ri => ri.order_id == order_item.order_id) ?? order_item?.ItemRefund; //var refund_item = refunds.FirstOrDefault(ri => ri.order_id == order_item.order_id) ?? order_item?.ItemRefund;
UpdateOrderStatus(buyerOrder, order_item, refund_item, transit_item); UpdateOrderStatus(buyerOrder, order_item, transit_item);
} }
//SendOrderE57(order); //SendOrderE57(order);
@@ -1814,11 +1848,42 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
return afterSaleRst; return afterSaleRst;
} }
public static string SimPddAfterSaleWithReturnGoods(BuyerLoginInfo buyer, PddBuyerOrderLiteInfo order, order_pdd_buyer_after_sale pddBuyerAfterSale = null)
{
var rst = YkdBuyerOrder.GetInitAfterSale(buyer, order.order_sn);
//<script>window.rawData={"store":{"errorRedirectUrl":"\u002F","abMap":{"allowPerItemAs":false,"allowPercentAs":true,"isSpringOn":false,"applyPlatformJoinText":false,"newResendEntrance":true,"newExchangeEntrance":true,"shippingTicketOcr":true,"applyAfterSalesChoose":true,"inSpringFestival":false,"openSpringFestival":false,"shippingTipsView":true,"expressRejectShowContact":true,"newApplyPage":true,"newApplyDetailPage":false,"newFeeDetailGray":true,"qualityReasonNoticeProof":true,"newQualityReasonNoticeProof":true,"freeNoCouponOrder":false,"userShippingStatusReject":false,"applyAmountDisplayAsCompensateAmount":false,"compensateAmountChoosePopUp":false,"maintainDescOptimize":true},"goodsInfo":{"skuId":1884196560652,"catId1":6398,"goodsId":936888997232,"goodsName":"【三只松鼠新疆灰枣】免洗红枣150g新疆特产枣子干货休闲零食","goodsPrice":1350,"goodsNumber":1,"goodsSpec":"新疆灰枣150g*5袋","goodsType":1,"goodsImage":"https:\u002F\u002Fimg.pddpic.com\u002Fmms-goods-image\u002F2026-04-11\u002F336d9a71-d957-4121-a84b-f70f084226c9.jpeg"},"reasonData":{"map1":[{"type":220003,"desc":"重量\u002F数量\u002F大小等描述不符","subDesc":null,"url":"https:\u002F\u002Ffunimg.pddpic.com\u002F200702_Food_and_Health_Category\u002F21_Weight_quantity_size_mismatch.png","reasonType":2200},{"type":220005,"desc":"图片\u002F品种\u002F口味\u002F标签等描述不符","subDesc":null,"url":"https:\u002F\u002Ffunimg.pddpic.com\u002F200702_Food_and_Health_Category\u002F23_Picture_mismatch.png","reasonType":2200},{"type":220001,"desc":"包装\u002F商品破损","subDesc":null,"url":"https:\u002F\u002Ffunimg.pddpic.com\u002F200702_Food_and_Health_Category\u002F28_Damaged_packaging9.png","reasonType":2100},{"type":220004,"desc":"少件\u002F漏发","subDesc":null,"url":"https:\u002F\u002Ffunimg.pddpic.com\u002F20_Quantity_mismatch.png","reasonType":2400},{"type":294,"desc":"商品变质\u002F发霉\u002F有异物","subDesc":null,"url":"https:\u002F\u002Ffunimg.pddpic.com\u002F200702_Food_and_Health_Category\u002F25_Spoiled_food.png","reasonType":2100},{"type":292,"desc":"生产日期\u002F保质期与商品描述不符","subDesc":null,"url":"https:\u002F\u002Ffunimg.pddpic.com\u002F22_Expired_food.png","reasonType":2200},{"type":81,"desc":"质量问题","subDesc":null,"url":null,"reasonType":2100},{"type":83,"desc":"商家发错货","subDesc":null,"url":"https:\u002F\u002Ffunimg.pddpic.com\u002F30_Inconsistent_product.png","reasonType":2200},{"type":262,"desc":"空包裹","subDesc":null,"url":null,"reasonType":2400},{"type":86,"desc":"假冒品牌","subDesc":null,"url":null,"reasonType":2500},{"type":95,"desc":"其他原因","subDesc":null,"url":null,"reasonType":1200}],"map2":[{"type":197,"desc":"不想要了","subDesc":null,"url":null,"reasonType":1100},{"type":194,"desc":"快递无跟踪记录","subDesc":null,"url":null,"reasonType":2300},{"type":4008,"desc":"发货慢\u002F未按承诺时间发货","subDesc":null,"url":null,"reasonType":2300},{"type":220001,"desc":"包装\u002F商品破损","subDesc":null,"url":null,"reasonType":2100},{"type":220002,"desc":"未收到货\u002F签收地址错误","subDesc":null,"url":null,"reasonType":2300},{"type":207,"desc":"其他原因","subDesc":null,"url":null,"reasonType":1200}],"map3":[{"type":88,"desc":"不想要了","subDesc":null,"url":null,"reasonType":1100},{"type":220003,"desc":"重量\u002F数量\u002F大小等描述不符","subDesc":null,"url":"https:\u002F\u002Ffunimg.pddpic.com\u002F200702_Food_and_Health_Category\u002F21_Weight_quantity_size_mismatch.png","reasonType":2200},{"type":220005,"desc":"图片\u002F品种\u002F口味\u002F标签等描述不符","subDesc":null,"url":"https:\u002F\u002Ffunimg.pddpic.com\u002F200702_Food_and_Health_Category\u002F23_Picture_mismatch.png","reasonType":2200},{"type":220001,"desc":"包装\u002F商品破损","subDesc":null,"url":"https:\u002F\u002Ffunimg.pddpic.com\u002F200702_Food_and_Health_Category\u002F28_Damaged_packaging9.png","reasonType":2100},{"type":220004,"desc":"少件\u002F漏发","subDesc":null,"url":"https:\u002F\u002Ffunimg.pddpic.com\u002F20_Quantity_mismatch.png","reasonType":2400},{"type":294,"desc":"商品变质\u002F发霉\u002F有异物","subDesc":null,"url":"https:\u002F\u002Ffunimg.pddpic.com\u002F200702_Food_and_Health_Category\u002F25_Spoiled_food.png","reasonType":2100},{"type":292,"desc":"生产日期\u002F保质期与商品描述不符","subDesc":null,"url":"https:\u002F\u002Ffunimg.pddpic.com\u002F22_Expired_food.png","reasonType":2200},{"type":81,"desc":"质量问题","subDesc":null,"url":null,"reasonType":2100},{"type":83,"desc":"商家发错货","subDesc":null,"url":"https:\u002F\u002Ffunimg.pddpic.com\u002F30_Inconsistent_product.png","reasonType":2200},{"type":86,"desc":"假冒品牌","subDesc":null,"url":null,"reasonType":2500},{"type":95,"desc":"其他原因","subDesc":null,"url":null,"reasonType":1200}],"map4":[{"type":66,"desc":"不想要了","subDesc":null,"uLine truncated
var mobile = BaseRegex.GetStringJson(ref rst, "userReceivePhone");
var applyAmount = BaseRegex.GetIntJson(ref rst, "applyAmount");
var refundAmount = BaseRegex.GetIntJson(ref rst, "refundAmount");
var newMaxApplyAmount = BaseRegex.GetIntJson(ref rst, "newMaxApplyAmount");
var shippingStatus = BaseRegex.GetIntJson(ref rst, "shippingStatus");
var afterSalesId = BaseRegex.GetIntJson(ref rst, "afterSalesId");
if (shippingStatus == -1)
return "{\"success\":false,\"msg\":\"订单未付款,无法退货退款\"}";
if (shippingStatus == 0)
return "{\"success\":false,\"msg\":\"订单未付款,无法退货退款\"}";
if (applyAmount == 0) applyAmount = order.order_amount.ParseToInt();
if (refundAmount == 0) refundAmount = order.order_amount.ParseToInt();
if (newMaxApplyAmount == 0) newMaxApplyAmount = order.order_amount.ParseToInt();
if (string.IsNullOrEmpty(mobile))
{
return "{\"success\":false,\"msg\":\"退货信息获取失败,请检查买手是否掉线\"}";
}
if (pddBuyerAfterSale != null)
{
pddBuyerAfterSale.refundAmount = refundAmount;
}
Thread.Sleep(Randomx.GetId(1000, 2000));
var afterSaleRst = YkdBuyerOrder.SetOrderAfterSaleWithReturnGoods(buyer, mobile, order.order_sn, applyAmount, refundAmount, newMaxApplyAmount);
return afterSaleRst;
}
/// <summary> /// <summary>
/// 将处理的或读取到更新的售后返回服务端接口 /// 将处理的或读取到更新的售后返回服务端接口
/// </summary> /// </summary>
/// <param name="afterSale"></param> /// <param name="afterSale"></param>
public string SendTransitAfterSaleE57(PddBuyerOrderLiteInfo order, string refundStatus = "买手退款成功") public static string SendTransitAfterSaleE57(PddBuyerOrderLiteInfo order, string refundStatus = "买手退款成功")
{ {
string url2 = "https://po.e57.cn/prod-api/api/oms-api/external_procurement/purchase/refundStatus"; string url2 = "https://po.e57.cn/prod-api/api/oms-api/external_procurement/purchase/refundStatus";
var data = new JObject(); var data = new JObject();
@@ -1909,6 +1974,17 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
return rst; return rst;
} }
public static string GetAfterSaleAddress(BuyerLoginInfo buyer, string orderSn, string afterSalesId)
{
//https://mobile.yangkeduo.com/complaints_new_detail.html?after_sales_id=21892258236871&order_sn=260721-113109931520980&refer_page_name=order_detail&refer_page_id=10038_1785055821030_cmczxk3x91&refer_page_sn=10038
//&refer_page_name=order_detail&refer_page_id=10038_1785055821030_cmczxk3x91&refer_page_sn=10038
string url = "https://mobile.yangkeduo.com/complaints_new_detail.html?after_sales_id=" + afterSalesId + "&order_sn=" + orderSn;
var rst = HttpResponseYkdBLL.YangkeduoGetPageResponse(buyer, url);
return rst;
}
// 仅退款
public static string SetOrderAfterSale(BuyerLoginInfo buyer, string user_phone, string order_sn, int apply_amount, int refund_amount, int new_refund_amount) public static string SetOrderAfterSale(BuyerLoginInfo buyer, string user_phone, string order_sn, int apply_amount, int refund_amount, int new_refund_amount)
{ {
string url = "https://mobile.yangkeduo.com/proxy/api/after_sales/create?pdduid=" + buyer.buyer_id; string url = "https://mobile.yangkeduo.com/proxy/api/after_sales/create?pdduid=" + buyer.buyer_id;
@@ -1918,23 +1994,41 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
@",""refund_amount"":" + refund_amount + @",""new_refund_amount"":" + new_refund_amount + @",""is_lite"":true}"; @",""refund_amount"":" + refund_amount + @",""new_refund_amount"":" + new_refund_amount + @",""is_lite"":true}";
string referer = "https://mobile.yangkeduo.com/complaint.html?order_sn=260417-318525949581688&refer_page_name=order_detail&refer_page_id=10038_1776391960785_p20v9j3op4&refer_page_sn=10038&after_sales_reason=66&after_sales_type=1&after_sales_code=1001"; string referer = "https://mobile.yangkeduo.com/complaint.html?order_sn=260417-318525949581688&refer_page_name=order_detail&refer_page_id=10038_1776391960785_p20v9j3op4&refer_page_sn=10038&after_sales_reason=66&after_sales_type=1&after_sales_code=1001";
referer = "https://mobile.yangkeduo.com/complaint.html?order_sn=" + order_sn + "&refer_page_name=order_detail&&after_sales_reason=66"; referer = "https://mobile.yangkeduo.com/complaint.html?order_sn=" + order_sn + "&refer_page_name=order_detail&after_sales_reason=66";
var rst = HttpResponseYkdBLL.YangkeduoPostResponse(buyer, url, body, referer); var rst = HttpResponseYkdBLL.YangkeduoPostResponse(buyer, url, body, referer);
return rst; return rst;
} }
public static string GetSearchOrder(BuyerLoginInfo buyer, string orderSn) // 退货退款
public static string SetOrderAfterSaleWithReturnGoods(BuyerLoginInfo buyer, string user_phone, string order_sn, int apply_amount, int refund_amount, int new_refund_amount)
{ {
//1778823980132_ro0aie9x73 string url = "https://mobile.yangkeduo.com/proxy/api/after_sales/create?pdduid=" + buyer.buyer_id;
var page_id = "10032_" + BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now) + "_" + Randomx.GetWordNumber(10); string body = @"{""order_sn"":""260721-113109931520980"",""coupon_return_control_type"":0,""after_sales_type"":2,""user_ship_status"":2,""user_phone"":""15837193237"",""images"":[],""return_coupon_amount"":0,""question_type"":88,""question_desc"":"""",""apply_amount"":2590,""refund_amount"":2590,""new_refund_amount"":2590,""is_lite"":true}";
string url = "https://mobile.yangkeduo.com/transac_orders_search_results.html?keyWord=" + orderSn + body = @"{""order_sn"":""" + order_sn + @""",""coupon_return_control_type"":0,""after_sales_type"":2,""user_ship_status"":2,""user_phone"":""" + user_phone +
"&type=0&main_orders=1&refer_page_name=my_order&refer_page_id=" + page_id + "&refer_page_sn=10032"; @""",""images"":[],""return_coupon_amount"":0,""question_type"":88,""question_desc"":"""",""apply_amount"":" + apply_amount +
@",""refund_amount"":" + refund_amount + @",""new_refund_amount"":" + new_refund_amount + @",""is_lite"":true}";
string refere = "https://mobile.yangkeduo.com/orders.html?type=0&comment_tab=1&combine_orders=1&main_orders=1&refer_page_name=personal&refer_page_id=&refer_page_sn=10001&page_id=" + page_id + "&is_back=1"; string referer = "https://mobile.yangkeduo.com/complaint.html?order_sn=260721-113109931520980&after_sales_reason=88&after_sales_type=2&after_sales_code=1002";
var rst = HttpResponseYkdBLL.YangkeduoGetSearchOrderResponse(buyer, url, refere); referer = "https://mobile.yangkeduo.com/complaint.html?order_sn=" + order_sn + "after_sales_reason=88&after_sales_type=2&after_sales_code=1002";
//{"after_sales_id":21892258236871,"after_sales_status":1,"after_sales_type":2,"not_really_created":null}
var rst = HttpResponseYkdBLL.YangkeduoPostResponse(buyer, url, body, referer);
return rst; return rst;
} }
// 需要验签,暂时作废不使用
//public static string GetSearchOrder(BuyerLoginInfo buyer, string orderSn)
//{
// //1778823980132_ro0aie9x73
// var page_id = "10032_" + BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now) + "_" + Randomx.GetWordNumber(10);
// string url = "https://mobile.yangkeduo.com/transac_orders_search_results.html?keyWord=" + orderSn +
// "&type=0&main_orders=1&refer_page_name=my_order&refer_page_id=" + page_id + "&refer_page_sn=10032";
// string refere = "https://mobile.yangkeduo.com/orders.html?type=0&comment_tab=1&combine_orders=1&main_orders=1&refer_page_name=personal&refer_page_id=&refer_page_sn=10001&page_id=" + page_id + "&is_back=1";
// var rst = HttpResponseYkdBLL.YangkeduoGetSearchOrderResponse(buyer, url, refere);
// return rst;
//}
} }
public class BuyerReadOrderConfig public class BuyerReadOrderConfig
@@ -8,10 +8,10 @@
xmlns:converters="clr-namespace:_29WxOrderWpf.Converters" xmlns:converters="clr-namespace:_29WxOrderWpf.Converters"
xmlns:usercontrols="clr-namespace:_29WxOrderWpf.UserControls" xmlns:usercontrols="clr-namespace:_29WxOrderWpf.UserControls"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="1360" Loaded="Window_Loaded"> d:DesignHeight="450" d:DesignWidth="1560" Loaded="Window_Loaded">
<Grid Background="{StaticResource ListCtrlBackColorBrush}"> <Grid Background="{StaticResource ListCtrlBackColorBrush}" x:Name="gridOrderListCtrl">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="45"></RowDefinition> <RowDefinition Height="45"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition> <RowDefinition Height="auto"></RowDefinition>
@@ -43,15 +43,17 @@
<usercontrols:UcWaterMarkTextBox Grid.Column="1" x:Name="txtSearchAll" Margin="0,0,8,0" Height="28" WaterMark="买手/仓库/退货物流 采购/退款单号" TextChanged="txtSearchAll_TextChanged"/> <usercontrols:UcWaterMarkTextBox Grid.Column="1" x:Name="txtSearchAll" Margin="0,0,8,0" Height="28" WaterMark="买手/仓库/退货物流 采购/退款单号" TextChanged="txtSearchAll_TextChanged"/>
<usercontrols:UcWaterMarkTextBox Grid.Column="2" x:Name="txtGoodsName" Margin="0,0,8,0" Height="28" WaterMark="商品标题" /> <usercontrols:UcWaterMarkTextBox Grid.Column="2" x:Name="txtGoodsName" Margin="0,0,8,0" Height="28" WaterMark="商品标题" />
<usercontrols:UcWaterMarkTextBox x:Name="txtShopName" Grid.Column="3" Margin="0,0,-6,0" Height="28" WaterMark="全部店铺" TextWrapping="NoWrap"/> <usercontrols:UcWaterMarkTextBox x:Name="txtShopName" Grid.Column="3" Margin="0,0,-6,0" Height="28" WaterMark="全部店铺" TextWrapping="NoWrap"/>
<Button Grid.Column="4" x:Name="btnMultiShopChoice" Style="{StaticResource BasePageButtonLeftSquareStyle}" HorizontalAlignment="Left" VerticalAlignment="Center" <Button Grid.Column="4" x:Name="btnMultiShopChoice" Style="{StaticResource BasePageButtonLeftSquareStyle}" HorizontalAlignment="Left" VerticalAlignment="Center"
Margin="0,0,8,0" Content=" ... " Width="28" Height="28" Click="btnMultiShopChoice_Click"/> Margin="0,0,8,0" Content=" ... " Width="28" Height="28" Click="btnMultiShopChoice_Click"/>
<ComboBox Grid.Column="5" x:Name="cmbUserNameMobile" Margin="4,0,4,0" VerticalContentAlignment="Center" BorderBrush="Transparent" Style="{StaticResource RoundedComboBox}" <ComboBox Grid.Column="5" x:Name="cmbTimeType" Margin="4,0,4,0" VerticalContentAlignment="Center" BorderBrush="Transparent" Style="{StaticResource RoundedComboBox}"
Width="70" Height="28" Text="成交时间" SelectedIndex="0"> Width="70" Height="28" Text="更新时间" SelectedIndex="0">
<ComboBoxItem>
<TextBlock>更新时间</TextBlock>
</ComboBoxItem>
<ComboBoxItem> <ComboBoxItem>
<TextBlock>成交时间</TextBlock> <TextBlock>成交时间</TextBlock>
</ComboBoxItem> </ComboBoxItem>
@@ -206,20 +208,27 @@
<ColumnDefinition Width="auto"></ColumnDefinition> <ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition> <ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition> <ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition> <ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<CheckBox Grid.Column="0" Content="买手待申请售后" x:Name="chkEmergencyBuyerWaitAfterSale" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" VerticalAlignment="Center" Margin="6,8" Click="chkEmergencyBuyerAfterSale_Click"/> <CheckBox Grid.Column="0" Content="买手待申请售后" x:Name="chkEmergencyBuyerWaitAfterSale" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" VerticalAlignment="Center" Margin="6,8" Click="chkEmergencyBuyerAfterSale_Click"/>
<CheckBox Grid.Column="1" Content="买手待退货" x:Name="chkEmergencyBuyerWaitSendBack" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" VerticalAlignment="Center" Margin="6,8" Click="chkEmergencyBuyerAfterSale_Click"/> <Button Grid.Column="1" x:Name="btnBatchRefund" Style="{StaticResource BasePageButtonStyle}" Margin="0,0,0,0" Content="批量申请买手售后" MinWidth="48" Height="20" Click="btnBatchRefund_Click" Padding="4,0" FontSize="12"/>
<CheckBox Grid.Column="2" Content="买手已寄出待商家退款" x:Name="chkEmergencyBuyerWaitSupplierRefund" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" VerticalAlignment="Center" Margin="6,8" Click="chkEmergencyBuyerAfterSale_Click"/>
<CheckBox Grid.Column="3" Content="买手退款失败" x:Name="chkEmergencyBuyerRefundFail" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" VerticalAlignment="Center" Margin="6,8" Click="chkEmergencyBuyerAfterSale_Click"/>
<Polyline Grid.Column="4" Width="10" Margin="5,0" StrokeThickness="2" Stroke="{StaticResource mainColorBrush}" Points="5,0 5,8 5,0" VerticalAlignment="Center"/>
<CheckBox Grid.Column="5" Content="店铺客户有退货单号" x:Name="chkEmergencyShopCustomRefundHasWaybill" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" VerticalAlignment="Center" Margin="6,8" Click="chkEmergencyShopCustomRefundWaybill_Click"/> <CheckBox Grid.Column="2" Content="买手待退货" x:Name="chkEmergencyBuyerWaitSendBack" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" VerticalAlignment="Center" Margin="6,8" Click="chkEmergencyBuyerAfterSale_Click"/>
<CheckBox Grid.Column="6" Content="店铺客户无退货单号" x:Name="chkEmergencyShopCustomRefundNoWaybill" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" VerticalAlignment="Center" Margin="6,8" Click="chkEmergencyShopCustomRefundWaybill_Click"/> <CheckBox Grid.Column="3" Content="买手已寄出待商家退款" x:Name="chkEmergencyBuyerWaitSupplierRefund" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" VerticalAlignment="Center" Margin="6,8" Click="chkEmergencyBuyerAfterSale_Click"/>
<Polyline Grid.Column="7" Width="10" Margin="5,0" StrokeThickness="2" Stroke="{StaticResource mainColorBrush}" Points="5,0 5,8 5,0" VerticalAlignment="Center"/> <CheckBox Grid.Column="4" Content="买手退款失败" x:Name="chkEmergencyBuyerRefundFail" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" VerticalAlignment="Center" Margin="6,8" Click="chkEmergencyBuyerAfterSale_Click"/>
<Polyline Grid.Column="5" Width="10" Margin="5,0" StrokeThickness="2" Stroke="{StaticResource mainColorBrush}" Points="5,0 5,8 5,0" VerticalAlignment="Center"/>
<CheckBox Grid.Column="8" Content="店铺退款完成" x:Name="chkEmergencyShopAfterSaleSuccess" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" VerticalAlignment="Center" Margin="6,8" Click="chkEmergencyShopAfterSale_Click"/> <CheckBox Grid.Column="6" Content="店铺客户有退货单号" x:Name="chkEmergencyShopCustomRefundHasWaybill" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" VerticalAlignment="Center" Margin="6,8" Click="chkEmergencyShopCustomRefundWaybill_Click"/>
<CheckBox Grid.Column="9" Content="店铺退款中" x:Name="chkEmergencyShopInAfterSale" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" VerticalAlignment="Center" Margin="6,8" Click="chkEmergencyShopAfterSale_Click"/> <CheckBox Grid.Column="7" Content="店铺客户无退货单号" x:Name="chkEmergencyShopCustomRefundNoWaybill" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" VerticalAlignment="Center" Margin="6,8" Click="chkEmergencyShopCustomRefundWaybill_Click"/>
<Polyline Grid.Column="8" Width="10" Margin="5,0" StrokeThickness="2" Stroke="{StaticResource mainColorBrush}" Points="5,0 5,8 5,0" VerticalAlignment="Center"/>
<CheckBox Grid.Column="9" Content="店铺退款完成" x:Name="chkEmergencyShopAfterSaleSuccess" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" VerticalAlignment="Center" Margin="6,8" Click="chkEmergencyShopAfterSale_Click"/>
<CheckBox Grid.Column="10" Content="店铺退款中" x:Name="chkEmergencyShopInAfterSale" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" VerticalAlignment="Center" Margin="6,8" Click="chkEmergencyShopAfterSale_Click"/>
<Polyline Grid.Column="11" Width="10" Margin="5,0" StrokeThickness="2" Stroke="{StaticResource mainColorBrush}" Points="5,0 5,8 5,0" VerticalAlignment="Center"/>
</Grid> </Grid>
</Border> </Border>
</TabItem> </TabItem>
@@ -256,14 +265,41 @@
<Grid Background="#FFE5E5E5"/> <Grid Background="#FFE5E5E5"/>
</TabItem>--> </TabItem>-->
</TabControl> </TabControl>
<WrapPanel x:Name="wpFilter" Margin="630,6,0,0" VerticalAlignment="Top"> <WrapPanel x:Name="wpFilter" Margin="630,2,0,0" VerticalAlignment="Top">
<CheckBox Content="过滤非中转仓订单" x:Name="chkOnlyWarehouseOrder" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" HorizontalAlignment="Left" <CheckBox Content="过滤非中转仓订单" x:Name="chkOnlyWarehouseOrder" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" HorizontalAlignment="Left"
Margin="0,0,0,0" VerticalAlignment="Top" Checked="chkSubFilterSonditions_Checked" Unchecked="chkSubFilterSonditions_Checked" IsChecked="true"/> Margin="0,0,0,0" VerticalAlignment="Center" VerticalContentAlignment="Center" Checked="chkSubFilterSonditions_Checked" Unchecked="chkSubFilterSonditions_Checked" IsChecked="true"/>
<CheckBox Content="过滤多件商品订单" x:Name="chkNoMultiOrder" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" HorizontalAlignment="Left" <CheckBox Content="过滤多件商品订单" x:Name="chkNoMultiOrder" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" HorizontalAlignment="Left"
Margin="8,0,0,0" VerticalAlignment="Top" Checked="chkSubFilterSonditions_Checked" Unchecked="chkSubFilterSonditions_Checked" IsChecked="true"/> Margin="8,0,0,0" VerticalAlignment="Center" VerticalContentAlignment="Center" Checked="chkSubFilterSonditions_Checked" Unchecked="chkSubFilterSonditions_Checked" IsChecked="true"/>
<Polyline Grid.Column="5" Width="10" Margin="5,0" StrokeThickness="2" Stroke="{StaticResource mainColorBrush}" Points="5,0 5,4 5,0" VerticalAlignment="Center"/>
<CheckBox Content="过滤备注" x:Name="chkFilterRemark" BorderBrush="{StaticResource mainColorBrush}" FontSize="12" HorizontalAlignment="Left"
Margin="0,0,0,0" VerticalAlignment="Center" VerticalContentAlignment="Center" Checked="chkSubFilterSonditions_Checked" Unchecked="chkSubFilterSonditions_Checked" IsChecked="False"/>
<Border Margin="4,0,0,0" BorderBrush="{StaticResource pageColorBrush}" BorderThickness="1,1,1,1" Height="22" VerticalAlignment="Center" CornerRadius="4,0,0,4">
<ComboBox x:Name="cmbFilterRemark" Margin="4,0,4,0" VerticalContentAlignment="Center" BorderBrush="Transparent" Style="{StaticResource RoundedComboBox}"
Width="96" Height="20" Text="成交时间" SelectedIndex="0">
<ComboBoxItem>
<TextBlock Margin="0, -2">店铺备注包含</TextBlock>
</ComboBoxItem>
<ComboBoxItem>
<TextBlock Margin="0, -2">软件备注包含</TextBlock>
</ComboBoxItem>
<ComboBoxItem>
<TextBlock Margin="0, -2">店铺备注不含</TextBlock>
</ComboBoxItem>
<ComboBoxItem>
<TextBlock Margin="0, -2">软件备注不含</TextBlock>
</ComboBoxItem>
</ComboBox>
</Border>
<Border Grid.Column="7" BorderBrush="{StaticResource pageColorBrush}" BorderThickness="0,1,1,1" Height="22" VerticalAlignment="Center" CornerRadius="0,4,4,0" Margin="-2,0,0,0">
<TextBox x:Name="txtFilterRemark" BorderThickness="0" BorderBrush="Transparent" Width="100" Margin="3,1" VerticalAlignment="Center" VerticalContentAlignment="Center"
TextChanged="txtFilterRemark_TextChanged" ToolTip="{Binding Text,RelativeSource={RelativeSource Self}}"></TextBox>
</Border>
<Button Grid.Column="4" Style="{StaticResource BasePageButtonLeftSquareStyle}" HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="-4,0,0,0" Content=" ... " Width="22" Height="22" Click="btnMultiRemark_Click"/>
</WrapPanel> </WrapPanel>
<TextBlock Margin="10,6" FontSize="12" VerticalAlignment="Top" HorizontalAlignment="Right" Text="注:需中转仓订单,店铺后台勿自行发货,发货后中转仓将无法打单" <TextBlock Margin="10,-5, 0 -5" FontSize="12" VerticalAlignment="Top" HorizontalAlignment="Right" Text="注:需中转仓订单,店铺后台勿自行发货,发货后中转仓将无法打单"
Foreground="{StaticResource PageWarningBrushCC}"></TextBlock> Foreground="{StaticResource PageWarningBrushCC}" Width="180" TextWrapping="Wrap"></TextBlock>
</Grid> </Grid>
<Grid x:Name="lstTitle" Grid.Row="2" Margin="8,0,8,0" Background="{StaticResource ListHeadBackColorBrush}"> <Grid x:Name="lstTitle" Grid.Row="2" Margin="8,0,8,0" Background="{StaticResource ListHeadBackColorBrush}">
<Border BorderThickness="0,0,1,0" BorderBrush="{StaticResource ListHeadBorderColorBrush}"> <Border BorderThickness="0,0,1,0" BorderBrush="{StaticResource ListHeadBorderColorBrush}">
@@ -325,7 +361,6 @@
<!--此处绑定将数据源传递给子自定义控件OrderListRowCtrl--> <!--此处绑定将数据源传递给子自定义控件OrderListRowCtrl-->
<local:OrderListRowCtrl DataContext="{Binding}" VerticalAlignment="Center" VerticalContentAlignment="Center"></local:OrderListRowCtrl> <local:OrderListRowCtrl DataContext="{Binding}" VerticalAlignment="Center" VerticalContentAlignment="Center"></local:OrderListRowCtrl>
</DataTemplate> </DataTemplate>
</ListBox.ItemTemplate> </ListBox.ItemTemplate>
</ListBox> </ListBox>
<Grid x:Name="gridFooter" Grid.Row="4"> <Grid x:Name="gridFooter" Grid.Row="4">
@@ -333,7 +368,37 @@
<ColumnDefinition Width="Auto"></ColumnDefinition> <ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="100*"></ColumnDefinition> <ColumnDefinition Width="100*"></ColumnDefinition>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBox x:Name="txtFilterCount" Text="共计 0 条" Grid.Column="0" Grid.Row="2" Margin="8,0" VerticalAlignment="Center" Background="Transparent" IsReadOnly="True" BorderThickness="0"/> <TextBox x:Name="txtMsg" Text="共计 0 条" Grid.Column="0" Grid.Row="2" Margin="8,0" VerticalAlignment="Center" Background="Transparent" IsReadOnly="True" BorderThickness="0"/>
</Grid> </Grid>
<Border BorderBrush="{StaticResource pageColorBrush}" Background="White" BorderThickness="1,1,1,1" MinHeight="200" MinWidth="200" MaxWidth="400" MaxHeight="400" VerticalAlignment="Top"
HorizontalAlignment="Left" x:Name="borderFilterRemarkSelect" CornerRadius="4" Margin="30,180,0,0" Grid.RowSpan="10">
<Grid>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition Height="40"></RowDefinition>
</Grid.RowDefinitions>
<ScrollViewer VerticalScrollBarVisibility="Auto" Padding="2">
<WrapPanel x:Name="wpFilterRemarkSelect">
</WrapPanel>
</ScrollViewer>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="Auto"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Button Grid.Column="0" x:Name="btnFilterRemarkSelectAll" Style="{StaticResource BasePageButtonStyle}" Grid.Row="4" Content=" 全选 " Height="22" Margin="6,0,4,0" Click="btnFilterRemarkSelectAll_Click"></Button>
<Button Grid.Column="1" x:Name="btnFilterRemarkUnSelectAll" Style="{StaticResource BasePageButtonStyle}" Grid.Row="4" Content=" 全空 " Height="22" Click="btnFilterRemarkUnSelectAll_Click"></Button>
<Button Grid.Column="6" x:Name="btnApplyFilterRemark" Style="{StaticResource BasePageButtonStyle}" Grid.Row="4" Content=" 确定 " Height="22" Click="btnApplyFilterRemark_Click"></Button>
<Button Grid.Column="7" x:Name="btnCancelFilterRemark" Style="{StaticResource BasePageButtonLightStyle}" Grid.Row="4" Content=" 取消 " Height="22" Margin="4,0,6,0" Click="btnCancelFilterRemark_Click"></Button>
</Grid>
</Grid>
</Border>
</Grid> </Grid>
</UserControl> </UserControl>
@@ -6,12 +6,15 @@ using AllBase.Extension;
using AllBase.Helper; using AllBase.Helper;
using AllBase.Model; using AllBase.Model;
using AllBase.Model.DBModel; using AllBase.Model.DBModel;
using AllBase.Model.Result;
using CefSharp.DevTools.Autofill;
using NaiBa.Util.Extension; using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Linq; using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
@@ -23,9 +26,12 @@ using System.Windows.Input;
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using System.Windows.Shapes; using System.Windows.Shapes;
using System.Xml.Linq;
using TemuKJD.ToolForms; using TemuKJD.ToolForms;
using Work; using Work;
using Work._29Tools.BLL; using Work._29Tools.BLL;
using Work.BuyUsers;
using static System.Net.Mime.MediaTypeNames;
namespace _29WxOrderWpf.Ctrls.OrderCtrls namespace _29WxOrderWpf.Ctrls.OrderCtrls
{ {
@@ -40,6 +46,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
public DateTime nextGetOrderTime = DateTime.MinValue; public DateTime nextGetOrderTime = DateTime.MinValue;
public string strSearchAll = ""; public string strSearchAll = "";
public List<string> lstFilterText { get; set; }
public OrderListCtrl() public OrderListCtrl()
{ {
@@ -49,12 +56,13 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
private void Window_Loaded(object sender, RoutedEventArgs e) private void Window_Loaded(object sender, RoutedEventArgs e)
{ {
lbxOrder.ItemsSource = GlobalConfig.lstFilterOrder; lbxOrder.ItemsSource = GlobalConfig.lstFilterOrder;
dateStart.SelectedDate = DateTime.Now.Date.AddDays(-10); dateStart.SelectedDate = DateTime.Now.Date.AddDays(-10);
dateEnd.SelectedDate = DateTime.Now.Date.AddDays(1).AddSeconds(-1); dateEnd.SelectedDate = DateTime.Now.Date.AddDays(1).AddSeconds(-1);
borderFilterRemarkSelect.Visibility = Visibility.Collapsed;
AutoGetOrder(); AutoGetOrder();
} }
@@ -89,6 +97,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
if (DateTime.Now > nextGetOrderTime) if (DateTime.Now > nextGetOrderTime)
{ {
GetOrder(); GetOrder();
GetShopWaybillExceptionOrder();
nextGetOrderTime = DateTime.Now.AddMinutes(25); nextGetOrderTime = DateTime.Now.AddMinutes(25);
} }
Thread.Sleep(1000); Thread.Sleep(1000);
@@ -164,6 +174,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
BaseMsgWindow.ShowError("订单读取失败 " + BaseRegex.GetStringJson(ref html, "msg")); BaseMsgWindow.ShowError("订单读取失败 " + BaseRegex.GetStringJson(ref html, "msg"));
break; break;
} }
var seconds = BaseRegex.GetDecimalJson(ref html, "seconds");
var jArr = JObject.Parse(html)["data"]; var jArr = JObject.Parse(html)["data"];
if (jArr.Count() == 0) if (jArr.Count() == 0)
@@ -171,40 +182,40 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
var order_ids = string.Join(",", jArr.Select(a => a["order_id"].ParseToString())); var order_ids = string.Join(",", jArr.Select(a => a["order_id"].ParseToString()));
// 读取订单详情 //// 读取订单详情
Thread.Sleep(100); Thread.Sleep(100);
var url1 = BaseClass.Build29WxObjString("order/get_erp_order_item_list"); //var url1 = BaseClass.Build29WxObjString("order/get_erp_order_item_list");
var data1 = UserLogin.GetSignaturex(); //var data1 = UserLogin.GetSignaturex();
data1 += "&erp_order_id_in=" + order_ids; //data1 += "&erp_order_id_in=" + order_ids;
data1 += "&page_size=" + 2000; //data1 += "&page_size=" + 2500;
var html1 = GetHtml.PostUtf8(url1, data1); //var html1 = GetHtml.PostUtf8(url1, data1);
if (string.IsNullOrEmpty(html1) || !html1.Contains("\"code\":200")) //if (string.IsNullOrEmpty(html1) || !html1.Contains("\"code\":200"))
html1 = GetHtml.PostUtf8(url1, data1); // html1 = GetHtml.PostUtf8(url1, data1);
if (string.IsNullOrEmpty(html1) || !html1.Contains("\"code\":200")) //if (string.IsNullOrEmpty(html1) || !html1.Contains("\"code\":200"))
{ //{
BaseMsgWindow.ShowError("订单读取失败 " + BaseRegex.GetStringJson(ref html, "msg")); // BaseMsgWindow.ShowError("订单读取失败 " + BaseRegex.GetStringJson(ref html1, "msg"));
break; // break;
} //}
List<oms_wei_order_item_info> orderItems = new List<oms_wei_order_item_info>(); //List<oms_wei_order_item_info> orderItems = new List<oms_wei_order_item_info>();
try { orderItems = JsonHelper.DeserializeJsonToList<oms_wei_order_item_info>(JObject.Parse(html1)["data"].ParseToString()); } catch { } //try { orderItems = JsonHelper.DeserializeJsonToList<oms_wei_order_item_info>(JObject.Parse(html1)["data"].ParseToString()); } catch { }
List<oms_wei_order_item_info> orderItems = GetOrderItemInfo(order_ids);
// 读取售后单 // 读取售后单
Thread.Sleep(100); Thread.Sleep(100);
var url2 = BaseClass.Build29WxObjString("order/get_erp_refund_list"); //var url2 = BaseClass.Build29WxObjString("order/get_erp_refund_list");
var data2 = UserLogin.GetSignaturex(); //var data2 = UserLogin.GetSignaturex();
data2 += "&erp_order_id_in=" + order_ids; //data2 += "&erp_order_id_in=" + order_ids;
var html2 = GetHtml.PostUtf8(url2, data2); //var html2 = GetHtml.PostUtf8(url2, data2);
if (string.IsNullOrEmpty(html2) || !html2.Contains("\"code\":200")) //if (string.IsNullOrEmpty(html2) || !html2.Contains("\"code\":200"))
html2 = GetHtml.PostUtf8(url, data); // html2 = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html2) || !html2.Contains("\"code\":200")) //if (string.IsNullOrEmpty(html2) || !html2.Contains("\"code\":200"))
{ //{
BaseMsgWindow.ShowError("订单读取失败 " + BaseRegex.GetStringJson(ref html, "msg")); // BaseMsgWindow.ShowError("订单读取失败 " + BaseRegex.GetStringJson(ref html2, "msg"));
break; // break;
} //}
List<oms_wei_refund_info> refunds = new List<oms_wei_refund_info>(); //List<oms_wei_refund_info> refunds = new List<oms_wei_refund_info>();
try { refunds = JsonHelper.DeserializeJsonToList<oms_wei_refund_info>(JObject.Parse(html2)["data"].ParseToString()); } catch { } //try { refunds = JsonHelper.DeserializeJsonToList<oms_wei_refund_info>(JObject.Parse(html2)["data"].ParseToString()); } catch { }
List<oms_wei_refund_info> refunds = GetOrderRefundInfo(order_ids);
// 读取中转仓拍单订单 // 读取中转仓拍单订单
var url3 = BaseClass.Build29WxObjString("order/wx_get_transit_order"); var url3 = BaseClass.Build29WxObjString("order/wx_get_transit_order");
@@ -215,23 +226,17 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
html3 = GetHtml.PostUtf8(url3, data3); html3 = GetHtml.PostUtf8(url3, data3);
if (string.IsNullOrEmpty(html3) || !html3.Contains("\"code\":200")) if (string.IsNullOrEmpty(html3) || !html3.Contains("\"code\":200"))
{ {
Dispatcher.Invoke(new Action(() => BaseMsgWindow.ShowError("订单读取失败 " + BaseRegex.GetStringJson(ref html3, "msg"));
{
BaseMsgWindow.ShowError("订单读取失败 " + BaseRegex.GetStringJson(ref html, "msg"));
}));
break; break;
} }
List<oms_wei_external_procurement_log_info> transitOrderList = new List<oms_wei_external_procurement_log_info>(); List<oms_wei_external_procurement_log_info> transitOrderList = new List<oms_wei_external_procurement_log_info>();
try try
{ {
transitOrderList = JsonHelper.DeserializeJsonToList<oms_wei_external_procurement_log_info>(JObject.Parse(html3)["data"].ParseToString()); transitOrderList = JsonHelper.DeserializeJsonToList<oms_wei_external_procurement_log_info>(JObject.Parse(html3)["data"].ParseToString());
// 直接过滤掉仓库作废单
//transitOrderList = transitOrderList.Where(t => t.order_void_status != 1).ToList();
} }
catch { } catch { }
// 读取暂时记录的买手订单,后面想办法放到中转订单库里去 // 读取暂时记录的买手订单,后面想办法放到中转订单库里去
// 读取中转仓拍单订单
var url4 = BaseClass.Build29WxObjString("order/wx_get_buyer_order_list"); var url4 = BaseClass.Build29WxObjString("order/wx_get_buyer_order_list");
var data4 = UserLogin.GetSignaturex(); var data4 = UserLogin.GetSignaturex();
data4 += "&wx_order_id_in=" + order_ids; data4 += "&wx_order_id_in=" + order_ids;
@@ -242,7 +247,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
{ {
Dispatcher.Invoke(new Action(() => Dispatcher.Invoke(new Action(() =>
{ {
BaseMsgWindow.ShowError("订单读取失败 " + BaseRegex.GetStringJson(ref html, "msg")); BaseMsgWindow.ShowError("订单读取失败(买手) " + BaseRegex.GetStringJson(ref html4, "msg"));
})); }));
break; break;
} }
@@ -254,6 +259,31 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
} }
catch { } catch { }
// 读取暂时记录的买手售后单,后面想办法放到中转订单库里去
var url6 = BaseClass.Build29WxObjString("order/wx_get_buyer_after_sale_list");
var data6 = UserLogin.GetSignaturex();
data6 += "&wx_order_id_in=" + order_ids;
List<order_pdd_buyer_after_sale> pddBuyerAfterSales = new List<order_pdd_buyer_after_sale>();
if (!string.IsNullOrEmpty(order_ids))
{
var html6 = GetHtml.PostUtf8(url6, data6);
if (string.IsNullOrEmpty(html6) || !html6.Contains("\"code\":200"))
html6 = GetHtml.PostUtf8(url6, data6);
if (string.IsNullOrEmpty(html6) || !html6.Contains("\"code\":200"))
{
BaseMsgWindow.ShowError("订单读取失败(买手售后) " + BaseRegex.GetStringJson(ref html6, "msg"));
break;
}
try
{
pddBuyerAfterSales = JsonHelper.DeserializeJsonToList<order_pdd_buyer_after_sale>(JObject.Parse(html6)["data"].ParseToString())
.OrderByDescending(p => p.TransitCreateTime).ToList();
}
catch
{
}
}
// 读取中转仓处理售后单 // 读取中转仓处理售后单
var url5 = BaseClass.Build29WxObjString("order/wx_get_transit_warehouse_aftersale_list"); var url5 = BaseClass.Build29WxObjString("order/wx_get_transit_warehouse_aftersale_list");
var data5 = UserLogin.GetSignaturex(); var data5 = UserLogin.GetSignaturex();
@@ -265,7 +295,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
{ {
Dispatcher.Invoke(new Action(() => Dispatcher.Invoke(new Action(() =>
{ {
BaseMsgWindow.ShowError("订单读取失败 " + BaseRegex.GetStringJson(ref html, "msg")); BaseMsgWindow.ShowError("订单读取失败 " + BaseRegex.GetStringJson(ref html5, "msg"));
})); }));
break; break;
} }
@@ -285,12 +315,12 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
dataMap += "&main_user_name=" + BaseClass.MainUserName; dataMap += "&main_user_name=" + BaseClass.MainUserName;
var resultMap = GetHtml.PostUtf8(urlMap, dataMap); var resultMap = GetHtml.PostUtf8(urlMap, dataMap);
if (string.IsNullOrEmpty(resultMap) || !resultMap.Contains("\"code\":200")) if (string.IsNullOrEmpty(resultMap) || !resultMap.Contains("\"code\":200"))
GetHtml.PostUtf8(urlMap, dataMap); resultMap = GetHtml.PostUtf8(urlMap, dataMap);
if (string.IsNullOrEmpty(resultMap) || !resultMap.Contains("\"code\":200")) if (string.IsNullOrEmpty(resultMap) || !resultMap.Contains("\"code\":200"))
{ {
Dispatcher.Invoke(new Action(() => Dispatcher.Invoke(new Action(() =>
{ {
BaseMsgWindow.ShowError("订单读取失败 " + BaseRegex.GetStringJson(ref html, "msg")); BaseMsgWindow.ShowError("订单读取失败 " + BaseRegex.GetStringJson(ref resultMap, "msg"));
})); }));
break; break;
} }
@@ -314,9 +344,10 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
item.ItemOrder = order; item.ItemOrder = order;
order.orderItems.Add(item); order.orderItems.Add(item);
// 已放到赋值函数中处理
// 更新店铺是否加入代发情况 // 更新店铺是否加入代发情况
item.Shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == item.order_id); //item.Shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == item.order_id);
Dispatcher.Invoke(new Action(() => { item.UpdateOrderItemBuyButton(); })); //Dispatcher.Invoke(new Action(() => { item.UpdateOrderItemBuyButton(); }));
// 关联拍单关系 // 危险物品禁止拍单,仅关联安全商品 // 关联拍单关系 // 危险物品禁止拍单,仅关联安全商品
if (!GlobalConfig.lstDangerItemWord.Any(d => (item.title).ParseToString().Contains(d))) if (!GlobalConfig.lstDangerItemWord.Any(d => (item.title).ParseToString().Contains(d)))
@@ -339,6 +370,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
// 中转仓买手订单 // 中转仓买手订单
item.PddBuyerOrders = pddBuyerOrders.Where(po => po.wx_order_id == item.order_id && po.wx_sku_id == item.sku_id).ToList(); item.PddBuyerOrders = pddBuyerOrders.Where(po => po.wx_order_id == item.order_id && po.wx_sku_id == item.sku_id).ToList();
// 中转仓买手退货订单
item.PddBuyerAfterSales = pddBuyerAfterSales.Where(po => po.wx_order_id == item.order_id && po.wx_sku_id == item.sku_id).ToList();
} }
// 装载订单售后详情 // 装载订单售后详情
@@ -358,16 +391,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
GlobalConfig.lstOrder.Remove(orderExist); GlobalConfig.lstOrder.Remove(orderExist);
orderExist = GlobalConfig.lstOrder.FirstOrDefault(o => o.order_id == order.order_id); orderExist = GlobalConfig.lstOrder.FirstOrDefault(o => o.order_id == order.order_id);
} }
var nextOrder = GlobalConfig.lstOrder.FirstOrDefault(o => o.create_time < order.create_time);
if (nextOrder != null)
{
GlobalConfig.lstOrder.Insert(GlobalConfig.lstOrder.IndexOf(nextOrder), order);
}
else
{
GlobalConfig.lstOrder.Add(order); GlobalConfig.lstOrder.Add(order);
}
Dispatcher.Invoke(new Action(() => Dispatcher.Invoke(new Action(() =>
{ {
@@ -401,6 +425,157 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
})); }));
} }
/// <summary>
/// 读取订单详情信息
/// </summary>
/// <param name="order_ids"></param>
/// <returns></returns>
public static List<oms_wei_order_item_info> GetOrderItemInfo(string order_ids)
{
if (string.IsNullOrEmpty(order_ids))
return new List<oms_wei_order_item_info>();
Thread.Sleep(100);
var url = BaseClass.Build29WxObjString("order/get_erp_order_item_list");
var data = UserLogin.GetSignaturex();
data += "&erp_order_id_in=" + order_ids;
data += "&page_size=" + 2500;
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
{
BaseMsgWindow.ShowAnimateMessage("订单详情读取失败 " + BaseRegex.GetStringJson(ref html, "msg"), "Error", 5);
}
List<oms_wei_order_item_info> orderItems = new List<oms_wei_order_item_info>();
try
{
orderItems = JsonHelper.DeserializeJsonToList<oms_wei_order_item_info>(JObject.Parse(html)["data"].ParseToString());
if (orderItems == null)
orderItems = new List<oms_wei_order_item_info>();
}
catch (Exception ex)
{
BaseMsgWindow.ShowAnimateMessage("订单详情读取失败 " + ex.Message, "Error", 5);
}
return orderItems;
}
/// <summary>
/// 读取售后单
/// </summary>
/// <param name="order_ids"></param>
/// <returns></returns>
public static List<oms_wei_refund_info> GetOrderRefundInfo(string order_ids)
{
Thread.Sleep(100);
var url2 = BaseClass.Build29WxObjString("order/get_erp_refund_list");
var data2 = UserLogin.GetSignaturex();
data2 += "&erp_order_id_in=" + order_ids;
var html2 = GetHtml.PostUtf8(url2, data2);
if (string.IsNullOrEmpty(html2) || !html2.Contains("\"code\":200"))
html2 = GetHtml.PostUtf8(url2, data2);
if (string.IsNullOrEmpty(html2) || !html2.Contains("\"code\":200"))
{
//BaseMsgWindow.ShowError(MainWindow.Instance, "订单读取失败 " + BaseRegex.GetStringJson(ref html, "msg"));
//break;
}
List<oms_wei_refund_info> refunds = new List<oms_wei_refund_info>();
try { refunds = JsonHelper.DeserializeJsonToList<oms_wei_refund_info>(JObject.Parse(html2)["data"].ParseToString()); } catch { }
return refunds;
}
public void GetShopWaybillExceptionOrder()
{
foreach (var shop in GlobalConfig.ShopLoginList)
{
if (shop.LoginStatus == "登录成功")
ShopBLL.CheckShopLogin(shop);
if (shop.LoginStatus != "登录成功")
continue;
var rst = WxSimAbnormalOrderSeach(shop, 100);
Thread.Sleep(Randomx.GetId(50, 150));
if (rst.Contains("\"code\":0"))
{
try
{
JObject jObj = JsonHelper.JObjectParse(rst);
var wxOrderIdIn = string.Join(",", jObj["orderList"].Select(j => j["commonInfo"]["orderId"].ParseToString()));
var wxSkuIdIn = string.Join(",", jObj["orderList"].Select(j => (j["orderProductInfo"].FirstOrDefault()?["skuId"]).ParseToString()));
List<order_item_ext> existOrderExtList = new List<order_item_ext>();
if (!string.IsNullOrEmpty(wxOrderIdIn) && !string.IsNullOrEmpty(wxSkuIdIn))
{
var url = BaseClass.Build29WxObjString("order/wx_get_order_item_ext_info");
var data = UserLogin.GetSignaturex();
data += "&wx_order_id_in=" + wxOrderIdIn;
data += "&wx_sku_id_in=" + wxSkuIdIn;
var html = GetHtml.PostUtf8(url, data);
if (!html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
if (!html.Contains("\"code\":200"))
{
BaseMsgWindow.ShowAnimateMessage("订单扩展信息查询失败 " + BaseRegex.GetStringJson(ref html, "msg"), "Error", 5);
continue;
}
existOrderExtList = JsonHelper.DeserializeJsonToList<order_item_ext>(JsonHelper.JObjectParse(html)["data"].ParseToString());
}
foreach (var od in jObj["orderList"])
{
var oStr = JsonHelper.SerializeObject(od);
//var orderId = o["commonInfo"]["orderId"].ParseToString();
var orderId = BaseRegex.GetStringJson(ref oStr, "orderId");
var skuId = BaseRegex.GetStringJson(ref oStr, "skuId");
// 存在状态完全一样的订单异常信息就跳过
order_item_ext orderExt = new order_item_ext() { order_id = orderId, sku_id = skuId, shop_app_id = shop.ShopId, shop_name = shop.ShopAccount, abnormal_text = "物流异常" };
if (!existOrderExtList.Any(eoe => eoe.order_id == orderExt.order_id && eoe.sku_id == orderExt.sku_id && eoe.abnormal_text == orderExt.abnormal_text))
{
var url1 = BaseClass.Build29WxObjString("order/wx_add_order_item_ext_info");
if (existOrderExtList.Any(eoe => eoe.order_id == orderExt.order_id && eoe.sku_id == orderExt.sku_id))
url1 = BaseClass.Build29WxObjString("order/wx_mdy_order_item_ext_info");
var data1 = UserLogin.GetSignaturex();
data1 += "&wx_order_id=" + orderExt.order_id;
data1 += "&wx_sku_id=" + orderExt.sku_id;
data1 += "&shop_app_id=" + orderExt.shop_app_id;
data1 += "&shop_name=" + orderExt.shop_name;
data1 += "&abnormal_text=" + orderExt.abnormal_text;
var html1 = GetHtml.PostUtf8(url1, data1);
if (string.IsNullOrEmpty(html1) || !html1.Contains("\"code\":200"))
{
BaseMsgWindow.ShowAnimateMessage("订单扩展信息写入失败 " + BaseRegex.GetStringJson(ref html1, "msg"), "Error", 5);
break;
}
}
// 更新订单附加信息
if (orderExt.order_id == "3737845591459133952")
{
}
var order = GlobalConfig.lstOrder.FirstOrDefault(o => o.order_id == orderExt.order_id);
if (order != null)
{
var orderItem = order.orderItems.FirstOrDefault(oi => oi.sku_id == orderExt.sku_id);
if (orderItem != null)
{
//orderItem.OrderItemExt = orderExt;
//Dispatcher.Invoke(new Action(() => { MainWindow.Instance.orderListCtrl.FilterOneOrder(order, true); }));
}
}
}
//var abnormalOrder = GlobalConfig.lstOrder.FirstOrDefault()
}
catch (Exception ex)
{
BaseMsgWindow.ShowAnimateMessage("订单扩展信息查询失败 " + ex.Message, "Error", 5);
}
}
}
}
public void disPlayOrderTabOrderCount() public void disPlayOrderTabOrderCount()
{ {
var tabItems = this.tabOrderType.Items.Cast<TabItem>(); var tabItems = this.tabOrderType.Items.Cast<TabItem>();
@@ -453,7 +628,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
var filteLstTmp = new ObservableCollection<oms_wei_order_info>(userOrderLst.Where(o => !GetOrderIsFilter(o, "全部订单"))); var filteLstTmp = new ObservableCollection<oms_wei_order_info>(userOrderLst.Where(o => !GetOrderIsFilter(o, "全部订单")));
tabItem.Header = "全部订单(" + userOrderLst.Count() + "|" + filteLstTmp.Count() + ")"; tabItem.Header = "全部订单(" + userOrderLst.Count() + "|" + filteLstTmp.Count() + ")";
} }
txtFilterCount.Text = "当前条件共计 " + GlobalConfig.lstFilterOrder.Count() + " 条订单记录"; //txtMsg.Text = "当前条件共计 " + GlobalConfig.lstFilterOrder.Count() + " 条订单记录";
} }
public void FilterOrders() public void FilterOrders()
@@ -463,25 +638,16 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
if (this.lbxOrder == null) if (this.lbxOrder == null)
return; return;
//foreach (var order in GlobalConfig.lstFilterOrder.ToList())
//{
// if (GetOrderIsFilter(order))
// {
// GlobalConfig.lstFilterOrder.Remove(order);
// }
//}
//foreach (var order in GlobalConfig.lstOrder.ToList())
//{
// FilterOneOrder(order);
//}
Dispatcher.Invoke(new Action(() => Dispatcher.Invoke(new Action(() =>
{ {
GlobalConfig.lstFilterOrder = new ObservableCollection<oms_wei_order_info>(GlobalConfig.lstOrder.Where(o => !GetOrderIsFilter(o))); if (GlobalConfig.OrderTabHeaderStr.StartsWith("需处理售后订单"))
GlobalConfig.lstFilterOrder = new ObservableCollection<oms_wei_order_info>(GlobalConfig.lstOrder.Where(o => !GetOrderIsFilter(o)).OrderByDescending(o => o.RefundDatetime));
else if (GlobalConfig.OrderTabHeaderStr.StartsWith("异常订单"))
GlobalConfig.lstFilterOrder = new ObservableCollection<oms_wei_order_info>(GlobalConfig.lstOrder.Where(o => !GetOrderIsFilter(o)).OrderByDescending(o => o.update_time));
else
GlobalConfig.lstFilterOrder = new ObservableCollection<oms_wei_order_info>(GlobalConfig.lstOrder.Where(o => !GetOrderIsFilter(o)).OrderByDescending(o => o.create_time));
this.lbxOrder.ItemsSource = GlobalConfig.lstFilterOrder; this.lbxOrder.ItemsSource = GlobalConfig.lstFilterOrder;
//Dispatcher.Invoke(new Action(() => {
// txtFilterCount.Text = "当前条件共计 " + GlobalConfig.lstFilterOrder.Count().ToString() + " 条订单记录";
//}));
disPlayOrderTabOrderCount(); disPlayOrderTabOrderCount();
})); }));
} }
@@ -501,7 +667,14 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
if (!GetOrderIsFilter(order)) if (!GetOrderIsFilter(order))
{ {
var nextOrder = GlobalConfig.lstFilterOrder.FirstOrDefault(o => o.create_time < order.create_time); oms_wei_order_info nextOrder = null;
if (GlobalConfig.OrderTabHeaderStr.StartsWith("需处理售后订单"))
nextOrder = GlobalConfig.lstFilterOrder.FirstOrDefault(o => o.RefundDatetime < order.RefundDatetime);
else if (GlobalConfig.OrderTabHeaderStr.StartsWith("异常订单"))
nextOrder = GlobalConfig.lstFilterOrder.FirstOrDefault(o => o.update_time < order.update_time);
else
nextOrder = GlobalConfig.lstFilterOrder.FirstOrDefault(o => o.create_time < order.create_time);
if (nextOrder != null) if (nextOrder != null)
{ {
GlobalConfig.lstFilterOrder.Insert(GlobalConfig.lstFilterOrder.IndexOf(nextOrder), order); GlobalConfig.lstFilterOrder.Insert(GlobalConfig.lstFilterOrder.IndexOf(nextOrder), order);
@@ -579,12 +752,46 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
{ {
return true; return true;
} }
// 过滤备注
if (chkFilterRemark.IsChecked == true && !string.IsNullOrEmpty(txtFilterRemark.Text))
{
if (cmbFilterRemark.SelectedItem is ComboBoxItem comboBoxItem)
{
if (comboBoxItem.Content is TextBlock tb)
{
if (tb.Text == "店铺备注包含" && !lstFilterText.Contains(order.shop_remark))
return true;
else if (tb.Text == "软件备注包含" && !lstFilterText.Contains(order.soft_remark))
return true;
else if (tb.Text == "店铺备注不含" && lstFilterText.Contains(order.shop_remark))
return true;
else if (tb.Text == "软件备注不含" && lstFilterText.Contains(order.soft_remark))
return true;
}
}
}
// 过滤时间范围 // 过滤时间范围
if (order.createDateTime < dateStart.SelectedDate.Value) if (cmbTimeType.SelectedItem is ComboBoxItem cbi)
{
if (cbi.Content is TextBlock tb)
{
if (tb.Text == "更新时间")
{
if (order.UpdateDateTime < dateStart.SelectedDate.Value)
return true; return true;
if (chkEndDate.IsChecked == true && order.createDateTime > dateEnd.SelectedDate.Value) if (chkEndDate.IsChecked == true && order.UpdateDateTime > dateEnd.SelectedDate.Value)
return true; return true;
}
if (tb.Text == "创建时间")
{
if (order.CreateDateTime < dateStart.SelectedDate.Value)
return true;
if (chkEndDate.IsChecked == true && order.CreateDateTime > dateEnd.SelectedDate.Value)
return true;
}
}
}
// 过滤标签页 // 过滤标签页
if (filterHeadStr.IsNullOrEmpty()) if (filterHeadStr.IsNullOrEmpty())
@@ -618,7 +825,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
return true; return true;
if (chkWaitReceiveBuyerIsSend.IsChecked == true && order.orderItems.All(oi => oi.BuyerTransitWaybillStatusStr != "买手已发货")) if (chkWaitReceiveBuyerIsSend.IsChecked == true && order.orderItems.All(oi => oi.BuyerTransitWaybillStatusStr != "买手已发货"))
return true; return true;
if (chkWaitReceiveBuyerIsInWarehouse.IsChecked == true && order.orderItems.All(oi => oi.BuyerTransitWaybillStatusStr != "已到中转仓")) if (chkWaitReceiveBuyerIsInWarehouse.IsChecked == true && order.orderItems.All(oi => oi.BuyerTransitWaybillStatusStr != "买手已送达"))
return true; return true;
if (chkWaitReceiveWarehouseIsNotPickup.IsChecked == true && order.orderItems.All(oi => oi.WarehouseWaybillStatusStr != "中转待取号")) if (chkWaitReceiveWarehouseIsNotPickup.IsChecked == true && order.orderItems.All(oi => oi.WarehouseWaybillStatusStr != "中转待取号"))
@@ -826,6 +1033,15 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
var result = HttpResponseWXBLL.WeiXinPostResponse(shop, url, body, refere); var result = HttpResponseWXBLL.WeiXinPostResponse(shop, url, body, refere);
return result; return result;
} }
public static string addNotesFlag(ShopLoginInfo shop, string orderId, string notes, int tagColor = 0)
{
string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeorder/common/cgi/batchMerchantNotes?token=&lang=zh_CN";
string body = @"{""items"":[{""orderId"":""" + orderId + @""",""merchantNotesTagColor"":" + tagColor + @"}]}";
string refere = "https://store.weixin.qq.com/shop/order/list";
var result = HttpResponseWXBLL.WeiXinPostResponse(shop, url, body, refere);
return result;
}
private void chkAutoReadBuyerOrder_CheckedChanged(object sender, RoutedEventArgs e) private void chkAutoReadBuyerOrder_CheckedChanged(object sender, RoutedEventArgs e)
{ {
@@ -835,7 +1051,11 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
private void TabItem_SizeChanged(object sender, SizeChangedEventArgs e) private void TabItem_SizeChanged(object sender, SizeChangedEventArgs e)
{ {
var tabItems = this.tabOrderType.Items.Cast<TabItem>(); var tabItems = this.tabOrderType.Items.Cast<TabItem>();
wpFilter.Margin = new Thickness(tabItems.Sum(t => t.ActualWidth) + 20, 6, 0, 0); wpFilter.Margin = new Thickness(tabItems.Sum(t => t.ActualWidth) + 20, wpFilter.Margin.Top, 0, 0);
Point position1 = txtFilterRemark.TranslatePoint(new Point(0, 0), gridOrderListCtrl);
Point position2 = txtFilterRemark.TranslatePoint(new Point(0, 0), wpFilter);
borderFilterRemarkSelect.Margin = new Thickness(tabItems.Sum(t => t.ActualWidth) + 26 + position2.X, position1.Y + txtFilterRemark.ActualHeight + 3, 0, 0);
} }
private void chkSubFilterSonditions_Checked(object sender, RoutedEventArgs e) private void chkSubFilterSonditions_Checked(object sender, RoutedEventArgs e)
@@ -944,5 +1164,248 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
} }
FilterOrders(); FilterOrders();
} }
private async void btnBatchRefund_Click(object sender, RoutedEventArgs e)
{
var orders = GlobalConfig.lstFilterOrder.Where(o => o.IsSelect == true);
List<oms_wei_order_item_info> tmpOrderItems = new List<oms_wei_order_item_info>();
foreach (var order in orders)
{
foreach(var orderItem in order.orderItems)
{
if (orderItem == null || string.IsNullOrEmpty(orderItem.ItemTransitOrderWithVoid?.out_order_no) || !orderItem.PddBuyerAfterSaleAddressStr.IsNullOrEmpty() ||
(!orderItem.TransitRefundStatusStr.Contains("需手动申请售后") && !orderItem.TransitRefundStatusStr.Contains("待用户发货")))
continue;
tmpOrderItems.Add(orderItem);
}
}
if (tmpOrderItems.Count == 0)
{
BaseMsgWindow.ShowAnimateMessage("未选中需要需手动申请售后的订单", "Error", 3);
return;
}
await Task.Run(() =>
{
int index = 0;
foreach (var tmpOrderItem in tmpOrderItems)
{
Dispatcher.Invoke(new Action(() => { txtMsg.Text = "正在处理买手退货,总计:" + tmpOrderItems.Count + ",已处理:" + index++; }));
var pddOrderSn = tmpOrderItem.ItemTransitOrderWithVoid.out_order_no;
BuyerLoginInfo buyer = null;
Dispatcher.Invoke(new Action(() => { buyer = GlobalConfig.PDDBuyerLoginList.FirstOrDefault(b => b.buyer_nick == tmpOrderItem.ItemTransitOrderWithVoid.buyer_account); }));
if (buyer == null)
{
BaseMsgWindow.ShowAnimateMessage("买手单:" + pddOrderSn + " 买手不在当前账户下,跳过", "Error", 3);
}
// 检测一下买手号
if (buyer.status == "在线")
{
PddMobileLoginForm.CheckBuyerLogin(buyer);
}
if (buyer.status != "在线")
{
BaseMsgWindow.ShowAnimateMessage("买手单:" + pddOrderSn + " 买手号掉线,跳过", "Error", 3);
continue;
}
MainWindow.Instance.orderListCtrl.GetOrder(tmpOrderItem.order_id);
var order = GlobalConfig.lstOrder.FirstOrDefault(oi => oi.order_id == tmpOrderItem.order_id);
if (order == null)
continue;
var orderItem = order.orderItems.FirstOrDefault(oi => oi.order_id == tmpOrderItem.order_id && oi.sku_id == tmpOrderItem.sku_id);
if (orderItem == null || string.IsNullOrEmpty(orderItem.ItemTransitOrderWithVoid?.out_order_no) || !orderItem.PddBuyerAfterSaleAddressStr.IsNullOrEmpty() ||
(!orderItem.TransitRefundStatusStr.Contains("需手动申请售后") && !orderItem.TransitRefundStatusStr.Contains("待用户发货")))
continue;
//PddMobileBuyOrderForm buyOrderForm = new PddMobileBuyOrderForm(MainWindow.Instance.orderListCtrl.FilterOneOrder, StartUp.UpdateBalance,
// orderItem, buyer, orderItem.BuyMap);
//buyOrderForm.TitleText = "买手退货退款 - 当前买手 " + buyer.buyer_nick;
//buyOrderForm.InitUrl = "https://mobile.yangkeduo.com/complaint.html?order_sn=" + pddOrderSn + "&after_sales_reason=88&after_sales_type=2&after_sales_code=1002";
//buyOrderForm.pnlBuy.Visible = false;
//if (orderItem.BuyMap != null)
//{
// buyOrderForm.pnlBuy.Visible = true;
// buyOrderForm.pnlMap.Visible = false;
//}
//buyOrderForm.ShowDialog();
PddBuyerOrderLiteInfo pddBuyerOrderLiteInfo = new PddBuyerOrderLiteInfo();
pddBuyerOrderLiteInfo.ShopOrderIdStr = orderItem.order_id;
pddBuyerOrderLiteInfo.order_sn = pddOrderSn;
pddBuyerOrderLiteInfo.order_amount = orderItem.ItemTransitOrderWithVoid.out_amount;
order_pdd_buyer_after_sale pddBuyerAfterSale = new order_pdd_buyer_after_sale()
{
wx_order_id = orderItem.order_id,
wx_sku_id = orderItem.sku_id,
TransitCreateTime = orderItem.ItemTransitOrderWithVoid.created_time,
pre_allocated_order_no = orderItem.ItemTransitOrderWithVoid.pre_allocated_order_no,
buyerId = buyer.buyer_id,
buyerName = buyer.buyer_name,
orderSn = pddOrderSn,
orderAmount = pddBuyerOrderLiteInfo.order_amount,
refundAmount = pddBuyerOrderLiteInfo.order_amount,
orderDate = pddOrderSn.ParseToString().Split('-').FirstOrDefault().ParseToInt(),
};
if (orderItem.PddBuyerAfterSale != null)
pddBuyerAfterSale = orderItem.PddBuyerAfterSale;
bool isSimPddAfterSaleSuccess = true;
if (orderItem.TransitRefundStatusStr.Contains("需手动申请售后"))
{
isSimPddAfterSaleSuccess = false;
var rst = PDDBuyerOrderReadCtrl.SimPddAfterSaleWithReturnGoods(buyer, pddBuyerOrderLiteInfo);
var afterSalesStatus = BaseRegex.GetIntJson(ref rst, "after_sales_status");
var afterSalesId = BaseRegex.GetLongJson(ref rst, "after_sales_id");
pddBuyerAfterSale.afterSalesId = afterSalesId.ToString();
if (afterSalesStatus == 0)
{
var msg = BaseRegex.GetStringJsonByRegs(ref rst, rst, "msg", "err_msg", "error_msg", "errorMsg", "errMsg");
BaseMsgWindow.ShowAnimateMessage(msg, "Error", 3);
Thread.Sleep(5000);
}
else
{
var e57Rst = PDDBuyerOrderReadCtrl.SendTransitAfterSaleE57(pddBuyerOrderLiteInfo, "待用户发货");
if (e57Rst.Contains("<code>0</code>") || e57Rst.Contains("<code>200</code>"))
{
BaseMsgWindow.ShowAnimateMessage("买手退款信息更新成功", "Msg", 3);
isSimPddAfterSaleSuccess = true;
Thread.Sleep(Randomx.GetId(10000, 10001));
}
else
{
var msg = BaseRegex.GetStringXml(ref e57Rst, "msg");
BaseMsgWindow.ShowAnimateMessage("买手退款信息更新失败,服务端返回 " + msg, "Error", 3);
}
}
}
if (isSimPddAfterSaleSuccess)
{
var addressRst = YkdBuyerOrder.GetAfterSaleAddress(buyer, pddOrderSn, pddBuyerAfterSale.afterSalesId.ParseToString());
var merchantReceiverInfo = BaseRegex.GetOneJsonObjStrJson(ref addressRst, "merchantReceiverInfo");
string address = "";
if (merchantReceiverInfo != null)
{
address = BaseRegex.GetStringJson(ref merchantReceiverInfo, "copyValue");
}
var url3 = BaseClass.Build29WxObjString("order/wx_add_mdy_buyer_after_sale");
var data3 = UserLogin.GetSignaturex();
data3 += "&wx_order_id=" + pddBuyerAfterSale.wx_order_id;
data3 += "&wx_sku_id=" + pddBuyerAfterSale.wx_sku_id;
data3 += "&TransitCreateTime=" + pddBuyerAfterSale.TransitCreateTime.ToString("yyyy-MM-dd HH:mm:ss");
data3 += "&pre_allocated_order_no=" + pddBuyerAfterSale.pre_allocated_order_no;
data3 += "&buyerId=" + pddBuyerAfterSale.buyerId;
data3 += "&buyerName=" + pddBuyerAfterSale.buyerName;
data3 += "&orderAmount=" + pddBuyerAfterSale.orderAmount;
data3 += "&orderSn=" + pddBuyerAfterSale.orderSn;
data3 += "&afterSalesId=" + pddBuyerAfterSale.afterSalesId;
data3 += "&orderDate=" + pddBuyerAfterSale.orderDate;
//data3 += "&TransitPickupTime=" + pddBuyerOrder.TransitPickupTime.ToString("yyyy-MM-dd HH:mm:ss");
data3 += "&refundAmount=" + pddBuyerAfterSale.refundAmount;
data3 += "&statusText=" + pddBuyerAfterSale.statusText;
if (!string.IsNullOrEmpty(address))
data3 += "&afterSaleAddress=" + address;
//data3 += "&is_mdy=true";
var html3 = GetHtml.PostUtf8(url3, data3);
if (string.IsNullOrEmpty(html3) || !html3.Contains("\"code\":200"))
html3 = GetHtml.PostUtf8(url3, data3);
}
MainWindow.Instance.orderListCtrl.GetOrder(tmpOrderItem.order_id);
Dispatcher.Invoke(new Action(() => { txtMsg.Text = "正在处理买手退货,总计:" + tmpOrderItems.Count + ",已处理:" + index; }));
}
Dispatcher.Invoke(new Action(() => { txtMsg.Text = "买手退货处理完成,总计:" + tmpOrderItems.Count + ",已处理:" + index; }));
});
}
public static string WxSimAbnormalOrderSeach(ShopLoginInfo shop, int page = 1)
{
string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeorder/list/cgi/orderSearch?token=&lang=zh_CN";
string referer = "https://store.weixin.qq.com/shop/order/list";
string body = @"{""isSearch"":false,""pageSize"":100,""overTime"":0,""pengingShipOneDay"":0,""pengingShipSixHour"":0,""expediteDelivery"":0," +
@"""stockoutPunishAlert"":0,""appointmentInstall"":0,""waybillStatus"":3,""isUserBookingDelivery"":0,""pageNum"":" + page + @",""onAftersaleOrderExist"":0,""orderStatus"":30}";
var result = HttpResponseWXBLL.WeiXinPostResponse(shop, url, body, referer);
return result;
}
private void btnMultiRemark_Click(object sender, RoutedEventArgs e)
{
wpFilterRemarkSelect.Children.Clear();
List<string> txts = txtFilterRemark.Text.Trim().Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries).ToList();
var remarks = GlobalConfig.lstOrder.Select(o => o.shop_remark).Distinct().ToList();
remarks.AddRange(GlobalConfig.lstOrder.Select(o => o.soft_remark).Distinct().ToList());
remarks = remarks.Distinct().ToList();
foreach (var remark in remarks)
{
if (string.IsNullOrWhiteSpace(remark))
continue;
wpFilterRemarkSelect.Children.Add(new CheckBox() { Content = remark, IsChecked = txts.Contains(remark), Margin = new Thickness(2) });
}
Point position = txtFilterRemark.TranslatePoint(new Point(0, 0), gridOrderListCtrl);
borderFilterRemarkSelect.Margin = new Thickness(position.X - 2, position.Y + txtFilterRemark.ActualHeight + 3, 0, 0);
if (borderFilterRemarkSelect.Visibility == Visibility.Visible)
borderFilterRemarkSelect.Visibility = Visibility.Collapsed;
else
borderFilterRemarkSelect.Visibility = Visibility.Visible;
}
private void btnCancelFilterRemark_Click(object sender, RoutedEventArgs e)
{
borderFilterRemarkSelect.Visibility = Visibility.Collapsed;
}
private void btnApplyFilterRemark_Click(object sender, RoutedEventArgs e)
{
string txt = "";
foreach (UIElement element in wpFilterRemarkSelect.Children)
{
if (element is CheckBox box && box.IsChecked == true)
{
txt += box.Content.ParseToString() + ";";
}
}
txtFilterRemark.Text = txt.TrimEnd(';');
borderFilterRemarkSelect.Visibility = Visibility.Collapsed;
}
private void btnFilterRemarkSelectAll_Click(object sender, RoutedEventArgs e)
{
foreach (UIElement element in wpFilterRemarkSelect.Children)
{
if (element is CheckBox box)
{
box.IsChecked = true;
}
}
}
private void btnFilterRemarkUnSelectAll_Click(object sender, RoutedEventArgs e)
{
foreach (UIElement element in wpFilterRemarkSelect.Children)
{
if (element is CheckBox box)
{
box.IsChecked = false;
}
}
}
private void txtFilterRemark_TextChanged(object sender, TextChangedEventArgs e)
{
lstFilterText = txtFilterRemark.Text.Trim().Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries).Distinct().ToList();
}
} }
} }
@@ -90,7 +90,7 @@
<RowDefinition Height="*"></RowDefinition> <RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBox Text="成交时间:" Grid.Column="1" Grid.Row="1" Margin="0,2,4,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0"/> <TextBox Text="成交时间:" Grid.Column="1" Grid.Row="1" Margin="0,2,4,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0"/>
<uc:UcWaterMarkTextBox1 WaterMark="成交时间" Text="{Binding ItemOrder.create_time_str}" Grid.Column="1" Grid.Row="1" Margin="60,2,4,2" VerticalAlignment="Top" <uc:UcWaterMarkTextBox1 WaterMark="成交时间" Text="{Binding CreateDateTimeStr}" Grid.Column="1" Grid.Row="1" Margin="60,2,4,2" VerticalAlignment="Top"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap"/> Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap"/>
<TextBox Text="发货时间:" Grid.Column="1" Grid.Row="2" Margin="0,2,4,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0" <TextBox Text="发货时间:" Grid.Column="1" Grid.Row="2" Margin="0,2,4,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0"
Visibility="{Binding ItemOrder.ship_done_time_visibility}"/> Visibility="{Binding ItemOrder.ship_done_time_visibility}"/>
@@ -98,8 +98,11 @@
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap" Visibility="{Binding ItemOrder.ship_done_time_visibility}"/> Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap" Visibility="{Binding ItemOrder.ship_done_time_visibility}"/>
<TextBox Text="退款时间:" Grid.Column="1" Grid.Row="3" Margin="0,2,4,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0" <TextBox Text="退款时间:" Grid.Column="1" Grid.Row="3" Margin="0,2,4,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0"
Visibility="{Binding RefundTimeVisibility}"/> Visibility="{Binding RefundTimeVisibility}"/>
<uc:UcWaterMarkTextBox1 WaterMark="退款时间" Text="{Binding RefundTimeStr}" Grid.Column="1" Grid.Row="3" Margin="60,2,4,2" VerticalAlignment="Top" <uc:UcWaterMarkTextBox1 WaterMark="退款时间" Text="{Binding RefundDateTimeStr}" Grid.Column="1" Grid.Row="3" Margin="60,2,4,2" VerticalAlignment="Top"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap" Visibility="{Binding RefundTimeVisibility}"/> Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap" Visibility="{Binding RefundTimeVisibility}"/>
<!--<TextBox Text="更新时间:" Grid.Column="1" Grid.Row="4" Margin="0,2,4,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0"/>
<uc:UcWaterMarkTextBox1 WaterMark="更新时间" Text="{Binding UpdateDateTimeStr}" Grid.Column="1" Grid.Row="4" Margin="60,2,4,2" VerticalAlignment="Top"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap"/>-->
</Grid> </Grid>
<!--订单利润--> <!--订单利润-->
<Grid Grid.Column="4" Background="Transparent" VerticalAlignment="Center"> <Grid Grid.Column="4" Background="Transparent" VerticalAlignment="Center">
@@ -161,11 +164,19 @@
<RowDefinition Height="*"></RowDefinition> <RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Border x:Name="borderDeadline" Grid.Row="1" Margin="8,0,0,0" Background="{Binding OrderItemStatusBackColor}" BorderBrush="{Binding OrderItemStatusBorderColor}" <WrapPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<Border Grid.Row="1" Margin="8,0,0,0" Background="{Binding OrderItemStatusBackColor}" BorderBrush="{Binding OrderItemStatusBorderColor}"
BorderThickness="1" MinWidth="30" Height="auto" CornerRadius="2" HorizontalAlignment="Center"> BorderThickness="1" MinWidth="30" Height="auto" CornerRadius="2" HorizontalAlignment="Center">
<TextBox x:Name="txtDeadline" Grid.Column="1" Margin="2,0,2,1" Foreground="{Binding OrderItemStatusStrColor}" VerticalContentAlignment="Center" VerticalAlignment="Center" <TextBox Grid.Column="1" Margin="2,0,2,1" Foreground="{Binding OrderItemStatusStrColor}" VerticalContentAlignment="Center" VerticalAlignment="Center"
Background="Transparent" IsReadOnly="True" MinWidth="20" Text="{Binding OrderItemStatusStr}" BorderThickness="0" /> Background="Transparent" IsReadOnly="True" MinWidth="20" Text="{Binding OrderItemStatusStr}" BorderThickness="0" />
</Border> </Border>
<Border Grid.Row="1" Margin="8,0,0,0" Background="{StaticResource PageWarningBrush50}" BorderBrush="{StaticResource PageWarningBrushCC}"
BorderThickness="1" MinWidth="30" Height="auto" CornerRadius="2" HorizontalAlignment="Center"
Visibility="{Binding ElementName=txtWaybillException,Path=Text,Converter={StaticResource HasTextVisibility}}">
<TextBox x:Name="txtWaybillException" Grid.Column="1" Margin="2,0,2,1" Foreground="{StaticResource PageWarningBrush}" VerticalContentAlignment="Center" VerticalAlignment="Center"
Background="Transparent" IsReadOnly="True" MinWidth="20" Text="{Binding ShopWaybillExceptionStr}" BorderThickness="0" />
</Border>
</WrapPanel>
<TextBox Text="{Binding ItemRefund.RefundStatusStr}" Grid.Column="1" Grid.Row="2" Margin="0,2,0,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" <TextBox Text="{Binding ItemRefund.RefundStatusStr}" Grid.Column="1" Grid.Row="2" Margin="0,2,0,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True"
x:Name="txtStatusStr" BorderThickness="0" Foreground="{Binding ItemRefund.RefundStatusColor}" HorizontalAlignment="Center" x:Name="txtStatusStr" BorderThickness="0" Foreground="{Binding ItemRefund.RefundStatusColor}" HorizontalAlignment="Center"
Visibility="{Binding ElementName=txtStatusStr,Path=Text,Converter={StaticResource HasTextVisibility}}"/> Visibility="{Binding ElementName=txtStatusStr,Path=Text,Converter={StaticResource HasTextVisibility}}"/>
@@ -178,10 +189,14 @@
<WrapPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="5" Width="auto" HorizontalAlignment="Center"> <WrapPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="5" Width="auto" HorizontalAlignment="Center">
<TextBox Text="收货地址:" Grid.Column="1" Grid.Row="5" Margin="0,2,0,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0"/> <TextBox Text="收货地址:" Grid.Column="1" Grid.Row="5" Margin="0,2,0,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0"/>
<uc:UcWaterMarkTextBox1 WaterMark="收货地址" Text="{Binding ItemOrder.address_str}" Grid.Column="1" Grid.Row="5" Margin="0,2,4,2" VerticalAlignment="Top" <uc:UcWaterMarkTextBox1 Grid.Column="1" Grid.Row="5" x:Name="txtUserAddress" WaterMark="收货地址" Text="{Binding ItemOrder.AddressStr,Converter={StaticResource TextEllipsisConverter26}}"
Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap"/> Margin="0,2,4,2" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="0" TextWrapping="Wrap" ToolTip="{Binding ItemOrder.AddressStr}"/>
<Button Grid.Column="10" x:Name="btnSeeAddressDetail" Background="Transparent" Foreground="{StaticResource PageLinkBrush}" BorderBrush="Transparent" <Border Grid.Column="6" Width="12" Background="Transparent" Height="12" VerticalAlignment="Center" Cursor="Hand"
Margin="4,0,0,0" Content="👁" Click="btnSeeAddressDetail_Click" Tag="{Binding order_id}"></Button> MouseLeftButtonDown="pathCopyAddress_MouseLeftButtonDown" Visibility="{Binding ElementName=txtUserAddress,Path=Visibility}">
<Path Margin="0,0,0,0" Fill="{StaticResource PageLinkBrush}" MouseLeftButtonDown="pathCopyAddress_MouseLeftButtonDown" 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" Stretch="Uniform" />
</Border>
<Button x:Name="btnSeeAddressDetail" Background="Transparent" Foreground="{StaticResource PageLinkBrush}" BorderBrush="Transparent"
Margin="4,0,0,0" Content="👁" Click="btnSeeAddressDetail_Click" Tag="{Binding order_id}" Cursor="Hand"></Button>
</WrapPanel> </WrapPanel>
<!--<Button Grid.Column="1" Grid.Row="6" x:Name="btnGetRefundAddress" Background="Transparent" HorizontalAlignment="Center" Foreground="{StaticResource PageLinkBrush}" BorderBrush="Transparent" <!--<Button Grid.Column="1" Grid.Row="6" x:Name="btnGetRefundAddress" Background="Transparent" HorizontalAlignment="Center" Foreground="{StaticResource PageLinkBrush}" BorderBrush="Transparent"
Margin="4,0,0,0" Content="仓库退货地址:点击复制" Click="btnGetRefundAddress_Click" Tag="{Binding order_id}"></Button>--> Margin="4,0,0,0" Content="仓库退货地址:点击复制" Click="btnGetRefundAddress_Click" Tag="{Binding order_id}"></Button>-->
@@ -350,26 +365,38 @@
<uc:UcWaterMarkTextBox1 x:Name="txtShopRemark" WaterMark="店铺备注" Text="{Binding ItemOrder.shop_remark}" Grid.Column="1" Grid.Row="2" Margin="0,1,0,1" <uc:UcWaterMarkTextBox1 x:Name="txtShopRemark" WaterMark="店铺备注" Text="{Binding ItemOrder.shop_remark}" Grid.Column="1" Grid.Row="2" Margin="0,1,0,1"
VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="1" TextWrapping="Wrap"/> VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="1" TextWrapping="Wrap"/>
<Button Grid.Column="1" Grid.Row="2" x:Name="btnEditShopRemark" Background="Transparent" HorizontalAlignment="Center" Foreground="{StaticResource PageLinkBrush}" BorderBrush="Transparent" <Button Grid.Column="1" Grid.Row="2" x:Name="btnEditShopRemark" Background="Transparent" HorizontalAlignment="Center" Foreground="{StaticResource PageLinkBrush}" BorderBrush="Transparent"
Margin="2,0,0,0" Content="编辑" Click="btnEditShopRemark_Click"></Button> Margin="2,0,0,0" Content="编辑" Click="btnEditShopRemark_Click" Cursor="Hand"></Button>
<Button Grid.Column="1" Grid.Row="2" x:Name="btnCancelEditShopRemark" Background="Transparent" HorizontalAlignment="Center" Foreground="{StaticResource PageLinkBrush}" BorderBrush="Transparent" <Button Grid.Column="1" Grid.Row="2" x:Name="btnCancelEditShopRemark" Background="Transparent" HorizontalAlignment="Center" Foreground="{StaticResource PageLinkBrush}" BorderBrush="Transparent"
Margin="0,0,0,0" Content="取消" Click="btnCancelEditShopRemark_Click" Visibility="Collapsed"></Button> Margin="0,0,0,0" Content="取消" Click="btnCancelEditShopRemark_Click" Visibility="Collapsed" Cursor="Hand"></Button>
</WrapPanel> </WrapPanel>
<WrapPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="3"> <WrapPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="3">
<TextBox Text="软件备注:" Grid.Column="1" Grid.Row="2" Margin="0,1,-8,1" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderBrush="Transparent" BorderThickness="1"/> <TextBox Text="软件备注:" Grid.Column="1" Grid.Row="2" Margin="0,1,-8,1" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderBrush="Transparent" BorderThickness="1"/>
<uc:UcWaterMarkTextBox1 x:Name="txtAppRemark" WaterMark="软件备注" Text="{Binding ItemOrder.soft_remark}" Grid.Column="1" Grid.Row="2" Margin="0,1,0,1" <uc:UcWaterMarkTextBox1 x:Name="txtAppRemark" WaterMark="软件备注" Text="{Binding ItemOrder.soft_remark}" Grid.Column="1" Grid.Row="2" Margin="0,1,0,1"
VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="1" TextWrapping="Wrap"/> VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="1" TextWrapping="Wrap"/>
<Button Grid.Column="1" Grid.Row="2" x:Name="btnEditAppRemark" Background="Transparent" HorizontalAlignment="Center" Foreground="{StaticResource PageLinkBrush}" BorderBrush="Transparent" <Button Grid.Column="1" Grid.Row="2" x:Name="btnEditAppRemark" Background="Transparent" HorizontalAlignment="Center" Foreground="{StaticResource PageLinkBrush}" BorderBrush="Transparent"
Margin="2,0,0,0" Content="编辑" Click="btnEditAppRemark_Click"></Button> Margin="2,0,0,0" Content="编辑" Click="btnEditAppRemark_Click" Cursor="Hand"></Button>
<Button Grid.Column="1" Grid.Row="2" x:Name="btnCancelEditAppRemark" Background="Transparent" HorizontalAlignment="Center" Foreground="{StaticResource PageLinkBrush}" BorderBrush="Transparent" <Button Grid.Column="1" Grid.Row="2" x:Name="btnCancelEditAppRemark" Background="Transparent" HorizontalAlignment="Center" Foreground="{StaticResource PageLinkBrush}" BorderBrush="Transparent"
Margin="0,0,0,0" Content="取消" Click="btnCancelEditAppRemark_Click" Visibility="Collapsed"></Button> Margin="0,0,0,0" Content="取消" Click="btnCancelEditAppRemark_Click" Visibility="Collapsed" Cursor="Hand"></Button>
</WrapPanel> </WrapPanel>
<WrapPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="4" Visibility="{Binding AddEditTransitWarehouseAfterSaleStr,Converter={StaticResource HasTextVisibility}}"> <WrapPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="4" Visibility="{Binding AddEditTransitWarehouseAfterSaleStr,Converter={StaticResource HasTextVisibility}}">
<TextBox Text="中转售后:" Grid.Column="1" Grid.Row="2" Margin="0,1,-8,1" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderBrush="Transparent" BorderThickness="1"/> <TextBox Text="中转售后:" Grid.Column="1" Grid.Row="2" Margin="0,1,-8,1" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderBrush="Transparent" BorderThickness="1"/>
<uc:UcWaterMarkTextBox1 x:Name="txtTransitWarehouseAfterSale" WaterMark="订单售后" Text="{Binding ItemOrder.soft_remark}" Grid.Column="1" Grid.Row="2" Margin="0,1,0,1" <uc:UcWaterMarkTextBox1 x:Name="txtTransitWarehouseAfterSale" WaterMark="中转售后" Text="{Binding TransitWarehouseAfterSaleWayBillStr}" Grid.Column="1" Grid.Row="2" Margin="0,1,0,1"
VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="1" TextWrapping="Wrap"/> VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="1" TextWrapping="Wrap"/>
<!--Visibility="{Binding Text,RelativeSource={RelativeSource Self},Converter={StaticResource HasTextVisibility}}"-->
<Button Grid.Column="1" Grid.Row="2" x:Name="btnAddEditTransitWarehouseAfterSale" Background="Transparent" HorizontalAlignment="Center" Foreground="{StaticResource PageLinkBrush}" BorderBrush="Transparent" <Button Grid.Column="1" Grid.Row="2" x:Name="btnAddEditTransitWarehouseAfterSale" Background="Transparent" HorizontalAlignment="Center" Foreground="{StaticResource PageLinkBrush}" BorderBrush="Transparent"
Margin="2,0,0,0" Content="{Binding AddEditTransitWarehouseAfterSaleStr}" Click="btnAddEditTransitWarehouseAfterSale_Click"></Button> Margin="2,0,0,0" Content="{Binding AddEditTransitWarehouseAfterSaleStr}" Click="btnAddEditTransitWarehouseAfterSale_Click" Cursor="Hand"></Button>
</WrapPanel>
<WrapPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="5" Width="auto" Visibility="{Binding AddEditTransitWarehouseAfterSaleStr,Converter={StaticResource HasTextVisibility}}">
<TextBox Text="总店地址:" Grid.Column="1" Grid.Row="2" Margin="0,1,-8,1" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderBrush="Transparent" BorderThickness="1"/>
<!--<TextBlock Text="{Binding PddBuyerAfterSaleAddressStr}" TextTrimming="CharacterEllipsis" Width="100" ToolTip="这是一个非常长的文本字符串,需要显示省略号..." Visibility="Collapsed" x:Name="tbBuyerRefundAddress"/>-->
<uc:UcWaterMarkTextBox1 WaterMark="总店退货地址" Text="{Binding PddBuyerAfterSaleAddressStr,Converter={StaticResource TextEllipsisConverter}}" ToolTip="{Binding PddBuyerAfterSaleAddressStr}"
x:Name="txtBuyerRefundAddress" Margin="0,1,0,1" VerticalAlignment="Top" Background="Transparent" IsReadOnly="True" BorderThickness="1" TextWrapping="Wrap"
Visibility="{Binding Text,RelativeSource={RelativeSource Self},Converter={StaticResource HasTextVisibility}}"/>
<Border Grid.Column="6" Width="12" Background="Transparent" Height="12" VerticalAlignment="Center" Cursor="Hand"
MouseLeftButtonDown="pathBuyerAfterSaleAddress_MouseLeftButtonDown" Visibility="{Binding ElementName=txtBuyerRefundAddress,Path=Visibility}">
<Path Margin="0,0,0,0" Fill="{StaticResource PageLinkBrush}" MouseLeftButtonDown="pathBuyerAfterSaleAddress_MouseLeftButtonDown" 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" Stretch="Uniform" />
</Border>
</WrapPanel> </WrapPanel>
</Grid> </Grid>
<!--操作--> <!--操作-->
@@ -72,11 +72,110 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
} }
} }
private void btnSeeAddressDetail_Click(object sender, RoutedEventArgs e) private async void btnSeeAddressDetail_Click(object sender, RoutedEventArgs e)
{ {
var order = this.DataContext as oms_wei_order_item_info; var orderItem = this.DataContext as oms_wei_order_item_info;
if (order == null) if (orderItem == null)
return; return;
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == orderItem.shop_id.ParseToString());
if (shop == null)
return;
ShowOrderAddress(shop, orderItem.order_id);
}
void ShowOrderAddress(ShopLoginInfo shop, string orderId, bool ShowErrorDialog = true)
{
//var rows = dgvOrder.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colOrderId"].Value.ParseToString() == orderId);
var order = GlobalConfig.lstOrder.FirstOrDefault(o => o.order_id == orderId);
var deRst = "测试地址写入{\"code\"0}";
deRst = decryptOrder(shop, orderId);
if (deRst.Contains("\"code\":0"))
{
var url = BaseClass.Build29WxObjString("shop/wx_add_mdy_order_address");
var data = UserLogin.GetSignaturex();
data += "&shop_id=" + shop.ShopId;
data += "&order_id=" + orderId;
data += "&order_address=" + GetHtml.UrlEncodeUtf8(deRst);
var html = GetHtml.PostUtf8(url, data);
if (!html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
if (!html.Contains("\"code\":200"))
{
var errMsg = BaseRegex.GetStringJsonByRegs(ref html, html, "msg");
if (order != null)
{
this.Dispatcher.Invoke(new Action(() =>
{
order.AddressStr = GetDecryptOrder(deRst);
if (ShowErrorDialog)
BaseMsgWindow.ShowAnimateMessage("查看地址成功但保存到服务端失败:" + errMsg, "Error", 5);
}));
}
}
else
{
if (order != null)
{
this.Dispatcher.Invoke(new Action(() =>
{
order.AddressStr = GetDecryptOrder(deRst);
BaseMsgWindow.ShowAnimateMessage("查看地址成功");
}));
}
}
}
else
{
var error = BaseRegex.GetStringJsonByRegs(ref deRst, deRst, "err_msg", "error_msg", "errMsg", "errorMsg", "msg");
if (error.Contains("\"code\":17899002") || error.Contains("\"code\":10020123"))
{
if (error.Contains("\"code\":17899002"))
error = "基于用户隐私保护,无法查看收货信息";
if (error.Contains("\"code\":10020123"))
error = "今日查看次数已用完";
Dispatcher.Invoke(new Action(() =>
{
if (ShowErrorDialog)
BaseMsgWindow.ShowAnimateMessage("查看地址失败:" + error, "Error", 5);
}));
}
else
{
Dispatcher.Invoke(new Action(() =>
{
if (ShowErrorDialog)
BaseMsgWindow.ShowAnimateMessage("查看地址失败:" + error, "Error", 5);
}));
}
}
}
public string GetDecryptOrder(string sourceOrderAddressStr)
{
//黄颖飞(4559),18466134204-4559,广西壮族自治区柳州市柳南区福柳宏都8-1-701 (拨打请输入分机号4559)
var userName = BaseRegex.GetStringJson(ref sourceOrderAddressStr, "userName"); // 黄颖飞
var extension = BaseRegex.GetStringJson(ref sourceOrderAddressStr, "extension"); // 4559
var virtualNumber = BaseRegex.GetStringJson(ref sourceOrderAddressStr, "virtualNumber"); // 18466134204
var provinceName = BaseRegex.GetStringJson(ref sourceOrderAddressStr, "provinceName"); // 广西壮族自治区
var cityName = BaseRegex.GetStringJson(ref sourceOrderAddressStr, "cityName"); // 柳州市
var countyName = BaseRegex.GetStringJson(ref sourceOrderAddressStr, "countyName"); // 柳南区
var detailInfo = BaseRegex.GetStringJson(ref sourceOrderAddressStr, "detailInfo"); // 福柳宏都8-1-701
if (userName.IsNullOrEmpty() || extension.IsNullOrEmpty() || virtualNumber.IsNullOrEmpty() || provinceName.IsNullOrEmpty() || cityName.IsNullOrEmpty() ||
countyName.IsNullOrEmpty() || detailInfo.IsNullOrEmpty())
{
return sourceOrderAddressStr;
}
//return userName + "(" + extension + ")," + virtualNumber + "-" + extension + "," + provinceName + cityName + countyName + detailInfo + "(拨打请输入分机号" + extension + ")";
return userName + "" + extension + "," + virtualNumber + "-" + extension + "," + provinceName + cityName + countyName + detailInfo + "拨打请输入分机号" + extension + "";
}
public static string decryptOrder(ShopLoginInfo shop, string orderId)
{
string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeorder/common/cgi/decryptOrder?token=&lang=zh_CN";
string body = @"{""id"":""" + orderId + @"""}";
string refere = "https://store.weixin.qq.com/shop/order/list";
var result = HttpResponseWXBLL.WeiXinPostResponse(shop, url, body, refere);
return result;
} }
private void btnGetRefundAddress_Click(object sender, RoutedEventArgs e) private void btnGetRefundAddress_Click(object sender, RoutedEventArgs e)
@@ -215,9 +314,13 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
BaseMsgWindow.ShowError("多子单订单中转仓暂不支持"); BaseMsgWindow.ShowError("多子单订单中转仓暂不支持");
return; return;
} }
if (GlobalConfig.lstOrder.Any(o => o.orderItems.Any(oi => oi.ItemTransitOrder?.order_no == orderItem.order_id && oi.ItemTransitOrder?.order_sku_id == orderItem.sku_id)))
if (!GetIsAbnormalOrderRebuy(orderItem) && GlobalConfig.lstOrder.Any(o => o.orderItems
.Any(oi => oi.ItemTransitOrder?.order_no == orderItem.order_id && oi.ItemTransitOrder?.order_sku_id == orderItem.sku_id)))
{ {
MainWindow.Instance.orderListCtrl.FilterOneOrder(orderItem.ItemOrder);
BaseMsgWindow.ShowError("已存在中转拍单信息,请核对后再拍单"); BaseMsgWindow.ShowError("已存在中转拍单信息,请核对后再拍单");
return;
} }
btnBuyOrder.Cursor = Cursors.Wait; btnBuyOrder.Cursor = Cursors.Wait;
@@ -241,20 +344,18 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
if (orderItem == null) if (orderItem == null)
return; return;
if (!isAbnormalOrder && orderItem.ItemTransitOrder != null)
if (isAbnormalOrder && orderItem.ItemOrder.status > 21 && orderItem.ItemTransitOrder != null && orderItem.ItemTransitOrder.refund_status == "买手退款成功")
{
// 异常单可以异常重拍
}
else if (!isAbnormalOrder)
{
// 正常单可以正常拍单
}
else
{ {
// 正常单有未作废订单的,不可再拍单
BaseMsgWindow.ShowAnimateMessage("该订单已有采购记录", "Error", 5);
return;
}
if (isAbnormalOrder && (orderItem.ItemOrder.status <= 21 || orderItem.ItemTransitOrder == null || orderItem.ItemTransitOrder.refund_status != "买手退款成功"))
{
// 异常单不是被拼多多买家秒退的且已取号的,不可异常重拍
BaseMsgWindow.ShowAnimateMessage("该异常单不符合重拍条件", "Error", 5);
return; return;
} }
// 如果是退款单,弹出退款窗口 // 如果是退款单,弹出退款窗口
if (/*orderItem?.ItemRefund?.count > 0 &&*/ orderItem.refund_status > 1) if (/*orderItem?.ItemRefund?.count > 0 &&*/ orderItem.refund_status > 1)
@@ -461,6 +562,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
PddMobileBuyOrderForm buyOrderForm = new PddMobileBuyOrderForm(MainWindow.Instance.orderListCtrl.FilterOneOrder, StartUp.UpdateBalance, PddMobileBuyOrderForm buyOrderForm = new PddMobileBuyOrderForm(MainWindow.Instance.orderListCtrl.FilterOneOrder, StartUp.UpdateBalance,
orderItem, GlobalConfig.CurrentPddBuyer, orderItem.BuyMap); orderItem, GlobalConfig.CurrentPddBuyer, orderItem.BuyMap);
buyOrderForm.TitleText = "买手拍单 - 当前买手 " + GlobalConfig.CurrentPddBuyer.buyer_nick;
// 未关联拍单的跳到所有订单页面 // 未关联拍单的跳到所有订单页面
buyOrderForm.InitUrl = "https://mobile.yangkeduo.com/orders.html"; //"?type=0&comment_tab=1&combine_orders=1&main_orders=1&refer_page_name=personal&refer_page_id=10001_1782219035613_a9ulipk4k3&refer_page_sn=10001"; buyOrderForm.InitUrl = "https://mobile.yangkeduo.com/orders.html"; //"?type=0&comment_tab=1&combine_orders=1&main_orders=1&refer_page_name=personal&refer_page_id=10001_1782219035613_a9ulipk4k3&refer_page_sn=10001";
buyOrderForm.pnlBuy.Visible = false; buyOrderForm.pnlBuy.Visible = false;
@@ -491,8 +594,6 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
if (isAbnormalOrder) if (isAbnormalOrder)
buyOrderForm.AbnormalTransitWarehouseOrderInfo = orderItem.ItemTransitOrder; buyOrderForm.AbnormalTransitWarehouseOrderInfo = orderItem.ItemTransitOrder;
buyOrderForm.ShowDialog(); buyOrderForm.ShowDialog();
// 窗口关闭后更新运费信息
MainWindow.Instance.Balance = BaseClass.Balance.ToString("0.00");
})); }));
}); });
} }
@@ -507,7 +608,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
//if (order_item.BuyMap == null && order_item.ItemOrder.out_amount == 0) //if (order_item.BuyMap == null && order_item.ItemOrder.out_amount == 0)
// txtProfitForecast.Visibility = Visibility.Visible; // txtProfitForecast.Visibility = Visibility.Visible;
order_item.UpdateOrderItemBuyButton(); // 绑定时即刻生效,无需再次手动调用
//order_item.UpdateOrderItemBuyButton();
Task.Run(() => Task.Run(() =>
{ {
@@ -533,13 +635,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
} }
// 异常重拍 // 异常重拍
if (order_item.ItemOrder.isAbnormal && order_item.BuyerTransitWaybillStatusStr != "已到中转仓" && btnVoidTransitOrder.Visibility == Visibility.Collapsed) if (GetIsAbnormalOrderRebuy(order_item))
{ {
// 取号异常/失败的异常单不能重拍
if (((order_item.ItemTransitOrderWithVoid?.raw_message).ParseToString().Contains("取号异常") || (order_item.ItemTransitOrderWithVoid?.raw_message).ParseToString().Contains("无法调用")) &&
order_item.ItemTransitOrderWithVoid?.transfer_warehouse_status != 1)
btnAbnormalOrderRebuy.Visibility = Visibility.Collapsed;
else
btnAbnormalOrderRebuy.Visibility = Visibility.Visible; btnAbnormalOrderRebuy.Visibility = Visibility.Visible;
} }
else else
@@ -565,6 +662,31 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
} }
} }
/// <summary>
/// 判断中转仓订单是否可以异常重拍
/// </summary>
/// <param name="order_item"></param>
/// <returns></returns>
bool GetIsAbnormalOrderRebuy(oms_wei_order_item_info order_item)
{
// 不是异常单的不可异常重拍
if (order_item?.ItemOrder?.isAbnormal != true)
return false;
// 买手未退款的,中转正式取号以后的,不可异常重拍
if (order_item.ItemTransitOrder?.refund_status != "买手退款成功" ||
order_item.WarehouseWaybillStatusStr == "中转已取号" || order_item.WarehouseWaybillStatusStr == "中转已入库" || order_item.WarehouseWaybillStatusStr == "中转已出库")
return false;
// 已正式取号的,不可异常重拍
if (order_item.ItemTransitOrder?.pre_allocated_order_no == 1 || order_item.ItemTransitOrder?.pre_allocated_order_no == 3)
return false;
// 仓库异常的异常单不可异常重拍
List<string> rawMsgKeyWords = new List<string> { "取号异常", "无法调用" };
if (rawMsgKeyWords.Any(k => (order_item.ItemTransitOrderWithVoid?.raw_message).ParseToString().Contains(k)) && order_item.ItemTransitOrderWithVoid?.transfer_warehouse_status != 1)
return false;
return true;
}
private void txtOutOrderNumStr_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) private void txtOutOrderNumStr_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{ {
var buyerName = txtOutOrderBuyerStr.Text.Split(':').LastOrDefault(); var buyerName = txtOutOrderBuyerStr.Text.Split(':').LastOrDefault();
@@ -574,6 +696,13 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
return; return;
} }
var buyer = GlobalConfig.PDDBuyerLoginList.FirstOrDefault(p => p.buyer_name == buyerName); var buyer = GlobalConfig.PDDBuyerLoginList.FirstOrDefault(p => p.buyer_name == buyerName);
if (buyer == null)
{
BaseMsgWindow.ShowError("该订单买手号未在当前账户登录");
return;
}
//GlobalConfig.CurrentPddBuyer = buyer;
var url = ""; var url = "";
if (buyer != null) if (buyer != null)
{ {
@@ -590,24 +719,20 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
BaseMsgWindow.ShowError("订单信息为空"); BaseMsgWindow.ShowError("订单信息为空");
return; return;
} }
if (GlobalConfig.CurrentPddBuyer == null)
{
BaseMsgWindow.ShowError("请选择买手号");
return;
}
// 拍单的时候检测一下买手号 // 拍单的时候检测一下买手号
if (GlobalConfig.CurrentPddBuyer.status == "在线") if (buyer.status == "在线")
{ {
PddMobileLoginForm.CheckBuyerLogin(GlobalConfig.CurrentPddBuyer); PddMobileLoginForm.CheckBuyerLogin(buyer);
} }
if (GlobalConfig.CurrentPddBuyer.status != "在线") if (buyer.status != "在线")
{ {
BaseMsgWindow.ShowError("买手号掉线"); BaseMsgWindow.ShowError("买手号掉线");
return; return;
} }
PddMobileBuyOrderForm buyOrderForm = new PddMobileBuyOrderForm(MainWindow.Instance.orderListCtrl.FilterOneOrder, StartUp.UpdateBalance, PddMobileBuyOrderForm buyOrderForm = new PddMobileBuyOrderForm(MainWindow.Instance.orderListCtrl.FilterOneOrder, StartUp.UpdateBalance,
orderItem, GlobalConfig.CurrentPddBuyer, orderItem.BuyMap); orderItem, buyer, orderItem.BuyMap);
buyOrderForm.TitleText = "订单查看 - 当前买手 " + buyer.buyer_nick;
//所有订单页面 //所有订单页面
buyOrderForm.InitUrl = url; buyOrderForm.InitUrl = url;
@@ -737,7 +862,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
if (GlobalConfig.CurrentPddBuyer.status != "在线") if (GlobalConfig.CurrentPddBuyer.status != "在线")
{ {
if (!isSilent) if (!isSilent)
if (BaseMsgWindow.ShowConfirm("买手掉线,点击确定直接作废中转单并手动取消买手单,点击取消登录买手后重试").DialogResult != true) if (BaseMsgWindow.ShowConfirm("买手号掉线,点击确定直接作废中转单并手动取消买手单,点击取消登录买手后重试").DialogResult != true)
return; return;
noBuyer = true; noBuyer = true;
} }
@@ -837,5 +962,37 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
BuyOrder(true); BuyOrder(true);
} }
} }
private void pathBuyerAfterSaleAddress_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
if (this.DataContext is oms_wei_order_item_info order_item)
{
try
{
Clipboard.SetText(order_item.PddBuyerAfterSaleAddressStr);
BaseMsgWindow.ShowAnimateMessage("复制成功");
}
catch (Exception ex)
{
BaseMsgWindow.ShowError("复制失败 " + ex.Message);
}
}
}
private void pathCopyAddress_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
if (this.DataContext is oms_wei_order_item_info order_item)
{
try
{
Clipboard.SetText((order_item.ItemOrder?.AddressStr).ParseToString());
BaseMsgWindow.ShowAnimateMessage("复制成功");
}
catch (Exception ex)
{
BaseMsgWindow.ShowError("复制失败 " + ex.Message);
}
}
}
} }
} }
+9 -3
View File
@@ -25,9 +25,15 @@
<Image Source="{StaticResource main29WeixinIcon}" Height="50" Width="50" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="4"></Image> <Image Source="{StaticResource main29WeixinIcon}" Height="50" Width="50" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="4"></Image>
<Label x:Name="lblAppName" FontSize="20" Margin="0,0,0,0" Foreground="{StaticResource mainColorLightBrush}" HorizontalAlignment="Center" <Label x:Name="lblAppName" FontSize="20" Margin="0,0,0,0" Foreground="{StaticResource mainColorLightBrush}" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalContentAlignment="Center" Content="拍单软件" Grid.Column="1"></Label> VerticalAlignment="Center" VerticalContentAlignment="Center" Content="拍单软件" Grid.Column="1"></Label>
<Label x:Name="lblVersion" FontSize="12" Margin="0,4,80,0" Foreground="{StaticResource mainColorLightBrush}" HorizontalAlignment="Right"
<WrapPanel Margin="0,4,80,0" Grid.Column="12" HorizontalAlignment="Right" VerticalAlignment="Top">
<Label x:Name="lblDebug" FontSize="12" Margin="2,4,0,0" Foreground="{StaticResource mainColorLightBrush}" HorizontalAlignment="Right"
VerticalAlignment="Top" VerticalContentAlignment="Center" Content="[release]" Opacity="0.7" Grid.Column="4"></Label>
<Label x:Name="lblVersion" FontSize="12" Margin="2,4,0,0" Foreground="{StaticResource mainColorLightBrush}" HorizontalAlignment="Right"
VerticalAlignment="Top" VerticalContentAlignment="Center" Content="版本信息" Opacity="0.7" Grid.Column="4"></Label> VerticalAlignment="Top" VerticalContentAlignment="Center" Content="版本信息" Opacity="0.7" Grid.Column="4"></Label>
</WrapPanel>
<Label x:Name="lblBalance" FontSize="12" Margin="0,25,80,0" HorizontalAlignment="Right" Foreground="#60ff66" MouseLeftButtonUp="lblBalance_MouseLeftButtonUp" <Label x:Name="lblBalance" FontSize="12" Margin="0,25,80,0" HorizontalAlignment="Right" Foreground="#60ff66" MouseLeftButtonUp="lblBalance_MouseLeftButtonUp"
VerticalAlignment="Top" VerticalContentAlignment="Center" Content="{Binding Balance}" Opacity="0.7" Grid.Column="4" Cursor="Hand"></Label> VerticalAlignment="Top" VerticalContentAlignment="Center" Content="{Binding Balance}" Opacity="0.7" Grid.Column="4" Cursor="Hand"></Label>
</Grid> </Grid>
@@ -55,11 +61,11 @@
<Border x:Name="borderMessage" Grid.Row="1" Width="auto" Height="auto" HorizontalAlignment="Center" Margin="10,50" VerticalAlignment="Top" BorderThickness="1" Opacity="0" <Border x:Name="borderMessage" Grid.Row="1" Width="auto" Height="auto" HorizontalAlignment="Center" Margin="10,50" VerticalAlignment="Top" BorderThickness="1" Opacity="0"
BorderBrush="{StaticResource pageColorBrush}" CornerRadius="6" Background="White" IsHitTestVisible="False" BorderBrush="{StaticResource pageColorBrush}" CornerRadius="6" Background="White" IsHitTestVisible="False"
MinWidth="120" MinHeight="2" Panel.ZIndex="1000000"> MinWidth="120" MinHeight="2" MaxWidth="1200" Panel.ZIndex="1000000">
<Border.Effect> <Border.Effect>
<DropShadowEffect ShadowDepth="5" Color="#FF98638f" BlurRadius="40" Opacity="0.2"/> <DropShadowEffect ShadowDepth="5" Color="#FF98638f" BlurRadius="40" Opacity="0.2"/>
</Border.Effect> </Border.Effect>
<TextBlock Text="这里是默认提示信息" Margin="10" VerticalAlignment="Center" HorizontalAlignment="Center" x:Name="tbMessage"></TextBlock> <TextBlock Text="这里是默认提示信息" Margin="10" VerticalAlignment="Center" HorizontalAlignment="Center" x:Name="tbMessage" TextWrapping="Wrap"></TextBlock>
</Border> </Border>
<!--<Image x:Name="imageBig" HorizontalAlignment="Left" Height="800" Width="800" VerticalAlignment="Center" Grid.Row="1" Margin="200,0,0,0"/>--> <!--<Image x:Name="imageBig" HorizontalAlignment="Left" Height="800" Width="800" VerticalAlignment="Center" Grid.Row="1" Margin="200,0,0,0"/>-->
</Grid> </Grid>
+2
View File
@@ -64,6 +64,8 @@ namespace _29WxOrderWpf
private void Window_Loaded(object sender, RoutedEventArgs e) private void Window_Loaded(object sender, RoutedEventArgs e)
{ {
lblDebug.Visibility = Visibility.Collapsed;
ucWindowBox.SetWindowMax(); ucWindowBox.SetWindowMax();
this.Title = BaseClass.ToolName; this.Title = BaseClass.ToolName;
@@ -142,6 +142,16 @@ namespace _29WxOrderWpf.Windows.LoginWindows
}); });
SaveUserList(); SaveUserList();
} }
#if DEBUG
MainWindow.Instance.lblDebug.Visibility = Visibility.Visible;
MainWindow.Instance.lblDebug.Content = "[Debug]";
MainWindow.Instance.lblDebug.Foreground = new SolidColorBrush(Color.FromRgb(100, 250, 255));
if (BaseClass.LoginApiUrl == BaseClass.DebugUrl)
{
MainWindow.Instance.lblDebug.Foreground = new SolidColorBrush(Color.FromRgb(0, 255, 100));
MainWindow.Instance.lblDebug.Content = "[Dev]";
}
#endif
this.IsLogin = true; this.IsLogin = true;
this.Close(); this.Close();
} }
+2
View File
@@ -171,6 +171,8 @@
<Compile Include="Model\DBModel\ErpMerchantInfo.cs" /> <Compile Include="Model\DBModel\ErpMerchantInfo.cs" />
<Compile Include="Model\DBModel\oms_wei_external_procurement_after_sale_info.cs" /> <Compile Include="Model\DBModel\oms_wei_external_procurement_after_sale_info.cs" />
<Compile Include="Model\DBModel\oms_wei_external_procurement_log_info.cs" /> <Compile Include="Model\DBModel\oms_wei_external_procurement_log_info.cs" />
<Compile Include="Model\DBModel\order_item_ext.cs" />
<Compile Include="Model\DBModel\order_pdd_buyer_after_sale.cs" />
<Compile Include="Model\DBModel\order_pdd_buyer_order.cs" /> <Compile Include="Model\DBModel\order_pdd_buyer_order.cs" />
<Compile Include="Model\DBModel\TransitWarehouseParam.cs" /> <Compile Include="Model\DBModel\TransitWarehouseParam.cs" />
<Compile Include="Model\DBModel\user_payment_record.cs" /> <Compile Include="Model\DBModel\user_payment_record.cs" />
+1 -1
View File
@@ -32,7 +32,7 @@ namespace AllBase
/// 版本ID /// 版本ID
/// </summary> /// </summary>
public static int VersionCount = 183; public static int VersionCount = 190;
public static string ServerUrl { get; set; } = "http://1.13.195.131:9000"; public static string ServerUrl { get; set; } = "http://1.13.195.131:9000";
public static string DebugUrl { get; set; } = "http://localhost:9000"; public static string DebugUrl { get; set; } = "http://localhost:9000";
+65 -22
View File
@@ -40,7 +40,6 @@ namespace AllBase.Model.DBModel
{ {
if (order_id == "3737846414389704448") if (order_id == "3737846414389704448")
{ {
} }
if (status != 20 && status != 21) return false; if (status != 20 && status != 21) return false;
if (orderItems.All(oi => oi.ItemTransitOrder != null)) return false; if (orderItems.All(oi => oi.ItemTransitOrder != null)) return false;
@@ -92,7 +91,7 @@ namespace AllBase.Model.DBModel
set { } set { }
} }
/// <summary> /// <summary>
/// 售后订单(不含售后关闭) /// 售后订单(不含售后关闭) -- 改为售后完成订单 260726
/// </summary> /// </summary>
public bool IsRefund public bool IsRefund
{ {
@@ -112,15 +111,16 @@ namespace AllBase.Model.DBModel
{ {
get get
{ {
if (this.order_id == "3737682397646176256") if (this.order_id == "3737832436815518208")
{ {
} }
if (orderItems.Any(oi => oi.refund_status == 2 || oi.refund_status == 3 || oi.ItemTransitOrders.Count > 0 && if (orderItems.Any(oi => oi.refund_status == 2 || oi.refund_status == 3 || (oi.ItemTransitOrders.Count > 0 &&
oi.ItemTransitOrders.Any(t => !string.IsNullOrEmpty(t.refund_status) && oi.ItemTransitOrders.Any(t => !string.IsNullOrEmpty(t.refund_status) &&
!t.refund_status.Contains("需手动申请售后") &&
!t.refund_status.Contains("退款成功") && !t.refund_status.Contains("退款成功") &&
!t.refund_status.Contains("关闭") && !t.refund_status.Contains("关闭") &&
!t.refund_status.Contains("撤销")))) !t.refund_status.Contains("撤销")))))
{ {
return true; return true;
} }
@@ -140,6 +140,9 @@ namespace AllBase.Model.DBModel
} }
if (orderItems.Any(oi => !(oi.OrderItemExt?.abnormal_text).IsNullOrEmpty()))
return true;
// 订单无售后或者售后关闭,有未作废的仓库单且仓库单买手信息为退款成功 // 订单无售后或者售后关闭,有未作废的仓库单且仓库单买手信息为退款成功
if (orderItems.Any(oi => oi.refund_status <= 1 && oi.ItemTransitOrder != null && oi.ItemTransitOrder.refund_status == "买手退款成功")) if (orderItems.Any(oi => oi.refund_status <= 1 && oi.ItemTransitOrder != null && oi.ItemTransitOrder.refund_status == "买手退款成功"))
return true; return true;
@@ -177,19 +180,29 @@ namespace AllBase.Model.DBModel
set { } set { }
} }
public DateTime? createDateTime = null;
public DateTime RefundDatetime
{
get { return this.GetValue(x => x.RefundDatetime); }
set { this.SetValue(x => x.RefundDatetime, value); }
}
/// <summary> /// <summary>
/// 订单生成时间 /// 订单生成时间
/// </summary> /// </summary>
public string create_time_str public DateTime CreateDateTime
{ {
get get { return this.GetValue(x => x.CreateDateTime); }
{ private set { this.SetValue(x => x.CreateDateTime, value); }
if (createDateTime == null)
createDateTime = BaseClass.StampToDateTime(create_time);
return createDateTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
} }
set { }
/// <summary>
/// 订单更新时间
/// </summary>
public DateTime UpdateDateTime
{
get { return this.GetValue(x => x.UpdateDateTime); }
private set { this.SetValue(x => x.UpdateDateTime, value); }
} }
/// <summary> /// <summary>
@@ -300,10 +313,12 @@ namespace AllBase.Model.DBModel
set { } set { }
} }
public string address_str public string AddressStr
{ {
get { return user_name + " " + tel_number + " " + province_name + " " + city_name + " " + county_name + " " + detail_info; } //get { return user_name + " " + tel_number + " " + province_name + " " + city_name + " " + county_name + " " + detail_info; }
set { } //set { }
get { return this.GetValue(x => x.AddressStr); }
set { this.SetValue(x => x.AddressStr, value); }
} }
/// <summary> /// <summary>
@@ -329,9 +344,17 @@ namespace AllBase.Model.DBModel
/// 买家身份标识 /// 买家身份标识
/// </summary> /// </summary>
public string openid { get; set; } public string openid { get; set; }
public int create_time { get; set; } public int create_time
{
get { return this.GetValue(x => x.create_time); }
set { this.SetValue(x => x.create_time, value); this.CreateDateTime = BaseClass.StampToDateTime(create_time.ParseToInt()); }
}
public int update_time { get; set; } public int update_time
{
get { return this.GetValue(x => x.update_time); }
set { this.SetValue(x => x.update_time, value); this.UpdateDateTime = BaseClass.StampToDateTime(update_time.ParseToInt()); }
}
public string unionid { get; set; } public string unionid { get; set; }
/// <summary> /// <summary>
/// 状态10 待付款;20 待发货;21 部分发货;30 待收货;100 完成;200 全部商品售后之后,订单取消;250 未付款用户主动取消或超时未付款订单自动取消; /// 状态10 待付款;20 待发货;21 部分发货;30 待收货;100 完成;200 全部商品售后之后,订单取消;250 未付款用户主动取消或超时未付款订单自动取消;
@@ -392,7 +415,11 @@ namespace AllBase.Model.DBModel
/// <summary> /// <summary>
/// 延迟发货时间(微信小店:商品发货时效,超时此时间未发货即为发货超时) /// 延迟发货时间(微信小店:商品发货时效,超时此时间未发货即为发货超时)
/// </summary> /// </summary>
public int? delivery_deadline { get; set; } public int? delivery_deadline
{
get { return this.GetValue(x => x.delivery_deadline); }
set { this.SetValue(x => x.delivery_deadline, value); }
}
/// <summary> /// <summary>
/// 发货时间 /// 发货时间
/// </summary> /// </summary>
@@ -414,12 +441,28 @@ namespace AllBase.Model.DBModel
/// <summary> /// <summary>
/// 详细地址 /// 详细地址
/// </summary> /// </summary>
public string detail_info { get; set; } public string detail_info
public string tel_number { get; set; } {
get { return this.GetValue(x => x.detail_info); }
set { this.SetValue(x => x.detail_info, value); }
}
public string tel_number
{
get { return this.GetValue(x => x.tel_number); }
set { this.SetValue(x => x.tel_number, value); }
}
/// <summary> /// <summary>
/// 门牌号码 /// 门牌号码
/// </summary> /// </summary>
public string house_number { get; set; } public string house_number
{
get { return this.GetValue(x => x.house_number); }
set
{
this.SetValue(x => x.house_number, value);
this.AddressStr = user_name + " " + tel_number + " " + province_name + " " + city_name + " " + county_name + " " + detail_info;
}
}
/// <summary> /// <summary>
/// 虚拟发货订单联系方式(deliver_method=1时返回) /// 虚拟发货订单联系方式(deliver_method=1时返回)
/// </summary> /// </summary>
+289 -115
View File
@@ -76,6 +76,27 @@ namespace AllBase.Model.DBModel
} }
#endregion #endregion
/// <summary>
/// 订单扩展信息
/// </summary>
public order_item_ext OrderItemExt
{
get { return this.GetValue(x => x.OrderItemExt); }
set
{
this.SetValue(x => x.OrderItemExt, value);
ShopWaybillExceptionStr = value == null ? "" : value.abnormal_text.ParseToString();
}
}
/// <summary>
/// 店铺后台显示的物流异常信息(订单扩展信息)
/// </summary>
public string ShopWaybillExceptionStr
{
get { return this.GetValue(x => x.ShopWaybillExceptionStr); }
set { this.SetValue(x => x.ShopWaybillExceptionStr, value); }
}
public oms_wei_order_info ItemOrder public oms_wei_order_info ItemOrder
{ {
get { return this.GetValue(x => x.ItemOrder); } get { return this.GetValue(x => x.ItemOrder); }
@@ -100,8 +121,12 @@ namespace AllBase.Model.DBModel
else else
this.RefundResultStr = "商品退款数量:" + ItemRefund.count + ",订单状态:" + ItemOrder.orderStatusStr; this.RefundResultStr = "商品退款数量:" + ItemRefund.count + ",订单状态:" + ItemOrder.orderStatusStr;
this.ReturnWaybillIdStr = ItemRefund?.return_waybill_id; this.ReturnWaybillIdStr = ItemRefund?.return_waybill_id;
this.RefundTimeStr = BaseClass.StampToDateTime((ItemRefund?.create_time).ParseToInt()).ToString("yyyy-MM-dd HH:mm:ss");
this.RefundTimeVisibility = ItemRefund?.create_time > 0 ? Visibility.Visible : Visibility.Collapsed; this.RefundDatetime = ItemRefund?.create_time == null ? DateTime.MinValue : BaseClass.StampToDateTime((ItemRefund?.create_time).ParseToInt());
if (ItemOrder != null)
ItemOrder.RefundDatetime = this.RefundDatetime;
this.RefundDateTimeStr = RefundDatetime.ToString("yyyy-MM-dd HH:mm:ss");
this.RefundTimeVisibility = RefundDatetime == DateTime.MinValue ? Visibility.Collapsed : Visibility.Visible;
} }
/// <summary> /// <summary>
/// 退款状态文本 /// 退款状态文本
@@ -122,10 +147,18 @@ namespace AllBase.Model.DBModel
/// <summary> /// <summary>
/// 订单退款时间 /// 订单退款时间
/// </summary> /// </summary>
public string RefundTimeStr public DateTime RefundDatetime
{ {
get { return this.GetValue(x => x.RefundTimeStr); } get { return this.GetValue(x => x.RefundDatetime); }
set { this.SetValue(x => x.RefundTimeStr, value); } set { this.SetValue(x => x.RefundDatetime, value); }
}
/// <summary>
/// 订单退款时间文本
/// </summary>
public string RefundDateTimeStr
{
get { return this.GetValue(x => x.RefundDateTimeStr); }
set { this.SetValue(x => x.RefundDateTimeStr, value); }
} }
/// <summary> /// <summary>
/// 订单退款时间可见 /// 订单退款时间可见
@@ -170,12 +203,27 @@ namespace AllBase.Model.DBModel
get { return this.GetValue(x => x.PddBuyerOrder); } get { return this.GetValue(x => x.PddBuyerOrder); }
set { this.SetValue(x => x.PddBuyerOrder, value); } set { this.SetValue(x => x.PddBuyerOrder, value); }
} }
public List<order_pdd_buyer_after_sale> PddBuyerAfterSales { get; set; } = new List<order_pdd_buyer_after_sale>();
public order_pdd_buyer_after_sale PddBuyerAfterSale
{
get { return this.GetValue(x => x.PddBuyerAfterSale); }
set { this.SetValue(x => x.PddBuyerAfterSale, value); }
}
public string PddBuyerAfterSaleAddressStr
{
get { return this.GetValue(x => x.PddBuyerAfterSaleAddressStr); }
set { this.SetValue(x => x.PddBuyerAfterSaleAddressStr, value); }
}
public void SetTransitOrder() public void SetTransitOrder()
{ {
this.ItemTransitOrder = ItemTransitOrders?.FirstOrDefault(t => t.order_void_status != 1); this.ItemTransitOrder = ItemTransitOrders?.FirstOrDefault(t => t.order_void_status != 1);
this.ItemTransitOrderWithVoid = ItemTransitOrders?.FirstOrDefault(); this.ItemTransitOrderWithVoid = ItemTransitOrders?.FirstOrDefault();
this.PddBuyerOrder = PddBuyerOrders?.FirstOrDefault();
this.ItemTransitOrderAfterSale = ItemTransitOrderAfterSales?.FirstOrDefault(); this.ItemTransitOrderAfterSale = ItemTransitOrderAfterSales?.FirstOrDefault();
this.PddBuyerOrder = PddBuyerOrders?.FirstOrDefault();
// 优先找非撤销买手退款单
this.PddBuyerAfterSale = PddBuyerAfterSales?.FirstOrDefault(p => p.statusText == "退款成功") ?? PddBuyerAfterSales?.FirstOrDefault(p => p.statusText != "申请已撤销");
if (PddBuyerAfterSale == null)
PddBuyerAfterSale = PddBuyerAfterSales?.FirstOrDefault();
// 直接取号和更正取号显示的买手到仓库物流 // 直接取号和更正取号显示的买手到仓库物流
if (ItemTransitOrder?.pre_allocated_order_no != 1 && ItemTransitOrder?.pre_allocated_order_no != 3) if (ItemTransitOrder?.pre_allocated_order_no != 1 && ItemTransitOrder?.pre_allocated_order_no != 3)
@@ -195,11 +243,20 @@ namespace AllBase.Model.DBModel
else else
TransitOrderWaybillFromWareHouseStr = "仓库物流:" + ItemTransitOrder.express_2_company + "-" + ItemTransitOrder.express_2_waybill; TransitOrderWaybillFromWareHouseStr = "仓库物流:" + ItemTransitOrder.express_2_company + "-" + ItemTransitOrder.express_2_waybill;
if (order_id == "3737937905497545216")
{
}
// 仓库物流售后按钮上的文字,仓库作废单不存在仓库物流,所以此处必须是有效的仓库单(含作废失败) // 仓库物流售后按钮上的文字,仓库作废单不存在仓库物流,所以此处必须是有效的仓库单(含作废失败)
if (this.ItemTransitOrder == null || !this.ItemOrder.IsRefundWithCancel) if (this.ItemTransitOrder == null || !this.ItemOrder.IsRefundWithCancel)
AddEditTransitWarehouseAfterSaleStr = ""; AddEditTransitWarehouseAfterSaleStr = "";
else else
AddEditTransitWarehouseAfterSaleStr = this.ItemTransitOrderAfterSale == null ? "添加" : "查看"; AddEditTransitWarehouseAfterSaleStr = this.ItemTransitOrderAfterSale == null ? "添加" : "查看";
if (this.ItemTransitOrderAfterSale != null)
TransitWarehouseAfterSaleWayBillStr = (this.ItemTransitOrderAfterSale?.downstream_express_code + "-" + this.ItemTransitOrderAfterSale?.downstream_waybill).Trim('-');
this.PddBuyerAfterSaleAddressStr = this.PddBuyerAfterSale?.afterSaleAddress;
} }
/// <summary> /// <summary>
/// 仓库退货编辑按钮文本参数 /// 仓库退货编辑按钮文本参数
@@ -233,6 +290,11 @@ namespace AllBase.Model.DBModel
get { return this.GetValue(x => x.TransitOrderWaybillFromWareHouseStr); } get { return this.GetValue(x => x.TransitOrderWaybillFromWareHouseStr); }
set { this.SetValue(x => x.TransitOrderWaybillFromWareHouseStr, value); } set { this.SetValue(x => x.TransitOrderWaybillFromWareHouseStr, value); }
} }
public string TransitWarehouseAfterSaleWayBillStr
{
get { return this.GetValue(x => x.TransitWarehouseAfterSaleWayBillStr); }
set { this.SetValue(x => x.TransitWarehouseAfterSaleWayBillStr, value); }
}
#endregion #endregion
#region 买手物流参数 #region 买手物流参数
@@ -263,7 +325,7 @@ namespace AllBase.Model.DBModel
// 拼多多买手状态为已签收的,为已到中转仓 // 拼多多买手状态为已签收的,为已到中转仓
else if ((PddBuyerOrder?.order_status_prompt).ParseToString().Contains("已签收")) else if ((PddBuyerOrder?.order_status_prompt).ParseToString().Contains("已签收"))
{ {
BuyerTransitWaybillStatusStr = "已到中转仓"; BuyerTransitWaybillStatusStr = "买手已送达";
} }
// 售后待用户退回商品的,至少为买手已发货 // 售后待用户退回商品的,至少为买手已发货
else if ((PddBuyerOrder?.order_status_prompt).ParseToString().Contains("待用户退回商品")) else if ((PddBuyerOrder?.order_status_prompt).ParseToString().Contains("待用户退回商品"))
@@ -309,15 +371,15 @@ namespace AllBase.Model.DBModel
public void SetBuyerTransitWaybillStatusStrColor() public void SetBuyerTransitWaybillStatusStrColor()
{ {
if (BuyerTransitWaybillStatusStr.StartsWith("买手已退款")) if (BuyerTransitWaybillStatusStr.StartsWith("买手已退款"))
BuyerTransitWaybillStatusStrColor = new SolidColorBrush(Color.FromRgb(152, 96, 143)); BuyerTransitWaybillStatusStrColor = PurpleBrush;
else if(BuyerTransitWaybillStatusStr.StartsWith("已到中转仓")) else if (BuyerTransitWaybillStatusStr.StartsWith("买手已送达"))
BuyerTransitWaybillStatusStrColor = new SolidColorBrush(Color.FromRgb(19, 206, 102)); BuyerTransitWaybillStatusStrColor = GreenBrush;
else if(BuyerTransitWaybillStatusStr.StartsWith("买手已发货")) else if (BuyerTransitWaybillStatusStr.StartsWith("买手已发货"))
BuyerTransitWaybillStatusStrColor = new SolidColorBrush(Color.FromRgb(255, 186, 0)); BuyerTransitWaybillStatusStrColor = YellowBrush;
else if(BuyerTransitWaybillStatusStr.StartsWith("买手未发货")) else if (BuyerTransitWaybillStatusStr.StartsWith("买手未发货"))
BuyerTransitWaybillStatusStrColor = new SolidColorBrush(Color.FromRgb(255, 73, 73)); BuyerTransitWaybillStatusStrColor = RedBrush;
else else
BuyerTransitWaybillStatusStrColor = new SolidColorBrush(Color.FromRgb(255, 73, 73)); BuyerTransitWaybillStatusStrColor = RedBrush;
} }
public SolidColorBrush BuyerTransitWaybillStatusBorderColor public SolidColorBrush BuyerTransitWaybillStatusBorderColor
{ {
@@ -327,15 +389,15 @@ namespace AllBase.Model.DBModel
public void SetBuyerTransitWaybillStatusBorderColor() public void SetBuyerTransitWaybillStatusBorderColor()
{ {
if (BuyerTransitWaybillStatusStr.StartsWith("买手已退款")) if (BuyerTransitWaybillStatusStr.StartsWith("买手已退款"))
BuyerTransitWaybillStatusBorderColor = new SolidColorBrush(Color.FromArgb(75, 152, 96, 143)); BuyerTransitWaybillStatusBorderColor = PurpleBrush75;
else if(BuyerTransitWaybillStatusStr.StartsWith("已到中转仓")) else if (BuyerTransitWaybillStatusStr.StartsWith("买手已送达"))
BuyerTransitWaybillStatusBorderColor = new SolidColorBrush(Color.FromRgb(208, 245, 224)); BuyerTransitWaybillStatusBorderColor = GreenBrush75;
else if(BuyerTransitWaybillStatusStr.StartsWith("买手已发货")) else if (BuyerTransitWaybillStatusStr.StartsWith("买手已发货"))
BuyerTransitWaybillStatusBorderColor = new SolidColorBrush(Color.FromRgb(255, 241, 204)); BuyerTransitWaybillStatusBorderColor = YellowBrush75;
else if(BuyerTransitWaybillStatusStr.StartsWith("买手未发货")) else if (BuyerTransitWaybillStatusStr.StartsWith("买手未发货"))
BuyerTransitWaybillStatusBorderColor = new SolidColorBrush(Color.FromRgb(255, 219, 219)); BuyerTransitWaybillStatusBorderColor = RedBrush75;
else else
BuyerTransitWaybillStatusBorderColor = new SolidColorBrush(Color.FromRgb(255, 219, 219)); BuyerTransitWaybillStatusBorderColor = RedBrush75;
} }
public SolidColorBrush BuyerTransitWaybillStatusBackColor public SolidColorBrush BuyerTransitWaybillStatusBackColor
{ {
@@ -345,94 +407,95 @@ namespace AllBase.Model.DBModel
public void SetBuyerTransitWaybillStatusBackColor() public void SetBuyerTransitWaybillStatusBackColor()
{ {
if (BuyerTransitWaybillStatusStr.StartsWith("买手已退款")) if (BuyerTransitWaybillStatusStr.StartsWith("买手已退款"))
BuyerTransitWaybillStatusBackColor = new SolidColorBrush(Color.FromArgb(35, 152, 96, 143)); BuyerTransitWaybillStatusBackColor = PurpleBrush35;
else if (BuyerTransitWaybillStatusStr.StartsWith("已到中转仓")) else if (BuyerTransitWaybillStatusStr.StartsWith("买手已送达"))
BuyerTransitWaybillStatusBackColor = new SolidColorBrush(Color.FromRgb(231, 250, 240)); BuyerTransitWaybillStatusBackColor = GreenBrush35;
else if (BuyerTransitWaybillStatusStr.StartsWith("买手已发货")) else if (BuyerTransitWaybillStatusStr.StartsWith("买手已发货"))
BuyerTransitWaybillStatusBackColor = new SolidColorBrush(Color.FromRgb(255, 248, 230)); BuyerTransitWaybillStatusBackColor = YellowBrush35;
else if (BuyerTransitWaybillStatusStr.StartsWith("买手未发货")) else if (BuyerTransitWaybillStatusStr.StartsWith("买手未发货"))
BuyerTransitWaybillStatusBackColor = new SolidColorBrush(Color.FromRgb(255, 237, 237)); BuyerTransitWaybillStatusBackColor = RedBrush35;
else else
BuyerTransitWaybillStatusBackColor = new SolidColorBrush(Color.FromRgb(255, 237, 237)); BuyerTransitWaybillStatusBackColor = RedBrush35;
} }
#endregion #endregion
#region 仓库物流参数 #region 仓库物流参数
public string WarehouseWaybillStatusStr public string WarehouseWaybillStatusStr
{ {
get get { return this.GetValue(x => x.WarehouseWaybillStatusStr); }
set { this.SetValue(x => x.WarehouseWaybillStatusStr, value); }
}
public void SetWarehouseWaybillStatusStr()
{ {
WarehouseWaybillStatusStr = "";
if (ItemTransitOrderWithVoid == null) if (ItemTransitOrderWithVoid == null)
return ""; WarehouseWaybillStatusStr = "";
// 订单不满足鸿浩仓库发货条件,无法调用鸿浩仓库接口发货 // 订单不满足鸿浩仓库发货条件,无法调用鸿浩仓库接口发货
if ((ItemTransitOrderWithVoid.raw_message.ParseToString().Contains("取号异常") || else if ((ItemTransitOrderWithVoid.raw_message.ParseToString().Contains("取号异常") ||
ItemTransitOrderWithVoid.raw_message.ParseToString().Contains("无法调用")) && ItemTransitOrderWithVoid.raw_message.ParseToString().Contains("无法调用")) &&
ItemTransitOrderWithVoid.transfer_warehouse_status != 1) ItemTransitOrderWithVoid.transfer_warehouse_status != 1)
{ {
if (ItemTransitOrderWithVoid.raw_message.Contains("超出派送范围")) if (ItemTransitOrderWithVoid.raw_message.Contains("超出派送范围"))
return "取号异常-超出派送范围"; WarehouseWaybillStatusStr = "取号异常-超出派送范围";
else else
return "取号异常"; WarehouseWaybillStatusStr = "取号异常";
} }
else if (ItemTransitOrderWithVoid?.warehouse_status == 2)
if (ItemTransitOrderWithVoid?.warehouse_status == 2) WarehouseWaybillStatusStr = "中转已出库";
return "中转已出库";
// 老订单还用之前的逻辑判断 // 老订单还用之前的逻辑判断
if (ItemTransitOrderWithVoid?.created_time < new DateTime(2026, 7, 14) && (ItemTransitOrderWithVoid?.pre_allocated_order_no == 1 || ItemTransitOrderWithVoid?.pre_allocated_order_no == 3) && !ItemTransitOrderWithVoid.express_2_company.IsNullOrEmpty() && !ItemTransitOrderWithVoid.express_2_waybill.IsNullOrEmpty()) else if (ItemTransitOrderWithVoid?.created_time < new DateTime(2026, 7, 14) && (ItemTransitOrderWithVoid?.pre_allocated_order_no == 1 || ItemTransitOrderWithVoid?.pre_allocated_order_no == 3) && !ItemTransitOrderWithVoid.express_2_company.IsNullOrEmpty() && !ItemTransitOrderWithVoid.express_2_waybill.IsNullOrEmpty())
//return "中转已出库*"; //WarehouseWaybillStatusStr = "中转已出库*";
return "中转已出库"; WarehouseWaybillStatusStr = "中转已出库";
if (ItemTransitOrderWithVoid?.warehouse_status == 1) else if (ItemTransitOrderWithVoid?.warehouse_status == 1)
return "中转已入库"; WarehouseWaybillStatusStr = "中转已入库";
//if ((ItemTransitOrderWithVoid?.pre_allocated_order_no == 1 || ItemTransitOrderWithVoid?.pre_allocated_order_no == 3) && !ItemTransitOrderWithVoid.express_2_company.IsNullOrEmpty() && !ItemTransitOrderWithVoid.express_2_waybill.IsNullOrEmpty()) //else if ((ItemTransitOrderWithVoid?.pre_allocated_order_no == 1 || ItemTransitOrderWithVoid?.pre_allocated_order_no == 3) && !ItemTransitOrderWithVoid.express_2_company.IsNullOrEmpty() && !ItemTransitOrderWithVoid.express_2_waybill.IsNullOrEmpty())
// return "中转已发货"; // WarehouseWaybillStatusStr = "中转已发货";
//if (ItemTransitOrderWithVoid?.pre_allocated_order_no == 1 || ItemTransitOrderWithVoid?.pre_allocated_order_no == 3) //else if (ItemTransitOrderWithVoid?.pre_allocated_order_no == 1 || ItemTransitOrderWithVoid?.pre_allocated_order_no == 3)
// return "中转待发货"; // WarehouseWaybillStatusStr = "中转待发货";
if (ItemTransitOrderWithVoid?.pre_allocated_order_no == 1 || ItemTransitOrderWithVoid?.pre_allocated_order_no == 3) else if (ItemTransitOrderWithVoid?.pre_allocated_order_no == 1 || ItemTransitOrderWithVoid?.pre_allocated_order_no == 3)
return "中转已取号"; WarehouseWaybillStatusStr = "中转已取号";
if (ItemTransitOrderWithVoid?.pre_allocated_order_no == 2) else if (ItemTransitOrderWithVoid?.pre_allocated_order_no == 2)
return "中转提前取号"; WarehouseWaybillStatusStr = "中转提前取号";
//else if (ItemTransitOrderWithVoid?.order_void_status == 2)
//if (ItemTransitOrderWithVoid?.order_void_status == 2) // WarehouseWaybillStatusStr = "中转作废失败";
// return "中转作废失败"; //else if (ItemTransitOrderWithVoid?.order_void_status == 1)
//if (ItemTransitOrderWithVoid?.order_void_status == 1) // WarehouseWaybillStatusStr = "中转已作废";
// return "中转已作废"; else if (ItemTransitOrderWithVoid?.pre_allocated_order_no == 0)
WarehouseWaybillStatusStr = "中转待取号";
if (ItemTransitOrderWithVoid?.pre_allocated_order_no == 0)
return "中转待取号";
return "";
}
set { }
} }
public SolidColorBrush WarehouseWaybillStatusStrColor public SolidColorBrush WarehouseWaybillStatusStrColor
{ {
get get
{ {
//if (WarehouseWaybillStatusStr.StartsWith("中转已作废")) //if (WarehouseWaybillStatusStr.StartsWith("中转已作废"))
// return new SolidColorBrush(Color.FromRgb(152, 96, 143)); // return PurpleBrush;
if (WarehouseWaybillStatusStr.StartsWith("中转已出库")) if (WarehouseWaybillStatusStr.StartsWith("中转已出库"))
return new SolidColorBrush(Color.FromRgb(19, 206, 102)); return GreenBrush;
if (WarehouseWaybillStatusStr.StartsWith("中转已入库") || WarehouseWaybillStatusStr.StartsWith("中转已取号") || WarehouseWaybillStatusStr.StartsWith("中转提前取号")) if (WarehouseWaybillStatusStr.StartsWith("中转已入库") || WarehouseWaybillStatusStr.StartsWith("中转已取号") || WarehouseWaybillStatusStr.StartsWith("中转提前取号"))
return new SolidColorBrush(Color.FromRgb(255, 186, 0)); return YellowBrush;
if (WarehouseWaybillStatusStr.StartsWith("中转待取号")) if (WarehouseWaybillStatusStr.StartsWith("中转待取号"))
return new SolidColorBrush(Color.FromRgb(255, 73, 73)); return RedBrush;
return new SolidColorBrush(Color.FromRgb(255, 73, 73)); return RedBrush;
} }
set { } set { }
}
public void SetWarehouseWaybillStatusStrColor()
{
} }
public SolidColorBrush WarehouseWaybillStatusBorderColor public SolidColorBrush WarehouseWaybillStatusBorderColor
{ {
get get
{ {
//if (WarehouseWaybillStatusStr.StartsWith("中转已作废")) //if (WarehouseWaybillStatusStr.StartsWith("中转已作废"))
// return new SolidColorBrush(Color.FromArgb(75, 152, 96, 143)); // return PurpleBrush75;
if (WarehouseWaybillStatusStr.StartsWith("中转已出库")) if (WarehouseWaybillStatusStr.StartsWith("中转已出库"))
return new SolidColorBrush(Color.FromRgb(208, 245, 224)); return GreenBrush75;
if (WarehouseWaybillStatusStr.StartsWith("中转已入库") || WarehouseWaybillStatusStr.StartsWith("中转已取号") || WarehouseWaybillStatusStr.StartsWith("中转提前取号")) if (WarehouseWaybillStatusStr.StartsWith("中转已入库") || WarehouseWaybillStatusStr.StartsWith("中转已取号") || WarehouseWaybillStatusStr.StartsWith("中转提前取号"))
return new SolidColorBrush(Color.FromRgb(255, 241, 204)); return YellowBrush75;
if (WarehouseWaybillStatusStr.StartsWith("中转待取号")) if (WarehouseWaybillStatusStr.StartsWith("中转待取号"))
return new SolidColorBrush(Color.FromRgb(255, 219, 219)); return RedBrush75;
return new SolidColorBrush(Color.FromRgb(255, 219, 219)); return RedBrush75;
} }
set { } set { }
} }
@@ -441,20 +504,19 @@ namespace AllBase.Model.DBModel
get get
{ {
//if (WarehouseWaybillStatusStr.StartsWith("中转已作废")) //if (WarehouseWaybillStatusStr.StartsWith("中转已作废"))
// return new SolidColorBrush(Color.FromArgb(35, 152, 96, 143)); // return PurpleBrush35
if (WarehouseWaybillStatusStr.StartsWith("中转已出库")) if (WarehouseWaybillStatusStr.StartsWith("中转已出库"))
return new SolidColorBrush(Color.FromRgb(231, 250, 240)); return GreenBrush35;
if (WarehouseWaybillStatusStr.StartsWith("中转已入库") || WarehouseWaybillStatusStr.StartsWith("中转已取号") || WarehouseWaybillStatusStr.StartsWith("中转提前取号")) if (WarehouseWaybillStatusStr.StartsWith("中转已入库") || WarehouseWaybillStatusStr.StartsWith("中转已取号") || WarehouseWaybillStatusStr.StartsWith("中转提前取号"))
return new SolidColorBrush(Color.FromRgb(255, 248, 230)); return YellowBrush35;
if (WarehouseWaybillStatusStr.StartsWith("中转待取号")) if (WarehouseWaybillStatusStr.StartsWith("中转待取号"))
return new SolidColorBrush(Color.FromRgb(255, 237, 237)); return RedBrush35;
return new SolidColorBrush(Color.FromRgb(255, 237, 237)); return RedBrush35;
} }
set { } set { }
} }
#endregion #endregion
/// <summary> /// <summary>
/// 中转仓表买手售后字段文字显示 /// 中转仓表买手售后字段文字显示
/// </summary> /// </summary>
@@ -462,7 +524,7 @@ namespace AllBase.Model.DBModel
{ {
get get
{ {
if (order_id == "3737688046871408640") if (order_id == "3737761985909113600")
{ {
} }
@@ -470,10 +532,26 @@ namespace AllBase.Model.DBModel
if (!string.IsNullOrEmpty(ItemTransitOrderWithVoid?.refund_status)) if (!string.IsNullOrEmpty(ItemTransitOrderWithVoid?.refund_status))
{ {
// 店铺售后又取消的,如果是买手还没申请售后,不显示需手动申请售后文字 // 店铺售后又取消的,如果是买手还没申请售后,不显示需手动申请售后文字
//if (ItemTransitOrderWithVoid.refund_status.Contains("需手动申请售后") && this.refund_status <= 1) if (ItemTransitOrderWithVoid.refund_status.Contains("需手动申请售后") && this.refund_status <= 1)
// return ""; return "";
// 显示售后金额(如果有)
if (ItemTransitOrderWithVoid.refund_status.EndsWith("买手退款成功"))
{
if (PddBuyerAfterSale?.refundAmount != null)
return ItemTransitOrderWithVoid.refund_status + "(¥" + PddBuyerAfterSale.refundAmount * 0.01m + ")";
else
return ItemTransitOrderWithVoid.refund_status + "(退款金额待获取)";
}
if (!ItemTransitOrderWithVoid.refund_status.Contains("需手动申请售后")) if (!ItemTransitOrderWithVoid.refund_status.Contains("需手动申请售后"))
return "已申请售后 " + ItemTransitOrderWithVoid.refund_status.Replace("申请收到,", ""); return "已申请售后 " + ItemTransitOrderWithVoid.refund_status.Replace("申请收到,", "");
if (order_id == "3737761985909113600")
{
}
return ItemTransitOrderWithVoid.refund_status; return ItemTransitOrderWithVoid.refund_status;
} }
return ""; return "";
@@ -488,13 +566,15 @@ namespace AllBase.Model.DBModel
get get
{ {
if (TransitRefundStatusStr.Contains("退款成功")) if (TransitRefundStatusStr.Contains("退款成功"))
return new SolidColorBrush(Color.FromRgb(19, 206, 102)); return GreenBrush;
if (TransitRefundStatusStr.Contains("需手动申请售后")) if (TransitRefundStatusStr.Contains("需手动申请售后"))
return new SolidColorBrush(Color.FromRgb(255, 73, 73)); return RedBrush;
//return new SolidColorBrush(Color.FromRgb(255, 186, 0)); return LightOrangeBrush;
return new SolidColorBrush(Color.FromRgb(255, 155, 0)); //return YellowBrush;
}
set
{
} }
set { }
} }
/// <summary> /// <summary>
/// 中转仓作废参数 /// 中转仓作废参数
@@ -519,11 +599,8 @@ namespace AllBase.Model.DBModel
if (ItemTransitOrderWithVoid == null) if (ItemTransitOrderWithVoid == null)
return ""; return "";
if (ItemOrder.createDateTime == null)
ItemOrder.createDateTime = BaseClass.StampToDateTime(ItemOrder.create_time);
string timeStr = "采购时间:" + ItemTransitOrderWithVoid.created_time.ToString("yyyy-MM-dd HH:mm:ss"); string timeStr = "采购时间:" + ItemTransitOrderWithVoid.created_time.ToString("yyyy-MM-dd HH:mm:ss");
if (ItemOrder.createDateTime.Value.Date != ItemTransitOrderWithVoid.created_time.Date && ItemTransitOrderWithVoid.created_time > ItemTransitOrderWithVoid.created_time.Date.AddHours(1.5)) if (CreateDateTime.Date != ItemTransitOrderWithVoid.created_time.Date && ItemTransitOrderWithVoid.created_time > ItemTransitOrderWithVoid.created_time.Date.AddHours(1.5))
return timeStr + " ×"; return timeStr + " ×";
return timeStr + " √"; return timeStr + " √";
} }
@@ -536,7 +613,7 @@ namespace AllBase.Model.DBModel
{ {
get get
{ {
return OutOrderTimeQualifiedStr.EndsWith("√") ? new SolidColorBrush(Color.FromRgb(103, 194, 58)) : new SolidColorBrush(Color.FromRgb(250, 71, 51)); return OutOrderTimeQualifiedStr.EndsWith("√") ? GreenTextBrush : RedTextBrush;
} }
} }
@@ -573,12 +650,12 @@ namespace AllBase.Model.DBModel
get get
{ {
if ("未知状态,未付款已取消,售后完成订单取消".Contains(OrderItemStatusStr)) if ("未知状态,未付款已取消,售后完成订单取消".Contains(OrderItemStatusStr))
return new SolidColorBrush(Color.FromRgb(255, 73, 73)); return RedBrush;
if ("订单完成".Contains(OrderItemStatusStr)) if ("订单完成".Contains(OrderItemStatusStr))
return new SolidColorBrush(Color.FromRgb(19, 206, 102)); return GreenBrush;
if ("待买家收货,店铺部分发货,待店铺发货,待付款".Contains(OrderItemStatusStr)) if ("待买家收货,店铺部分发货,待店铺发货,待付款".Contains(OrderItemStatusStr))
return new SolidColorBrush(Color.FromRgb(255, 186, 0)); return YellowBrush;
return new SolidColorBrush(Color.FromRgb(255, 186, 0)); return YellowBrush;
} }
set { } set { }
} }
@@ -587,12 +664,12 @@ namespace AllBase.Model.DBModel
get get
{ {
if ("未知状态,未付款已取消,售后完成订单取消".Contains(OrderItemStatusStr)) if ("未知状态,未付款已取消,售后完成订单取消".Contains(OrderItemStatusStr))
return new SolidColorBrush(Color.FromRgb(255, 219, 219)); return RedBrush75;
if ("订单完成".Contains(OrderItemStatusStr)) if ("订单完成".Contains(OrderItemStatusStr))
return new SolidColorBrush(Color.FromRgb(208, 245, 224)); return GreenBrush75;
if ("待买家收货,店铺部分发货,待店铺发货,待付款".Contains(OrderItemStatusStr)) if ("待买家收货,店铺部分发货,待店铺发货,待付款".Contains(OrderItemStatusStr))
return new SolidColorBrush(Color.FromRgb(255, 241, 204)); return YellowBrush75;
return new SolidColorBrush(Color.FromRgb(255, 241, 204)); return YellowBrush75;
} }
set { } set { }
} }
@@ -601,12 +678,12 @@ namespace AllBase.Model.DBModel
get get
{ {
if ("未知状态,未付款已取消,售后完成订单取消".Contains(OrderItemStatusStr)) if ("未知状态,未付款已取消,售后完成订单取消".Contains(OrderItemStatusStr))
return new SolidColorBrush(Color.FromRgb(255, 237, 237)); return RedBrush35;
if ("订单完成".Contains(OrderItemStatusStr)) if ("订单完成".Contains(OrderItemStatusStr))
return new SolidColorBrush(Color.FromRgb(231, 250, 240)); return GreenBrush35;
if ("待买家收货,店铺部分发货,待店铺发货,待付款".Contains(OrderItemStatusStr)) if ("待买家收货,店铺部分发货,待店铺发货,待付款".Contains(OrderItemStatusStr))
return new SolidColorBrush(Color.FromRgb(255, 248, 230)); return YellowBrush35;
return new SolidColorBrush(Color.FromRgb(255, 248, 230)); return YellowBrush35;
} }
set { } set { }
} }
@@ -704,6 +781,7 @@ namespace AllBase.Model.DBModel
set { } set { }
} }
decimal profitCount = decimal.MinValue; decimal profitCount = decimal.MinValue;
/// <summary> /// <summary>
/// 通过计算的利润 /// 通过计算的利润
@@ -726,6 +804,7 @@ namespace AllBase.Model.DBModel
profitCount = decimal.MinValue; profitCount = decimal.MinValue;
} }
} }
/// <summary> /// <summary>
/// 通过计算的利润文本 /// 通过计算的利润文本
/// </summary> /// </summary>
@@ -746,12 +825,37 @@ namespace AllBase.Model.DBModel
get get
{ {
if (refund_status == 2 || refund_status == 3 || refund_status == 4 || refund_status == 11) if (refund_status == 2 || refund_status == 3 || refund_status == 4 || refund_status == 11)
return new SolidColorBrush(Color.FromRgb(127, 127, 127)); return GrayBrush;
return ProfitCount > 0 ? new SolidColorBrush(Color.FromRgb(103, 194, 58)) : new SolidColorBrush(Color.FromRgb(250, 71, 51)); //return ProfitCount > 0 ? new SolidColorBrush(Color.FromRgb(103, 194, 58)) : new SolidColorBrush(Color.FromRgb(250, 71, 51));
return ProfitCount > 0 ? GreenTextBrush : RedTextBrush;
} }
set { } set { }
} }
public DateTime CreateDateTime
{
get { return this.GetValue(x => x.CreateDateTime); }
set { this.SetValue(x => x.CreateDateTime, value); }
}
/// <summary>
/// 订单创建时间文本
/// </summary>
public string CreateDateTimeStr
{
get { return this.GetValue(x => x.CreateDateTimeStr); }
set { this.SetValue(x => x.CreateDateTimeStr, value); }
}
/// <summary>
/// 订单更新时间文本
/// </summary>
public string UpdateTimeStr
{
get { return this.GetValue(x => x.UpdateTimeStr); }
set { this.SetValue(x => x.UpdateTimeStr, value); }
}
/// <summary> /// <summary>
/// sku规格名称文本 /// sku规格名称文本
/// </summary> /// </summary>
@@ -913,11 +1017,81 @@ namespace AllBase.Model.DBModel
/// </summary> /// </summary>
public int? refund_status { get; set; } public int? refund_status { get; set; }
public static SolidColorBrush PurpleBrush;
public static SolidColorBrush PurpleBrush75;
public static SolidColorBrush PurpleBrush50;
public static SolidColorBrush PurpleBrush35;
public static SolidColorBrush GreenBrush;
public static SolidColorBrush GreenBrush75;
public static SolidColorBrush GreenBrush35;
public static SolidColorBrush YellowBrush;
public static SolidColorBrush YellowBrush75;
public static SolidColorBrush YellowBrush35;
public static SolidColorBrush LightOrangeBrush;
public static SolidColorBrush OrangeBrush;
public static SolidColorBrush OrangeBrush50;
public static SolidColorBrush RedBrush;
public static SolidColorBrush RedBrush75;
public static SolidColorBrush RedBrush35;
public static SolidColorBrush GrayBrush;
public static SolidColorBrush GreenTextBrush;
public static SolidColorBrush RedTextBrush;
public static SolidColorBrush RedTextBrush50;
public void SetOrderItemTextProperty() public void SetOrderItemTextProperty()
{ {
CreateDateTime = BaseClass.StampToDateTime((ItemOrder?.create_time).ParseToInt());
CreateDateTimeStr = CreateDateTime.ToString("yyyy-MM-dd HH:mm:ss");
UpdateTimeStr = BaseClass.StampToDateTime((ItemOrder?.update_time).ParseToInt()).ToString("yyyy-MM-dd HH:mm:ss");
if (PurpleBrush == null && this.Dispatcher != null)
{
Dispatcher.Invoke(new Action(() =>
{
PurpleBrush = new SolidColorBrush(Color.FromArgb(255, 152, 99, 143));
PurpleBrush75 = new SolidColorBrush(Color.FromArgb(75, 152, 99, 143));
PurpleBrush50 = new SolidColorBrush(Color.FromArgb(50, 152, 99, 143));
PurpleBrush35 = new SolidColorBrush(Color.FromArgb(35, 152, 99, 143));
GreenBrush = new SolidColorBrush(Color.FromArgb(255, 19, 206, 102));
GreenBrush75 = new SolidColorBrush(Color.FromArgb(75, 19, 206, 102));
GreenBrush35 = new SolidColorBrush(Color.FromArgb(35, 19, 206, 102));
YellowBrush = new SolidColorBrush(Color.FromArgb(255, 255, 186, 0));
YellowBrush75 = new SolidColorBrush(Color.FromArgb(75, 255, 186, 0));
YellowBrush35 = new SolidColorBrush(Color.FromArgb(35, 255, 186, 0));
LightOrangeBrush = new SolidColorBrush(Color.FromArgb(255, 255, 155, 0));
OrangeBrush = new SolidColorBrush(Color.FromArgb(255, 250, 127, 51));
OrangeBrush50 = new SolidColorBrush(Color.FromArgb(50, 250, 127, 51));
RedBrush = new SolidColorBrush(Color.FromArgb(255, 255, 73, 73));
RedBrush75 = new SolidColorBrush(Color.FromArgb(75, 255, 73, 73));
RedBrush35 = new SolidColorBrush(Color.FromArgb(35, 255, 73, 73));
GrayBrush = new SolidColorBrush(Color.FromArgb(255, 127, 127, 127));
GreenTextBrush = new SolidColorBrush(Color.FromArgb(255, 103, 194, 58));
RedTextBrush = new SolidColorBrush(Color.FromArgb(255, 250, 71, 51));
RedTextBrush50 = new SolidColorBrush(Color.FromArgb(50, 250, 71, 51));
}));
}
this.SetTransitOrder(); this.SetTransitOrder();
this.SetItemRefund(); this.SetItemRefund();
this.SetBuyerTransitWaybillStatusStr(); this.SetBuyerTransitWaybillStatusStr();
this.SetWarehouseWaybillStatusStr();
// 拍单、代发等信息判断并控制拍单按钮
this.UpdateOrderItemBuyButton();
} }
public void UpdateOrderItemBuyButton() public void UpdateOrderItemBuyButton()
@@ -927,39 +1101,39 @@ namespace AllBase.Model.DBModel
if (GlobalConfig.lstDangerItemWord.Any(d => order_item.title.Contains(d))) if (GlobalConfig.lstDangerItemWord.Any(d => order_item.title.Contains(d)))
{ {
order_item.IsBuyGoodsBtnEnabled = false; order_item.IsBuyGoodsBtnEnabled = false;
order_item.BuyGoodsBtnBackColor = new SolidColorBrush(Color.FromArgb(50, 250, 70, 51)); order_item.BuyGoodsBtnBackColor = RedTextBrush50;
order_item.BuyGoodsBtnColor = new SolidColorBrush(Color.FromArgb(255, 250, 70, 51)); order_item.BuyGoodsBtnColor = RedTextBrush;
order_item.BuyGoodsBtnTxt = "危险品不支持中转拍单"; order_item.BuyGoodsBtnTxt = "危险品不支持中转拍单";
} }
else if (Shop == null || (Shop?.LoginStatus != "登录成功" /*&& Shop?.Is29Supplier == null*/)) else if (Shop == null || (Shop?.LoginStatus != "登录成功" /*&& Shop?.Is29Supplier == null*/))
{ {
order_item.IsBuyGoodsBtnEnabled = false; order_item.IsBuyGoodsBtnEnabled = false;
//order_item.IsBuyGoodsBtnEnabled = true; //order_item.IsBuyGoodsBtnEnabled = true;
order_item.BuyGoodsBtnBackColor = new SolidColorBrush(Color.FromArgb(50, 250, 70, 51)); order_item.BuyGoodsBtnBackColor = RedTextBrush50;
order_item.BuyGoodsBtnColor = new SolidColorBrush(Color.FromArgb(255, 250, 70, 51)); order_item.BuyGoodsBtnColor = RedTextBrush;
order_item.BuyGoodsBtnTxt = "请登录店铺"; order_item.BuyGoodsBtnTxt = "请登录店铺";
} }
else if (Shop?.LoginStatus == "登录成功" && Shop?.Is29Supplier == null) else if (Shop?.LoginStatus == "登录成功" && Shop?.Is29Supplier == null)
{ {
order_item.IsBuyGoodsBtnEnabled = false; order_item.IsBuyGoodsBtnEnabled = false;
order_item.BuyGoodsBtnBackColor = new SolidColorBrush(Color.FromArgb(50, 250, 127, 51)); order_item.BuyGoodsBtnBackColor = OrangeBrush50;
order_item.BuyGoodsBtnColor = new SolidColorBrush(Color.FromArgb(255, 250, 127, 51)); order_item.BuyGoodsBtnColor = OrangeBrush;
order_item.BuyGoodsBtnTxt = "代发状态读取中请稍候"; order_item.BuyGoodsBtnTxt = "代发状态读取中请稍候";
} }
else if (Shop?.Is29Supplier == false) else if (Shop?.Is29Supplier == false)
{ {
//order_item.IsBuyGoodsBtnEnabled = false; //order_item.IsBuyGoodsBtnEnabled = false;
order_item.IsBuyGoodsBtnEnabled = true; order_item.IsBuyGoodsBtnEnabled = true;
order_item.BuyGoodsBtnBackColor = new SolidColorBrush(Color.FromArgb(50, 250, 70, 51)); order_item.BuyGoodsBtnBackColor = RedTextBrush50;
order_item.BuyGoodsBtnColor = new SolidColorBrush(Color.FromArgb(255, 250, 70, 51)); order_item.BuyGoodsBtnColor = RedTextBrush;
order_item.BuyGoodsBtnTxt = "去店铺后台绑定代发"; order_item.BuyGoodsBtnTxt = "去店铺后台绑定代发";
} }
else else
{ {
order_item.IsBuyGoodsBtnEnabled = true; order_item.IsBuyGoodsBtnEnabled = true;
order_item.BuyGoodsBtnTxt = order_item.BuyMap == null ? "关联拍单" : "拍单"; order_item.BuyGoodsBtnTxt = order_item.BuyMap == null ? "关联拍单" : "拍单";
order_item.BuyGoodsBtnBackColor = new SolidColorBrush(Color.FromArgb(50, 152, 99, 143)); order_item.BuyGoodsBtnBackColor = PurpleBrush50;
order_item.BuyGoodsBtnColor = new SolidColorBrush(Color.FromArgb(255, 152, 99, 143)); order_item.BuyGoodsBtnColor = PurpleBrush;
} }
} }
} }
+27
View File
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AllBase.Model.DBModel
{
public class order_item_ext
{
public long? id { get; set; }
public string order_id { get; set; }
public string sku_id { get; set; }
public string shop_app_id { get; set; }
public string shop_name { get; set; }
/// <summary>
/// 订单异常文本
/// </summary>
public string abnormal_text { get; set; }
public int? flag { get; set; }
public string label { get; set; }
public string remark { get; set; }
public string after_sale_user_delivery_address { get; set; }
public DateTime add_time { get; set; }
public DateTime mdy_time { get; set; }
}
}
@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AllBase.Model.DBModel
{
public class order_pdd_buyer_after_sale
{
public long? id { get; set; }
public string wx_order_id { get; set; }
public string wx_sku_id { get; set; }
public DateTime TransitCreateTime { get; set; }
//public DateTime TransitPickupTime { get; set; }
public int? pre_allocated_order_no { get; set; }
public string buyerId { get; set; }
public string buyerName { get; set; }
public string afterSalesId { get; set; }
public string orderSn { get; set; }
public int? orderAmount { get; set; }
public long? refundAmount { get; set; }
public long? orderDate { get; set; }
public string statusText { get; set; }
public string afterSaleAddress { get; set; }
public string order_detail { get; set; }
public DateTime add_time { get; set; }
public DateTime mdy_time { get; set; }
}
}
@@ -12,7 +12,7 @@ namespace AllBase.Model.DBModel
public string wx_order_id { get; set; } public string wx_order_id { get; set; }
public string wx_sku_id { get; set; } public string wx_sku_id { get; set; }
public DateTime TransitCreateTime { get; set; } public DateTime TransitCreateTime { get; set; }
public DateTime TransitPickupTime { get; set; } //public DateTime TransitPickupTime { get; set; }
public int? pre_allocated_order_no { get; set; } public int? pre_allocated_order_no { get; set; }
public string buyerId { get; set; } public string buyerId { get; set; }
public string buyerName { get; set; } public string buyerName { get; set; }
@@ -183,6 +183,14 @@ namespace AllBase.Model.Result
get { return this.GetValue(x => x.TransitPickupTime); } get { return this.GetValue(x => x.TransitPickupTime); }
set { this.SetValue(x => x.TransitPickupTime, value); } set { this.SetValue(x => x.TransitPickupTime, value); }
} }
/// <summary>
/// 买手总店售后地址
/// </summary>
public string AfterSaleAddress
{
get { return this.GetValue(x => x.AfterSaleAddress); }
set { this.SetValue(x => x.AfterSaleAddress, value); }
}
public string ProdInfoStr public string ProdInfoStr
+17 -2
View File
@@ -255,6 +255,10 @@ namespace TemuKJD.ToolForms
//if (this.openType != EnumOpenType.login) //if (this.openType != EnumOpenType.login)
{ {
var t = CEFBrowser.SetCookieAsync(JsonHelper.SerializeObject(cookieLst), cefWebBrowser.GetCookieManager(null)); var t = CEFBrowser.SetCookieAsync(JsonHelper.SerializeObject(cookieLst), cefWebBrowser.GetCookieManager(null));
if (InitUrl.Contains("&after_sales_reason=88"))
{
t.Wait(5000);
}
} }
if (!string.IsNullOrEmpty(InitUrl)) if (!string.IsNullOrEmpty(InitUrl))
@@ -441,8 +445,18 @@ namespace TemuKJD.ToolForms
{ {
// 自动修改收货地址为中转仓 // 自动修改收货地址为中转仓
var transit = TransitWarehouseData.TransitWarehouseList.FirstOrDefault(t => t.TransDetailAddress == txtBuyTransitWarehouse.Text.Trim()); var transit = TransitWarehouseData.TransitWarehouseList.FirstOrDefault(t => t.TransDetailAddress == txtBuyTransitWarehouse.Text.Trim());
if (transit == null)
{
BaseMsgForm.ShowError("仓库已发生改变,请点击重新关联商品,选择仓库后重新拍单!");
return;
}
if (transit != null && IsChangeAddress == false && HasChangeAddress == false) if (transit != null && IsChangeAddress == false && HasChangeAddress == false)
{ {
if (IsSoldOut)
{
BaseMsgForm.ShowError("商品已售罄,请重新关联未售罄商品后再拍单!");
return;
}
if (!IsSoldOut) if (!IsSoldOut)
{ {
Task.Run(() => Task.Run(() =>
@@ -821,6 +835,7 @@ namespace TemuKJD.ToolForms
if (filterOrderAction != null) if (filterOrderAction != null)
{ {
item.SetOrderItemTextProperty();
filterOrderAction(order, false); filterOrderAction(order, false);
} }
} }
@@ -957,7 +972,7 @@ namespace TemuKJD.ToolForms
orderItem.SetOrderItemTextProperty(); orderItem.SetOrderItemTextProperty();
// 利润计算重置为最小值,控件Resource更新时将计算利润 // 利润计算重置为最小值,控件Resource更新时将计算利润
orderItem.ProfitCount = decimal.MinValue; orderItem.ProfitCount = decimal.MinValue;
var order = GlobalConfig.lstFilterOrder.FirstOrDefault(o => o.order_id == orderItem.order_id); var order = orderItem?.ItemOrder;
if (filterOrderAction != null && order != null) if (filterOrderAction != null && order != null)
{ {
filterOrderAction(order, true); filterOrderAction(order, true);
@@ -1042,7 +1057,7 @@ namespace TemuKJD.ToolForms
orderItem.SetOrderItemTextProperty(); orderItem.SetOrderItemTextProperty();
// 利润计算重置为最小值,控件Resource更新时将计算利润 // 利润计算重置为最小值,控件Resource更新时将计算利润
orderItem.ProfitCount = decimal.MinValue; orderItem.ProfitCount = decimal.MinValue;
var order = GlobalConfig.lstFilterOrder.FirstOrDefault(o => o.order_id == orderItem.order_id); var order = orderItem?.ItemOrder;
if (filterOrderAction != null && order != null) if (filterOrderAction != null && order != null)
{ {
filterOrderAction(order, true); filterOrderAction(order, true);
+38 -30
View File
@@ -306,15 +306,17 @@
this.txtBuyPrice.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.txtBuyPrice.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.txtBuyPrice.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.txtBuyPrice.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtBuyPrice.Font = new System.Drawing.Font("微软雅黑", 11.25F, System.Drawing.FontStyle.Bold);
this.txtBuyPrice.ForeColor = System.Drawing.Color.Red;
this.txtBuyPrice.Location = new System.Drawing.Point(310, 110); this.txtBuyPrice.Location = new System.Drawing.Point(310, 110);
this.txtBuyPrice.Name = "txtBuyPrice"; this.txtBuyPrice.Name = "txtBuyPrice";
this.txtBuyPrice.Size = new System.Drawing.Size(152, 23); this.txtBuyPrice.Size = new System.Drawing.Size(152, 27);
this.txtBuyPrice.TabIndex = 837; this.txtBuyPrice.TabIndex = 837;
// //
// label18 // label18
// //
this.label18.AutoSize = true; this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(254, 113); this.label18.Location = new System.Drawing.Point(254, 115);
this.label18.Name = "label18"; this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(56, 17); this.label18.Size = new System.Drawing.Size(56, 17);
this.label18.TabIndex = 836; this.label18.TabIndex = 836;
@@ -323,15 +325,17 @@
// txtBuyCnt // txtBuyCnt
// //
this.txtBuyCnt.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.txtBuyCnt.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtBuyCnt.Font = new System.Drawing.Font("微软雅黑", 11.25F, System.Drawing.FontStyle.Bold);
this.txtBuyCnt.ForeColor = System.Drawing.Color.Red;
this.txtBuyCnt.Location = new System.Drawing.Point(74, 110); this.txtBuyCnt.Location = new System.Drawing.Point(74, 110);
this.txtBuyCnt.Name = "txtBuyCnt"; this.txtBuyCnt.Name = "txtBuyCnt";
this.txtBuyCnt.Size = new System.Drawing.Size(152, 23); this.txtBuyCnt.Size = new System.Drawing.Size(152, 27);
this.txtBuyCnt.TabIndex = 835; this.txtBuyCnt.TabIndex = 835;
// //
// label19 // label19
// //
this.label19.AutoSize = true; this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(18, 113); this.label19.Location = new System.Drawing.Point(18, 115);
this.label19.Name = "label19"; this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(56, 17); this.label19.Size = new System.Drawing.Size(56, 17);
this.label19.TabIndex = 834; this.label19.TabIndex = 834;
@@ -342,9 +346,11 @@
this.txtShopOrderItemPrice.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.txtShopOrderItemPrice.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.txtShopOrderItemPrice.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.txtShopOrderItemPrice.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtShopOrderItemPrice.Location = new System.Drawing.Point(321, 259); this.txtShopOrderItemPrice.Font = new System.Drawing.Font("微软雅黑", 11.25F, System.Drawing.FontStyle.Bold);
this.txtShopOrderItemPrice.ForeColor = System.Drawing.Color.Red;
this.txtShopOrderItemPrice.Location = new System.Drawing.Point(321, 257);
this.txtShopOrderItemPrice.Name = "txtShopOrderItemPrice"; this.txtShopOrderItemPrice.Name = "txtShopOrderItemPrice";
this.txtShopOrderItemPrice.Size = new System.Drawing.Size(152, 23); this.txtShopOrderItemPrice.Size = new System.Drawing.Size(152, 27);
this.txtShopOrderItemPrice.TabIndex = 833; this.txtShopOrderItemPrice.TabIndex = 833;
// //
// label16 // label16
@@ -359,9 +365,11 @@
// txtShopOrderItemCnt // txtShopOrderItemCnt
// //
this.txtShopOrderItemCnt.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.txtShopOrderItemCnt.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtShopOrderItemCnt.Location = new System.Drawing.Point(85, 259); this.txtShopOrderItemCnt.Font = new System.Drawing.Font("微软雅黑", 11.25F, System.Drawing.FontStyle.Bold);
this.txtShopOrderItemCnt.ForeColor = System.Drawing.Color.Red;
this.txtShopOrderItemCnt.Location = new System.Drawing.Point(85, 257);
this.txtShopOrderItemCnt.Name = "txtShopOrderItemCnt"; this.txtShopOrderItemCnt.Name = "txtShopOrderItemCnt";
this.txtShopOrderItemCnt.Size = new System.Drawing.Size(152, 23); this.txtShopOrderItemCnt.Size = new System.Drawing.Size(152, 27);
this.txtShopOrderItemCnt.TabIndex = 831; this.txtShopOrderItemCnt.TabIndex = 831;
// //
// label17 // label17
@@ -378,7 +386,7 @@
this.txtBuyOrderId.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.txtBuyOrderId.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.txtBuyOrderId.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.txtBuyOrderId.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtBuyOrderId.Location = new System.Drawing.Point(74, 139); this.txtBuyOrderId.Location = new System.Drawing.Point(74, 143);
this.txtBuyOrderId.Name = "txtBuyOrderId"; this.txtBuyOrderId.Name = "txtBuyOrderId";
this.txtBuyOrderId.Size = new System.Drawing.Size(152, 23); this.txtBuyOrderId.Size = new System.Drawing.Size(152, 23);
this.txtBuyOrderId.TabIndex = 829; this.txtBuyOrderId.TabIndex = 829;
@@ -386,7 +394,7 @@
// label15 // label15
// //
this.label15.AutoSize = true; this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(6, 142); this.label15.Location = new System.Drawing.Point(6, 146);
this.label15.Name = "label15"; this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(68, 17); this.label15.Size = new System.Drawing.Size(68, 17);
this.label15.TabIndex = 828; this.label15.TabIndex = 828;
@@ -422,7 +430,7 @@
this.txtShopSpecName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.txtShopSpecName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.txtShopSpecName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.txtShopSpecName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtShopSpecName.Location = new System.Drawing.Point(85, 172); this.txtShopSpecName.Location = new System.Drawing.Point(85, 170);
this.txtShopSpecName.Name = "txtShopSpecName"; this.txtShopSpecName.Name = "txtShopSpecName";
this.txtShopSpecName.Size = new System.Drawing.Size(388, 23); this.txtShopSpecName.Size = new System.Drawing.Size(388, 23);
this.txtShopSpecName.TabIndex = 817; this.txtShopSpecName.TabIndex = 817;
@@ -430,7 +438,7 @@
// label14 // label14
// //
this.label14.AutoSize = true; this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(29, 175); this.label14.Location = new System.Drawing.Point(29, 173);
this.label14.Name = "label14"; this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(56, 17); this.label14.Size = new System.Drawing.Size(56, 17);
this.label14.TabIndex = 816; this.label14.TabIndex = 816;
@@ -450,7 +458,7 @@
// txtUpSpuCode // txtUpSpuCode
// //
this.txtUpSpuCode.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.txtUpSpuCode.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtUpSpuCode.Location = new System.Drawing.Point(85, 230); this.txtUpSpuCode.Location = new System.Drawing.Point(85, 228);
this.txtUpSpuCode.Name = "txtUpSpuCode"; this.txtUpSpuCode.Name = "txtUpSpuCode";
this.txtUpSpuCode.Size = new System.Drawing.Size(152, 23); this.txtUpSpuCode.Size = new System.Drawing.Size(152, 23);
this.txtUpSpuCode.TabIndex = 814; this.txtUpSpuCode.TabIndex = 814;
@@ -458,7 +466,7 @@
// label12 // label12
// //
this.label12.AutoSize = true; this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(241, 233); this.label12.Location = new System.Drawing.Point(241, 231);
this.label12.Name = "label12"; this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(80, 17); this.label12.Size = new System.Drawing.Size(80, 17);
this.label12.TabIndex = 813; this.label12.TabIndex = 813;
@@ -469,7 +477,7 @@
this.txtUpSkuCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.txtUpSkuCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.txtUpSkuCode.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.txtUpSkuCode.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtUpSkuCode.Location = new System.Drawing.Point(321, 230); this.txtUpSkuCode.Location = new System.Drawing.Point(321, 228);
this.txtUpSkuCode.Name = "txtUpSkuCode"; this.txtUpSkuCode.Name = "txtUpSkuCode";
this.txtUpSkuCode.Size = new System.Drawing.Size(152, 23); this.txtUpSkuCode.Size = new System.Drawing.Size(152, 23);
this.txtUpSkuCode.TabIndex = 812; this.txtUpSkuCode.TabIndex = 812;
@@ -477,7 +485,7 @@
// label11 // label11
// //
this.label11.AutoSize = true; this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(5, 233); this.label11.Location = new System.Drawing.Point(5, 231);
this.label11.Name = "label11"; this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(80, 17); this.label11.Size = new System.Drawing.Size(80, 17);
this.label11.TabIndex = 811; this.label11.TabIndex = 811;
@@ -488,7 +496,7 @@
this.txtShopSkuId.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.txtShopSkuId.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.txtShopSkuId.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.txtShopSkuId.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtShopSkuId.Location = new System.Drawing.Point(321, 201); this.txtShopSkuId.Location = new System.Drawing.Point(321, 199);
this.txtShopSkuId.Name = "txtShopSkuId"; this.txtShopSkuId.Name = "txtShopSkuId";
this.txtShopSkuId.Size = new System.Drawing.Size(152, 23); this.txtShopSkuId.Size = new System.Drawing.Size(152, 23);
this.txtShopSkuId.TabIndex = 810; this.txtShopSkuId.TabIndex = 810;
@@ -496,7 +504,7 @@
// label10 // label10
// //
this.label10.AutoSize = true; this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(252, 204); this.label10.Location = new System.Drawing.Point(252, 202);
this.label10.Name = "label10"; this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(69, 17); this.label10.Size = new System.Drawing.Size(69, 17);
this.label10.TabIndex = 809; this.label10.TabIndex = 809;
@@ -505,7 +513,7 @@
// label9 // label9
// //
this.label9.AutoSize = true; this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(16, 204); this.label9.Location = new System.Drawing.Point(16, 202);
this.label9.Name = "label9"; this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(69, 17); this.label9.Size = new System.Drawing.Size(69, 17);
this.label9.TabIndex = 808; this.label9.TabIndex = 808;
@@ -514,7 +522,7 @@
// txtShopGoodsId // txtShopGoodsId
// //
this.txtShopGoodsId.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.txtShopGoodsId.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtShopGoodsId.Location = new System.Drawing.Point(85, 201); this.txtShopGoodsId.Location = new System.Drawing.Point(85, 199);
this.txtShopGoodsId.Name = "txtShopGoodsId"; this.txtShopGoodsId.Name = "txtShopGoodsId";
this.txtShopGoodsId.Size = new System.Drawing.Size(152, 23); this.txtShopGoodsId.Size = new System.Drawing.Size(152, 23);
this.txtShopGoodsId.TabIndex = 807; this.txtShopGoodsId.TabIndex = 807;
@@ -534,7 +542,7 @@
this.txtShopGoodsName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.txtShopGoodsName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.txtShopGoodsName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.txtShopGoodsName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtShopGoodsName.Location = new System.Drawing.Point(85, 143); this.txtShopGoodsName.Location = new System.Drawing.Point(85, 141);
this.txtShopGoodsName.Name = "txtShopGoodsName"; this.txtShopGoodsName.Name = "txtShopGoodsName";
this.txtShopGoodsName.Size = new System.Drawing.Size(388, 23); this.txtShopGoodsName.Size = new System.Drawing.Size(388, 23);
this.txtShopGoodsName.TabIndex = 805; this.txtShopGoodsName.TabIndex = 805;
@@ -542,7 +550,7 @@
// label7 // label7
// //
this.label7.AutoSize = true; this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(29, 146); this.label7.Location = new System.Drawing.Point(29, 144);
this.label7.Name = "label7"; this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(56, 17); this.label7.Size = new System.Drawing.Size(56, 17);
this.label7.TabIndex = 804; this.label7.TabIndex = 804;
@@ -555,7 +563,7 @@
this.btnManualUpdateBuyOrder.Cursor = System.Windows.Forms.Cursors.Hand; this.btnManualUpdateBuyOrder.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnManualUpdateBuyOrder.DisabledBackColor = System.Drawing.Color.Empty; this.btnManualUpdateBuyOrder.DisabledBackColor = System.Drawing.Color.Empty;
this.btnManualUpdateBuyOrder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnManualUpdateBuyOrder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnManualUpdateBuyOrder.Location = new System.Drawing.Point(368, 198); this.btnManualUpdateBuyOrder.Location = new System.Drawing.Point(368, 202);
this.btnManualUpdateBuyOrder.Name = "btnManualUpdateBuyOrder"; this.btnManualUpdateBuyOrder.Name = "btnManualUpdateBuyOrder";
this.btnManualUpdateBuyOrder.Size = new System.Drawing.Size(94, 23); this.btnManualUpdateBuyOrder.Size = new System.Drawing.Size(94, 23);
this.btnManualUpdateBuyOrder.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnManualUpdateBuyOrder.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -844,7 +852,7 @@
this.pnlBuy.Controls.Add(this.txtBuyPrice); this.pnlBuy.Controls.Add(this.txtBuyPrice);
this.pnlBuy.Controls.Add(this.label24); this.pnlBuy.Controls.Add(this.label24);
this.pnlBuy.Controls.Add(this.label29); this.pnlBuy.Controls.Add(this.label29);
this.pnlBuy.Location = new System.Drawing.Point(12, 291); this.pnlBuy.Location = new System.Drawing.Point(12, 290);
this.pnlBuy.Name = "pnlBuy"; this.pnlBuy.Name = "pnlBuy";
this.pnlBuy.Size = new System.Drawing.Size(468, 226); this.pnlBuy.Size = new System.Drawing.Size(468, 226);
this.pnlBuy.TabIndex = 872; this.pnlBuy.TabIndex = 872;
@@ -852,7 +860,7 @@
// label28 // label28
// //
this.label28.AutoSize = true; this.label28.AutoSize = true;
this.label28.Location = new System.Drawing.Point(266, 142); this.label28.Location = new System.Drawing.Point(266, 146);
this.label28.Name = "label28"; this.label28.Name = "label28";
this.label28.Size = new System.Drawing.Size(44, 17); this.label28.Size = new System.Drawing.Size(44, 17);
this.label28.TabIndex = 884; this.label28.TabIndex = 884;
@@ -863,7 +871,7 @@
this.txtSourceCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.txtSourceCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.txtSourceCode.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.txtSourceCode.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtSourceCode.Location = new System.Drawing.Point(310, 139); this.txtSourceCode.Location = new System.Drawing.Point(310, 143);
this.txtSourceCode.Name = "txtSourceCode"; this.txtSourceCode.Name = "txtSourceCode";
this.txtSourceCode.ReadOnly = true; this.txtSourceCode.ReadOnly = true;
this.txtSourceCode.Size = new System.Drawing.Size(152, 23); this.txtSourceCode.Size = new System.Drawing.Size(152, 23);
@@ -876,7 +884,7 @@
this.btnReMap.Cursor = System.Windows.Forms.Cursors.Hand; this.btnReMap.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnReMap.DisabledBackColor = System.Drawing.Color.Empty; this.btnReMap.DisabledBackColor = System.Drawing.Color.Empty;
this.btnReMap.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnReMap.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReMap.Location = new System.Drawing.Point(9, 198); this.btnReMap.Location = new System.Drawing.Point(9, 202);
this.btnReMap.Name = "btnReMap"; this.btnReMap.Name = "btnReMap";
this.btnReMap.Size = new System.Drawing.Size(94, 23); this.btnReMap.Size = new System.Drawing.Size(94, 23);
this.btnReMap.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnReMap.Style.Alignment = System.Drawing.StringAlignment.Center;
@@ -897,7 +905,7 @@
// label25 // label25
// //
this.label25.AutoSize = true; this.label25.AutoSize = true;
this.label25.Location = new System.Drawing.Point(18, 172); this.label25.Location = new System.Drawing.Point(18, 176);
this.label25.Name = "label25"; this.label25.Name = "label25";
this.label25.Size = new System.Drawing.Size(56, 17); this.label25.Size = new System.Drawing.Size(56, 17);
this.label25.TabIndex = 869; this.label25.TabIndex = 869;
@@ -908,7 +916,7 @@
this.txtBuyTransitWarehouse.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.txtBuyTransitWarehouse.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.txtBuyTransitWarehouse.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.txtBuyTransitWarehouse.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtBuyTransitWarehouse.Location = new System.Drawing.Point(74, 169); this.txtBuyTransitWarehouse.Location = new System.Drawing.Point(74, 173);
this.txtBuyTransitWarehouse.Name = "txtBuyTransitWarehouse"; this.txtBuyTransitWarehouse.Name = "txtBuyTransitWarehouse";
this.txtBuyTransitWarehouse.Size = new System.Drawing.Size(388, 23); this.txtBuyTransitWarehouse.Size = new System.Drawing.Size(388, 23);
this.txtBuyTransitWarehouse.TabIndex = 870; this.txtBuyTransitWarehouse.TabIndex = 870;
@@ -917,7 +925,7 @@
// //
this.label29.AutoSize = true; this.label29.AutoSize = true;
this.label29.ForeColor = System.Drawing.Color.SandyBrown; this.label29.ForeColor = System.Drawing.Color.SandyBrown;
this.label29.Location = new System.Drawing.Point(121, 201); this.label29.Location = new System.Drawing.Point(121, 205);
this.label29.Name = "label29"; this.label29.Name = "label29";
this.label29.Size = new System.Drawing.Size(248, 17); this.label29.Size = new System.Drawing.Size(248, 17);
this.label29.TabIndex = 892; this.label29.TabIndex = 892;
@@ -38,6 +38,9 @@ namespace TemuKJD.ToolForms
public partial class PddMobileLoginForm : BaseGeneralForm public partial class PddMobileLoginForm : BaseGeneralForm
{ {
// 拼多多买手退货退款售后地址
// https://mobile.yangkeduo.com/complaint.html?order_sn=260718-101481213440980&after_sales_reason=0&after_sales_type=2&after_sales_code=1002
public static PddMobileLoginForm PddMobileLoginInstance { get; set; } = null; public static PddMobileLoginForm PddMobileLoginInstance { get; set; } = null;
public int CloseAfterSecond { get; set; } public int CloseAfterSecond { get; set; }
+1 -1
View File
@@ -82,7 +82,7 @@
this.splitContainer1.Panel2.Controls.Add(this.panel2); this.splitContainer1.Panel2.Controls.Add(this.panel2);
this.splitContainer1.Panel2.Paint += new System.Windows.Forms.PaintEventHandler(this.splitContainer1_Panel2_Paint); this.splitContainer1.Panel2.Paint += new System.Windows.Forms.PaintEventHandler(this.splitContainer1_Panel2_Paint);
this.splitContainer1.Size = new System.Drawing.Size(1022, 704); this.splitContainer1.Size = new System.Drawing.Size(1022, 704);
this.splitContainer1.SplitterDistance = 486; this.splitContainer1.SplitterDistance = 487;
this.splitContainer1.SplitterWidth = 3; this.splitContainer1.SplitterWidth = 3;
this.splitContainer1.TabIndex = 4; this.splitContainer1.TabIndex = 4;
// //