diff --git a/AllBase/AllBase.csproj b/AllBase/AllBase.csproj index a0c9706..f23c641 100644 --- a/AllBase/AllBase.csproj +++ b/AllBase/AllBase.csproj @@ -201,7 +201,7 @@ - + @@ -219,6 +219,7 @@ + diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs index f566d38..7cce23d 100644 --- a/AllBase/BaseClass.cs +++ b/AllBase/BaseClass.cs @@ -27,7 +27,7 @@ namespace AllBase /// /// 版本ID /// - public static int VersionCount = 702; + public static int VersionCount = 706; //public static int VersionCount = 613; /// @@ -301,6 +301,7 @@ namespace AllBase public static string UserName = ""; //public static bool IsSa; public static int SaLevel = 0; + public static decimal? AuthorizedAmount = null; /// /// 注册昵称 /// diff --git a/AllBase/BaseRegex.cs b/AllBase/BaseRegex.cs index cd1e524..c5ef634 100644 --- a/AllBase/BaseRegex.cs +++ b/AllBase/BaseRegex.cs @@ -532,6 +532,23 @@ namespace AllBase return 0; } + /// + /// 获取值 + /// + /// + /// + /// + public static decimal? GetNullableDecimalJson(ref string html, string reg) + { + string temp = GetMatchRegexString(html, @"['""]" + reg + @"['""][\s]*:[\s]*['""]([^']+?)['""]"); + if (string.IsNullOrEmpty(temp)) + temp = GetMatchRegexString(html, @"['""]" + reg + @"['""][\s]*:[\s]*([\d-\.]+)"); + decimal i = 0; + if (decimal.TryParse(temp, out i)) + return i; + return null; + } + /// /// 获取值 /// diff --git a/AllBase/Helper/GlobalConfig.cs b/AllBase/Helper/GlobalConfig.cs index 4faee79..7ac0c34 100644 --- a/AllBase/Helper/GlobalConfig.cs +++ b/AllBase/Helper/GlobalConfig.cs @@ -25,7 +25,7 @@ namespace AllBase.Helper /// /// 店铺设置参数 /// - public static DouShopSettingParam DouShopSettingParam { get; set; } + public static TemuShopSettingParam TemuShopSettingParam { get; set; } = new TemuShopSettingParam(); /// /// 抖音号cookie diff --git a/AllBase/Model/Param/ShopManage/DouShopSettingParam.cs b/AllBase/Model/Param/ShopManage/TemuShopSettingParam.cs similarity index 86% rename from AllBase/Model/Param/ShopManage/DouShopSettingParam.cs rename to AllBase/Model/Param/ShopManage/TemuShopSettingParam.cs index 712b79b..107b9b3 100644 --- a/AllBase/Model/Param/ShopManage/DouShopSettingParam.cs +++ b/AllBase/Model/Param/ShopManage/TemuShopSettingParam.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace AllBase.Model.Param.ShopManage { - public class DouShopSettingParam + public class TemuShopSettingParam { public bool IsAutoDragLogin { get; set; } = false; } diff --git a/AllBase/Model/Result/KJDDBProduct.cs b/AllBase/Model/Result/KJDDBProduct.cs index bb51b86..a05bfcb 100644 --- a/AllBase/Model/Result/KJDDBProduct.cs +++ b/AllBase/Model/Result/KJDDBProduct.cs @@ -46,11 +46,13 @@ namespace AllBase.Model.Result public int product_get_type { get; set; } public string head_words { get; set; } public string end_words { get; set; } + public string fission_words { get; set; } /// /// temu 成本价 /// - public string cost_price { get; set; } - public string fission_words { get; set; } + public decimal? cost_price { get; set; } + public decimal? delivery_fee { get; set; } + public decimal? mark_fee { get; set; } // 是否拼多多上传成功 public bool isPddUpLoad { get; set; } = false; diff --git a/AllBase/Model/Result/ShopLoginInfo.cs b/AllBase/Model/Result/ShopLoginInfo.cs index 6bae6fd..132fc18 100644 --- a/AllBase/Model/Result/ShopLoginInfo.cs +++ b/AllBase/Model/Result/ShopLoginInfo.cs @@ -201,6 +201,7 @@ namespace AllBase.Model.Result public class SubAccountInfo { + public int id { get; set; } public string user_name { get; set; } public string nick_name { get; set; } public string mobile { get; set; } @@ -241,7 +242,10 @@ namespace AllBase.Model.Result return s; } } - public int id { get; set; } + /// + /// 用户(JIT推单)授权金额 + /// + public decimal? authorized_amount { get; set; } } public class ShopSubAccountInfo : SubAccountInfo diff --git a/AllBase/Model/Result/TemuDBProdMapResult.cs b/AllBase/Model/Result/TemuDBProdMapResult.cs new file mode 100644 index 0000000..b215079 --- /dev/null +++ b/AllBase/Model/Result/TemuDBProdMapResult.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AllBase.Model.Result +{ + public class DBProdDbIdMapProductIdInfo + { + public int id { get; set; } + public int product_select_db_id { get; set; } + public long product_id { get; set; } + public long shop_id { get; set; } + public DateTime add_time { get; set; } + } + + public class DBProdDraftIdMapUpSpuIdInfo + { + public int id { get; set; } + public long draft_id { get; set; } + public long from_spu_id { get; set; } + public long shop_id { get; set; } + public DateTime add_time { get; set; } + public decimal? cost_price { get; set; } + public decimal? delivery_fee { get; set; } + public decimal? mark_fee { get; set; } + } +} diff --git a/KJDService/KJD_WebService/BLL/KJD/ProductManage.cs b/KJDService/KJD_WebService/BLL/KJD/ProductManage.cs index b592eb0..2596fa1 100644 --- a/KJDService/KJD_WebService/BLL/KJD/ProductManage.cs +++ b/KJDService/KJD_WebService/BLL/KJD/ProductManage.cs @@ -5,6 +5,7 @@ using NaiBa.Util.Extension; using System; using System.Collections.Generic; using System.Data; +using System.Diagnostics; using System.Linq; using System.Web; using System.Web.Security; @@ -200,12 +201,14 @@ namespace KJD_Web.BLL sql = "SELECT * from kjd.product p where p.is_del=0"; else if (string.IsNullOrEmpty(get_select_count)) sql = "SELECT p.id,p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img,p.notes,p.group," + - "p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,p.cost_price,p.product_get_type" + + "p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,p.product_get_type," + + "p.cost_price,p.delivery_fee,p.mark_fee" + " FROM kjd.product p" + " WHERE p.is_del=0"; else // 统计单店认领次数 sql = "SELECT p.id,p.spu_id,p.skc_id,p.cat_id,p.cat_name,p.ext_code,p.product_name,p.main_img,p.notes,p.group," + - "p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,p.cost_price,p.product_get_type" + + "p.add_time,p.mdy_time,p.select_total_count,p.fission_words,p.head_words,p.end_words,p.product_get_type," + + "p.cost_price,delivery_fee,p.mark_fee" + ",COUNT(s.id) AS select_count" + " FROM kjd.product p LEFT JOIN kjd.product_select s ON p.id=s.out_product_id AND s.shop_id='" + select_shop_id + "'" + " WHERE p.is_del=0"; @@ -255,6 +258,8 @@ namespace KJD_Web.BLL head_words = row["head_words"].ParseToString(), end_words = row["end_words"].ParseToString(), cost_price = row["cost_price"].ParseToString(), + delivery_fee = row["delivery_fee"].ParseToString(), + mark_fee = row["mark_fee"].ParseToString(), product_get_type = row["product_get_type"].ParseToInt(), //0母店采集 1前端直采 }; if (isDetail) @@ -372,6 +377,8 @@ namespace KJD_Web.BLL string head_words = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "head_words"))?.Replace("'", "\\'"); string end_words = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "end_words"))?.Replace("'", "\\'"); string cost_price = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "cost_price"))?.Replace("'", "\\'"); + string delivery_fee = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "delivery_fee"))?.Replace("'", "\\'"); + string mark_fee = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "mark_fee"))?.Replace("'", "\\'"); string product_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "product_json"))?.Replace("'", "\\'"); string size_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "size_json"))?.Replace("'", "\\'"); string original_json = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "original_json"))?.Replace("'", "\\'"); @@ -400,6 +407,10 @@ namespace KJD_Web.BLL sql += " end_words='" + end_words + "',"; if (cost_price != null) sql += " cost_price='" + cost_price + "',"; + if (delivery_fee != null) + sql += " delivery_fee='" + delivery_fee + "',"; + if (mark_fee != null) + sql += " mark_fee='" + mark_fee + "',"; if (product_json != null) sql += " product_json='" + product_json + "',"; if (size_json != null) @@ -922,7 +933,7 @@ namespace KJD_Web.BLL return "{\"code\":19999,\"msg\":\"输入为空\"}"; } - public string GetSelectProductMapDraftIdList(string inputData, bool isDetail = false) + public string GetSelectProdDbIdMapDraftIdList(string inputData, bool isDetail = false) { if (!string.IsNullOrEmpty(inputData)) { @@ -990,10 +1001,10 @@ namespace KJD_Web.BLL { try { - List productSelectMapLst = new List(); + List dbIdMapProductIdLst = new List(); foreach (DataRow row in dt.Rows) { - DBProductSelectMapResultParam productSelectMap = new DBProductSelectMapResultParam + DBProdDbIdMapProductIdResultParam dbIdMapProductId = new DBProdDbIdMapProductIdResultParam { id = row["id"].ParseToInt(), product_id = row["product_id"].ParseToLong(), @@ -1001,9 +1012,9 @@ namespace KJD_Web.BLL shop_id = row["shop_id"].ParseToLong(), add_time = Convert.ToDateTime(row["add_time"]), }; - productSelectMapLst.Add(productSelectMap); + dbIdMapProductIdLst.Add(dbIdMapProductId); } - var data = JsonUtils.SerializerObjectToString(productSelectMapLst); + var data = JsonUtils.SerializerObjectToString(dbIdMapProductIdLst); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; } catch (Exception ex) @@ -1015,7 +1026,96 @@ namespace KJD_Web.BLL } return "{\"code\":19999,\"msg\":\"输入为空\"}"; } - + + + public string GetSelectProdMapUpSpuIdList(string inputData, bool isDetail = false) + { + if (!string.IsNullOrEmpty(inputData)) + { + var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); + string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); + if (time1 != EncrypUtil.Encryption(time)) + return "{\"code\":50000,\"msg\":\"校验失败\"}"; + + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); + var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'"); + if (string.IsNullOrEmpty(user_name)) + { + return "{\"code\":50001,\"msg\":\"用户为空\"}"; + } + + var in_draft_ids = RegexUtils.GetStringQuery(ref inputData, "in_draft_ids")?.Replace("'", "\\'"); + if (string.IsNullOrEmpty(in_draft_ids)) + { + return "{\"code\":50002,\"msg\":\"未选择选品数据\"}"; + } + var in_draft_id_list = in_draft_ids.Split(new string[] { " ", ",", "," }, StringSplitOptions.RemoveEmptyEntries); + if (in_draft_id_list.Count() <= 0) + { + return "{\"code\":50003,\"msg\":\"未选择选品数据\"}"; + } + string tableName = "kjd_map.spu_map_"; // kjd pdd jit 都在一套表 + long l_spu_map_table_id = 0; + + int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); + int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + + string sql = ""; + sql += "SELECT combined_query.*, p.cost_price, p.delivery_fee, p.mark_fee FROM ("; + for (int i = 0; i < in_draft_id_list.Count() && i < 200; i++) + { + if (i > 0) + sql += " UNION ALL "; + l_spu_map_table_id = in_draft_id_list[i].ParseToLong() % 128; + sql += "select * from " + tableName + l_spu_map_table_id + " where draft_id=" + in_draft_id_list[i]; + } + sql += ") AS combined_query left join product p On combined_query.from_spu_id=p.spu_id"; + sql += " order by add_time desc"; + sql += " limit " + Math.Max(page - 1, 0) * page_size + "," + page_size; + DataTable dt = mySql.ExecuteDataTable(sql); + + mySql.Close(); + + if (!string.IsNullOrEmpty(mySql.Message)) + { + return "{\"code\":500,\"msg\":\"" + mySql.Message + "\",\"data\":[],\"count\":" + 0 + "}"; + } + if (dt != null) + { + try + { + List draftIdMapUpSpuIdLst = new List(); + foreach (DataRow row in dt.Rows) + { + DBProdDraftIdMapUpSpuIdResultParam draftIdMapUpSpuId = new DBProdDraftIdMapUpSpuIdResultParam + { + id = row["id"].ParseToInt(), + draft_id = row["draft_id"].ParseToLong(), + from_spu_id = row["from_spu_id"].ParseToLong(), + shop_id = row["shop_id"].ParseToLong(), + add_time = Convert.ToDateTime(row["add_time"]), + cost_price = row["cost_price"].IsNullOrEmpty() ? new decimal?() : row["cost_price"].ParseToDecimal(), + delivery_fee = row["delivery_fee"].IsNullOrEmpty() ? new decimal?() : row["delivery_fee"].ParseToDecimal(), + mark_fee = row["mark_fee"].IsNullOrEmpty() ? new decimal?() : row["mark_fee"].ParseToDecimal(), + }; + draftIdMapUpSpuIdLst.Add(draftIdMapUpSpuId); + } + var data = JsonUtils.SerializerObjectToString(draftIdMapUpSpuIdLst); + return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + -1 + "}"; + } + catch (Exception ex) + { + return "{\"code\":500,\"msg\":\"" + ex.Message + "\",\"data\":[],\"count\":" + 0 + "}"; + } + } + return "{\"code\":500,\"msg\":\"查询结果为空!\",\"data\":[],\"count\":" + 0 + "}"; + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + public string AddSkuImg(string inputData) { if (!string.IsNullOrEmpty(inputData)) @@ -1324,6 +1424,119 @@ namespace KJD_Web.BLL } return "{\"code\":19999,\"msg\":\"输入为空\"}"; } + + public string AddCateSizeWeightConfig(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var time = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "time"), out time); + string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); + if (time1 != EncrypUtil.Encryption(time)) + return "{\"code\":50000,\"msg\":\"校验失败\"}"; + + string user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); + string cat_id = RegexUtils.GetStringQuery(ref inputData, "cat_id"); + string min_len = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "minLen"))?.Replace("'", "\\'"); + string max_len = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "maxLen"))?.Replace("'", "\\'"); + string min_width = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "minWidth"))?.Replace("'", "\\'"); + string max_width = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "maxWidth"))?.Replace("'", "\\'"); + string min_height = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "minHeight"))?.Replace("'", "\\'"); + string max_height = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "maxHeight"))?.Replace("'", "\\'"); + string min_weight = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "minWeight"))?.Replace("'", "\\'"); + string max_weight = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "maxWeight"))?.Replace("'", "\\'"); + + if (string.IsNullOrEmpty(user_name)) + { + return "{\"code\":500,\"msg\":\"没有用户名\"}"; + } + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = ""; + + sql = "insert into kjd.cate_size_weight_config (cat_id,min_len,max_len,min_width,max_width,min_height,max_height,min_weight,max_weight) " + + "values ('" + cat_id + "'," + min_len + "," + max_len + "," + min_width + "," + max_width + "," + + min_height + "," + max_height + "," + min_weight + "," + max_weight + ");"; + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + if (rst) + { + return "{\"code\":200,\"msg\":\"success\"}"; + } + else + { + return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}"; + } + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + + public string GetCateSizeWeightConfig(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var time = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "time"), out time); + string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); + if (time1 != EncrypUtil.Encryption(time)) + return "{\"code\":50000,\"msg\":\"校验失败\"}"; + + string user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); + string cat_id = RegexUtils.GetStringQuery(ref inputData, "cat_id"); + string min_len = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "minLen"))?.Replace("'", "\\'"); + string max_len = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "maxLen"))?.Replace("'", "\\'"); + string min_width = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "minWidth"))?.Replace("'", "\\'"); + string max_width = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "maxWidth"))?.Replace("'", "\\'"); + string min_height = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "minHeight"))?.Replace("'", "\\'"); + string max_height = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "maxHeight"))?.Replace("'", "\\'"); + string min_weight = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "minWeight"))?.Replace("'", "\\'"); + string max_weight = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "maxWeight"))?.Replace("'", "\\'"); + + if (string.IsNullOrEmpty(user_name)) + { + return "{\"code\":500,\"msg\":\"没有用户名\"}"; + } + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = ""; + + sql = "select * from kjd.cate_size_weight_config where cat_id='" + cat_id + "';"; + var dt = mySql.ExecuteDataTable(sql); + mySql.Close(); + if (dt != null) + { + if(dt.Rows.Count > 0) + { + var row = dt.Rows[0]; + int id = row["id"].ParseToInt(); + string catId = row["cat_id"].ParseToString(); + int minLen = row["min_len"].ParseToInt(); + int maxLen = row["max_len"].ParseToInt(); + int minWidth = row["min_width"].ParseToInt(); + int maxWidth = row["max_width"].ParseToInt(); + int minHeight = row["min_height"].ParseToInt(); + int maxHeight = row["max_height"].ParseToInt(); + int minWeight = row["min_weight"].ParseToInt(); + int maxWeight = row["max_weight"].ParseToInt(); + + return "{\"code\":200,\"msg\":\"success\",\"data\":{\"catId\":\"" + catId + "\"," + + "\"minLen\":" + minLen + ",\"maxLen\":" + maxLen + "," + + "\"minWidth\":" + minWidth + ",\"maxWidth\":" + maxWidth + "," + + "\"minHeight\":" + minHeight + ",\"maxHeight\":" + maxHeight + "," + + "\"minWeight\":" + minWeight + ",\"maxWeight\":" + maxWeight + "}}"; + } + else + return "{\"code\":200,\"msg\":\"success\",\"data\":null}"; + } + else + { + return "{\"code\":500,\"msg\":\"" + mySql.Message + "\"}"; + } + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } } } diff --git a/KJDService/KJD_WebService/BLL/KJD/ProductThirdManage.cs b/KJDService/KJD_WebService/BLL/KJD/ProductThirdManage.cs index e7b006d..e7c1e80 100644 --- a/KJDService/KJD_WebService/BLL/KJD/ProductThirdManage.cs +++ b/KJDService/KJD_WebService/BLL/KJD/ProductThirdManage.cs @@ -772,7 +772,7 @@ namespace KJD_Web.BLL return "{\"code\":19999,\"msg\":\"输入为空\"}"; } - public string GetSelectProductMapDraftIdList(string inputData, bool isDetail = false) + public string GetSelectProdDbIdMapDraftIdList(string inputData, bool isDetail = false) { if (!string.IsNullOrEmpty(inputData)) { @@ -832,10 +832,10 @@ namespace KJD_Web.BLL { try { - List productSelectMapLst = new List(); + List dbIdMapProductIdLst = new List(); foreach (DataRow row in dt.Rows) { - DBProductSelectMapResultParam productSelectMap = new DBProductSelectMapResultParam + DBProdDbIdMapProductIdResultParam dbIdMapProductId = new DBProdDbIdMapProductIdResultParam { id = row["id"].ParseToInt(), product_id = row["product_id"].ParseToLong(), @@ -843,9 +843,9 @@ namespace KJD_Web.BLL shop_id = row["shop_id"].ParseToLong(), add_time = Convert.ToDateTime(row["add_time"]), }; - productSelectMapLst.Add(productSelectMap); + dbIdMapProductIdLst.Add(dbIdMapProductId); } - var data = JsonUtils.SerializerObjectToString(productSelectMapLst); + var data = JsonUtils.SerializerObjectToString(dbIdMapProductIdLst); return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; } catch (Exception ex) diff --git a/KJDService/KJD_WebService/BLL/KJD/UserManage.cs b/KJDService/KJD_WebService/BLL/KJD/UserManage.cs index 1f364d3..44e0bfc 100644 --- a/KJDService/KJD_WebService/BLL/KJD/UserManage.cs +++ b/KJDService/KJD_WebService/BLL/KJD/UserManage.cs @@ -46,6 +46,7 @@ namespace KJD_Web.BLL 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, + authorized_amount = row.Table.Columns.Contains("authorized_amount") ? row["sa_level"].ParseToInt() : 0, }; if (string.IsNullOrEmpty(user.company_name)) @@ -276,6 +277,7 @@ namespace KJD_Web.BLL 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, + authorized_amount = row.Table.Columns.Contains("authorized_amount") ? row["authorized_amount"].ParseToInt() : 0, }; if (string.IsNullOrEmpty(user.mobile)) { @@ -303,6 +305,7 @@ namespace KJD_Web.BLL 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 authorized_amount = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'"); int r2 = 0; int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); @@ -317,9 +320,10 @@ namespace KJD_Web.BLL return "{\"code\":500,\"msg\":\"用户名已存在\"}"; } - sql = "insert into kjd.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,sa_level,add_time,mdy_time) " + + sql = "insert into kjd.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,sa_level," + + "authorized_amount,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 + "," + authorized_amount + ",'" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');"; var rst = mySql.ExecuteNonQuery(sql); @@ -346,6 +350,7 @@ namespace KJD_Web.BLL 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 authorized_amount = RegexUtils.GetStringQuery(ref inputData, "authorized_amount")?.Replace("'", "\\'"); int r2 = 0; int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); @@ -373,6 +378,8 @@ namespace KJD_Web.BLL sql += " notes='" + notes + "',"; if (!string.IsNullOrEmpty(sa_level)) sql += " sa_level=" + sa_level + ","; + if (!string.IsNullOrEmpty(authorized_amount)) + sql += " authorized_amount=" + authorized_amount + ","; sql = sql.TrimEnd(','); sql += " where id=" + id + ""; diff --git a/KJDService/KJD_WebService/KJD_WebService.csproj b/KJDService/KJD_WebService/KJD_WebService.csproj index c48d36e..7732ce0 100644 --- a/KJDService/KJD_WebService/KJD_WebService.csproj +++ b/KJDService/KJD_WebService/KJD_WebService.csproj @@ -107,7 +107,7 @@ - + diff --git a/KJDService/KJD_WebService/Model/DBProdDbIdMapProductIdResultParam.cs b/KJDService/KJD_WebService/Model/DBProdDbIdMapProductIdResultParam.cs new file mode 100644 index 0000000..c8717da --- /dev/null +++ b/KJDService/KJD_WebService/Model/DBProdDbIdMapProductIdResultParam.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; + +namespace KJD_Web.Model +{ + public class DBProdDbIdMapProductIdResultParam + { + public int id { get; set; } + public int product_select_db_id { get; set; } + public long product_id { get; set; } + public long shop_id { get; set; } + public DateTime add_time { get; set; } + } + + public class DBProdDraftIdMapUpSpuIdResultParam + { + public int id { get; set; } + public long draft_id { get; set; } + public long from_spu_id { get; set; } + public long shop_id { get; set; } + public DateTime add_time { get; set; } + public decimal? cost_price { get; set; } + public decimal? delivery_fee { get; set; } + public decimal? mark_fee { get; set; } + } +} \ No newline at end of file diff --git a/KJDService/KJD_WebService/Model/DBProductResultParam.cs b/KJDService/KJD_WebService/Model/DBProductResultParam.cs index 48c49be..efb910c 100644 --- a/KJDService/KJD_WebService/Model/DBProductResultParam.cs +++ b/KJDService/KJD_WebService/Model/DBProductResultParam.cs @@ -26,7 +26,21 @@ namespace KJD_Web.Model /// 成本价格 /// public string cost_price { get; set; } + /// + /// 快递费 + /// + public string delivery_fee { get; set; } + /// + /// 贴单费 + /// + public string mark_fee { get; set; } + /// + /// 变更类目ID(针对旧类目可能不可再提交商品) + /// public string change_cat_id { get; set; } + /// + /// 变更类目名称(针对旧类目可能不可再提交商品) + /// public string change_cat_name { get; set; } public string ext_code { get; set; } public string product_name { get; set; } diff --git a/KJDService/KJD_WebService/Model/DBProductSelectMapResultParam.cs b/KJDService/KJD_WebService/Model/DBProductSelectMapResultParam.cs deleted file mode 100644 index 80fff54..0000000 --- a/KJDService/KJD_WebService/Model/DBProductSelectMapResultParam.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; - -namespace KJD_Web.Model -{ - public class DBProductSelectMapResultParam - { - public int id { get; set; } - public long product_id { get; set; } - public int product_select_db_id { get; set; } - public long shop_id { get; set; } - public DateTime add_time { get; set; } - } -} \ No newline at end of file diff --git a/KJDService/KJD_WebService/Model/UserLoginResultParam.cs b/KJDService/KJD_WebService/Model/UserLoginResultParam.cs index f99e94a..c743fa2 100644 --- a/KJDService/KJD_WebService/Model/UserLoginResultParam.cs +++ b/KJDService/KJD_WebService/Model/UserLoginResultParam.cs @@ -48,6 +48,8 @@ namespace KJD_Web.Model set { _sa_level = value; } } + public decimal authorized_amount { get; set; } + public DateTime add_time { get; set; } public DateTime mdy_time { get; set; } diff --git a/KJDService/KJD_WebService/ProductService.asmx.cs b/KJDService/KJD_WebService/ProductService.asmx.cs index 623ffb3..efd2f6e 100644 --- a/KJDService/KJD_WebService/ProductService.asmx.cs +++ b/KJDService/KJD_WebService/ProductService.asmx.cs @@ -232,11 +232,22 @@ namespace KJD_Web [WebMethod] - public void get_select_product_map_draft_id_list() + public void get_select_prod_db_id_map_draft_id_list() { string jsontext = GetRequestJsonString(); var result = jsontext; - result = new ProductManage().GetSelectProductMapDraftIdList(jsontext); + result = new ProductManage().GetSelectProdDbIdMapDraftIdList(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void get_select_prod_map_up_spu_id_list() + { + string jsontext = GetRequestJsonString(); + var result = jsontext; + result = new ProductManage().GetSelectProdMapUpSpuIdList(jsontext); Context.Response.Write(result); Context.Response.End(); @@ -296,5 +307,29 @@ namespace KJD_Web Context.Response.Write(result); Context.Response.End(); } + + //AddCateSizeWeightConfig + + [WebMethod] + public void add_cate_size_weight_config() + { + string jsontext = GetRequestJsonString(); + var result = jsontext; + result = new ProductManage().AddCateSizeWeightConfig(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + + [WebMethod] + public void get_cate_size_weight_config() + { + string jsontext = GetRequestJsonString(); + var result = jsontext; + result = new ProductManage().GetCateSizeWeightConfig(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } } } diff --git a/KJDService/KJD_WebService/ProductThirdService.asmx.cs b/KJDService/KJD_WebService/ProductThirdService.asmx.cs index 34e6988..73e446f 100644 --- a/KJDService/KJD_WebService/ProductThirdService.asmx.cs +++ b/KJDService/KJD_WebService/ProductThirdService.asmx.cs @@ -219,11 +219,11 @@ namespace KJD_Web } [WebMethod] - public void get_select_product_map_draft_id_list() + public void get_select_prod_db_id_map_draft_id_list() { string jsontext = GetRequestJsonString(); var result = jsontext; - result = new ProductThirdManage().GetSelectProductMapDraftIdList(jsontext); + result = new ProductThirdManage().GetSelectProdDbIdMapDraftIdList(jsontext); Context.Response.Write(result); Context.Response.End(); diff --git a/KJDService/KJD_WebService/Utils/RegexUtils.cs b/KJDService/KJD_WebService/Utils/RegexUtils.cs index 614cac3..f4a406b 100644 --- a/KJDService/KJD_WebService/Utils/RegexUtils.cs +++ b/KJDService/KJD_WebService/Utils/RegexUtils.cs @@ -623,15 +623,20 @@ namespace KJD_Web.Utils /// public static string GetStringQuery(ref string queryString, string key) { - queryString = "&" + queryString; - int nIndex = queryString.IndexOf("&" + key + "="); - if (nIndex == -1) - return null; + List strLst = queryString.Split('&').ToList(); + var temp = strLst.FirstOrDefault(s => s.StartsWith(key + "=")); + if (temp != null) + temp = ("&" + temp).Replace("&" + key + "=", ""); - string temp = queryString.Substring(nIndex).Replace("&" + key + "=", ""); - nIndex = temp.IndexOf('&'); - if (nIndex > -1) - temp = temp.Substring(0, nIndex); + //queryString = "&" + queryString; + //int nIndex = queryString.IndexOf("&" + key + "="); + //if (nIndex == -1) + // return null; + + //string temp = queryString.Substring(nIndex).Replace("&" + key + "=", ""); + //nIndex = temp.IndexOf('&'); + //if (nIndex > -1) + // temp = temp.Substring(0, nIndex); return temp; } diff --git a/TEMUKJD/KJD.csproj b/TEMUKJD/KJD.csproj index a57014c..3e8251c 100644 --- a/TEMUKJD/KJD.csproj +++ b/TEMUKJD/KJD.csproj @@ -37,11 +37,13 @@ AnyCPU true full - false + true ..\bin\ DEBUG;TRACE prompt 4 + false + true AnyCPU diff --git a/TEMUKJD/KJDForms/AdminForms/AdminAccountForm.Designer.cs b/TEMUKJD/KJDForms/AdminForms/AdminAccountForm.Designer.cs index dcc3aa0..c68ba4e 100644 --- a/TEMUKJD/KJDForms/AdminForms/AdminAccountForm.Designer.cs +++ b/TEMUKJD/KJDForms/AdminForms/AdminAccountForm.Designer.cs @@ -33,6 +33,10 @@ namespace TemuKJD.KJDForms.AdminForms System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer5 = new System.Windows.Forms.SplitContainer(); + this.btnAdd1000 = new DevComponents.DotNetBar.PanelEx(); + this.btnAdd100 = new DevComponents.DotNetBar.PanelEx(); + this.label7 = new System.Windows.Forms.Label(); + this.txtAuthorizedAmount = new System.Windows.Forms.TextBox(); this.cmbSaLevel = new System.Windows.Forms.ComboBox(); this.label6 = new System.Windows.Forms.Label(); this.lblWatermark = new System.Windows.Forms.Label(); @@ -74,6 +78,7 @@ namespace TemuKJD.KJDForms.AdminForms this.shopCountColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colSaLevel = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colSaLevelName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colAuthorizedAmount = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.editColumn = new System.Windows.Forms.DataGridViewLinkColumn(); this.deleteColumn = new System.Windows.Forms.DataGridViewLinkColumn(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer5)).BeginInit(); @@ -96,6 +101,10 @@ namespace TemuKJD.KJDForms.AdminForms // // splitContainer5.Panel1 // + this.splitContainer5.Panel1.Controls.Add(this.btnAdd1000); + this.splitContainer5.Panel1.Controls.Add(this.btnAdd100); + this.splitContainer5.Panel1.Controls.Add(this.label7); + this.splitContainer5.Panel1.Controls.Add(this.txtAuthorizedAmount); this.splitContainer5.Panel1.Controls.Add(this.cmbSaLevel); this.splitContainer5.Panel1.Controls.Add(this.label6); this.splitContainer5.Panel1.Controls.Add(this.lblWatermark); @@ -136,6 +145,73 @@ namespace TemuKJD.KJDForms.AdminForms this.splitContainer5.SplitterWidth = 1; this.splitContainer5.TabIndex = 3; // + // btnAdd1000 + // + this.btnAdd1000.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnAdd1000.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnAdd1000.DisabledBackColor = System.Drawing.Color.Empty; + this.btnAdd1000.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnAdd1000.Location = new System.Drawing.Point(309, 354); + this.btnAdd1000.Margin = new System.Windows.Forms.Padding(0); + this.btnAdd1000.Name = "btnAdd1000"; + this.btnAdd1000.Size = new System.Drawing.Size(45, 23); + this.btnAdd1000.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnAdd1000.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnAdd1000.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnAdd1000.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnAdd1000.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnAdd1000.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnAdd1000.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnAdd1000.Style.GradientAngle = 90; + this.btnAdd1000.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnAdd1000.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnAdd1000.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnAdd1000.TabIndex = 475; + this.btnAdd1000.Text = "+1000"; + this.btnAdd1000.Click += new System.EventHandler(this.btnAdd1000_Click); + // + // btnAdd100 + // + this.btnAdd100.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnAdd100.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnAdd100.DisabledBackColor = System.Drawing.Color.Empty; + this.btnAdd100.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnAdd100.Location = new System.Drawing.Point(262, 354); + this.btnAdd100.Margin = new System.Windows.Forms.Padding(0); + this.btnAdd100.Name = "btnAdd100"; + this.btnAdd100.Size = new System.Drawing.Size(45, 23); + this.btnAdd100.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnAdd100.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnAdd100.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnAdd100.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnAdd100.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnAdd100.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnAdd100.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnAdd100.Style.GradientAngle = 90; + this.btnAdd100.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnAdd100.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnAdd100.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnAdd100.TabIndex = 471; + this.btnAdd100.Text = "+100"; + this.btnAdd100.Click += new System.EventHandler(this.btnAdd100_Click); + // + // 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, 354); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(79, 20); + this.label7.TabIndex = 50; + this.label7.Text = "授权金额:"; + // + // txtAuthorizedAmount + // + this.txtAuthorizedAmount.Location = new System.Drawing.Point(112, 353); + this.txtAuthorizedAmount.Name = "txtAuthorizedAmount"; + this.txtAuthorizedAmount.Size = new System.Drawing.Size(148, 23); + this.txtAuthorizedAmount.TabIndex = 49; + // // cmbSaLevel // this.cmbSaLevel.FormattingEnabled = true; @@ -143,7 +219,7 @@ namespace TemuKJD.KJDForms.AdminForms "普通用户", "一级超管", "二级超管"}); - this.cmbSaLevel.Location = new System.Drawing.Point(112, 388); + this.cmbSaLevel.Location = new System.Drawing.Point(112, 389); this.cmbSaLevel.Name = "cmbSaLevel"; this.cmbSaLevel.Size = new System.Drawing.Size(148, 25); this.cmbSaLevel.TabIndex = 48; @@ -153,7 +229,7 @@ namespace TemuKJD.KJDForms.AdminForms // this.label6.AutoSize = true; this.label6.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(27, 390); + this.label6.Location = new System.Drawing.Point(27, 391); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(79, 20); this.label6.TabIndex = 47; @@ -217,7 +293,7 @@ namespace TemuKJD.KJDForms.AdminForms // this.label3.AutoSize = true; this.label3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(55, 348); + this.label3.Location = new System.Drawing.Point(55, 318); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(51, 20); this.label3.TabIndex = 40; @@ -225,7 +301,7 @@ namespace TemuKJD.KJDForms.AdminForms // // txtCompany // - this.txtCompany.Location = new System.Drawing.Point(112, 347); + this.txtCompany.Location = new System.Drawing.Point(112, 317); this.txtCompany.Name = "txtCompany"; this.txtCompany.Size = new System.Drawing.Size(148, 23); this.txtCompany.TabIndex = 39; @@ -302,7 +378,7 @@ namespace TemuKJD.KJDForms.AdminForms // this.label30.AutoSize = true; this.label30.ForeColor = System.Drawing.SystemColors.ButtonShadow; - this.label30.Location = new System.Drawing.Point(282, 180); + this.label30.Location = new System.Drawing.Point(282, 174); this.label30.Name = "label30"; this.label30.Size = new System.Drawing.Size(56, 17); this.label30.TabIndex = 33; @@ -312,7 +388,7 @@ namespace TemuKJD.KJDForms.AdminForms // this.label31.AutoSize = true; this.label31.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.label31.Location = new System.Drawing.Point(266, 264); + this.label31.Location = new System.Drawing.Point(266, 246); this.label31.Name = "label31"; this.label31.Size = new System.Drawing.Size(13, 17); this.label31.TabIndex = 32; @@ -320,7 +396,7 @@ namespace TemuKJD.KJDForms.AdminForms // // txtRePass // - this.txtRePass.Location = new System.Drawing.Point(112, 261); + this.txtRePass.Location = new System.Drawing.Point(112, 243); this.txtRePass.Name = "txtRePass"; this.txtRePass.PasswordChar = '*'; this.txtRePass.Size = new System.Drawing.Size(148, 23); @@ -330,7 +406,7 @@ namespace TemuKJD.KJDForms.AdminForms // this.label32.AutoSize = true; this.label32.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label32.Location = new System.Drawing.Point(27, 262); + this.label32.Location = new System.Drawing.Point(27, 244); this.label32.Name = "label32"; this.label32.Size = new System.Drawing.Size(79, 20); this.label32.TabIndex = 31; @@ -340,7 +416,7 @@ namespace TemuKJD.KJDForms.AdminForms // this.label33.AutoSize = true; this.label33.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.label33.Location = new System.Drawing.Point(266, 306); + this.label33.Location = new System.Drawing.Point(266, 283); this.label33.Name = "label33"; this.label33.Size = new System.Drawing.Size(13, 17); this.label33.TabIndex = 30; @@ -350,7 +426,7 @@ namespace TemuKJD.KJDForms.AdminForms // this.label34.AutoSize = true; this.label34.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.label34.Location = new System.Drawing.Point(266, 222); + this.label34.Location = new System.Drawing.Point(266, 210); this.label34.Name = "label34"; this.label34.Size = new System.Drawing.Size(13, 17); this.label34.TabIndex = 29; @@ -360,7 +436,7 @@ namespace TemuKJD.KJDForms.AdminForms // this.label35.AutoSize = true; this.label35.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.label35.Location = new System.Drawing.Point(266, 180); + this.label35.Location = new System.Drawing.Point(266, 174); this.label35.Name = "label35"; this.label35.Size = new System.Drawing.Size(13, 17); this.label35.TabIndex = 28; @@ -385,7 +461,7 @@ namespace TemuKJD.KJDForms.AdminForms "上货", "数据", "登录"}); - this.cmbGroup.Location = new System.Drawing.Point(112, 303); + this.cmbGroup.Location = new System.Drawing.Point(112, 279); this.cmbGroup.Name = "cmbGroup"; this.cmbGroup.Size = new System.Drawing.Size(148, 25); this.cmbGroup.TabIndex = 26; @@ -395,7 +471,7 @@ namespace TemuKJD.KJDForms.AdminForms // this.label37.AutoSize = true; this.label37.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label37.Location = new System.Drawing.Point(55, 304); + this.label37.Location = new System.Drawing.Point(55, 281); this.label37.Name = "label37"; this.label37.Size = new System.Drawing.Size(51, 20); this.label37.TabIndex = 25; @@ -403,7 +479,7 @@ namespace TemuKJD.KJDForms.AdminForms // // txtPassword // - this.txtPassword.Location = new System.Drawing.Point(112, 219); + this.txtPassword.Location = new System.Drawing.Point(112, 207); this.txtPassword.Name = "txtPassword"; this.txtPassword.PasswordChar = '*'; this.txtPassword.Size = new System.Drawing.Size(148, 23); @@ -413,7 +489,7 @@ namespace TemuKJD.KJDForms.AdminForms // this.label38.AutoSize = true; this.label38.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label38.Location = new System.Drawing.Point(55, 220); + this.label38.Location = new System.Drawing.Point(55, 208); this.label38.Name = "label38"; this.label38.Size = new System.Drawing.Size(51, 20); this.label38.TabIndex = 22; @@ -421,7 +497,7 @@ namespace TemuKJD.KJDForms.AdminForms // // txtMobile // - this.txtMobile.Location = new System.Drawing.Point(112, 177); + this.txtMobile.Location = new System.Drawing.Point(112, 171); this.txtMobile.Name = "txtMobile"; this.txtMobile.Size = new System.Drawing.Size(148, 23); this.txtMobile.TabIndex = 21; @@ -430,7 +506,7 @@ namespace TemuKJD.KJDForms.AdminForms // this.label39.AutoSize = true; this.label39.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label39.Location = new System.Drawing.Point(41, 178); + this.label39.Location = new System.Drawing.Point(41, 172); this.label39.Name = "label39"; this.label39.Size = new System.Drawing.Size(65, 20); this.label39.TabIndex = 20; @@ -474,6 +550,7 @@ namespace TemuKJD.KJDForms.AdminForms this.dgvUser.AllowUserToDeleteRows = false; dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); this.dgvUser.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.dgvUser.AutoRowNumber = true; this.dgvUser.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dgvUser.BackgroundColor = System.Drawing.Color.White; this.dgvUser.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); @@ -496,6 +573,7 @@ namespace TemuKJD.KJDForms.AdminForms this.shopCountColumn, this.colSaLevel, this.colSaLevelName, + this.colAuthorizedAmount, this.editColumn, this.deleteColumn}); dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; @@ -574,6 +652,12 @@ namespace TemuKJD.KJDForms.AdminForms this.colSaLevelName.Name = "colSaLevelName"; this.colSaLevelName.ReadOnly = true; // + // colAuthorizedAmount + // + this.colAuthorizedAmount.HeaderText = "授权金额"; + this.colAuthorizedAmount.Name = "colAuthorizedAmount"; + this.colAuthorizedAmount.ReadOnly = true; + // // editColumn // this.editColumn.HeaderText = "编辑"; @@ -655,7 +739,12 @@ namespace TemuKJD.KJDForms.AdminForms private System.Windows.Forms.DataGridViewTextBoxColumn shopCountColumn; private System.Windows.Forms.DataGridViewTextBoxColumn colSaLevel; private System.Windows.Forms.DataGridViewTextBoxColumn colSaLevelName; + private System.Windows.Forms.DataGridViewTextBoxColumn colAuthorizedAmount; private System.Windows.Forms.DataGridViewLinkColumn editColumn; private System.Windows.Forms.DataGridViewLinkColumn deleteColumn; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.TextBox txtAuthorizedAmount; + private DevComponents.DotNetBar.PanelEx btnAdd1000; + private DevComponents.DotNetBar.PanelEx btnAdd100; } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/AdminForms/AdminAccountForm.cs b/TEMUKJD/KJDForms/AdminForms/AdminAccountForm.cs index 940cf11..8484f65 100644 --- a/TEMUKJD/KJDForms/AdminForms/AdminAccountForm.cs +++ b/TEMUKJD/KJDForms/AdminForms/AdminAccountForm.cs @@ -1,5 +1,6 @@ using AllBase; using AllBase.Model.Result; +using NaiBa.Util.Extension; using System; using System.Collections.Generic; using System.ComponentModel; @@ -71,7 +72,8 @@ namespace TemuKJD.KJDForms.AdminForms else if (cmbSaLevel.Text == "二级超管") data.Append("&sa_level=2"); else - data.Append("&sa_level=0"); + data.Append("&sa_level=0"); + data.Append("&authorized_amount=" + GetHtml.UrlEncodeUtf8(txtAuthorizedAmount.Text.Trim().ParseToDecimal().ParseToString())); string url = BaseClass.BuildObjString("user/add_user"); if (btnOpUser.Text != "添加用户" && !string.IsNullOrEmpty(Uid)) { @@ -134,6 +136,7 @@ namespace TemuKJD.KJDForms.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.authorized_amount = BaseRegex.GetNullableDecimalJson(ref oStr, "authorized_amount"); AllUsers.Add(user); dgvUser.Rows.Add( @@ -146,6 +149,7 @@ namespace TemuKJD.KJDForms.AdminForms user.shop_count, user.sa_level, user.sa_level_name, + user.authorized_amount, "编辑", "删除"); } @@ -167,6 +171,7 @@ namespace TemuKJD.KJDForms.AdminForms txtRePass.Clear(); txtMobile.Clear(); txtCompany.Clear(); + txtAuthorizedAmount.Clear(); cmbGroup.Text = "主账户"; cmbSaLevel.Text = "普通用户"; } @@ -187,6 +192,7 @@ namespace TemuKJD.KJDForms.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 authorizedAmount = dgvUser.Rows[e.RowIndex].Cells["colAuthorizedAmount"].Value.ToString(); if (columname == "编辑") { Uid = uid; @@ -196,6 +202,7 @@ namespace TemuKJD.KJDForms.AdminForms txtPassword.Text = ""; txtRePass.Text = ""; txtCompany.Text = company; + txtAuthorizedAmount.Text = authorizedAmount; btnOpUser.Text = "保存用户"; btnCancel.Visible = true; cmbSaLevel.Text = saLevelName; @@ -272,5 +279,15 @@ namespace TemuKJD.KJDForms.AdminForms this.txtSearch.Focus(); this.lblWatermark.Visible = false; } + + private void btnAdd100_Click(object sender, EventArgs e) + { + this.txtAuthorizedAmount.Text = (txtAuthorizedAmount.Text.Trim().ParseToDecimal() + 100m).ParseToString(); + } + + private void btnAdd1000_Click(object sender, EventArgs e) + { + this.txtAuthorizedAmount.Text = (txtAuthorizedAmount.Text.Trim().ParseToDecimal() + 1000m).ParseToString(); + } } } diff --git a/TEMUKJD/KJDForms/AdminForms/AdminAccountForm.resx b/TEMUKJD/KJDForms/AdminForms/AdminAccountForm.resx index c3a4499..8646074 100644 --- a/TEMUKJD/KJDForms/AdminForms/AdminAccountForm.resx +++ b/TEMUKJD/KJDForms/AdminForms/AdminAccountForm.resx @@ -144,6 +144,9 @@ True + + True + True diff --git a/TEMUKJD/KJDForms/AdminForms/AdminForm.Designer.cs b/TEMUKJD/KJDForms/AdminForms/AdminForm.Designer.cs index 17c66c8..36582b7 100644 --- a/TEMUKJD/KJDForms/AdminForms/AdminForm.Designer.cs +++ b/TEMUKJD/KJDForms/AdminForms/AdminForm.Designer.cs @@ -35,9 +35,9 @@ System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("认领待上传"); System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("库存上传"); System.Windows.Forms.TreeNode treeNode7 = new System.Windows.Forms.TreeNode("商品核价"); - System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("加入发货台"); + System.Windows.Forms.TreeNode treeNode8 = new System.Windows.Forms.TreeNode("开通JIT"); System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("JIT卡密管理"); - System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("开通JIT"); + System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("加入发货台"); System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("超级权限管理", new System.Windows.Forms.TreeNode[] { treeNode1, treeNode2, @@ -153,12 +153,12 @@ treeNode6.Text = "库存上传"; treeNode7.Name = "商品核价"; treeNode7.Text = "商品核价"; - treeNode8.Name = "加入发货台"; - treeNode8.Text = "加入发货台"; + treeNode8.Name = "开通JIT"; + treeNode8.Text = "开通JIT"; treeNode9.Name = "JIT卡密管理"; treeNode9.Text = "JIT卡密管理"; - treeNode10.Name = "开通JIT"; - treeNode10.Text = "开通JIT"; + treeNode10.Name = "加入发货台"; + treeNode10.Text = "加入发货台"; treeNode11.Name = "超级权限管理"; treeNode11.Text = "超级权限管理"; this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { diff --git a/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.Designer.cs b/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.Designer.cs index 025fef9..9bd3df2 100644 --- a/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.Designer.cs +++ b/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.Designer.cs @@ -45,6 +45,7 @@ namespace TemuKJD.KJDForms.AdminForms this.lblSleep = new System.Windows.Forms.Label(); this.btnRestoreFilterParams = new DevComponents.DotNetBar.PanelEx(); this.btnSaveFilterParams = new DevComponents.DotNetBar.PanelEx(); + this.btnRestoreSizeAndNumber = new DevComponents.DotNetBar.PanelEx(); this.txtPrice2 = new System.Windows.Forms.TextBox(); this.label16 = new System.Windows.Forms.Label(); this.txtPrice1 = new System.Windows.Forms.TextBox(); @@ -62,23 +63,12 @@ namespace TemuKJD.KJDForms.AdminForms this.numJudgeWeight = new System.Windows.Forms.NumericUpDown(); this.btnMutliCancel = new DevComponents.DotNetBar.PanelEx(); this.numJudgeLen = new System.Windows.Forms.NumericUpDown(); - this.label8 = new System.Windows.Forms.Label(); - this.btnRestoreSizeAndNumber = new DevComponents.DotNetBar.PanelEx(); - this.numWeight2 = new System.Windows.Forms.NumericUpDown(); - this.numHeight2 = new System.Windows.Forms.NumericUpDown(); - this.numWeight1 = new System.Windows.Forms.NumericUpDown(); - this.numHeight1 = new System.Windows.Forms.NumericUpDown(); - this.numWidth1 = new System.Windows.Forms.NumericUpDown(); + this.lblJudgeLen = new System.Windows.Forms.Label(); this.btnMutliOk = new DevComponents.DotNetBar.PanelEx(); this.dtpEndTime = new System.Windows.Forms.DateTimePicker(); - this.numLen2 = new System.Windows.Forms.NumericUpDown(); this.dtpStartTime = new System.Windows.Forms.DateTimePicker(); - this.numWidth2 = new System.Windows.Forms.NumericUpDown(); - this.label19 = new System.Windows.Forms.Label(); this.btnStop = new DevComponents.DotNetBar.PanelEx(); - this.numLen1 = new System.Windows.Forms.NumericUpDown(); this.btnSearchPrice2 = new DevComponents.DotNetBar.PanelEx(); - this.label15 = new System.Windows.Forms.Label(); this.btnRestoreProdName = new DevComponents.DotNetBar.PanelEx(); this.txtSkcId = new System.Windows.Forms.TextBox(); this.btnEmpty = new DevComponents.DotNetBar.PanelEx(); @@ -99,17 +89,40 @@ namespace TemuKJD.KJDForms.AdminForms this.label1 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.chkFilterTitle = new TemuKJD.UserComponent.UcCheckBox(this.components); - this.label18 = new System.Windows.Forms.Label(); - this.label20 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); - this.label11 = new System.Windows.Forms.Label(); + this.lblJudgeWeight = new System.Windows.Forms.Label(); this.chkSearchAllShop = new TemuKJD.UserComponent.UcCheckBox(this.components); this.chkFilterSize = new TemuKJD.UserComponent.UcCheckBox(this.components); this.chkSearchTime = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.pnlRestoreSizeAndNumber = new System.Windows.Forms.Panel(); + this.numPieces = new System.Windows.Forms.NumericUpDown(); + this.label11 = new System.Windows.Forms.Label(); + this.label17 = new System.Windows.Forms.Label(); + this.numHeight2 = new System.Windows.Forms.NumericUpDown(); + this.numHeight1 = new System.Windows.Forms.NumericUpDown(); + this.numWidth1 = new System.Windows.Forms.NumericUpDown(); + this.numWidth2 = new System.Windows.Forms.NumericUpDown(); + this.numLen1 = new System.Windows.Forms.NumericUpDown(); + this.numWeight2 = new System.Windows.Forms.NumericUpDown(); + this.numWeight1 = new System.Windows.Forms.NumericUpDown(); + this.numLen2 = new System.Windows.Forms.NumericUpDown(); + this.label15 = new System.Windows.Forms.Label(); + this.label18 = new System.Windows.Forms.Label(); + this.label19 = new System.Windows.Forms.Label(); + this.label20 = new System.Windows.Forms.Label(); this.splitContainer3 = new System.Windows.Forms.SplitContainer(); this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.pbShopLoading = new System.Windows.Forms.PictureBox(); this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx(); + this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colUser = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colJitStatus = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.pnlSpecDetail = new System.Windows.Forms.Panel(); this.textBox1 = new System.Windows.Forms.TextBox(); this.btnClose = new DevComponents.DotNetBar.PanelEx(); @@ -142,16 +155,6 @@ namespace TemuKJD.KJDForms.AdminForms this.splitContainer4 = new System.Windows.Forms.SplitContainer(); this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); - this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); - this.colUser = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn(); - this.colJitStatus = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn(); - this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -161,15 +164,17 @@ namespace TemuKJD.KJDForms.AdminForms ((System.ComponentModel.ISupportInitialize)(this.dgvExtCode)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numJudgeWeight)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numJudgeLen)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numWeight2)).BeginInit(); + this.pnlDetailOperate1.SuspendLayout(); + this.pnlRestoreSizeAndNumber.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numPieces)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numHeight2)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numWeight1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numHeight1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numWidth1)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numLen2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numWidth2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numLen1)).BeginInit(); - this.pnlDetailOperate1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numWeight2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numWeight1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numLen2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit(); this.splitContainer3.Panel1.SuspendLayout(); this.splitContainer3.Panel2.SuspendLayout(); @@ -220,6 +225,7 @@ namespace TemuKJD.KJDForms.AdminForms this.ucGroupBoxEx1.Controls.Add(this.lblSleep); this.ucGroupBoxEx1.Controls.Add(this.btnRestoreFilterParams); this.ucGroupBoxEx1.Controls.Add(this.btnSaveFilterParams); + this.ucGroupBoxEx1.Controls.Add(this.btnRestoreSizeAndNumber); this.ucGroupBoxEx1.Controls.Add(this.txtPrice2); this.ucGroupBoxEx1.Controls.Add(this.label16); this.ucGroupBoxEx1.Controls.Add(this.txtPrice1); @@ -234,23 +240,12 @@ namespace TemuKJD.KJDForms.AdminForms this.ucGroupBoxEx1.Controls.Add(this.numJudgeWeight); this.ucGroupBoxEx1.Controls.Add(this.btnMutliCancel); this.ucGroupBoxEx1.Controls.Add(this.numJudgeLen); - this.ucGroupBoxEx1.Controls.Add(this.label8); - this.ucGroupBoxEx1.Controls.Add(this.btnRestoreSizeAndNumber); - this.ucGroupBoxEx1.Controls.Add(this.numWeight2); - this.ucGroupBoxEx1.Controls.Add(this.numHeight2); - this.ucGroupBoxEx1.Controls.Add(this.numWeight1); - this.ucGroupBoxEx1.Controls.Add(this.numHeight1); - this.ucGroupBoxEx1.Controls.Add(this.numWidth1); + this.ucGroupBoxEx1.Controls.Add(this.lblJudgeLen); this.ucGroupBoxEx1.Controls.Add(this.btnMutliOk); this.ucGroupBoxEx1.Controls.Add(this.dtpEndTime); - this.ucGroupBoxEx1.Controls.Add(this.numLen2); this.ucGroupBoxEx1.Controls.Add(this.dtpStartTime); - this.ucGroupBoxEx1.Controls.Add(this.numWidth2); - this.ucGroupBoxEx1.Controls.Add(this.label19); this.ucGroupBoxEx1.Controls.Add(this.btnStop); - this.ucGroupBoxEx1.Controls.Add(this.numLen1); this.ucGroupBoxEx1.Controls.Add(this.btnSearchPrice2); - this.ucGroupBoxEx1.Controls.Add(this.label15); this.ucGroupBoxEx1.Controls.Add(this.btnRestoreProdName); this.ucGroupBoxEx1.Controls.Add(this.txtSkcId); this.ucGroupBoxEx1.Controls.Add(this.btnEmpty); @@ -266,13 +261,11 @@ namespace TemuKJD.KJDForms.AdminForms this.ucGroupBoxEx1.Controls.Add(this.label7); this.ucGroupBoxEx1.Controls.Add(this.pnlDetailOperate1); this.ucGroupBoxEx1.Controls.Add(this.chkFilterTitle); - this.ucGroupBoxEx1.Controls.Add(this.label18); - this.ucGroupBoxEx1.Controls.Add(this.label20); - this.ucGroupBoxEx1.Controls.Add(this.label9); - this.ucGroupBoxEx1.Controls.Add(this.label11); + this.ucGroupBoxEx1.Controls.Add(this.lblJudgeWeight); this.ucGroupBoxEx1.Controls.Add(this.chkSearchAllShop); this.ucGroupBoxEx1.Controls.Add(this.chkFilterSize); this.ucGroupBoxEx1.Controls.Add(this.chkSearchTime); + this.ucGroupBoxEx1.Controls.Add(this.pnlRestoreSizeAndNumber); this.ucGroupBoxEx1.Location = new System.Drawing.Point(2, 2); this.ucGroupBoxEx1.Name = "ucGroupBoxEx1"; this.ucGroupBoxEx1.Size = new System.Drawing.Size(1480, 140); @@ -289,6 +282,11 @@ namespace TemuKJD.KJDForms.AdminForms 0, 65536}); this.numSleep.Location = new System.Drawing.Point(1409, 108); + this.numSleep.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 65536}); this.numSleep.Name = "numSleep"; this.numSleep.Size = new System.Drawing.Size(44, 23); this.numSleep.TabIndex = 1077; @@ -357,6 +355,30 @@ namespace TemuKJD.KJDForms.AdminForms this.btnSaveFilterParams.Text = "保存选中配置"; this.btnSaveFilterParams.Click += new System.EventHandler(this.btnSaveFilterParams_Click); // + // btnRestoreSizeAndNumber + // + this.btnRestoreSizeAndNumber.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnRestoreSizeAndNumber.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnRestoreSizeAndNumber.DisabledBackColor = System.Drawing.Color.Empty; + this.btnRestoreSizeAndNumber.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnRestoreSizeAndNumber.Location = new System.Drawing.Point(1092, 51); + this.btnRestoreSizeAndNumber.Name = "btnRestoreSizeAndNumber"; + this.btnRestoreSizeAndNumber.Size = new System.Drawing.Size(99, 23); + this.btnRestoreSizeAndNumber.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnRestoreSizeAndNumber.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnRestoreSizeAndNumber.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnRestoreSizeAndNumber.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnRestoreSizeAndNumber.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnRestoreSizeAndNumber.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnRestoreSizeAndNumber.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnRestoreSizeAndNumber.Style.GradientAngle = 90; + this.btnRestoreSizeAndNumber.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnRestoreSizeAndNumber.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnRestoreSizeAndNumber.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnRestoreSizeAndNumber.TabIndex = 879; + this.btnRestoreSizeAndNumber.Text = "还原尺寸/数量"; + this.btnRestoreSizeAndNumber.Click += new System.EventHandler(this.btnRestoreSizeAndNumber_Click); + // // txtPrice2 // this.txtPrice2.Location = new System.Drawing.Point(859, 62); @@ -543,7 +565,7 @@ namespace TemuKJD.KJDForms.AdminForms // // numJudgeWeight // - this.numJudgeWeight.Location = new System.Drawing.Point(1078, 107); + this.numJudgeWeight.Location = new System.Drawing.Point(1038, 51); this.numJudgeWeight.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.numJudgeWeight.Maximum = new decimal(new int[] { 10000, @@ -585,7 +607,7 @@ namespace TemuKJD.KJDForms.AdminForms // // numJudgeLen // - this.numJudgeLen.Location = new System.Drawing.Point(1002, 107); + this.numJudgeLen.Location = new System.Drawing.Point(964, 51); this.numJudgeLen.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.numJudgeLen.Maximum = new decimal(new int[] { 299, @@ -601,130 +623,16 @@ namespace TemuKJD.KJDForms.AdminForms 0, 0}); // - // label8 + // lblJudgeLen // - this.label8.AutoSize = true; - this.label8.ForeColor = System.Drawing.Color.Gray; - this.label8.Location = new System.Drawing.Point(977, 110); - this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(29, 17); - this.label8.TabIndex = 928; - this.label8.Text = "长≥"; - // - // btnRestoreSizeAndNumber - // - this.btnRestoreSizeAndNumber.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnRestoreSizeAndNumber.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnRestoreSizeAndNumber.DisabledBackColor = System.Drawing.Color.Empty; - this.btnRestoreSizeAndNumber.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnRestoreSizeAndNumber.Location = new System.Drawing.Point(1040, 79); - this.btnRestoreSizeAndNumber.Name = "btnRestoreSizeAndNumber"; - this.btnRestoreSizeAndNumber.Size = new System.Drawing.Size(151, 23); - this.btnRestoreSizeAndNumber.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnRestoreSizeAndNumber.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnRestoreSizeAndNumber.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnRestoreSizeAndNumber.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.btnRestoreSizeAndNumber.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.btnRestoreSizeAndNumber.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.btnRestoreSizeAndNumber.Style.ForeColor.Color = System.Drawing.Color.White; - this.btnRestoreSizeAndNumber.Style.GradientAngle = 90; - this.btnRestoreSizeAndNumber.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnRestoreSizeAndNumber.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnRestoreSizeAndNumber.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnRestoreSizeAndNumber.TabIndex = 879; - this.btnRestoreSizeAndNumber.Text = "还原商品尺寸与数量"; - this.btnRestoreSizeAndNumber.Click += new System.EventHandler(this.btnRestoreSizeAndNumber_Click); - // - // numWeight2 - // - this.numWeight2.Location = new System.Drawing.Point(988, 79); - this.numWeight2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); - this.numWeight2.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.numWeight2.Name = "numWeight2"; - this.numWeight2.Size = new System.Drawing.Size(50, 23); - this.numWeight2.TabIndex = 683; - this.numWeight2.Value = new decimal(new int[] { - 300, - 0, - 0, - 0}); - // - // numHeight2 - // - this.numHeight2.Location = new System.Drawing.Point(1151, 51); - this.numHeight2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); - this.numHeight2.Maximum = new decimal(new int[] { - 299, - 0, - 0, - 0}); - this.numHeight2.Name = "numHeight2"; - this.numHeight2.Size = new System.Drawing.Size(40, 23); - this.numHeight2.TabIndex = 908; - this.numHeight2.Value = new decimal(new int[] { - 10, - 0, - 0, - 0}); - // - // numWeight1 - // - this.numWeight1.Location = new System.Drawing.Point(939, 79); - this.numWeight1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); - this.numWeight1.Maximum = new decimal(new int[] { - 99999, - 0, - 0, - 0}); - this.numWeight1.Name = "numWeight1"; - this.numWeight1.Size = new System.Drawing.Size(50, 23); - this.numWeight1.TabIndex = 682; - this.numWeight1.Value = new decimal(new int[] { - 200, - 0, - 0, - 0}); - // - // numHeight1 - // - this.numHeight1.Location = new System.Drawing.Point(1117, 51); - this.numHeight1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); - this.numHeight1.Maximum = new decimal(new int[] { - 299, - 0, - 0, - 0}); - this.numHeight1.Name = "numHeight1"; - this.numHeight1.Size = new System.Drawing.Size(35, 23); - this.numHeight1.TabIndex = 907; - this.numHeight1.Value = new decimal(new int[] { - 5, - 0, - 0, - 0}); - // - // numWidth1 - // - this.numWidth1.Location = new System.Drawing.Point(1028, 51); - this.numWidth1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); - this.numWidth1.Maximum = new decimal(new int[] { - 299, - 0, - 0, - 0}); - this.numWidth1.Name = "numWidth1"; - this.numWidth1.Size = new System.Drawing.Size(35, 23); - this.numWidth1.TabIndex = 904; - this.numWidth1.Value = new decimal(new int[] { - 15, - 0, - 0, - 0}); + this.lblJudgeLen.AutoSize = true; + this.lblJudgeLen.Location = new System.Drawing.Point(940, 54); + this.lblJudgeLen.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.lblJudgeLen.Name = "lblJudgeLen"; + this.lblJudgeLen.Size = new System.Drawing.Size(29, 17); + this.lblJudgeLen.TabIndex = 928; + this.lblJudgeLen.Text = "长≥"; + this.lblJudgeLen.Click += new System.EventHandler(this.lblJudgeLen_Click); // // btnMutliOk // @@ -757,24 +665,6 @@ namespace TemuKJD.KJDForms.AdminForms this.dtpEndTime.Size = new System.Drawing.Size(183, 23); this.dtpEndTime.TabIndex = 826; // - // numLen2 - // - this.numLen2.Location = new System.Drawing.Point(973, 51); - this.numLen2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); - this.numLen2.Maximum = new decimal(new int[] { - 299, - 0, - 0, - 0}); - this.numLen2.Name = "numLen2"; - this.numLen2.Size = new System.Drawing.Size(40, 23); - this.numLen2.TabIndex = 903; - this.numLen2.Value = new decimal(new int[] { - 30, - 0, - 0, - 0}); - // // dtpStartTime // this.dtpStartTime.Location = new System.Drawing.Point(326, 62); @@ -782,34 +672,6 @@ namespace TemuKJD.KJDForms.AdminForms this.dtpStartTime.Size = new System.Drawing.Size(183, 23); this.dtpStartTime.TabIndex = 825; // - // numWidth2 - // - this.numWidth2.Location = new System.Drawing.Point(1062, 51); - this.numWidth2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); - this.numWidth2.Maximum = new decimal(new int[] { - 299, - 0, - 0, - 0}); - this.numWidth2.Name = "numWidth2"; - this.numWidth2.Size = new System.Drawing.Size(40, 23); - this.numWidth2.TabIndex = 905; - this.numWidth2.Value = new decimal(new int[] { - 20, - 0, - 0, - 0}); - // - // label19 - // - this.label19.AutoSize = true; - this.label19.Location = new System.Drawing.Point(1101, 54); - this.label19.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label19.Name = "label19"; - this.label19.Size = new System.Drawing.Size(20, 17); - this.label19.TabIndex = 909; - this.label19.Text = "高"; - // // btnStop // this.btnStop.CanvasColor = System.Drawing.SystemColors.Control; @@ -834,24 +696,6 @@ namespace TemuKJD.KJDForms.AdminForms this.btnStop.Text = "停止读取"; this.btnStop.Click += new System.EventHandler(this.btnStop_Click); // - // numLen1 - // - this.numLen1.Location = new System.Drawing.Point(939, 51); - this.numLen1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); - this.numLen1.Maximum = new decimal(new int[] { - 299, - 0, - 0, - 0}); - this.numLen1.Name = "numLen1"; - this.numLen1.Size = new System.Drawing.Size(35, 23); - this.numLen1.TabIndex = 902; - this.numLen1.Value = new decimal(new int[] { - 25, - 0, - 0, - 0}); - // // btnSearchPrice2 // this.btnSearchPrice2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -876,23 +720,13 @@ namespace TemuKJD.KJDForms.AdminForms this.btnSearchPrice2.Text = "读取待创建首单"; this.btnSearchPrice2.Click += new System.EventHandler(this.btnSearchPrice2_Click); // - // label15 - // - this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(922, 54); - this.label15.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(20, 17); - this.label15.TabIndex = 901; - this.label15.Text = "长"; - // // btnRestoreProdName // this.btnRestoreProdName.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnRestoreProdName.Cursor = System.Windows.Forms.Cursors.Hand; this.btnRestoreProdName.DisabledBackColor = System.Drawing.Color.Empty; this.btnRestoreProdName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnRestoreProdName.Location = new System.Drawing.Point(1086, 17); + this.btnRestoreProdName.Location = new System.Drawing.Point(1092, 17); this.btnRestoreProdName.Name = "btnRestoreProdName"; this.btnRestoreProdName.Size = new System.Drawing.Size(99, 23); this.btnRestoreProdName.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -1132,55 +966,23 @@ namespace TemuKJD.KJDForms.AdminForms // chkFilterTitle // this.chkFilterTitle.AutoSize = true; - this.chkFilterTitle.Location = new System.Drawing.Point(934, 18); + this.chkFilterTitle.Location = new System.Drawing.Point(927, 18); this.chkFilterTitle.Name = "chkFilterTitle"; - this.chkFilterTitle.Size = new System.Drawing.Size(159, 21); + this.chkFilterTitle.Size = new System.Drawing.Size(171, 21); this.chkFilterTitle.TabIndex = 857; - this.chkFilterTitle.Text = "列表仅显示含头尾词标题"; + this.chkFilterTitle.Text = "列表中仅显示含头尾词标题"; this.chkFilterTitle.UseVisualStyleBackColor = true; this.chkFilterTitle.CheckedChanged += new System.EventHandler(this.chkFilterTitle_CheckedChanged); // - // label18 + // lblJudgeWeight // - this.label18.AutoSize = true; - this.label18.Location = new System.Drawing.Point(1012, 54); - this.label18.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label18.Name = "label18"; - this.label18.Size = new System.Drawing.Size(20, 17); - this.label18.TabIndex = 906; - this.label18.Text = "宽"; - // - // label20 - // - this.label20.AutoSize = true; - this.label20.Location = new System.Drawing.Point(922, 82); - this.label20.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label20.Name = "label20"; - this.label20.Size = new System.Drawing.Size(20, 17); - this.label20.TabIndex = 684; - this.label20.Text = "重"; - // - // label9 - // - this.label9.AutoSize = true; - this.label9.ForeColor = System.Drawing.Color.Gray; - this.label9.Location = new System.Drawing.Point(1041, 110); - this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(41, 17); - this.label9.TabIndex = 930; - this.label9.Text = "且重≥"; - // - // label11 - // - this.label11.AutoSize = true; - this.label11.ForeColor = System.Drawing.Color.Gray; - this.label11.Location = new System.Drawing.Point(1126, 110); - this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(72, 17); - this.label11.TabIndex = 932; - this.label11.Text = "需还原 标红"; + this.lblJudgeWeight.AutoSize = true; + this.lblJudgeWeight.Location = new System.Drawing.Point(1002, 54); + this.lblJudgeWeight.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.lblJudgeWeight.Name = "lblJudgeWeight"; + this.lblJudgeWeight.Size = new System.Drawing.Size(41, 17); + this.lblJudgeWeight.TabIndex = 930; + this.lblJudgeWeight.Text = "且重≥"; // // chkSearchAllShop // @@ -1195,11 +997,10 @@ namespace TemuKJD.KJDForms.AdminForms // chkFilterSize // this.chkFilterSize.AutoSize = true; - this.chkFilterSize.Location = new System.Drawing.Point(925, 108); + this.chkFilterSize.Location = new System.Drawing.Point(927, 55); this.chkFilterSize.Name = "chkFilterSize"; - this.chkFilterSize.Size = new System.Drawing.Size(63, 21); + this.chkFilterSize.Size = new System.Drawing.Size(15, 14); this.chkFilterSize.TabIndex = 1076; - this.chkFilterSize.Text = "仅显示"; this.chkFilterSize.UseVisualStyleBackColor = true; this.chkFilterSize.CheckedChanged += new System.EventHandler(this.chkFilterSize_CheckedChanged); // @@ -1215,6 +1016,252 @@ namespace TemuKJD.KJDForms.AdminForms this.chkSearchTime.Text = "日期:"; this.chkSearchTime.UseVisualStyleBackColor = true; // + // pnlRestoreSizeAndNumber + // + this.pnlRestoreSizeAndNumber.Controls.Add(this.numPieces); + this.pnlRestoreSizeAndNumber.Controls.Add(this.label11); + this.pnlRestoreSizeAndNumber.Controls.Add(this.label17); + this.pnlRestoreSizeAndNumber.Controls.Add(this.numHeight2); + this.pnlRestoreSizeAndNumber.Controls.Add(this.numHeight1); + this.pnlRestoreSizeAndNumber.Controls.Add(this.numWidth1); + this.pnlRestoreSizeAndNumber.Controls.Add(this.numWidth2); + this.pnlRestoreSizeAndNumber.Controls.Add(this.numLen1); + this.pnlRestoreSizeAndNumber.Controls.Add(this.numWeight2); + this.pnlRestoreSizeAndNumber.Controls.Add(this.numWeight1); + this.pnlRestoreSizeAndNumber.Controls.Add(this.numLen2); + this.pnlRestoreSizeAndNumber.Controls.Add(this.label15); + this.pnlRestoreSizeAndNumber.Controls.Add(this.label18); + this.pnlRestoreSizeAndNumber.Controls.Add(this.label19); + this.pnlRestoreSizeAndNumber.Controls.Add(this.label20); + this.pnlRestoreSizeAndNumber.Location = new System.Drawing.Point(920, 76); + this.pnlRestoreSizeAndNumber.Name = "pnlRestoreSizeAndNumber"; + this.pnlRestoreSizeAndNumber.Size = new System.Drawing.Size(278, 58); + this.pnlRestoreSizeAndNumber.TabIndex = 1160; + // + // numPieces + // + this.numPieces.Enabled = false; + this.numPieces.Location = new System.Drawing.Point(108, 3); + this.numPieces.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.numPieces.Maximum = new decimal(new int[] { + 99999, + 0, + 0, + 0}); + this.numPieces.Name = "numPieces"; + this.numPieces.ReadOnly = true; + this.numPieces.Size = new System.Drawing.Size(41, 23); + this.numPieces.TabIndex = 1158; + this.numPieces.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(3, 6); + this.label11.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(80, 17); + this.label11.TabIndex = 1118; + this.label11.Text = "还原参数值:"; + // + // label17 + // + this.label17.AutoSize = true; + this.label17.Location = new System.Drawing.Point(80, 6); + this.label17.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(32, 17); + this.label17.TabIndex = 1159; + this.label17.Text = "数量"; + // + // numHeight2 + // + this.numHeight2.Location = new System.Drawing.Point(231, 31); + this.numHeight2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.numHeight2.Maximum = new decimal(new int[] { + 299, + 0, + 0, + 0}); + this.numHeight2.Name = "numHeight2"; + this.numHeight2.Size = new System.Drawing.Size(40, 23); + this.numHeight2.TabIndex = 908; + this.numHeight2.Value = new decimal(new int[] { + 10, + 0, + 0, + 0}); + // + // numHeight1 + // + this.numHeight1.Location = new System.Drawing.Point(197, 31); + this.numHeight1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.numHeight1.Maximum = new decimal(new int[] { + 299, + 0, + 0, + 0}); + this.numHeight1.Name = "numHeight1"; + this.numHeight1.Size = new System.Drawing.Size(35, 23); + this.numHeight1.TabIndex = 907; + this.numHeight1.Value = new decimal(new int[] { + 5, + 0, + 0, + 0}); + // + // numWidth1 + // + this.numWidth1.Location = new System.Drawing.Point(108, 31); + this.numWidth1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.numWidth1.Maximum = new decimal(new int[] { + 299, + 0, + 0, + 0}); + this.numWidth1.Name = "numWidth1"; + this.numWidth1.Size = new System.Drawing.Size(35, 23); + this.numWidth1.TabIndex = 904; + this.numWidth1.Value = new decimal(new int[] { + 15, + 0, + 0, + 0}); + // + // numWidth2 + // + this.numWidth2.Location = new System.Drawing.Point(142, 31); + this.numWidth2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.numWidth2.Maximum = new decimal(new int[] { + 299, + 0, + 0, + 0}); + this.numWidth2.Name = "numWidth2"; + this.numWidth2.Size = new System.Drawing.Size(40, 23); + this.numWidth2.TabIndex = 905; + this.numWidth2.Value = new decimal(new int[] { + 20, + 0, + 0, + 0}); + // + // numLen1 + // + this.numLen1.Location = new System.Drawing.Point(19, 31); + this.numLen1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.numLen1.Maximum = new decimal(new int[] { + 299, + 0, + 0, + 0}); + this.numLen1.Name = "numLen1"; + this.numLen1.Size = new System.Drawing.Size(35, 23); + this.numLen1.TabIndex = 902; + this.numLen1.Value = new decimal(new int[] { + 25, + 0, + 0, + 0}); + // + // numWeight2 + // + this.numWeight2.Location = new System.Drawing.Point(221, 3); + this.numWeight2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.numWeight2.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.numWeight2.Name = "numWeight2"; + this.numWeight2.Size = new System.Drawing.Size(50, 23); + this.numWeight2.TabIndex = 683; + this.numWeight2.Value = new decimal(new int[] { + 300, + 0, + 0, + 0}); + // + // numWeight1 + // + this.numWeight1.Location = new System.Drawing.Point(172, 3); + this.numWeight1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.numWeight1.Maximum = new decimal(new int[] { + 99999, + 0, + 0, + 0}); + this.numWeight1.Name = "numWeight1"; + this.numWeight1.Size = new System.Drawing.Size(50, 23); + this.numWeight1.TabIndex = 682; + this.numWeight1.Value = new decimal(new int[] { + 200, + 0, + 0, + 0}); + // + // numLen2 + // + this.numLen2.Location = new System.Drawing.Point(53, 31); + this.numLen2.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); + this.numLen2.Maximum = new decimal(new int[] { + 299, + 0, + 0, + 0}); + this.numLen2.Name = "numLen2"; + this.numLen2.Size = new System.Drawing.Size(40, 23); + this.numLen2.TabIndex = 903; + this.numLen2.Value = new decimal(new int[] { + 30, + 0, + 0, + 0}); + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Location = new System.Drawing.Point(3, 34); + this.label15.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(20, 17); + this.label15.TabIndex = 901; + this.label15.Text = "长"; + // + // label18 + // + this.label18.AutoSize = true; + this.label18.Location = new System.Drawing.Point(92, 34); + this.label18.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(20, 17); + this.label18.TabIndex = 906; + this.label18.Text = "宽"; + // + // label19 + // + this.label19.AutoSize = true; + this.label19.Location = new System.Drawing.Point(181, 34); + this.label19.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label19.Name = "label19"; + this.label19.Size = new System.Drawing.Size(20, 17); + this.label19.TabIndex = 909; + this.label19.Text = "高"; + // + // label20 + // + this.label20.AutoSize = true; + this.label20.Location = new System.Drawing.Point(155, 6); + this.label20.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(20, 17); + this.label20.TabIndex = 684; + this.label20.Text = "重"; + // // splitContainer3 // this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; @@ -1310,6 +1357,84 @@ namespace TemuKJD.KJDForms.AdminForms this.dgvShop.TabIndex = 6; this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick); // + // colSelect + // + this.colSelect.HeaderText = "全选"; + this.colSelect.Name = "colSelect"; + this.colSelect.ReadOnly = true; + this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colSelect.Width = 28; + // + // colUser + // + this.colUser.HeaderText = "店铺账户"; + this.colUser.Name = "colUser"; + this.colUser.ReadOnly = true; + this.colUser.Visible = false; + // + // colLoginName + // + this.colLoginName.HeaderText = "店铺登录名"; + this.colLoginName.Name = "colLoginName"; + this.colLoginName.ReadOnly = true; + this.colLoginName.Visible = false; + // + // colShopId + // + this.colShopId.HeaderText = "店铺Id"; + this.colShopId.Name = "colShopId"; + this.colShopId.ReadOnly = true; + this.colShopId.Visible = false; + this.colShopId.Width = 55; + // + // colShopName + // + this.colShopName.HeaderText = "店铺名称"; + this.colShopName.Name = "colShopName"; + this.colShopName.ReadOnly = true; + this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colShopName.Width = 70; + // + // colShopNotes + // + this.colShopNotes.HeaderText = "分组"; + this.colShopNotes.Name = "colShopNotes"; + this.colShopNotes.ReadOnly = true; + this.colShopNotes.Width = 70; + // + // colLoginStatus + // + this.colLoginStatus.HeaderText = "状态"; + this.colLoginStatus.Name = "colLoginStatus"; + this.colLoginStatus.ReadOnly = true; + this.colLoginStatus.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colLoginStatus.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colLoginStatus.Width = 38; + // + // colJitStatus + // + this.colJitStatus.HeaderText = "JIT"; + this.colJitStatus.Name = "colJitStatus"; + this.colJitStatus.ReadOnly = true; + this.colJitStatus.Width = 38; + // + // colCanUse + // + this.colCanUse.HeaderText = "可用"; + this.colCanUse.Name = "colCanUse"; + this.colCanUse.ReadOnly = true; + this.colCanUse.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colCanUse.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colCanUse.Visible = false; + this.colCanUse.Width = 28; + // + // colMessage + // + this.colMessage.HeaderText = "消息"; + this.colMessage.Name = "colMessage"; + this.colMessage.ReadOnly = true; + // // pnlSpecDetail // this.pnlSpecDetail.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -1697,84 +1822,6 @@ namespace TemuKJD.KJDForms.AdminForms this.statusBar.Size = new System.Drawing.Size(1198, 26); this.statusBar.TabIndex = 2; // - // colSelect - // - this.colSelect.HeaderText = "全选"; - this.colSelect.Name = "colSelect"; - this.colSelect.ReadOnly = true; - this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.colSelect.Width = 28; - // - // colUser - // - this.colUser.HeaderText = "店铺账户"; - this.colUser.Name = "colUser"; - this.colUser.ReadOnly = true; - this.colUser.Visible = false; - // - // colLoginName - // - this.colLoginName.HeaderText = "店铺登录名"; - this.colLoginName.Name = "colLoginName"; - this.colLoginName.ReadOnly = true; - this.colLoginName.Visible = false; - // - // colShopId - // - this.colShopId.HeaderText = "店铺Id"; - this.colShopId.Name = "colShopId"; - this.colShopId.ReadOnly = true; - this.colShopId.Visible = false; - this.colShopId.Width = 55; - // - // colShopName - // - this.colShopName.HeaderText = "店铺名称"; - this.colShopName.Name = "colShopName"; - this.colShopName.ReadOnly = true; - this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colShopName.Width = 70; - // - // colShopNotes - // - this.colShopNotes.HeaderText = "分组"; - this.colShopNotes.Name = "colShopNotes"; - this.colShopNotes.ReadOnly = true; - this.colShopNotes.Width = 70; - // - // colLoginStatus - // - this.colLoginStatus.HeaderText = "状态"; - this.colLoginStatus.Name = "colLoginStatus"; - this.colLoginStatus.ReadOnly = true; - this.colLoginStatus.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colLoginStatus.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.colLoginStatus.Width = 38; - // - // colJitStatus - // - this.colJitStatus.HeaderText = "JIT"; - this.colJitStatus.Name = "colJitStatus"; - this.colJitStatus.ReadOnly = true; - this.colJitStatus.Width = 38; - // - // colCanUse - // - this.colCanUse.HeaderText = "可用"; - this.colCanUse.Name = "colCanUse"; - this.colCanUse.ReadOnly = true; - this.colCanUse.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colCanUse.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.colCanUse.Visible = false; - this.colCanUse.Width = 28; - // - // colMessage - // - this.colMessage.HeaderText = "消息"; - this.colMessage.Name = "colMessage"; - this.colMessage.ReadOnly = true; - // // AdminProductPriceCheckForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -1798,16 +1845,19 @@ namespace TemuKJD.KJDForms.AdminForms ((System.ComponentModel.ISupportInitialize)(this.dgvExtCode)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numJudgeWeight)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numJudgeLen)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numWeight2)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numHeight2)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numWeight1)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numHeight1)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numWidth1)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numLen2)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numWidth2)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numLen1)).EndInit(); this.pnlDetailOperate1.ResumeLayout(false); this.pnlDetailOperate1.PerformLayout(); + this.pnlRestoreSizeAndNumber.ResumeLayout(false); + this.pnlRestoreSizeAndNumber.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numPieces)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numHeight2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numHeight1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numWidth1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numWidth2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numLen1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numWeight2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numWeight1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numLen2)).EndInit(); this.splitContainer3.Panel1.ResumeLayout(false); this.splitContainer3.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit(); @@ -1886,11 +1936,10 @@ namespace TemuKJD.KJDForms.AdminForms private System.Windows.Forms.NumericUpDown numWeight2; private System.Windows.Forms.NumericUpDown numWeight1; private System.Windows.Forms.Label label20; - private System.Windows.Forms.Label label11; private System.Windows.Forms.NumericUpDown numJudgeWeight; - private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label lblJudgeWeight; private System.Windows.Forms.NumericUpDown numJudgeLen; - private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label lblJudgeLen; private System.Windows.Forms.Panel pnlSpecDetail; private DevComponents.DotNetBar.PanelEx btnClose; private System.Windows.Forms.TextBox textBox1; @@ -1945,5 +1994,9 @@ namespace TemuKJD.KJDForms.AdminForms private System.Windows.Forms.DataGridViewTextBoxColumn colJitStatus; private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse; private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.NumericUpDown numPieces; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Panel pnlRestoreSizeAndNumber; } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.cs b/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.cs index b19335b..fcaa3d2 100644 --- a/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.cs +++ b/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.cs @@ -33,6 +33,7 @@ namespace TemuKJD.KJDForms.AdminForms public CancellationTokenSource cancellationTokenSource { get; set; } = null; public List lstAdminShopInfo { get; set; } = new List(); public List lstCheckPriceInfo = new List(); + public List lstCateSizeWeightConfig = new List(); public AdminProductPriceCheckForm() { @@ -56,11 +57,6 @@ namespace TemuKJD.KJDForms.AdminForms this.dgvPriceCheck.AddImgColumn("colProductSkcPic", "colImgUrl"); this.colJitStatus.Visible = false; - if (!IsClientJit) - ucSplitPage1.Visible = true; - else - ucSplitPage1.Visible = false; - this.dtpEndTime.Value = DateTime.Now.Date.AddDays(1).AddMilliseconds(-1); this.dtpStartTime.Value = DateTime.Now.Date.AddDays(-7); @@ -72,9 +68,28 @@ namespace TemuKJD.KJDForms.AdminForms } if (IsClientJit) { + ucSplitPage1.Visible = false; + chkSearchAllShop.Visible = false; ucSplitPage1.Visible = false; this.colJitStatus.Visible = true; + lblJudgeLen.Text = "列表中仅显示需要还原商品"; + numJudgeLen.Visible = false; + lblJudgeWeight.Visible = false; + numJudgeWeight.Visible = false; + pnlRestoreSizeAndNumber.Visible = false; + btnRestoreSizeAndNumber.Text = "还原核价设置"; + + this.numJudgeLen.Value = 15; + this.numJudgeWeight.Value = 150; + this.numLen1.Value = 8; + this.numLen2.Value = 8; + this.numWidth1.Value = 7; + this.numWidth2.Value = 7; + this.numHeight1.Value = 6; + this.numHeight2.Value = 6; + this.numWeight1.Value = 6; + this.numWeight2.Value = 6; } if (IsClientJit) @@ -387,7 +402,7 @@ namespace TemuKJD.KJDForms.AdminForms //shopLoginForm.ShowDialog(); if (!IsClientJit) { - CheckShopLogin(new ShopLoginInfo[] { shop }, false); + this.CheckShopLogin(new ShopLoginInfo[] { shop }, false); if (shop.LoginStatus2 == "国际版在线") { AdminShopLoginForm adminLoginForm = new AdminShopLoginForm(shop); @@ -406,7 +421,7 @@ namespace TemuKJD.KJDForms.AdminForms } else { - CheckShopLogin(new ShopLoginInfo[] { shop }, false); + this.CheckShopLogin(new ShopLoginInfo[] { shop }, false); if (shop.LoginStatus2 == "国际版在线") { ShopLoginForm loginForm = new ShopLoginForm(shop); @@ -475,6 +490,7 @@ namespace TemuKJD.KJDForms.AdminForms switch (headerText) { case "规格名称": + if (!IsClientJit) { var priceInfo = lstCheckPriceInfo.FirstOrDefault(p => p.productId.ParseToString() == prodId); if (priceInfo != null) @@ -567,7 +583,7 @@ namespace TemuKJD.KJDForms.AdminForms var rst = applyPrice(shop, orderId, data); if (rst.Contains("登录过期") || rst.Contains("Invalid Login State")) { - CheckShopLogin(new ShopLoginInfo[] { shop }, false); + this.CheckShopLogin(new ShopLoginInfo[] { shop }, false); Invoke(new Action(() => { displayShopStatus(shop); @@ -616,7 +632,7 @@ namespace TemuKJD.KJDForms.AdminForms var rst = rePrice(shop, orderId, data); if (rst.Contains("登录过期") || rst.Contains("Invalid Login State")) { - CheckShopLogin(new ShopLoginInfo[] { shop }, false); + this.CheckShopLogin(new ShopLoginInfo[] { shop }, false); Invoke(new Action(() => { displayShopStatus(shop); @@ -682,7 +698,7 @@ namespace TemuKJD.KJDForms.AdminForms var rst = priceAdjust(shop, data); if (rst.Contains("登录过期") || rst.Contains("Invalid Login State")) { - CheckShopLogin(new ShopLoginInfo[] { shop }, false); + this.CheckShopLogin(new ShopLoginInfo[] { shop }, false); Invoke(new Action(() => { displayShopStatus(shop); @@ -708,7 +724,7 @@ namespace TemuKJD.KJDForms.AdminForms var rst = this.cancelPrice(shop, orderId); if (rst.Contains("登录过期") || rst.Contains("Invalid Login State")) { - CheckShopLogin(new ShopLoginInfo[] { shop }, false); + this.CheckShopLogin(new ShopLoginInfo[] { shop }, false); Invoke(new Action(() => { displayShopStatus(shop); @@ -791,7 +807,7 @@ namespace TemuKJD.KJDForms.AdminForms if (shop == null) continue; - CheckShopLogin(new ShopLoginInfo[] { shop }, false); + this.CheckShopLogin(new ShopLoginInfo[] { shop }, false); if (shop.LoginStatus2 != "国际版在线") { Invoke(new Action(() => @@ -817,7 +833,7 @@ namespace TemuKJD.KJDForms.AdminForms commonSleep(); if (searchRst.Contains("登录过期") || searchRst.Contains("Invalid Login State")) { - CheckShopLogin(new ShopLoginInfo[] { shop }, false); + this.CheckShopLogin(new ShopLoginInfo[] { shop }, false); Invoke(new Action(() => { displayShopStatus(shop); @@ -836,6 +852,7 @@ namespace TemuKJD.KJDForms.AdminForms jArr = new JArray(); List extCodeTmpLst = new List(); + List spuIdLst = new List(); List checkPriceInfoTmpLst = new List(); foreach (var item in jArr) { @@ -844,16 +861,12 @@ namespace TemuKJD.KJDForms.AdminForms lstCheckPriceInfo.Add(priceInfo); checkPriceInfoTmpLst.Add(priceInfo); extCodeTmpLst.Add(priceInfo.skcList.FirstOrDefault()?.extCode); + spuIdLst.Add(priceInfo.productId.ParseToString()); } - List extCodePriceList = new List(); - try - { - extCodePriceList = GetServerExtCodePriceLst(extCodeTmpLst.Distinct().ToList()); - } - catch (Exception ex) - { - BaseMsgForm.ShowError("获取货号价格失败 " + ex.Message); - } + // 获取货号价格 + List extCodePriceList = GetServerExtCodePriceLst(extCodeTmpLst.Distinct().ToList()); + // 获取产品数据库中的成本价格 + List upProdList = GetUpSpuIdLst(spuIdLst); foreach (var priceInfo in checkPriceInfoTmpLst) { if (cancellationTokenSource.IsCancellationRequested) @@ -906,7 +919,7 @@ namespace TemuKJD.KJDForms.AdminForms //Thread.Sleep(Randomx.GetId(20, 50)); //if (orderPriceRst.Contains("登录过期") || orderPriceRst.Contains("Invalid Login State")) //{ - // CheckShopLogin(new ShopLoginInfo[] { shop }, false); + // this.CheckShopLogin(new ShopLoginInfo[] { shop }, false); //} //reviewInfo.suggestSupplyPrice = BaseRegex.GetIntJson(ref orderPriceRst, "suggestSupplyPrice"); //reviewInfo.supplyPrice = BaseRegex.GetIntJson(ref orderPriceRst, "supplyPrice"); @@ -918,8 +931,13 @@ namespace TemuKJD.KJDForms.AdminForms suggestSupplyPrice = "¥" + (reviewInfo.suggestSupplyPrice.ParseToDecimal() / 100).ToString("0.00"); } + // 计算商品进价 var reviewExtCode = priceInfo.skcList.FirstOrDefault()?.extCode; var extCodePrice = extCodePriceList.FirstOrDefault(p => reviewExtCode == p.ext_code); + var upSpuIdPrice = upProdList.FirstOrDefault(p => priceInfo.productId == p.draft_id); + var original_price = extCodePrice?.original_price / 100m; + if (upSpuIdPrice?.cost_price > 0) + original_price = upSpuIdPrice?.cost_price; Invoke(new Action(() => { @@ -936,7 +954,7 @@ namespace TemuKJD.KJDForms.AdminForms priceInfo.productName, skuName, reviewExtCode, - extCodePrice?.original_price / 100m, //extCodePrice == null ? "-" : (extCodePrice.original_price / 100m).ParseToString(), + original_price, //extCodePrice == null ? "-" : (extCodePrice.original_price / 100m).ParseToString(), reviewInfo.productSkuList.FirstOrDefault()?.supplierPriceValue / 100m, //reviewInfo.supplyPrice / 100m,(这个数值temu接口返回的是错的,改价不会改变) //priceInfo.supplierPrice // sku不同价的会被分成多个review,priceInfo此时为价格范围 reviewInfo.suggestSupplyPrice / 100m, //suggestSupplyPrice.ParseToDecimal(),//核价 //reviewInfo.suggestSupplyPrice == null ? "-" : reviewInfo.suggestSupplyPrice.ParseToString(), "", //新报价 @@ -1151,6 +1169,13 @@ namespace TemuKJD.KJDForms.AdminForms return HttpResponseBLL.PostResponse2(shop, url, body, refere); } + private string queryProductSizeAndWeightConfig(ShopLoginInfo shop, string taskUid, string productId) + { + string url = "https://agentseller.temu.com/anniston-agent-seller/product/check/common/queryConfig"; + string body = "{}"; + string referer = "https://agentseller.temu.com/goods/edit?from=platform&productId=" + productId + "&taskUid=" + taskUid; + return HttpResponseBLL.PostResponse2(shop, url, body, referer); + } private string editPriceProductSizeAndNumber(ShopLoginInfo shop, string taskUid, string productId, string data) { string url = "https://agentseller.temu.com/visage-agent-seller/product/edit/task/reply"; @@ -1224,7 +1249,7 @@ namespace TemuKJD.KJDForms.AdminForms { if (html.Contains("登录过期") || html.Contains("Invalid Login State")) { - CheckShopLogin(new ShopLoginInfo[] { shop }, false); + this.CheckShopLogin(new ShopLoginInfo[] { shop }, false); Invoke(new Action(() => { displayShopStatus(shop); @@ -1272,7 +1297,7 @@ namespace TemuKJD.KJDForms.AdminForms { if (html.Contains("登录过期") || html.Contains("Invalid Login State")) { - CheckShopLogin(new ShopLoginInfo[] { shop }, false); + this.CheckShopLogin(new ShopLoginInfo[] { shop }, false); Invoke(new Action(() => { displayShopStatus(shop); @@ -1422,7 +1447,7 @@ namespace TemuKJD.KJDForms.AdminForms { List list = new List(); - for(int i = 0; i< extCodeList.Count; i++) + for (int i = 0; i < extCodeList.Count; i++) { extCodeList[i] = extCodeList[i].Replace(",", "").Replace("'", "").Replace("\"", ""); } @@ -1444,13 +1469,62 @@ namespace TemuKJD.KJDForms.AdminForms if (!html.Contains("data")) return list; - var jArr = JObject.Parse(html)["data"]; - if (jArr.Count() == 0) + try + { + var jArr = JObject.Parse(html)["data"]; + if (jArr.Count() == 0) + return list; + + return JsonHelper.DeserializeJsonToList(jArr.ToString()); + } + catch (Exception ex) + { + BaseMsgForm.ShowError("获取货号价格失败 " + ex.Message); + return list; + } + } + + public static List GetUpSpuIdLst(List draftIdList) + { + List list = new List(); + if (draftIdList.Count == 0) return list; - return JsonHelper.DeserializeJsonToList(jArr.ToString()); + for (int i = 0; i < draftIdList.Count; i++) + { + draftIdList[i] = draftIdList[i].Replace(",", "").Replace("'", "").Replace("\"", ""); + } + var url = BaseClass.BuildObjString("product/get_select_prod_map_up_spu_id_list"); + var data = UserLogin.GetSignaturex(); + data += "&page=1"; + data += "&page_size=200"; + data += "&in_draft_ids=" + string.Join(",", draftIdList); + var html = GetHtml.PostUtf8(url, data); + Thread.Sleep(100); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + { + return list; + } + + if (!html.Contains("data")) + return list; + + try + { + var jArr = JObject.Parse(html)["data"]; + if (jArr.Count() == 0) + return list; + + return JsonHelper.DeserializeJsonToList(jArr.ToString()); + } + catch (Exception ex) + { + BaseMsgForm.ShowError("获取商品成本价失败 " + ex.Message); + return list; + } } + private void pnlMutliCancelWithTitleWrong_Click(object sender, EventArgs e) { var rows = this.dgvPriceCheck.Rows.Cast().Where(r => r.Cells["colCheck"].Value.ParseToBool() == true).ToList(); @@ -1638,6 +1712,8 @@ namespace TemuKJD.KJDForms.AdminForms { var t = Task.Run(() => { + //---------------------------------------------------------------------------------------- + // 查询是否有修改记录,如果没有申请新的修改,获取taskId var rows = this.dgvPriceCheck.Rows.Cast().Where(r => r.Cells["colProductId"].Value.ParseToString() == price.productId.ParseToString()).ToList(); var shop = lstAdminShopInfo.FirstOrDefault(s => s.ShopId == price.supplierId.ParseToString()); if (IsClientJit) @@ -1689,7 +1765,7 @@ namespace TemuKJD.KJDForms.AdminForms { if (html.Contains("登录过期") || html.Contains("Invalid Login State")) { - CheckShopLogin(new ShopLoginInfo[] { shop }, false); + this.CheckShopLogin(new ShopLoginInfo[] { shop }, false); Invoke(new Action(() => { displayShopStatus(shop); @@ -1725,7 +1801,6 @@ namespace TemuKJD.KJDForms.AdminForms return; // continue; } - html = editPriceProductQuery(shop, price.productId.ParseToString(), taskUid).ParseToString(); if (html.Contains("This product has pending or in-progress modification tasks")) { @@ -1740,7 +1815,7 @@ namespace TemuKJD.KJDForms.AdminForms { if (html.Contains("登录过期") || html.Contains("Invalid Login State")) { - CheckShopLogin(new ShopLoginInfo[] { shop }, false); + this.CheckShopLogin(new ShopLoginInfo[] { shop }, false); Invoke(new Action(() => { displayShopStatus(shop); @@ -1766,15 +1841,116 @@ namespace TemuKJD.KJDForms.AdminForms //int height = Randomx.GetId(5, 10); //100 //int weight = Randomx.GetId(100, 200); //500000 //int numberOfPieces = Randomx.GetId(450, 601);// 单品数量 - int len = Randomx.GetId(numLen1.Value.ParseToInt(), numLen2.Value.ParseToInt() + 1); - int width = Randomx.GetId(numWidth1.Value.ParseToInt(), Math.Min(len, numWidth2.Value.ParseToInt() + 1)); - int height = Randomx.GetId(numHeight1.Value.ParseToInt(), Math.Min(width, numHeight2.Value.ParseToInt() + 1)); - int weight = Randomx.GetId(numWeight1.Value.ParseToInt(), numWeight2.Value.ParseToInt() + 1); - int numberOfPieces = 1; + int len = Randomx.GetId(numLen1.Value.ParseToInt(), numLen2.Value.ParseToInt() + 1) * 10; + int width = Randomx.GetId(numWidth1.Value.ParseToInt(), Math.Min(len, numWidth2.Value.ParseToInt() + 1)) * 10; + int height = Randomx.GetId(numHeight1.Value.ParseToInt(), Math.Min(width, numHeight2.Value.ParseToInt() + 1)) * 10; + int weight = Randomx.GetId(numWeight1.Value.ParseToInt(), numWeight2.Value.ParseToInt() + 1) * 1000; + int numberOfPieces = Math.Max(1, numPieces.Value.ParseToInt()); JObject obj = JObject.Parse(html); var result = JsonHelper.SerializeObject(obj["result"]); TemuDetailProductInfo prodInfo = JsonHelper.DeserializeJsonToObject(result); + var catId = Math.Max(0, prodInfo.categories.cat1.catId.ParseToInt()); + catId = Math.Max(catId, prodInfo.categories.cat2.catId.ParseToInt()); + catId = Math.Max(catId, prodInfo.categories.cat3.catId.ParseToInt()); + catId = Math.Max(catId, prodInfo.categories.cat4.catId.ParseToInt()); + catId = Math.Max(catId, prodInfo.categories.cat5.catId.ParseToInt()); + catId = Math.Max(catId, prodInfo.categories.cat6.catId.ParseToInt()); + catId = Math.Max(catId, prodInfo.categories.cat7.catId.ParseToInt()); + catId = Math.Max(catId, prodInfo.categories.cat8.catId.ParseToInt()); + catId = Math.Max(catId, prodInfo.categories.cat9.catId.ParseToInt()); + catId = Math.Max(catId, prodInfo.categories.cat10.catId.ParseToInt()); + + var cateSizeWeightConfig = lstCateSizeWeightConfig.FirstOrDefault(c => c.catId == catId.ToString()); + + if (cateSizeWeightConfig == null) + { + var url = BaseClass.BuildObjString("product/get_cate_size_weight_config"); + var data = UserLogin.GetSignaturex() + + "&cat_id=" + catId; + html = GetHtml.PostUtf8(url, data); + if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) + html = GetHtml.PostUtf8(url, data); + if (!string.IsNullOrEmpty(html) && html.Contains("\"code\":200")) + { + try + { + var jArr = JObject.Parse(html)["data"]; + cateSizeWeightConfig = JsonHelper.DeserializeJsonToObject(jArr.ToString()); + if (lstCateSizeWeightConfig != null) + lstCateSizeWeightConfig.Add(cateSizeWeightConfig); + } + catch { } + } + } + + if (cateSizeWeightConfig == null) + { + //查询接口尺寸重量限制 + html = queryProductSizeAndWeightConfig(shop, taskUid.ParseToString(), price.productId.ParseToString()); + //{"success":true,"errorCode":1000000,"errorMsg":null,"result":{"common":{"operatorId":null,"operatorName":null,"operatorType":null,"checkSideRelation":false,"noticeSideEquation":false,"length":{"min":10,"max":2999},"width":{"min":5,"max":2999},"height":{"min":2,"max":2999},"weight":{"min":2000,"max":99999000}}}} + Thread.Sleep(Randomx.GetId(25, 75)); + commonSleep(); + if (html.Contains("\"success\":true")) + { + JObject jObj = JObject.Parse(html); + cateSizeWeightConfig = new CateSizeWeightConfig() { catId = catId.ToString() }; + cateSizeWeightConfig.minLen = jObj["result"]["common"]["length"]["min"].ParseToInt(); + cateSizeWeightConfig.maxLen = jObj["result"]["common"]["length"]["max"].ParseToInt(); + cateSizeWeightConfig.minWidth = jObj["result"]["common"]["width"]["min"].ParseToInt(); + cateSizeWeightConfig.maxWidth = jObj["result"]["common"]["width"]["max"].ParseToInt(); + cateSizeWeightConfig.minHeight = jObj["result"]["common"]["height"]["min"].ParseToInt(); + cateSizeWeightConfig.maxHeight = jObj["result"]["common"]["height"]["max"].ParseToInt(); + cateSizeWeightConfig.minWeight = jObj["result"]["common"]["weight"]["min"].ParseToInt(); + cateSizeWeightConfig.maxWeight = jObj["result"]["common"]["weight"]["max"].ParseToInt(); + lstCateSizeWeightConfig.Add(cateSizeWeightConfig); + + var url = BaseClass.BuildObjString("product/add_cate_size_weight_config"); + var data = UserLogin.GetSignaturex(); + data += "&cat_id=" + catId; + data += "&minLen=" + cateSizeWeightConfig.minLen; + data += "&maxLen=" + cateSizeWeightConfig.maxLen; + data += "&minWidth=" + cateSizeWeightConfig.minWidth; + data += "&maxWidth=" + cateSizeWeightConfig.maxWidth; + data += "&minHeight=" + cateSizeWeightConfig.minHeight; + data += "&maxHeight=" + cateSizeWeightConfig.maxHeight; + data += "&minWeight=" + cateSizeWeightConfig.minWeight; + data += "&maxWeight=" + cateSizeWeightConfig.maxWeight; + html = GetHtml.PostUtf8(url, data); + } + else + { + if (html.Contains("登录过期") || html.Contains("Invalid Login State")) + { + this.CheckShopLogin(new ShopLoginInfo[] { shop }, false); + Invoke(new Action(() => + { + displayShopStatus(shop); + })); + } + string sErrMsg = BaseRegex.GetStringJson(ref html, "errorMsg").ParseToString(); + if (string.IsNullOrEmpty(sErrMsg)) + sErrMsg = BaseRegex.GetStringJson(ref html, "error_msg").ParseToString(); + if (string.IsNullOrEmpty(sErrMsg)) + sErrMsg = html; + Invoke(new Action(() => + { + foreach (var row in rows) + row.Cells["colMsg"].Value = "修改请求失败 " + sErrMsg; + })); + return; //continue; + } + } + + // 设置长宽高 + if (len < cateSizeWeightConfig.minLen) len = cateSizeWeightConfig.minLen; + if (len > cateSizeWeightConfig.maxLen) len = cateSizeWeightConfig.maxLen; + if (width < cateSizeWeightConfig.minWidth) width = cateSizeWeightConfig.minWidth; + if (width > cateSizeWeightConfig.maxWidth) width = cateSizeWeightConfig.maxWidth; + if (height < cateSizeWeightConfig.minHeight) height = cateSizeWeightConfig.minHeight; + if (height > cateSizeWeightConfig.maxHeight) height = cateSizeWeightConfig.maxHeight; + if (weight < cateSizeWeightConfig.minWeight) weight = cateSizeWeightConfig.minWeight; + if (weight > cateSizeWeightConfig.maxWeight) weight = cateSizeWeightConfig.maxWeight; //JObject jPost = new JObject(); @@ -1837,18 +2013,18 @@ namespace TemuKJD.KJDForms.AdminForms //productSkuWhExtAttrReq jStr += "\"productSkuWhExtAttrReq\":{"; - jStr += " \"productSkuWeightReq\":{\"value\":" + (weight * 1000) + "},"; + jStr += " \"productSkuWeightReq\":{\"value\":" + weight + "},"; jStr += " \"productSkuVolumeReq\":{"; - jStr += " \"len\":" + (len * 10) + ","; - jStr += " \"width\":" + (width * 10) + ","; - jStr += " \"height\":" + (height * 10); + jStr += " \"len\":" + len + ","; + jStr += " \"width\":" + width + ","; + jStr += " \"height\":" + height; jStr += " }"; jStr += "},"; //productSkuMultiPackReq jStr += "\"productSkuMultiPackReq\":{"; jStr += " \"skuClassification\":1,"; - jStr += " \"numberOfPieces\":1,"; + jStr += " \"numberOfPieces\":" + numberOfPieces + ","; jStr += " \"pieceUnitCode\":" + Math.Max(1, sku.productSkuMultiPack.pieceUnitCode.ParseToInt()) + ","; jStr += " \"productSkuNetContentReq\":{"; jStr += " },"; @@ -1887,7 +2063,7 @@ namespace TemuKJD.KJDForms.AdminForms { if (html.Contains("登录过期") || html.Contains("Invalid Login State")) { - CheckShopLogin(new ShopLoginInfo[] { shop }, false); + this.CheckShopLogin(new ShopLoginInfo[] { shop }, false); Invoke(new Action(() => { displayShopStatus(shop); @@ -1980,82 +2156,106 @@ namespace TemuKJD.KJDForms.AdminForms var filterExtCodeLst = dgvExtCode.Rows.Cast() .Where(r => r.Cells["colSelectExtCode"].Value.ParseToBool() == true) .Select(r => r.Cells["colFilterExtCode"].Value.ParseToString()).Distinct().ToList(); - foreach (DataGridViewRow row in dgvPriceCheck.Rows) + pbLoading.Visible = true; + Task.Run(() => { - row.Visible = true; - row.Cells["colCheck"].Value = false; - //continue; + foreach (DataGridViewRow row in dgvPriceCheck.Rows) + { + Invoke(new Action(() => + { - var prodId = row.Cells["colProductId"].Value.ParseToString(); - var rowExtCode = row.Cells["colExtCode"].Value.ParseToString(); - var rowAdjustPrice = row.Cells["colAdjustPrice"].Value.ParseToDecimal(); - // 过滤价格 - // 只有有选中数据时才过滤,全不选时不过滤 - if (filterExtCodeLst != null && filterExtCodeLst.Count > 0) - { - var filterExtCode = filterExtCodeLst.FirstOrDefault(e => e == rowExtCode); - var filterExtCodeConfig = lstPriceCheckFilterConfig.FirstOrDefault(c => c.ExtCode == rowExtCode); - if (string.IsNullOrWhiteSpace(filterExtCode)) - { - row.Cells["colCheck"].Value = false; - row.Visible = false; - } - else if (filterExtCodeConfig != null) - { - if (filterExtCodeConfig.Symbol == "≥" && rowAdjustPrice < filterExtCodeConfig.Price1) - { - row.Cells["colCheck"].Value = false; - row.Visible = false; - } - if (filterExtCodeConfig.Symbol == "≤" && rowAdjustPrice > filterExtCodeConfig.Price1) - { - row.Cells["colCheck"].Value = false; - row.Visible = false; - } - if (filterExtCodeConfig.Symbol.StartsWith("≤") && filterExtCodeConfig.Symbol.EndsWith("≥") && - rowAdjustPrice > filterExtCodeConfig.Price1 && rowAdjustPrice < filterExtCodeConfig.Price2) - { - row.Cells["colCheck"].Value = false; - row.Visible = false; - } - if (filterExtCodeConfig.Symbol.StartsWith("≥") && filterExtCodeConfig.Symbol.EndsWith("≤") && - (rowAdjustPrice < filterExtCodeConfig.Price1 || rowAdjustPrice > filterExtCodeConfig.Price2)) - { - row.Cells["colCheck"].Value = false; - row.Visible = false; - } - } - } + //row.Visible = true; + //row.Cells["colCheck"].Value = false; - // 过滤保留未还原的标题 - if (chkFilterTitle.Checked) - { - var pName = row.Cells["colProdName"].Value.ParseToString(); - if (!CheckRestoreTitleWords(pName)) - { - row.Cells["colCheck"].Value = false; - row.Visible = false; - } - else - { - } - } - if (chkFilterSize.Checked) - { - var priceInfo = lstCheckPriceInfo.FirstOrDefault(p => p.productId.ParseToString() == prodId); - if (priceInfo != null) - { - if (!checkRestoreSizeAndNumber(priceInfo)) + bool isVisible = true; + + var prodId = row.Cells["colProductId"].Value.ParseToString(); + var rowExtCode = row.Cells["colExtCode"].Value.ParseToString(); + var rowAdjustPrice = row.Cells["colAdjustPrice"].Value.ParseToDecimal(); + // 过滤价格 + // 只有有选中数据时才过滤,全不选时不过滤 + if (filterExtCodeLst != null && filterExtCodeLst.Count > 0) { - row.Cells["colCheck"].Value = false; - row.Visible = false; + var filterExtCode = filterExtCodeLst.FirstOrDefault(e => e == rowExtCode); + var filterExtCodeConfig = lstPriceCheckFilterConfig.FirstOrDefault(c => c.ExtCode == rowExtCode); + if (string.IsNullOrWhiteSpace(filterExtCode)) + { + row.Cells["colCheck"].Value = false; + row.Visible = false; + isVisible = false; + } + else if (filterExtCodeConfig != null) + { + if (filterExtCodeConfig.Symbol == "≥" && rowAdjustPrice < filterExtCodeConfig.Price1) + { + row.Cells["colCheck"].Value = false; + row.Visible = false; + isVisible = false; + } + if (filterExtCodeConfig.Symbol == "≤" && rowAdjustPrice > filterExtCodeConfig.Price1) + { + row.Cells["colCheck"].Value = false; + row.Visible = false; + isVisible = false; + } + if (filterExtCodeConfig.Symbol.StartsWith("≤") && filterExtCodeConfig.Symbol.EndsWith("≥") && + rowAdjustPrice > filterExtCodeConfig.Price1 && rowAdjustPrice < filterExtCodeConfig.Price2) + { + row.Cells["colCheck"].Value = false; + row.Visible = false; + isVisible = false; + } + if (filterExtCodeConfig.Symbol.StartsWith("≥") && filterExtCodeConfig.Symbol.EndsWith("≤") && + (rowAdjustPrice < filterExtCodeConfig.Price1 || rowAdjustPrice > filterExtCodeConfig.Price2)) + { + row.Cells["colCheck"].Value = false; + row.Visible = false; + isVisible = false; + } + } } - else + + // 过滤保留未还原的标题 + if (chkFilterTitle.Checked) { + var pName = row.Cells["colProdName"].Value.ParseToString(); + if (!CheckRestoreTitleWords(pName)) + { + row.Cells["colCheck"].Value = false; + row.Visible = false; + isVisible = false; + } + else + { + } } - } + + if (chkFilterSize.Checked) + { + var priceInfo = lstCheckPriceInfo.FirstOrDefault(p => p.productId.ParseToString() == prodId); + if (priceInfo != null) + { + if (!checkRestoreSizeAndNumber(priceInfo)) + { + row.Cells["colCheck"].Value = false; + row.Visible = false; + isVisible = false; + } + else + { + } + } + } + + if (row.Visible != isVisible) + { + row.Visible = isVisible; + //row.Cells["colCheck"].Value = isVisible; + } + })); } - } + Invoke(new Action(() => { pbLoading.Visible = false; })); + }); } private void btnSaveFilterParams_Click(object sender, EventArgs e) @@ -2191,6 +2391,11 @@ namespace TemuKJD.KJDForms.AdminForms else ShopListForm.Instance.CheckShopLogin(shops, isShowProgress); } + + private void lblJudgeLen_Click(object sender, EventArgs e) + { + chkFilterSize.Checked = !chkFilterSize.Checked; + } } public class PriceCheckConfig @@ -2212,4 +2417,17 @@ namespace TemuKJD.KJDForms.AdminForms public decimal Price1 { get; set; } public decimal Price2 { get; set; } } + + public class CateSizeWeightConfig + { + public string catId { get; set; } + public int minLen { get; set; } + public int maxLen { get; set; } + public int minWidth { get; set; } + public int maxWidth { get; set; } + public int minHeight { get; set; } + public int maxHeight { get; set; } + public int minWeight { get; set; } + public int maxWeight { get; set; } + } } diff --git a/TEMUKJD/KJDForms/AdminForms/AdminShopAddSubSaForm.cs b/TEMUKJD/KJDForms/AdminForms/AdminShopAddSubSaForm.cs index b79010e..83f448c 100644 --- a/TEMUKJD/KJDForms/AdminForms/AdminShopAddSubSaForm.cs +++ b/TEMUKJD/KJDForms/AdminForms/AdminShopAddSubSaForm.cs @@ -88,6 +88,7 @@ namespace TemuKJD.KJDForms.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.authorized_amount = BaseRegex.GetNullableDecimalJson(ref oStr, "authorized_amount"); lstSubSa.Add(user); dgvSaUser.Rows.Add( diff --git a/TEMUKJD/KJDForms/AdminForms/AdminShopListForm.cs b/TEMUKJD/KJDForms/AdminForms/AdminShopListForm.cs index 4ae4fde..175ebcf 100644 --- a/TEMUKJD/KJDForms/AdminForms/AdminShopListForm.cs +++ b/TEMUKJD/KJDForms/AdminForms/AdminShopListForm.cs @@ -416,8 +416,6 @@ namespace TemuKJD.KJDForms.AdminForms if (BaseClass.SaLevel > 1) data += "&operate_sub_sa_name=" + BaseClass.UserName; var html = GetHtml.PostUtf8(url, data); - if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) - html = GetHtml.PostUtf8(url, data); if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) html = GetHtml.PostUtf8(url, data); if (string.IsNullOrEmpty(html) diff --git a/TEMUKJD/KJDForms/ProductForms/TemuAdsForm.cs b/TEMUKJD/KJDForms/ProductForms/TemuAdsForm.cs index b605b9c..8ebe603 100644 --- a/TEMUKJD/KJDForms/ProductForms/TemuAdsForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/TemuAdsForm.cs @@ -903,6 +903,11 @@ namespace TemuKJD.KJDForms.ProductForms tryAgain: Thread.Sleep(100 + Randomx.GetId(200)); string jsonStr = getAdsGoodsList(shop, page, pageSize); + for (int rt = 0; rt < 3 && !jsonStr.Contains("\"success\":true"); rt++) + { + Thread.Sleep(100 + Randomx.GetId(200)); + jsonStr = getAdsGoodsList(shop, page, pageSize); + } Thread.Sleep(Randomx.GetId(300, 800)); if (jsonStr.Contains("当前操作人数太多,请稍后重试") && tryCount < 5) { diff --git a/TEMUKJD/KJDForms/ProductForms/TemuJitForm.cs b/TEMUKJD/KJDForms/ProductForms/TemuJitForm.cs index 729562e..ff81800 100644 --- a/TEMUKJD/KJDForms/ProductForms/TemuJitForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/TemuJitForm.cs @@ -594,6 +594,7 @@ namespace TemuKJD.KJDForms.ProductForms jArr = new JArray(); List extCodeLst = new List(); + List spuIdLst = new List(); List chainProductTmpLst = new List(); foreach (var item in jArr) { @@ -602,25 +603,16 @@ namespace TemuKJD.KJDForms.ProductForms lstChainProdInfo.Add(chainProdInfo); chainProductTmpLst.Add(chainProdInfo); extCodeLst.Add(chainProdInfo.skcList.FirstOrDefault()?.extCode); + spuIdLst.Add(chainProdInfo.productId.ParseToString()); } // 查询货号原售价 - List extCodePriceList = new List(); - try - { - extCodePriceList = AdminProductPriceCheckForm.GetServerExtCodePriceLst(extCodeLst.Distinct().ToList()); - } - catch (Exception ex) - { - BaseMsgForm.ShowError("获取货号价格失败 " + ex.Message); - } + List extCodePriceList = AdminProductPriceCheckForm.GetServerExtCodePriceLst(extCodeLst.Distinct().ToList()); + // 获取产品数据库中的成本价格 + List upProdList = AdminProductPriceCheckForm.GetUpSpuIdLst(spuIdLst); // 查询合规信息,实拍图等 - var spuIds = ""; - foreach (var chainProdInfo in chainProductTmpLst) - { - spuIds += chainProdInfo.productId + ","; - } + var spuIds = string.Join(",", spuIdLst); spuIds = "\"" + spuIds.Trim(',').Replace(",", "\",\"") + "\""; List complianceInfoTmpLst = null; string sComplianceErrMsg = ""; @@ -762,6 +754,10 @@ namespace TemuKJD.KJDForms.ProductForms // 产品货号与货号价格 var reviewExtCode = chainProdInfo.skcList.FirstOrDefault()?.extCode; var extCodePrice = extCodePriceList.FirstOrDefault(p => reviewExtCode == p.ext_code); + var upSpuIdPrice = upProdList.FirstOrDefault(p => chainProdInfo.productId == p.draft_id); + var original_price = extCodePrice?.original_price / 100m; + if (upSpuIdPrice?.cost_price > 0) + original_price = upSpuIdPrice?.cost_price; // 合规信息 var complianceStr = sComplianceErrMsg; @@ -810,7 +806,7 @@ namespace TemuKJD.KJDForms.ProductForms chainProdInfo.productName, skuNames, reviewExtCode, - extCodePrice == null ? "-" : (extCodePrice.original_price / 100.0).ParseToString(), //货号价格 + original_price, //extCodePrice == null ? "-" : (extCodePrice.original_price / 100.0).ParseToString(), //货号价格 chainProdInfo.supplierPrice, // 申报价格范围 //reviewInfo.productSkuList.FirstOrDefault()?.supplierPrice, // 同价格单号申报价格 BaseClass.StampToDateTime((chainProdInfo.skcList.FirstOrDefault()?.statusTime.createdTime.ParseToLong() / 1000).ParseToInt()).ToString("yy/MM/dd HH:mm:ss"), // 创建时间 "调价", @@ -2072,40 +2068,60 @@ Content-Disposition: form-data; name=""upload_sign"" var filterExtCodeLst = dgvExtCode.Rows.Cast() .Where(r => r.Cells["colSelectExtCode"].Value.ParseToBool() == true) .Select(r => r.Cells["colFilterExtCode"].Value.ParseToString()).Distinct().ToList(); - foreach (DataGridViewRow row in dgvOpenJit.Rows) + this.pbLoading.Visible = true; + Task.Run(() => { - row.Visible = true; - row.Cells["colCheck"].Value = false; - if (filterExtCodeLst != null && filterExtCodeLst.Count > 0) + foreach (DataGridViewRow row in dgvOpenJit.Rows) + //for (int i = dgvOpenJit.Rows.Count - 1; i >= 0; i--) { - if (filterExtCodeLst.Contains(row.Cells["colExtCode"].Value.ParseToString())) - { - row.Cells["colCheck"].Value = true; - row.Visible = true; - } - else + Invoke(new Action(() => { + //var row = dgvOpenJit.Rows[i]; + //row.Visible = true; row.Cells["colCheck"].Value = false; - row.Visible = false; - } + bool isVisible = true; + + if (filterExtCodeLst != null && filterExtCodeLst.Count > 0) + { + if (filterExtCodeLst.Contains(row.Cells["colExtCode"].Value.ParseToString())) + { + //row.Cells["colCheck"].Value = true; + //row.Visible = true; + isVisible = true; + } + else + { + //row.Cells["colCheck"].Value = false; + //row.Visible = false; + isVisible = false; + } + } + if (chkFilterJit.Checked) + { + if (row.Cells["colJit"].Value.ParseToString().Contains("已开通")) + { + //row.Cells["colCheck"].Value = false; + //row.Visible = false; + isVisible = false; + } + } + if (chkFilterNotJit.Checked) + { + if (!row.Cells["colJit"].Value.ParseToString().Contains("已开通")) + { + //row.Cells["colCheck"].Value = false; + //row.Visible = false; + isVisible = false; + } + } + + if (row.Visible != isVisible) + row.Visible = isVisible; + row.Cells["colCheck"].Value = isVisible; + })); } - if (chkFilterJit.Checked) - { - if (row.Cells["colJit"].Value.ParseToString().Contains("已开通")) - { - row.Cells["colCheck"].Value = false; - row.Visible = false; - } - } - if (chkFilterNotJit.Checked) - { - if (!row.Cells["colJit"].Value.ParseToString().Contains("已开通")) - { - row.Cells["colCheck"].Value = false; - row.Visible = false; - } - } - } + Invoke(new Action(() => { pbLoading.Visible = false; })); + }); } private void btnSetReceiveArea_Click(object sender, EventArgs e) diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductEditNotesForm.Designer.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductEditNotesForm.Designer.cs index 24abe41..2c832ed 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductEditNotesForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductEditNotesForm.Designer.cs @@ -30,6 +30,10 @@ { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DbProductEditNotesForm)); this.panel2 = new System.Windows.Forms.Panel(); + this.btnSkuAi = new DevComponents.DotNetBar.PanelEx(); + this.btnOk = new DevComponents.DotNetBar.PanelEx(); + this.txtCostPrice = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); this.txtGroup = new System.Windows.Forms.TextBox(); this.btnAuto = new DevComponents.DotNetBar.PanelEx(); @@ -51,10 +55,10 @@ this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.label8 = new System.Windows.Forms.Label(); this.txtNotes = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.label10 = new System.Windows.Forms.Label(); - this.txtCostPrice = new System.Windows.Forms.TextBox(); - this.btnOk = new DevComponents.DotNetBar.PanelEx(); - this.btnSkuAi = new DevComponents.DotNetBar.PanelEx(); + this.txtDeliveryCharge = new System.Windows.Forms.TextBox(); + this.txtStickMarkCharge = new System.Windows.Forms.TextBox(); + this.label11 = new System.Windows.Forms.Label(); + this.label12 = new System.Windows.Forms.Label(); this.panel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); @@ -62,15 +66,15 @@ // panel2 // this.panel2.BackColor = System.Drawing.Color.White; + this.panel2.Controls.Add(this.txtStickMarkCharge); + this.panel2.Controls.Add(this.txtDeliveryCharge); this.panel2.Controls.Add(this.btnSkuAi); this.panel2.Controls.Add(this.btnOk); this.panel2.Controls.Add(this.txtCostPrice); this.panel2.Controls.Add(this.label10); - this.panel2.Controls.Add(this.label9); this.panel2.Controls.Add(this.txtGroup); this.panel2.Controls.Add(this.btnAuto); this.panel2.Controls.Add(this.pnlRestore); - this.panel2.Controls.Add(this.label7); this.panel2.Controls.Add(this.txtFissionWords); this.panel2.Controls.Add(this.txtEndWords); this.panel2.Controls.Add(this.label6); @@ -87,16 +91,86 @@ this.panel2.Controls.Add(this.pictureBox1); this.panel2.Controls.Add(this.label8); this.panel2.Controls.Add(this.txtNotes); + this.panel2.Controls.Add(this.label11); + this.panel2.Controls.Add(this.label12); + this.panel2.Controls.Add(this.label7); + this.panel2.Controls.Add(this.label9); this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; this.panel2.Location = new System.Drawing.Point(1, 33); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(464, 686); this.panel2.TabIndex = 1; // + // btnSkuAi + // + this.btnSkuAi.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnSkuAi.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnSkuAi.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSkuAi.DisabledBackColor = System.Drawing.Color.Empty; + this.btnSkuAi.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSkuAi.Location = new System.Drawing.Point(90, 640); + this.btnSkuAi.Name = "btnSkuAi"; + this.btnSkuAi.Size = new System.Drawing.Size(77, 26); + this.btnSkuAi.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnSkuAi.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSkuAi.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSkuAi.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnSkuAi.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnSkuAi.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnSkuAi.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnSkuAi.Style.GradientAngle = 90; + this.btnSkuAi.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnSkuAi.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSkuAi.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSkuAi.TabIndex = 463; + this.btnSkuAi.Text = "SKU AI图"; + this.btnSkuAi.Click += new System.EventHandler(this.btnSkuAi_Click); + // + // btnOk + // + this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnOk.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnOk.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnOk.DisabledBackColor = System.Drawing.Color.Empty; + this.btnOk.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnOk.Location = new System.Drawing.Point(372, 640); + this.btnOk.Name = "btnOk"; + this.btnOk.Size = new System.Drawing.Size(55, 26); + this.btnOk.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnOk.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnOk.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnOk.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnOk.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnOk.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnOk.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnOk.Style.GradientAngle = 90; + this.btnOk.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnOk.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnOk.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnOk.TabIndex = 459; + this.btnOk.Text = "提交"; + this.btnOk.Click += new System.EventHandler(this.btnOk_Click); + // + // txtCostPrice + // + this.txtCostPrice.Location = new System.Drawing.Point(90, 341); + this.txtCostPrice.Name = "txtCostPrice"; + this.txtCostPrice.Size = new System.Drawing.Size(80, 23); + this.txtCostPrice.TabIndex = 455; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(35, 344); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(56, 17); + this.label10.TabIndex = 454; + this.label10.Text = " 成本价"; + // // label9 // this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(31, 333); + this.label9.Location = new System.Drawing.Point(35, 316); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(56, 17); this.label9.TabIndex = 447; @@ -104,9 +178,9 @@ // // txtGroup // - this.txtGroup.Location = new System.Drawing.Point(90, 330); + this.txtGroup.Location = new System.Drawing.Point(90, 313); this.txtGroup.Name = "txtGroup"; - this.txtGroup.Size = new System.Drawing.Size(136, 23); + this.txtGroup.Size = new System.Drawing.Size(337, 23); this.txtGroup.TabIndex = 446; // // btnAuto @@ -116,7 +190,7 @@ this.btnAuto.Cursor = System.Windows.Forms.Cursors.Hand; this.btnAuto.DisabledBackColor = System.Drawing.Color.Empty; this.btnAuto.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnAuto.Location = new System.Drawing.Point(348, 360); + this.btnAuto.Location = new System.Drawing.Point(348, 369); this.btnAuto.Name = "btnAuto"; this.btnAuto.Size = new System.Drawing.Size(35, 23); this.btnAuto.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -139,7 +213,7 @@ this.pnlRestore.CanvasColor = System.Drawing.SystemColors.Control; this.pnlRestore.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.pnlRestore.DisabledBackColor = System.Drawing.Color.Empty; - this.pnlRestore.Location = new System.Drawing.Point(388, 360); + this.pnlRestore.Location = new System.Drawing.Point(388, 369); this.pnlRestore.Name = "pnlRestore"; this.pnlRestore.Size = new System.Drawing.Size(39, 23); this.pnlRestore.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -161,7 +235,7 @@ // label7 // this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(31, 393); + this.label7.Location = new System.Drawing.Point(35, 399); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(56, 17); this.label7.TabIndex = 403; @@ -184,7 +258,7 @@ this.txtFissionWords.Border.PaddingLeft = 2; this.txtFissionWords.Border.PaddingRight = 2; this.txtFissionWords.Border.PaddingTop = 2; - this.txtFissionWords.Location = new System.Drawing.Point(90, 390); + this.txtFissionWords.Location = new System.Drawing.Point(90, 397); this.txtFissionWords.Multiline = true; this.txtFissionWords.Name = "txtFissionWords"; this.txtFissionWords.Size = new System.Drawing.Size(337, 238); @@ -195,15 +269,15 @@ // this.txtEndWords.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtEndWords.Location = new System.Drawing.Point(232, 360); + this.txtEndWords.Location = new System.Drawing.Point(233, 369); this.txtEndWords.Name = "txtEndWords"; - this.txtEndWords.Size = new System.Drawing.Size(111, 23); + this.txtEndWords.Size = new System.Drawing.Size(110, 23); this.txtEndWords.TabIndex = 401; // // label6 // this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(201, 363); + this.label6.Location = new System.Drawing.Point(202, 372); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(32, 17); this.label6.TabIndex = 400; @@ -211,15 +285,15 @@ // // txtHeadWords // - this.txtHeadWords.Location = new System.Drawing.Point(90, 360); + this.txtHeadWords.Location = new System.Drawing.Point(90, 369); this.txtHeadWords.Name = "txtHeadWords"; - this.txtHeadWords.Size = new System.Drawing.Size(111, 23); + this.txtHeadWords.Size = new System.Drawing.Size(110, 23); this.txtHeadWords.TabIndex = 399; // // label5 // this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(31, 363); + this.label5.Location = new System.Drawing.Point(35, 372); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(56, 17); this.label5.TabIndex = 398; @@ -229,7 +303,7 @@ // this.txtProductName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtProductName.Location = new System.Drawing.Point(90, 193); + this.txtProductName.Location = new System.Drawing.Point(90, 182); this.txtProductName.Multiline = true; this.txtProductName.Name = "txtProductName"; this.txtProductName.Size = new System.Drawing.Size(337, 46); @@ -239,33 +313,33 @@ // this.txtSkcId.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtSkcId.Location = new System.Drawing.Point(291, 163); + this.txtSkcId.Location = new System.Drawing.Point(284, 154); this.txtSkcId.Name = "txtSkcId"; this.txtSkcId.ReadOnly = true; - this.txtSkcId.Size = new System.Drawing.Size(136, 23); + this.txtSkcId.Size = new System.Drawing.Size(143, 23); this.txtSkcId.TabIndex = 396; // // txtSpuId // - this.txtSpuId.Location = new System.Drawing.Point(90, 163); + this.txtSpuId.Location = new System.Drawing.Point(90, 154); this.txtSpuId.Name = "txtSpuId"; this.txtSpuId.ReadOnly = true; - this.txtSpuId.Size = new System.Drawing.Size(136, 23); + this.txtSpuId.Size = new System.Drawing.Size(143, 23); this.txtSpuId.TabIndex = 395; // // txtExtCode // this.txtExtCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtExtCode.Location = new System.Drawing.Point(90, 246); + this.txtExtCode.Location = new System.Drawing.Point(90, 233); this.txtExtCode.Name = "txtExtCode"; - this.txtExtCode.Size = new System.Drawing.Size(336, 23); + this.txtExtCode.Size = new System.Drawing.Size(337, 23); this.txtExtCode.TabIndex = 394; // // label4 // this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(31, 249); + this.label4.Location = new System.Drawing.Point(35, 236); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(56, 17); this.label4.TabIndex = 393; @@ -274,7 +348,7 @@ // label3 // this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(31, 196); + this.label3.Location = new System.Drawing.Point(35, 186); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(56, 17); this.label3.TabIndex = 392; @@ -283,7 +357,7 @@ // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(233, 166); + this.label2.Location = new System.Drawing.Point(230, 157); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(56, 17); this.label2.TabIndex = 391; @@ -292,7 +366,7 @@ // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(31, 166); + this.label1.Location = new System.Drawing.Point(35, 157); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(56, 17); this.label1.TabIndex = 390; @@ -301,7 +375,7 @@ // pictureBox1 // this.pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.Top; - this.pictureBox1.Location = new System.Drawing.Point(165, 18); + this.pictureBox1.Location = new System.Drawing.Point(165, 13); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(136, 136); this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; @@ -334,77 +408,43 @@ this.txtNotes.Border.PaddingLeft = 2; this.txtNotes.Border.PaddingRight = 2; this.txtNotes.Border.PaddingTop = 2; - this.txtNotes.Location = new System.Drawing.Point(90, 276); + this.txtNotes.Location = new System.Drawing.Point(90, 261); this.txtNotes.Multiline = true; this.txtNotes.Name = "txtNotes"; this.txtNotes.Size = new System.Drawing.Size(337, 47); this.txtNotes.TabIndex = 385; // - // label10 + // txtDeliveryCharge // - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(233, 333); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(56, 17); - this.label10.TabIndex = 454; - this.label10.Text = " 成本价"; + this.txtDeliveryCharge.Location = new System.Drawing.Point(218, 341); + this.txtDeliveryCharge.Name = "txtDeliveryCharge"; + this.txtDeliveryCharge.Size = new System.Drawing.Size(80, 23); + this.txtDeliveryCharge.TabIndex = 476; // - // txtCostPrice + // txtStickMarkCharge // - this.txtCostPrice.Location = new System.Drawing.Point(291, 330); - this.txtCostPrice.Name = "txtCostPrice"; - this.txtCostPrice.Size = new System.Drawing.Size(136, 23); - this.txtCostPrice.TabIndex = 455; + this.txtStickMarkCharge.Location = new System.Drawing.Point(346, 341); + this.txtStickMarkCharge.Name = "txtStickMarkCharge"; + this.txtStickMarkCharge.Size = new System.Drawing.Size(80, 23); + this.txtStickMarkCharge.TabIndex = 477; // - // btnOk + // label11 // - this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnOk.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnOk.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnOk.DisabledBackColor = System.Drawing.Color.Empty; - this.btnOk.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnOk.Location = new System.Drawing.Point(372, 640); - this.btnOk.Name = "btnOk"; - this.btnOk.Size = new System.Drawing.Size(55, 26); - this.btnOk.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnOk.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnOk.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnOk.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.btnOk.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.btnOk.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.btnOk.Style.ForeColor.Color = System.Drawing.Color.White; - this.btnOk.Style.GradientAngle = 90; - this.btnOk.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnOk.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnOk.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnOk.TabIndex = 459; - this.btnOk.Text = "提交"; - this.btnOk.Click += new System.EventHandler(this.btnOk_Click); + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(175, 344); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(44, 17); + this.label11.TabIndex = 478; + this.label11.Text = "车队费"; // - // btnSkuAi + // label12 // - this.btnSkuAi.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnSkuAi.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnSkuAi.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnSkuAi.DisabledBackColor = System.Drawing.Color.Empty; - this.btnSkuAi.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSkuAi.Location = new System.Drawing.Point(90, 640); - this.btnSkuAi.Name = "btnSkuAi"; - this.btnSkuAi.Size = new System.Drawing.Size(77, 26); - this.btnSkuAi.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnSkuAi.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnSkuAi.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnSkuAi.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.btnSkuAi.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.btnSkuAi.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.btnSkuAi.Style.ForeColor.Color = System.Drawing.Color.White; - this.btnSkuAi.Style.GradientAngle = 90; - this.btnSkuAi.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnSkuAi.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnSkuAi.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnSkuAi.TabIndex = 463; - this.btnSkuAi.Text = "SKU AI图"; - this.btnSkuAi.Click += new System.EventHandler(this.btnSkuAi_Click); + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(303, 344); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(44, 17); + this.label12.TabIndex = 479; + this.label12.Text = "贴单费"; // // DbProductEditNotesForm // @@ -453,5 +493,9 @@ private System.Windows.Forms.Label label10; private DevComponents.DotNetBar.PanelEx btnSkuAi; private DevComponents.DotNetBar.PanelEx btnOk; + private System.Windows.Forms.TextBox txtStickMarkCharge; + private System.Windows.Forms.TextBox txtDeliveryCharge; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label12; } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductEditNotesForm.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductEditNotesForm.cs index c791ccd..0c7548f 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductEditNotesForm.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductEditNotesForm.cs @@ -42,9 +42,11 @@ namespace TemuKJD.KJDForms.ProductSelectForms this.txtFissionWords.Text = dbProd.fission_words; //this.txtHeadWords.Text = string.IsNullOrWhiteSpace(dbProd.head_words) ? "5-99个" : dbProd.head_words; //this.txtEndWords.Text = string.IsNullOrWhiteSpace(dbProd.end_words) ? "适合不同的搭配风格" : dbProd.end_words; - this.txtHeadWords.Text = dbProd.head_words; - this.txtEndWords.Text = dbProd.end_words; - this.txtCostPrice.Text = dbProd.cost_price; + this.txtHeadWords.Text = dbProd.head_words.ParseToString(); + this.txtEndWords.Text = dbProd.end_words.ParseToString(); + this.txtCostPrice.Text = dbProd.cost_price.ParseToString(); + this.txtDeliveryCharge.Text = dbProd.delivery_fee.ParseToString(); + this.txtStickMarkCharge.Text = dbProd.mark_fee.ParseToString(); } } @@ -62,16 +64,14 @@ namespace TemuKJD.KJDForms.ProductSelectForms "&db_id=" + dbProd.id + "¬es=" + this.txtNotes.Text.Trim(); data += "&group=" + this.txtGroup.Text.Trim(); data += "&product_name=" + this.txtProductName.Text.Trim(); - data += "&product_name=" + this.txtProductName.Text.Trim(); data += "&ext_code=" + this.txtExtCode.Text.Trim(); data += "&fission_words=" + this.txtFissionWords.Text.Trim(); data += "&head_words=" + this.txtHeadWords.Text.Trim(); data += "&end_words=" + this.txtEndWords.Text.Trim(); - if (!string.IsNullOrEmpty(this.txtCostPrice.Text.Trim())) - data += "&cost_price=" + this.txtCostPrice.Text.Trim(); + data += "&cost_price=" + this.txtCostPrice.Text.Trim(); + data += "&delivery_fee=" + this.txtDeliveryCharge.Text.Trim(); + data += "&mark_fee=" + this.txtStickMarkCharge.Text.Trim(); // 贴单费 var html = GetHtml.PostUtf8(url, data); - if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) - html = GetHtml.PostUtf8(url, data); if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) html = GetHtml.PostUtf8(url, data); if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) @@ -87,6 +87,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms dbProd.end_words = this.txtEndWords.Text.Trim(); dbProd.fission_words = this.txtFissionWords.Text.Trim(); dbProd.product_name = this.txtProductName.Text.Trim(); + dbProd.cost_price = this.txtCostPrice.Text.Trim().ParseToDecimal() <= 0 ? new decimal?() : this.txtCostPrice.Text.Trim().ParseToDecimal(); + dbProd.delivery_fee = this.txtDeliveryCharge.Text.Trim().ParseToDecimal() <= 0 ? new decimal?() : this.txtDeliveryCharge.Text.Trim().ParseToDecimal(); + dbProd.mark_fee = this.txtStickMarkCharge.Text.Trim().ParseToDecimal() <= 0 ? new decimal?() : this.txtStickMarkCharge.Text.Trim().ParseToDecimal(); this.Close(); } } diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductListForm.Designer.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductListForm.Designer.cs index c058844..2b1491d 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductListForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductListForm.Designer.cs @@ -39,6 +39,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DbProductListForm)); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.btnBatchSelect = new DevComponents.DotNetBar.PanelEx(); @@ -69,6 +71,13 @@ namespace TemuKJD.KJDForms.ProductSelectForms this.lblProdName = new System.Windows.Forms.Label(); this.numCount = new System.Windows.Forms.NumericUpDown(); this.dgvSelectShop = new TemuKJD.UserComponent.DataGridViewEx(); + this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colUserName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSubUserName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colJitStatus = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.btnCancel = new DevComponents.DotNetBar.PanelEx(); this.btnAddToSelectDb = new DevComponents.DotNetBar.PanelEx(); this.btnGetShop = new DevComponents.DotNetBar.PanelEx(); @@ -77,6 +86,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms this.txtShopId = new System.Windows.Forms.TextBox(); this.label8 = new System.Windows.Forms.Label(); this.dgvDbProduct = new TemuKJD.UserComponent.DataGridViewEx(); + this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.col_db_id = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.col_spu_id = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -87,6 +98,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms this.col_cat_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.col_ext_code = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colCostPrice = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colDeliveryCharge = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colStickMarkCharge = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colProdGetType = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colGroup = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.col_notes = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -100,15 +113,6 @@ namespace TemuKJD.KJDForms.ProductSelectForms this.col_edit = new System.Windows.Forms.DataGridViewLinkColumn(); this.col_delete = new System.Windows.Forms.DataGridViewLinkColumn(); this.col_select_product = new System.Windows.Forms.DataGridViewLinkColumn(); - this.ucSplitPage1 = new TemuKJD.UserControls.UcSplitPage(); - this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); - this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn(); - this.colUserName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colSubUserName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colJitStatus = new System.Windows.Forms.DataGridViewTextBoxColumn(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -550,6 +554,57 @@ namespace TemuKJD.KJDForms.ProductSelectForms this.dgvSelectShop.TabIndex = 504; this.dgvSelectShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectShop_CellContentClick); // + // colCheck + // + this.colCheck.HeaderText = "选择"; + this.colCheck.MinimumWidth = 6; + 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; + // + // colUserName + // + this.colUserName.HeaderText = "用户名称"; + this.colUserName.MinimumWidth = 6; + this.colUserName.Name = "colUserName"; + this.colUserName.ReadOnly = true; + this.colUserName.Width = 90; + // + // colSubUserName + // + this.colSubUserName.HeaderText = "子账户名称"; + this.colSubUserName.Name = "colSubUserName"; + this.colSubUserName.ReadOnly = true; + this.colSubUserName.Visible = false; + this.colSubUserName.Width = 150; + // + // colShopId + // + this.colShopId.HeaderText = "店铺Id"; + this.colShopId.Name = "colShopId"; + this.colShopId.ReadOnly = true; + // + // colShopName + // + this.colShopName.HeaderText = "店铺名称"; + this.colShopName.Name = "colShopName"; + this.colShopName.ReadOnly = true; + // + // colShopNotes + // + this.colShopNotes.HeaderText = "店铺备注"; + this.colShopNotes.Name = "colShopNotes"; + this.colShopNotes.ReadOnly = true; + // + // colJitStatus + // + this.colJitStatus.HeaderText = "JIT状态"; + this.colJitStatus.Name = "colJitStatus"; + this.colJitStatus.ReadOnly = true; + this.colJitStatus.Visible = false; + // // btnCancel // this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -689,6 +744,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms this.col_cat_name, this.col_ext_code, this.colCostPrice, + this.colDeliveryCharge, + this.colStickMarkCharge, this.colProdGetType, this.colGroup, this.col_notes, @@ -712,6 +769,31 @@ namespace TemuKJD.KJDForms.ProductSelectForms this.dgvDbProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvDbProduct_CellContentClick); this.dgvDbProduct.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvDbProduct_Scroll); // + // ucSplitPage1 + // + this.ucSplitPage1.CurrentPage = 1; + this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right; + this.ucSplitPage1.IsShowPageSize = false; + this.ucSplitPage1.Location = new System.Drawing.Point(916, 0); + this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0); + this.ucSplitPage1.Name = "ucSplitPage1"; + this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); + this.ucSplitPage1.PageSize = 50; + this.ucSplitPage1.Size = new System.Drawing.Size(362, 25); + this.ucSplitPage1.TabIndex = 6; + this.ucSplitPage1.TotalPage = 1; + // + // statusBar + // + this.statusBar.BackColor = System.Drawing.Color.White; + this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill; + this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.statusBar.Location = new System.Drawing.Point(0, 0); + this.statusBar.Margin = new System.Windows.Forms.Padding(0); + this.statusBar.Name = "statusBar"; + this.statusBar.Size = new System.Drawing.Size(1278, 25); + this.statusBar.TabIndex = 5; + // // colSelect // this.colSelect.FillWeight = 26F; @@ -770,23 +852,41 @@ namespace TemuKJD.KJDForms.ProductSelectForms // // col_cat_name // + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.col_cat_name.DefaultCellStyle = dataGridViewCellStyle6; + this.col_cat_name.FillWeight = 60F; this.col_cat_name.HeaderText = "类目"; this.col_cat_name.Name = "col_cat_name"; this.col_cat_name.ReadOnly = true; // // col_ext_code // + this.col_ext_code.FillWeight = 115F; this.col_ext_code.HeaderText = "货号"; this.col_ext_code.Name = "col_ext_code"; this.col_ext_code.ReadOnly = true; // // colCostPrice // - this.colCostPrice.FillWeight = 50F; + this.colCostPrice.FillWeight = 45F; this.colCostPrice.HeaderText = "成本价"; this.colCostPrice.Name = "colCostPrice"; this.colCostPrice.ReadOnly = true; // + // colDeliveryCharge + // + this.colDeliveryCharge.FillWeight = 45F; + this.colDeliveryCharge.HeaderText = "车队费"; + this.colDeliveryCharge.Name = "colDeliveryCharge"; + this.colDeliveryCharge.ReadOnly = true; + // + // colStickMarkCharge + // + this.colStickMarkCharge.FillWeight = 45F; + this.colStickMarkCharge.HeaderText = "贴单费"; + this.colStickMarkCharge.Name = "colStickMarkCharge"; + this.colStickMarkCharge.ReadOnly = true; + // // colProdGetType // this.colProdGetType.FillWeight = 60F; @@ -796,6 +896,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms // // colGroup // + dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colGroup.DefaultCellStyle = dataGridViewCellStyle7; this.colGroup.FillWeight = 58F; this.colGroup.HeaderText = "分组"; this.colGroup.Name = "colGroup"; @@ -803,17 +905,18 @@ namespace TemuKJD.KJDForms.ProductSelectForms // // col_notes // - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.col_notes.DefaultCellStyle = dataGridViewCellStyle6; - this.col_notes.FillWeight = 90F; + dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.col_notes.DefaultCellStyle = dataGridViewCellStyle8; + this.col_notes.FillWeight = 60F; this.col_notes.HeaderText = "备注"; this.col_notes.Name = "col_notes"; this.col_notes.ReadOnly = true; // // colHeadWords // - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colHeadWords.DefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colHeadWords.DefaultCellStyle = dataGridViewCellStyle9; + this.colHeadWords.FillWeight = 60F; this.colHeadWords.HeaderText = "标题前缀"; this.colHeadWords.Name = "colHeadWords"; this.colHeadWords.ReadOnly = true; @@ -821,8 +924,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms // // colEndWords // - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colEndWords.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colEndWords.DefaultCellStyle = dataGridViewCellStyle10; this.colEndWords.HeaderText = "标题后缀"; this.colEndWords.Name = "colEndWords"; this.colEndWords.ReadOnly = true; @@ -830,8 +933,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms // // colFissionWords // - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colFissionWords.DefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colFissionWords.DefaultCellStyle = dataGridViewCellStyle11; this.colFissionWords.HeaderText = "裂变词"; this.colFissionWords.Name = "colFissionWords"; this.colFissionWords.ReadOnly = true; @@ -839,8 +942,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms // // colAddTime // - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colAddTime.DefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colAddTime.DefaultCellStyle = dataGridViewCellStyle12; this.colAddTime.FillWeight = 60F; this.colAddTime.HeaderText = "入库时间"; this.colAddTime.Name = "colAddTime"; @@ -894,82 +997,6 @@ namespace TemuKJD.KJDForms.ProductSelectForms this.col_select_product.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.col_select_product.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; // - // ucSplitPage1 - // - this.ucSplitPage1.CurrentPage = 1; - this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right; - this.ucSplitPage1.IsShowPageSize = false; - this.ucSplitPage1.Location = new System.Drawing.Point(916, 0); - this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0); - this.ucSplitPage1.Name = "ucSplitPage1"; - this.ucSplitPage1.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); - this.ucSplitPage1.PageSize = 50; - this.ucSplitPage1.Size = new System.Drawing.Size(362, 25); - this.ucSplitPage1.TabIndex = 6; - this.ucSplitPage1.TotalPage = 1; - // - // statusBar - // - this.statusBar.BackColor = System.Drawing.Color.White; - this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill; - this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.statusBar.Location = new System.Drawing.Point(0, 0); - this.statusBar.Margin = new System.Windows.Forms.Padding(0); - this.statusBar.Name = "statusBar"; - this.statusBar.Size = new System.Drawing.Size(1278, 25); - this.statusBar.TabIndex = 5; - // - // colCheck - // - this.colCheck.HeaderText = "选择"; - this.colCheck.MinimumWidth = 6; - 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; - // - // colUserName - // - this.colUserName.HeaderText = "用户名称"; - this.colUserName.MinimumWidth = 6; - this.colUserName.Name = "colUserName"; - this.colUserName.ReadOnly = true; - this.colUserName.Width = 90; - // - // colSubUserName - // - this.colSubUserName.HeaderText = "子账户名称"; - this.colSubUserName.Name = "colSubUserName"; - this.colSubUserName.ReadOnly = true; - this.colSubUserName.Visible = false; - this.colSubUserName.Width = 150; - // - // colShopId - // - this.colShopId.HeaderText = "店铺Id"; - this.colShopId.Name = "colShopId"; - this.colShopId.ReadOnly = true; - // - // colShopName - // - this.colShopName.HeaderText = "店铺名称"; - this.colShopName.Name = "colShopName"; - this.colShopName.ReadOnly = true; - // - // colShopNotes - // - this.colShopNotes.HeaderText = "店铺备注"; - this.colShopNotes.Name = "colShopNotes"; - this.colShopNotes.ReadOnly = true; - // - // colJitStatus - // - this.colJitStatus.HeaderText = "JIT状态"; - this.colJitStatus.Name = "colJitStatus"; - this.colJitStatus.ReadOnly = true; - this.colJitStatus.Visible = false; - // // DbProductListForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -1043,6 +1070,13 @@ namespace TemuKJD.KJDForms.ProductSelectForms private DevComponents.DotNetBar.PanelEx btnBatchSelect; private DevComponents.DotNetBar.PanelEx btnSearch; private DevComponents.DotNetBar.PanelEx btnSelect; + private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck; + private System.Windows.Forms.DataGridViewTextBoxColumn colUserName; + private System.Windows.Forms.DataGridViewTextBoxColumn colSubUserName; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopId; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopName; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopNotes; + private System.Windows.Forms.DataGridViewTextBoxColumn colJitStatus; private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect; private System.Windows.Forms.DataGridViewTextBoxColumn col_db_id; private System.Windows.Forms.DataGridViewTextBoxColumn col_spu_id; @@ -1053,6 +1087,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms private System.Windows.Forms.DataGridViewTextBoxColumn col_cat_name; private System.Windows.Forms.DataGridViewTextBoxColumn col_ext_code; private System.Windows.Forms.DataGridViewTextBoxColumn colCostPrice; + private System.Windows.Forms.DataGridViewTextBoxColumn colDeliveryCharge; + private System.Windows.Forms.DataGridViewTextBoxColumn colStickMarkCharge; private System.Windows.Forms.DataGridViewTextBoxColumn colProdGetType; private System.Windows.Forms.DataGridViewTextBoxColumn colGroup; private System.Windows.Forms.DataGridViewTextBoxColumn col_notes; @@ -1066,12 +1102,5 @@ namespace TemuKJD.KJDForms.ProductSelectForms private System.Windows.Forms.DataGridViewLinkColumn col_edit; private System.Windows.Forms.DataGridViewLinkColumn col_delete; private System.Windows.Forms.DataGridViewLinkColumn col_select_product; - private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck; - private System.Windows.Forms.DataGridViewTextBoxColumn colUserName; - private System.Windows.Forms.DataGridViewTextBoxColumn colSubUserName; - private System.Windows.Forms.DataGridViewTextBoxColumn colShopId; - private System.Windows.Forms.DataGridViewTextBoxColumn colShopName; - private System.Windows.Forms.DataGridViewTextBoxColumn colShopNotes; - private System.Windows.Forms.DataGridViewTextBoxColumn colJitStatus; } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductListForm.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductListForm.cs index 0195add..32fc98a 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductListForm.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductListForm.cs @@ -2,6 +2,7 @@ using AllBase.Helper; using AllBase.Model.Result; using AllBase.Model.Result.TemuResult; +using NaiBa.Util; using NaiBa.Util.Extension; using Newtonsoft.Json.Linq; using System; @@ -33,6 +34,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms ShopLoginInfo shop = null; // 单店认领 List lstAdminShopInfo = new List(); // 服务端直传店铺列表 List lstTemuDbProduct = new List(); + //ConcurrentList lstTemuDbProduct = new ConcurrentList(); public DbProductListForm() { @@ -56,6 +58,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms this.dgvDbProduct.Columns["colProdGetType"].Visible = false; this.dgvDbProduct.Columns["colGroup"].Visible = false; this.dgvDbProduct.Columns["colCostPrice"].Visible = false; + this.dgvDbProduct.Columns["colDeliveryCharge"].Visible = false; + this.dgvDbProduct.Columns["colStickMarkCharge"].Visible = false; this.lblGroup.Visible = false; this.cmbGroup.Visible = false; this.btnImportHtml.Visible = false; @@ -73,6 +77,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms this.dgvDbProduct.Columns["colProdGetType"].Visible = true; // 采集来源 母店采集 前端直采 this.dgvDbProduct.Columns["colGroup"].Visible = true; // 分组 this.dgvDbProduct.Columns["colCostPrice"].Visible = true; // 成本价 + this.dgvDbProduct.Columns["colDeliveryCharge"].Visible = true; // 车队费 + this.dgvDbProduct.Columns["colStickMarkCharge"].Visible = true; // 贴单费 this.lblGroup.Visible = true; // 分组 this.cmbGroup.Visible = true; // 分组 this.btnImportHtml.Visible = true; // 导入前端直采商品 @@ -86,12 +92,17 @@ namespace TemuKJD.KJDForms.ProductSelectForms this.dgvDbProduct.Columns["colProdGetType"].Visible = true; // 采集来源 母店采集 前端直采 this.dgvDbProduct.Columns["colGroup"].Visible = true; // 分组 this.dgvDbProduct.Columns["colCostPrice"].Visible = true; // 成本价 + this.dgvDbProduct.Columns["colDeliveryCharge"].Visible = true; // 车队费 + this.dgvDbProduct.Columns["colStickMarkCharge"].Visible = true; // 贴单费 this.lblGroup.Visible = true; // 分组 this.cmbGroup.Visible = true; // 分组 } if (IsClientJit) { this.dgvDbProduct.Columns["colSelectProd"].Visible = true; // 商品直传(不经过客户选品) + this.dgvDbProduct.Columns["colCostPrice"].Visible = true; // 成本价 + this.dgvDbProduct.Columns["colDeliveryCharge"].Visible = true; // 车队费 + this.dgvDbProduct.Columns["colStickMarkCharge"].Visible = true; // 贴单费 this.btnBatchSelect.Visible = true; // 批量直传 this.cmbGroup.Text = "jit分组"; this.dgvSelectShop.Columns["colJitStatus"].Visible = true; @@ -181,6 +192,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms prod.cat_name, prod.ext_code, prod.cost_price, + prod.delivery_fee, + prod.mark_fee, prod.product_get_type == 0 ? "母店采集" : "前端直采", prod.group, prod.notes, @@ -367,6 +380,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms dgvDbProduct.Rows[e.RowIndex].Cells["colEndWords"].Value = dbProduct.end_words; dgvDbProduct.Rows[e.RowIndex].Cells["colFissionWords"].Value = dbProduct.fission_words; dgvDbProduct.Rows[e.RowIndex].Cells["col_product_name"].Value = dbProduct.product_name; + dgvDbProduct.Rows[e.RowIndex].Cells["colCostPrice"].Value = dbProduct.cost_price; + dgvDbProduct.Rows[e.RowIndex].Cells["colDeliveryCharge"].Value = dbProduct.delivery_fee; + dgvDbProduct.Rows[e.RowIndex].Cells["colStickMarkCharge"].Value = dbProduct.mark_fee; if (dgvDbProduct.Rows[e.RowIndex].Cells["colGroup"].Value.ParseToString() != dbProduct.group.ParseToString()) { dgvDbProduct.Rows[e.RowIndex].Cells["colGroup"].Value = dbProduct.group; diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductListForm.resx b/TEMUKJD/KJDForms/ProductSelectForms/DbProductListForm.resx index 24c6fc8..c85e18f 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductListForm.resx +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductListForm.resx @@ -168,6 +168,12 @@ True + + True + + + True + True diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.Designer.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.Designer.cs index 7f4192a..ce01865 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.Designer.cs @@ -247,7 +247,7 @@ // this.splitContainer1.Panel2.Controls.Add(this.splitContainer2); this.splitContainer1.Size = new System.Drawing.Size(1518, 638); - this.splitContainer1.SplitterDistance = 125; + this.splitContainer1.SplitterDistance = 120; this.splitContainer1.TabIndex = 2; // // numMaxWaitSecond @@ -392,7 +392,7 @@ this.lblSkuRandomLetterNotes.Name = "lblSkuRandomLetterNotes"; this.lblSkuRandomLetterNotes.Size = new System.Drawing.Size(150, 17); this.lblSkuRandomLetterNotes.TabIndex = 641; - this.lblSkuRandomLetterNotes.Text = "备注:当前特殊字符包括--"; + this.lblSkuRandomLetterNotes.Text = "备注:SKU随机字符包括…"; // // btnAdd // @@ -747,7 +747,7 @@ // // chkUploadProd // - this.chkUploadProd.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.chkUploadProd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.chkUploadProd.Checked = true; this.chkUploadProd.CheckState = System.Windows.Forms.CheckState.Checked; this.chkUploadProd.Location = new System.Drawing.Point(1343, 11); @@ -1444,8 +1444,8 @@ // this.splitContainer2.Panel2.Controls.Add(this.ucSplitPage1); this.splitContainer2.Panel2.Controls.Add(this.statusBar); - this.splitContainer2.Size = new System.Drawing.Size(1518, 509); - this.splitContainer2.SplitterDistance = 480; + this.splitContainer2.Size = new System.Drawing.Size(1518, 514); + this.splitContainer2.SplitterDistance = 485; this.splitContainer2.TabIndex = 0; // // pnlError @@ -1481,7 +1481,7 @@ // this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None; this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; - this.pbLoading.Location = new System.Drawing.Point(734, 215); + this.pbLoading.Location = new System.Drawing.Point(734, 217); this.pbLoading.Name = "pbLoading"; this.pbLoading.Size = new System.Drawing.Size(50, 50); this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; @@ -1622,7 +1622,7 @@ this.dgvSelectProduct.ReadOnly = true; this.dgvSelectProduct.RowHeadersWidth = 40; this.dgvSelectProduct.RowTemplate.Height = 23; - this.dgvSelectProduct.Size = new System.Drawing.Size(1510, 480); + this.dgvSelectProduct.Size = new System.Drawing.Size(1510, 485); this.dgvSelectProduct.TabIndex = 189; this.dgvSelectProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSelectProduct_CellContentClick); this.dgvSelectProduct.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvSelectProduct_Scroll); @@ -1849,7 +1849,7 @@ // this.ucSplitPage1.CurrentPage = 1; this.ucSplitPage1.Dock = System.Windows.Forms.DockStyle.Right; - this.ucSplitPage1.IsShowPageSize = true; + this.ucSplitPage1.IsShowPageSize = false; this.ucSplitPage1.Location = new System.Drawing.Point(1118, 0); this.ucSplitPage1.Margin = new System.Windows.Forms.Padding(0); this.ucSplitPage1.Name = "ucSplitPage1"; diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs index 558e217..331d9f7 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs @@ -139,6 +139,19 @@ namespace TemuKJD.KJDForms.ProductSelectForms chkUploadProd.Visible = true; flowLayoutPanel1.Visible = true; + ucSplitPage1.IsShowPageSize = true; // 可调整分页 + ucSplitPage1.cmbPageSize.DropDownStyle = ComboBoxStyle.DropDownList; + if (BaseClass.SaLevel == 1) + { + ucSplitPage1.cmbPageSize.DropDownStyle = ComboBoxStyle.DropDown; + } + else + { + ucSplitPage1.cmbPageSize.Items.Remove("5000"); + ucSplitPage1.cmbPageSize.Items.Remove("2000"); + ucSplitPage1.cmbPageSize.Items.Remove("1000"); + } + if (BaseClass.SaLevel == 1 && !IsClientJit) { dgvSelectProduct.Columns["colSubSaNick"].Visible = true; @@ -160,6 +173,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms cmbUserNotes.Visible = false; lblUserNotes.Visible = false; colUserNotes.Visible = false; + ucSplitPage1.IsShowPageSize = true; var columnStyles = tableLayoutPanel1.ColumnStyles.Cast().ToList(); columnStyles[columnStyles.Count - 1].SizeType = SizeType.Absolute; columnStyles[columnStyles.Count - 1].Width = 0; @@ -179,7 +193,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms } } - this.lblSkuRandomLetterNotes.Text = "备注:SKU特殊字符包括 " + string.Join(" ", skuRandomLetterArr) + " "; + this.lblSkuRandomLetterNotes.Text = "备注:SKU随机字符包括 " + string.Join(" ", skuRandomLetterArr) + " "; } private void ChkSel_CheckedChanged(object sender, EventArgs e) @@ -475,7 +489,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms } // 查看map映射列表 //return; - //var url = BaseClass.BuildObjString("product/get_select_product_map_draft_id_list"); + //var url = BaseClass.BuildObjString("product/get_select_prod_db_id_map_draft_id_list"); //var data = UserLogin.GetSignaturex() + "&select_db_id=" + dbId; //if (IsClientJit) // data += "&is_client_jit=true"; diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectSetSubSaForm.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectSetSubSaForm.cs index b22f8b8..57a2e4a 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectSetSubSaForm.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectSetSubSaForm.cs @@ -132,6 +132,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms 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.authorized_amount = BaseRegex.GetNullableDecimalJson(ref oStr, "authorized_amount"); lstSubSa.Add(user); dgvSaUser.Rows.Add( diff --git a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.Designer.cs b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.Designer.cs index 12aee35..3f3d130 100644 --- a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.Designer.cs @@ -114,11 +114,12 @@ this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.pbLoading = new System.Windows.Forms.PictureBox(); this.panel2 = new System.Windows.Forms.Panel(); - this.dataGridViewEx1 = new TemuKJD.UserComponent.DataGridViewEx(); + this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); + this.dgvMapDraftIds = new TemuKJD.UserComponent.DataGridViewEx(); this.dataGridViewCheckBoxColumn1 = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colMapId = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colMapShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewLinkColumn5 = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colMapDraftId = new System.Windows.Forms.DataGridViewLinkColumn(); this.colToPorductPage = new System.Windows.Forms.DataGridViewLinkColumn(); this.colToDraftPage = new System.Windows.Forms.DataGridViewLinkColumn(); this.dgvSelectProduct = new TemuKJD.UserComponent.DataGridViewEx(); @@ -176,7 +177,7 @@ this.splitContainer2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit(); this.panel2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewEx1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvMapDraftIds)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvSelectProduct)).BeginInit(); this.SuspendLayout(); // @@ -263,12 +264,11 @@ // label14 // this.label14.AutoSize = true; - this.label14.Font = new System.Drawing.Font("微软雅黑", 8F); this.label14.ForeColor = System.Drawing.SystemColors.MenuHighlight; this.label14.Location = new System.Drawing.Point(959, 71); this.label14.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(278, 16); + this.label14.Size = new System.Drawing.Size(307, 17); this.label14.TabIndex = 640; this.label14.Text = "备注:新的商品上传货号为固定前缀 EC + 上家商品SKC"; // @@ -1301,23 +1301,50 @@ // // panel2 // + this.panel2.Anchor = System.Windows.Forms.AnchorStyles.Top; this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel2.Controls.Add(this.dataGridViewEx1); - this.panel2.Location = new System.Drawing.Point(489, 75); + this.panel2.Controls.Add(this.panelEx1); + this.panel2.Controls.Add(this.dgvMapDraftIds); + this.panel2.Location = new System.Drawing.Point(661, 69); this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(557, 342); + this.panel2.Size = new System.Drawing.Size(196, 341); this.panel2.TabIndex = 191; this.panel2.Visible = false; // - // dataGridViewEx1 + // panelEx1 // - this.dataGridViewEx1.AllowUserToAddRows = false; - this.dataGridViewEx1.AllowUserToDeleteRows = false; + this.panelEx1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.panelEx1.Cursor = System.Windows.Forms.Cursors.Hand; + this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty; + this.panelEx1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.panelEx1.Location = new System.Drawing.Point(151, 313); + this.panelEx1.Name = "panelEx1"; + this.panelEx1.Size = new System.Drawing.Size(42, 24); + this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panelEx1.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.panelEx1.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.panelEx1.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.panelEx1.Style.ForeColor.Color = System.Drawing.Color.White; + this.panelEx1.Style.GradientAngle = 90; + this.panelEx1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.panelEx1.TabIndex = 453; + this.panelEx1.Text = "关闭"; + this.panelEx1.Click += new System.EventHandler(this.btnCloseDgvMapDraftIds_Click); + // + // dgvMapDraftIds + // + this.dgvMapDraftIds.AllowUserToAddRows = false; + this.dgvMapDraftIds.AllowUserToDeleteRows = false; dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; - this.dataGridViewEx1.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewEx1.AutoRowNumber = true; - this.dataGridViewEx1.BackgroundColor = System.Drawing.Color.White; - this.dataGridViewEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.dgvMapDraftIds.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.dgvMapDraftIds.AutoRowNumber = true; + this.dgvMapDraftIds.BackgroundColor = System.Drawing.Color.White; + this.dgvMapDraftIds.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))); @@ -1325,23 +1352,23 @@ dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridViewEx1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; - this.dataGridViewEx1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridViewEx1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.dgvMapDraftIds.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.dgvMapDraftIds.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvMapDraftIds.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewCheckBoxColumn1, this.colMapId, this.colMapShopId, - this.dataGridViewLinkColumn5, + this.colMapDraftId, this.colToPorductPage, this.colToDraftPage}); - this.dataGridViewEx1.Dock = System.Windows.Forms.DockStyle.Fill; - this.dataGridViewEx1.Location = new System.Drawing.Point(0, 0); - this.dataGridViewEx1.Name = "dataGridViewEx1"; - this.dataGridViewEx1.ReadOnly = true; - this.dataGridViewEx1.RowHeadersWidth = 40; - this.dataGridViewEx1.RowTemplate.Height = 23; - this.dataGridViewEx1.Size = new System.Drawing.Size(555, 340); - this.dataGridViewEx1.TabIndex = 192; + this.dgvMapDraftIds.Location = new System.Drawing.Point(1, 1); + this.dgvMapDraftIds.Name = "dgvMapDraftIds"; + this.dgvMapDraftIds.ReadOnly = true; + this.dgvMapDraftIds.RowHeadersWidth = 40; + this.dgvMapDraftIds.RowTemplate.Height = 23; + this.dgvMapDraftIds.Size = new System.Drawing.Size(192, 310); + this.dgvMapDraftIds.TabIndex = 192; + this.dgvMapDraftIds.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvDraftIds_CellContentClick); // // dataGridViewCheckBoxColumn1 // @@ -1350,6 +1377,7 @@ this.dataGridViewCheckBoxColumn1.ReadOnly = true; this.dataGridViewCheckBoxColumn1.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.dataGridViewCheckBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.dataGridViewCheckBoxColumn1.Visible = false; this.dataGridViewCheckBoxColumn1.Width = 30; // // colMapId @@ -1365,16 +1393,17 @@ this.colMapShopId.HeaderText = "映射店铺Id"; this.colMapShopId.Name = "colMapShopId"; this.colMapShopId.ReadOnly = true; + this.colMapShopId.Visible = false; this.colMapShopId.Width = 120; // - // dataGridViewLinkColumn5 + // colMapDraftId // - this.dataGridViewLinkColumn5.HeaderText = "商品SPU"; - this.dataGridViewLinkColumn5.Name = "dataGridViewLinkColumn5"; - this.dataGridViewLinkColumn5.ReadOnly = true; - this.dataGridViewLinkColumn5.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridViewLinkColumn5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.dataGridViewLinkColumn5.Width = 86; + this.colMapDraftId.HeaderText = "已上传商品ID"; + this.colMapDraftId.Name = "colMapDraftId"; + this.colMapDraftId.ReadOnly = true; + this.colMapDraftId.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colMapDraftId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colMapDraftId.Width = 120; // // colToPorductPage // @@ -1383,6 +1412,7 @@ this.colToPorductPage.ReadOnly = true; this.colToPorductPage.Resizable = System.Windows.Forms.DataGridViewTriState.True; this.colToPorductPage.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colToPorductPage.Visible = false; this.colToPorductPage.Width = 62; // // colToDraftPage @@ -1731,7 +1761,7 @@ this.splitContainer2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit(); this.panel2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewEx1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvMapDraftIds)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvSelectProduct)).EndInit(); this.ResumeLayout(false); @@ -1814,13 +1844,7 @@ private DevComponents.DotNetBar.PanelEx btnSetSubSa; private System.Windows.Forms.Label label14; private System.Windows.Forms.Panel panel2; - private UserComponent.DataGridViewEx dataGridViewEx1; - private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn1; - private System.Windows.Forms.DataGridViewTextBoxColumn colMapId; - private System.Windows.Forms.DataGridViewTextBoxColumn colMapShopId; - private System.Windows.Forms.DataGridViewLinkColumn dataGridViewLinkColumn5; - private System.Windows.Forms.DataGridViewLinkColumn colToPorductPage; - private System.Windows.Forms.DataGridViewLinkColumn colToDraftPage; + private UserComponent.DataGridViewEx dgvMapDraftIds; private UserComponent.UcCheckBox chkSkuRandomLetter; private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect; private System.Windows.Forms.DataGridViewTextBoxColumn colSelectId; @@ -1848,5 +1872,12 @@ private System.Windows.Forms.DataGridViewLinkColumn colEditNotes; private System.Windows.Forms.DataGridViewLinkColumn ColDelete; private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult; + private DevComponents.DotNetBar.PanelEx panelEx1; + private System.Windows.Forms.DataGridViewCheckBoxColumn dataGridViewCheckBoxColumn1; + private System.Windows.Forms.DataGridViewTextBoxColumn colMapId; + private System.Windows.Forms.DataGridViewTextBoxColumn colMapShopId; + private System.Windows.Forms.DataGridViewLinkColumn colMapDraftId; + private System.Windows.Forms.DataGridViewLinkColumn colToPorductPage; + private System.Windows.Forms.DataGridViewLinkColumn colToDraftPage; } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.cs b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.cs index 29043bf..e44f44b 100644 --- a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.cs +++ b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.cs @@ -65,6 +65,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms flowLayoutPanel1.Visible = false; chkUploadProd.Visible = true; flowLayoutPanel1.Visible = true; + tableLayoutPanel1.Width += 86; ucSplitPage1.IsShowPageSize = false; // 可调整分页 @@ -77,6 +78,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms pbFissionSetting.Visible = true; btnReFission.Visible = true; ucSplitPage1.IsShowPageSize = true; // 可调整分页 + tableLayoutPanel1.Width -= 86; } } @@ -157,7 +159,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms "复制Cookie", prodSelect.spu_id, prodSelect.skc_id, - prodSelect.main_img.Replace("https:", "http:"), + prodSelect.main_img.Replace("https:", "http:") + "?imageMogr2/thumbnail/54x54"", defaultBitmap,//prod.main_img, prodSelect.fission_product_name, string.IsNullOrWhiteSpace(prodSelect.change_cat_name) ? prodSelect.cat_name : prodSelect.change_cat_name.Split('>').LastOrDefault(), @@ -344,7 +346,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms dgvSelectProduct.Rows[e.RowIndex].Cells["colUserNotes"].Value = dbSelectProduct.user_notes; break; case "Skc图片": - ShowImgForm imgFrom = new ShowImgForm(dgvSelectProduct.Rows[e.RowIndex].Cells["colImgUrl"].Value.ParseToString()); + ShowImgForm imgFrom = new ShowImgForm(dgvSelectProduct.Rows[e.RowIndex].Cells["colImgUrl"].Value.ParseToString().Split('?').FirstOrDefault()); imgFrom.ShowDialog(); break; case "认领": @@ -359,24 +361,14 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms } break; case "草稿箱Id": + panel2.Visible = false; if (!string.IsNullOrEmpty(draftId)) { - var shop = GetShop(shopId); - AdminShopLoginForm adminLoginForm = new AdminShopLoginForm(shop); - //adminLoginForm.InitUrl = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?productDraftId=" + - adminLoginForm.InitUrl = "https://agentseller.temu.com/goods/edit?productDraftId=" + - draftId + "&from=productDraftList"; - adminLoginForm.openType = EnumOpenType.manage; - adminLoginForm.WindowState = FormWindowState.Maximized; - adminLoginForm.ShowDialog(); - return; - - var url = BaseClass.BuildObjString("product_third/get_select_product_map_draft_id_list"); + bool flag = true; + var url = BaseClass.BuildObjString("product_third/get_select_prod_db_id_map_draft_id_list"); var data = UserLogin.GetSignaturex() + "&select_db_id=" + dbId; var html = GetHtml.PostUtf8(url, data); - if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) - html = GetHtml.PostUtf8(url, data); if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) html = GetHtml.PostUtf8(url, data); if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) @@ -384,6 +376,42 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms } else { + try + { + var jArr = JObject.Parse(html)["data"]; + var dbIdMapSpuIdLst = JsonHelper.DeserializeJsonToList(jArr.ToString()); + this.dgvMapDraftIds.Rows.Clear(); + if (dbIdMapSpuIdLst.Count > 0) + { + flag = false; + foreach (var item in dbIdMapSpuIdLst) + { + this.dgvMapDraftIds.Rows.Add( + false, + item.product_select_db_id, + item.shop_id, + item.product_id + ); + } + panel2.Visible = true; + } + } + catch (Exception ex) + { + BaseMsgForm.ShowError("获取商品Id列表失败 " + ex.Message); + } + } + + if (flag) + { + var shop = GetShop(shopId); + AdminShopLoginForm adminLoginForm = new AdminShopLoginForm(shop); + //adminLoginForm.InitUrl = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?productDraftId=" + + adminLoginForm.InitUrl = "https://agentseller.temu.com/goods/edit?productDraftId=" + + draftId + "&from=productDraftList"; + adminLoginForm.openType = EnumOpenType.manage; + adminLoginForm.WindowState = FormWindowState.Maximized; + adminLoginForm.ShowDialog(); } } break; @@ -1994,5 +2022,37 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms (cell as DataGridViewLinkCell).VisitedLinkColor = canUse ? Color.DarkGreen : Color.DarkRed; } } + + private void btnCloseDgvMapDraftIds_Click(object sender, EventArgs e) + { + panel2.Visible = false; + } + + private void dgvDraftIds_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex < 0 || e.RowIndex < 0) + return; + string headerText = dgvMapDraftIds.Columns[e.ColumnIndex].HeaderText; + var shopId = dgvMapDraftIds.Rows[e.RowIndex].Cells["colMapShopId"].Value.ParseToString(); + var draftId = dgvMapDraftIds.Rows[e.RowIndex].Cells["colMapDraftId"].Value.ParseToString(); + + switch (headerText) + { + case "已上传商品ID": + { + var shop = GetShop(shopId); + AdminShopLoginForm adminLoginForm = new AdminShopLoginForm(shop); + //adminLoginForm.InitUrl = "https://seller.kuajingmaihuo.com/goods/product-create/product-edit?productDraftId=" + + adminLoginForm.InitUrl = "https://agentseller.temu.com/goods/edit?productDraftId=" + + draftId + "&from=productDraftList"; + adminLoginForm.openType = EnumOpenType.manage; + adminLoginForm.WindowState = FormWindowState.Maximized; + adminLoginForm.ShowDialog(); + } + break; + default: + break; + } + } } } diff --git a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.resx b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.resx index 75d89cd..d07c987 100644 --- a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.resx +++ b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.resx @@ -126,7 +126,7 @@ True - + True diff --git a/TEMUKJD/KJDForms/ShopForms/ShopListForm.cs b/TEMUKJD/KJDForms/ShopForms/ShopListForm.cs index 4185aef..db3b80e 100644 --- a/TEMUKJD/KJDForms/ShopForms/ShopListForm.cs +++ b/TEMUKJD/KJDForms/ShopForms/ShopListForm.cs @@ -843,7 +843,7 @@ namespace TemuKJD.KJDForms.ShopForms } this.dgvShop.AddSelectorColumn("colSelect"); - this.chkAutoDrag.Checked = GlobalConfig.DouShopSettingParam.IsAutoDragLogin; + this.chkAutoDrag.Checked = GlobalConfig.TemuShopSettingParam.IsAutoDragLogin; this.splitContainer2.FixedPanel = FixedPanel.Panel2; //子账号 @@ -1166,22 +1166,22 @@ namespace TemuKJD.KJDForms.ShopForms private void chkAutoDrag_Click(object sender, EventArgs e) { - GlobalConfig.DouShopSettingParam.IsAutoDragLogin = chkAutoDrag.Checked; - StartUp.SaveDouShopSettingParam(); + GlobalConfig.TemuShopSettingParam.IsAutoDragLogin = chkAutoDrag.Checked; + StartUp.SaveTemuShopSettingParam(); foreach (var i in LstShopListFormInatance) { - if (i != null && i.chkAutoDrag.Checked != GlobalConfig.DouShopSettingParam.IsAutoDragLogin) + if (i != null && i.chkAutoDrag.Checked != GlobalConfig.TemuShopSettingParam.IsAutoDragLogin) { if (i.chkAutoDrag.InvokeRequired) { i.chkAutoDrag.Invoke(new Action(() => { - i.chkAutoDrag.Checked = GlobalConfig.DouShopSettingParam.IsAutoDragLogin; + i.chkAutoDrag.Checked = GlobalConfig.TemuShopSettingParam.IsAutoDragLogin; })); } else { - i.chkAutoDrag.Checked = GlobalConfig.DouShopSettingParam.IsAutoDragLogin; + i.chkAutoDrag.Checked = GlobalConfig.TemuShopSettingParam.IsAutoDragLogin; } } } diff --git a/TEMUKJD/KJDForms/ShopForms/ShopLoginForm.cs b/TEMUKJD/KJDForms/ShopForms/ShopLoginForm.cs index 8d901d8..6d10e56 100644 --- a/TEMUKJD/KJDForms/ShopForms/ShopLoginForm.cs +++ b/TEMUKJD/KJDForms/ShopForms/ShopLoginForm.cs @@ -1002,7 +1002,7 @@ function fireKeyEvent(el, evtType, keyCode) { int y = (int)Convert.ToDecimal(xyArr[1]) + 25; // 自动滑块图形验证 - if (GlobalConfig.DouShopSettingParam.IsAutoDragLogin) + if (GlobalConfig.TemuShopSettingParam.IsAutoDragLogin) { ShopLoginForm.CefMouseDragDou(cefWebBrowser, x, y, Convert.ToInt32((x + Stopxt * 340m / 552m) - 15), y); for (int i = 0; i < 1; i++) diff --git a/TEMUKJD/MainForm.cs b/TEMUKJD/MainForm.cs index b965bfc..005f685 100644 --- a/TEMUKJD/MainForm.cs +++ b/TEMUKJD/MainForm.cs @@ -302,7 +302,7 @@ namespace TemuKJD if (lastClear.AddSeconds(60) < DateTime.Now) { lastClear = DateTime.Now; - ClearMemory(); + //ClearMemory(); } #if DEBUG #else diff --git a/TEMUKJD/PDDForms/ShopForms/PDDShopListForm.cs b/TEMUKJD/PDDForms/ShopForms/PDDShopListForm.cs index 0cf11ae..5677afb 100644 --- a/TEMUKJD/PDDForms/ShopForms/PDDShopListForm.cs +++ b/TEMUKJD/PDDForms/ShopForms/PDDShopListForm.cs @@ -675,7 +675,7 @@ namespace TemuKJD.PDDForms.ShopForms } this.dgvShop.AddSelectorColumn("colSelect"); - this.chkAutoDrag.Checked = GlobalConfig.DouShopSettingParam.IsAutoDragLogin; + this.chkAutoDrag.Checked = GlobalConfig.TemuShopSettingParam.IsAutoDragLogin; this.splitContainer2.FixedPanel = FixedPanel.Panel2; //子账号 @@ -1028,22 +1028,22 @@ namespace TemuKJD.PDDForms.ShopForms private void chkAutoDrag_Click(object sender, EventArgs e) { - GlobalConfig.DouShopSettingParam.IsAutoDragLogin = chkAutoDrag.Checked; - StartUp.SaveDouShopSettingParam(); + GlobalConfig.TemuShopSettingParam.IsAutoDragLogin = chkAutoDrag.Checked; + StartUp.SaveTemuShopSettingParam(); foreach (var i in LstShopListFormInatance) { - if (i != null && i.chkAutoDrag.Checked != GlobalConfig.DouShopSettingParam.IsAutoDragLogin) + if (i != null && i.chkAutoDrag.Checked != GlobalConfig.TemuShopSettingParam.IsAutoDragLogin) { if (i.chkAutoDrag.InvokeRequired) { i.chkAutoDrag.Invoke(new Action(() => { - i.chkAutoDrag.Checked = GlobalConfig.DouShopSettingParam.IsAutoDragLogin; + i.chkAutoDrag.Checked = GlobalConfig.TemuShopSettingParam.IsAutoDragLogin; })); } else { - i.chkAutoDrag.Checked = GlobalConfig.DouShopSettingParam.IsAutoDragLogin; + i.chkAutoDrag.Checked = GlobalConfig.TemuShopSettingParam.IsAutoDragLogin; } } } diff --git a/TEMUKJD/PDDForms/ShopForms/PDDShopLoginForm.cs b/TEMUKJD/PDDForms/ShopForms/PDDShopLoginForm.cs index 56cf5b2..3422b32 100644 --- a/TEMUKJD/PDDForms/ShopForms/PDDShopLoginForm.cs +++ b/TEMUKJD/PDDForms/ShopForms/PDDShopLoginForm.cs @@ -916,7 +916,7 @@ function fireKeyEvent(el, evtType, keyCode) { int y = (int)Convert.ToDecimal(xyArr[1]) + 25; // 自动滑块图形验证 - if (GlobalConfig.DouShopSettingParam.IsAutoDragLogin) + if (GlobalConfig.TemuShopSettingParam.IsAutoDragLogin) { PDDShopLoginForm.CefMouseDragDou(cefWebBrowser, x, y, Convert.ToInt32((x + Stopxt * 340m / 552m) - 15), y); for (int i = 0; i < 1; i++) diff --git a/TEMUKJD/StartUp.cs b/TEMUKJD/StartUp.cs index 012e895..411b304 100644 --- a/TEMUKJD/StartUp.cs +++ b/TEMUKJD/StartUp.cs @@ -31,43 +31,54 @@ namespace TemuKJD public static void Init() { InitOem(); + InitProxy(); - GlobalConfig.ProductWords = NaiBa.Util.Helper.ConfigHelper.LoadConfig("product_words"); - if (GlobalConfig.ProductWords == null) - GlobalConfig.ProductWords = new TemuProductWords(); - + #region 抖音相关 -作废 #region 抖音账号登录信息 - try { GlobalConfig.DouUserCookies = NaiBa.Util.Helper.FileHelper.ReadAllText("data\\config\\dou_user_cookies")?.Trim('\"'); } catch { } - if (GlobalConfig.DouUserCookies == null) - GlobalConfig.DouUserCookies = ""; + //try { GlobalConfig.DouUserCookies = NaiBa.Util.Helper.FileHelper.ReadAllText("data\\config\\dou_user_cookies")?.Trim('\"'); } catch { } + //if (GlobalConfig.DouUserCookies == null) + // GlobalConfig.DouUserCookies = ""; - try { GlobalConfig.DouBuyinCookies = NaiBa.Util.Helper.FileHelper.ReadAllText("data\\config\\dou_buyin_cookies")?.Trim('\"'); } catch { } - if (GlobalConfig.DouBuyinCookies == null) - GlobalConfig.DouBuyinCookies = ""; + //try { GlobalConfig.DouBuyinCookies = NaiBa.Util.Helper.FileHelper.ReadAllText("data\\config\\dou_buyin_cookies")?.Trim('\"'); } catch { } + //if (GlobalConfig.DouBuyinCookies == null) + // GlobalConfig.DouBuyinCookies = ""; - GlobalConfig.dicLocalStorage = NaiBa.Util.Helper.ConfigHelper.LoadConfig>("dou_local_Storage"); - if (GlobalConfig.dicLocalStorage == null) - GlobalConfig.dicLocalStorage = new Dictionary(); + //GlobalConfig.dicLocalStorage = NaiBa.Util.Helper.ConfigHelper.LoadConfig>("dou_local_Storage"); + //if (GlobalConfig.dicLocalStorage == null) + // GlobalConfig.dicLocalStorage = new Dictionary(); #endregion - #region 获取抖音类目 - DyCategoryParam.DyCategorys = Properties.Resources.DyCategorys; + #region 抖音获取类目 + //DyCategoryParam.DyCategorys = Properties.Resources.DyCategorys; #endregion - #region 读取上传违规词 + #region 抖音读取上传违规词 //FilterForm.LoadFilterWord(); #endregion - #region 数据净化参数 - GlobalConfig.FissionSettingParam = NaiBa.Util.Helper.ConfigHelper.LoadConfig("fission_setting_param"); - if (GlobalConfig.FissionSettingParam == null) - { - GlobalConfig.FissionSettingParam = new FissionSettingParam(); - } + #region 抖音数据净化参数 + //GlobalConfig.FissionSettingParam = NaiBa.Util.Helper.ConfigHelper.LoadConfig("fission_setting_param"); + //if (GlobalConfig.FissionSettingParam == null) + //{ + // GlobalConfig.FissionSettingParam = new FissionSettingParam(); + //} #endregion - #region 店铺登录信息 + #region 抖音读取违规规则列表 + //var violateRuleNameSelectList = NaiBa.Util.Helper.ConfigHelper.LoadConfig>("violate_rule_name_select"); + //if (violateRuleNameSelectList != null) + // ViolateRuleParam.LstViolateRuleNameSelect = violateRuleNameSelectList; + #endregion + + #region 抖音旧店铺商品数据本地缓存 供重复铺货检测使用 + //GlobalConfig.SameProductCheckParamList = NaiBa.Util.Helper.ConfigHelper.LoadConfig>("same_product_check_list"); + //if (GlobalConfig.SameProductCheckParamList == null) + // GlobalConfig.SameProductCheckParamList = new List(); + #endregion + #endregion + + #region Temu店铺登录信息 Task.Run((Action)(() => { while (!BaseClass.IsLoginSuccess) @@ -78,30 +89,24 @@ namespace TemuKJD })); #endregion - #region 店铺设置参数 - GlobalConfig.DouShopSettingParam = NaiBa.Util.Helper.ConfigHelper.LoadConfig("dou_shop_setting_param"); - if (GlobalConfig.DouShopSettingParam == null) + #region Temu店铺登录设置参数 + GlobalConfig.TemuShopSettingParam = NaiBa.Util.Helper.ConfigHelper.LoadConfig("temu_shop_setting_param"); + if (GlobalConfig.TemuShopSettingParam == null) { - GlobalConfig.DouShopSettingParam = new DouShopSettingParam + GlobalConfig.TemuShopSettingParam = new TemuShopSettingParam { IsAutoDragLogin = false, }; } #endregion - #region 读取违规规则列表 - var violateRuleNameSelectList = NaiBa.Util.Helper.ConfigHelper.LoadConfig>("violate_rule_name_select"); - if (violateRuleNameSelectList != null) - ViolateRuleParam.LstViolateRuleNameSelect = violateRuleNameSelectList; + #region Temu读取上传标题头尾词 + GlobalConfig.ProductWords = NaiBa.Util.Helper.ConfigHelper.LoadConfig("product_words"); + if (GlobalConfig.ProductWords == null) + GlobalConfig.ProductWords = new TemuProductWords(); #endregion - #region 旧店铺商品数据本地缓存 供重复铺货检测使用 - GlobalConfig.SameProductCheckParamList = NaiBa.Util.Helper.ConfigHelper.LoadConfig>("same_product_check_list"); - if (GlobalConfig.SameProductCheckParamList == null) - GlobalConfig.SameProductCheckParamList = new List(); - #endregion - - #region 跨境达读取库存信息 + #region Temu读取退货库存信息 Task.Run(() => { while (!IsShopInit) @@ -151,14 +156,10 @@ namespace TemuKJD } } #endif -#if DEBUG for (int i = 0; i < 360; i++) { Thread.Sleep(10000); } -#else - Thread.Sleep(1000 * 3600); -#endif } }); #endregion @@ -179,7 +180,7 @@ namespace TemuKJD /// public static void InitOem() { -#region 代理版本获取代理码 + #region 代理版本获取代理码,暂时作废 if (FileBase.Exists("locales/ig.pak")) { BaseClass.AgentCode = FileBase.ReadAllText("locales/ig.pak"); @@ -350,67 +351,69 @@ namespace TemuKJD //} } } -#endregion - } - - public static void SaveFissionSettingParam() - { - NaiBa.Util.Helper.ConfigHelper.SaveConfig("fission_setting_param", GlobalConfig.FissionSettingParam); + #endregion } public static void SaveLocalShopLoginInfo() { - ConcurrentList shopLoginListCopy = - JsonHelper.DeserializeJsonToObject>(JsonHelper.SerializeObject(GlobalConfig.ShopLoginList)); - shopLoginListCopy.AddRange(GlobalConfig.DouShopLoginOtherUserShopList); - // 替换掉密码,cookie等敏感参数 - foreach (var shop in shopLoginListCopy) - { - shop.Password = ""; - shop.Cookies = ""; - } - NaiBa.Util.Helper.ConfigHelper.SaveConfig("dou_shop_login", shopLoginListCopy); + //ConcurrentList shopLoginListCopy = + // JsonHelper.DeserializeJsonToObject>(JsonHelper.SerializeObject(GlobalConfig.ShopLoginList)); + //shopLoginListCopy.AddRange(GlobalConfig.DouShopLoginOtherUserShopList); + //// 替换掉密码,cookie等敏感参数 + //foreach (var shop in shopLoginListCopy) + //{ + // shop.Password = ""; + // shop.Cookies = ""; + //} + //NaiBa.Util.Helper.ConfigHelper.SaveConfig("dou_shop_login", shopLoginListCopy); } - public static void SaveDouShopSettingParam() + public static void SaveTemuShopSettingParam() { - NaiBa.Util.Helper.ConfigHelper.SaveConfig("dou_shop_setting_param", GlobalConfig.DouShopSettingParam); - } - - /// - /// 保存抖音采集用户cookie - /// - public static void SaveDouUserCookies() - { - NaiBa.Util.Helper.ConfigHelper.SaveConfig("dou_user_cookies", GlobalConfig.DouUserCookies); - } - - public static void SaveDouBuyinCookies() - { - NaiBa.Util.Helper.ConfigHelper.SaveConfig("dou_buyin_cookies", GlobalConfig.DouBuyinCookies); - } - - public static void SaveDouLocalStorage() - { - if (GlobalConfig.dicLocalStorage != null) - NaiBa.Util.Helper.ConfigHelper.SaveConfig>("dou_local_Storage", GlobalConfig.dicLocalStorage); - } - - public static void SaveDouLocalDetailStorage() - { - if (GlobalConfig.dicLocalDetailStorage != null) - NaiBa.Util.Helper.ConfigHelper.SaveConfig>("dou_local_detail_Storage", GlobalConfig.dicLocalDetailStorage); - } - - public static void SaveViolateRuleNameSelectList() - { - if (ViolateRuleParam.LstViolateRuleNameSelect != null) - NaiBa.Util.Helper.ConfigHelper.SaveConfig>("violate_rule_name_select", ViolateRuleParam.LstViolateRuleNameSelect); + NaiBa.Util.Helper.ConfigHelper.SaveConfig("temu_shop_setting_param", GlobalConfig.TemuShopSettingParam); } public static void SaveProductWords() { NaiBa.Util.Helper.ConfigHelper.SaveConfig("product_words", GlobalConfig.ProductWords); } + + #region 暂时作废的函数 + //public static void SaveFissionSettingParam() + //{ + // NaiBa.Util.Helper.ConfigHelper.SaveConfig("fission_setting_param", GlobalConfig.FissionSettingParam); + //} + + ///// + ///// 保存抖音采集用户cookie + ///// + //public static void SaveDouUserCookies() + //{ + // NaiBa.Util.Helper.ConfigHelper.SaveConfig("dou_user_cookies", GlobalConfig.DouUserCookies); + //} + + //public static void SaveDouBuyinCookies() + //{ + // NaiBa.Util.Helper.ConfigHelper.SaveConfig("dou_buyin_cookies", GlobalConfig.DouBuyinCookies); + //} + + //public static void SaveDouLocalStorage() + //{ + // if (GlobalConfig.dicLocalStorage != null) + // NaiBa.Util.Helper.ConfigHelper.SaveConfig>("dou_local_Storage", GlobalConfig.dicLocalStorage); + //} + + //public static void SaveDouLocalDetailStorage() + //{ + // if (GlobalConfig.dicLocalDetailStorage != null) + // NaiBa.Util.Helper.ConfigHelper.SaveConfig>("dou_local_detail_Storage", GlobalConfig.dicLocalDetailStorage); + //} + + //public static void SaveViolateRuleNameSelectList() + //{ + // if (ViolateRuleParam.LstViolateRuleNameSelect != null) + // NaiBa.Util.Helper.ConfigHelper.SaveConfig>("violate_rule_name_select", ViolateRuleParam.LstViolateRuleNameSelect); + //} + #endregion } } diff --git a/TEMUKJD/ToolForms/DouBaoImgCefForm.Designer.cs b/TEMUKJD/ToolForms/DouBaoImgCefForm.Designer.cs index 2823bcc..2da78fb 100644 --- a/TEMUKJD/ToolForms/DouBaoImgCefForm.Designer.cs +++ b/TEMUKJD/ToolForms/DouBaoImgCefForm.Designer.cs @@ -41,6 +41,7 @@ namespace TemuKJD.ToolForms this.textBox1 = new System.Windows.Forms.TextBox(); this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.splitContainer3 = new System.Windows.Forms.SplitContainer(); + this.txtShopId = new System.Windows.Forms.TextBox(); this.txtYSize = new System.Windows.Forms.TextBox(); this.txtXSize = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); @@ -49,6 +50,8 @@ namespace TemuKJD.ToolForms this.txtXPos = new System.Windows.Forms.TextBox(); this.pbLoading2 = new System.Windows.Forms.PictureBox(); this.ucImgChange1 = new TemuKJD.ToolForms.UcSkuImgItem(); + this.txtSpuId = new System.Windows.Forms.TextBox(); + this.txtSkcId = new System.Windows.Forms.TextBox(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -113,9 +116,9 @@ namespace TemuKJD.ToolForms // this.txtUrl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtUrl.Location = new System.Drawing.Point(3, 4); + this.txtUrl.Location = new System.Drawing.Point(0, 4); this.txtUrl.Name = "txtUrl"; - this.txtUrl.Size = new System.Drawing.Size(1108, 23); + this.txtUrl.Size = new System.Drawing.Size(1111, 23); this.txtUrl.TabIndex = 0; // // splitContainer4 @@ -229,12 +232,15 @@ namespace TemuKJD.ToolForms // // splitContainer3.Panel1 // + this.splitContainer3.Panel1.Controls.Add(this.txtSkcId); + this.splitContainer3.Panel1.Controls.Add(this.txtSpuId); + this.splitContainer3.Panel1.Controls.Add(this.txtShopId); this.splitContainer3.Panel1.Controls.Add(this.txtYSize); this.splitContainer3.Panel1.Controls.Add(this.txtXSize); - this.splitContainer3.Panel1.Controls.Add(this.label2); - this.splitContainer3.Panel1.Controls.Add(this.label1); this.splitContainer3.Panel1.Controls.Add(this.txtYPos); this.splitContainer3.Panel1.Controls.Add(this.txtXPos); + this.splitContainer3.Panel1.Controls.Add(this.label2); + this.splitContainer3.Panel1.Controls.Add(this.label1); // // splitContainer3.Panel2 // @@ -242,56 +248,70 @@ namespace TemuKJD.ToolForms this.splitContainer3.Panel2.Controls.Add(this.pbLoading2); this.splitContainer3.Panel2.Controls.Add(this.ucImgChange1); this.splitContainer3.Size = new System.Drawing.Size(184, 534); - this.splitContainer3.SplitterDistance = 61; + this.splitContainer3.SplitterDistance = 76; this.splitContainer3.TabIndex = 0; // + // txtShopId + // + this.txtShopId.Font = new System.Drawing.Font("微软雅黑", 8F); + this.txtShopId.Location = new System.Drawing.Point(4, 4); + this.txtShopId.Name = "txtShopId"; + this.txtShopId.Size = new System.Drawing.Size(178, 22); + this.txtShopId.TabIndex = 16; + // // txtYSize // - this.txtYSize.Location = new System.Drawing.Point(120, 31); + this.txtYSize.Font = new System.Drawing.Font("微软雅黑", 8F); + this.txtYSize.Location = new System.Drawing.Point(155, 52); this.txtYSize.Name = "txtYSize"; - this.txtYSize.Size = new System.Drawing.Size(42, 23); + this.txtYSize.Size = new System.Drawing.Size(26, 22); this.txtYSize.TabIndex = 14; this.txtYSize.Text = "50"; // // txtXSize // - this.txtXSize.Location = new System.Drawing.Point(72, 31); + this.txtXSize.Font = new System.Drawing.Font("微软雅黑", 8F); + this.txtXSize.Location = new System.Drawing.Point(129, 52); this.txtXSize.Name = "txtXSize"; - this.txtXSize.Size = new System.Drawing.Size(42, 23); + this.txtXSize.Size = new System.Drawing.Size(26, 22); this.txtXSize.TabIndex = 13; this.txtXSize.Text = "120"; // // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(12, 34); + this.label2.Font = new System.Drawing.Font("微软雅黑", 8F); + this.label2.Location = new System.Drawing.Point(102, 55); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(56, 17); + this.label2.Size = new System.Drawing.Size(29, 16); this.label2.TabIndex = 12; - this.label2.Text = "打码尺寸"; + this.label2.Text = "尺寸"; // // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(12, 9); + this.label1.Font = new System.Drawing.Font("微软雅黑", 8F); + this.label1.Location = new System.Drawing.Point(1, 55); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(56, 17); + this.label1.Size = new System.Drawing.Size(51, 16); this.label1.TabIndex = 11; this.label1.Text = "打码坐标"; // // txtYPos // - this.txtYPos.Location = new System.Drawing.Point(120, 6); + this.txtYPos.Font = new System.Drawing.Font("微软雅黑", 8F); + this.txtYPos.Location = new System.Drawing.Point(76, 52); this.txtYPos.Name = "txtYPos"; - this.txtYPos.Size = new System.Drawing.Size(42, 23); + this.txtYPos.Size = new System.Drawing.Size(26, 22); this.txtYPos.TabIndex = 10; this.txtYPos.Text = "740"; // // txtXPos // - this.txtXPos.Location = new System.Drawing.Point(72, 6); + this.txtXPos.Font = new System.Drawing.Font("微软雅黑", 8F); + this.txtXPos.Location = new System.Drawing.Point(50, 52); this.txtXPos.Name = "txtXPos"; - this.txtXPos.Size = new System.Drawing.Size(42, 23); + this.txtXPos.Size = new System.Drawing.Size(26, 22); this.txtXPos.TabIndex = 9; this.txtXPos.Text = "670"; // @@ -299,7 +319,7 @@ namespace TemuKJD.ToolForms // this.pbLoading2.Anchor = System.Windows.Forms.AnchorStyles.None; this.pbLoading2.Image = global::TemuKJD.Properties.Resources.loading_blue; - this.pbLoading2.Location = new System.Drawing.Point(67, 209); + this.pbLoading2.Location = new System.Drawing.Point(67, 204); this.pbLoading2.Name = "pbLoading2"; this.pbLoading2.Size = new System.Drawing.Size(50, 50); this.pbLoading2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; @@ -317,6 +337,22 @@ namespace TemuKJD.ToolForms this.ucImgChange1.Size = new System.Drawing.Size(184, 148); this.ucImgChange1.TabIndex = 0; // + // txtSpuId + // + this.txtSpuId.Font = new System.Drawing.Font("微软雅黑", 8F); + this.txtSpuId.Location = new System.Drawing.Point(4, 28); + this.txtSpuId.Name = "txtSpuId"; + this.txtSpuId.Size = new System.Drawing.Size(88, 22); + this.txtSpuId.TabIndex = 17; + // + // txtSkcId + // + this.txtSkcId.Font = new System.Drawing.Font("微软雅黑", 8F); + this.txtSkcId.Location = new System.Drawing.Point(93, 28); + this.txtSkcId.Name = "txtSkcId"; + this.txtSkcId.Size = new System.Drawing.Size(88, 22); + this.txtSkcId.TabIndex = 18; + // // DouBaoImgCefForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -378,5 +414,8 @@ namespace TemuKJD.ToolForms private System.Windows.Forms.TextBox textBox1; private DevComponents.DotNetBar.PanelEx pnlMsg; private System.Windows.Forms.Label lblMsg; + private System.Windows.Forms.TextBox txtShopId; + private System.Windows.Forms.TextBox txtSkcId; + private System.Windows.Forms.TextBox txtSpuId; } } \ No newline at end of file diff --git a/TEMUKJD/ToolForms/DouBaoImgCefForm.cs b/TEMUKJD/ToolForms/DouBaoImgCefForm.cs index b65f7b1..924abef 100644 --- a/TEMUKJD/ToolForms/DouBaoImgCefForm.cs +++ b/TEMUKJD/ToolForms/DouBaoImgCefForm.cs @@ -45,6 +45,8 @@ namespace TemuKJD.ToolForms this.Width = Math.Min(1600, Screen.PrimaryScreen.Bounds.Width); this.Height = Math.Min(900, Screen.PrimaryScreen.Bounds.Height); this.StartPosition = FormStartPosition.CenterScreen; + + } private void DouBaoCefForm_Load(object sender, EventArgs e) @@ -77,8 +79,11 @@ namespace TemuKJD.ToolForms var prodInfo = JsonHelper.DeserializeJsonToObject(dbProd.product_json); var ucImgChangeList = new List(); this.TitleText = "豆包生成SKU图 主店ID:" + prodInfo.supplierId.ParseToString() + " SKC:" + prodInfo.productSkcList.FirstOrDefault()?.productSkcId + - " SKU:" + prodInfo.productId + " 名称:" + prodInfo.productName; - foreach(var sku in prodInfo.productSkcList[0].productSkuList) + " SPU:" + prodInfo.productId + " 名称:" + prodInfo.productName; + this.txtShopId.Text = "主店ID:" + prodInfo.supplierId.ParseToString(); + this.txtSpuId.Text = "SPU:" + prodInfo.productId.ParseToString(); + this.txtSkcId.Text = "SKC:" + prodInfo.productSkcList.FirstOrDefault()?.productSkcId.ParseToString(); + foreach (var sku in prodInfo.productSkcList[0].productSkuList) { var imgUrl = sku.thumbUrl.Replace("https://", "http://"); if (!ucImgChangeList.Any(p=>p.pbSkuOriginalImg.ImageLocation == imgUrl)) diff --git a/TEMUKJD/UserControls/UcSplitPage.Designer.cs b/TEMUKJD/UserControls/UcSplitPage.Designer.cs index c66ba87..d6c28b4 100644 --- a/TEMUKJD/UserControls/UcSplitPage.Designer.cs +++ b/TEMUKJD/UserControls/UcSplitPage.Designer.cs @@ -286,6 +286,6 @@ namespace TemuKJD.UserControls private DevComponents.DotNetBar.Controls.TextBoxX txtJumpPage; private System.Windows.Forms.Label lblTotal; private System.Windows.Forms.Label lblPageSize; - private System.Windows.Forms.ComboBox cmbPageSize; + public System.Windows.Forms.ComboBox cmbPageSize; } } diff --git a/Work/Initialization.cs b/Work/Initialization.cs index 9ba8966..ae6d476 100644 --- a/Work/Initialization.cs +++ b/Work/Initialization.cs @@ -96,19 +96,18 @@ offCountPara,false;offProductPara,100;IrregularitiesPara,true;noNeerPara,true;no Task.Run(() => { GetAuthConfig(); InitProgress(1); }); Task.Run(() => { CheckFiles(); IsCheckFilesFinish = true; InitProgress(2); }); //Task.Run(() => { CheckUpdataFile(); }); - Task.Run(() => { new Segment().GetWord(); InitProgress(1); }); - //Task.Run(() => { new PinduoduoCatList().Get(); InitProgress(1); }); // pdd cat + //Task.Run(() => { new Segment().GetWord(); InitProgress(1); }); // 奇奇科技? + //Task.Run(() => { new PinduoduoCatList().Get(); InitProgress(1); }); // pdd cate Task.Run(() => { GetMacCode(); InitProgress(1); }); #if DEBUG - if (!File.Exists(System.Environment.CurrentDirectory + "\\TemuKJD.exe.choice.debug.tools")) - Task.Run(() => { new CheckHecker().Check(); InitProgress(2); }); // 防止破解 + if (!File.Exists(System.Environment.CurrentDirectory + "\\TemuKJD.exe.choice.debug.tools")) Task.Run(() => { new CheckHecker().Check(); InitProgress(2); }); // 防止破解 #else Task.Run(() => { new CheckHecker().Check(); InitProgress(2); }); // 防止破解 #endif - Task.Run(() => { PinduoduoProductCollect.GetServerCookies(); InitProgress(2); }); - Task.Run(() => { new LoadCloudData().Get(); InitProgress(2); }); // 加载云数据 - Task.Run(() => { new BigDataBuild("").Ini(); InitProgress(2); }); // 加载云数据 - new FromTitleToCat(); + Task.Run(() => { /*PinduoduoProductCollect.GetServerCookies();*/ InitProgress(2); }); + Task.Run(() => { /*new LoadCloudData().Get();*/ InitProgress(2); }); // 加载云数据 + Task.Run(() => { /*new BigDataBuild("").Ini();*/ InitProgress(2); }); // 加载云数据 + Task.Run(() => { new FromTitleToCat(); InitProgress(2); }); InitProgress(1); if (!File.Exists(ConfigFilePach)) @@ -231,7 +230,7 @@ offCountPara,false;offProductPara,100;IrregularitiesPara,true;noNeerPara,true;no } InitProgress(1); - Task.Run(() => { GetPublicIp(); InitProgress(1); }); + Task.Run(() => { /*GetPublicIp();*/ InitProgress(1); }); } public static void GetPublicIp() diff --git a/Work/UserLogin.cs b/Work/UserLogin.cs index 642c912..9797a27 100644 --- a/Work/UserLogin.cs +++ b/Work/UserLogin.cs @@ -90,6 +90,8 @@ namespace Work BaseClass.UserVersionString = BaseRegex.GetStringJson(ref html, "version_s"); BaseClass.CompanyId = BaseRegex.GetStringJson(ref html, "company_Id").ParseToInt(); BaseClass.GroupId = BaseRegex.GetStringJson(ref html, "group_id").ParseToInt(); + BaseClass.AuthorizedAmount = BaseRegex.GetNullableDecimalJson(ref html, "authorized_amount"); + //BaseClass.Balance = BaseRegex.GetStringJson(ref html, "balance").ParseToInt(); //BaseClass.DarenYaoyue = BaseRegex.GetStringJson(ref html, "daren_group") == "1"; //BaseClass.DyProductCollect = BaseRegex.GetStringJson(ref html, "show_collect") == "1";