直发买手拍单功能
This commit is contained in:
1 parent
fe9635f37f
commit
785fcce29e
22 files changed
+1172
-529
No files matched your search
@@ -80,7 +80,12 @@ namespace Work._29Tools.BLL
|
||||
public static List<ShopLoginInfo> AdminGetServerShopLstByIds(List<string> shop_ids)
|
||||
{
|
||||
List<ShopLoginInfo> list = new List<ShopLoginInfo>();
|
||||
if (shop_ids == null)
|
||||
return list;
|
||||
|
||||
shop_ids = shop_ids.Where(s => !string.IsNullOrEmpty(s)).ToList();
|
||||
if (shop_ids.Count == 0)
|
||||
return list;
|
||||
|
||||
var url = BaseClass.Build29WxObjString("shop/admin_get_shop_list");
|
||||
var data = UserLogin.GetSignaturex() +
|
||||
|
||||
@@ -1098,7 +1098,7 @@ namespace TemuKJD.ToolForms
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
{
|
||||
var msg = BaseRegex.GetStringJsonByRegs(ref html, html, "msg");
|
||||
BaseMsgForm.ShowError("异常订单重拍保存失败");
|
||||
BaseMsgForm.ShowError("异常单重拍保存失败");
|
||||
btnManualUpdateBuyOrder.Enabled = true;
|
||||
return;
|
||||
}
|
||||
@@ -1137,11 +1137,11 @@ namespace TemuKJD.ToolForms
|
||||
data += "&wx_order_id_in=" + orderItem.order_id;
|
||||
data += "&wx_sku_id_in=" + orderItem.sku_id;
|
||||
var html = GetHtml.PostUtf8(url, data);
|
||||
if (!html.Contains("\"code\":200"))
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
html = GetHtml.PostUtf8(url, data);
|
||||
if (!html.Contains("\"code\":200"))
|
||||
if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))
|
||||
{
|
||||
BaseMsgForm.ShowError("直发拍单信息保存失败 " + BaseRegex.GetStringJson(ref html, "msg"));
|
||||
BaseMsgForm.ShowError("直发拍单信息保存失败(01) " + BaseRegex.GetStringJson(ref html, "msg"));
|
||||
return;
|
||||
}
|
||||
var existOrderExtList = JsonHelper.DeserializeJsonToList<order_item_ext>(JsonHelper.JObjectParse(html)["data"].ParseToString());
|
||||
@@ -1167,7 +1167,21 @@ namespace TemuKJD.ToolForms
|
||||
var html1 = GetHtml.PostUtf8(url1, data1);
|
||||
if (string.IsNullOrEmpty(html1) || !html1.Contains("\"code\":200"))
|
||||
{
|
||||
BaseMsgForm.ShowError("直发拍单信息保存失败 " + BaseRegex.GetStringJson(ref html, "msg"));
|
||||
BaseMsgForm.ShowError("直发拍单信息保存失败(02) " + BaseRegex.GetStringJson(ref html1, "msg"));
|
||||
return;
|
||||
}
|
||||
|
||||
// 拍单后覆盖原售后状态(如果有)
|
||||
var url2 = BaseClass.Build29WxObjString("order/wx_update_erp_out_after_sale_status");
|
||||
var data2 = UserLogin.GetSignaturex();
|
||||
data2 += "&order_id=" + orderItem.order_id;
|
||||
data2 += "&out_after_sale_status=NULL";
|
||||
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"))
|
||||
{
|
||||
BaseMsgForm.ShowError("直发拍单信息保存失败(03) " + BaseRegex.GetStringJson(ref html2, "msg"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1193,28 +1207,12 @@ namespace TemuKJD.ToolForms
|
||||
|
||||
if (code == "0" || code == "1")
|
||||
{
|
||||
//var sendStatusTmp = string.IsNullOrEmpty(data) ? msg : data;
|
||||
//order.sendStatus = sendStatusTmp;
|
||||
|
||||
//if (code == "0" && !order.sendStatus.Contains("微信发货成功"))
|
||||
// order.sendStatus = ("微信发货成功 " + sendStatusTmp).Trim();
|
||||
//if (code == "1" && !order.sendStatus.Contains("接收成功"))
|
||||
// order.sendStatus = ("接收成功 " + sendStatusTmp).Trim();
|
||||
|
||||
//// 处理特殊情况 如未发货或退货订单
|
||||
////if (order.sendStatus == "处理完成" || order.sendStatus == "快递公司和快递单号必须同时提供或同时为空")
|
||||
//// order.sendStatus = "已发送完成";
|
||||
//if (order.order_status_prompt.Contains("待发货")) // 更新微信外采订单状态成功
|
||||
// order.sendStatus = "已发送待发货订单";
|
||||
//if (order.after_sales != null)
|
||||
// order.sendStatus = "已发送售后订单 " + sendStatusTmp;
|
||||
//NaiBa.Util.Helper.ConfigHelper.SaveConfig("other_buyer_order_list", lstOtherBuyerOrderInfoLite);
|
||||
|
||||
// 利润计算重置为最小值,控件Resource更新时将计算利润
|
||||
orderItem.ProfitCount = decimal.MinValue;
|
||||
var order = orderItem?.ItemOrder;
|
||||
if (filterOrderAction != null && order != null)
|
||||
{
|
||||
orderItem.OrderItemExt = orderExt;
|
||||
order.out_account = buyer.buyer_id;
|
||||
order.out_express_company = "OTHER";
|
||||
order.out_order_no = txtBuyOrderId.Text.Trim();
|
||||
@@ -1293,6 +1291,19 @@ namespace TemuKJD.ToolForms
|
||||
var txt = txtDirectAddress.Text.Trim();
|
||||
txt = txt.Replace("\r", "").Replace("\n", "");
|
||||
|
||||
if (txt.Contains("拨打请输入分机号"))
|
||||
{
|
||||
Match extensionNumberMatch = Regex.Match(txt, @"拨打请输入分机号\d{4}");
|
||||
if (extensionNumberMatch.Success)
|
||||
{
|
||||
var extensionNumber = extensionNumberMatch.Value.Replace("拨打请输入分机号", "");
|
||||
txt = txt.Replace("-" + extensionNumber, "");
|
||||
txt = txt.Replace("(", "(");
|
||||
txt = txt.Replace(")", ")");
|
||||
txt = txt.Replace("(拨打请输入分机号" + extensionNumber + ")", "");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 定义座机号的正则表达式
|
||||
string landlinePattern = @"\d{3}-\d{8}|\d{4}-\d{7}";
|
||||
|
||||
+29
-29
@@ -84,6 +84,7 @@
|
||||
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();
|
||||
@@ -100,7 +101,6 @@
|
||||
this.lblBuyAddress = new System.Windows.Forms.Label();
|
||||
this.txtBuyTransitWarehouse = new System.Windows.Forms.TextBox();
|
||||
this.label29 = new System.Windows.Forms.Label();
|
||||
this.pnlMap = new System.Windows.Forms.Panel();
|
||||
this.chkAutoChangeWarehouseAddress = new Work.UserComponents.UcCheckBox(this.components);
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbCloseBase)).BeginInit();
|
||||
@@ -113,9 +113,9 @@
|
||||
this.splitContainer2.Panel2.SuspendLayout();
|
||||
this.splitContainer2.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.pnlMap.SuspendLayout();
|
||||
this.pnlDirectAddressAnalysis.SuspendLayout();
|
||||
this.pnlBuy.SuspendLayout();
|
||||
this.pnlMap.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@@ -747,7 +747,6 @@
|
||||
//
|
||||
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.panel1.Controls.Add(this.pnlMap);
|
||||
this.panel1.Controls.Add(this.pnlDirectAddressAnalysis);
|
||||
this.panel1.Controls.Add(this.chkUseAppBalance);
|
||||
this.panel1.Controls.Add(this.txtShopName);
|
||||
@@ -774,11 +773,36 @@
|
||||
this.panel1.Controls.Add(this.txtUpSpuCode);
|
||||
this.panel1.Controls.Add(this.txtUpSkuCode);
|
||||
this.panel1.Controls.Add(this.label12);
|
||||
this.panel1.Controls.Add(this.pnlMap);
|
||||
this.panel1.Location = new System.Drawing.Point(867, 3);
|
||||
this.panel1.Name = "panel1";
|
||||
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);
|
||||
@@ -993,30 +1017,6 @@
|
||||
this.label29.TabIndex = 892;
|
||||
this.label29.Text = "如自动识别失败,请填写后点击手动确认拍单";
|
||||
//
|
||||
// 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;
|
||||
//
|
||||
// chkAutoChangeWarehouseAddress
|
||||
//
|
||||
this.chkAutoChangeWarehouseAddress.AutoSize = true;
|
||||
@@ -1068,12 +1068,12 @@
|
||||
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();
|
||||
this.pnlMap.ResumeLayout(false);
|
||||
this.pnlMap.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
|
||||
Reference in new issue
Block a user