淘宝拍单45% 优化中转仓拒收拦截退货等相关操作 拍单地址未修改的拦住付款按钮

This commit is contained in:
wule committed 2026-09-30 19:38:21 +08:00
1 parent f27ddca730
commit d109a90302
11 files changed
+452 -42

No files matched your search

@@ -5,6 +5,8 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:_29WxOrderWpf.Ctrls.BuyerCtrls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:uc="clr-namespace:_29WxOrderWpf.UserControls"
xmlns:wpf="WPFCommon"
x:Name="taobaoBuyOrderCtrl"
Width="1360"
Height="768"
@@ -14,6 +16,16 @@
mc:Ignorable="d">
<UserControl.Resources>
<BooleanToVisibilityConverter x:Key="BoolToVis" />
<Style BasedOn="{StaticResource TitleContentBaseStyle}" TargetType="wpf:TitleContent">
<Setter Property="Placement" Value="Left" />
<Setter Property="TitleVerticalAlignment" Value="Center" />
<Setter Property="LeftTitlePadding" Value="0,0,0,0" />
</Style>
<Style TargetType="wpf:SpacingStackPanel">
<Setter Property="Margin" Value="3,0" />
</Style>
</UserControl.Resources>
<Grid Background="White">
<Grid.RowDefinitions>
@@ -60,6 +72,217 @@
ResizeBehavior="PreviousAndNext"
ShowsPreview="True" />
<wpf:SpacingStackPanel
Grid.Column="2"
Margin="4"
Orientation="Vertical"
VerticalSpacing="4">
<TextBlock FontSize="14" FontWeight="Bold">店铺商品信息:</TextBlock>
<wpf:TitleContent
x:Name="tcShopGoodsName"
Title="店铺标题:"
TitleHorizontalAlignment="Right"
TitleWidth="85">
<TextBox
x:Name="txtShopGoodsName"
Height="20"
BorderBrush="{StaticResource pageColorBrush}"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
</wpf:TitleContent>
<wpf:TitleContent
Title="店铺规格:"
TitleHorizontalAlignment="Right"
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
<TextBox
x:Name="txtShopSpecName"
Height="20"
BorderBrush="{StaticResource pageColorBrush}"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
</wpf:TitleContent>
<wpf:TitleContent
Title="店铺商品ID:"
TitleHorizontalAlignment="Right"
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
<TextBox
x:Name="txtShopGoodsId"
Height="20"
BorderBrush="{StaticResource pageColorBrush}"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
</wpf:TitleContent>
<wpf:TitleContent
Title="店铺SKUID:"
TitleHorizontalAlignment="Right"
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
<TextBox
x:Name="txtShopSkuId"
Height="20"
BorderBrush="{StaticResource pageColorBrush}"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
</wpf:TitleContent>
<wpf:TitleContent
Title="平台商品编码:"
TitleHorizontalAlignment="Right"
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
<TextBox
x:Name="txtSpuCode"
Height="20"
BorderBrush="{StaticResource pageColorBrush}"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
</wpf:TitleContent>
<wpf:TitleContent
Title="平台SKU编码:"
TitleHorizontalAlignment="Right"
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
<TextBox
x:Name="txtSkuCode"
Height="20"
BorderBrush="{StaticResource pageColorBrush}"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
</wpf:TitleContent>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.04*" />
<ColumnDefinition Width="0.96*" />
</Grid.ColumnDefinitions>
<wpf:TitleContent
Title="数量:"
Grid.Column="0"
TitleHorizontalAlignment="Right"
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
<TextBox
x:Name="txtShopOrderItemCnt"
Height="22"
BorderBrush="{StaticResource pageColorBrush}"
FontSize="15"
FontWeight="bold"
Foreground="Red"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
</wpf:TitleContent>
<wpf:TitleContent
Title="  总价:"
Grid.Column="1"
Margin="10,0,0,0"
TitleHorizontalAlignment="Right">
<TextBox
x:Name="txtShopOrderItemPrice"
Height="22"
BorderBrush="{StaticResource pageColorBrush}"
FontSize="15"
FontWeight="bold"
Foreground="Red"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
</wpf:TitleContent>
</Grid>
<TextBlock
Margin="0,4,0,0"
FontSize="14"
FontWeight="Bold">
买手拍单信息:
</TextBlock>
<wpf:TitleContent
Title="商品标题:"
TitleHorizontalAlignment="Right"
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
<TextBox
x:Name="txtBuyGoodsName"
Height="20"
BorderBrush="{StaticResource pageColorBrush}"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
</wpf:TitleContent>
<wpf:TitleContent
Title="规格名称:"
TitleHorizontalAlignment="Right"
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
<TextBox
x:Name="txtBuySkuName"
Height="20"
BorderBrush="{StaticResource pageColorBrush}"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
</wpf:TitleContent>
<wpf:TitleContent
Title="拍单商品ID:"
TitleHorizontalAlignment="Right"
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
<TextBox
x:Name="txtBuyGoodsId"
Height="20"
BorderBrush="{StaticResource pageColorBrush}"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
</wpf:TitleContent>
<wpf:TitleContent
Title="拍单SKUID:"
TitleHorizontalAlignment="Right"
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
<TextBox
x:Name="txtBuySkuId"
Height="20"
BorderBrush="{StaticResource pageColorBrush}"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
</wpf:TitleContent>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1.04*" />
<ColumnDefinition Width="0.96*" />
</Grid.ColumnDefinitions>
<wpf:TitleContent
Title="拍单数量:"
Grid.Column="0"
TitleHorizontalAlignment="Right"
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
<TextBox
x:Name="txtBuyCnt"
Height="22"
BorderBrush="{StaticResource pageColorBrush}"
FontSize="15"
FontWeight="bold"
Foreground="Red"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
</wpf:TitleContent>
<wpf:TitleContent
Title="拍单总价:"
Grid.Column="1"
Margin="10,0,0,0"
TitleHorizontalAlignment="Right">
<TextBox
x:Name="txtBuyPrice"
Height="22"
BorderBrush="{StaticResource pageColorBrush}"
FontSize="15"
FontWeight="bold"
Foreground="Red"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
</wpf:TitleContent>
</Grid>
<wpf:TitleContent
Title="拍单订单号:"
TitleHorizontalAlignment="Right"
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
<TextBox
x:Name="txtBuyOrderId"
Height="20"
BorderBrush="{StaticResource pageColorBrush}"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
</wpf:TitleContent>
<wpf:TitleContent
Title="溯源码:"
TitleHorizontalAlignment="Right"
TitleWidth="{Binding ElementName=tcShopGoodsName, Path=TitleWidth}">
<TextBox
x:Name="txtSourceCode"
Height="20"
BorderBrush="#999999"
IsEnabled="False"
Background="#DDDDDD"
Style="{StaticResource BaseRoundCornerTextBoxStyle}" />
</wpf:TitleContent>
</wpf:SpacingStackPanel>
</Grid>
</Grid>
</UserControl>
@@ -5,10 +5,12 @@ using AllBase;
using AllBase.Helper;
using AllBase.Model.DBModel;
using AllBase.Model.MvvmBaseClasses;
using AllBase.Model.Result;
using CefSharp;
using CefSharp.Handler;
using CefSharp.Wpf;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using Org.BouncyCastle.Asn1.Ocsp;
using System;
using System.Collections.Generic;
@@ -126,8 +128,8 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
}));
}
});
}
await AutoLogin();
}
await AutoLogin();
}
/// <summary>
@@ -212,7 +214,7 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
else
CefWebBrowser.Load(MainUrl);
await Task.Run(async() =>
await Task.Run(async () =>
{
while (Address.IsNullOrEmpty())
{
@@ -313,22 +315,110 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
{
var _url = url;
var _responseData = responseData;
Task.Run(async () => { await DoResourceLoadComplete(url, responseData); });
Task.Run(
async () =>
{
try
{
await DoResourceLoadComplete(url, responseData);
}
catch (Exception ex)
{
}
});
}
private async Task DoResourceLoadComplete(string url, string responseData)
{
//https://detail.tmall.com/item.htm?id=655638393036&sku_properties=1627207%3A42499150508
//{"appData":null,"loaderData":{"home":{"data":{"res":{"seller":{"sellerNick":"匹克世冠专卖店","shopName":"匹克世冠专卖店","evaluates":[{"score":"4.8 ","level":"1","levelText":"高","title":"宝贝描述","type":"desc"},{"score":"4.8 ","level":"1","levelText":"高","title":"卖家服务","type":"serv"},{"score":"4.8 ","level":"1","levelText":"高","title":"物流服务","type":"post"}],"startsIcon":"https://img.alicdn.com/imgextra/i4/O1CN018GrFIW1Zx7vwjt3Jg_!!6000000003260-2-tps-91-14.png","pcShopUrl":"//shop67269976.taobao.com","creditLevelIcon":"//gw.alicdn.com/imgextra/i1/O1CN01VD9Iap25oweneR31D_!!6000000007574-2-tps-120-60.png","sellerType":"B","encryptUid":"RAzN8HWKpmWFSf9AkzVpz3nhAYRZrPS63pSiDPMWyvui5ixfJBs"},"item":{"images":["https://img.alicdn.com/imgextra/i4/717513321/O1CN01cvzkE61aP4Tjeupfh_!!4611686018427380329-0-item_pic.jpg","https://img.alicdn.com/imgextra/i3/717513321/O1CN01W9mF4N1aP4OAc3Mtt_!!4611686018427380329-0-item_pic.jpg","https://img.alicdn.com/imgextra/i1/717513321/O1CN01a72PTr1aP4S55SiRs_!!4611686018427380329-0-item_pic.jpg"],"title":"匹克态极拖鞋男情侣款夏季外穿潮鞋篮球运动防滑太极沙滩凉拖鞋女","itemId":"655638393036","useWirelessDesc":"true","qrCode":"https://h5.m.taobao.com/awp/core/detail.htm?id=655638393036","spuId":"2122802472","titleIcon":"//img.alicdn.com/tfs/TB1SMG7nnvI8KJjSspjXXcgjXXa-78-36.png?getAvatar=avatar"},"feature":{"pcResistDetail":"true","tmwOverseasScene":"false","pcIdentityRisk":"true"},"plusViewVO":{"askAnswerVO":{"ext":{"skeletonImg":"https://img.alicdn.com/imgextra/i2/O1CN01MLPxBr1flZy969k5W_!!6000000004047-2-tps-1376-1216.png"},"hit":"true"},"addCartActionVO":{"ext":{"type":"dialogWithRecommond_2","frequency":"day:1;repeat:1"},"hit":"true"},"guessLikeVO":{"hit":"true"},"wangwangFlowSplitVO":{"hit":"true"},"rankVO":{"hit":"true"},"tabPlaceholderVO":{"hit":"true"},"imageSearchVO":{"ext":{"textList":["商品已经下架啦~要不要瞧瞧别的~","该区域暂不支持购买","此商品不支持在当前地区销售","商品已经卖光啦~","当前商品仅限店铺会员购买","商品已经卖光啦,非常抱歉","店铺正在打烊中,当前商品不可下单","商品已经卖光啦~","当前库存已售完","该商品有卖家设置的购买门槛,须达门槛才可购买噢~","此商品暂时不能购买"]},"spm":"aliabtest1115297_1138353","hit":"true"},"reportEntranceVO":{"spm":"aliabtest1097211_1051854","hit":"true"},"headAtmosphereBeltVO":{"valid":"false","hit":"true"},"commentListVO":{"ext":{"countShow":"\"false\""},"hit":"true"},"pcFrontSkuQuantityLimitVO":{"hit":"true"},"buyParamVO":{"ext":{"autoApplCoupSource":"pcDetailOrder","needAutoApplCoup":"true"},"hit":"true"}},"skuCore":{"skuItem":{"renderSku":"true","itemStatus":0,"unitBuy":1},"sku2info":{"0":{"moreQuantity":"true","quantity":200,"logisticsTime":"平均9小时发货","price":{"priceTitle":"优惠前","priceColorNew":"#FFFFFF","priceText":"157","priceDesc":"起","priceMoney":"15700"},"quantityDisplayValue":1,"quantityText":"有货","buyExParams":{"mi_id":"0000m5cdA3X8kO8PXBJ3r8ji8d6gjumNVDVBkp9kKySsEPW3KKjUvUifmdD1Plv0m1WF"}},"5359436967823":{"moreQuantity":"false","quantity":12,"logisticsTime":"48小时内发货","price":{"priceTitle":"优惠前","priceColorNew":"#FFFFFF","priceText":"157","priceMoney":"15700"},"cartParam":{"addCartCheck":"true"},"quantityDisplayValue":1,"quantityText":"有货","buyExParams":{"mi_id":"0000m5cdA3X8kO8PXBJ3r8ji8d6gjumNVDVBkp9kKySsEPW3KKjUvUifmdD1Plv0m1WF"}},"5769423993152":{"moreQuantity":"false","quantity":19,"logisticsTime":"48小时内发货","price":{"priceTitle":"优惠前","priceColorNew":"#FFFFFF","priceText":"157","priceMoney":"15700"},"cartParam":{"addCartCheck":"true"},"quantityDisplayValue":1,"quantityText":"有货","buyExParams":{"mi_id":"0000m5cdA3X8kO8PXBJ3r8ji8d6gjumNVDVBkp9kKySsEPW3KKjUvUifmdD1Plv0m1WF"}},"5359436967808":{"moreQuantity":"false","quantity":46,"logisticsTime":"48小时内发货","price":{"priceTitle":"优惠前","priceColorNew":"#FFFFFF","priceText":"157","priceMoney":"15700"},"cartParam":{"addCartCheck":"true"},"quantityDisplayValue":1,"quantityText":"有货","buyExParams":{"mi_id":"0000m5cdA3X8kO8PXBJ3r8ji8d6gjumNVDVBkp9kKySsEPW3KKjUvUifmdD1Plv0m1WF"}},"5359436967810":{"moreQuantity":"false","quantity":95,"logisticsTime":"48小时内发货","price":{"priceTitle":"优惠前","priceColorNew":"#FFFFFF","priceText":"157","priceMoney":"15700"},"cartParam":{"addCartCheck":"true"},"quantityDisplayValue":1,"quantityText":"有货","buyExParams":{"mi_id":"0000m5cdA3X8kO8PXBJ3r8ji8d6gjumNVDVBkp9kKySsEPW3KKjUvUifmdD1Plv0m1WF"}},"5132110197053":{"moreQuantity":"false","quantity":18,"logisticsTime":"平均9小时发货","price":{"priceTitle":"优惠前","priceColorNew":"#FFFFFF","priceText":"169","priceMoney":"16900"},"cartParam":{"addCartCheck":"true"},"quantityDisplayValue":1,"quantityText":"有货","buyExParams":{"mi_id":"0000m5cdA3X8kO8PXBJ3r8ji8d6gjumNVDVBkp9kKySsEPW3KKjUvUifmLine truncated
if (url.Contains("https://detail.tmall.com/item.htm?id=") || responseData.Contains("42499150508"))
if (url.Contains("https://detail.tmall.com/item.htm?id=") || (responseData.Contains("loaderData") && responseData.Contains("sku2info")))
{
responseData = responseData.Replace("\0", "");
var loaderDatas = BaseRegex.GetJsonObjStrJson(ref responseData, "loaderData");
var sku2info = BaseRegex.GetOneJsonObjStrJson(ref responseData, "sku2info");
if (loaderDatas.Count > 0)
{
var loaderData = loaderDatas.OrderByDescending(l => l.Length).First();
pddFrontGoods3Lite pddFrontGoods3 = new pddFrontGoods3Lite();
var shopUrl = BaseRegex.GetStringJson(ref loaderData, "pcShopUrl").ParseToString(); //shop255835633.taobao.com
var goodsItemStr = BaseRegex.GetOneJsonObjStrJson(ref loaderData, "item", "max_length");
pddFrontGoods3.mallId = shopUrl.Replace("//shop", "").Replace(".taobao.com", "").ParseToLong();
pddFrontGoods3.mallName = BaseRegex.GetStringJson(ref loaderData, "shopName");
pddFrontGoods3.goodsId = BaseRegex.GetStringJson(ref loaderData, "itemId").ParseToLong();
pddFrontGoods3.goodsName = BaseRegex.GetStringJson(ref goodsItemStr, "title");
pddFrontGoods3.skus = new List<frontSkuInfo3>();
// 获取sku和sku属性
var sku2infoStr = BaseRegex.GetOneJsonObjStrJson(ref loaderData, "sku2info");
var skusStr = BaseRegex.GetOneJsonArrStrJson(ref responseData, "skus");
var propsStr = BaseRegex.GetOneJsonArrStrJson(ref responseData, "props");
if (sku2infoStr.IsNullOrEmpty() || skusStr.IsNullOrEmpty() || propsStr.IsNullOrEmpty())
throw new Exception("获取商品sku失败");
var dicTaoBaoSku2 = JsonHelper.DeserializeJsonToObject<Dictionary<string, TaoBaoSku2Info>>(sku2infoStr);
var taobaoSkusLst = JsonHelper.DeserializeJsonToList<TaoBaoSkus>(skusStr);
var taobaoPropsLst = JsonHelper.DeserializeJsonToList<TaoBaoProps>(propsStr);
foreach (var key in dicTaoBaoSku2.Keys)
{
if (key == "0" || key.ParseToLong().IsNullOrZero())
continue;
var tbSku2 = dicTaoBaoSku2[key];
if (tbSku2.quantity < 1 || tbSku2.quantityText != "有货")
continue;
var taobaoSku = taobaoSkusLst.FirstOrDefault(s => s.skuId == key);
var taobaoSkuPropStrLst = taobaoSku?.propPath.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
var pddSpecs = new List<frontSpecInfo3>();
var thumbUrl = "";
foreach (var taobaoSkuPropStr in taobaoSkuPropStrLst)
{
var pid = taobaoSkuPropStr.Split(new string[] { ":" }, StringSplitOptions.RemoveEmptyEntries).FirstOrDefault();
var vid = taobaoSkuPropStr.Split(new string[] { ":" }, StringSplitOptions.RemoveEmptyEntries).LastOrDefault();
var taobaoProp = taobaoPropsLst.FirstOrDefault(p => p.pid == pid);
var taobaoPropValue = taobaoProp.values.FirstOrDefault(v => v.vid == vid);
pddSpecs.Add(new frontSpecInfo3()
{
spec_key = taobaoProp.name,
spec_key_id = pid.ParseToLong(),
spec_value = taobaoPropValue.name,
spec_value_id = vid.ParseToLong(),
});
if (!taobaoPropValue.image.IsNullOrEmpty())
thumbUrl = taobaoPropValue.image;
}
var pddFrontSkuInfo = new frontSkuInfo3()
{
skuID = key.ParseToLong(),
goodsId = pddFrontGoods3.goodsId,
thumbUrl = thumbUrl,
quantity = tbSku2.quantity,
isOnsale = 1,
spec = taobaoSku?.propPath, // 淘宝在
specs = pddSpecs,
price = tbSku2.price.priceMoney.ParseToInt() + 100,
normalPrice = ((tbSku2.price.priceMoney.ParseToInt() + 100) / 100m).ToString("F2"),
groupPrice = tbSku2.price.priceText,
oldGroupPrice = tbSku2.price.priceMoney.ParseToInt(),
};
pddFrontGoods3.skus.Add(pddFrontSkuInfo);
}
WXBuyMapSkusInfo buymapSkuInfo = new WXBuyMapSkusInfo()
{
source_platform = "tb",
map_goods_id = BaseRegex.GetStringJson(ref loaderData, "itemId"),
map_goods_name = BaseRegex.GetStringJson(ref goodsItemStr, "title"),
map_url = "929536442189",
map_skus = JsonHelper.SerializeObject(pddFrontGoods3),
};
}
}
@@ -372,4 +462,60 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
this.CefWebBrowser?.Load(buyerLoginUrl);
}
}
public class TaoBaoSku2Info
{
public string moreQuantity { get; set; } // "true",
public int? quantity { get; set; } // 200,
public string logisticsTime { get; set; } // "预计后天送达",
public TaoBaoSku2Price price { get; set; }
public int? quantityDisplayValue { get; set; } // 1,
public string quantityText { get; set; } // "有货",
public TaoBaoSku2BuyExParams buyExParams { get; set; }
}
public class TaoBaoSku2BuyExParams
{
public string mi_id { get; set; } // "0000fzkd8x49NmAzafAs8-k3UqeOU60dSJnhod0N38R_oKHHhVlEK3Lfc5Dp_VWbQP__"
}
public class TaoBaoSku2Price
{
public string priceColorNew { get; set; } // "#FF5000",
public string priceText { get; set; } // "2.86",
public string priceDesc { get; set; } // "起",
public string priceMoney { get; set; } // "286"
}
public class TaoBaoSkus
{
public string propPath { get; set; } // "1627207:29544394459"
public string skuId { get; set; } // "5216824841290"
}
public class TaoBaoProps
{
public string hasGroupTags{ get; set; } // "false",
public string packProp { get; set; } // "false",
public string shouldGroup { get; set; } // "false",
public string comboProperty { get; set; } // "false",
public List<TaoBaoPropValues> values { get; set; }
public string hasImage { get; set; } // "true",
public string pid { get; set; } // "1627207",
public string bigImageMode { get; set; } // "true",
public string nameDesc { get; set; } // "(7)",
public string name { get; set; } // "颜色分类",
public string showSizeRecommend { get; set; } // "false",
public Dictionary<string, TaoBaoPropValues> valueMap { get; set; } // <"29544394459",new TaoBaoPropValues()>
}
public class TaoBaoPropValues
{
public string comboPropertyValue { get; set; } // "false"
public string vid { get; set; } // "29544394459"
public object corner { get; set; } // {}
public string image { get; set; } // "https://gw.alicdn.com/bao/uploaded/i2/3156544484/O1CN01KqRREE1izirnY4kSM_!!3156544484.jpg"
public string name { get; set; } // "3件套【兔子+小熊+梅花】"
}
}
@@ -1779,7 +1779,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
//"System.Windows.Controls.ComboBoxItem: 未申请";
var cmbRejectStatusText = cmbRejectStatus.SelectedItem.ParseToString().Replace("System.Windows.Controls.ComboBoxItem: ", "");
if (cmbRejectStatusText == "未申请" && !order.orderItems.Any(oi => oi.AddEditTransitWarehouseRejectStr == "申请"))
if (cmbRejectStatusText == "未申请" && !order.orderItems.Any(oi => oi.AddEditTransitWarehouseRejectStr == "未申请"))
return true;
if (cmbRejectStatusText == "申请中" && !order.orderItems.Any(oi => oi.AddEditTransitWarehouseRejectStr == "已申请拒收"))
return true;
@@ -1795,7 +1795,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
}
var cmbReturnPackageStatusText = cmbReturnPackageStatus.SelectedItem.ParseToString().Replace("System.Windows.Controls.ComboBoxItem: ", "");
if (cmbReturnPackageStatusText == "未拦截" && !order.orderItems.Any(oi => oi.AddEditTransitWarehouseAfterSaleStr == "添加"))
if (cmbReturnPackageStatusText == "未拦截" && !order.orderItems.Any(oi => oi.AddEditTransitWarehouseAfterSaleStr == "未添加"))
return true;
if (cmbReturnPackageStatusText == "拦截中" && !order.orderItems.Any(oi => oi.AddEditTransitWarehouseAfterSaleStr == "已添加"))
return true;
@@ -1267,7 +1267,7 @@
WaterMark="云仓退货" />
<Button
x:Name="btnRetrunOrder"
d:Content="未创建"
d:Content="创建"
Click="btnReturnOrder_Click"
Content="{Binding AddEditTransitWarehouseReturnOrderStr}"
Style="{StaticResource LinkButton}" />
@@ -529,6 +529,10 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
{
Title = "淘宝买手登录",
Content = taobaoBuyView,
//Height = System.Windows.Forms.SystemInformation.WorkingArea.Height - 80,
//Height = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height - 80,
Height = SystemParameters.PrimaryScreenHeight * 90 / 100,
WindowStartupLocation = WindowStartupLocation.CenterScreen,
}.ShowDialog();
}
@@ -1193,7 +1197,7 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
if (this.DataContext is oms_wei_order_item_info orderItem)
{
// 不是中转仓,直接返回
// 显示状态的按钮,直接返回
if (sender == btnAddEditTransitWarehouseAfterSale)
return;
@@ -1555,6 +1559,9 @@ namespace _29WxOrderWpf.Ctrls.OrderCtrls
{
if (this.DataContext is oms_wei_order_item_info orderItem)
{
if (sender == btnRetrunOrder && (orderItem.AddEditTransitWarehouseReturnOrderStr == "未创建" || orderItem.AddEditTransitWarehouseReturnOrderStr == "创建失败"))
return;
//if (orderItem.ItemTransitOrder?.warehouse_status != 2 && orderItem.AddEditTransitWarehouseAfterSaleStr == "添加")
//{
// BaseMsgWindow.ShowError("商品未出库,请选择中转仓拒收!");
@@ -91,6 +91,12 @@ public class BuyMapSkuViewModel : PropertyNotifyObject
}
skuInfo.IsChecked = true;
FrontSkuInfos = new ObservableCollection<frontSkuInfo3>(skuInfo?.pdd_front_goods3_Lite.skus);
// 把名称给附上
foreach (var sku in FrontSkuInfos)
{
sku.GoodsNameStr = skuInfo?.pdd_front_goods3_Lite.goodsName;
}
}
/// <summary>
+31 -5
View File
@@ -9,6 +9,7 @@ using System;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Web.Services.Description;
namespace AllBase
{
@@ -704,10 +705,20 @@ namespace AllBase
return temp;
}
public static string GetOneJsonObjStrJson(ref string html, string reg)
{
return GetJsonObjStrJson(ref html, reg).FirstOrDefault();
}
/// <summary>
///
/// </summary>
/// <param name="html"></param>
/// <param name="reg"></param>
/// <param name="sortType">max_length 返回最长的字符串,否则返回第一个匹配的</param>
/// <returns></returns>
public static string GetOneJsonObjStrJson(ref string html, string reg, string sortType = "max_length")
{
if (sortType == "max_length")
return GetJsonObjStrJson(ref html, reg).OrderByDescending(s => s.Length).FirstOrDefault();
else
return GetJsonObjStrJson(ref html, reg).FirstOrDefault();
}
public static System.Collections.Generic.List<string> GetJsonObjStrJson(ref string html, string reg, int level = 0)
{
@@ -772,7 +783,22 @@ namespace AllBase
return rstLst;
}
public static System.Collections.Generic.List<string> GetJsonArrStrJson(ref string html, string reg)
/// <summary>
///
/// </summary>
/// <param name="html"></param>
/// <param name="reg">要查找的关键字</param>
/// <param name="sortType">max_length 返回最长的字符串,否则返回第一个匹配的</param>
/// <returns></returns>
public static string GetOneJsonArrStrJson(ref string html, string reg, string sortType = "max_length")
{
if (sortType == "max_length")
return GetJsonArrStrJson(ref html, reg).OrderByDescending(s => s.Length).FirstOrDefault();
else
return GetJsonArrStrJson(ref html, reg).FirstOrDefault();
}
public static System.Collections.Generic.List<string> GetJsonArrStrJson(ref string html, string reg)
{
var startTime = DateTime.Now;
System.Collections.Generic.List<string> rstLst = new System.Collections.Generic.List<string>();
@@ -368,11 +368,8 @@ namespace AllBase.Model.DBModel
//else if (this.ItemTransitOrderWithVoid.platform == "XDYYWC") // 义务仓已申请拒收的全部显示失败
// AddEditTransitWarehouseRejectStr = "申请拒收失败*";
}
if (order_id == "3739154342108377600")
{
}
if (AddEditTransitWarehouseRejectStr == "申请")
AddEditTransitWarehouseRejectStr = "未申请";
RejectOrReturnPackageBtnVisibility = ItemTransitOrderWithVoid != null ? Visibility.Visible : Visibility.Collapsed;
@@ -410,27 +407,23 @@ namespace AllBase.Model.DBModel
if (AddEditTransitWarehouseAfterSaleStr == "添加")
AddEditTransitWarehouseAfterSaleStr = "";
}
if (AddEditTransitWarehouseAfterSaleStr == "添加")
AddEditTransitWarehouseAfterSaleStr = "未添加";
// 拦截退回物流单号
if (this.ItemTransitOrderAfterSale != null)
TransitWarehouseAfterSaleWayBillStr = (this.ItemTransitOrderAfterSale?.downstream_express_code + "-" + this.ItemTransitOrderAfterSale?.downstream_waybill).Trim('-');
// 拦截退回操作信息
// 拦截退回操作信息,如果实际拦截成功,则不显示中间报错信息
InterceptReturnInfoStr = "";
if (this.ItemTransitOrderWithVoid != null && AddEditTransitWarehouseAfterSaleStr != "拦截成功")
InterceptReturnInfoStr = this.ItemTransitOrderWithVoid.intercept_return_info;
// 退货仓退货
AddEditTransitWarehouseReturnOrderStr = "";
if (ItemRefund?.return_detail.StartsWith(GlobalConfig.TransitReturnOrderReturnAddress) == true)
{
if (order_id == "3738272473468804864")
{
}
if (AddEditTransitWarehouseAfterSaleStr == "添加")
AddEditTransitWarehouseAfterSaleStr = "";
AddEditTransitWarehouseReturnOrderStr = DistribReturnOrderInfo == null ? "未创建" : "已添加";
AddEditTransitWarehouseReturnOrderStr = DistribReturnOrderInfo == null ? "未创建" : "已创建";
if (DistribReturnOrderInfo?.warehouse_status == 1)
{
if ((DistribReturnOrderInfo?.real_logistics_express_code).IsNullOrEmpty())
@@ -1,4 +1,5 @@
using AllBase.Model.MvvmBaseClasses;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -173,6 +174,7 @@ namespace AllBase.Model.Result
{
public long? skuId { get; set; } // 28790184768,
public long? goodsId { get; set; } // 1661424397,
[JsonIgnore]
public string GoodsNameStr
{
get { return this.GetValue(x => x.GoodsNameStr); }
@@ -191,6 +193,7 @@ namespace AllBase.Model.Result
public int? defaultQuantity { get; set; } // 100,
public int? isOnsale { get; set; } // 1,
public string spec { get; set; } // "677094835",
[JsonIgnore]
public string SpecNameStr
{
get { return this.GetValue(x => x.SpecNameStr) == null ? string.Join(",", specs?.Select(s => s.spec_value)) : this.GetValue(x => x.SpecNameStr); }
+9 -4
View File
@@ -169,7 +169,10 @@ namespace TemuKJD.ToolForms
if (this.Created)
Invoke(new Action(() =>
{
this.pnlMask.Visible = false;
//this.pnlMask.Visible = false;
this.pnlMask.Text = "请等待地址修改";
this.pnlMask.Dock = DockStyle.Bottom;
this.pnlMask.Height = 120;
}));
});
}
@@ -374,7 +377,8 @@ namespace TemuKJD.ToolForms
jObj["name"] = TransitWaybillHelper.LastName[Randomx.GetId(TransitWaybillHelper.LastName.Count)] + (Randomx.GetId(2) == 1 ? "先生" : "女士");
postData = JsonHelper.SerializeObject(jObj);
request.PostData.Elements[0].Bytes = System.Text.Encoding.UTF8.GetBytes(postData);
}
Invoke(() => { this.pnlMask.Visible = false; });
}
else if (BuyType == "direct" && orderItem?.ItemOrder?.AddressStr.Contains("******") == false)
{
var dvProvince = GlobalConfig.PddDivisions.FirstOrDefault(d => d.name == orderItem.ItemOrder.province_name);
@@ -390,9 +394,10 @@ namespace TemuKJD.ToolForms
jObj["name"] = orderItem.ItemOrder.user_name;
postData = JsonHelper.SerializeObject(jObj);
request.PostData.Elements[0].Bytes = System.Text.Encoding.UTF8.GetBytes(postData);
}
Invoke(() => { this.pnlMask.Visible = false; });
}
HasChangeAddress = true;
HasChangeAddress = true;
}
return false;
+8 -7
View File
@@ -133,6 +133,7 @@
//
this.pbCloseBase.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.pbCloseBase.Location = new System.Drawing.Point(1326, 0);
this.pbCloseBase.Size = new System.Drawing.Size(32, 17);
//
// splitContainer1
//
@@ -157,8 +158,8 @@
this.splitContainer1.Panel2.Controls.Add(this.lblErrMsg);
this.splitContainer1.Panel2.Controls.Add(this.btnJumpOrderList);
this.splitContainer1.Panel2MinSize = 0;
this.splitContainer1.Size = new System.Drawing.Size(864, 888);
this.splitContainer1.SplitterDistance = 860;
this.splitContainer1.Size = new System.Drawing.Size(864, 903);
this.splitContainer1.SplitterDistance = 875;
this.splitContainer1.SplitterWidth = 3;
this.splitContainer1.TabIndex = 4;
//
@@ -171,7 +172,7 @@
this.pnlMask.Font = new System.Drawing.Font("微软雅黑", 50F);
this.pnlMask.Location = new System.Drawing.Point(0, 0);
this.pnlMask.Name = "pnlMask";
this.pnlMask.Size = new System.Drawing.Size(864, 860);
this.pnlMask.Size = new System.Drawing.Size(864, 875);
this.pnlMask.Style.Alignment = System.Drawing.StringAlignment.Center;
this.pnlMask.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(245)))), ((int)(((byte)(235)))), ((int)(((byte)(255)))));
this.pnlMask.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(245)))), ((int)(((byte)(235)))), ((int)(((byte)(255)))));
@@ -737,7 +738,7 @@
this.splitContainer2.BackColor = System.Drawing.Color.White;
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer2.Location = new System.Drawing.Point(1, 33);
this.splitContainer2.Location = new System.Drawing.Point(1, 18);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
@@ -749,7 +750,7 @@
//
this.splitContainer2.Panel2.Controls.Add(this.panel1);
this.splitContainer2.Panel2.Controls.Add(this.splitContainer1);
this.splitContainer2.Size = new System.Drawing.Size(1358, 926);
this.splitContainer2.Size = new System.Drawing.Size(1358, 941);
this.splitContainer2.SplitterDistance = 26;
this.splitContainer2.TabIndex = 5;
//
@@ -800,7 +801,7 @@
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, 890);
this.panel1.Size = new System.Drawing.Size(487, 905);
this.panel1.TabIndex = 0;
//
// btnCancelAutoBuy
@@ -1173,7 +1174,7 @@
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, 685);
this.pnlMap.Location = new System.Drawing.Point(12, 700);
this.pnlMap.Name = "pnlMap";
this.pnlMap.Size = new System.Drawing.Size(468, 203);
this.pnlMap.TabIndex = 871;