优化拍档 优化订单读取功能

This commit is contained in:
wule_5900x committed 2026-06-28 21:06:29 +08:00
1 parent adde7e6fca
commit 6f7aa58ac1
11 files changed
+334 -85

No files matched your search

+33 -1
View File
@@ -36,6 +36,14 @@ namespace TemuKJD.ToolForms
public partial class PddMobileBuyOrderForm : BaseGeneralForm
{
public static string dangerItemWords = "打火机,压力罐,刀具,铡刀,充电宝,罂粟,礼炮,煤气罐,仿制枪,暖手宝,灭火器,火炮,纸炮枪,手枪,毫安,喷漆,酒精,锂电,电池,火柴,气罐,燃气,气泡弹,喷雾";
public static List<string> lstDangerItemWord { get; set; } = dangerItemWords.Split(',').ToList();
//{
// //get { return dangerItemWords.Split(',').ToList(); }
// get { return dangerItemWords.Split(',').ToList(); }
// set { }
//}
private BuyerLoginInfo buyer = null;
private oms_wei_order_item_info orderItem = null;
private WXBuyMapInfo buyMap = null;
@@ -106,6 +114,10 @@ namespace TemuKJD.ToolForms
this.txtShopOrderItemCnt.Text = orderItem.sku_cnt.ParseToString();
this.txtShopOrderItemPrice.Text = (orderItem.real_price * 0.01m).ParseToString();
this.txtOrderId.Text = orderItem.order_id;
var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ErpShopId == orderItem.shop_id.ParseToString());
this.txtShopName.Text = shop?.ShopAccount;
foreach (var warehouse in TransitWarehouseData.TransitWarehouseList)
{
@@ -305,6 +317,8 @@ namespace TemuKJD.ToolForms
var oneGoodsPrice = BaseRegex.GetIntJson(ref data, "goodsPrice");
var buyCnt = BaseRegex.GetIntJson(ref data, "goodsNumber");
var buyPrice = BaseRegex.GetIntJson(ref data, "payAmount");
if (buyPrice.IsNullOrZero())
buyPrice = BaseRegex.GetIntJson(ref data, "orderAmount");
var orderSn = BaseRegex.GetIntJson(ref data, "orderSn");
Invoke(new Action(() =>
{
@@ -672,9 +686,11 @@ namespace TemuKJD.ToolForms
body["orderPlatformCode"] = "WEISHOP";
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 != null && exportRst.Contains("<code>200</code>"))
{
BaseMsgForm.ShowInfo("保存成功");
@@ -698,6 +714,22 @@ namespace TemuKJD.ToolForms
this.Close();
}
else
{
string msg = "";
string code = "";
try
{
System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
code = xmlDoc["AjaxResult"]["code"].InnerText;
msg = xmlDoc["AjaxResult"]["msg"].InnerText;
}
catch
{
msg = exportRst.ParseToString();
}
BaseMsgForm.ShowError(msg);
}
}
private void pictureBox1_Click(object sender, EventArgs e)
+52
View File
@@ -83,6 +83,8 @@
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.txtAddress = new System.Windows.Forms.TextBox();
this.panel1 = new System.Windows.Forms.Panel();
this.label26 = new System.Windows.Forms.Label();
this.txtOrderId = new System.Windows.Forms.TextBox();
this.pnlBuy = new System.Windows.Forms.Panel();
this.btnReMap = new DevComponents.DotNetBar.PanelEx();
this.label25 = new System.Windows.Forms.Label();
@@ -90,6 +92,8 @@
this.pnlMap = new System.Windows.Forms.Panel();
this.chkChangeWarehouseAddress = new Work.UserComponents.UcCheckBox(this.components);
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.label27 = new System.Windows.Forms.Label();
this.txtShopName = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.pbCloseBase)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel2.SuspendLayout();
@@ -694,6 +698,10 @@
//
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.txtShopName);
this.panel1.Controls.Add(this.label27);
this.panel1.Controls.Add(this.label26);
this.panel1.Controls.Add(this.txtOrderId);
this.panel1.Controls.Add(this.pnlBuy);
this.panel1.Controls.Add(this.pnlMap);
this.panel1.Controls.Add(this.chkChangeWarehouseAddress);
@@ -720,6 +728,26 @@
this.panel1.Size = new System.Drawing.Size(487, 730);
this.panel1.TabIndex = 0;
//
// label26
//
this.label26.AutoSize = true;
this.label26.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label26.Location = new System.Drawing.Point(253, 92);
this.label26.Name = "label26";
this.label26.Size = new System.Drawing.Size(68, 17);
this.label26.TabIndex = 874;
this.label26.Text = "订单编号:";
//
// txtOrderId
//
this.txtOrderId.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtOrderId.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtOrderId.Location = new System.Drawing.Point(321, 89);
this.txtOrderId.Name = "txtOrderId";
this.txtOrderId.Size = new System.Drawing.Size(152, 23);
this.txtOrderId.TabIndex = 873;
//
// pnlBuy
//
this.pnlBuy.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
@@ -839,6 +867,26 @@
this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
//
// label27
//
this.label27.AutoSize = true;
this.label27.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label27.Location = new System.Drawing.Point(253, 63);
this.label27.Name = "label27";
this.label27.Size = new System.Drawing.Size(68, 17);
this.label27.TabIndex = 875;
this.label27.Text = "店铺名称:";
//
// txtShopName
//
this.txtShopName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtShopName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtShopName.Location = new System.Drawing.Point(321, 60);
this.txtShopName.Name = "txtShopName";
this.txtShopName.Size = new System.Drawing.Size(152, 23);
this.txtShopName.TabIndex = 876;
//
// PddMobileBuyOrderForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -936,5 +984,9 @@
public System.Windows.Forms.Panel pnlBuy;
public System.Windows.Forms.Panel pnlMap;
private DevComponents.DotNetBar.PanelEx btnReMap;
private System.Windows.Forms.Label label26;
private System.Windows.Forms.TextBox txtOrderId;
private System.Windows.Forms.TextBox txtShopName;
private System.Windows.Forms.Label label27;
}
}