Merge branch 'main' of github.com:jtt-fan/29WxOrder

This commit is contained in:
chfei committed 2026-09-18 14:33:08 +08:00
commit 107bf82f97
31 files changed
+2644 -885

No files matched your search

+1
View File
@@ -11,6 +11,7 @@
<converters:HasTextToVisibilityConverter x:Key="HasTextVisibility" />
<converters:TextEllipsisConverter x:Key="TextEllipsisConverter" />
<converters:TextEllipsisConverter26 x:Key="TextEllipsisConverter26" />
<converters:TextEllipsisConverter8 x:Key="TextEllipsisConverter8" />
<converters:NotHasTextToVisibilityConverter x:Key="NotHasTextVisibility" />
<converters:VisibleToVisibilityConverter x:Key="visibleToVisibilityConverter" />
<converters:ImageUrlToBitmapImageConverter x:Key="ImageUrlToBitmapImage" />
+14 -12
View File
@@ -49,14 +49,14 @@ namespace _29WxOrderWpf.BaseWindows
BaseMsgWindow msgBox = null;
Window owner = window ?? MainWindow.Instance;
owner.Dispatcher.Invoke(new Action(() =>
{
//owner.Dispatcher.Invoke(() =>
Application.Current.Dispatcher.Invoke(() =>
{
msgBox = CreateMsgForm(msg, title, wl);
msgBox.imgTip.Source = Application.Current.Resources["imgBaseMsgInfo"] as ImageSource;
msgBox.Owner = owner;
//msgBox.Owner = owner;
msgBox.ShowDialog();
}));
});
return msgBox;
}
@@ -65,13 +65,14 @@ namespace _29WxOrderWpf.BaseWindows
string title = string.IsNullOrEmpty(caption) ? "系统错误" : caption;
BaseMsgWindow msgBox = null;
Window owner = window ?? MainWindow.Instance;
owner.Dispatcher.Invoke(new Action(() =>
{
//owner.Dispatcher.Invoke(() =>
Application.Current.Dispatcher.Invoke(() =>
{
msgBox = CreateMsgForm(msg, title, wl);
msgBox.imgTip.Source = Application.Current.Resources["imgBaseMsgErr"] as ImageSource;
msgBox.Owner = owner;
//msgBox.Owner = owner;
msgBox.ShowDialog();
}));
});
return msgBox;
}
@@ -81,8 +82,9 @@ namespace _29WxOrderWpf.BaseWindows
BaseMsgWindow msgBox = null;
Window owner = window ?? MainWindow.Instance;
owner.Dispatcher.Invoke(() =>
{
//owner.Dispatcher.Invoke(() =>
Application.Current.Dispatcher.Invoke(() =>
{
msgBox = new BaseMsgWindow
{
lblTitle = { Content = title },
@@ -94,7 +96,7 @@ namespace _29WxOrderWpf.BaseWindows
msgBox.Width = (int)MsgWindowLevel.LARGE;
msgBox.Height = 500;
}
msgBox.Owner = owner;
//msgBox.Owner = owner;
msgBox.ShowDialog();
});
return msgBox;
@@ -53,20 +53,36 @@ namespace _29WxOrderWpf.Converters
}
}
/// <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(); // 单向绑定可不实现
}
}
/// <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(); // 单向绑定可不实现
}
}
/// <summary>
/// 超出10个字的文本显示省略号
/// </summary>
public class TextEllipsisConverter8 : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value.ParseToString().Length > 8)
return string.Join("", value.ParseToString().Take(8)) + "…";
return value.ParseToString();
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException(); // 单向绑定可不实现
}
}
}
+139 -36
View File
@@ -596,7 +596,7 @@
VerticalAlignment="Center"
BorderBrush="{StaticResource mainColorBrush}"
Click="chkMapProd_Click"
Content="已关联商品"
Content="选择SKU"
FontSize="12" />
<CheckBox
x:Name="chkMapSku"
@@ -614,21 +614,20 @@
MinWidth="48"
Margin="8,0,4,0"
Padding="4,0"
c:DebugVisibility.Enable="True"
Click="btnAutoBuy_Click"
Content="自动拍单"
FontSize="12"
Style="{StaticResource BasePageButtonStyle}" />
<!-- c:DebugVisibility.Enable="true" -->
<Button
x:Name="btnAutoBuyIntorduction"
Width="Auto"
Height="22"
MinWidth="48"
Margin="0,0,4,0"
Margin="0,0,8,0"
Padding="4,0"
c:DebugVisibility.Enable="True"
Click="btnAutoBuyIntroduction_Click"
Content="自动拍单说明"
Content="自动拍单设置说明"
FontSize="12"
Style="{StaticResource BasePageButtonLightStyle}" />
<Polyline
@@ -667,15 +666,35 @@
Margin="4,0,4,4"
BorderBrush="#e0e0e0"
BorderThickness="0,0,0,1">
<CheckBox
x:Name="chkDirectSendFailed"
Margin="6,8"
HorizontalAlignment="Left"
VerticalAlignment="Center"
BorderBrush="{StaticResource mainColorBrush}"
Click="chkDirectSendFailed_Click"
Content="直拍发货失败"
FontSize="12" />
<WrapPanel>
<CheckBox
x:Name="chkDirectSendFailed"
Margin="6,8"
HorizontalAlignment="Left"
VerticalAlignment="Center"
BorderBrush="{StaticResource mainColorBrush}"
Click="chkDirectSendFailed_Click"
Content="直拍发货失败"
FontSize="12" />
<CheckBox
x:Name="chkWaitSend48HourNoWaybill"
Margin="6,8"
HorizontalAlignment="Left"
VerticalAlignment="Center"
BorderBrush="{StaticResource mainColorBrush}"
Click="chkWaitSendNoWaybill_Click"
Content="48小时未发货"
FontSize="12" />
<CheckBox
x:Name="chkWaitSend72HourNoWaybill"
Margin="6,8"
HorizontalAlignment="Left"
VerticalAlignment="Center"
BorderBrush="{StaticResource mainColorBrush}"
Click="chkWaitSendNoWaybill_Click"
Content="72小时未发货"
FontSize="12" />
</WrapPanel>
</Border>
</TabItem>
<TabItem
@@ -701,15 +720,43 @@
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<CheckBox
x:Name="chkNeedCheckExpress"
Margin="6,8"
HorizontalAlignment="Left"
VerticalAlignment="Center"
BorderBrush="{StaticResource mainColorBrush}"
Click="chkNeedCheckExpress_Click"
Content="需核对物流"
FontSize="12" />
<WrapPanel>
<CheckBox
x:Name="chkNeedCheckExpress"
Margin="6,8"
HorizontalAlignment="Left"
VerticalAlignment="Center"
BorderBrush="{StaticResource mainColorBrush}"
Click="chkNeedCheckExpress_Click"
Content="需核对物流"
FontSize="12" />
<Polyline
Grid.Column="3"
Width="10"
Margin="5,0"
VerticalAlignment="Center"
Points="5,0 5,8 5,0"
Stroke="{StaticResource mainColorBrush}"
StrokeThickness="2" />
<CheckBox
x:Name="chk48HourNoWaybill"
Margin="6,8"
HorizontalAlignment="Left"
VerticalAlignment="Center"
BorderBrush="{StaticResource mainColorBrush}"
Click="chkNoWaybill_Click"
Content="48小时未发货"
FontSize="12" />
<CheckBox
x:Name="chk72HourNoWaybill"
Margin="6,8"
HorizontalAlignment="Left"
VerticalAlignment="Center"
BorderBrush="{StaticResource mainColorBrush}"
Click="chkNoWaybill_Click"
Content="72小时未发货"
FontSize="12" />
</WrapPanel>
<WrapPanel
Grid.Column="2"
d:Opacity="0.2"
@@ -1018,7 +1065,7 @@
</wpf:TitleContent>
<wpf:TitleContent
Title="拦截退回总店状态"
Margin="4,0,4,0"
Margin="8,0,4,0"
VerticalContentAlignment="Center"
FontSize="12"
Foreground="Black"
@@ -1034,7 +1081,7 @@
<ComboBoxItem Content="请选择" />
<ComboBoxItem Content="未拦截" />
<ComboBoxItem Content="拦截中" />
<!--<ComboBoxItem Content="拦截失败" />-->
<ComboBoxItem Content="拦截失败" />
<ComboBoxItem Content="拦截成功" />
</ComboBox>
</wpf:TitleContent>
@@ -1091,17 +1138,7 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<WrapPanel>
<Button
x:Name="btnBatchRefund2"
Grid.Column="1"
Height="20"
MinWidth="48"
Margin="6,6"
Padding="4,0"
Click="btnBatchRefund_Click"
Content="批量申请买手售后"
FontSize="12"
Style="{StaticResource BasePageButtonStyle}" />
<CheckBox
x:Name="chkShopIsRefund"
Grid.Column="0"
@@ -1140,6 +1177,72 @@
Click="chkUpShopAddressAnalyseFailed_Click"
Content="总店地址解析失败"
FontSize="12" />
<Polyline
Grid.Column="14"
Width="10"
Margin="5,0"
VerticalAlignment="Center"
Points="5,0 5,8 5,0"
Stroke="{StaticResource mainColorBrush}"
StrokeThickness="2"
Visibility="Visible" />
<wpf:TitleContent
Title="买手退货状态"
Margin="4,0,4,0"
VerticalContentAlignment="Center"
FontSize="12"
Foreground="Black"
Placement="Left"
TitleVerticalAlignment="Center">
<ComboBox
x:Name="cmbReturnOrderBuyerStatus"
Width="130"
Height="23"
SelectedIndex="0"
SelectionChanged="cmbReturnOrderBuyerStatus_SelectionChanged"
Style="{StaticResource RoundedComboBox}">
<ComboBoxItem Content="请选择" />
<ComboBoxItem Content="买手待申请售后" />
<ComboBoxItem Content="买手待退货" />
<ComboBoxItem Content="买手已寄出待商家退款" />
<ComboBoxItem Content="买手退货失败" />
</ComboBox>
</wpf:TitleContent>
<Button
x:Name="btnBatchRefund2"
Grid.Column="1"
Height="20"
MinWidth="48"
Margin="6,6"
Padding="4,0"
Click="btnBatchRefund_Click"
Content="批量申请买手售后"
FontSize="12"
Style="{StaticResource BasePageButtonStyle}" />
<wpf:TitleContent
Title="退货仓状态"
Margin="8,0,4,0"
VerticalContentAlignment="Center"
FontSize="12"
Foreground="Black"
Placement="Left"
TitleVerticalAlignment="Center">
<ComboBox
x:Name="cmbReturnOrderStatus"
Width="100"
Height="23"
SelectedIndex="0"
SelectionChanged="cmbReturnOrderStatus_SelectionChanged"
Style="{StaticResource RoundedComboBox}">
<ComboBoxItem Content="请选择" />
<ComboBoxItem Content="未创建" />
<ComboBoxItem Content="创建失败" />
<ComboBoxItem Content="已创建未到仓" />
<ComboBoxItem Content="已到仓" />
<ComboBoxItem Content="已发回" />
</ComboBox>
</wpf:TitleContent>
</WrapPanel>
</Grid>
</Border>
@@ -5,6 +5,8 @@ using _29WxOrderWpf.Ctrls.BuyerCtrls;
using _29WxOrderWpf.Ctrls.Statistics;
using _29WxOrderWpf.Services;
using _29WxOrderWpf.Utils;
using _29WxOrderWpf.ViewModels;
using _29WxOrderWpf.Views;
using _29WxOrderWpf.Windows.OrderWindows;
using AllBase;
using AllBase.Extension;
@@ -42,9 +44,9 @@ using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Xml;
using System.Xml.Linq;
using _29WxOrderWpf.ViewModels;
using Work;
using Work._29Tools.BLL;
using Work.BaseForms;
using Work.BuyUsers;
using Work.KJDServer.API.Models;
using WPFCommon.Helpers;
@@ -58,6 +60,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
/// </summary>
public partial class OrderListCtrl : UserControl, INotifyPropertyChanged
{
public static bool IsAutoBuy { get; set; } = false;
public CheckBox chkSelectAll = null;
OrderFilterConfig _orderFilterConfig;
public OrderFilterConfig orderFilterConfig
@@ -304,8 +307,12 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
// 读取关联拍单商品
var buyMapList = GetBuyProdMap(orderItems);
// 读取关联拍单的所有sku
var buyMapSkusList = GetBuyProdMapSkus(orderItems);
// 读取物流轨迹
var ewaybillLst = GetEWaybillPath(order_ids);
// 装载订单
foreach (JObject jObj in jArr)
{
@@ -364,6 +371,15 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
// 装载订单售后详情
order.refundItems = new ObservableCollection<oms_wei_refund_info>(refunds.Where(of => of.order_id == order.order_id));
if (order.order_id.Contains("3738794693820307200"))
{
}
// 装载订单物流最后一条信息
order.latestEWaybills = [.. ewaybillLst.Where(ew => ew.order_id == order.order_id.ParseToLong())];
// 读取订单后立即赋值,防止滚动时实时赋值造成卡顿
InitOrderObservableProp(order);
@@ -682,6 +698,37 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
return new List<order_pdd_buyer_after_sale>();
}
public static List<oms_wei_ewaybill_path> GetEWaybillPath(string order_ids)
{
List<oms_wei_ewaybill_path> oms_wei_ewaybill_path_list = null;
if (!string.IsNullOrEmpty(order_ids))
{
try
{
var url = BaseClass.Build29WxObjString("order/wx_get_erp_ewaybill_path_latest_list");
var data = UserLogin.GetSignaturex();
data += "&erp_order_id_in=" + order_ids;
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", 6);
}
else
{
oms_wei_ewaybill_path_list = JsonHelper.DeserializeJsonToList<oms_wei_ewaybill_path>(JObject.Parse(html)["data"].ParseToString()).OrderByDescending(p => p.update_time).ToList();
}
}
catch
{
}
}
if (oms_wei_ewaybill_path_list == null)
oms_wei_ewaybill_path_list = new List<oms_wei_ewaybill_path>();
return oms_wei_ewaybill_path_list;
}
public static List<WXBuyMapInfo> GetBuyProdMap(List<oms_wei_order_item_info> orderItems)
{
//foreach (var item in orderItems.ToList())
@@ -987,7 +1034,19 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
var waybillId = orderItem.ItemTransitOrderAfterSale.downstream_waybill;
var chkRst = AddReturnPddShopPackageInfocheck(buyer, orderSn, afterSalesId, waybillId);
var result = AddReturnPddShopPackageInfo(buyer, orderSn, afterSalesId, waybillId);
var type = 4;
if (chkRst.Contains("\"interactType\":0"))
type = 2;
var result = AddReturnPddShopPackageInfo(buyer, orderSn, afterSalesId, waybillId, "韵达快递", "121", type.ToString());
if (!result.Contains("\"result\":\"ok\""))
{
type = type == 4 ? 2 : 4;
result = AddReturnPddShopPackageInfo(buyer, orderSn, afterSalesId, waybillId, "韵达快递", "121", type.ToString());
}
if (!result.Contains("\"result\":\"ok\""))
{
result = AddReturnPddShopPackageInfo(buyer, orderSn, afterSalesId, waybillId, "韵达快递", "121", "5");
}
if (result.Contains("\"result\":\"ok\""))
{
@@ -1068,6 +1127,10 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
type = type == 4 ? 2 : 4;
result = AddReturnPddShopPackageInfo(buyer, orderSn, afterSalesId, waybillId, "韵达快递", "121", type.ToString());
}
if (!result.Contains("\"result\":\"ok\""))
{
result = AddReturnPddShopPackageInfo(buyer, orderSn, afterSalesId, waybillId, "韵达快递", "121", "5");
}
if (result.Contains("\"result\":\"ok\""))
{
@@ -1149,6 +1212,10 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
type = type == 4 ? 2 : 4;
result = AddReturnPddShopPackageInfo(buyer, orderSn, afterSalesId, waybillId, "韵达快递", "121", type.ToString());
}
if (!result.Contains("\"result\":\"ok\""))
{
result = AddReturnPddShopPackageInfo(buyer, orderSn, afterSalesId, waybillId, "韵达快递", "121", "5");
}
if (result.Contains("\"result\":\"ok\""))
{
@@ -1239,7 +1306,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
if (tabItem != null)
{
var filteLstTmp = userOrderLst.Where(o => !GetOrderIsFilter(o, "异常需重拍"));
Dispatcher.Invoke(new Action(() => { tabItem.Header = "异常需重拍(" + userOrderLst.Where(r => r.isAbnormal).Count() + "|" + filteLstTmp.Count() + ")"; }));
Dispatcher.Invoke(new Action(() => { tabItem.Header = "异常需重拍(" + userOrderLst.Where(r => r.IsAbnormal).Count() + "|" + filteLstTmp.Count() + ")"; }));
}
Dispatcher.Invoke(new Action(() => { tabItem = tabItems.FirstOrDefault(t => t.Header.ParseToString().StartsWith("全部订单")); }));
if (tabItem != null)
@@ -1510,13 +1577,17 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
}
if (filterHeadStr.StartsWith("待采购"))
{
if (order.order_id == "3739161507780018688")
{
}
if (!order.IsWaitBuy)
return true;
if (chkMapSku.IsChecked == true && order.orderItems.All(oi => oi.BuyMap == null && (oi.BuyMapSkus == null || oi.BuyMapSkus.Count == 0)))
if (chkMapSku.IsChecked == true && order.orderItems.Any(oi => oi.BuyMap == null))
return true;
if (chkMapProd.IsChecked == true && order.orderItems.All(oi => oi.BuyMapSkus == null || oi.BuyMapSkus.Count == 0))
if (chkMapProd.IsChecked == true && order.orderItems.All(oi => oi.BuyMapSkus == null || oi.BuyMapSkus.Count == 0 || oi.BuyMap != null))
return true;
if (chkNoMapProd.IsChecked == true && order.orderItems.All(oi => oi.BuyMap != null))
if (chkNoMapProd.IsChecked == true && (order.orderItems.All(oi => oi.BuyMap != null) || order.orderItems.All(oi => oi.BuyMapSkus != null && oi.BuyMapSkus.Count > 0)))
return true;
}
if (filterHeadStr.StartsWith("待发货"))
@@ -1531,6 +1602,35 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
if (!rst2)
return true;
}
if (chkWaitSend72HourNoWaybill.IsChecked == true)
{
if (order.orderItems.Any(oi => oi.DirectPddBuyerOrders.OrderByDescending(bo => bo.order_time).FirstOrDefault() is order_pdd_buyer_order bOrder &&
(bOrder?.tracking_number).IsNullOrEmpty() && bOrder?.order_time <= BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-72))))
{ }
// 直发没有单号正常发货才判断中转仓总店是否超时发货
else if (order.orderItems.Any(oi => (oi.DirectPddBuyerOrders?.Count).IsNullOrZero() &&
oi.PddBuyerOrders.OrderByDescending(bo => bo.order_time).FirstOrDefault() is order_pdd_buyer_order bOrder &&
(bOrder?.tracking_number).IsNullOrEmpty() && bOrder?.order_time <= BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-72))))
{ }
else
return true;
}
else if (chkWaitSend48HourNoWaybill.IsChecked == true)
{
if (order.orderItems.Any(oi => oi.DirectPddBuyerOrders.OrderByDescending(bo => bo.order_time).FirstOrDefault() is order_pdd_buyer_order bOrder &&
(bOrder?.tracking_number).IsNullOrEmpty() && (bOrder?.order_time < BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-48)) &&
bOrder.order_time >= BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-72)))))
{ }
// 直发没有单号才判断中转仓总店是否超时发货
else if (order.orderItems.Any(oi => (oi.DirectPddBuyerOrders?.Count).IsNullOrZero() &&
oi.PddBuyerOrders.OrderByDescending(bo => bo.order_time).FirstOrDefault() is order_pdd_buyer_order bOrder &&
(bOrder?.tracking_number).IsNullOrEmpty() && (bOrder?.order_time < BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-48)) &&
bOrder.order_time >= BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-72)))))
{ }
else
return true;
}
}
if (filterHeadStr.StartsWith("待收货"))
{
@@ -1559,8 +1659,41 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
return true;
if (chkWaitReceiveWarehouseIsSendOut.IsChecked == true && order.orderItems.All(oi => oi.WarehouseWaybillStatusStr != "中转已出库"))
return true;
if (chk72HourNoWaybill.IsChecked == true)
{
if (order.order_id == "3739190405314033408")
{
}
// 直发没有单号才判断中转仓总店是否超时发货
if (order.orderItems.Any(oi => oi.DirectPddBuyerOrders.OrderByDescending(bo => bo.order_time).FirstOrDefault() is order_pdd_buyer_order bOrder &&
(bOrder?.tracking_number).IsNullOrEmpty() && bOrder?.order_time <= BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-72))))
{ }
else if (order.orderItems.Any(oi => (oi.DirectPddBuyerOrders?.Count).IsNullOrZero() &&
oi.PddBuyerOrders.OrderByDescending(bo => bo.order_time).FirstOrDefault() is order_pdd_buyer_order bOrder &&
(bOrder?.tracking_number).IsNullOrEmpty() && bOrder?.order_time <= BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-72))))
{ }
else
return true;
}
else if (chk48HourNoWaybill.IsChecked == true)
{
// 直发没有单号才判断中转仓总店是否超时发货
if (order.orderItems.Any(oi => oi.DirectPddBuyerOrders.OrderByDescending(bo => bo.order_time).FirstOrDefault() is order_pdd_buyer_order bOrder &&
(bOrder?.tracking_number).IsNullOrEmpty() && (bOrder?.order_time < BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-48)) &&
bOrder.order_time >= BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-72)))))
{ }
else if (order.orderItems.Any(oi =>(oi.DirectPddBuyerOrders?.Count).IsNullOrZero() &&
oi.PddBuyerOrders.OrderByDescending(bo => bo.order_time).FirstOrDefault() is order_pdd_buyer_order bOrder &&
(bOrder?.tracking_number).IsNullOrEmpty() && (bOrder?.order_time < BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-48)) &&
bOrder.order_time >= BaseClass.DateTimeToTimestampSeconds(DateTime.Now.AddHours(-72)))))
{ }
else
return true;
}
}
if (filterHeadStr.StartsWith("异常需重拍") && !order.isAbnormal)
if (filterHeadStr.StartsWith("异常需重拍") && !order.IsAbnormal)
{
return true;
}
@@ -1657,12 +1790,9 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
foreach (var orderItem in order.orderItems)
{
for (int i = 0; i < 1000; i++)
{
var receiver = TransitReturnOrderWindow.PddAddressAnalysis(orderItem.PddBuyerAfterSale?.afterSaleAddress);
if (!receiver.receiver_address.IsNullOrEmpty())
return true;
}
var receiver = TransitReturnOrderWindow.PddAddressAnalysis(orderItem.PddBuyerAfterSale?.afterSaleAddress);
if (!receiver.receiver_address.IsNullOrEmpty() && receiver.receiver_name.Length <= 15)
return true;
}
}
else
@@ -1673,11 +1803,34 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
foreach (var orderItem in order.orderItems)
{
var receiver = TransitReturnOrderWindow.PddAddressAnalysis(orderItem.DirectPddBuyerAfterSale?.afterSaleAddress);
if (!receiver.receiver_address.IsNullOrEmpty())
if (!receiver.receiver_address.IsNullOrEmpty() && receiver.receiver_name.Length <= 15)
return true;
}
}
}
var cmbReturnOrderStatusText = cmbReturnOrderStatus.SelectedItem.ParseToString().Replace("System.Windows.Controls.ComboBoxItem: ", "");
if (cmbReturnOrderStatusText == "未创建" && !order.orderItems.Any(oi => oi.AddEditTransitWarehouseReturnOrderStr == "未创建"))
return true;
if (cmbReturnOrderStatusText == "创建失败" && !order.orderItems.Any(oi => oi.AddEditTransitWarehouseReturnOrderStr == "创建失败"))
return true;
if (cmbReturnOrderStatusText == "已创建未到仓" && !order.orderItems.Any(oi => oi.AddEditTransitWarehouseReturnOrderStr.StartsWith("已创建未到仓")))
return true;
if (cmbReturnOrderStatusText == "已到仓" && !order.orderItems.Any(oi => oi.AddEditTransitWarehouseReturnOrderStr.StartsWith("已到仓")))
return true;
if (cmbReturnOrderStatusText == "已发回" && !order.orderItems.Any(oi => oi.AddEditTransitWarehouseReturnOrderStr.StartsWith("已发回")))
return true;
var cmbReturnOrderBuyerStatusText = cmbReturnOrderBuyerStatus.SelectedItem.ParseToString().Replace("System.Windows.Controls.ComboBoxItem: ", "");
if (cmbReturnOrderBuyerStatusText == "买手待申请售后" && order.orderItems.All(oi => !oi.TransitRefundStatusStr.Contains("需手动申请售后")))
return true;
else if (cmbReturnOrderBuyerStatusText == "买手待退货" && order.orderItems.All(oi => !oi.TransitRefundStatusStr.Contains("待用户发货")))
return true;
else if (cmbReturnOrderBuyerStatusText == "买手已寄出待商家退款" && order.orderItems.All(oi => !oi.TransitRefundStatusStr.Contains("商家处理中")))
return true;
else if (cmbReturnOrderBuyerStatusText == "买手退货失败" && order.orderItems.All(oi => !oi.TransitRefundStatusStr.Contains("退款失败")))
return true;
}
if (filterHeadStr.StartsWith("售后完成单"))
{
@@ -2176,7 +2329,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
int index = 0;
foreach (var tmpOrderItem in tmpOrderItems)
{
if (tmpOrderItem.order_id == "3738534855500515072")
if (tmpOrderItem.order_id == "3739068430223324416")
{
}
@@ -2211,7 +2364,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
continue;
}
MainWindow.Instance.orderListCtrl.GetOrder(tmpOrderItem.order_id);
await Task.Run(() => { MainWindow.Instance.orderListCtrl.GetOrder(tmpOrderItem.order_id); });
oms_wei_order_info order = null;
Dispatcher.Invoke(new Action(() => { order = GlobalConfig.lstOrder.FirstOrDefault(oi => oi.order_id == tmpOrderItem.order_id); }));
@@ -2327,7 +2481,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
{
BaseMsgWindow.ShowAnimateMessage("买手退款信息更新成功" + orderItem.order_id, "Msg", 3);
isSimPddAfterSaleSuccess = true;
Thread.Sleep(Randomx.GetId(10000, 12001));
await Task.Run(() => { Thread.Sleep(Randomx.GetId(10000, 12001)); });
}
else
{
@@ -2342,7 +2496,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
{
BaseMsgWindow.ShowAnimateMessage("买手退款信息更新成功", "Msg", 3);
isSimPddAfterSaleSuccess = true;
Thread.Sleep(Randomx.GetId(10000, 12001));
await Task.Run(() => { Thread.Sleep(Randomx.GetId(10000, 12001)); });
}
else
{
@@ -2715,16 +2869,57 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
return;
}
IsAutoBuy = true;
foreach (var order in buyOrders)
{
var orderItem = order.orderItems.FirstOrDefault();
await OrderListRowItemCtrl.BuyOrder(orderItem, true);
if (IsAutoBuy == false)
break;
}
IsAutoBuy = false;
}
private void btnAutoBuyIntroduction_Click(object sender, RoutedEventArgs e)
{
AutoBuyIntroductionView autoBuyIntroForm = new AutoBuyIntroductionView();
new DialogWindow()
{
Title = "自动拍单设置说明",
Content = autoBuyIntroForm,
}.ShowDialog();
}
private void chkNoWaybill_Click(object sender, RoutedEventArgs e)
{
if (sender is CheckBox chk)
{
var isCheck = !chk.IsChecked.ParseToBool();
chk48HourNoWaybill.IsChecked = chk72HourNoWaybill.IsChecked = false;
chk.IsChecked = !isCheck;
}
FilterOrders();
}
private void chkWaitSendNoWaybill_Click(object sender, RoutedEventArgs e)
{
if (sender is CheckBox chk)
{
var isCheck = !chk.IsChecked.ParseToBool();
chkWaitSend48HourNoWaybill.IsChecked = chkWaitSend72HourNoWaybill.IsChecked = false;
chk.IsChecked = !isCheck;
}
FilterOrders();
}
private void cmbReturnOrderStatus_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
FilterOrders();
}
private void cmbReturnOrderBuyerStatus_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
FilterOrders();
}
}
@@ -207,6 +207,7 @@
<wpf:TitleContent Title="发货时间:" Visibility="{Binding ItemOrder.ship_done_time_visibility}">
<uc:UcWaterMarkTextBox1
d:Text="00-01-01 01:01:01"
Background="Transparent"
BorderThickness="0"
IsReadOnly="True"
@@ -217,6 +218,7 @@
<wpf:TitleContent Title="退款时间:" Visibility="{Binding RefundTimeVisibility}">
<uc:UcWaterMarkTextBox1
d:Text="00-01-01 01:01:01"
Background="Transparent"
BorderThickness="0"
IsReadOnly="True"
@@ -245,6 +247,16 @@
WaterMark="售价" />
</wpf:TitleContent>
<wpf:TitleContent Title="店铺运费:">
<uc:UcWaterMarkTextBox1
Background="Transparent"
BorderThickness="0"
IsReadOnly="True"
Text="{Binding PostagePriceStr}"
TextWrapping="Wrap"
WaterMark="店铺运费" />
</wpf:TitleContent>
<wpf:TitleContent Title="平台优惠:">
<uc:UcWaterMarkTextBox1
d:Text="¥100.00"
@@ -256,24 +268,25 @@
WaterMark="平台优惠" />
</wpf:TitleContent>
<wpf:TitleContent Title="进价:" Visibility="{Binding purchase_price_visibility}">
<wpf:TitleContent Title="进价:" Visibility="{Binding PurchasePriceVisibility}">
<uc:UcWaterMarkTextBox1
d:Text="¥100.00"
Background="Transparent"
BorderThickness="0"
IsReadOnly="True"
Text="{Binding purchase_price_str}"
Text="{Binding PurchasePriceStr}"
TextWrapping="Wrap"
Visibility="{Binding purchase_price_visibility}"
Visibility="{Binding PurchasePriceVisibility}"
WaterMark="进价" />
</wpf:TitleContent>
<wpf:TitleContent Title="运费:" Visibility="{Binding FreightVisibility}">
<uc:UcWaterMarkTextBox1
d:Text="¥100.00"
Background="Transparent"
BorderThickness="0"
IsReadOnly="True"
Text="{Binding freight_str}"
Text="{Binding FreightStr}"
TextWrapping="Wrap"
Visibility="{Binding FreightVisibility}"
WaterMark="运费" />
@@ -417,15 +430,33 @@
</WrapPanel>
<!-- 售后状态 -->
<TextBlock
x:Name="txtStatusStr"
HorizontalAlignment="Center"
VerticalAlignment="Top"
d:Text="售后状态"
Background="Transparent"
Foreground="{Binding ItemRefund.RefundStatusColor}"
Text="{Binding ItemRefund.RefundStatusStr}"
Visibility="{Binding ElementName=txtStatusStr, Path=Text, Converter={StaticResource HasTextVisibility}}" />
<WrapPanel>
<TextBlock
x:Name="txtOrderItemStatusStr"
HorizontalAlignment="Center"
VerticalAlignment="Top"
d:Text="物品售后状态"
Background="Transparent"
Foreground="{Binding ItemRefund.RefundStatusColor}"
Text="{Binding RefundStatusStr}"
Visibility="{Binding ElementName=txtOrderItemStatusStr, Path=Text, Converter={StaticResource HasTextVisibility}}" />
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Top"
Background="Transparent"
Foreground="{Binding ItemRefund.RefundStatusColor}"
Text=":"
Visibility="{Binding ElementName=txtOrderItemStatusStr, Path=Text, Converter={StaticResource HasTextVisibility}}" />
<TextBlock
x:Name="txtStatusStr"
HorizontalAlignment="Center"
VerticalAlignment="Top"
d:Text="售后状态"
Background="Transparent"
Foreground="{Binding ItemRefund.RefundStatusColor}"
Text="{Binding ItemRefund.RefundStatusStr}"
Visibility="{Binding ElementName=txtStatusStr, Path=Text, Converter={StaticResource HasTextVisibility}}" />
</WrapPanel>
<!-- 售后原因 -->
<TextBlock
x:Name="txtRefundReasonTextStr"
@@ -565,15 +596,10 @@
Orientation="Vertical"
VerticalSpacing="2">
<!-- 状态标签行(原 Row 1-2) -->
<WrapPanel
x:Name="wpTransitBuyerRefundStatus"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
<!-- 状态标签行 -->
<WrapPanel
x:Name="wpTransitWaybillStatus"
Margin="0,0,0,4"
Margin="0,0,0,2"
HorizontalAlignment="Center">
<Border
x:Name="borderBuyStatas"
@@ -698,7 +724,7 @@
<WrapPanel Orientation="Horizontal">
<uc:UcWaterMarkTextBox1
x:Name="txtTransitOrderNumStr"
Margin="-2,2"
Margin="-2,0"
Padding="0"
VerticalAlignment="Top"
Background="Transparent"
@@ -736,7 +762,7 @@
Visibility="{Binding ElementName=txtOutOrderTimeQualifiedStr, Path=Text, Converter={StaticResource HasTextVisibility}}">
<uc:UcWaterMarkTextBox1
x:Name="txtOutOrderTimeQualifiedStr"
Margin="-2,2"
Margin="-2,0"
Padding="0"
VerticalAlignment="Top"
Background="Transparent"
@@ -754,7 +780,7 @@
Foreground="{StaticResource PageOkBrush}"
Visibility="{Binding TransitOrderWaybillToWareHouseStr, Converter={StaticResource HasTextVisibility}}">
<uc:UcWaterMarkTextBox1
Margin="-2,2"
Margin="-2,0"
Padding="0"
VerticalAlignment="Top"
Background="Transparent"
@@ -783,16 +809,26 @@
<!-- 仓库物流 -->
<wpf:TitleContent Title="仓库物流:" Visibility="{Binding TransitOrderWaybillFromWareHouseStr, Converter={StaticResource HasTextVisibility}}">
<uc:UcWaterMarkTextBox1
Margin="-2,2"
Padding="0"
VerticalAlignment="Top"
Background="Transparent"
BorderThickness="0"
IsReadOnly="True"
Text="{Binding TransitOrderWaybillFromWareHouseStr}"
TextWrapping="Wrap"
WaterMark="仓库物流" />
<WrapPanel>
<uc:UcWaterMarkTextBox1
Margin="-2,0"
Padding="0"
VerticalAlignment="Center"
Background="Transparent"
BorderThickness="0"
IsReadOnly="True"
Text="{Binding TransitOrderWaybillFromWareHouseStr}"
TextWrapping="Wrap"
WaterMark="仓库物流" />
<Button
x:Name="btnGetTransitWaybillDetail"
Margin="4,0,0,0"
Padding="0,0,0,0"
d:Content="查看"
Click="btnGetTransitWaybillDetail_Click"
Content="{Binding LatestTransitEWaybill.StatusStr}"
Style="{StaticResource LinkButton}" />
</WrapPanel>
</wpf:TitleContent>
<!-- 外采买手 -->
@@ -896,7 +932,7 @@
<uc:UcWaterMarkTextBox1
Margin="-2,2"
Padding="0"
VerticalAlignment="Top"
VerticalAlignment="Center"
Background="Transparent"
BorderThickness="0"
Foreground="{Binding ItemOrder.OutExpressNoBrush}"
@@ -907,7 +943,7 @@
<uc:UcWaterMarkTextBox1
Margin="-2,2"
Padding="0"
VerticalAlignment="Top"
VerticalAlignment="Center"
Background="Transparent"
BorderThickness="0"
Foreground="{Binding ItemOrder.OutExpressNoBrush}"
@@ -918,7 +954,7 @@
<uc:UcWaterMarkTextBox1
Margin="-2,2,4,2"
Padding="0"
VerticalAlignment="Top"
VerticalAlignment="Center"
Background="Transparent"
BorderThickness="0"
Foreground="{Binding ItemOrder.OutExpressNoBrush}"
@@ -926,6 +962,15 @@
Text="{Binding ItemOrder.OutExpressNoStr}"
TextWrapping="Wrap"
WaterMark="外采物流" />
<Button
x:Name="btnGetDirectWaybillDetail"
Margin="4,0,0,0"
Padding="0,0,0,0"
d:Content="查看"
Click="btnGetDirectWaybillDetail_Click"
Content="{Binding LatestDirectEWaybill.StatusStr}"
Style="{StaticResource LinkButton}" />
</WrapPanel>
</wpf:TitleContent>
@@ -996,7 +1041,7 @@
IsReadOnly="True"
Text="{Binding ItemOrder.shop_remark}"
TextWrapping="Wrap"
Visibility="Visible"
Visibility="{Binding ItemOrder.shop_remark, Converter={StaticResource HasTextVisibility}}"
WaterMark="店铺备注" />
<Button
x:Name="btnEditShopRemark"
@@ -1025,6 +1070,7 @@
IsReadOnly="True"
Text="{Binding ItemOrder.soft_remark}"
TextWrapping="Wrap"
Visibility="{Binding ItemOrder.soft_remark, Converter={StaticResource HasTextVisibility}}"
WaterMark="软件备注" />
<Button
x:Name="btnEditAppRemark"
@@ -1053,6 +1099,7 @@
IsReadOnly="True"
Text="{Binding TransitWarehouseRejectSuccessTimeStr}"
TextWrapping="Wrap"
Visibility="{Binding TransitWarehouseRejectSuccessTimeStr, Converter={StaticResource HasTextVisibility}}"
WaterMark="中转仓拒收" />
<Button
x:Name="btnAddEditTransitWarehouseReject"
@@ -1082,6 +1129,7 @@
IsReadOnly="True"
Text="{Binding TransitWarehouseAfterSaleWayBillStr}"
TextWrapping="Wrap"
Visibility="{Binding TransitWarehouseAfterSaleWayBillStr, Converter={StaticResource HasTextVisibility}}"
WaterMark="拦截退回总店" />
<Button
x:Name="btnAddEditTransitWarehouseAfterSale"
@@ -1089,6 +1137,17 @@
Click="btnAddEditTransitWarehouseAfterSale_Click"
Content="{Binding AddEditTransitWarehouseAfterSaleStr}"
Style="{StaticResource LinkButton}" />
<uc:UcWaterMarkTextBox1
x:Name="txtInterceptReturnInfoStr"
Margin="0,1,0,1"
VerticalAlignment="Top"
Background="Transparent"
BorderThickness="1"
IsReadOnly="True"
Text="{Binding InterceptReturnInfoStr, Converter={StaticResource TextEllipsisConverter8}}"
TextWrapping="Wrap"
ToolTip="{Binding InterceptReturnInfoStr}"
Visibility="{Binding InterceptReturnInfoStr, Converter={StaticResource HasTextVisibility}}" />
</WrapPanel>
</wpf:TitleContent>
@@ -1104,10 +1163,11 @@
IsReadOnly="True"
Text="{Binding AddEditTransitWarehouseReturnOrderWaybillStr}"
TextWrapping="Wrap"
Visibility="{Binding AddEditTransitWarehouseReturnOrderWaybillStr, Converter={StaticResource HasTextVisibility}}"
WaterMark="云仓退货" />
<Button
x:Name="btnRetrunOrder"
d:Content="添加"
d:Content="未创建"
Click="btnReturnOrder_Click"
Content="{Binding AddEditTransitWarehouseReturnOrderStr}"
Style="{StaticResource LinkButton}" />
@@ -1170,7 +1230,7 @@
Background="Transparent"
Cursor="Hand"
MouseLeftButtonDown="pathDirectBuyerAfterSaleAddress_MouseLeftButtonDown"
Visibility="{Binding ElementName=txtBuyerRefundAddress, Path=Visibility}">
Visibility="{Binding ElementName=txtDirectBuyerRefundAddress, Path=Visibility}">
<Path
Data="M80 432a128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128h-384a128 128 0 0 1-128-128v-384z m128-64a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64h-384z M816 144h-384a64 64 0 0 0-64 64 32 32 0 0 1-64 0 128 128 0 0 1 128-128h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128 32 32 0 0 1 0-64 64 64 0 0 0 64-64v-384a64 64 0 0 0-64-64z"
Fill="{StaticResource PageLinkBrush}"
@@ -1191,7 +1251,7 @@
<wpf:TitleContent>
<Button
x:Name="btnMapSkus"
Height="24"
Height="22"
MinWidth="38"
Margin="4,0,0,0"
HorizontalAlignment="Center"
@@ -1207,7 +1267,7 @@
<Button
x:Name="btnBuyOrder"
Height="24"
Height="22"
MinWidth="38"
Margin="4,0,0,0"
HorizontalAlignment="Center"
@@ -1227,7 +1287,7 @@
<Button
x:Name="btnVoidTransitOrder"
Height="24"
Height="22"
MinWidth="38"
Margin="4,0,0,0"
HorizontalAlignment="Center"
@@ -1239,7 +1299,7 @@
<Button
x:Name="btnAbnormalOrderRebuy"
Height="24"
Height="22"
MinWidth="38"
Margin="4,0,0,0"
HorizontalAlignment="Center"
@@ -1255,7 +1315,7 @@
<wpf:TitleContent>
<Button
x:Name="btnDirectBuyOrder"
Height="24"
Height="22"
MinWidth="38"
Margin="4,0,0,0"
HorizontalAlignment="Center"
@@ -1269,7 +1329,7 @@
<wpf:TitleContent>
<Button
x:Name="btnShipGift"
Height="24"
Height="22"
MinWidth="38"
Margin="4,0,0,0"
HorizontalAlignment="Center"
@@ -1279,7 +1339,19 @@
Style="{StaticResource BasePageButtonLightStyle}"
Visibility="{Binding ItemOrder.IsWaitSend, Converter={StaticResource VisibleToVisibilityConverter}}" />
</wpf:TitleContent>
<wpf:TitleContent>
<Button
x:Name="btnChangeWaybill"
Height="22"
MinWidth="38"
Margin="4,0,0,0"
HorizontalAlignment="Center"
d:Visibility="Visible"
Click="btnChangeWaybill_Click"
Content="修改物流"
Style="{StaticResource BasePageButtonLightStyle}"
Visibility="{Binding ItemOrder.IsShowChangeWaybillBtn, Converter={StaticResource VisibleToVisibilityConverter}}" />
</wpf:TitleContent>
</wpf:SpacingStackPanel>
</Grid>
</Grid>
@@ -3,6 +3,8 @@ using _29WxOrderWpf.Common;
using _29WxOrderWpf.Converters;
using _29WxOrderWpf.Ctrls.BuyerCtrls;
using _29WxOrderWpf.UserControls;
using _29WxOrderWpf.ViewModels;
using _29WxOrderWpf.Views;
using _29WxOrderWpf.Windows.OrderWindows;
using AllBase;
using AllBase.Helper;
@@ -30,7 +32,6 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;
using _29WxOrderWpf.ViewModels;
using TemuKJD.ToolForms;
using Work;
using Work._29Tools.BLL;
@@ -232,6 +233,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
txtShopRemark.SetValue(WidthProperty, Double.NaN);
txtShopRemark.BorderBrush = new SolidColorBrush(Color.FromArgb(0, 0, 50, 150));
txtShopRemark.IsReadOnly = true;
if (txtShopRemark.Text.IsNullOrEmpty())
txtShopRemark.Visibility = Visibility.Collapsed;
}
else
{
@@ -240,6 +243,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
txtShopRemark.SetValue(WidthProperty, 135.0);
txtShopRemark.BorderBrush = new SolidColorBrush(Color.FromArgb(50, 0, 50, 150));
txtShopRemark.IsReadOnly = false;
txtShopRemark.Visibility = Visibility.Visible;
}
}
}
@@ -251,6 +255,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
txtShopRemark.SetValue(WidthProperty, Double.NaN);
txtShopRemark.BorderBrush = new SolidColorBrush(Color.FromArgb(0, 0, 50, 150));
txtShopRemark.IsReadOnly = true;
if (txtShopRemark.Text.IsNullOrEmpty())
txtShopRemark.Visibility = Visibility.Collapsed;
}
private void btnEditAppRemark_Click(object sender, RoutedEventArgs e)
@@ -288,6 +294,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
txtAppRemark.SetValue(WidthProperty, Double.NaN);
txtAppRemark.BorderBrush = new SolidColorBrush(Color.FromArgb(0, 0, 50, 150));
txtAppRemark.IsReadOnly = true;
if (txtAppRemark.Text.IsNullOrEmpty())
txtAppRemark.Visibility = Visibility.Collapsed;
}
else
{
@@ -295,7 +303,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
btnEditAppRemark.Content = "保存";
txtAppRemark.SetValue(WidthProperty, 135.0);
txtAppRemark.BorderBrush = new SolidColorBrush(Color.FromArgb(50, 0, 50, 150));
txtAppRemark.IsReadOnly = false;
txtAppRemark.IsReadOnly = false;
txtAppRemark.Visibility = Visibility.Visible;
}
}
}
@@ -307,6 +316,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
txtAppRemark.SetValue(WidthProperty, Double.NaN);
txtAppRemark.BorderBrush = new SolidColorBrush(Color.FromArgb(0, 0, 50, 150));
txtAppRemark.IsReadOnly = true;
if (txtAppRemark.Text.IsNullOrEmpty())
txtAppRemark.Visibility = Visibility.Collapsed;
}
private async void btnBuyOrder_Click(object sender, RoutedEventArgs e)
@@ -323,17 +334,20 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
{
if (orderItem == null)
{
BaseMsgWindow.ShowError("订单信息为空");
if (!isAutoBuy)
BaseMsgWindow.ShowError("订单信息为空");
return;
}
if (GlobalConfig.CurrentPddBuyer == null)
{
BaseMsgWindow.ShowError("请选择买手号");
if (!isAutoBuy)
BaseMsgWindow.ShowError("请选择买手号");
return;
}
if (orderItem.ItemOrder.orderItems.Count > 1)
{
BaseMsgWindow.ShowError("多子单订单中转仓暂不支持");
if (!isAutoBuy)
BaseMsgWindow.ShowError("多子单订单中转仓暂不支持");
return;
}
@@ -342,7 +356,8 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
{
OrderListCtrl.InitOrderItemObservableProp(orderItem);
MainWindow.Instance.orderListCtrl.FilterOneOrder(orderItem.ItemOrder);
BaseMsgWindow.ShowError("已存在中转拍单信息,请核对后再拍单");
if (!isAutoBuy)
BaseMsgWindow.ShowError("已存在中转拍单信息,请核对后再拍单");
return;
}
@@ -590,6 +605,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
if (isAbnormalOrder)
buyOrderForm.AbnormalTransitWarehouseOrderInfo = orderItem.ItemTransitOrder;
buyOrderForm.ShowDialog();
OrderListCtrl.IsAutoBuy = buyOrderForm.IsAutoBuy;
}));
});
}
@@ -647,13 +663,11 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
//wpBuyOrderId.Visibility = Visibility.Collapsed;
//wpBuyTime.Visibility = Visibility.Collapsed;
//wpTransitWaybillStatus.Visibility = Visibility.Collapsed;
//wpTransitBuyerRefundStatus.Visibility = Visibility.Collapsed;
wpBuyAccount.Opacity = 0.5;
wpBuyOrderId.Opacity = 0.5;
wpBuyTime.Opacity = 0.5;
wpTransitWaybillStatus.Opacity = 0.5;
wpTransitBuyerRefundStatus.Opacity = 0.5;
}
}
}
@@ -666,7 +680,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
static bool GetIsAbnormalOrderRebuy(oms_wei_order_item_info order_item)
{
// 不是异常单的不可异常重拍
if (order_item?.ItemOrder?.isAbnormal != true)
if (order_item?.ItemOrder?.IsAbnormal != true)
return false;
// 买手未退款的,中转正式取号以后的,不可异常重拍
if (order_item.ItemTransitOrder?.refund_status != "买手退款成功" ||
@@ -1561,7 +1575,56 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
}
}
private void btnChangeWaybill_Click(object sender, RoutedEventArgs e)
{
if (DataContext is oms_wei_order_item_info orderItem && orderItem.ItemOrder != null)
{
ChangeWaybillView changeWaybillView = new ChangeWaybillView(orderItem.ItemOrder);
new DialogWindow()
{
Title = "修改订单物流",
Content = changeWaybillView,
}.ShowDialog();
}
}
private async void btnGetTransitWaybillDetail_Click(object sender, RoutedEventArgs e)
{
if (this.DataContext is oms_wei_order_item_info orderItem && GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == orderItem.shop_id.ParseToString()) is ShopLoginInfo shop)
{
//var url = BaseClass.Build29WxObjString("order/wx_get_erp_ewaybill_path_list");
////var url = BaseClass.Build29WxObjString("order/wx_get_erp_ewaybill_path_latest_list");
//var data = UserLogin.GetSignaturex();
////data += "&erp_order_id_in=" + orderItem.order_id;
//data += "&waybill_id_in=" + orderItem.ItemTransitOrderWithVoid.express_2_waybill;
//var html = GetHtml.PostUtf8(url, data);
//if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
// html = GetHtml.PostUtf8(url, data);
//if (!html.Contains("\"code\":200"))
//{
// BaseMsgForm.ShowError("查询失败请重试");
// return;
//}
var order = orderItem.ItemOrder;
var waybillId = orderItem.ItemTransitOrderWithVoid.express_2_waybill;
var expressName = orderItem.ItemTransitOrderWithVoid.express_2_company;
EWaybillPathView WaybillPathView = new EWaybillPathView(order, waybillId, expressName);
new DialogWindow()
{
Title = "订单 " + orderItem.order_id + " 物流明细",
Content = WaybillPathView,
}.ShowDialog();
}
}
private void btnGetDirectWaybillDetail_Click(object sender, RoutedEventArgs e)
{
}
}
}
+4 -1
View File
@@ -5,6 +5,7 @@ using AllBase.Model.Config;
using AllBase.Model.DBModel;
using NaiBa.Util;
using NaiBa.Util.Helper;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -27,7 +28,9 @@ namespace _29WxOrderWpf
GlobalConfig.lstWXShopTokenInfo = new ConcurrentList<WXShopTokenInfo>();
// 自动拍单支付宝密码
GlobalConfig.AlipayPassword = ConfigHelper.LoadConfig<string>("ali_pay_password");
GlobalConfig.AlipayPassword = ConfigHelper.LoadConfig<List<string>>("ali_pay_password")?.FirstOrDefault();
if (GlobalConfig.AlipayPassword == null)
GlobalConfig.AlipayPassword = "";
new WxOrder.Framework.Startup();
}
@@ -0,0 +1,218 @@
using _29WxOrderWpf.BaseWindows;
using _29WxOrderWpf.Commands;
using AllBase;
using AllBase.Model.DBModel;
using AllBase.Model.MvvmBaseClasses;
using AllBase.Model.Result;
using NaiBa.Util.Extension;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
using System.Windows.Threading;
using Work;
using Work._29Tools.BLL;
using Work._29Tools.Forms.ShopForms;
namespace _29WxOrderWpf.ViewModels
{
/// <summary>
/// 更改运单号ViewModel
/// </summary>
public class ChangeWaybillViewModel : PropertyNotifyObject
{
public oms_wei_order_info Order
{
get { return this.GetValue(x => x.Order); }
set { this.SetValue(x => x.Order, value); }
}
public string WaybillId
{
get { return this.GetValue(x => x.WaybillId); }
set { this.SetValue(x => x.WaybillId, value); }
}
public bool IsChangeingWaybill
{
get { return this.GetValue(x => x.IsChangeingWaybill); }
set { this.SetValue(x => x.IsChangeingWaybill, value); }
}
public bool ChangeWaybillSuccess
{
get { return this.GetValue(x => x.ChangeWaybillSuccess); }
set { this.SetValue(x => x.ChangeWaybillSuccess, value); }
}
/// <summary>
/// 请求关闭窗口
/// </summary>
public event Action RequestClose;
#region 命令
public ICommand ChangeWaybillCommand { get; }
#endregion
private volatile bool _isWindowLoaded = false;
public ChangeWaybillViewModel(oms_wei_order_info _order)
{
Order = _order;
//IsChangeingWaybill = true;
ChangeWaybillCommand = new DelegateCommand(ChangeWaybill);
}
/// <summary>
/// 窗口加载完成时调用
/// </summary>
public void Start()
{
_isWindowLoaded = true;
}
/// <summary>
/// 窗口关闭时调用,停止后台任务
/// </summary>
public void Stop()
{
_isWindowLoaded = false;
}
public void ChangeWaybill()
{
ChangeWaybillSuccess = false;
string orderId = Order.order_id;
ShopLoginInfo shop = Order.Shop;
Task.Run(async () =>
{
// 查询订单是否在代发货中,如果代发需要取消代发
var apiSearchDropship = new WxApiBLL().WxApiDropshipSearch(shop, orderId, 100);
if (!apiSearchDropship.Contains("\"errcode\":0"))
{
BaseMsgWindow.ShowError("代发查询失败," + BaseRegex.GetStringJsonByRegs(ref apiSearchDropship, apiSearchDropship, "errmsg"));
return;
}
if (apiSearchDropship.Contains("ds_order_id_list") && !apiSearchDropship.Contains("\"ds_order_id_list\":[]"))
{
var dsOrderId = JsonHelper.JObjectParse(apiSearchDropship)["ds_order_id_list"].FirstOrDefault().ParseToString();
var apiCancelDropship = await new WxApiBLL().WxApiDropshipCancel(shop, Order, dsOrderId);
if (!apiCancelDropship.Contains("\"errcode\":0"))
{
IsChangeingWaybill = false;
BaseMsgWindow.ShowError("取消代发失败!请确商品未加入代发!" + BaseRegex.GetStringJsonByRegs(ref apiSearchDropship, apiSearchDropship, "errmsg"));
return;
}
}
IsChangeingWaybill = true;
var rst = WxSimOrderSendBLL.initDeliveryInfo(shop, orderId);
// {"code":0,"orderDetail":{"commonInfo":{"orderId":"3736582386601580032","orderType":0,"statusStr":"待发货","status":20,"originalStatus":11,"openid":"ow5ty7Kyik_dSqtrivr5hY2t4cwY","createTime":1779540820,"createTimeStr":"2026-05-23 20:53","isPayScoreOrder":false,"isPayDone":true,"isVirtualOrder":false,"isAuthorizedAccount":false,"giftOrderType":"","isInspectOrder":false,"isCommissionOrderDone":false,"isRechargeOrder":false,"isExpediteOrder":false,"isOverTimeOrder":2,"isMultiPackage":false,"inspectType":0,"isGiftOrder":false,"isBuyTogetherOrder":false,"isLotteryOrder":false,"isEducationOrder":false,"hideGiftOrderAddressInfo":false,"cosignmentFlag":1,"isNationalSubsidy":0,"isSameCityOrder":false,"isNationalSubsidyMerchant":false,"isSupplyOrder":false},"orderProducts":{"orderProductInfo":[{"productId":"10000863142394","thumbImg":"https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/6a092e3a000107862152a36aa881bc1e000000a100004f50","title":"脂砚斋评石头记(全三册) 烫金珍藏版 彩绘绣像 双色印刷","skuId":"15274875174","saleParam":["默认"],"productType":1,"productCnt":1,"salePrice":"3400","spuCode":"9787555418979","skuCode":"BSEC12302592708637555055A","isPreSale":false,"isIflashbuy":false,"isFreeGift":false,"canAfterSale":true,"realPrice":3350,"perRealPrice":3350,"tags":[{"class":"black","desc":"7天无理由","iconUrl":"","mainUrl":"","tagType":4},{"class":"black","desc":"运费险","iconUrl":"","mainUrl":"","tagType":5}],"icons":[],"perExchangeScore":"","productSource":{"show":false},"afterSaleInfo":{"afterId":"","canAfterSale":true,"canNotAfterSaleReason":"","jumpUrl":"","title":"","content":"","afterSaleDoneStr":"","afterSaleDoneAmountStr":"","afterSaleDoneAmount":0,"afterSaleDoneProductCnt":0,"afterSaleIngProductCnt":0,"isGuaranteeIng":false,"hasFakeOnePayFourDoneGuarantee":false},"changeProduct":0,"afterSaleDoneProductCnt":0,"afterSaleIngProductCnt":0,"supplyProductId":"","supplyNickName":"","supplyOrderId":"","supplyAppid":""}],"priceInfo":{"productPrice":"3400","orderPrice":"3350","freight":0,"originalOrderPrice":"3400","estimateProductPrice":"3350","handingFee":"0","maxUnsplitAmount":"3350","totalDiscountedPrice":"50","merchantReceievePrice":"3350","platformActivityMerchantDiscountedPrice":"50"},"activityInfo":{},"presentFee":{}},"acceptInfo":{"decodeSensitiveTime":0,"editAddrInfo":{"applyEditAddrStatus":0,"applyEditAddrAuditStaff":"","applyEditAddrAuditTimeText":"","negotiationEditTextForB":"","negotiationEditTextForA":"","negotiationEditStatus":0,"negotiationEditHistory":[],"canNegotiation":true,"hasUnResolvedRequest":0,"hasHistoryMerchantEditAddr":0,"editHistory":[]},"customerNotes":"","merchantNotes":"","presentNotes":"","addressInfo":{"cityName":"宝鸡市","countyName":"眉县","provinceName":"陕西省","userName":"刘**","telNumber":"187****9569","detailInfo":"****","virtualOrderTelNumber":""},"virtualNumberInfo":{},"quota":{"code":0,"limit":10,"used":10,"hideSensitiveInfo":true},"rechargeData":{"label":"","content":"","deliverMethod":0},"addressErrType":0},"expressInfo":{"phone":"9569","deliveryProductInfo":[],"orderProductCnt":1,"deliveryCnt":0,"isIntracityOrder":false,"intracityTracking":null,"formatUnshippedProductList":[{"productId":"10000863142394","thumbImg":"https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/6a092e3a000107862152a36aa881bc1e000000a100004f50","title":"脂砚斋评石头记(全三册) 烫金珍藏版 彩绘绣像 双色印刷","skuId":"15274875174","saleParam":["默认"],"productType":1,"productCnt":1,"salePrice":"3400","spuCode":"9787555418979","skuCode":"BSEC12302592708637555055A","isPreSale":false,"isIflashbuy":false,"isFreeGift":false,"canAfterSale":true,"realPrice":3350,"perRealPrice":3350,"tags":[{"class":"black","desc":"7天无理由","iconUrl":"","mainUrl":"","tagType":4},{"class":"black","desc":"运费险","iconUrl":"","mainUrl":"","tagType":5}],"icons":[],"perExchangeScore":"","productSource":1,"afterSaleInfo":{"afterId":"","canAfterSale":true,"canNotAfterSaleReason":"","jumpUrl":"","title":"","content":"","afterSaleDoneStr":"","afterSaleDoneAmountStr":"","afterSaleDoneAmount":0,"afterSaleDoneProductCnt":0,"afterSaleIngProductCnt":0,"isGuaranteeIng":false,"hasFakeOnePayFourDoneGuarantee":false},"changeProduct":0,"afterSaleDoneProductCnt":0,"afterSaleIngProductCnt":0,"supplyProductId":"","supplyNickName":"","supplyOrderId":"","supplyAppid":""}],"product2Img":{"15274875174":"https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/6a092e3a000107862152a36aa881bc1e000000a100004f50"}},"ewaybillInfo":{"isAllPrintOne":false,"isOpen":false,"deliveryId":"","deliveryName":"","waybillId":""}},"sendAddressInfo":{"userName":"陈图书","postalCode":"","provinceName":"安徽省","cityName":"合肥市","countyName":"肥西县","detailInfo":"上派镇中盟电子产业园8栋一单元(东电梯3楼快递指定存放点)","telNumber":"13023098035","lat":0,"lng":0},"deliveryCompanyOptions":[{"label":"极兔Line truncated
if (!rst.Contains("\"code\":0"))
{
var error = BaseRegex.GetStringJsonByRegs(ref rst, rst, "err_msg", "error_msg", "errMsg", "errorMsg", "msg");
IsChangeingWaybill = false;
BaseMsgWindow.ShowInfo("修改订单物流失败 " + error);
return;
}
var statusStr = BaseRegex.GetStringJson(ref rst, "statusStr");
if (statusStr == "待发货")
{
// 待发货暂不处理
//{"orderId":"3736580679658008320","deliveryProduct":{"deliveryId":"YUNDA","waybillId":"313023381086999","isAllProduct":true,"deliverType":1}}
//{"code":0,"errcode":0,"errmsg":"ok"}
rst = WxSimOrderSendBLL.orderSendOut(shop, orderId, WaybillId);
if (!rst.Contains("\"code\":0"))
{
var error = BaseRegex.GetStringJsonByRegs(ref rst, rst, "err_msg", "error_msg", "errMsg", "errorMsg", "msg");
IsChangeingWaybill = false;
BaseMsgWindow.ShowInfo("修改订单物流失败 " + error);
return;
}
var url = BaseClass.Build29WxObjString("order/wx_update_erp_soft_remark");
var data = UserLogin.GetSignaturex();
if (!Order.soft_remark.ParseToString().Contains("已修改物流"))
Order.soft_remark = ("已修改物流 " + Order.soft_remark).Trim();
data += "&order_id=" + Order.order_id;
data += "&soft_remark=" + Order.soft_remark;
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
Application.Current?.Dispatcher.Invoke(new Action(() =>
{
ChangeWaybillSuccess = true;
IsChangeingWaybill = false;
BaseMsgWindow.ShowInfo("修改订单物流成功");
RequestClose?.Invoke();
}));
}
else
{
//{"orderId":"3736580679658008320","changeInfo":[{"old":{"deliveryId":"YUNDA","waybillId":"313023381086999","productInfos":[{"productId":"10000875072190","skuId":"15516018429","productCnt":1}]},"new":{"deliveryId":"OTHER","waybillId":"772064082455686","productInfos":[{"productId":"10000875072190","skuId":"15516018429","productCnt":1}]}}]}
//{"code":0,"errcode":0,"errmsg":""}
var orderExpressInfoObj = JsonHelper.JObjectParse(rst)["orderDetail"]["expressInfo"];
var orderExpressInfo = JsonHelper.DeserializeJsonToObject<WxOrderExpressInfo>(JsonHelper.SerializeObject(orderExpressInfoObj));
UpdateDeliverInfoParam param = new UpdateDeliverInfoParam();
param.orderId = orderId;
param.changeInfo = new List<Dictionary<string, UpdateDeliverChangeInfo>>();
foreach (var deliveryProductInfo in orderExpressInfo.deliveryProductInfo)
{
Dictionary<string, UpdateDeliverChangeInfo> dicChange = new Dictionary<string, UpdateDeliverChangeInfo>();
dicChange["old"] = new UpdateDeliverChangeInfo
{
deliveryId = deliveryProductInfo.deliveryId,
waybillId = deliveryProductInfo.waybillId,
productInfos = new List<UpdateDeliverProductInfo>()
};
dicChange["new"] = new UpdateDeliverChangeInfo
{
deliveryId = "OTHER",
waybillId = WaybillId,
productInfos = new List<UpdateDeliverProductInfo>()
};
foreach (var prod in deliveryProductInfo.productInfos)
{
dicChange["old"].productInfos.Add(new UpdateDeliverProductInfo() { productCnt = prod.productCnt, productId = prod.productId, skuId = prod.skuId });
dicChange["new"].productInfos.Add(new UpdateDeliverProductInfo() { productCnt = prod.productCnt, productId = prod.productId, skuId = prod.skuId });
}
param.changeInfo.Add(dicChange);
}
rst = WxSimOrderSendBLL.updateDeliveryInfo(shop, param);
var str = JsonHelper.SerializeObject(param);
if (!rst.Contains("\"code\":0"))
{
var error = BaseRegex.GetStringJsonByRegs(ref rst, rst, "err_msg", "error_msg", "errMsg", "errorMsg", "msg");
IsChangeingWaybill = false;
BaseMsgWindow.ShowInfo("修改订单物流失败 " + error);
return;
}
var url = BaseClass.Build29WxObjString("order/wx_update_erp_soft_remark");
var data = UserLogin.GetSignaturex();
if (!Order.soft_remark.ParseToString().Contains("已修改物流"))
Order.soft_remark = ("已修改物流 " + Order.soft_remark).Trim();
data += "&order_id=" + Order.order_id;
data += "&soft_remark=" + Order.soft_remark;
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
Application.Current?.Dispatcher.Invoke(new Action(() =>
{
ChangeWaybillSuccess = true;
IsChangeingWaybill = false;
BaseMsgWindow.ShowInfo("修改订单物流成功");
RequestClose?.Invoke();
}));
}
});
}
}
}
@@ -0,0 +1,134 @@
using _29WxOrderWpf.BaseWindows;
using _29WxOrderWpf.Commands;
using AllBase;
using AllBase.Model.DBModel;
using AllBase.Model.MvvmBaseClasses;
using AllBase.Model.Result;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
using System.Windows.Threading;
using Work;
using Work._29Tools.BLL;
using Work._29Tools.Forms.ShopForms;
using Work.BaseForms;
namespace _29WxOrderWpf.ViewModels
{
/// <summary>
/// 更改运单号ViewModel
/// </summary>
public class EWaybillPathViewModel : PropertyNotifyObject
{
public oms_wei_order_info Order
{
get { return this.GetValue(x => x.Order); }
set { this.SetValue(x => x.Order, value); }
}
public string OrderId
{
get { return this.GetValue(x => x.OrderId); }
set { this.SetValue(x => x.OrderId, value); }
}
public string ExpressName
{
get { return this.GetValue(x => x.ExpressName); }
set { this.SetValue(x => x.ExpressName, value); }
}
public string WaybillId
{
get { return this.GetValue(x => x.WaybillId); }
set { this.SetValue(x => x.WaybillId, value); }
}
public bool IsGetWaybillPath
{
get { return this.GetValue(x => x.IsGetWaybillPath); }
set { this.SetValue(x => x.IsGetWaybillPath, value); }
}
public ObservableCollection<oms_wei_ewaybill_path> WaybillPathInfos
{
get { return this.GetValue(x => x.WaybillPathInfos); }
set { this.SetValue(x => x.WaybillPathInfos, value); }
}
/// <summary>
/// 请求关闭窗口
/// </summary>
public event Action RequestClose;
#region 命令
public ICommand GetEWaybillPathCommand { get; }
#endregion
private volatile bool _isWindowLoaded = false;
public EWaybillPathViewModel(oms_wei_order_info _order, string _waybillId, string _expressName)
{
Order = _order;
OrderId = Order?.order_id;
ExpressName = _expressName;
WaybillId = _waybillId;
IsGetWaybillPath = false;
GetEWaybillPathCommand = new DelegateCommand(GetEWaybillPath);
}
/// <summary>
/// 窗口加载完成时调用
/// </summary>
public void Start()
{
_isWindowLoaded = true;
GetEWaybillPath();
}
/// <summary>
/// 窗口关闭时调用,停止后台任务
/// </summary>
public void Stop()
{
_isWindowLoaded = false;
}
public void GetEWaybillPath()
{
string orderId = Order.order_id;
ShopLoginInfo shop = Order.Shop;
Task.Run(async () =>
{
IsGetWaybillPath = true;
var url = BaseClass.Build29WxObjString("order/wx_get_erp_ewaybill_path_list");
//var url = BaseClass.Build29WxObjString("order/wx_get_erp_ewaybill_path_latest_list");
var data = UserLogin.GetSignaturex();
//data += "&erp_order_id_in=" + order_id;
data += "&waybill_id_in=" + WaybillId;
var html = GetHtml.PostUtf8(url, data);
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
html = GetHtml.PostUtf8(url, data);
if (!html.Contains("\"code\":200"))
{
BaseMsgWindow.ShowError("查询失败请重试");
return;
}
this.WaybillPathInfos = new ObservableCollection<oms_wei_ewaybill_path>(
JsonHelper.DeserializeJsonToList<oms_wei_ewaybill_path>(JObject.Parse(html)["data"].ParseToString()).OrderByDescending(p => p.update_time).ToList());
IsGetWaybillPath = false;
});
}
}
}
@@ -2,6 +2,7 @@
x:Class="_29WxOrderWpf.Views.AutoBuyIntroductionView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:UserControls="clr-namespace:_29WxOrderWpf.UserControls"
xmlns:comn="clr-namespace:_29WxOrderWpf.Common"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:_29WxOrderWpf.Views"
@@ -16,47 +17,85 @@
Loaded="AutoBuyInstructionView_Loaded"
mc:Ignorable="d">
<Grid Background="White">
<PasswordBox
Width="120"
Height="24"
Margin="198,79,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top" />
<TextBlock
Margin="70,83,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Text="请输入支付宝支付密码:"
TextWrapping="Wrap" />
<PasswordBox
x:Name="pbxPassWord"
Width="169"
Height="24"
Margin="198,79,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
PasswordChanged="pbxPassWord_PasswordChanged" />
<TextBox
x:Name="txtPassWord"
Width="149"
Height="24"
Margin="198,79,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
d:IsHitTestVisible="True"
d:Opacity="0.3"
d:Text="明文密码"
d:Visibility="Visible"
BorderBrush="Transparent"
IsHitTestVisible="True"
TextChanged="txtPassWord_TextChanged"
Visibility="Collapsed" />
<Button
x:Name="btnSee"
Width="18"
Height="18"
Margin="347,82,0,0"
Padding="0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Background="Transparent"
BorderBrush="Transparent"
Click="btnSee_Click"
Content="👁"
Cursor="Hand"
Foreground="{StaticResource PageLinkBrush}" />
<Button
x:Name="btnSaveAliPass"
Width="Auto"
Height="22"
MinWidth="48"
Margin="323,80,0,348"
Margin="372,80,0,0"
Padding="4,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Click="btnSaveAliPass_Click"
Content="保存密码"
FontSize="12"
Style="{StaticResource BasePageButtonStyle}" />
Style="{StaticResource BasePageButtonStyle}"
Visibility="Visible" />
<Button
x:Name="btnClear"
Width="Auto"
Height="22"
MinWidth="48"
Margin="384,80,0,348"
Margin="433,80,0,0"
Padding="4,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Click="btnClear_Click"
Content="清空密码"
FontSize="12"
Style="{StaticResource BasePageButtonLightStyle}" />
Style="{StaticResource BasePageButtonLightStyle}"
Visibility="Visible" />
<TextBlock
Margin="70,128,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Text="说明:请输入并保存支付宝支付密码(仅记录在本地),首次自动拍单前请手动拍单一次以缓存支付保Cookie"
TextWrapping="Wrap" />
Margin="70,128,70,128"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
TextWrapping="Wrap"><Run Text="说明:"/><Run Text="自动拍单支持已创建sku关联的商品"/><Run Language="zh-cn" Text="。"/><LineBreak/><Run Text=" "/><Run Text="请保存支付宝支付密码(仅记录在本地)供自动拍单支付,首次自动拍单前请手动拍单一次以缓存支付宝Cookie。"/></TextBlock>
</Grid>
</UserControl>
@@ -1,4 +1,9 @@
using System;
using _29WxOrderWpf.BaseWindows;
using AllBase.Helper;
using AllBase.Model.DBModel;
using NaiBa.Util;
using NaiBa.Util.Helper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -12,6 +17,7 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Work.Pinduoduo;
namespace _29WxOrderWpf.Views
{
@@ -27,17 +33,42 @@ namespace _29WxOrderWpf.Views
private void AutoBuyInstructionView_Loaded(object sender, RoutedEventArgs e)
{
this.pbxPassWord.Password = DataOpenSSL.DecryptString(GlobalConfig.AlipayPassword);
}
private void btnSaveAliPass_Click(object sender, RoutedEventArgs e)
{
GlobalConfig.AlipayPassword = DataOpenSSL.EncryptString(this.pbxPassWord.Password);
ConfigHelper.SaveConfig("ali_pay_password", new List<string>() { GlobalConfig.AlipayPassword });
BaseMsgWindow.ShowInfo("密码保存成功!");
}
private void btnClear_Click(object sender, RoutedEventArgs e)
{
this.pbxPassWord.Password = "";
GlobalConfig.AlipayPassword = "";
ConfigHelper.SaveConfig("ali_pay_password", new List<string>() { GlobalConfig.AlipayPassword });
BaseMsgWindow.ShowInfo("密码已清除!");
}
private void btnSee_Click(object sender, RoutedEventArgs e)
{
if (txtPassWord.Visibility == Visibility.Visible)
txtPassWord.Visibility = Visibility.Collapsed;
else
txtPassWord.Visibility = Visibility.Visible;
}
private void pbxPassWord_PasswordChanged(object sender, RoutedEventArgs e)
{
if (txtPassWord.Text != pbxPassWord.Password)
txtPassWord.Text = pbxPassWord.Password;
}
private void txtPassWord_TextChanged(object sender, TextChangedEventArgs e)
{
if (txtPassWord.Text != pbxPassWord.Password)
pbxPassWord.Password = txtPassWord.Text;
}
}
}
+83
View File
@@ -0,0 +1,83 @@
<UserControl
x:Class="_29WxOrderWpf.Views.ChangeWaybillView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:_29WxOrderWpf.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
x:Name="ChangeWaybillCtrl"
Width="450"
Height="300"
d:DesignHeight="300"
d:DesignWidth="450"
Loaded="ChangeWaybillView_Loaded"
mc:Ignorable="d">
<Grid Background="White">
<StackPanel Margin="24,24,24,0">
<TextBlock
Margin="0,0,0,20"
HorizontalAlignment="Center"
FontSize="15"
Foreground="#333333"
Text="更改订单运单号" />
<StackPanel>
<TextBlock
Margin="0,0,0,8"
Foreground="#555555"
Text="填写运单号:" />
<TextBox
x:Name="txtWaybillId"
Height="38"
VerticalContentAlignment="Center"
d:Text="1111"
BorderBrush="#D0D0D0"
BorderThickness="1"
FontSize="18"
Text="{Binding WaybillId, UpdateSourceTrigger=PropertyChanged}"
VerticalScrollBarVisibility="Auto" />
<WrapPanel Margin="0,10,0,0" FlowDirection="RightToLeft">
<Button
Width="64"
Height="26"
Margin="0,0,10,0"
HorizontalAlignment="Right"
Command="{Binding ChangeWaybillCommand}"
Content="确定更改"
Style="{StaticResource BasePageButtonStyle}" />
<Image
x:Name="imgLoading"
Width="20"
Height="20"
IsEnabled="False"
Source="{StaticResource imgLoadingPic}"
Visibility="{Binding IsChangeingWaybill, Converter={StaticResource visibleToVisibilityConverter}}">
<Image.RenderTransform>
<RotateTransform Angle="45" CenterX="10" CenterY="10" />
</Image.RenderTransform>
<Image.Triggers>
<EventTrigger RoutedEvent="Image.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
RepeatBehavior="Forever"
Storyboard.TargetName="imgLoading"
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
From="360"
To="0"
Duration="0:0:3" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Image.Triggers>
</Image>
</WrapPanel>
<TextBlock
d:Text="textBlock"
Text=""
TextWrapping="Wrap" />
</StackPanel>
</StackPanel>
</Grid>
</UserControl>
@@ -0,0 +1,63 @@
using _29WxOrderWpf.ViewModels;
using AllBase.Helper;
using AllBase.Model.DBModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace _29WxOrderWpf.Views;
/// <summary>
/// ChangeWaybillView.xaml 的交互逻辑
/// </summary>
public partial class ChangeWaybillView : UserControl
{
/// <summary>
/// 视图模型
/// </summary>
public ChangeWaybillViewModel ViewModel { get; }
public ChangeWaybillView(oms_wei_order_info _order)
{
InitializeComponent();
ViewModel = new ChangeWaybillViewModel(_order);
ViewModel.RequestClose += ViewModel_RequestClose;
DataContext = ViewModel;
}
private void ChangeWaybillView_Loaded(object sender, RoutedEventArgs e)
{
ViewModel.Start();
}
private void ChangeWaybillView_Closed(object sender, RoutedEventArgs e)
{
ViewModel.Stop();
}
private void ViewModel_RequestClose()
{
Window parentWindow = Window.GetWindow(this);
if (this.IsLoaded && parentWindow != null)
parentWindow.Close();
MainWindow.Instance.orderListCtrl.FilterOneOrder(ViewModel.Order);
}
private void Button_Click(object sender, RoutedEventArgs e)
{
}
}
@@ -0,0 +1,115 @@
<UserControl
x:Class="_29WxOrderWpf.Views.EWaybillPathListView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:_29WxOrderWpf.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Height="auto"
d:DesignHeight="80"
d:DesignWidth="600"
mc:Ignorable="d">
<Grid>
<Border
Margin="4"
BorderBrush="LightGray"
BorderThickness="0,0,0,1"
CornerRadius="0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<Image
x:Name="imgSku"
Grid.Row="0"
Grid.Column="0"
Width="20"
Height="20"
Margin="8"
Cursor="Hand"
MouseDown="imgSku_MouseDown"
MouseEnter="imgSku_MouseEnter"
MouseLeave="imgSku_MouseLeave" />
<Grid
Grid.Column="1"
Margin="0,8"
VerticalAlignment="Center">
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<WrapPanel Grid.Row="0" Visibility="{Binding node_desc, Converter={StaticResource HasTextVisibility}}">
<TextBox
VerticalAlignment="Top"
d:Opacity="0.5"
d:Visibility="Visible"
Background="Transparent"
BorderThickness="0"
FontWeight="Bold"
IsReadOnly="True"
Text="物流信息:"
TextWrapping="Wrap"
Visibility="Collapsed" />
<TextBox
Grid.Row="0"
VerticalAlignment="Top"
d:Opacity="0.5"
d:Text="已送达"
Background="Transparent"
BorderThickness="0"
FontWeight="Bold"
IsReadOnly="True"
Text="{Binding node_desc}"
TextWrapping="Wrap" />
</WrapPanel>
<WrapPanel Grid.Row="1" Visibility="{Binding UpdateTimeStr, Converter={StaticResource HasTextVisibility}}" Margin="4">
<TextBox
VerticalAlignment="Top"
d:Opacity="0.5"
d:Visibility="Visible"
Background="Transparent"
BorderThickness="0"
IsReadOnly="True"
Text="更新时间:"
TextWrapping="Wrap"
Visibility="Collapsed" />
<TextBox
Grid.Row="0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
d:Opacity="0.5"
d:Text="2000/1/1 0:0:0"
Background="Transparent"
BorderThickness="0"
IsReadOnly="True"
Text="{Binding UpdateTimeStr}"
TextWrapping="Wrap" />
</WrapPanel>
</Grid>
<Button
x:Name="btnAdd"
Grid.Column="100"
MinWidth="18"
MinHeight="28"
Margin="8"
Padding="4"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Content=""
Style="{StaticResource BasePageButtonStyle}"
Visibility="Hidden" />
</Grid>
</Border>
</Grid>
</UserControl>
@@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace _29WxOrderWpf.Views;
/// <summary>
/// EWaybillPathListView.xaml 的交互逻辑
/// </summary>
public partial class EWaybillPathListView : UserControl
{
public EWaybillPathListView()
{
InitializeComponent();
}
private void imgSku_MouseDown(object sender, MouseButtonEventArgs e)
{
}
private void imgSku_MouseEnter(object sender, MouseEventArgs e)
{
}
private void imgSku_MouseLeave(object sender, MouseEventArgs e)
{
}
}
+138
View File
@@ -0,0 +1,138 @@
<UserControl
x:Class="_29WxOrderWpf.Views.EWaybillPathView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:_29WxOrderWpf.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
x:Name="EWaybillPathCtrl"
d:DesignHeight="450"
d:DesignWidth="800" Loaded="EWaybillPathCtrl_Loaded"
Background="White"
mc:Ignorable="d">
<Grid Margin="24,24,24,24">
<WrapPanel
Margin="0,0,0,20"
HorizontalAlignment="Center"
VerticalAlignment="top">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Top"
FontSize="15"
Foreground="#333333"
Text="订单 " />
<TextBox
x:Name="txtOrderId"
VerticalContentAlignment="Center"
d:Text="1111111"
BorderBrush="#D0D0D0"
BorderThickness="0"
FontSize="14"
Text="{Binding OrderId, UpdateSourceTrigger=PropertyChanged}"
VerticalScrollBarVisibility="Auto" />
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Top"
FontSize="15"
Foreground="#333333"
Text=" 物流明细" />
</WrapPanel>
<Grid Margin="24,24,24,24">
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition />
</Grid.RowDefinitions>
<StackPanel Margin="24,24,24,24">
<Grid>
<WrapPanel>
<TextBlock FontSize="14" Text="物流公司:" />
<TextBox
x:Name="txtExpressName"
VerticalContentAlignment="Center"
d:Text="物流公司:"
BorderBrush="#D0D0D0"
BorderThickness="0"
FontSize="14"
Text="{Binding ExpressName, UpdateSourceTrigger=PropertyChanged}"
VerticalScrollBarVisibility="Auto" />
</WrapPanel>
<Image
x:Name="imgLoading"
Width="20"
Height="20"
HorizontalAlignment="Right"
IsEnabled="False"
Source="{StaticResource imgLoadingPic}"
Visibility="{Binding IsGetWaybillPath, Converter={StaticResource visibleToVisibilityConverter}}">
<Image.RenderTransform>
<RotateTransform Angle="45" CenterX="10" CenterY="10" />
</Image.RenderTransform>
<Image.Triggers>
<EventTrigger RoutedEvent="Image.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
RepeatBehavior="Forever"
Storyboard.TargetName="imgLoading"
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
From="0"
To="360"
Duration="0:0:3" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Image.Triggers>
</Image>
</Grid>
<WrapPanel>
<TextBlock FontSize="14" Text="物流编码:" />
<TextBox
x:Name="txtWaybillId"
VerticalContentAlignment="Center"
d:Text="物流编码:"
BorderBrush="#D0D0D0"
BorderThickness="0"
FontSize="14"
Text="{Binding WaybillId, UpdateSourceTrigger=PropertyChanged}"
VerticalScrollBarVisibility="Auto" />
</WrapPanel>
</StackPanel>
<ListBox
x:Name="lbxSku"
Grid.Row="1"
Grid.Column="1"
Margin="7,0,7,0"
HorizontalContentAlignment="Stretch"
BorderThickness="0"
ItemsSource="{Binding WaybillPathInfos}"
ScrollViewer.CanContentScroll="True"
VirtualizingPanel.ScrollUnit="Pixel">
<!-- 使用自定义属性模板去除ListBox高亮显示框 -->
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<ContentPresenter
Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentTemplate}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate>
<!-- 此处绑定将数据源传递给子自定义控件OrderListRowCtrl -->
<local:EWaybillPathListView
VerticalAlignment="Center"
VerticalContentAlignment="Center"
DataContext="{Binding}" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</Grid>
</UserControl>
@@ -0,0 +1,42 @@
using _29WxOrderWpf.ViewModels;
using AllBase.Model.DBModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace _29WxOrderWpf.Views;
/// <summary>
/// EWaybillPathView.xaml 的交互逻辑
/// </summary>
public partial class EWaybillPathView : UserControl
{
/// <summary>
/// 视图模型
/// </summary>
public EWaybillPathViewModel ViewModel { get; }
public EWaybillPathView(oms_wei_order_info _order, string _waybillId, string _expressName)
{
InitializeComponent();
ViewModel = new EWaybillPathViewModel(_order, _waybillId, _expressName);
DataContext = ViewModel;
}
private void EWaybillPathCtrl_Loaded(object sender, RoutedEventArgs e)
{
ViewModel.Start();
}
}
@@ -102,16 +102,31 @@ namespace _29WxOrderWpf.Windows.OrderWindows
{
// 回填库内信息
btnAdd.Content = "创 建";
txtProvince.Text = OrderItem.DistribReturnOrderInfo.receiver_province;
txtCity.Text = OrderItem.DistribReturnOrderInfo.receiver_city;
txtCounty.Text = OrderItem.DistribReturnOrderInfo.receiver_area;
txtDetailAddress.Text = OrderItem.DistribReturnOrderInfo.receiver_address;
txtUser.Text = OrderItem.DistribReturnOrderInfo.receiver_name;
txtMobile.Text = OrderItem.DistribReturnOrderInfo.receiver_phone;
if (OrderItem.DistribReturnOrderInfo != null)
{
txtProvince.Text = OrderItem.DistribReturnOrderInfo.receiver_province;
txtCity.Text = OrderItem.DistribReturnOrderInfo.receiver_city;
txtCounty.Text = OrderItem.DistribReturnOrderInfo.receiver_area;
txtDetailAddress.Text = OrderItem.DistribReturnOrderInfo.receiver_address;
txtUser.Text = OrderItem.DistribReturnOrderInfo.receiver_name;
txtMobile.Text = OrderItem.DistribReturnOrderInfo.receiver_phone;
}
}
if (OrderItem.AddEditTransitWarehouseReturnOrderStr == "已创建" || OrderItem.AddEditTransitWarehouseReturnOrderStr == "处理中")
btnAdd.IsEnabled = false;
if (OrderItem.AddEditTransitWarehouseReturnOrderStr == "已创建未到仓" || OrderItem.AddEditTransitWarehouseReturnOrderStr == "已到仓" ||
OrderItem.AddEditTransitWarehouseReturnOrderStr == "已发回")
{
btnAdd.IsEnabled = btnAddressAnalysis.IsEnabled = false;
if (OrderItem.DistribReturnOrderInfo != null)
{
txtProvince.Text = OrderItem.DistribReturnOrderInfo.receiver_province;
txtCity.Text = OrderItem.DistribReturnOrderInfo.receiver_city;
txtCounty.Text = OrderItem.DistribReturnOrderInfo.receiver_area;
txtDetailAddress.Text = OrderItem.DistribReturnOrderInfo.receiver_address;
txtUser.Text = OrderItem.DistribReturnOrderInfo.receiver_name;
txtMobile.Text = OrderItem.DistribReturnOrderInfo.receiver_phone;
}
}
}
}
@@ -133,6 +148,11 @@ namespace _29WxOrderWpf.Windows.OrderWindows
BaseMsgWindow.ShowError("缺少收货人信息!");
return;
}
if (txtUser.Text.Trim().Length > 15)
{
BaseMsgWindow.ShowError("收货人姓名长度不能超过15!");
return;
}
JObject jObj = new JObject();
@@ -254,7 +274,7 @@ namespace _29WxOrderWpf.Windows.OrderWindows
if (wxExpressName.IsNullOrEmpty() || OrderItem.ItemRefund.return_waybill_id.IsNullOrEmpty() || receiver.receiver_name.IsNullOrEmpty() || receiver.receiver_phone.IsNullOrEmpty() ||
receiver.receiver_province.IsNullOrEmpty() || receiver.receiver_city.IsNullOrEmpty() || receiver.receiver_area.IsNullOrEmpty() || receiver.receiver_address.IsNullOrEmpty())
{
if (!string.IsNullOrWhiteSpace(aftersaleAddress))
if (!string.IsNullOrWhiteSpace(aftersaleAddress) || receiver.receiver_name?.Length > 15)
{
// todo 提示地址解析失败请手动提交
OrderItem.AddEditTransitWarehouseReturnOrderStr = "解析失败请手动添加";