优化中转仓处理逻辑
This commit is contained in:
1 parent
82165f25a8
commit
15b8288a98
9 files changed
+90
-115
No files matched your search
@@ -1,6 +1,5 @@
|
||||
using _29WxOrderWpf.BaseWindows;
|
||||
using _29WxOrderWpf.CefHelper;
|
||||
using WxOrder.Framework.Commons;
|
||||
using _29WxOrderWpf.ViewModels;
|
||||
using AllBase;
|
||||
using AllBase.Helper;
|
||||
@@ -27,12 +26,14 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Interop;
|
||||
using System.Windows.Media.Imaging;
|
||||
using TemuKJD.ToolForms;
|
||||
using Work;
|
||||
using Work._29Tools.BLL;
|
||||
using Work._29Tools.CefTools;
|
||||
using Work.BaseForms;
|
||||
using WxOrder.Framework.Commons;
|
||||
using WxOrder.Framework.Helpers;
|
||||
using static AllBase.DouYinModel.Result.DouOrderListInfo;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.ListView;
|
||||
@@ -1736,7 +1737,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
/// <summary>
|
||||
/// 更新拍单成功信息
|
||||
/// </summary>
|
||||
public void ManualUpdateBuyOrder()
|
||||
public async void ManualUpdateBuyOrder()
|
||||
{
|
||||
if (BuyType == "transit" && txtSourceCodeVal.ParseToString().Trim().Length != 6)
|
||||
{
|
||||
@@ -1831,26 +1832,16 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
}
|
||||
var url = "https://po.e57.cn/prod-api/api/oms-api/externalProcurement/saveOrUpdate";
|
||||
var dataStr = JsonHelper.SerializeObject(body);
|
||||
//dataStr = "{\"orderNo\":\"3737339733954942720\",\"outOrderNo\":\"2606846854564\",\"buyerAccount\":\"测试\",\"outAmount\":\"2000\",\"purchaserNote\":\"测试\",\"express1Company\":\"\"" +
|
||||
// ",\"express1Waybill\":\"\",\"platform\":\"XDYSHC\",\"orderPlatformCode\":\"WEISHOP\"}";
|
||||
var exportRst = HttpResponseWXBLL.e57PostResponse(url, dataStr, "");
|
||||
//<AjaxResult><msg>保存成功</msg><code>200</code></AjaxResult>
|
||||
//<AjaxResult><msg>订单不存在:373733973395494272</msg><code>500</code></AjaxResult>
|
||||
if (!exportRst.ParseToString().Contains("<code>200</code>"))
|
||||
var exportRst = await HttpResponseWXBLL.e57PostResponseAsync(url, dataStr);
|
||||
if (!exportRst.ParseToString().Contains("\"code\":200"))
|
||||
{
|
||||
await Task.Delay(500);
|
||||
exportRst = await HttpResponseWXBLL.e57PostResponseAsync(url, dataStr);
|
||||
}
|
||||
if (!exportRst.ParseToString().Contains("\"code\":200"))
|
||||
{
|
||||
string msg = "";
|
||||
string code = "";
|
||||
try
|
||||
{
|
||||
System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
|
||||
xmlDoc.LoadXml(exportRst);
|
||||
code = xmlDoc["AjaxResult"]["code"].InnerText;
|
||||
msg = xmlDoc["AjaxResult"]["msg"].InnerText;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
msg = exportRst.ParseToString();
|
||||
}
|
||||
msg = BaseRegex.GetStringJsonByRegs(ref exportRst, exportRst, "msg");
|
||||
this.ErrorMsg = "拍单保存失败,服务端返回 " + msg;
|
||||
Enabled = true;
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user