取消代发后再发送礼物单
This commit is contained in:
1 parent
a7f1891dd3
commit
7ef75f8134
17 files changed
+3028
-1718
No files matched your search
@@ -137,6 +137,7 @@ namespace Work
|
||||
BaseClass.PostagePerOrder = Math.Max(2.2m, BaseRegex.GetDecimalJson(ref html, "postage_per_order"));
|
||||
BaseClass.RefundPostagePerOrder = Math.Max(2.5m, BaseRegex.GetDecimalJson(ref html, "refund_postage_per_order"));
|
||||
BaseClass.RechargeAmountTotal = BaseRegex.GetDecimalJson(ref html, "recharge_amount_total");
|
||||
BaseClass.OemGiftAmount = BaseRegex.GetDecimalJson(ref html, "gift_oem_amount_per_order");
|
||||
BaseClass.OemId = BaseRegex.GetStringJson(ref html, "oem_id");
|
||||
BaseClass.OemName = BaseRegex.GetStringJson(ref html, "oem_name");
|
||||
BaseClass.IsOemOwner = BaseRegex.GetBoolJson(ref html, "is_oem_owner");
|
||||
|
||||
@@ -661,9 +661,9 @@ namespace Work._29Tools.BLL
|
||||
|
||||
public static async Task<string> e57PostResponseAsync(string _url, string _data, string referer)
|
||||
{
|
||||
await Task.Delay(2000);
|
||||
return await Task.FromResult("<AjaxResult><msg>SUCCESS</msg><code>200</code></AjaxResult>");
|
||||
//if (string.IsNullOrEmpty(Authorization)) Authorization = "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjQ3YmRlOGNlLWY5MDUtNDIzOS05M2VjLWZiN2U3MjRmOTY0NiJ9.vwxhj3t4zTDdBQTyfVjcKr-0Oma8-VtPDzE2LVkw4A4aWftncY1ikXgEhGwoYHn9E7yOnhS_Pb7FfzgecTqqHA";
|
||||
//await Task.Delay(2000);
|
||||
//return await Task.FromResult("<AjaxResult><msg>SUCCESS</msg><code>200</code></AjaxResult>");
|
||||
////if (string.IsNullOrEmpty(Authorization)) Authorization = "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjQ3YmRlOGNlLWY5MDUtNDIzOS05M2VjLWZiN2U3MjRmOTY0NiJ9.vwxhj3t4zTDdBQTyfVjcKr-0Oma8-VtPDzE2LVkw4A4aWftncY1ikXgEhGwoYHn9E7yOnhS_Pb7FfzgecTqqHA";
|
||||
|
||||
bool isRetry = false;
|
||||
if (string.IsNullOrEmpty(sAuthorization))
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using AllBase;
|
||||
using AllBase.Helper;
|
||||
using AllBase.Model.DBModel;
|
||||
using NaiBa.Util.Extension;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -95,14 +96,20 @@ namespace Work._29Tools.BLL
|
||||
return html;
|
||||
}
|
||||
|
||||
public string WxApiDropshipCancel(ShopLoginInfo shop, string orderId, string dropShopOrderId, string spuId, string skuId, int cnt)
|
||||
public string WxApiDropshipCancel(ShopLoginInfo shop, oms_wei_order_info order, string dropShopOrderId)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append(UserLogin.GetSignaturex());
|
||||
sb.Append("&token=").Append(GetWxToken(shop).accessToken);
|
||||
sb.Append("&order_id=").Append(orderId);
|
||||
sb.Append("&order_id=").Append(order.order_id);
|
||||
sb.Append("&ds_order_id=").Append(dropShopOrderId);
|
||||
sb.Append("&dropship_product_list=").Append("[{\"spu_id\":\"").Append(spuId).Append("\",\"sku_id\":\"").Append(skuId).Append("\",\"product_cnt\":").Append(cnt).Append("}]");
|
||||
sb.Append("&dropship_product_list=").Append("[");
|
||||
foreach (var item in order.orderItems)
|
||||
{
|
||||
sb.Append("{\"spu_id\":\"").Append(item.product_id).Append("\",\"sku_id\":\"").Append(item.sku_id).Append("\",\"product_cnt\":").Append(item.sku_cnt).Append("},");
|
||||
}
|
||||
sb.Remove(sb.Length - 1, 1);
|
||||
sb.Append("]");
|
||||
|
||||
var url = BaseClass.Build29WxObjString("product/wx_api_dropship_cancel");
|
||||
var data = sb.ToString();
|
||||
@@ -111,5 +118,27 @@ namespace Work._29Tools.BLL
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
return html;
|
||||
}
|
||||
|
||||
public static async Task<string> WxSearchAndDropshipCancel(ShopLoginInfo shop, oms_wei_order_info order)
|
||||
{
|
||||
string orderId = order.order_id;
|
||||
|
||||
var apiSearchDropship = new WxApiBLL().WxApiDropshipSearch(shop, orderId, 100);
|
||||
if (!apiSearchDropship.Contains("\"errcode\":0"))
|
||||
{
|
||||
return apiSearchDropship;
|
||||
}
|
||||
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 = new WxApiBLL().WxApiDropshipCancel(shop, order, dsOrderId);
|
||||
if (!apiCancelDropship.Contains("\"errcode\":0"))
|
||||
{
|
||||
return apiCancelDropship;
|
||||
}
|
||||
}
|
||||
//apiSearchDropship = new WxApiBLL().WxApiDropshipSearch(shop, orderId, 100);
|
||||
return "success";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -849,6 +849,13 @@ namespace TemuKJD.ToolForms
|
||||
return;
|
||||
}
|
||||
|
||||
this.Enabled = false;
|
||||
if (this.cefWebBrowser.Address.StartsWith("https://mobile.yangkeduo.com/order.html?order_sn="))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
var url = BaseClass.Build29WxObjString("order/wx_add_mdy_buy_prod_map");
|
||||
var data = UserLogin.GetSignaturex()
|
||||
+ "&spu_code=" + GetHtml.UrlEncodeUtf8(txtUpSpuCode.Text.Trim())
|
||||
@@ -865,8 +872,9 @@ namespace TemuKJD.ToolForms
|
||||
result = GetHtml.PostUtf8(url, data);
|
||||
if (!result.Contains("\"code\":200"))
|
||||
{
|
||||
BaseMsgForm.ShowError("保存失败" + BaseRegex.GetStringJson(ref result, "msg"));
|
||||
}
|
||||
this.Enabled = true;
|
||||
BaseMsgForm.ShowError("保存失败" + BaseRegex.GetStringJson(ref result, "msg") + ",请稍后重试");
|
||||
}
|
||||
else
|
||||
{
|
||||
var urlMap = BaseClass.Build29WxObjString("order/wx_get_buy_prod_map");
|
||||
@@ -878,8 +886,8 @@ namespace TemuKJD.ToolForms
|
||||
if (string.IsNullOrEmpty(resultMap) || !resultMap.Contains("\"code\":200"))
|
||||
resultMap = GetHtml.PostUtf8(urlMap, dataMap);
|
||||
if (string.IsNullOrEmpty(resultMap) || !resultMap.Contains("\"code\":200"))
|
||||
{
|
||||
}
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
List<WXBuyMapInfo> buyMapList = new List<WXBuyMapInfo>();
|
||||
@@ -1371,5 +1379,5 @@ namespace TemuKJD.ToolForms
|
||||
ChangeAddress(null);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+28
-28
@@ -84,7 +84,6 @@
|
||||
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
|
||||
this.txtAddress = new System.Windows.Forms.TextBox();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.pnlMap = new System.Windows.Forms.Panel();
|
||||
this.pnlDirectAddressAnalysis = new System.Windows.Forms.Panel();
|
||||
this.btnAnalysis = new DevComponents.DotNetBar.PanelEx();
|
||||
this.label25 = new System.Windows.Forms.Label();
|
||||
@@ -103,6 +102,7 @@
|
||||
this.label29 = new System.Windows.Forms.Label();
|
||||
this.chkAutoChangeWarehouseAddress = new Work.UserComponents.UcCheckBox(this.components);
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.pnlMap = new System.Windows.Forms.Panel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbCloseBase)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
@@ -113,10 +113,10 @@
|
||||
this.splitContainer2.Panel2.SuspendLayout();
|
||||
this.splitContainer2.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.pnlMap.SuspendLayout();
|
||||
this.pnlDirectAddressAnalysis.SuspendLayout();
|
||||
this.pnlBuy.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.pnlMap.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pbCloseBase
|
||||
@@ -779,30 +779,6 @@
|
||||
this.panel1.Size = new System.Drawing.Size(487, 730);
|
||||
this.panel1.TabIndex = 0;
|
||||
//
|
||||
// pnlMap
|
||||
//
|
||||
this.pnlMap.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pnlMap.Controls.Add(this.txtSendProvince);
|
||||
this.pnlMap.Controls.Add(this.label13);
|
||||
this.pnlMap.Controls.Add(this.label20);
|
||||
this.pnlMap.Controls.Add(this.label1);
|
||||
this.pnlMap.Controls.Add(this.txtMapGoodsName);
|
||||
this.pnlMap.Controls.Add(this.btnManualUpdateSendProvince);
|
||||
this.pnlMap.Controls.Add(this.label2);
|
||||
this.pnlMap.Controls.Add(this.label3);
|
||||
this.pnlMap.Controls.Add(this.txtMapSkuId);
|
||||
this.pnlMap.Controls.Add(this.label4);
|
||||
this.pnlMap.Controls.Add(this.label5);
|
||||
this.pnlMap.Controls.Add(this.btnManualUpdateTransitWarehouse);
|
||||
this.pnlMap.Controls.Add(this.cmbTransitWarehouse);
|
||||
this.pnlMap.Controls.Add(this.txtMapGoodsId);
|
||||
this.pnlMap.Controls.Add(this.txtMapSkuName);
|
||||
this.pnlMap.Location = new System.Drawing.Point(12, 525);
|
||||
this.pnlMap.Name = "pnlMap";
|
||||
this.pnlMap.Size = new System.Drawing.Size(468, 203);
|
||||
this.pnlMap.TabIndex = 871;
|
||||
//
|
||||
// pnlDirectAddressAnalysis
|
||||
//
|
||||
this.pnlDirectAddressAnalysis.Controls.Add(this.btnAnalysis);
|
||||
@@ -1041,6 +1017,30 @@
|
||||
this.pictureBox1.TabStop = false;
|
||||
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
|
||||
//
|
||||
// pnlMap
|
||||
//
|
||||
this.pnlMap.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pnlMap.Controls.Add(this.txtSendProvince);
|
||||
this.pnlMap.Controls.Add(this.label13);
|
||||
this.pnlMap.Controls.Add(this.label20);
|
||||
this.pnlMap.Controls.Add(this.label1);
|
||||
this.pnlMap.Controls.Add(this.txtMapGoodsName);
|
||||
this.pnlMap.Controls.Add(this.btnManualUpdateSendProvince);
|
||||
this.pnlMap.Controls.Add(this.label2);
|
||||
this.pnlMap.Controls.Add(this.label3);
|
||||
this.pnlMap.Controls.Add(this.txtMapSkuId);
|
||||
this.pnlMap.Controls.Add(this.label4);
|
||||
this.pnlMap.Controls.Add(this.label5);
|
||||
this.pnlMap.Controls.Add(this.btnManualUpdateTransitWarehouse);
|
||||
this.pnlMap.Controls.Add(this.cmbTransitWarehouse);
|
||||
this.pnlMap.Controls.Add(this.txtMapGoodsId);
|
||||
this.pnlMap.Controls.Add(this.txtMapSkuName);
|
||||
this.pnlMap.Location = new System.Drawing.Point(12, 525);
|
||||
this.pnlMap.Name = "pnlMap";
|
||||
this.pnlMap.Size = new System.Drawing.Size(468, 203);
|
||||
this.pnlMap.TabIndex = 871;
|
||||
//
|
||||
// PddMobileBuyOrderForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
@@ -1068,13 +1068,13 @@
|
||||
this.splitContainer2.ResumeLayout(false);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.pnlMap.ResumeLayout(false);
|
||||
this.pnlMap.PerformLayout();
|
||||
this.pnlDirectAddressAnalysis.ResumeLayout(false);
|
||||
this.pnlDirectAddressAnalysis.PerformLayout();
|
||||
this.pnlBuy.ResumeLayout(false);
|
||||
this.pnlBuy.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.pnlMap.ResumeLayout(false);
|
||||
this.pnlMap.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user