From 2759ff0f6d8172a513efdbdd735e05f66170bc5e Mon Sep 17 00:00:00 2001 From: wule Date: Tue, 9 Jun 2026 18:11:32 +0800 Subject: [PATCH] =?UTF-8?q?1=E5=BE=AE=E4=BF=A1=E7=94=A8=E6=88=B7=E9=87=87?= =?UTF-8?q?=E9=9B=86=E5=BA=97=E9=93=BA=E5=95=86=E5=93=81=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=20=202=E6=9F=A5=E8=AF=A2=E8=BE=BE=E4=BA=BA=E5=B8=A6=E8=B4=A7?= =?UTF-8?q?=E5=95=86=E5=93=81=E5=B9=B6=E8=81=94=E7=B3=BB=E8=BE=BE=E4=BA=BA?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AllBase/AllBase.csproj | 2 + AllBase/BaseClass.cs | 2 +- .../WXUploadProductInfoRecommendParam.cs | 70 +++ .../Param/WXParam/WXUploadProductParam.cs | 6 +- .../Model/Result/WXResult/WXLiveObjectInfo.cs | 58 +++ .../BLL/BXX/BXXProductManage.cs | 24 + .../KJD_WebService/KJD_WebService.csproj.user | 2 +- TEMUKJD/BLL/PDDProdFormConverter.cs | 12 +- TEMUKJD/BLL/WXHttpResponseBLL.cs | 82 +++ .../BLL/Wx/WxPlatformRecommendProdManage.cs | 6 +- .../PDDDBProdEditDetailForm.Designer.cs | 308 ++++++----- .../PDDDBProdEditDetailForm.cs | 12 +- .../PDDGetChanceProdForm.cs | 26 +- ...erCollectAuthProdEditNotesForm.Designer.cs | 388 +++++++++----- .../WXUserCollectAuthProdEditNotesForm.cs | 275 +++++++++- .../ToolForms/DouBaoTitleFissionCefForm.cs | 18 +- TEMUKJD/ToolForms/Get1688ProductForm.cs | 18 +- .../UserComponent/UcComboBoxMutiSelect .cs | 1 + .../AdminForms/WXAdminAccountForm.Designer.cs | 229 ++++++--- .../WXForms/AdminForms/WXAdminAccountForm.cs | 13 +- .../WXDBProdUploadForm.Designer.cs | 193 +++---- .../ProductForms/WXDBProdUploadForm.cs | 110 ++-- .../WXFinderSquareForm.Designer.cs | 479 +++++++++++++++++- .../ProductForms/WXFinderSquareForm.cs | 380 ++++++++++++++ .../ProductForms/WXFinderSquareForm.resx | 69 +++ .../WXProdPreSaleForm.Designer.cs | 61 ++- .../WXForms/ProductForms/WXProdPreSaleForm.cs | 23 +- TEMUKJD/WXForms/ProductForms/WXProductForm.cs | 4 +- .../ProductForms/WXSelectDBProdListForm.cs | 12 +- .../WXUserCollectAuthProdListForm.Designer.cs | 17 +- .../WXUserCollectAuthProdListForm.cs | 78 +-- .../WXForms/ShopForms/WXShopBrowserObject.cs | 90 +++- TEMUKJD/WXForms/ShopForms/WXShopLoginForm.cs | 22 +- 33 files changed, 2464 insertions(+), 626 deletions(-) create mode 100644 AllBase/Model/Param/WXParam/WXUploadProductInfoRecommendParam.cs create mode 100644 AllBase/Model/Result/WXResult/WXLiveObjectInfo.cs diff --git a/AllBase/AllBase.csproj b/AllBase/AllBase.csproj index f032902..81f399f 100644 --- a/AllBase/AllBase.csproj +++ b/AllBase/AllBase.csproj @@ -210,6 +210,7 @@ + @@ -298,6 +299,7 @@ + diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs index c69dbf2..4df9bd4 100644 --- a/AllBase/BaseClass.cs +++ b/AllBase/BaseClass.cs @@ -27,7 +27,7 @@ namespace AllBase /// /// 版本ID /// - public static int VersionCount = 1167; + public static int VersionCount = 1176; public static string MainPath = "29wx"; //public static string MainPath = "29wx"; //public static string MainPath = "29pdd"; diff --git a/AllBase/Model/Param/WXParam/WXUploadProductInfoRecommendParam.cs b/AllBase/Model/Param/WXParam/WXUploadProductInfoRecommendParam.cs new file mode 100644 index 0000000..274d724 --- /dev/null +++ b/AllBase/Model/Param/WXParam/WXUploadProductInfoRecommendParam.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AllBase.Model.Param.WXParam +{ + public class WXUploadProductInfoRecommendParam + { + // 查询返回值 + public int? code { get; set; } // 0 + + + public string productId { get; set; } // 10000959492675 + public RecommendProductInfoParam productInfo { get; set; } + public List predictTypeList { get; set; } = new List { 5, 4, }; // 此处是草稿箱查询。如果是新建商品,设置productId为 null,此处填写 5, 4, 2 + public int? requestSource { get; set; } = 2; + + // 查询返回值 + public List modelVersions { get; set; } + // 查询返回值 + public List modelStatuses { get; set; } + } + + public class modelStatusResult + { + public int? predictType { get; set; } // 4, + public int? statusCode { get; set; } // 0, + public string statusMsg { get; set; } // "成功推荐 6 个属性" + } + + public class modelVersionResult + { + public int? predictType { get; set; } // 4, + public string modelVersion { get; set; } // "v251208" + + } + + public class RecommendProductInfoParam + { + public string title { get; set; } // "诺特兰德乳清蛋白粉增肌粉男健身分离水解蛋白质粉正品红桶" + public List headImg { get; set; } // ["https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/6a25418f000c37e41fe662b881ad1b15000000a100004f50", ...], + public List category { get; set; } + public string brandId { get; set; } // "2100000000" + public productDetailParam detail { get; set; } + + // 查询返回值 + public List param { get; set; } + } + + public class RecommendProductInfoParamResult + { + public List categorys { get; set; } = new List(); + } + + public class RecoummendCategoryResult + { + public string name { get; set; } // "单件净含量", + public int? catType { get; set; } // 7, + public RecoummendCatInfoResult catInfo { get; set; } + } + + public class RecoummendCatInfoResult + { + public int? isRequired { get; set; } // 1, + public int? isCustomize { get; set; } // 0, + public int? inputType { get; set; } // 7 + } +} diff --git a/AllBase/Model/Param/WXParam/WXUploadProductParam.cs b/AllBase/Model/Param/WXParam/WXUploadProductParam.cs index c9dd9e3..1479f78 100644 --- a/AllBase/Model/Param/WXParam/WXUploadProductParam.cs +++ b/AllBase/Model/Param/WXParam/WXUploadProductParam.cs @@ -626,9 +626,9 @@ namespace AllBase.Model.Param.WXParam public class productDetailParam { public List detailImg { get; set; } = new List(); // ["https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SH/reserved/695c863e00022b1f09b35b0e7ad91715000000a000004f50", ...] - public List detailVideos { get; set; } = new List(); - public List detailVideoInfo { get; set; } = new List(); - public List carouselImg { get; set; } = new List(); + public List detailVideos { get; set; } + public List detailVideoInfo { get; set; } + public List carouselImg { get; set; } public string desc { get; set; } = ""; // "" } diff --git a/AllBase/Model/Result/WXResult/WXLiveObjectInfo.cs b/AllBase/Model/Result/WXResult/WXLiveObjectInfo.cs new file mode 100644 index 0000000..9039b6c --- /dev/null +++ b/AllBase/Model/Result/WXResult/WXLiveObjectInfo.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AllBase.Model.Result.WXResult +{ + public class WXLiveObjectInfoResult + { + public int? code { get; set; } // 0 + public List list { get; set; } + public int? total { get; set; } // 1 + } + + /// + /// 微信达人直播、直播商品列表 + /// + public class WXLiveObjectInfo + { + public string objectId { get; set; } // "14939409434531268669", + public string liveObjectDescription { get; set; } // "管住嘴 迈开腿 一起行动起来", + public string liveObjectImg { get; set; } // "https://finder.video.qq.com/251/20304/stodownload?encfilekey=oibeqyX228riaCwo9STVsGLPj9UYCicgttvgVx2mOMf49TT5LCDEeGjynzYJnH66es1fffib6Yjl1ruCd06xNicn55Hssa1eppdmiaP9xibqxic9myLTribm47luXic276zNEahX5ZplUvYyZ23Mg&token=oA9SZ4icv8Iv0UF2yI3e1WhwN6DBt3eEf8PkANA251Mx5U7S4QaKMEMBs7r8IEhmNz3icR0awjjc7vjJ65p3L76fph4tMsqqCfx0zEdBZdtWXs0AiaNkNwE1icKR4o1XJ5XyY6q4HtEEAmuFAp3DZk3snlkp2jnDpzCWUJiayB9Ys9S5ibKdp4icrzgCVjIqniaRjQsia73fUkPhZp2qvmtbGGxTX7A&bizid=1023&dotrans=0&hy=SH&idx=1&m=b9e832ff33b2dbbfaaddff7fd93d7668&wxampicformat=503&picformat=200", + public string liveObjectStartTime { get; set; } // "1780916387", + public string liveObjectDuringTimeSecond { get; set; } // "11249", + public string livediagnosisFinderuinxfeedidPayGmv { get; set; } // "4585400", + public string livediagnosisFinderuinxfeedidWatchUv { get; set; } // "37654", + public string livediagnosisFinderuinxfeedidRecExposeToWatchUvRatio { get; set; } // "0.126046", + public string livediagnosisFinderuinxfeedidAvgWatchDuration { get; set; } // "783", + public string livediagnosisFinderuinxfeedidPayGpm { get; set; } // "90577.591656", + public string livediagnosisFinderuinxfeedidWatchToPayPvRatio { get; set; } // "0.005867", + public string livediagnosisFinderuinxfeedidNewBuyerWatchToPayPvRatio { get; set; } // "0.001133", + public string livePayGmvRange { get; set; } // "1万-10万", + public WXLiveProductListInfo productList { get; set; } + } + + public class WXLiveProductListInfo + { + public List list { get; set; } + public int? total { get; set; } // 14 + } + + public class WXLiveProduct + { + public string spuId { get; set; } // "10000272708183", + public string spuName { get; set; } // "ELLE Active三双装经典短筒袜舒适户外跑步袜休闲袜女款运动袜", + public string spuPrice { get; set; } // "3900", + public string spuImgUrl { get; set; } // "https://wst.wxapp.tc.qq.com/161/20304/snscosdownload/SZ/reserved/65e05a4e00020ef626049763fbfe0115000000a000004f50?imageView2/1/w/800/h/800/q/50", + public string spuAppid { get; set; } // "wx4d9ad283f2dc60c5", + public string spuShopNickname { get; set; } // "ELLE ACTIVE艾拉喜越服饰店", + public string spuShopHeadimgUrl { get; set; } // "http://mmbiz.qpic.cn/mmbiz_png/ERSKnckgiahnoJ5ibwtWH0nV3NczVQibNcCE4jMWUY5C78iab7jIv6icPBhUsHqia1pdmevdeaKtqwZAk1BuxJgW6PuwDibFm24mfvOOPRtmKj1DzY/0?wx_fmt=png/0", + public string spuSrcId { get; set; } // "14000764238075", + public string spuMonthSales { get; set; } // "147", + public string spuStatus { get; set; } // "1", + public string spuQrCode { get; set; } // "https://liteapp.weixin.qq.com/q/ABMNbs?shopId=10000272708183&p_page_type=qr", + public string spuBindTalentUin { get; set; } // "1" + } +} diff --git a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs index 402e3ad..f8d7a03 100644 --- a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs +++ b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs @@ -1996,6 +1996,14 @@ namespace KJD_Web.BLL.BXX string sku_edit_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sku_edit_json"))?.Replace("'", "\\'"); string wx_safe_status = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "wx_safe_status"))?.Replace("'", "\\'"); string special_prod_type = RegexUtils.GetStringQuery(ref inputData, "special_prod_type")?.Replace("'", "\\'"); + string wx_cat_1 = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "wx_cat_1"))?.Replace("'", "\\'"); + string wx_cat_2 = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "wx_cat_2"))?.Replace("'", "\\'"); + string wx_cat_3 = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "wx_cat_3"))?.Replace("'", "\\'"); + string wx_cat_leaf = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "wx_cat_leaf"))?.Replace("'", "\\'"); + string main_cat_id = RegexUtils.GetStringQuery(ref inputData, "main_cat_id")?.Replace("'", "\\'"); + string main_cat_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "main_cat_name"))?.Replace("'", "\\'"); + string cat_id = RegexUtils.GetStringQuery(ref inputData, "cat_id")?.Replace("'", "\\'"); + string cat_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "cat_name"))?.Replace("'", "\\'"); if (!string.IsNullOrEmpty(special_prod_type) && special_prod_type != "爆款数据") special_prod_type = "普通商品"; @@ -2029,6 +2037,22 @@ namespace KJD_Web.BLL.BXX sql += " p.wx_safe_status='" + wx_safe_status + "',"; if (special_prod_type != null && special_prod_type != "") sql += " p.special_prod_type='" + special_prod_type + "',"; + if (!wx_cat_1.IsNullOrEmpty()) + sql += " p.wx_cat_1=" + wx_cat_1 + ","; + if (!wx_cat_2.IsNullOrEmpty()) + sql += " p.wx_cat_2=" + wx_cat_2 + ","; + if (!wx_cat_3.IsNullOrEmpty()) + sql += " p.wx_cat_3=" + wx_cat_3 + ","; + if (!wx_cat_leaf.IsNullOrEmpty()) + sql += " p.wx_cat_leaf=" + wx_cat_leaf + ","; + if (main_cat_id != null) + sql += " p.main_cat_id='" + main_cat_id + "',"; + if (cat_id != null) + sql += " p.cat_id='" + cat_id + "',"; + if (main_cat_name != null) + sql += " p.main_cat_name='" + main_cat_name + "',"; + if (cat_name != null) + sql += " p.cat_name='" + cat_name + "',"; sql = sql.TrimEnd(','); if (in_db_ids != null) { diff --git a/KJDService/KJD_WebService/KJD_WebService.csproj.user b/KJDService/KJD_WebService/KJD_WebService.csproj.user index 1b87364..4bcdc04 100644 --- a/KJDService/KJD_WebService/KJD_WebService.csproj.user +++ b/KJDService/KJD_WebService/KJD_WebService.csproj.user @@ -8,7 +8,7 @@ - Debug|Any CPU + Release|Any CPU ShowAllFiles diff --git a/TEMUKJD/BLL/PDDProdFormConverter.cs b/TEMUKJD/BLL/PDDProdFormConverter.cs index c4c2e51..84c77ba 100644 --- a/TEMUKJD/BLL/PDDProdFormConverter.cs +++ b/TEMUKJD/BLL/PDDProdFormConverter.cs @@ -23,7 +23,7 @@ namespace TemuKJD.BLL /// /// /// - public string PddFrontToPddBackConvert(string outProdJson, bool UpdateOldData = true, string specialProdType = null, bool IsAuthorityUser = false) + public string PddFrontToPddBackConvert(string outProdJson, bool UpdateOldData = true, string specialProdType = null, bool IsCollectAuthorityUser = false) { PDDFrontProductInfo frontProdInfo = null; try @@ -328,7 +328,7 @@ namespace TemuKJD.BLL // 商品采集权限用户采集的数据加上用户前缀(商品前缀显示给用户的时候隐藏) string collectAuthorityTag = ""; - if (IsAuthorityUser) + if (IsCollectAuthorityUser) collectAuthorityTag = "-" + BaseClass.UserName; bool isExist = false; @@ -381,7 +381,7 @@ namespace TemuKJD.BLL "&product_get_type=" + HttpUtility.UrlEncode("多多外部数据", Encoding.UTF8); if (!string.IsNullOrEmpty(specialProdType)) data += "&special_prod_type=" + HttpUtility.UrlEncode(specialProdType, Encoding.UTF8); - if (IsAuthorityUser) + if (IsCollectAuthorityUser) { data += "&add_user_name=" + BaseClass.UserName; data += "&group=用户" + BaseClass.UserName; @@ -404,7 +404,7 @@ namespace TemuKJD.BLL /// /// /// - public string PddFrontToPddBackConvert2(string outProdJson, bool UpdateOldData = true, string specialProdType = null, bool IsAuthorityUser = false) + public string PddFrontToPddBackConvert2(string outProdJson, bool UpdateOldData = true, string specialProdType = null, bool IsCollectAuthorityUser = false) { PDDFrontProductInfo2 frontProdInfo = null; try @@ -719,7 +719,7 @@ namespace TemuKJD.BLL // 商品采集权限用户采集的数据加上用户前缀(商品前缀显示给用户的时候隐藏) string collectAuthorityTag = ""; - if (IsAuthorityUser) + if (IsCollectAuthorityUser) collectAuthorityTag = "-" + BaseClass.UserName; bool isExist = false; @@ -772,7 +772,7 @@ namespace TemuKJD.BLL "&product_get_type=" + HttpUtility.UrlEncode("多多外部数据", Encoding.UTF8); if (!string.IsNullOrEmpty(specialProdType)) data += "&special_prod_type=" + HttpUtility.UrlEncode(specialProdType, Encoding.UTF8); - if (IsAuthorityUser) + if (IsCollectAuthorityUser) { data += "&add_user_name=" + BaseClass.UserName; data += "&group=用户" + BaseClass.UserName; diff --git a/TEMUKJD/BLL/WXHttpResponseBLL.cs b/TEMUKJD/BLL/WXHttpResponseBLL.cs index 9502526..15cdffe 100644 --- a/TEMUKJD/BLL/WXHttpResponseBLL.cs +++ b/TEMUKJD/BLL/WXHttpResponseBLL.cs @@ -176,6 +176,88 @@ namespace TemuKJD.BLL return result; } + public static string WeiXinTalentOpenKfPostResponse(ShopLoginInfo shop, string _url, string _data, string referer) + { + string biz_magic = ""; + string cookies = ""; + try + { + var cookieLst = JsonHelper.DeserializeJsonToList(shop?.Cookies.ParseToString()); + if (cookieLst == null) + cookieLst = new List(); + foreach (var cook in cookieLst) + { + cookies += cook.Name + "=" + cook.Value + ";"; + } + var bizMagicCookie = cookieLst.FirstOrDefault(c => c.Name == "biz_magic"); + if (bizMagicCookie != null) + biz_magic = bizMagicCookie.Value; + } + catch { } + + HttpWebResponse response = null; + string result; + try + { + string url = _url; + HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); + + request.KeepAlive = true; + request.Headers.Add("wecom_magic", @""); + request.Headers.Add("user_scene", @"1002"); + request.Headers.Add("kf_scene", @"6"); + request.Headers.Add("sec-ch-ua-platform", @"""Windows"""); + request.Headers.Add("supplier_magic", @""); + request.Headers.Add("sec-ch-ua", @"""Not)A;Brand"";v=""8"", ""Chromium"";v=""138"""); + request.Headers.Add("sec-ch-ua-mobile", @"?0"); + request.Headers.Add("potter-scene", @"weixinShop"); + request.Headers.Add("biz_magic", biz_magic); + request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"; + request.Accept = "application/json, text/plain, */*"; + request.Headers.Add("talent_magic", @""); + request.ContentType = "application/json"; + request.Headers.Add("logistics_magic", @""); + request.Headers.Add("mcn_magic", @""); + request.Headers.Add("Origin", @"https://store.weixin.qq.com"); + request.Headers.Add("Sec-Fetch-Site", @"same-origin"); + request.Headers.Add("Sec-Fetch-Mode", @"cors"); + request.Headers.Add("Sec-Fetch-Dest", @"empty"); + request.Referer = referer; + request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate, br, zstd"); + request.Headers.Set(HttpRequestHeader.AcceptLanguage, "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6"); + request.Headers.Set(HttpRequestHeader.Cookie, cookies); + + request.Method = "POST"; + request.ServicePoint.Expect100Continue = false; + + string body = _data; + byte[] postBytes = System.Text.Encoding.UTF8.GetBytes(body); + request.ContentLength = postBytes.Length; + Stream stream = request.GetRequestStream(); + stream.Write(postBytes, 0, postBytes.Length); + stream.Close(); + + response = (HttpWebResponse)request.GetResponse(); + } + catch (WebException ex) + { + if (ex.Status == WebExceptionStatus.ProtocolError) + { + response = (HttpWebResponse)ex.Response; + result = GetProxyHtml.ReadResponse(response); + return result; + } + else return ex.Message; + } + catch (Exception e) + { + if (response != null) response.Close(); + return e.Message; + } + result = GetProxyHtml.ReadResponse(response); + return result; + } + public static string WeiXinImgPostResponse(ShopLoginInfo shop, string _url, string _data, string dis_k, long dis_t, string ext, string referer = "https://store.weixin.qq.com/") { string biz_magic = ""; diff --git a/TEMUKJD/BLL/Wx/WxPlatformRecommendProdManage.cs b/TEMUKJD/BLL/Wx/WxPlatformRecommendProdManage.cs index 63f16a1..cee2daf 100644 --- a/TEMUKJD/BLL/Wx/WxPlatformRecommendProdManage.cs +++ b/TEMUKJD/BLL/Wx/WxPlatformRecommendProdManage.cs @@ -259,7 +259,7 @@ namespace TemuKJD.BLL.Wx // string wx_safe_status = !dbProdNormalLst.Any(p => p.wx_safe_status == "违规商品") ? "安全商品" : "违规商品"; // int? view_uv = recommendProd.product_view_uv.IsNullOrEmpty() ? (int?)null : recommendProd.product_view_uv.ParseToInt(); // var rst2 = new WXShopBrowserObject() - // .SaveWxProd(shop, prodId, wxProdInfoLite, "爆款数据", coid, real_coid, view_uv, wx_safe_status); + // .SaveWxProd(shop, prodId, wxProdInfoLite, false, "爆款数据", coid, real_coid, view_uv, wx_safe_status); // if (!rst2.Contains("微信商品采集入库成功")) // { @@ -481,6 +481,7 @@ namespace TemuKJD.BLL.Wx #region 查询原始数据 dbProdLst.Clear(); + // 先查询聚水潭商品 if (spuCode.Length == 19) { url = BaseClass.BuildPDDObjString("product/get_product_list"); @@ -577,13 +578,14 @@ namespace TemuKJD.BLL.Wx var normalJstProd = dbProdNormalLst .FirstOrDefault(p => p.product_get_type_text == "厂商直采" && p.secret_spu_id == wxProdInfoLite.product.info.spuCode); + // 查询店铺商品,违规商品依然以违规商品入库,防止重复违规。 string prodId = recommendProd.product_id; string coid = normalJstProd?.skc_id; string real_coid = string.IsNullOrEmpty(normalJstProd?.real_coid) ? coid : normalJstProd?.real_coid; string wx_safe_status = !dbProdNormalLst.Any(p => p.wx_safe_status == "违规商品") ? "安全商品" : "违规商品"; int? view_uv = recommendProd.product_view_uv.IsNullOrEmpty() ? (int?)null : recommendProd.product_view_uv.ParseToInt(); var rst2 = new WXShopBrowserObject() - .SaveWxProd(shop, prodId, wxProdInfoLite, "爆款数据", coid, real_coid, view_uv, wx_safe_status); + .SaveWxProd(shop, prodId, wxProdInfoLite, false, "爆款数据", coid, real_coid, view_uv, wx_safe_status); if (!rst2.Contains("微信商品采集入库成功")) { diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditDetailForm.Designer.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditDetailForm.Designer.cs index c748f79..c21cbc0 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditDetailForm.Designer.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditDetailForm.Designer.cs @@ -54,19 +54,17 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel(); this.cmbSpec1 = new TemuKJD.UserComponent.UcComboBoxMutiSelect(); this.cmbSpec2 = new TemuKJD.UserComponent.UcComboBoxMutiSelect(); + this.panel7 = new System.Windows.Forms.Panel(); + this.txtMultiPrice = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.panel1 = new System.Windows.Forms.Panel(); + this.txtPrice = new System.Windows.Forms.TextBox(); + this.label5 = new System.Windows.Forms.Label(); this.panel3 = new System.Windows.Forms.Panel(); this.btnBatchSetValue = new DevComponents.DotNetBar.PanelEx(); this.txtSkuSn = new System.Windows.Forms.TextBox(); this.label6 = new System.Windows.Forms.Label(); - this.txtPrice = new System.Windows.Forms.TextBox(); - this.label5 = new System.Windows.Forms.Label(); - this.txtMultiPrice = new System.Windows.Forms.TextBox(); - this.label4 = new System.Windows.Forms.Label(); this.dgvDbProduct = new TemuKJD.UserComponent.DataGridViewEx(); - this.panel5 = new System.Windows.Forms.Panel(); - this.btnRestoreAll = new DevComponents.DotNetBar.PanelEx(); - this.btnCancel = new DevComponents.DotNetBar.PanelEx(); - this.btnSaveSkuLst = new DevComponents.DotNetBar.PanelEx(); this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colSkuId = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colSpec1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -78,6 +76,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.colSkuImg = new System.Windows.Forms.DataGridViewImageColumn(); this.colEditSkuImg = new System.Windows.Forms.DataGridViewLinkColumn(); this.colSkuSn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.panel5 = new System.Windows.Forms.Panel(); + this.btnRestoreAll = new DevComponents.DotNetBar.PanelEx(); + this.btnCancel = new DevComponents.DotNetBar.PanelEx(); + this.btnSaveSkuLst = new DevComponents.DotNetBar.PanelEx(); this.panel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); @@ -92,6 +94,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.panel4.SuspendLayout(); this.panel6.SuspendLayout(); this.flowLayoutPanel4.SuspendLayout(); + this.panel7.SuspendLayout(); + this.panel1.SuspendLayout(); this.panel3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dgvDbProduct)).BeginInit(); this.SuspendLayout(); @@ -145,7 +149,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.splitContainer1.Panel2.Controls.Add(this.btnCancel); this.splitContainer1.Panel2.Controls.Add(this.btnSaveSkuLst); this.splitContainer1.Size = new System.Drawing.Size(1278, 604); - this.splitContainer1.SplitterDistance = 568; + this.splitContainer1.SplitterDistance = 570; this.splitContainer1.TabIndex = 0; // // flowLayoutPanel3 @@ -163,7 +167,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.flowLayoutPanel3.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; this.flowLayoutPanel3.Location = new System.Drawing.Point(0, 0); this.flowLayoutPanel3.Name = "flowLayoutPanel3"; - this.flowLayoutPanel3.Size = new System.Drawing.Size(1278, 568); + this.flowLayoutPanel3.Size = new System.Drawing.Size(1278, 570); this.flowLayoutPanel3.TabIndex = 1; this.flowLayoutPanel3.WrapContents = false; // @@ -339,6 +343,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms // this.flowLayoutPanel4.Controls.Add(this.cmbSpec1); this.flowLayoutPanel4.Controls.Add(this.cmbSpec2); + this.flowLayoutPanel4.Controls.Add(this.panel7); + this.flowLayoutPanel4.Controls.Add(this.panel1); this.flowLayoutPanel4.Controls.Add(this.panel3); this.flowLayoutPanel4.Dock = System.Windows.Forms.DockStyle.Fill; this.flowLayoutPanel4.Location = new System.Drawing.Point(0, 0); @@ -375,21 +381,77 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.cmbSpec2.TabIndex = 2; this.cmbSpec2.Text = "全部"; // + // panel7 + // + this.panel7.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.panel7.AutoSize = true; + this.panel7.Controls.Add(this.txtMultiPrice); + this.panel7.Controls.Add(this.label4); + this.panel7.Location = new System.Drawing.Point(256, 1); + this.panel7.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0); + this.panel7.Name = "panel7"; + this.panel7.Size = new System.Drawing.Size(114, 28); + this.panel7.TabIndex = 12; + // + // txtMultiPrice + // + this.txtMultiPrice.Location = new System.Drawing.Point(49, 2); + this.txtMultiPrice.Name = "txtMultiPrice"; + this.txtMultiPrice.Size = new System.Drawing.Size(62, 23); + this.txtMultiPrice.TabIndex = 3; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(3, 5); + this.label4.Margin = new System.Windows.Forms.Padding(5, 5, 3, 3); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(56, 17); + this.label4.TabIndex = 4; + this.label4.Text = "拼单价:"; + // + // panel1 + // + this.panel1.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.panel1.AutoSize = true; + this.panel1.Controls.Add(this.txtPrice); + this.panel1.Controls.Add(this.label5); + this.panel1.Location = new System.Drawing.Point(373, 1); + this.panel1.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(114, 28); + this.panel1.TabIndex = 11; + this.panel1.Visible = false; + // + // txtPrice + // + this.txtPrice.Location = new System.Drawing.Point(49, 2); + this.txtPrice.Name = "txtPrice"; + this.txtPrice.Size = new System.Drawing.Size(62, 23); + this.txtPrice.TabIndex = 5; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(3, 5); + this.label5.Margin = new System.Windows.Forms.Padding(5, 5, 3, 3); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(56, 17); + this.label5.TabIndex = 6; + this.label5.Text = "单买价:"; + // // panel3 // this.panel3.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.panel3.AutoSize = true; this.panel3.Controls.Add(this.btnBatchSetValue); this.panel3.Controls.Add(this.txtSkuSn); this.panel3.Controls.Add(this.label6); - this.panel3.Controls.Add(this.txtPrice); - this.panel3.Controls.Add(this.label5); - this.panel3.Controls.Add(this.txtMultiPrice); - this.panel3.Controls.Add(this.label4); - this.panel3.Location = new System.Drawing.Point(256, 2); + this.panel3.Location = new System.Drawing.Point(490, 1); this.panel3.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0); this.panel3.MinimumSize = new System.Drawing.Size(10, 10); this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(540, 27); + this.panel3.Size = new System.Drawing.Size(299, 28); this.panel3.TabIndex = 10; // // btnBatchSetValue @@ -397,7 +459,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.btnBatchSetValue.CanvasColor = System.Drawing.SystemColors.Control; this.btnBatchSetValue.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnBatchSetValue.DisabledBackColor = System.Drawing.Color.Empty; - this.btnBatchSetValue.Location = new System.Drawing.Point(459, 2); + this.btnBatchSetValue.Location = new System.Drawing.Point(226, 2); this.btnBatchSetValue.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); this.btnBatchSetValue.Name = "btnBatchSetValue"; this.btnBatchSetValue.Size = new System.Drawing.Size(71, 23); @@ -419,7 +481,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // // txtSkuSn // - this.txtSkuSn.Location = new System.Drawing.Point(294, 2); + this.txtSkuSn.Location = new System.Drawing.Point(61, 2); this.txtSkuSn.Name = "txtSkuSn"; this.txtSkuSn.Size = new System.Drawing.Size(158, 23); this.txtSkuSn.TabIndex = 7; @@ -427,47 +489,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms // label6 // this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(236, 5); + this.label6.Location = new System.Drawing.Point(3, 5); this.label6.Margin = new System.Windows.Forms.Padding(5, 5, 3, 3); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(68, 17); this.label6.TabIndex = 8; this.label6.Text = "规格编码:"; // - // txtPrice - // - this.txtPrice.Location = new System.Drawing.Point(165, 2); - this.txtPrice.Name = "txtPrice"; - this.txtPrice.Size = new System.Drawing.Size(62, 23); - this.txtPrice.TabIndex = 5; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(119, 5); - this.label5.Margin = new System.Windows.Forms.Padding(5, 5, 3, 3); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(56, 17); - this.label5.TabIndex = 6; - this.label5.Text = "单买价:"; - // - // txtMultiPrice - // - this.txtMultiPrice.Location = new System.Drawing.Point(49, 2); - this.txtMultiPrice.Name = "txtMultiPrice"; - this.txtMultiPrice.Size = new System.Drawing.Size(62, 23); - this.txtMultiPrice.TabIndex = 3; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(3, 5); - this.label4.Margin = new System.Windows.Forms.Padding(5, 5, 3, 3); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(56, 17); - this.label4.TabIndex = 4; - this.label4.Text = "拼单价:"; - // // dgvDbProduct // this.dgvDbProduct.AllowUserToAddRows = false; @@ -510,88 +538,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.dgvDbProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvDbProduct_CellContentClick); this.dgvDbProduct.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvDbProduct_CellValueChanged); // - // panel5 - // - this.panel5.Location = new System.Drawing.Point(3, 842); - this.panel5.MinimumSize = new System.Drawing.Size(1250, 10); - this.panel5.Name = "panel5"; - this.panel5.Size = new System.Drawing.Size(1250, 10); - this.panel5.TabIndex = 15; - // - // btnRestoreAll - // - this.btnRestoreAll.CanvasColor = System.Drawing.SystemColors.Control; - this.btnRestoreAll.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnRestoreAll.DisabledBackColor = System.Drawing.Color.Empty; - this.btnRestoreAll.Location = new System.Drawing.Point(5, 2); - this.btnRestoreAll.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); - this.btnRestoreAll.Name = "btnRestoreAll"; - this.btnRestoreAll.Size = new System.Drawing.Size(100, 23); - this.btnRestoreAll.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnRestoreAll.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.btnRestoreAll.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.btnRestoreAll.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.btnRestoreAll.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnRestoreAll.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.btnRestoreAll.Style.GradientAngle = 90; - this.btnRestoreAll.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; - this.btnRestoreAll.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnRestoreAll.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnRestoreAll.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnRestoreAll.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; - this.btnRestoreAll.TabIndex = 1017; - this.btnRestoreAll.Text = "还原原始商品"; - this.btnRestoreAll.Click += new System.EventHandler(this.btnRestoreAll_Click); - // - // btnCancel - // - this.btnCancel.CanvasColor = System.Drawing.SystemColors.Control; - this.btnCancel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnCancel.DisabledBackColor = System.Drawing.Color.Empty; - this.btnCancel.Location = new System.Drawing.Point(1166, 2); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(51, 23); - this.btnCancel.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnCancel.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.btnCancel.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.btnCancel.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.btnCancel.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnCancel.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.btnCancel.Style.GradientAngle = 90; - this.btnCancel.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; - this.btnCancel.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnCancel.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnCancel.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnCancel.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; - this.btnCancel.TabIndex = 1007; - this.btnCancel.Text = "取消"; - this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); - // - // btnSaveSkuLst - // - this.btnSaveSkuLst.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnSaveSkuLst.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnSaveSkuLst.DisabledBackColor = System.Drawing.Color.Empty; - this.btnSaveSkuLst.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSaveSkuLst.Location = new System.Drawing.Point(1219, 2); - this.btnSaveSkuLst.Name = "btnSaveSkuLst"; - this.btnSaveSkuLst.Size = new System.Drawing.Size(51, 23); - this.btnSaveSkuLst.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnSaveSkuLst.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnSaveSkuLst.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnSaveSkuLst.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.btnSaveSkuLst.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.btnSaveSkuLst.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.btnSaveSkuLst.Style.ForeColor.Color = System.Drawing.Color.White; - this.btnSaveSkuLst.Style.GradientAngle = 90; - this.btnSaveSkuLst.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnSaveSkuLst.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnSaveSkuLst.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnSaveSkuLst.TabIndex = 1006; - this.btnSaveSkuLst.Tag = ""; - this.btnSaveSkuLst.Text = "保存"; - this.btnSaveSkuLst.Click += new System.EventHandler(this.btnSaveSkuLst_Click); - // // colSelect // this.colSelect.FillWeight = 26F; @@ -623,7 +569,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; this.colMultiPrice.DefaultCellStyle = dataGridViewCellStyle3; - this.colMultiPrice.HeaderText = "拼单价"; + this.colMultiPrice.HeaderText = "单价"; this.colMultiPrice.Name = "colMultiPrice"; this.colMultiPrice.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // @@ -632,6 +578,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.colPrice.HeaderText = "单买价"; this.colPrice.Name = "colPrice"; this.colPrice.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.colPrice.Visible = false; // // colStock // @@ -670,6 +617,88 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.colSkuSn.Name = "colSkuSn"; this.colSkuSn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; // + // panel5 + // + this.panel5.Location = new System.Drawing.Point(3, 842); + this.panel5.MinimumSize = new System.Drawing.Size(1250, 10); + this.panel5.Name = "panel5"; + this.panel5.Size = new System.Drawing.Size(1250, 10); + this.panel5.TabIndex = 15; + // + // btnRestoreAll + // + this.btnRestoreAll.CanvasColor = System.Drawing.SystemColors.Control; + this.btnRestoreAll.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnRestoreAll.DisabledBackColor = System.Drawing.Color.Empty; + this.btnRestoreAll.Location = new System.Drawing.Point(5, 2); + this.btnRestoreAll.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); + this.btnRestoreAll.Name = "btnRestoreAll"; + this.btnRestoreAll.Size = new System.Drawing.Size(100, 23); + this.btnRestoreAll.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnRestoreAll.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnRestoreAll.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnRestoreAll.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnRestoreAll.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnRestoreAll.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnRestoreAll.Style.GradientAngle = 90; + this.btnRestoreAll.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnRestoreAll.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnRestoreAll.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnRestoreAll.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnRestoreAll.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnRestoreAll.TabIndex = 1017; + this.btnRestoreAll.Text = "还原原始商品"; + this.btnRestoreAll.Click += new System.EventHandler(this.btnRestoreAll_Click); + // + // btnCancel + // + this.btnCancel.CanvasColor = System.Drawing.SystemColors.Control; + this.btnCancel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnCancel.DisabledBackColor = System.Drawing.Color.Empty; + this.btnCancel.Location = new System.Drawing.Point(1169, 2); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(51, 23); + this.btnCancel.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnCancel.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnCancel.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnCancel.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnCancel.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnCancel.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnCancel.Style.GradientAngle = 90; + this.btnCancel.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnCancel.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnCancel.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnCancel.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnCancel.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnCancel.TabIndex = 1007; + this.btnCancel.Text = "取消"; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // btnSaveSkuLst + // + this.btnSaveSkuLst.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnSaveSkuLst.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSaveSkuLst.DisabledBackColor = System.Drawing.Color.Empty; + this.btnSaveSkuLst.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSaveSkuLst.Location = new System.Drawing.Point(1222, 2); + this.btnSaveSkuLst.Name = "btnSaveSkuLst"; + this.btnSaveSkuLst.Size = new System.Drawing.Size(51, 23); + this.btnSaveSkuLst.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnSaveSkuLst.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSaveSkuLst.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSaveSkuLst.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnSaveSkuLst.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnSaveSkuLst.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnSaveSkuLst.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnSaveSkuLst.Style.GradientAngle = 90; + this.btnSaveSkuLst.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnSaveSkuLst.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSaveSkuLst.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSaveSkuLst.TabIndex = 1006; + this.btnSaveSkuLst.Tag = ""; + this.btnSaveSkuLst.Text = "保存"; + this.btnSaveSkuLst.Click += new System.EventHandler(this.btnSaveSkuLst_Click); + // // PDDDBProdEditDetailForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -703,6 +732,11 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.panel4.PerformLayout(); this.panel6.ResumeLayout(false); this.flowLayoutPanel4.ResumeLayout(false); + this.flowLayoutPanel4.PerformLayout(); + this.panel7.ResumeLayout(false); + this.panel7.PerformLayout(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); this.panel3.ResumeLayout(false); this.panel3.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.dgvDbProduct)).EndInit(); @@ -757,5 +791,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms private System.Windows.Forms.DataGridViewImageColumn colSkuImg; private System.Windows.Forms.DataGridViewLinkColumn colEditSkuImg; private System.Windows.Forms.DataGridViewTextBoxColumn colSkuSn; + private System.Windows.Forms.Panel panel7; + private System.Windows.Forms.Panel panel1; } } \ No newline at end of file diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditDetailForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditDetailForm.cs index d9c06d6..3b73a8b 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditDetailForm.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdEditDetailForm.cs @@ -102,6 +102,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms if (lstSkuEditItem.All(s => s.spec.Count < 2)) { + cmbSpec2.Visible = true; this.pnlSpec2.Visible = flowLayoutPanel2.Visible = cmbSpec2.Visible = false; this.dgvDbProduct.Columns["colSpec2"].Visible = false; } @@ -728,10 +729,15 @@ namespace TemuKJD.PDDForms.ProductSelectForms BaseMsgForm.ShowError("价格不能为 0"); return; } - if (this.lstSkuEditItem.Any(s => s.price < s.multi_price + 100)) + //if (this.lstSkuEditItem.Any(s => s.price < s.multi_price + 100)) + //{ + // BaseMsgForm.ShowError("单买价低于拼单价加 1 元"); + // return; + //} + var items = this.lstSkuEditItem.Where(s => s.price < s.multi_price + 100).ToList(); + foreach (var item in items) { - BaseMsgForm.ShowError("单买价低于拼单价加 1 元"); - return; + item.price = item.multi_price + 100; } if (this.lstSkuEditItem.Any(s => s.thumb_url.IsNullOrEmpty() && s.thumb_md5.IsNullOrEmpty())) { diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDGetChanceProdForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDGetChanceProdForm.cs index a5c6251..0b6432a 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDGetChanceProdForm.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDGetChanceProdForm.cs @@ -34,7 +34,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms /// /// 是否是普通商品采集授权用户 /// - public bool IsAuthorityUser { get; set; } = false; + public bool IsCollectAuthorityUser { get; set; } = false; CheckBox chkSelectAll; ChanceProductConfig chanceProductConfig; @@ -56,9 +56,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms private void PDDGetChanceProd_Load(object sender, EventArgs e) { pnlAddEditShop.Dock = DockStyle.Fill; - //if (IsAuthorityUser) + //if (IsCollectAuthorityUser) // btnShowMyCollect.Visible = true; - if (IsAuthorityUser) + if (IsCollectAuthorityUser) { btnRefreshShop.Visible = true; btnAddShop.Visible = true; @@ -201,7 +201,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms else { List list = new List(); - if (this.IsAuthorityUser && BaseClass.MainPath == "29wx") + if (this.IsCollectAuthorityUser && BaseClass.MainPath == "29wx") { list = GlobalConfig._29WxPddShopLoginList.Where(s => s.LoginStatus == "登录成功").ToList(); } @@ -229,7 +229,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms private void btnSearchShop_Click(object sender, EventArgs e) { - if (IsAuthorityUser && BaseClass.MainPath == "29wx") + if (IsCollectAuthorityUser && BaseClass.MainPath == "29wx") { Search29WxPddShop(); } @@ -436,7 +436,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms string loginName = dgvShop.Rows[e.RowIndex].Cells["colShopLoginName"].Value.ParseToString(); string accountId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToString(); ShopLoginInfo shop = null; - if (IsAuthorityUser && BaseClass.MainPath == "29wx") + if (IsCollectAuthorityUser && BaseClass.MainPath == "29wx") shop = GlobalConfig._29WxPddShopLoginList.FirstOrDefault(s => s.LoginName == loginName && s.ShopId == accountId); else shop = lstAdminPddShopInfo.FirstOrDefault(s => s.LoginName == loginName && s.ShopId == accountId); @@ -448,7 +448,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms { if (shop == null) return; - if (IsAuthorityUser && BaseClass.MainPath == "29wx") + if (IsCollectAuthorityUser && BaseClass.MainPath == "29wx") { _29WxPddShopManage.Check29WxPddShopLogin(new ShopLoginInfo[] { shop }, this.statusBar); if (shop.LoginStatus == "登录成功") @@ -581,7 +581,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms var rst = GetChanceGoodsList(shop, searchTxt, searchLabels, "hot_index", page, cat1, cat2, price1, price2); if (!rst.Contains("success\":true")) { - if (IsAuthorityUser && BaseClass.MainPath == "29wx") + if (IsCollectAuthorityUser && BaseClass.MainPath == "29wx") _29WxPddShopManage.Check29WxPddShopLogin(new ShopLoginInfo[] { shop }, this.statusBar); else PDDAdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false); @@ -665,7 +665,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms void GetAntiContent(ShopLoginInfo shop) { - if (IsAuthorityUser && BaseClass.MainPath == "29wx") + if (IsCollectAuthorityUser && BaseClass.MainPath == "29wx") { WXForms.ShopForms.WXPDDShopLoginForm loginForm = null; Invoke(new Action(() => @@ -919,7 +919,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms try { var shopList = new List(); - if (IsAuthorityUser && BaseClass.MainPath == "29wx") + if (IsCollectAuthorityUser && BaseClass.MainPath == "29wx") shopList = GlobalConfig._29WxPddShopLoginList.Where(s => shopIds.Contains(s.ShopId) && s.LoginStatus == "登录成功").ToList(); else shopList = lstAdminPddShopInfo.Where(s => shopIds.Contains(s.ShopId) && s.LoginStatus == "登录成功").ToList(); @@ -932,7 +932,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms return null; } var shop = shopList[Randomx.GetId(shopList.Count)]; - if (IsAuthorityUser && BaseClass.MainPath == "29wx") + if (IsCollectAuthorityUser && BaseClass.MainPath == "29wx") _29WxPddShopManage.Check29WxPddShopLogin(new ShopLoginInfo[] { shop }, this.statusBar); else PDDAdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false); @@ -1031,7 +1031,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // 商品采集权限用户采集的数据加上用户前缀(商品前缀显示给用户的时候隐藏) string userAuthorityTag = ""; - if (IsAuthorityUser) + if (IsCollectAuthorityUser) userAuthorityTag = "-" + BaseClass.UserName; bool isExist = false; @@ -1097,7 +1097,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms "&size_json=" + HttpUtility.UrlEncode(dbProd.size_json, Encoding.UTF8) + "&main_img=" + HttpUtility.UrlEncode(dbProd.main_img, Encoding.UTF8) + "&product_get_type=" + HttpUtility.UrlEncode("机会商品", Encoding.UTF8); - if (IsAuthorityUser) + if (IsCollectAuthorityUser) { data += "&add_user_name=" + BaseClass.UserName; data += "&group=用户" + BaseClass.UserName; diff --git a/TEMUKJD/PDDForms/ProductSelectForms/WXUserCollectAuthProdEditNotesForm.Designer.cs b/TEMUKJD/PDDForms/ProductSelectForms/WXUserCollectAuthProdEditNotesForm.Designer.cs index e604e6d..8a5e77b 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/WXUserCollectAuthProdEditNotesForm.Designer.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/WXUserCollectAuthProdEditNotesForm.Designer.cs @@ -1,4 +1,6 @@ -namespace TemuKJD.PDDForms.ProductSelectForms +using System.Windows.Forms; + +namespace TemuKJD.PDDForms.ProductSelectForms { partial class WXUserCollectAuthProdEditNotesForm { @@ -30,6 +32,20 @@ { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WXUserCollectAuthProdEditNotesForm)); this.panel2 = new System.Windows.Forms.Panel(); + this.lblBound = new System.Windows.Forms.Label(); + this.btnCloseLst = new DevComponents.DotNetBar.PanelEx(); + this.lstSelectCateList = new System.Windows.Forms.ListBox(); + this.btnDelCate = new DevComponents.DotNetBar.PanelEx(); + this.label5 = new System.Windows.Forms.Label(); + this.txtCateSearch = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.cmbCateFilter4Leaf = new System.Windows.Forms.ComboBox(); + this.label4 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.cmbCateFilter1 = new System.Windows.Forms.ComboBox(); + this.label14 = new System.Windows.Forms.Label(); + this.cmbCateFilter2 = new System.Windows.Forms.ComboBox(); + this.label17 = new System.Windows.Forms.Label(); + this.cmbCateFilter3 = new System.Windows.Forms.ComboBox(); this.label7 = new System.Windows.Forms.Label(); this.txtFissionWords = new DevComponents.DotNetBar.Controls.TextBoxX(); this.btnOK1 = new DevComponents.DotNetBar.PanelEx(); @@ -41,14 +57,6 @@ this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.label8 = new System.Windows.Forms.Label(); this.txtNotes = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.label2 = new System.Windows.Forms.Label(); - this.cmbCat1 = new TemuKJD.UserComponent.UcComboBoxMutiSelect(); - this.label14 = new System.Windows.Forms.Label(); - this.cmbCat2 = new TemuKJD.UserComponent.UcComboBoxMutiSelect(); - this.label17 = new System.Windows.Forms.Label(); - this.cmbCat3 = new TemuKJD.UserComponent.UcComboBoxMutiSelect(); - this.label4 = new System.Windows.Forms.Label(); - this.cmbCatLeaf = new TemuKJD.UserComponent.UcComboBoxMutiSelect(); this.panel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); @@ -56,14 +64,20 @@ // panel2 // this.panel2.BackColor = System.Drawing.Color.White; - this.panel2.Controls.Add(this.cmbCatLeaf); + this.panel2.Controls.Add(this.lblBound); + this.panel2.Controls.Add(this.btnCloseLst); + this.panel2.Controls.Add(this.lstSelectCateList); + this.panel2.Controls.Add(this.btnDelCate); + this.panel2.Controls.Add(this.label5); + this.panel2.Controls.Add(this.txtCateSearch); + this.panel2.Controls.Add(this.cmbCateFilter4Leaf); this.panel2.Controls.Add(this.label4); this.panel2.Controls.Add(this.label2); - this.panel2.Controls.Add(this.cmbCat1); + this.panel2.Controls.Add(this.cmbCateFilter1); this.panel2.Controls.Add(this.label14); - this.panel2.Controls.Add(this.cmbCat2); + this.panel2.Controls.Add(this.cmbCateFilter2); this.panel2.Controls.Add(this.label17); - this.panel2.Controls.Add(this.cmbCat3); + this.panel2.Controls.Add(this.cmbCateFilter3); this.panel2.Controls.Add(this.label7); this.panel2.Controls.Add(this.txtFissionWords); this.panel2.Controls.Add(this.btnOK1); @@ -78,13 +92,203 @@ this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; this.panel2.Location = new System.Drawing.Point(1, 33); this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(464, 572); + this.panel2.Size = new System.Drawing.Size(567, 594); this.panel2.TabIndex = 1; // + // lblBound + // + this.lblBound.AutoSize = true; + this.lblBound.Location = new System.Drawing.Point(456, 327); + this.lblBound.Name = "lblBound"; + this.lblBound.Size = new System.Drawing.Size(56, 17); + this.lblBound.TabIndex = 884; + this.lblBound.Text = "保证金:"; + // + // btnCloseLst + // + this.btnCloseLst.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnCloseLst.CanvasColor = System.Drawing.SystemColors.Control; + this.btnCloseLst.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnCloseLst.DisabledBackColor = System.Drawing.Color.Empty; + this.btnCloseLst.Location = new System.Drawing.Point(510, 280); + this.btnCloseLst.Name = "btnCloseLst"; + this.btnCloseLst.Size = new System.Drawing.Size(16, 17); + this.btnCloseLst.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnCloseLst.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnCloseLst.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnCloseLst.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnCloseLst.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnCloseLst.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnCloseLst.Style.GradientAngle = 90; + this.btnCloseLst.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnCloseLst.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnCloseLst.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnCloseLst.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnCloseLst.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnCloseLst.TabIndex = 871; + this.btnCloseLst.Text = "X"; + this.btnCloseLst.Visible = false; + this.btnCloseLst.Click += new System.EventHandler(this.btnCloseLst_Click); + // + // lstSelectCateList + // + this.lstSelectCateList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lstSelectCateList.FormattingEnabled = true; + this.lstSelectCateList.ItemHeight = 17; + this.lstSelectCateList.Location = new System.Drawing.Point(90, 276); + this.lstSelectCateList.Name = "lstSelectCateList"; + this.lstSelectCateList.Size = new System.Drawing.Size(440, 21); + this.lstSelectCateList.TabIndex = 858; + this.lstSelectCateList.Visible = false; + this.lstSelectCateList.SelectedIndexChanged += new System.EventHandler(this.lstSelectCateList_SelectedIndexChanged); + // + // btnDelCate + // + this.btnDelCate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnDelCate.CanvasColor = System.Drawing.SystemColors.Control; + this.btnDelCate.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnDelCate.DisabledBackColor = System.Drawing.Color.Empty; + this.btnDelCate.Location = new System.Drawing.Point(474, 253); + this.btnDelCate.Name = "btnDelCate"; + this.btnDelCate.Size = new System.Drawing.Size(56, 23); + this.btnDelCate.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnDelCate.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnDelCate.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnDelCate.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnDelCate.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnDelCate.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnDelCate.Style.GradientAngle = 90; + this.btnDelCate.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnDelCate.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnDelCate.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnDelCate.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnDelCate.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnDelCate.TabIndex = 848; + this.btnDelCate.Text = "删除类目"; + this.btnDelCate.Click += new System.EventHandler(this.btnDelCate_Click); + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(34, 256); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(56, 17); + this.label5.TabIndex = 834; + this.label5.Text = "类目搜索"; + // + // txtCateSearch + // + this.txtCateSearch.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + // + // + // + this.txtCateSearch.Border.Class = "TextBoxBorder"; + this.txtCateSearch.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.txtCateSearch.Location = new System.Drawing.Point(90, 253); + this.txtCateSearch.Name = "txtCateSearch"; + this.txtCateSearch.PreventEnterBeep = true; + this.txtCateSearch.Size = new System.Drawing.Size(378, 23); + this.txtCateSearch.TabIndex = 833; + this.txtCateSearch.TextChanged += new System.EventHandler(this.txtCateSearch_TextChanged); + // + // cmbCateFilter4Leaf + // + this.cmbCateFilter4Leaf.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.cmbCateFilter4Leaf.FormattingEnabled = true; + this.cmbCateFilter4Leaf.IntegralHeight = false; + this.cmbCateFilter4Leaf.Location = new System.Drawing.Point(310, 323); + this.cmbCateFilter4Leaf.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); + this.cmbCateFilter4Leaf.Name = "cmbCateFilter4Leaf"; + this.cmbCateFilter4Leaf.Size = new System.Drawing.Size(145, 25); + this.cmbCateFilter4Leaf.TabIndex = 822; + this.cmbCateFilter4Leaf.SelectedIndexChanged += new System.EventHandler(this.cmbCateFilter4Leaf_SelectedIndexChanged); + this.cmbCateFilter4Leaf.TextChanged += new System.EventHandler(this.cmbCateFilter4Leaf_TextChanged); + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(254, 327); + this.label4.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(56, 17); + this.label4.TabIndex = 821; + this.label4.Text = "叶子类目"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(47, 291); + this.label2.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(43, 17); + this.label2.TabIndex = 812; + this.label2.Text = " 类目1"; + // + // cmbCateFilter1 + // + this.cmbCateFilter1.FormattingEnabled = true; + this.cmbCateFilter1.IntegralHeight = false; + this.cmbCateFilter1.Location = new System.Drawing.Point(90, 287); + this.cmbCateFilter1.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); + this.cmbCateFilter1.Name = "cmbCateFilter1"; + this.cmbCateFilter1.Size = new System.Drawing.Size(161, 25); + this.cmbCateFilter1.TabIndex = 815; + this.cmbCateFilter1.SelectedIndexChanged += new System.EventHandler(this.cmbCateFilter1_SelectedIndexChanged); + this.cmbCateFilter1.TextChanged += new System.EventHandler(this.cmbCateFilter1_TextChanged); + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(267, 291); + this.label14.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(43, 17); + this.label14.TabIndex = 813; + this.label14.Text = " 类目2"; + // + // cmbCateFilter2 + // + this.cmbCateFilter2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.cmbCateFilter2.FormattingEnabled = true; + this.cmbCateFilter2.IntegralHeight = false; + this.cmbCateFilter2.Location = new System.Drawing.Point(310, 287); + this.cmbCateFilter2.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); + this.cmbCateFilter2.Name = "cmbCateFilter2"; + this.cmbCateFilter2.Size = new System.Drawing.Size(220, 25); + this.cmbCateFilter2.TabIndex = 814; + this.cmbCateFilter2.SelectedIndexChanged += new System.EventHandler(this.cmbCateFilter2_SelectedIndexChanged); + this.cmbCateFilter2.TextChanged += new System.EventHandler(this.cmbCateFilter2_TextChanged); + // + // label17 + // + this.label17.AutoSize = true; + this.label17.Location = new System.Drawing.Point(47, 327); + this.label17.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(43, 17); + this.label17.TabIndex = 816; + this.label17.Text = " 类目3"; + // + // cmbCateFilter3 + // + this.cmbCateFilter3.FormattingEnabled = true; + this.cmbCateFilter3.IntegralHeight = false; + this.cmbCateFilter3.Location = new System.Drawing.Point(90, 323); + this.cmbCateFilter3.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); + this.cmbCateFilter3.Name = "cmbCateFilter3"; + this.cmbCateFilter3.Size = new System.Drawing.Size(161, 25); + this.cmbCateFilter3.TabIndex = 817; + this.cmbCateFilter3.SelectedIndexChanged += new System.EventHandler(this.cmbCateFilter3_SelectedIndexChanged); + this.cmbCateFilter3.TextChanged += new System.EventHandler(this.cmbCateFilter3_TextChanged); + // // label7 // this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(34, 387); + this.label7.Location = new System.Drawing.Point(34, 417); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(56, 17); this.label7.TabIndex = 659; @@ -108,11 +312,11 @@ this.txtFissionWords.Border.PaddingLeft = 2; this.txtFissionWords.Border.PaddingRight = 2; this.txtFissionWords.Border.PaddingTop = 2; - this.txtFissionWords.Location = new System.Drawing.Point(90, 387); + this.txtFissionWords.Location = new System.Drawing.Point(90, 417); this.txtFissionWords.Multiline = true; this.txtFissionWords.Name = "txtFissionWords"; this.txtFissionWords.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.txtFissionWords.Size = new System.Drawing.Size(337, 123); + this.txtFissionWords.Size = new System.Drawing.Size(440, 123); this.txtFissionWords.TabIndex = 658; this.txtFissionWords.WatermarkText = "一行一个"; // @@ -123,7 +327,7 @@ this.btnOK1.Cursor = System.Windows.Forms.Cursors.Hand; this.btnOK1.DisabledBackColor = System.Drawing.Color.Empty; this.btnOK1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnOK1.Location = new System.Drawing.Point(381, 528); + this.btnOK1.Location = new System.Drawing.Point(484, 550); this.btnOK1.Name = "btnOK1"; this.btnOK1.Size = new System.Drawing.Size(46, 26); this.btnOK1.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -143,12 +347,12 @@ // // btnEditDetail // - this.btnEditDetail.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnEditDetail.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.btnEditDetail.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnEditDetail.Cursor = System.Windows.Forms.Cursors.Hand; this.btnEditDetail.DisabledBackColor = System.Drawing.Color.Empty; this.btnEditDetail.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnEditDetail.Location = new System.Drawing.Point(34, 528); + this.btnEditDetail.Location = new System.Drawing.Point(34, 550); this.btnEditDetail.Name = "btnEditDetail"; this.btnEditDetail.Size = new System.Drawing.Size(85, 26); this.btnEditDetail.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -170,25 +374,29 @@ // this.txtProductName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtProductName.Location = new System.Drawing.Point(90, 200); + this.txtProductName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtProductName.Location = new System.Drawing.Point(90, 196); this.txtProductName.Multiline = true; this.txtProductName.Name = "txtProductName"; this.txtProductName.ReadOnly = true; - this.txtProductName.Size = new System.Drawing.Size(337, 46); + this.txtProductName.Size = new System.Drawing.Size(440, 46); this.txtProductName.TabIndex = 397; // // txtSpuId // - this.txtSpuId.Location = new System.Drawing.Point(90, 166); + this.txtSpuId.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtSpuId.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtSpuId.Location = new System.Drawing.Point(90, 162); this.txtSpuId.Name = "txtSpuId"; this.txtSpuId.ReadOnly = true; - this.txtSpuId.Size = new System.Drawing.Size(337, 23); + this.txtSpuId.Size = new System.Drawing.Size(440, 23); this.txtSpuId.TabIndex = 395; // // label3 // this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(34, 204); + this.label3.Location = new System.Drawing.Point(34, 196); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(56, 17); this.label3.TabIndex = 392; @@ -197,7 +405,7 @@ // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(34, 169); + this.label1.Location = new System.Drawing.Point(34, 165); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(56, 17); this.label1.TabIndex = 390; @@ -206,7 +414,7 @@ // pictureBox1 // this.pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.Top; - this.pictureBox1.Location = new System.Drawing.Point(165, 18); + this.pictureBox1.Location = new System.Drawing.Point(216, 15); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(136, 136); this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; @@ -217,7 +425,7 @@ // label8 // this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(34, 329); + this.label8.Location = new System.Drawing.Point(34, 359); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(56, 17); this.label8.TabIndex = 386; @@ -240,120 +448,16 @@ this.txtNotes.Border.PaddingLeft = 2; this.txtNotes.Border.PaddingRight = 2; this.txtNotes.Border.PaddingTop = 2; - this.txtNotes.Location = new System.Drawing.Point(90, 329); + this.txtNotes.Location = new System.Drawing.Point(90, 359); this.txtNotes.Multiline = true; this.txtNotes.Name = "txtNotes"; - this.txtNotes.Size = new System.Drawing.Size(337, 47); + this.txtNotes.Size = new System.Drawing.Size(440, 47); this.txtNotes.TabIndex = 385; // - // label2 - // - this.label2.Anchor = System.Windows.Forms.AnchorStyles.Right; - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(47, 262); - this.label2.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(43, 17); - this.label2.TabIndex = 812; - this.label2.Text = " 类目1"; - // - // 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.IntegralHeight = false; - this.cmbCat1.Location = new System.Drawing.Point(90, 258); - this.cmbCat1.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); - this.cmbCat1.Name = "cmbCat1"; - this.cmbCat1.Size = new System.Drawing.Size(133, 25); - this.cmbCat1.TabIndex = 815; - this.cmbCat1.Text = "全部"; - // - // label14 - // - this.label14.Anchor = System.Windows.Forms.AnchorStyles.Right; - this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(251, 262); - this.label14.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(43, 17); - this.label14.TabIndex = 813; - this.label14.Text = " 类目2"; - // - // 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.IntegralHeight = false; - this.cmbCat2.Location = new System.Drawing.Point(294, 257); - this.cmbCat2.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); - this.cmbCat2.Name = "cmbCat2"; - this.cmbCat2.Size = new System.Drawing.Size(133, 25); - this.cmbCat2.TabIndex = 814; - this.cmbCat2.Text = "全部"; - // - // label17 - // - this.label17.Anchor = System.Windows.Forms.AnchorStyles.Right; - this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(47, 296); - this.label17.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); - this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(43, 17); - this.label17.TabIndex = 816; - this.label17.Text = " 类目3"; - // - // 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.IntegralHeight = false; - this.cmbCat3.Location = new System.Drawing.Point(90, 293); - this.cmbCat3.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); - this.cmbCat3.Name = "cmbCat3"; - this.cmbCat3.Size = new System.Drawing.Size(133, 25); - this.cmbCat3.TabIndex = 817; - this.cmbCat3.Text = "全部"; - // - // label4 - // - this.label4.Anchor = System.Windows.Forms.AnchorStyles.Right; - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(238, 296); - this.label4.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(56, 17); - this.label4.TabIndex = 821; - this.label4.Text = "叶子类目"; - // - // cmbCatLeaf - // - this.cmbCatLeaf.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.cmbCatLeaf.DefaultText = "全部"; - this.cmbCatLeaf.DropDownHeight = 1; - this.cmbCatLeaf.DropDownWidth = 1; - this.cmbCatLeaf.FormattingEnabled = true; - this.cmbCatLeaf.IntegralHeight = false; - this.cmbCatLeaf.Location = new System.Drawing.Point(294, 293); - this.cmbCatLeaf.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); - this.cmbCatLeaf.Name = "cmbCatLeaf"; - this.cmbCatLeaf.Size = new System.Drawing.Size(133, 25); - this.cmbCatLeaf.TabIndex = 822; - this.cmbCatLeaf.Text = "全部"; - // // WXUserCollectAuthProdEditNotesForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; - this.ClientSize = new System.Drawing.Size(466, 606); + this.ClientSize = new System.Drawing.Size(569, 628); this.Controls.Add(this.panel2); 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"))); @@ -383,13 +487,19 @@ private DevComponents.DotNetBar.PanelEx btnEditDetail; private System.Windows.Forms.Label label7; private DevComponents.DotNetBar.Controls.TextBoxX txtFissionWords; - private UserComponent.UcComboBoxMutiSelect cmbCatLeaf; + private ComboBox cmbCateFilter4Leaf; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label2; - private UserComponent.UcComboBoxMutiSelect cmbCat1; + private ComboBox cmbCateFilter1; private System.Windows.Forms.Label label14; - private UserComponent.UcComboBoxMutiSelect cmbCat2; + private ComboBox cmbCateFilter2; private System.Windows.Forms.Label label17; - private UserComponent.UcComboBoxMutiSelect cmbCat3; + private ComboBox cmbCateFilter3; + private System.Windows.Forms.Label label5; + private DevComponents.DotNetBar.Controls.TextBoxX txtCateSearch; + private DevComponents.DotNetBar.PanelEx btnDelCate; + private ListBox lstSelectCateList; + private DevComponents.DotNetBar.PanelEx btnCloseLst; + private Label lblBound; } } \ No newline at end of file diff --git a/TEMUKJD/PDDForms/ProductSelectForms/WXUserCollectAuthProdEditNotesForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/WXUserCollectAuthProdEditNotesForm.cs index 1d72f99..ee84a82 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/WXUserCollectAuthProdEditNotesForm.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/WXUserCollectAuthProdEditNotesForm.cs @@ -17,6 +17,8 @@ using Newtonsoft.Json.Linq; using System.IO; using Work.BLL.Tools; using TemuKJD.BLL; +using NaiBa.Util.Extension; +using AllBase.Model.Result.WXResult; namespace TemuKJD.PDDForms.ProductSelectForms { @@ -25,6 +27,11 @@ namespace TemuKJD.PDDForms.ProductSelectForms KJDDBProduct dbProd = null; KJDDBProduct dbProdDetail = null; + List selectCate1 = new List(); + List selectCate2 = new List(); + List selectCate3 = new List(); + List selectCate4 = new List(); + public WXUserCollectAuthProdEditNotesForm(KJDDBProduct prod) { InitializeComponent(); @@ -34,6 +41,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms private void ProductSelectListForm_Load(object sender, EventArgs e) { + lstSelectCateList.Height = 180; if (dbProd != null) { txtProductName.Text = dbProd.product_name; @@ -50,6 +58,66 @@ namespace TemuKJD.PDDForms.ProductSelectForms // dbProd = prodTmp; //} } + + fillWxCate(); + string catName = (dbProd.cat_name ?? dbProd.cat_id) + "(未识别)"; + if (dbProd.wx_cat_1 != null) + { + var catN = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_1.ParseToString())?.name; + cmbCateFilter1.Text = catN.ParseToString(); + if (!string.IsNullOrEmpty(catN)) + { + catName = catN; + } + } + if (dbProd.wx_cat_2 != null) + { + var catN = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_2.ParseToString())?.name; + cmbCateFilter2.Text = catN.ParseToString(); + if (!string.IsNullOrEmpty(catN)) + { + catName = catName + " >> " + catN; + } + } + if (dbProd.wx_cat_3 != null) + { + var catN = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_3.ParseToString())?.name; + cmbCateFilter3.Text = catN.ParseToString(); + if (!string.IsNullOrEmpty(catN)) + { + catName = catName + " >> " + catN; + } + } + if (dbProd.wx_cat_leaf != null) + { + var catN = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == dbProd.wx_cat_leaf.ParseToString())?.name; + cmbCateFilter4Leaf.Text = catN.ParseToString(); + if (!string.IsNullOrEmpty(catN)) + { + catName = catName + " >> " + catN; + } + } + txtCateSearch.WatermarkText = catName.Replace(">>", ">"); + if (!dbProd.wx_cat_1.IsNullOrZero() && !dbProd.wx_cat_2.IsNullOrZero() && !dbProd.wx_cat_3.IsNullOrZero() && !dbProd.wx_cat_leaf.IsNullOrZero()) + { + //this.cmbCateFilter1.Text = + } + } + } + + void fillWxCate() + { + cmbCateFilter1.Items.Clear(); + cmbCateFilter2.Items.Clear(); + cmbCateFilter3.Items.Clear(); + cmbCateFilter4Leaf.Items.Clear(); + cmbCateFilter1.Text = ""; + cmbCateFilter2.Text = ""; + cmbCateFilter3.Text = ""; + cmbCateFilter4Leaf.Text = ""; + foreach (var cate in GlobalConfig.WxCatList.Where(c => c.level == 1).ToList()) + { + cmbCateFilter1.Items.Add(cate.name); } } @@ -60,6 +128,23 @@ namespace TemuKJD.PDDForms.ProductSelectForms var data = UserLogin.GetSignaturex() + "&db_id=" + dbProd.id + "¬es=" + this.txtNotes.Text.Trim(); data += "&product_name=" + this.txtProductName.Text.Trim(); + + data += "&wx_cat_1=" + (selectCate1.FirstOrDefault()?.cat_id == null ? "null" : selectCate1.FirstOrDefault()?.cat_id.ParseToString()); + data += "&wx_cat_2=" + (selectCate2.FirstOrDefault()?.cat_id == null ? "null" : selectCate2.FirstOrDefault()?.cat_id.ParseToString()); + data += "&wx_cat_3=" + (selectCate3.FirstOrDefault()?.cat_id == null ? "null" : selectCate3.FirstOrDefault()?.cat_id.ParseToString()); + data += "&wx_cat_leaf=" + (selectCate4.FirstOrDefault()?.cat_id == null ? "null" : selectCate4.FirstOrDefault()?.cat_id.ParseToString()); + + if (selectCate1.FirstOrDefault()?.cat_id != null) + { + data += "&main_cat_id=" + selectCate1.FirstOrDefault()?.cat_id + + "&main_cat_name=" + HttpUtility.UrlEncode(selectCate1.FirstOrDefault()?.name, Encoding.UTF8); + } + if (selectCate4.FirstOrDefault()?.cat_id != null) + { + data += "&cat_id=" + selectCate4.FirstOrDefault()?.cat_id + + "&cat_name=" + HttpUtility.UrlEncode(selectCate4.FirstOrDefault()?.name, Encoding.UTF8); + } + if (string.IsNullOrEmpty(this.txtFissionWords.Text.Trim())) data += "&fission_words="; else @@ -77,6 +162,21 @@ namespace TemuKJD.PDDForms.ProductSelectForms { dbProd.notes = this.txtNotes.Text.Trim(); dbProd.product_name = this.txtProductName.Text.Trim(); + dbProd.wx_cat_1 = selectCate1.FirstOrDefault()?.cat_id == null ? null : selectCate1.FirstOrDefault()?.cat_id.ParseToLong(); + dbProd.wx_cat_2 = selectCate2.FirstOrDefault()?.cat_id == null ? null : selectCate2.FirstOrDefault()?.cat_id.ParseToLong(); + dbProd.wx_cat_3 = selectCate3.FirstOrDefault()?.cat_id == null ? null : selectCate3.FirstOrDefault()?.cat_id.ParseToLong(); + dbProd.wx_cat_leaf = selectCate4.FirstOrDefault()?.cat_id == null ? null : selectCate4.FirstOrDefault()?.cat_id.ParseToLong(); + if (selectCate1.FirstOrDefault()?.cat_id != null) + { + dbProd.main_cat_id = selectCate1.FirstOrDefault()?.cat_id; + dbProd.main_cat_name = selectCate1.FirstOrDefault()?.name; + } + if (selectCate4.FirstOrDefault()?.cat_id != null) + { + dbProd.cat_id = selectCate4.FirstOrDefault()?.cat_id; + dbProd.cat_name = selectCate4.FirstOrDefault()?.name; + } + if (string.IsNullOrEmpty(this.txtFissionWords.Text.Trim())) dbProd.fission_words = ""; else @@ -136,7 +236,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms private void btnEditDetail_Click(object sender, EventArgs e) { - bool canEdit = false; + bool canEdit = true; var kjdDbProd = JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(dbProdDetail)); //{"goodsId":"2032007952082477057","warehouseGoodsId":"171C2881E8C6491CA65728683483EDE9","spuCode":"987651321321","skus":[{"skuId":"2032007952837451777","warehouseSkuId":"6B710CE261B240C38B5245006F3622A3","skuCode":"20190311002"},{"skuId":"2032007953839890434","warehouseSkuId":"2FA14AAB600541CAA72DDE7697D8D27A","skuCode":"201607090622"}]} if (kjdDbProd.product_get_type_text == "厂商直采") @@ -267,5 +367,178 @@ namespace TemuKJD.PDDForms.ProductSelectForms imgFrom.ShowDialog(); } } + + private void cmbCateFilter1_TextChanged(object sender, EventArgs e) + { + //if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店") + //if (btnSwitchCatType.Text != "W") + // return; + + cmbCateFilter2.Text = ""; + cmbCateFilter2.Items.Clear(); + cmbCateFilter3.Text = ""; + cmbCateFilter3.Items.Clear(); + selectCate1 = GlobalConfig.WxCatList + .Where(c => c.level == 1 && (";" + cmbCateFilter1.Text.Trim() + ";").Contains(";" + c.name + ";")).ToList(); + var cates2 = GlobalConfig.WxCatList.Where(c => selectCate1.Any(c1 => c.f_cat_id == c1.cat_id)).ToList(); + cmbCateFilter2.Items.AddRange(cates2.Select(c => c.name).ToArray()); + } + + private void cmbCateFilter2_TextChanged(object sender, EventArgs e) + { + //if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店") + //if (btnSwitchCatType.Text != "W") + // return; + + cmbCateFilter3.Text = ""; + cmbCateFilter3.Items.Clear(); + selectCate1 = GlobalConfig.WxCatList + .Where(c => c.level == 1 && (";" + cmbCateFilter1.Text.Trim() + ";").Contains(";" + c.name + ";")).ToList(); + var cates2 = GlobalConfig.WxCatList.Where(c => selectCate1.Any(c1 => c.f_cat_id == c1.cat_id)).ToList(); + selectCate2 = cates2 + .Where(c => c.level == 2 && (";" + cmbCateFilter2.Text.Trim() + ";").Contains(";" + c.name + ";")).ToList(); + var cates3 = GlobalConfig.WxCatList.Where(c => selectCate2.Any(c2 => c.f_cat_id == c2.cat_id)).ToList(); + cmbCateFilter3.Items.AddRange(cates3.Select(c => c.name).ToArray()); + } + + private void cmbCateFilter3_TextChanged(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()); + + cmbCateFilter4Leaf.Text = ""; + cmbCateFilter4Leaf.Items.Clear(); + + selectCate1 = GlobalConfig.WxCatList + .Where(c => c.level == 1 && (";" + cmbCateFilter1.Text.Trim() + ";").Contains(";" + c.name + ";")).ToList(); + var cates2 = GlobalConfig.WxCatList.Where(c => selectCate1.Any(c1 => c.f_cat_id == c1.cat_id)).ToList(); + selectCate2 = cates2 + .Where(c => c.level == 2 && (";" + cmbCateFilter2.Text.Trim() + ";").Contains(";" + c.name + ";")).ToList(); + var cates3 = GlobalConfig.WxCatList.Where(c => selectCate2.Any(c2 => c.f_cat_id == c2.cat_id)).ToList(); + selectCate3 = cates3 + .Where(c => c.level == 3 && (";" + cmbCateFilter3.Text.Trim() + ";").Contains(";" + c.name + ";")).ToList(); + var cates4 = GlobalConfig.WxCatList.Where(c => selectCate3.Any(c3 => c.f_cat_id == c3.cat_id) || selectCate3.Any(c3 => c.cat_id == c3.cat_id && c.leaf)).ToList(); + if (cates4.Count == 1) + cmbCateFilter4Leaf.Text = cates4.FirstOrDefault().name; + cmbCateFilter4Leaf.Items.AddRange(cates4.Select(c => c.name).ToArray()); + } + + private void cmbCateFilter4Leaf_TextChanged(object sender, EventArgs e) + { + selectCate1 = GlobalConfig.WxCatList + .Where(c => c.level == 1 && (";" + cmbCateFilter1.Text.Trim() + ";").Contains(";" + c.name + ";")).ToList(); + var cates2 = GlobalConfig.WxCatList.Where(c => selectCate1.Any(c1 => c.f_cat_id == c1.cat_id)).ToList(); + selectCate2 = cates2 + .Where(c => c.level == 2 && (";" + cmbCateFilter2.Text.Trim() + ";").Contains(";" + c.name + ";")).ToList(); + var cates3 = GlobalConfig.WxCatList.Where(c => selectCate2.Any(c2 => c.f_cat_id == c2.cat_id)).ToList(); + selectCate3 = cates3 + .Where(c => c.level == 3 && (";" + cmbCateFilter3.Text.Trim() + ";").Contains(";" + c.name + ";")).ToList(); + var cates4 = GlobalConfig.WxCatList.Where(c => selectCate3.Any(c3 => c.f_cat_id == c3.cat_id) || selectCate3.Any(c3 => c.cat_id == c3.cat_id && c.leaf)).ToList(); + selectCate4 = cates4 + .Where(c => c.leaf && (";" + cmbCateFilter4Leaf.Text.Trim() + ";").Contains(";" + c.name + ";")).ToList(); + var selCat = selectCate4.FirstOrDefault(); + lblBound.Text ="保证金:" + GlobalConfig.WxCatBoundList.FirstOrDefault(cb => cb.leaf_id == selCat?.cat_id.ParseToLong())?.cat_bound; + } + + private void cmbCateFilter1_SelectedIndexChanged(object sender, EventArgs e) + { + + } + + private void cmbCateFilter2_SelectedIndexChanged(object sender, EventArgs e) + { + + } + + private void cmbCateFilter3_SelectedIndexChanged(object sender, EventArgs e) + { + + } + + private void cmbCateFilter4Leaf_SelectedIndexChanged(object sender, EventArgs e) + { + + } + + private void btnDelCate_Click(object sender, EventArgs e) + { + cmbCateFilter1.Text = ""; + txtCateSearch.WatermarkText = "(未识别)"; + //cmbCateFilter2.Text = ""; + //cmbCateFilter3.Text = ""; + //cmbCateFilter4Leaf.Text = ""; + } + + + private void txtCateSearch_TextChanged(object sender, EventArgs e) + { + var searchTxt = txtCateSearch.Text.Trim(); + List wxCatList = new List(); + if (!string.IsNullOrEmpty(searchTxt)) + { + wxCatList.AddRange(GlobalConfig.WxCatList.Where(c => c.leaf && c.name.Contains(searchTxt))); + wxCatList.AddRange(GlobalConfig.WxCatList.Where(c => c.level == 3 && !c.leaf && c.name.Contains(searchTxt))); + wxCatList.AddRange(GlobalConfig.WxCatList.Where(c => c.level == 2 && !c.leaf && c.name.Contains(searchTxt))); + wxCatList.AddRange(GlobalConfig.WxCatList.Where(c => c.level == 1 && !c.leaf && c.name.Contains(searchTxt))); + } + wxCatList = wxCatList.Take(50).ToList(); + + lstSelectCateList.Items.Clear(); + foreach (var cate in wxCatList) + { + var cateTmp = cate; + string cateName = cateTmp.name; + var parent = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == cateTmp.f_cat_id); + while (parent != null) + { + cateTmp = parent; + cateName = cateTmp.name + " >> " + cateName; + parent = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == cateTmp.f_cat_id); + } + string bountStr = " 保证金:" + GlobalConfig.WxCatBoundList.FirstOrDefault(cb => cb.leaf_id == cate.cat_id.ParseToLong())?.cat_bound; + lstSelectCateList.Items.Add(cateName + bountStr); + } + + if (lstSelectCateList.Items.Count > 0) + { + lstSelectCateList.Visible = true; + btnCloseLst.Visible = true; + lstSelectCateList.BringToFront(); + btnCloseLst.BringToFront(); + } + else + { + lstSelectCateList.Visible = false; + btnCloseLst.Visible = false; + } + } + + private void lstSelectCateList_SelectedIndexChanged(object sender, EventArgs e) + { + var cateStr = lstSelectCateList.SelectedItem.ParseToString().Split(new string[] { "保证金" }, StringSplitOptions.RemoveEmptyEntries).FirstOrDefault()?.Trim(); + var cateItems = cateStr.Split(new string[] { ">", " " }, StringSplitOptions.RemoveEmptyEntries).ToList(); + if (cateItems.Count > 0) + cmbCateFilter1.Text = cateItems[0]; + if (cateItems.Count > 1) + cmbCateFilter2.Text = cateItems[1]; + if (cateItems.Count > 2) + cmbCateFilter3.Text = cateItems[2]; + if (cateItems.Count > 3) + cmbCateFilter4Leaf.Text = cateItems[3]; + + txtCateSearch.WatermarkText = lstSelectCateList.SelectedItem.ParseToString(); + + lstSelectCateList.Visible = false; + btnCloseLst.Visible = false; + } + + private void btnCloseLst_Click(object sender, EventArgs e) + { + lstSelectCateList.Visible = false; + btnCloseLst.Visible = false; + } } } diff --git a/TEMUKJD/ToolForms/DouBaoTitleFissionCefForm.cs b/TEMUKJD/ToolForms/DouBaoTitleFissionCefForm.cs index 8ddda1b..0bac48e 100644 --- a/TEMUKJD/ToolForms/DouBaoTitleFissionCefForm.cs +++ b/TEMUKJD/ToolForms/DouBaoTitleFissionCefForm.cs @@ -310,14 +310,6 @@ namespace TemuKJD.ToolForms var dbId = currentProd.id; var rows = dgvDbProduct.Rows.Cast().Where(r => r.Cells["col_spu_id"].Value.ParseToString() == prodId).ToList(); - if (chkWithTitle.Checked && !data.Contains(currentProd.product_name)) - { - foreach (var row in rows) - Invoke(new Action(() => { row.Cells["colOpResult"].Value = "标题不匹配"; })); - currentProd = null; - return; - } - var titleStr = ""; var stringList = data.Split(new string[] { "data:" }, StringSplitOptions.RemoveEmptyEntries); foreach(var str in stringList) @@ -331,7 +323,7 @@ namespace TemuKJD.ToolForms } var titleList = titleStr.Split(new string[] { "\r", "\n", "\\n" }, StringSplitOptions.RemoveEmptyEntries).ToList(); - for (int i =0; i< titleList.Count; i++) + for (int i = 0; i < titleList.Count; i++) { for (int j = 0; j < 500; j++) if (titleList[i].StartsWith("" + j + ".")) @@ -341,6 +333,14 @@ namespace TemuKJD.ToolForms if (titleList.Count() > 50) { + if (chkWithTitle.Checked && !data.Contains(currentProd.product_name)) + { + foreach (var row in rows) + Invoke(new Action(() => { row.Cells["colOpResult"].Value = "标题不匹配"; })); + currentProd = null; + return; + } + if (dbId.IsNullOrZero()) dbId = 0; var url = BaseClass.BuildPDDObjString("product/mdy_db_product"); diff --git a/TEMUKJD/ToolForms/Get1688ProductForm.cs b/TEMUKJD/ToolForms/Get1688ProductForm.cs index f675fbc..106bbca 100644 --- a/TEMUKJD/ToolForms/Get1688ProductForm.cs +++ b/TEMUKJD/ToolForms/Get1688ProductForm.cs @@ -39,7 +39,7 @@ namespace TemuKJD.ToolForms /// /// 是否是普通商品采集授权用户 /// - public bool IsAuthorityUser { get; set; } = false; + public bool IsCollectAuthorityUser { get; set; } = false; List lst1688cookie = null; public bool isGetProdLst = false; @@ -67,7 +67,7 @@ namespace TemuKJD.ToolForms private void GetJuShuitanProdForm_Load(object sender, EventArgs e) { - if(IsAuthorityUser) + if(IsCollectAuthorityUser) { this.ucTabControlMetro1.TabPages.RemoveAt(2); } @@ -628,7 +628,7 @@ namespace TemuKJD.ToolForms } } Thread.Sleep(Randomx.GetId(500, 1500)); - if (this.IsAuthorityUser) + if (this.IsCollectAuthorityUser) Thread.Sleep(1000); // 采集商品详情 @@ -864,14 +864,14 @@ namespace TemuKJD.ToolForms } Thread.Sleep(25); - if (this.IsAuthorityUser) + if (this.IsCollectAuthorityUser) Thread.Sleep(1000); if (row.Index % 20 == 0) NaiBa.Util.Helper.ConfigHelper.SaveConfig("1688_product_list_" + MainForm.ProcessCount, lst1688OneProductListInfo); // 商品采集权限用户采集的数据加上用户前缀(商品前缀显示给用户的时候隐藏) string collectAuthorityTag = ""; - if (IsAuthorityUser) + if (IsCollectAuthorityUser) collectAuthorityTag = "-" + BaseClass.UserName; bool isExist = false; @@ -932,7 +932,7 @@ namespace TemuKJD.ToolForms "&main_img=" + HttpUtility.UrlEncode(dbProd.main_img, Encoding.UTF8) + "&wx_safe_status=" + HttpUtility.UrlEncode("未校验", Encoding.UTF8) + "&product_get_type=" + HttpUtility.UrlEncode("1688厂家", Encoding.UTF8); - if (IsAuthorityUser) + if (IsCollectAuthorityUser) { data += "&add_user_name=" + BaseClass.UserName; data += "&group=用户" + BaseClass.UserName; @@ -1197,7 +1197,7 @@ namespace TemuKJD.ToolForms } } - public static string Out1688ProdImportOne(bool isAuthorityUser, string filePath, string content) + public static string Out1688ProdImportOne(bool isCollectAuthorityUser, string filePath, string content) { //DataGridViewRow row = null; //Invoke(new Action(() => @@ -1226,7 +1226,7 @@ namespace TemuKJD.ToolForms // 商品采集权限用户采集的数据加上用户前缀(商品前缀显示给用户的时候隐藏) string collectAuthorityTag = ""; - if (isAuthorityUser) + if (isCollectAuthorityUser) collectAuthorityTag = "-" + BaseClass.UserName; bool isExist = false; @@ -1309,7 +1309,7 @@ namespace TemuKJD.ToolForms "&main_img=" + HttpUtility.UrlEncode(prodInfo.detail.image_url, Encoding.UTF8) + "&wx_safe_status=" + HttpUtility.UrlEncode("未校验", Encoding.UTF8) + "&product_get_type=" + HttpUtility.UrlEncode("1688外部数据", Encoding.UTF8); - if (isAuthorityUser) + if (isCollectAuthorityUser) { data += "&add_user_name=" + BaseClass.UserName; data += "&group=用户" + BaseClass.UserName; diff --git a/TEMUKJD/UserComponent/UcComboBoxMutiSelect .cs b/TEMUKJD/UserComponent/UcComboBoxMutiSelect .cs index fd85e8e..579e5d1 100644 --- a/TEMUKJD/UserComponent/UcComboBoxMutiSelect .cs +++ b/TEMUKJD/UserComponent/UcComboBoxMutiSelect .cs @@ -154,6 +154,7 @@ namespace TemuKJD.UserComponent } Point relativeLocation = this.GetRelativePosition(this.GetParentNotTable()); lblX.Location = new Point(relativeLocation.X + this.Width - 19 - lblX.Width, relativeLocation.Y + (this.Height - lblX.Height) / 2); + lblX.Visible = this.Visible; lblX.BringToFront(); } diff --git a/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.Designer.cs b/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.Designer.cs index 7895b13..90e2bed 100644 --- a/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.Designer.cs +++ b/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.Designer.cs @@ -30,10 +30,15 @@ namespace TemuKJD.WXForms.AdminForms private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - 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(); + 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(); this.splitContainer5 = new System.Windows.Forms.SplitContainer(); + this.line2 = new DevComponents.DotNetBar.Controls.Line(); + this.btnFilter = new DevComponents.DotNetBar.PanelEx(); + this.txtAuth = new System.Windows.Forms.TextBox(); + this.label9 = new System.Windows.Forms.Label(); + this.chkProdFission = new TemuKJD.UserComponent.UcCheckBox(this.components); this.chkCommissionUpdate = new TemuKJD.UserComponent.UcCheckBox(this.components); this.chkEcWaybill = new TemuKJD.UserComponent.UcCheckBox(this.components); this.chkHot = new TemuKJD.UserComponent.UcCheckBox(this.components); @@ -73,6 +78,7 @@ namespace TemuKJD.WXForms.AdminForms this.label39 = new System.Windows.Forms.Label(); this.txtNickName = new System.Windows.Forms.TextBox(); this.label40 = new System.Windows.Forms.Label(); + this.line1 = new DevComponents.DotNetBar.Controls.Line(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.pnlTopUp = new System.Windows.Forms.Panel(); this.lblUserInfo = new System.Windows.Forms.Label(); @@ -99,7 +105,6 @@ namespace TemuKJD.WXForms.AdminForms this.editColumn = new System.Windows.Forms.DataGridViewLinkColumn(); this.deleteColumn = new System.Windows.Forms.DataGridViewLinkColumn(); this.btnExportShopErp = new DevComponents.DotNetBar.PanelEx(); - this.chkProdFission = new TemuKJD.UserComponent.UcCheckBox(this.components); ((System.ComponentModel.ISupportInitialize)(this.splitContainer5)).BeginInit(); this.splitContainer5.Panel1.SuspendLayout(); this.splitContainer5.Panel2.SuspendLayout(); @@ -125,6 +130,10 @@ namespace TemuKJD.WXForms.AdminForms // splitContainer5.Panel1 // this.splitContainer5.Panel1.BackColor = System.Drawing.Color.WhiteSmoke; + this.splitContainer5.Panel1.Controls.Add(this.line2); + this.splitContainer5.Panel1.Controls.Add(this.btnFilter); + this.splitContainer5.Panel1.Controls.Add(this.txtAuth); + this.splitContainer5.Panel1.Controls.Add(this.label9); this.splitContainer5.Panel1.Controls.Add(this.chkProdFission); this.splitContainer5.Panel1.Controls.Add(this.chkCommissionUpdate); this.splitContainer5.Panel1.Controls.Add(this.chkEcWaybill); @@ -165,19 +174,78 @@ namespace TemuKJD.WXForms.AdminForms this.splitContainer5.Panel1.Controls.Add(this.label39); this.splitContainer5.Panel1.Controls.Add(this.txtNickName); this.splitContainer5.Panel1.Controls.Add(this.label40); + this.splitContainer5.Panel1.Controls.Add(this.line1); // // splitContainer5.Panel2 // this.splitContainer5.Panel2.Controls.Add(this.splitContainer1); this.splitContainer5.Panel2.Padding = new System.Windows.Forms.Padding(0, 5, 5, 5); - this.splitContainer5.Size = new System.Drawing.Size(1376, 563); + this.splitContainer5.Size = new System.Drawing.Size(1376, 634); this.splitContainer5.SplitterDistance = 357; this.splitContainer5.SplitterWidth = 1; this.splitContainer5.TabIndex = 3; // + // line2 + // + this.line2.Location = new System.Drawing.Point(12, 98); + this.line2.Name = "line2"; + this.line2.Size = new System.Drawing.Size(339, 10); + this.line2.TabIndex = 825; + this.line2.Text = "line2"; + // + // btnFilter + // + this.btnFilter.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnFilter.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnFilter.DisabledBackColor = System.Drawing.Color.Empty; + this.btnFilter.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnFilter.Location = new System.Drawing.Point(269, 73); + this.btnFilter.Name = "btnFilter"; + this.btnFilter.Size = new System.Drawing.Size(83, 23); + this.btnFilter.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnFilter.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnFilter.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnFilter.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnFilter.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnFilter.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnFilter.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnFilter.Style.GradientAngle = 90; + this.btnFilter.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnFilter.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnFilter.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnFilter.TabIndex = 824; + this.btnFilter.Text = "过滤"; + this.btnFilter.Click += new System.EventHandler(this.btnFilter_Click); + // + // txtAuth + // + this.txtAuth.Location = new System.Drawing.Point(112, 73); + this.txtAuth.Name = "txtAuth"; + this.txtAuth.Size = new System.Drawing.Size(148, 23); + this.txtAuth.TabIndex = 820; + // + // label9 + // + 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(27, 74); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(79, 20); + this.label9.TabIndex = 819; + this.label9.Text = "权限过滤:"; + // + // chkProdFission + // + this.chkProdFission.Location = new System.Drawing.Point(112, 453); + this.chkProdFission.Name = "chkProdFission"; + this.chkProdFission.Size = new System.Drawing.Size(68, 21); + this.chkProdFission.TabIndex = 817; + this.chkProdFission.Text = "裂变调试"; + this.chkProdFission.UseVisualStyleBackColor = true; + // // chkCommissionUpdate // - this.chkCommissionUpdate.Location = new System.Drawing.Point(192, 391); + this.chkCommissionUpdate.Location = new System.Drawing.Point(192, 409); this.chkCommissionUpdate.Name = "chkCommissionUpdate"; this.chkCommissionUpdate.Size = new System.Drawing.Size(68, 21); this.chkCommissionUpdate.TabIndex = 816; @@ -186,7 +254,7 @@ namespace TemuKJD.WXForms.AdminForms // // chkEcWaybill // - this.chkEcWaybill.Location = new System.Drawing.Point(112, 391); + this.chkEcWaybill.Location = new System.Drawing.Point(112, 409); this.chkEcWaybill.Name = "chkEcWaybill"; this.chkEcWaybill.Size = new System.Drawing.Size(68, 21); this.chkEcWaybill.TabIndex = 815; @@ -195,7 +263,7 @@ namespace TemuKJD.WXForms.AdminForms // // chkHot // - this.chkHot.Location = new System.Drawing.Point(192, 370); + this.chkHot.Location = new System.Drawing.Point(192, 388); this.chkHot.Name = "chkHot"; this.chkHot.Size = new System.Drawing.Size(68, 21); this.chkHot.TabIndex = 814; @@ -204,7 +272,7 @@ namespace TemuKJD.WXForms.AdminForms // // chkShopOptimize // - this.chkShopOptimize.Location = new System.Drawing.Point(112, 370); + this.chkShopOptimize.Location = new System.Drawing.Point(112, 388); this.chkShopOptimize.Name = "chkShopOptimize"; this.chkShopOptimize.Size = new System.Drawing.Size(68, 21); this.chkShopOptimize.TabIndex = 813; @@ -213,7 +281,7 @@ namespace TemuKJD.WXForms.AdminForms // // chkChanceProdCollect // - this.chkChanceProdCollect.Location = new System.Drawing.Point(192, 412); + this.chkChanceProdCollect.Location = new System.Drawing.Point(192, 430); this.chkChanceProdCollect.Name = "chkChanceProdCollect"; this.chkChanceProdCollect.Size = new System.Drawing.Size(68, 21); this.chkChanceProdCollect.TabIndex = 812; @@ -222,7 +290,7 @@ namespace TemuKJD.WXForms.AdminForms // // chkShopPoints // - this.chkShopPoints.Location = new System.Drawing.Point(112, 413); + this.chkShopPoints.Location = new System.Drawing.Point(112, 431); this.chkShopPoints.Name = "chkShopPoints"; this.chkShopPoints.Size = new System.Drawing.Size(68, 21); this.chkShopPoints.TabIndex = 811; @@ -231,7 +299,7 @@ namespace TemuKJD.WXForms.AdminForms // // chkWXShowProdGetFromType // - this.chkWXShowProdGetFromType.Location = new System.Drawing.Point(192, 349); + this.chkWXShowProdGetFromType.Location = new System.Drawing.Point(192, 367); this.chkWXShowProdGetFromType.Name = "chkWXShowProdGetFromType"; this.chkWXShowProdGetFromType.Size = new System.Drawing.Size(68, 21); this.chkWXShowProdGetFromType.TabIndex = 810; @@ -242,7 +310,7 @@ namespace TemuKJD.WXForms.AdminForms // 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(55, 349); + this.label7.Location = new System.Drawing.Point(55, 367); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(51, 20); this.label7.TabIndex = 809; @@ -250,7 +318,7 @@ namespace TemuKJD.WXForms.AdminForms // // chkWXComplateProd // - this.chkWXComplateProd.Location = new System.Drawing.Point(112, 349); + this.chkWXComplateProd.Location = new System.Drawing.Point(112, 367); this.chkWXComplateProd.Name = "chkWXComplateProd"; this.chkWXComplateProd.Size = new System.Drawing.Size(68, 21); this.chkWXComplateProd.TabIndex = 808; @@ -264,7 +332,7 @@ namespace TemuKJD.WXForms.AdminForms "普通用户", "一级超管", "二级超管"}); - this.cmbSaLevel.Location = new System.Drawing.Point(112, 318); + this.cmbSaLevel.Location = new System.Drawing.Point(112, 336); this.cmbSaLevel.Name = "cmbSaLevel"; this.cmbSaLevel.Size = new System.Drawing.Size(148, 25); this.cmbSaLevel.TabIndex = 48; @@ -274,7 +342,7 @@ namespace TemuKJD.WXForms.AdminForms // this.label6.AutoSize = true; this.label6.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(27, 320); + this.label6.Location = new System.Drawing.Point(27, 338); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(79, 20); this.label6.TabIndex = 47; @@ -285,7 +353,7 @@ namespace TemuKJD.WXForms.AdminForms this.lblWatermark.AutoSize = true; this.lblWatermark.BackColor = System.Drawing.Color.White; this.lblWatermark.ForeColor = System.Drawing.SystemColors.ButtonShadow; - this.lblWatermark.Location = new System.Drawing.Point(113, 9); + this.lblWatermark.Location = new System.Drawing.Point(113, 10); this.lblWatermark.Name = "lblWatermark"; this.lblWatermark.Size = new System.Drawing.Size(140, 17); this.lblWatermark.TabIndex = 45; @@ -301,7 +369,7 @@ namespace TemuKJD.WXForms.AdminForms "上货", "数据", "登录"}); - this.cmbSearchGroup.Location = new System.Drawing.Point(112, 35); + this.cmbSearchGroup.Location = new System.Drawing.Point(112, 36); this.cmbSearchGroup.Name = "cmbSearchGroup"; this.cmbSearchGroup.Size = new System.Drawing.Size(148, 25); this.cmbSearchGroup.TabIndex = 44; @@ -311,7 +379,7 @@ namespace TemuKJD.WXForms.AdminForms // this.label5.AutoSize = true; this.label5.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(27, 35); + this.label5.Location = new System.Drawing.Point(27, 36); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(79, 20); this.label5.TabIndex = 43; @@ -321,7 +389,7 @@ namespace TemuKJD.WXForms.AdminForms // 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(27, 6); + this.label4.Location = new System.Drawing.Point(27, 7); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(79, 20); this.label4.TabIndex = 42; @@ -329,7 +397,7 @@ namespace TemuKJD.WXForms.AdminForms // // txtSearch // - this.txtSearch.Location = new System.Drawing.Point(112, 6); + this.txtSearch.Location = new System.Drawing.Point(112, 7); this.txtSearch.Name = "txtSearch"; this.txtSearch.Size = new System.Drawing.Size(148, 23); this.txtSearch.TabIndex = 41; @@ -338,7 +406,7 @@ namespace TemuKJD.WXForms.AdminForms // 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, 287); + this.label3.Location = new System.Drawing.Point(55, 305); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(51, 20); this.label3.TabIndex = 40; @@ -346,7 +414,7 @@ namespace TemuKJD.WXForms.AdminForms // // txtCompany // - this.txtCompany.Location = new System.Drawing.Point(112, 286); + this.txtCompany.Location = new System.Drawing.Point(112, 304); this.txtCompany.Name = "txtCompany"; this.txtCompany.Size = new System.Drawing.Size(148, 23); this.txtCompany.TabIndex = 39; @@ -356,7 +424,7 @@ namespace TemuKJD.WXForms.AdminForms 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.ForeColor = System.Drawing.SystemColors.ButtonShadow; - this.label2.Location = new System.Drawing.Point(117, 90); + this.label2.Location = new System.Drawing.Point(117, 112); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(135, 20); this.label2.TabIndex = 38; @@ -366,11 +434,11 @@ namespace TemuKJD.WXForms.AdminForms // this.label1.AutoSize = true; this.label1.ForeColor = System.Drawing.SystemColors.ButtonShadow; - this.label1.Location = new System.Drawing.Point(56, 505); + this.label1.Location = new System.Drawing.Point(47, 487); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(212, 17); + this.label1.Size = new System.Drawing.Size(236, 68); this.label1.TabIndex = 37; - this.label1.Text = "编辑时,密码为空表示不更改原密码。"; + this.label1.Text = "备注:1编辑时密码为空不更改原密码。\r\n   2商品采集自带微信采集和商品裂变\r\n    功能,如非测试请勿重复勾选微信\r\n    回采和裂变测试功能。"; // // btnRefresh // @@ -380,7 +448,7 @@ namespace TemuKJD.WXForms.AdminForms 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(267, 5); + this.btnRefresh.Location = new System.Drawing.Point(267, 6); this.btnRefresh.Name = "btnRefresh"; this.btnRefresh.Size = new System.Drawing.Size(86, 25); this.btnRefresh.TabIndex = 36; @@ -391,11 +459,12 @@ namespace TemuKJD.WXForms.AdminForms // btnCancel // this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.btnCancel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); 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(59, 467); + this.btnCancel.Location = new System.Drawing.Point(59, 572); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(86, 25); this.btnCancel.TabIndex = 35; @@ -407,11 +476,12 @@ namespace TemuKJD.WXForms.AdminForms // btnOpUser // this.btnOpUser.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnOpUser.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.btnOpUser.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnOpUser.Cursor = System.Windows.Forms.Cursors.Hand; this.btnOpUser.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnOpUser.ForeColor = System.Drawing.Color.White; - this.btnOpUser.Location = new System.Drawing.Point(174, 467); + this.btnOpUser.Location = new System.Drawing.Point(174, 572); this.btnOpUser.Name = "btnOpUser"; this.btnOpUser.Size = new System.Drawing.Size(86, 25); this.btnOpUser.TabIndex = 34; @@ -423,7 +493,7 @@ namespace TemuKJD.WXForms.AdminForms // this.label30.AutoSize = true; this.label30.ForeColor = System.Drawing.SystemColors.ButtonShadow; - this.label30.Location = new System.Drawing.Point(282, 159); + this.label30.Location = new System.Drawing.Point(282, 177); this.label30.Name = "label30"; this.label30.Size = new System.Drawing.Size(56, 17); this.label30.TabIndex = 33; @@ -433,7 +503,7 @@ namespace TemuKJD.WXForms.AdminForms // this.label31.AutoSize = true; this.label31.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.label31.Location = new System.Drawing.Point(266, 223); + this.label31.Location = new System.Drawing.Point(266, 241); this.label31.Name = "label31"; this.label31.Size = new System.Drawing.Size(13, 17); this.label31.TabIndex = 32; @@ -441,7 +511,7 @@ namespace TemuKJD.WXForms.AdminForms // // txtRePass // - this.txtRePass.Location = new System.Drawing.Point(112, 220); + this.txtRePass.Location = new System.Drawing.Point(112, 238); this.txtRePass.Name = "txtRePass"; this.txtRePass.PasswordChar = '*'; this.txtRePass.Size = new System.Drawing.Size(148, 23); @@ -451,7 +521,7 @@ namespace TemuKJD.WXForms.AdminForms // this.label32.AutoSize = true; this.label32.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label32.Location = new System.Drawing.Point(27, 221); + this.label32.Location = new System.Drawing.Point(27, 239); this.label32.Name = "label32"; this.label32.Size = new System.Drawing.Size(79, 20); this.label32.TabIndex = 31; @@ -461,7 +531,7 @@ namespace TemuKJD.WXForms.AdminForms // this.label33.AutoSize = true; this.label33.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.label33.Location = new System.Drawing.Point(266, 256); + this.label33.Location = new System.Drawing.Point(266, 274); this.label33.Name = "label33"; this.label33.Size = new System.Drawing.Size(13, 17); this.label33.TabIndex = 30; @@ -471,7 +541,7 @@ namespace TemuKJD.WXForms.AdminForms // 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(266, 191); + this.label34.Location = new System.Drawing.Point(266, 209); this.label34.Name = "label34"; this.label34.Size = new System.Drawing.Size(13, 17); this.label34.TabIndex = 29; @@ -481,7 +551,7 @@ namespace TemuKJD.WXForms.AdminForms // 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(266, 159); + this.label35.Location = new System.Drawing.Point(266, 177); this.label35.Name = "label35"; this.label35.Size = new System.Drawing.Size(13, 17); this.label35.TabIndex = 28; @@ -491,7 +561,7 @@ namespace TemuKJD.WXForms.AdminForms // 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(266, 127); + this.label36.Location = new System.Drawing.Point(266, 145); this.label36.Name = "label36"; this.label36.Size = new System.Drawing.Size(13, 17); this.label36.TabIndex = 27; @@ -506,7 +576,7 @@ namespace TemuKJD.WXForms.AdminForms "上货", "数据", "登录"}); - this.cmbGroup.Location = new System.Drawing.Point(112, 252); + this.cmbGroup.Location = new System.Drawing.Point(112, 270); this.cmbGroup.Name = "cmbGroup"; this.cmbGroup.Size = new System.Drawing.Size(148, 25); this.cmbGroup.TabIndex = 26; @@ -516,7 +586,7 @@ namespace TemuKJD.WXForms.AdminForms // this.label37.AutoSize = true; this.label37.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label37.Location = new System.Drawing.Point(55, 254); + this.label37.Location = new System.Drawing.Point(55, 272); this.label37.Name = "label37"; this.label37.Size = new System.Drawing.Size(51, 20); this.label37.TabIndex = 25; @@ -524,7 +594,7 @@ namespace TemuKJD.WXForms.AdminForms // // txtPassword // - this.txtPassword.Location = new System.Drawing.Point(112, 188); + this.txtPassword.Location = new System.Drawing.Point(112, 206); this.txtPassword.Name = "txtPassword"; this.txtPassword.PasswordChar = '*'; this.txtPassword.Size = new System.Drawing.Size(148, 23); @@ -534,7 +604,7 @@ namespace TemuKJD.WXForms.AdminForms // this.label38.AutoSize = true; this.label38.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label38.Location = new System.Drawing.Point(55, 189); + this.label38.Location = new System.Drawing.Point(55, 207); this.label38.Name = "label38"; this.label38.Size = new System.Drawing.Size(51, 20); this.label38.TabIndex = 22; @@ -542,7 +612,7 @@ namespace TemuKJD.WXForms.AdminForms // // txtMobile // - this.txtMobile.Location = new System.Drawing.Point(112, 156); + this.txtMobile.Location = new System.Drawing.Point(112, 174); this.txtMobile.Name = "txtMobile"; this.txtMobile.Size = new System.Drawing.Size(148, 23); this.txtMobile.TabIndex = 21; @@ -551,7 +621,7 @@ namespace TemuKJD.WXForms.AdminForms // 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(41, 157); + this.label39.Location = new System.Drawing.Point(41, 175); this.label39.Name = "label39"; this.label39.Size = new System.Drawing.Size(65, 20); this.label39.TabIndex = 20; @@ -559,7 +629,7 @@ namespace TemuKJD.WXForms.AdminForms // // txtNickName // - this.txtNickName.Location = new System.Drawing.Point(112, 124); + this.txtNickName.Location = new System.Drawing.Point(112, 142); this.txtNickName.Name = "txtNickName"; this.txtNickName.Size = new System.Drawing.Size(148, 23); this.txtNickName.TabIndex = 19; @@ -568,12 +638,20 @@ namespace TemuKJD.WXForms.AdminForms // 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(55, 125); + this.label40.Location = new System.Drawing.Point(55, 143); this.label40.Name = "label40"; this.label40.Size = new System.Drawing.Size(51, 20); this.label40.TabIndex = 18; this.label40.Text = "昵称:"; // + // line1 + // + this.line1.Location = new System.Drawing.Point(13, 62); + this.line1.Name = "line1"; + this.line1.Size = new System.Drawing.Size(339, 10); + this.line1.TabIndex = 818; + this.line1.Text = "line1"; + // // splitContainer1 // this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; @@ -590,8 +668,8 @@ namespace TemuKJD.WXForms.AdminForms // splitContainer1.Panel2 // this.splitContainer1.Panel2.Controls.Add(this.btnExportShopErp); - this.splitContainer1.Size = new System.Drawing.Size(1013, 553); - this.splitContainer1.SplitterDistance = 522; + this.splitContainer1.Size = new System.Drawing.Size(1013, 624); + this.splitContainer1.SplitterDistance = 593; this.splitContainer1.TabIndex = 2; // // pnlTopUp @@ -600,7 +678,7 @@ namespace TemuKJD.WXForms.AdminForms this.pnlTopUp.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.pnlTopUp.Controls.Add(this.lblUserInfo); this.pnlTopUp.Controls.Add(this.panel2); - this.pnlTopUp.Location = new System.Drawing.Point(269, 188); + this.pnlTopUp.Location = new System.Drawing.Point(269, 223); this.pnlTopUp.Name = "pnlTopUp"; this.pnlTopUp.Size = new System.Drawing.Size(474, 146); this.pnlTopUp.TabIndex = 8; @@ -705,20 +783,20 @@ namespace TemuKJD.WXForms.AdminForms // this.dgvUser.AllowUserToAddRows = false; this.dgvUser.AllowUserToDeleteRows = false; - dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); - this.dgvUser.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4; + 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))))); - 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; + 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; this.dgvUser.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvUser.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.UserIdColumn, @@ -744,7 +822,7 @@ namespace TemuKJD.WXForms.AdminForms this.dgvUser.Name = "dgvUser"; this.dgvUser.ReadOnly = true; this.dgvUser.RowTemplate.Height = 23; - this.dgvUser.Size = new System.Drawing.Size(1013, 522); + this.dgvUser.Size = new System.Drawing.Size(1013, 593); this.dgvUser.TabIndex = 1; this.dgvUser.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvUser_CellContentClick); // @@ -814,6 +892,7 @@ namespace TemuKJD.WXForms.AdminForms // // colAuthority // + this.colAuthority.FillWeight = 300F; this.colAuthority.HeaderText = "功能权限"; this.colAuthority.Name = "colAuthority"; this.colAuthority.ReadOnly = true; @@ -828,16 +907,16 @@ namespace TemuKJD.WXForms.AdminForms // // colPlus // - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - this.colPlus.DefaultCellStyle = dataGridViewCellStyle6; - this.colPlus.FillWeight = 18F; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.colPlus.DefaultCellStyle = dataGridViewCellStyle3; + this.colPlus.FillWeight = 22F; this.colPlus.HeaderText = "+"; this.colPlus.Name = "colPlus"; this.colPlus.ReadOnly = true; // // colAddShop // - this.colAddShop.FillWeight = 60F; + this.colAddShop.FillWeight = 70F; this.colAddShop.HeaderText = "添加店铺"; this.colAddShop.Name = "colAddShop"; this.colAddShop.ReadOnly = true; @@ -846,7 +925,7 @@ namespace TemuKJD.WXForms.AdminForms // // editColumn // - this.editColumn.FillWeight = 40F; + this.editColumn.FillWeight = 50F; this.editColumn.HeaderText = "编辑"; this.editColumn.Name = "editColumn"; this.editColumn.ReadOnly = true; @@ -855,7 +934,7 @@ namespace TemuKJD.WXForms.AdminForms // // deleteColumn // - this.deleteColumn.FillWeight = 40F; + this.deleteColumn.FillWeight = 50F; this.deleteColumn.HeaderText = "删除"; this.deleteColumn.Name = "deleteColumn"; this.deleteColumn.ReadOnly = true; @@ -885,19 +964,10 @@ namespace TemuKJD.WXForms.AdminForms this.btnExportShopErp.Visible = false; this.btnExportShopErp.Click += new System.EventHandler(this.btnExportShopErp_Click); // - // chkProdFission - // - this.chkProdFission.Location = new System.Drawing.Point(112, 435); - this.chkProdFission.Name = "chkProdFission"; - this.chkProdFission.Size = new System.Drawing.Size(68, 21); - this.chkProdFission.TabIndex = 817; - this.chkProdFission.Text = "商品裂变"; - this.chkProdFission.UseVisualStyleBackColor = true; - // // WXAdminAccountForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; - this.ClientSize = new System.Drawing.Size(1376, 563); + this.ClientSize = new System.Drawing.Size(1376, 634); 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; @@ -976,6 +1046,7 @@ namespace TemuKJD.WXForms.AdminForms private System.Windows.Forms.Label label8; private DevComponents.DotNetBar.PanelEx btnTopUpCancel; private DevComponents.DotNetBar.PanelEx btnTopUpOK; + private UserComponent.UcCheckBox chkProdFission; private System.Windows.Forms.DataGridViewTextBoxColumn UserIdColumn; private System.Windows.Forms.DataGridViewTextBoxColumn UserNickNameColumn; private System.Windows.Forms.DataGridViewTextBoxColumn mobileColumn; @@ -992,6 +1063,10 @@ 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 chkProdFission; + private DevComponents.DotNetBar.PanelEx btnFilter; + private System.Windows.Forms.TextBox txtAuth; + private System.Windows.Forms.Label label9; + private DevComponents.DotNetBar.Controls.Line line1; + private DevComponents.DotNetBar.Controls.Line line2; } } \ No newline at end of file diff --git a/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.cs b/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.cs index ff9306d..8382036 100644 --- a/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.cs +++ b/TEMUKJD/WXForms/AdminForms/WXAdminAccountForm.cs @@ -94,7 +94,7 @@ namespace TemuKJD.WXForms.AdminForms if (chkShopPoints.Checked) authority += chkShopPoints.Text + ","; // 充值用户 if (chkProdFission.Checked) - authority += chkProdFission.Text + ","; // 商品裂变 + authority += chkProdFission.Text + ","; // 裂变调试 data.Append("&authority=" + authority.Trim(',')); string url = BaseClass.BuildObjString("user/add_user"); @@ -394,5 +394,16 @@ namespace TemuKJD.WXForms.AdminForms pnlTopUp.Visible = false; BaseMsgForm.ShowInfo("充值成功"); } + + private void btnFilter_Click(object sender, EventArgs e) + { + foreach(DataGridViewRow row in dgvUser.Rows) + { + if (row.Cells["colAuthority"].Value.ParseToString().Contains(txtAuth.Text.Trim())) + row.Visible = true; + else + row.Visible = false; + } + } } } diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs index 2e425c6..11677e9 100644 --- a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.Designer.cs @@ -32,14 +32,14 @@ namespace TemuKJD.WXForms.ProductForms 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(); - 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 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 dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); this.txtShippingPriceTimes = new System.Windows.Forms.TextBox(); @@ -108,7 +108,7 @@ namespace TemuKJD.WXForms.ProductForms this.label27 = new System.Windows.Forms.Label(); this.chkCommission = new TemuKJD.UserComponent.UcCheckBox(this.components); this.btnLoginAssistant = new DevComponents.DotNetBar.PanelEx(); - this.商品裂变 = new System.Windows.Forms.TabPage(); + this.裂变调试 = new System.Windows.Forms.TabPage(); this.txtFissionTitle = new System.Windows.Forms.TextBox(); this.line2 = new DevComponents.DotNetBar.Controls.Line(); this.label38 = new System.Windows.Forms.Label(); @@ -235,6 +235,7 @@ namespace TemuKJD.WXForms.ProductForms this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); this.btnClear = new DevComponents.DotNetBar.PanelEx(); this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); + this.chkUseRecommand = new TemuKJD.UserComponent.UcCheckBox(this.components); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -246,7 +247,7 @@ namespace TemuKJD.WXForms.ProductForms this.ucTabControlMetro1.SuspendLayout(); this.上传参数.SuspendLayout(); this.佣金上货.SuspendLayout(); - this.商品裂变.SuspendLayout(); + this.裂变调试.SuspendLayout(); this.ucGroupBoxEx4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbSelectProd)).BeginInit(); this.ucGroupBoxEx1.SuspendLayout(); @@ -714,7 +715,7 @@ namespace TemuKJD.WXForms.ProductForms this.ucTabControlMetro1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(174)))), ((int)(((byte)(157))))); this.ucTabControlMetro1.Controls.Add(this.上传参数); this.ucTabControlMetro1.Controls.Add(this.佣金上货); - this.ucTabControlMetro1.Controls.Add(this.商品裂变); + this.ucTabControlMetro1.Controls.Add(this.裂变调试); this.ucTabControlMetro1.ItemSize = new System.Drawing.Size(72, 24); this.ucTabControlMetro1.Location = new System.Drawing.Point(421, 11); this.ucTabControlMetro1.Name = "ucTabControlMetro1"; @@ -728,12 +729,14 @@ namespace TemuKJD.WXForms.ProductForms // // 上传参数 // + this.上传参数.Controls.Add(this.chkUseWXComplateProd); + this.上传参数.Controls.Add(this.chkUseRecommand); + this.上传参数.Controls.Add(this.chkPreSale); this.上传参数.Controls.Add(this.txtDefaultBestBefore); this.上传参数.Controls.Add(this.chkDefaultBestBefore); this.上传参数.Controls.Add(this.txtMinPrice); this.上传参数.Controls.Add(this.btnFilterBound); this.上传参数.Controls.Add(this.txtFilterBoundMin); - this.上传参数.Controls.Add(this.chkUseWXComplateProd); this.上传参数.Controls.Add(this.chkUpDraft); this.上传参数.Controls.Add(this.label25); this.上传参数.Controls.Add(this.chkSkipUploaded); @@ -744,7 +747,6 @@ namespace TemuKJD.WXForms.ProductForms this.上传参数.Controls.Add(this.chkSaveBound); this.上传参数.Controls.Add(this.chkAiShortTitle); this.上传参数.Controls.Add(this.label5); - this.上传参数.Controls.Add(this.chkPreSale); this.上传参数.Controls.Add(this.chkHighestPriceSku); this.上传参数.Controls.Add(this.txtFilterBoundMax); this.上传参数.Controls.Add(this.label18); @@ -783,7 +785,7 @@ namespace TemuKJD.WXForms.ProductForms // // txtMinPrice // - this.txtMinPrice.Location = new System.Drawing.Point(67, 2); + this.txtMinPrice.Location = new System.Drawing.Point(65, 2); this.txtMinPrice.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.txtMinPrice.Name = "txtMinPrice"; this.txtMinPrice.Size = new System.Drawing.Size(25, 23); @@ -830,7 +832,7 @@ namespace TemuKJD.WXForms.ProductForms // // chkUseWXComplateProd // - this.chkUseWXComplateProd.Location = new System.Drawing.Point(291, 28); + this.chkUseWXComplateProd.Location = new System.Drawing.Point(541, 28); this.chkUseWXComplateProd.Name = "chkUseWXComplateProd"; this.chkUseWXComplateProd.Size = new System.Drawing.Size(87, 21); this.chkUseWXComplateProd.TabIndex = 876; @@ -842,7 +844,7 @@ namespace TemuKJD.WXForms.ProductForms // chkUpDraft // this.chkUpDraft.AutoSize = true; - this.chkUpDraft.Location = new System.Drawing.Point(461, 3); + this.chkUpDraft.Location = new System.Drawing.Point(447, 3); this.chkUpDraft.Name = "chkUpDraft"; this.chkUpDraft.Size = new System.Drawing.Size(87, 21); this.chkUpDraft.TabIndex = 769; @@ -865,7 +867,7 @@ namespace TemuKJD.WXForms.ProductForms this.chkSkipUploaded.AutoSize = true; this.chkSkipUploaded.Checked = true; this.chkSkipUploaded.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkSkipUploaded.Location = new System.Drawing.Point(351, 3); + this.chkSkipUploaded.Location = new System.Drawing.Point(341, 3); this.chkSkipUploaded.Name = "chkSkipUploaded"; this.chkSkipUploaded.Size = new System.Drawing.Size(111, 21); this.chkSkipUploaded.TabIndex = 755; @@ -878,7 +880,7 @@ namespace TemuKJD.WXForms.ProductForms this.chkSameSpecPrice.AutoSize = true; this.chkSameSpecPrice.Checked = true; this.chkSameSpecPrice.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkSameSpecPrice.Location = new System.Drawing.Point(253, 3); + this.chkSameSpecPrice.Location = new System.Drawing.Point(246, 3); this.chkSameSpecPrice.Name = "chkSameSpecPrice"; this.chkSameSpecPrice.Size = new System.Drawing.Size(99, 21); this.chkSameSpecPrice.TabIndex = 745; @@ -888,19 +890,19 @@ namespace TemuKJD.WXForms.ProductForms // // txtPreDays // - this.txtPreDays.Location = new System.Drawing.Point(453, 27); + this.txtPreDays.Location = new System.Drawing.Point(347, 27); this.txtPreDays.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.txtPreDays.Name = "txtPreDays"; - this.txtPreDays.Size = new System.Drawing.Size(28, 23); + this.txtPreDays.Size = new System.Drawing.Size(22, 23); this.txtPreDays.TabIndex = 790; - this.txtPreDays.Text = "5"; + this.txtPreDays.Text = "45"; this.txtPreDays.TextChanged += new System.EventHandler(this.txtPreDays_TextChanged); // // txtReplaceText // this.txtReplaceText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtReplaceText.Location = new System.Drawing.Point(67, 52); + this.txtReplaceText.Location = new System.Drawing.Point(65, 52); this.txtReplaceText.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.txtReplaceText.Multiline = true; this.txtReplaceText.Name = "txtReplaceText"; @@ -936,7 +938,7 @@ namespace TemuKJD.WXForms.ProductForms this.chkAiShortTitle.AutoSize = true; this.chkAiShortTitle.Checked = true; this.chkAiShortTitle.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkAiShortTitle.Location = new System.Drawing.Point(205, 28); + this.chkAiShortTitle.Location = new System.Drawing.Point(198, 28); this.chkAiShortTitle.Name = "chkAiShortTitle"; this.chkAiShortTitle.Size = new System.Drawing.Size(87, 21); this.chkAiShortTitle.TabIndex = 862; @@ -947,7 +949,7 @@ namespace TemuKJD.WXForms.ProductForms // label5 // this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(92, 5); + this.label5.Location = new System.Drawing.Point(89, 5); this.label5.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(40, 17); @@ -956,7 +958,7 @@ namespace TemuKJD.WXForms.ProductForms // // chkPreSale // - this.chkPreSale.Location = new System.Drawing.Point(386, 28); + this.chkPreSale.Location = new System.Drawing.Point(281, 28); this.chkPreSale.Name = "chkPreSale"; this.chkPreSale.Size = new System.Drawing.Size(65, 21); this.chkPreSale.TabIndex = 789; @@ -969,7 +971,7 @@ namespace TemuKJD.WXForms.ProductForms this.chkHighestPriceSku.AutoSize = true; this.chkHighestPriceSku.Checked = true; this.chkHighestPriceSku.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkHighestPriceSku.Location = new System.Drawing.Point(135, 3); + this.chkHighestPriceSku.Location = new System.Drawing.Point(129, 3); this.chkHighestPriceSku.Name = "chkHighestPriceSku"; this.chkHighestPriceSku.Size = new System.Drawing.Size(119, 21); this.chkHighestPriceSku.TabIndex = 739; @@ -991,7 +993,7 @@ namespace TemuKJD.WXForms.ProductForms // label18 // this.label18.AutoSize = true; - this.label18.Location = new System.Drawing.Point(479, 30); + this.label18.Location = new System.Drawing.Point(367, 30); this.label18.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.label18.Name = "label18"; this.label18.Size = new System.Drawing.Size(54, 17); @@ -1031,11 +1033,11 @@ namespace TemuKJD.WXForms.ProductForms // txtTitleHeadWord // this.txtTitleHeadWord.Font = new System.Drawing.Font("微软雅黑", 10F); - this.txtTitleHeadWord.Location = new System.Drawing.Point(67, 26); + this.txtTitleHeadWord.Location = new System.Drawing.Point(65, 26); this.txtTitleHeadWord.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtTitleHeadWord.MaxLength = 15; this.txtTitleHeadWord.Name = "txtTitleHeadWord"; - this.txtTitleHeadWord.Size = new System.Drawing.Size(130, 25); + this.txtTitleHeadWord.Size = new System.Drawing.Size(126, 25); this.txtTitleHeadWord.TabIndex = 835; this.txtTitleHeadWord.TextChanged += new System.EventHandler(this.txtTitleHeadWord_TextChanged); // @@ -1052,7 +1054,7 @@ namespace TemuKJD.WXForms.ProductForms // label3 // this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(1, 57); + this.label3.Location = new System.Drawing.Point(1, 52); this.label3.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(68, 17); @@ -1218,36 +1220,36 @@ namespace TemuKJD.WXForms.ProductForms this.btnLoginAssistant.Text = "佣金登录"; this.btnLoginAssistant.Click += new System.EventHandler(this.btnLoginAssistant_Click); // - // 商品裂变 + // 裂变调试 // - this.商品裂变.Controls.Add(this.txtFissionTitle); - this.商品裂变.Controls.Add(this.line2); - this.商品裂变.Controls.Add(this.label38); - this.商品裂变.Controls.Add(this.txtFissionRandomPriceChange); - this.商品裂变.Controls.Add(this.chkFissionRandomPriceChange); - this.商品裂变.Controls.Add(this.txtDetailBorderImgCount); - this.商品裂变.Controls.Add(this.label35); - this.商品裂变.Controls.Add(this.label36); - this.商品裂变.Controls.Add(this.txtMainBorderImgCount); - this.商品裂变.Controls.Add(this.label34); - this.商品裂变.Controls.Add(this.label33); - this.商品裂变.Controls.Add(this.label32); - this.商品裂变.Controls.Add(this.txtAiImgCount); - this.商品裂变.Controls.Add(this.chkAiImage); - this.商品裂变.Controls.Add(this.chkRandomDetailImgOrder); - this.商品裂变.Controls.Add(this.chkRandomMainImgOrder); - this.商品裂变.Controls.Add(this.lblFissionTitleCount); - this.商品裂变.Controls.Add(this.chkFissionGoodsName); - this.商品裂变.Controls.Add(this.chkRandomImgBorder); - this.商品裂变.Controls.Add(this.line1); - this.商品裂变.Controls.Add(this.label37); - this.商品裂变.Location = new System.Drawing.Point(4, 28); - this.商品裂变.Name = "商品裂变"; - this.商品裂变.Padding = new System.Windows.Forms.Padding(3); - this.商品裂变.Size = new System.Drawing.Size(583, 118); - this.商品裂变.TabIndex = 3; - this.商品裂变.Text = "商品裂变"; - this.商品裂变.UseVisualStyleBackColor = true; + this.裂变调试.Controls.Add(this.txtFissionTitle); + this.裂变调试.Controls.Add(this.line2); + this.裂变调试.Controls.Add(this.label38); + this.裂变调试.Controls.Add(this.txtFissionRandomPriceChange); + this.裂变调试.Controls.Add(this.chkFissionRandomPriceChange); + this.裂变调试.Controls.Add(this.txtDetailBorderImgCount); + this.裂变调试.Controls.Add(this.label35); + this.裂变调试.Controls.Add(this.label36); + this.裂变调试.Controls.Add(this.txtMainBorderImgCount); + this.裂变调试.Controls.Add(this.label34); + this.裂变调试.Controls.Add(this.label33); + this.裂变调试.Controls.Add(this.label32); + this.裂变调试.Controls.Add(this.txtAiImgCount); + this.裂变调试.Controls.Add(this.chkAiImage); + this.裂变调试.Controls.Add(this.chkRandomDetailImgOrder); + this.裂变调试.Controls.Add(this.chkRandomMainImgOrder); + this.裂变调试.Controls.Add(this.lblFissionTitleCount); + this.裂变调试.Controls.Add(this.chkFissionGoodsName); + this.裂变调试.Controls.Add(this.chkRandomImgBorder); + this.裂变调试.Controls.Add(this.line1); + this.裂变调试.Controls.Add(this.label37); + this.裂变调试.Location = new System.Drawing.Point(4, 28); + this.裂变调试.Name = "裂变调试"; + this.裂变调试.Padding = new System.Windows.Forms.Padding(3); + this.裂变调试.Size = new System.Drawing.Size(583, 118); + this.裂变调试.TabIndex = 3; + this.裂变调试.Text = "裂变调试"; + this.裂变调试.UseVisualStyleBackColor = true; // // txtFissionTitle // @@ -2420,19 +2422,19 @@ namespace TemuKJD.WXForms.ProductForms // this.dgvShop.AllowUserToAddRows = false; this.dgvShop.AllowUserToDeleteRows = false; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle9.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9; 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))))); - 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; + 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.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10; this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colSelect, @@ -2664,19 +2666,19 @@ namespace TemuKJD.WXForms.ProductForms // this.dgvSelectProduct.AllowUserToAddRows = false; this.dgvSelectProduct.AllowUserToDeleteRows = false; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle11.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle11; 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))))); - 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; + 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.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle12; this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colCheck, @@ -2738,8 +2740,8 @@ namespace TemuKJD.WXForms.ProductForms // // colSupplierName // - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle13; this.colSupplierName.Frozen = true; this.colSupplierName.HeaderText = "店铺名称"; this.colSupplierName.Name = "colSupplierName"; @@ -2819,8 +2821,8 @@ namespace TemuKJD.WXForms.ProductForms // // colProductName // - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colProductName.DefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colProductName.DefaultCellStyle = dataGridViewCellStyle14; this.colProductName.HeaderText = "商品标题"; this.colProductName.Name = "colProductName"; this.colProductName.ReadOnly = true; @@ -2828,8 +2830,8 @@ namespace TemuKJD.WXForms.ProductForms // // colProductCat // - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colProductCat.DefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colProductCat.DefaultCellStyle = dataGridViewCellStyle15; this.colProductCat.HeaderText = "商品类目"; this.colProductCat.Name = "colProductCat"; this.colProductCat.ReadOnly = true; @@ -2884,8 +2886,8 @@ namespace TemuKJD.WXForms.ProductForms // // colAddTime // - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colAddTime.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colAddTime.DefaultCellStyle = dataGridViewCellStyle16; this.colAddTime.HeaderText = "上传时间"; this.colAddTime.Name = "colAddTime"; this.colAddTime.ReadOnly = true; @@ -2978,6 +2980,16 @@ namespace TemuKJD.WXForms.ProductForms this.panelEx1.Text = "停止当前操作"; this.panelEx1.Visible = false; // + // chkUseRecommand + // + this.chkUseRecommand.AutoSize = true; + this.chkUseRecommand.Location = new System.Drawing.Point(422, 28); + this.chkUseRecommand.Name = "chkUseRecommand"; + this.chkUseRecommand.Size = new System.Drawing.Size(123, 21); + this.chkUseRecommand.TabIndex = 907; + this.chkUseRecommand.Text = "使用推荐属性数值"; + this.chkUseRecommand.UseVisualStyleBackColor = true; + // // WXDBProdUploadForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -3006,8 +3018,8 @@ namespace TemuKJD.WXForms.ProductForms this.上传参数.PerformLayout(); this.佣金上货.ResumeLayout(false); this.佣金上货.PerformLayout(); - this.商品裂变.ResumeLayout(false); - this.商品裂变.PerformLayout(); + this.裂变调试.ResumeLayout(false); + this.裂变调试.PerformLayout(); this.ucGroupBoxEx4.ResumeLayout(false); this.ucGroupBoxEx4.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbSelectProd)).EndInit(); @@ -3207,7 +3219,7 @@ namespace TemuKJD.WXForms.ProductForms private System.Windows.Forms.ComboBox cmbCommissionAddOrReduce; private System.Windows.Forms.Label label29; private System.Windows.Forms.Label label31; - private System.Windows.Forms.TabPage 商品裂变; + private System.Windows.Forms.TabPage 裂变调试; private System.Windows.Forms.TextBox txtFissionTitle; private UserComponent.UcCheckBox chkRandomImgBorder; private UserComponent.UcCheckBox chkAiImage; @@ -3232,5 +3244,6 @@ namespace TemuKJD.WXForms.ProductForms private DevComponents.DotNetBar.PanelEx btnSwitchCatType; private System.Windows.Forms.TextBox txtRandomFissionProductCount; private UserComponent.UcCheckBox chkRandomFissionProduct; + private UserComponent.UcCheckBox chkUseRecommand; } } \ No newline at end of file diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs index 6f2b40b..661cc18 100644 --- a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs @@ -355,20 +355,21 @@ namespace TemuKJD.WXForms.ProductForms cmbSourceType.Items.Insert(1, "------"); cmbSourceType.Items.Insert(1, "1688商品"); cmbSourceType.Items.Insert(1, "多多商品"); + cmbSourceType.Items.Insert(1, "微信商品"); chkRandomFissionProduct.Visible = true; txtRandomFissionProductCount.Visible = true; } cmbHot_TextChanged(null, null); - if (BaseClass.UserAuthority.Contains("商品裂变")) + if (BaseClass.UserAuthority.Contains("裂变调试")) { chkRandomFissionProduct.Visible = true; txtRandomFissionProductCount.Visible = true; } else { - ucTabControlMetro1.TabPages.Remove(商品裂变); + ucTabControlMetro1.TabPages.Remove(裂变调试); } List ctrlLst = new List() @@ -1453,7 +1454,7 @@ namespace TemuKJD.WXForms.ProductForms } #region 裂变标题 - if (BaseClass.UserAuthority.Contains("商品裂变") && chkFissionGoodsName.Checked) + if (BaseClass.UserAuthority.Contains("裂变调试") && chkFissionGoodsName.Checked) { bool isFinish = false; Invoke(new Action(() => { @@ -3066,6 +3067,30 @@ namespace TemuKJD.WXForms.ProductForms } #endregion + WXUploadProductInfoRecommendParam recommendParamRst = new WXUploadProductInfoRecommendParam(); + if (chkUseRecommand.Checked) + { + WXUploadProductInfoRecommendParam recommendParam = new WXUploadProductInfoRecommendParam(); + //recommendParam.productId = upProdParam.product.productKey.productId; + recommendParam.predictTypeList = new List() { 5, 4, 2 }; + recommendParam.productInfo = new RecommendProductInfoParam(); + recommendParam.productInfo.title = upProdParam.product.info.title; + recommendParam.productInfo.headImg = new List(); + recommendParam.productInfo.headImg.AddRange(upProdParam.product.info.headImg); + recommendParam.productInfo.brandId = upProdParam.product.info.brandId.ParseToString(); + recommendParam.productInfo.category = JsonHelper.DeserializeJsonToList(JsonHelper.SerializeObject(upProdParam.product.info.category)); + recommendParam.productInfo.detail = new productDetailParam(); //JsonHelper.DeserializeJsonToObject(JsonHelper.SerializeObject(upProdParam.product.info.detail)); + var recommendRst = WXUpload.generalProductInfoRecommend(shop, recommendParam); + if (recommendRst.Contains("\"code\":0")) + { + recommendParamRst = JsonHelper.DeserializeJsonToObject(recommendRst); + } + } + if (recommendParamRst.productInfo == null) + recommendParamRst.productInfo = new RecommendProductInfoParam(); + if (recommendParamRst.productInfo.param == null) + recommendParamRst.productInfo.param = new List(); + #region 匹配产品属性 //真丝、蚕丝、香云纱、羊绒、羊毛、羊羔毛、羽绒、皮草 upProdParam.product.info.param = new List(); // 商品属性值 @@ -3548,9 +3573,22 @@ namespace TemuKJD.WXForms.ProductForms { attrValue = "其他"; } - if (attrValue.IsNullOrEmpty() && (attr.type == "decimal4_unit" || attr.type == "integer_unit")) + if ((attrValue.IsNullOrEmpty() || attrValue == "见包装") && (attr.type == "decimal4_unit" || attr.type == "integer_unit")) { - if (attr.value == "%") + // 走系统推荐 + var param = recommendParamRst.productInfo.param.FirstOrDefault(p => p.categorys?.FirstOrDefault()?.name == attr.name); + if (param != null && param.categorys.Count == 2) + { + attrValue = param.categorys[1].name; + if (attrValue.Contains("磅") && attrValue.Replace("磅", "").ParseToDecimal() > 0) + { + if ((";" + attr.value + ";").Contains(";g;")) + attrValue = (attrValue.Replace("磅", "").ParseToDecimal() * 454).ParseToInt() + "g"; + else if ((";" + attr.value + ";").Contains(";kg;")) + attrValue = (attrValue.Replace("磅", "").ParseToDecimal() * 0.454m).ParseToDecimal() + "kg"; + } + } + else if (attr.value == "%") attrValue = "10 %"; else if (attr.value == "g;kg") attrValue = "50 g"; @@ -3617,29 +3655,27 @@ namespace TemuKJD.WXForms.ProductForms prodInfo.detail.sku.FirstOrDefault().thumb_url = prodInfo.detail.galleries.FirstOrDefault(g => g.type == 1)?.url; // 处理系统指定的规格名称 - if (upProdParam.product.info.category.FirstOrDefault()?.name == "食品饮料" || prodInfo.detail.cats.FirstOrDefault() == "食品饮料") + if ((upProdParam.product.info.category.FirstOrDefault()?.name == "食品饮料" || prodInfo.detail.cats.FirstOrDefault() == "食品饮料") && + (selectProd.cat_name == "坚果炒货" || selectProd.cat_name == "果干")) { - if (selectProd.cat_name == "坚果炒货" || selectProd.cat_name == "果干") + if (!prodInfo.detail.sku.FirstOrDefault().spec.Any(s => s.parent_name == "规格/净含量")) { - if (!prodInfo.detail.sku.FirstOrDefault().spec.Any(s => s.parent_name == "规格/净含量")) + foreach (var sku in prodInfo.detail.sku) { - foreach (var sku in prodInfo.detail.sku) - { - sku.spec.FirstOrDefault().parent_name = "规格/净含量"; - } - } - } - else - { - if (!prodInfo.detail.sku.FirstOrDefault().spec.Any(s => s.parent_name == "规格")) - { - foreach (var sku in prodInfo.detail.sku) - { - sku.spec.FirstOrDefault().parent_name = "规格"; - } + sku.spec.FirstOrDefault().parent_name = "规格/净含量"; } } } + //else if ((upProdParam.product.info.category.FirstOrDefault()?.name == "食品饮料" || prodInfo.detail.cats.FirstOrDefault() == "食品饮料")) + //{ + // if (!prodInfo.detail.sku.FirstOrDefault().spec.Any(s => s.parent_name == "规格")) + // { + // foreach (var sku in prodInfo.detail.sku) + // { + // sku.spec.FirstOrDefault().parent_name = "规格"; + // } + // } + //} else { var leafCat = upProdParam.product.info.category.LastOrDefault(); @@ -5028,7 +5064,7 @@ namespace TemuKJD.WXForms.ProductForms })); }); - if (BaseClass.UserAuthority.Contains("商品裂变") && chkFissionGoodsName.Checked) + if (BaseClass.UserAuthority.Contains("裂变调试") && chkFissionGoodsName.Checked) { Invoke(new Action(() => { @@ -5163,7 +5199,7 @@ namespace TemuKJD.WXForms.ProductForms } data += "&ban_wx=0"; - data += "&in_ext_codes=" + txtExtCodeFilter.Text; + //data += "&in_ext_codes=" + txtExtCodeFilter.Text; data += "&in_spu_ids=" + txtIdFilter.Text; string serach_group = cmbGroupFilter.Text.Trim(); @@ -5178,13 +5214,13 @@ namespace TemuKJD.WXForms.ProductForms data += "&product_name=" + txtSearchGoodsName.Text.Trim(); - // 商品采集权限可以随机管理員或自己采集的商品 + // 商品采集权限可以随机管理员或自己采集的商品 string addUserName = BaseClass.UserAuthority.Contains("商品采集") ? ("admin," + BaseClass.UserName) : "admin"; if (BaseClass.GroupId != 3) addUserName = BaseClass.ParentAuthority.Contains("商品采集") ? ("admin," + BaseClass.ParentUserName) : "admin"; // 如果指定只有自己采集的商品,则只随机自己采集的商品 - if ((cmbSourceType.Text.Trim().Contains("多多商品") || cmbSourceType.Text.Trim().Contains("1688商品")) && - cmbSourceType.Text.Trim().Replace("多多商品", "").Replace("1688商品", "").Trim(',').IsNullOrEmpty()) + if ((cmbSourceType.Text.Trim().Contains("多多商品") || cmbSourceType.Text.Trim().Contains("1688商品") || cmbSourceType.Text.Trim().Contains("微信商品")) && + cmbSourceType.Text.Trim().Replace("多多商品", "").Replace("1688商品", "").Replace("微信商品", "").Trim(',').IsNullOrEmpty()) data += "&add_user_name=" + (BaseClass.GroupId == 3 ? BaseClass.UserName : BaseClass.ParentUserName); else data += "&add_user_name=" + addUserName; @@ -5193,7 +5229,7 @@ namespace TemuKJD.WXForms.ProductForms { // 采集来源判断 data += "&product_get_type=" + cmbSourceType.Text.Trim().Replace("已采集数据", "1688外部数据") - .Replace("多多商品", "机会商品,多多外部数据").Replace("1688商品", "1688厂家,1688外部数据"); + .Replace("多多商品", "机会商品,多多外部数据").Replace("1688商品", "1688厂家,1688外部数据").Replace("微信商品", "微信店采"); } //if (cmbSourceType.Text != "厂商直采" && cmbSourceType.Text != "1688厂家" && cmbSourceType.Text != "微信店采" && cmbSourceType.Text != "微信小店") @@ -5692,7 +5728,7 @@ namespace TemuKJD.WXForms.ProductForms private void cmbGroupFilter_SelectedIndexChanged(object sender, EventArgs e) { - if (cmbGroupFilter.Text == "我的商品" && cmbSourceType.Text != "多多商品" && cmbSourceType.Text != "1688商品") + if (cmbGroupFilter.Text == "我的商品" && cmbSourceType.Text != "多多商品" && cmbSourceType.Text != "1688商品" && cmbSourceType.Text != "微信商品") { cmbSourceType.Text = ""; } @@ -5830,7 +5866,7 @@ namespace TemuKJD.WXForms.ProductForms 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 && (cmbCateFilter2.Text.Trim() == cmbCateFilter1.DefaultText || (";" + cmbCateFilter2.Text.Trim() + ";") - .Contains(c.name))).ToList(); + .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) //{ @@ -6086,7 +6122,7 @@ namespace TemuKJD.WXForms.ProductForms if ((BaseClass.UserAuthority.Contains("商品采集") || BaseClass.ParentAuthority.Contains("商品采集")) && !BaseClass.UserAuthority.Contains("货源选择") && BaseClass.SaLevel == 0) { - cmbSourceType.Text = "多多商品,1688商品"; + cmbSourceType.Text = "多多商品,1688商品,微信商品"; cmbJstInitSet.Text = ""; } } @@ -6507,6 +6543,18 @@ Content-Type: application/octet-stream var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer); return result; } + + + + public static string generalProductInfoRecommend(ShopLoginInfo shop, WXUploadProductInfoRecommendParam recommendParam) + { + string url = "https://store.weixin.qq.com/shop-faas/mmecnodeproductupload/aiRecommendCompat/cgi/goods/generalProductInfoRecommend?token=&lang=zh_CN"; + string referer = "https://store.weixin.qq.com/shop/goods/entry?productId=" + recommendParam.productId + "&isUpdateAuditFree=0&source=list_edit&continueEditInfo={%22isEditingContinued%22:false,%22lastEditDraftTime%22:0,%22listingTime%22:0}"; + JsonSerializerSettings jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }; + string body = JsonConvert.SerializeObject(recommendParam, jsonSetting); + var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer); + return result; + } } public class AddPriceRule diff --git a/TEMUKJD/WXForms/ProductForms/WXFinderSquareForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXFinderSquareForm.Designer.cs index 1533587..89c2a95 100644 --- a/TEMUKJD/WXForms/ProductForms/WXFinderSquareForm.Designer.cs +++ b/TEMUKJD/WXForms/ProductForms/WXFinderSquareForm.Designer.cs @@ -39,6 +39,13 @@ namespace TemuKJD.WXForms.ProductForms System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); 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 dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.ucGroupBoxEx4 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); this.label5 = new System.Windows.Forms.Label(); @@ -122,9 +129,40 @@ namespace TemuKJD.WXForms.ProductForms this.txtContactPerson = new System.Windows.Forms.TextBox(); this.label4 = new System.Windows.Forms.Label(); this.pbLoading = new System.Windows.Forms.PictureBox(); + this.tabPage3 = new System.Windows.Forms.TabPage(); + this.splitContainer6 = new System.Windows.Forms.SplitContainer(); + this.btnStopSearchTalentProd = new DevComponents.DotNetBar.PanelEx(); + this.btnSearchDaRenProd = new DevComponents.DotNetBar.PanelEx(); + this.txtSaleCount = new System.Windows.Forms.TextBox(); + this.label18 = new System.Windows.Forms.Label(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.dgvDaRenProd = new TemuKJD.UserComponent.DataGridViewEx(); this.chkTestNoAuditUpload = new TemuKJD.UserComponent.UcCheckBox(this.components); this.splitContainer4 = new System.Windows.Forms.SplitContainer(); this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); + this.colDgvProdCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colDgvProdShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colDgvProdShopName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colDgvProdLogin = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colDgvProdInShop = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colDgvProdTalentAppid = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colDgvProdTalentFindUserId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colDgvProdNickname = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colObjectId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colLiveObjectImgUrl = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colLiveObjectImg = new System.Windows.Forms.DataGridViewImageColumn(); + this.colObjectTitle = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colLiveInfo = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colDgvProdImgUrl = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colDgvProdImg = new System.Windows.Forms.DataGridViewImageColumn(); + this.colSpuAppid = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSpuShopName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSpuid = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colLiveProdName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colPrice = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colMonthSale = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colTalkWithTalent = new System.Windows.Forms.DataGridViewLinkColumn(); + this.dataGridViewTextBoxColumn13 = new System.Windows.Forms.DataGridViewTextBoxColumn(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -150,6 +188,13 @@ namespace TemuKJD.WXForms.ProductForms this.splitContainer5.Panel2.SuspendLayout(); this.splitContainer5.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit(); + this.tabPage3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer6)).BeginInit(); + this.splitContainer6.Panel1.SuspendLayout(); + this.splitContainer6.Panel2.SuspendLayout(); + this.splitContainer6.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvDaRenProd)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).BeginInit(); this.splitContainer4.Panel1.SuspendLayout(); this.splitContainer4.SuspendLayout(); @@ -808,7 +853,7 @@ namespace TemuKJD.WXForms.ProductForms this.dgvTalent.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); 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.Font = new System.Drawing.Font("微软雅黑", 9F); dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; @@ -840,7 +885,7 @@ namespace TemuKJD.WXForms.ProductForms this.dgvTalent.Name = "dgvTalent"; this.dgvTalent.ReadOnly = true; this.dgvTalent.RowTemplate.Height = 23; - this.dgvTalent.Size = new System.Drawing.Size(971, 438); + this.dgvTalent.Size = new System.Drawing.Size(1075, 438); this.dgvTalent.TabIndex = 187; this.dgvTalent.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvTalent_CellContentClick); // @@ -998,7 +1043,7 @@ namespace TemuKJD.WXForms.ProductForms // splitContainer3.Panel2 // this.splitContainer3.Panel2.Controls.Add(this.splitContainer4); - this.splitContainer3.Size = new System.Drawing.Size(1346, 641); + this.splitContainer3.Size = new System.Drawing.Size(1450, 641); this.splitContainer3.SplitterDistance = 611; this.splitContainer3.TabIndex = 1; // @@ -1017,7 +1062,7 @@ namespace TemuKJD.WXForms.ProductForms // this.splitContainer2.Panel2.Controls.Add(this.ucTabControl1); this.splitContainer2.Panel2.Controls.Add(this.chkTestNoAuditUpload); - this.splitContainer2.Size = new System.Drawing.Size(1346, 611); + this.splitContainer2.Size = new System.Drawing.Size(1450, 611); this.splitContainer2.SplitterDistance = 365; this.splitContainer2.TabIndex = 0; // @@ -1026,13 +1071,15 @@ namespace TemuKJD.WXForms.ProductForms this.ucTabControl1.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(251)))), ((int)(((byte)(251)))), ((int)(((byte)(251))))); this.ucTabControl1.Controls.Add(this.tabPage1); this.ucTabControl1.Controls.Add(this.tabPage2); + this.ucTabControl1.Controls.Add(this.tabPage3); this.ucTabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.ucTabControl1.Font = new System.Drawing.Font("微软雅黑", 11F); this.ucTabControl1.ItemSize = new System.Drawing.Size(73, 28); this.ucTabControl1.Location = new System.Drawing.Point(0, 0); this.ucTabControl1.Name = "ucTabControl1"; this.ucTabControl1.SelectedIndex = 0; this.ucTabControl1.ShowCloseButton = false; - this.ucTabControl1.Size = new System.Drawing.Size(977, 611); + this.ucTabControl1.Size = new System.Drawing.Size(1081, 611); this.ucTabControl1.TabIndex = 780; this.ucTabControl1.TabSelectColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.ucTabControl1.TabSelectTextColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); @@ -1043,9 +1090,9 @@ namespace TemuKJD.WXForms.ProductForms this.tabPage1.Controls.Add(this.mainPanel); this.tabPage1.Location = new System.Drawing.Point(2, 32); this.tabPage1.Name = "tabPage1"; - this.tabPage1.Size = new System.Drawing.Size(971, 575); + this.tabPage1.Size = new System.Drawing.Size(1075, 575); this.tabPage1.TabIndex = 1; - this.tabPage1.Text = "达人广场"; + this.tabPage1.Text = " 达人广场 "; this.tabPage1.UseVisualStyleBackColor = true; // // mainPanel @@ -1053,7 +1100,7 @@ namespace TemuKJD.WXForms.ProductForms this.mainPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.mainPanel.Location = new System.Drawing.Point(0, 0); this.mainPanel.Name = "mainPanel"; - this.mainPanel.Size = new System.Drawing.Size(971, 575); + this.mainPanel.Size = new System.Drawing.Size(1075, 575); this.mainPanel.TabIndex = 1; // // tabPage2 @@ -1061,9 +1108,9 @@ namespace TemuKJD.WXForms.ProductForms this.tabPage2.Controls.Add(this.splitContainer5); this.tabPage2.Location = new System.Drawing.Point(2, 32); this.tabPage2.Name = "tabPage2"; - this.tabPage2.Size = new System.Drawing.Size(971, 575); + this.tabPage2.Size = new System.Drawing.Size(1075, 575); this.tabPage2.TabIndex = 2; - this.tabPage2.Text = "操作列表"; + this.tabPage2.Text = " 操作列表 "; this.tabPage2.UseVisualStyleBackColor = true; // // splitContainer5 @@ -1071,6 +1118,7 @@ namespace TemuKJD.WXForms.ProductForms this.splitContainer5.BackColor = System.Drawing.Color.White; this.splitContainer5.Dock = System.Windows.Forms.DockStyle.Fill; this.splitContainer5.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer5.Font = new System.Drawing.Font("微软雅黑", 9F); this.splitContainer5.Location = new System.Drawing.Point(0, 0); this.splitContainer5.Name = "splitContainer5"; this.splitContainer5.Orientation = System.Windows.Forms.Orientation.Horizontal; @@ -1096,7 +1144,7 @@ namespace TemuKJD.WXForms.ProductForms // this.splitContainer5.Panel2.Controls.Add(this.pbLoading); this.splitContainer5.Panel2.Controls.Add(this.dgvTalent); - this.splitContainer5.Size = new System.Drawing.Size(971, 575); + this.splitContainer5.Size = new System.Drawing.Size(1075, 575); this.splitContainer5.SplitterDistance = 133; this.splitContainer5.TabIndex = 0; // @@ -1119,7 +1167,7 @@ namespace TemuKJD.WXForms.ProductForms this.btnStop2.CanvasColor = System.Drawing.SystemColors.Control; this.btnStop2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnStop2.DisabledBackColor = System.Drawing.Color.Empty; - this.btnStop2.Location = new System.Drawing.Point(898, 97); + this.btnStop2.Location = new System.Drawing.Point(1002, 97); this.btnStop2.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); this.btnStop2.Name = "btnStop2"; this.btnStop2.Size = new System.Drawing.Size(56, 25); @@ -1146,7 +1194,7 @@ namespace TemuKJD.WXForms.ProductForms this.btnAddFinder.Cursor = System.Windows.Forms.Cursors.Hand; this.btnAddFinder.DisabledBackColor = System.Drawing.Color.Empty; this.btnAddFinder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnAddFinder.Location = new System.Drawing.Point(812, 97); + this.btnAddFinder.Location = new System.Drawing.Point(916, 97); this.btnAddFinder.Name = "btnAddFinder"; this.btnAddFinder.Size = new System.Drawing.Size(84, 25); this.btnAddFinder.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -1183,7 +1231,7 @@ namespace TemuKJD.WXForms.ProductForms this.txtProductIds.Location = new System.Drawing.Point(630, 9); this.txtProductIds.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtProductIds.Name = "txtProductIds"; - this.txtProductIds.Size = new System.Drawing.Size(326, 25); + this.txtProductIds.Size = new System.Drawing.Size(430, 25); this.txtProductIds.TabIndex = 849; // // label9 @@ -1286,7 +1334,7 @@ namespace TemuKJD.WXForms.ProductForms // this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None; this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; - this.pbLoading.Location = new System.Drawing.Point(460, 194); + this.pbLoading.Location = new System.Drawing.Point(512, 194); this.pbLoading.Name = "pbLoading"; this.pbLoading.Size = new System.Drawing.Size(50, 50); this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; @@ -1294,6 +1342,176 @@ namespace TemuKJD.WXForms.ProductForms this.pbLoading.TabStop = false; this.pbLoading.Visible = false; // + // tabPage3 + // + this.tabPage3.Controls.Add(this.splitContainer6); + this.tabPage3.Location = new System.Drawing.Point(2, 32); + this.tabPage3.Name = "tabPage3"; + this.tabPage3.Size = new System.Drawing.Size(1075, 575); + this.tabPage3.TabIndex = 3; + this.tabPage3.Text = " 带货商品 "; + this.tabPage3.UseVisualStyleBackColor = true; + // + // splitContainer6 + // + this.splitContainer6.BackColor = System.Drawing.Color.White; + this.splitContainer6.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer6.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer6.Font = new System.Drawing.Font("微软雅黑", 9F); + this.splitContainer6.Location = new System.Drawing.Point(0, 0); + this.splitContainer6.Name = "splitContainer6"; + this.splitContainer6.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer6.Panel1 + // + this.splitContainer6.Panel1.Controls.Add(this.btnStopSearchTalentProd); + this.splitContainer6.Panel1.Controls.Add(this.btnSearchDaRenProd); + this.splitContainer6.Panel1.Controls.Add(this.txtSaleCount); + this.splitContainer6.Panel1.Controls.Add(this.label18); + // + // splitContainer6.Panel2 + // + this.splitContainer6.Panel2.Controls.Add(this.pictureBox1); + this.splitContainer6.Panel2.Controls.Add(this.dgvDaRenProd); + this.splitContainer6.Size = new System.Drawing.Size(1075, 575); + this.splitContainer6.SplitterDistance = 39; + this.splitContainer6.TabIndex = 1; + // + // btnStopSearchTalentProd + // + this.btnStopSearchTalentProd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnStopSearchTalentProd.CanvasColor = System.Drawing.SystemColors.Control; + this.btnStopSearchTalentProd.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnStopSearchTalentProd.DisabledBackColor = System.Drawing.Color.Empty; + this.btnStopSearchTalentProd.Location = new System.Drawing.Point(1002, 8); + this.btnStopSearchTalentProd.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); + this.btnStopSearchTalentProd.Name = "btnStopSearchTalentProd"; + this.btnStopSearchTalentProd.Size = new System.Drawing.Size(56, 25); + this.btnStopSearchTalentProd.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnStopSearchTalentProd.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnStopSearchTalentProd.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnStopSearchTalentProd.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnStopSearchTalentProd.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStopSearchTalentProd.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnStopSearchTalentProd.Style.GradientAngle = 90; + this.btnStopSearchTalentProd.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnStopSearchTalentProd.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnStopSearchTalentProd.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStopSearchTalentProd.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStopSearchTalentProd.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnStopSearchTalentProd.TabIndex = 858; + this.btnStopSearchTalentProd.Text = "停止查询"; + this.btnStopSearchTalentProd.Click += new System.EventHandler(this.btnStopSearchTalentProd_Click); + // + // btnSearchDaRenProd + // + this.btnSearchDaRenProd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnSearchDaRenProd.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnSearchDaRenProd.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSearchDaRenProd.DisabledBackColor = System.Drawing.Color.Empty; + this.btnSearchDaRenProd.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSearchDaRenProd.Location = new System.Drawing.Point(871, 8); + this.btnSearchDaRenProd.Name = "btnSearchDaRenProd"; + this.btnSearchDaRenProd.Size = new System.Drawing.Size(129, 25); + this.btnSearchDaRenProd.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearchDaRenProd.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearchDaRenProd.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearchDaRenProd.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnSearchDaRenProd.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnSearchDaRenProd.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnSearchDaRenProd.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnSearchDaRenProd.Style.GradientAngle = 90; + this.btnSearchDaRenProd.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearchDaRenProd.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearchDaRenProd.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearchDaRenProd.TabIndex = 857; + this.btnSearchDaRenProd.Text = "查询达人带货商品"; + this.btnSearchDaRenProd.Click += new System.EventHandler(this.btnSearch_Click); + // + // txtSaleCount + // + this.txtSaleCount.Font = new System.Drawing.Font("微软雅黑", 10F); + this.txtSaleCount.Location = new System.Drawing.Point(77, 8); + this.txtSaleCount.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtSaleCount.Name = "txtSaleCount"; + this.txtSaleCount.Size = new System.Drawing.Size(114, 25); + this.txtSaleCount.TabIndex = 841; + this.txtSaleCount.Text = "100"; + // + // label18 + // + this.label18.AutoSize = true; + this.label18.Location = new System.Drawing.Point(15, 12); + this.label18.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(65, 17); + this.label18.TabIndex = 821; + this.label18.Text = "商品销量≥"; + // + // 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(512, 241); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(50, 50); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pictureBox1.TabIndex = 781; + this.pictureBox1.TabStop = false; + this.pictureBox1.Visible = false; + // + // dgvDaRenProd + // + this.dgvDaRenProd.AllowUserToAddRows = false; + this.dgvDaRenProd.AllowUserToDeleteRows = false; + dataGridViewCellStyle8.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvDaRenProd.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle8; + this.dgvDaRenProd.AutoRowNumber = true; + this.dgvDaRenProd.BackgroundColor = System.Drawing.Color.White; + this.dgvDaRenProd.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle9.Font = new System.Drawing.Font("微软雅黑", 9F); + dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvDaRenProd.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle9; + this.dgvDaRenProd.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvDaRenProd.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.colDgvProdCheck, + this.colDgvProdShopId, + this.colDgvProdShopName, + this.colDgvProdLogin, + this.colDgvProdInShop, + this.colDgvProdTalentAppid, + this.colDgvProdTalentFindUserId, + this.colDgvProdNickname, + this.colObjectId, + this.colLiveObjectImgUrl, + this.colLiveObjectImg, + this.colObjectTitle, + this.colLiveInfo, + this.colDgvProdImgUrl, + this.colDgvProdImg, + this.colSpuAppid, + this.colSpuShopName, + this.colSpuid, + this.colLiveProdName, + this.colPrice, + this.colMonthSale, + this.colTalkWithTalent, + this.dataGridViewTextBoxColumn13}); + this.dgvDaRenProd.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvDaRenProd.Location = new System.Drawing.Point(0, 0); + this.dgvDaRenProd.MultiSelectCheckBox = true; + this.dgvDaRenProd.Name = "dgvDaRenProd"; + this.dgvDaRenProd.ReadOnly = true; + this.dgvDaRenProd.RowTemplate.Height = 23; + this.dgvDaRenProd.Size = new System.Drawing.Size(1075, 532); + this.dgvDaRenProd.TabIndex = 187; + this.dgvDaRenProd.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvDaRenProd_CellContentClick); + // // chkTestNoAuditUpload // this.chkTestNoAuditUpload.AutoSize = true; @@ -1315,8 +1533,8 @@ namespace TemuKJD.WXForms.ProductForms // splitContainer4.Panel1 // this.splitContainer4.Panel1.Controls.Add(this.statusBar); - this.splitContainer4.Size = new System.Drawing.Size(1346, 26); - this.splitContainer4.SplitterDistance = 964; + this.splitContainer4.Size = new System.Drawing.Size(1450, 26); + this.splitContainer4.SplitterDistance = 1068; this.splitContainer4.TabIndex = 3; // // statusBar @@ -1327,14 +1545,198 @@ namespace TemuKJD.WXForms.ProductForms 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(964, 26); + this.statusBar.Size = new System.Drawing.Size(1068, 26); this.statusBar.TabIndex = 2; // + // colDgvProdCheck + // + this.colDgvProdCheck.Frozen = true; + this.colDgvProdCheck.HeaderText = "选择"; + this.colDgvProdCheck.Name = "colDgvProdCheck"; + this.colDgvProdCheck.ReadOnly = true; + this.colDgvProdCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colDgvProdCheck.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colDgvProdCheck.Width = 30; + // + // colDgvProdShopId + // + this.colDgvProdShopId.Frozen = true; + this.colDgvProdShopId.HeaderText = "店铺Id"; + this.colDgvProdShopId.Name = "colDgvProdShopId"; + this.colDgvProdShopId.ReadOnly = true; + this.colDgvProdShopId.Visible = false; + // + // colDgvProdShopName + // + dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colDgvProdShopName.DefaultCellStyle = dataGridViewCellStyle10; + this.colDgvProdShopName.Frozen = true; + this.colDgvProdShopName.HeaderText = "店铺名称"; + this.colDgvProdShopName.Name = "colDgvProdShopName"; + this.colDgvProdShopName.ReadOnly = true; + // + // colDgvProdLogin + // + this.colDgvProdLogin.HeaderText = "登录"; + this.colDgvProdLogin.Name = "colDgvProdLogin"; + this.colDgvProdLogin.ReadOnly = true; + this.colDgvProdLogin.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colDgvProdLogin.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colDgvProdLogin.Visible = false; + this.colDgvProdLogin.Width = 40; + // + // colDgvProdInShop + // + this.colDgvProdInShop.HeaderText = "进店"; + this.colDgvProdInShop.Name = "colDgvProdInShop"; + this.colDgvProdInShop.ReadOnly = true; + this.colDgvProdInShop.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colDgvProdInShop.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colDgvProdInShop.Width = 40; + // + // colDgvProdTalentAppid + // + this.colDgvProdTalentAppid.HeaderText = "达人Id"; + this.colDgvProdTalentAppid.Name = "colDgvProdTalentAppid"; + this.colDgvProdTalentAppid.ReadOnly = true; + this.colDgvProdTalentAppid.Visible = false; + // + // colDgvProdTalentFindUserId + // + this.colDgvProdTalentFindUserId.HeaderText = "达人Id名"; + this.colDgvProdTalentFindUserId.Name = "colDgvProdTalentFindUserId"; + this.colDgvProdTalentFindUserId.ReadOnly = true; + this.colDgvProdTalentFindUserId.Visible = false; + // + // colDgvProdNickname + // + dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colDgvProdNickname.DefaultCellStyle = dataGridViewCellStyle11; + this.colDgvProdNickname.HeaderText = "达人昵称"; + this.colDgvProdNickname.Name = "colDgvProdNickname"; + this.colDgvProdNickname.ReadOnly = true; + // + // colObjectId + // + this.colObjectId.HeaderText = "达人活动ID"; + this.colObjectId.Name = "colObjectId"; + this.colObjectId.ReadOnly = true; + this.colObjectId.Visible = false; + // + // colLiveObjectImgUrl + // + this.colLiveObjectImgUrl.HeaderText = "直播题图地址"; + this.colLiveObjectImgUrl.Name = "colLiveObjectImgUrl"; + this.colLiveObjectImgUrl.ReadOnly = true; + this.colLiveObjectImgUrl.Visible = false; + // + // colLiveObjectImg + // + this.colLiveObjectImg.HeaderText = "直播题图"; + this.colLiveObjectImg.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom; + this.colLiveObjectImg.Name = "colLiveObjectImg"; + this.colLiveObjectImg.ReadOnly = true; + this.colLiveObjectImg.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colLiveObjectImg.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colLiveObjectImg.Width = 62; + // + // colObjectTitle + // + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colObjectTitle.DefaultCellStyle = dataGridViewCellStyle12; + this.colObjectTitle.HeaderText = "直播标题"; + this.colObjectTitle.Name = "colObjectTitle"; + this.colObjectTitle.ReadOnly = true; + this.colObjectTitle.Width = 110; + // + // colLiveInfo + // + dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colLiveInfo.DefaultCellStyle = dataGridViewCellStyle13; + this.colLiveInfo.HeaderText = "直播信息"; + this.colLiveInfo.Name = "colLiveInfo"; + this.colLiveInfo.ReadOnly = true; + this.colLiveInfo.Width = 160; + // + // colDgvProdImgUrl + // + this.colDgvProdImgUrl.HeaderText = "商品图片地址"; + this.colDgvProdImgUrl.Name = "colDgvProdImgUrl"; + this.colDgvProdImgUrl.ReadOnly = true; + this.colDgvProdImgUrl.Visible = false; + // + // colDgvProdImg + // + this.colDgvProdImg.HeaderText = "商品图片"; + this.colDgvProdImg.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom; + this.colDgvProdImg.Name = "colDgvProdImg"; + this.colDgvProdImg.ReadOnly = true; + this.colDgvProdImg.Width = 62; + // + // colSpuAppid + // + this.colSpuAppid.HeaderText = "带货店铺Id"; + this.colSpuAppid.Name = "colSpuAppid"; + this.colSpuAppid.ReadOnly = true; + this.colSpuAppid.Visible = false; + // + // colSpuShopName + // + this.colSpuShopName.HeaderText = "带货店铺名称"; + this.colSpuShopName.Name = "colSpuShopName"; + this.colSpuShopName.ReadOnly = true; + this.colSpuShopName.Visible = false; + // + // colSpuid + // + this.colSpuid.FillWeight = 135F; + this.colSpuid.HeaderText = "带货商品Id"; + this.colSpuid.Name = "colSpuid"; + this.colSpuid.ReadOnly = true; + // + // colLiveProdName + // + dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colLiveProdName.DefaultCellStyle = dataGridViewCellStyle14; + this.colLiveProdName.HeaderText = "带货商品"; + this.colLiveProdName.Name = "colLiveProdName"; + this.colLiveProdName.ReadOnly = true; + this.colLiveProdName.Width = 180; + // + // colPrice + // + this.colPrice.HeaderText = "价格"; + this.colPrice.Name = "colPrice"; + this.colPrice.ReadOnly = true; + this.colPrice.Width = 70; + // + // colMonthSale + // + this.colMonthSale.HeaderText = "月销量"; + this.colMonthSale.Name = "colMonthSale"; + this.colMonthSale.ReadOnly = true; + this.colMonthSale.Width = 70; + // + // colTalkWithTalent + // + this.colTalkWithTalent.HeaderText = "联系达人"; + this.colTalkWithTalent.Name = "colTalkWithTalent"; + this.colTalkWithTalent.ReadOnly = true; + this.colTalkWithTalent.Width = 80; + // + // dataGridViewTextBoxColumn13 + // + this.dataGridViewTextBoxColumn13.HeaderText = "操作结果"; + this.dataGridViewTextBoxColumn13.Name = "dataGridViewTextBoxColumn13"; + this.dataGridViewTextBoxColumn13.ReadOnly = true; + this.dataGridViewTextBoxColumn13.Visible = false; + this.dataGridViewTextBoxColumn13.Width = 240; + // // WXFinderSquareForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; - this.ClientSize = new System.Drawing.Size(1346, 641); + this.ClientSize = new System.Drawing.Size(1450, 641); this.Controls.Add(this.splitContainer3); this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.KeyPreview = true; @@ -1371,6 +1773,14 @@ namespace TemuKJD.WXForms.ProductForms ((System.ComponentModel.ISupportInitialize)(this.splitContainer5)).EndInit(); this.splitContainer5.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit(); + this.tabPage3.ResumeLayout(false); + this.splitContainer6.Panel1.ResumeLayout(false); + this.splitContainer6.Panel1.PerformLayout(); + this.splitContainer6.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer6)).EndInit(); + this.splitContainer6.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvDaRenProd)).EndInit(); this.splitContainer4.Panel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).EndInit(); this.splitContainer4.ResumeLayout(false); @@ -1466,5 +1876,36 @@ namespace TemuKJD.WXForms.ProductForms private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; private UserComponent.UcComboBoxMutiSelect cmbFilterShopGroup; private System.Windows.Forms.Label label24; + private System.Windows.Forms.TabPage tabPage3; + private System.Windows.Forms.SplitContainer splitContainer6; + private DevComponents.DotNetBar.PanelEx btnStopSearchTalentProd; + private DevComponents.DotNetBar.PanelEx btnSearchDaRenProd; + private System.Windows.Forms.TextBox txtSaleCount; + private System.Windows.Forms.Label label18; + private System.Windows.Forms.PictureBox pictureBox1; + private UserComponent.DataGridViewEx dgvDaRenProd; + private System.Windows.Forms.DataGridViewCheckBoxColumn colDgvProdCheck; + private System.Windows.Forms.DataGridViewTextBoxColumn colDgvProdShopId; + private System.Windows.Forms.DataGridViewTextBoxColumn colDgvProdShopName; + private System.Windows.Forms.DataGridViewLinkColumn colDgvProdLogin; + private System.Windows.Forms.DataGridViewLinkColumn colDgvProdInShop; + private System.Windows.Forms.DataGridViewTextBoxColumn colDgvProdTalentAppid; + private System.Windows.Forms.DataGridViewTextBoxColumn colDgvProdTalentFindUserId; + private System.Windows.Forms.DataGridViewTextBoxColumn colDgvProdNickname; + private System.Windows.Forms.DataGridViewTextBoxColumn colObjectId; + private System.Windows.Forms.DataGridViewTextBoxColumn colLiveObjectImgUrl; + private System.Windows.Forms.DataGridViewImageColumn colLiveObjectImg; + private System.Windows.Forms.DataGridViewTextBoxColumn colObjectTitle; + private System.Windows.Forms.DataGridViewTextBoxColumn colLiveInfo; + private System.Windows.Forms.DataGridViewTextBoxColumn colDgvProdImgUrl; + private System.Windows.Forms.DataGridViewImageColumn colDgvProdImg; + private System.Windows.Forms.DataGridViewTextBoxColumn colSpuAppid; + private System.Windows.Forms.DataGridViewTextBoxColumn colSpuShopName; + private System.Windows.Forms.DataGridViewTextBoxColumn colSpuid; + private System.Windows.Forms.DataGridViewTextBoxColumn colLiveProdName; + private System.Windows.Forms.DataGridViewTextBoxColumn colPrice; + private System.Windows.Forms.DataGridViewTextBoxColumn colMonthSale; + private System.Windows.Forms.DataGridViewLinkColumn colTalkWithTalent; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn13; } } \ No newline at end of file diff --git a/TEMUKJD/WXForms/ProductForms/WXFinderSquareForm.cs b/TEMUKJD/WXForms/ProductForms/WXFinderSquareForm.cs index 4f0bbd0..bac3bce 100644 --- a/TEMUKJD/WXForms/ProductForms/WXFinderSquareForm.cs +++ b/TEMUKJD/WXForms/ProductForms/WXFinderSquareForm.cs @@ -52,6 +52,7 @@ namespace TemuKJD.WXForms.ProductForms int PageEnd = 20; string currentGetTalentParam = ""; List lstWXFinderTalentInfo = new List(); + List lstWXLiveObjectInfo = new List(); public WXFinderSquareForm() { @@ -94,6 +95,10 @@ namespace TemuKJD.WXForms.ProductForms this.dgvTalent.AddSelectorColumn("colCheck"); dgvTalent.AddImgColumn("colImg", "colImgUrl"); + this.dgvDaRenProd.AddSelectorColumn("colDgvProdCheck"); + dgvDaRenProd.AddImgColumn("colLiveObjectImg", "colLiveObjectImgUrl"); + dgvDaRenProd.AddImgColumn("colDgvProdImg", "colDgvProdImgUrl"); + InitCef(); Task.Run(() => { @@ -154,6 +159,11 @@ namespace TemuKJD.WXForms.ProductForms { currentGetTalentParam = postData; } + + if (/*responseData.Contains("mpAppid") ||*/ responseData.Contains("wxb32c03106e812d73")) + { + + } } private void MainLifeHandler_OnPop(object sender, PopData e) { @@ -1120,6 +1130,317 @@ namespace TemuKJD.WXForms.ProductForms wxProdIdWithListingTimeLst = wxProdIdWithListingTimeLst.OrderByDescending(p => p.soldNum).ThenByDescending(p => p.listingTime).ToList().Take(30).ToList(); return string.Join(",", wxProdIdWithListingTimeLst.Select(p => p.spuId)); } + + private void btnSearch_Click(object sender, EventArgs e) + { + var selectRows = dgvTalent.Rows.Cast().Where(r => r.Cells["colCheck"].Value.ParseToBool() == true).ToList(); + if (selectRows.Count == 0) + { + BaseMsgForm.ShowError("请在操作列表页选择要查询的达人"); + return; + } + pictureBox1.Visible = true; + string prodIds = txtProductIds.Text.Trim(); + + this.btnSearchDaRenProd.Enabled = false; + Task.Run(() => { + Thread.Sleep(5000); + Invoke(new Action(() => { this.btnSearchDaRenProd.Enabled = true; })); + }); + + dgvDaRenProd.Rows.Clear(); + lstWXLiveObjectInfo.Clear(); + + if (cancellationTokenSource != null) + cancellationTokenSource.Cancel(); + cancellationTokenSource = new CancellationTokenSource(); + Task.Run(() => + { + { + int num = 0; + foreach (var row in selectRows) + { + num++; + Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "达人带货商品查询 第 " + num + " 位,共 " + selectRows.Count + " 位达人"; + row.Cells["colOpResult"].Value = ""; + })); + if (this.cancellationTokenSource.IsCancellationRequested) + break; + + var shopId = row.Cells["colSupplierId"].Value.ParseToString(); + var shop = GlobalConfig.ValidShopLoginList.FirstOrDefault(s => s.ShopId == shopId); + if (chkReUse.Visible && chkReUse.Checked) + shop = currentShop; + var talentAppid = row.Cells["colTalentAppid"].Value.ParseToString(); + var talent = this.lstWXFinderTalentInfo.FirstOrDefault(t => t.talentAppid == talentAppid); + + if (shop != null && talent != null && talent.accountList != null) + { + var finderUser = talent.accountList.FirstOrDefault(a => !a.finderUsername.IsNullOrEmpty() && !a.mpAppid.IsNullOrEmpty()); + finderUser = talent.accountList.FirstOrDefault(a => !a.finderUsername.IsNullOrEmpty()); + var finderUsername = finderUser?.finderUsername; + var mpAppid = finderUser?.mpAppid; + var endMs = BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now.Date) - 1; + var startMs = BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now.Date.AddDays(-7)); + int page = 0; + int pageSize = 10; + + while (true) + { + page++; + var getLiveObjectRst = WXFinderSquareBLL.GetDaRenLiveFeedList(shop, finderUsername, mpAppid, talent.talentAppid, startMs, endMs, 1, page, pageSize); + Thread.Sleep(Randomx.GetId(300, 600)); + + if (!getLiveObjectRst.ParseToString().Contains("\"code\":0")) + { + var error = BaseRegex.GetStringJsonByRegs(ref getLiveObjectRst, getLiveObjectRst, "errmsg"); + if (error.ParseToString().Contains("biz magic invalid")) + { + shop.LoginStatus = "未登录"; + var selectIds = dgvShop.Rows.Cast().Where(r + => r.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList(); + Invoke(new Action(() => { BindShop(shop, selectIds, "店铺掉线"); })); + error = "店铺掉线"; + } + Invoke(new Action(() => + { + row.Cells["colOpResult"].Value = "达人带货商品查询失败 " + error; + })); + break; + } + + var wxLiveObjectInfoResult = JsonHelper.DeserializeJsonToObject(getLiveObjectRst); + var liveList = wxLiveObjectInfoResult.list; + this.lstWXLiveObjectInfo.AddRange(liveList); + foreach (var live in liveList) + { + foreach (var prod in live.productList.list) + { + Invoke(new Action(() => + { + if (prod.spuMonthSales.ParseToInt() >= txtSaleCount.Text.Trim().ParseToInt()) + { + var startTimeStr = BaseClass.StampToDateTime(live.liveObjectStartTime.ParseToInt()).ToString("yy-MM-dd HH:mm"); + var duration = new TimeSpan(live.liveObjectDuringTimeSecond.ParseToLong() * 10000000); + var durationStr = duration.Hours + "时" + (Math.Ceiling(duration.TotalMinutes).ParseToInt() - duration.Hours * 60) + "分"; + var rowIndex = dgvDaRenProd.Rows.Add( + false, + shop.ShopId, + shop.ShopAccount, + "登录", + "进店", + talent.talentAppid, + finderUser.finderUsername, + finderUser.nickname, // 达人昵称 + live.objectId, // 达人活动ID + live.liveObjectImg, + DataGridViewExtension.defaultBitmap, // 直播标题图 + live.liveObjectDescription, // 达人活动直播标题 + startTimeStr + "\r\n" + durationStr + " " + "观看人数" + live.livediagnosisFinderuinxfeedidWatchUv.ParseToInt(), + prod.spuImgUrl, + DataGridViewExtension.defaultBitmap, + prod.spuAppid, + prod.spuShopNickname, + prod.spuId, + prod.spuName, + prod.spuPrice.ParseToInt() * 0.01m, + prod.spuMonthSales.ParseToInt(), + "联系达人" + ); + dgvDaRenProd.Rows[rowIndex].Height = 60; + } + })); + } + + if (live.productList.total > 10) + { + int prodPage = 1; + int prodPageSize = 10; + var prodTotalPage = Math.Ceiling(live.productList.total.ParseToInt() * 1m / prodPageSize).ParseToInt(); + + while (prodPage < prodTotalPage) + { + if (this.cancellationTokenSource.IsCancellationRequested) + break; + + prodPage++; + var getProdRst = WXFinderSquareBLL.GetDaRenLiveProductList(shop, finderUsername, mpAppid, talentAppid, live.objectId, prodPage, prodPageSize); + Thread.Sleep(Randomx.GetId(300, 600)); + + if (!getProdRst.ParseToString().Contains("\"code\":0")) + { + var error = BaseRegex.GetStringJsonByRegs(ref getProdRst, getProdRst, "errmsg"); + if (error.ParseToString().Contains("biz magic invalid")) + { + shop.LoginStatus = "未登录"; + var selectIds = dgvShop.Rows.Cast().Where(r + => r.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList(); + Invoke(new Action(() => { BindShop(shop, selectIds, "店铺掉线"); })); + error = "店铺掉线"; + } + Invoke(new Action(() => + { + row.Cells["colOpResult"].Value = "达人带货商品查询失败 " + error; + })); + break; + } + + var darenProdLst = JsonHelper.DeserializeJsonToList(JsonHelper.JObjectParse(getProdRst)["list"].ParseToString()); + live.productList.list.AddRange(darenProdLst); + + foreach (var prod in darenProdLst) + { + Invoke(new Action(() => + { + if (prod.spuMonthSales.ParseToInt() >= txtSaleCount.Text.Trim().ParseToInt()) + { + var startTimeStr = BaseClass.StampToDateTime(live.liveObjectStartTime.ParseToInt()).ToString("yy-MM-dd HH:mm"); + var duration = new TimeSpan(live.liveObjectDuringTimeSecond.ParseToLong() * 10000000); + var durationStr = duration.Hours + "时" + (Math.Ceiling(duration.TotalMinutes).ParseToInt() - duration.Hours * 60) + "分"; + var rowIndex = dgvDaRenProd.Rows.Add( + false, + shop.ShopId, + shop.ShopAccount, + "登录", + "进店", + talent.talentAppid, + finderUser.finderUsername, + finderUser.nickname, // 达人昵称 + live.objectId, // 达人活动ID + live.liveObjectImg, + DataGridViewExtension.defaultBitmap, // 直播标题图 + live.liveObjectDescription, // 达人活动直播标题 + startTimeStr + "\r\n" + durationStr + " " + "观看人数" + live.livediagnosisFinderuinxfeedidWatchUv.ParseToInt(), + prod.spuImgUrl, + DataGridViewExtension.defaultBitmap, + prod.spuAppid, + prod.spuShopNickname, + prod.spuId, + prod.spuName, + prod.spuPrice.ParseToInt() * 0.01m, + prod.spuMonthSales.ParseToInt(), + "联系达人" + ); + dgvDaRenProd.Rows[rowIndex].Height = 60; + } + })); + } + } + } + } + + + var total = wxLiveObjectInfoResult.total.ParseToInt(); + var totalPage = Math.Ceiling(total * 1m / pageSize).ParseToInt(); + if (page >= totalPage) + break; + } + } + } + } + + Invoke(new Action(() => + { + pictureBox1.Visible = false; + this.statusBar.lblTaskStatus.Text += "达人带货商品查询操作结束"; + BaseMsgForm.ShowInfo("达人带货商品查询操作结束"); + })); + }, cancellationTokenSource.Token); + } + + private void btnStopSearchTalentProd_Click(object sender, EventArgs e) + { + if (this.cancellationTokenSource != null) + this.cancellationTokenSource.Cancel(); + } + + private void dgvDaRenProd_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex < 0 || e.RowIndex < 0) + return; + string headerText = dgvDaRenProd.Columns[e.ColumnIndex].HeaderText; + var shopId = dgvDaRenProd.Rows[e.RowIndex].Cells["colDgvProdShopId"].Value.ParseToString(); + var shop = GlobalConfig.ValidShopLoginList.FirstOrDefault(s => s.ShopId == shopId); + var talentAppid = dgvDaRenProd.Rows[e.RowIndex].Cells["colDgvProdTalentAppid"].Value.ParseToString(); + var talent = this.lstWXFinderTalentInfo.FirstOrDefault(t => t.talentAppid == talentAppid); + + switch (headerText) + { + case "删除": + break; + case "登录": + { + WXShopLoginForm shopLoginForm = new WXShopLoginForm(shop); + shopLoginForm.openType = EnumOpenType.login; + shopLoginForm.ShowDialog(); + RefreshShopLogin(); + } + break; + case "进店": + { + WXShopLoginForm shopLoginForm = new WXShopLoginForm(shop); + WXShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false); + if (shop.LoginStatus == "登录成功") + { + shopLoginForm.openType = EnumOpenType.manage; + shopLoginForm.WindowState = FormWindowState.Maximized; + shopLoginForm.InitUrl = "https://store.weixin.qq.com/shop/home"; + shopLoginForm.Show(); + } + else + { + shopLoginForm.openType = EnumOpenType.login; + shopLoginForm.ShowDialog(); + RefreshShopLogin(); + } + } + break; + case "商品图片": + { + ShowImgForm imgFrom = new ShowImgForm(dgvDaRenProd.Rows[e.RowIndex].Cells["colDgvProdImgUrl"].Value.ParseToString()); + imgFrom.ShowDialog(); + break; + } + case "直播题图": + { + ShowImgForm imgFrom = new ShowImgForm(dgvDaRenProd.Rows[e.RowIndex].Cells["colLiveObjectImgUrl"].Value.ParseToString()); + imgFrom.ShowDialog(); + break; + } + case "联系达人": + { + var finderUser = talent.accountList?.FirstOrDefault(a => !a.finderUsername.IsNullOrEmpty()); + if (finderUser != null) + { + var createChatRst = WXFinderSquareBLL.userCreateChatRoom(shop, finderUser.finderUsername, finderUser.mpAppid, talentAppid); + + //ShowImgForm imgFrom = new ShowImgForm(dgvDaRenProd.Rows[e.RowIndex].Cells["colLiveObjectImgUrl"].Value.ParseToString()); + //imgFrom.ShowDialog(); + + var room_id = BaseRegex.GetStringJson(ref createChatRst, "room_id"); + if (string.IsNullOrEmpty(room_id)) + { + BaseMsgForm.ShowError("联系窗口打开失败,请重试"); + } + else + { + WXShopLoginForm loginForm = new WXShopLoginForm(shop); + loginForm.openType = EnumOpenType.manage; + loginForm.InitUrl = "https://store.weixin.qq.com/shop/kf/collab/im?mode=business&roomId=" + room_id; + loginForm.Show(); + } + } + break; + } + case "": + dgvDaRenProd.Rows[e.RowIndex].Cells["colDgvProdCheck"].Value = !(bool)dgvDaRenProd.Rows[e.RowIndex].Cells["colDgvProdCheck"].Value; + break; + default: + break; + } + } } public class WXFinderSquareBLL @@ -1183,6 +1504,65 @@ namespace TemuKJD.WXForms.ProductForms var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer); return result; } + + /// + /// + /// + /// + /// + /// + /// + /// 直播或短视频带货 1直播 2短视频 + /// + /// + /// + public static string GetDaRenLiveFeedList(ShopLoginInfo shop, string finderUsername, string mpAppid, string talentAppid, long startMs, long endMs, int liveOrFeed = 1, int page = 1, int pageSize = 10) + { + + string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeleague/finderSquare/cgi/GetSameIndustryDetailLiveFeedList?token=&lang=zh_CN"; + //"https://store.weixin.qq.com/shop/findersquare/finder-detail?from=5&fromTab=all&finderUsername=v2_060000231003b20faec8c7e58110c3d5ca01ee32b077ca155bf8a7fb3c2469d6ba215af008d9@finder&mpAppid=wx0e6b9a6557b6c7a9&talentAppid=wx34b8353cf2e12005"; + string referer = "https://store.weixin.qq.com/shop/findersquare/finder-detail?from=5&fromTab=all&finderUsername=" + finderUsername; + if (!mpAppid.IsNullOrEmpty()) + referer += "&mpAppid=" + mpAppid; + referer += "&talentAppid=" + talentAppid; + //{"appid":"wx34b8353cf2e12005","liveOrFeed":1,"page":{"limit":10,"offset":0},"startMs":1778342400000,"endMs":1780934399999,"sortControl":null} + //{"appid":"wx34b8353cf2e12005","liveOrFeed":1,"page":{"limit":10,"offset":0},"startMs":1778342400000,"endMs":1780934399999,"sortControl":[{"sortColName":"livediagnosis_finderuinxfeedid_watch_uv","sortRule":1}]} //sortRule 1 降序 + string body = @"{""appid"":""" + talentAppid + @""",""liveOrFeed"":" + liveOrFeed + @",""page"":{""limit"":" + pageSize + @",""offset"":" + (page - 1) * 10 + + @"},""startMs"":" + startMs + @",""endMs"":" + endMs + @",""sortControl"":null}"; + + var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer); + return result; + } + public static string GetDaRenLiveProductList(ShopLoginInfo shop, string finderUsername, string mpAppid, string talentAppid, string objectId, int page = 1, int pageSize = 10) + { + + string url = "https://store.weixin.qq.com/shop-faas/mmchannelstradeleague/finderSquare/cgi/getLiveProductList?token=&lang=zh_CN"; + //"https://store.weixin.qq.com/shop/findersquare/finder-detail?from=5&fromTab=all&finderUsername=v2_060000231003b20faec8c7e58110c3d5ca01ee32b077ca155bf8a7fb3c2469d6ba215af008d9@finder&mpAppid=wx0e6b9a6557b6c7a9&talentAppid=wx34b8353cf2e12005"; + string referer = "https://store.weixin.qq.com/shop/findersquare/finder-detail?from=5&fromTab=all&finderUsername=" + finderUsername; + if (!mpAppid.IsNullOrEmpty()) + referer += "&mpAppid=" + mpAppid; + referer += "&talentAppid=" + talentAppid; + string body = @"{""appid"":""" + talentAppid + @""",""objectId"":""" + objectId + @""",""limit"":" + pageSize + @",""offset"":" + (page - 1) * 10 + @"}"; + + var result = WXHttpResponseBLL.WeiXinPostResponse(shop, url, body, referer); + return result; + } + + + public static string userCreateChatRoom(ShopLoginInfo shop, string finderUsername, string mpAppid, string talentAppid) + { + + string url = "https://store.weixin.qq.com/shop/commkf/user_room?action=user_create_room&token=&lang=zh_CN"; + //"https://store.weixin.qq.com/shop/findersquare/finder-detail?from=5&fromTab=all&finderUsername=v2_060000231003b20faec8c7e58110c3d5ca01ee32b077ca155bf8a7fb3c2469d6ba215af008d9@finder&mpAppid=wx0e6b9a6557b6c7a9&talentAppid=wx34b8353cf2e12005"; + string referer = "https://store.weixin.qq.com/shop/findersquare/finder-detail?from=1&fromTab=all&finderUsername=" + finderUsername; + if (!mpAppid.IsNullOrEmpty()) + referer += "&mpAppid=" + mpAppid; + referer += "&talentAppid=" + talentAppid; + string body = @"{""open_account"":""" + talentAppid + @"""}"; + + var result = WXHttpResponseBLL.WeiXinTalentOpenKfPostResponse(shop, url, body, referer); + return result; + } } public class WXAddFinderParam diff --git a/TEMUKJD/WXForms/ProductForms/WXFinderSquareForm.resx b/TEMUKJD/WXForms/ProductForms/WXFinderSquareForm.resx index 13f36fc..f688326 100644 --- a/TEMUKJD/WXForms/ProductForms/WXFinderSquareForm.resx +++ b/TEMUKJD/WXForms/ProductForms/WXFinderSquareForm.resx @@ -210,4 +210,73 @@ True + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + \ No newline at end of file diff --git a/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.Designer.cs index 6f8eec8..c9c6482 100644 --- a/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.Designer.cs +++ b/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.Designer.cs @@ -143,6 +143,9 @@ namespace TemuKJD.WXForms.ProductForms this.colOpResult = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.splitContainer4 = new System.Windows.Forms.SplitContainer(); this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); + this.chkNotDownCount = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.txtNotDownCount = new System.Windows.Forms.TextBox(); + this.label6 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -439,6 +442,9 @@ namespace TemuKJD.WXForms.ProductForms this.ucGroupBoxEx2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.ucGroupBoxEx2.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx2.Controls.Add(this.label6); + this.ucGroupBoxEx2.Controls.Add(this.txtNotDownCount); + this.ucGroupBoxEx2.Controls.Add(this.chkNotDownCount); this.ucGroupBoxEx2.Controls.Add(this.chkFailDownProd); this.ucGroupBoxEx2.Controls.Add(this.chkNoPreSale); this.ucGroupBoxEx2.Controls.Add(this.label18); @@ -457,11 +463,11 @@ namespace TemuKJD.WXForms.ProductForms // chkFailDownProd // this.chkFailDownProd.AutoSize = true; - this.chkFailDownProd.Location = new System.Drawing.Point(21, 64); + this.chkFailDownProd.Location = new System.Drawing.Point(17, 64); this.chkFailDownProd.Name = "chkFailDownProd"; - this.chkFailDownProd.Size = new System.Drawing.Size(183, 21); + this.chkFailDownProd.Size = new System.Drawing.Size(171, 21); this.chkFailDownProd.TabIndex = 820; - this.chkFailDownProd.Text = "如果预售操作失败则下架商品"; + this.chkFailDownProd.Text = "如果预售操作失败下架商品"; this.chkFailDownProd.UseVisualStyleBackColor = true; // // chkNoPreSale @@ -469,7 +475,7 @@ namespace TemuKJD.WXForms.ProductForms this.chkNoPreSale.AutoSize = true; this.chkNoPreSale.Checked = true; this.chkNoPreSale.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkNoPreSale.Location = new System.Drawing.Point(21, 30); + this.chkNoPreSale.Location = new System.Drawing.Point(17, 30); this.chkNoPreSale.Name = "chkNoPreSale"; this.chkNoPreSale.Size = new System.Drawing.Size(75, 21); this.chkNoPreSale.TabIndex = 810; @@ -480,7 +486,7 @@ namespace TemuKJD.WXForms.ProductForms // label18 // this.label18.AutoSize = true; - this.label18.Location = new System.Drawing.Point(236, 32); + this.label18.Location = new System.Drawing.Point(232, 32); this.label18.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); this.label18.Name = "label18"; this.label18.Size = new System.Drawing.Size(54, 17); @@ -489,7 +495,7 @@ namespace TemuKJD.WXForms.ProductForms // // txtPreDays // - this.txtPreDays.Location = new System.Drawing.Point(203, 29); + this.txtPreDays.Location = new System.Drawing.Point(199, 29); this.txtPreDays.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.txtPreDays.Name = "txtPreDays"; this.txtPreDays.Size = new System.Drawing.Size(33, 23); @@ -500,7 +506,7 @@ namespace TemuKJD.WXForms.ProductForms // chkPreSale // this.chkPreSale.AutoSize = true; - this.chkPreSale.Location = new System.Drawing.Point(111, 30); + this.chkPreSale.Location = new System.Drawing.Point(107, 30); this.chkPreSale.Name = "chkPreSale"; this.chkPreSale.Size = new System.Drawing.Size(99, 21); this.chkPreSale.TabIndex = 789; @@ -514,7 +520,7 @@ namespace TemuKJD.WXForms.ProductForms this.btnStop.CanvasColor = System.Drawing.SystemColors.Control; this.btnStop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnStop.DisabledBackColor = System.Drawing.Color.Empty; - this.btnStop.Location = new System.Drawing.Point(304, 62); + this.btnStop.Location = new System.Drawing.Point(310, 62); this.btnStop.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); this.btnStop.Name = "btnStop"; this.btnStop.Size = new System.Drawing.Size(84, 23); @@ -540,7 +546,7 @@ namespace TemuKJD.WXForms.ProductForms this.btnClearDgv.CanvasColor = System.Drawing.SystemColors.Control; this.btnClearDgv.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnClearDgv.DisabledBackColor = System.Drawing.Color.Empty; - this.btnClearDgv.Location = new System.Drawing.Point(304, 93); + this.btnClearDgv.Location = new System.Drawing.Point(310, 93); this.btnClearDgv.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); this.btnClearDgv.Name = "btnClearDgv"; this.btnClearDgv.Size = new System.Drawing.Size(84, 23); @@ -567,7 +573,7 @@ namespace TemuKJD.WXForms.ProductForms this.btnSetPreSale.Cursor = System.Windows.Forms.Cursors.Hand; this.btnSetPreSale.DisabledBackColor = System.Drawing.Color.Empty; this.btnSetPreSale.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSetPreSale.Location = new System.Drawing.Point(304, 31); + this.btnSetPreSale.Location = new System.Drawing.Point(310, 31); this.btnSetPreSale.Name = "btnSetPreSale"; this.btnSetPreSale.Size = new System.Drawing.Size(84, 23); this.btnSetPreSale.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -1659,6 +1665,38 @@ namespace TemuKJD.WXForms.ProductForms this.statusBar.Size = new System.Drawing.Size(1165, 26); this.statusBar.TabIndex = 2; // + // chkNotDownCount + // + this.chkNotDownCount.AutoSize = true; + this.chkNotDownCount.Checked = true; + this.chkNotDownCount.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkNotDownCount.Location = new System.Drawing.Point(17, 94); + this.chkNotDownCount.Name = "chkNotDownCount"; + this.chkNotDownCount.Size = new System.Drawing.Size(156, 21); + this.chkNotDownCount.TabIndex = 830; + this.chkNotDownCount.Text = "预售失败也不下架销量≥"; + this.chkNotDownCount.UseVisualStyleBackColor = true; + // + // txtNotDownCount + // + this.txtNotDownCount.Location = new System.Drawing.Point(165, 93); + this.txtNotDownCount.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); + this.txtNotDownCount.Name = "txtNotDownCount"; + this.txtNotDownCount.Size = new System.Drawing.Size(28, 23); + this.txtNotDownCount.TabIndex = 831; + this.txtNotDownCount.Text = "1"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(193, 96); + this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label6.Name = "label6"; + this.label6.RightToLeft = System.Windows.Forms.RightToLeft.Yes; + this.label6.Size = new System.Drawing.Size(32, 17); + this.label6.TabIndex = 832; + this.label6.Text = "商品"; + // // WXProdPreSaleForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -1808,5 +1846,8 @@ namespace TemuKJD.WXForms.ProductForms private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; private UserComponent.UcComboBoxMutiSelect cmbFilterShopGroup; private System.Windows.Forms.Label label24; + private System.Windows.Forms.TextBox txtNotDownCount; + private UserComponent.UcCheckBox chkNotDownCount; + private System.Windows.Forms.Label label6; } } \ No newline at end of file diff --git a/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.cs b/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.cs index 06fbf2a..736a9c1 100644 --- a/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.cs +++ b/TEMUKJD/WXForms/ProductForms/WXProdPreSaleForm.cs @@ -624,14 +624,27 @@ namespace TemuKJD.WXForms.ProductForms if (/*chkPreSale.Checked &&*/ chkFailDownProd.Checked) { - var downProd = WXPreSale.DownProd(shop, prodId); - System.Threading.Thread.Sleep(Randomx.GetId(50, 100)); - if (downProd.Contains("\"code\":0")) + int saleCount = 99999999; + if (chkNotDownCount.Checked) { - errmsg += " 预售设置失败 已下架"; + Invoke(new Action(() => { saleCount = txtNotDownCount.Text.Trim().ParseToInt(); })); + } + + if (chkNotDownCount.Checked && row.Cells["colSoldNum"].Value.ParseToInt() >= saleCount) + { + errmsg += " 预售设置失败 销量大于" + saleCount + ",不下架"; } else - errmsg += " 预售设置失败 下架失败"; + { + var downProd = WXPreSale.DownProd(shop, prodId); + System.Threading.Thread.Sleep(Randomx.GetId(50, 100)); + if (downProd.Contains("\"code\":0")) + { + errmsg += " 预售设置失败 已下架"; + } + else + errmsg += " 预售设置失败 下架失败"; + } } Invoke(new Action(() => { diff --git a/TEMUKJD/WXForms/ProductForms/WXProductForm.cs b/TEMUKJD/WXForms/ProductForms/WXProductForm.cs index 1fff8eb..aceca2f 100644 --- a/TEMUKJD/WXForms/ProductForms/WXProductForm.cs +++ b/TEMUKJD/WXForms/ProductForms/WXProductForm.cs @@ -118,11 +118,11 @@ namespace TemuKJD.WXForms.ProductForms SetForm(orderConsignmentForm.Value); break; case "多多商品采集": - getChanceProdForm.Value.IsAuthorityUser = true; + getChanceProdForm.Value.IsCollectAuthorityUser = true; SetForm(getChanceProdForm.Value); break; case "1688商品采集": - get1688ProdForm.Value.IsAuthorityUser = true; + get1688ProdForm.Value.IsCollectAuthorityUser = true; SetForm(get1688ProdForm.Value); break; } diff --git a/TEMUKJD/WXForms/ProductForms/WXSelectDBProdListForm.cs b/TEMUKJD/WXForms/ProductForms/WXSelectDBProdListForm.cs index 82b2a3c..625cc55 100644 --- a/TEMUKJD/WXForms/ProductForms/WXSelectDBProdListForm.cs +++ b/TEMUKJD/WXForms/ProductForms/WXSelectDBProdListForm.cs @@ -88,7 +88,7 @@ namespace TemuKJD.WXForms.ProductForms cmbHasFission.Visible = true; })); } - if (BaseClass.UserAuthority.Contains("商品裂变")) + if (BaseClass.UserAuthority.Contains("裂变调试")) { Invoke(new Action(() => { @@ -454,8 +454,8 @@ namespace TemuKJD.WXForms.ProductForms if (BaseClass.GroupId != 3) addUserName = BaseClass.ParentAuthority.Contains("商品采集") ? ("admin," + BaseClass.ParentUserName) : "admin"; // 如果指定只有自己采集的商品,则只随机自己采集的商品 - if ((cmbSourceType.Text.Trim().Contains("多多商品") || cmbSourceType.Text.Trim().Contains("1688商品")) && - cmbSourceType.Text.Trim().Replace("多多商品", "").Replace("1688商品", "").Trim(',').IsNullOrEmpty()) + if ((cmbSourceType.Text.Trim().Contains("多多商品") || cmbSourceType.Text.Trim().Contains("1688商品") || cmbSourceType.Text.Trim().Contains("微信商品")) && + cmbSourceType.Text.Trim().Replace("多多商品", "").Replace("1688商品", "").Replace("微信商品", "").Trim(',').IsNullOrEmpty()) data += "&add_user_name=" + (BaseClass.GroupId == 3 ? BaseClass.UserName : BaseClass.ParentUserName); else data += "&add_user_name=" + addUserName; @@ -540,7 +540,7 @@ namespace TemuKJD.WXForms.ProductForms { // 采集来源判断 data += "&product_get_type=" + cmbSourceType.Text.Trim().Replace("已采集数据", "1688外部数据") - .Replace("多多商品", "机会商品,多多外部数据").Replace("1688商品", "1688厂家,1688外部数据"); + .Replace("多多商品", "机会商品,多多外部数据").Replace("1688商品", "1688厂家,1688外部数据").Replace("微信商品", "微信店采"); } if (shop != null && !string.IsNullOrEmpty(shop.ShopId)) { @@ -1236,7 +1236,7 @@ namespace TemuKJD.WXForms.ProductForms if ((BaseClass.UserAuthority.Contains("商品采集") || BaseClass.ParentAuthority.Contains("商品采集")) && !BaseClass.UserAuthority.Contains("货源选择") && BaseClass.SaLevel == 0) { - cmbSourceType.Text = "多多商品,1688商品"; + cmbSourceType.Text = "多多商品,1688商品,微信商品"; cmbExportToOutServer.Text = ""; cmbWxCat.Text = ""; } @@ -1245,7 +1245,7 @@ namespace TemuKJD.WXForms.ProductForms private void cmbGroupFilter_SelectedIndexChanged(object sender, EventArgs e) { - if (cmbGroupFilter.Text == "我的商品" && cmbSourceType.Text != "" && cmbSourceType.Text != "多多商品" && cmbSourceType.Text != "1688商品") + if (cmbGroupFilter.Text == "我的商品" && cmbSourceType.Text != "多多商品" && cmbSourceType.Text != "1688商品" && cmbSourceType.Text != "微信商品") { cmbSourceType.Text = ""; } diff --git a/TEMUKJD/WXForms/ProductForms/WXUserCollectAuthProdListForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXUserCollectAuthProdListForm.Designer.cs index 69b1ef2..e505322 100644 --- a/TEMUKJD/WXForms/ProductForms/WXUserCollectAuthProdListForm.Designer.cs +++ b/TEMUKJD/WXForms/ProductForms/WXUserCollectAuthProdListForm.Designer.cs @@ -495,7 +495,7 @@ namespace TemuKJD.WXForms.ProductForms "", "是", "否"}); - this.cmbHasFission.Location = new System.Drawing.Point(889, 40); + this.cmbHasFission.Location = new System.Drawing.Point(889, 42); this.cmbHasFission.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbHasFission.Name = "cmbHasFission"; this.cmbHasFission.Size = new System.Drawing.Size(100, 25); @@ -593,7 +593,7 @@ namespace TemuKJD.WXForms.ProductForms this.cmbCat1.DropDownWidth = 1; this.cmbCat1.FormattingEnabled = true; this.cmbCat1.IntegralHeight = false; - this.cmbCat1.Location = new System.Drawing.Point(52, 42); + this.cmbCat1.Location = new System.Drawing.Point(52, 40); this.cmbCat1.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbCat1.Name = "cmbCat1"; this.cmbCat1.Size = new System.Drawing.Size(99, 25); @@ -643,7 +643,7 @@ namespace TemuKJD.WXForms.ProductForms this.cmbCat2.DropDownWidth = 1; this.cmbCat2.FormattingEnabled = true; this.cmbCat2.IntegralHeight = false; - this.cmbCat2.Location = new System.Drawing.Point(217, 42); + this.cmbCat2.Location = new System.Drawing.Point(217, 40); this.cmbCat2.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbCat2.Name = "cmbCat2"; this.cmbCat2.Size = new System.Drawing.Size(99, 25); @@ -671,7 +671,7 @@ namespace TemuKJD.WXForms.ProductForms this.cmbCat3.DropDownWidth = 1; this.cmbCat3.FormattingEnabled = true; this.cmbCat3.IntegralHeight = false; - this.cmbCat3.Location = new System.Drawing.Point(366, 42); + this.cmbCat3.Location = new System.Drawing.Point(366, 40); this.cmbCat3.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbCat3.Name = "cmbCat3"; this.cmbCat3.Size = new System.Drawing.Size(99, 25); @@ -698,8 +698,9 @@ namespace TemuKJD.WXForms.ProductForms this.cmbSourceType.Items.AddRange(new object[] { "", "多多商品", - "1688商品"}); - this.cmbSourceType.Location = new System.Drawing.Point(366, 7); + "1688商品", + "微信商品"}); + this.cmbSourceType.Location = new System.Drawing.Point(366, 5); this.cmbSourceType.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbSourceType.Name = "cmbSourceType"; this.cmbSourceType.Size = new System.Drawing.Size(99, 25); @@ -746,7 +747,7 @@ namespace TemuKJD.WXForms.ProductForms "", "是", "否"}); - this.cmbWxCat.Location = new System.Drawing.Point(724, 7); + this.cmbWxCat.Location = new System.Drawing.Point(724, 5); this.cmbWxCat.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbWxCat.Name = "cmbWxCat"; this.cmbWxCat.Size = new System.Drawing.Size(99, 25); @@ -772,7 +773,7 @@ namespace TemuKJD.WXForms.ProductForms "安全+未校验", "安全商品", "未校验"}); - this.cmbWxSafe.Location = new System.Drawing.Point(889, 7); + this.cmbWxSafe.Location = new System.Drawing.Point(889, 5); this.cmbWxSafe.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbWxSafe.Name = "cmbWxSafe"; this.cmbWxSafe.Size = new System.Drawing.Size(100, 25); diff --git a/TEMUKJD/WXForms/ProductForms/WXUserCollectAuthProdListForm.cs b/TEMUKJD/WXForms/ProductForms/WXUserCollectAuthProdListForm.cs index 4d6b13d..c5a2c2f 100644 --- a/TEMUKJD/WXForms/ProductForms/WXUserCollectAuthProdListForm.cs +++ b/TEMUKJD/WXForms/ProductForms/WXUserCollectAuthProdListForm.cs @@ -189,39 +189,7 @@ namespace TemuKJD.WXForms.ProductForms } foreach (var prod in lstTemuDbProduct) { - string catName = (prod.cat_name ?? prod.cat_id) + "(未识别)"; - if (prod.wx_cat_leaf != null) - { - var catN = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == prod.wx_cat_leaf.ParseToString())?.name; - if (!string.IsNullOrEmpty(catN)) - { - catName = catN; - } - } - if (prod.wx_cat_3 != null) - { - var catN = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == prod.wx_cat_3.ParseToString())?.name; - if (!string.IsNullOrEmpty(catN)) - { - catName = catN + " >> " + catName; - } - } - if (prod.wx_cat_2 != null) - { - var catN = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == prod.wx_cat_2.ParseToString())?.name; - if (!string.IsNullOrEmpty(catN)) - { - catName = catN + " >> " + catName; - } - } - if (prod.wx_cat_1 != null) - { - var catN = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == prod.wx_cat_1.ParseToString())?.name; - if (!string.IsNullOrEmpty(catN)) - { - catName = catN + " >> " + catName; - } - } + var catName = GetProdCateName(prod); Invoke(new Action(() => { // 显示的价格需要加价10%最低1元 @@ -266,7 +234,7 @@ namespace TemuKJD.WXForms.ProductForms prod.fission_words.Replace("fission_goods_names:", ""), prod.product_get_type_text == "厂商直采" ? (prod.product_get_type_text + " " + prod.skc_id).Trim() : prod.product_get_type_text.Replace("1688厂家", "1688商品").Replace("1688外部数据", "1688商品") - .Replace("已采集数据", "1688商品").Replace("机会商品", "多多商品").Replace("多多外部数据", "多多商品"), + .Replace("已采集数据", "1688商品").Replace("机会商品", "多多商品").Replace("多多外部数据", "多多商品").Replace("微信店采", "微信商品"), prod.special_prod_type, prod.wx_safe_status, prod.add_time.ToString("yy-MM-dd HH:mm"), @@ -292,6 +260,44 @@ namespace TemuKJD.WXForms.ProductForms }); } + public static string GetProdCateName(KJDDBProduct prod) + { + string catName = (prod.cat_name ?? prod.cat_id) + "(未识别)"; + if (prod.wx_cat_leaf != null) + { + var catN = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == prod.wx_cat_leaf.ParseToString())?.name; + if (!string.IsNullOrEmpty(catN)) + { + catName = catN; + } + } + if (prod.wx_cat_3 != null) + { + var catN = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == prod.wx_cat_3.ParseToString())?.name; + if (!string.IsNullOrEmpty(catN)) + { + catName = catN + " >> " + catName; + } + } + if (prod.wx_cat_2 != null) + { + var catN = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == prod.wx_cat_2.ParseToString())?.name; + if (!string.IsNullOrEmpty(catN)) + { + catName = catN + " >> " + catName; + } + } + if (prod.wx_cat_1 != null) + { + var catN = GlobalConfig.WxCatList.FirstOrDefault(c => c.cat_id == prod.wx_cat_1.ParseToString())?.name; + if (!string.IsNullOrEmpty(catN)) + { + catName = catN + " >> " + catName; + } + } + return catName; + } + Bitmap defaultBitmap = null; void ShowDgvImg() { @@ -447,7 +453,7 @@ namespace TemuKJD.WXForms.ProductForms { // 采集来源判断 data += "&product_get_type=" + cmbSourceType.Text.Trim().Replace("已采集数据", "1688外部数据") - .Replace("多多商品", "机会商品,多多外部数据").Replace("1688商品", "1688厂家,1688外部数据"); + .Replace("多多商品", "机会商品,多多外部数据").Replace("1688商品", "1688厂家,1688外部数据").Replace("微信商品", "微信店采"); } if (shop != null && !string.IsNullOrEmpty(shop.ShopId)) @@ -638,6 +644,8 @@ namespace TemuKJD.WXForms.ProductForms dgvDbProduct.Rows[e.RowIndex].Cells["colFissionWords"].Value = dbProduct.fission_words.Replace("fission_goods_names:", ""); dgvDbProduct.Rows[e.RowIndex].Cells["col_product_name"].Value = dbProduct.product_name; dgvDbProduct.Rows[e.RowIndex].Cells["colSkuReplaceImgUrl"].Value = dbProduct.sku_img_replace_url; + dgvDbProduct.Rows[e.RowIndex].Cells["col_cat_name"].Value = GetProdCateName(dbProduct); + dgvDbProduct.Rows[e.RowIndex].Cells["colMainCate"].Value = dbProduct.main_cat_name; break; case "主图": ShowImgForm imgFrom = new ShowImgForm(dgvDbProduct.Rows[e.RowIndex].Cells["colImgUrl"].Value.ParseToString().Replace("?imageView2/2/w/90/h/90", "")); diff --git a/TEMUKJD/WXForms/ShopForms/WXShopBrowserObject.cs b/TEMUKJD/WXForms/ShopForms/WXShopBrowserObject.cs index 994ab72..e74bd0b 100644 --- a/TEMUKJD/WXForms/ShopForms/WXShopBrowserObject.cs +++ b/TEMUKJD/WXForms/ShopForms/WXShopBrowserObject.cs @@ -31,8 +31,40 @@ namespace TemuKJD.WXForms.ShopForms /// public event InfoReceivedHandler OnInfoReceived; - public string getProduct(string sProdId, string supplierId, bool isReGet = true) + /// + /// 商品回采/采集 + /// + /// + /// + /// + /// + public string getProduct(string sProdId, string supplierId, bool isReGet = true, bool isCollectAuthorityUser = false) { + if (BaseClass.SaLevel == 0 && !BaseClass.UserAuthority.Contains("微信回采") && !BaseClass.UserAuthority.Contains("商品采集")) + { + MainForm.instance.Invoke(new Action(() => + { + BaseMsgForm.ShowError("用户没有采集权限!"); + })); + return "failed"; + } + if (BaseClass.SaLevel == 0 && !BaseClass.UserAuthority.Contains("微信回采") && isReGet == true) + { + MainForm.instance.Invoke(new Action(() => + { + BaseMsgForm.ShowError("用户没有微信回采权限!"); + })); + return "failed"; + } + if (BaseClass.SaLevel == 0 && !BaseClass.UserAuthority.Contains("商品采集") && isCollectAuthorityUser == true) + { + MainForm.instance.Invoke(new Action(() => + { + BaseMsgForm.ShowError("用户没有商品采集权限!"); + })); + return "failed"; + } + var prodId = sProdId.ParseToLong(); if (prodId <= 0) { @@ -58,10 +90,10 @@ namespace TemuKJD.WXForms.ShopForms Task.Run(() => { string msg = ""; - if (isReGet) + if (isReGet) // 微信回采 msg = ReGetProductWithWXFormat(shop, sProdId); - else - msg = GetWxProduct(shop, sProdId); + else // 微信店铺商品采集 + msg = GetWxProduct(shop, sProdId, isCollectAuthorityUser); if (!string.IsNullOrEmpty(msg)) { if (!msg.StartsWith("success") && !msg.StartsWith("商品回采保存成功") && !msg.Contains("微信商品采集入库成功")) @@ -84,6 +116,12 @@ namespace TemuKJD.WXForms.ShopForms return "success"; } + /// + /// 商品详情回采 + /// + /// + /// + /// public string ReGetProductWithWXFormat(ShopLoginInfo shop, string prodId) { //string getString = isReGet ? "商品回采" : "商品采集"; @@ -202,13 +240,20 @@ namespace TemuKJD.WXForms.ShopForms } } - public string GetWxProduct(ShopLoginInfo shop, string prodId) + /// + /// 店铺商品采集 + /// + /// + /// + /// + /// + public string GetWxProduct(ShopLoginInfo shop, string prodId, bool isCollectAuthorityUser = false) { WXGetEditProductInfoLite wxProdInfoLite = null; - return GetWxProduct(shop, prodId, ref wxProdInfoLite); + return GetWxProduct(shop, prodId, ref wxProdInfoLite, false, isCollectAuthorityUser); } - public string GetWxProduct(ShopLoginInfo shop, string prodId, ref WXGetEditProductInfoLite wxProdInfoLite, bool isNotSaveDB = false) + public string GetWxProduct(ShopLoginInfo shop, string prodId, ref WXGetEditProductInfoLite wxProdInfoLite, bool isNotSaveDB = false, bool isCollectAuthorityUser = false) { try { @@ -267,7 +312,8 @@ namespace TemuKJD.WXForms.ShopForms if (isNotSaveDB) return "success"; else - return SaveWxProd(shop, prodId, wxProdInfoLite); + return SaveWxProd(shop, prodId, wxProdInfoLite, isCollectAuthorityUser); + } catch (Exception ex) { @@ -290,12 +336,17 @@ namespace TemuKJD.WXForms.ShopForms /// /// /// - public string SaveWxProd(ShopLoginInfo shop, string prodId, WXGetEditProductInfoLite wxEditProdInfoLite, + public string SaveWxProd(ShopLoginInfo shop, string prodId, WXGetEditProductInfoLite wxEditProdInfoLite, bool isCollectAuthorityUser = false, string specialProdType = null, string coid = null, string realCoid = null, int? viewUv = null, string wx_safe_status = "安全商品") { + // 商品采集权限用户采集的数据加上用户前缀(商品前缀显示给用户的时候隐藏) + string collectAuthorityTag = ""; + if (isCollectAuthorityUser) + collectAuthorityTag = "-" + BaseClass.UserName; + bool isExist = false; var existUrl = BaseClass.BuildPDDObjString("product/get_product_spu_id_list"); - string existData = UserLogin.GetSignaturex() + "&search_spu_ids=" + prodId; + string existData = UserLogin.GetSignaturex() + "&search_spu_ids=" + prodId + collectAuthorityTag; //if (!string.IsNullOrEmpty(prod.dbProduct.real_spu_id)) // existData = UserLogin.GetSignaturex() + "&search_spu_ids=" + prod.spuId + "," + prod.dbProduct.real_spu_id; string html = GetHtml.PostUtf8(existUrl, existData); @@ -319,7 +370,7 @@ namespace TemuKJD.WXForms.ShopForms var data = Work.UserLogin.GetSignaturex() + "&from_shop_id=" + shop.ShopId + "&from_shop_name=" + shop.ShopAccount + - "&spu_id=" + prodId; + "&spu_id=" + prodId + collectAuthorityTag; if (specialProdType == "爆款数据") data += "&add_hot_version=v3"; if (!string.IsNullOrWhiteSpace(coid)) @@ -340,6 +391,11 @@ namespace TemuKJD.WXForms.ShopForms "&main_img=" + HttpUtility.UrlEncode(wxEditProdInfoLite.product.info.headImg.FirstOrDefault(), Encoding.UTF8) + "&wx_safe_status=" + HttpUtility.UrlEncode(wx_safe_status, Encoding.UTF8) + "&product_get_type=" + HttpUtility.UrlEncode("微信店采", Encoding.UTF8); + if (isCollectAuthorityUser) + { + data += "&add_user_name=" + BaseClass.UserName; + data += "&group=用户" + BaseClass.UserName; + } if (wxEditProdInfoLite.product.info.category.Count > 0) { @@ -351,10 +407,14 @@ namespace TemuKJD.WXForms.ShopForms data += "&cat_id=" + wxEditProdInfoLite.product.info.category.LastOrDefault()?.catId; data += "&cat_name=" + HttpUtility.UrlEncode((wxEditProdInfoLite.product.info.category.LastOrDefault()?.name).ParseToString(), Encoding.UTF8); } - //if (wxEditProdInfoLite.product.info.category.FirstOrDefault().name == "图书") - //{ - // data += "&special_prod_type=" + HttpUtility.UrlEncode("书籍", Encoding.UTF8); - //} + if (wxEditProdInfoLite.product.info.category.Count > 1) + { + data += "&wx_cat_2=" + wxEditProdInfoLite.product.info.category[1].catId; + } + if (wxEditProdInfoLite.product.info.category.Count > 2) + { + data += "&wx_cat_3=" + wxEditProdInfoLite.product.info.category[2].catId; + } if (specialProdType != null) { data += "&special_prod_type=" + HttpUtility.UrlEncode("爆款数据", Encoding.UTF8); diff --git a/TEMUKJD/WXForms/ShopForms/WXShopLoginForm.cs b/TEMUKJD/WXForms/ShopForms/WXShopLoginForm.cs index f987e8d..a25dc84 100644 --- a/TEMUKJD/WXForms/ShopForms/WXShopLoginForm.cs +++ b/TEMUKJD/WXForms/ShopForms/WXShopLoginForm.cs @@ -551,7 +551,8 @@ namespace TemuKJD.WXForms.ShopForms }); } - if (BaseClass.UserAuthority.ParseToString().Contains("微信回采") && currentUrl.StartsWith("https://store.weixin.qq.com/shop/goods/list")) + if ((BaseClass.UserAuthority.ParseToString().Contains("微信回采") || BaseClass.UserAuthority.ParseToString().Contains("商品采集")) && + currentUrl.StartsWith("https://store.weixin.qq.com/shop/goods/list")) { //Task.Run(() => { string sAddInputJs = @" @@ -583,15 +584,28 @@ namespace TemuKJD.WXForms.ShopForms for ( i= 0; i < productLst.length; i++) { var addBtnItem = productLst[i]; //.parentElement.parentElement.parentElement; var pos = addBtnItem.innerHTML.indexOf('ID:') - if (addBtnItem.innerHTML.indexOf('回采') < 0 && pos >= 0) { + if (addBtnItem.innerHTML.indexOf('回采') < 0 && addBtnItem.innerHTML.indexOf('采集') < 0 && pos >= 0) { var sSpuId = addBtnItem.innerHTML.substring(pos + 3); sSpuId = sSpuId.substring(0, sSpuId.indexOf('"" //addBtnItem.innerHTML += """" //addBtnItem.innerHTML = addBtnItem.innerHTML.replace(""分享 "", ""分享 ""); var newDiv = document.createElement(""div""); - newDiv.innerHTML = ""回采<\a>""; - addBtnItem.lastChild.appendChild(newDiv); + newDiv.innerHTML="""";"; + sAddInputJs += @"addBtnItem.lastChild.appendChild(newDiv); } } }";