优化拍档 优化订单读取功能
This commit is contained in:
1 parent
adde7e6fca
commit
6f7aa58ac1
11 files changed
+334
-85
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user