diff --git a/AllBase/AllBase.csproj b/AllBase/AllBase.csproj index bed7b0e..ed9fa38 100644 --- a/AllBase/AllBase.csproj +++ b/AllBase/AllBase.csproj @@ -194,6 +194,7 @@ + @@ -246,10 +247,6 @@ - - - - diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs index c3280a5..e919ec3 100644 --- a/AllBase/BaseClass.cs +++ b/AllBase/BaseClass.cs @@ -27,7 +27,7 @@ namespace AllBase /// /// 版本ID /// - public static int VersionCount = 799; + public static int VersionCount = 801; //public static int VersionCount = 613; /// diff --git a/AllBase/Model/Result/DouGoodsCollectInfo.cs b/AllBase/Model/Result/DouGoodsCollectInfo.cs deleted file mode 100644 index 682ae25..0000000 --- a/AllBase/Model/Result/DouGoodsCollectInfo.cs +++ /dev/null @@ -1,80 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AllBase.Model.Result -{ - /// - /// 抖音搜索获取到的简单商品对象类 - /// - public class DouGoodsCollectInfo - { - /// - /// 商品ID spid - /// - public string Id; - /// - /// 商品名称 goodsName - /// - public string GoodsName; - /// - /// 平台 - /// - public string pt; - /// - /// 价格 jg - /// - public string Price; - /// - /// 销量 xl - /// - public string Sales; - /// - /// 佣金 yj - /// - public string yj; - /// - /// 佣金率 yjl - /// - public string yjl; - public string img; - /// - /// 类目 lm - /// - public string lm; - /// - /// 类目id lmid - /// - public string lmid; - /// - /// 关键词 gjz - /// - public string Keyword; - /// - /// 评论数 pl - /// - public int CommentsCount; - /// - /// 店铺ID dpid - /// - public string ShopId; - /// - /// 店铺名称 dpmc - /// - public string ShopName; - /// - /// 商品总数 spzs - /// - public int ShopProductCount; - /// - /// 好评率 hpl - /// - public double CommentsRate; - /// - /// 体验分数 - /// - public double Score; - } -} \ No newline at end of file diff --git a/AllBase/Model/Result/DouProductListInfo.cs b/AllBase/Model/Result/DouProductListInfo.cs deleted file mode 100644 index 847eeaa..0000000 --- a/AllBase/Model/Result/DouProductListInfo.cs +++ /dev/null @@ -1,112 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AllBase.Model.Result -{ - /// - /// 抖音店铺后台获取到的商品对象类 - /// - public class DouProductListInfo - { - public long product_id { get; set; } - - public string name { get; set; } - - public int status { get; set; } - - /// - /// 指定审核状态返回商品列表:1未提审 2审核中 3审核通过 4审核驳回 5封禁 7审核通过,待上架状态 - /// - public int check_status { get; set; } - - public decimal discount_price { get; set; } - - public string img { get; set; } - - public decimal cos_ratio { get; set; } - - public long create_time { get; set; } - - public long update_time { get; set; } - - public CategoryDetail category_detail { get; set; } - - public string description { get; set; } - - public string extra { get; set; } - - public bool is_package_product { get; set; } - - public decimal market_price { get; set; } - - public string mobile { get; set; } - - public long out_product_id { get; set; } - - public int pay_type { get; set; } - - public int product_type { get; set; } - - public string recommend_remark { get; set; } - - public long spec_id { get; set; } - } - - public class CategoryDetail - { - public long first_cid { get; set; } - - public string first_cname { get; set; } - - public long fourth_cid { get; set; } - - public string fourth_cname { get; set; } - - public long second_cid { get; set; } - - public string second_cname { get; set; } - - public long third_cid { get; set; } - - public string third_cname { get; set; } - } - - public class DouProductWithSalesListInfo : DouProductListInfo - { - /// - /// 总销量 - /// - public int? sell_num { get; set; } - /// - /// 总库存 - /// - public int? stock_num { get; set; } - /// - /// 创建时间文本 - /// - public string create_time_str { get; set; } - /// - /// 订单数(7天 一个月) - /// - public int? order_count { get; set; } - /// - /// 曝光次数 - /// - public int? show_count { get; set; } - /// - /// 曝光人数 - /// - public int? show_people_count { get; set; } - /// - /// 点击次数 - /// - public int? click_count { get; set; } - /// - /// 点击人数 - /// - public int? click_people_count { get; set; } - } -} diff --git a/AllBase/Model/Result/DouProductPromotionListInfo.cs b/AllBase/Model/Result/DouProductPromotionListInfo.cs deleted file mode 100644 index cc9303f..0000000 --- a/AllBase/Model/Result/DouProductPromotionListInfo.cs +++ /dev/null @@ -1,89 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AllBase.Model.Result -{ - public class DouProductPromotionListInfo - { - public string product_id; - public string name; - public string img; - public int category_id; - public int first_cid; - public int second_cid; - public int third_cid; - public int fourth_cid; - public string good_comment_rate; - public string first_category; - public string second_category; - public string third_category; - public string fourth_category; - public int sold_times; - public bool allow; - public int stock_num; - public int max_price; - public int min_price; - public int in_campaign; - public List promotions; - public string reject_msg; - public int reject_type; - public object reject_detail; - public bool is_combined; - public int max_promotion_price; - public int min_promotion_price; - public string stype; - public int? sell_num; - } - - public class DouProductProPromotionListSkuInfo - { - public string id { get; set; } - /// - /// 价格,单位分 - /// - public int origin_price { get; set; } - /// - /// 库存 - /// - public int stock { get; set; } - /// - /// sku规格名称 - /// - public string specification { get; set; } - /// - /// sku图片 - /// - public string img { get; set; } - /// - /// spec1 id - /// - public long spec_detail_id1 { get; set; } - /// - /// spec2 id - /// - public long spec_detail_id2 { get; set; } - /// - /// spec3 id - /// - public long spec_detail_id3 { get; set; } - /// - /// 划线价 - /// - public int redline_price { get; set; } - /// - /// 优惠价 - /// - public string SetPrice { get; set; } - /// - /// 活动库存 - /// - public int ActiceStock { get; set; } - /// - /// 每人限购 - /// - public int LimitedNum { get; set; } - } -} diff --git a/AllBase/Model/Result/DouProductTradeIndexListInfo.cs b/AllBase/Model/Result/DouProductTradeIndexListInfo.cs deleted file mode 100644 index 3ee95c1..0000000 --- a/AllBase/Model/Result/DouProductTradeIndexListInfo.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace AllBase.Model.Result -{ - /// - /// 抖店商品交易指标 - /// - public class DouTradeIndexListInfo - { - public bool can_operation { get; set; } - /// - /// 商品点击次数 - /// - public string dh_product_click_pv { get; set; } - /// - /// 商品点击人数 - /// - public string dh_product_click_uv { get; set; } - /// - /// 商品曝光次数 - /// - public string dh_product_show_pv { get; set; } - /// - /// 商品曝光人数 - /// - public string dh_product_show_uv { get; set; } - /// - /// 成交订单数 - /// - public string pay_cnt { get; set; } - public ProductTradeIndex product { get; set; } - public List talent { get; set; } - public string product_id { get { return product?.serial_number; } } - } - - public class ProductTradeIndex - { - public string cover_image { get; set; } - public string serial_number { get; set; } - public string title { get; set; } - } -} diff --git a/AllBase/Model/Result/JSTListProductInfo.cs b/AllBase/Model/Result/JSTListProductInfo.cs new file mode 100644 index 0000000..11d25b8 --- /dev/null +++ b/AllBase/Model/Result/JSTListProductInfo.cs @@ -0,0 +1,119 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AllBase.Model.Result +{ + public class JSTListProductInfo + { + public string spuId { get; set; } // "38A11B454F26441AA605E00BF74358A2", + public string id { get; set; } // "38A11B454F26441AA605E00BF74358A2", + public decimal? supplyPrice { get; set; } // 0.26 + public decimal? maxSupplyPrice { get; set; } // 5.95 + public List itemMainImage { get; set; } // [ "https://images.sursung.com/prod/pt/10361546/20240402/4CC48A2E804B484EB1D3606346E2D22B_s92273_h800_w800.jpg", ... ], + public string itemName { get; set; } // "滚筒波轮全自动洗衣机排水管洗脸洗手盆下水软管出水管加长延长管", + public string styleCode { get; set; } // "590410612913-1", + public decimal? minSalesPrice { get; set; } // 3.59, + public decimal? minSupplyPrice { get; set; } // null, + public int? salesVolume { get; set; } // 179199, + public string salesVolumeDesensitized { get; set; } // "17万+", + public bool? privateStatus { get; set; } // false, + public string brandId { get; set; } // "0", + public string brandName { get; set; } // "无品牌", + public string coId { get; set; } // "14202245", + public string supplierId { get; set; } // "93D12D2BD21649DC8240E2265BE37E2A", + public string supplierName { get; set; } // "义乌市喜博电子商务有限公司", + public string offlineSupplierId { get; set; } // "", + public string offlineSupplierName { get; set; } // "义乌市昀晗供应链管理有限公司", + public object babyLink { get; set; } // null, + public object distributorPrice { get; set; } // null, + public long? sorted { get; set; } // 0, + public bool? isTop { get; set; } // false, + public object drpPriceEnum { get; set; } // null, + public bool? firstTop { get; set; } // false, + public bool? lastTop { get; set; } // false, + public bool? drpSpuAdded { get; set; } // false, + public int? visitQty { get; set; } // 8, + public int? favoriteQty { get; set; } // 0, + public bool? distributorStatus { get; set; } // true, + public string distributorCoId { get; set; } // "10361546", + public int? shelvesQty { get; set; } // 10, + public string updated { get; set; } // "2025-12-10 23:27:47", + public string userName { get; set; } // "义乌市喜博电子商务有限公司", + public string created { get; set; } // "2025-04-12 00:11:38", + public string categoryName { get; set; } // "下水软管/排水软管", + public int? saleYesterday { get; set; } // 4, + public int? supplierSaleYesterday { get; set; } // 6299, + public int? saleThree { get; set; } // 15, + public int? saleSeven { get; set; } // 45, + public int? saleFifteen { get; set; } // 100, + public int? saleThirty { get; set; } // 137, + public int? supplierSaleThirty { get; set; } // 179199, + public int? supplierSaleSeven { get; set; } // 42787, + public object cloudDiskFolderId { get; set; } // "", + public bool? allowDownload { get; set; } // false, + public object newDays { get; set; } // null, + public bool? todayPromoted { get; set; } // false, + public string promoteDate { get; set; } // "2025-04-12", + public object videoUrl { get; set; } // null, + public object videoCoverUrl { get; set; } // null, + public object recommend { get; set; } // null, + public object freshmanLabels { get; set; } // null, + public object fastOrder { get; set; } // null, + public bool? deleted { get; set; } // false, + public object makePublicForPartner { get; set; } // null, + public decimal? saleSevenRiseRate { get; set; } // 0.012, + public object categoryLv1Id { get; set; } // null, + public object categoryLv2Id { get; set; } // null, + public object categoryLv3Id { get; set; } // null, + public object mainCategoryName { get; set; } // null, + public object secondCategoryName { get; set; } // null, + public bool? spuHaveVideo { get; set; } // false, + public object brandAuditStatus { get; set; } // null, + public bool? isPartner { get; set; } // true, + public object platformTypes { get; set; } // null, + public object favoritesId { get; set; } // null, + public List spuShelvesShopList { get; set; } // [ ], + public object itemShelvesShopList { get; set; } // null, + public bool? manualQueryPrice { get; set; } // true, + public object dealPriceNinetyMax { get; set; } // null, + public object distributorItemStatus { get; set; } // null, + public object erpCategoryNameList { get; set; } // null, + public object syncTime { get; set; } // null, + public string itemSource { get; set; } // "FROM_SUP", + public object shopName { get; set; } // null, + public object shopType { get; set; } // null, + public object brandNameList { get; set; } // null, + public object description { get; set; } // null, + public object havePurchasePriceRiseSku { get; set; } // null, + public object havePurchasePriceReduceSku { get; set; } // null, + public object afterSaleRateThirtyDay { get; set; } // null, + public string regulatePriceIntercept { get; set; } // "UN_INTERCEPT", + public bool? skuHaveRegulatePrice { get; set; } // false, + public List limitShelvesPlatformList { get; set; } // [ ], + public List limitShelvesPlatformListV2 { get; set; } // [ ], + public object supSentGmv7d { get; set; } // null, + public object sentCntIncrAvg7dRatio { get; set; } // null, + public int? specNum { get; set; } // 2, + public object partnerSpuId { get; set; } // null, + public object freshmanHaveVideo { get; set; } // null, + public int? buyLimitNum { get; set; } // 1, + public bool? ifDefaultBuyLimit { get; set; } // true, + public List preSalePlatformList { get; set; } // [ ], + public string itemCoId { get; set; } // "14202245", + public string itemSpuId { get; set; } // "38A11B454F26441AA605E00BF74358A2", + public bool? partner { get; set; } // true, + public string saleSevenDesensitized { get; set; } // "40+", + public string saleThirtyDesensitized { get; set; } // "100+", + public string supplierSaleThirtyDesensitized { get; set; } // "17万+", + public string supplierSaleSevenDesensitized { get; set; } // "4.2万+", + public string saleYesterdayDesensitized { get; set; } // "4", + public string supplierSaleYesterdayDesensitized { get; set; } // "6000+" + + public KJDDBProduct dbProduct { get; set; } + public string jstProductJson { get; set; } + public string getProductMsg { get; set; } + } +} diff --git a/AllBase/Model/Result/KJDDBProduct.cs b/AllBase/Model/Result/KJDDBProduct.cs index 259af77..f4698c0 100644 --- a/AllBase/Model/Result/KJDDBProduct.cs +++ b/AllBase/Model/Result/KJDDBProduct.cs @@ -13,6 +13,9 @@ namespace AllBase.Model.Result { public int id { get; set; } public string from_shop_id { get; set; } + public string from_shop_name { get; set; } + public string offline_supplier_id { get; set; } + public string offline_supplier_name { get; set; } public string spu_id { get; set; } public string skc_id { get; set; } public string main_cat_id { get; set; } diff --git a/TEMUKJD/BLL/JSTHttpResponseBLL.cs b/TEMUKJD/BLL/JSTHttpResponseBLL.cs index 014286a..0347a7f 100644 --- a/TEMUKJD/BLL/JSTHttpResponseBLL.cs +++ b/TEMUKJD/BLL/JSTHttpResponseBLL.cs @@ -13,7 +13,7 @@ namespace TemuKJD.BLL { public class JSTHttpResponseBLL { - public static string WeiXinPostResponse(ShopLoginInfo shop, string _url, string _data, string referer) + public static string JSTPostResponse(ShopLoginInfo shop, string _url, string _data, string referer, string appVersion = null) { string cookies = ""; string Authorization = ""; @@ -48,18 +48,25 @@ namespace TemuKJD.BLL request.Headers.Add("sec-ch-ua-platform", @"""Windows"""); request.Headers.Set(HttpRequestHeader.Authorization, Authorization); //"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiIyMDgxMjU3OCIsInJvbGVJZHMiOltdLCJ1c2VyX25hbWUiOiIxODEzMzYzMjE0NSIsImNvSWQiOiIxNDc5MTQ3NyIsImV4cGlyYXRpb24iOjE3NzAwMDE4ODcwOTgsInVzZXIiOnsiY29JZCI6IjE0NzkxNDc3IiwiY29OYW1lIjoi6YOR5bee6ICA6Ziz572R57uc5pyJ6ZmQ5YWs5Y-4IiwibG9naW5OYW1lIjoiMTgxMzM2MzIxNDUiLCJsb2dpbldheSI6IlVTRVJOQU1FIiwibmlja05hbWUiOiLogIHpqawiLCJyb2xlSWRzIjoiMTEsMTIsMTMsMTQsMTUsMTYsMTcsMTgsMjIsMjMsMjcsMjgsMjksMzAsMzEsMzIsMzMsMzQsMzUsMzYsMzksNDAsNDEsNTIsNTMsNTQsNjEsNjIsNjMsNjQsNjUsNjYsNzAsNzEsNzIsNzMsNzYsOTAsMTAxLDEwMiwxMDMsMTA0LDEwNSwxMDYsMTA3LDEwOCwxMDkiLCJ1aWQiOiIyMDgxMjU3OCJ9LCJhdXRob3JpdGllcyI6WyJKU1QtY2hhbm5lbCIsIm11bHRpTG9naW4iLCJKU1Qtc3VwcGxpZXIiXSwiY2xpZW50X2lkIjoicGMiLCJqdGkiOiJlNGFhYjhiMi01MGM3LTQ2OGQtODQ2Zi03YWM1MzFkYjdkM2UiLCJleHAiOjE3NzAwMDE4ODd9.t-OXhlZVX-zXf0SLbavN7NS6LxOPQi5js2g1ArLzOT8"); request.Headers.Add("gwfp", gwfp); //@"20b34e80784f89c9ab8ebb9344fbc253"); - request.Headers.Add("sec-ch-ua", @"""Google Chrome"";v=""143"", ""Chromium"";v=""143"", ""Not A(Brand"";v=""24"""); + request.Headers.Add("sec-ch-ua", @"""Not)A;Brand"";v=""8"", ""Chromium"";v=""138"""); request.Headers.Add("sec-ch-ua-mobile", @"?0"); - request.Headers.Add("App-Version", @"DLZ_20260122203449"); - request.Headers.Add("Source", @"CHANNEL"); - request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"; - request.Headers.Add("appCode", @"pinpai.scm121.com"); - request.Accept = "*/*"; + if (appVersion.IsNullOrEmpty()) + appVersion = @"SUPPLIER_20260123202519"; + //request.Headers.Add("App-Version", @"DLZ_20260122203449"); + //request.Headers.Add("Source", @"CHANNEL"); + request.Headers.Add("App-Version", appVersion); + request.Headers.Add("Source", @"SUPPLIER"); + request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.5.40.8 Safari/537.36 PddWorkbench-Online PddBrowser pdd_windows_version/3.0.3.12"; + request.Accept = "application/json"; + request.ContentType = "application/json;charset=UTF-8"; + request.Headers.Add("appCode", @"sc.scm121.com"); + request.Headers.Add("Origin", @"https://sc.scm121.com"); request.Headers.Add("Sec-Fetch-Site", @"same-origin"); request.Headers.Add("Sec-Fetch-Mode", @"cors"); request.Headers.Add("Sec-Fetch-Dest", @"empty"); request.Referer = referer; - request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate, br, zstd"); + //request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate, br, zstd"); + request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate"); request.Headers.Set(HttpRequestHeader.AcceptLanguage, "zh-CN,zh;q=0.9"); request.Method = "POST"; @@ -92,5 +99,78 @@ namespace TemuKJD.BLL result = GetProxyHtml.ReadResponse(response); return result; } + + public static string JSTGetResponse(ShopLoginInfo shop, string _url, string referer, string appVersion = null) + { + string cookies = ""; + string Authorization = ""; + string gwfpArr = "0123456789abcdef"; + string gwfp = ""; + for (int i = 0; i < 32; i++) + { + gwfp += gwfpArr[Randomx.GetId(gwfpArr.Length)]; + } + try + { + var cookieLst = JsonHelper.DeserializeJsonToList(shop?.Cookies.ParseToString()); + if (cookieLst == null) + cookieLst = new List(); + foreach (var cook in cookieLst) + { + cookies += cook.Name + "=" + cook.Value + ";"; + if (cook.Name == "DISTRYBUTION_TOKEN") + Authorization = cook.Value; + } + } + catch { } + + HttpWebResponse response = null; + string result; + try + { + string url = _url; + HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); + + request.KeepAlive = true; + request.Headers.Add("sec-ch-ua-platform", @"""Windows"""); + request.Headers.Set(HttpRequestHeader.Authorization, Authorization); //"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiIyMDgxMjU3OCIsInJvbGVJZHMiOltdLCJ1c2VyX25hbWUiOiIxODEzMzYzMjE0NSIsImNvSWQiOiIxNDc5MTQ3NyIsImV4cGlyYXRpb24iOjE3NzAwMDE4ODcwOTgsInVzZXIiOnsiY29JZCI6IjE0NzkxNDc3IiwiY29OYW1lIjoi6YOR5bee6ICA6Ziz572R57uc5pyJ6ZmQ5YWs5Y-4IiwibG9naW5OYW1lIjoiMTgxMzM2MzIxNDUiLCJsb2dpbldheSI6IlVTRVJOQU1FIiwibmlja05hbWUiOiLogIHpqawiLCJyb2xlSWRzIjoiMTEsMTIsMTMsMTQsMTUsMTYsMTcsMTgsMjIsMjMsMjcsMjgsMjksMzAsMzEsMzIsMzMsMzQsMzUsMzYsMzksNDAsNDEsNTIsNTMsNTQsNjEsNjIsNjMsNjQsNjUsNjYsNzAsNzEsNzIsNzMsNzYsOTAsMTAxLDEwMiwxMDMsMTA0LDEwNSwxMDYsMTA3LDEwOCwxMDkiLCJ1aWQiOiIyMDgxMjU3OCJ9LCJhdXRob3JpdGllcyI6WyJKU1QtY2hhbm5lbCIsIm11bHRpTG9naW4iLCJKU1Qtc3VwcGxpZXIiXSwiY2xpZW50X2lkIjoicGMiLCJqdGkiOiJlNGFhYjhiMi01MGM3LTQ2OGQtODQ2Zi03YWM1MzFkYjdkM2UiLCJleHAiOjE3NzAwMDE4ODd9.t-OXhlZVX-zXf0SLbavN7NS6LxOPQi5js2g1ArLzOT8"); + request.Headers.Add("gwfp", gwfp); //@"20b34e80784f89c9ab8ebb9344fbc253"); + request.Headers.Add("sec-ch-ua", @"""Not)A;Brand"";v=""8"", ""Chromium"";v=""138"""); + request.Headers.Add("sec-ch-ua-mobile", @"?0"); + if (appVersion.IsNullOrEmpty()) + appVersion = @"SUPPLIER_20260123202519"; + request.Headers.Add("App-Version", appVersion); + request.Headers.Add("Source", @"SUPPLIER"); + request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.5.40.8 Safari/537.36 PddWorkbench-Online PddBrowser pdd_windows_version/3.0.3.12"; + request.Headers.Add("appCode", @"sc.scm121.com"); + request.Accept = "*/*"; + request.Headers.Add("Sec-Fetch-Site", @"same-origin"); + request.Headers.Add("Sec-Fetch-Mode", @"cors"); + request.Headers.Add("Sec-Fetch-Dest", @"empty"); + request.Referer = referer; + //request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate, br, zstd"); + request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate"); + request.Headers.Set(HttpRequestHeader.AcceptLanguage, "zh-CN,zh;q=0.9"); + + response = (HttpWebResponse)request.GetResponse(); + } + catch (WebException ex) + { + if (ex.Status == WebExceptionStatus.ProtocolError) + { + response = (HttpWebResponse)ex.Response; + result = GetProxyHtml.ReadResponse(response); + return result; + } + else return ex.Message; + } + catch (Exception e) + { + if (response != null) response.Close(); + return e.Message; + } + result = GetProxyHtml.ReadResponse(response); + return result; + } } } diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs index 609a287..47158a1 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs @@ -27,9 +27,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms { public partial class PDDDBProdListForm : BaseGeneralForm { - ShopLoginInfo shop = null; + ShopLoginInfo shop = null; - List lstTemuDbProduct = new List(); + ConcurrentList lstTemuDbProduct = new ConcurrentList(); ConcurrentList lstTitleReplaceText = new ConcurrentList(); public PDDDBProdListForm() diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDGetChanceProdForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDGetChanceProdForm.cs index e11c6b8..dd7b87d 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDGetChanceProdForm.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDGetChanceProdForm.cs @@ -857,12 +857,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms html = GetHtml.PostUtf8(existUrl, existData); if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) html = GetHtml.PostUtf8(existUrl, existData); - if (!string.IsNullOrEmpty(html) && html.Contains("\"code\":200")) - { - if (html.Contains("\"data\":[") && !html.Contains("\"data\":[]")) - isExist = true; - } - else + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) { Invoke(new Action(() => { @@ -870,6 +865,11 @@ namespace TemuKJD.PDDForms.ProductSelectForms })); continue; } + else + { + if (html.Contains("\"data\":[") && !html.Contains("\"data\":[]")) + isExist = true; + } var url = BaseClass.BuildObjString("product/add_product"); if (isExist) diff --git a/TEMUKJD/ToolForms/GetJuShuitanProdForm.Designer.cs b/TEMUKJD/ToolForms/GetJuShuitanProdForm.Designer.cs index 47eb54d..56b8a34 100644 --- a/TEMUKJD/ToolForms/GetJuShuitanProdForm.Designer.cs +++ b/TEMUKJD/ToolForms/GetJuShuitanProdForm.Designer.cs @@ -29,28 +29,67 @@ namespace TemuKJD.ToolForms /// private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.btnNext = new System.Windows.Forms.Button(); this.btnPrev = new System.Windows.Forms.Button(); this.txtAddress = new System.Windows.Forms.TextBox(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.pbLoading = new System.Windows.Forms.PictureBox(); + this.dgvProduct = new TemuKJD.UserComponent.DataGridViewEx(); + this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colProductId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colImgUrl = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colImg = new System.Windows.Forms.DataGridViewImageColumn(); + this.colGoodsName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colHotValue = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSales30 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colCate = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colPrice = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colDel = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.pnlMultiLogin = new System.Windows.Forms.Panel(); this.cmbMultiCookieName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.btnMultiLogin = new DevComponents.DotNetBar.PanelEx(); this.btnDel = new DevComponents.DotNetBar.PanelEx(); + this.chkSkip = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.chkOverride = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.label1 = new System.Windows.Forms.Label(); + this.cmbPlatformType = new System.Windows.Forms.ComboBox(); + this.cmbSaleCount = new System.Windows.Forms.ComboBox(); + this.btnStopStop = new DevComponents.DotNetBar.PanelEx(); + this.btnSaveDb = new DevComponents.DotNetBar.PanelEx(); + this.btnGetDetail = new DevComponents.DotNetBar.PanelEx(); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); + this.label4 = new System.Windows.Forms.Label(); + this.txtPageEnd = new System.Windows.Forms.TextBox(); + this.txtPageStart = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.btnCollect = new DevComponents.DotNetBar.PanelEx(); + this.line1 = new DevComponents.DotNetBar.Controls.Line(); + this.txtSupplierName = new System.Windows.Forms.TextBox(); + this.txtFilterSaleCount = new System.Windows.Forms.TextBox(); this.btnRefreshCookie = new DevComponents.DotNetBar.PanelEx(); this.txtCookie = new System.Windows.Forms.TextBox(); this.btnSaveCookie = new DevComponents.DotNetBar.PanelEx(); this.btnImportCookie = new DevComponents.DotNetBar.PanelEx(); - this.tabPage2 = new System.Windows.Forms.TabPage(); + this.label2 = new System.Windows.Forms.Label(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); this.splitContainer2.Panel1.SuspendLayout(); - this.splitContainer2.Panel2.SuspendLayout(); this.splitContainer2.SuspendLayout(); + this.tabPage2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -63,21 +102,24 @@ namespace TemuKJD.ToolForms this.tabControl1.Controls.Add(this.tabPage1); this.tabControl1.Controls.Add(this.tabPage2); this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControl1.ItemSize = new System.Drawing.Size(80, 24); this.tabControl1.Location = new System.Drawing.Point(0, 0); + this.tabControl1.Multiline = true; this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(1109, 558); + this.tabControl1.Size = new System.Drawing.Size(1904, 469); this.tabControl1.TabIndex = 0; // // tabPage1 // + this.tabPage1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.tabPage1.Controls.Add(this.splitContainer2); - this.tabPage1.Location = new System.Drawing.Point(4, 26); + this.tabPage1.Location = new System.Drawing.Point(4, 28); this.tabPage1.Name = "tabPage1"; this.tabPage1.Padding = new System.Windows.Forms.Padding(3); - this.tabPage1.Size = new System.Drawing.Size(1101, 528); + this.tabPage1.Size = new System.Drawing.Size(1896, 437); this.tabPage1.TabIndex = 0; - this.tabPage1.Text = "商品页面"; + this.tabPage1.Text = " 商品页面 "; this.tabPage1.UseVisualStyleBackColor = true; // // splitContainer2 @@ -94,41 +136,192 @@ namespace TemuKJD.ToolForms this.splitContainer2.Panel1.Controls.Add(this.btnNext); this.splitContainer2.Panel1.Controls.Add(this.btnPrev); this.splitContainer2.Panel1.Controls.Add(this.txtAddress); - // - // splitContainer2.Panel2 - // - this.splitContainer2.Panel2.Controls.Add(this.splitContainer1); - this.splitContainer2.Size = new System.Drawing.Size(1095, 522); + this.splitContainer2.Size = new System.Drawing.Size(1888, 429); this.splitContainer2.SplitterDistance = 26; this.splitContainer2.TabIndex = 6; // // btnNext // - this.btnNext.Location = new System.Drawing.Point(35, 3); + this.btnNext.Location = new System.Drawing.Point(31, 3); this.btnNext.Name = "btnNext"; this.btnNext.Size = new System.Drawing.Size(32, 23); this.btnNext.TabIndex = 9; this.btnNext.Text = "→"; this.btnNext.UseVisualStyleBackColor = true; + this.btnNext.Click += new System.EventHandler(this.btnNext_Click); // // btnPrev // - this.btnPrev.Location = new System.Drawing.Point(3, 3); + this.btnPrev.Location = new System.Drawing.Point(-1, 3); this.btnPrev.Name = "btnPrev"; this.btnPrev.Size = new System.Drawing.Size(32, 23); this.btnPrev.TabIndex = 8; this.btnPrev.Text = "←"; this.btnPrev.UseVisualStyleBackColor = true; + this.btnPrev.Click += new System.EventHandler(this.btnPrev_Click); // // txtAddress // this.txtAddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtAddress.Location = new System.Drawing.Point(68, 3); + this.txtAddress.Location = new System.Drawing.Point(64, 3); this.txtAddress.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.txtAddress.Name = "txtAddress"; - this.txtAddress.Size = new System.Drawing.Size(1024, 23); + this.txtAddress.Size = new System.Drawing.Size(1824, 23); this.txtAddress.TabIndex = 7; + this.txtAddress.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtAddress_KeyDown); + // + // tabPage2 + // + this.tabPage2.Controls.Add(this.pbLoading); + this.tabPage2.Controls.Add(this.dgvProduct); + this.tabPage2.Location = new System.Drawing.Point(4, 28); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(1896, 437); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = " 商品列表 "; + this.tabPage2.UseVisualStyleBackColor = true; + // + // pbLoading + // + this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None; + this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; + this.pbLoading.Location = new System.Drawing.Point(923, 196); + this.pbLoading.Name = "pbLoading"; + this.pbLoading.Size = new System.Drawing.Size(50, 50); + this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbLoading.TabIndex = 8; + this.pbLoading.TabStop = false; + this.pbLoading.Visible = false; + // + // dgvProduct + // + this.dgvProduct.AllowUserToAddRows = false; + this.dgvProduct.AllowUserToDeleteRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.dgvProduct.AutoRowNumber = true; + this.dgvProduct.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dgvProduct.BackgroundColor = System.Drawing.Color.White; + this.dgvProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.dgvProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.colCheck, + this.colProductId, + this.colImgUrl, + this.colImg, + this.colGoodsName, + this.colHotValue, + this.colSales30, + this.colCate, + this.colPrice, + this.colDel, + this.colMsg}); + this.dgvProduct.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvProduct.Location = new System.Drawing.Point(3, 3); + this.dgvProduct.Name = "dgvProduct"; + this.dgvProduct.ReadOnly = true; + this.dgvProduct.RowTemplate.Height = 23; + this.dgvProduct.Size = new System.Drawing.Size(1890, 431); + this.dgvProduct.TabIndex = 7; + this.dgvProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvProduct_CellContentClick); + // + // colCheck + // + this.colCheck.FillWeight = 26F; + this.colCheck.HeaderText = "选"; + this.colCheck.Name = "colCheck"; + this.colCheck.ReadOnly = true; + this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colCheck.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // colProductId + // + this.colProductId.FillWeight = 50F; + this.colProductId.HeaderText = "商品Id"; + this.colProductId.Name = "colProductId"; + this.colProductId.ReadOnly = true; + // + // colImgUrl + // + this.colImgUrl.FillWeight = 300F; + this.colImgUrl.HeaderText = "图片路径"; + this.colImgUrl.Name = "colImgUrl"; + this.colImgUrl.ReadOnly = true; + this.colImgUrl.Visible = false; + // + // colImg + // + this.colImg.FillWeight = 40F; + this.colImg.HeaderText = "图片"; + this.colImg.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom; + this.colImg.Name = "colImg"; + this.colImg.ReadOnly = true; + this.colImg.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colImg.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // colGoodsName + // + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colGoodsName.DefaultCellStyle = dataGridViewCellStyle3; + this.colGoodsName.FillWeight = 120F; + this.colGoodsName.HeaderText = "商品名称"; + this.colGoodsName.Name = "colGoodsName"; + this.colGoodsName.ReadOnly = true; + // + // colHotValue + // + this.colHotValue.FillWeight = 60F; + this.colHotValue.HeaderText = "7日销量"; + this.colHotValue.Name = "colHotValue"; + this.colHotValue.ReadOnly = true; + // + // colSales30 + // + this.colSales30.FillWeight = 60F; + this.colSales30.HeaderText = "30日销量"; + this.colSales30.Name = "colSales30"; + this.colSales30.ReadOnly = true; + // + // colCate + // + this.colCate.HeaderText = "类目"; + this.colCate.Name = "colCate"; + this.colCate.ReadOnly = true; + // + // colPrice + // + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colPrice.DefaultCellStyle = dataGridViewCellStyle4; + this.colPrice.FillWeight = 70F; + this.colPrice.HeaderText = "价格"; + this.colPrice.Name = "colPrice"; + this.colPrice.ReadOnly = true; + // + // colDel + // + this.colDel.FillWeight = 35F; + this.colDel.HeaderText = "删除"; + this.colDel.Name = "colDel"; + this.colDel.ReadOnly = true; + // + // colMsg + // + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colMsg.DefaultCellStyle = dataGridViewCellStyle5; + this.colMsg.FillWeight = 200F; + this.colMsg.HeaderText = "操作结果"; + this.colMsg.Name = "colMsg"; + this.colMsg.ReadOnly = true; // // splitContainer1 // @@ -143,16 +336,35 @@ namespace TemuKJD.ToolForms // splitContainer1.Panel1 // this.splitContainer1.Panel1.Controls.Add(this.pnlMultiLogin); + this.splitContainer1.Panel1.Controls.Add(this.tabControl1); // // splitContainer1.Panel2 // this.splitContainer1.Panel2.BackColor = System.Drawing.Color.White; + this.splitContainer1.Panel2.Controls.Add(this.chkSkip); + this.splitContainer1.Panel2.Controls.Add(this.chkOverride); + this.splitContainer1.Panel2.Controls.Add(this.label1); + this.splitContainer1.Panel2.Controls.Add(this.cmbPlatformType); + this.splitContainer1.Panel2.Controls.Add(this.cmbSaleCount); + this.splitContainer1.Panel2.Controls.Add(this.btnStopStop); + this.splitContainer1.Panel2.Controls.Add(this.btnSaveDb); + this.splitContainer1.Panel2.Controls.Add(this.btnGetDetail); + this.splitContainer1.Panel2.Controls.Add(this.statusBar); + this.splitContainer1.Panel2.Controls.Add(this.label4); + this.splitContainer1.Panel2.Controls.Add(this.txtPageEnd); + this.splitContainer1.Panel2.Controls.Add(this.txtPageStart); + this.splitContainer1.Panel2.Controls.Add(this.label3); + this.splitContainer1.Panel2.Controls.Add(this.btnCollect); + this.splitContainer1.Panel2.Controls.Add(this.line1); + this.splitContainer1.Panel2.Controls.Add(this.txtSupplierName); + this.splitContainer1.Panel2.Controls.Add(this.txtFilterSaleCount); this.splitContainer1.Panel2.Controls.Add(this.btnRefreshCookie); this.splitContainer1.Panel2.Controls.Add(this.txtCookie); this.splitContainer1.Panel2.Controls.Add(this.btnSaveCookie); this.splitContainer1.Panel2.Controls.Add(this.btnImportCookie); - this.splitContainer1.Size = new System.Drawing.Size(1095, 492); - this.splitContainer1.SplitterDistance = 400; + this.splitContainer1.Panel2.Controls.Add(this.label2); + this.splitContainer1.Size = new System.Drawing.Size(1904, 561); + this.splitContainer1.SplitterDistance = 469; this.splitContainer1.SplitterWidth = 3; this.splitContainer1.TabIndex = 4; // @@ -228,6 +440,252 @@ namespace TemuKJD.ToolForms this.btnDel.TabIndex = 409; this.btnDel.Text = "删"; // + // chkSkip + // + this.chkSkip.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.chkSkip.AutoSize = true; + this.chkSkip.Checked = true; + this.chkSkip.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkSkip.Location = new System.Drawing.Point(1560, 33); + this.chkSkip.Name = "chkSkip"; + this.chkSkip.Size = new System.Drawing.Size(171, 21); + this.chkSkip.TabIndex = 942; + this.chkSkip.Text = "采集时跳过库中已存在商品"; + this.chkSkip.UseVisualStyleBackColor = true; + // + // chkOverride + // + this.chkOverride.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.chkOverride.AutoSize = true; + this.chkOverride.Location = new System.Drawing.Point(1736, 33); + this.chkOverride.Name = "chkOverride"; + this.chkOverride.Size = new System.Drawing.Size(171, 21); + this.chkOverride.TabIndex = 920; + this.chkOverride.Text = "入库时覆盖库中已存在商品"; + this.chkOverride.UseVisualStyleBackColor = true; + // + // label1 + // + this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(817, 8); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(32, 17); + this.label1.TabIndex = 898; + this.label1.Text = "平台"; + // + // cmbPlatformType + // + this.cmbPlatformType.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.cmbPlatformType.FormattingEnabled = true; + this.cmbPlatformType.Items.AddRange(new object[] { + "拼多多", + "抖音", + "淘宝", + "微信"}); + this.cmbPlatformType.Location = new System.Drawing.Point(849, 4); + this.cmbPlatformType.Name = "cmbPlatformType"; + this.cmbPlatformType.Size = new System.Drawing.Size(67, 25); + this.cmbPlatformType.TabIndex = 897; + this.cmbPlatformType.Text = "拼多多"; + this.cmbPlatformType.SelectedIndexChanged += new System.EventHandler(this.cmbPlatformType_SelectedIndexChanged); + // + // cmbSaleCount + // + this.cmbSaleCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.cmbSaleCount.FormattingEnabled = true; + this.cmbSaleCount.Items.AddRange(new object[] { + "7日销量≥", + "30日销量≥"}); + this.cmbSaleCount.Location = new System.Drawing.Point(1120, 4); + this.cmbSaleCount.Name = "cmbSaleCount"; + this.cmbSaleCount.Size = new System.Drawing.Size(76, 25); + this.cmbSaleCount.TabIndex = 875; + this.cmbSaleCount.Text = "7日销量≥"; + this.cmbSaleCount.SelectedIndexChanged += new System.EventHandler(this.cmbSaleCount_SelectedIndexChanged); + this.cmbSaleCount.TextChanged += new System.EventHandler(this.cmbSaleCount_TextChanged); + // + // btnStopStop + // + this.btnStopStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnStopStop.CanvasColor = System.Drawing.SystemColors.Control; + this.btnStopStop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnStopStop.DisabledBackColor = System.Drawing.Color.Empty; + this.btnStopStop.Location = new System.Drawing.Point(1559, 58); + this.btnStopStop.Name = "btnStopStop"; + this.btnStopStop.Size = new System.Drawing.Size(83, 23); + this.btnStopStop.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnStopStop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnStopStop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnStopStop.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnStopStop.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStopStop.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnStopStop.Style.GradientAngle = 90; + this.btnStopStop.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnStopStop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnStopStop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStopStop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStopStop.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnStopStop.TabIndex = 853; + this.btnStopStop.Text = "停止查询"; + this.btnStopStop.Click += new System.EventHandler(this.btnStopStop_Click); + // + // btnSaveDb + // + this.btnSaveDb.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnSaveDb.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnSaveDb.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSaveDb.DisabledBackColor = System.Drawing.Color.Empty; + this.btnSaveDb.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSaveDb.Location = new System.Drawing.Point(1814, 58); + this.btnSaveDb.Name = "btnSaveDb"; + this.btnSaveDb.Size = new System.Drawing.Size(83, 23); + this.btnSaveDb.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnSaveDb.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSaveDb.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSaveDb.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnSaveDb.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnSaveDb.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnSaveDb.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnSaveDb.Style.GradientAngle = 90; + this.btnSaveDb.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnSaveDb.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSaveDb.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSaveDb.TabIndex = 831; + this.btnSaveDb.Text = "详情入库"; + this.btnSaveDb.Click += new System.EventHandler(this.btnSaveDb_Click); + // + // btnGetDetail + // + this.btnGetDetail.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnGetDetail.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnGetDetail.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnGetDetail.DisabledBackColor = System.Drawing.Color.Empty; + this.btnGetDetail.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnGetDetail.Location = new System.Drawing.Point(1729, 58); + this.btnGetDetail.Name = "btnGetDetail"; + this.btnGetDetail.Size = new System.Drawing.Size(83, 23); + this.btnGetDetail.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnGetDetail.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnGetDetail.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnGetDetail.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnGetDetail.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnGetDetail.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnGetDetail.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnGetDetail.Style.GradientAngle = 90; + this.btnGetDetail.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnGetDetail.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnGetDetail.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnGetDetail.TabIndex = 827; + this.btnGetDetail.Text = "采集详情"; + this.btnGetDetail.Click += new System.EventHandler(this.btnGetDetail_Click); + // + // statusBar + // + this.statusBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.statusBar.BackColor = System.Drawing.Color.White; + this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.statusBar.Location = new System.Drawing.Point(817, 60); + this.statusBar.Margin = new System.Windows.Forms.Padding(0); + this.statusBar.Name = "statusBar"; + this.statusBar.Size = new System.Drawing.Size(740, 25); + this.statusBar.TabIndex = 823; + // + // label4 + // + this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(1015, 8); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(44, 17); + this.label4.TabIndex = 810; + this.label4.Text = "结束页"; + // + // txtPageEnd + // + this.txtPageEnd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.txtPageEnd.Location = new System.Drawing.Point(1059, 5); + this.txtPageEnd.Name = "txtPageEnd"; + this.txtPageEnd.Size = new System.Drawing.Size(43, 23); + this.txtPageEnd.TabIndex = 809; + this.txtPageEnd.Text = "9999"; + this.txtPageEnd.TextChanged += new System.EventHandler(this.txtPageEnd_TextChanged); + // + // txtPageStart + // + this.txtPageStart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.txtPageStart.Location = new System.Drawing.Point(966, 5); + this.txtPageStart.Name = "txtPageStart"; + this.txtPageStart.Size = new System.Drawing.Size(43, 23); + this.txtPageStart.TabIndex = 808; + this.txtPageStart.Text = "1"; + this.txtPageStart.TextChanged += new System.EventHandler(this.txtPageStart_TextChanged); + // + // label3 + // + this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(922, 8); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(44, 17); + this.label3.TabIndex = 807; + this.label3.Text = "起始页"; + // + // btnCollect + // + this.btnCollect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnCollect.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnCollect.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnCollect.DisabledBackColor = System.Drawing.Color.Empty; + this.btnCollect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnCollect.Location = new System.Drawing.Point(1644, 58); + this.btnCollect.Name = "btnCollect"; + this.btnCollect.Size = new System.Drawing.Size(83, 23); + this.btnCollect.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnCollect.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnCollect.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnCollect.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnCollect.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnCollect.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnCollect.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnCollect.Style.GradientAngle = 90; + this.btnCollect.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnCollect.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnCollect.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnCollect.TabIndex = 794; + this.btnCollect.Text = "采集列表"; + this.btnCollect.Click += new System.EventHandler(this.btnCollect_Click); + // + // line1 + // + this.line1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.line1.ForeColor = System.Drawing.SystemColors.AppWorkspace; + this.line1.Location = new System.Drawing.Point(796, 7); + this.line1.Name = "line1"; + this.line1.Size = new System.Drawing.Size(25, 74); + this.line1.TabIndex = 790; + this.line1.Text = "line1"; + this.line1.VerticalLine = true; + // + // txtSupplierName + // + this.txtSupplierName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.txtSupplierName.Location = new System.Drawing.Point(1292, 5); + this.txtSupplierName.Name = "txtSupplierName"; + this.txtSupplierName.ReadOnly = true; + this.txtSupplierName.Size = new System.Drawing.Size(605, 23); + this.txtSupplierName.TabIndex = 788; + // + // txtFilterSaleCount + // + this.txtFilterSaleCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.txtFilterSaleCount.Location = new System.Drawing.Point(1199, 5); + this.txtFilterSaleCount.Name = "txtFilterSaleCount"; + this.txtFilterSaleCount.Size = new System.Drawing.Size(43, 23); + this.txtFilterSaleCount.TabIndex = 787; + this.txtFilterSaleCount.Text = "100"; + this.txtFilterSaleCount.TextChanged += new System.EventHandler(this.txtFilterSaleCount_TextChanged); + // // btnRefreshCookie // this.btnRefreshCookie.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -235,7 +693,7 @@ namespace TemuKJD.ToolForms this.btnRefreshCookie.Cursor = System.Windows.Forms.Cursors.Hand; this.btnRefreshCookie.DisabledBackColor = System.Drawing.Color.Empty; this.btnRefreshCookie.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnRefreshCookie.Location = new System.Drawing.Point(970, 3); + this.btnRefreshCookie.Location = new System.Drawing.Point(671, 57); this.btnRefreshCookie.Name = "btnRefreshCookie"; this.btnRefreshCookie.Size = new System.Drawing.Size(125, 25); this.btnRefreshCookie.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -250,19 +708,20 @@ namespace TemuKJD.ToolForms this.btnRefreshCookie.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.btnRefreshCookie.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.btnRefreshCookie.TabIndex = 776; - this.btnRefreshCookie.Text = "刷新cookie"; + this.btnRefreshCookie.Text = "更新网页cookie"; this.btnRefreshCookie.Click += new System.EventHandler(this.btnRefreshCookie_Click); // // txtCookie // this.txtCookie.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtCookie.Location = new System.Drawing.Point(0, 4); + this.txtCookie.Location = new System.Drawing.Point(4, 4); this.txtCookie.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.txtCookie.Multiline = true; this.txtCookie.Name = "txtCookie"; - this.txtCookie.Size = new System.Drawing.Size(711, 104); + this.txtCookie.Size = new System.Drawing.Size(664, 78); this.txtCookie.TabIndex = 766; + this.txtCookie.Text = "填写cookie后点击导入cookie并刷新"; // // btnSaveCookie // @@ -271,7 +730,7 @@ namespace TemuKJD.ToolForms this.btnSaveCookie.Cursor = System.Windows.Forms.Cursors.Hand; this.btnSaveCookie.DisabledBackColor = System.Drawing.Color.Empty; this.btnSaveCookie.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSaveCookie.Location = new System.Drawing.Point(842, 3); + this.btnSaveCookie.Location = new System.Drawing.Point(671, 30); this.btnSaveCookie.Name = "btnSaveCookie"; this.btnSaveCookie.Size = new System.Drawing.Size(125, 25); this.btnSaveCookie.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -296,7 +755,7 @@ namespace TemuKJD.ToolForms this.btnImportCookie.Cursor = System.Windows.Forms.Cursors.Hand; this.btnImportCookie.DisabledBackColor = System.Drawing.Color.Empty; this.btnImportCookie.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnImportCookie.Location = new System.Drawing.Point(714, 3); + this.btnImportCookie.Location = new System.Drawing.Point(671, 3); this.btnImportCookie.Name = "btnImportCookie"; this.btnImportCookie.Size = new System.Drawing.Size(125, 25); this.btnImportCookie.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -314,21 +773,21 @@ namespace TemuKJD.ToolForms this.btnImportCookie.Text = "导入cookie并刷新"; this.btnImportCookie.Click += new System.EventHandler(this.btnImportCookie_Click); // - // tabPage2 + // label2 // - this.tabPage2.Location = new System.Drawing.Point(4, 22); - this.tabPage2.Name = "tabPage2"; - this.tabPage2.Padding = new System.Windows.Forms.Padding(3); - this.tabPage2.Size = new System.Drawing.Size(1101, 532); - this.tabPage2.TabIndex = 1; - this.tabPage2.Text = "商品列表"; - this.tabPage2.UseVisualStyleBackColor = true; + this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(1248, 8); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(44, 17); + this.label2.TabIndex = 789; + this.label2.Text = "供应商"; // // GetJuShuitanProdForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; - this.ClientSize = new System.Drawing.Size(1109, 558); - this.Controls.Add(this.tabControl1); + this.ClientSize = new System.Drawing.Size(1904, 561); + this.Controls.Add(this.splitContainer1); this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Name = "GetJuShuitanProdForm"; this.Text = "获取厂商产品"; @@ -337,9 +796,11 @@ namespace TemuKJD.ToolForms this.tabPage1.ResumeLayout(false); this.splitContainer2.Panel1.ResumeLayout(false); this.splitContainer2.Panel1.PerformLayout(); - this.splitContainer2.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); this.splitContainer2.ResumeLayout(false); + this.tabPage2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).EndInit(); this.splitContainer1.Panel1.ResumeLayout(false); this.splitContainer1.Panel2.ResumeLayout(false); this.splitContainer1.Panel2.PerformLayout(); @@ -368,5 +829,36 @@ namespace TemuKJD.ToolForms private DevComponents.DotNetBar.PanelEx btnSaveCookie; private DevComponents.DotNetBar.PanelEx btnImportCookie; private DevComponents.DotNetBar.PanelEx btnRefreshCookie; + private System.Windows.Forms.TextBox txtFilterSaleCount; + private System.Windows.Forms.TextBox txtSupplierName; + private System.Windows.Forms.Label label2; + private DevComponents.DotNetBar.PanelEx btnCollect; + private DevComponents.DotNetBar.Controls.Line line1; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox txtPageEnd; + private System.Windows.Forms.TextBox txtPageStart; + private System.Windows.Forms.Label label3; + private UserComponent.DataGridViewEx dgvProduct; + private System.Windows.Forms.PictureBox pbLoading; + private DevComponents.DotNetBar.PanelEx btnSaveDb; + private DevComponents.DotNetBar.PanelEx btnGetDetail; + private UserControls.StatusBarUserControl statusBar; + private DevComponents.DotNetBar.PanelEx btnStopStop; + private System.Windows.Forms.ComboBox cmbSaleCount; + private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck; + private System.Windows.Forms.DataGridViewTextBoxColumn colProductId; + private System.Windows.Forms.DataGridViewTextBoxColumn colImgUrl; + private System.Windows.Forms.DataGridViewImageColumn colImg; + private System.Windows.Forms.DataGridViewTextBoxColumn colGoodsName; + private System.Windows.Forms.DataGridViewTextBoxColumn colHotValue; + private System.Windows.Forms.DataGridViewTextBoxColumn colSales30; + private System.Windows.Forms.DataGridViewTextBoxColumn colCate; + private System.Windows.Forms.DataGridViewTextBoxColumn colPrice; + private System.Windows.Forms.DataGridViewLinkColumn colDel; + private System.Windows.Forms.DataGridViewTextBoxColumn colMsg; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.ComboBox cmbPlatformType; + private UserComponent.UcCheckBox chkOverride; + private UserComponent.UcCheckBox chkSkip; } } \ No newline at end of file diff --git a/TEMUKJD/ToolForms/GetJuShuitanProdForm.cs b/TEMUKJD/ToolForms/GetJuShuitanProdForm.cs index 5ec571a..bc8d008 100644 --- a/TEMUKJD/ToolForms/GetJuShuitanProdForm.cs +++ b/TEMUKJD/ToolForms/GetJuShuitanProdForm.cs @@ -1,8 +1,11 @@ using AllBase; +using AllBase.Model.Result; using CefSharp; using CefSharp.WinForms; using NaiBa.CefHelper; using NaiBa.CefHelper.Handler; +using NaiBa.Util; +using NaiBa.Util.Extension; using System; using System.Collections.Generic; using System.ComponentModel; @@ -14,6 +17,8 @@ using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; using TemuKJD.BaseForms; +using TemuKJD.BLL; +using TemuKJD.Extension; using TemuKJD.Helper; using Work; @@ -21,9 +26,20 @@ namespace TemuKJD.ToolForms { public partial class GetJuShuitanProdForm : BaseForms.BaseForm { + public CancellationTokenSource cancellationTokenSource { get; set; } = null; string InitUrl = "https://sc.scm121.com/suppliersManage/suppliersList/onlineSuppliers"; public ChromiumWebBrowser cefWebBrowser = null; private string currentUrl = ""; + private string currentGetListData = ""; + private string currentSupplierName = ""; + private string appVersion = ""; + private string currentSupplierId = ""; + int pageStart = 1; + int pageEnd = 9999; + int filterSaleCountDays = 7; + int filterSaleCount = 100; + string platformType = "Pinduoduo"; + ConcurrentList lstJSTListProductInfo = new ConcurrentList(); public GetJuShuitanProdForm() { @@ -32,6 +48,56 @@ namespace TemuKJD.ToolForms private void GetJuShuitanProdForm_Load(object sender, EventArgs e) { + this.splitContainer1.SplitterDistance = 472; + this.dgvProduct.AddSelectorColumn("colCheck"); + this.dgvProduct.AddImgColumn("colImg", "colImgUrl"); + + var tmpProductLst = NaiBa.Util.Helper.ConfigHelper.LoadConfig>("supplier_product_list_" + MainForm.ProcessCount); + if (tmpProductLst == null) + tmpProductLst = new List(); + lstJSTListProductInfo.AddRange(tmpProductLst); + pbLoading.Visible = true; + Task.Run(() => + { + int id = 0; + foreach (var prod in lstJSTListProductInfo) + { + id++; + if (id % 50 == 0) + Thread.Sleep(1); + Invoke(new Action(() => + { + var rowId = this.dgvProduct.Rows.Add( + true, + prod.id, + (prod.itemMainImage?.FirstOrDefault()).ParseToString().Replace("https://", "http://"), + DataGridViewExtension.defaultBitmap, + prod.itemName, + prod.saleSeven, + prod.saleThirty, + prod.categoryName.IsNullOrEmpty() ? prod?.dbProduct?.cat_id : prod.categoryName, + (prod?.dbProduct?.price_text).IsNullOrEmpty() ? "预估:" + prod.minSalesPrice + " 采集详情后显示实际值" : prod.dbProduct.price_text, + "删除", + prod.getProductMsg + ); + dgvProduct.Rows[rowId].Height = 60; + + //if (chanceProductResult.dbProduct != null) + //{ + // var dbProd = chanceProductResult.dbProduct; + // var row = dgvChanceProduct.Rows[rowId]; + // row.Cells["colGoodsName"].Value = dbProd.product_name; + // row.Cells["colCate"].Value = dbProd.cat_name; + // row.Cells["colPrice"].Value = dbProd.price_text; + //} + })); + } + Invoke(new Action(() => + { + pbLoading.Visible = false; + })); + }); + InitCef(); } @@ -56,7 +122,7 @@ namespace TemuKJD.ToolForms Invoke(new Action(() => { - splitContainer1.Panel1.Controls.Add(cefWebBrowser); + splitContainer2.Panel2.Controls.Add(cefWebBrowser); //cefWebBrowser.Load(shopMainUrl); })); } @@ -107,6 +173,23 @@ namespace TemuKJD.ToolForms private void RequestHandler_ResourceLoadComplete(object sender, string url, string postData, string responseData, IRequest request) { + + if (url.Contains("api/goods/buyer/supplier/goods/list")) + { + if (request.Headers.AllKeys.Contains("App-Version")) + appVersion = request.Headers["App-Version"]; + Task.Run(() => { GetCurrentSearchData(postData, responseData, request); }); + } + } + + void GetCurrentSearchData(string postData, string responseData, IRequest request) + { + currentGetListData = postData; + currentSupplierId = BaseRegex.GetStringJson(ref postData, "supplierId"); + currentSupplierName = BaseRegex.GetStringJson(ref responseData, "supplierName"); + Invoke(new Action(() => { + txtSupplierName.Text = currentSupplierName; + })); } private bool RequestHandler_BeforeResourceLoad(object sender, string url, string postData, IRequest request) @@ -156,7 +239,652 @@ namespace TemuKJD.ToolForms private void btnRefreshCookie_Click(object sender, EventArgs e) { //var result = GetHtml.PostUtf8("https://api.weixin.qq.com/shop/ec/basics/img/upload?access_token=100_Kn3u6mev0uip-WUPSgxXWHrHldjOP0Ewjw8n18LmGcq2pWbjn4BJukPkGZt0gzgJ1Hd6bRM2TXUDTEhwM7VULSl_P-pVHSVPHlE6ZvdXfD6djB1f2WEibY7jWaZLaD24cBUxLM-mSGxjR7i7IBBeAHDOHH&upload_type=http://img.alicdn.com/imgextra/i2/2215107627344/O1CN01eM6hZu247bV94MWKH_!!2215107627344.jpg&resp_type=1", ""); - // + InitCef(); + } + + private void btnPrev_Click(object sender, EventArgs e) + { + cefWebBrowser.Back(); + } + + private void btnNext_Click(object sender, EventArgs e) + { + cefWebBrowser.Forward(); + } + + private void txtAddress_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter) + { + if (cefWebBrowser != null) + { + cefWebBrowser.Load(txtAddress.Text); + } + } + } + + private void dgvProduct_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex < 0 || e.RowIndex < 0) + return; + string headerText = dgvProduct.Columns[e.ColumnIndex].HeaderText; + var prodId = dgvProduct.Rows[e.RowIndex].Cells["colProductId"].Value.ParseToString(); + var prod = lstJSTListProductInfo.FirstOrDefault(p => p.id == prodId); + var row = dgvProduct.Rows[e.RowIndex]; + + switch (headerText) + { + case "删除": + //if (BaseMsgForm.ShowConfirm("确定删除商品吗?删除后不可恢复!").DialogResult == DialogResult.Cancel) + // return; + //DeleteProduct(dbId); + dgvProduct.Rows.Remove(row); + lstJSTListProductInfo.Remove(prod); + NaiBa.Util.Helper.ConfigHelper.SaveConfig("supplier_product_list_" + MainForm.ProcessCount, lstJSTListProductInfo); + break; + case "图片": + var imgUrl = dgvProduct.Rows[e.RowIndex].Cells["colImgUrl"].Value.ParseToString().Replace("?imageView2/2/w/90/h/90", ""); + Dictionary dic = new Dictionary(); + dic[imgUrl] = imgUrl; + foreach (var imgPath in prod.itemMainImage) + { + dic[imgPath.Replace("https", "http")] = imgPath.Replace("https", "http"); + } + ShowImgForm imgFrom = new ShowImgForm(imgUrl, dic); + imgFrom.ShowDialog(); + break; + case "": + dgvProduct.Rows[e.RowIndex].Cells["colCheck"].Value = !(bool)dgvProduct.Rows[e.RowIndex].Cells["colCheck"].Value; + break; + default: + break; + } + } + + private void btnCollect_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(currentGetListData)) + { + BaseMsgForm.ShowError("请在网页上选择要搜索的供应商商品列表页面"); + return; + } + + this.pbLoading.Visible = true; + dgvProduct.Rows.Clear(); + lstJSTListProductInfo.Clear(); + if (cancellationTokenSource == null || cancellationTokenSource.IsCancellationRequested) + cancellationTokenSource = new CancellationTokenSource(); + Task.Run(() => + { + try + { + GetProdList(); + } + catch (Exception ex) + { + BaseMsgForm.ShowError(ex.Message); + } + Invoke(new Action(() => + { + this.pbLoading.Visible = false; + //this.statusBar.lblTaskStatus.Text = "正在删除..."; + })); + }, cancellationTokenSource.Token); + } + + void GetProdList() + { + List cookieList = CEFBrowser.GetCookieList(".scm121.com", cefWebBrowser.GetCookieManager(null)); + var shop = new ShopLoginInfo(); + shop.Cookies = JsonHelper.SerializeObject(cookieList); + + var Jobj = JsonHelper.JObjectParse(currentGetListData); + Jobj["pageSize"] = 70; + int page = pageStart; + while(page <= pageEnd) + { + if (cancellationTokenSource.IsCancellationRequested) + break; + + Jobj["pageNum"] = page; + Jobj["mallSort"] = "SELL_SEVEN"; + Jobj["platformType"] = platformType; + Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "正在采集第 " + page + " 页"; + })); + Thread.Sleep(Randomx.GetId(1000, 2000)); + page++; + + string url = "https://sc.scm121.com/api/goods/buyer/supplier/goods/list"; + string referer = "https://sc.scm121.com/manage/goods/qualitySupplier/detail/" + Jobj["supplierId"] + "?showErpList=1"; + var lstRst = JSTHttpResponseBLL.JSTPostResponse(shop, url, JsonHelper.SerializeObject(Jobj), referer, appVersion); + for (int i = 0; i < 3 && !lstRst.Contains("\"success\":true"); i++) + { + Thread.Sleep(Randomx.GetId(1000, 2000)); + lstRst = JSTHttpResponseBLL.JSTPostResponse(shop, url, JsonHelper.SerializeObject(Jobj), referer, appVersion); + } + if (!lstRst.Contains("\"success\":true")) + { + var errMsg = BaseRegex.GetStringJson(ref lstRst, "message"); + if (string.IsNullOrEmpty(errMsg)) + errMsg = lstRst; + BaseMsgForm.ShowError("查询错误:" + errMsg); + return; + } + + List jstLst = new List(); + try + { + foreach (var jItem in JsonHelper.JObjectParse(lstRst)["data"]) + { + JSTListProductInfo jstProd = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(jItem)); + jstProd.jstProductJson = JsonHelper.SerializeObject(jItem); + jstProd.dbProduct = new KJDDBProduct(); + jstProd.dbProduct.from_shop_id = jstProd.supplierId; + jstProd.dbProduct.from_shop_name = jstProd.supplierName; + jstProd.dbProduct.offline_supplier_id = jstProd.offlineSupplierId; + jstProd.dbProduct.offline_supplier_name = jstProd.offlineSupplierName; + jstProd.dbProduct.spu_id = jstProd.spuId; + jstProd.dbProduct.skc_id = jstProd.coId; + //jstProd.dbProduct.price_text = jstProd.minSalesPrice.ParseToString(); + //jstProd.dbProduct.main_cat_id = jstProd.categoryLv1Id.ParseToString(); + //jstProd.dbProduct.main_cat_name = jstProd.mainCategoryName.ParseToString(); + //jstProd.dbProduct.cat_id = jstProd.categoryLv3Id.ParseToString(); + jstProd.dbProduct.cat_name = jstProd.categoryName.ParseToString(); + jstProd.dbProduct.ext_code = jstProd.styleCode; + jstProd.dbProduct.product_name = jstProd.itemName; + jstProd.dbProduct.product_json = ""; + jstProd.dbProduct.size_json = "{}"; + jstProd.dbProduct.main_img = jstProd.itemMainImage?.FirstOrDefault(); + jstProd.dbProduct.sale_count = jstProd.saleSeven; + jstProd.dbProduct.sale_count_text = string.IsNullOrEmpty(jstProd.saleSevenDesensitized) ? jstProd.saleSeven.ParseToString() : jstProd.saleSevenDesensitized; + jstProd.dbProduct.product_get_type_text = "厂商直采"; + jstLst.Add(jstProd); + } + if (jstLst.Count <= 0) + break; + // 经销商销量小于设定值,则单品销量肯定小于设定值,退出 + //jstLst = jstLst.Where(p => p.supplierSaleSeven >= filterSaleCount).ToList(); + //if (jstLst.Count <= 0) + // break; + if (filterSaleCountDays == 7) + jstLst = jstLst.Where(p => p.saleSeven >= filterSaleCount).ToList(); + else + jstLst = jstLst.Where(p => p.saleThirty >= filterSaleCount).ToList(); + jstLst = jstLst.Where(p => !lstJSTListProductInfo.Any(p1 => p1.id == p.id)).ToList(); + + lstJSTListProductInfo.AddRange(jstLst); + foreach (var prod in jstLst) + { + Invoke(new Action(() => + { + var id = dgvProduct.Rows.Add( + true, + prod.id, + (prod.itemMainImage?.FirstOrDefault()).ParseToString().Replace("https://", "http://"), + DataGridViewExtension.defaultBitmap, + prod.itemName, + prod.saleSeven, + prod.saleThirty, + prod.categoryName, + "预估:" + prod.minSalesPrice + " 采集详情后显示实际值", + "删除" + ); + dgvProduct.Rows[id].Height = 60; + })); + } + } + catch (Exception ex) + { + Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "发生错误 " + ex.Message; + })); + Thread.Sleep(2000); + } + } + Invoke(new Action(() => + { + BaseMsgForm.ShowInfo("采集完成"); + })); + } + + private void txtFilterSaleCount_TextChanged(object sender, EventArgs e) + { + filterSaleCount = txtFilterSaleCount.Text.Trim().ParseToInt(); + } + + private void txtPageStart_TextChanged(object sender, EventArgs e) + { + pageStart = txtPageStart.Text.Trim().ParseToInt(); + } + + private void txtPageEnd_TextChanged(object sender, EventArgs e) + { + pageEnd = txtPageEnd.Text.Trim().ParseToInt(); + } + + private void btnStopStop_Click(object sender, EventArgs e) + { + if (cancellationTokenSource != null) + cancellationTokenSource.Cancel(); + Task.Run(() => + { + Thread.Sleep(3000); + Invoke(new Action(() => + { + if (cancellationTokenSource == null || cancellationTokenSource.IsCancellationRequested) + pbLoading.Visible = false; + })); + }); + } + + private void btnGetDetail_Click(object sender, EventArgs e) + { + if (platformType == "Pinduoduo") + GetPinDuoduoProd(); + else if (platformType == "douyin") + GetDyProd(); + } + + private void btnSaveDb_Click(object sender, EventArgs e) + { + //"&product_get_type=" + HttpUtility.UrlEncode("厂商直采", Encoding.UTF8); + + ConcurrentList rowLst = new ConcurrentList(); + rowLst.AddRange(dgvProduct.Rows.Cast().Where(r => r.Cells["colCheck"].Value.ParseToBool() == true)); + + this.pbLoading.Visible = true; + Task.Run(() => + { + List cookieList = CEFBrowser.GetCookieList(".scm121.com", cefWebBrowser.GetCookieManager(null)); + var shop = new ShopLoginInfo(); + shop.Cookies = JsonHelper.SerializeObject(cookieList); + + foreach (var row in rowLst) + { + if (cancellationTokenSource.IsCancellationRequested) + break; + + var prodId = row.Cells["colProductId"].Value.ParseToString(); + var prod = lstJSTListProductInfo.FirstOrDefault(c => c.id == prodId); + if (prod == null || prod.dbProduct == null || prod.dbProduct.product_json.Length < 10) + continue; + var dbProd = prod.dbProduct; + + bool isExist = false; + var existUrl = BaseClass.BuildObjString("product/get_product_list"); + string existData = UserLogin.GetSignaturex() + "&search_spu=" + prod.spuId; + string html = GetHtml.PostUtf8(existUrl, existData); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(existUrl, existData); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + { + Invoke(new Action(() => + { + row.Cells["colMsg"].Value = "入库失败,产品数据库连接失败"; + })); + continue; + } + else + { + if (html.Contains("\"data\":[") && !html.Contains("\"data\":[]")) + isExist = true; + } + + var SetPartnerSpuRst = ""; + var url = BaseClass.BuildObjString("product/add_product"); + if (isExist) + { + if (chkOverride.Checked) + { + url = BaseClass.BuildObjString("product/mdy_product"); + } + else + { + Invoke(new Action(() => + { + row.Cells["colMsg"].Value = "已存在相同id商品,跳过"; + })); + continue; + } + } + else + { + SetPartnerSpuRst = SetPartnerSpu(shop, prod); + //{"success":true,"total":null,"data":{"message":"成功添加1款分销商品,系统会自动按商品拆分订单并推送给对应供应商","count":1,"shelvesType":"DISTRIBUTION"},"message":null,"code":"0000","hasNext":false,"now":1769330182209,"extra":{}} + } + + var data = Work.UserLogin.GetSignaturex() + + "&from_shop_id=" + prod.dbProduct.from_shop_id + + "&from_shop_name=" + prod.dbProduct.from_shop_name + + "&offline_supplier_id=" + prod.dbProduct.offline_supplier_id + + "&offline_supplier_name=" + prod.dbProduct.offline_supplier_name + + "&spu_id=" + prod.dbProduct.spu_id.ParseToString() + + "&skc_id=" + prod.dbProduct.skc_id.ParseToString() + + "&price_text=" + prod.dbProduct.price_text + + "&main_cat_id=" + prod.dbProduct.main_cat_id + + "&main_cat_name=" + HttpUtility.UrlEncode(prod.dbProduct.main_cat_name.ParseToString(), Encoding.UTF8) + + "&cat_id=" + prod.dbProduct.cat_id + + "&cat_name=" + HttpUtility.UrlEncode((prod.dbProduct.cat_name ?? prod.categoryName).ParseToString(), Encoding.UTF8) + + "&ext_code=" + HttpUtility.UrlEncode(prod.dbProduct.ext_code, Encoding.UTF8) + + "&product_name=" + HttpUtility.UrlEncode(prod.dbProduct.product_name, Encoding.UTF8) + + "&product_json=" + HttpUtility.UrlEncode(dbProd.product_json, Encoding.UTF8) + + "&size_json=" + HttpUtility.UrlEncode(dbProd.size_json, Encoding.UTF8) + + "&main_img=" + HttpUtility.UrlEncode(dbProd.main_img, Encoding.UTF8) + + "&product_get_type=" + HttpUtility.UrlEncode("厂商直采", Encoding.UTF8); + if (SetPartnerSpuRst.Contains("\"success\":true")) + { + data += "&distribution_set=1"; + } + if (dbProd.main_cat_id == "15543" || dbProd.main_cat_name == "书籍/杂志/报纸") + { + data += "&special_prod_type=" + HttpUtility.UrlEncode("书籍", Encoding.UTF8); + } + + html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + { + string msg = "商品入库失败!请检查网络连接:" + BaseRegex.GetStringJson(ref html, "msg"); + Invoke(new Action(() => + { + row.Cells["colMsg"].Value = msg; + })); + } + else + { + string msg = "商品入库成功!"; + Invoke(new Action(() => + { + row.Cells["colMsg"].Value = msg; + })); + } + } + + Invoke(new Action(() => + { + this.pbLoading.Visible = false; + BaseMsgForm.ShowInfo("商品入库完毕!"); + })); + }, cancellationTokenSource.Token); + } + + private void cmbSaleCount_SelectedIndexChanged(object sender, EventArgs e) + { + + } + + private void cmbSaleCount_TextChanged(object sender, EventArgs e) + { + if (cmbSaleCount.Text == "7日销量≥") + filterSaleCountDays = 7; + else + filterSaleCountDays = 30; + } + + private void cmbPlatformType_SelectedIndexChanged(object sender, EventArgs e) + { + //["TouTiaoFXG","Taobao","Pinduoduo","WXChannel"] + if (cmbPlatformType.Text == "抖音") + { + platformType = "douyin"; + } + else if (cmbPlatformType.Text == "淘宝") + { + platformType = "Taobao"; + } + else if (cmbPlatformType.Text == "微信") + { + platformType = "WXChannel"; + } + else + { + platformType = "Pinduoduo"; + } + } + + private void GetPinDuoduoProd() + { + //https://sc.scm121.com/api/goods/goods/goGoodsPdd/queryBaseData?itemSpuId=26903724F0044AC5976D098842D919E3&shelvesType=DISTRIBUTION&originator=SUPPLIER&itemCoId=14202245 + //https://sc.scm121.com/manage/goods/qualitySupplier/detail/93D12D2BD21649DC8240E2265BE37E2A?showErpList=1 + + this.pbLoading.Visible = true; + if (cancellationTokenSource == null || cancellationTokenSource.IsCancellationRequested) + cancellationTokenSource = new CancellationTokenSource(); + + Task.Run(() => + { + List cookieList = CEFBrowser.GetCookieList(".scm121.com", cefWebBrowser.GetCookieManager(null)); + var shop = new ShopLoginInfo(); + shop.Cookies = JsonHelper.SerializeObject(cookieList); + + ConcurrentList rowLst = new ConcurrentList(); + rowLst.AddRange(dgvProduct.Rows.Cast()); + foreach (DataGridViewRow row in rowLst) + { + if (cancellationTokenSource.IsCancellationRequested) + break; + + if (row.Index < 0 || row.Cells["colCheck"].Value.ParseToBool() != true) + continue; + + var prodId = row.Cells["colProductId"].Value.ParseToString(); + var prod = lstJSTListProductInfo.FirstOrDefault(c => c.id == prodId); + // 不存在或已经采集过 + if (prod == null || prod?.dbProduct?.product_json?.ParseToString().Length > 10) + continue; + + Thread.Sleep(Randomx.GetId(500, 1500)); + if (chkSkip.Checked) + { + bool isExist = false; + var existUrl = BaseClass.BuildObjString("product/get_product_list"); + string existData = UserLogin.GetSignaturex() + "&search_spu=" + prod.spuId; + string html = GetHtml.PostUtf8(existUrl, existData); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(existUrl, existData); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + { + //Invoke(new Action(() => + //{ + // row.Cells["colMsg"].Value = "采集详情失败,产品数据库连接失败"; + //})); + //continue; + } + else + { + if (html.Contains("\"data\":[") && !html.Contains("\"data\":[]")) + isExist = true; + } + prod.getProductMsg = "商品已存在,跳过详情采集"; + if (isExist) + { + try { row.Cells["colMsg"].Value = prod.getProductMsg; } catch { } + continue; + } + } + + string url = "https://sc.scm121.com/api/goods/goods/goGoodsPdd/queryBaseData?itemSpuId=" + prod.itemSpuId + "&shelvesType=DISTRIBUTION&originator=SUPPLIER&itemCoId=" + prod.itemCoId; + string referer = "https://sc.scm121.com/manage/goods/qualitySupplier/detail/" + prod.supplierId + "?showErpList=1"; + var getDetailRst = JSTHttpResponseBLL.JSTGetResponse(shop, url, referer, appVersion); + if (!getDetailRst.Contains("\"success\":true")) + getDetailRst = JSTHttpResponseBLL.JSTGetResponse(shop, url, referer, appVersion); + if (!getDetailRst.Contains("\"success\":true")) + { + var errMsg = BaseRegex.GetStringJson(ref getDetailRst, "message"); + if (string.IsNullOrEmpty(errMsg)) + errMsg = getDetailRst; + prod.getProductMsg = "采集失败 " + errMsg; + Invoke(new Action(() => + { + try { row.Cells["colMsg"].Value = prod.getProductMsg; } catch { } + })); + continue; + } + + try + { + var jObj = JsonHelper.JObjectParse(getDetailRst)["data"]; + prod.dbProduct.cat_id = jObj["catId"].ParseToString(); + prod.dbProduct.main_cat_id = jObj["categoryData"].FirstOrDefault().ParseToString(); + prod.dbProduct.product_json = "{\"pddData\":" + JsonHelper.SerializeObject(jObj) + ",\"jstProd\":" + prod.jstProductJson + "}"; + var priceMin = jObj["skuInfo"]["goodsSkuDetail"].Min(s => s["supplyPrice"].ParseToDecimal()); + var priceMax = jObj["skuInfo"]["goodsSkuDetail"].Max(s => s["supplyPrice"].ParseToDecimal()); + prod.dbProduct.price_text = priceMin + "-" + priceMax; + prod.getProductMsg = "采集成功"; + + Invoke(new Action(() => + { + row.Cells["colMsg"].Value = prod.getProductMsg; + row.Cells["colCate"].Value = prod.categoryName.IsNullOrEmpty() ? prod?.dbProduct?.cat_id : prod.categoryName; + row.Cells["colPrice"].Value = prod.dbProduct.price_text; + })); + } + catch (Exception ex) + { + prod.getProductMsg = "采集失败 " + ex.Message; + Invoke(new Action(() => + { + try { row.Cells["colMsg"].Value = prod.getProductMsg; } catch { } + })); + } + + if (rowLst.IndexOf(row) % 20 == 0 ) + NaiBa.Util.Helper.ConfigHelper.SaveConfig("supplier_product_list_" + MainForm.ProcessCount, lstJSTListProductInfo); + } + NaiBa.Util.Helper.ConfigHelper.SaveConfig("supplier_product_list_" + MainForm.ProcessCount, lstJSTListProductInfo); + Invoke(new Action(() => + { + BaseMsgForm.ShowInfo("采集完成"); + pbLoading.Visible = false; + })); + }, cancellationTokenSource.Token); + } + + private void GetDyProd() + { + this.pbLoading.Visible = true; + if (cancellationTokenSource == null || cancellationTokenSource.IsCancellationRequested) + cancellationTokenSource = new CancellationTokenSource(); + + Task.Run(() => + { + List cookieList = CEFBrowser.GetCookieList(".scm121.com", cefWebBrowser.GetCookieManager(null)); + var shop = new ShopLoginInfo(); + shop.Cookies = JsonHelper.SerializeObject(cookieList); + + ConcurrentList rowLst = new ConcurrentList(); + rowLst.AddRange(dgvProduct.Rows.Cast()); + foreach (DataGridViewRow row in rowLst) + { + if (cancellationTokenSource.IsCancellationRequested) + break; + + if (row.Index < 0 || row.Cells["colCheck"].Value.ParseToBool() != true) + continue; + + var prodId = row.Cells["colProductId"].Value.ParseToString(); + var prod = lstJSTListProductInfo.FirstOrDefault(c => c.id == prodId); + // 不存在或已经采集过 + if (prod == null || prod?.dbProduct?.product_json?.ParseToString().Length > 10) + continue; + + Thread.Sleep(Randomx.GetId(500, 1500)); + if (chkSkip.Checked) + { + bool isExist = false; + var existUrl = BaseClass.BuildObjString("product/get_product_list"); + string existData = UserLogin.GetSignaturex() + "&search_spu=" + prod.spuId; + string html = GetHtml.PostUtf8(existUrl, existData); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(existUrl, existData); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + { + //Invoke(new Action(() => + //{ + // row.Cells["colMsg"].Value = "采集详情失败,产品数据库连接失败"; + //})); + //continue; + } + else + { + if (html.Contains("\"data\":[") && !html.Contains("\"data\":[]")) + isExist = true; + } + if (isExist) + { + prod.getProductMsg = "商品已存在,跳过详情采集"; + row.Cells["colMsg"].Value = prod.getProductMsg; + continue; + } + } + + string url = "https://sc.scm121.com/api/goods/goods/goGoodsDouyin/queryBaseData?itemSpuId=" + prod.itemSpuId + "&shelvesType=DISTRIBUTION&originator=SUPPLIER&itemCoId=" + prod.itemCoId; + string referer = "https://sc.scm121.com/manage/goods/qualitySupplier/detail/" + prod.supplierId + "?showErpList=1"; + var getDetailRst = JSTHttpResponseBLL.JSTGetResponse(shop, url, referer, appVersion); + if (!getDetailRst.Contains("\"success\":true")) + getDetailRst = JSTHttpResponseBLL.JSTGetResponse(shop, url, referer); + if (!getDetailRst.Contains("\"success\":true")) + { + var errMsg = BaseRegex.GetStringJson(ref getDetailRst, "message"); + if (string.IsNullOrEmpty(errMsg)) + errMsg = getDetailRst; + prod.getProductMsg = "采集失败 " + errMsg; + Invoke(new Action(() => + { + try { row.Cells["colMsg"].Value = prod.getProductMsg; } catch { } + })); + continue; + } + + try + { + var jObj = JsonHelper.JObjectParse(getDetailRst)["data"]; + prod.dbProduct.cat_id = jObj["leafCategoryId"].ParseToString(); + prod.dbProduct.main_cat_id = jObj["categoryData"].FirstOrDefault().ParseToString(); + prod.dbProduct.product_json = "{\"dyData\":" + JsonHelper.SerializeObject(jObj) + ",\"jstProd\":" + prod.jstProductJson + "}"; + var priceMin = jObj["skuInfo"]["goodsSkuDetail"].Min(s => s["supplyPrice"].ParseToDecimal()); + var priceMax = jObj["skuInfo"]["goodsSkuDetail"].Max(s => s["supplyPrice"].ParseToDecimal()); + prod.dbProduct.price_text = priceMin + "-" + priceMax; + prod.getProductMsg = "采集成功"; + Invoke(new Action(() => + { + row.Cells["colMsg"].Value = prod.getProductMsg; + row.Cells["colCate"].Value = prod.categoryName.IsNullOrEmpty() ? prod?.dbProduct?.cat_id : prod.categoryName; + row.Cells["colPrice"].Value = prod.dbProduct.price_text; + })); + } + catch (Exception ex) + { + prod.getProductMsg = "采集失败 " + ex.Message; + Invoke(new Action(() => + { + try { row.Cells["colMsg"].Value = prod.getProductMsg; } catch { } + })); + } + + if (rowLst.IndexOf(row) % 20 == 0) + NaiBa.Util.Helper.ConfigHelper.SaveConfig("supplier_product_list_" + MainForm.ProcessCount, lstJSTListProductInfo); + } + NaiBa.Util.Helper.ConfigHelper.SaveConfig("supplier_product_list_" + MainForm.ProcessCount, lstJSTListProductInfo); + Invoke(new Action(() => + { + BaseMsgForm.ShowInfo("采集完成"); + pbLoading.Visible = false; + })); + }, cancellationTokenSource.Token); + } + + public string SetPartnerSpu(ShopLoginInfo shop, JSTListProductInfo jstProd) + { + string url = "https://sc.scm121.com/api/goods/buyer/partnerSpu/add"; + string referer = "https://sc.scm121.com/manage/goods/qualitySupplier/detail/" + jstProd.supplierId + "?showErpList=1"; + string data = @"{""shelvesType"":""DISTRIBUTION"",""spuIdList"":[{""itemCoId"":""" + jstProd.itemCoId + @""",""spuId"":""" + jstProd.spuId + @"""}],""itemSource"":""GYL""}"; + var response = JSTHttpResponseBLL.JSTPostResponse(shop, url, data, referer, appVersion); + return response; } } } diff --git a/TEMUKJD/ToolForms/GetJuShuitanProdForm.resx b/TEMUKJD/ToolForms/GetJuShuitanProdForm.resx index 1af7de1..a48c2b0 100644 --- a/TEMUKJD/ToolForms/GetJuShuitanProdForm.resx +++ b/TEMUKJD/ToolForms/GetJuShuitanProdForm.resx @@ -117,4 +117,37 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + \ No newline at end of file diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs index e6e8fcc..1ec12dc 100644 --- a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs @@ -32,12 +32,12 @@ namespace TemuKJD.WXForms.ProductForms private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); this.label18 = new System.Windows.Forms.Label(); @@ -75,6 +75,8 @@ namespace TemuKJD.WXForms.ProductForms this.label9 = new System.Windows.Forms.Label(); this.chkStepAddPrice = new TemuKJD.UserComponent.UcCheckBox(this.components); this.ucGroupBoxEx4 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.cmbSet = new System.Windows.Forms.ComboBox(); + this.lblSet = new System.Windows.Forms.Label(); this.cmbSpProdType = new System.Windows.Forms.ComboBox(); this.label17 = new System.Windows.Forms.Label(); this.cmbWxSafe = new System.Windows.Forms.ComboBox(); @@ -102,6 +104,18 @@ namespace TemuKJD.WXForms.ProductForms this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.pbLoadingShop = new System.Windows.Forms.PictureBox(); this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx(); + this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSelectProduct = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colUploadCount = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colOnSaleNum = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.并发上传 = new DevComponents.DotNetBar.PanelEx(); this.pbLoading = new System.Windows.Forms.PictureBox(); this.label11 = new System.Windows.Forms.Label(); @@ -135,18 +149,6 @@ namespace TemuKJD.WXForms.ProductForms this.btnClear = new DevComponents.DotNetBar.PanelEx(); this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); this.panel1 = new System.Windows.Forms.Panel(); - this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); - this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colSelectProduct = new System.Windows.Forms.DataGridViewLinkColumn(); - this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn(); - this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn(); - this.colUploadCount = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colOnSaleNum = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -192,7 +194,7 @@ namespace TemuKJD.WXForms.ProductForms // this.splitContainer1.Panel2.Controls.Add(this.splitContainer3); this.splitContainer1.Size = new System.Drawing.Size(1523, 546); - this.splitContainer1.SplitterDistance = 150; + this.splitContainer1.SplitterDistance = 152; this.splitContainer1.TabIndex = 11; // // ucGroupBoxEx2 @@ -234,7 +236,7 @@ namespace TemuKJD.WXForms.ProductForms this.ucGroupBoxEx2.Controls.Add(this.chkStepAddPrice); this.ucGroupBoxEx2.Location = new System.Drawing.Point(459, 2); this.ucGroupBoxEx2.Name = "ucGroupBoxEx2"; - this.ucGroupBoxEx2.Size = new System.Drawing.Size(1062, 150); + this.ucGroupBoxEx2.Size = new System.Drawing.Size(1062, 152); this.ucGroupBoxEx2.TabIndex = 667; this.ucGroupBoxEx2.TabStop = false; this.ucGroupBoxEx2.Text = "商品上传"; @@ -433,7 +435,7 @@ namespace TemuKJD.WXForms.ProductForms // this.chkAddMorePriceFirst.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.chkAddMorePriceFirst.AutoSize = true; - this.chkAddMorePriceFirst.Location = new System.Drawing.Point(213, 121); + this.chkAddMorePriceFirst.Location = new System.Drawing.Point(213, 123); this.chkAddMorePriceFirst.Name = "chkAddMorePriceFirst"; this.chkAddMorePriceFirst.Size = new System.Drawing.Size(111, 21); this.chkAddMorePriceFirst.TabIndex = 625; @@ -472,7 +474,7 @@ namespace TemuKJD.WXForms.ProductForms this.label14.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label14.AutoSize = true; this.label14.ForeColor = System.Drawing.SystemColors.GrayText; - this.label14.Location = new System.Drawing.Point(8, 66); + this.label14.Location = new System.Drawing.Point(8, 68); this.label14.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label14.Name = "label14"; this.label14.Size = new System.Drawing.Size(68, 51); @@ -483,7 +485,7 @@ namespace TemuKJD.WXForms.ProductForms // this.label15.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(184, 123); + this.label15.Location = new System.Drawing.Point(184, 125); this.label15.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(20, 17); @@ -498,7 +500,7 @@ namespace TemuKJD.WXForms.ProductForms this.panel4.Controls.Add(this.panel3); this.panel4.Location = new System.Drawing.Point(76, 17); this.panel4.Name = "panel4"; - this.panel4.Size = new System.Drawing.Size(366, 99); + this.panel4.Size = new System.Drawing.Size(366, 101); this.panel4.TabIndex = 577; // // panel3 @@ -511,7 +513,7 @@ namespace TemuKJD.WXForms.ProductForms this.panel3.Controls.Add(this.fPnlPriceRule); this.panel3.Location = new System.Drawing.Point(1, 1); this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(364, 97); + this.panel3.Size = new System.Drawing.Size(364, 99); this.panel3.TabIndex = 541; // // fPnlPriceRule @@ -616,7 +618,7 @@ namespace TemuKJD.WXForms.ProductForms // txtAddMorePrice // this.txtAddMorePrice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.txtAddMorePrice.Location = new System.Drawing.Point(153, 120); + this.txtAddMorePrice.Location = new System.Drawing.Point(153, 122); this.txtAddMorePrice.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtAddMorePrice.Name = "txtAddMorePrice"; this.txtAddMorePrice.Size = new System.Drawing.Size(31, 23); @@ -627,7 +629,7 @@ namespace TemuKJD.WXForms.ProductForms // txtAddTimes // this.txtAddTimes.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.txtAddTimes.Location = new System.Drawing.Point(78, 120); + this.txtAddTimes.Location = new System.Drawing.Point(78, 122); this.txtAddTimes.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtAddTimes.Name = "txtAddTimes"; this.txtAddTimes.Size = new System.Drawing.Size(31, 23); @@ -639,7 +641,7 @@ namespace TemuKJD.WXForms.ProductForms // this.label10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(109, 123); + this.label10.Location = new System.Drawing.Point(109, 125); this.label10.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(44, 17); @@ -674,7 +676,7 @@ namespace TemuKJD.WXForms.ProductForms // txtStockNum // this.txtStockNum.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.txtStockNum.Location = new System.Drawing.Point(393, 120); + this.txtStockNum.Location = new System.Drawing.Point(393, 122); this.txtStockNum.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtStockNum.Name = "txtStockNum"; this.txtStockNum.Size = new System.Drawing.Size(32, 23); @@ -686,7 +688,7 @@ namespace TemuKJD.WXForms.ProductForms // this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(337, 123); + this.label4.Location = new System.Drawing.Point(337, 125); this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(56, 17); @@ -697,7 +699,7 @@ namespace TemuKJD.WXForms.ProductForms // this.label9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(8, 123); + this.label9.Location = new System.Drawing.Point(8, 125); this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(68, 17); @@ -721,6 +723,8 @@ namespace TemuKJD.WXForms.ProductForms | System.Windows.Forms.AnchorStyles.Left))); this.ucGroupBoxEx4.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.ucGroupBoxEx4.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx4.Controls.Add(this.cmbSet); + this.ucGroupBoxEx4.Controls.Add(this.lblSet); this.ucGroupBoxEx4.Controls.Add(this.cmbSpProdType); this.ucGroupBoxEx4.Controls.Add(this.label17); this.ucGroupBoxEx4.Controls.Add(this.cmbWxSafe); @@ -743,11 +747,33 @@ namespace TemuKJD.WXForms.ProductForms this.ucGroupBoxEx4.Controls.Add(this.label16); this.ucGroupBoxEx4.Location = new System.Drawing.Point(139, 2); this.ucGroupBoxEx4.Name = "ucGroupBoxEx4"; - this.ucGroupBoxEx4.Size = new System.Drawing.Size(320, 150); + this.ucGroupBoxEx4.Size = new System.Drawing.Size(320, 152); this.ucGroupBoxEx4.TabIndex = 666; this.ucGroupBoxEx4.TabStop = false; this.ucGroupBoxEx4.Text = "待传商品"; // + // cmbSet + // + this.cmbSet.FormattingEnabled = true; + this.cmbSet.Items.AddRange(new object[] { + "", + "已设置", + "未设置"}); + this.cmbSet.Location = new System.Drawing.Point(182, 96); + this.cmbSet.Name = "cmbSet"; + this.cmbSet.Size = new System.Drawing.Size(67, 25); + this.cmbSet.TabIndex = 697; + // + // lblSet + // + this.lblSet.AutoSize = true; + this.lblSet.Location = new System.Drawing.Point(128, 100); + this.lblSet.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.lblSet.Name = "lblSet"; + this.lblSet.Size = new System.Drawing.Size(56, 17); + this.lblSet.TabIndex = 696; + this.lblSet.Text = "分销设置"; + // // cmbSpProdType // this.cmbSpProdType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; @@ -755,7 +781,7 @@ namespace TemuKJD.WXForms.ProductForms this.cmbSpProdType.Items.AddRange(new object[] { "普通商品", "书籍"}); - this.cmbSpProdType.Location = new System.Drawing.Point(36, 95); + this.cmbSpProdType.Location = new System.Drawing.Point(36, 96); this.cmbSpProdType.Name = "cmbSpProdType"; this.cmbSpProdType.Size = new System.Drawing.Size(92, 25); this.cmbSpProdType.TabIndex = 686; @@ -763,7 +789,7 @@ namespace TemuKJD.WXForms.ProductForms // label17 // this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(7, 99); + this.label17.Location = new System.Drawing.Point(7, 100); this.label17.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(32, 17); @@ -777,20 +803,20 @@ namespace TemuKJD.WXForms.ProductForms this.cmbWxSafe.Items.AddRange(new object[] { "安全商品", "未校验"}); - this.cmbWxSafe.Location = new System.Drawing.Point(157, 68); + this.cmbWxSafe.Location = new System.Drawing.Point(182, 69); this.cmbWxSafe.Name = "cmbWxSafe"; - this.cmbWxSafe.Size = new System.Drawing.Size(92, 25); + this.cmbWxSafe.Size = new System.Drawing.Size(67, 25); this.cmbWxSafe.TabIndex = 675; // // label13 // this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(128, 72); + this.label13.Location = new System.Drawing.Point(128, 73); this.label13.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(32, 17); + this.label13.Size = new System.Drawing.Size(56, 17); this.label13.TabIndex = 674; - this.label13.Text = "安检"; + this.label13.Text = "微信安检"; // // cmbSourceType // @@ -801,7 +827,7 @@ namespace TemuKJD.WXForms.ProductForms "厂商直采", "机会商品", "外部数据"}); - this.cmbSourceType.Location = new System.Drawing.Point(36, 68); + this.cmbSourceType.Location = new System.Drawing.Point(36, 69); this.cmbSourceType.Name = "cmbSourceType"; this.cmbSourceType.Size = new System.Drawing.Size(92, 25); this.cmbSourceType.TabIndex = 673; @@ -809,7 +835,7 @@ namespace TemuKJD.WXForms.ProductForms // label12 // this.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(7, 72); + this.label12.Location = new System.Drawing.Point(7, 73); this.label12.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label12.Name = "label12"; this.label12.Size = new System.Drawing.Size(32, 17); @@ -822,7 +848,7 @@ namespace TemuKJD.WXForms.ProductForms this.btnClearFilter.CanvasColor = System.Drawing.SystemColors.Control; this.btnClearFilter.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnClearFilter.DisabledBackColor = System.Drawing.Color.Empty; - this.btnClearFilter.Location = new System.Drawing.Point(253, 16); + this.btnClearFilter.Location = new System.Drawing.Point(253, 17); this.btnClearFilter.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); this.btnClearFilter.Name = "btnClearFilter"; this.btnClearFilter.Size = new System.Drawing.Size(58, 50); @@ -845,7 +871,7 @@ namespace TemuKJD.WXForms.ProductForms // lblGoodsCount // this.lblGoodsCount.AutoSize = true; - this.lblGoodsCount.Location = new System.Drawing.Point(9, 122); + this.lblGoodsCount.Location = new System.Drawing.Point(9, 126); this.lblGoodsCount.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.lblGoodsCount.Name = "lblGoodsCount"; this.lblGoodsCount.Size = new System.Drawing.Size(71, 17); @@ -859,7 +885,7 @@ namespace TemuKJD.WXForms.ProductForms this.btnClearUpload.CanvasColor = System.Drawing.SystemColors.Control; this.btnClearUpload.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnClearUpload.DisabledBackColor = System.Drawing.Color.Empty; - this.btnClearUpload.Location = new System.Drawing.Point(253, 93); + this.btnClearUpload.Location = new System.Drawing.Point(253, 98); this.btnClearUpload.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); this.btnClearUpload.Name = "btnClearUpload"; this.btnClearUpload.Size = new System.Drawing.Size(58, 23); @@ -881,7 +907,7 @@ namespace TemuKJD.WXForms.ProductForms // // txtIdFilter // - this.txtIdFilter.Location = new System.Drawing.Point(157, 43); + this.txtIdFilter.Location = new System.Drawing.Point(157, 44); this.txtIdFilter.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtIdFilter.Name = "txtIdFilter"; this.txtIdFilter.Size = new System.Drawing.Size(92, 23); @@ -890,7 +916,7 @@ namespace TemuKJD.WXForms.ProductForms // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(129, 47); + this.label1.Location = new System.Drawing.Point(129, 48); this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(32, 17); @@ -900,7 +926,7 @@ namespace TemuKJD.WXForms.ProductForms // cmbCateFilter // this.cmbCateFilter.FormattingEnabled = true; - this.cmbCateFilter.Location = new System.Drawing.Point(157, 16); + this.cmbCateFilter.Location = new System.Drawing.Point(157, 17); this.cmbCateFilter.Name = "cmbCateFilter"; this.cmbCateFilter.Size = new System.Drawing.Size(92, 25); this.cmbCateFilter.TabIndex = 663; @@ -908,7 +934,7 @@ namespace TemuKJD.WXForms.ProductForms // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(129, 22); + this.label2.Location = new System.Drawing.Point(129, 23); this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(32, 17); @@ -918,7 +944,7 @@ namespace TemuKJD.WXForms.ProductForms // cmbGroupFilter // this.cmbGroupFilter.FormattingEnabled = true; - this.cmbGroupFilter.Location = new System.Drawing.Point(36, 16); + this.cmbGroupFilter.Location = new System.Drawing.Point(36, 17); this.cmbGroupFilter.Name = "cmbGroupFilter"; this.cmbGroupFilter.Size = new System.Drawing.Size(92, 25); this.cmbGroupFilter.TabIndex = 641; @@ -926,7 +952,7 @@ namespace TemuKJD.WXForms.ProductForms // label20 // this.label20.AutoSize = true; - this.label20.Location = new System.Drawing.Point(7, 19); + this.label20.Location = new System.Drawing.Point(7, 20); this.label20.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label20.Name = "label20"; this.label20.Size = new System.Drawing.Size(32, 17); @@ -935,7 +961,7 @@ namespace TemuKJD.WXForms.ProductForms // // txtExtCodeFilter // - this.txtExtCodeFilter.Location = new System.Drawing.Point(36, 43); + this.txtExtCodeFilter.Location = new System.Drawing.Point(36, 44); this.txtExtCodeFilter.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtExtCodeFilter.Name = "txtExtCodeFilter"; this.txtExtCodeFilter.Size = new System.Drawing.Size(92, 23); @@ -947,7 +973,7 @@ namespace TemuKJD.WXForms.ProductForms this.lblWaitToUp.Cursor = System.Windows.Forms.Cursors.Hand; this.lblWaitToUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblWaitToUp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.lblWaitToUp.Location = new System.Drawing.Point(119, 122); + this.lblWaitToUp.Location = new System.Drawing.Point(119, 126); this.lblWaitToUp.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.lblWaitToUp.Name = "lblWaitToUp"; this.lblWaitToUp.Size = new System.Drawing.Size(71, 17); @@ -957,7 +983,7 @@ namespace TemuKJD.WXForms.ProductForms // // txtAddCount // - this.txtAddCount.Location = new System.Drawing.Point(213, 119); + this.txtAddCount.Location = new System.Drawing.Point(213, 123); this.txtAddCount.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtAddCount.Name = "txtAddCount"; this.txtAddCount.Size = new System.Drawing.Size(36, 23); @@ -970,7 +996,7 @@ namespace TemuKJD.WXForms.ProductForms this.panelEx2.Cursor = System.Windows.Forms.Cursors.Hand; this.panelEx2.DisabledBackColor = System.Drawing.Color.Empty; this.panelEx2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.panelEx2.Location = new System.Drawing.Point(253, 119); + this.panelEx2.Location = new System.Drawing.Point(253, 123); this.panelEx2.Name = "panelEx2"; this.panelEx2.Size = new System.Drawing.Size(58, 23); this.panelEx2.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -991,7 +1017,7 @@ namespace TemuKJD.WXForms.ProductForms // label16 // this.label16.AutoSize = true; - this.label16.Location = new System.Drawing.Point(7, 46); + this.label16.Location = new System.Drawing.Point(7, 47); this.label16.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(32, 17); @@ -1008,7 +1034,7 @@ namespace TemuKJD.WXForms.ProductForms this.ucGroupBoxEx1.Controls.Add(this.btnRefreshShop); this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2); this.ucGroupBoxEx1.Name = "ucGroupBoxEx1"; - this.ucGroupBoxEx1.Size = new System.Drawing.Size(136, 150); + this.ucGroupBoxEx1.Size = new System.Drawing.Size(136, 152); this.ucGroupBoxEx1.TabIndex = 399; this.ucGroupBoxEx1.TabStop = false; this.ucGroupBoxEx1.Text = "基础"; @@ -1078,8 +1104,8 @@ namespace TemuKJD.WXForms.ProductForms // splitContainer3.Panel2 // this.splitContainer3.Panel2.Controls.Add(this.splitContainer4); - this.splitContainer3.Size = new System.Drawing.Size(1523, 392); - this.splitContainer3.SplitterDistance = 362; + this.splitContainer3.Size = new System.Drawing.Size(1523, 390); + this.splitContainer3.SplitterDistance = 360; this.splitContainer3.TabIndex = 1; // // splitContainer2 @@ -1104,7 +1130,7 @@ namespace TemuKJD.WXForms.ProductForms this.splitContainer2.Panel2.Controls.Add(this.chkTestNoAuditUpload); this.splitContainer2.Panel2.Controls.Add(this.dgvSelectProduct); this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0); - this.splitContainer2.Size = new System.Drawing.Size(1523, 362); + this.splitContainer2.Size = new System.Drawing.Size(1523, 360); this.splitContainer2.SplitterDistance = 350; this.splitContainer2.TabIndex = 0; // @@ -1112,7 +1138,7 @@ namespace TemuKJD.WXForms.ProductForms // this.pbLoadingShop.Anchor = System.Windows.Forms.AnchorStyles.None; this.pbLoadingShop.Image = global::TemuKJD.Properties.Resources.loading_blue; - this.pbLoadingShop.Location = new System.Drawing.Point(150, 156); + this.pbLoadingShop.Location = new System.Drawing.Point(150, 155); this.pbLoadingShop.Name = "pbLoadingShop"; this.pbLoadingShop.Size = new System.Drawing.Size(50, 50); this.pbLoadingShop.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; @@ -1124,19 +1150,19 @@ namespace TemuKJD.WXForms.ProductForms // this.dgvShop.AllowUserToAddRows = false; this.dgvShop.AllowUserToDeleteRows = false; - dataGridViewCellStyle7.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle19.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle19; this.dgvShop.AutoRowNumber = true; this.dgvShop.BackgroundColor = System.Drawing.Color.White; this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle20.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle20.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle20.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle20.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle20.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle20; this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colSelect, @@ -1157,10 +1183,106 @@ namespace TemuKJD.WXForms.ProductForms this.dgvShop.ReadOnly = true; this.dgvShop.RowHeadersWidth = 25; this.dgvShop.RowTemplate.Height = 23; - this.dgvShop.Size = new System.Drawing.Size(346, 362); + this.dgvShop.Size = new System.Drawing.Size(346, 360); this.dgvShop.TabIndex = 6; this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick); // + // colSelect + // + this.colSelect.HeaderText = "全选"; + this.colSelect.Name = "colSelect"; + this.colSelect.ReadOnly = true; + this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colSelect.Width = 28; + // + // colShopLoginName + // + this.colShopLoginName.HeaderText = "店铺登录名"; + this.colShopLoginName.Name = "colShopLoginName"; + this.colShopLoginName.ReadOnly = true; + this.colShopLoginName.Visible = false; + // + // colShopId + // + this.colShopId.HeaderText = "店铺Id"; + this.colShopId.Name = "colShopId"; + this.colShopId.ReadOnly = true; + this.colShopId.Visible = false; + this.colShopId.Width = 55; + // + // colShopName + // + this.colShopName.FillWeight = 150F; + this.colShopName.HeaderText = "店铺名称"; + this.colShopName.Name = "colShopName"; + this.colShopName.ReadOnly = true; + this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colShopName.Width = 66; + // + // colShopNotes + // + this.colShopNotes.HeaderText = "分组"; + this.colShopNotes.Name = "colShopNotes"; + this.colShopNotes.ReadOnly = true; + this.colShopNotes.Width = 66; + // + // colSelectProduct + // + this.colSelectProduct.HeaderText = "选择商品"; + this.colSelectProduct.Name = "colSelectProduct"; + this.colSelectProduct.ReadOnly = true; + this.colSelectProduct.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSelectProduct.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colSelectProduct.Visible = false; + this.colSelectProduct.Width = 62; + // + // colLoginStatus + // + this.colLoginStatus.HeaderText = "状态"; + this.colLoginStatus.Name = "colLoginStatus"; + this.colLoginStatus.ReadOnly = true; + this.colLoginStatus.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colLoginStatus.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colLoginStatus.Width = 38; + // + // colCanUse + // + this.colCanUse.HeaderText = "可用"; + this.colCanUse.Name = "colCanUse"; + this.colCanUse.ReadOnly = true; + this.colCanUse.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colCanUse.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colCanUse.Visible = false; + this.colCanUse.Width = 28; + // + // colUploadCount + // + this.colUploadCount.HeaderText = "已传"; + this.colUploadCount.Name = "colUploadCount"; + this.colUploadCount.ReadOnly = true; + this.colUploadCount.Width = 38; + // + // colOnSaleNum + // + this.colOnSaleNum.HeaderText = "在售"; + this.colOnSaleNum.Name = "colOnSaleNum"; + this.colOnSaleNum.ReadOnly = true; + this.colOnSaleNum.Width = 38; + // + // colRemaining + // + this.colRemaining.HeaderText = "月限额"; + this.colRemaining.Name = "colRemaining"; + this.colRemaining.ReadOnly = true; + this.colRemaining.Visible = false; + // + // colMessage + // + this.colMessage.HeaderText = "消息"; + this.colMessage.Name = "colMessage"; + this.colMessage.ReadOnly = true; + // // 并发上传 // this.并发上传.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -1191,7 +1313,7 @@ namespace TemuKJD.WXForms.ProductForms // this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None; this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; - this.pbLoading.Location = new System.Drawing.Point(559, 156); + this.pbLoading.Location = new System.Drawing.Point(559, 155); this.pbLoading.Name = "pbLoading"; this.pbLoading.Size = new System.Drawing.Size(50, 50); this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; @@ -1203,7 +1325,7 @@ namespace TemuKJD.WXForms.ProductForms // this.label11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(25, 37); + this.label11.Location = new System.Drawing.Point(25, 35); this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(68, 17); @@ -1214,7 +1336,7 @@ namespace TemuKJD.WXForms.ProductForms // txtSinglePriceAdd // this.txtSinglePriceAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.txtSinglePriceAdd.Location = new System.Drawing.Point(93, 34); + this.txtSinglePriceAdd.Location = new System.Drawing.Point(93, 32); this.txtSinglePriceAdd.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtSinglePriceAdd.Name = "txtSinglePriceAdd"; this.txtSinglePriceAdd.Size = new System.Drawing.Size(31, 23); @@ -1238,19 +1360,19 @@ namespace TemuKJD.WXForms.ProductForms // this.dgvSelectProduct.AllowUserToAddRows = false; this.dgvSelectProduct.AllowUserToDeleteRows = false; - dataGridViewCellStyle9.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle21.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle21; this.dgvSelectProduct.AutoRowNumber = true; this.dgvSelectProduct.BackgroundColor = System.Drawing.Color.White; this.dgvSelectProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle22.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle22.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle22; this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colCheck, @@ -1280,7 +1402,7 @@ namespace TemuKJD.WXForms.ProductForms this.dgvSelectProduct.Name = "dgvSelectProduct"; this.dgvSelectProduct.ReadOnly = true; this.dgvSelectProduct.RowTemplate.Height = 23; - this.dgvSelectProduct.Size = new System.Drawing.Size(1165, 362); + this.dgvSelectProduct.Size = new System.Drawing.Size(1165, 360); this.dgvSelectProduct.TabIndex = 187; this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick); // @@ -1310,8 +1432,8 @@ namespace TemuKJD.WXForms.ProductForms // // colSupplierName // - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle23.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle23; this.colSupplierName.Frozen = true; this.colSupplierName.HeaderText = "店铺名称"; this.colSupplierName.Name = "colSupplierName"; @@ -1389,8 +1511,8 @@ namespace TemuKJD.WXForms.ProductForms // // colProductName // - dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colProductName.DefaultCellStyle = dataGridViewCellStyle12; + dataGridViewCellStyle24.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colProductName.DefaultCellStyle = dataGridViewCellStyle24; this.colProductName.HeaderText = "商品标题"; this.colProductName.Name = "colProductName"; this.colProductName.ReadOnly = true; @@ -1553,102 +1675,6 @@ namespace TemuKJD.WXForms.ProductForms this.panel1.TabIndex = 189; this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint); // - // colSelect - // - this.colSelect.HeaderText = "全选"; - this.colSelect.Name = "colSelect"; - this.colSelect.ReadOnly = true; - this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.colSelect.Width = 28; - // - // colShopLoginName - // - this.colShopLoginName.HeaderText = "店铺登录名"; - this.colShopLoginName.Name = "colShopLoginName"; - this.colShopLoginName.ReadOnly = true; - this.colShopLoginName.Visible = false; - // - // colShopId - // - this.colShopId.HeaderText = "店铺Id"; - this.colShopId.Name = "colShopId"; - this.colShopId.ReadOnly = true; - this.colShopId.Visible = false; - this.colShopId.Width = 55; - // - // colShopName - // - this.colShopName.FillWeight = 150F; - this.colShopName.HeaderText = "店铺名称"; - this.colShopName.Name = "colShopName"; - this.colShopName.ReadOnly = true; - this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colShopName.Width = 66; - // - // colShopNotes - // - this.colShopNotes.HeaderText = "分组"; - this.colShopNotes.Name = "colShopNotes"; - this.colShopNotes.ReadOnly = true; - this.colShopNotes.Width = 66; - // - // colSelectProduct - // - this.colSelectProduct.HeaderText = "选择商品"; - this.colSelectProduct.Name = "colSelectProduct"; - this.colSelectProduct.ReadOnly = true; - this.colSelectProduct.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colSelectProduct.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.colSelectProduct.Visible = false; - this.colSelectProduct.Width = 62; - // - // colLoginStatus - // - this.colLoginStatus.HeaderText = "状态"; - this.colLoginStatus.Name = "colLoginStatus"; - this.colLoginStatus.ReadOnly = true; - this.colLoginStatus.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colLoginStatus.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.colLoginStatus.Width = 38; - // - // colCanUse - // - this.colCanUse.HeaderText = "可用"; - this.colCanUse.Name = "colCanUse"; - this.colCanUse.ReadOnly = true; - this.colCanUse.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colCanUse.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.colCanUse.Visible = false; - this.colCanUse.Width = 28; - // - // colUploadCount - // - this.colUploadCount.HeaderText = "已传"; - this.colUploadCount.Name = "colUploadCount"; - this.colUploadCount.ReadOnly = true; - this.colUploadCount.Width = 38; - // - // colOnSaleNum - // - this.colOnSaleNum.HeaderText = "在售"; - this.colOnSaleNum.Name = "colOnSaleNum"; - this.colOnSaleNum.ReadOnly = true; - this.colOnSaleNum.Width = 38; - // - // colRemaining - // - this.colRemaining.HeaderText = "月限额"; - this.colRemaining.Name = "colRemaining"; - this.colRemaining.ReadOnly = true; - this.colRemaining.Visible = false; - // - // colMessage - // - this.colMessage.HeaderText = "消息"; - this.colMessage.Name = "colMessage"; - this.colMessage.ReadOnly = true; - // // WXDBProdUploadForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -1807,5 +1833,7 @@ namespace TemuKJD.WXForms.ProductForms private System.Windows.Forms.DataGridViewTextBoxColumn colOnSaleNum; private System.Windows.Forms.DataGridViewTextBoxColumn colRemaining; private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; + private System.Windows.Forms.ComboBox cmbSet; + private System.Windows.Forms.Label lblSet; } } \ No newline at end of file diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs index 5f810db..1842cea 100644 --- a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs @@ -2332,6 +2332,7 @@ namespace TemuKJD.WXForms.ProductForms data += "&product_get_type=" + cmbSourceType.Text.Trim(); data += "&wx_safe_status=" + cmbWxSafe.Text.Trim(); data += "&special_prod_type=" + cmbSpProdType.Text.Trim(); + data += "&is_supplier_prod_ok=" + cmbSet.Text.Trim(); })); var html = GetHtml.PostUtf8(url, data); if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200"))