优化同步单发货逻辑支持手动发货
This commit is contained in:
1 parent
064d360de7
commit
e1e118cc61
2 files changed
+728
-415
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -935,7 +935,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
if (order.order_sn == "260923-399088033421688")
|
||||
{
|
||||
}
|
||||
if (order.ShopOrderIdStr == "3739389160415730432")
|
||||
if (order.ShopOrderIdStr == "3739399763136525568")
|
||||
{
|
||||
}
|
||||
if (order.WxSendTypeStr == "直发")
|
||||
@@ -1785,7 +1785,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
if (buyerOrder.WxSendTypeStr == "直发")
|
||||
{
|
||||
if (GlobalConfig.BuyConfig.IsSyncDirectBuyOrderWaybill)
|
||||
SendAsyncWaybillOrder(buyerOrder);
|
||||
SendAsyncWaybillOrder(buyerOrder, true);
|
||||
else
|
||||
SendOrderE57(buyerOrder);
|
||||
}
|
||||
@@ -2137,12 +2137,15 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
}
|
||||
}
|
||||
|
||||
public void SendAsyncWaybillOrder(PddBuyerOrderLiteInfo order)
|
||||
public void SendAsyncWaybillOrder(PddBuyerOrderLiteInfo order, bool showErrBox = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (order.WxOrderStatus < 30 == false)
|
||||
{
|
||||
if (showErrBox) BaseMsgWindow.ShowError("订单已发货无需重复创建同步单!");
|
||||
return;
|
||||
}
|
||||
|
||||
// 取最新订单状态
|
||||
var wxOrder = GetOrderInfo(order.ShopOrderIdStr).FirstOrDefault();
|
||||
@@ -2151,8 +2154,12 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == wxOrder.shop_id.ToString());
|
||||
if (shop == null)
|
||||
throw new Exception("买手单对应店铺不存在!");
|
||||
if (wxOrder.status < 30 == false)
|
||||
|
||||
if (order.WxOrderStatus < 30 == false)
|
||||
{
|
||||
if (showErrBox) BaseMsgWindow.ShowError("订单已发货无需重复创建同步单!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (order.ShopOrderIdStr == "3739357317247975936")
|
||||
{
|
||||
@@ -2227,6 +2234,11 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
html3 = GetHtml.PostUtf8(url3, data3);
|
||||
if (string.IsNullOrEmpty(html3) || !html3.Contains("\"code\":200"))
|
||||
html3 = GetHtml.PostUtf8(url3, data3);
|
||||
|
||||
if (showErrBox)
|
||||
{
|
||||
BaseMsgWindow.ShowError("同步单创建失败:" + ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user