优化拍单和oem每单费用读取
This commit is contained in:
1 parent
7ccc1aae80
commit
a0b25ae79c
13 files changed
+129
-75
No files matched your search
@@ -52,7 +52,11 @@ namespace TemuKJD.ToolForms
|
||||
{
|
||||
public partial class PddMobileBuyOrderForm : BaseGeneralForm
|
||||
{
|
||||
/// <summary> 异常重拍的主单信息 </summary>
|
||||
public oms_wei_external_procurement_log_info AbnormalTransitWarehouseOrderInfo { get; set; } = null;
|
||||
/// <summary> 额外包裹的(含异常或非异常)的主单信息 </summary>
|
||||
public oms_wei_external_procurement_log_info ExtraTransitWarehouseOrderInfo { get; set; } = null;
|
||||
|
||||
public pddFrontGoods3Lite pddFrontGoodsLite = new pddFrontGoods3Lite();
|
||||
|
||||
public bool IsClose { get; set; } = false;
|
||||
@@ -1454,7 +1458,7 @@ namespace TemuKJD.ToolForms
|
||||
// return;
|
||||
//}
|
||||
|
||||
if ((BuyType == "transit" || BuyType == "transit_extra") && string.IsNullOrEmpty(txtBuyTransitWarehouseStr))
|
||||
if ((BuyType == "transit") && string.IsNullOrEmpty(txtBuyTransitWarehouseStr))
|
||||
{
|
||||
if (!IsAutoBuy)
|
||||
BaseMsgForm.ShowError("缺少中转地址,请重新绑定商品并选择仓库地址");
|
||||
@@ -1463,7 +1467,7 @@ namespace TemuKJD.ToolForms
|
||||
return;
|
||||
}
|
||||
var transit = TransitWarehouseData.TransitWarehouseList.FirstOrDefault(t => t.TransFullAddress == txtBuyTransitWarehouseStr);
|
||||
if ((BuyType == "transit" || BuyType == "transit_extra") && transit == null)
|
||||
if ((BuyType == "transit") && transit == null)
|
||||
{
|
||||
if (!IsAutoBuy)
|
||||
BaseMsgForm.ShowError("中转地址对应的中转仓不存在,请核对");
|
||||
@@ -1490,10 +1494,11 @@ namespace TemuKJD.ToolForms
|
||||
|
||||
btnManualUpdateBuyOrder.Enabled = false;
|
||||
|
||||
// 中转仓拍单
|
||||
if (BuyType == "transit")
|
||||
{
|
||||
#region 正常中转拍单
|
||||
if (AbnormalTransitWarehouseOrderInfo == null)
|
||||
if (AbnormalTransitWarehouseOrderInfo == null && ExtraTransitWarehouseOrderInfo == null)
|
||||
{
|
||||
JObject body = new JObject();
|
||||
body["orderNo"] = orderItem.order_id; // 微信订单号
|
||||
@@ -1665,21 +1670,15 @@ namespace TemuKJD.ToolForms
|
||||
}
|
||||
#endregion
|
||||
|
||||
if (!IsAutoBuy)
|
||||
BaseMsgForm.ShowInfo("拍单信息保存成功");
|
||||
}
|
||||
|
||||
else if (BuyType == "transit_extra")
|
||||
{
|
||||
#region 秒退额外拍单或者多包裹订单
|
||||
if (AbnormalTransitWarehouseOrderInfo == null)
|
||||
if (ExtraTransitWarehouseOrderInfo != null)
|
||||
{
|
||||
JObject body = new JObject();
|
||||
body["packType"] = "3"; // 额外单类型
|
||||
body["orderNo"] = orderItem.order_id; // 微信订单号
|
||||
body["orderSkuId"] = orderItem.sku_id; // 微信商品skuId
|
||||
body["batchId"] = txtBuyOrderId.Text.Trim(); // 拍单订单号-额外拍单的流水单号需手动填写
|
||||
body["orderCode"] = txtBuyOrderId.Text.Trim();
|
||||
body["orderCode"] = ExtraTransitWarehouseOrderInfo.order_code; // 中转仓主订单的流水单号
|
||||
body["outOrderNo"] = txtBuyOrderId.Text.Trim(); // 拍单订单号
|
||||
body["outAmount"] = (txtBuyPrice.Text.ParseToDecimal() * 100).ParseToInt() + ""; // 外采金额
|
||||
body["buyerId"] = buyer.buyer_id; // 买手ID
|
||||
@@ -1736,7 +1735,7 @@ namespace TemuKJD.ToolForms
|
||||
order_void_status = 0,
|
||||
platform = transit.TransId,
|
||||
order_no = orderItem.order_id,
|
||||
out_sku_id = orderItem.sku_id,
|
||||
order_sku_id = orderItem.sku_id,
|
||||
out_amount = (txtBuyPrice.Text.ParseToDecimal() * 100).ParseToInt(),
|
||||
out_order_no = txtBuyOrderId.Text.Trim(),
|
||||
order_code = txtBuyOrderId.Text.Trim(),
|
||||
@@ -1756,6 +1755,9 @@ namespace TemuKJD.ToolForms
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
if (!IsAutoBuy)
|
||||
BaseMsgForm.ShowInfo("拍单信息保存成功");
|
||||
}
|
||||
|
||||
if (BuyType == "direct")
|
||||
|
||||
Reference in new issue
Block a user