淘宝买手拍单 订单补发包裹。

This commit is contained in:
wule committed 2026-10-05 18:23:15 +08:00
1 parent d18460c83f
commit c11dda0341
13 files changed
+753 -188

No files matched your search

@@ -349,15 +349,32 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
// 关联拍单关系 // 危险物品禁止拍单,仅关联安全商品
//if (!GlobalConfig.lstDangerItemWord.Any(d => (item.title).ParseToString().Contains(d)))
{
item.PddBuyMap = buyMapList.FirstOrDefault(b => b.sku_code == item.out_sku_id && b.spu_code == item.out_product_id);
var pddBuyMapLst = buyMapList.Where(m => m.platform == "pdd").ToList();
item.PddBuyMap = pddBuyMapLst.FirstOrDefault(b => b.sku_code == item.out_sku_id && b.spu_code == item.out_product_id);
if (item.PddBuyMap == null)
item.PddBuyMap = buyMapList.FirstOrDefault(b => b.sku_code == item.sku_attr_str && b.spu_code == item.out_product_id);
item.PddBuyMap = pddBuyMapLst.FirstOrDefault(b => b.sku_code == item.sku_attr_str && b.spu_code == item.out_product_id);
if (item.PddBuyMap == null)
item.PddBuyMap = buyMapList.FirstOrDefault(b => b.sku_code == item.out_sku_id && b.spu_code == item.product_id);
item.PddBuyMap = pddBuyMapLst.FirstOrDefault(b => b.sku_code == item.out_sku_id && b.spu_code == item.product_id);
if (item.PddBuyMap == null)
item.PddBuyMap = buyMapList.FirstOrDefault(b => b.sku_code == item.sku_attr_str && b.spu_code == item.product_id);
item.PddBuyMap = pddBuyMapLst.FirstOrDefault(b => b.sku_code == item.sku_attr_str && b.spu_code == item.product_id);
}
item.PddBuyMapSkus = buyMapSkusList.Where(s => s.spu_code == item.out_product_id || s.spu_code == item.product_id).OrderByDescending(s => s.mdy_time).ToList();
item.PddBuyMapSkus = buyMapSkusList.Where(s => s.spu_code == item.out_product_id || s.spu_code == item.product_id).OrderByDescending(s => s.mdy_time)
.Where(s => s.platform == "pdd").ToList();
{
var tbBuyMapLst = buyMapList.Where(m => m.platform == "tb").ToList();
item.TbBuyMap = tbBuyMapLst.FirstOrDefault(b => b.sku_code == item.out_sku_id && b.spu_code == item.out_product_id);
if (item.TbBuyMap == null)
item.TbBuyMap = tbBuyMapLst.FirstOrDefault(b => b.sku_code == item.sku_attr_str && b.spu_code == item.out_product_id);
if (item.TbBuyMap == null)
item.TbBuyMap = tbBuyMapLst.FirstOrDefault(b => b.sku_code == item.out_sku_id && b.spu_code == item.product_id);
if (item.TbBuyMap == null)
item.TbBuyMap = tbBuyMapLst.FirstOrDefault(b => b.sku_code == item.sku_attr_str && b.spu_code == item.product_id);
}
item.TbBuyMapSkus = buyMapSkusList.Where(s => s.spu_code == item.out_product_id || s.spu_code == item.product_id).OrderByDescending(s => s.mdy_time)
.Where(s => s.platform == "tb").ToList();
// 中转仓订单
if (item.ItemOrder.orderItems.Count > 1)
@@ -846,6 +863,10 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
var buyMapList = JsonHelper.DeserializeJsonToList<WXBuyMapInfo>(JObject.Parse(resultMap)["data"].ParseToString());
buyMapList = buyMapList.Where(b => !GlobalConfig.BuyMapList.Any(m => m.sku_code == b.sku_code && m.spu_code == b.spu_code)).ToList();
GlobalConfig.BuyMapList.AddRange(buyMapList);
if (buyMapList.Count > 0)
{
}
}
catch
{
@@ -1484,7 +1484,8 @@
HorizontalAlignment="Center"
d:Visibility="Visible"
Click="btnChangeWaybill_Click"
Content="修改物流"
Content="补发/修改物流"
FontSize="11"
Style="{StaticResource BasePageButtonLightStyle}"
Visibility="{Binding ItemOrder.IsShowChangeWaybillBtn, Converter={StaticResource VisibleToVisibilityConverter}}" />
<Button
@@ -524,7 +524,11 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
public static void TbBuyOrder(oms_wei_order_item_info orderItem, bool isAbnormalOrder, bool isAutoBuy)
{
TaobaoBuyOrderCtrl taobaoBuyView = new TaobaoBuyOrderCtrl(GlobalConfig.CurrentTaobaoBuyer, orderItem);
taobaoBuyView.ViewModel.InitUrl = "https://s.taobao.com/search?";
//https://item.taobao.com/item.htm?id=756295486950&skuId=5216824841295
if (orderItem.TbBuyMap != null)
taobaoBuyView.ViewModel.InitUrl = "https://item.taobao.com/item.htm?id=" + orderItem.TbBuyMap.map_goods_id + "&skuId=" + orderItem.TbBuyMap.map_sku_id;
else
taobaoBuyView.ViewModel.InitUrl = "https://s.taobao.com/search?";
new DialogWindow()
{
Title = "淘宝买手登录",
@@ -1781,7 +1785,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
{
if (DataContext is oms_wei_order_item_info orderItem && orderItem.ItemOrder != null)
{
ChangeWaybillView changeWaybillView = new ChangeWaybillView(orderItem.ItemOrder);
ChangeWaybillView changeWaybillView = new ChangeWaybillView(orderItem);
new DialogWindow()
{
Title = "修改订单物流",