From ce23b0a49acaf991dbf5ef36064b5f29b049a3a1 Mon Sep 17 00:00:00 2001 From: wule Date: Wed, 6 May 2026 18:24:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=BC=E5=A4=9A=E5=A4=9A=E7=89=88=E6=9D=83?= =?UTF-8?q?=E9=99=90=E7=AE=A1=E7=90=86=20=E6=8C=87=E5=AE=9A=E7=B1=BB?= =?UTF-8?q?=E7=9B=AE=E4=B8=8A=E4=BC=A0=20ai=E5=9B=BE=E7=89=87=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E6=9D=83=E9=99=90=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AllBase/AllBase.csproj | 1 + AllBase/BaseClass.cs | 2 +- AllBase/GetHtml.cs | 7 +- AllBase/Helper/GlobalConfig.cs | 3 +- .../PDDResult/PDDShopListProductInfo.cs | 5 +- AllBase/Model/Result/PDDResult/PddCatInfo.cs | 17 + .../BLL/BXX/BXXProductManage.cs | 42 +- .../KJD_WebService/BLL/BXX/BXXUserManage.cs | 19 +- .../KJD_WebService/KJD_WebService.csproj.user | 2 +- .../Model/DBProductResultParam.cs | 1 + TEMUKJD/BLL/Pdd/PddApi.cs | 9 +- TEMUKJD/BLL/Pdd/PddApiHelper.cs | 8 +- TEMUKJD/MainForm.cs | 23 + .../PDDAdminAccountForm.Designer.cs | 110 +++-- .../AdminForms/PDDAdminAccountForm.cs | 14 + .../AdminForms/PDDAdminAccountForm.resx | 3 + .../PDDAddActivityForm.Designer.cs | 27 +- .../ActivityForms/PDDAddActivityForm.cs | 212 ++++++--- .../PDDProductUpDownForm.Designer.cs | 332 +++++++------ .../ProductForms/PDDProductUpDownForm.cs | 16 + .../PDDDBProdUserSelectForm.Designer.cs | 449 +++++++++++------- .../PDDDBProdUserSelectForm.cs | 315 +++++++++++- TEMUKJD/PDDForms/ShopForms/PDDShopListForm.cs | 4 +- .../PDDForms/ShopForms/PDDShopLoginForm.cs | 14 + .../ProductForms/WXDBProdUploadForm.cs | 75 +-- .../WXUserCollectAuthProdListForm.Designer.cs | 14 +- .../WXUserProdListForm.Designer.cs | 14 +- Work/Initialization.cs | 10 + 28 files changed, 1265 insertions(+), 483 deletions(-) create mode 100644 AllBase/Model/Result/PDDResult/PddCatInfo.cs diff --git a/AllBase/AllBase.csproj b/AllBase/AllBase.csproj index a148be6..7dd276b 100644 --- a/AllBase/AllBase.csproj +++ b/AllBase/AllBase.csproj @@ -215,6 +215,7 @@ + diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs index dcabae4..c1f21c4 100644 --- a/AllBase/BaseClass.cs +++ b/AllBase/BaseClass.cs @@ -27,7 +27,7 @@ namespace AllBase /// /// 版本ID /// - public static int VersionCount = 1029; + public static int VersionCount = 1031; //public static int VersionCount = 613; /// diff --git a/AllBase/GetHtml.cs b/AllBase/GetHtml.cs index 03e0526..68c9f3a 100644 --- a/AllBase/GetHtml.cs +++ b/AllBase/GetHtml.cs @@ -1167,7 +1167,7 @@ Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrom /// /// /// - public static string PostUtf8(string url, string postData, string contentType = "") + public static string PostUtf8(string url, string postData, string contentType = "", int? timeOut = null) { //return PostUtf8(url, Encoding.UTF8.GetBytes(postData)); @@ -1184,6 +1184,11 @@ Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrom request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"; request.Timeout = BaseClass.TimeOut * 1000; request.ReadWriteTimeout = BaseClass.TimeOut * 1000; + if (timeOut != null) + { + request.Timeout = timeOut.Value * 1000; + request.ReadWriteTimeout = timeOut.Value * 1000; + } request.Proxy = null; request.ContentType = "application/x-www-form-urlencoded; charset=" + codeType; //if(BaseClass.SaLevel > 0) diff --git a/AllBase/Helper/GlobalConfig.cs b/AllBase/Helper/GlobalConfig.cs index f00984f..0512dfb 100644 --- a/AllBase/Helper/GlobalConfig.cs +++ b/AllBase/Helper/GlobalConfig.cs @@ -34,6 +34,7 @@ namespace AllBase.Helper public static ConcurrentList BuyerLoginList { get; set; } = new ConcurrentList(); public static ConcurrentList WxTokenList { get; set; } = new ConcurrentList(); + public static ConcurrentList PddCatList { get; set; } = new ConcurrentList(); public static ConcurrentList WxCatList { get; set; } = new ConcurrentList(); public static ConcurrentList WxCatBoundList { get; set; } = new ConcurrentList(); /// @@ -64,7 +65,7 @@ namespace AllBase.Helper /// /// 拼多多api列表 /// - public static ConcurrentList PddClentInfoList = new ConcurrentList(); + public static ConcurrentList PddClientInfoList = new ConcurrentList(); } public enum ShopPlatform diff --git a/AllBase/Model/Result/PDDResult/PDDShopListProductInfo.cs b/AllBase/Model/Result/PDDResult/PDDShopListProductInfo.cs index 72289eb..5c40c28 100644 --- a/AllBase/Model/Result/PDDResult/PDDShopListProductInfo.cs +++ b/AllBase/Model/Result/PDDResult/PDDShopListProductInfo.cs @@ -48,7 +48,10 @@ namespace AllBase.Model.Result.PDDResult public bool? is_onsale { get; set; } //true, public int? sold_quantity { get; set; } //0, public object resource_hover { get; set; } //null, - public object wait_cut_price { get; set; } //null, + /// + /// 活动权益失效 修改后恢复活动权益 + /// + public bool? wait_cut_price { get; set; } //true, public object off_sale_check { get; set; } //null, public object onsale_check { get; set; } //null, public edit_check_info edit_check { get; set; } //null, diff --git a/AllBase/Model/Result/PDDResult/PddCatInfo.cs b/AllBase/Model/Result/PDDResult/PddCatInfo.cs new file mode 100644 index 0000000..6e23f73 --- /dev/null +++ b/AllBase/Model/Result/PDDResult/PddCatInfo.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AllBase.Model.Result.PDDResult +{ + public class PddCatInfo + { + public string cat_name { get; set; } // "男装", + public int level { get; set; } // 1, + public long cat_id { get; set; } = 0; // 239, + public long parent_cat_id { get; set; } = 0; // 0 + public bool is_leaf { get; set; } = false; + } +} diff --git a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs index ff6cd34..cca5981 100644 --- a/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs +++ b/KJDService/KJD_WebService/BLL/BXX/BXXProductManage.cs @@ -526,7 +526,7 @@ namespace KJD_Web.BLL.BXX List paramLst = new List(); string sql = " select count(*) from bxx.product p " + - " FORCE INDEX (f_wx_safe_status) " + + " FORCE INDEX (index_wx_safe_status) " + //" LEFT JOIN bxx.jst_supplier_ban_platform b ON (p.skc_id=b.coid or p.real_coid=b.coid)" + " WHERE p.is_del=0"; @@ -793,7 +793,8 @@ namespace KJD_Web.BLL.BXX prod.size_json = row["size_json"].ToString(); prod.sku_edit_json = row["sku_edit_json"].ToString(); prod.sku_secret_json = row["sku_secret_json"].ToString(); - prod.has_wx_format = row["has_wx_format"].ParseToNullableString(); + prod.fission_imgs = row["fission_imgs"].ToString(); + prod.has_wx_format = row["has_wx_format"].ParseToNullableString(); // 微信回采 prod.sku_img_replace_base64 = row["img_base64"].ToString(); //prod.sku_img_replace_url = row["img_url"].ToString(); prod.wx_img_map_json = row["wx_img_map_json"].ToString(); @@ -1467,7 +1468,7 @@ namespace KJD_Web.BLL.BXX string sql = " SELECT count(*)" + " FROM bxx.product p" + - " FORCE INDEX (f_wx_safe_status)" + + " FORCE INDEX (index_wx_safe_status)" + //" LEFT JOIN bxx.jst_supplier_ban_platform b ON (p.skc_id=b.coid or p.real_coid=b.coid)" + " WHERE p.is_del=0"; @@ -1860,6 +1861,7 @@ namespace KJD_Web.BLL.BXX string group = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "group"))?.Replace("'", "\\'"); string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"))?.Replace("'", "\\'"); string ext_code = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "ext_code"))?.Replace("'", "\\'"); + string fission_imgs = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "fission_imgs"))?.Replace("'", "\\'"); string fission_words = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "fission_words"))?.Replace("'", "\\'"); string head_words = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "head_words"))?.Replace("'", "\\'"); string end_words = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "end_words"))?.Replace("'", "\\'"); @@ -1883,6 +1885,8 @@ namespace KJD_Web.BLL.BXX sql += " p.notes='" + notes + "',"; if (ext_code != null) sql += " p.ext_code='" + ext_code + "',"; + if (fission_imgs != null) + sql += " p.fission_imgs='" + fission_imgs + "',"; if (fission_words != null) sql += " p.fission_words='" + fission_words + "',"; if (head_words != null) @@ -3549,6 +3553,38 @@ namespace KJD_Web.BLL.BXX } return "{\"code\":19999,\"msg\":\"输入为空\"}"; } + + public string XJGetAiImage(string inputData) + { + if (string.IsNullOrEmpty(inputData)) + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + + if (!WXUserManage.GetSign(inputData)) + return "{\"code\":999,\"msg\":\"校验失败\"}"; + + string image_url = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "image_url"))?.ParseToString(); + string word = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "word"))?.ParseToString(); + if (image_url == null) + return "{\"code\":500,\"msg\":\"缺少图片地址\"}"; + if (word == null) + return "{\"code\":500,\"msg\":\"缺少图片文字\"}"; + + string secret = "sadhjufhe15c4fbvFBvcvds+5sdfds@#%$xsc"; + string time = TimeUtils.DateTimeToTimestampSeconds(DateTime.Now).ToString(); + string code = EncrypUtil.GetMd5(secret + time); + + try + { + string url = "http://ai-bs.jiaotian.vip:" + RandomUtils.GetId(20010, 20021) + "/index.php?obj=public/image"; + string data = "time=" + time + "&code=" + code + "&image_url=" + image_url + "&word=" + word; + string html = HttpUtils.e57GetResponse(url, ""); + return html; + } + catch (Exception ex) + { + return "{\"code\":50001,\"msg\":\"" + ex.Message + "\"}"; + } + } } } diff --git a/KJDService/KJD_WebService/BLL/BXX/BXXUserManage.cs b/KJDService/KJD_WebService/BLL/BXX/BXXUserManage.cs index edf7b0c..b10e043 100644 --- a/KJDService/KJD_WebService/BLL/BXX/BXXUserManage.cs +++ b/KJDService/KJD_WebService/BLL/BXX/BXXUserManage.cs @@ -48,6 +48,7 @@ namespace KJD_Web.BLL.BXX company_name = row["company_name"].ToString(), is_sa = row.Table.Columns.Contains("is_sa") ? row["is_sa"].ParseToInt() : 0, sa_level = row.Table.Columns.Contains("sa_level") ? row["sa_level"].ParseToInt() : 0, + authority = row["authority"].ToString(), }; if (string.IsNullOrEmpty(user.company_name)) @@ -76,6 +77,7 @@ namespace KJD_Web.BLL.BXX var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'"); var company_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "company"))?.Replace("'", "\\'"); var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'"); + var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'"); int r2 = 0; int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); @@ -90,9 +92,9 @@ namespace KJD_Web.BLL.BXX return "{\"code\":500,\"msg\":\"用户名已存在\"}"; } - sql = "insert into bxx.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,parent_user_name,add_time,mdy_time) " + + sql = "insert into bxx.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,parent_user_name,authority,add_time,mdy_time) " + "values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" + - group_id + "','" + company_name + "','" + notes + "','" + parent_user_name + "','" + + group_id + "','" + company_name + "','" + notes + "','" + parent_user_name + "','" + authority + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');"; var rst = mySql.ExecuteNonQuery(sql); @@ -140,6 +142,7 @@ namespace KJD_Web.BLL.BXX parent_user_name = row["parent_user_name"].ToString(), company_name = row["company_name"].ToString(), notes = row["notes"].ToString(), + authority = row.Table.Columns.Contains("authority") ? row["authority"].ParseToString() : "", }; if (string.IsNullOrEmpty(user.mobile)) { @@ -167,6 +170,7 @@ namespace KJD_Web.BLL.BXX var group_id = RegexUtils.GetStringQuery(ref inputData, "group_id")?.Replace("'", "\\'"); var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'"); var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'"); + var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'"); int r2 = 0; int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); @@ -190,6 +194,8 @@ namespace KJD_Web.BLL.BXX sql += " card_id='" + card_id + "',"; if (!string.IsNullOrEmpty(notes)) sql += " notes='" + notes + "',"; + if (authority != null) + sql += " authority='" + authority + "',"; sql = sql.TrimEnd(','); sql += " where id=" + id + ""; @@ -277,6 +283,7 @@ namespace KJD_Web.BLL.BXX notes = row["notes"].ToString(), is_sa = row.Table.Columns.Contains("is_sa") ? row["is_sa"].ParseToInt() : 0, sa_level = row.Table.Columns.Contains("sa_level") ? row["sa_level"].ParseToInt() : 0, + authority = row.Table.Columns.Contains("authority") ? row["authority"].ParseToString() : "", }; if (string.IsNullOrEmpty(user.mobile)) { @@ -304,6 +311,7 @@ namespace KJD_Web.BLL.BXX var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'"); var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'"); var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'"); + var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'"); int r2 = 0; int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); @@ -318,9 +326,9 @@ namespace KJD_Web.BLL.BXX return "{\"code\":500,\"msg\":\"用户名已存在\"}"; } - sql = "insert into bxx.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,sa_level,add_time,mdy_time) " + + sql = "insert into bxx.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,sa_level,authority,add_time,mdy_time) " + "values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" + - group_id + "','" + company_name + "','" + notes + "'," + sa_level + ",'" + + group_id + "','" + company_name + "','" + notes + "'," + sa_level + ",'" + authority + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');"; var rst = mySql.ExecuteNonQuery(sql); @@ -347,6 +355,7 @@ namespace KJD_Web.BLL.BXX var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'"); var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'"); var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'"); + var authority = RegexUtils.GetStringQuery(ref inputData, "authority")?.Replace("'", "\\'"); int r2 = 0; int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); @@ -374,6 +383,8 @@ namespace KJD_Web.BLL.BXX sql += " notes='" + notes + "',"; if (!string.IsNullOrEmpty(sa_level)) sql += " sa_level=" + sa_level + ","; + if (authority != null) + sql += " authority='" + authority + "',"; sql = sql.TrimEnd(','); sql += " where id=" + id + ""; 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/KJDService/KJD_WebService/Model/DBProductResultParam.cs b/KJDService/KJD_WebService/Model/DBProductResultParam.cs index 6561805..d751d7b 100644 --- a/KJDService/KJD_WebService/Model/DBProductResultParam.cs +++ b/KJDService/KJD_WebService/Model/DBProductResultParam.cs @@ -87,6 +87,7 @@ namespace KJD_Web.Model /// 被选中的总次数 /// public int select_total_count { get; set; } + public string fission_imgs { get; set; } public string fission_words { get; set; } public string head_words { get; set; } public string end_words { get; set; } diff --git a/TEMUKJD/BLL/Pdd/PddApi.cs b/TEMUKJD/BLL/Pdd/PddApi.cs index afbce20..c4d71a8 100644 --- a/TEMUKJD/BLL/Pdd/PddApi.cs +++ b/TEMUKJD/BLL/Pdd/PddApi.cs @@ -102,6 +102,13 @@ namespace TemuKJD.BLL.PddApi return html; } + public string PddGoodsCatsGet() + { + string type = "pdd.goods.cats.get"; + string html = PddApiRequest(type, Data); + return html; + } + public string PddPopAuthTokenCreate(string code) { string type = "pdd.pop.auth.token.create"; @@ -299,7 +306,7 @@ namespace TemuKJD.BLL.PddApi return "{\"success\":false, \"error_msg\":\"调用Api编号不能为空\"}"; if (!dict.Keys.Contains("access_token") || string.IsNullOrWhiteSpace(dict["access_token"].ParseToString())) return "{\"success\":false, \"error_msg\":\"调用令牌不能为空\"}"; - var clientSecret = GlobalConfig.PddClentInfoList.FirstOrDefault(c => c.client_id == dict["client_id"].ParseToString())?.client_secret; + var clientSecret = GlobalConfig.PddClientInfoList.FirstOrDefault(c => c.client_id == dict["client_id"].ParseToString())?.client_secret; if (clientSecret.IsNullOrEmpty()) return "{\"success\":false, \"error_msg\":\"调用密钥不能为空\"}"; diff --git a/TEMUKJD/BLL/Pdd/PddApiHelper.cs b/TEMUKJD/BLL/Pdd/PddApiHelper.cs index 7848950..6b56222 100644 --- a/TEMUKJD/BLL/Pdd/PddApiHelper.cs +++ b/TEMUKJD/BLL/Pdd/PddApiHelper.cs @@ -19,7 +19,7 @@ namespace TemuKJD.BLL.PddApi { if (isForceRefresh || (shop.AuthUpdateTime <= DateTime.Now.AddDays(-1) && shop.AuthExpiresTime <= DateTime.Now)) { - if (!GlobalConfig.PddClentInfoList.Any(c => c.client_id == PddApi.clientId_pi_xiu_guan_jia)) + if (!GlobalConfig.PddClientInfoList.Any(c => c.client_id == PddApi.clientId_pi_xiu_guan_jia)) return; string errStr = ""; @@ -107,7 +107,7 @@ namespace TemuKJD.BLL.PddApi { var dataStr = JsonHelper.SerializeObject(JsonHelper.JObjectParse(html)["data"]); var serverApiAuthList = JsonHelper.DeserializeJsonToList(dataStr); - serverApiAuthList = serverApiAuthList.Where(a => GlobalConfig.PddClentInfoList.Any(c => c.client_id == a.AppKey)).ToList(); + serverApiAuthList = serverApiAuthList.Where(a => GlobalConfig.PddClientInfoList.Any(c => c.client_id == a.AppKey)).ToList(); foreach (var serverAuth in serverApiAuthList) { var shop = shopList.FirstOrDefault(s => s.ShopId == serverAuth.ShopId); @@ -169,8 +169,8 @@ namespace TemuKJD.BLL.PddApi try { var clientDataStr = JsonHelper.SerializeObject(JsonHelper.JObjectParse(html)["data"]); - GlobalConfig.PddClentInfoList.Clear(); - GlobalConfig.PddClentInfoList.AddRange(JsonHelper.DeserializeJsonToList(clientDataStr)); + GlobalConfig.PddClientInfoList.Clear(); + GlobalConfig.PddClientInfoList.AddRange(JsonHelper.DeserializeJsonToList(clientDataStr)); } catch { } } diff --git a/TEMUKJD/MainForm.cs b/TEMUKJD/MainForm.cs index 4d87b83..b121178 100644 --- a/TEMUKJD/MainForm.cs +++ b/TEMUKJD/MainForm.cs @@ -47,6 +47,7 @@ using TemuKJD.WXForms.ShopForms; using TemuKJD.WXForms.AdminForms; using TemuKJD.WXForms.ProductForms; using AllBase.Model.Result.WXResult; +using AllBase.Model.Result.PDDResult; namespace TemuKJD { @@ -310,6 +311,7 @@ namespace TemuKJD ReadWxCate(); //ReadWxCateBound(); ReadWxCateBound60323(); + ReadPddCate(); }); } @@ -334,6 +336,27 @@ namespace TemuKJD } } + void ReadPddCate() + { + string filePath = Path.Combine(Environment.CurrentDirectory, "temp\\pddCat260506"); + if (!File.Exists(filePath)) + return; + using (StreamReader sr = new StreamReader(filePath, System.Text.Encoding.UTF8)) + { + try + { + string cateStr = sr.ReadToEnd().Trim(); + GlobalConfig.PddCatList.AddRange(JsonHelper.DeserializeJsonToList(cateStr)); + } + catch (Exception ex) + { + BaseMsgForm.ShowError("商品列表获取失败:" + ex.Message); + } + if (GlobalConfig.PddCatList == null) + GlobalConfig.PddCatList = new ConcurrentList(); + } + } + void ReadWxCateBound() { string filePath = Path.Combine(Environment.CurrentDirectory, "temp\\wxCatBound"); diff --git a/TEMUKJD/PDDForms/AdminForms/PDDAdminAccountForm.Designer.cs b/TEMUKJD/PDDForms/AdminForms/PDDAdminAccountForm.Designer.cs index c4c76b5..fabd24c 100644 --- a/TEMUKJD/PDDForms/AdminForms/PDDAdminAccountForm.Designer.cs +++ b/TEMUKJD/PDDForms/AdminForms/PDDAdminAccountForm.Designer.cs @@ -29,9 +29,10 @@ namespace TemuKJD.PDDForms.AdminForms /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + 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(); this.splitContainer5 = new System.Windows.Forms.SplitContainer(); this.cmbSaLevel = new System.Windows.Forms.ComboBox(); this.label6 = new System.Windows.Forms.Label(); @@ -65,6 +66,9 @@ namespace TemuKJD.PDDForms.AdminForms this.label40 = new System.Windows.Forms.Label(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.dgvUser = new TemuKJD.UserComponent.DataGridViewEx(); + this.label7 = new System.Windows.Forms.Label(); + this.chkAiImage = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.chkSetCats = new TemuKJD.UserComponent.UcCheckBox(this.components); this.UserIdColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.UserNickNameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.mobileColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -74,6 +78,7 @@ namespace TemuKJD.PDDForms.AdminForms this.shopCountColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colSaLevel = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colSaLevelName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colAuthority = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colAddShop = new System.Windows.Forms.DataGridViewLinkColumn(); this.editColumn = new System.Windows.Forms.DataGridViewLinkColumn(); this.deleteColumn = new System.Windows.Forms.DataGridViewLinkColumn(); @@ -89,7 +94,7 @@ namespace TemuKJD.PDDForms.AdminForms // // splitContainer5 // - this.splitContainer5.BackColor = System.Drawing.Color.Transparent; + this.splitContainer5.BackColor = System.Drawing.Color.WhiteSmoke; this.splitContainer5.Dock = System.Windows.Forms.DockStyle.Fill; this.splitContainer5.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; this.splitContainer5.Location = new System.Drawing.Point(0, 0); @@ -97,6 +102,9 @@ namespace TemuKJD.PDDForms.AdminForms // // splitContainer5.Panel1 // + this.splitContainer5.Panel1.Controls.Add(this.chkSetCats); + this.splitContainer5.Panel1.Controls.Add(this.chkAiImage); + this.splitContainer5.Panel1.Controls.Add(this.label7); this.splitContainer5.Panel1.Controls.Add(this.cmbSaLevel); this.splitContainer5.Panel1.Controls.Add(this.label6); this.splitContainer5.Panel1.Controls.Add(this.lblWatermark); @@ -132,7 +140,7 @@ namespace TemuKJD.PDDForms.AdminForms // 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(1270, 527); + this.splitContainer5.Size = new System.Drawing.Size(1270, 575); this.splitContainer5.SplitterDistance = 357; this.splitContainer5.SplitterWidth = 1; this.splitContainer5.TabIndex = 3; @@ -246,7 +254,7 @@ namespace TemuKJD.PDDForms.AdminForms // this.label1.AutoSize = true; this.label1.ForeColor = System.Drawing.SystemColors.ButtonShadow; - this.label1.Location = new System.Drawing.Point(56, 475); + this.label1.Location = new System.Drawing.Point(56, 520); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(212, 17); this.label1.TabIndex = 37; @@ -275,7 +283,7 @@ namespace TemuKJD.PDDForms.AdminForms 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, 431); + this.btnCancel.Location = new System.Drawing.Point(59, 476); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(86, 25); this.btnCancel.TabIndex = 35; @@ -291,7 +299,7 @@ namespace TemuKJD.PDDForms.AdminForms 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, 431); + this.btnOpUser.Location = new System.Drawing.Point(174, 476); this.btnOpUser.Name = "btnOpUser"; this.btnOpUser.Size = new System.Drawing.Size(86, 25); this.btnOpUser.TabIndex = 34; @@ -465,28 +473,28 @@ namespace TemuKJD.PDDForms.AdminForms // splitContainer1.Panel1 // this.splitContainer1.Panel1.Controls.Add(this.dgvUser); - this.splitContainer1.Size = new System.Drawing.Size(907, 517); - this.splitContainer1.SplitterDistance = 486; + this.splitContainer1.Size = new System.Drawing.Size(907, 565); + this.splitContainer1.SplitterDistance = 534; this.splitContainer1.TabIndex = 2; // // dgvUser // this.dgvUser.AllowUserToAddRows = false; this.dgvUser.AllowUserToDeleteRows = false; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); - this.dgvUser.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); + this.dgvUser.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4; this.dgvUser.AutoRowNumber = true; this.dgvUser.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dgvUser.BackgroundColor = System.Drawing.Color.White; this.dgvUser.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvUser.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvUser.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5; this.dgvUser.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvUser.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.UserIdColumn, @@ -498,17 +506,18 @@ namespace TemuKJD.PDDForms.AdminForms this.shopCountColumn, this.colSaLevel, this.colSaLevelName, + this.colAuthority, this.colAddShop, this.editColumn, this.deleteColumn}); - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvUser.DefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvUser.DefaultCellStyle = dataGridViewCellStyle6; this.dgvUser.Dock = System.Windows.Forms.DockStyle.Fill; this.dgvUser.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); this.dgvUser.Location = new System.Drawing.Point(0, 0); @@ -516,10 +525,40 @@ namespace TemuKJD.PDDForms.AdminForms this.dgvUser.Name = "dgvUser"; this.dgvUser.ReadOnly = true; this.dgvUser.RowTemplate.Height = 23; - this.dgvUser.Size = new System.Drawing.Size(907, 486); + this.dgvUser.Size = new System.Drawing.Size(907, 534); this.dgvUser.TabIndex = 1; this.dgvUser.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvUser_CellContentClick); // + // label7 + // + 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(27, 432); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(79, 20); + this.label7.TabIndex = 49; + this.label7.Text = "功能权限:"; + // + // chkAiImage + // + this.chkAiImage.AutoSize = true; + this.chkAiImage.Location = new System.Drawing.Point(112, 432); + this.chkAiImage.Name = "chkAiImage"; + this.chkAiImage.Size = new System.Drawing.Size(74, 21); + this.chkAiImage.TabIndex = 50; + this.chkAiImage.Text = "Ai传图"; + this.chkAiImage.UseVisualStyleBackColor = true; + // + // chkSetCats + // + this.chkSetCats.AutoSize = true; + this.chkSetCats.Location = new System.Drawing.Point(194, 432); + this.chkSetCats.Name = "chkSetCats"; + this.chkSetCats.Size = new System.Drawing.Size(75, 21); + this.chkSetCats.TabIndex = 51; + this.chkSetCats.Text = "类目指定"; + this.chkSetCats.UseVisualStyleBackColor = true; + // // UserIdColumn // this.UserIdColumn.HeaderText = "id"; @@ -574,10 +613,17 @@ namespace TemuKJD.PDDForms.AdminForms // // colSaLevelName // + this.colSaLevelName.FillWeight = 60F; this.colSaLevelName.HeaderText = "账户类型"; this.colSaLevelName.Name = "colSaLevelName"; this.colSaLevelName.ReadOnly = true; // + // colAuthority + // + this.colAuthority.HeaderText = "功能权限"; + this.colAuthority.Name = "colAuthority"; + this.colAuthority.ReadOnly = true; + // // colAddShop // this.colAddShop.FillWeight = 60F; @@ -606,7 +652,7 @@ namespace TemuKJD.PDDForms.AdminForms // PDDAdminAccountForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; - this.ClientSize = new System.Drawing.Size(1270, 527); + this.ClientSize = new System.Drawing.Size(1270, 575); 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; @@ -662,6 +708,9 @@ namespace TemuKJD.PDDForms.AdminForms private System.Windows.Forms.Label lblWatermark; private System.Windows.Forms.Label label6; private System.Windows.Forms.ComboBox cmbSaLevel; + private UserComponent.UcCheckBox chkSetCats; + private UserComponent.UcCheckBox chkAiImage; + private System.Windows.Forms.Label label7; private System.Windows.Forms.DataGridViewTextBoxColumn UserIdColumn; private System.Windows.Forms.DataGridViewTextBoxColumn UserNickNameColumn; private System.Windows.Forms.DataGridViewTextBoxColumn mobileColumn; @@ -671,6 +720,7 @@ namespace TemuKJD.PDDForms.AdminForms private System.Windows.Forms.DataGridViewTextBoxColumn shopCountColumn; private System.Windows.Forms.DataGridViewTextBoxColumn colSaLevel; private System.Windows.Forms.DataGridViewTextBoxColumn colSaLevelName; + private System.Windows.Forms.DataGridViewTextBoxColumn colAuthority; private System.Windows.Forms.DataGridViewLinkColumn colAddShop; private System.Windows.Forms.DataGridViewLinkColumn editColumn; private System.Windows.Forms.DataGridViewLinkColumn deleteColumn; diff --git a/TEMUKJD/PDDForms/AdminForms/PDDAdminAccountForm.cs b/TEMUKJD/PDDForms/AdminForms/PDDAdminAccountForm.cs index 8d05bc0..279f5d8 100644 --- a/TEMUKJD/PDDForms/AdminForms/PDDAdminAccountForm.cs +++ b/TEMUKJD/PDDForms/AdminForms/PDDAdminAccountForm.cs @@ -73,6 +73,14 @@ namespace TemuKJD.PDDForms.AdminForms data.Append("&sa_level=2"); else data.Append("&sa_level=0"); + + string authority = ""; + if (chkAiImage.Checked) + authority += "Ai传图,"; + if (chkSetCats.Checked) + authority += "类目指定,"; + data.Append("&authority=" + authority.Trim(',')); + string url = BaseClass.BuildObjString("user/add_user"); if (btnOpUser.Text != "添加用户" && !string.IsNullOrEmpty(Uid)) { @@ -135,6 +143,7 @@ namespace TemuKJD.PDDForms.AdminForms user.shop_count = BaseRegex.GetIntJson(ref oStr, "shop_count"); user.company_name = BaseRegex.GetStringJson(ref oStr, "company_name"); user.sa_level = BaseRegex.GetIntJson(ref oStr, "sa_level"); + user.authority = BaseRegex.GetStringJson(ref oStr, "authority"); AllUsers.Add(user); dgvUser.Rows.Add( @@ -147,6 +156,7 @@ namespace TemuKJD.PDDForms.AdminForms user.shop_count, user.sa_level, user.sa_level_name, + user.authority, "添加店铺", "编辑", "删除"); @@ -189,6 +199,7 @@ namespace TemuKJD.PDDForms.AdminForms string groupName = dgvUser.Rows[e.RowIndex].Cells["groupNameColumn"].Value.ToString(); string company = dgvUser.Rows[e.RowIndex].Cells["colCompany"].Value.ToString(); string saLevelName = dgvUser.Rows[e.RowIndex].Cells["colSaLevelName"].Value.ToString(); + string authority = dgvUser.Rows[e.RowIndex].Cells["colAuthority"].Value.ToString(); if (columname == "编辑") { Uid = uid; @@ -201,6 +212,9 @@ namespace TemuKJD.PDDForms.AdminForms btnOpUser.Text = "保存用户"; btnCancel.Visible = true; cmbSaLevel.Text = saLevelName; + + chkAiImage.Checked = authority.Contains(chkAiImage.Text); + chkSetCats.Checked = authority.Contains(chkSetCats.Text); } if (columname == "删除") { diff --git a/TEMUKJD/PDDForms/AdminForms/PDDAdminAccountForm.resx b/TEMUKJD/PDDForms/AdminForms/PDDAdminAccountForm.resx index 6ba5435..5c35b80 100644 --- a/TEMUKJD/PDDForms/AdminForms/PDDAdminAccountForm.resx +++ b/TEMUKJD/PDDForms/AdminForms/PDDAdminAccountForm.resx @@ -144,6 +144,9 @@ True + + True + True diff --git a/TEMUKJD/PDDForms/ProductForms/ActivityForms/PDDAddActivityForm.Designer.cs b/TEMUKJD/PDDForms/ProductForms/ActivityForms/PDDAddActivityForm.Designer.cs index 5ea4584..158052e 100644 --- a/TEMUKJD/PDDForms/ProductForms/ActivityForms/PDDAddActivityForm.Designer.cs +++ b/TEMUKJD/PDDForms/ProductForms/ActivityForms/PDDAddActivityForm.Designer.cs @@ -42,6 +42,7 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms 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.chkDown981Failed = new TemuKJD.UserComponent.UcCheckBox(this.components); this.txtLowPriceAddPriceTimes = new System.Windows.Forms.TextBox(); this.txtLowPriceAddMorePrice = new System.Windows.Forms.TextBox(); this.label8 = new System.Windows.Forms.Label(); @@ -197,6 +198,7 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms | System.Windows.Forms.AnchorStyles.Right))); 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.chkDown981Failed); this.ucGroupBoxEx2.Controls.Add(this.txtLowPriceAddPriceTimes); this.ucGroupBoxEx2.Controls.Add(this.txtLowPriceAddMorePrice); this.ucGroupBoxEx2.Controls.Add(this.label8); @@ -243,12 +245,24 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms this.ucGroupBoxEx2.TabStop = false; this.ucGroupBoxEx2.Text = "活动价格配置"; // - // txtLowPriceAddTimes + // chkDown981Failed + // + this.chkDown981Failed.AutoSize = true; + this.chkDown981Failed.Checked = true; + this.chkDown981Failed.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkDown981Failed.Location = new System.Drawing.Point(694, 16); + this.chkDown981Failed.Name = "chkDown981Failed"; + this.chkDown981Failed.Size = new System.Drawing.Size(144, 21); + this.chkDown981Failed.TabIndex = 938; + this.chkDown981Failed.Text = "下架报名981失败商品"; + this.chkDown981Failed.UseVisualStyleBackColor = true; + // + // txtLowPriceAddPriceTimes // this.txtLowPriceAddPriceTimes.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.txtLowPriceAddPriceTimes.Location = new System.Drawing.Point(770, 89); this.txtLowPriceAddPriceTimes.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); - this.txtLowPriceAddPriceTimes.Name = "txtLowPriceAddTimes"; + this.txtLowPriceAddPriceTimes.Name = "txtLowPriceAddPriceTimes"; this.txtLowPriceAddPriceTimes.Size = new System.Drawing.Size(31, 23); this.txtLowPriceAddPriceTimes.TabIndex = 924; this.txtLowPriceAddPriceTimes.Text = "1.0"; @@ -335,7 +349,7 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms // this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(831, 18); + this.label5.Location = new System.Drawing.Point(944, 18); this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(20, 17); @@ -346,7 +360,7 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms // this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(713, 18); + this.label3.Location = new System.Drawing.Point(838, 18); this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(80, 17); @@ -355,10 +369,10 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms // // txtSleepTime // - this.txtSleepTime.Location = new System.Drawing.Point(793, 15); + this.txtSleepTime.Location = new System.Drawing.Point(918, 15); this.txtSleepTime.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtSleepTime.Name = "txtSleepTime"; - this.txtSleepTime.Size = new System.Drawing.Size(38, 23); + this.txtSleepTime.Size = new System.Drawing.Size(26, 23); this.txtSleepTime.TabIndex = 891; this.txtSleepTime.Text = "1"; this.txtSleepTime.TextChanged += new System.EventHandler(this.txtSleepTime_TextChanged); @@ -1748,5 +1762,6 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms private System.Windows.Forms.Label label8; private System.Windows.Forms.Label label13; private System.Windows.Forms.Label label7; + private UserComponent.UcCheckBox chkDown981Failed; } } \ No newline at end of file diff --git a/TEMUKJD/PDDForms/ProductForms/ActivityForms/PDDAddActivityForm.cs b/TEMUKJD/PDDForms/ProductForms/ActivityForms/PDDAddActivityForm.cs index 85e8663..b418c06 100644 --- a/TEMUKJD/PDDForms/ProductForms/ActivityForms/PDDAddActivityForm.cs +++ b/TEMUKJD/PDDForms/ProductForms/ActivityForms/PDDAddActivityForm.cs @@ -636,10 +636,10 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms Thread.Sleep((moreSleepTime * 1000).ParseToInt()); for (int i = 0; i < 5 && activityRst1.Contains("频繁"); i++) { + int totalPage = 9999; + int page = 1; if (i > 0) { - int totalPage = 9999; - int page = 1; int readCount = 0; while (page < totalPage) { @@ -770,10 +770,10 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms Thread.Sleep((moreSleepTime * 1000).ParseToInt()); for (int i = 0; i < 5 && activityRst1.Contains("频繁"); i++) { + int totalPage = 9999; + int page = 1; if (i > 0) { - int totalPage = 9999; - int page = 1; int readCount = 0; while (page < totalPage) { @@ -2961,6 +2961,10 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms else row.Cells["colOpResult"].Value = "源商品不存在"; })); + if (chkDown981Failed.Checked && actProd != null) + { + DownProd(shop, new List() { actProd.goods_id }); + } continue; } @@ -2981,6 +2985,10 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms else row.Cells["colOpResult"].Value = "匹配到多个同货号源商品无法确定,跳过"; })); + if (chkDown981Failed.Checked) + { + DownProd(shop, new List() { actProd.goods_id }); + } continue; } var dbProd = dbProds.FirstOrDefault(); @@ -2995,6 +3003,10 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms { row.Cells["colOpResult"].Value = "商品查询错误 " + convertRst; })); + if (chkDown981Failed.Checked) + { + DownProd(shop, new List() { actProd.goods_id }); + } continue; } } @@ -3012,6 +3024,10 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms { row.Cells["colOpResult"].Value = "商品格式化错误 " + ex.Message; })); + if (chkDown981Failed.Checked) + { + DownProd(shop, new List() { actProd.goods_id }); + } continue; } @@ -3048,9 +3064,17 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms { shippingTemplateJson = JsonHelper.SerializeObject(JsonHelper.JObjectParse(htmlShipping)["data"]); } - catch + catch (Exception ex) { - + Invoke(new Action(() => + { + row.Cells["colOpResult"].Value = "运费模板获取失败 " + ex.Message; + })); + if (chkDown981Failed.Checked) + { + DownProd(shop, new List() { actProd.goods_id }); + } + continue; } } } @@ -3072,6 +3096,10 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms { row.Cells["colOpResult"].Value = "运费模板获取失败 " + errMsg; })); + if (chkDown981Failed.Checked) + { + DownProd(shop, new List() { actProd.goods_id }); + } continue; } try @@ -3091,6 +3119,15 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms } catch (Exception ex) { + Invoke(new Action(() => + { + row.Cells["colOpResult"].Value = "运费模板获取失败 " + ex.Message; + })); + if (chkDown981Failed.Checked) + { + DownProd(shop, new List() { actProd.goods_id }); + } + continue; } } @@ -3116,6 +3153,10 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms { row.Cells["colOpResult"].Value = "运费模板获取失败 " + ex.Message; })); + if (chkDown981Failed.Checked) + { + DownProd(shop, new List() { actProd.goods_id }); + } continue; } } @@ -3125,6 +3166,10 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms { row.Cells["colOpResult"].Value = "运费模板获取失败 未获取到"; })); + if (chkDown981Failed.Checked) + { + DownProd(shop, new List() { actProd.goods_id }); + } continue; } prodInfo.ship_price = shipPrice; @@ -3253,6 +3298,9 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms break; } + //任何环节报名失败直接下架,包括频繁 + var Act981FailedIds = new List(); + // 检测是否可以报名活动 string checkActivityRst = "{\"success\":true,\"msg\":\"活动校验成功\",\"fail_list\":[]}"; checkActivityRst = CheckActivity20981(shop, prodParamLst); @@ -3265,14 +3313,20 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms foreach (var row in rowOperateLst) row.Cells["colOpResult"].Value = BaseRegex.GetStringJson(ref checkActivityRst, "msg"); })); + + foreach (var prodParam in prodParamLst) + { + + } + continue; } var failStr = JsonHelper.SerializeObject(JsonHelper.JObjectParse(checkActivityRst)["fail_list"]); var failList = JsonHelper.DeserializeJsonToList(failStr); if (failList == null) - failList = new List(); - + failList = new List(); + if (1 == 1) { foreach (var row in rowOperateLst) @@ -3289,6 +3343,7 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms // 删除校验未通过的商品 var goodsIds = failList.Select(f => f.goods_id).ToList(); + Act981FailedIds.AddRange(goodsIds); prodParamLst.RemoveAll(p => goodsIds.Contains(p.goods_id)); // 筛除校验未通过的商品所在的列表行 rowOperateLst = rowOperateLst.Where(r => prodParamLst.Any(p => p.goods_id == r.Cells["colSpuId"].Value.ParseToLong())).ToList(); @@ -3297,35 +3352,9 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms goodsIds = failList.Where(f => f.error_msg.Contains("所有活动报价均低于产品期望价格")).Select(f => f.goods_id).ToList(); if (chkDownNoPrice.Checked) { - if (goodsIds.Count > 0) - { - var rws = dgvActProduct.Rows.Cast().Where(r => goodsIds.Contains(r.Cells["colSpuId"].Value.ParseToLong())).ToList(); - var downProdRst = ""; - for (int i = 0; i < 5 && !downProdRst.Contains("\"success\":true"); i++) - { - Thread.Sleep(Randomx.GetId(500, 1500)); - downProdRst = PDDProductUpDownForm.down_goods(shop, string.Join(",", goodsIds)); - } - if (!downProdRst.Contains("\"success\":true")) - { - Invoke(new Action(() => - { - var error = BaseRegex.GetStringJson(ref downProdRst, "errorMsg"); - if (string.IsNullOrEmpty(error)) - error = downProdRst; - foreach (var rw in rws) - rw.Cells["colOpResult"].Value += " 尝试下架失败 " + error; - })); - } - else - { - Invoke(new Action(() => - { - foreach (var rw in rws) - rw.Cells["colOpResult"].Value += " 下架成功"; - })); - } - } + // 检测失败的从实际报名失败的列表中移除。 + Act981FailedIds.RemoveAll(fId => goodsIds.Contains(fId)); + DownProd(shop, goodsIds); } prodParamLst.RemoveAll(p => goodsIds.Contains(p.goods_id)); @@ -3368,7 +3397,10 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms if (!mdyQuantityRst.Contains("\"success\":true")) { goodsIds.Add(prodParam.goods_id); + Act981FailedIds.Add(prodParam.goods_id); var error = BaseRegex.GetStringJson(ref mdyQuantityRst, "error_msg"); + if (string.IsNullOrEmpty(error)) + error = BaseRegex.GetStringJson(ref mdyQuantityRst, "errorMsg"); if (string.IsNullOrEmpty(error)) error = mdyQuantityRst; @@ -3391,6 +3423,7 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms } } } + Act981FailedIds.AddRange(goodsIds); prodParamLst.RemoveAll(p => goodsIds.Contains(p.goods_id)); // 筛除修改未给价sku失败的商品所在的列表行 rowOperateLst = rowOperateLst.Where(r => prodParamLst.Any(p => p.goods_id == r.Cells["colSpuId"].Value.ParseToLong())).ToList(); @@ -3482,36 +3515,72 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms continue; } } + Act981FailedIds.AddRange(goodsIds); // 移除修改库存失败的商品 prodParamLst.RemoveAll(p => goodsIds.Contains(p.goods_id)); rowOperateLst = rowOperateLst.Where(r => prodParamLst.Any(p => p.goods_id == r.Cells["colSpuId"].Value.ParseToLong())).ToList(); } - if (prodParamLst.Count == 0) + // 剩余商品数量大于0才报名活动 + if (prodParamLst.Count > 0) { - continue; + + string activityRsts = SignActivity(shop, prodParamLst, sign22347, sign20981, sign21365, sign15996, sign23513, sign23730, sign23456); + failList = JsonHelper.DeserializeJsonToList(activityRsts); + foreach (var prodParam in prodParamLst) + { + var prodActRsts = failList.Where(f => f.goods_id == prodParam.goods_id).ToList(); + var actSuccessStr = ""; + var actFailStr = ""; + foreach (var actRst in prodActRsts) + { + if (actRst.error_msg.Contains("报名成功")) + actSuccessStr += " " + actRst.error_msg; + else + actFailStr += "\r\n" + actRst.error_msg; + } + Invoke(new Action(() => + { + var rws = rowOperateLst.Where(r => prodParam.goods_id == r.Cells["colSpuId"].Value.ParseToLong()).ToList(); + foreach (var rw in rws) + rw.Cells["colOpResult"].Value = (actSuccessStr + actFailStr).Trim('\r', '\n', ' '); + })); + + if (!actSuccessStr.Contains("981报名成功")) + { + Act981FailedIds.Add(prodParam.goods_id); + } + } } - string activityRsts = SignActivity(shop, prodParamLst, sign22347, sign20981, sign21365, sign15996, sign23513, sign23730, sign23456); - failList = JsonHelper.DeserializeJsonToList(activityRsts); - foreach (var prodParam in prodParamLst) + if (Act981FailedIds.Count > 0 && chkDown981Failed.Checked) { - var prodActRsts = failList.Where(f => f.goods_id == prodParam.goods_id); - var actSuccessStr = ""; - var actFailStr = ""; - foreach (var actRst in prodActRsts) + var rws = dgvActProduct.Rows.Cast().Where(r => Act981FailedIds.Contains(r.Cells["colSpuId"].Value.ParseToLong())).ToList(); + var downProdRst = ""; + for (int i = 0; i < 5 && !downProdRst.Contains("\"success\":true"); i++) { - if (actRst.error_msg.Contains("报名成功")) - actSuccessStr += " " + actRst.error_msg; - else - actFailStr += "\r\n" + actRst.error_msg; + Thread.Sleep(Randomx.GetId(500, 1500)); + downProdRst = PDDProductUpDownForm.down_goods(shop, string.Join(",", Act981FailedIds)); } - Invoke(new Action(() => + if (!downProdRst.Contains("\"success\":true")) { - var rws = rowOperateLst.Where(r => prodParam.goods_id == r.Cells["colSpuId"].Value.ParseToLong()).ToList(); - foreach (var rw in rws) - rw.Cells["colOpResult"].Value = (actSuccessStr + actFailStr).Trim('\r', '\n', ' '); - })); + Invoke(new Action(() => + { + var error = BaseRegex.GetStringJson(ref downProdRst, "errorMsg"); + if (string.IsNullOrEmpty(error)) + error = downProdRst; + foreach (var rw in rws) + rw.Cells["colOpResult"].Value = "尝试下架失败 " + error + " " + rw.Cells["colOpResult"].Value.ParseToString(); + })); + } + else + { + Invoke(new Action(() => + { + foreach (var rw in rws) + rw.Cells["colOpResult"].Value = "下架成功 " + rw.Cells["colOpResult"].Value.ParseToString(); + })); + } } } catch (Exception ex) @@ -3537,6 +3606,39 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms }, cancellationTokenSource.Token); } + void DownProd(ShopLoginInfo shop, List goodsIds) + { + if (goodsIds.Count > 0) + { + var rws = dgvActProduct.Rows.Cast().Where(r => goodsIds.Contains(r.Cells["colSpuId"].Value.ParseToLong())).ToList(); + var downProdRst = ""; + for (int i = 0; i < 5 && !downProdRst.Contains("\"success\":true"); i++) + { + Thread.Sleep(Randomx.GetId(500, 1500)); + downProdRst = PDDProductUpDownForm.down_goods(shop, string.Join(",", goodsIds)); + } + if (!downProdRst.Contains("\"success\":true")) + { + Invoke(new Action(() => + { + var error = BaseRegex.GetStringJson(ref downProdRst, "errorMsg"); + if (string.IsNullOrEmpty(error)) + error = downProdRst; + foreach (var rw in rws) + rw.Cells["colOpResult"].Value += " 尝试下架失败 " + error; + })); + } + else + { + Invoke(new Action(() => + { + foreach (var rw in rws) + rw.Cells["colOpResult"].Value += " 下架成功"; + })); + } + } + } + private void btnRefreshApi_Click(object sender, EventArgs e) { RefreshApi(true); diff --git a/TEMUKJD/PDDForms/ProductForms/PDDProductUpDownForm.Designer.cs b/TEMUKJD/PDDForms/ProductForms/PDDProductUpDownForm.Designer.cs index 6d0e68a..c95ba8d 100644 --- a/TEMUKJD/PDDForms/ProductForms/PDDProductUpDownForm.Designer.cs +++ b/TEMUKJD/PDDForms/ProductForms/PDDProductUpDownForm.Designer.cs @@ -38,8 +38,10 @@ namespace TemuKJD.PDDForms.ProductForms 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(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.btnSelectNeedCutPrice = new DevComponents.DotNetBar.PanelEx(); this.label10 = new System.Windows.Forms.Label(); this.txtLowStock = new System.Windows.Forms.TextBox(); this.btnSelectLowStock = new DevComponents.DotNetBar.PanelEx(); @@ -93,6 +95,10 @@ namespace TemuKJD.PDDForms.ProductForms this.txtShopId = new System.Windows.Forms.TextBox(); this.btnClearDgv = new DevComponents.DotNetBar.PanelEx(); this.dgvProduct = new TemuKJD.UserComponent.DataGridViewEx(); + this.splitContainer4 = new System.Windows.Forms.SplitContainer(); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); + this.btnClear = new DevComponents.DotNetBar.PanelEx(); + this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colSupplierId = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colSupplierName = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -111,10 +117,6 @@ namespace TemuKJD.PDDForms.ProductForms this.colIsOnSale = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colStatus = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colOpResult = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.splitContainer4 = new System.Windows.Forms.SplitContainer(); - this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); - this.btnClear = new DevComponents.DotNetBar.PanelEx(); - this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -166,6 +168,7 @@ namespace TemuKJD.PDDForms.ProductForms | System.Windows.Forms.AnchorStyles.Right))); 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.btnSelectNeedCutPrice); this.ucGroupBoxEx2.Controls.Add(this.label10); this.ucGroupBoxEx2.Controls.Add(this.txtLowStock); this.ucGroupBoxEx2.Controls.Add(this.btnSelectLowStock); @@ -196,6 +199,30 @@ namespace TemuKJD.PDDForms.ProductForms this.ucGroupBoxEx2.TabStop = false; this.ucGroupBoxEx2.Text = "商品查询"; // + // btnSelectNeedCutPrice + // + this.btnSelectNeedCutPrice.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnSelectNeedCutPrice.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSelectNeedCutPrice.DisabledBackColor = System.Drawing.Color.Empty; + this.btnSelectNeedCutPrice.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSelectNeedCutPrice.Location = new System.Drawing.Point(706, 64); + this.btnSelectNeedCutPrice.Name = "btnSelectNeedCutPrice"; + this.btnSelectNeedCutPrice.Size = new System.Drawing.Size(107, 23); + this.btnSelectNeedCutPrice.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnSelectNeedCutPrice.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSelectNeedCutPrice.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSelectNeedCutPrice.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnSelectNeedCutPrice.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnSelectNeedCutPrice.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnSelectNeedCutPrice.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnSelectNeedCutPrice.Style.GradientAngle = 90; + this.btnSelectNeedCutPrice.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnSelectNeedCutPrice.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSelectNeedCutPrice.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSelectNeedCutPrice.TabIndex = 711; + this.btnSelectNeedCutPrice.Text = "选中权益失效商品"; + this.btnSelectNeedCutPrice.Click += new System.EventHandler(this.btnSelectNeedCutPrice_Click); + // // label10 // this.label10.AutoSize = true; @@ -971,143 +998,6 @@ namespace TemuKJD.PDDForms.ProductForms this.dgvProduct.TabIndex = 187; this.dgvProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvProduct_CellContentClick); // - // colCheck - // - this.colCheck.Frozen = true; - this.colCheck.HeaderText = "选择"; - this.colCheck.Name = "colCheck"; - this.colCheck.ReadOnly = true; - this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colCheck.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.colCheck.Width = 30; - // - // colSupplierId - // - this.colSupplierId.HeaderText = "店铺Id"; - this.colSupplierId.Name = "colSupplierId"; - this.colSupplierId.ReadOnly = true; - // - // colSupplierName - // - this.colSupplierName.HeaderText = "店铺名称"; - this.colSupplierName.Name = "colSupplierName"; - this.colSupplierName.ReadOnly = true; - this.colSupplierName.Width = 110; - // - // colImgUrl - // - this.colImgUrl.HeaderText = "图片地址"; - this.colImgUrl.Name = "colImgUrl"; - this.colImgUrl.ReadOnly = true; - this.colImgUrl.Visible = false; - // - // colProductSkcPic - // - this.colProductSkcPic.HeaderText = "图片"; - this.colProductSkcPic.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom; - this.colProductSkcPic.Name = "colProductSkcPic"; - this.colProductSkcPic.ReadOnly = true; - this.colProductSkcPic.Width = 60; - // - // colSpuId - // - this.colSpuId.HeaderText = "商品ID"; - this.colSpuId.Name = "colSpuId"; - this.colSpuId.ReadOnly = true; - this.colSpuId.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colSpuId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.colSpuId.Width = 80; - // - // colExtCode - // - this.colExtCode.HeaderText = "商品编码"; - this.colExtCode.Name = "colExtCode"; - this.colExtCode.ReadOnly = true; - // - // colProductName - // - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colProductName.DefaultCellStyle = dataGridViewCellStyle5; - this.colProductName.HeaderText = "商品标题"; - this.colProductName.Name = "colProductName"; - this.colProductName.ReadOnly = true; - this.colProductName.Width = 150; - // - // colResource - // - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colResource.DefaultCellStyle = dataGridViewCellStyle6; - this.colResource.HeaderText = "资源位"; - this.colResource.Name = "colResource"; - this.colResource.ReadOnly = true; - this.colResource.Width = 70; - // - // colPrice - // - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colPrice.DefaultCellStyle = dataGridViewCellStyle7; - this.colPrice.HeaderText = "价格"; - this.colPrice.Name = "colPrice"; - this.colPrice.ReadOnly = true; - this.colPrice.Width = 105; - // - // colStock - // - this.colStock.HeaderText = "库存"; - this.colStock.Name = "colStock"; - this.colStock.ReadOnly = true; - this.colStock.Width = 50; - // - // colFavorites - // - this.colFavorites.HeaderText = "收藏"; - this.colFavorites.Name = "colFavorites"; - this.colFavorites.ReadOnly = true; - this.colFavorites.Width = 50; - // - // colSales - // - this.colSales.HeaderText = "总销量"; - this.colSales.Name = "colSales"; - this.colSales.ReadOnly = true; - this.colSales.Width = 60; - // - // colSalesThirtyDays - // - this.colSalesThirtyDays.HeaderText = "30日销量"; - this.colSalesThirtyDays.Name = "colSalesThirtyDays"; - this.colSalesThirtyDays.ReadOnly = true; - this.colSalesThirtyDays.Width = 70; - // - // colAddTime - // - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colAddTime.DefaultCellStyle = dataGridViewCellStyle8; - this.colAddTime.HeaderText = "创建时间"; - this.colAddTime.Name = "colAddTime"; - this.colAddTime.ReadOnly = true; - this.colAddTime.Width = 80; - // - // colIsOnSale - // - this.colIsOnSale.HeaderText = "在售/下架"; - this.colIsOnSale.Name = "colIsOnSale"; - this.colIsOnSale.ReadOnly = true; - this.colIsOnSale.Width = 80; - // - // colStatus - // - this.colStatus.HeaderText = "审核状态"; - this.colStatus.Name = "colStatus"; - this.colStatus.ReadOnly = true; - // - // colOpResult - // - this.colOpResult.HeaderText = "操作结果"; - this.colOpResult.Name = "colOpResult"; - this.colOpResult.ReadOnly = true; - this.colOpResult.Width = 200; - // // splitContainer4 // this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill; @@ -1188,6 +1078,147 @@ namespace TemuKJD.PDDForms.ProductForms this.panelEx1.Text = "停止当前操作"; this.panelEx1.Click += new System.EventHandler(this.btnCancel_Click); // + // colCheck + // + this.colCheck.Frozen = true; + this.colCheck.HeaderText = "选择"; + this.colCheck.Name = "colCheck"; + this.colCheck.ReadOnly = true; + this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colCheck.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colCheck.Width = 30; + // + // colSupplierId + // + this.colSupplierId.HeaderText = "店铺Id"; + this.colSupplierId.Name = "colSupplierId"; + this.colSupplierId.ReadOnly = true; + this.colSupplierId.Width = 90; + // + // colSupplierName + // + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5; + this.colSupplierName.HeaderText = "店铺名称"; + this.colSupplierName.Name = "colSupplierName"; + this.colSupplierName.ReadOnly = true; + this.colSupplierName.Width = 90; + // + // colImgUrl + // + this.colImgUrl.HeaderText = "图片地址"; + this.colImgUrl.Name = "colImgUrl"; + this.colImgUrl.ReadOnly = true; + this.colImgUrl.Visible = false; + // + // colProductSkcPic + // + this.colProductSkcPic.HeaderText = "图片"; + this.colProductSkcPic.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom; + this.colProductSkcPic.Name = "colProductSkcPic"; + this.colProductSkcPic.ReadOnly = true; + this.colProductSkcPic.Width = 60; + // + // colSpuId + // + this.colSpuId.HeaderText = "商品ID"; + this.colSpuId.Name = "colSpuId"; + this.colSpuId.ReadOnly = true; + this.colSpuId.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSpuId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colSpuId.Width = 95; + // + // colExtCode + // + this.colExtCode.HeaderText = "商品编码"; + this.colExtCode.Name = "colExtCode"; + this.colExtCode.ReadOnly = true; + // + // colProductName + // + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colProductName.DefaultCellStyle = dataGridViewCellStyle6; + this.colProductName.HeaderText = "商品标题"; + this.colProductName.Name = "colProductName"; + this.colProductName.ReadOnly = true; + this.colProductName.Width = 150; + // + // colResource + // + dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colResource.DefaultCellStyle = dataGridViewCellStyle7; + this.colResource.HeaderText = "资源位"; + this.colResource.Name = "colResource"; + this.colResource.ReadOnly = true; + this.colResource.Width = 70; + // + // colPrice + // + dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colPrice.DefaultCellStyle = dataGridViewCellStyle8; + this.colPrice.HeaderText = "价格"; + this.colPrice.Name = "colPrice"; + this.colPrice.ReadOnly = true; + this.colPrice.Width = 130; + // + // colStock + // + this.colStock.HeaderText = "库存"; + this.colStock.Name = "colStock"; + this.colStock.ReadOnly = true; + this.colStock.Width = 50; + // + // colFavorites + // + this.colFavorites.HeaderText = "收藏"; + this.colFavorites.Name = "colFavorites"; + this.colFavorites.ReadOnly = true; + this.colFavorites.Width = 50; + // + // colSales + // + this.colSales.HeaderText = "总销量"; + this.colSales.Name = "colSales"; + this.colSales.ReadOnly = true; + this.colSales.Width = 60; + // + // colSalesThirtyDays + // + this.colSalesThirtyDays.HeaderText = "30日销量"; + this.colSalesThirtyDays.Name = "colSalesThirtyDays"; + this.colSalesThirtyDays.ReadOnly = true; + this.colSalesThirtyDays.Width = 70; + // + // colAddTime + // + dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colAddTime.DefaultCellStyle = dataGridViewCellStyle9; + this.colAddTime.HeaderText = "创建时间"; + this.colAddTime.Name = "colAddTime"; + this.colAddTime.ReadOnly = true; + this.colAddTime.Width = 80; + // + // colIsOnSale + // + this.colIsOnSale.HeaderText = "在售/下架"; + this.colIsOnSale.Name = "colIsOnSale"; + this.colIsOnSale.ReadOnly = true; + this.colIsOnSale.Width = 80; + // + // colStatus + // + this.colStatus.HeaderText = "审核状态"; + this.colStatus.Name = "colStatus"; + this.colStatus.ReadOnly = true; + this.colStatus.Width = 90; + // + // colOpResult + // + this.colOpResult.HeaderText = "操作结果"; + this.colOpResult.Name = "colOpResult"; + this.colOpResult.ReadOnly = true; + this.colOpResult.Width = 200; + // // PDDProductUpDownForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -1281,6 +1312,16 @@ namespace TemuKJD.PDDForms.ProductForms private System.Windows.Forms.DataGridViewTextBoxColumn colRemaining; private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; private DevComponents.DotNetBar.PanelEx btnSelectNotActivity; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.TextBox txtLowStock; + private DevComponents.DotNetBar.PanelEx btnSelectLowStock; + private DevComponents.DotNetBar.PanelEx btnClearShopFilter; + private DevComponents.DotNetBar.PanelEx btnFilter; + private System.Windows.Forms.TextBox txtShopGroupFilter; + private System.Windows.Forms.TextBox txtShopNameFilter; + private System.Windows.Forms.Label label23; + private System.Windows.Forms.Label label22; + private DevComponents.DotNetBar.PanelEx btnSelectNeedCutPrice; private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck; private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId; private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierName; @@ -1299,14 +1340,5 @@ namespace TemuKJD.PDDForms.ProductForms private System.Windows.Forms.DataGridViewTextBoxColumn colIsOnSale; private System.Windows.Forms.DataGridViewTextBoxColumn colStatus; private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.TextBox txtLowStock; - private DevComponents.DotNetBar.PanelEx btnSelectLowStock; - private DevComponents.DotNetBar.PanelEx btnClearShopFilter; - private DevComponents.DotNetBar.PanelEx btnFilter; - private System.Windows.Forms.TextBox txtShopGroupFilter; - private System.Windows.Forms.TextBox txtShopNameFilter; - private System.Windows.Forms.Label label23; - private System.Windows.Forms.Label label22; } } \ No newline at end of file diff --git a/TEMUKJD/PDDForms/ProductForms/PDDProductUpDownForm.cs b/TEMUKJD/PDDForms/ProductForms/PDDProductUpDownForm.cs index 1fd217e..fdbc631 100644 --- a/TEMUKJD/PDDForms/ProductForms/PDDProductUpDownForm.cs +++ b/TEMUKJD/PDDForms/ProductForms/PDDProductUpDownForm.cs @@ -371,6 +371,8 @@ namespace TemuKJD.PDDForms.ProductForms string activityPriceStr = ""; if (pInfo.sku_group_price.FirstOrDefault() != pInfo.origin_sku_group_price.FirstOrDefault()) activityPriceStr = "\r\n活动价:\r\n" + string.Join("~", pInfo.sku_group_price.Select(s => s / 100m)); + if (pInfo.wait_cut_price == true) + activityPriceStr = "\r\n活动权益失效\r\n活动价:" + string.Join("~", pInfo.sku_group_price.Select(s => s / 100m)); Invoke(new Action(() => { int rowId = this.dgvProduct.Rows.Add( @@ -398,6 +400,8 @@ namespace TemuKJD.PDDForms.ProductForms if (!string.IsNullOrEmpty(activityPriceStr)) { dgvProduct.Rows[rowId].Cells["colPrice"].Style.ForeColor = Color.DarkOrange; + if (activityPriceStr.Contains("活动权益失效")) + dgvProduct.Rows[rowId].Cells["colPrice"].Style.ForeColor = Color.Red; } })); } @@ -1088,5 +1092,17 @@ namespace TemuKJD.PDDForms.ProductForms txtShopGroupFilter.Text = ""; txtShopNameFilter.Text = ""; } + + private void btnSelectNeedCutPrice_Click(object sender, EventArgs e) + { + foreach (DataGridViewRow r in dgvProduct.Rows) + { + if (r.Cells["colPrice"].Value.ParseToString().Contains("活动权益失效")) + r.Cells["colCheck"].Value = true; + else + + r.Cells["colCheck"].Value = false; + } + } } } diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.Designer.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.Designer.cs index bf8029a..6f78de3 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.Designer.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.Designer.cs @@ -30,16 +30,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms 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 dataGridViewCellStyle89 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle90 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle91 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle92 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle93 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle94 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle95 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle96 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.cmbCatSelect3 = new System.Windows.Forms.ComboBox(); + this.cmbCatSelect2 = new System.Windows.Forms.ComboBox(); + this.cmbCatSelect1 = new System.Windows.Forms.ComboBox(); this.btnSeachPicUp = new DevComponents.DotNetBar.PanelEx(); this.btnApiUpload = new DevComponents.DotNetBar.PanelEx(); this.btnUpload = new DevComponents.DotNetBar.PanelEx(); @@ -62,13 +65,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.label7 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.chkUseExtCodePrice = new TemuKJD.UserComponent.UcCheckBox(this.components); - this.pbUpgradeVersion = new System.Windows.Forms.PictureBox(); - this.lblUpgradeVersion = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.txtUpgradeVersionAddPrice = new System.Windows.Forms.TextBox(); - this.label5 = new System.Windows.Forms.Label(); - this.txtUpgradeVersionName = new System.Windows.Forms.TextBox(); - this.chkUpgradeVersion = new TemuKJD.UserComponent.UcCheckBox(this.components); this.btnStop = new DevComponents.DotNetBar.PanelEx(); this.chkKeepChanceGoodsImg = new TemuKJD.UserComponent.UcCheckBox(this.components); this.txtAddTimesFake = new System.Windows.Forms.TextBox(); @@ -97,6 +93,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.line1 = new DevComponents.DotNetBar.Controls.Line(); this.line2 = new DevComponents.DotNetBar.Controls.Line(); this.label26 = new System.Windows.Forms.Label(); + this.chkAiImage = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.cmbCatSelect4 = new System.Windows.Forms.ComboBox(); + this.chkSetCats = new TemuKJD.UserComponent.UcCheckBox(this.components); this.ucGroupBoxEx4 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); this.chkRelation = new TemuKJD.UserComponent.UcCheckBox(this.components); this.cmbCateFilter3 = new TemuKJD.UserComponent.UcComboBoxMutiSelect(); @@ -146,6 +145,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colRemaining = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.txtUpgradeVersionName = new System.Windows.Forms.TextBox(); + this.btnGetCats = new DevComponents.DotNetBar.PanelEx(); this.chkImgChanceTest = new TemuKJD.UserComponent.UcCheckBox(this.components); this.txtLowPriceSkuPrice = new System.Windows.Forms.TextBox(); this.panel2 = new System.Windows.Forms.Panel(); @@ -164,6 +165,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.lblLowPriceSkuImg = new System.Windows.Forms.Label(); this.label18 = new System.Windows.Forms.Label(); this.label19 = new System.Windows.Forms.Label(); + this.chkUpgradeVersion = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.label5 = new System.Windows.Forms.Label(); + this.txtUpgradeVersionAddPrice = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.pbUpgradeVersion = new System.Windows.Forms.PictureBox(); + this.lblUpgradeVersion = new System.Windows.Forms.Label(); this.dgvSelectProduct = new TemuKJD.UserComponent.DataGridViewEx(); this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colSelectId = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -197,7 +204,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.SuspendLayout(); this.ucGroupBoxEx2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbUpgradeVersion)).BeginInit(); this.panel4.SuspendLayout(); this.panel3.SuspendLayout(); this.fPnlPriceRule.SuspendLayout(); @@ -216,6 +222,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbSkuImg)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbUpgradeVersion)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvSelectProduct)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).BeginInit(); this.splitContainer4.Panel1.SuspendLayout(); @@ -250,6 +257,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms | System.Windows.Forms.AnchorStyles.Right))); 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.cmbCatSelect2); + this.ucGroupBoxEx2.Controls.Add(this.cmbCatSelect1); this.ucGroupBoxEx2.Controls.Add(this.btnSeachPicUp); this.ucGroupBoxEx2.Controls.Add(this.btnApiUpload); this.ucGroupBoxEx2.Controls.Add(this.btnUpload); @@ -272,13 +281,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.ucGroupBoxEx2.Controls.Add(this.label7); this.ucGroupBoxEx2.Controls.Add(this.label6); this.ucGroupBoxEx2.Controls.Add(this.chkUseExtCodePrice); - this.ucGroupBoxEx2.Controls.Add(this.pbUpgradeVersion); - this.ucGroupBoxEx2.Controls.Add(this.lblUpgradeVersion); - this.ucGroupBoxEx2.Controls.Add(this.label3); - this.ucGroupBoxEx2.Controls.Add(this.txtUpgradeVersionAddPrice); - this.ucGroupBoxEx2.Controls.Add(this.label5); - this.ucGroupBoxEx2.Controls.Add(this.txtUpgradeVersionName); - this.ucGroupBoxEx2.Controls.Add(this.chkUpgradeVersion); this.ucGroupBoxEx2.Controls.Add(this.btnStop); this.ucGroupBoxEx2.Controls.Add(this.chkKeepChanceGoodsImg); this.ucGroupBoxEx2.Controls.Add(this.txtAddTimesFake); @@ -303,6 +305,10 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.ucGroupBoxEx2.Controls.Add(this.line1); this.ucGroupBoxEx2.Controls.Add(this.line2); this.ucGroupBoxEx2.Controls.Add(this.label26); + this.ucGroupBoxEx2.Controls.Add(this.chkAiImage); + this.ucGroupBoxEx2.Controls.Add(this.cmbCatSelect4); + this.ucGroupBoxEx2.Controls.Add(this.chkSetCats); + this.ucGroupBoxEx2.Controls.Add(this.cmbCatSelect3); this.ucGroupBoxEx2.Location = new System.Drawing.Point(523, 2); this.ucGroupBoxEx2.Name = "ucGroupBoxEx2"; this.ucGroupBoxEx2.Size = new System.Drawing.Size(1046, 140); @@ -310,6 +316,42 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.ucGroupBoxEx2.TabStop = false; this.ucGroupBoxEx2.Text = "商品上传"; // + // cmbCatSelect3 + // + this.cmbCatSelect3.DropDownWidth = 150; + this.cmbCatSelect3.FormattingEnabled = true; + this.cmbCatSelect3.Location = new System.Drawing.Point(793, 106); + this.cmbCatSelect3.Name = "cmbCatSelect3"; + this.cmbCatSelect3.Size = new System.Drawing.Size(97, 25); + this.cmbCatSelect3.TabIndex = 894; + this.cmbCatSelect3.Visible = false; + this.cmbCatSelect3.SelectedIndexChanged += new System.EventHandler(this.cmbCatSelect3_SelectedIndexChanged); + this.cmbCatSelect3.TextChanged += new System.EventHandler(this.cmbCatSelect3_TextChanged); + // + // cmbCatSelect2 + // + this.cmbCatSelect2.DropDownWidth = 150; + this.cmbCatSelect2.FormattingEnabled = true; + this.cmbCatSelect2.Location = new System.Drawing.Point(696, 106); + this.cmbCatSelect2.Name = "cmbCatSelect2"; + this.cmbCatSelect2.Size = new System.Drawing.Size(97, 25); + this.cmbCatSelect2.TabIndex = 893; + this.cmbCatSelect2.Visible = false; + this.cmbCatSelect2.SelectedIndexChanged += new System.EventHandler(this.cmbCatSelect2_SelectedIndexChanged); + this.cmbCatSelect2.TextChanged += new System.EventHandler(this.cmbCatSelect2_TextChanged); + // + // cmbCatSelect1 + // + this.cmbCatSelect1.DropDownWidth = 150; + this.cmbCatSelect1.FormattingEnabled = true; + this.cmbCatSelect1.Location = new System.Drawing.Point(599, 106); + this.cmbCatSelect1.Name = "cmbCatSelect1"; + this.cmbCatSelect1.Size = new System.Drawing.Size(97, 25); + this.cmbCatSelect1.TabIndex = 892; + this.cmbCatSelect1.Visible = false; + this.cmbCatSelect1.SelectedIndexChanged += new System.EventHandler(this.cmbCatSelect1_SelectedIndexChanged); + this.cmbCatSelect1.TextChanged += new System.EventHandler(this.cmbCatSelect1_TextChanged); + // // btnSeachPicUp // this.btnSeachPicUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); @@ -389,7 +431,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // txtMultiPcsSku4 // this.txtMultiPcsSku4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.txtMultiPcsSku4.Location = new System.Drawing.Point(849, 109); + this.txtMultiPcsSku4.Location = new System.Drawing.Point(849, 76); this.txtMultiPcsSku4.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtMultiPcsSku4.Name = "txtMultiPcsSku4"; this.txtMultiPcsSku4.Size = new System.Drawing.Size(25, 23); @@ -400,7 +442,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // this.label27.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label27.AutoSize = true; - this.label27.Location = new System.Drawing.Point(812, 112); + this.label27.Location = new System.Drawing.Point(812, 79); this.label27.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label27.Name = "label27"; this.label27.Size = new System.Drawing.Size(41, 17); @@ -409,7 +451,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // // txtMultiPcsSku3 // - this.txtMultiPcsSku3.Location = new System.Drawing.Point(787, 109); + this.txtMultiPcsSku3.Location = new System.Drawing.Point(787, 76); this.txtMultiPcsSku3.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtMultiPcsSku3.Name = "txtMultiPcsSku3"; this.txtMultiPcsSku3.Size = new System.Drawing.Size(25, 23); @@ -418,7 +460,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // // txtMultiPcsSku2 // - this.txtMultiPcsSku2.Location = new System.Drawing.Point(759, 109); + this.txtMultiPcsSku2.Location = new System.Drawing.Point(759, 76); this.txtMultiPcsSku2.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtMultiPcsSku2.Name = "txtMultiPcsSku2"; this.txtMultiPcsSku2.Size = new System.Drawing.Size(25, 23); @@ -427,7 +469,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // // txtMultiPcsSku1 // - this.txtMultiPcsSku1.Location = new System.Drawing.Point(725, 109); + this.txtMultiPcsSku1.Location = new System.Drawing.Point(725, 76); this.txtMultiPcsSku1.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtMultiPcsSku1.Name = "txtMultiPcsSku1"; this.txtMultiPcsSku1.Size = new System.Drawing.Size(25, 23); @@ -437,7 +479,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // chkMultiPcsSku // this.chkMultiPcsSku.AutoSize = true; - this.chkMultiPcsSku.Location = new System.Drawing.Point(661, 110); + this.chkMultiPcsSku.Location = new System.Drawing.Point(661, 77); this.chkMultiPcsSku.Name = "chkMultiPcsSku"; this.chkMultiPcsSku.Size = new System.Drawing.Size(71, 21); this.chkMultiPcsSku.TabIndex = 866; @@ -446,7 +488,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // // txtEndWords // - this.txtEndWords.Location = new System.Drawing.Point(599, 109); + this.txtEndWords.Location = new System.Drawing.Point(599, 76); this.txtEndWords.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtEndWords.Name = "txtEndWords"; this.txtEndWords.Size = new System.Drawing.Size(54, 23); @@ -456,7 +498,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // chkEndWords // this.chkEndWords.AutoSize = true; - this.chkEndWords.Location = new System.Drawing.Point(531, 110); + this.chkEndWords.Location = new System.Drawing.Point(531, 77); this.chkEndWords.Name = "chkEndWords"; this.chkEndWords.Size = new System.Drawing.Size(75, 21); this.chkEndWords.TabIndex = 864; @@ -492,9 +534,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.cmbTextStyle.Items.AddRange(new object[] { "双色字体", "彩色字体"}); - this.cmbTextStyle.Location = new System.Drawing.Point(849, 43); + this.cmbTextStyle.Location = new System.Drawing.Point(849, 40); this.cmbTextStyle.Name = "cmbTextStyle"; - this.cmbTextStyle.Size = new System.Drawing.Size(92, 25); + this.cmbTextStyle.Size = new System.Drawing.Size(75, 25); this.cmbTextStyle.TabIndex = 851; this.cmbTextStyle.Text = "双色字体"; this.cmbTextStyle.Visible = false; @@ -503,7 +545,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // label21 // this.label21.AutoSize = true; - this.label21.Location = new System.Drawing.Point(827, 47); + this.label21.Location = new System.Drawing.Point(827, 44); this.label21.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label21.Name = "label21"; this.label21.Size = new System.Drawing.Size(19, 17); @@ -512,7 +554,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // // txtAlpha // - this.txtAlpha.Location = new System.Drawing.Point(794, 44); + this.txtAlpha.Location = new System.Drawing.Point(794, 41); this.txtAlpha.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtAlpha.Name = "txtAlpha"; this.txtAlpha.Size = new System.Drawing.Size(33, 23); @@ -522,7 +564,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // label13 // this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(703, 47); + this.label13.Location = new System.Drawing.Point(703, 44); this.label13.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label13.Name = "label13"; this.label13.Size = new System.Drawing.Size(92, 17); @@ -586,85 +628,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.chkUseExtCodePrice.UseVisualStyleBackColor = true; this.chkUseExtCodePrice.CheckedChanged += new System.EventHandler(this.chkUseExtCodePrice_CheckedChanged); // - // pbUpgradeVersion - // - this.pbUpgradeVersion.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pbUpgradeVersion.Location = new System.Drawing.Point(849, 80); - this.pbUpgradeVersion.Name = "pbUpgradeVersion"; - this.pbUpgradeVersion.Size = new System.Drawing.Size(25, 25); - this.pbUpgradeVersion.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.pbUpgradeVersion.TabIndex = 706; - this.pbUpgradeVersion.TabStop = false; - this.pbUpgradeVersion.Click += new System.EventHandler(this.pbUpgradeVersion_Click); - // - // lblUpgradeVersion - // - this.lblUpgradeVersion.AutoSize = true; - this.lblUpgradeVersion.Cursor = System.Windows.Forms.Cursors.Hand; - this.lblUpgradeVersion.ForeColor = System.Drawing.SystemColors.HotTrack; - this.lblUpgradeVersion.Location = new System.Drawing.Point(795, 84); - this.lblUpgradeVersion.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.lblUpgradeVersion.Name = "lblUpgradeVersion"; - this.lblUpgradeVersion.Size = new System.Drawing.Size(56, 17); - this.lblUpgradeVersion.TabIndex = 707; - this.lblUpgradeVersion.Text = "传叠加图"; - this.lblUpgradeVersion.Click += new System.EventHandler(this.lblUpgradeVersion_Click); - // - // label3 - // - this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(780, 84); - this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(20, 17); - this.label3.TabIndex = 696; - this.label3.Text = "元"; - // - // txtUpgradeVersionAddPrice - // - this.txtUpgradeVersionAddPrice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.txtUpgradeVersionAddPrice.Location = new System.Drawing.Point(749, 81); - this.txtUpgradeVersionAddPrice.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); - this.txtUpgradeVersionAddPrice.Name = "txtUpgradeVersionAddPrice"; - this.txtUpgradeVersionAddPrice.Size = new System.Drawing.Size(31, 23); - this.txtUpgradeVersionAddPrice.TabIndex = 695; - this.txtUpgradeVersionAddPrice.Text = "1.0"; - this.txtUpgradeVersionAddPrice.TextChanged += new System.EventHandler(this.txtUpgradeVersionAddPrice_TextChanged); - // - // label5 - // - this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(695, 84); - this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(56, 17); - this.label5.TabIndex = 694; - this.label5.Text = "额外多加"; - // - // txtUpgradeVersionName - // - this.txtUpgradeVersionName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.txtUpgradeVersionName.Location = new System.Drawing.Point(607, 81); - this.txtUpgradeVersionName.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); - this.txtUpgradeVersionName.Name = "txtUpgradeVersionName"; - this.txtUpgradeVersionName.Size = new System.Drawing.Size(88, 23); - this.txtUpgradeVersionName.TabIndex = 693; - this.txtUpgradeVersionName.Text = "升级版"; - this.txtUpgradeVersionName.TextChanged += new System.EventHandler(this.txtUpgradeVersionName_TextChanged); - // - // chkUpgradeVersion - // - this.chkUpgradeVersion.AutoSize = true; - this.chkUpgradeVersion.Location = new System.Drawing.Point(531, 82); - this.chkUpgradeVersion.Name = "chkUpgradeVersion"; - this.chkUpgradeVersion.Size = new System.Drawing.Size(83, 21); - this.chkUpgradeVersion.TabIndex = 692; - this.chkUpgradeVersion.Text = "升级sku名"; - this.chkUpgradeVersion.UseVisualStyleBackColor = true; - this.chkUpgradeVersion.CheckedChanged += new System.EventHandler(this.chkUpgradeVersion_CheckedChanged); - // // btnStop // this.btnStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -707,7 +670,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // txtAddTimesFake // this.txtAddTimesFake.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.txtAddTimesFake.Location = new System.Drawing.Point(658, 44); + this.txtAddTimesFake.Location = new System.Drawing.Point(658, 41); this.txtAddTimesFake.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); this.txtAddTimesFake.Name = "txtAddTimesFake"; this.txtAddTimesFake.Size = new System.Drawing.Size(26, 23); @@ -718,7 +681,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // chkActivity // this.chkActivity.AutoSize = true; - this.chkActivity.Location = new System.Drawing.Point(531, 45); + this.chkActivity.Location = new System.Drawing.Point(531, 42); this.chkActivity.Name = "chkActivity"; this.chkActivity.Size = new System.Drawing.Size(135, 21); this.chkActivity.TabIndex = 648; @@ -730,7 +693,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms // this.label17.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(684, 47); + this.label17.Location = new System.Drawing.Point(684, 44); this.label17.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(20, 17); @@ -1033,31 +996,65 @@ namespace TemuKJD.PDDForms.ProductSelectForms // line1 // this.line1.ForeColor = System.Drawing.SystemColors.ActiveCaption; - this.line1.Location = new System.Drawing.Point(530, 31); + this.line1.Location = new System.Drawing.Point(530, 30); this.line1.Name = "line1"; - this.line1.Size = new System.Drawing.Size(316, 10); + this.line1.Size = new System.Drawing.Size(422, 10); this.line1.TabIndex = 836; this.line1.Text = "line1"; // // line2 // this.line2.ForeColor = System.Drawing.SystemColors.ActiveCaption; - this.line2.Location = new System.Drawing.Point(531, 70); + this.line2.Location = new System.Drawing.Point(531, 64); this.line2.Name = "line2"; - this.line2.Size = new System.Drawing.Size(315, 10); + this.line2.Size = new System.Drawing.Size(421, 10); this.line2.TabIndex = 837; this.line2.Text = "line2"; // // label26 // this.label26.AutoSize = true; - this.label26.Location = new System.Drawing.Point(749, 113); + this.label26.Location = new System.Drawing.Point(749, 80); this.label26.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label26.Name = "label26"; this.label26.Size = new System.Drawing.Size(13, 17); this.label26.TabIndex = 869; this.label26.Text = "-"; // + // chkAiImage + // + this.chkAiImage.AutoSize = true; + this.chkAiImage.Location = new System.Drawing.Point(930, 42); + this.chkAiImage.Name = "chkAiImage"; + this.chkAiImage.Size = new System.Drawing.Size(62, 21); + this.chkAiImage.TabIndex = 891; + this.chkAiImage.Text = "Ai生图"; + this.chkAiImage.UseVisualStyleBackColor = true; + this.chkAiImage.Visible = false; + // + // cmbCatSelect4 + // + this.cmbCatSelect4.DropDownWidth = 150; + this.cmbCatSelect4.FormattingEnabled = true; + this.cmbCatSelect4.Location = new System.Drawing.Point(890, 106); + this.cmbCatSelect4.Name = "cmbCatSelect4"; + this.cmbCatSelect4.Size = new System.Drawing.Size(97, 25); + this.cmbCatSelect4.TabIndex = 895; + this.cmbCatSelect4.Visible = false; + this.cmbCatSelect4.SelectedIndexChanged += new System.EventHandler(this.cmbCatSelect4_SelectedIndexChanged); + this.cmbCatSelect4.TextChanged += new System.EventHandler(this.cmbCatSelect4_TextChanged); + // + // chkSetCats + // + this.chkSetCats.AutoSize = true; + this.chkSetCats.Location = new System.Drawing.Point(531, 108); + this.chkSetCats.Name = "chkSetCats"; + this.chkSetCats.Size = new System.Drawing.Size(75, 21); + this.chkSetCats.TabIndex = 896; + this.chkSetCats.Text = "指定类目"; + this.chkSetCats.UseVisualStyleBackColor = true; + this.chkSetCats.Visible = false; + // // ucGroupBoxEx4 // this.ucGroupBoxEx4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -1617,9 +1614,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms // // splitContainer2.Panel2 // - this.splitContainer2.Panel2.Controls.Add(this.chkImgChanceTest); + this.splitContainer2.Panel2.Controls.Add(this.txtUpgradeVersionName); + this.splitContainer2.Panel2.Controls.Add(this.btnGetCats); this.splitContainer2.Panel2.Controls.Add(this.txtLowPriceSkuPrice); - this.splitContainer2.Panel2.Controls.Add(this.panel2); this.splitContainer2.Panel2.Controls.Add(this.txtLowPriceSkuName); this.splitContainer2.Panel2.Controls.Add(this.pbSkuImg); this.splitContainer2.Panel2.Controls.Add(this.chk15996); @@ -1635,6 +1632,13 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.splitContainer2.Panel2.Controls.Add(this.lblLowPriceSkuImg); this.splitContainer2.Panel2.Controls.Add(this.label18); this.splitContainer2.Panel2.Controls.Add(this.label19); + this.splitContainer2.Panel2.Controls.Add(this.chkUpgradeVersion); + this.splitContainer2.Panel2.Controls.Add(this.label5); + this.splitContainer2.Panel2.Controls.Add(this.txtUpgradeVersionAddPrice); + this.splitContainer2.Panel2.Controls.Add(this.label3); + this.splitContainer2.Panel2.Controls.Add(this.pbUpgradeVersion); + this.splitContainer2.Panel2.Controls.Add(this.lblUpgradeVersion); + this.splitContainer2.Panel2.Controls.Add(this.panel2); this.splitContainer2.Panel2.Controls.Add(this.dgvSelectProduct); this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0); this.splitContainer2.Size = new System.Drawing.Size(1571, 372); @@ -1657,19 +1661,19 @@ namespace TemuKJD.PDDForms.ProductSelectForms // this.dgvShop.AllowUserToAddRows = false; this.dgvShop.AllowUserToDeleteRows = false; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle89.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle89; 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; + dataGridViewCellStyle90.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle90.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle90.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle90.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle90.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle90.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle90.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle90; this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colSelect, @@ -1783,11 +1787,48 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.colMessage.Name = "colMessage"; this.colMessage.ReadOnly = true; // + // txtUpgradeVersionName + // + this.txtUpgradeVersionName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.txtUpgradeVersionName.Location = new System.Drawing.Point(97, 92); + this.txtUpgradeVersionName.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtUpgradeVersionName.Name = "txtUpgradeVersionName"; + this.txtUpgradeVersionName.Size = new System.Drawing.Size(88, 23); + this.txtUpgradeVersionName.TabIndex = 693; + this.txtUpgradeVersionName.Text = "升级版"; + this.txtUpgradeVersionName.Visible = false; + this.txtUpgradeVersionName.TextChanged += new System.EventHandler(this.txtUpgradeVersionName_TextChanged); + // + // btnGetCats + // + this.btnGetCats.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnGetCats.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnGetCats.DisabledBackColor = System.Drawing.Color.Empty; + this.btnGetCats.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnGetCats.Location = new System.Drawing.Point(6, 31); + this.btnGetCats.Name = "btnGetCats"; + this.btnGetCats.Size = new System.Drawing.Size(83, 23); + this.btnGetCats.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnGetCats.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnGetCats.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnGetCats.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnGetCats.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnGetCats.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnGetCats.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnGetCats.Style.GradientAngle = 90; + this.btnGetCats.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnGetCats.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnGetCats.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnGetCats.TabIndex = 853; + this.btnGetCats.Text = "获取类目"; + this.btnGetCats.Visible = false; + this.btnGetCats.Click += new System.EventHandler(this.btnGetCats_Click); + // // chkImgChanceTest // - this.chkImgChanceTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.chkImgChanceTest.Anchor = System.Windows.Forms.AnchorStyles.Right; this.chkImgChanceTest.AutoSize = true; - this.chkImgChanceTest.Location = new System.Drawing.Point(4, 348); + this.chkImgChanceTest.Location = new System.Drawing.Point(120, 2); this.chkImgChanceTest.Name = "chkImgChanceTest"; this.chkImgChanceTest.Size = new System.Drawing.Size(99, 21); this.chkImgChanceTest.TabIndex = 846; @@ -1812,9 +1853,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.panel2.Location = new System.Drawing.Point(345, 254); + this.panel2.Location = new System.Drawing.Point(345, 217); this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(881, 86); + this.panel2.Size = new System.Drawing.Size(881, 123); this.panel2.TabIndex = 842; // // txtLowPriceSkuName @@ -2013,23 +2054,97 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.label19.Text = "元"; this.label19.Visible = false; // + // chkUpgradeVersion + // + this.chkUpgradeVersion.AutoSize = true; + this.chkUpgradeVersion.Location = new System.Drawing.Point(21, 93); + this.chkUpgradeVersion.Name = "chkUpgradeVersion"; + this.chkUpgradeVersion.Size = new System.Drawing.Size(83, 21); + this.chkUpgradeVersion.TabIndex = 692; + this.chkUpgradeVersion.Text = "升级sku名"; + this.chkUpgradeVersion.UseVisualStyleBackColor = true; + this.chkUpgradeVersion.Visible = false; + this.chkUpgradeVersion.CheckedChanged += new System.EventHandler(this.chkUpgradeVersion_CheckedChanged); + // + // label5 + // + this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(185, 95); + this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(56, 17); + this.label5.TabIndex = 694; + this.label5.Text = "额外多加"; + this.label5.Visible = false; + // + // txtUpgradeVersionAddPrice + // + this.txtUpgradeVersionAddPrice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.txtUpgradeVersionAddPrice.Location = new System.Drawing.Point(239, 92); + this.txtUpgradeVersionAddPrice.Margin = new System.Windows.Forms.Padding(0, 2, 0, 2); + this.txtUpgradeVersionAddPrice.Name = "txtUpgradeVersionAddPrice"; + this.txtUpgradeVersionAddPrice.Size = new System.Drawing.Size(31, 23); + this.txtUpgradeVersionAddPrice.TabIndex = 695; + this.txtUpgradeVersionAddPrice.Text = "1.0"; + this.txtUpgradeVersionAddPrice.Visible = false; + this.txtUpgradeVersionAddPrice.TextChanged += new System.EventHandler(this.txtUpgradeVersionAddPrice_TextChanged); + // + // label3 + // + this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(270, 95); + this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(20, 17); + this.label3.TabIndex = 696; + this.label3.Text = "元"; + this.label3.Visible = false; + // + // pbUpgradeVersion + // + this.pbUpgradeVersion.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pbUpgradeVersion.Location = new System.Drawing.Point(339, 91); + this.pbUpgradeVersion.Name = "pbUpgradeVersion"; + this.pbUpgradeVersion.Size = new System.Drawing.Size(25, 25); + this.pbUpgradeVersion.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pbUpgradeVersion.TabIndex = 706; + this.pbUpgradeVersion.TabStop = false; + this.pbUpgradeVersion.Visible = false; + this.pbUpgradeVersion.Click += new System.EventHandler(this.pbUpgradeVersion_Click); + // + // lblUpgradeVersion + // + this.lblUpgradeVersion.AutoSize = true; + this.lblUpgradeVersion.Cursor = System.Windows.Forms.Cursors.Hand; + this.lblUpgradeVersion.ForeColor = System.Drawing.SystemColors.HotTrack; + this.lblUpgradeVersion.Location = new System.Drawing.Point(285, 95); + this.lblUpgradeVersion.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.lblUpgradeVersion.Name = "lblUpgradeVersion"; + this.lblUpgradeVersion.Size = new System.Drawing.Size(56, 17); + this.lblUpgradeVersion.TabIndex = 707; + this.lblUpgradeVersion.Text = "传叠加图"; + this.lblUpgradeVersion.Visible = false; + this.lblUpgradeVersion.Click += new System.EventHandler(this.lblUpgradeVersion_Click); + // // dgvSelectProduct // this.dgvSelectProduct.AllowUserToAddRows = false; this.dgvSelectProduct.AllowUserToDeleteRows = false; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle91.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvSelectProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle91; 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; + dataGridViewCellStyle92.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle92.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle92.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle92.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle92.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle92.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle92.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvSelectProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle92; this.dgvSelectProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvSelectProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colCheck, @@ -2091,8 +2206,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms // // colSupplierName // - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle93.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle93; this.colSupplierName.Frozen = true; this.colSupplierName.HeaderText = "店铺名称"; this.colSupplierName.Name = "colSupplierName"; @@ -2170,8 +2285,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms // // colProductName // - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colProductName.DefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle94.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colProductName.DefaultCellStyle = dataGridViewCellStyle94; this.colProductName.HeaderText = "商品标题"; this.colProductName.Name = "colProductName"; this.colProductName.ReadOnly = true; @@ -2231,8 +2346,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms // // colAddTime // - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colAddTime.DefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle95.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colAddTime.DefaultCellStyle = dataGridViewCellStyle95; this.colAddTime.FillWeight = 80F; this.colAddTime.HeaderText = "上传时间"; this.colAddTime.Name = "colAddTime"; @@ -2240,8 +2355,8 @@ namespace TemuKJD.PDDForms.ProductSelectForms // // colOpResult // - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colOpResult.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle96.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colOpResult.DefaultCellStyle = dataGridViewCellStyle96; this.colOpResult.HeaderText = "操作结果"; this.colOpResult.Name = "colOpResult"; this.colOpResult.ReadOnly = true; @@ -2262,8 +2377,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms // this.splitContainer4.Panel2.Controls.Add(this.btnClear); this.splitContainer4.Panel2.Controls.Add(this.panelEx1); + this.splitContainer4.Panel2.Controls.Add(this.chkImgChanceTest); this.splitContainer4.Size = new System.Drawing.Size(1571, 26); - this.splitContainer4.SplitterDistance = 880; + this.splitContainer4.SplitterDistance = 1134; this.splitContainer4.TabIndex = 3; // // statusBar @@ -2274,7 +2390,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms 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(880, 26); + this.statusBar.Size = new System.Drawing.Size(1134, 26); this.statusBar.TabIndex = 2; // // btnClear @@ -2284,7 +2400,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand; this.btnClear.DisabledBackColor = System.Drawing.Color.Empty; this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnClear.Location = new System.Drawing.Point(475, 2); + this.btnClear.Location = new System.Drawing.Point(221, 2); this.btnClear.Name = "btnClear"; this.btnClear.Size = new System.Drawing.Size(90, 21); this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -2305,10 +2421,11 @@ namespace TemuKJD.PDDForms.ProductSelectForms // // panelEx1 // + this.panelEx1.Anchor = System.Windows.Forms.AnchorStyles.Right; this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control; this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty; - this.panelEx1.Location = new System.Drawing.Point(568, 2); + this.panelEx1.Location = new System.Drawing.Point(314, 2); this.panelEx1.Name = "panelEx1"; this.panelEx1.Size = new System.Drawing.Size(115, 21); this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -2357,7 +2474,6 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.splitContainer1.ResumeLayout(false); this.ucGroupBoxEx2.ResumeLayout(false); this.ucGroupBoxEx2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbUpgradeVersion)).EndInit(); this.panel4.ResumeLayout(false); this.panel3.ResumeLayout(false); this.panel3.PerformLayout(); @@ -2381,9 +2497,11 @@ namespace TemuKJD.PDDForms.ProductSelectForms ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbSkuImg)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbUpgradeVersion)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvSelectProduct)).EndInit(); this.splitContainer4.Panel1.ResumeLayout(false); this.splitContainer4.Panel2.ResumeLayout(false); + this.splitContainer4.Panel2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).EndInit(); this.splitContainer4.ResumeLayout(false); this.ResumeLayout(false); @@ -2546,5 +2664,12 @@ namespace TemuKJD.PDDForms.ProductSelectForms private DevComponents.DotNetBar.PanelEx btnSeachPicUp; private System.Windows.Forms.Panel panel2; private UserComponent.UcCheckBox chkImgChanceTest; + private UserComponent.UcCheckBox chkAiImage; + private DevComponents.DotNetBar.PanelEx btnGetCats; + private System.Windows.Forms.ComboBox cmbCatSelect3; + private System.Windows.Forms.ComboBox cmbCatSelect2; + private System.Windows.Forms.ComboBox cmbCatSelect1; + private System.Windows.Forms.ComboBox cmbCatSelect4; + private UserComponent.UcCheckBox chkSetCats; } } \ No newline at end of file diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs index 02310ca..626766f 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectForm.cs @@ -48,6 +48,15 @@ namespace TemuKJD.PDDForms.ProductSelectForms public static string[] sneakersCatName { get; set; } = new string[] { "运动休闲鞋", "布鞋", "帆布鞋", "单鞋", "板鞋/休闲鞋", "广场舞鞋", "板鞋", "乐福鞋", "健步鞋", "跑步鞋", "棉鞋", "高帮休闲鞋", "网面鞋", "勃肯鞋/软木鞋", "包头拖", "足部磨砂", "老爹鞋", "工装鞋", "豆豆鞋", "汉服鞋", "雨鞋" }; + //public List numbers = new List() { "①", "②", "③", "④", "⑤", "⑥", "⑦", "⑧", "⑨", "⑩", "⑪", "⑫", "⑬", "⑭", "⑮", "⑯", "⑰", "⑱", "⑲", "⑳", "㉑ ㉒ ㉓ ㉔ ㉕ ㉖ ㉗ ㉘ ㉙ ㉚ ㉛ ㉜ ㉝ ㉞ ㉟ ㊱ ㊲ ㊳ ㊴ ㊵ ㊶ ㊷ ㊸ ㊹ ㊺ ㊻ ㊼ ㊽ ㊾ ㊿"}; + public List numbers = new List() { "①", "②", "③", "④", "⑤", "⑥", "⑦", "⑧", "⑨", "①⓪", "①①", "①②", "①③", "①④", "①⑤", "①⑥", "①⑦", "①⑧", "①⑨", "②⓪", + "②①", "②②", "②③", "②④", "②⑤", "②⑥", "②⑦", "②⑧", "②⑨", "③⓪", "③①", "③②", "③③", "③④", "③⑤", "③⑥", "③⑦", "③⑧", "③⑨", "④⓪" }; + public List chineseNumbers = new List() { "一", "二", "三", "四", "五", "六", "七", "八", "九", "十", + "十一", "十二", "十三", "十四", "十五", "十六", "十七", "十八", "十九", "二十", "二十一", "二十二", "二十三", "二十四", "二十五", "二十六", "二十七", "二十八", "二十九", "三十", + "三十一", "三十二", "三十三", "三十四", "三十五", "三十六", "三十七", "三十八", "三十九", "四十", "四十一", "四十二", "四十三", "四十四", "四十五", "四十六", "四十七", "四十八", "四十九", "五十" }; + + + public CancellationTokenSource cancellationTokenSource { get; set; } = null; public CancellationTokenSource getProdTokenSource { get; set; } = null; public bool IsLoadComplate { get; set; } = false; @@ -77,6 +86,20 @@ namespace TemuKJD.PDDForms.ProductSelectForms { chkImgChanceTest.Visible = true; } + if (BaseClass.UserAuthority.Contains("Ai传图")) + chkAiImage.Visible = true; + if (BaseClass.UserAuthority.Contains("类目指定")) + { + chkSetCats.Visible = true; + cmbCatSelect1.Visible = true; + cmbCatSelect2.Visible = true; + cmbCatSelect3.Visible = true; + cmbCatSelect4.Visible = true; + foreach (var cat in GlobalConfig.PddCatList.Where(c => c.level == 1).ToList()) + { + cmbCatSelect1.Items.Add(cat.cat_name); + } + } //Task.Run(() => { InitPddToken(); }); //RefreshApi(); @@ -7179,6 +7202,26 @@ Content-Type: image/jpeg PDDProductInfo prodInfo = null; prodInfo = JsonHelper.DeserializeJsonToObject(dbProd.product_json); + if (BaseClass.UserAuthority.Contains("类目指定") && chkSetCats.Checked) + { + Invoke(new Action(() => + { + var cat1 = GlobalConfig.PddCatList.FirstOrDefault(c => c.level == 1 && c.cat_name == cmbCatSelect1.Text); + if (cat1 == null) cat1 = new PddCatInfo() { level = 1 }; + var cat2 = GlobalConfig.PddCatList.FirstOrDefault(c => c.level == 2 && c.parent_cat_id == cat1.cat_id && c.cat_name == cmbCatSelect2.Text); + if (cat2 == null) cat2 = new PddCatInfo() { level = 2 }; + var cat3 = GlobalConfig.PddCatList.FirstOrDefault(c => c.level == 3 && c.parent_cat_id == cat2.cat_id && c.cat_name == cmbCatSelect3.Text); + if (cat3 == null) cat3 = new PddCatInfo() { level = 3 }; + var cat4 = GlobalConfig.PddCatList.FirstOrDefault(c => c.level == 4 && c.parent_cat_id == cat3.cat_id && c.cat_name == cmbCatSelect4.Text); + if (cat4 == null) cat4 = new PddCatInfo() { level = 4 }; + + if (cat1.cat_id != 0) prodInfo.detail.cat_id = cat1.cat_id.ParseToInt(); + if (cat2.cat_id != 0) prodInfo.detail.cat_id = cat2.cat_id.ParseToInt(); + if (cat3.cat_id != 0) prodInfo.detail.cat_id = cat3.cat_id.ParseToInt(); + if (cat4.cat_id != 0) prodInfo.detail.cat_id = cat4.cat_id.ParseToInt(); + })); + } + var pddApi = new PddApi(shop); #region 获取sku替换图 @@ -7219,6 +7262,7 @@ Content-Type: image/jpeg // 主图 int cnt = 0; string carousel_gallery = ""; + List carousel_gallery_lst = new List(); foreach (var img in prodInfo.detail.galleries.Where(g => g.type == 1).ToList()) { cnt++; @@ -7251,6 +7295,7 @@ Content-Type: image/jpeg return "主图上传失败 " + errMsg; } carousel_gallery += "\"" + BaseRegex.GetStringJson(ref pddUpImgApiRst, "image_url") + "\","; + carousel_gallery_lst.Add(BaseRegex.GetStringJson(ref pddUpImgApiRst, "image_url")); //break; } @@ -7588,6 +7633,85 @@ Content-Type: image/jpeg } #endregion + #region AI生成sku图片 + if (chkActivity.Checked && chkAiImage.Checked) + { + List tList = new List(); + foreach (var sku in prodInfo.detail.sku) + { + while (tList.Count >= 10) + { + Thread.Sleep(500); + tList.RemoveAll(t => t.IsCanceled || t.IsFaulted || t.IsCompleted); + } + var tt = Task.Run(() => + { + string image_url = sku.thumb_url; + string word = string.Join(" ", sku.spec.Select(s => s.spec_name).ToList()).Replace("无规格", "").Replace("默认规格", "").Trim(' ', ','); + string secret = "sadhjufhe15c4fbvFBvcvds+5sdfds@#%$xsc"; + string time = BaseClass.DateTimeToTimestampSeconds(DateTime.Now).ToString(); + string code = BaseClass.GetMd5(secret + time).ToLower(); + + try + { + //string url = "http://ai-bs.jiaotian.vip:" + Randomx.GetId(20010, 20021) + "/index.php?obj=public/image"; + //http://svn.jiaotian.vip:20010-20020/index.php?obj=public/image + string url = "http://svn.jiaotian.vip:" + Randomx.GetId(20010, 20021) + "/index.php?obj=public/image"; + string data = "time=" + time + "&code=" + code + "&image_url=" + image_url + "&word=" + word; + string html = GetHtml.PostUtf8(url, data, "", 120); + if (!string.IsNullOrEmpty(html) && !html.Contains("error")) + { + sku.thumb_url = html; + + string errMsg = ""; + var imgBase64 = PddGetActivitySkuImgBase64ForApi(out errMsg, html, null, null, 0.05f, "", null, 1200, 1200, true); + if (!string.IsNullOrEmpty(errMsg)) + { + return "初始化Sku图片错误 " + errMsg; + } + + var pddUpImgApi = new PddApi(shop); + pddUpImgApi.Data["image"] = "data:image/jpeg;base64," + imgBase64; + var pddUpImgApiRst = pddUpImgApi.PddGoodsImageUpload(); + if (!pddUpImgApiRst.Contains("\"goods_image_upload_response\"")) + pddUpImgApiRst = pddUpImgApi.PddGoodsImageUpload(); + if (!pddUpImgApiRst.Contains("\"goods_image_upload_response\"")) + { + errMsg = BaseRegex.GetStringJson(ref pddUpImgApiRst, "error_msg"); + if (string.IsNullOrEmpty(errMsg)) + errMsg = pddUpImgApiRst; + return "生成Sku图片错误 " + errMsg; + } + var thumb_url = BaseRegex.GetStringJson(ref pddUpImgApiRst, "image_url"); + sku.thumb_url = thumb_url; + } + else + { + + } + return html; + } + catch (Exception ex) + { + return "{\"code\":50001,\"msg\":\"" + ex.Message + "\"}"; + } + }); + tList.Add(tt); + } + while (tList.Count > 0) + { + Thread.Sleep(500); + tList.RemoveAll(t => t.IsCanceled || t.IsFaulted || t.IsCompleted); + } + + // 重新设置ai主图 + var newMainImgLst = prodInfo.detail.sku.Select(s => s.thumb_url).OrderBy(x => Guid.NewGuid()).ToList(); + //newMainImgLst.AddRange(carousel_gallery_lst); + newMainImgLst = newMainImgLst.Take(10).ToList(); + pddApi.Data["carousel_gallery"] = "[\"" + string.Join("\",\"", newMainImgLst) + "\"]"; + } + #endregion + #region 生成一组高倍率加价后的sku List addPriceFakeSkuInfoLst = new List(); Dictionary skuFakeSpecNameDic1 = new Dictionary(); @@ -7644,7 +7768,8 @@ Content-Type: image/jpeg skuInfo.spec[0].spec_name = skuFakeSpecNameDic1[skuInfo.spec[0].spec_name]; else { - skuFakeSpecNameDic1[skuInfo.spec[0].spec_name] = skuInfo.spec[0].parent_name + (skuFakeSpecNameDic1.Keys.Count + 1); + skuFakeSpecNameDic1[skuInfo.spec[0].spec_name] = skuInfo.spec[0].parent_name + chineseNumbers[skuFakeSpecNameDic1.Keys.Count]; + //skuFakeSpecNameDic1[skuInfo.spec[0].spec_name] = skuInfo.spec[0].parent_name + (skuFakeSpecNameDic1.Keys.Count + 1); //skuFakeSpecNameDic1[skuInfo.spec[0].spec_name] = skuInfo.spec[0].parent_name + (skuFakeSpecNameDic1.Keys.Count + 1) + " 请您下单"; //skuFakeSpecNameDic1[skuInfo.spec[0].spec_name] = /*skuInfo.spec[0].parent_name*/ "A00" + (skuFakeSpecNameDic1.Keys.Count + 1) + " 专柜品质 先生请下单"; skuInfo.spec[0].spec_name = skuFakeSpecNameDic1[skuInfo.spec[0].spec_name]; @@ -7656,10 +7781,21 @@ Content-Type: image/jpeg skuInfo.spec[1].spec_name = skuFakeSpecNameDic2[skuInfo.spec[1].spec_name]; else { - skuFakeSpecNameDic2[skuInfo.spec[1].spec_name] = "" + Randomx.GetId(50, 301) + "个 人买过 " + Randomx.GetId(3000, 12001) + "件 " + - skuInfo.spec[1].parent_name + (skuFakeSpecNameDic2.Keys.Count + 1); - //skuFakeSpecNameDic2[skuInfo.spec[1].spec_name] = "" + Randomx.GetId(300, 601) + "个 人买了 " + Randomx.GetId(3000, 12001) + "件 "; - skuInfo.spec[1].spec_name = skuFakeSpecNameDic2[skuInfo.spec[1].spec_name]; + // 生成 xx个 人买过xx件 随机名称 + if (!chkAiImage.Checked) + { + skuFakeSpecNameDic2[skuInfo.spec[1].spec_name] = "" + Randomx.GetId(50, 301) + "个 人买过 " + Randomx.GetId(3000, 12001) + "件 " + + skuInfo.spec[1].parent_name + (skuFakeSpecNameDic2.Keys.Count + 1); + //skuFakeSpecNameDic2[skuInfo.spec[1].spec_name] = "" + Randomx.GetId(300, 601) + "个 人买了 " + Randomx.GetId(3000, 12001) + "件 "; + skuInfo.spec[1].spec_name = skuFakeSpecNameDic2[skuInfo.spec[1].spec_name]; + } + // 按规格生成名称 + else + { + skuFakeSpecNameDic2[skuInfo.spec[1].spec_name] = skuInfo.spec[1].parent_name + chineseNumbers[skuFakeSpecNameDic2.Keys.Count]; + //skuFakeSpecNameDic2[skuInfo.spec[1].spec_name] = skuInfo.spec[1].parent_name + (skuFakeSpecNameDic2.Keys.Count + 1); + skuInfo.spec[1].spec_name = skuFakeSpecNameDic2[skuInfo.spec[1].spec_name]; + } } } @@ -7738,7 +7874,7 @@ Content-Type: image/jpeg #endregion #region 生成属性规格id - if (dbProd.product_get_type_text == "厂商直采") + if (dbProd.product_get_type_text == "厂商直采" || chkActivity.Checked) { var apiGetPddSpecIdRst = ApiGetPddSpecId(shop, prodInfo, addPriceSkuInfoLst, cell); if (!apiGetPddSpecIdRst.IsNullOrEmpty() && apiGetPddSpecIdRst != "success") @@ -7761,7 +7897,8 @@ Content-Type: image/jpeg #region 拼接sku,计算最高价格和最低价格 var skuApiString = ""; - var apiGetSkuRst = ApiGetPddSku(ref skuApiString, shop, addPriceSkuInfoLst, fakeImg, skuFakeSpecNameDic1, skuFakeSpecNameDic2, cell); + var skuJson = JsonHelper.SerializeObject(addPriceSkuInfoLst); + var apiGetSkuRst = ApiGetPddSku(ref skuApiString, shop, addPriceSkuInfoLst, fakeImg, skuFakeSpecNameDic1, skuFakeSpecNameDic2, cell, false, chkAiImage.Checked); if (!apiGetSkuRst.IsNullOrEmpty() && apiGetSkuRst != "success") return apiGetSkuRst; pddApi.Data["sku_list"] = "[" + skuApiString.Trim(',') + "]"; @@ -8138,7 +8275,8 @@ Content-Type: image/jpeg //foreach (var spec_prop in prodInfo.property.sku_properties) ... } - public static Bitmap PddGetActivitySkuImg(out string errorMsg, string img_url, Image fakeImg = null, Image imgUp = null, float alpha = 0.05f, string text = "", PddUploadRule uploadRule = null, int imgWidth = 0, int imgHeight = 0) + public static Bitmap PddGetActivitySkuImg(out string errorMsg, string img_url, Image fakeImg = null, Image imgUp = null, float alpha = 0.05f, + string text = "", PddUploadRule uploadRule = null, int imgWidth = 0, int imgHeight = 0, bool isZoom = false) { errorMsg = ""; string imgBase64 = ""; @@ -8178,7 +8316,30 @@ Content-Type: image/jpeg //} //x = (0.25 * imageBg.Width).ParseToInt(); //y = (0.25 * imageBg.Height).ParseToInt(); - g.DrawImage(image, new Rectangle(x, y, (imageBg.Width * 1.0).ParseToInt(), (imageBg.Height * 1.0).ParseToInt()), 0, 0, image.Width, image.Height, GraphicsUnit.Pixel); + + if (isZoom) + { + g.Clear(Color.Black); + var scale = 1.0m; + var newWidth = imageBg.Width; + var newHeight = imageBg.Height; + if (image.Width > image.Height) + { + scale = imageBg.Width * 1.0m / image.Width; + newHeight = (scale * image.Height).ParseToInt(); + y += (imageBg.Height - newHeight) / 2; + } + else + { + scale = imageBg.Height * 1.0m / image.Height; + newWidth = (scale * image.Width).ParseToInt(); + x += (imageBg.Width - newWidth) / 2; + } + g.DrawImage(image, new Rectangle(x, y, newWidth, newHeight), 0, 0, image.Width, image.Height, GraphicsUnit.Pixel); + } + else + g.DrawImage(image, new Rectangle(x, y, (imageBg.Width * 1.0).ParseToInt(), (imageBg.Height * 1.0).ParseToInt()), 0, 0, image.Width, image.Height, GraphicsUnit.Pixel); + //if (fakeImg != null) //{ // g.RotateTransform((float)-3); @@ -8375,13 +8536,14 @@ Content-Type: image/jpeg } } - public static string PddGetActivitySkuImgBase64ForApi(out string errorMsg, string img_url, Image fakeImg = null, Image imgUp = null, float alpha = 0.05f, string text = "", PddUploadRule uploadRule = null, int imgWidth = 0, int imgHeight = 0) + public static string PddGetActivitySkuImgBase64ForApi(out string errorMsg, string img_url, Image fakeImg = null, Image imgUp = null, float alpha = 0.05f, + string text = "", PddUploadRule uploadRule = null, int imgWidth = 0, int imgHeight = 0, bool isZoom = false) { errorMsg = ""; string imgBase64 = ""; try { - var imageBg = PddGetActivitySkuImg(out errorMsg, img_url, fakeImg, imgUp, alpha, text, uploadRule); + var imageBg = PddGetActivitySkuImg(out errorMsg, img_url, fakeImg, imgUp, alpha, text, uploadRule, imgWidth, imgHeight, isZoom); if (imageBg == null || !string.IsNullOrEmpty(errorMsg)) { return null; @@ -10260,7 +10422,7 @@ Content-Type: image/jpeg } private string ApiGetPddSku(ref string skuApiString, ShopLoginInfo shop, List addPriceSkuInfoLst, Image fakeImg, - Dictionary skuFakeSpecNameDic1, Dictionary skuFakeSpecNameDic2, DataGridViewCell cell, bool isEdit = false) + Dictionary skuFakeSpecNameDic1, Dictionary skuFakeSpecNameDic2, DataGridViewCell cell, bool isEdit = false, bool isAiImage = false) { Dictionary skuImgDic = new Dictionary(); // 拼接sku,计算最高价格和最低价格 @@ -10284,7 +10446,7 @@ Content-Type: image/jpeg string errMsg = ""; var imgBase64 = ""; float alpha = Math.Min(100, Math.Max(1, txtAlpha.Text.ParseToInt())) / 100f; - if (chkActivity.Checked) + if (chkActivity.Checked && !isAiImage) { //skuFakeSpecNameDic1 var text1 = skuFakeSpecNameDic1.FirstOrDefault(s => s.Value == addPriceSkuInfoLst[i].spec[0].spec_name).Key; @@ -10322,6 +10484,7 @@ Content-Type: image/jpeg thumb_url = BaseRegex.GetStringJson(ref pddUpImgApiRst, "image_url"); skuImgDic[addPriceSkuInfoLst[i].thumb_url] = thumb_url; } + //addPriceSkuInfoLst[i].thumb_url = thumb_url; int weight = addPriceSkuInfoLst[i].weight.IsNullOrZero() ? 1000 : addPriceSkuInfoLst[i].weight.ParseToInt(); @@ -10409,6 +10572,132 @@ Content-Type: image/jpeg })); } } + + private void btnGetCats_Click(object sender, EventArgs e) + { + var shopId = dgvShop.Rows.Cast().Where(row + => row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList().FirstOrDefault(); + var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId); + if (shop == null) + return; + + List pddCatsInfoLst = new List(); + + var pddApi = new PddApi(shop); + pddApi.Data["parent_cat_id"] = 0; + var rst = pddApi.PddGoodsCatsGet(); + if (!rst.Contains("goods_cats_get_response")) + { + + } + var jObj = JsonHelper.JObjectParse(rst)["goods_cats_get_response"]["goods_cats_list"]; + pddCatsInfoLst.AddRange(JsonHelper.DeserializeJsonToList(jObj.ParseToString())); + + foreach (var cat in pddCatsInfoLst.Where(c => c.level == 1).ToList()) + { + pddApi.Data["parent_cat_id"] = cat.cat_id; + rst = pddApi.PddGoodsCatsGet(); + if (!rst.Contains("goods_cats_get_response")) + { + + } + jObj = JsonHelper.JObjectParse(rst)["goods_cats_get_response"]["goods_cats_list"]; + pddCatsInfoLst.AddRange(JsonHelper.DeserializeJsonToList(jObj.ParseToString())); + } + + foreach (var cat in pddCatsInfoLst.Where(c => c.level == 2).ToList()) + { + pddApi.Data["parent_cat_id"] = cat.cat_id; + rst = pddApi.PddGoodsCatsGet(); + if (!rst.Contains("goods_cats_get_response")) + { + + } + jObj = JsonHelper.JObjectParse(rst)["goods_cats_get_response"]["goods_cats_list"]; + pddCatsInfoLst.AddRange(JsonHelper.DeserializeJsonToList(jObj.ParseToString())); + } + + foreach (var cat in pddCatsInfoLst.Where(c => c.level == 3).ToList()) + { + pddApi.Data["parent_cat_id"] = cat.cat_id; + rst = pddApi.PddGoodsCatsGet(); + if (!rst.Contains("goods_cats_get_response")) + { + + } + jObj = JsonHelper.JObjectParse(rst)["goods_cats_get_response"]["goods_cats_list"]; + pddCatsInfoLst.AddRange(JsonHelper.DeserializeJsonToList(jObj.ParseToString())); + } + + foreach (var cat in pddCatsInfoLst) + { + if (cat.level == 4 || !pddCatsInfoLst.Any(c => c.parent_cat_id == cat.cat_id)) + cat.is_leaf = true; + } + + var catStr = JsonHelper.SerializeObject(pddCatsInfoLst); + } + + private void cmbCatSelect1_SelectedIndexChanged(object sender, EventArgs e) + { + } + private void cmbCatSelect2_SelectedIndexChanged(object sender, EventArgs e) + { + } + private void cmbCatSelect3_SelectedIndexChanged(object sender, EventArgs e) + { + } + private void cmbCatSelect4_SelectedIndexChanged(object sender, EventArgs e) + { + } + private void cmbCatSelect1_TextChanged(object sender, EventArgs e) + { + cmbCatSelect2.Items.Clear(); + var cat1 = GlobalConfig.PddCatList.FirstOrDefault(c => c.level == 1 && c.cat_name == cmbCatSelect1.Text); + if (cat1 == null) + return; + + foreach (var cat in GlobalConfig.PddCatList.Where(c => c.parent_cat_id == cat1.cat_id)) + { + cmbCatSelect2.Items.Add(cat.cat_name); + } + } + private void cmbCatSelect2_TextChanged(object sender, EventArgs e) + { + cmbCatSelect3.Items.Clear(); + var cat1 = GlobalConfig.PddCatList.FirstOrDefault(c => c.level == 1 && c.cat_name == cmbCatSelect1.Text); + if (cat1 == null) + return; + var cat2 = GlobalConfig.PddCatList.FirstOrDefault(c => c.level == 2 && c.parent_cat_id == cat1.cat_id && c.cat_name == cmbCatSelect2.Text); + if (cat2 == null) + return; + + foreach (var cat in GlobalConfig.PddCatList.Where(c => c.parent_cat_id == cat2.cat_id)) + { + cmbCatSelect3.Items.Add(cat.cat_name); + } + } + private void cmbCatSelect3_TextChanged(object sender, EventArgs e) + { + cmbCatSelect4.Items.Clear(); + var cat1 = GlobalConfig.PddCatList.FirstOrDefault(c => c.level == 1 && c.cat_name == cmbCatSelect1.Text); + if (cat1 == null) + return; + var cat2 = GlobalConfig.PddCatList.FirstOrDefault(c => c.level == 2 && c.parent_cat_id == cat1.cat_id && c.cat_name == cmbCatSelect2.Text); + if (cat2 == null) + return; + var cat3 = GlobalConfig.PddCatList.FirstOrDefault(c => c.level == 3 && c.parent_cat_id == cat2.cat_id && c.cat_name == cmbCatSelect3.Text); + if (cat3 == null) + return; + + foreach (var cat in GlobalConfig.PddCatList.Where(c => c.parent_cat_id == cat3.cat_id)) + { + cmbCatSelect4.Items.Add(cat.cat_name); + } + } + private void cmbCatSelect4_TextChanged(object sender, EventArgs e) + { + } } public class AddPriceRule diff --git a/TEMUKJD/PDDForms/ShopForms/PDDShopListForm.cs b/TEMUKJD/PDDForms/ShopForms/PDDShopListForm.cs index 5e420cc..42f9e80 100644 --- a/TEMUKJD/PDDForms/ShopForms/PDDShopListForm.cs +++ b/TEMUKJD/PDDForms/ShopForms/PDDShopListForm.cs @@ -844,7 +844,7 @@ namespace TemuKJD.PDDForms.ShopForms break; case "上传Api": { - var currentPddClient = GlobalConfig.PddClentInfoList.FirstOrDefault(c => c.is_current == true); + var currentPddClient = GlobalConfig.PddClientInfoList.FirstOrDefault(c => c.is_current == true); if (currentPddClient != null) { PDDShopLoginForm shopLoginForm = new PDDShopLoginForm(shop); @@ -860,7 +860,7 @@ namespace TemuKJD.PDDForms.ShopForms break; case "上传授权": { - var currentPddClient = GlobalConfig.PddClentInfoList.FirstOrDefault(c => c.is_current == true); + var currentPddClient = GlobalConfig.PddClientInfoList.FirstOrDefault(c => c.is_current == true); if (currentPddClient != null) { PDDShopLoginForm shopLoginForm = new PDDShopLoginForm(shop); diff --git a/TEMUKJD/PDDForms/ShopForms/PDDShopLoginForm.cs b/TEMUKJD/PDDForms/ShopForms/PDDShopLoginForm.cs index 3025dcf..23b69cd 100644 --- a/TEMUKJD/PDDForms/ShopForms/PDDShopLoginForm.cs +++ b/TEMUKJD/PDDForms/ShopForms/PDDShopLoginForm.cs @@ -673,6 +673,20 @@ namespace TemuKJD.PDDForms.ShopForms static int GetAntiContentsTimes = 40; private void RequestHandler_ResourceLoadComplete(object sender, string url, string postData, string responseData, IRequest request) { + var responseDataTmp = responseData; + if (responseDataTmp.Contains("活动权益失效")) + { + + }//修改后恢复活动权益 + if (responseDataTmp.Contains("修改后恢复活动权益")) + { + + }//修改后恢复活动权益 + if (responseDataTmp.Contains("结婚男方主卧洞房喜联女方出嫁新婚房门挂联入户门贴婚庆用品批发")) + { + + } + var antiContent = request.Headers.AllKeys.Contains("Anti-Content") ? request.Headers["Anti-Content"] : ""; var refere = request.ReferrerUrl; if (shop != null && !url.StartsWith("https://mms.pinduoduo.com/janus/api/userinfo") && !string.IsNullOrEmpty(antiContent) && request.Method == "POST") diff --git a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs index 6abee15..7f65ce5 100644 --- a/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs +++ b/TEMUKJD/WXForms/ProductForms/WXDBProdUploadForm.cs @@ -239,43 +239,50 @@ namespace TemuKJD.WXForms.ProductForms upload_draft_product_lst = NaiBa.Util.Helper.ConfigHelper.LoadConfig>("wx_select_upload_draft_products"); if (upload_draft_product_lst == null) upload_draft_product_lst = new ConcurrentList(); - foreach (var selectProd in upload_draft_product_lst) + Task.Run(() => { - int rowIndex = 0; - this.dgvSelectProduct.Rows.Insert(rowIndex, - true, - selectProd.id, - selectProd.shop_id, - selectProd.shop_account, - "登录", - "进店", - BaseClass.SaLevel > 0 ? selectProd.spu_id : selectProd.spu_id.ParseToString().GetHashCode().ParseToString().Trim('-'), - selectProd.skc_id, - selectProd.main_img, - DataGridViewExtension.defaultBitmap, - "", - null, - selectProd.product_name, // 用户端显示商品原名 - selectProd.cat_name, - BaseClass.SaLevel > 0 ? selectProd.ext_code : selectProd.ext_code.ParseToString().GetHashCode().ParseToString().Trim('-'), - selectProd.status, - selectProd.draft_id, - selectProd.notes, - (selectProd.user_notes + " 编辑").Trim(), - "删除", - selectProd.add_time.ToString("yy-MM-dd HH:mm:ss"), - ""); - - dgvSelectProduct.Rows[rowIndex].Height = 60; - - int maxRowCount = 10000; - while (dgvSelectProduct.Rows.Count > maxRowCount) + foreach (var selectProd in upload_draft_product_lst.Reverse().ToList()) { - dgvSelectProduct.Rows.RemoveAt(maxRowCount); - } - } + int maxRowCount = 10000; + if (dgvSelectProduct.Rows.Count >= maxRowCount) + { + break; + } + if (dgvSelectProduct.Rows.Count % 100 == 0) + Thread.Sleep(1); + Invoke(new Action(() => + { + int rowIndex = this.dgvSelectProduct.Rows.Add( + true, + selectProd.id, + selectProd.shop_id, + selectProd.shop_account, + "登录", + "进店", + BaseClass.SaLevel > 0 ? selectProd.spu_id : selectProd.spu_id.ParseToString().GetHashCode().ParseToString().Trim('-'), + selectProd.skc_id, + selectProd.main_img, + DataGridViewExtension.defaultBitmap, + "", + null, + selectProd.product_name, // 用户端显示商品原名 + selectProd.cat_name, + BaseClass.SaLevel > 0 ? selectProd.ext_code : selectProd.ext_code.ParseToString().GetHashCode().ParseToString().Trim('-'), + selectProd.status, + selectProd.draft_id, + selectProd.notes, + (selectProd.user_notes + " 编辑").Trim(), + "删除", + selectProd.add_time.ToString("yy-MM-dd HH:mm:ss"), + "" + ); -//#if DEBUG + dgvSelectProduct.Rows[rowIndex].Height = 60; + })); + } + }); + + //#if DEBUG if (BaseClass.SaLevel == 1) { //lblExtCodeFilter.Visible = true; diff --git a/TEMUKJD/WXForms/ProductForms/WXUserCollectAuthProdListForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXUserCollectAuthProdListForm.Designer.cs index 22a7c9a..f27f043 100644 --- a/TEMUKJD/WXForms/ProductForms/WXUserCollectAuthProdListForm.Designer.cs +++ b/TEMUKJD/WXForms/ProductForms/WXUserCollectAuthProdListForm.Designer.cs @@ -355,7 +355,7 @@ namespace TemuKJD.WXForms.ProductForms this.cmbCat3.DropDownWidth = 1; this.cmbCat3.FormattingEnabled = true; this.cmbCat3.IntegralHeight = false; - this.cmbCat3.Location = new System.Drawing.Point(718, 5); + this.cmbCat3.Location = new System.Drawing.Point(718, 7); this.cmbCat3.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbCat3.Name = "cmbCat3"; this.cmbCat3.Size = new System.Drawing.Size(146, 25); @@ -383,7 +383,7 @@ namespace TemuKJD.WXForms.ProductForms this.cmbCat2.DropDownWidth = 1; this.cmbCat2.FormattingEnabled = true; this.cmbCat2.IntegralHeight = false; - this.cmbCat2.Location = new System.Drawing.Point(515, 5); + this.cmbCat2.Location = new System.Drawing.Point(515, 7); this.cmbCat2.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbCat2.Name = "cmbCat2"; this.cmbCat2.Size = new System.Drawing.Size(146, 25); @@ -411,7 +411,7 @@ namespace TemuKJD.WXForms.ProductForms this.cmbCat1.DropDownWidth = 1; this.cmbCat1.FormattingEnabled = true; this.cmbCat1.IntegralHeight = false; - this.cmbCat1.Location = new System.Drawing.Point(293, 5); + this.cmbCat1.Location = new System.Drawing.Point(293, 7); this.cmbCat1.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbCat1.Name = "cmbCat1"; this.cmbCat1.Size = new System.Drawing.Size(146, 25); @@ -471,7 +471,7 @@ namespace TemuKJD.WXForms.ProductForms "安全+未校验", "安全商品", "未校验"}); - this.cmbWxSafe.Location = new System.Drawing.Point(71, 40); + this.cmbWxSafe.Location = new System.Drawing.Point(71, 42); this.cmbWxSafe.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbWxSafe.Name = "cmbWxSafe"; this.cmbWxSafe.Size = new System.Drawing.Size(146, 25); @@ -494,7 +494,7 @@ namespace TemuKJD.WXForms.ProductForms // this.cmbGroupFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.cmbGroupFilter.FormattingEnabled = true; - this.cmbGroupFilter.Location = new System.Drawing.Point(938, 5); + this.cmbGroupFilter.Location = new System.Drawing.Point(938, 7); this.cmbGroupFilter.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbGroupFilter.Name = "cmbGroupFilter"; this.cmbGroupFilter.Size = new System.Drawing.Size(146, 25); @@ -516,7 +516,7 @@ namespace TemuKJD.WXForms.ProductForms "机会商品", "以图搜品", "外部数据"}); - this.cmbSourceType.Location = new System.Drawing.Point(718, 40); + this.cmbSourceType.Location = new System.Drawing.Point(718, 42); this.cmbSourceType.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbSourceType.Name = "cmbSourceType"; this.cmbSourceType.Size = new System.Drawing.Size(146, 25); @@ -546,7 +546,7 @@ namespace TemuKJD.WXForms.ProductForms "", "是", "否"}); - this.cmbRelation.Location = new System.Drawing.Point(938, 40); + this.cmbRelation.Location = new System.Drawing.Point(938, 42); this.cmbRelation.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbRelation.Name = "cmbRelation"; this.cmbRelation.Size = new System.Drawing.Size(146, 25); diff --git a/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.Designer.cs b/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.Designer.cs index fa314c7..8fe73a0 100644 --- a/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.Designer.cs +++ b/TEMUKJD/WXForms/ProductForms/WXUserProdListForm.Designer.cs @@ -420,7 +420,7 @@ namespace TemuKJD.WXForms.ProductForms this.cmbCat3.DropDownWidth = 1; this.cmbCat3.FormattingEnabled = true; this.cmbCat3.IntegralHeight = false; - this.cmbCat3.Location = new System.Drawing.Point(718, 7); + this.cmbCat3.Location = new System.Drawing.Point(718, 5); this.cmbCat3.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbCat3.Name = "cmbCat3"; this.cmbCat3.Size = new System.Drawing.Size(146, 25); @@ -448,7 +448,7 @@ namespace TemuKJD.WXForms.ProductForms this.cmbCat2.DropDownWidth = 1; this.cmbCat2.FormattingEnabled = true; this.cmbCat2.IntegralHeight = false; - this.cmbCat2.Location = new System.Drawing.Point(515, 7); + this.cmbCat2.Location = new System.Drawing.Point(515, 5); this.cmbCat2.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbCat2.Name = "cmbCat2"; this.cmbCat2.Size = new System.Drawing.Size(146, 25); @@ -476,7 +476,7 @@ namespace TemuKJD.WXForms.ProductForms this.cmbCat1.DropDownWidth = 1; this.cmbCat1.FormattingEnabled = true; this.cmbCat1.IntegralHeight = false; - this.cmbCat1.Location = new System.Drawing.Point(293, 5); + this.cmbCat1.Location = new System.Drawing.Point(293, 7); this.cmbCat1.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbCat1.Name = "cmbCat1"; this.cmbCat1.Size = new System.Drawing.Size(146, 25); @@ -536,7 +536,7 @@ namespace TemuKJD.WXForms.ProductForms "安全+未校验", "安全商品", "未校验"}); - this.cmbWxSafe.Location = new System.Drawing.Point(71, 40); + this.cmbWxSafe.Location = new System.Drawing.Point(71, 42); this.cmbWxSafe.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbWxSafe.Name = "cmbWxSafe"; this.cmbWxSafe.Size = new System.Drawing.Size(146, 25); @@ -559,7 +559,7 @@ namespace TemuKJD.WXForms.ProductForms // this.cmbGroupFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.cmbGroupFilter.FormattingEnabled = true; - this.cmbGroupFilter.Location = new System.Drawing.Point(938, 7); + this.cmbGroupFilter.Location = new System.Drawing.Point(938, 5); this.cmbGroupFilter.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbGroupFilter.Name = "cmbGroupFilter"; this.cmbGroupFilter.Size = new System.Drawing.Size(146, 25); @@ -580,7 +580,7 @@ namespace TemuKJD.WXForms.ProductForms "机会商品", "以图搜品", "外部数据"}); - this.cmbSourceType.Location = new System.Drawing.Point(718, 42); + this.cmbSourceType.Location = new System.Drawing.Point(718, 40); this.cmbSourceType.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbSourceType.Name = "cmbSourceType"; this.cmbSourceType.Size = new System.Drawing.Size(146, 25); @@ -610,7 +610,7 @@ namespace TemuKJD.WXForms.ProductForms "", "是", "否"}); - this.cmbRelation.Location = new System.Drawing.Point(938, 42); + this.cmbRelation.Location = new System.Drawing.Point(938, 40); this.cmbRelation.Margin = new System.Windows.Forms.Padding(0, 3, 3, 3); this.cmbRelation.Name = "cmbRelation"; this.cmbRelation.Size = new System.Drawing.Size(146, 25); diff --git a/Work/Initialization.cs b/Work/Initialization.cs index d2dd941..b8142c7 100644 --- a/Work/Initialization.cs +++ b/Work/Initialization.cs @@ -744,6 +744,16 @@ offCountPara,false;offProductPara,100;IrregularitiesPara,true;noNeerPara,true;no } } + if (!FileBase.Exists("temp\\pddCat260506")) + { + if (GetHtml.DownloadFile(BaseClass.ServerUrl + "/Download/" + "pddCat260506.zip", "temp\\pddCat260506.dll" + ".bak")) + { + FileBase.Move("temp\\pddCat260506.dll" + ".bak", "temp\\pddCat260506.zip"); + ZipFile.ExtractToDirectory(Path.Combine(Environment.CurrentDirectory, "temp\\pddCat260506.zip"), Path.Combine(Environment.CurrentDirectory, "temp")); + File.Delete(Path.Combine(Environment.CurrentDirectory, "temp\\pddCat260506.zip")); + } + } + /* List files = new List(); files.Add(new KeyValueBase("标题包含过滤_new.txt", "config/标题包含过滤x.ini"));