diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs index 6d43e70..1e323a7 100644 --- a/AllBase/BaseClass.cs +++ b/AllBase/BaseClass.cs @@ -27,7 +27,7 @@ namespace AllBase /// /// 版本ID /// - public static int VersionCount = 929; + public static int VersionCount = 932; //public static int VersionCount = 613; /// @@ -746,6 +746,10 @@ namespace AllBase { return LoginApiUrl + "/bxx_" + file + "?obj=" + BaseClass.MainPath + "/bxx_" + file; } + public static string BuildWXObjString(string file, bool IsLoginDef = false) + { + return LoginApiUrl + "/wxxd_" + file + "?obj=" + BaseClass.MainPath + "/wxxd_" + file; + } } public class KeyValueBase diff --git a/AllBase/BaseRegex.cs b/AllBase/BaseRegex.cs index ae154d1..7c1ebfc 100644 --- a/AllBase/BaseRegex.cs +++ b/AllBase/BaseRegex.cs @@ -754,7 +754,7 @@ namespace AllBase rst += htmlTmp.Substring(0, 1); if (htmlTmp.StartsWith("[")) braceNum++; - else if (htmlTmp.StartsWith("}")) + else if (htmlTmp.StartsWith("]")) braceNum--; htmlTmp = htmlTmp.Substring(1); if (braceNum == 0) diff --git a/AllBase/JsonHelper.cs b/AllBase/JsonHelper.cs index c43e8b0..3f69868 100644 --- a/AllBase/JsonHelper.cs +++ b/AllBase/JsonHelper.cs @@ -46,13 +46,18 @@ namespace AllBase public static T DeserializeJsonToObjectNullable(string json) where T : class { - if (string.IsNullOrEmpty(json)) - return json as T; - JsonSerializer serializer = new JsonSerializer(); - StringReader sr = new StringReader(json); - object o = serializer.Deserialize(new JsonTextReader(sr), typeof(T)); - T t = o as T; - return t; + try + { + JsonSerializer serializer = new JsonSerializer(); + StringReader sr = new StringReader(json); + object o = serializer.Deserialize(new JsonTextReader(sr), typeof(T)); + T t = o as T; + return t; + } + catch + { + return null; + } } public static JObject JObjectParse(string json) diff --git a/AllBase/Model/Result/TemuDBProductSelect.cs b/AllBase/Model/Result/TemuDBProductSelect.cs index 6fa752e..b131a53 100644 --- a/AllBase/Model/Result/TemuDBProductSelect.cs +++ b/AllBase/Model/Result/TemuDBProductSelect.cs @@ -43,6 +43,7 @@ namespace AllBase.Model.Result public string change_cat_name { get; set; } public string wx_cat_leaf { get; set; } public string ext_code { get; set; } + public string secret_spu_id { get; set; } public string product_name { get; set; } public string main_img { get; set; } public string spu_id { get; set; } diff --git a/AllBase/Model/Result/WXResult/WXClientProductInfoLite.cs b/AllBase/Model/Result/WXResult/WXClientProductInfoLite.cs index f86e9e2..c8533af 100644 --- a/AllBase/Model/Result/WXResult/WXClientProductInfoLite.cs +++ b/AllBase/Model/Result/WXResult/WXClientProductInfoLite.cs @@ -8,22 +8,26 @@ namespace AllBase.Model.Result.WXResult { public class WXClientProductInfoLite { - public string product_id { get; set; } // "10000066623849", - public string appid { get; set; } // "wx62cca7dc2354b687" + public wx_client_prod_key product_key { get; set; } + + public wx_client_prod_info info { get; set; } + + public List productSkus { get; set; } + } + + public class wx_client_prod_info + { public string title { get; set; } // "2026新款情侣棒球帽立体C字母刺绣显脸小时尚百搭休闲韩版大头围鸭舌帽", public string sub_title { get; set; } // "2025新款C字母立体刺绣棒球帽", - public List category { get; set; } // { "cat_id": "6093" } - /// /// 主图列表 /// public List head_img { get; set; } // ["https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/64f0a5760000484b151963b6bb81bc1e000000a000004f50", ...] - + public List category { get; set; } // { "cat_id": "6093" } /// /// 商品详情(图) /// - public wx_client_detail detail { get; set; } - + public wx_client_prod_detail detail { get; set; } /// /// 商品属性 /// @@ -32,16 +36,47 @@ namespace AllBase.Model.Result.WXResult /// 品牌id /// public string brand_id { get; set; } // "10250056" - + public wx_client_sku_id_list sku_id_list { get; set; } public wx_sku sku_list { get; set; } - public List product_sale_attrs { get; set; } - - public List productSkus { get; set; } - - public string total_sold_num { get; set; } - + /// + /// 总销量 + /// + public string total_sold_num { get; set; } // "46631" + public wx_client_service_desc service_desc { get; set; } + public wx_client_express_info express_info { get; set; } public List headVideoInfo { get; set; } + + public object afterSaleInfo { get; set; } + public List deliveryExpressFee { get; set; } + public List templateInfo { get; set; } + + public string spuCode { get; set; } + } + + public class wx_client_express_info + { + public string template_id { get; set; } // "243911370004", + public string product_id { get; set; } // "10000066623849", + public int? piece { get; set; } // 1, + public int? weight { get; set; } // 0, + public int? price { get; set; } // 5980 + } + + public class wx_client_service_desc + { + public string desc { get; set; } // "(麻烦阿姐阿哥们,带纸箱邮寄过去的一定记得用纸盒邮寄回,袋子邮寄的,带袋子寄回,拒收到付件,拒收自提件)" + } + + public class wx_client_sku_id_list + { + public List sku_ids { get; set; } //[ "1597139289", "1597121531", "1597127451", "1597113890", "1597119654" ] + } + + public class wx_client_prod_key + { + public string product_id { get; set; } // "10000066623849", + public string appid { get; set; } // "wx62cca7dc2354b687" } public class wx_client_head_video_info @@ -90,12 +125,14 @@ namespace AllBase.Model.Result.WXResult public int? origin_price { get; set; } // 5980, } - public class wx_client_detail + public class wx_client_prod_detail { /// /// 详情图 /// public List detail_img { get; set; } // ["https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/64f21d2b00009e7a156bc7cd6d63b01e000000a000004f50", ...] + public List detailImg { get; set; } // ["https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/64f21d2b00009e7a156bc7cd6d63b01e000000a000004f50", ...] + public List detail_img_real { get { return detail_img == null ? detailImg : detail_img; } } public string desc { get; set; } // "纯萃美2025新款情侣棒球帽立体C字母刺绣显脸小时尚百搭休闲网红款韩版大头围硬顶鸭舌帽男女同款" } @@ -106,7 +143,9 @@ namespace AllBase.Model.Result.WXResult public class wx_client_category { + public string catIdStr { get { return string.IsNullOrEmpty(cat_id) ? catId : cat_id; } } // "0", public string cat_id { get; set; } // "0", + public string catId { get; set; } // "0", public string name { get; set; } // "主要材质", "C字母刺绣" public string f_cat_id { get; set; } // "0", public string brand_cat { get; set; } // "0", diff --git a/KJDService/KJD_WebService/BLL/BXX/BXXPriceManage.cs b/KJDService/KJD_WebService/BLL/BXX/BXXPriceManage.cs index b3ffba1..51e856a 100644 --- a/KJDService/KJD_WebService/BLL/BXX/BXXPriceManage.cs +++ b/KJDService/KJD_WebService/BLL/BXX/BXXPriceManage.cs @@ -175,7 +175,7 @@ namespace KJD_Web.BLL.BXX }; priceList.Add(price); } - var data = JsonUtils.SerializerObjectToString(priceList); + var data = JsonUtils.SerializeObjectToString(priceList); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; } catch (Exception ex) @@ -548,7 +548,7 @@ namespace KJD_Web.BLL.BXX }; purchasePriceList.Add(price); } - var data = JsonUtils.SerializerObjectToString(purchasePriceList); + var data = JsonUtils.SerializeObjectToString(purchasePriceList); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; } catch (Exception ex) @@ -742,7 +742,7 @@ namespace KJD_Web.BLL.BXX }; priceList.Add(price); } - var data = JsonUtils.SerializerObjectToString(priceList); + var data = JsonUtils.SerializeObjectToString(priceList); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; } catch (Exception ex) diff --git a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs index 05de46e..4f084a8 100644 --- a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs +++ b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs @@ -308,7 +308,7 @@ namespace KJD_Web.BLL.BXX productLst.Add(prod); } JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }; - var data = JsonUtils.SerializerObjectToString(productLst, jsonSetting); + var data = JsonUtils.SerializeObjectToString(productLst, jsonSetting); var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000"); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + productLst.Count + ",\"seconds\":" + seconds + "}"; } @@ -348,6 +348,7 @@ namespace KJD_Web.BLL.BXX var wx_cat_1 = RegexUtils.GetStringQuery(ref inputData, "wx_cat_1")?.Replace("'", "\\'"); var wx_cat_2 = RegexUtils.GetStringQuery(ref inputData, "wx_cat_2")?.Replace("'", "\\'"); var wx_cat_3 = RegexUtils.GetStringQuery(ref inputData, "wx_cat_3")?.Replace("'", "\\'"); + var wx_cat_leaf = RegexUtils.GetStringQuery(ref inputData, "wx_cat_leaf")?.Replace("'", "\\'"); var search_ext_code = RegexUtils.GetStringQuery(ref inputData, "search_ext_code")?.Replace("'", "\\'"); var search_prod_name = RegexUtils.GetStringQuery(ref inputData, "search_prod_name")?.Replace("'", "\\'"); var search_group = RegexUtils.GetStringQuery(ref inputData, "search_group")?.Replace("'", "\\'"); @@ -433,6 +434,8 @@ namespace KJD_Web.BLL.BXX where += " and p.wx_cat_2 in (" + wx_cat_2 + ")"; if (!string.IsNullOrWhiteSpace(wx_cat_3)) where += " and p.wx_cat_3 in (" + wx_cat_3 + ")"; + if (!string.IsNullOrWhiteSpace(wx_cat_leaf)) + where += " and p.wx_cat_leaf in (" + wx_cat_leaf + ")"; if (!string.IsNullOrEmpty(has_wx_cat)) { @@ -623,7 +626,7 @@ namespace KJD_Web.BLL.BXX productLst.Add(prod); } JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }; - var data = JsonUtils.SerializerObjectToString(productLst, jsonSetting); + var data = JsonUtils.SerializeObjectToString(productLst, jsonSetting); var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000"); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}"; } @@ -765,7 +768,7 @@ namespace KJD_Web.BLL.BXX wxProdComplateArr.Add(wxProdComplateObj); } JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }; - var data = JsonUtils.SerializerObjectToString(wxProdComplateArr, jsonSetting); + var data = JsonUtils.SerializeObjectToString(wxProdComplateArr, jsonSetting); var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000"); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + wxProdComplateArr.Count + ",\"seconds\":" + seconds + "}"; } @@ -937,7 +940,7 @@ namespace KJD_Web.BLL.BXX productLst.Add(prod); } JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }; - var data = JsonUtils.SerializerObjectToString(productLst, jsonSetting); + var data = JsonUtils.SerializeObjectToString(productLst, jsonSetting); var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000"); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + productLst.Count + ",\"seconds\":" + seconds + "}"; } @@ -1063,6 +1066,61 @@ namespace KJD_Web.BLL.BXX return "{\"code\":19999,\"msg\":\"输入为空\"}"; } + public string GetProductMainCates(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); + string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); + if (time1 != EncrypUtil.Encryption(time)) + return "{\"code\":50000,\"msg\":\"校验失败\"}"; + + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); + if (string.IsNullOrEmpty(user_name)) + { + return "{\"code\":50001,\"msg\":\"没有用户名\"}"; + } + + int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); + int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + + //string sql = "SELECT DISTINCT p.cat_name FROM `bxx`.`product` p where p.is_del=0"; + string sql = "SELECT DISTINCT p.main_cat_name FROM `bxx`.`product` p where p.is_del=0"; + + string where = ""; + sql += where; + + var dt = mySql.ExecuteDataTable(sql); + mySql.Close(); + + if (dt != null) + { + try + { + string group_data = ""; + foreach (DataRow row in dt.Rows) + { + group_data += row["main_cat_name"].ToString() + ","; + } + var data = group_data.Trim(','); + return "{\"code\":200,\"msg\":\"success\",\"data\":\"" + data + "\"}"; + } + catch (Exception ex) + { + return "{\"code\":50002,\"msg\":\"" + ex.Message + "\",\"data\":\"\"}"; + } + } + else + { + return "{\"code\":50003,\"msg\":\"" + mySql.Message + "\",\"data\":\"\"}"; + } + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + /// /// 查询商品替换sku /// @@ -1139,7 +1197,7 @@ namespace KJD_Web.BLL.BXX } skuImgReplaceLst.Add(skuImgReplace); } - var data = JsonUtils.SerializerObjectToString(skuImgReplaceLst); + var data = JsonUtils.SerializeObjectToString(skuImgReplaceLst); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; } catch (Exception ex) @@ -1355,7 +1413,7 @@ namespace KJD_Web.BLL.BXX productLst.Add(prod); } JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }; - var data = JsonUtils.SerializerObjectToString(productLst, jsonSetting); + var data = JsonUtils.SerializeObjectToString(productLst, jsonSetting); var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000"); if (product_get_type == "厂商直采" && count > 500) count *= 3; @@ -1450,7 +1508,7 @@ namespace KJD_Web.BLL.BXX { imgs.Add(row["img_url"].ToString()); } - var data = JsonUtils.SerializerObjectToString(imgs); + var data = JsonUtils.SerializeObjectToString(imgs); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; } catch (Exception ex) @@ -2116,7 +2174,7 @@ namespace KJD_Web.BLL.BXX prodSelect.add_sub_sa_time = row["add_sub_sa_time"] as DateTime?; productLst.Add(prodSelect); } - var data = JsonUtils.SerializerObjectToString(productLst); + var data = JsonUtils.SerializeObjectToString(productLst); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; } catch (Exception ex) @@ -2748,7 +2806,7 @@ namespace KJD_Web.BLL.BXX productLst.Add(prod); } JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }; - var data = JsonUtils.SerializerObjectToString(productLst, jsonSetting); + var data = JsonUtils.SerializeObjectToString(productLst, jsonSetting); var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000"); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}"; } diff --git a/KJDService/KJD_WebService/BLL/BXX/BXXProductThirdManage.cs b/KJDService/KJD_WebService/BLL/BXX/BXXProductThirdManage.cs index 5ea3fbd..f7835d1 100644 --- a/KJDService/KJD_WebService/BLL/BXX/BXXProductThirdManage.cs +++ b/KJDService/KJD_WebService/BLL/BXX/BXXProductThirdManage.cs @@ -202,7 +202,7 @@ namespace KJD_Web.BLL.BXX } productLst.Add(prod); } - var data = JsonUtils.SerializerObjectToString(productLst); + var data = JsonUtils.SerializeObjectToString(productLst); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; } catch (Exception ex) @@ -622,7 +622,7 @@ namespace KJD_Web.BLL.BXX prodSelect.add_sub_sa_time = row["add_sub_sa_time"] as DateTime?; productLst.Add(prodSelect); } - var data = JsonUtils.SerializerObjectToString(productLst); + var data = JsonUtils.SerializeObjectToString(productLst); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; } catch (Exception ex) diff --git a/KJDService/KJD_WebService/BLL/BXX/BXXShopManage.cs b/KJDService/KJD_WebService/BLL/BXX/BXXShopManage.cs index eabfd58..c307a49 100644 --- a/KJDService/KJD_WebService/BLL/BXX/BXXShopManage.cs +++ b/KJDService/KJD_WebService/BLL/BXX/BXXShopManage.cs @@ -184,7 +184,7 @@ namespace KJD_Web.BLL.BXX } } } - var data = JsonUtils.SerializerObjectToString(shopList); + var data = JsonUtils.SerializeObjectToString(shopList); //return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; @@ -362,7 +362,7 @@ namespace KJD_Web.BLL.BXX } } } - var data = JsonUtils.SerializerObjectToString(shopList); + var data = JsonUtils.SerializeObjectToString(shopList); //return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; @@ -455,7 +455,7 @@ namespace KJD_Web.BLL.BXX }; shopList.Add(shop); } - var data = JsonUtils.SerializerObjectToString(shopList); + var data = JsonUtils.SerializeObjectToString(shopList); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; } } @@ -504,7 +504,7 @@ namespace KJD_Web.BLL.BXX }; shopList.Add(shop); } - var data = JsonUtils.SerializerObjectToString(shopList); + var data = JsonUtils.SerializeObjectToString(shopList); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; } } diff --git a/KJDService/KJD_WebService/BLL/BXX/BXXUserManage.cs b/KJDService/KJD_WebService/BLL/BXX/BXXUserManage.cs index d8d17ef..50db1a9 100644 --- a/KJDService/KJD_WebService/BLL/BXX/BXXUserManage.cs +++ b/KJDService/KJD_WebService/BLL/BXX/BXXUserManage.cs @@ -52,7 +52,7 @@ namespace KJD_Web.BLL.BXX { user.company_name = "-"; } - var data = JsonUtils.SerializerObjectToString(user); + var data = JsonUtils.SerializeObjectToString(user); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; } return "{\"code\":1,\"msg\":\"用户名或密码错误\"}"; @@ -145,7 +145,7 @@ namespace KJD_Web.BLL.BXX } userList.Add(user); } - var data = JsonUtils.SerializerObjectToString(userList); + var data = JsonUtils.SerializeObjectToString(userList); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; } } @@ -283,7 +283,7 @@ namespace KJD_Web.BLL.BXX } userList.Add(user); } - var data = JsonUtils.SerializerObjectToString(userList); + var data = JsonUtils.SerializeObjectToString(userList); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; } } diff --git a/KJDService/KJD_WebService/BLL/DYXD/DYShopManage.cs b/KJDService/KJD_WebService/BLL/DYXD/DYShopManage.cs index be63276..0dab8b5 100644 --- a/KJDService/KJD_WebService/BLL/DYXD/DYShopManage.cs +++ b/KJDService/KJD_WebService/BLL/DYXD/DYShopManage.cs @@ -184,7 +184,7 @@ namespace KJD_Web.BLL.DYXD } } } - var data = JsonUtils.SerializerObjectToString(shopList); + var data = JsonUtils.SerializeObjectToString(shopList); //return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; @@ -362,7 +362,7 @@ namespace KJD_Web.BLL.DYXD } } } - var data = JsonUtils.SerializerObjectToString(shopList); + var data = JsonUtils.SerializeObjectToString(shopList); //return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; @@ -455,7 +455,7 @@ namespace KJD_Web.BLL.DYXD }; shopList.Add(shop); } - var data = JsonUtils.SerializerObjectToString(shopList); + var data = JsonUtils.SerializeObjectToString(shopList); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; } } @@ -504,7 +504,7 @@ namespace KJD_Web.BLL.DYXD }; shopList.Add(shop); } - var data = JsonUtils.SerializerObjectToString(shopList); + var data = JsonUtils.SerializeObjectToString(shopList); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; } } diff --git a/KJDService/KJD_WebService/BLL/DYXD/DYUserManage.cs b/KJDService/KJD_WebService/BLL/DYXD/DYUserManage.cs index c686930..e02d5db 100644 --- a/KJDService/KJD_WebService/BLL/DYXD/DYUserManage.cs +++ b/KJDService/KJD_WebService/BLL/DYXD/DYUserManage.cs @@ -57,7 +57,7 @@ namespace KJD_Web.BLL.DYXD { user.company_name = "-"; } - var data = JsonUtils.SerializerObjectToString(user); + var data = JsonUtils.SerializeObjectToString(user); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; } return "{\"code\":1,\"msg\":\"用户名或密码错误\"}"; @@ -150,7 +150,7 @@ namespace KJD_Web.BLL.DYXD } userList.Add(user); } - var data = JsonUtils.SerializerObjectToString(userList); + var data = JsonUtils.SerializeObjectToString(userList); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; } } @@ -288,7 +288,7 @@ namespace KJD_Web.BLL.DYXD } userList.Add(user); } - var data = JsonUtils.SerializerObjectToString(userList); + var data = JsonUtils.SerializeObjectToString(userList); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; } } diff --git a/KJDService/KJD_WebService/BLL/KJD/OrderManage.cs b/KJDService/KJD_WebService/BLL/KJD/OrderManage.cs index 2aa98c8..c5bf5ac 100644 --- a/KJDService/KJD_WebService/BLL/KJD/OrderManage.cs +++ b/KJDService/KJD_WebService/BLL/KJD/OrderManage.cs @@ -251,7 +251,7 @@ namespace KJD_Web.BLL }; orderLst.Add(prod); } - var data = JsonUtils.SerializerObjectToString(orderLst); + var data = JsonUtils.SerializeObjectToString(orderLst); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; } catch (Exception ex) diff --git a/KJDService/KJD_WebService/BLL/KJD/PriceManage.cs b/KJDService/KJD_WebService/BLL/KJD/PriceManage.cs index 60cabbc..b85acce 100644 --- a/KJDService/KJD_WebService/BLL/KJD/PriceManage.cs +++ b/KJDService/KJD_WebService/BLL/KJD/PriceManage.cs @@ -175,7 +175,7 @@ namespace KJD_Web.BLL }; priceList.Add(price); } - var data = JsonUtils.SerializerObjectToString(priceList); + var data = JsonUtils.SerializeObjectToString(priceList); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; } catch (Exception ex) @@ -548,7 +548,7 @@ namespace KJD_Web.BLL }; purchasePriceList.Add(price); } - var data = JsonUtils.SerializerObjectToString(purchasePriceList); + var data = JsonUtils.SerializeObjectToString(purchasePriceList); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; } catch (Exception ex) diff --git a/KJDService/KJD_WebService/BLL/KJD/ProductManage.cs b/KJDService/KJD_WebService/BLL/KJD/ProductManage.cs index db94924..851edd7 100644 --- a/KJDService/KJD_WebService/BLL/KJD/ProductManage.cs +++ b/KJDService/KJD_WebService/BLL/KJD/ProductManage.cs @@ -118,7 +118,7 @@ namespace KJD_Web.BLL var group = row["group"].ToString(); groupNameLst.Add(group); } - var data = JsonUtils.SerializerObjectToString(groupNameLst); + var data = JsonUtils.SerializeObjectToString(groupNameLst); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; } catch (Exception ex) @@ -292,7 +292,7 @@ namespace KJD_Web.BLL } productLst.Add(prod); } - var data = JsonUtils.SerializerObjectToString(productLst); + var data = JsonUtils.SerializeObjectToString(productLst); var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000"); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}"; } @@ -877,7 +877,7 @@ namespace KJD_Web.BLL prodSelect.add_sub_sa_time = row["add_sub_sa_time"] as DateTime?; productLst.Add(prodSelect); } - var data = JsonUtils.SerializerObjectToString(productLst); + var data = JsonUtils.SerializeObjectToString(productLst); var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000"); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}"; } @@ -1256,7 +1256,7 @@ namespace KJD_Web.BLL }; dbIdMapProductIdLst.Add(dbIdMapProductId); } - var data = JsonUtils.SerializerObjectToString(dbIdMapProductIdLst); + var data = JsonUtils.SerializeObjectToString(dbIdMapProductIdLst); var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000"); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}"; } @@ -1347,7 +1347,7 @@ namespace KJD_Web.BLL }; draftIdMapUpSpuIdLst.Add(draftIdMapUpSpuId); } - var data = JsonUtils.SerializerObjectToString(draftIdMapUpSpuIdLst); + var data = JsonUtils.SerializeObjectToString(draftIdMapUpSpuIdLst); var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000"); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + -1 + ",\"seconds\":" + seconds + "}"; } @@ -1589,7 +1589,7 @@ namespace KJD_Web.BLL //} skuImgLst.Add(img); } - var data = JsonUtils.SerializerObjectToString(skuImgLst); + var data = JsonUtils.SerializeObjectToString(skuImgLst); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; } catch (Exception ex) diff --git a/KJDService/KJD_WebService/BLL/KJD/ProductThirdManage.cs b/KJDService/KJD_WebService/BLL/KJD/ProductThirdManage.cs index 9c72c98..9200da7 100644 --- a/KJDService/KJD_WebService/BLL/KJD/ProductThirdManage.cs +++ b/KJDService/KJD_WebService/BLL/KJD/ProductThirdManage.cs @@ -195,7 +195,7 @@ namespace KJD_Web.BLL } productLst.Add(prod); } - var data = JsonUtils.SerializerObjectToString(productLst); + var data = JsonUtils.SerializeObjectToString(productLst); var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000"); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}"; } @@ -316,7 +316,7 @@ namespace KJD_Web.BLL } productLst.Add(prod); } - var data = JsonUtils.SerializerObjectToString(productLst); + var data = JsonUtils.SerializeObjectToString(productLst); var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000"); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}"; } @@ -433,7 +433,7 @@ namespace KJD_Web.BLL } productLst.Add(prod); } - var data = JsonUtils.SerializerObjectToString(productLst); + var data = JsonUtils.SerializeObjectToString(productLst); var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000"); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}"; } @@ -1084,7 +1084,7 @@ namespace KJD_Web.BLL prodSelect.add_sub_sa_time = row["add_sub_sa_time"] as DateTime?; productLst.Add(prodSelect); } - var data = JsonUtils.SerializerObjectToString(productLst); + var data = JsonUtils.SerializeObjectToString(productLst); var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000"); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}"; } @@ -1451,7 +1451,7 @@ namespace KJD_Web.BLL }; dbIdMapProductIdLst.Add(dbIdMapProductId); } - var data = JsonUtils.SerializerObjectToString(dbIdMapProductIdLst); + var data = JsonUtils.SerializeObjectToString(dbIdMapProductIdLst); var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000"); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}"; } diff --git a/KJDService/KJD_WebService/BLL/KJD/ShopManage.cs b/KJDService/KJD_WebService/BLL/KJD/ShopManage.cs index de133f1..0ee4305 100644 --- a/KJDService/KJD_WebService/BLL/KJD/ShopManage.cs +++ b/KJDService/KJD_WebService/BLL/KJD/ShopManage.cs @@ -190,7 +190,7 @@ namespace KJD_Web.BLL } } } - var data = JsonUtils.SerializerObjectToString(shopList); + var data = JsonUtils.SerializeObjectToString(shopList); //return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; @@ -367,7 +367,7 @@ namespace KJD_Web.BLL } } } - var data = JsonUtils.SerializerObjectToString(shopList); + var data = JsonUtils.SerializeObjectToString(shopList); //return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; @@ -459,7 +459,7 @@ namespace KJD_Web.BLL }; shopList.Add(shop); } - var data = JsonUtils.SerializerObjectToString(shopList); + var data = JsonUtils.SerializeObjectToString(shopList); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; } } @@ -507,7 +507,7 @@ namespace KJD_Web.BLL }; shopList.Add(shop); } - var data = JsonUtils.SerializerObjectToString(shopList); + var data = JsonUtils.SerializeObjectToString(shopList); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; } } @@ -926,7 +926,7 @@ namespace KJD_Web.BLL }; cardCodeList.Add(cardCode); } - var data = JsonUtils.SerializerObjectToString(cardCodeList); + var data = JsonUtils.SerializeObjectToString(cardCodeList); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; diff --git a/KJDService/KJD_WebService/BLL/KJD/UserManage.cs b/KJDService/KJD_WebService/BLL/KJD/UserManage.cs index 3e20e3d..18a2203 100644 --- a/KJDService/KJD_WebService/BLL/KJD/UserManage.cs +++ b/KJDService/KJD_WebService/BLL/KJD/UserManage.cs @@ -54,7 +54,7 @@ namespace KJD_Web.BLL { user.company_name = "-"; } - var data = JsonUtils.SerializerObjectToString(user); + var data = JsonUtils.SerializeObjectToString(user); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; } return "{\"code\":1,\"msg\":\"用户名或密码错误\"}"; @@ -149,7 +149,7 @@ namespace KJD_Web.BLL } userList.Add(user); } - var data = JsonUtils.SerializerObjectToString(userList); + var data = JsonUtils.SerializeObjectToString(userList); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; } } @@ -295,7 +295,7 @@ namespace KJD_Web.BLL } userList.Add(user); } - var data = JsonUtils.SerializerObjectToString(userList); + var data = JsonUtils.SerializeObjectToString(userList); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; } } diff --git a/KJDService/KJD_WebService/BLL/WXXD/WXProductManage.cs b/KJDService/KJD_WebService/BLL/WXXD/WXProductManage.cs index 159a1d0..53ca2d9 100644 --- a/KJDService/KJD_WebService/BLL/WXXD/WXProductManage.cs +++ b/KJDService/KJD_WebService/BLL/WXXD/WXProductManage.cs @@ -236,57 +236,7 @@ namespace KJD_Web.BLL.WXXD public string WXGetPDDProductCates(string inputData) { - if (!string.IsNullOrEmpty(inputData)) - { - var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); - string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); - if (time1 != EncrypUtil.Encryption(time)) - return "{\"code\":50000,\"msg\":\"校验失败\"}"; - - var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); - if (string.IsNullOrEmpty(user_name)) - { - return "{\"code\":50001,\"msg\":\"没有用户名\"}"; - } - - int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); - int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50); - - string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; - MysqlUtils mySql = new MysqlUtils(conn); - - //string sql = "SELECT DISTINCT p.cat_name FROM `bxx`.`product` p where p.is_del=0"; - string sql = "SELECT DISTINCT p.main_cat_name FROM `bxx`.`product` p where p.is_del=0"; - - string where = ""; - sql += where; - - var dt = mySql.ExecuteDataTable(sql); - mySql.Close(); - - if (dt != null) - { - try - { - string group_data = ""; - foreach (DataRow row in dt.Rows) - { - group_data += row["main_cat_name"].ToString() + ","; - } - var data = group_data.Trim(','); - return "{\"code\":200,\"msg\":\"success\",\"data\":\"" + data + "\"}"; - } - catch (Exception ex) - { - return "{\"code\":50002,\"msg\":\"" + ex.Message + "\",\"data\":\"\"}"; - } - } - else - { - return "{\"code\":50003,\"msg\":\"" + mySql.Message + "\",\"data\":\"\"}"; - } - } - return "{\"code\":19999,\"msg\":\"输入为空\"}"; + return new BXX.BXXProductManage().GetProductMainCates(inputData); } /// @@ -565,7 +515,7 @@ namespace KJD_Web.BLL.WXXD }; prodSecretIdMapLst.Add(idMap); } - var data = JsonUtils.SerializerObjectToString(prodSecretIdMapLst); + var data = JsonUtils.SerializeObjectToString(prodSecretIdMapLst); var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000"); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}"; } @@ -611,7 +561,7 @@ namespace KJD_Web.BLL.WXXD string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; MysqlUtils mySql = new MysqlUtils(conn); - string sql = "SELECT coid FROM `wxxd`.`after_sale` where coid='" + coid + "'"; + string sql = "SELECT coid FROM `wxxd`.`after_sale` where coid='" + coid + "' and is_del=0"; string where = ""; sql += where; @@ -634,7 +584,7 @@ namespace KJD_Web.BLL.WXXD sql += ", supplier_name=@supplier_name "; if (type != null) sql += ", type=@type "; - sql += " WHERE coid=@coid;"; + sql += " WHERE coid=@coid and is_del=0;"; } List paramLst = new List(); @@ -661,6 +611,11 @@ namespace KJD_Web.BLL.WXXD return "{\"code\":19999,\"msg\":\"输入为空\"}"; } + /// + /// 上货实时获取 + /// + /// + /// public string WXGetAfterSale(string inputData) { if (!string.IsNullOrEmpty(inputData)) @@ -683,7 +638,7 @@ namespace KJD_Web.BLL.WXXD string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; MysqlUtils mySql = new MysqlUtils(conn); - string sql = "SELECT * FROM `wxxd`.`after_sale` where coid='" + coid + "'"; + string sql = "SELECT * FROM `wxxd`.`after_sale` where coid='" + coid + "' and is_del=0"; string where = ""; sql += where; @@ -719,6 +674,11 @@ namespace KJD_Web.BLL.WXXD return "{\"code\":19999,\"msg\":\"输入为空\"}"; } + /// + /// 售后列表管理 + /// + /// + /// public string WXGetAfterSaleList(string inputData) { if (!string.IsNullOrEmpty(inputData)) @@ -741,6 +701,7 @@ namespace KJD_Web.BLL.WXXD string type = RegexUtils.GetStringQuery(ref inputData, "type")?.Replace("'", "\\'"); string supplier_name = RegexUtils.GetStringQuery(ref inputData, "supplier_name")?.Replace("'", "\\'"); string detail = RegexUtils.GetStringQuery(ref inputData, "detail")?.Replace("'", "\\'"); + string isDel = RegexUtils.GetStringQuery(ref inputData, "isDel")?.Replace("'", "\\'"); string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; MysqlUtils mySql = new MysqlUtils(conn); @@ -756,6 +717,12 @@ namespace KJD_Web.BLL.WXXD where += " and supplier_name='" + supplier_name + "'"; if (detail != null) where += " and after_sale_json like '%" + detail + "%'"; + + if (isDel == "true") + where += " and is_del>0"; + else + where += " and is_del=0"; + sql += where; sql += ";"; @@ -795,7 +762,7 @@ namespace KJD_Web.BLL.WXXD }); } JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }; - var data = JsonUtils.SerializerObjectToString(WXAddressInfoLst, jsonSetting); + var data = JsonUtils.SerializeObjectToString(WXAddressInfoLst, jsonSetting); var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000"); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + ",\"seconds\":" + seconds + "}"; } @@ -835,7 +802,8 @@ namespace KJD_Web.BLL.WXXD string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; MysqlUtils mySql = new MysqlUtils(conn); - string sql = "delete from wxxd.after_sale where coid='" + coid + "'"; + //string sql = "delete from wxxd.after_sale where coid='" + coid + "' and is_del=false"; + string sql = "update wxxd.after_sale set is_del=" + RandomUtils.GetId(1, Int32.MaxValue) + " where coid='" + coid + "' and is_del=false"; var rst = mySql.ExecuteNonQuery(sql); mySql.Close(); diff --git a/KJDService/KJD_WebService/BLL/WXXD/WXShopManage.cs b/KJDService/KJD_WebService/BLL/WXXD/WXShopManage.cs index 6524f13..dbbc437 100644 --- a/KJDService/KJD_WebService/BLL/WXXD/WXShopManage.cs +++ b/KJDService/KJD_WebService/BLL/WXXD/WXShopManage.cs @@ -188,7 +188,7 @@ namespace KJD_Web.BLL.WXXD // } // } //} - var data = JsonUtils.SerializerObjectToString(shopList); + var data = JsonUtils.SerializeObjectToString(shopList); var seconds = (DateTime.Now - timeCalc).TotalSeconds.ToString("0.000"); //return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; @@ -367,7 +367,7 @@ namespace KJD_Web.BLL.WXXD } } } - var data = JsonUtils.SerializerObjectToString(shopList); + var data = JsonUtils.SerializeObjectToString(shopList); //return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; @@ -461,7 +461,7 @@ namespace KJD_Web.BLL.WXXD }; shopList.Add(shop); } - var data = JsonUtils.SerializerObjectToString(shopList); + var data = JsonUtils.SerializeObjectToString(shopList); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; } } @@ -511,7 +511,7 @@ namespace KJD_Web.BLL.WXXD }; shopList.Add(shop); } - var data = JsonUtils.SerializerObjectToString(shopList); + var data = JsonUtils.SerializeObjectToString(shopList); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; } } @@ -828,7 +828,7 @@ namespace KJD_Web.BLL.WXXD return "{\"code\":500,\"msg\":\"" + errMsg + "\"}"; } mdyTime = DateTime.Now; - tokens = JsonUtils.SerializerObjectToString(JObject.Parse(tokenRst)["list"]); + tokens = JsonUtils.SerializeObjectToString(JObject.Parse(tokenRst)["list"]); conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; mySql = new MysqlUtils(conn); diff --git a/KJDService/KJD_WebService/BLL/WXXD/WXUserManage.cs b/KJDService/KJD_WebService/BLL/WXXD/WXUserManage.cs index a2a6c68..5538902 100644 --- a/KJDService/KJD_WebService/BLL/WXXD/WXUserManage.cs +++ b/KJDService/KJD_WebService/BLL/WXXD/WXUserManage.cs @@ -58,7 +58,7 @@ namespace KJD_Web.BLL.WXXD { user.company_name = "-"; } - var data = JsonUtils.SerializerObjectToString(user); + var data = JsonUtils.SerializeObjectToString(user); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; } return "{\"code\":1,\"msg\":\"用户名或密码错误\"}"; @@ -153,7 +153,7 @@ namespace KJD_Web.BLL.WXXD } userList.Add(user); } - var data = JsonUtils.SerializerObjectToString(userList); + var data = JsonUtils.SerializeObjectToString(userList); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; } } @@ -295,7 +295,7 @@ namespace KJD_Web.BLL.WXXD } userList.Add(user); } - var data = JsonUtils.SerializerObjectToString(userList); + var data = JsonUtils.SerializeObjectToString(userList); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; } } diff --git a/KJDService/KJD_WebService/BXXProductService.asmx.cs b/KJDService/KJD_WebService/BXXProductService.asmx.cs index 0c990c0..08382b0 100644 --- a/KJDService/KJD_WebService/BXXProductService.asmx.cs +++ b/KJDService/KJD_WebService/BXXProductService.asmx.cs @@ -242,6 +242,17 @@ namespace KJD_Web Context.Response.End(); } + [WebMethod] + public void get_pdd_product_cates() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new BXXProductManage().GetProductMainCates(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } [WebMethod] public void get_product_cates() { diff --git a/KJDService/KJD_WebService/KJD_WebService.csproj b/KJDService/KJD_WebService/KJD_WebService.csproj index 10f429b..3f4a01a 100644 --- a/KJDService/KJD_WebService/KJD_WebService.csproj +++ b/KJDService/KJD_WebService/KJD_WebService.csproj @@ -75,6 +75,7 @@ + @@ -116,9 +117,23 @@ + + + + + + + + + + WXProd.aspx + + + WXProd.aspx + diff --git a/KJDService/KJD_WebService/Model/DBProductResultParam.cs b/KJDService/KJD_WebService/Model/DBProductResultParam.cs index 1c2f8f2..ca7c4ed 100644 --- a/KJDService/KJD_WebService/Model/DBProductResultParam.cs +++ b/KJDService/KJD_WebService/Model/DBProductResultParam.cs @@ -103,4 +103,9 @@ namespace KJD_Web.Model public string has_wx_format { get; set; } public string standby3 { get; set; } } + + public class KJDDBProduct : DBProductResultParam + { + + } } \ No newline at end of file diff --git a/KJDService/KJD_WebService/Model/PddModel/PDDMaterialInfo.cs b/KJDService/KJD_WebService/Model/PddModel/PDDMaterialInfo.cs new file mode 100644 index 0000000..1f6cc6e --- /dev/null +++ b/KJDService/KJD_WebService/Model/PddModel/PDDMaterialInfo.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace KJD_WebService.Model +{ + public class PDDMaterialInfo + { + public long? latest_material_id { get; set; } + public string latest_material { get; set; } + public int? check_status { get; set; } + public object check_comment { get; set; } + public string online_material { get; set; } + } +} diff --git a/KJDService/KJD_WebService/Model/PddModel/PDDProductDecorationInfo.cs b/KJDService/KJD_WebService/Model/PddModel/PDDProductDecorationInfo.cs new file mode 100644 index 0000000..79bbe90 --- /dev/null +++ b/KJDService/KJD_WebService/Model/PddModel/PDDProductDecorationInfo.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace KJD_WebService.Model +{ + public class PDDProductDecorationInfo + { + public long? goods_id { get; set; } + public long? goods_commit_id { get; set; } + public long? mall_id { get; set; } + public List floor_list { get; set; } = new List(); + public long? create_time { get; set; } + public long? update_time { get; set; } + } + + public class PDDProdfloorItem + { + public long? floor_id { get; set; } + public string key { get; set; } + public string type { get; set; } + public int? priority { get; set; } + public List content_list { get; set; } + public object check_status { get; set; } + public object check_id { get; set; } + public object check_name { get; set; } + public object comment { get; set; } + public object if_have_template { get; set; } + public object floor_status { get; set; } + public object template_id { get; set; } + public object template_type { get; set; } + public object template_json { get; set; } + } + + public class PDDProdContentItem + { + public string img_url { get; set; } + public long? file_id { get; set; } + public int? height { get; set; } + public int? width { get; set; } + public int? file_status { get; set; } + public object goods_id { get; set; } + public object goods_name { get; set; } + public object show_price { get; set; } + public object status { get; set; } + public object min_on_sale_group_price { get; set; } + public string text { get; set; } + public object hot_zone_list { get; set; } + public text_module_detail_item text_module_details { get; set; } + public object activity_sn { get; set; } + public object combine_buy_element_dtolist { get; set; } + + } + + public class text_module_detail_item + { + public int? font_size { get; set; } + public string font_color { get; set; } + public int font_family { get; set; } + public string align { get; set; } + public string background_color { get; set; } + } +} diff --git a/KJDService/KJD_WebService/Model/PddModel/PDDProductDetailInfo.cs b/KJDService/KJD_WebService/Model/PddModel/PDDProductDetailInfo.cs new file mode 100644 index 0000000..8e9d03a --- /dev/null +++ b/KJDService/KJD_WebService/Model/PddModel/PDDProductDetailInfo.cs @@ -0,0 +1,331 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace KJD_WebService.Model +{ + public class PDDProductDetailInfo + { + public long? id { get; set; } + public long? goods_id { get; set; } + public int? check_status { get; set; } + public int? commit_deleted { get; set; } + public string owner { get; set; } + public int? is_shop { get; set; } + public string goods_sn { get; set; } + public string out_goods_sn { get; set; } + public int? is_folt { get; set; } + public string warm_tips { get; set; } + public object fabric { get; set; } + + + public object fabric_content { get; set; } + public long? cost_template_id { get; set; } + public int? cat_id { get; set; } + public long? mall_id { get; set; } + public string goods_name { get; set; } + public string tiny_name { get; set; } + public string goods_desc { get; set; } + public string share_desc { get; set; } + public List list_desc { get; set; } + + public int? market_price { get; set; } + public string thumb_url { get; set; } + public string image_url { get; set; } + public string hd_thumb_url { get; set; } + public List allowed_region { get; set; } + + + public int? region_limit { get; set; } + public int? goods_type { get; set; } + public object country { get; set; } + public int? country_id { get; set; } + public string goods_name_prefix { get; set; } + public int? origin_country_id { get; set; } + public string origin_country_name { get; set; } + public object size_spec_id { get; set; } + public object size_parent_spec_id { get; set; } + public string warehouse { get; set; } + public int? event_type { get; set; } + public int? is_app { get; set; } + public int? is_pre_sale { get; set; } + public int? pre_sale_time { get; set; } + public int? is_sku_pre_sale { get; set; } + public int? is_refundable { get; set; } + public int? is_customs { get; set; } + public int? is_wms { get; set; } + public string customs { get; set; } + public int? is_bangdan { get; set; } + public long? shipment_limit_second { get; set; } + public int? quick_refund { get; set; } + public group_item groups { get; set; } + public commit_extension_item commit_extension { get; set; } + public List galleries { get; set; } + public List goods_commit_check { get; set; } + public mall_info_item mall_info { get; set; } + public List sku { get; set; } + + + public object reject_status { get; set; } + public object reject_reason { get; set; } + public object paper_net_weight { get; set; } + public object paper_length { get; set; } + public object paper_width { get; set; } + public object paper_plies_num { get; set; } + public int? second_hand { get; set; } + public int? source { get; set; } + public bool is_card_secret { get; set; } + public bool is_only_for_remote_area { get; set; } + public int? invoice_status { get; set; } + public object invoice_mode { get; set; } + public object client_id { get; set; } + public int? quan_guo_lian_bao { get; set; } + public int? zhi_huan_bu_xiu { get; set; } + public object song_huo_ru_hu { get; set; } + public object shang_men_an_zhuang { get; set; } + public object song_huo_an_zhuang { get; set; } + public object mai_jia_zi_ti { get; set; } + public object sf_markup_template_sn { get; set; } + public long? min_group_price { get; set; } + public long? max_group_price { get; set; } + public int? must_check_type { get; set; } + public object goods_property_list { get; set; } + public object is_small_group { get; set; } + public int? submit_time { get; set; } + public int? oversea_type { get; set; } + public object oversea_goods { get; set; } + public int? is_general_trade { get; set; } + public int? bad_fruit_claim { get; set; } + public string bad_claim_text { get; set; } + public int? allergy_refund { get; set; } + public int? lack_of_weight_claim { get; set; } + public int? delivery_one_day { get; set; } + public object delivery_type { get; set; } + public int? goods_pattern { get; set; } + public int? customizable { get; set; } + public int? is_group_pre_sale { get; set; } + public object elec_goods_attributes { get; set; } + public schedule_sale_item schedule_sale { get; set; } + + public object goods_trade_attr { get; set; } + public object goods_travel_attr { get; set; } + public object sku_type { get; set; } + public int? is_goods_decoration { get; set; } + public List goods_srv_templates { get; set; } + + public object card_verification_list { get; set; } + public object transport_type_list { get; set; } + public object out_source_type { get; set; } + public object out_source_goods_id { get; set; } + public object is_all_weight_same { get; set; } + public bool? is_spring_festival_open_tag { get; set; } + public int? two_pieces_discount { get; set; } + + public instruction_vo_item instruction_vo { get; set; } + public object local_service_id_list { get; set; } + public object shop_group_id { get; set; } + public object shop_group_name { get; set; } + public int? is_refundable_fifteen_day { get; set; } + public int? is_warranty_one_year { get; set; } + public long? created_at { get; set; } + public int? privacy_delivery { get; set; } + public object invoice_mode_sub_type { get; set; } + public bool? is_two_num_group { get; set; } + public extend_warranty_dto_item extend_warranty_dto { get; set; } + public int? is_sku_shipment { get; set; } + public List qualification_id_list { get; set; } + public int? is_certificate_provide { get; set; } + public int? thawed_refund { get; set; } + public int? damage_claim { get; set; } + public int? is_wp_service { get; set; } + public int? is_size_change_casually { get; set; } + public string owner_name { get; set; } + public bool? show_activity_price { get; set; } + public object appeal_status { get; set; } + public object can_appeal { get; set; } + + public List cat_ids { get; set; } + public List cats { get; set; } + + public bool? is_draft { get; set; } + public int? third_type { get; set; } + public int? estimate_quantity { get; set; } + public int? last_commit_check_status { get; set; } + public bool? is_deposit { get; set; } + public object gold_price_template_id { get; set; } + public object gold_price_type { get; set; } + public int? processing_charges { get; set; } + public object processing_charges_type { get; set; } + public object is_gold_price_matched { get; set; } + public object shoes_template_id { get; set; } + public object spu_id { get; set; } + public object spu_version { get; set; } + public object is_goods_copy { get; set; } + public int? promised_delivery_seconds { get; set; } + public int? community_group_buying { get; set; } + public int? purchase_info_supply { get; set; } + public int? same_city_template_id { get; set; } + public object goods_certificate { get; set; } + public int? is_customized { get; set; } + public string name_prefix { get; set; } + public object business_source_type { get; set; } + public object creator_name { get; set; } + public object reason { get; set; } + public object app_id { get; set; } + public object app_name { get; set; } + public int? user_source { get; set; } + public object check_type { get; set; } + } + + public class group_item + { + public int? single_price { get; set; } + public int? group_price { get; set; } + public object carnival_price { get; set; } + public int? customer_num { get; set; } + public int? buy_limit { get; set; } //999999 + public int? order_limit { get; set; } //999999 + public string regular_limit { get; set; } + public object regular_limit_duration { get; set; } + public object min_num_of_order { get; set; } + public int? community_group_buying { get; set; } = 0; + } + + + public class commit_extension_item + { + public int? id { get; set; } + public int? goods_commit_id { get; set; } + public int? start_production_date { get; set; } + public int? end_production_date { get; set; } + public string production_license { get; set; } + public string production_standard_number { get; set; } + public int? shelf_life { get; set; } + public string out_goods_sn { get; set; } + public object created_at { get; set; } + public object updated_at { get; set; } + } + + public class gallery_item + { + public string url { get; set; } + public int? width { get; set; } + public int? height { get; set; } + // 图片类型 1 主图 2 详情图 3视频 + public int? type { get; set; } + public object source { get; set; } + public object status { get; set; } + public object video_url { get; set; } + public object file_id { get; set; } + public object is_deleted { get; set; } + public object check_comment { get; set; } + public object origin_url { get; set; } + } + + public class mall_info_item { + public string mall_name { get; set; } + } + + public class sku_edit_item : sku_item + { + public string thumb_md5 { get; set; } + } + + public class sku_item + { + public long? id { get; set; } + public long? sku_id { get; set; } + public object sku_sn { get; set; } + public int? carnival_price { get; set; } + public int? init_quantity { get; set; } + public int? is_onsale { get; set; } + public int? limit_quantity { get; set; } = 999999; // 999999 max + public int? multi_price { get; set; } + public object multi_price_in_yuan { get; set; } + public int? price { get; set; } + public object price_in_yuan { get; set; } + public int? quantity { get; set; } + public int? reserve_quantity { get; set; } + public int? weight { get; set; } + public string thumb_url { get; set; } + public long? thumb_url_file_id { get; set; } + public object thumb_url_status { get; set; } + public object thumb_url_is_deleted { get; set; } + public int? quantity_delta { get; set; } + public List spec { get; set; } + // 货号 + public string out_sku_sn { get; set; } + public object batch_id { get; set; } + public int? priority { get; set; } + public int? ware_id { get; set; } + public object ware_biz_type { get; set; } // null + public object advice_price { get; set; } + public object length { get; set; } + public oversea_sku_item oversea_sku { get; set; } + public object cspu_id { get; set; } + public object child_skus { get; set; } + public long? ref_sku_commit_id { get; set; } + public object start_time { get; set; } + public object end_time { get; set; } + public object sku_srv_templates { get; set; } + public object calendar_rule_id { get; set; } + public object hot_live_group { get; set; } + public int? pre_sale_time { get; set; } + public object out_source_sku_id { get; set; } + public object dd_grocery_sku_params { get; set; } + public object sku_extended_attribute_dtos { get; set; } + public object sku_basic_property_dtos { get; set; } + public object spec_note_map { get; set; } + public object delivery_schedule_dtos { get; set; } + public List shipment_limit_second_list { get; set; } + public string sku69_code { get; set; } + + } + + public class spec_item + { + public long? parent_id { get; set; } + public string parent_name { get; set; } + public long? spec_id { get; set; } + public string spec_name { get; set; } + public object spec_note { get; set; } + public object bundle_spec_list { get; set; } + public object sku_combination { get; set; } + public object is_custom { get; set; } + } + + public class oversea_sku_item + { + public object specifications { get; set; } + public object measurement_code { get; set; } + public object measurement_unit { get; set; } + public object taxation { get; set; } + public object record_id_list { get; set; } + } + + public class schedule_sale_item + { + public int? sale_type { get; set; } + public object sale_time_fixed { get; set; } + public object sale_time { get; set; } + public object price_show { get; set; } + public object price_desc { get; set; } + } + + public class instruction_vo_item + { + public object template_id { get; set; } + public int? template_status { get; set; } + public object template_name { get; set; } + public object rejected_reason { get; set; } + } + + public class extend_warranty_dto_item + { + public int? extend_warranty { get; set; } + public object extend_warranty_year { get; set; } + public object extend_warranty_range { get; set; } + } +} diff --git a/KJDService/KJD_WebService/Model/PddModel/PDDProductInfo.cs b/KJDService/KJD_WebService/Model/PddModel/PDDProductInfo.cs new file mode 100644 index 0000000..b1b4112 --- /dev/null +++ b/KJDService/KJD_WebService/Model/PddModel/PDDProductInfo.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace KJD_WebService.Model +{ + public class PDDProductInfo + { + public PDDProductDetailInfo detail { get; set; } + public PDDSizeSpecInfo size { get; set; } + public PDDProductDecorationInfo decoration { get; set; } + public PDDProductPropertyInfo property { get; set; } + /// + /// 白底图 + /// + public PDDMaterialInfo material1 { get; set; } + /// + /// 长图 + /// + public PDDMaterialInfo material3 { get; set; } + public object source_json { get; set; } + public string sale_count { get; set; } + public string sale_count_text { get; set; } + + + + public string chance_id { get; set; } + public string chance_refere { get; set; } // 记录机会商品提交的refere + public string chance_tab { get; set; } // 记录机会商品提交的tab + } +} diff --git a/KJDService/KJD_WebService/Model/PddModel/PDDProductPropertyInfo.cs b/KJDService/KJD_WebService/Model/PddModel/PDDProductPropertyInfo.cs new file mode 100644 index 0000000..020efdc --- /dev/null +++ b/KJDService/KJD_WebService/Model/PddModel/PDDProductPropertyInfo.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace KJD_WebService.Model +{ + public class PDDProductPropertyInfo + { + public List goods_properties { get; set; } + public object sku_properties { get; set; } + } + + public class goods_propertie_item + { + public string name { get; set; } + public int? ref_pid { get; set; } + public List values { get; set; } + /// + /// 对应微信输入类型 + /// + //public int? wx_input_type { get; set; } + } + public class value_item + { + public long? vid { get; set; } + public string value { get; set; } + public string unit { get; set; } + public string raw_value { get; set; } + public table_info_vo_info table_info_vo { get; set; } + } + + public class table_info_vo_info + { + public List table_value_list { get; set; } + } + + public class table_value_info + { + public string value { get; set; } // "100.0", + public string unit { get; set; } // "%", + public int? column_type { get; set; } // 1 + + } +} diff --git a/KJDService/KJD_WebService/Model/PddModel/PDDSizeSpecInfo.cs b/KJDService/KJD_WebService/Model/PddModel/PDDSizeSpecInfo.cs new file mode 100644 index 0000000..42704d1 --- /dev/null +++ b/KJDService/KJD_WebService/Model/PddModel/PDDSizeSpecInfo.cs @@ -0,0 +1,119 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace KJD_WebService.Model +{ + //public class PDDSizeSpecInfo + //{ + // public long? id { get; set; } + // public int? extendType { get; set; } + //} + //public class SizeContentItem + //{ + // public string picUrl { get; set; } + //} + + public class GroupsItem + { + /// + /// + /// + public int? id { get; set; } + /// + /// 中国码 + /// + public string name { get; set; } + /// + /// + /// + public bool? required { get; set; } + } + + public class ElementItem + { + /// + /// + /// + public int? id { get; set; } + /// + /// 肩宽(cm) + /// + public string name { get; set; } + /// + /// + /// + public bool? required { get; set; } + } + + public class MetaItem + { + /// + /// + /// + public List groups { get; set; } + /// + /// + /// + public List elements { get; set; } + /// + /// + /// + public List batchableElementIds { get; set; } + } + + + public class RecordItem + { + /// + /// + /// + public Dictionary values { get; set; } + } + + public class ContentItem + { + /// + /// + /// + public MetaItem meta { get; set; } + /// + /// + /// + public List records { get; set; } + /// + /// + /// + public string picUrl { get; set; } + } + + public class PDDSizeSpecInfo + { + /// + /// + /// + public long? id { get; set; } + /// + /// + /// + public int? extendType { get; set; } + /// + /// + /// + public ContentItem content { get; set; } + /// + /// + /// + public int? classId { get; set; } + /// + /// + /// + public bool? reusable { get; set; } + /// + /// + /// + public int? status { get; set; } + } +} diff --git a/KJDService/KJD_WebService/Model/WxModel/WXClientProductInfoLite.cs b/KJDService/KJD_WebService/Model/WxModel/WXClientProductInfoLite.cs new file mode 100644 index 0000000..0240d00 --- /dev/null +++ b/KJDService/KJD_WebService/Model/WxModel/WXClientProductInfoLite.cs @@ -0,0 +1,169 @@ +using NaiBa.Util.Extension; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace KJD_WebService.Model.WxModel +{ + public class WXClientProductInfoLite + { + public wx_client_prod_key product_key { get; set; } + + public wx_client_prod_info info { get; set; } + + public List productSkus { get; set; } + } + + public class wx_client_prod_info + { + public string title { get; set; } // "2026新款情侣棒球帽立体C字母刺绣显脸小时尚百搭休闲韩版大头围鸭舌帽", + public string sub_title { get; set; } // "2025新款C字母立体刺绣棒球帽", + /// + /// 主图列表 + /// + public List head_img { get; set; } // ["https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/64f0a5760000484b151963b6bb81bc1e000000a000004f50", ...] + public List category { get; set; } // { "cat_id": "6093" } + /// + /// 商品详情(图) + /// + public wx_client_prod_detail detail { get; set; } + /// + /// 商品属性 + /// + public List param { get; set; } + /// + /// 品牌id + /// + public string brand_id { get; set; } // "10250056" + public wx_client_sku_id_list sku_id_list { get; set; } + public wx_sku sku_list { get; set; } + public List product_sale_attrs { get; set; } + /// + /// 总销量 + /// + public string total_sold_num { get; set; } // "46631" + public wx_client_service_desc service_desc { get; set; } + public wx_client_express_info express_info { get; set; } + public List headVideoInfo { get; set; } + + public object afterSaleInfo { get; set; } + public List deliveryExpressFee { get; set; } + public List templateInfo { get; set; } + public string spuCode { get; set; } + } + + public class wx_client_express_info + { + public string template_id { get; set; } // "243911370004", + public string product_id { get; set; } // "10000066623849", + public int? piece { get; set; } // 1, + public int? weight { get; set; } // 0, + public int? price { get; set; } // 5980 + } + + public class wx_client_service_desc + { + public string desc { get; set; } // "(麻烦阿姐阿哥们,带纸箱邮寄过去的一定记得用纸盒邮寄回,袋子邮寄的,带袋子寄回,拒收到付件,拒收自提件)" + } + + public class wx_client_sku_id_list + { + public List sku_ids { get; set; } //[ "1597139289", "1597121531", "1597127451", "1597113890", "1597119654" ] + } + + public class wx_client_prod_key + { + public string product_id { get; set; } // "10000066623849", + public string appid { get; set; } // "wx62cca7dc2354b687" + } + + public class wx_client_head_video_info + { + public string videoUrl { get; set; } // "https://wst.wxapp.tc.qq.com/162/20302/snssvpdownload/SH/reserved/0bc3yya5qaabfaaeaq6thjt2nrwd3ddadwaa.f100001.mp4?wdis_k=7cdc03c564ae62499c03d8034036e65c4405cd2d&wdis_t=1773699072&appid=none&scene=0&ext=eyJjaSI6MTAwMDY5LCJjczBjIjoxNywiY3MwbyI6NDA1MzAsImNzMWMiOjQsImNzMW8iOjExMDQ0OSwicnMiOiIyNDIwNDozIn0", + public string videoHeadImg { get; set; } // "https://wst.wxapp.tc.qq.com/162/20302/snssvpdownload/SH/reserved/0bc3yya5qaabfaaeaq6thjt2nrwd3ddadwaa.f1400_0.jpeg?wdis_k=7f202df2767ca6d4b8cec6f52d1706ea8e497708&wdis_t=1773699072&appid=none&scene=0&ext=eyJjaSI6MTAwMDY5LCJjczBjIjoxNywiY3MwbyI6NDA1MzAsImNzMWMiOjQsImNzMW8iOjExMDQ0OSwicnMiOiIyNDIwNDozIn0", + public int? videoLen { get; set; } // 24, + public string videoSize { get; set; } // "0", + public int? videoSource { get; set; } // 0, + public int? videoFormat { get; set; } // 0, + public string playableVideoUrl { get; set; } // "https://wst.wxapp.tc.qq.com/162/20302/snssvpdownload/SH/reserved/0bc3yya5qaabfaaeaq6thjt2nrwd3ddadwaa.f100001.mp4?wdis_k=7cdc03c564ae62499c03d8034036e65c4405cd2d&wdis_t=1773699072&appid=none&scene=0&ext=eyJjaSI6MTAwMDY5LCJjczBjIjoxNywiY3MwbyI6NDA1MzAsImNzMWMiOjQsImNzMW8iOjExMDQ0OSwicnMiOiIyNDIwNDozIn0", + public int? videoWidth { get; set; } // 1080, + public int? videoHeight { get; set; } // 1080, + public string videoH265Url { get; set; } // "https://wst.wxapp.tc.qq.com/162/20302/snssvpdownload/SH/reserved/0bc3yya5qaabfaaeaq6thjt2nrwd3ddadwaa.f100003.mp4?wdis_k=057570644d9b72ff0c62e85b1c54cf0f0a8b42f6&wdis_t=1773699072&appid=none&scene=0&ext=eyJjaSI6MTAwMDY5LCJjczBjIjoxNywiY3MwbyI6NDA1MzAsImNzMWMiOjQsImNzMW8iOjExMDQ0OSwicnMiOiIyNDIwNDozIn0", + public int? videoH265Width { get; set; } // 720, + public int? videoH265Height { get; set; } // 720 + } + + public class wx_client_product_sale_attr + { + public string key { get; set; } // "颜色" + public List items { get; set; } + public bool? has_img { get; set; } + } + + public class wx_client_product_sale_attr_item + { + public string value { get; set; } // "卡其色" + public string img_url { get; set; } // "https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/64eb0fd5000f2ca50a23b45f3567b01e000000a100004f50" + public List sku_ids { get; set; } // [ "1597139289" ] + } + + public class wx_sku + { + public List sku_info { get; set; } + public string min_price_sku_id { get; set; } // "1597139289" + public string default_selected_sku_id { get; set; } // "1597139289" + } + + public class wx_client_sku_info + { + public string sku_id { get; set; } // "1597139289", + public int? price { get; set; } // 5980, + public bool? is_discounted { get; set; } // true, + public int? discounted_price { get; set; } // 2990, + public int? origin_price { get; set; } // 5980, + } + + public class wx_client_prod_detail + { + /// + /// 详情图 + /// + public List detail_img { get; set; } // ["https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/64f21d2b00009e7a156bc7cd6d63b01e000000a000004f50", ...] + public List detailImg { get; set; } // ["https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/64f21d2b00009e7a156bc7cd6d63b01e000000a000004f50", ...] + public List detail_img_real { get { return detail_img == null ? detailImg : detail_img; } } + public string desc { get; set; } // "纯萃美2025新款情侣棒球帽立体C字母刺绣显脸小时尚百搭休闲网红款韩版大头围硬顶鸭舌帽男女同款" + ///// + ///// + ///// + //public List detailImg { get; set; } + ///// + ///// 纯萃美2025新款情侣棒球帽立体C字母刺绣显脸小时尚百搭休闲网红款韩版大头围硬顶鸭舌帽男女同款 + ///// + //public string desc { get; set; } + } + + public class wx_client_param + { + public List categorys { get; set; } + } + + public class wx_client_category + { + public string catIdStr { get { return cat_id.IsNullOrEmpty() ? catId : cat_id; } } // "0", + public string cat_id { get; set; } // "0", + public string catId { get; set; } // "0", + public string name { get; set; } // "主要材质", "C字母刺绣" + public string f_cat_id { get; set; } // "0", + public string brand_cat { get; set; } // "0", + public wx_client_cat_info cat_info { get; set; } + } + + public class wx_client_cat_info + { + public int? is_required { get; set; } // 1, + public int? is_customize { get; set; } // 0, + public int? input_type { get; set; } // 1 + } +} diff --git a/KJDService/KJD_WebService/Model/WxModel/WXGetEditProductInfoLite.cs b/KJDService/KJD_WebService/Model/WxModel/WXGetEditProductInfoLite.cs new file mode 100644 index 0000000..dfe8828 --- /dev/null +++ b/KJDService/KJD_WebService/Model/WxModel/WXGetEditProductInfoLite.cs @@ -0,0 +1,191 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace KJD_WebService.Model.WxModel +{ + public class WXGetEditProductInfoLite + { + public WXProductInfo product { get; set; } + public WXAfterSaleAddressInfo address { get; set; } + } + + public class WXAfterSaleAddressInfo + { + public string addressId { get; set; } // "69496256002", + public string name { get; set; } // "", + public WXAddressInfo addressInfo { get; set; } + } + + public class WXAddressInfo + { + public string userName { get; set; } // "王总", + public string postalCode { get; set; } // "", + public string provinceName { get; set; } // "安徽省", + public string cityName { get; set; } // "合肥市", + public string countyName { get; set; } // "肥西县", + public string detailInfo { get; set; } // "蜀山区长江西路某某号某某单元", + public string telNumber { get; set; } // "18388888888", + public int? lat { get; set; } // 0, + public int? lng { get; set; } // 0 + } + + public class WXProductInfo + { + public List productSkus { get; set; } + public WXProductKeyInfo productKey { get; set; } + public WXProductInfoInfo info { get; set; } + public int? status { get; set; } // 5 + public string createTime { get; set; } // "1772529740", + public string updateTime { get; set; } // "1772533190", + public int? version { get; set; } // 8, + public int? editStatus { get; set; } // 4, + public string editTime { get; set; } // "1772533189", + public int source { get; set; } // 1 + } + + public class WXProductSkuInfoLite + { + public WXSkuKeyInfoLite skuKey { get; set; } + public WXProductSkuInfoInfoLite productSkuInfo { get; set; } + } + + public class WXProductSkuInfoInfoLite + { + public List saleParam { get; set; } + public string thumbImg { get; set; } // "https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/69a6a1ae000e63741a5ddf35d5b71715000000a000004f50" + public string skuCode { get; set; } // "" + public int? salePrice { get; set; } // 5880 + public WXStockInfoLite stockInfo { get; set; } + public WXRealStockInfoLite realStockInfo { get; set; } + } + + public class WXRealStockInfoLite + { + public int? stockNum { get; set; } // 999 + public int? totalNum { get; set; } // 999 + } + + public class WXStockInfoLite + { + public string stockNum { get; set; } // "9999999" + } + + public class WXSaleParamInfoLite + { + public List categorys { get; set; } + } + + public class WXSkuKeyInfoLite + { + public string skuId { get; set; } // "8767785131", + } + + public class WXProductKeyInfo + { + public string productId { get; set; } // "10000538778988" + } + + public class WXProductInfoInfo + { + // 主图 + public List headImg { get; set; } = new List(); + public List category { get; set; } = new List(); + public List param { get; set; } = new List(); + public List qualificationList { get; set; } + public List productHeadimgInfo { get; set; } + public List headImgInfos { get; set; } + public string title { get; set; } // "歪歪马震动棒 成人情趣用品" + public string subTitle { get; set; } // "", + public string brand { get; set; } // "", + public string model { get; set; } // "", + public WXProductDetailInfo detail { get; set; } + public string brandId { get; set; } // "10655917" + public string listingTime { get; set; } // "1772533190" + public string spuCode { get; set; } // "2028756820870602753" + public WXAfterSaleInfo afterSaleInfo { get; set; } + public string lastEditDraftTime { get; set; } // "1772532559" + public string shortTitle { get; set; } // "歪歪马脉冲震动成人情趣棒" + public string aiGenShortTitle { get; set; } // "歪歪马脉冲震动成人情趣棒" + public string uniqueId { get; set; } // "4411405439658180613" + } + + public class WXAfterSaleInfo + { + public string afterSaleAddressId; + } + + public class WXProductDetailInfo + { + public List detailImg { get; set; } = new List(); // [ "https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/69a6a8460000683300254e4c8c4fab15000000a100004f50", ... ], + public List detailVideos { get; set; } = new List(); + public List detailVideoInfo { get; set; } = new List(); + public List carouselImg { get; set; } = new List(); + public string desc { get; set; } = ""; + } + + public class WXHeadImgInfo + { + public string imgUrl { get; set; } // "https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/69a6a8420006d56e0003583092a31715000000a100004f50", + public int? imgWidth { get; set; } // 800, + public int? imgHeight { get; set; } // 800 + } + + public class WXProductHeadimgInfo + { + public List colors { get; set; } = new List(); // [] + public string imgUrl { get; set; } // "https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/69a6a8420006d56e0003583092a31715000000a100004f50" + public WXMainColors mainColors { get; set; } + } + + public class WXMainColors + { + public int? red { get; set; } // 255, + public int? green { get; set; } // 255, + public int? blue { get; set; } // 255 + } + + public class WXQualificationInfo + { + public List qualificationUrl { get; set; } // ["https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/69a6a84a0008442e2a4a8f7179bc1715000000a000004f50"] + public string qualificationId { get; set; } // "50000115" + public int? showCertType { get; set; } // 0 + } + + public class WXProductParamInfo + { + public List categorys { get; set; } = new List(); + } + + public class WXProductParamCategoryInfo + { + public string name { get; set; } // [0] "name": "长度" [1] "name": "20 cm", + public int? catType { get; set; } = 0; + public WXProductParamCategoryCatInfo catInfo { get; set; } + } + + public class WXProductParamCategoryCatInfo + { + public int? isRequired { get; set; } // 1, + public int? isCustomize { get; set; } // 0, + public int? inputType { get; set; } // 1-单选 2-文本 + public long? catGroup { get; set; } // 4294967295, + } + + public class WXProductCategoryInfoLite + { + public string catId { get; set; } // "10000577" + public string name { get; set; } // "情趣用品" // 可能为空或没有此字段 + public string fCatId { get; set; } // "10000575" + public WXProductCategoryInfoInfoLite catInfo { get; set; } + public bool? leaf { get; set; } // false + } + + public class WXProductCategoryInfoInfoLite + { + public int? catLevel { get; set; } // 2 + public long? catGroup { get; set; } // 4294967295 + } +} diff --git a/KJDService/KJD_WebService/Upload/Prod/WXProd.aspx b/KJDService/KJD_WebService/Upload/Prod/WXProd.aspx new file mode 100644 index 0000000..9071584 --- /dev/null +++ b/KJDService/KJD_WebService/Upload/Prod/WXProd.aspx @@ -0,0 +1,32 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WXProd.aspx.cs" Inherits="KJD_Web.Upload.Prod.WXProd" ValidateRequest="false"%> + + + + + + + + + + + +
+
+
+ +
+
+ +   +
+
+ +
+
+ +   +
+
+
+ + diff --git a/KJDService/KJD_WebService/Upload/Prod/WXProd.aspx.cs b/KJDService/KJD_WebService/Upload/Prod/WXProd.aspx.cs new file mode 100644 index 0000000..33fcf95 --- /dev/null +++ b/KJDService/KJD_WebService/Upload/Prod/WXProd.aspx.cs @@ -0,0 +1,446 @@ +using KJD_Web.Model; +using KJD_Web.Utils; +using KJD_WebService.Model; +using KJD_WebService.Model.WxModel; +using NaiBa.Util.Extension; +using NaiBa.Util.Helper; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.Cryptography.X509Certificates; +using System.Text; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace KJD_Web.Upload.Prod +{ + public class BaseClass + { + public static string BuildPDDObjString(string file, bool IsLoginDef = false) + { + string LoginApiUrl = "http://1.13.195.131:9000"; + string MainPath = "kuajingda"; + return LoginApiUrl + "/bxx_" + file + "?obj=" + MainPath + "/bxx_" + file; + } + + public static int TimeDifferent = 0; + public static int VersionCount = 99999999; + public static int CompanyId = 1; + public static string CompanyName = "1"; + public static string UserKey = "1"; + public static string Mobile = "18888888888"; + public static string UserName = "18888888888"; + public static string ShopId = "18888888888"; + public static string ShopName = "18888888888"; + } + + public class UserLogin + { + /// + /// 获取签名字符串,新版 + /// + /// + public static string GetSignaturex() + { + return GetSignaturex(BaseClass.ShopId, BaseClass.ShopName); + } + public static string GetSignaturex(string shopId, string shopName) + { + if (string.IsNullOrEmpty(shopId)) + shopId = "11111111"; + if (string.IsNullOrEmpty(shopName)) + shopName = "wx11111111"; + int time = TimeUtils.DateTimeToTimestampSeconds(DateTime.Now) + BaseClass.TimeDifferent; + string time1 = EncrypUtil.Encryption(time); + return "time=" + time + "&code=" + time1 + "&NbCodeVersion=1" + "&version=" + BaseClass.VersionCount + + "&company_id=" + BaseClass.CompanyId + "&company=" + HtmlUtils.UrlEncodeUtf8(BaseClass.CompanyName) + + "&user_name=" + BaseClass.UserName + "&user_key=" + BaseClass.UserKey + "&mobile=" + BaseClass.Mobile + + "&sid=" + shopId + "&shop=" + HtmlUtils.UrlEncodeUtf8(shopName); + } + } + + public partial class WXProd : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + FileUpload1.Visible = false; + } + + protected void btnSubmit_Click(object sender, EventArgs e) + { + Label1.Text = ""; + Label2.Text = ""; + + string rst = getProd(); + Label1.Text = rst; + Label2.Text = rst; + TextBox2.Text = ""; + FileUpload1.Visible = false; + } + + string getProd() + { + string prodStr = Encoding.UTF8.GetString(this.FileUpload1.FileBytes); + prodStr = TextBox2.Text.Trim(); + + WXClientProductInfoLite wxClientProd = new WXClientProductInfoLite(); + + var str_lst = RegexUtils.GetJsonObjStrJson(ref prodStr, "product_key"); + try + { + var regex_str = str_lst.OrderByDescending(s => s.Length).FirstOrDefault(); + wxClientProd.product_key = JsonUtils.DeserializeJsonToObject(regex_str); + if (wxClientProd.product_key == null) + return "解析失败"; + } + catch + { + return "解析失败"; + } + + //商品详情格式 + wxClientProd.info = new wx_client_prod_info(); + + //主标题 + wxClientProd.info.title = RegexUtils.GetStringJson(ref prodStr, "title"); + if (wxClientProd.info.title.IsNullOrEmpty()) + return "解析失败"; + + //副标题 + wxClientProd.info.sub_title = RegexUtils.GetStringJson(ref prodStr, "sub_title"); + + str_lst = RegexUtils.GetJsonArrStrJson(ref prodStr, "head_img"); + try + { + var regex_str = str_lst.OrderByDescending(s => s.Length).FirstOrDefault(); + wxClientProd.info.head_img = JsonUtils.DeserializeJsonToListNullable(regex_str); + if (wxClientProd.info.head_img == null) + return "解析失败"; + } + catch + { + return "解析失败"; + } + + var nodeCatId = RegexUtils.GetStringJson(ref prodStr, "nodeCatId"); + + str_lst = RegexUtils.GetJsonArrStrJson(ref prodStr, "category"); + try + { + var regex_str = str_lst.OrderByDescending(s => s.Length).FirstOrDefault(); + wxClientProd.info.category = JsonUtils.DeserializeJsonToListNullable(regex_str); + if (wxClientProd.info.category != null && !str_lst.IsNullOrEmpty() && !wxClientProd.info.category.Any(c => c.catIdStr == nodeCatId)) + { + wxClientProd.info.category.Add(new wx_client_category() { catId = nodeCatId, cat_id = nodeCatId }); + } + //if (wxClientProd.info.category == null) + // return "解析失败"; + } + catch + { + return "解析失败"; + } + + str_lst = RegexUtils.GetJsonObjStrJson(ref prodStr, "detail"); + try + { + var regex_str = str_lst.OrderByDescending(s => s.Length).FirstOrDefault(); + wxClientProd.info.detail = JsonUtils.DeserializeJsonToObjectNullable(regex_str); + if (wxClientProd.info.detail == null) + { + wxClientProd.info.detail = new wx_client_prod_detail(); + wxClientProd.info.detail.detail_img.Add(wxClientProd.info.head_img.FirstOrDefault()); + } + + //if (wxClientProd.info.detail == null) + // return "解析失败"; + } + catch + { + return "解析失败"; + } + + str_lst = RegexUtils.GetJsonArrStrJson(ref prodStr, "param"); + try + { + var regex_str = str_lst.OrderByDescending(s => s.Length).FirstOrDefault(); + wxClientProd.info.param = JsonUtils.DeserializeJsonToListNullable(regex_str); + if (wxClientProd.info.param == null) + wxClientProd.info.param = new List(); + //if (wxClientProd.info.param == null) + // return "解析失败"; + } + catch + { + return "解析失败"; + } + + //品牌id + wxClientProd.info.brand_id = RegexUtils.GetStringJson(ref prodStr, "brand_id"); + //if (wxClientProd.info.brand_id.IsNullOrEmpty()) + // return "解析失败"; + + str_lst = RegexUtils.GetJsonObjStrJson(ref prodStr, "sku_id_list"); + try + { + var regex_str = str_lst.OrderByDescending(s => s.Length).FirstOrDefault(); + wxClientProd.info.sku_id_list = JsonUtils.DeserializeJsonToObjectNullable(regex_str); + //if (wxClientProd.info.sku_id_list == null) + // return "解析失败"; + } + catch + { + return ""; + } + + str_lst = RegexUtils.GetJsonObjStrJson(ref prodStr, "sku_list"); + try + { + var regex_str = str_lst.OrderByDescending(s => s.Length).FirstOrDefault(); + wxClientProd.info.sku_list = JsonUtils.DeserializeJsonToObjectNullable(regex_str); + //if (wxClientProd.info.sku_list == null) + // return "解析失败"; + } + catch + { + return "解析失败"; + } + + if (wxClientProd.info.sku_list == null) + { + str_lst = RegexUtils.GetJsonArrStrJson(ref prodStr, "sku_info"); + try + { + var regex_str = str_lst.OrderByDescending(s => s.Length).FirstOrDefault(); + var sku_infos = JsonUtils.DeserializeJsonToListNullable(regex_str); + if (sku_infos != null) + { + wxClientProd.info.sku_list = new wx_sku(); + wxClientProd.info.sku_list.sku_info = sku_infos; + } + } + catch + { + return "解析失败"; + } + } + + str_lst = RegexUtils.GetJsonArrStrJson(ref prodStr, "product_sale_attrs"); + try + { + var regex_str = str_lst.OrderByDescending(s => s.Length).FirstOrDefault(); + wxClientProd.info.product_sale_attrs = JsonUtils.DeserializeJsonToListNullable(regex_str); + //if (wxClientProd.info.product_sale_attrs == null) + // return "解析失败"; + } + catch + { + return "解析失败"; + } + + + //总销量 + wxClientProd.info.total_sold_num = RegexUtils.GetStringJson(ref prodStr, "total_sold_num"); + //if (wxClientProd.info.total_sold_num.IsNullOrEmpty()) + // return "解析失败"; + + str_lst = RegexUtils.GetJsonObjStrJson(ref prodStr, "service_desc"); + try + { + var regex_str = str_lst.OrderByDescending(s => s.Length).FirstOrDefault(); + wxClientProd.info.service_desc = JsonUtils.DeserializeJsonToObjectNullable(regex_str); + //if (wxClientProd.info.service_desc == null) + // return "解析失败"; + } + catch + { + return "解析失败"; + } + + str_lst = RegexUtils.GetJsonObjStrJson(ref prodStr, "express_info"); + try + { + var regex_str = str_lst.OrderByDescending(s => s.Length).FirstOrDefault(); + wxClientProd.info.express_info = JsonUtils.DeserializeJsonToObjectNullable(regex_str); + //if (wxClientProd.info.express_info == null) + // return; + } + catch + { + return "解析失败"; + } + + str_lst = RegexUtils.GetJsonArrStrJson(ref prodStr, "headVideoInfo"); + try + { + var regex_str = str_lst.OrderByDescending(s => s.Length).FirstOrDefault(); + wxClientProd.info.headVideoInfo = JsonUtils.DeserializeJsonToListNullable(regex_str); + //if (wxClientProd.info.headVideoInfo == null) + // return "解析失败"; + } + catch + { + return "解析失败"; + } + + str_lst = RegexUtils.GetJsonObjStrJson(ref prodStr, "afterSaleInfo"); + try + { + var regex_str = str_lst.OrderByDescending(s => s.Length).FirstOrDefault(); + wxClientProd.info.afterSaleInfo = JsonUtils.DeserializeJsonToObjectNullable(regex_str); + //if (wxClientProd.info.afterSaleInfo == null) + // return "解析失败"; + } + catch + { + return "解析失败"; + } + + str_lst = RegexUtils.GetJsonArrStrJson(ref prodStr, "deliveryExpressFee"); + try + { + var regex_str = str_lst.OrderByDescending(s => s.Length).FirstOrDefault(); + wxClientProd.info.deliveryExpressFee = JsonUtils.DeserializeJsonToListNullable(regex_str); + //if (wxClientProd.info.deliveryExpressFee == null) + // return "解析失败"; + } + catch + { + return "解析失败"; + } + + str_lst = RegexUtils.GetJsonArrStrJson(ref prodStr, "templateInfo"); + try + { + var regex_str = str_lst.OrderByDescending(s => s.Length).FirstOrDefault(); + wxClientProd.info.templateInfo = JsonUtils.DeserializeJsonToListNullable(regex_str); + //if (wxClientProd.info.templateInfo == null) + // return "解析失败"; + } + catch + { + return "解析失败"; + } + + wxClientProd.info.spuCode = RegexUtils.GetStringJson(ref prodStr, "spuCode"); + + str_lst = RegexUtils.GetJsonArrStrJson(ref prodStr, "productSkus"); + try + { + var regex_str = str_lst.OrderByDescending(s => s.Length).FirstOrDefault(); + wxClientProd.productSkus = JsonUtils.DeserializeJsonToList(regex_str); + if (wxClientProd.productSkus == null) + return "解析失败"; + } + catch + { + return "解析失败"; + } + + return SaveWxProd(wxClientProd.product_key.product_id, wxClientProd, prodStr); + } + + string SaveWxProd(string prodId, WXClientProductInfoLite wxClientProdInfoLite, string baseStr) + { + bool isExist = false; + var existUrl = BaseClass.BuildPDDObjString("product/get_product_spu_id_list"); + string existData = UserLogin.GetSignaturex() + "&search_spu_ids=" + prodId; + //if (!string.IsNullOrEmpty(prod.dbProduct.real_spu_id)) + // existData = UserLogin.GetSignaturex() + "&search_spu_ids=" + prod.spuId + "," + prod.dbProduct.real_spu_id; + string html = HtmlUtils.PostUtf8(existUrl, existData); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = HtmlUtils.PostUtf8(existUrl, existData); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + { + return "采集入库失败,产品数据库连接失败"; + } + else + { + if (html.Contains("\"data\":[") && !html.Contains("\"data\":[]")) + isExist = true; + } + + var url = BaseClass.BuildPDDObjString("product/add_product"); + if (isExist) + url = BaseClass.BuildPDDObjString("product/mdy_product"); + + var skus = wxClientProdInfoLite.productSkus; + + var product_json = "{\"wxxdData\":" + JsonUtils.SerializeObject(wxClientProdInfoLite) + ",\"baseData\":" + JsonUtils.SerializeObject(baseStr) + "}"; + var data = UserLogin.GetSignaturex() + + "&from_shop_id=" + wxClientProdInfoLite.product_key.appid + + "&from_shop_name=" + wxClientProdInfoLite.product_key.appid + + "&spu_id=" + prodId + + "&skc_id=" + prodId + + "&price_text=" + skus.Min(s => s.productSkuInfo.salePrice * 0.01m) + " - " + skus.Max(s => s.productSkuInfo.salePrice * 0.01m) + + "&ext_code=" + wxClientProdInfoLite.info.spuCode + + "&product_name=" + HttpUtility.UrlEncode(wxClientProdInfoLite.info.title, Encoding.UTF8) + + "&product_json=" + HttpUtility.UrlEncode(product_json, Encoding.UTF8) + // product_json /*HttpUtility.UrlEncode(JsonUtils.SerializeObject(wxClientProdInfoLite), Encoding.UTF8)*/ + "&sale_count=" + wxClientProdInfoLite.info.total_sold_num + + "&sale_count_text=" + wxClientProdInfoLite.info.total_sold_num + + "&main_img=" + HttpUtility.UrlEncode(wxClientProdInfoLite.info.head_img.FirstOrDefault(), Encoding.UTF8) + + "&wx_safe_status=" + HttpUtility.UrlEncode("安全商品", Encoding.UTF8) + + "&product_get_type=" + HttpUtility.UrlEncode("微信小店", Encoding.UTF8); + + if (wxClientProdInfoLite.info.category.Count > 0) + { + data += "&wx_cat_1=" + wxClientProdInfoLite.info.category[0].catIdStr; + data += "&main_cat_id=" + wxClientProdInfoLite.info.category[0].catIdStr; + data += "&main_cat_name=" + wxClientProdInfoLite.info.category[0].name; + + data += "&wx_cat_leaf=" + wxClientProdInfoLite.info.category.LastOrDefault()?.catIdStr; + data += "&cat_id=" + wxClientProdInfoLite.info.category.LastOrDefault()?.catIdStr; + data += "&cat_name=" + HttpUtility.UrlEncode((wxClientProdInfoLite.info.category.LastOrDefault()?.name).ParseToString(), Encoding.UTF8); + } + if (wxClientProdInfoLite.info.category.Count > 1) + { + data += "&wx_cat_2=" + wxClientProdInfoLite.info.category[1].catIdStr; + } + if (wxClientProdInfoLite.info.category.Count > 2) + { + data += "&wx_cat_3=" + wxClientProdInfoLite.info.category[2].catIdStr; + } + + if (wxClientProdInfoLite.info.category.FirstOrDefault().name == "图书") + { + data += "&special_prod_type=" + HttpUtility.UrlEncode("书籍", Encoding.UTF8); + } + + html = HtmlUtils.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = HtmlUtils.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + { + string msg = "商品入库失败!请检查网络连接:" + RegexUtils.GetStringJson(ref html, "msg"); + //Invoke(new Action(() => + //{ + // row.Cells["colMsg"].Value = msg; + //})); + return msg; + } + else + { + //prod.getProductMsg = "商品入库成功!"; + //Invoke(new Action(() => + //{ + // row.Cells["colMsg"].Value = prod.getProductMsg; + //})); + if (!isExist) + { + url = BaseClass.BuildPDDObjString("product/mdy_product"); + html = HtmlUtils.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = HtmlUtils.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + { + string msg = "商品入库失败!请检查网络连接:" + RegexUtils.GetStringJson(ref html, "msg"); + return msg; + } + } + + return "微信商品采集入库成功!"; + } + } + } +} \ No newline at end of file diff --git a/KJDService/KJD_WebService/Upload/Prod/WXProd.aspx.designer.cs b/KJDService/KJD_WebService/Upload/Prod/WXProd.aspx.designer.cs new file mode 100644 index 0000000..e4a6c89 --- /dev/null +++ b/KJDService/KJD_WebService/Upload/Prod/WXProd.aspx.designer.cs @@ -0,0 +1,80 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace KJD_Web.Upload.Prod +{ + + + public partial class WXProd + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// FileUpload1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.FileUpload FileUpload1; + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Button btnSubmit; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// TextBox2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.TextBox TextBox2; + + /// + /// Button1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Button Button1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + } +} diff --git a/KJDService/KJD_WebService/Utils/HtmlUtils.cs b/KJDService/KJD_WebService/Utils/HtmlUtils.cs index d269446..ccddaea 100644 --- a/KJDService/KJD_WebService/Utils/HtmlUtils.cs +++ b/KJDService/KJD_WebService/Utils/HtmlUtils.cs @@ -1,4 +1,5 @@ -using System; +using KJD_Web.Upload.Prod; +using System; using System.Collections.Generic; using System.Diagnostics; using System.Drawing; @@ -6,7 +7,10 @@ using System.IO; using System.IO.Compression; using System.Linq; using System.Net; +using System.Net.Cache; +using System.Net.Security; using System.Runtime.InteropServices; +using System.Security.Cryptography.X509Certificates; using System.Text; using System.Text.RegularExpressions; using System.Threading; @@ -72,6 +76,128 @@ namespace KJD_Web.Utils return decoder.GetString(); } + /// + /// URL UTF-8转码 + /// + /// + /// + public static string UrlEncodeUtf8(string IndexKey) + { + if (String.IsNullOrEmpty(IndexKey)) + return ""; + return HttpUtility.UrlEncode(IndexKey, Encoding.UTF8); + } + + /// + /// post 数据 + /// + /// + /// + /// + public static string PostUtf8(string url, StringBuilder postData) + { + try + { + WebClientx wc = new WebClientx(); + byte[] sendData = Encoding.GetEncoding("utf-8").GetBytes(postData.ToString()); + wc.Headers.Add("ContentLength", sendData.Length.ToString()); + wc.Headers.Add("Content-Type", "application/x-www-form-urlencoded"); + wc.Proxy = null; + return Encoding.UTF8.GetString(wc.UploadData(url, "POST", sendData)); + } + catch + { + return ""; + } + } + + /// + /// 浏览器标识 + /// + public static string UserAgent = @"Mozilla/5.0+(Windows+NT+10.0;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/57.0.2987.133+Safari/537.36 +Mozilla/5.0+(Windows+NT+6.1)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/57.0.2987.133+Safari/537.36 +Mozilla/5.0+(Windows+NT+10.0;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/54.0.2840.99+Safari/537.36 +Mozilla/5.0+(Windows+NT+5.1)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/31.0.1650.63+Safari/537.36 +Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+Win64;+x64;+Trident/5.0) +Mozilla/5.0+(Windows+NT+5.1)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/45.0.2454.101+Safari/537.36 +Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/45.0.2454.101+Safari/537.36 +Mozilla/5.0+(Windows+NT+6.3;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko +Mozilla/5.0+(Windows+NT+10.0;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/57.0.2987.133+Safari/537.36 +Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) +Mozilla/5.0+(Windows+NT+6.3;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/57.0.2987.133+Safari/537.36 +Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/537.1+(KHTML,+like+Gecko)+Chrome/21.0.1180.89+Safari/537.1 +Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/45.0.2454.101+Safari/537.36 +Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.104 Safari/537.36 Core/1.53.2372.400 QQBrowser/9.5.10548.400"; + + /// + /// post 数据 + /// + /// + /// + /// + public static string PostUtf8(string url, string postData, string contentType = "") + { + //return PostUtf8(url, Encoding.UTF8.GetBytes(postData)); + + bool isError = false; + string[] l = UserAgent.Split('\n'); + reTry: + try + { + string codeType = "utf-8"; + HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); + request.UserAgent = l[new Random(Guid.NewGuid().GetHashCode()).Next(l.Length)].Trim(); + byte[] byteData = Encoding.GetEncoding(codeType).GetBytes(postData); + request.Method = "POST"; + request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"; + request.Timeout = 30 * 1000; + request.ReadWriteTimeout = 30 * 1000; + request.Proxy = null; + request.ContentType = "application/x-www-form-urlencoded; charset=" + codeType; + //if (BaseClass.SaLevel > 0) + { + //260306 采用GZip/deflate压缩 + //request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate, br, zstd"); + //request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate"); + } + if (url.StartsWith("https://openapi.jinritemai.com/")) + { + request.Headers.Add("X-USE-BOE", "1"); + request.Headers.Add("Origin-From", "djt_prod"); + request.Headers.Add("djt_prod", "boe_time_sku"); + } + if (!string.IsNullOrEmpty(contentType)) + { + request.ContentType = contentType; + } + request.ContentLength = byteData.Length; + request.Referer = url; + request.CookieContainer = new CookieContainer(); + request.AllowAutoRedirect = false; + using (Stream requestStream = request.GetRequestStream()) + { + requestStream.Write(byteData, 0, byteData.Length); + } + HttpWebResponse response = (HttpWebResponse)request.GetResponse(); + + Stream receiveStream = response.GetResponseStream(); + StreamReader readStream = new StreamReader(receiveStream, Encoding.GetEncoding(codeType)); + + return readStream.ReadToEnd().Trim(); + } + catch (Exception e) + { + //{ + // isError = true; + // goto reTry; + //} + Thread.Sleep(50); + return ""; + } + + } + + public static int HexToInt(char h) { if ((h >= '0') && (h <= '9')) @@ -150,4 +276,141 @@ namespace KJD_Web.Utils return string.Empty; } } + + + /// + /// 下载器 + /// + public class WebClientx : WebClient + { + /// + /// 默认超时多少秒 + /// + public int Timeout = 100; + /// + /// 允许自动重定向 + /// + public bool AllowAutoRedirect = true; + public bool IsDelete = false; + + private string OutIP = ""; + /// + /// 证书列表 + /// + public static List X509List = new List(); + /// + /// 绑定IP + /// + /// + public WebClientx(string outIp) + { + OutIP = outIp; + CachePolicy = new RequestCachePolicy(RequestCacheLevel.NoCacheNoStore); + } + + public WebClientx() + { + } + /// + /// 重写 + /// + /// + /// + protected override WebRequest GetWebRequest(Uri address) + { + string s = address.ToString(); + if (string.IsNullOrEmpty(s) || s.Length < 7 || !(s.Substring(0, 7).ToLower() == "http://" || s.Substring(0, 8).ToLower() == "https://")) + return null; + var request = (HttpWebRequest)base.GetWebRequest(address); + request.AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip; + request.Timeout = 1000 * Timeout; + request.ReadWriteTimeout = 500 * Timeout; + request.AllowAutoRedirect = AllowAutoRedirect; + ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(ValidateServerCertificate); + if (IsDelete) + request.Method = "DELETE"; + if (!string.IsNullOrEmpty(OutIP)) + { + request.ServicePoint.BindIPEndPointDelegate = (servicePoint, remoteEndPoint, retryCount) => + { + servicePoint.MaxIdleTime = 20; + return new IPEndPoint(IPAddress.Parse(OutIP), 0); + }; + } + if (request.RequestUri.Scheme == "https") //挂接验证服务端证书的回调 + { + X509Certificate2 x509c = null; + for (int i = 0; i < X509List.Count; i++) + { + if (X509List[i].Domain.ToLower() == address.Host.ToLower()) + { + x509c = X509List[i].X509; + break; + } + } + if (x509c == null) + { + ServicePointManager.ServerCertificateValidationCallback = + new RemoteCertificateValidationCallback(RemoteCertificateValidationCallback); + try + { + X509Store _store = new X509Store(StoreName.My, StoreLocation.LocalMachine); + _store.Open(OpenFlags.ReadWrite); + string findValue = Dns.GetHostName(); //获取本地主机名称作为证书查找的参数 + X509Certificate2Collection _certsCollection = + _store.Certificates.Find(X509FindType.FindByIssuerName, findValue, false); + if (_certsCollection.Count > 0) + { + x509c = _certsCollection[0]; + request.ClientCertificates.Add(x509c); + } + } + catch { } + + } + } + return request; + } + /// + /// 获取证书 + /// + /// + /// + /// + /// + /// + public bool RemoteCertificateValidationCallback(Object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) + { + return true; + } + public static bool ValidateServerCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) + { + //if (sslPolicyErrors == SslPolicyErrors.None) { + // return true; + //} + + //Console.WriteLine("Certificate error: {0}", sslPolicyErrors); + + //// Do not allow this client to communicate with unauthenticated servers. + //return false; + + return true; + } + } + + + /// + /// 网站证书 + /// + public class Certificate + { + /// + /// 域名 + /// + public string Domain { get; set; } + /// + /// 证书 + /// + public X509Certificate2 X509 { get; set; } + } } \ No newline at end of file diff --git a/KJDService/KJD_WebService/Utils/JsonUtils.cs b/KJDService/KJD_WebService/Utils/JsonUtils.cs index 076fd3e..14b25c4 100644 --- a/KJDService/KJD_WebService/Utils/JsonUtils.cs +++ b/KJDService/KJD_WebService/Utils/JsonUtils.cs @@ -1,4 +1,5 @@ using Newtonsoft.Json; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.IO; @@ -31,7 +32,12 @@ namespace KJD_Web.Utils } } - public static string SerializerObjectToString(object obj, JsonSerializerSettings jsonsetting = null) + public static string SerializeObject(object obj) + { + return SerializeObjectToString(obj); + } + + public static string SerializeObjectToString(object obj, JsonSerializerSettings jsonsetting = null) { try { @@ -47,5 +53,78 @@ namespace KJD_Web.Utils return null; } } + + public static T DeserializeJsonToObjectNullable(string json) where T : class + { + try + { + JsonSerializer serializer = new JsonSerializer(); + StringReader sr = new StringReader(json); + object o = serializer.Deserialize(new JsonTextReader(sr), typeof(T)); + T t = o as T; + return t; + } + catch + { + return null; + } + } + + public static JObject JObjectParse(string json) + { + try + { + JObject obj = JObject.Parse(json); + return obj; + } + catch + { + return null; + } + } + + /// + /// 解析JSON数组生成对象实体集合 + /// + /// 对象类型 + /// json数组字符串(eg.[{"ID":"112","Name":"石子儿"}]) + /// 对象实体集合 + public static List DeserializeJsonToList(string json) where T : class + { + JsonSerializer serializer = new JsonSerializer(); + StringReader sr = new StringReader(json); + object o = serializer.Deserialize(new JsonTextReader(sr), typeof(List)); + List list = o as List; + return list; + } + + public static List DeserializeJsonToListNullable(string json) where T : class + { + try + { + JsonSerializer serializer = new JsonSerializer(); + StringReader sr = new StringReader(json); + object o = serializer.Deserialize(new JsonTextReader(sr), typeof(List)); + List list = o as List; + return list; + } + catch + { + return null; + } + } + + /// + /// 反序列化JSON到给定的匿名对象. + /// + /// 匿名对象类型 + /// json字符串 + /// 匿名对象 + /// 匿名对象 + public static T DeserializeAnonymousType(string json, T anonymousTypeObject) + { + T t = JsonConvert.DeserializeAnonymousType(json, anonymousTypeObject); + return t; + } } } \ No newline at end of file diff --git a/KJDService/KJD_WebService/Utils/RegexUtils.cs b/KJDService/KJD_WebService/Utils/RegexUtils.cs index 8ba3a6e..2918e4c 100644 --- a/KJDService/KJD_WebService/Utils/RegexUtils.cs +++ b/KJDService/KJD_WebService/Utils/RegexUtils.cs @@ -664,5 +664,100 @@ namespace KJD_Web.Utils return htmlStr.Trim(); } + + public static string GetOneJsonObjStrJson(ref string html, string reg) + { + return GetJsonObjStrJson(ref html, reg).FirstOrDefault(); + } + + public static List GetJsonObjStrJson(ref string html, string reg, int level = 0) + { + List rstLst = new List(); + if (html == null) + return rstLst; + + string htmlTmp = html.Replace("\\{", "\\这里是正花括号占位符").Replace("\\}", "\\这里是反花括号占位符").Replace("\"" + reg + "\": {", "\"" + reg + "\":{"); + + retry: + string lvStr = ""; + if (level == 1) + { + lvStr += "\""; + } + var index1 = htmlTmp.IndexOf("\"" + reg + "\":" + lvStr + "{"); + if (index1 < 0) + return rstLst; + + htmlTmp = htmlTmp.Substring(index1 + ("\"" + reg + "\":" + lvStr + "{").Length - 1); + // 括号计数 + int braceNum = 0; + //string rst = "{"; + //while (htmlTmp.Length > 0) + for (int i = 0; i < htmlTmp.Length; i++) + { + //rst += htmlTmp.Substring(0, 1); + //if (htmlTmp.StartsWith("{")) + // braceNum++; + //else if (htmlTmp.StartsWith("}")) + // braceNum--; + if (htmlTmp[i] == '{') + braceNum++; + else if (htmlTmp[i] == '}') + braceNum--; + //htmlTmp = htmlTmp.Substring(1); + if (braceNum == 0) + { + rstLst.Add(htmlTmp.Substring(0, i + 1).Replace("\\这里是正花括号占位符", "\\{").Replace("\\这里是反花括号占位符", "\\}")); + htmlTmp = htmlTmp.Substring(i + 1); + //rstLst.Add(rst.Replace("\\这里是正花括号占位符", "\\{").Replace("\\这里是反花括号占位符", "\\}")); + break; + } + + // 循环完了还没结果返回空列表 + if (i == htmlTmp.Length - 1) + return rstLst; + } + if (htmlTmp.Length > 0) + goto retry; + + return rstLst; + } + + public static List GetJsonArrStrJson(ref string html, string reg) + { + List rstLst = new List(); + if (html == null) + return rstLst; + + string htmlTmp = html.Replace("\\[", "\\这里是正方括号占位符").Replace("\\]", "\\这里是反方括号占位符").Replace("\"" + reg + "\": [", "\"" + reg + "\":["); + + retry: + var index1 = htmlTmp.IndexOf("\"" + reg + "\":["); + if (index1 < 0) + return rstLst; + + htmlTmp = htmlTmp.Substring(index1 + ("\"" + reg + "\":[").Length); + // 括号计数 + int braceNum = 1; + string rst = "["; + while (htmlTmp.Length > 0) + { + rst += htmlTmp.Substring(0, 1); + if (htmlTmp.StartsWith("[")) + braceNum++; + else if (htmlTmp.StartsWith("]")) + braceNum--; + htmlTmp = htmlTmp.Substring(1); + if (braceNum == 0) + { + rstLst.Add(rst.Replace("\\这里是正方括号占位符", "\\[").Replace("\\这里是反方括号占位符", "\\]")); + break; + } + } + if (htmlTmp.Length > 0) + goto retry; + + return rstLst; + } } } \ No newline at end of file diff --git a/KJDService/KJD_WebService/Web.config b/KJDService/KJD_WebService/Web.config index 89163a9..654d068 100644 --- a/KJDService/KJD_WebService/Web.config +++ b/KJDService/KJD_WebService/Web.config @@ -25,7 +25,8 @@ --> - + + @@ -34,6 +35,8 @@ + + diff --git a/TEMUKJD/BLL/PDDProdFormConverter.cs b/TEMUKJD/BLL/PDDProdFormConverter.cs index 52d9151..a491417 100644 --- a/TEMUKJD/BLL/PDDProdFormConverter.cs +++ b/TEMUKJD/BLL/PDDProdFormConverter.cs @@ -50,7 +50,7 @@ namespace TemuKJD.BLL prodInfo.chance_id = null; prodInfo.chance_refere = null; prodInfo.chance_tab = null; - prodInfo.decoration = null; + prodInfo.decoration = new PDDProductDecorationInfo() { floor_list = new List() }; // 商品详情 prodInfo.detail = new PDDProductDetailInfo(); @@ -388,6 +388,12 @@ namespace TemuKJD.BLL return ""; } + /// + /// 聚水潭转pdd格式 + /// + /// + /// + /// public PDDProductInfo JstPddProdToPddConvert(out string convertRst, KJDDBProduct dbProd) { convertRst = ""; @@ -412,7 +418,7 @@ namespace TemuKJD.BLL prodInfo.chance_id = null; prodInfo.chance_refere = null; prodInfo.chance_tab = null; - prodInfo.decoration = null; + prodInfo.decoration = new PDDProductDecorationInfo() { floor_list = new List() }; // 商品详情 prodInfo.detail = new PDDProductDetailInfo(); @@ -853,6 +859,7 @@ namespace TemuKJD.BLL } } + public PDDProductInfo WXProdToPddConvert(out string convertRst, KJDDBProduct dbProd) { convertRst = ""; @@ -879,7 +886,7 @@ namespace TemuKJD.BLL prodInfo.chance_id = null; prodInfo.chance_refere = null; prodInfo.chance_tab = null; - prodInfo.decoration = null; + prodInfo.decoration = new PDDProductDecorationInfo() { floor_list = new List() }; // 商品详情 prodInfo.detail = new PDDProductDetailInfo(); @@ -1208,7 +1215,6 @@ namespace TemuKJD.BLL } - public PDDProductInfo _1688ClientToPddConvert(out string convertRst, KJDDBProduct dbProd) { convertRst = ""; @@ -1226,7 +1232,7 @@ namespace TemuKJD.BLL prodInfo.chance_id = null; prodInfo.chance_refere = null; prodInfo.chance_tab = null; - prodInfo.decoration = null; + prodInfo.decoration = new PDDProductDecorationInfo() { floor_list = new List() }; // 商品详情 prodInfo.detail = new PDDProductDetailInfo(); @@ -1554,5 +1560,390 @@ namespace TemuKJD.BLL return null; } } + + + + public PDDProductInfo WXClientToPddConvert(out string convertRst, KJDDBProduct dbProd) + { + convertRst = ""; + try + { + var wxxdData = JsonHelper.SerializeObject(JsonHelper.JObjectParse(dbProd.product_json)["wxxdData"]); + var baseData = JsonHelper.JObjectParse(dbProd.product_json)["baseData"].ParseToString(); + + WXClientProductInfoLite wxClientProdInfo = JsonHelper.DeserializeJsonToObject(wxxdData); + if (wxClientProdInfo.info.sku_list == null) + { + wxClientProdInfo.info.sku_list = new wx_sku(); + } + if (wxClientProdInfo.info.sku_list.sku_info == null) + { + wxClientProdInfo.info.sku_list.sku_info = new List(); + + try + { + if (baseData.Contains("{\"sku_info\"")) + { + var skuInfoStr = baseData.Substring(baseData.IndexOf("{\"sku_info\"")); + if (skuInfoStr.Contains(" KB)")) + skuInfoStr = skuInfoStr.Substring(0, skuInfoStr.IndexOf(" KB)")); + while (skuInfoStr.IndexOf("{\"sku_id\"") >= 0) + { + skuInfoStr = skuInfoStr.Substring(skuInfoStr.IndexOf("{\"sku_id\"")); + var wxClientSkuInfo = new wx_client_sku_info(); + wxClientSkuInfo.sku_id = BaseRegex.GetStringJson(ref skuInfoStr, "sku_id"); + wxClientSkuInfo.price = BaseRegex.GetIntJson(ref skuInfoStr, "price"); + wxClientSkuInfo.is_discounted = BaseRegex.GetBoolJson(ref skuInfoStr, "is_discounted"); + wxClientSkuInfo.discounted_price = BaseRegex.GetIntJson(ref skuInfoStr, "discounted_price"); + wxClientSkuInfo.origin_price = BaseRegex.GetIntJson(ref skuInfoStr, "origin_price"); + if (wxClientSkuInfo.price != null && wxClientSkuInfo.is_discounted != null && wxClientSkuInfo.discounted_price != null && wxClientSkuInfo.origin_price != null) + { + wxClientProdInfo.info.sku_list.sku_info.Add(wxClientSkuInfo); + } + skuInfoStr = skuInfoStr.Substring(skuInfoStr.IndexOf("{\"sku_id\"") + "{\"sku_id\"".Length); + } + } + } + catch + { + } + } + + PDDProductInfo prodInfo = new PDDProductInfo() + { + sale_count = dbProd.sale_count.ParseToString(), + sale_count_text = dbProd.sale_count_text, + }; + prodInfo.chance_id = null; + prodInfo.chance_refere = null; + prodInfo.chance_tab = null; + prodInfo.decoration = new PDDProductDecorationInfo() { floor_list = new List() }; + + // 商品详情 + prodInfo.detail = new PDDProductDetailInfo(); + prodInfo.detail.allergy_refund = 0; + prodInfo.detail.allowed_region = new List(); + //prodInfo.detail.appeal_status = null; + //prodInfo.detail.app_id = null; + //prodInfo.detail.app_name = null; + //prodInfo.detail.bad_claim_text = null; + prodInfo.detail.bad_fruit_claim = 0; + //prodInfo.detail.business_source_type = null; + prodInfo.detail.can_appeal = null; + prodInfo.detail.card_verification_list = null; + prodInfo.detail.cats = new List(); + prodInfo.detail.cat_id = dbProd.cat_id.ParseToInt(); + prodInfo.detail.cat_ids = new List(); + //微信商品的类目直接输入,上传的时候不用。 + foreach (var category in wxClientProdInfo.info.category) + { + prodInfo.detail.cat_ids.Add(category.catIdStr.ParseToInt()); + } + prodInfo.detail.check_status = 9; + //prodInfo.detail.check_type = null; + //prodInfo.detail.client_id = null; + prodInfo.detail.commit_deleted = 0; + //prodInfo.detail.commit_extension = null; + //prodInfo.detail.community_group_buying = null; + prodInfo.detail.cost_template_id = 0; + //prodInfo.detail.country = null; + prodInfo.detail.country_id = 0; + //prodInfo.detail.created_at = null; + //prodInfo.detail.creator_name = null; + prodInfo.detail.customizable = 0; + prodInfo.detail.customs = ""; + prodInfo.detail.damage_claim = 0; + prodInfo.detail.delivery_one_day = 0; + //prodInfo.detail.delivery_type = null; + //prodInfo.detail.elec_goods_attributes = null; + prodInfo.detail.estimate_quantity = 0; + prodInfo.detail.event_type = 0; + prodInfo.detail.extend_warranty_dto = new extend_warranty_dto_item() { extend_warranty = 0 }; + //prodInfo.detail.fabric = null; + //prodInfo.detail.fabric_content = null; + prodInfo.detail.galleries = new List(); + foreach (var imgItem in wxClientProdInfo.info.head_img) + { + prodInfo.detail.galleries.Add(new gallery_item() + { + url = imgItem, + type = 1, + }); + } + foreach (var imgItem in wxClientProdInfo.info.detail.detail_img_real) + { + prodInfo.detail.galleries.Add(new gallery_item() + { + url = imgItem, + type = 2, + }); + } + prodInfo.detail.gold_price_template_id = null; + prodInfo.detail.gold_price_type = null; + prodInfo.detail.goods_certificate = null; + prodInfo.detail.goods_commit_check = new List(); + prodInfo.detail.goods_desc = wxClientProdInfo.info.title; + prodInfo.detail.goods_id = wxClientProdInfo.product_key.product_id.ParseToLong(); + prodInfo.detail.goods_name = wxClientProdInfo.info.title; + prodInfo.detail.goods_name_prefix = ""; + prodInfo.detail.goods_pattern = 8; + prodInfo.detail.goods_property_list = null; + prodInfo.detail.goods_sn = null; + prodInfo.detail.goods_srv_templates = new List(); + prodInfo.detail.goods_trade_attr = null; + prodInfo.detail.goods_travel_attr = null; + prodInfo.detail.goods_type = 1; + prodInfo.detail.groups = new group_item() { single_price = 0, group_price = 0, customer_num = 2, buy_limit = 999999, order_limit = 999999 }; + // 复用前面已经填写过的 + prodInfo.detail.hd_thumb_url = prodInfo.detail.galleries.FirstOrDefault(g => g.type == 1)?.url; + // 编辑id,随意填写 + prodInfo.detail.id = 0; + // 复用前面已经填写过的 + prodInfo.detail.image_url = prodInfo.detail.galleries.FirstOrDefault(g => g.type == 1)?.url; + prodInfo.detail.instruction_vo = new instruction_vo_item() { template_status = -1 }; + prodInfo.detail.invoice_mode = null; + prodInfo.detail.invoice_mode_sub_type = null; + prodInfo.detail.invoice_status = 0; + prodInfo.detail.is_all_weight_same = true; + prodInfo.detail.is_app = 0; + prodInfo.detail.is_bangdan = 0; + prodInfo.detail.is_card_secret = false; + prodInfo.detail.is_certificate_provide = 0; + prodInfo.detail.is_customized = 0; + prodInfo.detail.is_customs = 0; + prodInfo.detail.is_deposit = false; + prodInfo.detail.is_draft = false; + prodInfo.detail.is_folt = 0; + prodInfo.detail.is_general_trade = 0; + prodInfo.detail.is_gold_price_matched = null; + prodInfo.detail.is_goods_copy = null; + prodInfo.detail.is_goods_decoration = 1; + prodInfo.detail.is_group_pre_sale = 0; + prodInfo.detail.is_only_for_remote_area = false; + prodInfo.detail.is_pre_sale = 0; + prodInfo.detail.is_refundable = 1; + prodInfo.detail.is_refundable_fifteen_day = 0; + prodInfo.detail.is_shop = 1; + prodInfo.detail.is_size_change_casually = 0; + prodInfo.detail.is_sku_pre_sale = 0; + prodInfo.detail.is_sku_shipment = 0; + prodInfo.detail.is_small_group = null; + prodInfo.detail.is_spring_festival_open_tag = false; + prodInfo.detail.is_two_num_group = false; + prodInfo.detail.is_warranty_one_year = 0; + prodInfo.detail.is_wms = 0; + prodInfo.detail.is_wp_service = 0; + prodInfo.detail.lack_of_weight_claim = 0; + prodInfo.detail.last_commit_check_status = 2; + prodInfo.detail.list_desc = new List(); + prodInfo.detail.local_service_id_list = null; + prodInfo.detail.mai_jia_zi_ti = null; + // 聚水潭没有 + prodInfo.detail.mall_id = 0; + // 聚水潭没有 + prodInfo.detail.mall_info = new mall_info_item(); + // 聚水潭没有此处随意填 + prodInfo.detail.market_price = 0; + // 聚水潭没有此处随意填 + prodInfo.detail.max_group_price = 0; + // 聚水潭没有此处随意填 + prodInfo.detail.min_group_price = 0; + prodInfo.detail.must_check_type = 0; + prodInfo.detail.name_prefix = ""; + prodInfo.detail.origin_country_id = 0; + prodInfo.detail.origin_country_name = ""; + // 货号 + prodInfo.detail.out_goods_sn = wxClientProdInfo.info.spuCode; + //if (prodInfo.detail.out_goods_sn.IsNullOrEmpty()) + //{ + // convertRst = "货号不存在"; + // return null; + //} + prodInfo.detail.out_source_goods_id = null; + prodInfo.detail.out_source_type = null; + prodInfo.detail.oversea_goods = null; + prodInfo.detail.oversea_type = 0; + prodInfo.detail.owner = "主账号"; + prodInfo.detail.owner_name = ""; + prodInfo.detail.paper_length = null; + prodInfo.detail.paper_net_weight = null; + prodInfo.detail.paper_plies_num = null; + prodInfo.detail.paper_width = null; + prodInfo.detail.pre_sale_time = 0; + prodInfo.detail.privacy_delivery = 0; + prodInfo.detail.processing_charges = null; + prodInfo.detail.processing_charges_type = null; + prodInfo.detail.promised_delivery_seconds = null; + prodInfo.detail.purchase_info_supply = 0; + prodInfo.detail.qualification_id_list = new List(); + prodInfo.detail.quan_guo_lian_bao = 0; + prodInfo.detail.quick_refund = 0; + prodInfo.detail.reason = null; + prodInfo.detail.region_limit = 1; + prodInfo.detail.reject_reason = null; + prodInfo.detail.reject_status = null; + prodInfo.detail.same_city_template_id = 0; + prodInfo.detail.schedule_sale = new schedule_sale_item() { sale_type = 0 }; + prodInfo.detail.second_hand = 0; + prodInfo.detail.sf_markup_template_sn = null; + prodInfo.detail.shang_men_an_zhuang = null; + // 聚水潭没有 + prodInfo.detail.share_desc = ""; + prodInfo.detail.shipment_limit_second = 172800; + prodInfo.detail.shoes_template_id = null; + prodInfo.detail.shop_group_id = null; + prodInfo.detail.shop_group_name = null; + prodInfo.detail.show_activity_price = false; + prodInfo.detail.size_parent_spec_id = null; + prodInfo.detail.size_spec_id = null; + + //if (jstGoodsObj["skuInfo"].IsJTokenNullOrEmpty() || jstGoodsObj["skuInfo"]["goodsSkuDetail"].IsJTokenNullOrEmpty()) + //{ + // convertRst = "缺少sku信息"; + // return null; + //} + prodInfo.detail.sku = new List(); + foreach (var wxEditSkuInfo in wxClientProdInfo.productSkus) + { + var wxDisSku = wxClientProdInfo.info.sku_list.sku_info.FirstOrDefault(s => s.sku_id == wxEditSkuInfo.skuKey.skuId); + var discountedValue = (wxDisSku?.discounted_price).ParseToInt(); + sku_item skuInfo = new sku_item() + { + id = 0, + // 聚水潭为string,散列取数值 + sku_id = wxEditSkuInfo.skuKey.skuId.ParseToLong(), + sku_sn = null, + carnival_price = 0, + init_quantity = 0, + is_onsale = 1, + limit_quantity = 999999, + multi_price = wxEditSkuInfo.productSkuInfo.salePrice.ParseToInt() - discountedValue, + multi_price_in_yuan = null, + price = wxEditSkuInfo.productSkuInfo.salePrice.ParseToInt() - discountedValue + 100, + price_in_yuan = null, + quantity = wxEditSkuInfo.productSkuInfo?.stockInfo?.stockNum?.ParseToInt(), + reserve_quantity = 0, + weight = 0, + thumb_url = wxEditSkuInfo.productSkuInfo.thumbImg, + thumb_url_file_id = null, + thumb_url_status = null, + thumb_url_is_deleted = null, + quantity_delta = 0, + spec = new List(), + // sku货号下面单独设置 + out_sku_sn = "", + batch_id = null, + priority = 1, + ware_id = 0, + ware_biz_type = null, + advice_price = null, + length = null, + oversea_sku = null, + cspu_id = null, + child_skus = null, + ref_sku_commit_id = 0, + start_time = null, + end_time = null, + sku_srv_templates = null, + calendar_rule_id = null, + hot_live_group = null, + pre_sale_time = 0, + out_source_sku_id = null, + dd_grocery_sku_params = null, + sku_extended_attribute_dtos = null, + sku_basic_property_dtos = null, + spec_note_map = null, + delivery_schedule_dtos = null, + shipment_limit_second_list = null, + sku69_code = "", + }; + //// 聚水潭供应商价加价10%(最低1元)赚取差价 + //int addPrice = (skuInfo.multi_price * 0.1).ParseToInt(); + //if (addPrice < 100) + // addPrice = 100; + //skuInfo.multi_price += addPrice; + //skuInfo.price += addPrice; + foreach (var wxSpec in wxEditSkuInfo.productSkuInfo.saleParam) + { + skuInfo.spec.Add(new spec_item() + { + parent_id = wxSpec.categorys[0].catId.ParseToLong(), + parent_name = wxSpec.categorys[0].name, + spec_id = wxSpec.categorys[1].catId.ParseToLong(), + spec_name = wxSpec.categorys[1].name, + }); + } + skuInfo.out_sku_sn = wxEditSkuInfo.productSkuInfo.skuCode; + prodInfo.detail.sku.Add(skuInfo); + } + prodInfo.detail.sku_type = null; + prodInfo.detail.song_huo_an_zhuang = null; + prodInfo.detail.song_huo_ru_hu = null; + prodInfo.detail.source = 0; + prodInfo.detail.spu_id = null; + prodInfo.detail.spu_version = null; + prodInfo.detail.submit_time = 0; + prodInfo.detail.thawed_refund = 0; + prodInfo.detail.third_type = 0; + // 复用前面填过的主图 + prodInfo.detail.thumb_url = prodInfo.detail.galleries.FirstOrDefault(g => g.type == 1)?.url; + prodInfo.detail.tiny_name = ""; + prodInfo.detail.transport_type_list = null; + prodInfo.detail.two_pieces_discount = 99; + prodInfo.detail.user_source = 1; + prodInfo.detail.warehouse = ""; + prodInfo.detail.warm_tips = ""; + prodInfo.detail.zhi_huan_bu_xiu = 0; + + prodInfo.size = null; + prodInfo.material1 = null; + prodInfo.material3 = null; + prodInfo.property = new PDDProductPropertyInfo(); + prodInfo.property.sku_properties = new object(); + prodInfo.property.goods_properties = new List(); + + if (1 == 1) + { + foreach (var wxProp in wxClientProdInfo.info.param) + { + string name = wxProp.categorys.FirstOrDefault()?.name; + goods_propertie_item propInfo = new goods_propertie_item(); + prodInfo.property.goods_properties.Add(propInfo); + propInfo.name = name; + propInfo.ref_pid = null; + //propInfo.wx_input_type = wxProp.categorys.FirstOrDefault()?.catInfo.inputType; + propInfo.values = new List(); + foreach (var wxPropVal in wxProp.categorys) + { + // 第一个是属性名,装载属性值的时候跳过 + if (wxProp.categorys.IndexOf(wxPropVal) == 0) + continue; + + propInfo.values.Add(new value_item() + { + value = wxPropVal.name.ParseToString(), + raw_value = wxPropVal.name.ParseToString(), + vid = null, + unit = "" + }); + } + } + } + else + { + //outGoodsParam.productAttrs.Add(new osProductAttrParam { attrKey = "品牌", attrValue = "无品牌" }); + } + // 主图 复用前面的 + dbProd.main_img = prodInfo.detail.galleries.FirstOrDefault(g => g.type == 1).url; + dbProd.product_json = JsonHelper.SerializeObject(prodInfo); + + return prodInfo; + } + catch (Exception ex) + { + convertRst = "转换错误 " + ex.Message; + return null; + } + } } } diff --git a/TEMUKJD/KJD.csproj b/TEMUKJD/KJD.csproj index 50f880f..8e93800 100644 --- a/TEMUKJD/KJD.csproj +++ b/TEMUKJD/KJD.csproj @@ -181,11 +181,17 @@ WebForm.cs - + Form - - Get1688AddressForm.cs + + GetAddressForm.cs + + + Form + + + WXAdminAddressSyncForm.cs Form @@ -1162,12 +1168,15 @@ WebForm.cs - - Get1688AddressForm.cs + + GetAddressForm.cs DataGridViewEx.cs + + WXAdminAddressSyncForm.cs + WXAdminShopListForm.cs diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditForm.cs index 1de3e2e..af09605 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditForm.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditForm.cs @@ -247,18 +247,24 @@ namespace TemuKJD.PDDForms.ProductSelectForms { canEdit = false; string convertRst = ""; - var ob = new PDDProdFormConverter().JstPddProdToPddConvert(out convertRst, dbProd); + var pInfo = new PDDProdFormConverter().JstPddProdToPddConvert(out convertRst, dbProd); if (!string.IsNullOrEmpty(convertRst)) { BaseMsgForm.ShowError("商品结构获取失败 " + convertRst); return; } + string exportData = dbProd.product_json; + var address = Path.Combine("D:\\", dbProd.spu_id + ".txt"); + using (StreamWriter sw = new StreamWriter(Path.Combine("D:\\", dbProd.spu_id + ".txt"), false, Encoding.UTF8)) + { + sw.Write(exportData); + } } if (dbProd.product_get_type_text == "微信店采") { canEdit = false; string convertRst = ""; - var ob = new PDDProdFormConverter().WXProdToPddConvert(out convertRst, dbProd); + var pInfo = new PDDProdFormConverter().WXProdToPddConvert(out convertRst, dbProd); if (!string.IsNullOrEmpty(convertRst)) { BaseMsgForm.ShowError("商品结构获取失败"); @@ -269,13 +275,26 @@ namespace TemuKJD.PDDForms.ProductSelectForms { canEdit = false; string convertRst = ""; - var ob = new PDDProdFormConverter()._1688ClientToPddConvert(out convertRst, dbProd); + var pInfo = new PDDProdFormConverter()._1688ClientToPddConvert(out convertRst, dbProd); if (!string.IsNullOrEmpty(convertRst)) { BaseMsgForm.ShowError("商品结构获取失败"); return; } } + #region 微信小店app + if (dbProd.product_get_type_text == "微信小店") + { + canEdit = false; + string convertRst = ""; + var pInfo = new PDDProdFormConverter().WXClientToPddConvert(out convertRst, dbProd); + if (!string.IsNullOrEmpty(convertRst)) + { + BaseMsgForm.ShowError("商品结构获取失败"); + return; + } + } + #endregion PDDDBProdEditDetailForm editDetailForm = new PDDDBProdEditDetailForm(this.dbProd); if (!canEdit) diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.Designer.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.Designer.cs index 6c47b36..ee35403 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.Designer.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.Designer.cs @@ -113,8 +113,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.chkPullAfterPush = new TemuKJD.UserComponent.UcCheckBox(this.components); this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); - this.cmbSpProdType = new System.Windows.Forms.ComboBox(); this.btnGetAllCate = new DevComponents.DotNetBar.PanelEx(); + this.cmbSpProdType = new System.Windows.Forms.ComboBox(); this.pnlEditExtCodePrice = new System.Windows.Forms.Panel(); this.lblExtCode = new System.Windows.Forms.Label(); this.panel2 = new System.Windows.Forms.Panel(); @@ -728,6 +728,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms "", "厂商直采", "1688厂家", + "微信小店", "微信店采", "母店采集", "机会商品", @@ -1167,8 +1168,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms // splitContainer2.Panel1 // this.splitContainer2.Panel1.Controls.Add(this.panelEx1); - this.splitContainer2.Panel1.Controls.Add(this.cmbSpProdType); this.splitContainer2.Panel1.Controls.Add(this.btnGetAllCate); + this.splitContainer2.Panel1.Controls.Add(this.cmbSpProdType); this.splitContainer2.Panel1.Controls.Add(this.pnlEditExtCodePrice); this.splitContainer2.Panel1.Controls.Add(this.pbLoading); this.splitContainer2.Panel1.Controls.Add(this.btnSelect); @@ -1190,7 +1191,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.panelEx1.Cursor = System.Windows.Forms.Cursors.Hand; this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty; this.panelEx1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.panelEx1.Location = new System.Drawing.Point(119, 33); + this.panelEx1.Location = new System.Drawing.Point(111, 33); this.panelEx1.Name = "panelEx1"; this.panelEx1.Size = new System.Drawing.Size(121, 25); this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -1209,21 +1210,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.panelEx1.Visible = false; this.panelEx1.Click += new System.EventHandler(this.btnCatBound_Click); // - // cmbSpProdType - // - this.cmbSpProdType.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.cmbSpProdType.FormattingEnabled = true; - this.cmbSpProdType.Items.AddRange(new object[] { - "", - "普通商品", - "书籍"}); - this.cmbSpProdType.Location = new System.Drawing.Point(82, 75); - this.cmbSpProdType.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); - this.cmbSpProdType.Name = "cmbSpProdType"; - this.cmbSpProdType.Size = new System.Drawing.Size(37, 25); - this.cmbSpProdType.TabIndex = 677; - this.cmbSpProdType.Visible = false; - // // btnGetAllCate // this.btnGetAllCate.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -1246,8 +1232,24 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.btnGetAllCate.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.btnGetAllCate.TabIndex = 777; this.btnGetAllCate.Text = "取微信全类目"; + this.btnGetAllCate.Visible = false; this.btnGetAllCate.Click += new System.EventHandler(this.btnGetAllCate_Click); // + // cmbSpProdType + // + this.cmbSpProdType.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.cmbSpProdType.FormattingEnabled = true; + this.cmbSpProdType.Items.AddRange(new object[] { + "", + "普通商品", + "书籍"}); + this.cmbSpProdType.Location = new System.Drawing.Point(82, 75); + this.cmbSpProdType.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); + this.cmbSpProdType.Name = "cmbSpProdType"; + this.cmbSpProdType.Size = new System.Drawing.Size(37, 25); + this.cmbSpProdType.TabIndex = 677; + this.cmbSpProdType.Visible = false; + // // pnlEditExtCodePrice // this.pnlEditExtCodePrice.Anchor = System.Windows.Forms.AnchorStyles.None; diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs index 1dd9bf2..3a6ac66 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdListForm.cs @@ -2,6 +2,7 @@ using AllBase.Helper; using AllBase.Model.Param; using AllBase.Model.Result; +using AllBase.Model.Result._1688; using AllBase.Model.Result.PDDResult; using AllBase.Model.Result.WXResult; using NaiBa.Util; @@ -25,6 +26,7 @@ using TemuKJD.BaseForms; using TemuKJD.BLL; using TemuKJD.Extension; using TemuKJD.ToolForms; +using TemuKJD.WXForms.ProductForms; using Work; namespace TemuKJD.PDDForms.ProductSelectForms @@ -1231,46 +1233,117 @@ namespace TemuKJD.PDDForms.ProductSelectForms obj["head_imgs"] = new JArray(); var dbProd = PDDDBProdEditForm.GetPddProductDetail(prod.id.ParseToString()); - var prodObj = JsonHelper.JObjectParse(dbProd.product_json); List mainImgLst3 = new List(); - if (dbProd.product_get_type_text == "厂商直采" && !prodObj["jstProd"].IsJTokenNullOrEmpty()) + string productTitle = ""; + + + if (dbProd.product_get_type_text == "厂商直采" || dbProd.product_get_type_text == "1688厂家" || dbProd.product_get_type_text == "微信小店") { - var jstProd = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(prodObj["jstProd"])); - mainImgLst3 = jstProd.itemMainImage.Take(3).ToList(); - bool is404 = false; + + if (dbProd.product_get_type_text == "微信小店" && dbProd.wx_cat_leaf != null) + { + List catInfoLst = new List(); + var cat = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_leaf.ParseToString()); + while(cat != null) + { + catInfoLst.Add(cat); + if (cat.level == 0) + break; + + cat = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == cat.f_cat_id); + } + foreach (WxCatInfo wxCat in catInfoLst) + { + if (wxCat.level == 1) + { + dbProd.wx_cat_1 = wxCat.cat_id.ParseToLong(); + dbProd.main_cat_id = wxCat.cat_id; + dbProd.main_cat_name = wxCat.name; + } + if (wxCat.level == 2) + { + dbProd.wx_cat_2 = wxCat.cat_id.ParseToLong(); + } + if (wxCat.level == 3) + { + dbProd.wx_cat_3 = wxCat.cat_id.ParseToLong(); + } + if (wxCat.leaf) + { + dbProd.wx_cat_leaf = wxCat.cat_id.ParseToLong(); + dbProd.cat_id = wxCat.cat_id; + dbProd.cat_name = wxCat.name; + } + } + if (dbProd.wx_cat_1 != null && dbProd.wx_cat_leaf != null && catInfoLst.Any(c => c.cat_id == dbProd.wx_cat_1.ParseToString())) + { + goto mdyWxCat; + } + } + + #region 非微信数据使用图片+标题识别类目 + if (dbProd.product_get_type_text == "厂商直采") + { + var prodObj = JsonHelper.JObjectParse(dbProd.product_json); + var jstProd = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(prodObj["jstProd"])); + mainImgLst3 = jstProd.itemMainImage.Take(3).ToList(); + productTitle = jstProd.itemName; + } + if (dbProd.product_get_type_text == "1688厂家") + { + var prod_json = dbProd.product_json; + var _1688Json = BaseRegex.GetOneJsonObjStrJson(ref prod_json, "_1688DetailData"); + _1688ClientProductInfo _1688ClentProdInfo = JsonHelper.DeserializeJsonToObject<_1688ClientProductInfo>(_1688Json); + mainImgLst3 = _1688ClentProdInfo.mainImage.Take(3).ToList(); + productTitle = _1688ClentProdInfo.offerDetail.subject.IsNullOrEmpty() ? _1688ClentProdInfo.tempModel.offerTitle : _1688ClentProdInfo.offerDetail.subject; + } + if (dbProd.product_get_type_text == "微信小店") + { + var wxxdData = JsonHelper.SerializeObject(JsonHelper.JObjectParse(dbProd.product_json)["wxxdData"]); + WXClientProductInfoLite wxClientProdInfo = JsonHelper.DeserializeJsonToObject(wxxdData); + mainImgLst3 = wxClientProdInfo.info.head_img.Take(3).ToList(); + productTitle = wxClientProdInfo.info.title; + } + //bool is404 = false; + foreach (var img in mainImgLst3) { // 盗链识别 var urlImg = BaseClass.BuildPDDObjString("product/wx_api_upload_image"); var upDate = UserLogin.GetSignaturex(); - upDate += "&token=" + token.accessToken; - upDate += "&post_data=" + GetHtml.UrlEncodeUtf8("{\"img_url\":\"" + img + "\"}"); - var upDateRst = GetHtml.PostUtf8(urlImg, upDate); + var upDateRst = ""; - for (int i = 0; i < 20 && upDateRst.Contains("access_token expired"); i++) + if (!img.Contains("wst.wxapp.tc.qq.com")) { - token.mdyTime = DateTime.Now.AddDays(-100); - token = new WxApiBLL().GetRandomWxToken(); + upDate += "&token=" + token.accessToken; + upDate += "&post_data=" + GetHtml.UrlEncodeUtf8("{\"img_url\":\"" + img.Replace("https://", "http://") + "\"}"); upDateRst = GetHtml.PostUtf8(urlImg, upDate); - } - if (upDateRst.Contains("原图url打开返回404")) - { - string in_db_ids = dbProd.id.ParseToString(); - var url = BaseClass.BuildPDDObjString("product/mdy_db_product"); - var data = UserLogin.GetSignaturex() + - "&in_db_ids=" + in_db_ids + "&wx_safe_status=违规商品"; - if (dbProd.notes.IsNullOrEmpty()) - data += "¬es=商品图片链接失效"; - var html = GetHtml.PostUtf8(url, data); - if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) - html = GetHtml.PostUtf8(url, data); + for (int i = 0; i < 20 && upDateRst.Contains("access_token expired"); i++) + { + token.mdyTime = DateTime.Now.AddDays(-100); + token = new WxApiBLL().GetRandomWxToken(); + upDateRst = GetHtml.PostUtf8(urlImg, upDate); + } + + if (upDateRst.Contains("原图url打开返回404")) + { + string in_db_ids = dbProd.id.ParseToString(); + var url = BaseClass.BuildPDDObjString("product/mdy_db_product"); + var data = UserLogin.GetSignaturex() + + "&in_db_ids=" + in_db_ids + "&wx_safe_status=违规商品"; + if (dbProd.notes.IsNullOrEmpty()) + data += "¬es=商品图片链接失效"; + var html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(url, data); + } } // 上传图片识别 - if (upDateRst.Contains("图片格式不合法") || upDateRst.Contains("文件大小超出限制")) + if (img.Contains("wst.wxapp.tc.qq.com") || upDateRst.Contains("图片URL非法") || upDateRst.Contains("图片格式不合法") || upDateRst.Contains("文件大小超出限制")) { string errMsg = ""; - var imgBase64 = WXForms.ProductForms.WXDBProdUploadForm.GetImgBase64ForApi(out errMsg, img, false, false, 800, 800); + var imgBase64 = WXDBProdUploadForm.GetImgBase64ForApi(out errMsg, img, false, false, 800, 800); if (!string.IsNullOrEmpty(errMsg)) { //break; @@ -1302,7 +1375,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms //} } - obj["title"] = jstProd.itemName; + obj["title"] = productTitle; string post_data = JsonHelper.SerializeObject(obj); var url1 = BaseClass.BuildPDDObjString("product/wx_api_category_classify"); @@ -1344,9 +1417,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms dbProd.cat_name = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_leaf.ParseToString()).name; } } + #endregion } - if (dbProd.product_get_type_text == "厂商直采" && dbProd.wx_cat_1 != null && dbProd.wx_cat_leaf != null) + mdyWxCat: + if ((dbProd.product_get_type_text == "厂商直采" || dbProd.product_get_type_text == "1688厂家" || dbProd.product_get_type_text == "微信小店") + && dbProd.wx_cat_1 != null && dbProd.wx_cat_leaf != null) { var row = dgvDbProduct.Rows.Cast().FirstOrDefault(r => r.Cells["col_spu_id"].Value.ParseToString() == dbProd.spu_id); @@ -1362,6 +1438,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms "&cat_name=" + HttpUtility.UrlEncode(dbProd.cat_name, Encoding.UTF8) + "&main_cat_id=" + dbProd.main_cat_id + "&main_cat_name=" + HttpUtility.UrlEncode(dbProd.main_cat_name, Encoding.UTF8); + //// 临时将详细数据的销量赋值给列表并保存 + //if (dbProd.product_get_type_text == "微信小店") + //{ + // var wxxdData = JsonHelper.SerializeObject(JsonHelper.JObjectParse(dbProd.product_json)["wxxdData"]); + // WXClientProductInfoLite wxClientProdInfo = JsonHelper.DeserializeJsonToObject(wxxdData); + // data += "&sale_count=" + wxClientProdInfo.info.total_sold_num + + // "&sale_count_text=" + wxClientProdInfo.info.total_sold_num; + //} var html = GetHtml.PostUtf8(url, data); if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) html = GetHtml.PostUtf8(url, data); diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.Designer.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.Designer.cs index b5de236..ec00b1e 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.Designer.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.Designer.cs @@ -30,12 +30,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms 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 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(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); this.label7 = new System.Windows.Forms.Label(); @@ -88,10 +88,16 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.chkLowPriceSku = new TemuKJD.UserComponent.UcCheckBox(this.components); this.lblLowPriceSkuImg = new System.Windows.Forms.Label(); this.ucGroupBoxEx4 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.chkSkipQualification = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.cmbSourceType = new System.Windows.Forms.ComboBox(); + this.label8 = new System.Windows.Forms.Label(); this.btnClearFilter = new DevComponents.DotNetBar.PanelEx(); + this.txtAddCount = new System.Windows.Forms.TextBox(); this.txtIdFilter = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.cmbCateFilter = new System.Windows.Forms.ComboBox(); + this.panelEx2 = new DevComponents.DotNetBar.PanelEx(); this.label2 = new System.Windows.Forms.Label(); this.cmbGroupFilter = new System.Windows.Forms.ComboBox(); this.label20 = new System.Windows.Forms.Label(); @@ -99,8 +105,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.btnClearUpload = new DevComponents.DotNetBar.PanelEx(); this.lblWaitToUp = new System.Windows.Forms.Label(); this.lblGoodsCount = new System.Windows.Forms.Label(); - this.txtAddCount = new System.Windows.Forms.TextBox(); - this.panelEx2 = new DevComponents.DotNetBar.PanelEx(); this.label16 = new System.Windows.Forms.Label(); this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx(); @@ -148,8 +152,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.btnClear = new DevComponents.DotNetBar.PanelEx(); this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); this.panel1 = new System.Windows.Forms.Panel(); - this.cmbSourceType = new System.Windows.Forms.ComboBox(); - this.label8 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -161,6 +163,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.panel3.SuspendLayout(); this.fPnlPriceRule.SuspendLayout(); this.ucGroupBoxEx4.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.ucGroupBoxEx1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit(); this.splitContainer3.Panel1.SuspendLayout(); @@ -929,12 +932,16 @@ namespace TemuKJD.PDDForms.ProductSelectForms | 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.chkSkipQualification); + this.ucGroupBoxEx4.Controls.Add(this.pictureBox1); this.ucGroupBoxEx4.Controls.Add(this.cmbSourceType); this.ucGroupBoxEx4.Controls.Add(this.label8); this.ucGroupBoxEx4.Controls.Add(this.btnClearFilter); + this.ucGroupBoxEx4.Controls.Add(this.txtAddCount); this.ucGroupBoxEx4.Controls.Add(this.txtIdFilter); this.ucGroupBoxEx4.Controls.Add(this.label1); this.ucGroupBoxEx4.Controls.Add(this.cmbCateFilter); + this.ucGroupBoxEx4.Controls.Add(this.panelEx2); this.ucGroupBoxEx4.Controls.Add(this.label2); this.ucGroupBoxEx4.Controls.Add(this.cmbGroupFilter); this.ucGroupBoxEx4.Controls.Add(this.label20); @@ -942,8 +949,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.ucGroupBoxEx4.Controls.Add(this.btnClearUpload); this.ucGroupBoxEx4.Controls.Add(this.lblWaitToUp); this.ucGroupBoxEx4.Controls.Add(this.lblGoodsCount); - this.ucGroupBoxEx4.Controls.Add(this.txtAddCount); - this.ucGroupBoxEx4.Controls.Add(this.panelEx2); this.ucGroupBoxEx4.Controls.Add(this.label16); this.ucGroupBoxEx4.Location = new System.Drawing.Point(147, 2); this.ucGroupBoxEx4.Name = "ucGroupBoxEx4"; @@ -952,16 +957,65 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.ucGroupBoxEx4.TabStop = false; this.ucGroupBoxEx4.Text = "待传商品"; // + // chkSkipQualification + // + this.chkSkipQualification.Checked = true; + this.chkSkipQualification.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkSkipQualification.Location = new System.Drawing.Point(159, 76); + this.chkSkipQualification.Name = "chkSkipQualification"; + this.chkSkipQualification.Size = new System.Drawing.Size(87, 21); + this.chkSkipQualification.TabIndex = 807; + this.chkSkipQualification.Text = "跳过资质商品"; + this.chkSkipQualification.UseVisualStyleBackColor = true; + this.chkSkipQualification.Visible = false; + // + // pictureBox1 + // + this.pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.None; + this.pictureBox1.Image = global::TemuKJD.Properties.Resources.loading_blue; + this.pictureBox1.Location = new System.Drawing.Point(9, 106); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(24, 24); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pictureBox1.TabIndex = 681; + this.pictureBox1.TabStop = false; + this.pictureBox1.Visible = false; + this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click); + // + // cmbSourceType + // + this.cmbSourceType.FormattingEnabled = true; + this.cmbSourceType.Items.AddRange(new object[] { + "", + "厂商直采", + "母店采集", + "机会商品", + "外部数据"}); + this.cmbSourceType.Location = new System.Drawing.Point(37, 74); + this.cmbSourceType.Name = "cmbSourceType"; + this.cmbSourceType.Size = new System.Drawing.Size(92, 25); + this.cmbSourceType.TabIndex = 671; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(8, 78); + this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(32, 17); + this.label8.TabIndex = 670; + this.label8.Text = "来源"; + // // btnClearFilter // this.btnClearFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 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(254, 23); + this.btnClearFilter.Location = new System.Drawing.Point(254, 18); this.btnClearFilter.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); this.btnClearFilter.Name = "btnClearFilter"; - this.btnClearFilter.Size = new System.Drawing.Size(48, 51); + this.btnClearFilter.Size = new System.Drawing.Size(48, 37); this.btnClearFilter.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnClearFilter.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); this.btnClearFilter.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); @@ -978,9 +1032,18 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.btnClearFilter.Text = "清除\r\n筛选"; this.btnClearFilter.Click += new System.EventHandler(this.btnClearFilter_Click); // + // txtAddCount + // + this.txtAddCount.Location = new System.Drawing.Point(172, 105); + this.txtAddCount.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtAddCount.Name = "txtAddCount"; + this.txtAddCount.Size = new System.Drawing.Size(35, 23); + this.txtAddCount.TabIndex = 536; + this.txtAddCount.Text = "500"; + // // txtIdFilter // - this.txtIdFilter.Location = new System.Drawing.Point(158, 51); + this.txtIdFilter.Location = new System.Drawing.Point(158, 47); 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); @@ -989,7 +1052,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(130, 54); + this.label1.Location = new System.Drawing.Point(130, 50); 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); @@ -999,114 +1062,18 @@ namespace TemuKJD.PDDForms.ProductSelectForms // cmbCateFilter // this.cmbCateFilter.FormattingEnabled = true; - this.cmbCateFilter.Location = new System.Drawing.Point(158, 22); + this.cmbCateFilter.Location = new System.Drawing.Point(158, 18); this.cmbCateFilter.Name = "cmbCateFilter"; this.cmbCateFilter.Size = new System.Drawing.Size(92, 25); this.cmbCateFilter.TabIndex = 663; // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(130, 26); - 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); - this.label2.TabIndex = 662; - this.label2.Text = "类目"; - // - // cmbGroupFilter - // - this.cmbGroupFilter.FormattingEnabled = true; - this.cmbGroupFilter.Location = new System.Drawing.Point(37, 22); - this.cmbGroupFilter.Name = "cmbGroupFilter"; - this.cmbGroupFilter.Size = new System.Drawing.Size(92, 25); - this.cmbGroupFilter.TabIndex = 641; - // - // label20 - // - this.label20.AutoSize = true; - this.label20.Location = new System.Drawing.Point(8, 25); - 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); - this.label20.TabIndex = 570; - this.label20.Text = "分组"; - // - // txtExtCodeFilter - // - this.txtExtCodeFilter.Location = new System.Drawing.Point(37, 51); - 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); - this.txtExtCodeFilter.TabIndex = 555; - // - // btnClearUpload - // - this.btnClearUpload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - 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(242, 107); - this.btnClearUpload.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); - this.btnClearUpload.Name = "btnClearUpload"; - this.btnClearUpload.Size = new System.Drawing.Size(60, 23); - this.btnClearUpload.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnClearUpload.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.btnClearUpload.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.btnClearUpload.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.btnClearUpload.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnClearUpload.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.btnClearUpload.Style.GradientAngle = 90; - this.btnClearUpload.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; - this.btnClearUpload.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnClearUpload.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnClearUpload.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnClearUpload.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; - this.btnClearUpload.TabIndex = 548; - this.btnClearUpload.Text = "清空待传"; - this.btnClearUpload.Click += new System.EventHandler(this.btnClearUpload_Click); - // - // lblWaitToUp - // - this.lblWaitToUp.AutoSize = true; - 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(132, 110); - 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); - this.lblWaitToUp.TabIndex = 541; - this.lblWaitToUp.Text = "待上传 0 件"; - this.lblWaitToUp.Click += new System.EventHandler(this.lblWaitToUp_Click); - // - // lblGoodsCount - // - this.lblGoodsCount.AutoSize = true; - this.lblGoodsCount.Location = new System.Drawing.Point(9, 110); - 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); - this.lblGoodsCount.TabIndex = 537; - this.lblGoodsCount.Text = "产品库 0 件"; - this.lblGoodsCount.Click += new System.EventHandler(this.lblGoodsCount_Click); - // - // txtAddCount - // - this.txtAddCount.Location = new System.Drawing.Point(158, 79); - this.txtAddCount.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); - this.txtAddCount.Name = "txtAddCount"; - this.txtAddCount.Size = new System.Drawing.Size(47, 23); - this.txtAddCount.TabIndex = 536; - this.txtAddCount.Text = "500"; - // // panelEx2 // this.panelEx2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; 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(209, 79); + this.panelEx2.Location = new System.Drawing.Point(209, 105); this.panelEx2.Name = "panelEx2"; this.panelEx2.Size = new System.Drawing.Size(93, 23); this.panelEx2.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -1124,10 +1091,97 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.panelEx2.Text = "随机添加商品"; this.panelEx2.Click += new System.EventHandler(this.btnRandomAdd_Click); // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(130, 22); + 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); + this.label2.TabIndex = 662; + this.label2.Text = "类目"; + // + // cmbGroupFilter + // + this.cmbGroupFilter.FormattingEnabled = true; + this.cmbGroupFilter.Location = new System.Drawing.Point(37, 18); + this.cmbGroupFilter.Name = "cmbGroupFilter"; + this.cmbGroupFilter.Size = new System.Drawing.Size(92, 25); + this.cmbGroupFilter.TabIndex = 641; + // + // label20 + // + this.label20.AutoSize = true; + this.label20.Location = new System.Drawing.Point(8, 21); + 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); + this.label20.TabIndex = 570; + this.label20.Text = "分组"; + // + // txtExtCodeFilter + // + this.txtExtCodeFilter.Location = new System.Drawing.Point(37, 47); + 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); + this.txtExtCodeFilter.TabIndex = 555; + // + // btnClearUpload + // + this.btnClearUpload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + 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(254, 59); + this.btnClearUpload.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); + this.btnClearUpload.Name = "btnClearUpload"; + this.btnClearUpload.Size = new System.Drawing.Size(48, 37); + this.btnClearUpload.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnClearUpload.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnClearUpload.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnClearUpload.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnClearUpload.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClearUpload.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnClearUpload.Style.GradientAngle = 90; + this.btnClearUpload.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnClearUpload.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnClearUpload.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClearUpload.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClearUpload.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnClearUpload.TabIndex = 548; + this.btnClearUpload.Text = "清空\r\n待传"; + this.btnClearUpload.Click += new System.EventHandler(this.btnClearUpload_Click); + // + // lblWaitToUp + // + this.lblWaitToUp.AutoSize = true; + 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(35, 118); + 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); + this.lblWaitToUp.TabIndex = 541; + this.lblWaitToUp.Text = "待上传 0 件"; + this.lblWaitToUp.Click += new System.EventHandler(this.lblWaitToUp_Click); + // + // lblGoodsCount + // + this.lblGoodsCount.AutoSize = true; + this.lblGoodsCount.Location = new System.Drawing.Point(35, 101); + 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); + this.lblGoodsCount.TabIndex = 537; + this.lblGoodsCount.Text = "产品库 0 件"; + this.lblGoodsCount.Click += new System.EventHandler(this.lblGoodsCount_Click); + // // label16 // this.label16.AutoSize = true; - this.label16.Location = new System.Drawing.Point(8, 54); + this.label16.Location = new System.Drawing.Point(8, 50); 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); @@ -1219,19 +1273,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms // this.dgvShop.AllowUserToAddRows = false; this.dgvShop.AllowUserToDeleteRows = false; - dataGridViewCellStyle7.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; 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; + 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.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colSelect, @@ -1246,6 +1300,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.colMessage}); this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvShop.Location = new System.Drawing.Point(4, 0); + this.dgvShop.MultiSelectCheckBox = true; this.dgvShop.Name = "dgvShop"; this.dgvShop.ReadOnly = true; this.dgvShop.RowHeadersWidth = 25; @@ -1388,19 +1443,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms // this.dgvSelectProduct.AllowUserToAddRows = false; this.dgvSelectProduct.AllowUserToDeleteRows = false; - dataGridViewCellStyle9.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; 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; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colCheck, @@ -1427,6 +1482,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.colOpResult}); this.dgvSelectProduct.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvSelectProduct.Location = new System.Drawing.Point(0, 0); + this.dgvSelectProduct.MultiSelectCheckBox = true; this.dgvSelectProduct.Name = "dgvSelectProduct"; this.dgvSelectProduct.ReadOnly = true; this.dgvSelectProduct.RowTemplate.Height = 23; @@ -1461,8 +1517,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms // // colSupplierName // - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5; this.colSupplierName.Frozen = true; this.colSupplierName.HeaderText = "店铺名称"; this.colSupplierName.Name = "colSupplierName"; @@ -1540,8 +1596,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms // // colProductName // - dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colProductName.DefaultCellStyle = dataGridViewCellStyle12; + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colProductName.DefaultCellStyle = dataGridViewCellStyle6; this.colProductName.HeaderText = "商品标题"; this.colProductName.Name = "colProductName"; this.colProductName.ReadOnly = true; @@ -1704,29 +1760,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.panel1.TabIndex = 189; this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint); // - // cmbSourceType - // - this.cmbSourceType.FormattingEnabled = true; - this.cmbSourceType.Items.AddRange(new object[] { - "", - "店铺采集", - "机会商品", - "外部数据"}); - this.cmbSourceType.Location = new System.Drawing.Point(37, 78); - this.cmbSourceType.Name = "cmbSourceType"; - this.cmbSourceType.Size = new System.Drawing.Size(92, 25); - this.cmbSourceType.TabIndex = 671; - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(8, 82); - this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(32, 17); - this.label8.TabIndex = 670; - this.label8.Text = "来源"; - // // PDDDBProdUserSelectForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -1735,6 +1768,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.Controls.Add(this.splitContainer1); this.Controls.Add(this.panel1); this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.KeyPreview = true; this.Name = "PDDDBProdUserSelectForm"; this.Text = "PDDDBProdUserSelectForm"; this.Load += new System.EventHandler(this.UserSelectDbProductForm_Load); @@ -1754,6 +1788,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.fPnlPriceRule.PerformLayout(); this.ucGroupBoxEx4.ResumeLayout(false); this.ucGroupBoxEx4.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ucGroupBoxEx1.ResumeLayout(false); this.splitContainer3.Panel1.ResumeLayout(false); this.splitContainer3.Panel2.ResumeLayout(false); @@ -1891,5 +1926,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms private System.Windows.Forms.Label label6; private System.Windows.Forms.ComboBox cmbSourceType; private System.Windows.Forms.Label label8; + private System.Windows.Forms.PictureBox pictureBox1; + private UserComponent.UcCheckBox chkSkipQualification; } } \ No newline at end of file diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs index cbecba2..930466a 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs @@ -43,6 +43,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms "跑步鞋", "棉鞋", "高帮休闲鞋", "网面鞋", "勃肯鞋/软木鞋", "包头拖", "足部磨砂", "老爹鞋", "工装鞋", "豆豆鞋", "汉服鞋", "雨鞋" }; public CancellationTokenSource cancellationTokenSource { get; set; } = null; + public CancellationTokenSource cancelAddProd { get; set; } = null; public bool IsLoadComplate { get; set; } = false; bool isInit = false; @@ -757,7 +758,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms prod.shop_account, "登录", "进店", - prod.spu_id, + //prod.spu_id, + BaseClass.SaLevel > 0 ? prod.spu_id : prod.spu_id.ParseToString().GetHashCode().ParseToString().Trim('-'), prod.skc_id, prod.main_img, null, @@ -765,7 +767,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms null, prod.product_name, // 用户端显示商品原名 prod.cat_name, - prod.ext_code, + //prod.secret_spu_id == null ? prod.ext_code : prod.secret_spu_id, + BaseClass.SaLevel > 0 ? prod.ext_code : prod.ext_code.ParseToString().GetHashCode().ParseToString().Trim('-'), prod.status, prod.draft_id, prod.notes, @@ -813,6 +816,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms KJDDBProduct kjdDbProd = prod.kjdDbProduct; if (kjdDbProd == null) kjdDbProd = GetProductDetail(prod.out_product_Id.ToString()); + if (!string.IsNullOrEmpty(kjdDbProd.secret_spu_id)) + { + Invoke(new Action(()=> { row.Cells["colExtCode"].Value = kjdDbProd.secret_spu_id; })); + } if (kjdDbProd == null || kjdDbProd.id == 0) { if (kjdDbProd?.id == 0) @@ -916,13 +923,16 @@ namespace TemuKJD.PDDForms.ProductSelectForms Invoke(new Action(() => { - row.Cells["colSkuFakeImgUrl"].Value = kjdDbProd.sku_img_replace_url; - if (row.Displayed) + if (chkActivity.Checked) { - string getImgError = ""; - Image img = GetHtml.GetUrlImg(kjdDbProd.sku_img_replace_url.Replace("https://", "http://"), out getImgError); - if (string.IsNullOrEmpty(getImgError)) - row.Cells["colSkuFakeImg"].Value = img; + row.Cells["colSkuFakeImgUrl"].Value = kjdDbProd.sku_img_replace_url; + if (row.Displayed) + { + string getImgError = ""; + Image img = GetHtml.GetUrlImg(kjdDbProd.sku_img_replace_url.Replace("https://", "http://"), out getImgError); + if (string.IsNullOrEmpty(getImgError)) + row.Cells["colSkuFakeImg"].Value = img; + } } })); @@ -1032,13 +1042,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms { return "店铺为空或未登录!"; } - if (cell != null) + Invoke(new Action(() => { - Invoke(new Action(() => + if (cell != null) { cell.Value = "正在初始化上传"; - })); - } + } + })); //testUploadProd(shop); //return "测试上货"; @@ -1047,7 +1057,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms int sleepTime = 0; int sleepTimeTotal = 0; - var prodInfo = JsonHelper.DeserializeJsonToObject(dbProd.product_json); + #region 将聚水潭产品数据格式进行转换成pdd格式统一上传,匹配加密的spuCode和skuCoke + if (dbProd.product_get_type_text == "厂商直采" && dbProd.sku_secret_json != null && dbProd.sku_secret_json.Contains("goodsId")) + { + string convertRst = ""; + var pProd = new PDDProdFormConverter().JstPddProdToPddConvert(out convertRst, dbProd); + if (!string.IsNullOrEmpty(convertRst)) + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"商品查询错误 " + convertRst + "\"}"; + } + #endregion + + PDDProductInfo prodInfo = null; + prodInfo = JsonHelper.DeserializeJsonToObject(dbProd.product_json); + prodInfo.detail.galleries.RemoveAll(g => g.type == 6); // 视频暂时移除,以后再视情况加上 if (prodInfo.detail.cats == null || prodInfo.detail.cats.Where(c => !string.IsNullOrEmpty(c)).Count() == 0) { @@ -1222,13 +1244,14 @@ namespace TemuKJD.PDDForms.ProductSelectForms } } - if (cell != null) + Invoke(new Action(() => { - Invoke(new Action(() => + if (cell != null) { cell.Value = "正在获取商品模板"; - })); - } + } + })); + //商品属性模板 PDDProductTemplateInfo prodCatTemplateInfo = null; Thread.Sleep(Randomx.GetId(10, 50)); @@ -1293,13 +1316,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms } } - if (cell != null) + Invoke(new Action(() => { - Invoke(new Action(() => + if (cell != null) { cell.Value = "正在获取运费模板"; - })); - } + } + })); //运费模板 string cost_template_html = get_cost_template(shop, prodInfo.detail.cat_ids, prodParam.goods_id.ParseToString(), prodParam.goods_commit_id, prodInfo.chance_tab); @@ -1336,16 +1359,150 @@ namespace TemuKJD.PDDForms.ProductSelectForms var hot_keywordsStr = JsonHelper.SerializeObject(hot_keywordsArr); prodParam.title_keywords = JsonHelper.DeserializeJsonToList(hot_keywordsStr); - if (cell != null) + Invoke(new Action(() => { - Invoke(new Action(() => + if (cell != null) { cell.Value = "正在查询关键字"; - })); - } + } + })); } catch (Exception ex) { } + if (dbProd.product_get_type_text == "厂商直采") + { + var queryRst = querySpecName(shop, prodInfo.detail.cat_id.ParseToLong(), prodParam.goods_id.ParseToString(), prodParam.goods_commit_id); + if (!queryRst.Contains("\"success\":true")) + { + var error = BaseRegex.GetStringJson(ref queryRst, "error_msg"); + if (string.IsNullOrEmpty(error)) + error = queryRst; + return "商品sku属性编号获取失败 " + error; + } + + Dictionary specNameDic = new Dictionary(); + foreach (var jObj in JsonHelper.JObjectParse(queryRst)["result"]) + { + string specStr = JsonHelper.SerializeObject(jObj); + var specId = BaseRegex.GetLongJson(ref specStr, "id"); + var specValue = BaseRegex.GetStringJson(ref specStr, "value"); + specNameDic[specId] = specValue; + } + + + foreach (var skuInfo in prodInfo.detail.sku) + { + foreach (var specInfo in skuInfo.spec) + { + specInfo.parent_id = 0; + specInfo.spec_id = 0; + } + } + + foreach (var skuInfo in prodInfo.detail.sku) + { + var index = 0; + foreach(var specInfo in skuInfo.spec) + { + long id = 0; + try + { + id = specNameDic.FirstOrDefault(s => s.Value == specInfo.parent_name).Key; + } + catch + { + } + if (id == 0) + id = specNameDic.ToList()[index].Key; + + specInfo.parent_id = id; + specInfo.spec_id = prodInfo.detail.sku.FirstOrDefault(s => s.spec[index].spec_name == specInfo.spec_name && s.spec[index].spec_id > 0)?.spec[index].spec_id; + + if (specInfo.spec_id == null || specInfo.spec_id == 0) + { + // 根据修改过的spec_name获取spec_id + var changeSpecRst = get_spec_by_name(shop, specInfo.spec_name, specInfo.parent_id.ParseToLong(), prodInfo.detail.cat_id.ParseToInt(), + prodParam.goods_id.ParseToString(), prodParam.goods_commit_id, prodInfo.chance_tab); + Thread.Sleep(Randomx.GetId(50, 100)); + if (!changeSpecRst.Contains("\"success\":true")) + { + var error = BaseRegex.GetStringJson(ref changeSpecRst, "error_msg"); + if (string.IsNullOrEmpty(error)) + error = changeSpecRst; + return "商品sku属性编号获取失败 " + error; + } + else + { + specInfo.spec_id = BaseRegex.GetLongJson(ref changeSpecRst, "result"); + } + } + index++; + } + } + } + + // 上传外部商品图片 + foreach (var imgInfo in prodInfo.detail.galleries) + { + if (imgInfo.url.Contains("img.pddpic.com")) + continue; + + string getImgError = ""; + Image img = GetHtml.GetUrlImg(imgInfo.url, out getImgError); + if (!string.IsNullOrEmpty(getImgError)) + { + //BaseMsgForm.ShowError(getImgError); + return "上传商品图片失败 " + getImgError; + } + + string uploadUpgradeSkuImgRst = UploadProdSkuImg(shop, img, prodParam.goods_id.ParseToString(), prodParam.goods_commit_id, prodInfo.chance_tab); + Thread.Sleep(Randomx.GetId(50, 200)); + + if (!uploadUpgradeSkuImgRst.Contains("\"url\":\"https:")) + { + var error = BaseRegex.GetStringJson(ref uploadUpgradeSkuImgRst, "error_msg"); + if (string.IsNullOrEmpty(error)) + error = uploadUpgradeSkuImgRst; + return "上传商品图片失败 " + error; + } + else + { + var upgrade_thumb_url = BaseRegex.GetStringJson(ref uploadUpgradeSkuImgRst, "url"); + imgInfo.url = upgrade_thumb_url; + } + } + + // 上传商品图片 + foreach (var skuInfo in prodInfo.detail.sku) + { + if (skuInfo.thumb_url.Contains("img.pddpic.com")) + continue; + + string getImgError = ""; + Image img = GetHtml.GetUrlImg(skuInfo.thumb_url, out getImgError); + if (!string.IsNullOrEmpty(getImgError)) + { + //BaseMsgForm.ShowError(getImgError); + return "上传商品图片失败 " + getImgError; + } + + string uploadUpgradeSkuImgRst = UploadProdSkuImg(shop, img, prodParam.goods_id.ParseToString(), prodParam.goods_commit_id, prodInfo.chance_tab); + Thread.Sleep(Randomx.GetId(50, 200)); + + if (!uploadUpgradeSkuImgRst.Contains("\"url\":\"https:")) + { + var error = BaseRegex.GetStringJson(ref uploadUpgradeSkuImgRst, "error_msg"); + if (string.IsNullOrEmpty(error)) + error = uploadUpgradeSkuImgRst; + return "上传商品图片失败 " + error; + } + else + { + var upgrade_thumb_url = BaseRegex.GetStringJson(ref uploadUpgradeSkuImgRst, "url"); + skuInfo.thumb_url = upgrade_thumb_url; + } + } + // 根据详情图获取decoration装修模板 if (prodInfo.decoration == null || prodInfo.decoration.floor_list == null || prodInfo.decoration.floor_list.Count == 0) { @@ -1582,13 +1739,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms } } - if (cell != null) + Invoke(new Action(() => { - Invoke(new Action(() => + if (cell != null) { cell.Value = "正在编辑商品属性"; - })); - } + } + })); List goods_property_param_lst = new List(); goods_property_param_lst.Add(prop); while (goods_property_param_lst.Count > 0) @@ -1623,11 +1780,11 @@ namespace TemuKJD.PDDForms.ProductSelectForms //} prodCatTemplateInfo.modules.FirstOrDefault()?.propertys.RemoveAll(p => p.ref_pid == subProperty.ref_pid); // 如果有二级属性,先要把原来的一级属性删掉 - if (subProperty.values.content.Count > 1) + if (subProperty.values?.content?.Count > 1) { } - if (subProperty.required && subProperty.values.content.Count == 1) + if (subProperty.required && subProperty.values?.content?.Count == 1) { var propNew = new goods_property_param() { @@ -1678,6 +1835,29 @@ namespace TemuKJD.PDDForms.ProductSelectForms } } + if (propInfo.name == "品牌" && propInfo.values.FirstOrDefault()?.value == "其他家") + { + propInfo.values.FirstOrDefault().value = "无品牌/无注册商标"; + propInfo.values.FirstOrDefault().raw_value = "无品牌/无注册商标"; + propInfo.values.FirstOrDefault().vid = 4643510; + } + + if (propInfo.name == "适用人群") + { + //if (!propInfo.values.All(v => propTemp.values.content.Any(c => c.value == v.value))) + //{ + // continue; + //} + var propTempValue = propTemp.values.content.FirstOrDefault(v => propInfo.values.Any(pv => v.value.Contains(pv.value))); + if (propTempValue == null) + propTempValue = propTemp.values.content.FirstOrDefault(v => propInfo.values.Any(pv => v.value.Contains(pv.value))); + if (propTempValue == null) + continue; + propInfo.values.FirstOrDefault().value = propTempValue.value; + propInfo.values.FirstOrDefault().raw_value = propTempValue.value; + propInfo.values.FirstOrDefault().vid = propTempValue.vid; + } + //var prop = new goods_property_param() var prop = new goods_spec_property_param() { @@ -1983,6 +2163,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms sku_id = skuInfo.sku_id, thumb_url_file_id = skuInfo.thumb_url_file_id, }; + if (dbProd.product_get_type_text == "厂商直采" && skuInfo.quantity == 0) + skuParam.quantity_delta = 0; if (chkUseExtCodePrice.Checked && dbProd.ext_code_price > 0) { skuParam.price = dbProd.ext_code_price + skuParam.price - skuParam.multi_price; @@ -2069,13 +2251,123 @@ namespace TemuKJD.PDDForms.ProductSelectForms baseSkuParamLst.Add(skuParam); } + + // 厂商直采获取推单运费模板 + #region 获取推单运费模板,计算运费加价。 + Invoke(new Action(() => + { + if (cell != null) + { + cell.Value = "正在选取运费模板"; + } + })); + + var shippingTemplateJson = ""; + var shipPrice = 0; + + if (dbProd.product_get_type_text == "厂商直采" && dbProd.wx_cat_leaf != null) + { + var urlShipping = BaseClass.BuildWXObjString("product/wx_get_shipping_template"); + var dataShipping = Work.UserLogin.GetSignaturex() + + "&coid=" + dbProd.skc_id; + var htmlShipping = GetHtml.PostUtf8(urlShipping, dataShipping); + if (string.IsNullOrEmpty(htmlShipping) || !htmlShipping.Contains("\"code\":200")) + htmlShipping = GetHtml.PostUtf8(urlShipping, dataShipping); + if (string.IsNullOrEmpty(htmlShipping) || !htmlShipping.Contains("\"code\":200")) + { + } + else + { + if (htmlShipping.Contains("\"data\":\"\"")) + { + } + else + { + try + { + shippingTemplateJson = JsonHelper.SerializeObject(JsonHelper.JObjectParse(htmlShipping)["data"]); + } + catch + { + + } + } + } + + if (string.IsNullOrEmpty(shippingTemplateJson)) + { + // 获取运费模板 + var urlShip = BaseClass.BuildWXObjString("product/e57_get_freight_template"); + var dataShip = Work.UserLogin.GetSignaturex() + "&coid=" + dbProd.skc_id; + var shipRst = GetHtml.PostUtf8(urlShip, dataShip); + if (string.IsNullOrEmpty(shipRst) || !shipRst.Contains("\"code\":0")) + shipRst = GetHtml.PostUtf8(urlShipping, dataShipping); + if (!shipRst.Contains("\"code\":0")) + { + var errMsg = BaseRegex.GetStringJson(ref shipRst, "msg"); + if (string.IsNullOrEmpty(errMsg)) + errMsg = shipRst; + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"运费模板获取失败 " + errMsg + "\"}"; + } + try + { + //[{"id":"204","warehouseNum":"15016108","freightType":0,"provinces":"香港特别行政区,台湾省,澳门特别行政区","freightPrice":9999900,"createBy":"vmslin","createTime":"2026-01-30T16:45:03+08:00","updateBy":"vmslin","updateTime":"2026-01-30T16:45:03+08:00"},{"id":"205","warehouseNum":"15016108","freightType":3,"provinces":"海南省,新疆维吾尔自治区,西藏自治区,内蒙古自治区","freightPrice":1530,"createBy":"vmslin","createTime":"2026-01-30T16:45:51+08:00","updateBy":"vmslin","updateTime":"2026-01-30T16:45:51+08:00"},{"id":"206","warehouseNum":"15016108","freightType":1,"provinces":"北京市,上海市","freightPrice":410,"createBy":"vmslin","createTime":"2026-01-30T16:46:04+08:00","updateBy":"vmslin","updateTime":"2026-01-30T16:46:04+08:00"},{"id":"207","warehouseNum":"15016108","freightType":1,"provinces":"安徽省,重庆市,福建省,广东省,甘肃省,广西壮族自治区,贵州省,河北省,湖北省,黑龙江省,河南省,湖南省,吉林省,江苏省,江西省,辽宁省,宁夏回族自治区,青海省,四川省,山东省,山西省,陕西省,天津市,云南省,浙江省","freightPrice":310,"createBy":"vmslin","createTime":"2026-01-30T16:46:17+08:00","updateBy":"vmslin","updateTime":"2026-01-30T16:46:17+08:00"}] + shippingTemplateJson = JsonHelper.SerializeObject(JsonHelper.JObjectParse(shipRst)["data"]); + if (shipRst.Contains("\"code\":0") && !string.IsNullOrEmpty(shippingTemplateJson)) + { + urlShipping = BaseClass.BuildWXObjString("product/wx_add_mdy_shipping_template"); + dataShipping = Work.UserLogin.GetSignaturex() + + "&coid=" + dbProd.skc_id + + "&shipping_template_json=" + shippingTemplateJson; + htmlShipping = GetHtml.PostUtf8(urlShipping, dataShipping); + if (string.IsNullOrEmpty(htmlShipping) || !htmlShipping.Contains("\"code\":200")) + htmlShipping = GetHtml.PostUtf8(urlShipping, dataShipping); + } + } + catch (Exception ex) + { + } + } + + if (!string.IsNullOrEmpty(shippingTemplateJson)) + { + try + { + int count = 0; + var shipObjs = JArray.Parse(shippingTemplateJson); + foreach (var shipObj in shipObjs) + { + var provincesStr = shipObj["provinces"].ParseToString(); + if (provincesStr.Split(',').Length > count) + { + count = provincesStr.Split(',').Length; + shipPrice = shipObj["freightPrice"].ParseToInt(); + } + } + } + catch (Exception ex) + { + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"运费模板获取失败 " + ex.Message + "\"}"; + } + } + if (shipPrice <= 0) + { + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"运费模板获取失败 未获取到\"}"; + } + } + #endregion + // 生成正常加价的sku列表 foreach (var skuParamInfo in baseSkuParamLst) { var skuParam = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(skuParamInfo)); skuParam.multi_price = (skuParamInfo.multi_price * this.txtAddTimes.Text.Trim().ParseToDecimal() + this.txtAddMorePrice.Text.Trim().ParseToDecimal() * 100).ParseToInt(); skuParam.price = (skuParamInfo.price * this.txtAddTimes.Text.Trim().ParseToDecimal() + this.txtAddMorePrice.Text.Trim().ParseToDecimal() * 100).ParseToInt(); - skuParam.quantity_delta = txtStockNum.Text.Trim().ParseToInt(); + //上面已经给过值了,且厂商直采的上家缺货则保持缺货。 + //skuParam.quantity_delta = txtStockNum.Text.Trim().ParseToInt(); + + skuParam.multi_price += shipPrice; + skuParam.price += shipPrice; if (isAddMorePriceFirst) // 先加后乘 skuParam.multi_price = ((skuParamInfo.multi_price + this.txtAddMorePrice.Text.Trim().ParseToDecimal() * 100) * this.txtAddTimes.Text.Trim().ParseToDecimal()).ParseToInt(); @@ -2096,6 +2388,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms } } } + if (prodParam.market_price < skuParam.price + 1000) { prodParam.market_price = skuParam.price + 1000; @@ -2652,9 +2945,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms { var skuParam = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(skuParamInfo)); + skuParam.multi_price += shipPrice; + skuParam.price += shipPrice; + skuParam.multi_price = (skuParamInfo.multi_price * this.txtAddTimesFake.Text.Trim().ParseToDecimal()).ParseToInt(); skuParam.price = (skuParamInfo.price * this.txtAddTimesFake.Text.Trim().ParseToDecimal()).ParseToInt(); - skuParam.quantity_delta = txtStockNum.Text.Trim().ParseToInt(); // 库存 + //上面已经给过值了,且厂商直采的上家缺货则保持缺货。 + //skuParam.quantity_delta = txtStockNum.Text.Trim().ParseToInt(); // 库存 if (isAddMorePriceFirst) // 先加后乘 skuParam.multi_price = ((skuParamInfo.multi_price) * this.txtAddTimesFake.Text.Trim().ParseToDecimal()).ParseToInt(); @@ -2857,13 +3154,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms } #endregion - if (cell != null) + Invoke(new Action(() => { - Invoke(new Action(() => + if (cell != null) { cell.Value = "正在保存商品"; - })); - } + } + })); var decorationRst = ""; #region 先随即提交一个带 preview_key 的,但是这个不起作用,后面再提交一个不带 preview_key 的才是真实的能查询到的商品详情信息 decorationRst = save_decoration(shop, decorationParam, prodParam.goods_id.ParseToString(), prodParam.goods_commit_id, prodInfo.chance_tab); @@ -3005,13 +3302,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms } - if (cell != null) + Invoke(new Action(() => { - Invoke(new Action(() => + if (cell != null) { cell.Value = "正在提交商品"; - })); - } + } + })); Thread.Sleep(Randomx.GetId(20, 100)); //var str = JsonHelper.SerializeObject(prodParam); var uploadRst = submit_goods_edit(shop, prodParam.goods_id.ParseToString(), prodParam.goods_commit_id, isChanceApi); @@ -3036,13 +3333,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms if (pddUploadRule.IsSignActivity) { Thread.Sleep(10000); - if (cell != null) + Invoke(new Action(() => { - Invoke(new Action(() => + if (cell != null) { cell.Value = "正在上传商品"; - })); - } + } + })); Thread.Sleep(Randomx.GetId(30000, 40000)); Thread.Sleep(Randomx.GetId(6000, 12000)); @@ -3059,13 +3356,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms var endTime = DateTime.Now; var timeSpan = endTime - startTime; var duration = timeSpan.TotalSeconds; - if (cell != null) + Invoke(new Action(() => { - Invoke(new Action(() => + if (cell != null) { cell.Value = "商品已上传,进行后续操作中" + " " + duration.ParseToInt() + "秒"; - })); - } + } + })); bool sign20981 = chk20981.Checked; bool sign22347 = chk22347.Checked; bool sign15996 = chk15996.Checked; @@ -3081,16 +3378,16 @@ namespace TemuKJD.PDDForms.ProductSelectForms if (!getProdRst1.Contains(prodParamHighPriceFakeSkuImg.goods_id.ParseToString()) && !getProdRst2.Contains(prodParamHighPriceFakeSkuImg.goods_id.ParseToString()) && !getProdRst3.Contains(prodParamHighPriceFakeSkuImg.goods_id.ParseToString()) && !getProdRst4.Contains(prodParamHighPriceFakeSkuImg.goods_id.ParseToString())) { - if (cell != null) + endTime = DateTime.Now; + timeSpan = endTime - startTime; + duration = timeSpan.TotalSeconds; + Invoke(new Action(() => { - endTime = DateTime.Now; - timeSpan = endTime - startTime; - duration = timeSpan.TotalSeconds; - Invoke(new Action(() => + if (cell != null) { cell.Value = "上传错误,商品不存在" + " " + duration.ParseToInt() + "秒"; - })); - } + } + })); return; } else if (chk22347.Checked) @@ -3098,16 +3395,16 @@ namespace TemuKJD.PDDForms.ProductSelectForms // 如果报了直通车,判断商品自动加入直通车以后再放行(循环12次应该已加入,否则认为加入失败跳过) for (int i = 0; i < 30 && !getProdRst2.Contains(prodParamHighPriceFakeSkuImg.goods_id.ParseToString()) && chk22347.Checked; i++) { - if (cell != null) + endTime = DateTime.Now; + timeSpan = endTime - startTime; + duration = timeSpan.TotalSeconds; + Invoke(new Action(() => { - endTime = DateTime.Now; - timeSpan = endTime - startTime; - duration = timeSpan.TotalSeconds; - Invoke(new Action(() => + if (cell != null) { cell.Value = "商品已上传,进行后续操作中" + " " + duration.ParseToInt() + "秒"; - })); - } + } + })); Thread.Sleep(60 * 1000); //getProdRst1 = queryActivityGoodsEnabled(shop, prodParam.goods_id.ParseToString(), 22347, 0); getProdRst2 = queryActivityGoodsEnabled(shop, prodParamHighPriceFakeSkuImg.goods_id.ParseToString(), 22347, 1); @@ -3127,16 +3424,16 @@ namespace TemuKJD.PDDForms.ProductSelectForms if (string.IsNullOrEmpty(error)) error = getProdIdRst; - if (cell != null) + endTime = DateTime.Now; + timeSpan = endTime - startTime; + duration = timeSpan.TotalSeconds; + Invoke(new Action(() => { - endTime = DateTime.Now; - timeSpan = endTime - startTime; - duration = timeSpan.TotalSeconds; - Invoke(new Action(() => + if (cell != null) { cell.Value = "上传失败 校验上传失败 " + error + " " + duration.ParseToInt() + "秒"; - })); - } + } + })); return; } @@ -3201,7 +3498,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms skuParam.multi_price_in_yuan = ""; // 内部计算直接置空 skuParam.pre_sale_time = skuInfo.pre_sale_time; skuParam.sku_id = skuInfo.sku_id; - foreach(var spec in skuParam.spec) + foreach (var spec in skuParam.spec) { spec.is_custom = spec.is_custom.ParseToInt(); } @@ -3252,10 +3549,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms })); - var spec0NameLst = prodParamHighPriceFakeSkuImg.skus.Select(s => s.spec[0].spec_name).Distinct().ToList(); - + var spec0NameLst = prodParamHighPriceFakeSkuImg.skus.Select(s => s.spec[0].spec_name).Distinct().ToList(); + int flag = 0; foreach (var specName in spec0NameLst) { + flag++; + endTime = DateTime.Now; timeSpan = endTime - startTime; duration = timeSpan.TotalSeconds; @@ -3265,7 +3564,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms })); List signLst = new List() { 20981, 15996, 21365, 22347 }; - while (signLst.Count > 0) + while (signLst.Count > 0 && (flag == 1 || flag % 2 == 0 || spec0NameLst.LastOrDefault() == specName)) { var signId = signLst[Randomx.GetId(0, signLst.Count)]; signLst.Remove(signId); @@ -3321,70 +3620,75 @@ namespace TemuKJD.PDDForms.ProductSelectForms fakeImgSku.thumb_url_file_id = null; } - getProdIdRst = get_prod_commit_id(shop, prodParamHighPriceFakeSkuImg.goods_id.ParseToString(), false); - newCommitId = BaseRegex.GetStringJson(ref getProdIdRst, "goods_commit_id"); - prodParamHighPriceFakeSkuImg.goods_commit_id = newCommitId; - if (string.IsNullOrEmpty(newCommitId) || !getProdIdRst.Contains("\"success\":true")) + if (1 == 1 && (flag % 2 == 0 || spec0NameLst.LastOrDefault() == specName)) { - var error = BaseRegex.GetStringJson(ref getProdIdRst, "error_msg"); - if (string.IsNullOrEmpty(error)) - error = getProdIdRst; - if (cell != null) + getProdIdRst = get_prod_commit_id(shop, prodParamHighPriceFakeSkuImg.goods_id.ParseToString(), false); + newCommitId = BaseRegex.GetStringJson(ref getProdIdRst, "goods_commit_id"); + prodParamHighPriceFakeSkuImg.goods_commit_id = newCommitId; + if (string.IsNullOrEmpty(newCommitId) || !getProdIdRst.Contains("\"success\":true")) { + var error = BaseRegex.GetStringJson(ref getProdIdRst, "error_msg"); + if (string.IsNullOrEmpty(error)) + error = getProdIdRst; + endTime = DateTime.Now; timeSpan = endTime - startTime; duration = timeSpan.TotalSeconds; Invoke(new Action(() => { - cell.Value = "上传失败 校验上传失败 " + error + " " + duration.ParseToInt() + "秒"; + if (cell != null) + { + cell.Value = "上传失败 校验上传失败 " + error + " " + duration.ParseToInt() + "秒"; + } })); + return; } - return; - } - var reSaveProdRst = save_goods_edit(shop, prodParamHighPriceFakeSkuImg, prodParamHighPriceFakeSkuImg.goods_id.ParseToString(), - prodParamHighPriceFakeSkuImg.goods_commit_id, isChanceApi, "edit"); - if (!reSaveProdRst.Contains("\"success\":true")) - { - var error = BaseRegex.GetStringJson(ref reSaveProdRst, "error_msg"); - if (string.IsNullOrEmpty(error)) - error = reSaveProdRst; - - if (cell != null) + var reSaveProdRst = save_goods_edit(shop, prodParamHighPriceFakeSkuImg, prodParamHighPriceFakeSkuImg.goods_id.ParseToString(), + prodParamHighPriceFakeSkuImg.goods_commit_id, isChanceApi, "edit"); + if (!reSaveProdRst.Contains("\"success\":true")) { + var error = BaseRegex.GetStringJson(ref reSaveProdRst, "error_msg"); + if (string.IsNullOrEmpty(error)) + error = reSaveProdRst; + + if (cell != null) + { + endTime = DateTime.Now; + timeSpan = endTime - startTime; + duration = timeSpan.TotalSeconds; + Invoke(new Action(() => + { + cell.Value = "上传失败 保存失败 " + error + " " + duration.ParseToInt() + "秒"; + })); + } + return; + } + + Thread.Sleep(Randomx.GetId(20, 100)); + var reUploadRst = submit_goods_edit(shop, prodParamHighPriceFakeSkuImg.goods_id.ParseToString(), prodParamHighPriceFakeSkuImg.goods_commit_id, isChanceApi, "edit"); + if (!reUploadRst.Contains("\"success\":true")) + { + var error = BaseRegex.GetStringJson(ref reUploadRst, "error_msg"); + if (string.IsNullOrEmpty(error)) + error = reUploadRst; + + endTime = DateTime.Now; timeSpan = endTime - startTime; duration = timeSpan.TotalSeconds; Invoke(new Action(() => { - cell.Value = "上传失败 保存失败 " + error + " " + duration.ParseToInt() + "秒"; + if (cell != null) + { + cell.Value = "上传失败 保存失败 " + error + " " + duration.ParseToInt() + "秒"; + } })); + return; } - return; + Thread.Sleep(Randomx.GetId(12000, 15000)); } - - Thread.Sleep(Randomx.GetId(20, 100)); - var reUploadRst = submit_goods_edit(shop, prodParamHighPriceFakeSkuImg.goods_id.ParseToString(), prodParamHighPriceFakeSkuImg.goods_commit_id, isChanceApi, "edit"); - if (!reUploadRst.Contains("\"success\":true")) - { - var error = BaseRegex.GetStringJson(ref reUploadRst, "error_msg"); - if (string.IsNullOrEmpty(error)) - error = reUploadRst; - - if (cell != null) - { - endTime = DateTime.Now; - timeSpan = endTime - startTime; - duration = timeSpan.TotalSeconds; - Invoke(new Action(() => - { - cell.Value = "上传失败 保存失败 " + error + " " + duration.ParseToInt() + "秒"; - })); - } - return; - } - Thread.Sleep(Randomx.GetId(12000, 15000)); } string activityErr = SignActivity(shop, prodParam, sign22347, sign20981, sign21365, sign15996); @@ -3395,12 +3699,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms //return "已上传 " + activityErr; } - if (cell != null) + endTime = DateTime.Now; + timeSpan = endTime - startTime; + duration = timeSpan.TotalSeconds; + Invoke(new Action(() => { - endTime = DateTime.Now; - timeSpan = endTime - startTime; - duration = timeSpan.TotalSeconds; - Invoke(new Action(() => + if (cell != null) { if (!string.IsNullOrEmpty(activityErr)) { @@ -3410,8 +3714,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms { cell.Value = "已成功上传" + " " + duration.ParseToInt() + "秒"; } - })); - } + } + })); } public void LoadActivityPage(ShopLoginInfo shop, PDDShopLoginForm loginForm = null) @@ -4603,6 +4907,31 @@ Content-Disposition: form-data; name=""pic_operations"" return result; } + private string querySpecName(ShopLoginInfo shop, long catId, string goodsId, string commitId) + { + var anti = shop.AntiContents.LastOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + string url = "https://mms.pinduoduo.com/glide/v2/mms/query/spec/name/list"; + string body = @"{""cat_id"":" + catId + "}"; + string refere = "https://mms.pinduoduo.com/goods/goods_add/index?id=" + commitId + + "&goods_id=" + goodsId + "&type=edit"; + + var result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); + for (int i = 0; i < 5 && result.Contains("网络繁忙,请不要频繁操作"); i++) + { + shop.AntiContents.Remove(anti); + anti = shop.AntiContents.FirstOrDefault().ParseToString(); + if (shop.AntiContents.Count > 0) + { + Thread.Sleep(Randomx.GetId(300, 500)); + anti = shop.AntiContents[Randomx.GetId(shop.AntiContents.Count)]; + result = HttpResponseBLL.PDDPostResponse(shop, url, body, refere, anti); + } + } + return result; + } + private string get_spec_by_name(ShopLoginInfo shop, string skuSpecName, long specParentId, int catId, string goodsId, string commitId, string chanceTab) { var anti = shop.AntiContents.LastOrDefault().ParseToString(); @@ -5673,19 +6002,30 @@ Content-Type: image/jpeg private void btnRandomAdd_Click(object sender, EventArgs e) { int addCount = txtAddCount.Text.Trim().ParseToInt(); + pictureBox1.Visible = true; + if (cancelAddProd != null) + cancelAddProd.Cancel(); + cancelAddProd = new CancellationTokenSource(); Task.Run(() => { + int prodCount = 0; + List list = new List(); while (addCount > 0) { - int prodCount = 0; - var list = GetRandomProductList(out prodCount, 1, 50); + if (cancelAddProd.IsCancellationRequested) + break; + // 等于50说明还有更多,不足50就不用再查了 + if (list.Count == 0 || list.Count == 50) + { + list = GetRandomProductList(out prodCount, 1, 50); + Thread.Sleep(Randomx.GetId(50,100)); + } if (list.Count == 0) // 等于0要么库里没数据要么出错了,跳出 break; Invoke(new Action(() => { lblGoodsCount.Text = "产品库 " + prodCount + " 件"; })); - Thread.Sleep(Randomx.GetId(50,100)); foreach (var prod in list) { var selectProd = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(prod)); @@ -5705,7 +6045,8 @@ Content-Type: image/jpeg } NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_db_prod_upload_list", this.lstTemuDBProductSelect); } - }); + Invoke(new Action(() => { pictureBox1.Visible = false; })); + }, cancelAddProd.Token); } public List GetRandomProductList(out int totalCount, int page = 1, int pageSize = 50) @@ -5729,6 +6070,19 @@ Content-Type: image/jpeg data += "&in_groups=" + cmbGroupFilter.Text; data += "&in_cates=" + cmbCateFilter.Text; data += "&product_get_type=" + cmbSourceType.Text.Trim(); + if (cmbSourceType.Text.Trim() == "厂商直采") + { + // 聚水潭商品 // 分销已设置,类目已识别 + data += "&is_supplier_prod_ok=" + "已设置"; + data += "&wx_safe_status=" + "安全商品,未校验"; + } + + if (cmbSourceType.Text == "厂商直采" && chkSkipQualification.Checked) + { + // 厂商直采普通店铺不要随特殊商品 + data += "&wx_cat_1=" + string.Join(",", GlobalConfig.WxCatList.Where(c => c.level == 1 && !(c.name == "图书" || c.name == "食品饮料" || c.name == "成人用品")) + .Select(c => c.cat_id)); + } })); var html = GetHtml.PostUtf8(url, data); if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) @@ -6084,6 +6438,12 @@ Content-Type: image/jpeg NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_upload_rule", pddUploadRule); } } + + private void pictureBox1_Click(object sender, EventArgs e) + { + if (cancelAddProd != null) + cancelAddProd.Cancel(); + } } public class AddPriceRule diff --git a/TEMUKJD/ToolForms/Get1688ProductForm.Designer.cs b/TEMUKJD/ToolForms/Get1688ProductForm.Designer.cs index cd25c2f..d96953a 100644 --- a/TEMUKJD/ToolForms/Get1688ProductForm.Designer.cs +++ b/TEMUKJD/ToolForms/Get1688ProductForm.Designer.cs @@ -30,11 +30,11 @@ namespace TemuKJD.ToolForms private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + 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.line1 = new DevComponents.DotNetBar.Controls.Line(); this.label2 = new System.Windows.Forms.Label(); this.btnImportCookie = new DevComponents.DotNetBar.PanelEx(); @@ -88,10 +88,10 @@ namespace TemuKJD.ToolForms this.colWangwang = new System.Windows.Forms.DataGridViewImageColumn(); this.colDel = new System.Windows.Forms.DataGridViewLinkColumn(); this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.chkSkip = new TemuKJD.UserComponent.UcCheckBox(this.components); - this.btnGetDetail = new DevComponents.DotNetBar.PanelEx(); this.tabPage3 = new System.Windows.Forms.TabPage(); this.panel1 = new System.Windows.Forms.Panel(); + this.chkSkip = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.btnGetDetail = new DevComponents.DotNetBar.PanelEx(); this.pnlMultiLogin.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); @@ -567,7 +567,7 @@ namespace TemuKJD.ToolForms this.splitContainer1.Panel2.Controls.Add(this.label2); this.splitContainer1.Panel2.Controls.Add(this.line1); this.splitContainer1.Size = new System.Drawing.Size(1404, 561); - this.splitContainer1.SplitterDistance = 463; + this.splitContainer1.SplitterDistance = 465; this.splitContainer1.SplitterWidth = 3; this.splitContainer1.TabIndex = 4; // @@ -584,7 +584,7 @@ namespace TemuKJD.ToolForms this.ucTabControlMetro1.Name = "ucTabControlMetro1"; this.ucTabControlMetro1.SelectedIndex = 0; this.ucTabControlMetro1.ShowCloseButton = false; - this.ucTabControlMetro1.Size = new System.Drawing.Size(1404, 463); + this.ucTabControlMetro1.Size = new System.Drawing.Size(1404, 465); this.ucTabControlMetro1.TabIndex = 462; this.ucTabControlMetro1.TabSelectColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.ucTabControlMetro1.TabSelectTextColor = System.Drawing.Color.Gray; @@ -597,7 +597,7 @@ namespace TemuKJD.ToolForms this.tabPage1.Margin = new System.Windows.Forms.Padding(5); this.tabPage1.Name = "tabPage1"; this.tabPage1.Padding = new System.Windows.Forms.Padding(3); - this.tabPage1.Size = new System.Drawing.Size(1396, 431); + this.tabPage1.Size = new System.Drawing.Size(1396, 433); this.tabPage1.TabIndex = 0; this.tabPage1.Text = "商品页面"; this.tabPage1.UseVisualStyleBackColor = true; @@ -616,7 +616,7 @@ namespace TemuKJD.ToolForms this.splitContainer2.Panel1.Controls.Add(this.btnNext); this.splitContainer2.Panel1.Controls.Add(this.btnPrev); this.splitContainer2.Panel1.Controls.Add(this.txtAddress); - this.splitContainer2.Size = new System.Drawing.Size(1390, 425); + this.splitContainer2.Size = new System.Drawing.Size(1390, 427); this.splitContainer2.SplitterDistance = 26; this.splitContainer2.TabIndex = 6; // @@ -658,7 +658,7 @@ namespace TemuKJD.ToolForms 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(1396, 431); + this.tabPage2.Size = new System.Drawing.Size(1396, 433); this.tabPage2.TabIndex = 1; this.tabPage2.Text = "采集商品列表"; this.tabPage2.UseVisualStyleBackColor = true; @@ -667,7 +667,7 @@ namespace TemuKJD.ToolForms // this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None; this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; - this.pbLoading.Location = new System.Drawing.Point(673, 188); + this.pbLoading.Location = new System.Drawing.Point(673, 189); this.pbLoading.Name = "pbLoading"; this.pbLoading.Size = new System.Drawing.Size(50, 50); this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; @@ -679,20 +679,20 @@ namespace TemuKJD.ToolForms // this.dgvProduct.AllowUserToAddRows = false; this.dgvProduct.AllowUserToDeleteRows = false; - dataGridViewCellStyle11.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle11; + 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))))); - dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle12; + 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, @@ -718,7 +718,7 @@ namespace TemuKJD.ToolForms this.dgvProduct.Name = "dgvProduct"; this.dgvProduct.ReadOnly = true; this.dgvProduct.RowTemplate.Height = 23; - this.dgvProduct.Size = new System.Drawing.Size(1390, 425); + this.dgvProduct.Size = new System.Drawing.Size(1390, 427); this.dgvProduct.TabIndex = 7; this.dgvProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvProduct_CellContentClick); // @@ -754,8 +754,8 @@ namespace TemuKJD.ToolForms // // colGoodsName // - dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colGoodsName.DefaultCellStyle = dataGridViewCellStyle13; + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colGoodsName.DefaultCellStyle = dataGridViewCellStyle3; this.colGoodsName.HeaderText = "商品名称"; this.colGoodsName.Name = "colGoodsName"; this.colGoodsName.ReadOnly = true; @@ -787,8 +787,8 @@ namespace TemuKJD.ToolForms // // colPrice // - dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colPrice.DefaultCellStyle = dataGridViewCellStyle14; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colPrice.DefaultCellStyle = dataGridViewCellStyle4; this.colPrice.FillWeight = 40F; this.colPrice.HeaderText = "供货价"; this.colPrice.Name = "colPrice"; @@ -847,13 +847,32 @@ namespace TemuKJD.ToolForms // // colMsg // - dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colMsg.DefaultCellStyle = dataGridViewCellStyle15; + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colMsg.DefaultCellStyle = dataGridViewCellStyle5; this.colMsg.FillWeight = 160F; this.colMsg.HeaderText = "操作结果"; this.colMsg.Name = "colMsg"; this.colMsg.ReadOnly = true; // + // tabPage3 + // + this.tabPage3.Controls.Add(this.panel1); + this.tabPage3.Location = new System.Drawing.Point(4, 28); + this.tabPage3.Name = "tabPage3"; + this.tabPage3.Padding = new System.Windows.Forms.Padding(3); + this.tabPage3.Size = new System.Drawing.Size(1396, 432); + this.tabPage3.TabIndex = 2; + this.tabPage3.Text = "1688地址管理"; + this.tabPage3.UseVisualStyleBackColor = true; + // + // panel1 + // + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(3, 3); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(1390, 426); + this.panel1.TabIndex = 0; + // // chkSkip // this.chkSkip.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -892,25 +911,6 @@ namespace TemuKJD.ToolForms this.btnGetDetail.Text = "采集商品详情"; this.btnGetDetail.Click += new System.EventHandler(this.btnGetDetail_Click); // - // tabPage3 - // - this.tabPage3.Controls.Add(this.panel1); - this.tabPage3.Location = new System.Drawing.Point(4, 28); - this.tabPage3.Name = "tabPage3"; - this.tabPage3.Padding = new System.Windows.Forms.Padding(3); - this.tabPage3.Size = new System.Drawing.Size(1396, 431); - this.tabPage3.TabIndex = 2; - this.tabPage3.Text = "1688地址管理"; - this.tabPage3.UseVisualStyleBackColor = true; - // - // panel1 - // - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(3, 3); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(1390, 425); - this.panel1.TabIndex = 0; - // // Get1688ProductForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; diff --git a/TEMUKJD/ToolForms/Get1688ProductForm.cs b/TEMUKJD/ToolForms/Get1688ProductForm.cs index a11cf65..8ee92f4 100644 --- a/TEMUKJD/ToolForms/Get1688ProductForm.cs +++ b/TEMUKJD/ToolForms/Get1688ProductForm.cs @@ -72,7 +72,9 @@ namespace TemuKJD.ToolForms if (lst1688OneProductListInfo == null) lst1688OneProductListInfo = new ConcurrentList<_1688OneProductListInfo>(); - var _1688AddressForm = new Get1688AddressForm(); + var _1688AddressForm = new GetAddressForm() { AddressType = "1688" }; + _1688AddressForm.cmbType.Enabled = false; + _1688AddressForm.cmbTypeFilter.Enabled = false; _1688AddressForm.TopLevel = false; _1688AddressForm.FormBorderStyle = FormBorderStyle.None; _1688AddressForm.Dock = DockStyle.Fill; @@ -906,6 +908,13 @@ namespace TemuKJD.ToolForms "&cat_id=" + prod.dbProduct.cat_id + "&cat_name=" + HttpUtility.UrlEncode((prod.dbProduct.cat_name ?? prod.dbProduct.cat_name).ParseToString(), Encoding.UTF8); } + if (1 == 1) + { + //1688没有分销,但是聚水潭上货条件要判断1是否类目识别 2是否服务端加密 3是否分销 + //作为1688和聚水潭一致的上货必备条件,此处1688分销直接设置为1 + prod.dbProduct.distribution_set = 1; + data += "&distribution_set=1"; + } html = GetHtml.PostUtf8(url, data); if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) diff --git a/TEMUKJD/ToolForms/Get1688AddressForm.Designer.cs b/TEMUKJD/ToolForms/GetAddressForm.Designer.cs similarity index 74% rename from TEMUKJD/ToolForms/Get1688AddressForm.Designer.cs rename to TEMUKJD/ToolForms/GetAddressForm.Designer.cs index 961c481..b43c1e6 100644 --- a/TEMUKJD/ToolForms/Get1688AddressForm.Designer.cs +++ b/TEMUKJD/ToolForms/GetAddressForm.Designer.cs @@ -1,6 +1,6 @@ namespace TemuKJD.ToolForms { - partial class Get1688AddressForm + partial class GetAddressForm { /// /// Required designer variable. @@ -32,9 +32,12 @@ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer5 = new System.Windows.Forms.SplitContainer(); - this.pnlEmpty = new DevComponents.DotNetBar.PanelEx(); - this.txtSearch = new System.Windows.Forms.TextBox(); - this.label14 = new System.Windows.Forms.Label(); + this.label18 = new System.Windows.Forms.Label(); + this.cmbType = new System.Windows.Forms.ComboBox(); + this.label16 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.txtStreetName = new System.Windows.Forms.TextBox(); + this.label11 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); this.label10 = new System.Windows.Forms.Label(); @@ -54,7 +57,6 @@ this.label3 = new System.Windows.Forms.Label(); this.txtUserName = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); - this.btnRefresh = new TemuKJD.UserControls.ButtonEx(); this.btnCancel = new TemuKJD.UserControls.ButtonEx(); this.btnAddAddress = new TemuKJD.UserControls.ButtonEx(); this.label34 = new System.Windows.Forms.Label(); @@ -65,11 +67,15 @@ this.txtCoid = new System.Windows.Forms.TextBox(); this.label40 = new System.Windows.Forms.Label(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.cmbTypeFilter = new System.Windows.Forms.ComboBox(); + this.btnSearch = new DevComponents.DotNetBar.PanelEx(); + this.pnlEmpty = new DevComponents.DotNetBar.PanelEx(); + this.label17 = new System.Windows.Forms.Label(); + this.txtSearch = new System.Windows.Forms.TextBox(); + this.label14 = new System.Windows.Forms.Label(); this.pbLoading = new System.Windows.Forms.PictureBox(); - this.txtStreetName = new System.Windows.Forms.TextBox(); - this.label11 = new System.Windows.Forms.Label(); - this.dgvUser = new TemuKJD.UserComponent.DataGridViewEx(); - this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); + this.dgvAddress = new TemuKJD.UserComponent.DataGridViewEx(); this.colId = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colCoid = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colSupplierName = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -81,8 +87,11 @@ this.colCountyName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colStreetName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colDetailInfo = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colAddressType = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.editColumn = new System.Windows.Forms.DataGridViewLinkColumn(); this.deleteColumn = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colSync = new System.Windows.Forms.DataGridViewLinkColumn(); + this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer5)).BeginInit(); this.splitContainer5.Panel1.SuspendLayout(); this.splitContainer5.Panel2.SuspendLayout(); @@ -91,8 +100,12 @@ this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.dgvUser)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvAddress)).BeginInit(); this.SuspendLayout(); // // splitContainer5 @@ -105,9 +118,12 @@ // // splitContainer5.Panel1 // - this.splitContainer5.Panel1.Controls.Add(this.pnlEmpty); - this.splitContainer5.Panel1.Controls.Add(this.txtSearch); - this.splitContainer5.Panel1.Controls.Add(this.label14); + this.splitContainer5.Panel1.Controls.Add(this.label18); + this.splitContainer5.Panel1.Controls.Add(this.cmbType); + this.splitContainer5.Panel1.Controls.Add(this.label16); + this.splitContainer5.Panel1.Controls.Add(this.label15); + this.splitContainer5.Panel1.Controls.Add(this.txtStreetName); + this.splitContainer5.Panel1.Controls.Add(this.label11); this.splitContainer5.Panel1.Controls.Add(this.label13); this.splitContainer5.Panel1.Controls.Add(this.label12); this.splitContainer5.Panel1.Controls.Add(this.label10); @@ -127,7 +143,6 @@ this.splitContainer5.Panel1.Controls.Add(this.label3); this.splitContainer5.Panel1.Controls.Add(this.txtUserName); this.splitContainer5.Panel1.Controls.Add(this.label2); - this.splitContainer5.Panel1.Controls.Add(this.btnRefresh); this.splitContainer5.Panel1.Controls.Add(this.btnCancel); this.splitContainer5.Panel1.Controls.Add(this.btnAddAddress); this.splitContainer5.Panel1.Controls.Add(this.label34); @@ -147,55 +162,77 @@ this.splitContainer5.SplitterWidth = 1; this.splitContainer5.TabIndex = 2; // - // pnlEmpty + // label18 // - this.pnlEmpty.CanvasColor = System.Drawing.SystemColors.Control; - this.pnlEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.pnlEmpty.DisabledBackColor = System.Drawing.Color.Empty; - this.pnlEmpty.Location = new System.Drawing.Point(310, 5); - this.pnlEmpty.Name = "pnlEmpty"; - this.pnlEmpty.Size = new System.Drawing.Size(43, 25); - this.pnlEmpty.Style.Alignment = System.Drawing.StringAlignment.Center; - this.pnlEmpty.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.pnlEmpty.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.pnlEmpty.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.pnlEmpty.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.pnlEmpty.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.pnlEmpty.Style.GradientAngle = 90; - this.pnlEmpty.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; - this.pnlEmpty.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.pnlEmpty.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.pnlEmpty.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.pnlEmpty.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; - this.pnlEmpty.TabIndex = 417; - this.pnlEmpty.Text = "清空"; - this.pnlEmpty.Click += new System.EventHandler(this.pnlEmpty_Click); + this.label18.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label18.AutoSize = true; + this.label18.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); + this.label18.Location = new System.Drawing.Point(303, 39); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(13, 17); + this.label18.TabIndex = 65; + this.label18.Text = "*"; // - // txtSearch + // cmbType // - this.txtSearch.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.cmbType.FormattingEnabled = true; + this.cmbType.Items.AddRange(new object[] { + "", + "jst", + "1688"}); + this.cmbType.Location = new System.Drawing.Point(123, 34); + this.cmbType.Name = "cmbType"; + this.cmbType.Size = new System.Drawing.Size(173, 25); + this.cmbType.TabIndex = 64; + this.cmbType.Text = "jst"; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label16.Location = new System.Drawing.Point(22, 36); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(93, 20); + this.label16.TabIndex = 63; + this.label16.Text = "供应商类型:"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label15.Location = new System.Drawing.Point(5, 5); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(99, 20); + this.label15.TabIndex = 62; + this.label15.Text = "新增/修改地址"; + // + // txtStreetName + // + this.txtStreetName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtSearch.Location = new System.Drawing.Point(73, 6); - this.txtSearch.Name = "txtSearch"; - this.txtSearch.Size = new System.Drawing.Size(188, 23); - this.txtSearch.TabIndex = 60; + this.txtStreetName.Location = new System.Drawing.Point(123, 438); + this.txtStreetName.Name = "txtStreetName"; + this.txtStreetName.Size = new System.Drawing.Size(173, 23); + this.txtStreetName.TabIndex = 52; + this.txtStreetName.Visible = false; // - // label14 + // label11 // - this.label14.AutoSize = true; - this.label14.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label14.Location = new System.Drawing.Point(3, 7); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(79, 20); - this.label14.TabIndex = 61; - this.label14.Text = "模糊查询:"; + this.label11.AutoSize = true; + this.label11.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label11.Location = new System.Drawing.Point(65, 439); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(51, 20); + this.label11.TabIndex = 53; + this.label11.Text = "街道:"; + this.label11.Visible = false; // // label13 // this.label13.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label13.AutoSize = true; this.label13.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.label13.Location = new System.Drawing.Point(292, 157); + this.label13.Location = new System.Drawing.Point(303, 163); this.label13.Name = "label13"; this.label13.Size = new System.Drawing.Size(13, 17); this.label13.TabIndex = 59; @@ -205,7 +242,7 @@ // this.label12.AutoSize = true; this.label12.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(40, 155); + this.label12.Location = new System.Drawing.Point(51, 161); this.label12.Name = "label12"; this.label12.Size = new System.Drawing.Size(65, 20); this.label12.TabIndex = 58; @@ -216,7 +253,7 @@ this.label10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label10.AutoSize = true; this.label10.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.label10.Location = new System.Drawing.Point(292, 316); + this.label10.Location = new System.Drawing.Point(303, 322); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(13, 17); this.label10.TabIndex = 56; @@ -227,7 +264,7 @@ this.txtDetailInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtDetailInfo.Location = new System.Drawing.Point(112, 312); + this.txtDetailInfo.Location = new System.Drawing.Point(123, 318); this.txtDetailInfo.Multiline = true; this.txtDetailInfo.Name = "txtDetailInfo"; this.txtDetailInfo.Size = new System.Drawing.Size(173, 81); @@ -237,7 +274,7 @@ // this.txtTelNumber.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtTelNumber.Location = new System.Drawing.Point(111, 154); + this.txtTelNumber.Location = new System.Drawing.Point(123, 160); this.txtTelNumber.Name = "txtTelNumber"; this.txtTelNumber.Size = new System.Drawing.Size(173, 23); this.txtTelNumber.TabIndex = 57; @@ -246,7 +283,7 @@ // this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(27, 314); + this.label1.Location = new System.Drawing.Point(38, 320); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(79, 20); this.label1.TabIndex = 54; @@ -257,7 +294,7 @@ this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label8.AutoSize = true; this.label8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.label8.Location = new System.Drawing.Point(292, 250); + this.label8.Location = new System.Drawing.Point(303, 256); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(13, 17); this.label8.TabIndex = 51; @@ -267,7 +304,7 @@ // this.label9.AutoSize = true; this.label9.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(49, 279); + this.label9.Location = new System.Drawing.Point(60, 285); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(57, 20); this.label9.TabIndex = 50; @@ -277,7 +314,7 @@ // this.txtCountyName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtCountyName.Location = new System.Drawing.Point(112, 278); + this.txtCountyName.Location = new System.Drawing.Point(123, 284); this.txtCountyName.Name = "txtCountyName"; this.txtCountyName.Size = new System.Drawing.Size(173, 23); this.txtCountyName.TabIndex = 49; @@ -287,7 +324,7 @@ this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label6.AutoSize = true; this.label6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.label6.Location = new System.Drawing.Point(292, 219); + this.label6.Location = new System.Drawing.Point(303, 225); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(13, 17); this.label6.TabIndex = 48; @@ -297,7 +334,7 @@ // this.label7.AutoSize = true; this.label7.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(69, 248); + this.label7.Location = new System.Drawing.Point(80, 254); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(37, 20); this.label7.TabIndex = 47; @@ -307,7 +344,7 @@ // this.txtCityName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtCityName.Location = new System.Drawing.Point(112, 247); + this.txtCityName.Location = new System.Drawing.Point(123, 253); this.txtCityName.Name = "txtCityName"; this.txtCityName.Size = new System.Drawing.Size(173, 23); this.txtCityName.TabIndex = 46; @@ -317,7 +354,7 @@ this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label5.AutoSize = true; this.label5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.label5.Location = new System.Drawing.Point(292, 281); + this.label5.Location = new System.Drawing.Point(303, 287); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(13, 17); this.label5.TabIndex = 45; @@ -327,7 +364,7 @@ // this.label4.AutoSize = true; this.label4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(69, 217); + this.label4.Location = new System.Drawing.Point(80, 223); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(37, 20); this.label4.TabIndex = 44; @@ -337,7 +374,7 @@ // this.txtProvinceName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtProvinceName.Location = new System.Drawing.Point(112, 216); + this.txtProvinceName.Location = new System.Drawing.Point(123, 222); this.txtProvinceName.Name = "txtProvinceName"; this.txtProvinceName.Size = new System.Drawing.Size(173, 23); this.txtProvinceName.TabIndex = 43; @@ -346,7 +383,7 @@ // this.txtPostalCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtPostalCode.Location = new System.Drawing.Point(112, 185); + this.txtPostalCode.Location = new System.Drawing.Point(123, 191); this.txtPostalCode.Name = "txtPostalCode"; this.txtPostalCode.Size = new System.Drawing.Size(173, 23); this.txtPostalCode.TabIndex = 41; @@ -355,7 +392,7 @@ // this.label3.AutoSize = true; this.label3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(55, 186); + this.label3.Location = new System.Drawing.Point(66, 192); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(51, 20); this.label3.TabIndex = 40; @@ -365,7 +402,7 @@ // this.txtUserName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtUserName.Location = new System.Drawing.Point(112, 123); + this.txtUserName.Location = new System.Drawing.Point(123, 129); this.txtUserName.Name = "txtUserName"; this.txtUserName.Size = new System.Drawing.Size(173, 23); this.txtUserName.TabIndex = 39; @@ -374,28 +411,12 @@ // this.label2.AutoSize = true; this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(41, 124); + this.label2.Location = new System.Drawing.Point(52, 130); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(65, 20); this.label2.TabIndex = 38; this.label2.Text = "收件人:"; // - // btnRefresh - // - this.btnRefresh.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnRefresh.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnRefresh.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnRefresh.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnRefresh.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnRefresh.ForeColor = System.Drawing.Color.White; - this.btnRefresh.Location = new System.Drawing.Point(264, 5); - this.btnRefresh.Name = "btnRefresh"; - this.btnRefresh.Size = new System.Drawing.Size(43, 25); - this.btnRefresh.TabIndex = 36; - this.btnRefresh.Text = "查询"; - this.btnRefresh.UseVisualStyleBackColor = false; - this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click); - // // btnCancel // this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; @@ -404,7 +425,7 @@ this.btnCancel.Cursor = System.Windows.Forms.Cursors.Hand; this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnCancel.ForeColor = System.Drawing.Color.White; - this.btnCancel.Location = new System.Drawing.Point(111, 411); + this.btnCancel.Location = new System.Drawing.Point(123, 407); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(82, 25); this.btnCancel.TabIndex = 35; @@ -421,7 +442,7 @@ this.btnAddAddress.Cursor = System.Windows.Forms.Cursors.Hand; this.btnAddAddress.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnAddAddress.ForeColor = System.Drawing.Color.White; - this.btnAddAddress.Location = new System.Drawing.Point(203, 411); + this.btnAddAddress.Location = new System.Drawing.Point(215, 407); this.btnAddAddress.Name = "btnAddAddress"; this.btnAddAddress.Size = new System.Drawing.Size(82, 25); this.btnAddAddress.TabIndex = 34; @@ -434,7 +455,7 @@ this.label34.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label34.AutoSize = true; this.label34.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.label34.Location = new System.Drawing.Point(292, 126); + this.label34.Location = new System.Drawing.Point(303, 132); this.label34.Name = "label34"; this.label34.Size = new System.Drawing.Size(13, 17); this.label34.TabIndex = 29; @@ -445,7 +466,7 @@ this.label35.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label35.AutoSize = true; this.label35.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.label35.Location = new System.Drawing.Point(292, 95); + this.label35.Location = new System.Drawing.Point(303, 101); this.label35.Name = "label35"; this.label35.Size = new System.Drawing.Size(13, 17); this.label35.TabIndex = 28; @@ -456,7 +477,7 @@ this.label36.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label36.AutoSize = true; this.label36.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.label36.Location = new System.Drawing.Point(292, 64); + this.label36.Location = new System.Drawing.Point(303, 70); this.label36.Name = "label36"; this.label36.Size = new System.Drawing.Size(13, 17); this.label36.TabIndex = 27; @@ -466,7 +487,7 @@ // this.txtSupplierName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtSupplierName.Location = new System.Drawing.Point(112, 92); + this.txtSupplierName.Location = new System.Drawing.Point(123, 98); this.txtSupplierName.Name = "txtSupplierName"; this.txtSupplierName.Size = new System.Drawing.Size(173, 23); this.txtSupplierName.TabIndex = 21; @@ -475,7 +496,7 @@ // this.label39.AutoSize = true; this.label39.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label39.Location = new System.Drawing.Point(12, 93); + this.label39.Location = new System.Drawing.Point(23, 99); this.label39.Name = "label39"; this.label39.Size = new System.Drawing.Size(93, 20); this.label39.TabIndex = 20; @@ -485,7 +506,7 @@ // this.txtCoid.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtCoid.Location = new System.Drawing.Point(112, 61); + this.txtCoid.Location = new System.Drawing.Point(123, 67); this.txtCoid.Name = "txtCoid"; this.txtCoid.Size = new System.Drawing.Size(173, 23); this.txtCoid.TabIndex = 19; @@ -494,7 +515,7 @@ // this.label40.AutoSize = true; this.label40.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label40.Location = new System.Drawing.Point(25, 62); + this.label40.Location = new System.Drawing.Point(36, 68); this.label40.Name = "label40"; this.label40.Size = new System.Drawing.Size(80, 20); this.label40.TabIndex = 18; @@ -510,10 +531,7 @@ // // splitContainer1.Panel1 // - this.splitContainer1.Panel1.Controls.Add(this.pbLoading); - this.splitContainer1.Panel1.Controls.Add(this.txtStreetName); - this.splitContainer1.Panel1.Controls.Add(this.label11); - this.splitContainer1.Panel1.Controls.Add(this.dgvUser); + this.splitContainer1.Panel1.Controls.Add(this.splitContainer2); this.splitContainer1.Panel1.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0); // // splitContainer1.Panel2 @@ -524,48 +542,140 @@ this.splitContainer1.SplitterDistance = 436; this.splitContainer1.TabIndex = 2; // + // splitContainer2 + // + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer2.Location = new System.Drawing.Point(3, 0); + this.splitContainer2.Name = "splitContainer2"; + this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.Controls.Add(this.cmbTypeFilter); + this.splitContainer2.Panel1.Controls.Add(this.btnSearch); + this.splitContainer2.Panel1.Controls.Add(this.pnlEmpty); + this.splitContainer2.Panel1.Controls.Add(this.label17); + this.splitContainer2.Panel1.Controls.Add(this.txtSearch); + this.splitContainer2.Panel1.Controls.Add(this.label14); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.pbLoading); + this.splitContainer2.Panel2.Controls.Add(this.dgvAddress); + this.splitContainer2.Size = new System.Drawing.Size(914, 436); + this.splitContainer2.TabIndex = 55; + // + // cmbTypeFilter + // + this.cmbTypeFilter.FormattingEnabled = true; + this.cmbTypeFilter.Items.AddRange(new object[] { + "", + "jst", + "1688"}); + this.cmbTypeFilter.Location = new System.Drawing.Point(374, 12); + this.cmbTypeFilter.Name = "cmbTypeFilter"; + this.cmbTypeFilter.Size = new System.Drawing.Size(173, 25); + this.cmbTypeFilter.TabIndex = 803; + this.cmbTypeFilter.Text = "jst"; + // + // btnSearch + // + this.btnSearch.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnSearch.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSearch.DisabledBackColor = System.Drawing.Color.Empty; + this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSearch.Location = new System.Drawing.Point(561, 12); + this.btnSearch.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.btnSearch.Name = "btnSearch"; + this.btnSearch.Size = new System.Drawing.Size(52, 25); + this.btnSearch.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearch.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearch.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearch.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnSearch.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnSearch.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnSearch.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnSearch.Style.GradientAngle = 90; + this.btnSearch.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearch.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearch.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearch.TabIndex = 802; + this.btnSearch.Text = "查询"; + this.btnSearch.Click += new System.EventHandler(this.btnRefresh_Click); + // + // pnlEmpty + // + this.pnlEmpty.CanvasColor = System.Drawing.SystemColors.Control; + this.pnlEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.pnlEmpty.DisabledBackColor = System.Drawing.Color.Empty; + this.pnlEmpty.Location = new System.Drawing.Point(622, 12); + this.pnlEmpty.Name = "pnlEmpty"; + this.pnlEmpty.Size = new System.Drawing.Size(52, 25); + this.pnlEmpty.Style.Alignment = System.Drawing.StringAlignment.Center; + this.pnlEmpty.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.pnlEmpty.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.pnlEmpty.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.pnlEmpty.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.pnlEmpty.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.pnlEmpty.Style.GradientAngle = 90; + this.pnlEmpty.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.pnlEmpty.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.pnlEmpty.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.pnlEmpty.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.pnlEmpty.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.pnlEmpty.TabIndex = 417; + this.pnlEmpty.Text = "清空"; + this.pnlEmpty.Click += new System.EventHandler(this.pnlEmpty_Click); + // + // label17 + // + this.label17.AutoSize = true; + this.label17.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label17.Location = new System.Drawing.Point(290, 13); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(93, 20); + this.label17.TabIndex = 804; + this.label17.Text = "供应商类型:"; + // + // txtSearch + // + this.txtSearch.Location = new System.Drawing.Point(86, 12); + this.txtSearch.Name = "txtSearch"; + this.txtSearch.Size = new System.Drawing.Size(198, 23); + this.txtSearch.TabIndex = 60; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label14.Location = new System.Drawing.Point(16, 13); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(79, 20); + this.label14.TabIndex = 61; + this.label14.Text = "模糊查询:"; + // // 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(435, 193); + this.pbLoading.Location = new System.Drawing.Point(2729, 1154); this.pbLoading.Name = "pbLoading"; this.pbLoading.Size = new System.Drawing.Size(50, 50); this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pbLoading.TabIndex = 54; this.pbLoading.TabStop = false; // - // txtStreetName + // dgvAddress // - this.txtStreetName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtStreetName.Location = new System.Drawing.Point(86, 43); - this.txtStreetName.Name = "txtStreetName"; - this.txtStreetName.Size = new System.Drawing.Size(173, 23); - this.txtStreetName.TabIndex = 52; - this.txtStreetName.Visible = false; - // - // label11 - // - this.label11.AutoSize = true; - this.label11.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label11.Location = new System.Drawing.Point(29, 44); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(51, 20); - this.label11.TabIndex = 53; - this.label11.Text = "街道:"; - this.label11.Visible = false; - // - // dgvUser - // - this.dgvUser.AllowUserToAddRows = false; - this.dgvUser.AllowUserToDeleteRows = false; + this.dgvAddress.AllowUserToAddRows = false; + this.dgvAddress.AllowUserToDeleteRows = false; dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); - this.dgvUser.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.dgvUser.AutoRowNumber = true; - this.dgvUser.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; - this.dgvUser.BackgroundColor = System.Drawing.Color.White; - this.dgvUser.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.dgvAddress.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.dgvAddress.AutoRowNumber = true; + this.dgvAddress.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dgvAddress.BackgroundColor = System.Drawing.Color.White; + this.dgvAddress.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))); @@ -573,9 +683,9 @@ dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvUser.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; - this.dgvUser.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dgvUser.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.dgvAddress.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.dgvAddress.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvAddress.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colId, this.colCoid, this.colSupplierName, @@ -587,8 +697,10 @@ this.colCountyName, this.colStreetName, this.colDetailInfo, + this.colAddressType, this.editColumn, - this.deleteColumn}); + this.deleteColumn, + this.colSync}); dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); @@ -596,31 +708,17 @@ dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText; dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvUser.DefaultCellStyle = dataGridViewCellStyle3; - this.dgvUser.Dock = System.Windows.Forms.DockStyle.Fill; - this.dgvUser.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); - this.dgvUser.Location = new System.Drawing.Point(3, 0); - this.dgvUser.MultiSelectCheckBox = true; - this.dgvUser.Name = "dgvUser"; - this.dgvUser.ReadOnly = true; - this.dgvUser.RowTemplate.Height = 23; - this.dgvUser.Size = new System.Drawing.Size(914, 436); - this.dgvUser.TabIndex = 1; - this.dgvUser.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvUser_CellContentClick); - // - // ucSplitPage1 - // - this.ucSplitPage1.CurrentPage = 1; - this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right; - this.ucSplitPage1.IsShowPageSize = true; - this.ucSplitPage1.Location = new System.Drawing.Point(431, 0); - this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0); - this.ucSplitPage1.Name = "ucSplitPage1"; - this.ucSplitPage1.PageSize = 50; - this.ucSplitPage1.Size = new System.Drawing.Size(489, 25); - this.ucSplitPage1.TabIndex = 5; - this.ucSplitPage1.TotalPage = 1; - this.ucSplitPage1.PageChange += new System.Action(this.ucSplitPage1_PageChange); + this.dgvAddress.DefaultCellStyle = dataGridViewCellStyle3; + this.dgvAddress.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvAddress.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); + this.dgvAddress.Location = new System.Drawing.Point(0, 0); + this.dgvAddress.MultiSelectCheckBox = true; + this.dgvAddress.Name = "dgvAddress"; + this.dgvAddress.ReadOnly = true; + this.dgvAddress.RowTemplate.Height = 23; + this.dgvAddress.Size = new System.Drawing.Size(914, 382); + this.dgvAddress.TabIndex = 1; + this.dgvAddress.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvUser_CellContentClick); // // colId // @@ -638,7 +736,7 @@ // // colSupplierName // - this.colSupplierName.FillWeight = 150F; + this.colSupplierName.FillWeight = 160F; this.colSupplierName.HeaderText = "供应商名称"; this.colSupplierName.Name = "colSupplierName"; this.colSupplierName.ReadOnly = true; @@ -663,24 +761,28 @@ // // colProvinceName // + this.colProvinceName.FillWeight = 80F; this.colProvinceName.HeaderText = "省"; this.colProvinceName.Name = "colProvinceName"; this.colProvinceName.ReadOnly = true; // // colCityName // + this.colCityName.FillWeight = 80F; this.colCityName.HeaderText = "市"; this.colCityName.Name = "colCityName"; this.colCityName.ReadOnly = true; // // colCountyName // + this.colCountyName.FillWeight = 80F; this.colCountyName.HeaderText = "区/县"; this.colCountyName.Name = "colCountyName"; this.colCountyName.ReadOnly = true; // // colStreetName // + this.colStreetName.FillWeight = 80F; this.colStreetName.HeaderText = "街道"; this.colStreetName.Name = "colStreetName"; this.colStreetName.ReadOnly = true; @@ -693,8 +795,15 @@ this.colDetailInfo.Name = "colDetailInfo"; this.colDetailInfo.ReadOnly = true; // + // colAddressType + // + this.colAddressType.HeaderText = "类型"; + this.colAddressType.Name = "colAddressType"; + this.colAddressType.ReadOnly = true; + // // editColumn // + this.editColumn.FillWeight = 70F; this.editColumn.HeaderText = "编辑"; this.editColumn.Name = "editColumn"; this.editColumn.ReadOnly = true; @@ -703,11 +812,33 @@ // // deleteColumn // + this.deleteColumn.FillWeight = 70F; this.deleteColumn.HeaderText = "删除"; this.deleteColumn.Name = "deleteColumn"; this.deleteColumn.ReadOnly = true; // - // Get1688AddressForm + // colSync + // + this.colSync.FillWeight = 90F; + this.colSync.HeaderText = "同步地址"; + this.colSync.Name = "colSync"; + this.colSync.ReadOnly = true; + // + // ucSplitPage1 + // + this.ucSplitPage1.CurrentPage = 1; + this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right; + this.ucSplitPage1.IsShowPageSize = true; + this.ucSplitPage1.Location = new System.Drawing.Point(431, 0); + this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0); + this.ucSplitPage1.Name = "ucSplitPage1"; + this.ucSplitPage1.PageSize = 50; + this.ucSplitPage1.Size = new System.Drawing.Size(489, 25); + this.ucSplitPage1.TabIndex = 5; + this.ucSplitPage1.TotalPage = 1; + this.ucSplitPage1.PageChange += new System.Action(this.ucSplitPage1_PageChange); + // + // GetAddressForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; @@ -716,7 +847,7 @@ this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.KeyPreview = true; this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.Name = "Get1688AddressForm"; + this.Name = "GetAddressForm"; this.Text = "1688地址管理"; this.Load += new System.EventHandler(this.SubAccountForm_Load); this.splitContainer5.Panel1.ResumeLayout(false); @@ -725,12 +856,16 @@ ((System.ComponentModel.ISupportInitialize)(this.splitContainer5)).EndInit(); this.splitContainer5.ResumeLayout(false); this.splitContainer1.Panel1.ResumeLayout(false); - this.splitContainer1.Panel1.PerformLayout(); this.splitContainer1.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); this.splitContainer1.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); ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.dgvUser)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvAddress)).EndInit(); this.ResumeLayout(false); } @@ -747,8 +882,7 @@ private System.Windows.Forms.Label label39; private System.Windows.Forms.TextBox txtCoid; private System.Windows.Forms.Label label40; - private UserComponent.DataGridViewEx dgvUser; - private UserControls.ButtonEx btnRefresh; + private UserComponent.DataGridViewEx dgvAddress; private System.Windows.Forms.Label label11; private System.Windows.Forms.TextBox txtStreetName; private System.Windows.Forms.Label label8; @@ -776,6 +910,14 @@ private System.Windows.Forms.Label label14; private System.Windows.Forms.TextBox txtSearch; private DevComponents.DotNetBar.PanelEx pnlEmpty; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.SplitContainer splitContainer2; + private System.Windows.Forms.Label label16; + private DevComponents.DotNetBar.PanelEx btnSearch; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label18; + public System.Windows.Forms.ComboBox cmbType; + public System.Windows.Forms.ComboBox cmbTypeFilter; private System.Windows.Forms.DataGridViewTextBoxColumn colId; private System.Windows.Forms.DataGridViewTextBoxColumn colCoid; private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierName; @@ -787,7 +929,9 @@ private System.Windows.Forms.DataGridViewTextBoxColumn colCountyName; private System.Windows.Forms.DataGridViewTextBoxColumn colStreetName; private System.Windows.Forms.DataGridViewTextBoxColumn colDetailInfo; + private System.Windows.Forms.DataGridViewTextBoxColumn colAddressType; private System.Windows.Forms.DataGridViewLinkColumn editColumn; private System.Windows.Forms.DataGridViewLinkColumn deleteColumn; + private System.Windows.Forms.DataGridViewLinkColumn colSync; } } \ No newline at end of file diff --git a/TEMUKJD/ToolForms/Get1688AddressForm.cs b/TEMUKJD/ToolForms/GetAddressForm.cs similarity index 72% rename from TEMUKJD/ToolForms/Get1688AddressForm.cs rename to TEMUKJD/ToolForms/GetAddressForm.cs index 29a3345..738c619 100644 --- a/TEMUKJD/ToolForms/Get1688AddressForm.cs +++ b/TEMUKJD/ToolForms/GetAddressForm.cs @@ -18,23 +18,32 @@ using System.Threading; namespace TemuKJD.ToolForms { - public partial class Get1688AddressForm : BaseForm + public partial class GetAddressForm : BaseForm { + public string AddressType { get; set; } = "jst"; public CancellationTokenSource cancellationTokenSource { get; set; } = new CancellationTokenSource(); public static List lstAddressInfo { get; set; } = new List(); - public Get1688AddressForm() + public GetAddressForm() { InitializeComponent(); } private void SubAccountForm_Load(object sender, EventArgs e) { - this.dgvUser.BackgroundColor = Color.White; + this.dgvAddress.BackgroundColor = Color.White; + cmbType.Text = AddressType; + cmbTypeFilter.Text = AddressType; + Get1688Address(); } private void btnAddress_Click(object sender, EventArgs e) { + if (string.IsNullOrWhiteSpace(cmbType.Text)) + { + BaseMsgForm.ShowError("供应商类型不能为空"); + return; + } if (string.IsNullOrWhiteSpace(txtCoid.Text)) { BaseMsgForm.ShowError("供应商ID不能为空"); @@ -76,6 +85,21 @@ namespace TemuKJD.ToolForms return; } + // 先逻辑删除再添加 + StringBuilder sb = new StringBuilder(); + sb.Append(UserLogin.GetSignaturex()); + sb.Append("&coid=" + txtCoid.Text.Trim()); + string urlDel = BaseClass.BuildObjString("product/wx_del_address"); + string htmlDel = GetHtml.PostUtf8(urlDel, sb.ToString()); + if (!htmlDel.Contains("\"code\":200")) + { + var msg = BaseRegex.GetStringJson(ref htmlDel, "msg"); + if (string.IsNullOrEmpty(msg)) + msg = htmlDel; + BaseMsgForm.ShowError("出现异常,添加失败" + msg, "错误"); + return; + } + var jAfterSale = new JObject(); jAfterSale["address_id"] = null; jAfterSale["user_name"] = txtUserName.Text.Trim(); @@ -94,7 +118,7 @@ namespace TemuKJD.ToolForms data.Append("&coid=" + GetHtml.UrlEncodeUtf8(txtCoid.Text.Trim())); data.Append("&after_sale_json=" + GetHtml.UrlEncodeUtf8(JsonHelper.SerializeObject(jAfterSale))); data.Append("&supplier_name=" + GetHtml.UrlEncodeUtf8(txtSupplierName.Text.Trim())); - data.Append("&type=1688"); + data.Append("&type=" + cmbType.Text.Trim()); string url = BaseClass.BuildObjString("product/wx_add_mdy_after_sale"); string html = GetHtml.PostUtf8(url, data.ToString()).Trim(); if (!html.Contains("\"code\":200")) @@ -129,11 +153,12 @@ namespace TemuKJD.ToolForms txtSupplierName.Clear(); txtTelNumber.Clear(); txtUserName.Clear(); + cmbType.Text = AddressType; } private void Get1688Address(int page = 1) { - dgvUser.Rows.Clear(); + dgvAddress.Rows.Clear(); lstAddressInfo.Clear(); pbLoading.Visible = true; if (cancellationTokenSource != null) @@ -143,11 +168,15 @@ namespace TemuKJD.ToolForms { string url = BaseClass.BuildObjString("product/wx_get_after_sale_list"); string data = UserLogin.GetSignaturex(); - data += "&type=1688"; - if (!string.IsNullOrEmpty(txtSearch.Text.Trim())) - data += "&detail=" + txtSearch.Text.Trim(); - data += "&page=" + page; - data += "&page_size=" + ucSplitPage1.PageSize; + Invoke(new Action(() => + { + if (!string.IsNullOrEmpty(cmbTypeFilter.Text.Trim())) + data += "&type=" + cmbTypeFilter.Text.Trim(); + if (!string.IsNullOrEmpty(txtSearch.Text.Trim())) + data += "&detail=" + txtSearch.Text.Trim(); + data += "&page=" + page; + data += "&page_size=" + ucSplitPage1.PageSize; + })); string html = GetHtml.PostUtf8(url, data); if (!html.Contains("\"code\":200")) html = GetHtml.PostUtf8(url, data.ToString()).Trim(); @@ -173,13 +202,14 @@ namespace TemuKJD.ToolForms string county_name = BaseRegex.GetStringJson(ref addressDetailStr, "county_name"); string street_name = BaseRegex.GetStringJson(ref addressDetailStr, "street_name"); string detail_info = BaseRegex.GetStringJson(ref addressDetailStr, "detail_info"); + string name = BaseRegex.GetStringJson(ref addressDetailStr, "name"); Invoke(new Action(() => { - dgvUser.Rows.Add( + dgvAddress.Rows.Add( addressInfo.id, addressInfo.coid, - addressInfo.supplier_name, + addressInfo.supplier_name.IsNullOrEmpty() ? name : addressInfo.supplier_name, user_name, tel_number, postal_code, @@ -188,8 +218,10 @@ namespace TemuKJD.ToolForms county_name, street_name, detail_info, + addressInfo.type, "编辑", - "删除"); + "删除", + "同步"); })); } } @@ -212,23 +244,25 @@ namespace TemuKJD.ToolForms { if (e.ColumnIndex < 0 || e.RowIndex < 0) return; - string columname = dgvUser.Columns[e.ColumnIndex].HeaderText; - string coId = dgvUser.Rows[e.RowIndex].Cells["colCoid"].Value.ToString(); + string columname = dgvAddress.Columns[e.ColumnIndex].HeaderText; + string coId = dgvAddress.Rows[e.RowIndex].Cells["colCoid"].Value.ToString(); + var addressInfo = lstAddressInfo.FirstOrDefault(a => a.coid == coId); if (columname == "编辑") { btnAddAddress.Text = "保存地址"; btnCancel.Visible = true; btnCancel.Text = "取消編輯"; - txtCoid.Text = dgvUser.Rows[e.RowIndex].Cells["colCoid"].Value.ToString(); - txtSupplierName.Text = dgvUser.Rows[e.RowIndex].Cells["colSupplierName"].Value.ToString(); - txtUserName.Text = dgvUser.Rows[e.RowIndex].Cells["colUserName"].Value.ToString(); - txtPostalCode.Text = dgvUser.Rows[e.RowIndex].Cells["colPostalCode"].Value.ToString(); - txtTelNumber.Text = dgvUser.Rows[e.RowIndex].Cells["colTelNumber"].Value.ToString(); - txtProvinceName.Text = dgvUser.Rows[e.RowIndex].Cells["colProvinceName"].Value.ToString(); - txtCityName.Text = dgvUser.Rows[e.RowIndex].Cells["colCityName"].Value.ToString(); - txtCountyName.Text = dgvUser.Rows[e.RowIndex].Cells["colCountyName"].Value.ToString(); - txtStreetName.Text = dgvUser.Rows[e.RowIndex].Cells["colStreetName"].Value.ToString(); - txtDetailInfo.Text = dgvUser.Rows[e.RowIndex].Cells["colDetailInfo"].Value.ToString(); + txtCoid.Text = dgvAddress.Rows[e.RowIndex].Cells["colCoid"].Value.ParseToString(); + txtSupplierName.Text = dgvAddress.Rows[e.RowIndex].Cells["colSupplierName"].Value.ParseToString(); + txtUserName.Text = dgvAddress.Rows[e.RowIndex].Cells["colUserName"].Value.ParseToString(); + txtPostalCode.Text = dgvAddress.Rows[e.RowIndex].Cells["colPostalCode"].Value.ParseToString(); + txtTelNumber.Text = dgvAddress.Rows[e.RowIndex].Cells["colTelNumber"].Value.ToString(); + txtProvinceName.Text = dgvAddress.Rows[e.RowIndex].Cells["colProvinceName"].Value.ParseToString(); + txtCityName.Text = dgvAddress.Rows[e.RowIndex].Cells["colCityName"].Value.ParseToString(); + txtCountyName.Text = dgvAddress.Rows[e.RowIndex].Cells["colCountyName"].Value.ParseToString(); + txtStreetName.Text = dgvAddress.Rows[e.RowIndex].Cells["colStreetName"].Value.ParseToString(); + txtDetailInfo.Text = dgvAddress.Rows[e.RowIndex].Cells["colDetailInfo"].Value.ParseToString(); + cmbType.Text = dgvAddress.Rows[e.RowIndex].Cells["colAddressType"].Value.ParseToString(); } if (columname == "删除") { @@ -239,7 +273,7 @@ namespace TemuKJD.ToolForms } } - public void Delete(string coid) + public string Delete(string coid) { StringBuilder data = new StringBuilder(); data.Append(UserLogin.GetSignaturex()); @@ -252,15 +286,16 @@ namespace TemuKJD.ToolForms { BaseMsgForm.ShowInfo("删除成功", "提示"); Get1688Address(ucSplitPage1.CurrentPage); - return; + return ""; } var msg = BaseRegex.GetStringJson(ref html, "msg"); if (string.IsNullOrEmpty(msg)) msg = html; BaseMsgForm.ShowError(msg, "错误"); - return; + return "删除失败"; } BaseMsgForm.ShowError("返回异常", "错误"); + return "删除失败"; } private void btnRefresh_Click(object sender, EventArgs e) @@ -271,6 +306,7 @@ namespace TemuKJD.ToolForms private void pnlEmpty_Click(object sender, EventArgs e) { txtSearch.Clear(); + cmbTypeFilter.Text = AddressType; } private void ucSplitPage1_PageChange(object obj) diff --git a/TEMUKJD/ToolForms/Get1688AddressForm.resx b/TEMUKJD/ToolForms/GetAddressForm.resx similarity index 95% rename from TEMUKJD/ToolForms/Get1688AddressForm.resx rename to TEMUKJD/ToolForms/GetAddressForm.resx index 4278d34..e327fc8 100644 --- a/TEMUKJD/ToolForms/Get1688AddressForm.resx +++ b/TEMUKJD/ToolForms/GetAddressForm.resx @@ -150,10 +150,16 @@ True + + True + True True + + True + \ No newline at end of file diff --git a/TEMUKJD/ToolForms/GetJuShuitanProdForm.Designer.cs b/TEMUKJD/ToolForms/GetJuShuitanProdForm.Designer.cs index 5912ac4..e1ac234 100644 --- a/TEMUKJD/ToolForms/GetJuShuitanProdForm.Designer.cs +++ b/TEMUKJD/ToolForms/GetJuShuitanProdForm.Designer.cs @@ -164,7 +164,7 @@ namespace TemuKJD.ToolForms this.splitContainer2.Panel1.Controls.Add(this.btnNext); this.splitContainer2.Panel1.Controls.Add(this.btnPrev); this.splitContainer2.Panel1.Controls.Add(this.txtAddress); - this.splitContainer2.Size = new System.Drawing.Size(1390, 436); + this.splitContainer2.Size = new System.Drawing.Size(1390, 427); this.splitContainer2.SplitterDistance = 26; this.splitContainer2.TabIndex = 6; // @@ -246,10 +246,11 @@ namespace TemuKJD.ToolForms this.colMsg}); this.dgvProduct.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvProduct.Location = new System.Drawing.Point(3, 3); + this.dgvProduct.MultiSelectCheckBox = true; this.dgvProduct.Name = "dgvProduct"; this.dgvProduct.ReadOnly = true; this.dgvProduct.RowTemplate.Height = 23; - this.dgvProduct.Size = new System.Drawing.Size(1390, 437); + this.dgvProduct.Size = new System.Drawing.Size(1390, 436); this.dgvProduct.TabIndex = 7; this.dgvProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvProduct_CellContentClick); // @@ -406,7 +407,7 @@ namespace TemuKJD.ToolForms this.splitContainer1.Panel2.Controls.Add(this.label2); this.splitContainer1.Panel2.Controls.Add(this.line1); this.splitContainer1.Size = new System.Drawing.Size(1404, 561); - this.splitContainer1.SplitterDistance = 474; + this.splitContainer1.SplitterDistance = 465; this.splitContainer1.SplitterWidth = 3; this.splitContainer1.TabIndex = 4; // @@ -423,7 +424,7 @@ namespace TemuKJD.ToolForms this.ucTabControlMetro1.Name = "ucTabControlMetro1"; this.ucTabControlMetro1.SelectedIndex = 0; this.ucTabControlMetro1.ShowCloseButton = false; - this.ucTabControlMetro1.Size = new System.Drawing.Size(1404, 474); + this.ucTabControlMetro1.Size = new System.Drawing.Size(1404, 465); this.ucTabControlMetro1.TabIndex = 462; this.ucTabControlMetro1.TabSelectColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.ucTabControlMetro1.TabSelectTextColor = System.Drawing.Color.Gray; @@ -435,7 +436,7 @@ namespace TemuKJD.ToolForms 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(1396, 442); + this.tabPage1.Size = new System.Drawing.Size(1396, 433); this.tabPage1.TabIndex = 0; this.tabPage1.Text = "商品页面"; this.tabPage1.UseVisualStyleBackColor = true; @@ -444,10 +445,10 @@ namespace TemuKJD.ToolForms // this.tabPage2.Controls.Add(this.pbLoading); this.tabPage2.Controls.Add(this.dgvProduct); - this.tabPage2.Location = new System.Drawing.Point(4, 26); + 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(1396, 443); + this.tabPage2.Size = new System.Drawing.Size(1396, 442); this.tabPage2.TabIndex = 1; this.tabPage2.Text = "采集列表"; this.tabPage2.UseVisualStyleBackColor = true; @@ -455,9 +456,9 @@ namespace TemuKJD.ToolForms // tabPage3 // this.tabPage3.Controls.Add(this.splitContainer3); - this.tabPage3.Location = new System.Drawing.Point(4, 26); + this.tabPage3.Location = new System.Drawing.Point(4, 28); this.tabPage3.Name = "tabPage3"; - this.tabPage3.Size = new System.Drawing.Size(1396, 443); + this.tabPage3.Size = new System.Drawing.Size(1396, 442); this.tabPage3.TabIndex = 2; this.tabPage3.Text = "下架SKU查询"; this.tabPage3.UseVisualStyleBackColor = true; @@ -489,7 +490,7 @@ namespace TemuKJD.ToolForms // this.splitContainer3.Panel2.Controls.Add(this.pictureBox1); this.splitContainer3.Panel2.Controls.Add(this.dgvDownSku); - this.splitContainer3.Size = new System.Drawing.Size(1396, 443); + this.splitContainer3.Size = new System.Drawing.Size(1396, 442); this.splitContainer3.SplitterDistance = 82; this.splitContainer3.TabIndex = 0; // @@ -692,10 +693,11 @@ namespace TemuKJD.ToolForms this.dataGridViewTextBoxColumn8}); this.dgvDownSku.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvDownSku.Location = new System.Drawing.Point(0, 0); + this.dgvDownSku.MultiSelectCheckBox = true; this.dgvDownSku.Name = "dgvDownSku"; this.dgvDownSku.ReadOnly = true; this.dgvDownSku.RowTemplate.Height = 23; - this.dgvDownSku.Size = new System.Drawing.Size(1396, 357); + this.dgvDownSku.Size = new System.Drawing.Size(1396, 356); this.dgvDownSku.TabIndex = 8; // // colDownSelect diff --git a/TEMUKJD/UserComponent/UcComboBoxMutiSelect .cs b/TEMUKJD/UserComponent/UcComboBoxMutiSelect .cs index cfcb7fb..cc46844 100644 --- a/TEMUKJD/UserComponent/UcComboBoxMutiSelect .cs +++ b/TEMUKJD/UserComponent/UcComboBoxMutiSelect .cs @@ -18,7 +18,18 @@ namespace TemuKJD.UserComponent //private bool _IsMultiSelect; //public bool IsMultiSelect { get => _IsMultiSelect; set => _IsMultiSelect = value; } - public string DefaultText { get; set; } = "全部"; + string defaultText = "全部"; + [Browsable(true), Description("默认文本"), Category("自定义分组")] + public string DefaultText + { + get { return defaultText; } + set + { + defaultText = value; + this.Text = defaultText; + this.Invalidate(); + } + } public List SelectItems { @@ -197,15 +208,27 @@ namespace TemuKJD.UserComponent if (str1 != str2) { checkedListBox.Items.Clear(); + if (Items.Count > 0) + checkedListBox.ItemCheck -= checkedListBox_ItemCheck; foreach (var item in this.Items) - { - checkedListBox.Items.Add(item.ParseToString(), true); + { + if (Items[Items.Count - 1] == item) + checkedListBox.ItemCheck += checkedListBox_ItemCheck; + + checkedListBox.Items.Add(item.ParseToString(), true); } } + + // 防止一起设置每次都要重新拼接字符串 + if (checkedListBox.Items.Count > 0) + checkedListBox.ItemCheck -= checkedListBox_ItemCheck; for (int index = 0; index < checkedListBox.Items.Count; index++) { + if (index == checkedListBox.Items.Count - 1) + checkedListBox.ItemCheck += checkedListBox_ItemCheck; + var item = checkedListBox.Items[index]; - if (this.Text == DefaultText || this.Text.Split(new string[] { ";", ";", ",", "," }, StringSplitOptions.RemoveEmptyEntries).Contains(item.ParseToString())) + if (this.Text == DefaultText || this.Text.Split(new string[] { ";", ";", ",", "," }, StringSplitOptions.RemoveEmptyEntries).ToList().Contains(item.ParseToString())) checkedListBox.SetItemChecked(index, true); else checkedListBox.SetItemChecked(index, false); @@ -213,12 +236,12 @@ namespace TemuKJD.UserComponent // 计算宽度 int maxItemWidth = 0; - for (int index = 0; index < checkedListBox.Items.Count; index++) - { - var wth = TextRenderer.MeasureText(checkedListBox.Items[index].ToString(), checkedListBox.Font).Width + 20; - if (wth > maxItemWidth) - maxItemWidth = wth; - } + //for (int index = 0; index < checkedListBox.Items.Count; index++) + //{ + // var wth = TextRenderer.MeasureText(checkedListBox.Items[index].ToString(), checkedListBox.Font).Width + 20; + // if (wth > maxItemWidth) + // maxItemWidth = wth; + //} checkedListBox.SendToBack(); checkedListBox.Visible = true; @@ -282,7 +305,7 @@ namespace TemuKJD.UserComponent str += $"{checkedListBox.Items[i].ParseToString()};"; } } - this.Text = str; + this.Text = str.Trim(';'); string str1 = string.Join(";", this.Items.Cast().Select(o => o.ParseToString())); diff --git a/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.Designer.cs b/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.Designer.cs index f645a24..0a734a9 100644 --- a/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.Designer.cs +++ b/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.Designer.cs @@ -30,9 +30,9 @@ namespace TemuKJD.WXForms.AdminForms 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(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer5 = new System.Windows.Forms.SplitContainer(); this.label7 = new System.Windows.Forms.Label(); this.chkWXComplateProd = new TemuKJD.UserComponent.UcCheckBox(this.components); @@ -68,7 +68,6 @@ namespace TemuKJD.WXForms.AdminForms this.label40 = new System.Windows.Forms.Label(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.dgvUser = new TemuKJD.UserComponent.DataGridViewEx(); - this.btnExportShopErp = new DevComponents.DotNetBar.PanelEx(); this.UserIdColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.UserNickNameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.mobileColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -83,6 +82,8 @@ namespace TemuKJD.WXForms.AdminForms this.colAddShop = new System.Windows.Forms.DataGridViewLinkColumn(); this.editColumn = new System.Windows.Forms.DataGridViewLinkColumn(); this.deleteColumn = new System.Windows.Forms.DataGridViewLinkColumn(); + this.btnExportShopErp = new DevComponents.DotNetBar.PanelEx(); + this.chkWXShowProdGetFromType = new TemuKJD.UserComponent.UcCheckBox(this.components); ((System.ComponentModel.ISupportInitialize)(this.splitContainer5)).BeginInit(); this.splitContainer5.Panel1.SuspendLayout(); this.splitContainer5.Panel2.SuspendLayout(); @@ -105,6 +106,7 @@ namespace TemuKJD.WXForms.AdminForms // splitContainer5.Panel1 // this.splitContainer5.Panel1.BackColor = System.Drawing.Color.WhiteSmoke; + this.splitContainer5.Panel1.Controls.Add(this.chkWXShowProdGetFromType); this.splitContainer5.Panel1.Controls.Add(this.label7); this.splitContainer5.Panel1.Controls.Add(this.chkWXComplateProd); this.splitContainer5.Panel1.Controls.Add(this.cmbSaLevel); @@ -161,7 +163,7 @@ namespace TemuKJD.WXForms.AdminForms // this.chkWXComplateProd.Location = new System.Drawing.Point(112, 395); this.chkWXComplateProd.Name = "chkWXComplateProd"; - this.chkWXComplateProd.Size = new System.Drawing.Size(87, 21); + this.chkWXComplateProd.Size = new System.Drawing.Size(68, 21); this.chkWXComplateProd.TabIndex = 808; this.chkWXComplateProd.Text = "微信回采"; this.chkWXComplateProd.UseVisualStyleBackColor = true; @@ -506,20 +508,20 @@ namespace TemuKJD.WXForms.AdminForms // this.dgvUser.AllowUserToAddRows = false; this.dgvUser.AllowUserToDeleteRows = false; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); - this.dgvUser.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); + this.dgvUser.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4; this.dgvUser.AutoRowNumber = true; this.dgvUser.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dgvUser.BackgroundColor = System.Drawing.Color.White; this.dgvUser.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.dgvUser.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvUser.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5; this.dgvUser.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvUser.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.UserIdColumn, @@ -536,17 +538,18 @@ namespace TemuKJD.WXForms.AdminForms this.colAddShop, this.editColumn, this.deleteColumn}); - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvUser.DefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvUser.DefaultCellStyle = dataGridViewCellStyle6; this.dgvUser.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvUser.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); this.dgvUser.Location = new System.Drawing.Point(0, 0); + this.dgvUser.MultiSelectCheckBox = true; this.dgvUser.Name = "dgvUser"; this.dgvUser.ReadOnly = true; this.dgvUser.RowTemplate.Height = 23; @@ -554,31 +557,6 @@ namespace TemuKJD.WXForms.AdminForms this.dgvUser.TabIndex = 1; this.dgvUser.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvUser_CellContentClick); // - // btnExportShopErp - // - this.btnExportShopErp.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnExportShopErp.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnExportShopErp.DisabledBackColor = System.Drawing.Color.Empty; - this.btnExportShopErp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnExportShopErp.Location = new System.Drawing.Point(0, 1); - this.btnExportShopErp.Name = "btnExportShopErp"; - this.btnExportShopErp.Size = new System.Drawing.Size(140, 25); - this.btnExportShopErp.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnExportShopErp.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnExportShopErp.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnExportShopErp.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.btnExportShopErp.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.btnExportShopErp.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.btnExportShopErp.Style.ForeColor.Color = System.Drawing.Color.White; - this.btnExportShopErp.Style.GradientAngle = 90; - this.btnExportShopErp.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnExportShopErp.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnExportShopErp.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnExportShopErp.TabIndex = 439; - this.btnExportShopErp.Text = "导出用户到后台系统"; - this.btnExportShopErp.Visible = false; - this.btnExportShopErp.Click += new System.EventHandler(this.btnExportShopErp_Click); - // // UserIdColumn // this.UserIdColumn.HeaderText = "id"; @@ -674,12 +652,47 @@ namespace TemuKJD.WXForms.AdminForms this.deleteColumn.Name = "deleteColumn"; this.deleteColumn.ReadOnly = true; // + // btnExportShopErp + // + this.btnExportShopErp.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnExportShopErp.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnExportShopErp.DisabledBackColor = System.Drawing.Color.Empty; + this.btnExportShopErp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnExportShopErp.Location = new System.Drawing.Point(0, 1); + this.btnExportShopErp.Name = "btnExportShopErp"; + this.btnExportShopErp.Size = new System.Drawing.Size(140, 25); + this.btnExportShopErp.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnExportShopErp.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnExportShopErp.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnExportShopErp.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnExportShopErp.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnExportShopErp.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnExportShopErp.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnExportShopErp.Style.GradientAngle = 90; + this.btnExportShopErp.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnExportShopErp.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnExportShopErp.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnExportShopErp.TabIndex = 439; + this.btnExportShopErp.Text = "导出用户到后台系统"; + this.btnExportShopErp.Visible = false; + this.btnExportShopErp.Click += new System.EventHandler(this.btnExportShopErp_Click); + // + // chkWXShowProdGetFromType + // + this.chkWXShowProdGetFromType.Location = new System.Drawing.Point(192, 395); + this.chkWXShowProdGetFromType.Name = "chkWXShowProdGetFromType"; + this.chkWXShowProdGetFromType.Size = new System.Drawing.Size(68, 21); + this.chkWXShowProdGetFromType.TabIndex = 810; + this.chkWXShowProdGetFromType.Text = "货源选择"; + this.chkWXShowProdGetFromType.UseVisualStyleBackColor = true; + // // WXAdminAccountForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.ClientSize = new System.Drawing.Size(1376, 527); this.Controls.Add(this.splitContainer5); this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.KeyPreview = true; this.Name = "WXAdminAccountForm"; this.Text = "AccountForm"; this.Load += new System.EventHandler(this.MainAccountForm_Load); @@ -750,5 +763,6 @@ namespace TemuKJD.WXForms.AdminForms private System.Windows.Forms.DataGridViewLinkColumn colAddShop; private System.Windows.Forms.DataGridViewLinkColumn editColumn; private System.Windows.Forms.DataGridViewLinkColumn deleteColumn; + private UserComponent.UcCheckBox chkWXShowProdGetFromType; } } \ No newline at end of file diff --git a/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.cs b/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.cs index c904f37..05eb793 100644 --- a/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.cs +++ b/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.cs @@ -78,9 +78,10 @@ namespace TemuKJD.WXForms.AdminForms data.Append("&sa_level=0"); string authority = ""; if (chkWXComplateProd.Checked) - authority += "微信回采"; - //if (!string.IsNullOrEmpty(authority)) - data.Append("&authority=" + authority); + authority += "微信回采,"; + if (chkWXShowProdGetFromType.Checked) + authority += "货源选择,"; + data.Append("&authority=" + authority.Trim(',')); string url = BaseClass.BuildObjString("user/add_user"); if (btnOpUser.Text != "添加用户" && !string.IsNullOrEmpty(Uid)) @@ -186,6 +187,7 @@ namespace TemuKJD.WXForms.AdminForms cmbGroup.Text = "主账户"; cmbSaLevel.Text = "普通用户"; chkWXComplateProd.Checked = false; + chkWXShowProdGetFromType.Checked = false; } private void btnRefresh_Click(object sender, EventArgs e) @@ -218,6 +220,7 @@ namespace TemuKJD.WXForms.AdminForms btnCancel.Visible = true; cmbSaLevel.Text = saLevelName; chkWXComplateProd.Checked = authority.Contains(chkWXComplateProd.Text); + chkWXShowProdGetFromType.Checked = authority.Contains(chkWXShowProdGetFromType.Text); } if (columname == "删除") { diff --git a/TEMUKJD/WXForms/AdminForms/WXAdminAddressSyncForm.Designer.cs b/TEMUKJD/WXForms/AdminForms/WXAdminAddressSyncForm.Designer.cs new file mode 100644 index 0000000..fa6b6e8 --- /dev/null +++ b/TEMUKJD/WXForms/AdminForms/WXAdminAddressSyncForm.Designer.cs @@ -0,0 +1,793 @@ + +namespace TemuKJD.WXForms.AdminForms +{ + partial class WXAdminAddressSyncForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + 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(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WXAdminAddressSyncForm)); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.btnSearch = new DevComponents.DotNetBar.PanelEx(); + this.txtUserName = new System.Windows.Forms.TextBox(); + this.label5 = new System.Windows.Forms.Label(); + this.txtLoginName = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.pnlEmpty = new DevComponents.DotNetBar.PanelEx(); + this.txtNotes = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.txtShopName = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.txtShopId = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.pbLoading = new System.Windows.Forms.PictureBox(); + this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx(); + this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); + this.panel3 = new System.Windows.Forms.Panel(); + this.panel4 = new System.Windows.Forms.Panel(); + this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); + this.splitContainer3 = new System.Windows.Forms.SplitContainer(); + this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopAccount = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colGroupName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colMinus = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colProductRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colPlus = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colCookie = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colUser = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSubUser = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colUploadAccount = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colBuyAccount = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colChatAccount = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colLoginStatus = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colGotoShop = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colShopOperate = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colRelogin = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colRelogin2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colBuyApi = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colMultiLogin = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colApiAuth = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colBuyApiAuth = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colImportCookies = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colCopyCookies = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colUpload = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colSubSa = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colEdit = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit(); + this.panel3.SuspendLayout(); + this.panel4.SuspendLayout(); + this.tableLayoutPanel2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit(); + this.splitContainer3.Panel1.SuspendLayout(); + this.splitContainer3.SuspendLayout(); + this.SuspendLayout(); + // + // splitContainer1 + // + this.splitContainer1.BackColor = System.Drawing.Color.White; + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.tableLayoutPanel2); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.pbLoading); + this.splitContainer1.Panel2.Controls.Add(this.dgvShop); + this.splitContainer1.Panel2.Margin = new System.Windows.Forms.Padding(4); + this.splitContainer1.Size = new System.Drawing.Size(606, 547); + this.splitContainer1.SplitterDistance = 84; + this.splitContainer1.TabIndex = 34; + // + // btnSearch + // + this.btnSearch.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnSearch.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSearch.DisabledBackColor = System.Drawing.Color.Empty; + this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSearch.Location = new System.Drawing.Point(319, 12); + this.btnSearch.Name = "btnSearch"; + this.btnSearch.Size = new System.Drawing.Size(56, 23); + this.btnSearch.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearch.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearch.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearch.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnSearch.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnSearch.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnSearch.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnSearch.Style.GradientAngle = 90; + this.btnSearch.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearch.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearch.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearch.TabIndex = 449; + this.btnSearch.Text = "搜索"; + this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click); + // + // txtUserName + // + this.txtUserName.Location = new System.Drawing.Point(57, 12); + this.txtUserName.Name = "txtUserName"; + this.txtUserName.Size = new System.Drawing.Size(90, 23); + this.txtUserName.TabIndex = 419; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(24, 15); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(44, 17); + this.label5.TabIndex = 420; + this.label5.Text = "账户:"; + // + // txtLoginName + // + this.txtLoginName.Location = new System.Drawing.Point(208, 12); + this.txtLoginName.Name = "txtLoginName"; + this.txtLoginName.Size = new System.Drawing.Size(90, 23); + this.txtLoginName.TabIndex = 417; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(151, 15); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(68, 17); + this.label1.TabIndex = 418; + this.label1.Text = "登录号码:"; + // + // pnlEmpty + // + this.pnlEmpty.CanvasColor = System.Drawing.SystemColors.Control; + this.pnlEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.pnlEmpty.DisabledBackColor = System.Drawing.Color.Empty; + this.pnlEmpty.Location = new System.Drawing.Point(380, 12); + this.pnlEmpty.Name = "pnlEmpty"; + this.pnlEmpty.Size = new System.Drawing.Size(56, 23); + this.pnlEmpty.Style.Alignment = System.Drawing.StringAlignment.Center; + this.pnlEmpty.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.pnlEmpty.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.pnlEmpty.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.pnlEmpty.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.pnlEmpty.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.pnlEmpty.Style.GradientAngle = 90; + this.pnlEmpty.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.pnlEmpty.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.pnlEmpty.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.pnlEmpty.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.pnlEmpty.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.pnlEmpty.TabIndex = 413; + this.pnlEmpty.Text = "清空条件"; + this.pnlEmpty.Click += new System.EventHandler(this.pnlEmpty_Click); + // + // txtNotes + // + this.txtNotes.Location = new System.Drawing.Point(346, 41); + this.txtNotes.Name = "txtNotes"; + this.txtNotes.Size = new System.Drawing.Size(90, 23); + this.txtNotes.TabIndex = 376; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(313, 44); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(44, 17); + this.label4.TabIndex = 377; + this.label4.Text = "备注:"; + // + // txtShopName + // + this.txtShopName.Location = new System.Drawing.Point(208, 41); + this.txtShopName.Name = "txtShopName"; + this.txtShopName.Size = new System.Drawing.Size(90, 23); + this.txtShopName.TabIndex = 374; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(151, 44); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(68, 17); + this.label3.TabIndex = 375; + this.label3.Text = "店铺名称:"; + // + // txtShopId + // + this.txtShopId.Location = new System.Drawing.Point(57, 41); + this.txtShopId.Name = "txtShopId"; + this.txtShopId.Size = new System.Drawing.Size(90, 23); + this.txtShopId.TabIndex = 372; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(13, 44); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(55, 17); + this.label2.TabIndex = 373; + this.label2.Text = "店铺id:"; + // + // splitContainer2 + // + this.splitContainer2.BackColor = System.Drawing.Color.White; + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer2.Location = new System.Drawing.Point(0, 0); + this.splitContainer2.Name = "splitContainer2"; + this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.BackColor = System.Drawing.Color.White; + this.splitContainer2.Panel1.Controls.Add(this.splitContainer3); + this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 4, 0); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.ucSplitPage1); + this.splitContainer2.Panel2.Controls.Add(this.statusBar); + this.splitContainer2.Size = new System.Drawing.Size(1271, 576); + this.splitContainer2.SplitterDistance = 547; + this.splitContainer2.TabIndex = 0; + // + // 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(278, 204); + this.pbLoading.Name = "pbLoading"; + this.pbLoading.Size = new System.Drawing.Size(50, 50); + this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbLoading.TabIndex = 6; + this.pbLoading.TabStop = false; + // + // dgvShop + // + this.dgvShop.AllowUserToAddRows = false; + this.dgvShop.AllowUserToDeleteRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.dgvShop.AutoRowNumber = true; + this.dgvShop.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dgvShop.BackgroundColor = System.Drawing.Color.White; + this.dgvShop.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.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.colSelect, + this.colLoginName, + this.colShopId, + this.colShopAccount, + this.colNotes, + this.colGroupName, + this.colMinus, + this.colProductRemaining, + this.colPlus, + this.colCookie, + this.colUser, + this.colSubUser, + this.colUploadAccount, + this.colBuyAccount, + this.colChatAccount, + this.colLoginStatus, + this.colGotoShop, + this.colShopOperate, + this.colRelogin, + this.colRelogin2, + this.colBuyApi, + this.colMultiLogin, + this.colApiAuth, + this.colBuyApiAuth, + this.colImportCookies, + this.colCopyCookies, + this.colUpload, + this.colSubSa, + this.colEdit, + this.colDelete, + this.colMsg}); + this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvShop.Location = new System.Drawing.Point(0, 0); + this.dgvShop.MultiSelectCheckBox = true; + this.dgvShop.Name = "dgvShop"; + this.dgvShop.ReadOnly = true; + this.dgvShop.RowTemplate.Height = 23; + this.dgvShop.ShowCellErrors = false; + this.dgvShop.Size = new System.Drawing.Size(606, 459); + this.dgvShop.TabIndex = 5; + this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick); + this.dgvShop.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvShop_CellMouseDown); + // + // ucSplitPage1 + // + this.ucSplitPage1.CurrentPage = 1; + this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right; + this.ucSplitPage1.IsShowPageSize = true; + this.ucSplitPage1.Location = new System.Drawing.Point(882, 0); + this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0); + this.ucSplitPage1.Name = "ucSplitPage1"; + this.ucSplitPage1.PageSize = 50; + this.ucSplitPage1.Size = new System.Drawing.Size(389, 25); + this.ucSplitPage1.TabIndex = 4; + this.ucSplitPage1.TotalPage = 1; + // + // statusBar + // + this.statusBar.BackColor = System.Drawing.Color.White; + this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill; + 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(0, 0); + this.statusBar.Margin = new System.Windows.Forms.Padding(0); + this.statusBar.Name = "statusBar"; + this.statusBar.Size = new System.Drawing.Size(1271, 25); + this.statusBar.TabIndex = 1; + // + // panel3 + // + this.panel3.BackColor = System.Drawing.Color.White; + this.panel3.Controls.Add(this.splitContainer2); + this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel3.Location = new System.Drawing.Point(1, 33); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(1271, 576); + this.panel3.TabIndex = 35; + // + // panel4 + // + this.panel4.Controls.Add(this.txtShopName); + this.panel4.Controls.Add(this.label3); + this.panel4.Controls.Add(this.txtShopId); + this.panel4.Controls.Add(this.label2); + this.panel4.Controls.Add(this.btnSearch); + this.panel4.Controls.Add(this.txtUserName); + this.panel4.Controls.Add(this.label5); + this.panel4.Controls.Add(this.txtLoginName); + this.panel4.Controls.Add(this.label1); + this.panel4.Controls.Add(this.pnlEmpty); + this.panel4.Controls.Add(this.txtNotes); + this.panel4.Controls.Add(this.label4); + this.panel4.Location = new System.Drawing.Point(3, 3); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(600, 78); + this.panel4.TabIndex = 0; + // + // tableLayoutPanel2 + // + this.tableLayoutPanel2.ColumnCount = 2; + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel2.Controls.Add(this.panel4, 0, 0); + this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 0); + this.tableLayoutPanel2.Name = "tableLayoutPanel2"; + this.tableLayoutPanel2.RowCount = 1; + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tableLayoutPanel2.Size = new System.Drawing.Size(606, 84); + this.tableLayoutPanel2.TabIndex = 37; + // + // splitContainer3 + // + this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer3.Location = new System.Drawing.Point(4, 0); + this.splitContainer3.Name = "splitContainer3"; + // + // splitContainer3.Panel1 + // + this.splitContainer3.Panel1.Controls.Add(this.splitContainer1); + this.splitContainer3.Size = new System.Drawing.Size(1263, 547); + this.splitContainer3.SplitterDistance = 606; + this.splitContainer3.TabIndex = 0; + // + // colSelect + // + this.colSelect.FillWeight = 26F; + 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; + // + // colLoginName + // + this.colLoginName.FillWeight = 70F; + this.colLoginName.HeaderText = "店铺登录号码"; + this.colLoginName.Name = "colLoginName"; + this.colLoginName.ReadOnly = true; + this.colLoginName.Visible = false; + // + // colShopId + // + this.colShopId.FillWeight = 70F; + this.colShopId.HeaderText = "店铺Id"; + this.colShopId.Name = "colShopId"; + this.colShopId.ReadOnly = true; + // + // colShopAccount + // + this.colShopAccount.HeaderText = "店铺账号"; + this.colShopAccount.Name = "colShopAccount"; + this.colShopAccount.ReadOnly = true; + // + // colNotes + // + this.colNotes.HeaderText = "备注"; + this.colNotes.Name = "colNotes"; + this.colNotes.ReadOnly = true; + // + // colGroupName + // + this.colGroupName.FillWeight = 70F; + this.colGroupName.HeaderText = "店铺分组"; + this.colGroupName.Name = "colGroupName"; + this.colGroupName.ReadOnly = true; + // + // colMinus + // + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.colMinus.DefaultCellStyle = dataGridViewCellStyle3; + this.colMinus.FillWeight = 15F; + this.colMinus.HeaderText = "-"; + this.colMinus.Name = "colMinus"; + this.colMinus.ReadOnly = true; + this.colMinus.Visible = false; + // + // colProductRemaining + // + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.colProductRemaining.DefaultCellStyle = dataGridViewCellStyle4; + this.colProductRemaining.FillWeight = 30F; + this.colProductRemaining.HeaderText = "选品限额"; + this.colProductRemaining.Name = "colProductRemaining"; + this.colProductRemaining.ReadOnly = true; + this.colProductRemaining.Visible = false; + // + // colPlus + // + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.colPlus.DefaultCellStyle = dataGridViewCellStyle5; + this.colPlus.FillWeight = 15F; + this.colPlus.HeaderText = "+"; + this.colPlus.Name = "colPlus"; + this.colPlus.ReadOnly = true; + this.colPlus.Visible = false; + // + // colCookie + // + this.colCookie.HeaderText = "店铺Cookie"; + this.colCookie.Name = "colCookie"; + this.colCookie.ReadOnly = true; + this.colCookie.Visible = false; + // + // colUser + // + this.colUser.FillWeight = 67F; + this.colUser.HeaderText = "所属账户"; + this.colUser.Name = "colUser"; + this.colUser.ReadOnly = true; + // + // colSubUser + // + this.colSubUser.FillWeight = 67F; + this.colSubUser.HeaderText = "子账户"; + this.colSubUser.Name = "colSubUser"; + this.colSubUser.ReadOnly = true; + this.colSubUser.Visible = false; + // + // colUploadAccount + // + this.colUploadAccount.FillWeight = 70F; + this.colUploadAccount.HeaderText = "上货账户"; + this.colUploadAccount.Name = "colUploadAccount"; + this.colUploadAccount.ReadOnly = true; + this.colUploadAccount.Visible = false; + // + // colBuyAccount + // + this.colBuyAccount.FillWeight = 70F; + this.colBuyAccount.HeaderText = "采购账户"; + this.colBuyAccount.Name = "colBuyAccount"; + this.colBuyAccount.ReadOnly = true; + this.colBuyAccount.Visible = false; + // + // colChatAccount + // + this.colChatAccount.FillWeight = 70F; + this.colChatAccount.HeaderText = "客服账户"; + this.colChatAccount.Name = "colChatAccount"; + this.colChatAccount.ReadOnly = true; + this.colChatAccount.Visible = false; + // + // colLoginStatus + // + this.colLoginStatus.HeaderText = "登录状态"; + this.colLoginStatus.Name = "colLoginStatus"; + this.colLoginStatus.ReadOnly = true; + this.colLoginStatus.Visible = false; + // + // colGotoShop + // + this.colGotoShop.FillWeight = 46F; + this.colGotoShop.HeaderText = "进入店铺"; + this.colGotoShop.Name = "colGotoShop"; + this.colGotoShop.ReadOnly = true; + this.colGotoShop.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colGotoShop.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colGotoShop.Visible = false; + // + // colShopOperate + // + this.colShopOperate.FillWeight = 46F; + this.colShopOperate.HeaderText = "检测"; + this.colShopOperate.Name = "colShopOperate"; + this.colShopOperate.ReadOnly = true; + this.colShopOperate.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colShopOperate.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colShopOperate.Visible = false; + // + // colRelogin + // + this.colRelogin.FillWeight = 46F; + this.colRelogin.HeaderText = "登录"; + this.colRelogin.Name = "colRelogin"; + this.colRelogin.ReadOnly = true; + this.colRelogin.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colRelogin.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // colRelogin2 + // + this.colRelogin2.FillWeight = 55F; + this.colRelogin2.HeaderText = "国际版状态"; + this.colRelogin2.Name = "colRelogin2"; + this.colRelogin2.ReadOnly = true; + this.colRelogin2.Visible = false; + // + // colBuyApi + // + this.colBuyApi.FillWeight = 46F; + this.colBuyApi.HeaderText = "API购买"; + this.colBuyApi.Name = "colBuyApi"; + this.colBuyApi.ReadOnly = true; + this.colBuyApi.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colBuyApi.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colBuyApi.Visible = false; + // + // colMultiLogin + // + this.colMultiLogin.FillWeight = 52F; + this.colMultiLogin.HeaderText = "多重登录"; + this.colMultiLogin.Name = "colMultiLogin"; + this.colMultiLogin.ReadOnly = true; + this.colMultiLogin.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colMultiLogin.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colMultiLogin.Visible = false; + // + // colApiAuth + // + this.colApiAuth.FillWeight = 70F; + this.colApiAuth.HeaderText = "上货授权"; + this.colApiAuth.Name = "colApiAuth"; + this.colApiAuth.ReadOnly = true; + this.colApiAuth.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colApiAuth.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colApiAuth.Visible = false; + // + // colBuyApiAuth + // + this.colBuyApiAuth.FillWeight = 70F; + this.colBuyApiAuth.HeaderText = "拍单授权"; + this.colBuyApiAuth.Name = "colBuyApiAuth"; + this.colBuyApiAuth.ReadOnly = true; + this.colBuyApiAuth.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colBuyApiAuth.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colBuyApiAuth.Visible = false; + // + // colImportCookies + // + this.colImportCookies.FillWeight = 70F; + this.colImportCookies.HeaderText = "导入Cookie"; + this.colImportCookies.Name = "colImportCookies"; + this.colImportCookies.ReadOnly = true; + this.colImportCookies.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colImportCookies.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colImportCookies.Visible = false; + // + // colCopyCookies + // + this.colCopyCookies.FillWeight = 70F; + this.colCopyCookies.HeaderText = "复制Cookie"; + this.colCopyCookies.Name = "colCopyCookies"; + this.colCopyCookies.ReadOnly = true; + this.colCopyCookies.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colCopyCookies.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colCopyCookies.Visible = false; + // + // colUpload + // + this.colUpload.FillWeight = 67F; + this.colUpload.HeaderText = "上传商品"; + this.colUpload.Name = "colUpload"; + this.colUpload.ReadOnly = true; + this.colUpload.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colUpload.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colUpload.Visible = false; + // + // colSubSa + // + this.colSubSa.FillWeight = 67F; + this.colSubSa.HeaderText = "二级超管"; + this.colSubSa.Name = "colSubSa"; + this.colSubSa.ReadOnly = true; + this.colSubSa.Visible = false; + // + // colEdit + // + this.colEdit.FillWeight = 46F; + this.colEdit.HeaderText = "编辑"; + this.colEdit.Name = "colEdit"; + this.colEdit.ReadOnly = true; + this.colEdit.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colEdit.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colEdit.Visible = false; + // + // colDelete + // + this.colDelete.FillWeight = 46F; + this.colDelete.HeaderText = "删除"; + this.colDelete.Name = "colDelete"; + this.colDelete.ReadOnly = true; + this.colDelete.Visible = false; + // + // colMsg + // + this.colMsg.HeaderText = "操作结果"; + this.colMsg.Name = "colMsg"; + this.colMsg.ReadOnly = true; + // + // WXAdminAddressSyncForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.ClientSize = new System.Drawing.Size(1273, 610); + this.Controls.Add(this.panel3); + this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.KeyPreview = true; + this.Name = "WXAdminAddressSyncForm"; + this.Text = "地址同步"; + this.TitleText = "地址同步"; + this.Load += new System.EventHandler(this.AdminShopForm_Load); + this.VisibleChanged += new System.EventHandler(this.AdminShopForm_VisibleChanged); + this.Controls.SetChildIndex(this.panel3, 0); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); + this.splitContainer2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit(); + this.panel3.ResumeLayout(false); + this.panel4.ResumeLayout(false); + this.panel4.PerformLayout(); + this.tableLayoutPanel2.ResumeLayout(false); + this.splitContainer3.Panel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit(); + this.splitContainer3.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.TextBox txtNotes; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox txtShopName; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox txtShopId; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.SplitContainer splitContainer2; + private System.Windows.Forms.PictureBox pbLoading; + private UserComponent.DataGridViewEx dgvShop; + private UserControls.StatusBarUserControl statusBar; + private DevComponents.DotNetBar.PanelEx pnlEmpty; + private UserControls.UcSplitPage ucSplitPage1; + private System.Windows.Forms.TextBox txtLoginName; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox txtUserName; + private System.Windows.Forms.Label label5; + private DevComponents.DotNetBar.PanelEx btnSearch; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.SplitContainer splitContainer3; + private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect; + private System.Windows.Forms.DataGridViewTextBoxColumn colLoginName; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopId; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopAccount; + private System.Windows.Forms.DataGridViewTextBoxColumn colNotes; + private System.Windows.Forms.DataGridViewTextBoxColumn colGroupName; + private System.Windows.Forms.DataGridViewTextBoxColumn colMinus; + private System.Windows.Forms.DataGridViewTextBoxColumn colProductRemaining; + private System.Windows.Forms.DataGridViewTextBoxColumn colPlus; + private System.Windows.Forms.DataGridViewTextBoxColumn colCookie; + private System.Windows.Forms.DataGridViewTextBoxColumn colUser; + private System.Windows.Forms.DataGridViewTextBoxColumn colSubUser; + private System.Windows.Forms.DataGridViewTextBoxColumn colUploadAccount; + private System.Windows.Forms.DataGridViewTextBoxColumn colBuyAccount; + private System.Windows.Forms.DataGridViewTextBoxColumn colChatAccount; + private System.Windows.Forms.DataGridViewTextBoxColumn colLoginStatus; + private System.Windows.Forms.DataGridViewLinkColumn colGotoShop; + private System.Windows.Forms.DataGridViewLinkColumn colShopOperate; + private System.Windows.Forms.DataGridViewLinkColumn colRelogin; + private System.Windows.Forms.DataGridViewTextBoxColumn colRelogin2; + private System.Windows.Forms.DataGridViewLinkColumn colBuyApi; + private System.Windows.Forms.DataGridViewLinkColumn colMultiLogin; + private System.Windows.Forms.DataGridViewLinkColumn colApiAuth; + private System.Windows.Forms.DataGridViewLinkColumn colBuyApiAuth; + private System.Windows.Forms.DataGridViewLinkColumn colImportCookies; + private System.Windows.Forms.DataGridViewLinkColumn colCopyCookies; + private System.Windows.Forms.DataGridViewLinkColumn colUpload; + private System.Windows.Forms.DataGridViewTextBoxColumn colSubSa; + private System.Windows.Forms.DataGridViewLinkColumn colEdit; + private System.Windows.Forms.DataGridViewLinkColumn colDelete; + private System.Windows.Forms.DataGridViewTextBoxColumn colMsg; + } +} \ No newline at end of file diff --git a/TEMUKJD/WXForms/AdminForms/WXAdminAddressSyncForm.cs b/TEMUKJD/WXForms/AdminForms/WXAdminAddressSyncForm.cs new file mode 100644 index 0000000..0794433 --- /dev/null +++ b/TEMUKJD/WXForms/AdminForms/WXAdminAddressSyncForm.cs @@ -0,0 +1,421 @@ +using AllBase; +using AllBase.Model.Param.TemuProductManage; +using AllBase.Model.Result; +using NaiBa.Util.Extension; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using TemuKJD.BLL; +using TemuKJD.Extension; +using TemuKJD.BaseForms; +using Work; +using NaiBa.Util; +using TemuKJD.WXForms.ShopForms; + +namespace TemuKJD.WXForms.AdminForms +{ + public partial class WXAdminAddressSyncForm : BaseForms.BaseGeneralForm + { + static WXAdminAddressSyncForm inst = null; + public static WXAdminAddressSyncForm Instance + { + get { if (inst == null) inst = new WXAdminAddressSyncForm(); return inst; } + set { inst = value; } + } + public static ConcurrentList lstAdminShopInfo { get; set; } = new ConcurrentList(); + + public WXAdminAddressSyncForm() + { + InitializeComponent(); + + Instance = this; + } + + private void AdminShopForm_Load(object sender, EventArgs e) + { + this.ucSplitPage1.PageChange += UcSplitPage1_PageChange; + + this.dgvShop.AddSelectorColumn("colSelect"); + this.dgvShop.AddMergeColumnHeader(new List() { /*"colMinus",*/ "colProductRemaining", "colPlus" }, "选品限额"); + this.dgvShop.AddMergeColumn(new List() { /*"colMinus",*/ "colProductRemaining", "colPlus" }); + this.dgvShop.Columns["colMinus"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; + this.dgvShop.Columns["colPlus"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; + this.dgvShop.Columns["colPlus"].HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter; + + if (BaseClass.SaLevel != 1) + { + dgvShop.Columns["colSubSa"].Visible = false; + } + } + + bool firstLoad = true; + private void AdminShopForm_VisibleChanged(object sender, EventArgs e) + { + if (this.Visible == true && firstLoad) + { + firstLoad = false; + this.pbLoading.Visible = true; + SearchShop(this.ucSplitPage1.CurrentPage); + } + } + + private void UcSplitPage1_PageChange(object obj) + { + SearchShop(this.ucSplitPage1.CurrentPage); + } + + public void SearchShop(int page) + { + List shopIdList = GetCheckedShopIdList(); + if (InvokeRequired) + { + Invoke(new Action(() => + { + this.pbLoading.Visible = true; + this.dgvShop.Rows.Clear(); + lstAdminShopInfo.Clear(); + })); + } + else + { + this.pbLoading.Visible = true; + this.dgvShop.Rows.Clear(); + lstAdminShopInfo.Clear(); + } + Task.Run(() => + { + int pageCount; + decimal seconds = 0; + var list = AdminGetServerShopLst(out pageCount, out seconds, page, ucSplitPage1.PageSize); + lstAdminShopInfo.AddRange(list); + this.ucSplitPage1.TotalPage = pageCount; + + foreach (var shop in lstAdminShopInfo) + { + Invoke(new Action(() => + { + int rowIndex = this.dgvShop.Rows.Add( + shopIdList.Contains(shop.ShopId + shop.UserName), + shop.LoginName, + shop.ShopId, + shop.ShopAccount, + shop.Notes, + shop.GroupName, + "-", + shop.AddProductRemaining, + "+", + //"±", + shop.Cookies, + shop.UserName, + shop.SubUserName, + shop.UploadAccount, + shop.BuyAccount, + shop.ChatAccount, + "", + "进入", + "检测", + string.IsNullOrWhiteSpace(shop.LoginStatus) ? "未登录" : shop.LoginStatus.Trim(), + string.IsNullOrWhiteSpace(shop.LoginStatus2) ? "国际版未登录" : shop.LoginStatus2.Trim(), + "购买", + "多重登录", + shop.ApiAuthStatus, + shop.BuyApiAuth.ApiAuthStatus, + "导入Cookie", + "复制Cookie", + "上传", + shop.OperateSubSaName, + "编辑", + "删除"); + })); + } + + Invoke(new Action(() => + { + this.pbLoading.Visible = false; + this.statusBar.lblTaskStatus.Text = "店铺查询完毕"; +#if DEBUG + this.statusBar.lblTaskStatus.Text += ",耗时:" + seconds; +#endif + })); + }); + } + + private void btnSearch_Click(object sender, EventArgs e) + { + if (this.ucSplitPage1.CurrentPage != 1) + this.ucSplitPage1.CurrentPage = 1; + else + SearchShop(1); + } + + private void pnlEmpty_Click(object sender, EventArgs e) + { + this.txtUserName.Text = ""; + this.txtLoginName.Text = ""; + this.txtNotes.Text = ""; + this.txtShopId.Text = ""; + this.txtShopName.Text = ""; + } + + bool IsOperate { get; set; } = false; + + private void shopLoginForm_SaveComplete(object obj) + { + SearchShop(this.ucSplitPage1.CurrentPage); + } + + private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex < 0 || e.RowIndex < 0) + return; + string headerText = dgvShop.Columns[e.ColumnIndex].HeaderText; + string loginName = dgvShop.Rows[e.RowIndex].Cells["colLoginName"].Value.ParseToString(); + string accountId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToString(); + var shop = lstAdminShopInfo.FirstOrDefault(v => v.LoginName == loginName && v.ShopId == accountId); + + switch (headerText) + { + case "检测": + //CheckShopLoginAsync(new string[] { loginName }); + break; + case "进入店铺": + IsOperate = true; + { + WXAdminShopLoginForm adminLoginForm = new WXAdminShopLoginForm(shop); + adminLoginForm.openType = EnumOpenType.manage; + adminLoginForm.WindowState = FormWindowState.Maximized; + adminLoginForm.InitUrl = "https://store.weixin.qq.com/shop/home"; + adminLoginForm.Show(); + } + IsOperate = false; + break; + case "API购买": + { + WXAdminShopLoginForm shopLoginForm = new WXAdminShopLoginForm(shop); + shopLoginForm.openType = EnumOpenType.manage; + shopLoginForm.WindowState = FormWindowState.Maximized; + shopLoginForm.InitUrl = "https://store.weixin.qq.com/shop/servicemarket/detail?serviceId=3984039898079707139"; + shopLoginForm.Show(); + } + break; + case "复制Cookie": + List cooks = null; + try { cooks = JsonHelper.DeserializeJsonToList(shop.Cookies); } catch (Exception ex) { } + if (cooks == null) + cooks = new List(); + + string cookJs = ""; + var keys = new string[] { "_qimei_uuid", "_qpsvr_localtk", "biz_magic", "biz_rand", "biz_ticket", "biz_token", "ptcz", "RK", "yyb_muid" }; + foreach (var shopCook in cooks) + { + var cookie = shopCook.Name + "=" + shopCook.Value; + if (!keys.Any(k => cookie.StartsWith(k))) + continue; + cookJs += "\r\ndocument.cookie='" + cookie.Substring(0, Math.Max(0, cookie.IndexOf("="))) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';"; + } + foreach (var shopCook in cooks) + { + var cookie = shopCook.Name + "=" + shopCook.Value; + if (!keys.Any(k => cookie.StartsWith(k))) + continue; + if (!cookie.StartsWith("biz_magic") && !cookie.StartsWith("biz_rand") && !cookie.StartsWith("biz_ticket") && !cookie.StartsWith("biz_token")) + cookJs += "\r\ndocument.cookie='" + cookie + "; domain=.qq.com; expires=" + + DateTime.Now.AddMonths(1).ToUniversalTime().ToString("ddd, dd MMM yyyy HH:mm:ss 'UTC'", new DateTimeFormatInfo()) + "; path=/';"; + else + cookJs += "\r\ndocument.cookie='" + cookie + "; domain=store.weixin.qq.com; expires=" + + DateTime.Now.AddMonths(1).ToUniversalTime().ToString("ddd, dd MMM yyyy HH:mm:ss 'UTC'", new DateTimeFormatInfo()) + "; path=/';"; + } + cookJs += "\r\nsetTimeout(() => { window.location.href='https://store.weixin.qq.com/shop/goods/list'; }, 200)"; + Clipboard.SetDataObject(cookJs); + BaseMsgForm.ShowInfo("复制成功"); + break; + case "导入Cookie": + WXShopUpdateCookieForm updateCookieForm = new WXShopUpdateCookieForm(shop); + updateCookieForm.SaveComplete += UpdateCookieForm_SaveComplete; + updateCookieForm.ShowDialog(); + break; + case "删除": + if (BaseMsgForm.ShowConfirm("确定删除店铺吗?删除后不可恢复!").DialogResult == DialogResult.Cancel) + return; + if (ShopBLL.AdminDelServerShop(shop)) + SearchShop(this.ucSplitPage1.CurrentPage); + break; + case "编辑": + WXShopAddEditForm editForm = new WXShopAddEditForm(new List { shop }); + editForm.SaveCompleteWithDescribe += EditForm_SaveCompleteWithDescribe; + editForm.ShowDialog(); + break; + case "登录": + IsOperate = true; + { + WXAdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }); + if (shop.LoginStatus != "登录成功") + { + WXAdminShopLoginForm adminLoginForm = new WXAdminShopLoginForm(shop); + adminLoginForm.openType = EnumOpenType.manage; + adminLoginForm.WindowState = FormWindowState.Maximized; + adminLoginForm.InitUrl = "https://store.weixin.qq.com/shop/home"; + adminLoginForm.Show(); + } + else + { + WXAdminShopLoginForm shopLoginForm = new WXAdminShopLoginForm(shop); + shopLoginForm.openType = EnumOpenType.login; + shopLoginForm.SaveComplete += shopLoginForm_SaveComplete; + shopLoginForm.ShowDialog(); + } + } + IsOperate = false; + break; + case "上传商品": + IsOperate = true; + { + //UploadProduct(shop); + } + IsOperate = false; + break; + + case "+": + case "±": + break; + case "": + dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value = !(bool)dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value; + break; + default: + break; + } + } + + private void UpdateCookieForm_SaveComplete(object obj) + { + Task.Run(() => + { + //CheckShopListLogin(new string[] { (obj as DouShopLoginInfo).LoginName }); + //RefreshDataGridView(false); + SearchShop(this.ucSplitPage1.CurrentPage); + }); + } + + private void EditForm_SaveCompleteWithDescribe(object obj, object isAdd, object sender) + { + var shopInfoLst = obj as List; + if (shopInfoLst != null) + { + this.pbLoading.Visible = true; + Task.Run(() => + { + int i = 1; + foreach (var shopInfo in shopInfoLst) + { + Invoke(new Action(() =>{ + this.statusBar.pgbTaskProgress.Value = i; + this.statusBar.pgbTaskProgress.Text = i + "/" + shopInfoLst.Count; + i++; + })); + if ((isAdd as bool?) == true) + { + var shop = lstAdminShopInfo.FirstOrDefault(v => v.LoginName == shopInfo.LoginName); + if (shop != null) + { + BaseMsgForm.ShowError("店铺" + shopInfo.LoginName + "已存在!"); + } + else + { + ShopBLL.AdminAddServerShop(shopInfo); + } + } + else + { + ShopBLL.AdminMdyServerShop(shopInfo); + } + } + Invoke(new Action(() => + { + this.pbLoading.Visible = false; + this.statusBar.pgbTaskProgress.Text = "准备就绪"; + })); + }); + SearchShop(this.ucSplitPage1.CurrentPage); + } + } + + private List GetCheckedList() + { + List shopLoginNameList = new List(); + for (int i = 0; i < dgvShop.Rows.Count; i++) + { + if (dgvShop.Rows[i].Cells["colSelect"].Value.ParseToBool()) + { + string shopName = dgvShop.Rows[i].Cells["colLoginName"].Value.ParseToString(); + shopLoginNameList.Add(shopName); + } + } + return shopLoginNameList; + } + + private List GetCheckedShopIdList() + { + List shopNameList = new List(); + for (int i = 0; i < dgvShop.Rows.Count; i++) + { + if (dgvShop.Rows[i].Cells["colSelect"].Value.ParseToBool()) + { + string shopName = dgvShop.Rows[i].Cells["colShopId"].Value.ParseToString(); + shopName += dgvShop.Rows[i].Cells["colUser"].Value.ParseToString(); + shopNameList.Add(shopName); + } + } + return shopNameList; + } + + public List AdminGetServerShopLst(out int pageCount, out decimal seconds, int page = 1, int pageSize = 50) + { + List list = new List(); + pageCount = 1; + seconds = 0; + + var url = BaseClass.BuildObjString("shop/admin_get_shop_list"); + var data = UserLogin.GetSignaturex() + + "&page=" + page + + "&page_size=" + pageSize + + "&search_user_name=" + txtUserName.Text.Trim() + + "&search_login_name=" + txtLoginName.Text.Trim() + + "&search_notes=" + txtNotes.Text.Trim() + + "&search_id=" + txtShopId.Text.Trim() + + "&search_name=" + txtShopName.Text.Trim(); + if (BaseClass.SaLevel > 1) + data += "&operate_sub_sa_name=" + BaseClass.UserName; + var 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")) + // html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) + || !html.Contains("shop_id") || !html.Contains("shop_account") || !html.Contains("login_pass")) + { + return list; + } + + int count = BaseRegex.GetIntJson(ref html, "count"); + pageCount = Math.Ceiling(1.0 * count / pageSize).ParseToInt(); + pageCount = Math.Max(pageCount, 1); + seconds = BaseRegex.GetDecimalJson(ref html, "seconds"); + + return ShopBLL.DeserializationShop(html); + } + + private void dgvShop_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e) + { + } + } +} diff --git a/TEMUKJD/WXForms/AdminForms/WXAdminAddressSyncForm.resx b/TEMUKJD/WXForms/AdminForms/WXAdminAddressSyncForm.resx new file mode 100644 index 0000000..8a85acf --- /dev/null +++ b/TEMUKJD/WXForms/AdminForms/WXAdminAddressSyncForm.resx @@ -0,0 +1,391 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 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 + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + + + AAABAAEAgIAQAAAAAABoKAAAFgAAACgAAACAAAAAAAEAAAEABAAAAAAAACgAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP// + AAD///8AAAAAAAAAAAAAAAAzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMQ + AAAAAAAAAAAAAAAAAAAAAAAAABM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZkzEAAAAAAAAAAAAAAAAAAAAAADOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZMwAAAAAAAAAAAAAAAAAAABOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZkzAAAAAAAAAAAAAAAAAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmTEAAAAAAAAAAAAAAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAAAAAAAA5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAAAAAADmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAAAAAOZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAAAA5mZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAADmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAGZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAJmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZAAAAAA + OZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmT + AAAAAZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmRAAAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZkwAAAZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZkwAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZMAAJmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZEAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTADmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkwCZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkRmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZOZmZOZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmP+JmZmZmZmZj/////// + ///4OZmZj/eZmZmZmZmZmPg5OZmZmZuI//iIuZmZmZmZmZmZmZM5mZmZmZmZmZmZmb//+JmZmZmZmP// + //////////OZmP//uZmZmZmZmY//+ZmZOZf///////h5k5mZmZmZmZmTOZmZmZmZmZmZmZmP//iZmZmZ + mZ/////////////4mZ///4mZmZmZmZP///uZmZmP////////+JmZmZmZmZmZkzmZmZmZmZmZmZmZj//4 + mZmZmZmf////////////+Jmf//+JmZmZmZmb///4mZmY//////////+JmZmZmZmZmZM5mZmZmZmZmZmZ + mY//+JmZmZmZn/////////////mZmP//iZmZmZmZk///+5mZj/////iP////+JmZmZmZmZmTOZmZmZmZ + mZmZmZmP//iZmZmZmZ////iIiIiIiIiZOZj//4mZmZmZmZP///uZmf////eZmT////+ZmZmZmZmZkzmZ + mZmZmZmZmZmZj//4mZmZmZmf//+JmZmZmZmZk5mY//+JmZmZmZmT///7mZj///+ZmZmZj///uZmZmZmZ + mZM5mZmZmZmZmZmZmY//+JmZmZmZn///iZmZmZmZmZmZmP//iZmZN5k5k///+5mY///zk5mZOT///4mZ + mZmZmZmTOZmZmZmZmZmZmZmP//iZmZmZmZ///4mZmZmZmZmZmZj//4mZmP/5k5P///uZmP//+ZmZmZmY + //+JmZmZmZmZkzmZmZmZmZmZmZmZj//4mZmZmZmf///4iIiIiIg5mZmY//+JOb//+JmT///7mZj//4mZ + mZmZmP//+ZmZmZmZmZM5mZmZmZmZmZmZmY//+JmZmZmZn///////////85mZmP//iZn///+Jk///+5mf + //+JmZmZmZj///mZmZmZmZmTOZmZmZmZmZmZmZmP//iZmZmZmZ////////////+ZmZj//4mY////85v/ + //uZmP//iZmZmZmY///5mZmZmZmZkzmZmZmZmZmZmZmZj//4mZmZmZmf////////////mZmY//+Jv/// + //+Z///7mZj//4mZmZmZmP//+ZmZmZmZmZM5mZmZmZmZmZmZmY//+JmZmZmZn///////////+JmZmP// + if//////if//+5mY//+JmZmZmZj///mZmZmZmZmTOZmZmZmZmZmZmZmP//iZmZmZmZ///////////4mZ + mZj//4j///////j///uZmP//iZmZmZmY///5mZmZmZmZkzmZmZmZmZmZmZmZj//4mZmZmZmf//+JMzMz + MzOZOZmY//////+D///////7mZj//4mZmZmZmP//+ZmZmZmZmZM5mZmZmZmZmZmZmY//+JmZmZmZn/// + iZmZmZmZmZmZmP//////mY//////+5mY//+JmZmZmZj///mZmZmZmZmTOZmZmZmZmZmZmZmP//iZmZmZ + mZ///4mZmZmZmZmZmZj/////+5mf//////uZmP//iZmZmZmY///5mZmZmZmZkzmZmZmZmZmZMzM5j//4 + kzMzmZmf//+JMzMzMzM5mZmY/////4mTk//////7mZj//4mZmZmZmP//+ZmZmZmZmZM5mZmZmZmZmP// + /////////4mZn////////////4mZmP////+ZmZmP////+5mY//+JmZmZmZj///mZmZmZmZmTOZmZmZmZ + mY/////////////4mZ/////////////7mZj////7mZmZn/////uZmP//iZmZmZmY///5mZmZmZmZkzmZ + mZmZmZn//////////////5mf////////////+Jmf////iZmZk5P////4mZ///4mZmZmZmP//+ZmZmZmZ + mZM5mZmZmZmZj/////////////iZn/////////////iZmP///5mZmZmZj///+5mY//+JmZmZmZj//4mZ + mZmZmZmTOZmZmZmZmZ/////////////zmZP///////////+JmZP///uTmZmZmZj//4mZm///mZmZmZmZ + //85mZmZmZmZkzmZmZmZmZOZiIiIiIiIiIiImTmZOIiIiIiIiIiImTmZOIi5mZmZmZOZiIuZmZk4iZOZ + mZmZOZiDmZmZmZmZmZM5mZmZmZmZOZmZmZmZmZmZmZOZmZmZmZmZmZmZmZOZmZmZmZmZmZmZOZmZmZmZ + mZk5mZmZmZOZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmTuIiIiIs5mZmZmZmZ + mTu4i7mZmZmZmZmZmTMzmZOZmZkzOZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmTmbj///////+HmT + mZmZk4j/////iJmZmZk4iP////iZOZmZj/mZOZOIiIiIiIiIiDmZmZmZmZmZkzmZmZmZmZmZj/////// + ///4mZk5k4///4iI///4OZOY////////iZOZmb/5mZmP///////////4mZmZmZmZmZM5mZmZmZmZn/// + //////////mZmY///5mZmZP///iZmP////////+ZOZk/iZmY/////////////4mZmZmZmZmTOZmZmZmZ + mZ/////////////5mZ////+JmZmY////iZl/////////+ZmZP4mZP//////////////7mZmZmZmZkzmZ + mZmZmZmb////////////uZP/j///+HM3j/////+ZmYj///////iZmT+JmY//////////////+JmZmZmZ + mZM5mZmZmZmZmY//////////+JmT+Jv///////////iPmTmZOI/4mP//uTk/iZmP//////////////iZ + mZmZmZmTOZmZmZmZmZmf//////////mZmZmZ///////////5mZmZmZmTOZk///mZP4mZj/////////// + ///4mZmZmZmZkzmZmZmZmZmTmP////////+JOZmZOY//////////iZmZmZmZmZk5mf/4mT+JmY////// + ////////+JmZmZmZmZM5mZmZmZmZmZn/////////mZmZmZk//////////zmZmZmZmZmZmTmP/zm/iZmP + //////////////iZmZmZmZmTOZmZmZmZmZk5v///////85OZmZkzmP////////iZmZmZmZmZmZmZn//4 + /4mZj/////hzN4/////4mZmZmZmZkzmZmZmZmZmZmZj//////4mZmTmY/4j////////4mZmZmZmZmZmZ + mZj///+JmY////+JmZmY////+JmZmZmZmZM5mZmZmZmZmZmZ//////+ZmZmZj////////////4mZmZmZ + mZmZmZmb////+ZmP///4mZu5mY////iZmZmZmZmTOZmZmZmZmZmZOb/////4k5mZmP/////////////7 + mZmZmZmZmZmZk/////OZv///+ZmP+Jmf///4mZmZmZmZkzmZmZmZmZmZmZmf////+ZmZmZj////////4 + eI//+JmZmZmZmZmZmZP////4mb///4mY//+JmP//+5mZmZmZmZM5mZmZmZmZmZk5v/////uTmZmb//// + ///4mZmX//iZmZmZmZmZmZmZ////+Jmf//95n///+Zj///OZmZmZmZmTOZmZmZmZmZmZmf//////mZmZ + mY//////+ZOZmZiJmZmZmZmZmZmZmY////+ZmP//+I////iP//+JmZmZmZmZkzmZmZmZmZmZmZj///// + /4mZmZmf/////5k5mZOZmTmZmZmZmZmZmZmP///4mZP/////////////OZmZmZmZmZM5mZmZmZmZmZk/ + ///////zmZmZm/////iZmZmZmZmZmZmZmZmZmZmZj///85mZj///////////+JmZmZmZmZmTOZmZmZmZ + mZmZv///////+5mZmZmP///5mZmZmZmZmZmZmZmZmZmZmZ///3mZmZj//////////4mZmZmZmZmZkzmZ + mZmZmZmZmb///4j///uZmZmZmP//mTmZmZmZmZmZmZmZmZmZmZmY/4OZmZmZeP///////4eZmZmZmZmZ + mZM5mZmZmZmZmZmY/4OZOP+JmZmZmZmIiZOZmZmZmZmZmZmZmZmZmZmZmYiZmZmZmZk4iIiIiIOZmZmZ + mZmZmZmTOZmZmZmZmZmZmTOZmZkzmZmZmZmZmZk5mZmZmZmZmZmZmZmZmZmZmZmZk5mZmZmZmZmZmZmZ + mZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmTGZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZkwmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZADmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZkwA5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZMACZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmQAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAABmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTAAADmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAJmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmRAAAAA5mZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAACZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmQAAAAAAGZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAOZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkwAAAAAA + AAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTAA + AAAAAAAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZMAAAAAAAAAAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZkwAAAAAAAAAAAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmTAAAAAAAAAAAAAAGZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZEAAAAAAAAAAAAAAAA5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZMAAAAAAAAAAAAAAAAAATmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZMQAAAAAAAAAAAAAAAAAAABOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZMQAAAAAAAAAAAAAAAAAAAAAAAzmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTMAAAAAAAAAAAAAAAAAAAAAAAAAAAEzMzMzMzMzMzMzMzMzMz + MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxAAAAAAAAAAAAAAD////////////////////////4AAAA + AAAAAAAAAB//////wAAAAAAAAAAAAAAD/////wAAAAAAAAAAAAAAAP////wAAAAAAAAAAAAAAAA////w + AAAAAAAAAAAAAAAAD///4AAAAAAAAAAAAAAAAAf//8AAAAAAAAAAAAAAAAAD//+AAAAAAAAAAAAAAAAA + Af//AAAAAAAAAAAAAAAAAAD//gAAAAAAAAAAAAAAAAAAf/wAAAAAAAAAAAAAAAAAAD/4AAAAAAAAAAAA + AAAAAAAf+AAAAAAAAAAAAAAAAAAAH/AAAAAAAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAP4AAAAAAA + AAAAAAAAAAAAB+AAAAAAAAAAAAAAAAAAAAfAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAA8AA + AAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAA + AAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAA + AAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAA + AAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAA + AAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAA + AAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAA + AAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAA + AAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAA + AAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAA + AAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAA + AAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAA + AAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAAAAAAAAAAAD4AAAAAAAAAAAAAAAAAAAA+AA + AAAAAAAAAAAAAAAAAAfgAAAAAAAAAAAAAAAAAAAH8AAAAAAAAAAAAAAAAAAAD/AAAAAAAAAAAAAAAAAA + AA/4AAAAAAAAAAAAAAAAAAAf/AAAAAAAAAAAAAAAAAAAH/wAAAAAAAAAAAAAAAAAAD/+AAAAAAAAAAAA + AAAAAAB//wAAAAAAAAAAAAAAAAAA//+AAAAAAAAAAAAAAAAAAf//wAAAAAAAAAAAAAAAAAP//+AAAAAA + AAAAAAAAAAAH///4AAAAAAAAAAAAAAAAD////AAAAAAAAAAAAAAAAD////8AAAAAAAAAAAAAAAD///// + wAAAAAAAAAAAAAAD//////wAAAAAAAAAAAAAH////////////////////////w== + + + \ No newline at end of file diff --git a/TEMUKJD/WXForms/AdminForms/WXAdminForm.Designer.cs b/TEMUKJD/WXForms/AdminForms/WXAdminForm.Designer.cs index 84142e5..678cfea 100644 --- a/TEMUKJD/WXForms/AdminForms/WXAdminForm.Designer.cs +++ b/TEMUKJD/WXForms/AdminForms/WXAdminForm.Designer.cs @@ -34,15 +34,17 @@ System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("厂家商品采集"); System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("Sku采集回传"); System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("1688厂家采集"); - System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("图片工具"); - System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("超级权限管理", new System.Windows.Forms.TreeNode[] { + System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("地址管理"); + System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("图片工具"); + System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("超级权限管理", new System.Windows.Forms.TreeNode[] { treeNode1, treeNode2, treeNode3, treeNode4, treeNode5, treeNode6, - treeNode7}); + treeNode7, + treeNode8}); this.panel1 = new System.Windows.Forms.Panel(); this.panel3 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel(); @@ -145,12 +147,14 @@ treeNode5.Text = "Sku采集回传"; treeNode6.Name = "1688厂家采集"; treeNode6.Text = "1688厂家采集"; - treeNode7.Name = "图片工具"; - treeNode7.Text = "图片工具"; - treeNode8.Name = "超级权限管理"; - treeNode8.Text = "超级权限管理"; + treeNode7.Name = "地址管理"; + treeNode7.Text = "地址管理"; + treeNode8.Name = "图片工具"; + treeNode8.Text = "图片工具"; + treeNode9.Name = "超级权限管理"; + treeNode9.Text = "超级权限管理"; this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { - treeNode8}); + treeNode9}); this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); this.tv.Size = new System.Drawing.Size(140, 446); this.tv.TabIndex = 1; diff --git a/TEMUKJD/WXForms/AdminForms/WXAdminForm.cs b/TEMUKJD/WXForms/AdminForms/WXAdminForm.cs index d347a1a..1910f27 100644 --- a/TEMUKJD/WXForms/AdminForms/WXAdminForm.cs +++ b/TEMUKJD/WXForms/AdminForms/WXAdminForm.cs @@ -24,6 +24,7 @@ namespace TemuKJD.WXForms.AdminForms public Lazy getJuShuitanProductSKUListForm = new Lazy(); public Lazy get1688ProdForm = new Lazy(); public Lazy imgToolForm = new Lazy(); + public Lazy getAddressForm = new Lazy(); public WXAdminForm() { @@ -34,7 +35,7 @@ namespace TemuKJD.WXForms.AdminForms tv.SelectedNode = tv.Nodes[0].Nodes[0]; tv.ExpandGroup(tv.Nodes[0].Name); - List hideName = new List() { "1688厂家采集1", "图片工具", "Sku采集回传1", "超级用户管理", "超级店铺管理", "PDD产品库", "SKU替换图", "选品加价管理", "认领待上传", "库存上传", "商品核价" }; + List hideName = new List() { "地址管理1", "1688厂家采集1", "图片工具", "Sku采集回传1", "超级用户管理", "超级店铺管理", "PDD产品库", "SKU替换图", "选品加价管理", "认领待上传", "库存上传", "商品核价" }; if (BaseClass.GroupId == 3) { @@ -93,6 +94,9 @@ namespace TemuKJD.WXForms.AdminForms case "1688厂家采集": SetForm(get1688ProdForm.Value); break; + case "地址管理": + SetForm(getAddressForm.Value); + break; case "图片工具": SetForm(imgToolForm.Value); break; diff --git a/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.Designer.cs b/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.Designer.cs index 6acdd4c..feedb70 100644 --- a/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.Designer.cs +++ b/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.Designer.cs @@ -68,6 +68,10 @@ namespace TemuKJD.WXForms.AdminForms this.btnRemainOK = new DevComponents.DotNetBar.PanelEx(); this.lblAddProdRemaining = new System.Windows.Forms.Label(); this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx(); + this.chkAutoDrag = new System.Windows.Forms.CheckBox(); + this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); + this.panel3 = new System.Windows.Forms.Panel(); this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -98,10 +102,7 @@ namespace TemuKJD.WXForms.AdminForms this.colSubSa = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colEdit = new System.Windows.Forms.DataGridViewLinkColumn(); this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn(); - this.chkAutoDrag = new System.Windows.Forms.CheckBox(); - this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); - this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); - this.panel3 = new System.Windows.Forms.Panel(); + this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -253,11 +254,11 @@ namespace TemuKJD.WXForms.AdminForms // lblAddToAccount // this.lblAddToAccount.AutoSize = true; - this.lblAddToAccount.Location = new System.Drawing.Point(604, 44); + this.lblAddToAccount.Location = new System.Drawing.Point(764, 15); this.lblAddToAccount.Name = "lblAddToAccount"; - this.lblAddToAccount.Size = new System.Drawing.Size(92, 17); + this.lblAddToAccount.Size = new System.Drawing.Size(68, 17); this.lblAddToAccount.TabIndex = 456; - this.lblAddToAccount.Text = "当前指定账号:"; + this.lblAddToAccount.Text = "指定账号:"; this.lblAddToAccount.Visible = false; // // btnAddToAccount @@ -268,7 +269,7 @@ namespace TemuKJD.WXForms.AdminForms this.btnAddToAccount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnAddToAccount.Location = new System.Drawing.Point(607, 12); this.btnAddToAccount.Name = "btnAddToAccount"; - this.btnAddToAccount.Size = new System.Drawing.Size(163, 23); + this.btnAddToAccount.Size = new System.Drawing.Size(153, 23); this.btnAddToAccount.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnAddToAccount.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnAddToAccount.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); @@ -654,9 +655,11 @@ namespace TemuKJD.WXForms.AdminForms this.colUpload, this.colSubSa, this.colEdit, - this.colDelete}); + this.colDelete, + this.colMsg}); this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvShop.Location = new System.Drawing.Point(4, 0); + this.dgvShop.MultiSelectCheckBox = true; this.dgvShop.Name = "dgvShop"; this.dgvShop.ReadOnly = true; this.dgvShop.RowTemplate.Height = 23; @@ -666,6 +669,53 @@ namespace TemuKJD.WXForms.AdminForms this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick); this.dgvShop.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvShop_CellMouseDown); // + // chkAutoDrag + // + this.chkAutoDrag.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.chkAutoDrag.AutoSize = true; + this.chkAutoDrag.BackColor = System.Drawing.Color.White; + this.chkAutoDrag.Location = new System.Drawing.Point(595, 0); + this.chkAutoDrag.Name = "chkAutoDrag"; + this.chkAutoDrag.Size = new System.Drawing.Size(159, 21); + this.chkAutoDrag.TabIndex = 3; + this.chkAutoDrag.Text = "登录时自动滑动拼图验证"; + this.chkAutoDrag.UseVisualStyleBackColor = false; + this.chkAutoDrag.Visible = false; + // + // ucSplitPage1 + // + this.ucSplitPage1.CurrentPage = 1; + this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right; + this.ucSplitPage1.IsShowPageSize = true; + this.ucSplitPage1.Location = new System.Drawing.Point(882, 0); + this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0); + this.ucSplitPage1.Name = "ucSplitPage1"; + this.ucSplitPage1.PageSize = 50; + this.ucSplitPage1.Size = new System.Drawing.Size(389, 25); + this.ucSplitPage1.TabIndex = 4; + this.ucSplitPage1.TotalPage = 1; + // + // statusBar + // + this.statusBar.BackColor = System.Drawing.Color.White; + this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill; + 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(0, 0); + this.statusBar.Margin = new System.Windows.Forms.Padding(0); + this.statusBar.Name = "statusBar"; + this.statusBar.Size = new System.Drawing.Size(1271, 25); + this.statusBar.TabIndex = 1; + // + // panel3 + // + this.panel3.BackColor = System.Drawing.Color.White; + this.panel3.Controls.Add(this.splitContainer1); + this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel3.Location = new System.Drawing.Point(1, 33); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(1271, 576); + this.panel3.TabIndex = 35; + // // colSelect // this.colSelect.FillWeight = 26F; @@ -919,52 +969,12 @@ namespace TemuKJD.WXForms.AdminForms this.colDelete.ReadOnly = true; this.colDelete.Visible = false; // - // chkAutoDrag + // colMsg // - this.chkAutoDrag.Anchor = System.Windows.Forms.AnchorStyles.Right; - this.chkAutoDrag.AutoSize = true; - this.chkAutoDrag.BackColor = System.Drawing.Color.White; - this.chkAutoDrag.Location = new System.Drawing.Point(595, 0); - this.chkAutoDrag.Name = "chkAutoDrag"; - this.chkAutoDrag.Size = new System.Drawing.Size(159, 21); - this.chkAutoDrag.TabIndex = 3; - this.chkAutoDrag.Text = "登录时自动滑动拼图验证"; - this.chkAutoDrag.UseVisualStyleBackColor = false; - this.chkAutoDrag.Visible = false; - // - // ucSplitPage1 - // - this.ucSplitPage1.CurrentPage = 1; - this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right; - this.ucSplitPage1.IsShowPageSize = true; - this.ucSplitPage1.Location = new System.Drawing.Point(882, 0); - this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0); - this.ucSplitPage1.Name = "ucSplitPage1"; - this.ucSplitPage1.PageSize = 50; - this.ucSplitPage1.Size = new System.Drawing.Size(389, 25); - this.ucSplitPage1.TabIndex = 4; - this.ucSplitPage1.TotalPage = 1; - // - // statusBar - // - this.statusBar.BackColor = System.Drawing.Color.White; - this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill; - 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(0, 0); - this.statusBar.Margin = new System.Windows.Forms.Padding(0); - this.statusBar.Name = "statusBar"; - this.statusBar.Size = new System.Drawing.Size(1271, 25); - this.statusBar.TabIndex = 1; - // - // panel3 - // - this.panel3.BackColor = System.Drawing.Color.White; - this.panel3.Controls.Add(this.splitContainer1); - this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel3.Location = new System.Drawing.Point(1, 33); - this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(1271, 576); - this.panel3.TabIndex = 35; + this.colMsg.HeaderText = "操作结果"; + this.colMsg.Name = "colMsg"; + this.colMsg.ReadOnly = true; + this.colMsg.Visible = false; // // WXAdminShopListForm // @@ -973,6 +983,7 @@ namespace TemuKJD.WXForms.AdminForms this.Controls.Add(this.panel3); this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.KeyPreview = true; this.Name = "WXAdminShopListForm"; this.Text = "AdminShopForm"; this.TitleText = "AdminShopForm"; @@ -1040,6 +1051,9 @@ namespace TemuKJD.WXForms.AdminForms private DevComponents.DotNetBar.PanelEx btnSetSubSa; private DevComponents.DotNetBar.PanelEx pbtnLoginSelect; private DevComponents.DotNetBar.PanelEx pbtnCheck; + private System.Windows.Forms.Panel panel3; + public System.Windows.Forms.Label lblAddToAccount; + public DevComponents.DotNetBar.PanelEx btnAddToAccount; private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect; private System.Windows.Forms.DataGridViewTextBoxColumn colLoginName; private System.Windows.Forms.DataGridViewTextBoxColumn colShopId; @@ -1070,8 +1084,6 @@ namespace TemuKJD.WXForms.AdminForms private System.Windows.Forms.DataGridViewTextBoxColumn colSubSa; private System.Windows.Forms.DataGridViewLinkColumn colEdit; private System.Windows.Forms.DataGridViewLinkColumn colDelete; - private System.Windows.Forms.Panel panel3; - public System.Windows.Forms.Label lblAddToAccount; - public DevComponents.DotNetBar.PanelEx btnAddToAccount; + private System.Windows.Forms.DataGridViewTextBoxColumn colMsg; } } \ No newline at end of file diff --git a/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.resx b/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.resx index eecd5b5..8a85acf 100644 --- a/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.resx +++ b/TEMUKJD/WXForms/AdminForms/WXAdminShopListForm.resx @@ -207,6 +207,9 @@ True + + True + diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs index d0146bc..5134a75 100644 --- a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs @@ -89,23 +89,23 @@ 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.btnProdDb = new DevComponents.DotNetBar.PanelEx(); this.chkWXComplateProd = new TemuKJD.UserComponent.UcCheckBox(this.components); this.txtAddCount = new System.Windows.Forms.TextBox(); this.txtSearchGoodsName = new System.Windows.Forms.TextBox(); this.label20 = new System.Windows.Forms.Label(); this.pbSelectProd = new System.Windows.Forms.PictureBox(); + this.cmbSourceType = new System.Windows.Forms.ComboBox(); + this.cmbJstInitSet = new System.Windows.Forms.ComboBox(); + this.lblSourceType = new System.Windows.Forms.Label(); this.cmbCateFilter3 = new System.Windows.Forms.ComboBox(); this.label21 = new System.Windows.Forms.Label(); this.cmbGroupFilter = new System.Windows.Forms.ComboBox(); this.txtIdFilter = new System.Windows.Forms.TextBox(); - this.cmbJstInitSet = new System.Windows.Forms.ComboBox(); this.lblGroupFilter = new System.Windows.Forms.Label(); this.lblIdFilter = new System.Windows.Forms.Label(); this.cmbCateFilter2 = new System.Windows.Forms.ComboBox(); - this.lblJstInitSet = new System.Windows.Forms.Label(); this.label19 = new System.Windows.Forms.Label(); - this.cmbSourceType = new System.Windows.Forms.ComboBox(); - this.lblSourceType = new System.Windows.Forms.Label(); this.btnClearFilter = new DevComponents.DotNetBar.PanelEx(); this.lblGoodsCount = new System.Windows.Forms.Label(); this.cmbWxSafe = new System.Windows.Forms.ComboBox(); @@ -117,6 +117,7 @@ namespace TemuKJD.WXForms.ProductForms this.btnRandomAdd = new DevComponents.DotNetBar.PanelEx(); this.chkSevenDays = new TemuKJD.UserComponent.UcCheckBox(this.components); this.chkSkipQualification = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.lblJstInitSet = new System.Windows.Forms.Label(); this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); this.btnRefreshAuthor = new DevComponents.DotNetBar.PanelEx(); this.btnSelectOffline = new DevComponents.DotNetBar.PanelEx(); @@ -185,7 +186,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.btnProdDb = new DevComponents.DotNetBar.PanelEx(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -938,24 +938,18 @@ namespace TemuKJD.WXForms.ProductForms this.ucGroupBoxEx4.Controls.Add(this.chkWXComplateProd); this.ucGroupBoxEx4.Controls.Add(this.txtAddCount); this.ucGroupBoxEx4.Controls.Add(this.txtSearchGoodsName); - this.ucGroupBoxEx4.Controls.Add(this.label20); this.ucGroupBoxEx4.Controls.Add(this.pbSelectProd); + this.ucGroupBoxEx4.Controls.Add(this.cmbSourceType); + this.ucGroupBoxEx4.Controls.Add(this.cmbJstInitSet); this.ucGroupBoxEx4.Controls.Add(this.cmbCateFilter3); this.ucGroupBoxEx4.Controls.Add(this.label21); this.ucGroupBoxEx4.Controls.Add(this.cmbGroupFilter); this.ucGroupBoxEx4.Controls.Add(this.txtIdFilter); - this.ucGroupBoxEx4.Controls.Add(this.cmbJstInitSet); - this.ucGroupBoxEx4.Controls.Add(this.lblGroupFilter); - this.ucGroupBoxEx4.Controls.Add(this.lblIdFilter); this.ucGroupBoxEx4.Controls.Add(this.cmbCateFilter2); - this.ucGroupBoxEx4.Controls.Add(this.lblJstInitSet); this.ucGroupBoxEx4.Controls.Add(this.label19); - this.ucGroupBoxEx4.Controls.Add(this.cmbSourceType); - this.ucGroupBoxEx4.Controls.Add(this.lblSourceType); this.ucGroupBoxEx4.Controls.Add(this.btnClearFilter); this.ucGroupBoxEx4.Controls.Add(this.lblGoodsCount); this.ucGroupBoxEx4.Controls.Add(this.cmbWxSafe); - this.ucGroupBoxEx4.Controls.Add(this.lblWxSafe); this.ucGroupBoxEx4.Controls.Add(this.btnClearUpload); this.ucGroupBoxEx4.Controls.Add(this.cmbCateFilter1); this.ucGroupBoxEx4.Controls.Add(this.label2); @@ -963,6 +957,12 @@ namespace TemuKJD.WXForms.ProductForms this.ucGroupBoxEx4.Controls.Add(this.btnRandomAdd); this.ucGroupBoxEx4.Controls.Add(this.chkSevenDays); this.ucGroupBoxEx4.Controls.Add(this.chkSkipQualification); + this.ucGroupBoxEx4.Controls.Add(this.lblSourceType); + this.ucGroupBoxEx4.Controls.Add(this.lblGroupFilter); + this.ucGroupBoxEx4.Controls.Add(this.lblWxSafe); + this.ucGroupBoxEx4.Controls.Add(this.label20); + this.ucGroupBoxEx4.Controls.Add(this.lblJstInitSet); + this.ucGroupBoxEx4.Controls.Add(this.lblIdFilter); this.ucGroupBoxEx4.Location = new System.Drawing.Point(162, 2); this.ucGroupBoxEx4.Name = "ucGroupBoxEx4"; this.ucGroupBoxEx4.Size = new System.Drawing.Size(410, 165); @@ -970,6 +970,30 @@ namespace TemuKJD.WXForms.ProductForms this.ucGroupBoxEx4.TabStop = false; this.ucGroupBoxEx4.Text = "待传商品"; // + // btnProdDb + // + this.btnProdDb.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnProdDb.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnProdDb.DisabledBackColor = System.Drawing.Color.Empty; + this.btnProdDb.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnProdDb.Location = new System.Drawing.Point(368, 131); + this.btnProdDb.Name = "btnProdDb"; + this.btnProdDb.Size = new System.Drawing.Size(33, 25); + this.btnProdDb.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnProdDb.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnProdDb.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnProdDb.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnProdDb.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnProdDb.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnProdDb.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnProdDb.Style.GradientAngle = 90; + this.btnProdDb.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnProdDb.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnProdDb.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnProdDb.TabIndex = 820; + this.btnProdDb.Text = "选品"; + this.btnProdDb.Click += new System.EventHandler(this.btnProdDb_Click); + // // chkWXComplateProd // this.chkWXComplateProd.Location = new System.Drawing.Point(180, 103); @@ -993,7 +1017,7 @@ namespace TemuKJD.WXForms.ProductForms // txtSearchGoodsName // this.txtSearchGoodsName.Font = new System.Drawing.Font("微软雅黑", 10F); - this.txtSearchGoodsName.Location = new System.Drawing.Point(47, 74); + this.txtSearchGoodsName.Location = new System.Drawing.Point(178, 47); this.txtSearchGoodsName.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtSearchGoodsName.Name = "txtSearchGoodsName"; this.txtSearchGoodsName.Size = new System.Drawing.Size(223, 25); @@ -1002,12 +1026,12 @@ namespace TemuKJD.WXForms.ProductForms // label20 // this.label20.AutoSize = true; - this.label20.Location = new System.Drawing.Point(4, 78); + this.label20.Location = new System.Drawing.Point(147, 51); this.label20.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label20.Name = "label20"; - this.label20.Size = new System.Drawing.Size(44, 17); + this.label20.Size = new System.Drawing.Size(32, 17); this.label20.TabIndex = 794; - this.label20.Text = "商品名"; + this.label20.Text = "标题"; // // pbSelectProd // @@ -1021,6 +1045,53 @@ namespace TemuKJD.WXForms.ProductForms this.pbSelectProd.Visible = false; this.pbSelectProd.Click += new System.EventHandler(this.pbSelectProd_Click); // + // cmbSourceType + // + this.cmbSourceType.FormattingEnabled = true; + this.cmbSourceType.Items.AddRange(new object[] { + "", + "厂商直采", + "1688厂家", + "微信小店", + "微信店采", + "母店采集", + "机会商品", + "以图搜品", + "外部数据"}); + this.cmbSourceType.Location = new System.Drawing.Point(47, 74); + this.cmbSourceType.Name = "cmbSourceType"; + this.cmbSourceType.Size = new System.Drawing.Size(92, 25); + this.cmbSourceType.TabIndex = 673; + this.cmbSourceType.Text = "厂商直采"; + this.cmbSourceType.Visible = false; + this.cmbSourceType.SelectedIndexChanged += new System.EventHandler(this.cmbSourceType_SelectedIndexChanged); + this.cmbSourceType.TextChanged += new System.EventHandler(this.cmbSourceType_TextChanged); + // + // cmbJstInitSet + // + this.cmbJstInitSet.FormattingEnabled = true; + this.cmbJstInitSet.Items.AddRange(new object[] { + "", + "已设置", + "未设置"}); + this.cmbJstInitSet.Location = new System.Drawing.Point(309, 74); + this.cmbJstInitSet.Name = "cmbJstInitSet"; + this.cmbJstInitSet.Size = new System.Drawing.Size(92, 25); + this.cmbJstInitSet.TabIndex = 697; + this.cmbJstInitSet.Text = "已设置"; + this.cmbJstInitSet.Visible = false; + // + // lblSourceType + // + this.lblSourceType.AutoSize = true; + this.lblSourceType.Location = new System.Drawing.Point(16, 78); + this.lblSourceType.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.lblSourceType.Name = "lblSourceType"; + this.lblSourceType.Size = new System.Drawing.Size(32, 17); + this.lblSourceType.TabIndex = 672; + this.lblSourceType.Text = "来源"; + this.lblSourceType.Visible = false; + // // cmbCateFilter3 // this.cmbCateFilter3.FormattingEnabled = true; @@ -1043,7 +1114,7 @@ namespace TemuKJD.WXForms.ProductForms // cmbGroupFilter // this.cmbGroupFilter.FormattingEnabled = true; - this.cmbGroupFilter.Location = new System.Drawing.Point(309, 74); + this.cmbGroupFilter.Location = new System.Drawing.Point(178, 74); this.cmbGroupFilter.Name = "cmbGroupFilter"; this.cmbGroupFilter.Size = new System.Drawing.Size(92, 25); this.cmbGroupFilter.TabIndex = 641; @@ -1059,23 +1130,10 @@ namespace TemuKJD.WXForms.ProductForms this.txtIdFilter.TabIndex = 652; this.txtIdFilter.Visible = false; // - // cmbJstInitSet - // - this.cmbJstInitSet.FormattingEnabled = true; - this.cmbJstInitSet.Items.AddRange(new object[] { - "", - "已设置", - "未设置"}); - this.cmbJstInitSet.Location = new System.Drawing.Point(178, 47); - this.cmbJstInitSet.Name = "cmbJstInitSet"; - this.cmbJstInitSet.Size = new System.Drawing.Size(92, 25); - this.cmbJstInitSet.TabIndex = 697; - this.cmbJstInitSet.Text = "已设置"; - // // lblGroupFilter // this.lblGroupFilter.AutoSize = true; - this.lblGroupFilter.Location = new System.Drawing.Point(278, 78); + this.lblGroupFilter.Location = new System.Drawing.Point(147, 78); this.lblGroupFilter.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.lblGroupFilter.Name = "lblGroupFilter"; this.lblGroupFilter.Size = new System.Drawing.Size(32, 17); @@ -1103,16 +1161,6 @@ namespace TemuKJD.WXForms.ProductForms this.cmbCateFilter2.TabIndex = 708; this.cmbCateFilter2.SelectedIndexChanged += new System.EventHandler(this.cmbCateFilter2_SelectedIndexChanged); // - // lblJstInitSet - // - this.lblJstInitSet.AutoSize = true; - this.lblJstInitSet.Location = new System.Drawing.Point(147, 51); - this.lblJstInitSet.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.lblJstInitSet.Name = "lblJstInitSet"; - this.lblJstInitSet.Size = new System.Drawing.Size(32, 17); - this.lblJstInitSet.TabIndex = 696; - this.lblJstInitSet.Text = "分销"; - // // label19 // this.label19.AutoSize = true; @@ -1123,38 +1171,6 @@ namespace TemuKJD.WXForms.ProductForms this.label19.TabIndex = 707; this.label19.Text = "类目2"; // - // cmbSourceType - // - this.cmbSourceType.FormattingEnabled = true; - this.cmbSourceType.Items.AddRange(new object[] { - "", - "厂商直采", - "1688厂家", - "微信店采", - "店铺采集", - "机会商品", - "以图搜品", - "外部数据"}); - this.cmbSourceType.Location = new System.Drawing.Point(309, 47); - this.cmbSourceType.Name = "cmbSourceType"; - this.cmbSourceType.Size = new System.Drawing.Size(92, 25); - this.cmbSourceType.TabIndex = 673; - this.cmbSourceType.Text = "厂商直采"; - this.cmbSourceType.Visible = false; - this.cmbSourceType.SelectedIndexChanged += new System.EventHandler(this.cmbSourceType_SelectedIndexChanged); - this.cmbSourceType.TextChanged += new System.EventHandler(this.cmbSourceType_TextChanged); - // - // lblSourceType - // - this.lblSourceType.AutoSize = true; - this.lblSourceType.Location = new System.Drawing.Point(278, 50); - this.lblSourceType.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.lblSourceType.Name = "lblSourceType"; - this.lblSourceType.Size = new System.Drawing.Size(32, 17); - this.lblSourceType.TabIndex = 672; - this.lblSourceType.Text = "来源"; - this.lblSourceType.Visible = false; - // // btnClearFilter // this.btnClearFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -1317,6 +1333,17 @@ namespace TemuKJD.WXForms.ProductForms this.chkSkipQualification.Text = "跳过资质商品"; this.chkSkipQualification.UseVisualStyleBackColor = true; // + // lblJstInitSet + // + this.lblJstInitSet.AutoSize = true; + this.lblJstInitSet.Location = new System.Drawing.Point(278, 78); + this.lblJstInitSet.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.lblJstInitSet.Name = "lblJstInitSet"; + this.lblJstInitSet.Size = new System.Drawing.Size(32, 17); + this.lblJstInitSet.TabIndex = 696; + this.lblJstInitSet.Text = "分销"; + this.lblJstInitSet.Visible = false; + // // ucGroupBoxEx1 // this.ucGroupBoxEx1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -2263,30 +2290,6 @@ namespace TemuKJD.WXForms.ProductForms this.panel1.Size = new System.Drawing.Size(873, 86); this.panel1.TabIndex = 189; // - // btnProdDb - // - this.btnProdDb.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnProdDb.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnProdDb.DisabledBackColor = System.Drawing.Color.Empty; - this.btnProdDb.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnProdDb.Location = new System.Drawing.Point(368, 131); - this.btnProdDb.Name = "btnProdDb"; - this.btnProdDb.Size = new System.Drawing.Size(33, 25); - this.btnProdDb.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnProdDb.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnProdDb.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnProdDb.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.btnProdDb.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.btnProdDb.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.btnProdDb.Style.ForeColor.Color = System.Drawing.Color.White; - this.btnProdDb.Style.GradientAngle = 90; - this.btnProdDb.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnProdDb.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnProdDb.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnProdDb.TabIndex = 820; - this.btnProdDb.Text = "选品"; - this.btnProdDb.Click += new System.EventHandler(this.btnProdDb_Click); - // // WXDBProdUploadForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs index 6f05a2a..e2e7a67 100644 --- a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs @@ -280,14 +280,20 @@ namespace TemuKJD.WXForms.ProductForms //lblExtCodeFilter.Visible = true; //txtExtCodeFilter.Visible = true; - txtIdFilter.Visible = true; - cmbSourceType.Visible = true; - cmbGroupFilter.Visible = true; lblIdFilter.Visible = true; + txtIdFilter.Visible = true; lblSourceType.Visible = true; + cmbSourceType.Visible = true; lblGroupFilter.Visible = true; + cmbGroupFilter.Visible = true; + lblJstInitSet.Visible = true; + cmbJstInitSet.Visible = true; } + if (BaseClass.UserAuthority.ParseToString().Contains("货源选择")) + { + cmbSourceType.Visible = true; + } if (BaseClass.UserAuthority.ParseToString().Contains("微信回采")) { chkWXComplateProd.Visible = true; @@ -1368,6 +1374,16 @@ namespace TemuKJD.WXForms.ProductForms } #endregion + #region 微信小店app + if (dbProd.product_get_type_text == "微信小店") + { + string convertRst = ""; + var ob = new PDDProdFormConverter().WXClientToPddConvert(out convertRst, dbProd); + if (!string.IsNullOrEmpty(convertRst)) + return "{\"success\":false,\"draftId\":0,\"status\":\"未上传\",\"errMsg\":\"商品查询错误 " + convertRst + "\"}"; + } + #endregion + #region 将产品数据初始化成微信小店支持的参数 JObject prodJObj = new JObject(); try @@ -2734,6 +2750,10 @@ namespace TemuKJD.WXForms.ProductForms { foreach (var propInfo in prodInfo.property.goods_properties) { + if (propInfo.name == "单件净含量") + { + + } if (propInfo.values.Count == 0) continue; @@ -2871,6 +2891,30 @@ namespace TemuKJD.WXForms.ProductForms attrValue = "常规"; else if (attrValueLst.Contains("通用")) attrValue = "通用"; + else if (attrValueLst.Contains("国产")) + attrValue = "国产"; + else if (attr.value.Contains("绒丝;羽毛;白鸭绒;白鹅绒;灰鸭绒;灰鹅绒;鸭毛片;鹅毛片")) + { + attrValue = "绒丝"; + } + else if (attr.name == "是否进口") + { + attrValue = "非进口"; + if (attr.value == "是;否") + attrValue = "否"; + } + else if (attr.name == "商品产地") + { + attrValue = "中国大陆"; + } + else if (attr.name == "产地") + { + attrValue = "中国大陆"; + } + else if (attrValueLst.Any(v => v.Contains("%"))) + { + attrValue = attrValueLst.FirstOrDefault(); + } else attrValue = attrValueLst.Where(v => !"真丝、蚕丝、香云纱、羊绒、羊毛、羊羔绒、羊羔毛、羽绒、皮草".Contains(v)).OrderBy(x => Guid.NewGuid()).FirstOrDefault(); } @@ -2895,6 +2939,29 @@ namespace TemuKJD.WXForms.ProductForms attrValue = "10 g"; else if (attr.value == "kg") attrValue = "1 kg"; + //else if (attr.value == "g;kg;ml;L") + // attrValue = "100 g"; + //else if (attr.value == "cm") + // attrValue = "20 cm"; + //else if (attr.value.Contains("岁以上") && attr.value.Contains("个月以上")) + // attrValue = "7 岁以上"; + //else if (attr.value == "只;个") + // attrValue = "1 个"; + else if (attr.value == "ml") + { + if ((propInfo.values.FirstOrDefault()?.value).ParseToString().EndsWith(attr.value)) + attrValue = propInfo.values.FirstOrDefault()?.value; + else + attr.value = "100 ml"; + } + else if (attr.value == "g;kg;ml;L") + { + var propInfoValue = (propInfo.values.FirstOrDefault()?.value).ParseToString(); + if (propInfoValue.EndsWith("g") || propInfoValue.EndsWith("kg") || propInfoValue.EndsWith("ml") || propInfoValue.EndsWith("L")) + attrValue = propInfo.values.FirstOrDefault()?.value; + else + attr.value = "100 g"; + } } if (string.IsNullOrEmpty(attrValue)) @@ -3041,6 +3108,10 @@ namespace TemuKJD.WXForms.ProductForms attrValue = "20 cm"; else if (attr.value.Contains("岁以上") && attr.value.Contains("个月以上")) attrValue = "7 岁以上"; + else if (attr.value == "只;个") + attrValue = "1 个"; + else if (attr.value == "ml") + attrValue = "100 ml"; } var wxPropParam = new wxPropParam(); @@ -3731,6 +3802,10 @@ namespace TemuKJD.WXForms.ProductForms { upProdParam.product.info.extraService.freightInsurance = 0; } + if (upProdParam.product.info.category[0].name == "珠宝首饰" || upProdParam.product.info.category[1].name == "时尚饰品") + { + upProdParam.product.info.extraService.fakeOnePayFour = 1; + } if (cell != null) { @@ -4599,10 +4674,20 @@ namespace TemuKJD.WXForms.ProductForms private void cmbSourceType_SelectedIndexChanged(object sender, EventArgs e) { - if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "微信店采") + if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店") fillPddCate(); else fillWxCate(); + + + if (!string.IsNullOrWhiteSpace(cmbSourceType.Text) && cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家") + { + cmbJstInitSet.Text = ""; + } + else + { + cmbJstInitSet.Text = "已设置"; + } } private void cmbSourceType_TextChanged(object sender, EventArgs e) diff --git a/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.Designer.cs index 14956ed..ed6efcf 100644 --- a/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.Designer.cs +++ b/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.Designer.cs @@ -55,19 +55,24 @@ namespace TemuKJD.WXForms.ProductForms this.btnSetShop = new DevComponents.DotNetBar.PanelEx(); this.btnSelect = new DevComponents.DotNetBar.PanelEx(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.ucCheckBox1 = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.txtCatBoundLessThan = new System.Windows.Forms.TextBox(); + this.txtCatBoundMoreThan = new System.Windows.Forms.TextBox(); + this.chkCatBoundLessThan = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.chkCatBoundMoreThan = new TemuKJD.UserComponent.UcCheckBox(this.components); this.btnSearch = new DevComponents.DotNetBar.PanelEx(); this.pnlEmpty = new DevComponents.DotNetBar.PanelEx(); - this.cmbCat3 = new System.Windows.Forms.ComboBox(); + this.cmbCat3 = new TemuKJD.UserComponent.UcComboBoxMutiSelect(); this.label17 = new System.Windows.Forms.Label(); - this.cmbCat2 = new System.Windows.Forms.ComboBox(); + this.cmbCat2 = new TemuKJD.UserComponent.UcComboBoxMutiSelect(); this.label14 = new System.Windows.Forms.Label(); - this.cmbCat1 = new System.Windows.Forms.ComboBox(); + this.cmbCat1 = new TemuKJD.UserComponent.UcComboBoxMutiSelect(); this.label2 = new System.Windows.Forms.Label(); this.txtProdName = new System.Windows.Forms.TextBox(); this.label3 = new System.Windows.Forms.Label(); this.lblWxSafe = new System.Windows.Forms.Label(); this.cmbWxSafe = new System.Windows.Forms.ComboBox(); + this.cmbSourceType = new System.Windows.Forms.ComboBox(); + this.lblSourceType = new System.Windows.Forms.Label(); this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.btnStopStop = new DevComponents.DotNetBar.PanelEx(); this.pnlSetShop = new System.Windows.Forms.Panel(); @@ -107,9 +112,7 @@ namespace TemuKJD.WXForms.ProductForms this.label15 = new System.Windows.Forms.Label(); this.txtExtCode = new System.Windows.Forms.TextBox(); this.label4 = new System.Windows.Forms.Label(); - this.cmbSourceType = new System.Windows.Forms.ComboBox(); this.cmbExportToOutServer = new System.Windows.Forms.ComboBox(); - this.label10 = new System.Windows.Forms.Label(); this.cmbSort = new System.Windows.Forms.ComboBox(); this.label6 = new System.Windows.Forms.Label(); this.dgvDbProduct = new TemuKJD.UserComponent.DataGridViewEx(); @@ -126,6 +129,7 @@ namespace TemuKJD.WXForms.ProductForms this.col_skc_id = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colMainCate = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.col_cat_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colCatBound = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.col_ext_code = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colStyleCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colGroup = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -192,10 +196,10 @@ namespace TemuKJD.WXForms.ProductForms this.lblSetShop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.lblSetShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblSetShop.ForeColor = System.Drawing.Color.DarkOrange; - this.lblSetShop.Location = new System.Drawing.Point(1083, 45); + this.lblSetShop.Location = new System.Drawing.Point(1094, 45); this.lblSetShop.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.lblSetShop.Name = "lblSetShop"; - this.lblSetShop.Size = new System.Drawing.Size(337, 17); + this.lblSetShop.Size = new System.Drawing.Size(326, 17); this.lblSetShop.TabIndex = 718; this.lblSetShop.Text = "指定店铺:"; this.lblSetShop.TextAlign = System.Drawing.ContentAlignment.TopRight; @@ -269,7 +273,10 @@ namespace TemuKJD.WXForms.ProductForms this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.Controls.Add(this.ucCheckBox1, 2, 1); + this.tableLayoutPanel1.Controls.Add(this.txtCatBoundLessThan, 5, 1); + this.tableLayoutPanel1.Controls.Add(this.txtCatBoundMoreThan, 3, 1); + this.tableLayoutPanel1.Controls.Add(this.chkCatBoundLessThan, 4, 1); + this.tableLayoutPanel1.Controls.Add(this.chkCatBoundMoreThan, 2, 1); this.tableLayoutPanel1.Controls.Add(this.btnSearch, 8, 0); this.tableLayoutPanel1.Controls.Add(this.pnlEmpty, 9, 0); this.tableLayoutPanel1.Controls.Add(this.cmbCat3, 7, 0); @@ -282,6 +289,8 @@ namespace TemuKJD.WXForms.ProductForms this.tableLayoutPanel1.Controls.Add(this.label3, 0, 0); this.tableLayoutPanel1.Controls.Add(this.lblWxSafe, 0, 1); this.tableLayoutPanel1.Controls.Add(this.cmbWxSafe, 1, 1); + this.tableLayoutPanel1.Controls.Add(this.cmbSourceType, 7, 1); + this.tableLayoutPanel1.Controls.Add(this.lblSourceType, 6, 1); this.tableLayoutPanel1.Location = new System.Drawing.Point(4, 4); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 3; @@ -291,17 +300,51 @@ namespace TemuKJD.WXForms.ProductForms this.tableLayoutPanel1.Size = new System.Drawing.Size(1193, 105); this.tableLayoutPanel1.TabIndex = 679; // - // ucCheckBox1 + // txtCatBoundLessThan // - this.ucCheckBox1.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.ucCheckBox1.Location = new System.Drawing.Point(280, 42); - this.ucCheckBox1.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3); - this.ucCheckBox1.Name = "ucCheckBox1"; - this.ucCheckBox1.Size = new System.Drawing.Size(87, 21); - this.ucCheckBox1.TabIndex = 815; - this.ucCheckBox1.Text = "微信回采商品"; - this.ucCheckBox1.UseVisualStyleBackColor = true; - this.ucCheckBox1.Visible = false; + this.txtCatBoundLessThan.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.txtCatBoundLessThan.Location = new System.Drawing.Point(625, 41); + this.txtCatBoundLessThan.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); + this.txtCatBoundLessThan.Name = "txtCatBoundLessThan"; + this.txtCatBoundLessThan.Size = new System.Drawing.Size(201, 23); + this.txtCatBoundLessThan.TabIndex = 883; + this.txtCatBoundLessThan.Text = "100000"; + this.txtCatBoundLessThan.Visible = false; + // + // txtCatBoundMoreThan + // + this.txtCatBoundMoreThan.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.txtCatBoundMoreThan.Location = new System.Drawing.Point(348, 41); + this.txtCatBoundMoreThan.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); + this.txtCatBoundMoreThan.Name = "txtCatBoundMoreThan"; + this.txtCatBoundMoreThan.Size = new System.Drawing.Size(201, 23); + this.txtCatBoundMoreThan.TabIndex = 882; + this.txtCatBoundMoreThan.Text = "1000"; + this.txtCatBoundMoreThan.Visible = false; + // + // chkCatBoundLessThan + // + this.chkCatBoundLessThan.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.chkCatBoundLessThan.Location = new System.Drawing.Point(558, 42); + this.chkCatBoundLessThan.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3); + this.chkCatBoundLessThan.Name = "chkCatBoundLessThan"; + this.chkCatBoundLessThan.Size = new System.Drawing.Size(64, 21); + this.chkCatBoundLessThan.TabIndex = 882; + this.chkCatBoundLessThan.Text = "保证金≤"; + this.chkCatBoundLessThan.UseVisualStyleBackColor = true; + this.chkCatBoundLessThan.CheckedChanged += new System.EventHandler(this.chkCatBoundLessThan_CheckedChanged); + // + // chkCatBoundMoreThan + // + this.chkCatBoundMoreThan.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.chkCatBoundMoreThan.Location = new System.Drawing.Point(281, 42); + this.chkCatBoundMoreThan.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3); + this.chkCatBoundMoreThan.Name = "chkCatBoundMoreThan"; + this.chkCatBoundMoreThan.Size = new System.Drawing.Size(64, 21); + this.chkCatBoundMoreThan.TabIndex = 815; + this.chkCatBoundMoreThan.Text = "保证金≥"; + this.chkCatBoundMoreThan.UseVisualStyleBackColor = true; + this.chkCatBoundMoreThan.CheckedChanged += new System.EventHandler(this.chkCatBoundMoreThan_CheckedChanged); // // btnSearch // @@ -356,19 +399,25 @@ namespace TemuKJD.WXForms.ProductForms // cmbCat3 // this.cmbCat3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.cmbCat3.DefaultText = "全部"; + this.cmbCat3.DropDownHeight = 1; + this.cmbCat3.DropDownWidth = 1; this.cmbCat3.FormattingEnabled = true; - this.cmbCat3.Location = new System.Drawing.Point(884, 5); + this.cmbCat3.IntegralHeight = false; + this.cmbCat3.Location = new System.Drawing.Point(883, 7); this.cmbCat3.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbCat3.Name = "cmbCat3"; - this.cmbCat3.Size = new System.Drawing.Size(200, 25); + this.cmbCat3.Size = new System.Drawing.Size(201, 25); this.cmbCat3.TabIndex = 811; - this.cmbCat3.SelectedIndexChanged += new System.EventHandler(this.cmbCateFilter3_SelectedIndexChanged); + this.cmbCat3.Text = "全部"; + this.cmbCat3.SelectedIndexChanged += new System.EventHandler(this.cmbCat3_SelectedIndexChanged); + this.cmbCat3.TextChanged += new System.EventHandler(this.cmbCat3_MultiSelectChanged); // // label17 // this.label17.Anchor = System.Windows.Forms.AnchorStyles.Right; this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(833, 9); + this.label17.Location = new System.Drawing.Point(832, 9); this.label17.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(51, 17); @@ -378,19 +427,25 @@ namespace TemuKJD.WXForms.ProductForms // cmbCat2 // this.cmbCat2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.cmbCat2.DefaultText = "全部"; + this.cmbCat2.DropDownHeight = 1; + this.cmbCat2.DropDownWidth = 1; this.cmbCat2.FormattingEnabled = true; - this.cmbCat2.Location = new System.Drawing.Point(627, 5); + this.cmbCat2.IntegralHeight = false; + this.cmbCat2.Location = new System.Drawing.Point(625, 7); this.cmbCat2.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbCat2.Name = "cmbCat2"; - this.cmbCat2.Size = new System.Drawing.Size(200, 25); + this.cmbCat2.Size = new System.Drawing.Size(201, 25); this.cmbCat2.TabIndex = 804; - this.cmbCat2.SelectedIndexChanged += new System.EventHandler(this.cmbCateFilter2_SelectedIndexChanged); + this.cmbCat2.Text = "全部"; + this.cmbCat2.SelectedIndexChanged += new System.EventHandler(this.cmbCat2_SelectedIndexChanged); + this.cmbCat2.TextChanged += new System.EventHandler(this.cmbCat2_MultiSelectChanged); // // label14 // this.label14.Anchor = System.Windows.Forms.AnchorStyles.Right; this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(576, 9); + this.label14.Location = new System.Drawing.Point(574, 9); this.label14.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.label14.Name = "label14"; this.label14.Size = new System.Drawing.Size(51, 17); @@ -400,19 +455,25 @@ namespace TemuKJD.WXForms.ProductForms // cmbCat1 // this.cmbCat1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.cmbCat1.DefaultText = "全部"; + this.cmbCat1.DropDownHeight = 1; + this.cmbCat1.DropDownWidth = 1; this.cmbCat1.FormattingEnabled = true; - this.cmbCat1.Location = new System.Drawing.Point(370, 5); + this.cmbCat1.IntegralHeight = false; + this.cmbCat1.Location = new System.Drawing.Point(348, 7); this.cmbCat1.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbCat1.Name = "cmbCat1"; - this.cmbCat1.Size = new System.Drawing.Size(200, 25); + this.cmbCat1.Size = new System.Drawing.Size(201, 25); this.cmbCat1.TabIndex = 805; - this.cmbCat1.SelectedIndexChanged += new System.EventHandler(this.cmbCateFilter1_SelectedIndexChanged); + this.cmbCat1.Text = "全部"; + this.cmbCat1.SelectedIndexChanged += new System.EventHandler(this.cmbCat1_SelectedIndexChanged); + this.cmbCat1.TextChanged += new System.EventHandler(this.cmbCat1_MultiSelectChanged); // // label2 // this.label2.Anchor = System.Windows.Forms.AnchorStyles.Right; this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(319, 9); + this.label2.Location = new System.Drawing.Point(297, 9); this.label2.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(51, 17); @@ -425,7 +486,7 @@ namespace TemuKJD.WXForms.ProductForms this.txtProdName.Location = new System.Drawing.Point(71, 6); this.txtProdName.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.txtProdName.Name = "txtProdName"; - this.txtProdName.Size = new System.Drawing.Size(200, 23); + this.txtProdName.Size = new System.Drawing.Size(201, 23); this.txtProdName.TabIndex = 427; // // label3 @@ -459,13 +520,49 @@ namespace TemuKJD.WXForms.ProductForms "安全+未校验", "安全商品", "未校验"}); - this.cmbWxSafe.Location = new System.Drawing.Point(71, 40); + this.cmbWxSafe.Location = new System.Drawing.Point(71, 42); this.cmbWxSafe.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbWxSafe.Name = "cmbWxSafe"; - this.cmbWxSafe.Size = new System.Drawing.Size(200, 25); + this.cmbWxSafe.Size = new System.Drawing.Size(201, 25); this.cmbWxSafe.TabIndex = 676; this.cmbWxSafe.Text = "安全+未校验"; // + // cmbSourceType + // + this.cmbSourceType.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.cmbSourceType.FormattingEnabled = true; + this.cmbSourceType.Items.AddRange(new object[] { + "", + "厂商直采", + "1688厂家", + "微信小店", + "微信店采", + "母店采集", + "机会商品", + "以图搜品", + "外部数据"}); + this.cmbSourceType.Location = new System.Drawing.Point(883, 42); + this.cmbSourceType.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); + this.cmbSourceType.Name = "cmbSourceType"; + this.cmbSourceType.Size = new System.Drawing.Size(201, 25); + this.cmbSourceType.TabIndex = 654; + this.cmbSourceType.Text = "厂商直采"; + this.cmbSourceType.Visible = false; + this.cmbSourceType.SelectedIndexChanged += new System.EventHandler(this.cmbSourceType_SelectedIndexChanged); + this.cmbSourceType.TextChanged += new System.EventHandler(this.cmbSourceType_SelectedIndexChanged); + // + // lblSourceType + // + this.lblSourceType.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.lblSourceType.AutoSize = true; + this.lblSourceType.Location = new System.Drawing.Point(839, 44); + this.lblSourceType.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); + this.lblSourceType.Name = "lblSourceType"; + this.lblSourceType.Size = new System.Drawing.Size(44, 17); + this.lblSourceType.TabIndex = 651; + this.lblSourceType.Text = "来源:"; + this.lblSourceType.Visible = false; + // // splitContainer2 // this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; @@ -497,9 +594,7 @@ namespace TemuKJD.WXForms.ProductForms this.splitContainer2.Panel1.Controls.Add(this.label15); this.splitContainer2.Panel1.Controls.Add(this.txtExtCode); this.splitContainer2.Panel1.Controls.Add(this.label4); - this.splitContainer2.Panel1.Controls.Add(this.cmbSourceType); this.splitContainer2.Panel1.Controls.Add(this.cmbExportToOutServer); - this.splitContainer2.Panel1.Controls.Add(this.label10); this.splitContainer2.Panel1.Controls.Add(this.cmbSort); this.splitContainer2.Panel1.Controls.Add(this.label6); this.splitContainer2.Panel1.Controls.Add(this.dgvDbProduct); @@ -519,7 +614,7 @@ namespace TemuKJD.WXForms.ProductForms 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(88, 413); + this.btnStopStop.Location = new System.Drawing.Point(88, 383); this.btnStopStop.Name = "btnStopStop"; this.btnStopStop.Size = new System.Drawing.Size(76, 25); this.btnStopStop.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -806,7 +901,7 @@ namespace TemuKJD.WXForms.ProductForms // this.label16.Anchor = System.Windows.Forms.AnchorStyles.Right; this.label16.AutoSize = true; - this.label16.Location = new System.Drawing.Point(19, 300); + this.label16.Location = new System.Drawing.Point(19, 270); this.label16.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(69, 17); @@ -817,7 +912,7 @@ namespace TemuKJD.WXForms.ProductForms // txtRealCoid // this.txtRealCoid.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtRealCoid.Location = new System.Drawing.Point(88, 205); + this.txtRealCoid.Location = new System.Drawing.Point(88, 175); this.txtRealCoid.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.txtRealCoid.Name = "txtRealCoid"; this.txtRealCoid.Size = new System.Drawing.Size(133, 23); @@ -827,7 +922,7 @@ namespace TemuKJD.WXForms.ProductForms // txtSKC // this.txtSKC.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtSKC.Location = new System.Drawing.Point(88, 297); + this.txtSKC.Location = new System.Drawing.Point(88, 267); this.txtSKC.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.txtSKC.Name = "txtSKC"; this.txtSKC.Size = new System.Drawing.Size(133, 23); @@ -842,7 +937,7 @@ namespace TemuKJD.WXForms.ProductForms "", "是", "否"}); - this.cmbWxCat.Location = new System.Drawing.Point(88, 266); + this.cmbWxCat.Location = new System.Drawing.Point(88, 236); this.cmbWxCat.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbWxCat.Name = "cmbWxCat"; this.cmbWxCat.Size = new System.Drawing.Size(133, 25); @@ -854,7 +949,7 @@ namespace TemuKJD.WXForms.ProductForms // this.label13.Anchor = System.Windows.Forms.AnchorStyles.Right; this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(20, 239); + this.label13.Location = new System.Drawing.Point(20, 209); this.label13.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.label13.Name = "label13"; this.label13.Size = new System.Drawing.Size(68, 17); @@ -866,7 +961,7 @@ namespace TemuKJD.WXForms.ProductForms // this.label12.Anchor = System.Windows.Forms.AnchorStyles.Right; this.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(20, 270); + this.label12.Location = new System.Drawing.Point(20, 240); this.label12.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.label12.Name = "label12"; this.label12.Size = new System.Drawing.Size(68, 17); @@ -877,7 +972,7 @@ namespace TemuKJD.WXForms.ProductForms // txtSPU // this.txtSPU.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtSPU.Location = new System.Drawing.Point(88, 55); + this.txtSPU.Location = new System.Drawing.Point(88, 54); this.txtSPU.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.txtSPU.Name = "txtSPU"; this.txtSPU.Size = new System.Drawing.Size(133, 23); @@ -887,7 +982,7 @@ namespace TemuKJD.WXForms.ProductForms // txtSecretStyleCode // this.txtSecretStyleCode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtSecretStyleCode.Location = new System.Drawing.Point(88, 84); + this.txtSecretStyleCode.Location = new System.Drawing.Point(88, 83); this.txtSecretStyleCode.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.txtSecretStyleCode.Name = "txtSecretStyleCode"; this.txtSecretStyleCode.Size = new System.Drawing.Size(133, 23); @@ -898,7 +993,7 @@ namespace TemuKJD.WXForms.ProductForms // this.label1.Anchor = System.Windows.Forms.AnchorStyles.Right; this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(19, 209); + this.label1.Location = new System.Drawing.Point(19, 179); this.label1.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(69, 17); @@ -909,7 +1004,7 @@ namespace TemuKJD.WXForms.ProductForms // chkWXComplateProd // this.chkWXComplateProd.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.chkWXComplateProd.Location = new System.Drawing.Point(88, 386); + this.chkWXComplateProd.Location = new System.Drawing.Point(88, 356); this.chkWXComplateProd.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3); this.chkWXComplateProd.Name = "chkWXComplateProd"; this.chkWXComplateProd.Size = new System.Drawing.Size(87, 21); @@ -922,7 +1017,7 @@ namespace TemuKJD.WXForms.ProductForms // this.lblGroup.Anchor = System.Windows.Forms.AnchorStyles.Right; this.lblGroup.AutoSize = true; - this.lblGroup.Location = new System.Drawing.Point(44, 357); + this.lblGroup.Location = new System.Drawing.Point(44, 327); this.lblGroup.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.lblGroup.Name = "lblGroup"; this.lblGroup.Size = new System.Drawing.Size(44, 17); @@ -934,7 +1029,7 @@ namespace TemuKJD.WXForms.ProductForms // this.lblNotes.Anchor = System.Windows.Forms.AnchorStyles.Right; this.lblNotes.AutoSize = true; - this.lblNotes.Location = new System.Drawing.Point(44, 329); + this.lblNotes.Location = new System.Drawing.Point(44, 299); this.lblNotes.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.lblNotes.Name = "lblNotes"; this.lblNotes.Size = new System.Drawing.Size(44, 17); @@ -946,7 +1041,7 @@ namespace TemuKJD.WXForms.ProductForms // this.cmbGroupFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.cmbGroupFilter.FormattingEnabled = true; - this.cmbGroupFilter.Location = new System.Drawing.Point(88, 355); + this.cmbGroupFilter.Location = new System.Drawing.Point(88, 325); this.cmbGroupFilter.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbGroupFilter.Name = "cmbGroupFilter"; this.cmbGroupFilter.Size = new System.Drawing.Size(133, 25); @@ -957,7 +1052,7 @@ namespace TemuKJD.WXForms.ProductForms // this.label5.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(31, 58); + this.label5.Location = new System.Drawing.Point(31, 57); this.label5.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(57, 17); @@ -968,7 +1063,7 @@ namespace TemuKJD.WXForms.ProductForms // txtNotes // this.txtNotes.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtNotes.Location = new System.Drawing.Point(88, 326); + this.txtNotes.Location = new System.Drawing.Point(88, 296); this.txtNotes.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.txtNotes.Name = "txtNotes"; this.txtNotes.Size = new System.Drawing.Size(133, 23); @@ -979,7 +1074,7 @@ namespace TemuKJD.WXForms.ProductForms // this.label15.Anchor = System.Windows.Forms.AnchorStyles.Right; this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(44, 87); + this.label15.Location = new System.Drawing.Point(44, 86); this.label15.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(44, 17); @@ -990,7 +1085,7 @@ namespace TemuKJD.WXForms.ProductForms // txtExtCode // this.txtExtCode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtExtCode.Location = new System.Drawing.Point(88, 114); + this.txtExtCode.Location = new System.Drawing.Point(88, 113); this.txtExtCode.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.txtExtCode.Name = "txtExtCode"; this.txtExtCode.Size = new System.Drawing.Size(133, 23); @@ -1001,7 +1096,7 @@ namespace TemuKJD.WXForms.ProductForms // this.label4.Anchor = System.Windows.Forms.AnchorStyles.Right; this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(44, 117); + this.label4.Location = new System.Drawing.Point(44, 116); this.label4.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(44, 17); @@ -1009,28 +1104,6 @@ namespace TemuKJD.WXForms.ProductForms this.label4.Text = "货号:"; this.label4.Visible = false; // - // cmbSourceType - // - this.cmbSourceType.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.cmbSourceType.FormattingEnabled = true; - this.cmbSourceType.Items.AddRange(new object[] { - "", - "厂商直采", - "1688厂家", - "微信店采", - "母店采集", - "机会商品", - "以图搜品", - "外部数据"}); - this.cmbSourceType.Location = new System.Drawing.Point(88, 174); - this.cmbSourceType.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); - this.cmbSourceType.Name = "cmbSourceType"; - this.cmbSourceType.Size = new System.Drawing.Size(133, 25); - this.cmbSourceType.TabIndex = 654; - this.cmbSourceType.Text = "厂商直采"; - this.cmbSourceType.Visible = false; - this.cmbSourceType.SelectedIndexChanged += new System.EventHandler(this.cmbSourceType_SelectedIndexChanged); - // // cmbExportToOutServer // this.cmbExportToOutServer.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); @@ -1040,7 +1113,7 @@ namespace TemuKJD.WXForms.ProductForms "是", "否", "导出未拉回"}); - this.cmbExportToOutServer.Location = new System.Drawing.Point(88, 235); + this.cmbExportToOutServer.Location = new System.Drawing.Point(88, 205); this.cmbExportToOutServer.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbExportToOutServer.Name = "cmbExportToOutServer"; this.cmbExportToOutServer.Size = new System.Drawing.Size(133, 25); @@ -1048,18 +1121,6 @@ namespace TemuKJD.WXForms.ProductForms this.cmbExportToOutServer.Text = "是"; this.cmbExportToOutServer.Visible = false; // - // label10 - // - this.label10.Anchor = System.Windows.Forms.AnchorStyles.Right; - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(44, 178); - this.label10.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(44, 17); - this.label10.TabIndex = 651; - this.label10.Text = "来源:"; - this.label10.Visible = false; - // // cmbSort // this.cmbSort.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); @@ -1067,7 +1128,7 @@ namespace TemuKJD.WXForms.ProductForms this.cmbSort.Items.AddRange(new object[] { "入库时间", "认领总数"}); - this.cmbSort.Location = new System.Drawing.Point(88, 143); + this.cmbSort.Location = new System.Drawing.Point(88, 142); this.cmbSort.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbSort.Name = "cmbSort"; this.cmbSort.Size = new System.Drawing.Size(133, 25); @@ -1079,7 +1140,7 @@ namespace TemuKJD.WXForms.ProductForms // this.label6.Anchor = System.Windows.Forms.AnchorStyles.Right; this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(44, 147); + this.label6.Location = new System.Drawing.Point(44, 146); this.label6.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(44, 17); @@ -1120,6 +1181,7 @@ namespace TemuKJD.WXForms.ProductForms this.col_skc_id, this.colMainCate, this.col_cat_name, + this.colCatBound, this.col_ext_code, this.colStyleCode, this.colGroup, @@ -1261,6 +1323,13 @@ namespace TemuKJD.WXForms.ProductForms this.col_cat_name.Name = "col_cat_name"; this.col_cat_name.ReadOnly = true; // + // colCatBound + // + this.colCatBound.FillWeight = 50F; + this.colCatBound.HeaderText = "类目保证金"; + this.colCatBound.Name = "colCatBound"; + this.colCatBound.ReadOnly = true; + // // col_ext_code // dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True; @@ -1483,6 +1552,7 @@ namespace TemuKJD.WXForms.ProductForms this.Name = "WXUserProdListForm"; this.Text = "产品数据库"; this.TitleText = "产品数据库"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.WXUserProdListForm_FormClosing); this.Load += new System.EventHandler(this.ProductListForm_Load); this.VisibleChanged += new System.EventHandler(this.ProductListForm_VisibleChanged); this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.PDDDBProdListForm_KeyDown); @@ -1535,16 +1605,16 @@ namespace TemuKJD.WXForms.ProductForms private System.Windows.Forms.ComboBox cmbGroupFilter; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.ComboBox cmbSourceType; - private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label lblSourceType; private System.Windows.Forms.Label lblWxSafe; private System.Windows.Forms.ComboBox cmbWxSafe; private System.Windows.Forms.ComboBox cmbWxCat; private System.Windows.Forms.Label label12; private System.Windows.Forms.ComboBox cmbExportToOutServer; private System.Windows.Forms.Label label13; - private System.Windows.Forms.ComboBox cmbCat2; + private UserComponent.UcComboBoxMutiSelect cmbCat2; private System.Windows.Forms.Label label14; - private System.Windows.Forms.ComboBox cmbCat1; + private UserComponent.UcComboBoxMutiSelect cmbCat1; private DevComponents.DotNetBar.PanelEx btnStopStop; private System.Windows.Forms.TextBox txtSecretStyleCode; private System.Windows.Forms.Label label15; @@ -1552,9 +1622,9 @@ namespace TemuKJD.WXForms.ProductForms private System.Windows.Forms.TextBox txtRealCoid; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label17; - private System.Windows.Forms.ComboBox cmbCat3; + private UserComponent.UcComboBoxMutiSelect cmbCat3; private UserComponent.UcCheckBox chkWXComplateProd; - private UserComponent.UcCheckBox ucCheckBox1; + private UserComponent.UcCheckBox chkCatBoundMoreThan; private System.Windows.Forms.Panel pnlSetShop; private UserComponent.DataGridViewEx dgvSelectShop; private DevComponents.DotNetBar.PanelEx btnCancel; @@ -1588,6 +1658,7 @@ namespace TemuKJD.WXForms.ProductForms private System.Windows.Forms.DataGridViewTextBoxColumn col_skc_id; private System.Windows.Forms.DataGridViewTextBoxColumn colMainCate; private System.Windows.Forms.DataGridViewTextBoxColumn col_cat_name; + private System.Windows.Forms.DataGridViewTextBoxColumn colCatBound; private System.Windows.Forms.DataGridViewTextBoxColumn col_ext_code; private System.Windows.Forms.DataGridViewTextBoxColumn colStyleCode; private System.Windows.Forms.DataGridViewTextBoxColumn colGroup; @@ -1609,5 +1680,8 @@ namespace TemuKJD.WXForms.ProductForms private System.Windows.Forms.DataGridViewLinkColumn col_edit; private System.Windows.Forms.DataGridViewLinkColumn col_delete; private System.Windows.Forms.DataGridViewLinkColumn col_select_product; + private System.Windows.Forms.TextBox txtCatBoundLessThan; + private System.Windows.Forms.TextBox txtCatBoundMoreThan; + private UserComponent.UcCheckBox chkCatBoundLessThan; } } \ No newline at end of file diff --git a/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.cs b/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.cs index e74615d..fd83ba3 100644 --- a/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.cs +++ b/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.cs @@ -102,6 +102,12 @@ namespace TemuKJD.WXForms.ProductForms ucSplitPage1.cmbPageSize.Items.Add(1000); ucSplitPage1.cmbPageSize.DropDownStyle = ComboBoxStyle.DropDownList; ucSplitPage1.cmbPageSize.SelectedIndex = 0; + + if (BaseClass.SaLevel > 0 || BaseClass.UserAuthority.Contains("货源选择")) + { + lblSourceType.Visible = true; + cmbSourceType.Visible = true; + } } private void btnSearch_Click(object sender, EventArgs e) @@ -206,6 +212,7 @@ namespace TemuKJD.WXForms.ProductForms prod.skc_id, prod.main_cat_name ?? prod.main_cat_id, catName.Split('>').LastOrDefault()?.Trim(), + GlobalConfig.WxCatBoundList.FirstOrDefault(cb => cb.leaf_id == prod.wx_cat_leaf)?.cat_bound, prod.ext_code, (prod.secret_spu_id + " " + prod.real_spu_id + " " + prod.real_coid).Trim(), prod.group, @@ -322,31 +329,46 @@ namespace TemuKJD.WXForms.ProductForms // data += "&end_time=" + dtpEnd.Value.ToString("yyyy-MM-dd HH:mm:ss"); //} - if (cmbSourceType.Text != "厂商直采") + if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店") { - data += "&search_cat1=" + cmbCat1.Text.Trim(); - data += "&search_cat=" + cmbCat2.Text.Trim(); + data += "&search_cat1=" + (cmbCat1.Text.Trim() == "全部" ? "" : cmbCat1.Text.Trim()); + data += "&search_cat=" + (cmbCat2.Text.Trim() == "全部" ? "" : cmbCat2.Text.Trim()); } else { - var cate1 = GlobalConfig.WxCatList.FirstOrDefault(c => c.level == 1 && c.name == cmbCat1.Text.Trim()); - var cates2 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate1?.cat_id).ToList(); - var cate2 = cates2.FirstOrDefault(c => c.level == 2 && c.name == cmbCat2.Text.Trim()); - var cates3 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate2?.cat_id).ToList(); - var cate3 = cates3.FirstOrDefault(c => c.level == 3 && c.name == cmbCat3.Text.Trim()); + var selectCate1 = GlobalConfig.WxCatList.Where(c => c.level == 1 && (/*cmbCat1.Text.Trim() == cmbCat1.DefaultText ||*/ (";" + cmbCat1.Text.Trim() + ";").Contains(";" + c.name + ";"))).ToList(); + var cates2 = GlobalConfig.WxCatList.Where(c => selectCate1.Any(c1 => c.f_cat_id == c1.cat_id)).ToList(); + var selectCate2 = cates2.Where(c => c.level == 2 && (/*cmbCat2.Text.Trim() == cmbCat2.DefaultText ||*/ (";" + cmbCat2.Text.Trim() + ";").Contains(";" + c.name + ";"))).ToList(); + var cates3 = GlobalConfig.WxCatList.Where(c => selectCate2.Any(c2 => c.f_cat_id == c2.cat_id)).ToList(); + var selectCate3 = cates3.Where(c => c.level == 3 && (/*cmbCat3.Text.Trim() == cmbCat3.DefaultText ||*/ (";" + cmbCat3.Text.Trim() + ";").Contains(";" + c.name + ";"))).ToList(); - if (!string.IsNullOrEmpty(cmbCat1.Text) && cate1 != null) - data += "&wx_cat_1=" + cate1.cat_id; + if (!string.IsNullOrEmpty(cmbCat1.Text) && selectCate1?.Count > 0) + data += "&wx_cat_1=" + string.Join(",", selectCate1.Select(c => c.cat_id).ToList()); //else if (chkSkipQualification.Checked) //{ // // 厂商直采普通店铺不要随特殊商品 // data += "&wx_cat_1=" + string.Join(",", GlobalConfig.WxCatList.Where(c => c.level == 1 && !(c.name == "图书" || c.name == "食品饮料" || c.name == "成人用品")) // .Select(c => c.cat_id)); //} - if (!string.IsNullOrEmpty(cmbCat2.Text) && cate2 != null) - data += "&wx_cat_2=" + cate2.cat_id; - if (!string.IsNullOrEmpty(cmbCat3.Text) && cate3 != null) - data += "&wx_cat_3=" + cate3.cat_id; + if (!string.IsNullOrEmpty(cmbCat2.Text) && selectCate2?.Count > 0) + data += "&wx_cat_2=" + string.Join(",", selectCate2.Select(c => c.cat_id).ToList()); + if (!string.IsNullOrEmpty(cmbCat3.Text) && selectCate3?.Count > 0) + data += "&wx_cat_3=" + string.Join(",", selectCate3.Select(c => c.cat_id).ToList()); + + if (chkCatBoundMoreThan.Checked || chkCatBoundLessThan.Checked) + { + var catBoundLst = GlobalConfig.WxCatBoundList.ToList(); + if (chkCatBoundMoreThan.Checked) + { + catBoundLst = catBoundLst.Where(cb => cb.cat_bound >= txtCatBoundMoreThan.Text.Trim().ParseToInt()).ToList(); + } + if (chkCatBoundLessThan.Checked) + { + catBoundLst = catBoundLst.Where(cb => cb.cat_bound <= txtCatBoundLessThan.Text.Trim().ParseToInt()).ToList(); + } + data += "&wx_cat_leaf=" + string.Join(",", catBoundLst.Select(c => c.leaf_id).ToList()); + } + } if (!string.IsNullOrEmpty(txtSecretStyleCode.Text.Trim())) @@ -442,8 +464,9 @@ namespace TemuKJD.WXForms.ProductForms private void pnlEmpty_Click(object sender, EventArgs e) { - this.cmbCat1.Text = ""; - this.cmbCat2.Text = ""; + this.cmbCat1.Text = "全部"; + this.cmbCat2.Text = "全部"; + this.cmbCat3.Text = "全部"; this.txtExtCode.Text = ""; this.txtProdName.Text = ""; this.txtSKC.Text = ""; @@ -458,46 +481,64 @@ namespace TemuKJD.WXForms.ProductForms this.txtSecretStyleCode.Text = ""; } - private void cmbCateFilter1_SelectedIndexChanged(object sender, EventArgs e) + private void cmbCat1_SelectedIndexChanged(object sender, EventArgs e) + { + + } + + private void cmbCat2_SelectedIndexChanged(object sender, EventArgs e) + { + + } + + private void cmbCat3_SelectedIndexChanged(object sender, EventArgs e) + { + + } + + private void cmbCat1_MultiSelectChanged(object sender, EventArgs e) { if (cmbSourceType.Text != "厂商直采") return; cmbCat2.Text = ""; cmbCat2.Items.Clear(); - var cate1 = GlobalConfig.WxCatList.FirstOrDefault(c => c.level == 1 && c.name == cmbCat1.Text.Trim()); - var cates2 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate1?.cat_id).ToList(); - foreach (var cate2 in cates2) - { - cmbCat2.Items.Add(cate2.name); - } - + cmbCat3.Text = ""; + cmbCat3.Items.Clear(); + var selectCate1 = GlobalConfig.WxCatList.Where(c => c.level == 1 && (cmbCat1.Text.Trim() == cmbCat1.DefaultText || (";" + cmbCat1.Text.Trim() + ";").Contains(";" + c.name + ";"))).ToList(); + var cates2 = GlobalConfig.WxCatList.Where(c => selectCate1.Any(c1 => c.f_cat_id == c1.cat_id)).ToList(); + //foreach (var cate2 in cates2) + //{ + // cmbCat2.Items.Add(cate2.name); + //} + cmbCat2.Items.AddRange(cates2.Select(c => c.name).ToArray()); } - private void cmbCateFilter2_SelectedIndexChanged(object sender, EventArgs e) + private void cmbCat2_MultiSelectChanged(object sender, EventArgs e) { if (cmbSourceType.Text != "厂商直采") return; cmbCat3.Text = ""; cmbCat3.Items.Clear(); - var cate1 = GlobalConfig.WxCatList.FirstOrDefault(c => c.level == 1 && c.name == cmbCat1.Text.Trim()); - var cates2 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate1?.cat_id).ToList(); - var cate2 = cates2.FirstOrDefault(c => c.level == 2 && c.name == cmbCat2.Text.Trim()); - var cates3 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate2?.cat_id).ToList(); - foreach (var cate3 in cates3) - { - cmbCat3.Items.Add(cate3.name); - } + var selectCate1 = GlobalConfig.WxCatList.Where(c => c.level == 1 && (cmbCat1.Text.Trim() == cmbCat1.DefaultText || (";" + cmbCat1.Text.Trim() + ";").Contains(";" + c.name + ";"))).ToList(); + var cates2 = GlobalConfig.WxCatList.Where(c => selectCate1.Any(c1 => c.f_cat_id == c1.cat_id)).ToList(); + var selectCate2 = cates2.Where(c => c.level == 2 && (cmbCat2.Text.Trim() == cmbCat1.DefaultText || (";" + cmbCat2.Text.Trim() + ";").Contains(c.name))).ToList(); + var cates3 = GlobalConfig.WxCatList.Where(c => selectCate2.Any(c2 => c.f_cat_id == c2.cat_id)).ToList(); + //foreach (var cate3 in cates3) + //{ + // cmbCat3.Items.Add(cate3.name); + //} + cmbCat3.Items.AddRange(cates3.Select(c => c.name).ToArray()); } - private void cmbCateFilter3_SelectedIndexChanged(object sender, EventArgs e) + private void cmbCat3_MultiSelectChanged(object sender, EventArgs e) { - var cate1 = GlobalConfig.WxCatList.FirstOrDefault(c => c.level == 1 && c.name == cmbCat1.Text.Trim()); - var cates2 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate1?.cat_id).ToList(); - var cate2 = cates2.FirstOrDefault(c => c.level == 2 && c.name == cmbCat1.Text.Trim()); - var cates3 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate2?.cat_id).ToList(); - var cate3 = cates3.FirstOrDefault(c => c.level == 3 && c.name == cmbCat1.Text.Trim()); + //var cate1 = GlobalConfig.WxCatList.FirstOrDefault(c => c.level == 1 && c.name == cmbCat1.Text.Trim()); + //var cates2 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate1?.cat_id).ToList(); + //var cate2 = cates2.FirstOrDefault(c => c.level == 2 && c.name == cmbCat1.Text.Trim()); + //var cates3 = GlobalConfig.WxCatList.Where(c => c.f_cat_id == cate2?.cat_id).ToList(); + //var cate3 = cates3.FirstOrDefault(c => c.level == 3 && c.name == cmbCat1.Text.Trim()); } private void dgvDbProduct_CellContentClick(object sender, DataGridViewCellEventArgs e) @@ -732,11 +773,26 @@ namespace TemuKJD.WXForms.ProductForms private void cmbSourceType_SelectedIndexChanged(object sender, EventArgs e) { - - if (cmbSourceType.Text != "厂商直采") + if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店") + { fillPddCate(); + } else + { fillWxCate(); + } + + if (!string.IsNullOrWhiteSpace(cmbSourceType.Text) && cmbSourceType.Text != "厂商直采") + { + cmbExportToOutServer.Text = ""; + cmbWxCat.Text = ""; + } + else + { + cmbExportToOutServer.Text = "是"; + cmbWxCat.Text = "是"; + } + } /// @@ -777,9 +833,9 @@ namespace TemuKJD.WXForms.ProductForms cmbCat1.Items.Clear(); cmbCat2.Items.Clear(); cmbCat3.Items.Clear(); - cmbCat1.Text = ""; - cmbCat2.Text = ""; - cmbCat3.Text = ""; + cmbCat1.Text = "全部"; + cmbCat2.Text = "全部"; + cmbCat3.Text = "全部"; foreach (var item in pdd_product_cates.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries)) { cmbCat1.Items.Add(item); @@ -792,9 +848,9 @@ namespace TemuKJD.WXForms.ProductForms cmbCat1.Items.Clear(); cmbCat2.Items.Clear(); cmbCat3.Items.Clear(); - cmbCat1.Text = ""; - cmbCat2.Text = ""; - cmbCat3.Text = ""; + cmbCat1.Text = "全部"; + cmbCat2.Text = "全部"; + cmbCat3.Text = "全部"; foreach (var cate in GlobalConfig.WxCatList.Where(c => c.level == 1).ToList()) { cmbCat1.Items.Add(cate.name); @@ -928,5 +984,21 @@ namespace TemuKJD.WXForms.ProductForms cmbFilterShopNotes.Text = cmbFilterShopNotes.DefaultText; cmbFilterShopGroups.Text = cmbFilterShopGroups.DefaultText; } + + private void chkCatBoundMoreThan_CheckedChanged(object sender, EventArgs e) + { + txtCatBoundMoreThan.Visible = chkCatBoundMoreThan.Checked; + } + + private void chkCatBoundLessThan_CheckedChanged(object sender, EventArgs e) + { + txtCatBoundLessThan.Visible = chkCatBoundLessThan.Checked; + } + + private void WXUserProdListForm_FormClosing(object sender, FormClosingEventArgs e) + { + this.Hide(); + e.Cancel = true; + } } } diff --git a/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.resx b/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.resx index 411ebe8..585b372 100644 --- a/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.resx +++ b/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.resx @@ -177,6 +177,9 @@ True + + True + True