From 17e4dc4a3cf6045fd4146348deca745c277322c2 Mon Sep 17 00:00:00 2001 From: wule Date: Fri, 26 Dec 2025 09:53:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=96=E9=9F=B3=E5=B0=8F=E5=BA=97=E5=87=86?= =?UTF-8?q?=E5=A4=87=E9=98=B6=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AllBase/BaseClass.cs | 2 +- .../Model/Result/TemuCategoryTemplateInfo.cs | 8 +- .../KJD_WebService/BLL/DYXD/DYShopManage.cs | 816 ++++++++++++++++++ .../KJD_WebService/BLL/DYXD/DYUserManage.cs | 470 ++++++++++ .../KJD_WebService/BLL/KJD/ProductManage.cs | 17 +- .../BLL/KJD/ProductThirdManage.cs | 56 ++ .../KJD_WebService/KJD_WebService.csproj | 2 + .../ProductThirdService.asmx.cs | 12 + TEMUKJD/BLL/AuthorBLL.cs | 18 + TEMUKJD/BLL/ProductSelectBLL.cs | 2 +- TEMUKJD/BLL/ShopBLL.cs | 1 - .../AdminForms/DYAdminAccountForm.Designer.cs | 661 ++++++++++++++ .../DYForms/AdminForms/DYAdminAccountForm.cs | 277 ++++++ .../AdminForms/DYAdminAccountForm.resx | 153 ++++ .../AdminForms/DYAdminForm.Designer.cs | 193 +++++ TEMUKJD/DYForms/AdminForms/DYAdminForm.cs | 160 ++++ TEMUKJD/DYForms/AdminForms/DYAdminForm.resx | 120 +++ .../DYAdminShopAddSubSaForm.Designer.cs | 195 +++++ .../AdminForms/DYAdminShopAddSubSaForm.cs | 122 +++ .../AdminForms/DYAdminShopAddSubSaForm.resx | 310 +++++++ TEMUKJD/InitForm.Designer.cs | 48 +- TEMUKJD/InitForm.cs | 9 +- TEMUKJD/KJD.csproj | 41 +- TEMUKJD/KJDForms/AdminForms/AdminForm.cs | 5 +- .../AdminForms/AdminProductPriceCheckForm.cs | 10 +- .../KJDForms/AdminForms/AdminShopListForm.cs | 2 +- TEMUKJD/KJDForms/JITForms/JITForm.cs | 5 +- .../ProductForms/JoinDeliveryForm.Designer.cs | 98 ++- .../KJDForms/ProductForms/JoinDeliveryForm.cs | 23 +- .../ProductForms/PriceManageForm.Designer.cs | 207 +++-- .../KJDForms/ProductForms/PriceManageForm.cs | 23 +- TEMUKJD/KJDForms/ProductForms/ProductForm.cs | 7 +- .../ProductForms/SaleStockUpForm.Designer.cs | 719 ++------------- .../KJDForms/ProductForms/SaleStockUpForm.cs | 25 +- .../ProductForms/TemuAdsForm.Designer.cs | 159 ++-- TEMUKJD/KJDForms/ProductForms/TemuAdsForm.cs | 33 +- .../DbProductCategorySearch.cs | 6 +- .../DbProductEditDetailForm.Designer.cs | 155 +++- .../DbProductEditDetailForm.cs | 269 +++++- .../ProductSelectForms/DbProductListForm.cs | 33 +- .../DbProductSelectEditNotesForm.Designer.cs | 46 +- .../DbProductSelectEditNotesForm.cs | 36 +- .../DbProductSelectListManageForm.Designer.cs | 39 +- .../DbProductSelectListManageForm.cs | 46 +- .../DbProductUserSelectEditNotesForm.cs | 10 +- .../ProductSelectForms/UcPropEdit.Designer.cs | 100 +++ .../KJDForms/ProductSelectForms/UcPropEdit.cs | 20 + .../ProductSelectForms/UcPropEdit.resx | 120 +++ .../ProductThirdSelectAddShopForm.cs | 3 + ...oductThirdSelectListManageForm.Designer.cs | 26 +- .../ProductThirdSelectListManageForm.cs | 19 +- .../ProductThirdUserSelectForm.cs | 2 +- .../MarketingActivityForm.Designer.cs | 195 +++-- .../SalesCenterForms/MarketingActivityForm.cs | 23 +- TEMUKJD/KJDForms/ShopForms/ShopListForm.cs | 35 +- TEMUKJD/MainForm.cs | 11 +- .../PDDDBProdUserSelectEditNotesForm.cs | 10 +- TEMUKJD/StartUp.cs | 1 - .../ToolForms/UcSkuImgListItem.Designer.cs | 43 +- Work/DouyinApiClass/DouyinApi.cs | 401 --------- Work/Work.csproj | 1 - 61 files changed, 5154 insertions(+), 1505 deletions(-) create mode 100644 KJDService/KJD_WebService/BLL/DYXD/DYShopManage.cs create mode 100644 KJDService/KJD_WebService/BLL/DYXD/DYUserManage.cs create mode 100644 TEMUKJD/BLL/AuthorBLL.cs create mode 100644 TEMUKJD/DYForms/AdminForms/DYAdminAccountForm.Designer.cs create mode 100644 TEMUKJD/DYForms/AdminForms/DYAdminAccountForm.cs create mode 100644 TEMUKJD/DYForms/AdminForms/DYAdminAccountForm.resx create mode 100644 TEMUKJD/DYForms/AdminForms/DYAdminForm.Designer.cs create mode 100644 TEMUKJD/DYForms/AdminForms/DYAdminForm.cs create mode 100644 TEMUKJD/DYForms/AdminForms/DYAdminForm.resx create mode 100644 TEMUKJD/DYForms/AdminForms/DYAdminShopAddSubSaForm.Designer.cs create mode 100644 TEMUKJD/DYForms/AdminForms/DYAdminShopAddSubSaForm.cs create mode 100644 TEMUKJD/DYForms/AdminForms/DYAdminShopAddSubSaForm.resx create mode 100644 TEMUKJD/KJDForms/ProductSelectForms/UcPropEdit.Designer.cs create mode 100644 TEMUKJD/KJDForms/ProductSelectForms/UcPropEdit.cs create mode 100644 TEMUKJD/KJDForms/ProductSelectForms/UcPropEdit.resx delete mode 100644 Work/DouyinApiClass/DouyinApi.cs diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs index ff71290..d75eab8 100644 --- a/AllBase/BaseClass.cs +++ b/AllBase/BaseClass.cs @@ -27,7 +27,7 @@ namespace AllBase /// /// 版本ID /// - public static int VersionCount = 755; + public static int VersionCount = 760; //public static int VersionCount = 613; /// diff --git a/AllBase/Model/Result/TemuCategoryTemplateInfo.cs b/AllBase/Model/Result/TemuCategoryTemplateInfo.cs index 6c64d89..f0f2ce1 100644 --- a/AllBase/Model/Result/TemuCategoryTemplateInfo.cs +++ b/AllBase/Model/Result/TemuCategoryTemplateInfo.cs @@ -45,7 +45,13 @@ namespace AllBase.Model.Result public object noteImgUrl { get; set; } public int? parentTemplatePid { get; set; } public object referenceType { get; set; } - public object templatePropertyValueParentList { get; set; } + public List templatePropertyValueParentList { get; set; } + } + + public class templatePropertyValueParent + { + public List vidList { get; set; } // [329529,329531,329530] + public List parentVidList { get; set; } // [31113] } public class TemuCategoryTemplateValue diff --git a/KJDService/KJD_WebService/BLL/DYXD/DYShopManage.cs b/KJDService/KJD_WebService/BLL/DYXD/DYShopManage.cs new file mode 100644 index 0000000..435240b --- /dev/null +++ b/KJDService/KJD_WebService/BLL/DYXD/DYShopManage.cs @@ -0,0 +1,816 @@ +using KJD_Web.Model; +using KJD_Web.Model.ShopModel; +using KJD_Web.Utils; +using MySqlX.XDevAPI; +using NaiBa.Util.Extension; +using System; +using System.Collections.Generic; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Web; +using System.Web.Security; + +namespace KJD_Web.BLL.DYXD +{ + public class DYShopManage + { + public string GetShop(string inputData, bool isAdmin = false) + { + if (!string.IsNullOrEmpty(inputData)) + { + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); + var password = RegexUtils.GetStringQuery(ref inputData, "password"); + var search_id = RegexUtils.GetStringQuery(ref inputData, "search_id"); + var search_user_name = RegexUtils.GetStringQuery(ref inputData, "search_user_name"); + var search_login_name = RegexUtils.GetStringQuery(ref inputData, "search_login_name"); + var search_notes = RegexUtils.GetStringQuery(ref inputData, "search_notes"); + var search_name = RegexUtils.GetStringQuery(ref inputData, "search_name"); + var operate_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "operate_sub_sa_name")?.Replace("'", "\\'"); + var shop_ids = RegexUtils.GetStringQuery(ref inputData, "shop_ids")?.Replace("'", ""); + if (!string.IsNullOrWhiteSpace(shop_ids)) + { + List shopIdLst = shop_ids.Split(',').ToList(); + shop_ids = "'" + string.Join("','", shopIdLst) + "'"; + } + var shop_names = RegexUtils.GetStringQuery(ref inputData, "shop_names"); + if (!string.IsNullOrWhiteSpace(shop_names)) + { + List shopNameLst = shop_names.Split(',').ToList(); + shop_names = "'" + string.Join("','", shopNameLst) + "'"; + } + var shop_notes = RegexUtils.GetStringQuery(ref inputData, "shop_notes"); + if (!string.IsNullOrWhiteSpace(shop_notes)) + { + List shopNotesLst = shop_notes.Split(',').ToList(); + shop_notes = "'" + string.Join("','", shopNotesLst) + "'"; + } + + var page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); + var page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(); + + if (page_size == 0) + page_size = 50; + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + + string sql = "SELECT COUNT(s.id) FROM dyxd.shop s WHERE 1=1"; + + //where子句 + string where = ""; + if (isAdmin) + where += " and (s.cookie='' or s.shop_id!='')"; + if (!isAdmin) + where += " and (s.user_name='" + user_name + "' or s.sub_user_name like '%" + user_name + "%')"; + if (!string.IsNullOrWhiteSpace(operate_sub_sa_name)) + where += " and s.operate_sub_sa_name='" + operate_sub_sa_name + "'"; + if (!string.IsNullOrWhiteSpace(search_user_name)) + where += " and s.user_name like '%" + search_user_name + "%'"; + if (!string.IsNullOrWhiteSpace(search_login_name)) + where += " and s.login_name like '%" + search_login_name + "%'"; + if (!string.IsNullOrWhiteSpace(search_notes)) + where += " and s.notes like '%" + search_notes + "%'"; + if (!string.IsNullOrWhiteSpace(search_id)) + where += " and s.shop_id like '%" + search_id + "%'"; + if (!string.IsNullOrWhiteSpace(search_name)) + where += " and s.shop_account like '%" + search_name + "%'"; + if (!string.IsNullOrWhiteSpace(shop_ids)) + where += " and s.shop_id in (" + shop_ids + ")"; + if (!string.IsNullOrWhiteSpace(shop_names)) + where += " and s.shop_account in (" + shop_names + ")"; + if (!string.IsNullOrWhiteSpace(shop_notes)) + where += " and s.notes in (" + shop_notes + ")"; + sql += where; + + var count = mySql.ExecuteRowCount(sql); + + DataTable dt; + if (count == 0) + { + dt = new DataTable(); + } + else + { + sql = "SELECT s.id,s.login_name,s.login_pass,s.cookie,s.cookie2,s.anti_contents,s.pddid,s.shop_id,s.shop_account,s.sub_user_name," + + "s.user_name,s.company_name,s.notes,s.login_status,s.login_status2,c.add_product_remaining,c.add_product_month," + + "s.add_time,s.mdy_time,s.add_sub_sa_time,s.operate_sub_sa_name"; + //sql += " FROM dyxd.shop s WHERE 1=1"; + sql += " FROM dyxd.shop s LEFT JOIN dyxd.shop_add_prod_count c ON s.shop_id=c.shop_id WHERE 1=1"; + + sql += where; // where 子句 + + sql += " ORDER BY s.id DESC"; + sql += " LIMIT " + Math.Max(page - 1, 0) * page_size + "," + page_size; + dt = mySql.ExecuteDataTable(sql); + } + + mySql.Close(); + if (dt != null) + { + List shopList=new List(); + foreach (DataRow row in dt.Rows) + { + ShopParam shop = new ShopParam + { + id = Convert.ToInt32(row["id"]), + login_name = row["login_name"].ToString(), + login_pass = row["login_pass"].ToString(), + cookie = row["cookie"].ToString(), + cookie2 = row["cookie2"].ToString(), + anti_contents = row["anti_contents"].ToString(), + shop_id = row["shop_id"].ToString(), + shop_account = row["shop_account"].ToString(), + sub_user_name = row["sub_user_name"].ToString(), + user_name = row["user_name"].ToString(), + company_name = row["company_name"].ToString(), + notes = row["notes"].ToString(), + login_status = row["login_status"].ToString(), + login_status2 = row["login_status2"].ToString(), + add_product_remaining = row["add_product_remaining"].ParseToInt(), + add_product_month = row["add_product_month"].ParseToInt(), + operate_sub_sa_name = row["operate_sub_sa_name"].ParseToString(), + pddid = row["pddid"].ParseToString(), + }; + shopList.Add(shop); + } + + //sql = "\r\nINSERT INTO dyxd.shop_add_prod_count(shop_id,shop_account,add_product_remaining,add_product_month) VALUES "; + //foreach (var shop in shopList) + //{ + // sql += "\r\n('" + shop.shop_id + "','" + shop.shop_account + "'," + shop.add_product_remaining + "," + shop.add_product_month + "),"; + //} + //sql = sql.TrimEnd(',') + " \r\n"; + //sql += "ON DUPLICATE KEY UPDATE " + + // "shop_account=VALUES(shop_account)," + + // "add_product_remaining=VALUES(add_product_remaining)," + + // "add_product_month=VALUES(add_product_month);"; + //var result = mySql.ExecuteNonQuery(sql); + //mySql.Close(); + + int month = DateTime.Now.Month; + var shopMonthList = shopList.Where(s => s.add_product_month != month); + if (shopMonthList.Count() > 0) + { + int remainCount = 300; + var shopMonthIdList = shopMonthList.Select(s => s.id); + mySql = new MysqlUtils(conn); + string ids = string.Join(",", shopMonthIdList); + sql = ""; + sql += "update dyxd.shop set add_product_remaining=" + remainCount + ", add_product_month=" + month + + " where 1=1 and id in (" + ids + ");"; + + sql += "\r\nINSERT INTO dyxd.shop_add_prod_count(shop_id,shop_account,add_product_remaining,add_product_month) VALUES "; + foreach (var shop in shopMonthList) + { + sql+= "\r\n('" + shop.shop_id + "','" + shop.shop_account + "'," + remainCount + "," + month + "),"; + } + sql = sql.TrimEnd(',') + " \r\n"; + sql += "ON DUPLICATE KEY UPDATE " + + "shop_account=VALUES(shop_account)," + + "add_product_remaining=VALUES(add_product_remaining)," + + "add_product_month=VALUES(add_product_month);"; + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + + if (rst) + { + foreach (var shop in shopMonthList) + { + shop.add_product_month = month; + shop.add_product_remaining = remainCount; + } + } + } + var data = JsonUtils.SerializerObjectToString(shopList); + + + //return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; + return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; + } + } + return "{\"code\":19999,\"msg\":\"未知错误\"}"; + } + + public string SubSaGetSelectProdShop(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); + var password = RegexUtils.GetStringQuery(ref inputData, "password"); + var search_id = RegexUtils.GetStringQuery(ref inputData, "search_id"); + var search_user_name = RegexUtils.GetStringQuery(ref inputData, "search_user_name"); + var search_login_name = RegexUtils.GetStringQuery(ref inputData, "search_login_name"); + var search_notes = RegexUtils.GetStringQuery(ref inputData, "search_notes"); + var search_name = RegexUtils.GetStringQuery(ref inputData, "search_name"); + var operate_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "operate_sub_sa_name")?.Replace("'", "\\'"); + var shop_ids = RegexUtils.GetStringQuery(ref inputData, "shop_ids")?.Replace("'", ""); + if (!string.IsNullOrWhiteSpace(shop_ids)) + { + List shopIdLst = shop_ids.Split(',').ToList(); + shop_ids = "'" + string.Join("','", shopIdLst) + "'"; + } + var shop_names = RegexUtils.GetStringQuery(ref inputData, "shop_names"); + if (!string.IsNullOrWhiteSpace(shop_names)) + { + List shopNameLst = shop_names.Split(',').ToList(); + shop_names = "'" + string.Join("','", shopNameLst) + "'"; + } + var shop_notes = RegexUtils.GetStringQuery(ref inputData, "shop_notes"); + if (!string.IsNullOrWhiteSpace(shop_notes)) + { + List shopNotesLst = shop_notes.Split(',').ToList(); + shop_notes = "'" + string.Join("','", shopNotesLst) + "'"; + } + + var page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); + var page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(); + + if (page_size == 0) + page_size = 50; + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + + string sql = "SELECT COUNT(s.id) FROM dyxd.shop s WHERE 1=1"; + + //where子句 + string where = ""; + if (!string.IsNullOrWhiteSpace(operate_sub_sa_name)) + where += " and (s.shop_id in (SELECT DISTINCT shop_id From dyxd.product_select WHERE operate_sub_sa_name='" + operate_sub_sa_name + "') or " + + "s.shop_id in (SELECT DISTINCT shop_id From dyxd.third_product_select WHERE operate_sub_sa_name='" + operate_sub_sa_name + "'))"; + where += " and (s.cookie='' or s.shop_id!='')"; + //if (!string.IsNullOrWhiteSpace(operate_sub_sa_name)) + // where += " and s.operate_sub_sa_name='" + operate_sub_sa_name + "'"; + if (!string.IsNullOrWhiteSpace(search_user_name)) + where += " and s.user_name like '%" + search_user_name + "%'"; + if (!string.IsNullOrWhiteSpace(search_login_name)) + where += " and s.login_name like '%" + search_login_name + "%'"; + if (!string.IsNullOrWhiteSpace(search_notes)) + where += " and s.notes like '%" + search_notes + "%'"; + if (!string.IsNullOrWhiteSpace(search_id)) + where += " and s.shop_id like '%" + search_id + "%'"; + if (!string.IsNullOrWhiteSpace(search_name)) + where += " and s.shop_account like '%" + search_name + "%'"; + if (!string.IsNullOrWhiteSpace(shop_ids)) + where += " and s.shop_id in (" + shop_ids + ")"; + if (!string.IsNullOrWhiteSpace(shop_names)) + where += " and s.shop_account in (" + shop_names + ")"; + if (!string.IsNullOrWhiteSpace(shop_notes)) + where += " and s.notes in (" + shop_notes + ")"; + sql += where; + + var count = mySql.ExecuteRowCount(sql); + + DataTable dt; + if (count == 0) + { + dt = new DataTable(); + } + else + { + sql = "SELECT s.id,s.login_name,s.login_pass,s.cookie,s.cookie2,s.anti_contents,s.shop_id,s.shop_account,s.sub_user_name,s.user_name," + + "s.company_name,s.notes,s.login_status,s.login_status2,c.add_product_remaining,c.add_product_month,s.add_time,s.mdy_time," + + "s.add_sub_sa_time,s.operate_sub_sa_name"; + sql += " FROM dyxd.shop s LEFT JOIN dyxd.shop_add_prod_count c ON s.shop_id=c.shop_id WHERE 1=1"; + + sql += where; // where 子句 + + sql += " ORDER BY s.id DESC"; + sql += " LIMIT " + Math.Max(page - 1, 0) * page_size + "," + page_size; + dt = mySql.ExecuteDataTable(sql); + } + + mySql.Close(); + if (dt != null) + { + List shopList = new List(); + foreach (DataRow row in dt.Rows) + { + ShopParam shop = new ShopParam + { + id = Convert.ToInt32(row["id"]), + login_name = row["login_name"].ToString(), + login_pass = row["login_pass"].ToString(), + cookie = row["cookie"].ToString(), + cookie2 = row["cookie2"].ToString(), + anti_contents = row["anti_contents"].ToString(), + shop_id = row["shop_id"].ToString(), + shop_account = row["shop_account"].ToString(), + sub_user_name = row["sub_user_name"].ToString(), + user_name = row["user_name"].ToString(), + company_name = row["company_name"].ToString(), + notes = row["notes"].ToString(), + login_status = row["login_status"].ToString(), + login_status2 = row["login_status2"].ToString(), + add_product_remaining = row["add_product_remaining"].ParseToInt(), + add_product_month = row["add_product_month"].ParseToInt(), + operate_sub_sa_name = row["operate_sub_sa_name"].ParseToString(), + + }; + shopList.Add(shop); + } + + //sql = "\r\nINSERT INTO dyxd.shop_add_prod_count(shop_id,shop_account,add_product_remaining,add_product_month) VALUES "; + //foreach (var shop in shopList) + //{ + // sql += "\r\n('" + shop.shop_id + "','" + shop.shop_account + "'," + shop.add_product_remaining + "," + shop.add_product_month + "),"; + //} + //sql = sql.TrimEnd(',') + " \r\n"; + //sql += "ON DUPLICATE KEY UPDATE " + + // "shop_account=VALUES(shop_account)," + + // "add_product_remaining=VALUES(add_product_remaining)," + + // "add_product_month=VALUES(add_product_month);"; + //var result = mySql.ExecuteNonQuery(sql); + //mySql.Close(); + + int month = DateTime.Now.Month; + var shopMonthList = shopList.Where(s => s.add_product_month != month); + if (shopMonthList.Count() > 0) + { + int remainCount = 300; + var shopMonthIdList = shopMonthList.Select(s => s.id); + mySql = new MysqlUtils(conn); + string ids = string.Join(",", shopMonthIdList); + sql = ""; + sql += "update dyxd.shop set add_product_remaining=" + remainCount + ", add_product_month=" + month + + " where 1=1 and id in (" + ids + ");"; + + sql += "\r\nINSERT INTO dyxd.shop_add_prod_count(shop_id,shop_account,add_product_remaining,add_product_month) VALUES "; + foreach (var shop in shopMonthList) + { + sql += "\r\n('" + shop.shop_id + "','" + shop.shop_account + "'," + remainCount + "," + month + "),"; + } + sql = sql.TrimEnd(',') + " \r\n"; + sql += "ON DUPLICATE KEY UPDATE " + + "shop_account=VALUES(shop_account)," + + "add_product_remaining=VALUES(add_product_remaining)," + + "add_product_month=VALUES(add_product_month);"; + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + + if (rst) + { + foreach (var shop in shopMonthList) + { + shop.add_product_month = month; + shop.add_product_remaining = remainCount; + } + } + } + var data = JsonUtils.SerializerObjectToString(shopList); + + + //return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; + return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"count\":" + count + "}"; + } + } + return "{\"code\":19999,\"msg\":\"未知错误\"}"; + } + + + + public string UpdateAddProdRemaining(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); + string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); + if (time1 != EncrypUtil.Encryption(time)) + return "{\"code\":50000,\"msg\":\"校验失败\"}"; + + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); + var password = RegexUtils.GetStringQuery(ref inputData, "password"); + var remainCount = RegexUtils.GetStringQuery(ref inputData, "remain_count"); + var shop_ids = RegexUtils.GetStringQuery(ref inputData, "shop_ids")?.Replace("'", ""); + if (!string.IsNullOrWhiteSpace(shop_ids)) + { + List shopIdLst = shop_ids.Split(',').ToList(); + shop_ids = "'" + string.Join("','", shopIdLst) + "'"; + } + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = ""; + sql += "update dyxd.shop_add_prod_count set add_product_remaining=" + remainCount + + " where 1=1 and shop_id in (" + shop_ids + ");"; + + var rst = mySql.ExecuteNonQuery(sql); + var msg = mySql.Message; + mySql.Close(); + + if (rst) + return "{\"code\":200,\"msg\":\"success\"}"; + else + return "{\"code\":50000,\"msg\":\"" + msg + "\"}"; + } + else + { + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + } + + //获取一个手机登录号码下的所有店铺(以便有则更新,无则新增) + public string GetOneLoginNameShop(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); + var login_name = RegexUtils.GetStringQuery(ref inputData, "login_name"); + var password = RegexUtils.GetStringQuery(ref inputData, "password"); + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "select id,login_name,login_pass,cookie,cookie2,anti_contents,shop_id,shop_account,sub_user_name,user_name from dyxd.shop where user_name='" + + user_name + "' and login_name='" + login_name + "'"; + + var dt = mySql.ExecuteDataTable(sql); + mySql.Close(); + if (dt != null) + { + List shopList = new List(); + foreach (DataRow row in dt.Rows) + { + ShopParam shop = new ShopParam + { + id = Convert.ToInt32(row["id"]), + login_name = row["login_name"].ToString(), + login_pass = row["login_pass"].ToString(), + cookie = row["cookie"].ToString(), + cookie2 = row["cookie2"].ToString(), + anti_contents = row["anti_contents"].ToString(), + shop_id = row["shop_id"].ToString(), + shop_account = row["shop_account"].ToString(), + sub_user_name = row["sub_user_name"].ToString(), + user_name = row["user_name"].ToString(), + company_name = row["company_name"].ToString(), + notes = row["notes"].ToString(), + login_status = row["login_status"].ToString(), + }; + shopList.Add(shop); + } + var data = JsonUtils.SerializerObjectToString(shopList); + return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; + } + } + return "{\"code\":19999,\"msg\":\"未知错误\"}"; + } + + //获取一个手机登录号码下特定ID的店铺 + public string GetOneIdShop(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); + var login_name = RegexUtils.GetStringQuery(ref inputData, "login_name"); + var shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id"); + var password = RegexUtils.GetStringQuery(ref inputData, "password"); + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "select id,login_name,login_pass,cookie,cookie2,anti_contents,shop_id,shop_account,sub_user_name,user_name from dyxd.shop where user_name='" + + user_name + "' and login_name='" + login_name + "' and shop_id='" + shop_id + "'"; + + var dt = mySql.ExecuteDataTable(sql); + mySql.Close(); + if (dt != null) + { + List shopList = new List(); + foreach (DataRow row in dt.Rows) + { + ShopParam shop = new ShopParam + { + id = Convert.ToInt32(row["id"]), + login_name = row["login_name"].ToString(), + login_pass = row["login_pass"].ToString(), + cookie = row["cookie"].ToString(), + cookie2 = row["cookie2"].ToString(), + anti_contents = row["anti_contents"].ToString(), + shop_id = row["shop_id"].ToString(), + shop_account = row["shop_account"].ToString(), + sub_user_name = row["sub_user_name"].ToString(), + user_name = row["user_name"].ToString(), + company_name = row["company_name"].ToString(), + notes = row["notes"].ToString(), + login_status = row["login_status"].ToString(), + }; + shopList.Add(shop); + } + var data = JsonUtils.SerializerObjectToString(shopList); + return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; + } + } + return "{\"code\":19999,\"msg\":\"未知错误\"}"; + } + + public string AddShop(string inputData, bool isAdmin=false) + { + if (!string.IsNullOrEmpty(inputData)) + { + string user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); + if (isAdmin) + user_name = RegexUtils.GetStringQuery(ref inputData, "shop_user_name"); + string login_name = RegexUtils.GetStringQuery(ref inputData, "login_name"); + string login_pass = RegexUtils.GetStringQuery(ref inputData, "login_pass"); + string sub_user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_user_name")); + string cookie = RegexUtils.GetStringQuery(ref inputData, "cookie"); + string cookie2 = RegexUtils.GetStringQuery(ref inputData, "cookie2"); + string anti_contents = RegexUtils.GetStringQuery(ref inputData, "anti_contents"); + string shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id"); + string shop_account = RegexUtils.GetStringQuery(ref inputData, "shop_account"); + string group_name = RegexUtils.GetStringQuery(ref inputData, "group_name"); + string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes")); + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + if (string.IsNullOrEmpty(user_name)) + { + return "{\"code\":500,\"msg\":\"没有用户名\"}"; + } + if (string.IsNullOrEmpty(login_name)) + { + return "{\"code\":501,\"msg\":\"没有店铺登录名\"}"; + } + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = ""; + if (string.IsNullOrEmpty(shop_id)) + sql = "select exists (select 1 from dyxd.shop where login_name='" + login_name + "' and user_name='" + user_name + "')"; + else + sql = "select exists (select 1 from dyxd.shop where login_name='" + login_name + "' and user_name='" + user_name + + "' and shop_id='" + shop_id + "')"; + var exist = mySql.ExecuteFirstInt(sql); + if (exist>0) + { + mySql.Close(); + return "{\"code\":500,\"msg\":\"店铺" + login_name +" " + shop_account + "已存在\"}"; + } + + sql = "insert into dyxd.shop (login_name,login_pass,cookie,cookie2,anti_contents,shop_account,shop_id,sub_user_name,user_name,group_name,notes,add_time,mdy_time) " + + "values ('" + login_name + "','" + login_pass + "','" + cookie + "','" + cookie2 + "','" + anti_contents + "','" + shop_account + "','" + shop_id + "','" + + sub_user_name + "','" + user_name + "','" + group_name + "','" + notes + "','" + + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');"; + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + if (rst) + { + return "{\"code\":200,\"msg\":\"success\"}"; + } + } + return "{\"code\":19999,\"msg\":\"未知错误\"}"; + } + + public string MdyShop(string inputData, bool isAdmin=false) + { + if (!string.IsNullOrEmpty(inputData)) + { + string user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); + if (isAdmin) + user_name = RegexUtils.GetStringQuery(ref inputData, "shop_user_name"); + string login_name = RegexUtils.GetStringQuery(ref inputData, "login_name"); + string login_pass = RegexUtils.GetStringQuery(ref inputData, "login_pass"); + string sub_user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_user_name")); + string cookie = RegexUtils.GetStringQuery(ref inputData, "cookie"); + string cookie2 = RegexUtils.GetStringQuery(ref inputData, "cookie2"); + string anti_contents = RegexUtils.GetStringQuery(ref inputData, "anti_contents"); + string new_shop_id = RegexUtils.GetStringQuery(ref inputData, "new_shop_id"); + string old_shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id"); + string shop_account = RegexUtils.GetStringQuery(ref inputData, "shop_account"); + string group_name = RegexUtils.GetStringQuery(ref inputData, "group_name"); + string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes")); + string login_status = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "login_status")); + + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + if (string.IsNullOrEmpty(user_name)) + { + return "{\"code\":500,\"msg\":\"没有用户名\"}"; + } + if (string.IsNullOrEmpty(login_name)) + { + return "{\"code\":501,\"msg\":\"没有店铺登录名\"}"; + } + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "update dyxd.shop set"; + if (login_pass != null) + sql += " login_pass='" + login_pass + "',"; + if (cookie != null) + sql += " cookie='" + cookie + "',"; + if (cookie2 != null) + sql += " cookie2='" + cookie2 + "',"; + if (anti_contents != null) + sql += " anti_contents='" + anti_contents + "',"; + if (new_shop_id != null) + sql += " shop_id='" + new_shop_id + "',"; + if (shop_account != null) + sql += " shop_account='" + shop_account + "',"; + if (sub_user_name != null) + sql += " sub_user_name='" + sub_user_name + "',"; + if (group_name != null) + sql += " group_name='" + group_name + "',"; + if (notes != null) + sql += " notes='" + notes + "',"; + if (login_status != null) + sql += " login_status='" + login_status + "',"; + sql = sql.TrimEnd(','); + sql += " where login_name='" + login_name + "' and (user_name='" + user_name + "' or sub_user_name like '%" + user_name + "%')"; + if (!string.IsNullOrEmpty(old_shop_id)) + sql += " and shop_id='" + old_shop_id + "'"; + + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + if (rst) + { + return "{\"code\":200,\"msg\":\"success\"}"; + } + } + return "{\"code\":19999,\"msg\":\"未知错误\"}"; + } + + public string MdyAntiContent(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + string login_name = RegexUtils.GetStringQuery(ref inputData, "login_name"); + string shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id"); + string anti_contents = RegexUtils.GetStringQuery(ref inputData, "anti_contents"); + + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + if (string.IsNullOrEmpty(login_name)) + { + return "{\"code\":500,\"msg\":\"店铺没有登录名\"}"; + } + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "update dyxd.shop set"; + if (anti_contents != null) + sql += " anti_contents='" + anti_contents + "',"; + sql = sql.TrimEnd(','); + sql += " where login_name='" + login_name + "' and shop_id='" + shop_id + "';"; + + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + if (rst) + { + return "{\"code\":200,\"msg\":\"success\"}"; + } + } + return "{\"code\":19999,\"msg\":\"未知错误\"}"; + } + + public string MdyCookieAndLoginStatus(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + string login_name = RegexUtils.GetStringQuery(ref inputData, "login_name"); + string cookie = RegexUtils.GetStringQuery(ref inputData, "cookie"); + string cookie2 = RegexUtils.GetStringQuery(ref inputData, "cookie2"); + string login_status = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "login_status")); + string login_status2 = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "login_status2")); + string pddid = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "pddid")); + + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + if (string.IsNullOrEmpty(login_name)) + { + return "{\"code\":500,\"msg\":\"店铺没有登录名\"}"; + } + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "update dyxd.shop set"; + if (cookie != null) + sql += " cookie='" + cookie + "',"; + if (cookie2 != null) + sql += " cookie2='" + cookie2 + "',"; + if (login_status != null) + sql += " login_status='" + login_status + "',"; + if (login_status2 != null) + sql += " login_status2='" + login_status2 + "',"; + if (pddid != null) + sql += " pddid='" + pddid + "',"; + sql = sql.TrimEnd(','); + sql += " where login_name='" + login_name + "'"; + + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + if (rst) + { + return "{\"code\":200,\"msg\":\"success\"}"; + } + } + return "{\"code\":19999,\"msg\":\"未知错误\"}"; + } + + + public string DelShop(string inputData, bool isAdmin=false) + { + if (!string.IsNullOrEmpty(inputData)) + { + var login_name = RegexUtils.GetStringQuery(ref inputData, "login_name"); + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); + if (isAdmin) + user_name = RegexUtils.GetStringQuery(ref inputData, "shop_user_name"); + var shop_id = RegexUtils.GetStringQuery(ref inputData, "shop_id"); + var password = RegexUtils.GetStringQuery(ref inputData, "password"); + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + if (string.IsNullOrEmpty(user_name)) + { + return "{\"code\":500,\"msg\":\"没有用户名\"}"; + } + if (string.IsNullOrEmpty(login_name)) + { + return "{\"code\":501,\"msg\":\"没有店铺登录名\"}"; + } + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "delete from dyxd.shop where user_name='" + user_name + "' and login_name='" + login_name + "'"; + if (!string.IsNullOrEmpty(shop_id)) + sql += " and shop_id='" + shop_id + "'"; + + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + if (rst) + { + return "{\"code\":200,\"msg\":\"success\"}"; + } + } + return "{\"code\":19999,\"msg\":\"未知错误\"}"; + } + + /// + /// 设置店铺的二级超管 + /// + /// + public string SetShopSubSa(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt(); + string time1 = RegexUtils.GetStringQuery(ref inputData, "code"); + if (time1 != EncrypUtil.Encryption(time)) + return "{\"code\":50000,\"msg\":\"校验失败\"}"; + + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); + if (string.IsNullOrEmpty(user_name)) + { + return "{\"code\":50001,\"msg\":\"没有用户名\"}"; + } + + var id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'"); + var login_name = RegexUtils.GetStringQuery(ref inputData, "shop_login_name")?.Replace("'", "\\'"); + var operate_sub_sa_name = RegexUtils.GetStringQuery(ref inputData, "operate_sub_sa_name")?.Replace("'", "\\'"); + + if (string.IsNullOrEmpty(id) && string.IsNullOrEmpty(login_name)) + { + return "{\"code\":50002,\"msg\":\"未选择任何待上传\"}"; + } + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "update dyxd.shop set"; + if (operate_sub_sa_name != null) + sql += " operate_sub_sa_name='" + operate_sub_sa_name + "',"; + sql += " add_sub_sa_time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',"; + sql = sql.TrimEnd(','); + if (!string.IsNullOrEmpty(id)) + sql += " where id in (" + id + ")"; + else if (!string.IsNullOrEmpty(login_name)) + sql += " where login_name in ('" + login_name.Replace(",", "','") + "')"; + else + sql += " where 1=2"; + 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\":\"输入为空\"}"; + } + } +} \ No newline at end of file diff --git a/KJDService/KJD_WebService/BLL/DYXD/DYUserManage.cs b/KJDService/KJD_WebService/BLL/DYXD/DYUserManage.cs new file mode 100644 index 0000000..3674e15 --- /dev/null +++ b/KJDService/KJD_WebService/BLL/DYXD/DYUserManage.cs @@ -0,0 +1,470 @@ +using KJD_Web.Model; +using KJD_Web.Utils; +using NaiBa.Util.Extension; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Net; +using System.Reflection; +using System.Web; +using System.Web.UI.WebControls; + +namespace KJD_Web.BLL.DYXD +{ + public class DYUserManage + { + public string CheckUserLogin(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var mobile = RegexUtils.GetStringQuery(ref inputData, "mobile")?.Replace("'", "\\'"); + var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'"); + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "select * from dyxd.user where user_name='" + + mobile + "' and password='" + password + "'"; + + var dt = mySql.ExecuteDataTable(sql); + mySql.Close(); + if (dt != null) + { + foreach (DataRow row in dt.Rows) + { + UserLoginResultParam user = new UserLoginResultParam + { + id = Convert.ToInt32(row["id"]), + user_name = row["user_name"].ToString(), + nick_name = row["nick_name"].ToString(), + mobile = row["user_name"].ToString(), + password = row["password"].ToString(), + group_id = row["group_id"].ToString(), + card_id = row["card_id"].ToString(), + 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, + }; + + if (string.IsNullOrEmpty(user.company_name)) + { + user.company_name = "-"; + } + var data = JsonUtils.SerializerObjectToString(user); + return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; + } + return "{\"code\":1,\"msg\":\"用户名或密码错误\"}"; + } + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + + public string AddSubUser(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var parent_user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); + var nick_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_nick_name"))?.Replace("'", "\\'"); + var user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_name"))?.Replace("'", "\\'"); + var mobile = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_mobile"))?.Replace("'", "\\'"); + var password = RegexUtils.GetStringQuery(ref inputData, "sub_password")?.Replace("'", "\\'"); + var group_id = RegexUtils.GetStringQuery(ref inputData, "group_id")?.Replace("'", "\\'"); + var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'"); + var company_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "company"))?.Replace("'", "\\'"); + var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'"); + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = ""; + sql = "select exists (select 1 from dyxd.user where user_name='" + user_name + "')"; + var exist = mySql.ExecuteFirstInt(sql); + if (exist > 0) + { + mySql.Close(); + return "{\"code\":500,\"msg\":\"用户名已存在\"}"; + } + + sql = "insert into dyxd.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,parent_user_name,add_time,mdy_time) " + + "values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" + + group_id + "','" + company_name + "','" + notes + "','" + parent_user_name + "','" + + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');"; + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + if (!rst) + return "{\"code\":501,\"msg\":\""+ mySql.Message + "\"}"; + else + return "{\"code\":200,\"msg\":\"子账户创建成功!\"}"; + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + + public string GetSubUser(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); + var password = RegexUtils.GetStringQuery(ref inputData, "password"); + var group = RegexUtils.GetStringQuery(ref inputData, "group"); + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "select * from dyxd.user where parent_user_name='" + + user_name + "'"; + + var dt = mySql.ExecuteDataTable(sql); + mySql.Close(); + if (dt != null) + { + List userList = new List(); + foreach (DataRow row in dt.Rows) + { + + UserLoginResultParam user = new UserLoginResultParam + { + id = Convert.ToInt32(row["id"]), + user_name = row["user_name"].ToString(), + nick_name = row["nick_name"].ToString(), + mobile = row["mobile"].ToString(), + password = row["password"].ToString(), + group_id = row["group_id"].ToString(), + card_id = row["card_id"].ToString(), + parent_user_name = row["parent_user_name"].ToString(), + company_name = row["company_name"].ToString(), + notes = row["notes"].ToString(), + }; + if (string.IsNullOrEmpty(user.mobile)) + { + user.mobile = row["user_name"].ToString(); + } + userList.Add(user); + } + var data = JsonUtils.SerializerObjectToString(userList); + return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; + } + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + + public string UpdateSubUser(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var id = RegexUtils.GetStringQuery(ref inputData, "id")?.Replace("'", "\\'"); + var parent_user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); + var nick_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_nick_name"))?.Replace("'", "\\'"); + var user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_name"))?.Replace("'", "\\'"); + var mobile = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "sub_mobile"))?.Replace("'", "\\'"); + var password = RegexUtils.GetStringQuery(ref inputData, "sub_password")?.Replace("'", "\\'"); + var group_id = RegexUtils.GetStringQuery(ref inputData, "group_id")?.Replace("'", "\\'"); + var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'"); + var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'"); + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = ""; + //sql = "select * from dyxd.user where parent_user_name='" + // + user_name + "'"; + sql = "update dyxd.user set"; + if (!string.IsNullOrEmpty(nick_name)) + sql += " nick_name='" + nick_name + "',"; + if (!string.IsNullOrEmpty(user_name)) + sql += " user_name='" + user_name + "',"; + if (!string.IsNullOrEmpty(mobile)) + sql += " mobile='" + mobile + "',"; + if (!string.IsNullOrEmpty(password)) + sql += " password='" + password + "',"; + if (!string.IsNullOrEmpty(group_id)) + sql += " group_id=" + group_id + ","; + if (!string.IsNullOrEmpty(card_id)) + sql += " card_id='" + card_id + "',"; + if (!string.IsNullOrEmpty(notes)) + sql += " notes='" + notes + "',"; + sql = sql.TrimEnd(','); + sql += " where id=" + id + ""; + + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + if (rst) + { + return "{\"code\":200,\"msg\":\"success\"}"; + } + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + + + public string DelUser(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name"); + var id = RegexUtils.GetStringQuery(ref inputData, "id"); + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "delete from dyxd.user where id='" + + id + "'"; + + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + if (rst) + { + return "{\"code\":200,\"msg\":\"success\"}"; + } + else + return "{\"code\":500,\"msg\":\"删除失败,请稍后重试\"}"; + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + + public string GetAllUser(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var user_name = RegexUtils.GetStringQuery(ref inputData, "user_name")?.Replace("'", "\\'"); + var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'"); + var group_id = RegexUtils.GetStringQuery(ref inputData, "group_id")?.Replace("'", "\\'"); + var search = RegexUtils.GetStringQuery(ref inputData, "search")?.Replace("'", "\\'"); + var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'"); + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + //string sql = "select * from dyxd.user where group_id=3"; + string sql = "select * from dyxd.user where 1=1"; + if (!string.IsNullOrEmpty(group_id)) + sql += " and group_id=" + group_id; + if (!string.IsNullOrEmpty(sa_level)) + sql += " and sa_level=" + sa_level; + if (!string.IsNullOrEmpty(search)) + sql += " and (user_name like '%" + search + + "%' or nick_name like '%" + search + + "%' or company_name like '%" + search + "%')"; + sql += " order by id desc"; + + var dt = mySql.ExecuteDataTable(sql); + mySql.Close(); + if (dt != null) + { + List userList = new List(); + foreach (DataRow row in dt.Rows) + { + + UserLoginResultParam user = new UserLoginResultParam + { + id = Convert.ToInt32(row["id"]), + user_name = row["user_name"].ToString(), + nick_name = row["nick_name"].ToString(), + mobile = row["mobile"].ToString(), + password = row["password"].ToString(), + group_id = row["group_id"].ToString(), + card_id = row["card_id"].ToString(), + parent_user_name = row["parent_user_name"].ToString(), + company_name = row["company_name"].ToString(), + 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, + }; + if (string.IsNullOrEmpty(user.mobile)) + { + user.mobile = row["user_name"].ToString(); + } + userList.Add(user); + } + var data = JsonUtils.SerializerObjectToString(userList); + return "{\"code\":200,\"msg\":\"success\",\"data\":" + data + ",\"c\":\"" + EncrypUtil.Encryption(r2) + "\"}"; + } + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + + public string AddUser(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var nick_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_nick_name"))?.Replace("'", "\\'"); + var user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_user_name"))?.Replace("'", "\\'"); + var mobile = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_mobile"))?.Replace("'", "\\'"); + var password = RegexUtils.GetStringQuery(ref inputData, "add_password")?.Replace("'", "\\'"); + var company_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_company"))?.Replace("'", "\\'"); + var group_id = RegexUtils.GetStringQuery(ref inputData, "group_id")?.Replace("'", "\\'"); ; + var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'"); + var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'"); + var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'"); + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = ""; + sql = "select exists (select 1 from dyxd.user where user_name='" + user_name + "')"; + var exist = mySql.ExecuteFirstInt(sql); + if (exist > 0) + { + mySql.Close(); + return "{\"code\":500,\"msg\":\"用户名已存在\"}"; + } + + sql = "insert into dyxd.user (nick_name,user_name,mobile,password,card_id,group_id,company_name,notes,sa_level,add_time,mdy_time) " + + "values ('" + nick_name + "','" + user_name + "','" + mobile + "','" + password + "','" + card_id + "','" + + group_id + "','" + company_name + "','" + notes + "'," + sa_level + ",'" + + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "');"; + var rst = mySql.ExecuteNonQuery(sql); + mySql.Close(); + if (!rst) + return "{\"code\":501,\"msg\":\"" + mySql.Message + "\"}"; + else + return "{\"code\":200,\"msg\":\"success\"}"; + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + + public string UpdateUser(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var id = RegexUtils.GetStringQuery(ref inputData, "id")?.Replace("'", "\\'"); + var nick_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_nick_name"))?.Replace("'", "\\'"); + var user_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_user_name"))?.Replace("'", "\\'"); + var mobile = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_mobile"))?.Replace("'", "\\'"); + var company_name = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "add_company"))?.Replace("'", "\\'"); + var password = RegexUtils.GetStringQuery(ref inputData, "add_password")?.Replace("'", "\\'"); + var group_id = RegexUtils.GetStringQuery(ref inputData, "group_id")?.Replace("'", "\\'"); + var card_id = RegexUtils.GetStringQuery(ref inputData, "card_id")?.Replace("'", "\\'"); + var notes = RegexUtils.GetStringQuery(ref inputData, "notes")?.Replace("'", "\\'"); + var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level")?.Replace("'", "\\'"); + int r2 = 0; + int.TryParse(RegexUtils.GetStringQuery(ref inputData, "r2"), out r2); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = ""; + //sql = "select * from dyxd.user where parent_user_name='" + // + user_name + "'"; + sql = "update dyxd.user set"; + if (!string.IsNullOrEmpty(nick_name)) + sql += " nick_name='" + nick_name + "',"; + if (!string.IsNullOrEmpty(user_name)) + sql += " user_name='" + user_name + "',"; + if (!string.IsNullOrEmpty(mobile)) + sql += " mobile='" + mobile + "',"; + if (!string.IsNullOrEmpty(company_name)) + sql += " company_name='" + company_name + "',"; + if (!string.IsNullOrEmpty(password)) + sql += " password='" + password + "',"; + if (!string.IsNullOrEmpty(group_id)) + sql += " group_id=" + group_id + ","; + if (!string.IsNullOrEmpty(card_id)) + sql += " card_id='" + card_id + "',"; + if (!string.IsNullOrEmpty(notes)) + sql += " notes='" + notes + "',"; + if (!string.IsNullOrEmpty(sa_level)) + sql += " sa_level=" + sa_level + ","; + sql = sql.TrimEnd(','); + sql += " where id=" + id + ""; + + 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 ChangePassword(string inputData) + { + var userName = RegexUtils.GetStringJson(ref inputData, "user_name")?.Replace("'", "\\'"); + var password = RegexUtils.GetStringJson(ref inputData, "password")?.Replace("'", "\\'"); + var newPassword = RegexUtils.GetStringJson(ref inputData, "new_password")?.Replace("'", "\\'"); + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["Conn"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "select user_id,password from pepdtp.user where user_id='" + + userName + "' and password='" + password + "'"; + + var dw = mySql.ExecuteDataTableRow(sql); + if (dw != null) + { + UserLoginResultParam user = new UserLoginResultParam + { + user_name = dw["user_id"].ToString(), + password = dw["password"].ToString(), + }; + sql = "update pepdtp.user set password = '" + newPassword + "' where user_id='" + userName + "'"; + var result = mySql.ExecuteNonQuery(sql); + mySql.Close(); + + if (result) + { + return "{\"code\":0,\"msg\":\"密码修改成功!\"}"; + } + else + return "{\"code\":19999,\"msg\":\"密码修改失败!请稍后再试。\"}"; + } + else + { + mySql.Close(); + return "{\"code\":1,\"msg\":\"原密码错误。\"}"; + } + } + + public string return_package_secret_key { get; set; } = "aaMETt2bPe6YHzZ1ojbC+6wOvgtwehqc6A+/Rz+pCUU="; + + public string GetPackageSign(string inputData) + { + if (!string.IsNullOrEmpty(inputData)) + { + var mobile = RegexUtils.GetStringQuery(ref inputData, "mobile")?.Replace("'", "\\'"); + var password = RegexUtils.GetStringQuery(ref inputData, "password")?.Replace("'", "\\'"); + var timestamp = RegexUtils.GetStringQuery(ref inputData, "timestamp")?.Replace("'", "\\'"); + var mallId = RegexUtils.GetStringQuery(ref inputData, "mallId")?.Replace("'", "\\'"); + var returnPackageNo = RegexUtils.GetStringQuery(ref inputData, "returnPackageNo")?.Replace("'", "\\'"); + int r2 = RegexUtils.GetStringQuery(ref inputData, "r2").ParseToInt(); + string c2 = RegexUtils.GetStringQuery(ref inputData, "c2"); + + if (EncrypUtil.Encryption(r2) != c2) + return "{\"code\":2,\"msg\":\"不合法的输入内容\"}"; + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "select * from dyxd.user where user_name='" + + mobile + "' and password='" + password + "'"; + + sql = "select * from dyxd.user where user_name='" + mobile + "'"; + + var dt = mySql.ExecuteDataTable(sql); + mySql.Close(); + if (dt == null || dt.Rows.Count <=0) + { + return "{\"code\":1,\"msg\":\"用户不存在\"}"; + } + + string sign = EncrypUtil.GetMd5(timestamp + return_package_secret_key + mallId + returnPackageNo).ToLower(); + + return "{\"code\":200, \"sign\":\"" + sign + "\", \"msg\":\"\"}"; + } + return "{\"code\":19999,\"msg\":\"输入为空\"}"; + } + } +} \ No newline at end of file diff --git a/KJDService/KJD_WebService/BLL/KJD/ProductManage.cs b/KJDService/KJD_WebService/BLL/KJD/ProductManage.cs index 9b0bfc5..17bafa0 100644 --- a/KJDService/KJD_WebService/BLL/KJD/ProductManage.cs +++ b/KJDService/KJD_WebService/BLL/KJD/ProductManage.cs @@ -158,8 +158,11 @@ namespace KJD_Web.BLL var select_shop_id = RegexUtils.GetStringQuery(ref inputData, "select_shop_id")?.Replace("'", "\\'"); var sort_field = RegexUtils.GetStringQuery(ref inputData, "sort_field")?.Replace("'", "\\'"); var product_get_type = RegexUtils.GetStringQuery(ref inputData, "product_get_type")?.Replace("'", "\\'"); + var sa_level = RegexUtils.GetStringQuery(ref inputData, "sa_level").ParseToInt(); if (string.IsNullOrEmpty(product_get_type)) // 母店采集0或前端直采1 product_get_type = "0"; + if (sa_level != 1 && product_get_type.ToLower() == "all") + product_get_type = "0,1"; int page = RegexUtils.GetStringQuery(ref inputData, "page").ParseToInt(); int page_size = RegexUtils.GetStringQuery(ref inputData, "page_size").ParseToInt(50); @@ -168,10 +171,10 @@ namespace KJD_Web.BLL MysqlUtils mySql = new MysqlUtils(conn); string sql = "SELECT COUNT(id) FROM kjd.product p WHERE p.is_del=0"; - if (!isDetail && product_get_type != "all") - sql += " AND p.product_get_type=" + product_get_type; string where = ""; + if (!isDetail && product_get_type != "all") // 详情必须从列表页面进入,不用限制 + where += " AND p.product_get_type in (" + product_get_type + ")"; if (!string.IsNullOrEmpty(search_db_ids)) where += " AND p.id in (" + search_db_ids + ")"; if (!string.IsNullOrWhiteSpace(search_group)) @@ -183,7 +186,12 @@ namespace KJD_Web.BLL if (!string.IsNullOrWhiteSpace(search_cat)) where += " AND p.cat_name like '%" + search_cat + "%'"; if (!string.IsNullOrWhiteSpace(search_ext_code)) - where += " AND p.ext_code like '%" + search_ext_code + "%'"; + { + if (search_ext_code.Contains(",")) + where += " AND p.ext_code in ('" + search_ext_code.Replace(",", "','") + "')"; + else + where += " AND p.ext_code like '%" + search_ext_code + "%'"; + } if (!string.IsNullOrWhiteSpace(search_prod_name)) where += " AND p.product_name like '%" + search_prod_name + "%'"; if (!string.IsNullOrWhiteSpace(search_notes)) @@ -227,9 +235,6 @@ namespace KJD_Web.BLL //sql += "SELECT * FROM " + tableName + l_spu_map_table_id + " where draft_id=" + in_draft_id_list[i]; - if (!isDetail && product_get_type != "all") // 详情必须从列表页面进入,不用限制 - sql += " AND p.product_get_type=" + product_get_type; - //where子句 sql += where; diff --git a/KJDService/KJD_WebService/BLL/KJD/ProductThirdManage.cs b/KJDService/KJD_WebService/BLL/KJD/ProductThirdManage.cs index e1ffa46..7f57cc0 100644 --- a/KJDService/KJD_WebService/BLL/KJD/ProductThirdManage.cs +++ b/KJDService/KJD_WebService/BLL/KJD/ProductThirdManage.cs @@ -324,6 +324,62 @@ namespace KJD_Web.BLL return "{\"code\":19999,\"msg\":\"输入为空\"}"; } + public string MdyDBProduct(string inputData, bool isAdmin = 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 id = RegexUtils.GetStringQuery(ref inputData, "db_id")?.Replace("'", "\\'"); + var product_name = RegexUtils.GetStringQuery(ref inputData, "product_name")?.Replace("'", "\\'"); + string notes = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "notes"))?.Replace("'", "\\'"); + string ext_code = HtmlUtils.UrlDecodeUtf8(RegexUtils.GetStringQuery(ref inputData, "ext_code"))?.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("'", "\\'"); + + if (string.IsNullOrEmpty(id)) + { + return "{\"code\":500,\"msg\":\"没有指定商品\"}"; + } + if (string.IsNullOrEmpty(user_name)) + { + return "{\"code\":500,\"msg\":\"没有用户名\"}"; + } + + string conn = System.Configuration.ConfigurationManager.ConnectionStrings["ConnKJD"].ConnectionString; + MysqlUtils mySql = new MysqlUtils(conn); + string sql = "update kjd.third_product set"; + if (product_name != null) + sql += " product_name='" + product_name + "',"; + if (notes != null) + sql += " notes='" + notes + "',"; + if (ext_code != null) + sql += " ext_code='" + ext_code + "',"; + if (product_json != null) + sql += " product_json='" + product_json + "',"; + if (size_json != null) + sql += " size_json='" + size_json + "',"; + sql = sql.TrimEnd(','); + sql += " where id=" + id + ";"; + + 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 AddUserSelectProduct(string inputData, bool isAdmin = false) { diff --git a/KJDService/KJD_WebService/KJD_WebService.csproj b/KJDService/KJD_WebService/KJD_WebService.csproj index 462f8af..2310444 100644 --- a/KJDService/KJD_WebService/KJD_WebService.csproj +++ b/KJDService/KJD_WebService/KJD_WebService.csproj @@ -96,6 +96,8 @@ + + diff --git a/KJDService/KJD_WebService/ProductThirdService.asmx.cs b/KJDService/KJD_WebService/ProductThirdService.asmx.cs index 73e446f..0a9ea6e 100644 --- a/KJDService/KJD_WebService/ProductThirdService.asmx.cs +++ b/KJDService/KJD_WebService/ProductThirdService.asmx.cs @@ -132,6 +132,18 @@ namespace KJD_Web Context.Response.End(); } + [WebMethod] + public void mdy_db_product() + { + string jsontext = GetRequestJsonString(); + + var result = jsontext; + result = new ProductThirdManage().MdyDBProduct(jsontext); + + Context.Response.Write(result); + Context.Response.End(); + } + [WebMethod] public void add_user_select_product() { diff --git a/TEMUKJD/BLL/AuthorBLL.cs b/TEMUKJD/BLL/AuthorBLL.cs new file mode 100644 index 0000000..d813a89 --- /dev/null +++ b/TEMUKJD/BLL/AuthorBLL.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace TemuKJD.BLL +{ + public class AuthorBLL + { + } + public enum EnumClientMode + { + Admin, + Client, + ClientJit, + } +} diff --git a/TEMUKJD/BLL/ProductSelectBLL.cs b/TEMUKJD/BLL/ProductSelectBLL.cs index 85ba1df..70426ce 100644 --- a/TEMUKJD/BLL/ProductSelectBLL.cs +++ b/TEMUKJD/BLL/ProductSelectBLL.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace TemuKJD.BLL { - public enum SetProductSelectNotesType + public enum SetProductSelectType { DbProduct, ThirdProduct, diff --git a/TEMUKJD/BLL/ShopBLL.cs b/TEMUKJD/BLL/ShopBLL.cs index add90ca..721995b 100644 --- a/TEMUKJD/BLL/ShopBLL.cs +++ b/TEMUKJD/BLL/ShopBLL.cs @@ -245,7 +245,6 @@ namespace TemuKJD.BLL shop.UserName = BaseRegex.GetStringJson(ref shopStr, "user_name"); shop.SubUserName = BaseRegex.GetStringJson(ref shopStr, "sub_user_name"); shop.GroupName = BaseRegex.GetStringJson(ref shopStr, "shop_group"); - //shop.Cookies = BaseRegex.GetStringJson(ref shopStr, "cookie"); shop.Cookies = jObj["cookie"].ParseToString().Replace("&", "&").Replace("%", "%").Replace("+", "+").Replace(""", "\""); shop.Cookies2 = jObj["cookie2"].ParseToString().Replace("&", "&").Replace("%", "%").Replace("+", "+").Replace(""", "\""); shop.CompanyName = BaseRegex.GetStringJson(ref shopStr, "company_name"); diff --git a/TEMUKJD/DYForms/AdminForms/DYAdminAccountForm.Designer.cs b/TEMUKJD/DYForms/AdminForms/DYAdminAccountForm.Designer.cs new file mode 100644 index 0000000..4e4d56b --- /dev/null +++ b/TEMUKJD/DYForms/AdminForms/DYAdminAccountForm.Designer.cs @@ -0,0 +1,661 @@ + +namespace TemuKJD.DYForms.AdminForms +{ + partial class DYAdminAccountForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + this.splitContainer5 = new System.Windows.Forms.SplitContainer(); + this.cmbSaLevel = new System.Windows.Forms.ComboBox(); + this.label6 = new System.Windows.Forms.Label(); + this.lblWatermark = new System.Windows.Forms.Label(); + this.cmbSearchGroup = new System.Windows.Forms.ComboBox(); + this.label5 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.txtSearch = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.txtCompany = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.btnRefresh = new TemuKJD.UserControls.ButtonEx(); + this.btnCancel = new TemuKJD.UserControls.ButtonEx(); + this.btnOpUser = new TemuKJD.UserControls.ButtonEx(); + this.label30 = new System.Windows.Forms.Label(); + this.label31 = new System.Windows.Forms.Label(); + this.txtRePass = new System.Windows.Forms.TextBox(); + this.label32 = new System.Windows.Forms.Label(); + this.label33 = new System.Windows.Forms.Label(); + this.label34 = new System.Windows.Forms.Label(); + this.label35 = new System.Windows.Forms.Label(); + this.label36 = new System.Windows.Forms.Label(); + this.cmbGroup = new System.Windows.Forms.ComboBox(); + this.label37 = new System.Windows.Forms.Label(); + this.txtPassword = new System.Windows.Forms.TextBox(); + this.label38 = new System.Windows.Forms.Label(); + this.txtMobile = new System.Windows.Forms.TextBox(); + this.label39 = new System.Windows.Forms.Label(); + this.txtNickName = new System.Windows.Forms.TextBox(); + this.label40 = new System.Windows.Forms.Label(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.dgvUser = new TemuKJD.UserComponent.DataGridViewEx(); + this.UserIdColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.UserNickNameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.mobileColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.groupIdColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.groupNameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colCompany = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.shopCountColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSaLevel = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSaLevelName = 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(); + this.splitContainer5.Panel1.SuspendLayout(); + this.splitContainer5.Panel2.SuspendLayout(); + this.splitContainer5.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dgvUser)).BeginInit(); + this.SuspendLayout(); + // + // splitContainer5 + // + this.splitContainer5.BackColor = System.Drawing.Color.Transparent; + this.splitContainer5.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer5.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer5.Location = new System.Drawing.Point(0, 0); + this.splitContainer5.Name = "splitContainer5"; + // + // splitContainer5.Panel1 + // + this.splitContainer5.Panel1.Controls.Add(this.cmbSaLevel); + this.splitContainer5.Panel1.Controls.Add(this.label6); + this.splitContainer5.Panel1.Controls.Add(this.lblWatermark); + this.splitContainer5.Panel1.Controls.Add(this.cmbSearchGroup); + this.splitContainer5.Panel1.Controls.Add(this.label5); + this.splitContainer5.Panel1.Controls.Add(this.label4); + this.splitContainer5.Panel1.Controls.Add(this.txtSearch); + this.splitContainer5.Panel1.Controls.Add(this.label3); + this.splitContainer5.Panel1.Controls.Add(this.txtCompany); + this.splitContainer5.Panel1.Controls.Add(this.label2); + this.splitContainer5.Panel1.Controls.Add(this.label1); + this.splitContainer5.Panel1.Controls.Add(this.btnRefresh); + this.splitContainer5.Panel1.Controls.Add(this.btnCancel); + this.splitContainer5.Panel1.Controls.Add(this.btnOpUser); + this.splitContainer5.Panel1.Controls.Add(this.label30); + this.splitContainer5.Panel1.Controls.Add(this.label31); + this.splitContainer5.Panel1.Controls.Add(this.txtRePass); + this.splitContainer5.Panel1.Controls.Add(this.label32); + this.splitContainer5.Panel1.Controls.Add(this.label33); + this.splitContainer5.Panel1.Controls.Add(this.label34); + this.splitContainer5.Panel1.Controls.Add(this.label35); + this.splitContainer5.Panel1.Controls.Add(this.label36); + this.splitContainer5.Panel1.Controls.Add(this.cmbGroup); + this.splitContainer5.Panel1.Controls.Add(this.label37); + this.splitContainer5.Panel1.Controls.Add(this.txtPassword); + this.splitContainer5.Panel1.Controls.Add(this.label38); + this.splitContainer5.Panel1.Controls.Add(this.txtMobile); + this.splitContainer5.Panel1.Controls.Add(this.label39); + this.splitContainer5.Panel1.Controls.Add(this.txtNickName); + this.splitContainer5.Panel1.Controls.Add(this.label40); + // + // splitContainer5.Panel2 + // + this.splitContainer5.Panel2.Controls.Add(this.splitContainer1); + this.splitContainer5.Panel2.Padding = new System.Windows.Forms.Padding(0, 5, 5, 5); + this.splitContainer5.Size = new System.Drawing.Size(800, 527); + this.splitContainer5.SplitterDistance = 357; + this.splitContainer5.SplitterWidth = 1; + this.splitContainer5.TabIndex = 3; + // + // cmbSaLevel + // + this.cmbSaLevel.FormattingEnabled = true; + this.cmbSaLevel.Items.AddRange(new object[] { + "普通用户", + "一级超管", + "二级超管"}); + this.cmbSaLevel.Location = new System.Drawing.Point(112, 388); + this.cmbSaLevel.Name = "cmbSaLevel"; + this.cmbSaLevel.Size = new System.Drawing.Size(148, 25); + this.cmbSaLevel.TabIndex = 48; + this.cmbSaLevel.Text = "普通用户"; + // + // label6 + // + 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.Name = "label6"; + this.label6.Size = new System.Drawing.Size(79, 20); + this.label6.TabIndex = 47; + this.label6.Text = "超管等级:"; + // + // lblWatermark + // + this.lblWatermark.AutoSize = true; + this.lblWatermark.BackColor = System.Drawing.Color.White; + this.lblWatermark.ForeColor = System.Drawing.SystemColors.ButtonShadow; + this.lblWatermark.Location = new System.Drawing.Point(113, 9); + this.lblWatermark.Name = "lblWatermark"; + this.lblWatermark.Size = new System.Drawing.Size(140, 17); + this.lblWatermark.TabIndex = 45; + this.lblWatermark.Text = "查询用户名、昵称或公司"; + this.lblWatermark.Click += new System.EventHandler(this.lblWatermark_Click); + // + // cmbSearchGroup + // + this.cmbSearchGroup.FormattingEnabled = true; + this.cmbSearchGroup.Items.AddRange(new object[] { + "客服", + "采购", + "上货", + "数据", + "登录"}); + this.cmbSearchGroup.Location = new System.Drawing.Point(112, 35); + this.cmbSearchGroup.Name = "cmbSearchGroup"; + this.cmbSearchGroup.Size = new System.Drawing.Size(148, 25); + this.cmbSearchGroup.TabIndex = 44; + this.cmbSearchGroup.Text = "主账户"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(27, 35); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(79, 20); + this.label5.TabIndex = 43; + this.label5.Text = "搜索分组:"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label4.Location = new System.Drawing.Point(27, 6); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(79, 20); + this.label4.TabIndex = 42; + this.label4.Text = "搜索条件:"; + // + // txtSearch + // + this.txtSearch.Location = new System.Drawing.Point(112, 6); + this.txtSearch.Name = "txtSearch"; + this.txtSearch.Size = new System.Drawing.Size(148, 23); + this.txtSearch.TabIndex = 41; + // + // label3 + // + 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.Name = "label3"; + this.label3.Size = new System.Drawing.Size(51, 20); + this.label3.TabIndex = 40; + this.label3.Text = "公司:"; + // + // txtCompany + // + this.txtCompany.Location = new System.Drawing.Point(112, 347); + this.txtCompany.Name = "txtCompany"; + this.txtCompany.Size = new System.Drawing.Size(148, 23); + this.txtCompany.TabIndex = 39; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label2.ForeColor = System.Drawing.SystemColors.ButtonShadow; + this.label2.Location = new System.Drawing.Point(117, 98); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(135, 20); + this.label2.TabIndex = 38; + this.label2.Text = "添加或编辑用户账户"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.ForeColor = System.Drawing.SystemColors.ButtonShadow; + this.label1.Location = new System.Drawing.Point(56, 475); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(212, 17); + this.label1.TabIndex = 37; + this.label1.Text = "编辑时,密码为空表示不更改原密码。"; + // + // btnRefresh + // + this.btnRefresh.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnRefresh.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnRefresh.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnRefresh.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnRefresh.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnRefresh.ForeColor = System.Drawing.Color.White; + this.btnRefresh.Location = new System.Drawing.Point(267, 5); + this.btnRefresh.Name = "btnRefresh"; + this.btnRefresh.Size = new System.Drawing.Size(86, 25); + this.btnRefresh.TabIndex = 36; + this.btnRefresh.Text = "刷新列表"; + this.btnRefresh.UseVisualStyleBackColor = false; + this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click); + // + // btnCancel + // + this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnCancel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnCancel.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCancel.ForeColor = System.Drawing.Color.White; + this.btnCancel.Location = new System.Drawing.Point(59, 431); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(86, 25); + this.btnCancel.TabIndex = 35; + this.btnCancel.Text = "取消编辑"; + this.btnCancel.UseVisualStyleBackColor = false; + this.btnCancel.Visible = false; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // btnOpUser + // + this.btnOpUser.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnOpUser.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnOpUser.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnOpUser.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnOpUser.ForeColor = System.Drawing.Color.White; + this.btnOpUser.Location = new System.Drawing.Point(174, 431); + this.btnOpUser.Name = "btnOpUser"; + this.btnOpUser.Size = new System.Drawing.Size(86, 25); + this.btnOpUser.TabIndex = 34; + this.btnOpUser.Text = "添加用户"; + this.btnOpUser.UseVisualStyleBackColor = false; + this.btnOpUser.Click += new System.EventHandler(this.btnOpUser_Click); + // + // label30 + // + this.label30.AutoSize = true; + this.label30.ForeColor = System.Drawing.SystemColors.ButtonShadow; + this.label30.Location = new System.Drawing.Point(282, 180); + this.label30.Name = "label30"; + this.label30.Size = new System.Drawing.Size(56, 17); + this.label30.TabIndex = 33; + this.label30.Text = "登录使用"; + // + // label31 + // + 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.Name = "label31"; + this.label31.Size = new System.Drawing.Size(13, 17); + this.label31.TabIndex = 32; + this.label31.Text = "*"; + // + // txtRePass + // + this.txtRePass.Location = new System.Drawing.Point(112, 261); + this.txtRePass.Name = "txtRePass"; + this.txtRePass.PasswordChar = '*'; + this.txtRePass.Size = new System.Drawing.Size(148, 23); + this.txtRePass.TabIndex = 24; + // + // label32 + // + 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.Name = "label32"; + this.label32.Size = new System.Drawing.Size(79, 20); + this.label32.TabIndex = 31; + this.label32.Text = "重复密码:"; + // + // label33 + // + 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.Name = "label33"; + this.label33.Size = new System.Drawing.Size(13, 17); + this.label33.TabIndex = 30; + this.label33.Text = "*"; + // + // label34 + // + 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.Name = "label34"; + this.label34.Size = new System.Drawing.Size(13, 17); + this.label34.TabIndex = 29; + this.label34.Text = "*"; + // + // label35 + // + 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.Name = "label35"; + this.label35.Size = new System.Drawing.Size(13, 17); + this.label35.TabIndex = 28; + this.label35.Text = "*"; + // + // label36 + // + this.label36.AutoSize = true; + this.label36.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); + this.label36.Location = new System.Drawing.Point(266, 138); + this.label36.Name = "label36"; + this.label36.Size = new System.Drawing.Size(13, 17); + this.label36.TabIndex = 27; + this.label36.Text = "*"; + // + // cmbGroup + // + this.cmbGroup.FormattingEnabled = true; + this.cmbGroup.Items.AddRange(new object[] { + "客服", + "采购", + "上货", + "数据", + "登录"}); + this.cmbGroup.Location = new System.Drawing.Point(112, 303); + this.cmbGroup.Name = "cmbGroup"; + this.cmbGroup.Size = new System.Drawing.Size(148, 25); + this.cmbGroup.TabIndex = 26; + this.cmbGroup.Text = "主账户"; + // + // label37 + // + 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.Name = "label37"; + this.label37.Size = new System.Drawing.Size(51, 20); + this.label37.TabIndex = 25; + this.label37.Text = "分组:"; + // + // txtPassword + // + this.txtPassword.Location = new System.Drawing.Point(112, 219); + this.txtPassword.Name = "txtPassword"; + this.txtPassword.PasswordChar = '*'; + this.txtPassword.Size = new System.Drawing.Size(148, 23); + this.txtPassword.TabIndex = 23; + // + // label38 + // + 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.Name = "label38"; + this.label38.Size = new System.Drawing.Size(51, 20); + this.label38.TabIndex = 22; + this.label38.Text = "密码:"; + // + // txtMobile + // + this.txtMobile.Location = new System.Drawing.Point(112, 177); + this.txtMobile.Name = "txtMobile"; + this.txtMobile.Size = new System.Drawing.Size(148, 23); + this.txtMobile.TabIndex = 21; + // + // label39 + // + 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.Name = "label39"; + this.label39.Size = new System.Drawing.Size(65, 20); + this.label39.TabIndex = 20; + this.label39.Text = "手机号:"; + // + // txtNickName + // + this.txtNickName.Location = new System.Drawing.Point(112, 135); + this.txtNickName.Name = "txtNickName"; + this.txtNickName.Size = new System.Drawing.Size(148, 23); + this.txtNickName.TabIndex = 19; + // + // label40 + // + this.label40.AutoSize = true; + this.label40.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label40.Location = new System.Drawing.Point(55, 136); + this.label40.Name = "label40"; + this.label40.Size = new System.Drawing.Size(51, 20); + this.label40.TabIndex = 18; + this.label40.Text = "昵称:"; + // + // splitContainer1 + // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer1.Location = new System.Drawing.Point(0, 5); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.dgvUser); + this.splitContainer1.Size = new System.Drawing.Size(437, 517); + this.splitContainer1.SplitterDistance = 486; + this.splitContainer1.TabIndex = 2; + // + // dgvUser + // + this.dgvUser.AllowUserToAddRows = false; + this.dgvUser.AllowUserToDeleteRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); + this.dgvUser.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.dgvUser.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dgvUser.BackgroundColor = System.Drawing.Color.White; + this.dgvUser.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvUser.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.dgvUser.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvUser.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.UserIdColumn, + this.UserNickNameColumn, + this.mobileColumn, + this.groupIdColumn, + this.groupNameColumn, + this.colCompany, + this.shopCountColumn, + this.colSaLevel, + this.colSaLevelName, + this.editColumn, + this.deleteColumn}); + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvUser.DefaultCellStyle = dataGridViewCellStyle3; + this.dgvUser.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvUser.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229))))); + this.dgvUser.Location = new System.Drawing.Point(0, 0); + this.dgvUser.Name = "dgvUser"; + this.dgvUser.ReadOnly = true; + this.dgvUser.RowTemplate.Height = 23; + this.dgvUser.Size = new System.Drawing.Size(437, 486); + this.dgvUser.TabIndex = 1; + this.dgvUser.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvUser_CellContentClick); + // + // UserIdColumn + // + this.UserIdColumn.HeaderText = "id"; + this.UserIdColumn.Name = "UserIdColumn"; + this.UserIdColumn.ReadOnly = true; + this.UserIdColumn.Visible = false; + // + // UserNickNameColumn + // + this.UserNickNameColumn.HeaderText = "用户昵称"; + this.UserNickNameColumn.Name = "UserNickNameColumn"; + this.UserNickNameColumn.ReadOnly = true; + // + // mobileColumn + // + this.mobileColumn.HeaderText = "手机(登录账号)"; + this.mobileColumn.Name = "mobileColumn"; + this.mobileColumn.ReadOnly = true; + // + // groupIdColumn + // + this.groupIdColumn.HeaderText = "groupId"; + this.groupIdColumn.Name = "groupIdColumn"; + this.groupIdColumn.ReadOnly = true; + this.groupIdColumn.Visible = false; + // + // groupNameColumn + // + this.groupNameColumn.HeaderText = "分组"; + this.groupNameColumn.Name = "groupNameColumn"; + this.groupNameColumn.ReadOnly = true; + // + // colCompany + // + this.colCompany.HeaderText = "公司"; + this.colCompany.Name = "colCompany"; + this.colCompany.ReadOnly = true; + // + // shopCountColumn + // + this.shopCountColumn.HeaderText = "店铺数"; + this.shopCountColumn.Name = "shopCountColumn"; + this.shopCountColumn.ReadOnly = true; + this.shopCountColumn.Visible = false; + // + // colSaLevel + // + this.colSaLevel.HeaderText = "saLevel"; + this.colSaLevel.Name = "colSaLevel"; + this.colSaLevel.ReadOnly = true; + this.colSaLevel.Visible = false; + // + // colSaLevelName + // + this.colSaLevelName.HeaderText = "账户类型"; + this.colSaLevelName.Name = "colSaLevelName"; + this.colSaLevelName.ReadOnly = true; + // + // editColumn + // + this.editColumn.HeaderText = "编辑"; + this.editColumn.Name = "editColumn"; + this.editColumn.ReadOnly = true; + this.editColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.editColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // deleteColumn + // + this.deleteColumn.HeaderText = "删除"; + this.deleteColumn.Name = "deleteColumn"; + this.deleteColumn.ReadOnly = true; + // + // AdminAccountForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.ClientSize = new System.Drawing.Size(800, 527); + this.Controls.Add(this.splitContainer5); + this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Name = "AdminAccountForm"; + this.Text = "AccountForm"; + this.Load += new System.EventHandler(this.MainAccountForm_Load); + this.VisibleChanged += new System.EventHandler(this.MainAccountForm_VisibleChanged); + this.splitContainer5.Panel1.ResumeLayout(false); + this.splitContainer5.Panel1.PerformLayout(); + this.splitContainer5.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer5)).EndInit(); + this.splitContainer5.ResumeLayout(false); + this.splitContainer1.Panel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dgvUser)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitContainer5; + private System.Windows.Forms.Label label1; + private UserControls.ButtonEx btnRefresh; + private UserControls.ButtonEx btnCancel; + private UserControls.ButtonEx btnOpUser; + private System.Windows.Forms.Label label30; + private System.Windows.Forms.Label label31; + private System.Windows.Forms.TextBox txtRePass; + private System.Windows.Forms.Label label32; + private System.Windows.Forms.Label label33; + private System.Windows.Forms.Label label34; + private System.Windows.Forms.Label label35; + private System.Windows.Forms.Label label36; + private System.Windows.Forms.ComboBox cmbGroup; + private System.Windows.Forms.Label label37; + private System.Windows.Forms.TextBox txtPassword; + private System.Windows.Forms.Label label38; + private System.Windows.Forms.TextBox txtMobile; + private System.Windows.Forms.Label label39; + private System.Windows.Forms.TextBox txtNickName; + private System.Windows.Forms.Label label40; + private UserComponent.DataGridViewEx dgvUser; + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox txtCompany; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox txtSearch; + private System.Windows.Forms.ComboBox cmbSearchGroup; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label lblWatermark; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.ComboBox cmbSaLevel; + private System.Windows.Forms.DataGridViewTextBoxColumn UserIdColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn UserNickNameColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn mobileColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn groupIdColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn groupNameColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn colCompany; + private System.Windows.Forms.DataGridViewTextBoxColumn shopCountColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn colSaLevel; + private System.Windows.Forms.DataGridViewTextBoxColumn colSaLevelName; + private System.Windows.Forms.DataGridViewLinkColumn editColumn; + private System.Windows.Forms.DataGridViewLinkColumn deleteColumn; + } +} \ No newline at end of file diff --git a/TEMUKJD/DYForms/AdminForms/DYAdminAccountForm.cs b/TEMUKJD/DYForms/AdminForms/DYAdminAccountForm.cs new file mode 100644 index 0000000..6b0966a --- /dev/null +++ b/TEMUKJD/DYForms/AdminForms/DYAdminAccountForm.cs @@ -0,0 +1,277 @@ +using AllBase; +using AllBase.Model.Result; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using TemuKJD.BaseForms; +using Work; + +namespace TemuKJD.DYForms.AdminForms +{ + public partial class DYAdminAccountForm + : BaseForm + { + public static List AllUsers { get; set; } = new List(); + public MainForm Mf { get; set; } = null; + public string Uid { get; set; } = ""; + + public DYAdminAccountForm() + { + InitializeComponent(); + } + + private void btnOpUser_Click(object sender, EventArgs e) + { + if (txtPassword.Text != txtRePass.Text) + { + BaseMsgForm.ShowInfo("两次密码不正确", "提示"); + return; + } + if (btnOpUser.Text == "添加用户" && txtPassword.Text.Length < 6) + { + BaseMsgForm.ShowInfo("密码最少6位", "提示"); + return; + } + if (string.IsNullOrEmpty(txtNickName.Text) || string.IsNullOrEmpty(txtMobile.Text) || + txtMobile.Text.Length != 11) + { + BaseMsgForm.ShowInfo("信息不正确", "提示"); + return; + } + + StringBuilder data = new StringBuilder(); + data.Append(UserLogin.GetSignaturex()); + data.Append("&add_nick_name=" + GetHtml.UrlEncodeUtf8(txtNickName.Text)); + data.Append("&add_user_name=" + GetHtml.UrlEncodeUtf8(txtMobile.Text)); + data.Append("&add_mobile=" + GetHtml.UrlEncodeUtf8(txtMobile.Text)); + data.Append("&add_company=" + GetHtml.UrlEncodeUtf8(txtCompany.Text)); + data.Append("&card_id="); + if (cmbGroup.Text == "主账户") + { + data.Append("&group_id=3"); + } + else if(cmbGroup.Text == "客服") + { + data.Append("&group_id=4"); + } + else + { + BaseMsgForm.ShowInfo("分组不正确", "提示"); + return; + } + if (!string.IsNullOrEmpty(txtPassword.Text)) + data.Append("&add_password=" + Md5Base.GetMd5(txtPassword.Text).ToLower()); + if (cmbSaLevel.Text=="一级超管") + data.Append("&sa_level=1"); + else if (cmbSaLevel.Text == "二级超管") + data.Append("&sa_level=2"); + else + data.Append("&sa_level=0"); + string url = BaseClass.BuildObjString("user/add_user"); + if (btnOpUser.Text != "添加用户" && !string.IsNullOrEmpty(Uid)) + { + data.Append("&id=" + Uid); + url = BaseClass.BuildObjString("user/update_user"); + } + string html = GetHtml.PostUtf8(url, data.ToString()).Trim(); + + if (!string.IsNullOrEmpty(html)) + { + if (html.Contains("\"code\":200")) + { + btnOpUser.Text = "添加用户"; + EmptyInput(); + btnCancel.Visible = false; + GetUser(); + return; + } + var msg = BaseRegex.GetStringJson(ref html, "msg"); + if (string.IsNullOrEmpty(msg)) + msg = html; + BaseMsgForm.ShowError(msg, "错误"); + return; + } + BaseMsgForm.ShowError("出现异常,添加失败", "错误"); + } + + private void GetUser() + { + dgvUser.Rows.Clear(); + AllUsers.Clear(); + string url = BaseClass.BuildObjString("user/get_all_user"); + StringBuilder data = new StringBuilder(); + data.Append(UserLogin.GetSignaturex()); + if (cmbSearchGroup.Text == "主账户") + { + data.Append("&group_id=3"); + } + else if (cmbSearchGroup.Text == "客服") + { + data.Append("&group_id=4"); + } + if (!string.IsNullOrWhiteSpace(txtSearch.Text)) + data.Append("&search=" + txtSearch.Text.Replace("'","'")); + string html = GetHtml.PostUtf8(url, data.ToString()); + if (string.IsNullOrEmpty(html)) + return; + if (html.Contains("\"data\"")) + { + var userObj = Newtonsoft.Json.Linq.JObject.Parse(html); + foreach (Newtonsoft.Json.Linq.JObject obj in userObj["data"]) + { + string oStr = JsonHelper.SerializeObject(obj); + ShopSubAccountInfo user = new ShopSubAccountInfo(); + user.id = BaseRegex.GetIntJson(ref oStr, "id"); + user.user_name = BaseRegex.GetStringJson(ref oStr, "user_name"); + user.nick_name = BaseRegex.GetStringJson(ref oStr, "nick_name"); + user.mobile = BaseRegex.GetStringJson(ref oStr, "mobile"); + user.group_id = BaseRegex.GetStringJson(ref oStr, "group_id"); + 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"); + + AllUsers.Add(user); + dgvUser.Rows.Add( + user.id, + user.nick_name, + user.user_name, + user.group_id, + user.group_name, + user.company_name, + user.shop_count, + user.sa_level, + user.sa_level_name, + "编辑", + "删除"); + } + } + } + + private void btnCancel_Click(object sender, EventArgs e) + { + btnOpUser.Text = "添加用户"; + Uid = ""; + EmptyInput(); + btnCancel.Visible = false; + } + + private void EmptyInput() + { + txtNickName.Clear(); + txtPassword.Clear(); + txtRePass.Clear(); + txtMobile.Clear(); + txtCompany.Clear(); + cmbGroup.Text = "主账户"; + cmbSaLevel.Text = "普通用户"; + } + + private void btnRefresh_Click(object sender, EventArgs e) + { + GetUser(); + } + + private void dgvUser_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex < 0 || e.RowIndex < 0) + return; + string columname = dgvUser.Columns[e.ColumnIndex].HeaderText; + string uid = dgvUser.Rows[e.RowIndex].Cells["UseridColumn"].Value.ToString(); + string nickName = dgvUser.Rows[e.RowIndex].Cells["UserNickNameColumn"].Value.ToString(); + string mobile = dgvUser.Rows[e.RowIndex].Cells["mobileColumn"].Value.ToString(); + 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(); + if (columname == "编辑") + { + Uid = uid; + txtNickName.Text = nickName; + txtMobile.Text = mobile; + cmbGroup.Text = groupName; + txtPassword.Text = ""; + txtRePass.Text = ""; + txtCompany.Text = company; + btnOpUser.Text = "保存用户"; + btnCancel.Visible = true; + cmbSaLevel.Text = saLevelName; + } + if (columname == "删除") + { + if (BaseMsgForm.ShowConfirm("是否删除,删除后无法再次添加", "提示").DialogResult == DialogResult.OK) + { + Delete(uid); + } + } + } + + public void Delete(string uid) + { + StringBuilder data = new StringBuilder(); + data.Append(UserLogin.GetSignaturex()); + data.Append("&id=" + uid); + string url = BaseClass.BuildObjString("user/delete_user"); + string html = GetHtml.PostUtf8(url, data.ToString()); + if (!string.IsNullOrEmpty(html)) + { + if (html.Contains("\"code\":200")) + { + BaseMsgForm.ShowInfo("删除成功", "提示"); + GetUser(); + return; + } + var msg = BaseRegex.GetStringJson(ref html, "msg"); + if (string.IsNullOrEmpty(msg)) + msg = html; + BaseMsgForm.ShowError(msg, "错误"); + return; + } + BaseMsgForm.ShowError("返回异常", "错误"); + } + + private void MainAccountForm_VisibleChanged(object sender, EventArgs e) + { + if (this.Visible) + { + GetUser(); + } + } + + private void MainAccountForm_Load(object sender, EventArgs e) + { + this.cmbGroup.Items.Clear(); + this.cmbGroup.Items.Add("主账户"); + this.cmbGroup.Items.Add("客服"); + + this.cmbSearchGroup.Items.Clear(); + this.cmbSearchGroup.Items.Add("主账户"); + this.cmbSearchGroup.Items.Add("客服"); + this.cmbSearchGroup.Items.Add("全部"); + + this.txtSearch.GotFocus += TxtSearch_GotFocus; + this.txtSearch.LostFocus += TxtSearch_LostFocus; + } + + private void TxtSearch_LostFocus(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.txtSearch.Text)) + lblWatermark.Visible = true; + } + + private void TxtSearch_GotFocus(object sender, EventArgs e) + { + lblWatermark.Visible = false; + } + + private void lblWatermark_Click(object sender, EventArgs e) + { + this.txtSearch.Focus(); + this.lblWatermark.Visible = false; + } + } +} diff --git a/TEMUKJD/DYForms/AdminForms/DYAdminAccountForm.resx b/TEMUKJD/DYForms/AdminForms/DYAdminAccountForm.resx new file mode 100644 index 0000000..c3a4499 --- /dev/null +++ b/TEMUKJD/DYForms/AdminForms/DYAdminAccountForm.resx @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + \ No newline at end of file diff --git a/TEMUKJD/DYForms/AdminForms/DYAdminForm.Designer.cs b/TEMUKJD/DYForms/AdminForms/DYAdminForm.Designer.cs new file mode 100644 index 0000000..5215dd0 --- /dev/null +++ b/TEMUKJD/DYForms/AdminForms/DYAdminForm.Designer.cs @@ -0,0 +1,193 @@ +namespace TemuKJD.DYForms.AdminForms +{ + partial class DYAdminForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("超级店铺管理"); + System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("超级用户管理"); + System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("产品数据库"); + System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("SKU替换图"); + 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 treeNode9 = new System.Windows.Forms.TreeNode("超级权限管理", new System.Windows.Forms.TreeNode[] { + treeNode1, + treeNode2, + treeNode3, + treeNode4, + treeNode5, + treeNode6, + treeNode7, + treeNode8}); + this.panel1 = new System.Windows.Forms.Panel(); + this.panel3 = new System.Windows.Forms.Panel(); + this.panel2 = new System.Windows.Forms.Panel(); + this.lblName = new System.Windows.Forms.Label(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.tv = new TemuKJD.UserComponent.UcTreeView(); + this.panel1.SuspendLayout(); + this.panel2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.panel3); + this.panel1.Controls.Add(this.panel2); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(792, 446); + this.panel1.TabIndex = 2; + // + // panel3 + // + this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel3.Location = new System.Drawing.Point(0, 28); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(792, 418); + this.panel3.TabIndex = 1; + // + // panel2 + // + this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244))))); + this.panel2.Controls.Add(this.lblName); + this.panel2.Dock = System.Windows.Forms.DockStyle.Top; + this.panel2.Location = new System.Drawing.Point(0, 0); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(792, 28); + this.panel2.TabIndex = 0; + // + // lblName + // + this.lblName.AutoSize = true; + this.lblName.Location = new System.Drawing.Point(5, 6); + this.lblName.Name = "lblName"; + this.lblName.Size = new System.Drawing.Size(57, 17); + this.lblName.TabIndex = 0; + this.lblName.Text = "lblName"; + // + // splitContainer1 + // + this.splitContainer1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.tv); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.panel1); + this.splitContainer1.Size = new System.Drawing.Size(933, 446); + this.splitContainer1.SplitterDistance = 140; + this.splitContainer1.SplitterWidth = 1; + this.splitContainer1.TabIndex = 3; + // + // tv + // + this.tv.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(251)))), ((int)(((byte)(251)))), ((int)(((byte)(251))))); + this.tv.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.tv.ChildNodeSelectedBgColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.tv.Cursor = System.Windows.Forms.Cursors.Hand; + this.tv.Dock = System.Windows.Forms.DockStyle.Fill; + this.tv.DrawMode = System.Windows.Forms.TreeViewDrawMode.OwnerDrawAll; + this.tv.ExpandButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.tv.FullRowSelect = true; + this.tv.GroupBgColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249))))); + this.tv.GroupFont = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tv.GroupTitleColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80))))); + this.tv.HideCollapsedGroup = false; + this.tv.ItemHeight = 32; + this.tv.Location = new System.Drawing.Point(0, 0); + this.tv.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.tv.Name = "tv"; + treeNode1.Name = "超级店铺管理"; + treeNode1.Text = "超级店铺管理"; + treeNode2.Name = "超级用户管理"; + treeNode2.Text = "超级用户管理"; + treeNode3.Name = "产品数据库"; + treeNode3.Text = "产品数据库"; + treeNode4.Name = "SKU替换图"; + treeNode4.Text = "SKU替换图"; + treeNode5.Name = "选品加价管理"; + treeNode5.Text = "选品加价管理"; + treeNode6.Name = "认领待上传"; + treeNode6.Text = "认领待上传"; + treeNode7.Name = "库存上传"; + treeNode7.Text = "库存上传"; + treeNode8.Name = "商品核价"; + treeNode8.Text = "商品核价"; + treeNode9.Name = "超级权限管理"; + treeNode9.Text = "超级权限管理"; + this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { + treeNode9}); + this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.tv.Size = new System.Drawing.Size(140, 446); + this.tv.TabIndex = 1; + this.tv.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tv_AfterSelect); + // + // PDDAdminForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.ClientSize = new System.Drawing.Size(933, 446); + this.Controls.Add(this.splitContainer1); + this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.Name = "PDDAdminForm"; + this.Text = "AdminForm"; + this.Load += new System.EventHandler(this.ShopForm_Load); + this.panel1.ResumeLayout(false); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private UserComponent.UcTreeView tv; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Label lblName; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.SplitContainer splitContainer1; + } +} \ No newline at end of file diff --git a/TEMUKJD/DYForms/AdminForms/DYAdminForm.cs b/TEMUKJD/DYForms/AdminForms/DYAdminForm.cs new file mode 100644 index 0000000..2d58c8d --- /dev/null +++ b/TEMUKJD/DYForms/AdminForms/DYAdminForm.cs @@ -0,0 +1,160 @@ +using AllBase; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using TemuKJD.BaseForms; +using TemuKJD.PDDForms.ProductSelectForms; + +namespace TemuKJD.DYForms.AdminForms +{ + public partial class DYAdminForm : BaseForm + { + public Lazy adminAccountForm = new Lazy(); + //public Lazy adminShopForm = new Lazy(); + //public Lazy dbProdListForm = new Lazy(); + //public Lazy dbProdImgListForm = new Lazy(); + + public DYAdminForm() + { + InitializeComponent(); + + try + { + tv.SelectedNode = tv.Nodes[0].Nodes[0]; + tv.ExpandGroup(tv.Nodes[0].Name); + + List hideName = new List() { "超级用户管理", "超级店铺管理", "产品数据库", "SKU替换图", "选品加价管理", "认领待上传", "库存上传", "商品核价" }; + + if (BaseClass.GroupId == 3) + { + /*BaseClass.UserName == "18888888888" || BaseClass.UserName == "15333333333"*/ + if (BaseClass.SaLevel==1) + { + hideName.Remove("超级用户管理"); + hideName.Remove("超级店铺管理"); + hideName.Remove("产品数据库"); + hideName.Remove("SKU替换图"); + } + if (BaseClass.SaLevel==2) + { + hideName.Remove("超级店铺管理"); + } + } + + foreach (var item in hideName) + { + var n = tv.Nodes[0].Nodes.Find(item, true); + if (n.Count() > 0) + n[0].Remove(); + } + } + catch { } + } + + private void tv_AfterSelect(object sender, TreeViewEventArgs e) + { + MainForm.sCurrentModule = e.Node.Name; + this.lblName.Text = e.Node.Text; + // 如果是一级菜单,不做任何动作 + if (e.Node.Parent == null) return; + //new Thread(() => + //{ + //Thread.Sleep(200); + //Invoke(new Action(() => + //{ + switch (e.Node.Name) + { + case "超级用户管理": + SetForm(adminAccountForm.Value); + break; + //case "超级店铺管理": + // SetForm(adminShopForm.Value); + // break; + //case "产品数据库": + // SetForm(dbProdListForm.Value); + // break; + //case "SKU替换图": + // SetForm(dbProdImgListForm.Value); + // break; + } + //})); + //}).Start(); + } + + /// + /// 显示隐藏层 + /// + /// + private void SetForm(Form f) + { + if (f == null) + { + foreach (Control form in panel3.Controls) + { + form.Visible = false; + if (form is Form) + { + panel3.Controls.Remove(form as Form); + } + } + return; + } + + bool had = false; + string sCurrentFormName = f.Name; + for (int i = 0; i < panel3.Controls.Count; i++) + { + if (sCurrentFormName == panel3.Controls[i].Name) + { + had = true; + panel3.Controls[i].Visible = true; + } + else + { + panel3.Controls[i].Visible = false; + } + } + if (had) + { + f = null; + return; + } + f.TopLevel = false; + f.Left = 0; + f.Top = 0; + f.FormBorderStyle = FormBorderStyle.None; + panel3.Controls.Add(f); + f.AutoSize = true; + f.Dock = DockStyle.Fill; + f.Show(); + } + + private void ShopForm_Load(object sender, EventArgs e) + { + try + { + var ns = tv.Nodes.Find("运费模板", true); + if (ns.Count() > 0) + { + //foreach (var n in ns) + //{ + // tv.Nodes.Remove(n); + //} + + if (AllBase.BaseClass.IsCloudBuyOrder) + this.tv.Nodes[0].Nodes.Insert(ns[0].Index + 1, new TreeNode() { Text = "高级运费模板", Name = "高级运费模板" }); + } + tv.SelectedNode = tv.Nodes[0].Nodes[0]; + tv.ExpandGroup(tv.Nodes[0].Name); + } + catch { } + } + } +} diff --git a/TEMUKJD/DYForms/AdminForms/DYAdminForm.resx b/TEMUKJD/DYForms/AdminForms/DYAdminForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/TEMUKJD/DYForms/AdminForms/DYAdminForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/TEMUKJD/DYForms/AdminForms/DYAdminShopAddSubSaForm.Designer.cs b/TEMUKJD/DYForms/AdminForms/DYAdminShopAddSubSaForm.Designer.cs new file mode 100644 index 0000000..5221268 --- /dev/null +++ b/TEMUKJD/DYForms/AdminForms/DYAdminShopAddSubSaForm.Designer.cs @@ -0,0 +1,195 @@ + +namespace TemuKJD.DYForms.AdminForms +{ + partial class DYAdminShopAddSubSaForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DYAdminShopAddSubSaForm)); + this.panel2 = new System.Windows.Forms.Panel(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.dgvSaUser = new TemuKJD.UserComponent.DataGridViewEx(); + this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colSubSaId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSubUserName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSubSaName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.btnOk = new TemuKJD.UserControls.ButtonEx(); + this.panel2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dgvSaUser)).BeginInit(); + this.SuspendLayout(); + // + // panel2 + // + this.panel2.BackColor = System.Drawing.Color.White; + this.panel2.Controls.Add(this.splitContainer1); + 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(391, 506); + this.panel2.TabIndex = 1; + // + // splitContainer1 + // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.dgvSaUser); + this.splitContainer1.Panel1.Padding = new System.Windows.Forms.Padding(4); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.btnOk); + this.splitContainer1.Size = new System.Drawing.Size(391, 506); + this.splitContainer1.SplitterDistance = 464; + this.splitContainer1.TabIndex = 190; + // + // dgvSaUser + // + this.dgvSaUser.AllowUserToAddRows = false; + this.dgvSaUser.AllowUserToDeleteRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvSaUser.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.dgvSaUser.BackgroundColor = System.Drawing.Color.White; + this.dgvSaUser.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvSaUser.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.dgvSaUser.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvSaUser.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.colSelect, + this.colSubSaId, + this.colSubUserName, + this.colSubSaName}); + this.dgvSaUser.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvSaUser.Location = new System.Drawing.Point(4, 4); + this.dgvSaUser.Name = "dgvSaUser"; + this.dgvSaUser.ReadOnly = true; + this.dgvSaUser.RowHeadersWidth = 51; + this.dgvSaUser.RowTemplate.Height = 23; + this.dgvSaUser.Size = new System.Drawing.Size(383, 456); + this.dgvSaUser.TabIndex = 189; + this.dgvSaUser.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvSaUser_CellContentClick); + // + // colSelect + // + this.colSelect.HeaderText = "选择"; + this.colSelect.MinimumWidth = 6; + 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 = 30; + // + // colSubSaId + // + this.colSubSaId.HeaderText = "二级超管Id"; + this.colSubSaId.MinimumWidth = 6; + this.colSubSaId.Name = "colSubSaId"; + this.colSubSaId.ReadOnly = true; + this.colSubSaId.Visible = false; + this.colSubSaId.Width = 125; + // + // colSubUserName + // + this.colSubUserName.HeaderText = "昵称"; + this.colSubUserName.Name = "colSubUserName"; + this.colSubUserName.ReadOnly = true; + this.colSubUserName.Width = 150; + // + // colSubSaName + // + this.colSubSaName.HeaderText = "账户"; + this.colSubSaName.Name = "colSubSaName"; + this.colSubSaName.ReadOnly = true; + this.colSubSaName.Width = 150; + // + // btnOk + // + this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnOk.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnOk.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnOk.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnOk.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnOk.ForeColor = System.Drawing.Color.White; + this.btnOk.Location = new System.Drawing.Point(321, 1); + this.btnOk.Margin = new System.Windows.Forms.Padding(2); + this.btnOk.Name = "btnOk"; + this.btnOk.Size = new System.Drawing.Size(66, 26); + this.btnOk.TabIndex = 374; + this.btnOk.Text = "确定"; + this.btnOk.UseVisualStyleBackColor = false; + this.btnOk.Click += new System.EventHandler(this.btnOk_Click); + // + // AdminShopAddSubSaForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(393, 540); + this.Controls.Add(this.panel2); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "AdminShopAddSubSaForm"; + this.Text = "指定二级超管"; + this.TitleText = "指定二级超管"; + this.Load += new System.EventHandler(this.AdminShopAddSubSaForm_Load); + this.Controls.SetChildIndex(this.panel2, 0); + this.panel2.ResumeLayout(false); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dgvSaUser)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel2; + private UserComponent.DataGridViewEx dgvSaUser; + private System.Windows.Forms.SplitContainer splitContainer1; + private UserControls.ButtonEx btnOk; + private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect; + private System.Windows.Forms.DataGridViewTextBoxColumn colSubSaId; + private System.Windows.Forms.DataGridViewTextBoxColumn colSubUserName; + private System.Windows.Forms.DataGridViewTextBoxColumn colSubSaName; + } +} \ No newline at end of file diff --git a/TEMUKJD/DYForms/AdminForms/DYAdminShopAddSubSaForm.cs b/TEMUKJD/DYForms/AdminForms/DYAdminShopAddSubSaForm.cs new file mode 100644 index 0000000..dee020e --- /dev/null +++ b/TEMUKJD/DYForms/AdminForms/DYAdminShopAddSubSaForm.cs @@ -0,0 +1,122 @@ +using AllBase; +using AllBase.Model.Result; +using NaiBa.Util.Extension; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using TemuKJD.BaseForms; +using Work; + +namespace TemuKJD.DYForms.AdminForms +{ + public partial class DYAdminShopAddSubSaForm : LRBaseForm + { + List lstShopLoginName = new List(); + + List lstSubSa = new List(); + public DYAdminShopAddSubSaForm(List ShopSelectIds = null) + { + InitializeComponent(); + if (ShopSelectIds != null) + lstShopLoginName.AddRange(ShopSelectIds); + } + + private void btnOk_Click(object sender, EventArgs e) + { + var selectRow = this.dgvSaUser.Rows.Cast().FirstOrDefault(r => r.Cells["colSelect"]?.Value.ParseToBool() == true); + if (selectRow == null) + { + BaseMsgForm.ShowError("请选择要分配的二级管理员!"); + return; + } + var sub_sa = selectRow.Cells["colSubSaName"].Value.ParseToString(); + + StringBuilder data = new StringBuilder(); + data.Append(UserLogin.GetSignaturex()); + data.Append("&shop_login_name=" + string.Join(",", lstShopLoginName)); + data.Append("&operate_sub_sa_name=" + sub_sa); + string url = BaseClass.BuildObjString("shop/set_shop_sub_sa"); + string html = GetHtml.PostUtf8(url, data.ToString()).Trim(); + if (!string.IsNullOrEmpty(html)) + { + if (html.Contains("\"code\":200")) + { + OnSaveComplete(sub_sa); + this.Close(); + } + else + { + var msg = BaseRegex.GetStringJson(ref html, "msg"); + if (string.IsNullOrEmpty(msg)) + msg = html; + BaseMsgForm.ShowError(msg, "错误"); + } + } + else + BaseMsgForm.ShowError("未知错误,请重试!", "错误"); + } + + private void AdminShopAddSubSaForm_Load(object sender, EventArgs e) + { + dgvSaUser.Rows.Clear(); + lstSubSa.Clear(); + string url = BaseClass.BuildObjString("user/get_all_user"); + StringBuilder data = new StringBuilder(); + data.Append(UserLogin.GetSignaturex()); + data.Append("&sa_level=2"); + string html = GetHtml.PostUtf8(url, data.ToString()); + if (string.IsNullOrEmpty(html)) + return; + if (html.Contains("\"data\"")) + { + var userObj = Newtonsoft.Json.Linq.JObject.Parse(html); + foreach (Newtonsoft.Json.Linq.JObject obj in userObj["data"]) + { + string oStr = JsonHelper.SerializeObject(obj); + ShopSubAccountInfo user = new ShopSubAccountInfo(); + user.id = BaseRegex.GetIntJson(ref oStr, "id"); + user.user_name = BaseRegex.GetStringJson(ref oStr, "user_name"); + user.nick_name = BaseRegex.GetStringJson(ref oStr, "nick_name"); + user.mobile = BaseRegex.GetStringJson(ref oStr, "mobile"); + user.group_id = BaseRegex.GetStringJson(ref oStr, "group_id"); + 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"); + + lstSubSa.Add(user); + dgvSaUser.Rows.Add( + false, + user.id, + user.nick_name, + user.user_name); + } + } + } + + private void dgvSaUser_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + + if (e.ColumnIndex < 0 || e.RowIndex < 0) + return; + + //string columnName = dgvSaUser.Columns[e.ColumnIndex].Name; + //switch (columnName) + //{ + // case "colSelect": + var value = dgvSaUser.Rows[e.RowIndex].Cells["colSelect"].Value; + foreach (DataGridViewRow row in this.dgvSaUser.Rows) + row.Cells["colSelect"].Value = false; + dgvSaUser.Rows[e.RowIndex].Cells["colSelect"].Value = !(bool)value; + // break; + // default: + // break; + //} + } + } +} diff --git a/TEMUKJD/DYForms/AdminForms/DYAdminShopAddSubSaForm.resx b/TEMUKJD/DYForms/AdminForms/DYAdminShopAddSubSaForm.resx new file mode 100644 index 0000000..3867fb5 --- /dev/null +++ b/TEMUKJD/DYForms/AdminForms/DYAdminShopAddSubSaForm.resx @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + True + + + + + AAABAAEAgIAQAAAAAABoKAAAFgAAACgAAACAAAAAAAEAAAEABAAAAAAAACgAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP// + AAD///8AAAAAAAAAAAAAAAAzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMQ + AAAAAAAAAAAAAAAAAAAAAAAAABM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZkzEAAAAAAAAAAAAAAAAAAAAAADOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZMwAAAAAAAAAAAAAAAAAAABOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZkzAAAAAAAAAAAAAAAAAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmTEAAAAAAAAAAAAAAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAAAAAAAA5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAAAAAADmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAAAAAOZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAAAA5mZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAADmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAGZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAJmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZAAAAAA + OZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmT + AAAAAZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmRAAAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZkwAAAZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZkwAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZMAAJmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZEAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTADmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkwCZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkRmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZOZmZOZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmP+JmZmZmZmZj/////// + ///4OZmZj/eZmZmZmZmZmPg5OZmZmZuI//iIuZmZmZmZmZmZmZM5mZmZmZmZmZmZmb//+JmZmZmZmP// + //////////OZmP//uZmZmZmZmY//+ZmZOZf///////h5k5mZmZmZmZmTOZmZmZmZmZmZmZmP//iZmZmZ + mZ/////////////4mZ///4mZmZmZmZP///uZmZmP////////+JmZmZmZmZmZkzmZmZmZmZmZmZmZj//4 + mZmZmZmf////////////+Jmf//+JmZmZmZmb///4mZmY//////////+JmZmZmZmZmZM5mZmZmZmZmZmZ + mY//+JmZmZmZn/////////////mZmP//iZmZmZmZk///+5mZj/////iP////+JmZmZmZmZmTOZmZmZmZ + mZmZmZmP//iZmZmZmZ////iIiIiIiIiZOZj//4mZmZmZmZP///uZmf////eZmT////+ZmZmZmZmZkzmZ + mZmZmZmZmZmZj//4mZmZmZmf//+JmZmZmZmZk5mY//+JmZmZmZmT///7mZj///+ZmZmZj///uZmZmZmZ + mZM5mZmZmZmZmZmZmY//+JmZmZmZn///iZmZmZmZmZmZmP//iZmZN5k5k///+5mY///zk5mZOT///4mZ + mZmZmZmTOZmZmZmZmZmZmZmP//iZmZmZmZ///4mZmZmZmZmZmZj//4mZmP/5k5P///uZmP//+ZmZmZmY + //+JmZmZmZmZkzmZmZmZmZmZmZmZj//4mZmZmZmf///4iIiIiIg5mZmY//+JOb//+JmT///7mZj//4mZ + mZmZmP//+ZmZmZmZmZM5mZmZmZmZmZmZmY//+JmZmZmZn///////////85mZmP//iZn///+Jk///+5mf + //+JmZmZmZj///mZmZmZmZmTOZmZmZmZmZmZmZmP//iZmZmZmZ////////////+ZmZj//4mY////85v/ + //uZmP//iZmZmZmY///5mZmZmZmZkzmZmZmZmZmZmZmZj//4mZmZmZmf////////////mZmY//+Jv/// + //+Z///7mZj//4mZmZmZmP//+ZmZmZmZmZM5mZmZmZmZmZmZmY//+JmZmZmZn///////////+JmZmP// + if//////if//+5mY//+JmZmZmZj///mZmZmZmZmTOZmZmZmZmZmZmZmP//iZmZmZmZ///////////4mZ + mZj//4j///////j///uZmP//iZmZmZmY///5mZmZmZmZkzmZmZmZmZmZmZmZj//4mZmZmZmf//+JMzMz + MzOZOZmY//////+D///////7mZj//4mZmZmZmP//+ZmZmZmZmZM5mZmZmZmZmZmZmY//+JmZmZmZn/// + iZmZmZmZmZmZmP//////mY//////+5mY//+JmZmZmZj///mZmZmZmZmTOZmZmZmZmZmZmZmP//iZmZmZ + mZ///4mZmZmZmZmZmZj/////+5mf//////uZmP//iZmZmZmY///5mZmZmZmZkzmZmZmZmZmZMzM5j//4 + kzMzmZmf//+JMzMzMzM5mZmY/////4mTk//////7mZj//4mZmZmZmP//+ZmZmZmZmZM5mZmZmZmZmP// + /////////4mZn////////////4mZmP////+ZmZmP////+5mY//+JmZmZmZj///mZmZmZmZmTOZmZmZmZ + mY/////////////4mZ/////////////7mZj////7mZmZn/////uZmP//iZmZmZmY///5mZmZmZmZkzmZ + mZmZmZn//////////////5mf////////////+Jmf////iZmZk5P////4mZ///4mZmZmZmP//+ZmZmZmZ + mZM5mZmZmZmZj/////////////iZn/////////////iZmP///5mZmZmZj///+5mY//+JmZmZmZj//4mZ + mZmZmZmTOZmZmZmZmZ/////////////zmZP///////////+JmZP///uTmZmZmZj//4mZm///mZmZmZmZ + //85mZmZmZmZkzmZmZmZmZOZiIiIiIiIiIiImTmZOIiIiIiIiIiImTmZOIi5mZmZmZOZiIuZmZk4iZOZ + mZmZOZiDmZmZmZmZmZM5mZmZmZmZOZmZmZmZmZmZmZOZmZmZmZmZmZmZmZOZmZmZmZmZmZmZOZmZmZmZ + mZk5mZmZmZOZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmTuIiIiIs5mZmZmZmZ + mTu4i7mZmZmZmZmZmTMzmZOZmZkzOZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmTmbj///////+HmT + mZmZk4j/////iJmZmZk4iP////iZOZmZj/mZOZOIiIiIiIiIiDmZmZmZmZmZkzmZmZmZmZmZj/////// + ///4mZk5k4///4iI///4OZOY////////iZOZmb/5mZmP///////////4mZmZmZmZmZM5mZmZmZmZn/// + //////////mZmY///5mZmZP///iZmP////////+ZOZk/iZmY/////////////4mZmZmZmZmTOZmZmZmZ + mZ/////////////5mZ////+JmZmY////iZl/////////+ZmZP4mZP//////////////7mZmZmZmZkzmZ + mZmZmZmb////////////uZP/j///+HM3j/////+ZmYj///////iZmT+JmY//////////////+JmZmZmZ + mZM5mZmZmZmZmY//////////+JmT+Jv///////////iPmTmZOI/4mP//uTk/iZmP//////////////iZ + mZmZmZmTOZmZmZmZmZmf//////////mZmZmZ///////////5mZmZmZmTOZk///mZP4mZj/////////// + ///4mZmZmZmZkzmZmZmZmZmTmP////////+JOZmZOY//////////iZmZmZmZmZk5mf/4mT+JmY////// + ////////+JmZmZmZmZM5mZmZmZmZmZn/////////mZmZmZk//////////zmZmZmZmZmZmTmP/zm/iZmP + //////////////iZmZmZmZmTOZmZmZmZmZk5v///////85OZmZkzmP////////iZmZmZmZmZmZmZn//4 + /4mZj/////hzN4/////4mZmZmZmZkzmZmZmZmZmZmZj//////4mZmTmY/4j////////4mZmZmZmZmZmZ + mZj///+JmY////+JmZmY////+JmZmZmZmZM5mZmZmZmZmZmZ//////+ZmZmZj////////////4mZmZmZ + mZmZmZmb////+ZmP///4mZu5mY////iZmZmZmZmTOZmZmZmZmZmZOb/////4k5mZmP/////////////7 + mZmZmZmZmZmZk/////OZv///+ZmP+Jmf///4mZmZmZmZkzmZmZmZmZmZmZmf////+ZmZmZj////////4 + eI//+JmZmZmZmZmZmZP////4mb///4mY//+JmP//+5mZmZmZmZM5mZmZmZmZmZk5v/////uTmZmb//// + ///4mZmX//iZmZmZmZmZmZmZ////+Jmf//95n///+Zj///OZmZmZmZmTOZmZmZmZmZmZmf//////mZmZ + mY//////+ZOZmZiJmZmZmZmZmZmZmY////+ZmP//+I////iP//+JmZmZmZmZkzmZmZmZmZmZmZj///// + /4mZmZmf/////5k5mZOZmTmZmZmZmZmZmZmP///4mZP/////////////OZmZmZmZmZM5mZmZmZmZmZk/ + ///////zmZmZm/////iZmZmZmZmZmZmZmZmZmZmZj///85mZj///////////+JmZmZmZmZmTOZmZmZmZ + mZmZv///////+5mZmZmP///5mZmZmZmZmZmZmZmZmZmZmZ///3mZmZj//////////4mZmZmZmZmZkzmZ + mZmZmZmZmb///4j///uZmZmZmP//mTmZmZmZmZmZmZmZmZmZmZmY/4OZmZmZeP///////4eZmZmZmZmZ + mZM5mZmZmZmZmZmY/4OZOP+JmZmZmZmIiZOZmZmZmZmZmZmZmZmZmZmZmYiZmZmZmZk4iIiIiIOZmZmZ + mZmZmZmTOZmZmZmZmZmZmTOZmZkzmZmZmZmZmZk5mZmZmZmZmZmZmZmZmZmZmZmZk5mZmZmZmZmZmZmZ + mZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZM5mZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTOZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkzmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZM5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmTGZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZkwmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZADmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZkwA5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZMACZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmQAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAABmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTAAADmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAJmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmRAAAAA5mZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAACZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmQAAAAAAGZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZMAAAAAAAOZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZkwAAAAAA + AAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTAA + AAAAAAAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZMAAAAAAAAAAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZkwAAAAAAAAAAAAOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmTAAAAAAAAAAAAAAGZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZEAAAAAAAAAAAAAAAA5mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZMAAAAAAAAAAAAAAAAAATmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZMQAAAAAAAAAAAAAAAAAAABOZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZMQAAAAAAAAAAAAAAAAAAAAAAAzmZmZmZmZmZmZmZmZmZmZmZmZmZ + mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmTMAAAAAAAAAAAAAAAAAAAAAAAAAAAEzMzMzMzMzMzMzMzMzMz + MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxAAAAAAAAAAAAAAD////////////////////////4AAAA + AAAAAAAAAB//////wAAAAAAAAAAAAAAD/////wAAAAAAAAAAAAAAAP////wAAAAAAAAAAAAAAAA////w + AAAAAAAAAAAAAAAAD///4AAAAAAAAAAAAAAAAAf//8AAAAAAAAAAAAAAAAAD//+AAAAAAAAAAAAAAAAA + Af//AAAAAAAAAAAAAAAAAAD//gAAAAAAAAAAAAAAAAAAf/wAAAAAAAAAAAAAAAAAAD/4AAAAAAAAAAAA + AAAAAAAf+AAAAAAAAAAAAAAAAAAAH/AAAAAAAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAP4AAAAAAA + AAAAAAAAAAAAB+AAAAAAAAAAAAAAAAAAAAfAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAA8AA + AAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAA + AAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAA + AAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAA + AAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAA + AAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAA + AAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAA + AAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAA + AAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAA + AAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAA + AAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAA + AAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA + AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA + AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABgAAAAAAA + AAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAAAAAAAAAAAD4AAAAAAAAAAAAAAAAAAAA+AA + AAAAAAAAAAAAAAAAAAfgAAAAAAAAAAAAAAAAAAAH8AAAAAAAAAAAAAAAAAAAD/AAAAAAAAAAAAAAAAAA + AA/4AAAAAAAAAAAAAAAAAAAf/AAAAAAAAAAAAAAAAAAAH/wAAAAAAAAAAAAAAAAAAD/+AAAAAAAAAAAA + AAAAAAB//wAAAAAAAAAAAAAAAAAA//+AAAAAAAAAAAAAAAAAAf//wAAAAAAAAAAAAAAAAAP//+AAAAAA + AAAAAAAAAAAH///4AAAAAAAAAAAAAAAAD////AAAAAAAAAAAAAAAAD////8AAAAAAAAAAAAAAAD///// + wAAAAAAAAAAAAAAD//////wAAAAAAAAAAAAAH////////////////////////w== + + + \ No newline at end of file diff --git a/TEMUKJD/InitForm.Designer.cs b/TEMUKJD/InitForm.Designer.cs index 8cac6d5..082d170 100644 --- a/TEMUKJD/InitForm.Designer.cs +++ b/TEMUKJD/InitForm.Designer.cs @@ -40,10 +40,13 @@ this.pbShopLoading = new System.Windows.Forms.PictureBox(); this.label1 = new System.Windows.Forms.Label(); this.progressBarX1 = new DevComponents.DotNetBar.Controls.ProgressBarX(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.rbDy = new System.Windows.Forms.RadioButton(); this.panel2.SuspendLayout(); this.panel4.SuspendLayout(); this.panel3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbShopLoading)).BeginInit(); + this.flowLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // // panel2 @@ -60,9 +63,7 @@ // panel4 // this.panel4.Controls.Add(this.btnOK); - this.panel4.Controls.Add(this.chkRemember); - this.panel4.Controls.Add(this.rbTemu); - this.panel4.Controls.Add(this.rbPdd); + this.panel4.Controls.Add(this.flowLayoutPanel1); this.panel4.Location = new System.Drawing.Point(4, 132); this.panel4.Name = "panel4"; this.panel4.Size = new System.Drawing.Size(256, 52); @@ -97,7 +98,8 @@ // chkRemember // this.chkRemember.AutoSize = true; - this.chkRemember.Location = new System.Drawing.Point(163, 0); + this.chkRemember.Location = new System.Drawing.Point(170, 0); + this.chkRemember.Margin = new System.Windows.Forms.Padding(0); this.chkRemember.Name = "chkRemember"; this.chkRemember.Size = new System.Drawing.Size(75, 21); this.chkRemember.TabIndex = 28; @@ -110,11 +112,11 @@ this.rbTemu.AutoSize = true; this.rbTemu.Checked = true; this.rbTemu.ForeColor = System.Drawing.SystemColors.InfoText; - this.rbTemu.Location = new System.Drawing.Point(31, 0); + this.rbTemu.Location = new System.Drawing.Point(0, 0); + this.rbTemu.Margin = new System.Windows.Forms.Padding(0); this.rbTemu.Name = "rbTemu"; this.rbTemu.Size = new System.Drawing.Size(58, 21); this.rbTemu.TabIndex = 26; - this.rbTemu.TabStop = true; this.rbTemu.Text = "Temu"; this.rbTemu.UseVisualStyleBackColor = true; this.rbTemu.CheckedChanged += new System.EventHandler(this.rbTemu_CheckedChanged); @@ -123,7 +125,8 @@ // this.rbPdd.AutoSize = true; this.rbPdd.ForeColor = System.Drawing.SystemColors.InfoText; - this.rbPdd.Location = new System.Drawing.Point(95, 0); + this.rbPdd.Location = new System.Drawing.Point(58, 0); + this.rbPdd.Margin = new System.Windows.Forms.Padding(0); this.rbPdd.Name = "rbPdd"; this.rbPdd.Size = new System.Drawing.Size(62, 21); this.rbPdd.TabIndex = 27; @@ -132,9 +135,9 @@ // // panel3 // - this.panel3.Controls.Add(this.pbShopLoading); this.panel3.Controls.Add(this.label1); this.panel3.Controls.Add(this.progressBarX1); + this.panel3.Controls.Add(this.pbShopLoading); this.panel3.Location = new System.Drawing.Point(4, 27); this.panel3.Name = "panel3"; this.panel3.Size = new System.Drawing.Size(257, 125); @@ -178,6 +181,30 @@ this.progressBarX1.TabStop = false; this.progressBarX1.Text = "progressBarX1"; // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.Controls.Add(this.rbTemu); + this.flowLayoutPanel1.Controls.Add(this.rbPdd); + this.flowLayoutPanel1.Controls.Add(this.rbDy); + this.flowLayoutPanel1.Controls.Add(this.chkRemember); + this.flowLayoutPanel1.Location = new System.Drawing.Point(4, 1); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(250, 48); + this.flowLayoutPanel1.TabIndex = 757; + // + // rbDy + // + this.rbDy.AutoSize = true; + this.rbDy.ForeColor = System.Drawing.SystemColors.InfoText; + this.rbDy.Location = new System.Drawing.Point(120, 0); + this.rbDy.Margin = new System.Windows.Forms.Padding(0); + this.rbDy.Name = "rbDy"; + this.rbDy.Size = new System.Drawing.Size(50, 21); + this.rbDy.TabIndex = 28; + this.rbDy.Text = "抖音"; + this.rbDy.UseVisualStyleBackColor = true; + this.rbDy.Visible = false; + // // InitForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -193,10 +220,11 @@ this.Controls.SetChildIndex(this.panel2, 0); this.panel2.ResumeLayout(false); this.panel4.ResumeLayout(false); - this.panel4.PerformLayout(); this.panel3.ResumeLayout(false); this.panel3.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbShopLoading)).EndInit(); + this.flowLayoutPanel1.ResumeLayout(false); + this.flowLayoutPanel1.PerformLayout(); this.ResumeLayout(false); } @@ -213,5 +241,7 @@ private System.Windows.Forms.RadioButton rbTemu; private DevComponents.DotNetBar.PanelEx btnOK; private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.RadioButton rbDy; } } \ No newline at end of file diff --git a/TEMUKJD/InitForm.cs b/TEMUKJD/InitForm.cs index 66daca7..ff34307 100644 --- a/TEMUKJD/InitForm.cs +++ b/TEMUKJD/InitForm.cs @@ -42,7 +42,10 @@ namespace TemuKJD initFormSettings = new InitFormSettings(); this.chkRemember.Checked = initFormSettings.Remember; this.rbTemu.Checked = initFormSettings.LoginType.ToLower() == "temu"; - this.rbPdd.Checked = initFormSettings.LoginType.ToLower() != "temu"; + this.rbPdd.Checked = initFormSettings.LoginType.ToLower() == "pdd"; + this.rbPdd.Checked = initFormSettings.LoginType.ToLower() == "dy"; + if (rbDy.Visible == false) + flowLayoutPanel1.Location = new Point(38, flowLayoutPanel1.Location.Y); Task.Run(() => { @@ -129,8 +132,10 @@ namespace TemuKJD string newLoginType; if (rbTemu.Checked) newLoginType = "Temu"; - else + else if (rbPdd.Checked) newLoginType = "Pdd"; + else + newLoginType = "Dy"; if (initFormSettings.LoginType != newLoginType) { isChangeType = true; diff --git a/TEMUKJD/KJD.csproj b/TEMUKJD/KJD.csproj index 7de2656..846f818 100644 --- a/TEMUKJD/KJD.csproj +++ b/TEMUKJD/KJD.csproj @@ -114,6 +114,7 @@ + @@ -124,6 +125,24 @@ ChangeForm.cs + + Form + + + DYAdminAccountForm.cs + + + Form + + + DYAdminForm.cs + + + Form + + + DYAdminShopAddSubSaForm.cs + @@ -366,6 +385,12 @@ DbProductUserSelectForm.cs + + UserControl + + + UcPropEdit.cs + Form @@ -897,6 +922,15 @@ ChangeForm.cs + + DYAdminAccountForm.cs + + + DYAdminForm.cs + + + DYAdminShopAddSubSaForm.cs + InitForm.cs @@ -1014,6 +1048,9 @@ DbProductUserSelectForm.cs + + UcPropEdit.cs + ProductThirdSelectAddShopForm.cs @@ -1377,7 +1414,9 @@ Work - + + + False diff --git a/TEMUKJD/KJDForms/AdminForms/AdminForm.cs b/TEMUKJD/KJDForms/AdminForms/AdminForm.cs index 53af649..161cd28 100644 --- a/TEMUKJD/KJDForms/AdminForms/AdminForm.cs +++ b/TEMUKJD/KJDForms/AdminForms/AdminForm.cs @@ -15,6 +15,7 @@ using TemuKJD.KJDForms.ProductSelectForms; using TemuKJD.KJDForms.ProductThirdSelectForms; using TemuKJD.KJDForms.ProductForms; using TemuKJD.KJDForms.JITForms; +using TemuKJD.BLL; namespace TemuKJD.KJDForms.AdminForms { @@ -109,14 +110,14 @@ namespace TemuKJD.KJDForms.AdminForms SetForm(dbPriceMarkUpForm.Value); break; case "认领待上传": - dbProductSelectListManageForm.Value.ClientMode = DbProductSelectListManageForm.EnumClientMode.Admin; + dbProductSelectListManageForm.Value.ClientMode = EnumClientMode.Admin; SetForm(dbProductSelectListManageForm.Value); break; case "库存上传": SetForm(productThirdSelectListManageForm.Value); break; case "商品核价": - adminProductPriceCheckForm.Value.ClientMode = AdminProductPriceCheckForm.EnumClientMode.Admin; + adminProductPriceCheckForm.Value.ClientMode = EnumClientMode.Admin; SetForm(adminProductPriceCheckForm.Value); break; case "加入发货台": diff --git a/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.cs b/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.cs index cd50523..fdc0b27 100644 --- a/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.cs +++ b/TEMUKJD/KJDForms/AdminForms/AdminProductPriceCheckForm.cs @@ -27,13 +27,6 @@ namespace TemuKJD.KJDForms.AdminForms { public partial class AdminProductPriceCheckForm : BaseForm { - public enum EnumClientMode - { - Admin, - Client, - ClientJit, - } - public EnumClientMode ClientMode { get; set; } = EnumClientMode.Admin; CheckBox chkSelectAll; PriceCheckConfig priceCheckConfig = null; @@ -1355,7 +1348,8 @@ namespace TemuKJD.KJDForms.AdminForms foreach (var row in rows) row.Cells["colMsg"].Value = "已提交过修改任务或商品有其他修改任务,请在后店铺台终止任务并稍候重试"; })); - return; //continue; + continue; + //return; // } //Invoke(new Action(() => diff --git a/TEMUKJD/KJDForms/AdminForms/AdminShopListForm.cs b/TEMUKJD/KJDForms/AdminForms/AdminShopListForm.cs index 0d1a5fa..b16a10d 100644 --- a/TEMUKJD/KJDForms/AdminForms/AdminShopListForm.cs +++ b/TEMUKJD/KJDForms/AdminForms/AdminShopListForm.cs @@ -639,7 +639,7 @@ namespace TemuKJD.KJDForms.AdminForms TemuDetailProductInfo prodInfo = JsonHelper.DeserializeJsonToObject(text); TemuProductParam prodParam = new TemuProductParam(); prodParam.carouselImageI18nReqs = prodInfo.carouselImageI18nVOList; - prodParam.carouselImageUrls = prodInfo.carouselImageUrls; + prodParam.carouselImageUrls = prodInfo.carouselImageUrls.Take(10).ToList(); prodParam.cat1Id = prodInfo.categories.cat1.catId; prodParam.cat2Id = prodInfo.categories.cat2.catId; prodParam.cat3Id = prodInfo.categories.cat3.catId; diff --git a/TEMUKJD/KJDForms/JITForms/JITForm.cs b/TEMUKJD/KJDForms/JITForms/JITForm.cs index ff5baeb..e0e08f2 100644 --- a/TEMUKJD/KJDForms/JITForms/JITForm.cs +++ b/TEMUKJD/KJDForms/JITForms/JITForm.cs @@ -8,6 +8,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using TemuKJD.BaseForms; +using TemuKJD.BLL; using TemuKJD.KJDForms.AdminForms; using TemuKJD.KJDForms.ProductForms; using TemuKJD.KJDForms.ProductSelectForms; @@ -62,11 +63,11 @@ namespace TemuKJD.KJDForms.JITForms SetForm(dbProductListForm.Value); break; case "JIT商品上传": - dDbProductSelectListManageForm.Value.ClientMode = DbProductSelectListManageForm.EnumClientMode.ClientJit; + dDbProductSelectListManageForm.Value.ClientMode = EnumClientMode.ClientJit; SetForm(dDbProductSelectListManageForm.Value); break; case "JIT商品核价": - productPriceCheckForm.Value.ClientMode = AdminProductPriceCheckForm.EnumClientMode.ClientJit; + productPriceCheckForm.Value.ClientMode = EnumClientMode.ClientJit; SetForm(productPriceCheckForm.Value); break; case "开通JIT": diff --git a/TEMUKJD/KJDForms/ProductForms/JoinDeliveryForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/JoinDeliveryForm.Designer.cs index 098a132..374d8b0 100644 --- a/TEMUKJD/KJDForms/ProductForms/JoinDeliveryForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/JoinDeliveryForm.Designer.cs @@ -30,12 +30,12 @@ namespace TemuKJD.KJDForms.ProductForms private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.ucGroupBoxEx3 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); this.btnStart = new DevComponents.DotNetBar.PanelEx(); @@ -89,6 +89,7 @@ namespace TemuKJD.KJDForms.ProductForms this.txtRetryInterval = new System.Windows.Forms.TextBox(); this.btnStop = new DevComponents.DotNetBar.PanelEx(); this.label1 = new System.Windows.Forms.Label(); + this.btnSearchShop = new DevComponents.DotNetBar.PanelEx(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -205,6 +206,7 @@ namespace TemuKJD.KJDForms.ProductForms | System.Windows.Forms.AnchorStyles.Left))); this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.ucGroupBoxEx1.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx1.Controls.Add(this.btnSearchShop); this.ucGroupBoxEx1.Controls.Add(this.btnEmpty); this.ucGroupBoxEx1.Controls.Add(this.btnRefreshShop); this.ucGroupBoxEx1.Controls.Add(this.txtNotes); @@ -225,9 +227,9 @@ namespace TemuKJD.KJDForms.ProductForms this.btnEmpty.CanvasColor = System.Drawing.SystemColors.Control; this.btnEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnEmpty.DisabledBackColor = System.Drawing.Color.Empty; - this.btnEmpty.Location = new System.Drawing.Point(173, 90); + this.btnEmpty.Location = new System.Drawing.Point(201, 90); this.btnEmpty.Name = "btnEmpty"; - this.btnEmpty.Size = new System.Drawing.Size(88, 23); + this.btnEmpty.Size = new System.Drawing.Size(60, 23); this.btnEmpty.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnEmpty.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); this.btnEmpty.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); @@ -241,19 +243,18 @@ namespace TemuKJD.KJDForms.ProductForms this.btnEmpty.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnEmpty.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; this.btnEmpty.TabIndex = 701; - this.btnEmpty.Text = "重置查询条件"; + this.btnEmpty.Text = "重置查询"; this.btnEmpty.Click += new System.EventHandler(this.btnEmpty_Click); // // btnRefreshShop // - this.btnRefreshShop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnRefreshShop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnRefreshShop.Cursor = System.Windows.Forms.Cursors.Hand; this.btnRefreshShop.DisabledBackColor = System.Drawing.Color.Empty; this.btnRefreshShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnRefreshShop.Location = new System.Drawing.Point(75, 90); this.btnRefreshShop.Name = "btnRefreshShop"; - this.btnRefreshShop.Size = new System.Drawing.Size(96, 23); + this.btnRefreshShop.Size = new System.Drawing.Size(61, 23); this.btnRefreshShop.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnRefreshShop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnRefreshShop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); @@ -266,7 +267,7 @@ namespace TemuKJD.KJDForms.ProductForms this.btnRefreshShop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.btnRefreshShop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.btnRefreshShop.TabIndex = 431; - this.btnRefreshShop.Text = "查询/刷新店铺"; + this.btnRefreshShop.Text = "刷新店铺"; this.btnRefreshShop.Click += new System.EventHandler(this.btnRefreshShop_Click); // // txtNotes @@ -389,19 +390,19 @@ namespace TemuKJD.KJDForms.ProductForms // this.dgvShop.AllowUserToAddRows = false; this.dgvShop.AllowUserToDeleteRows = false; - dataGridViewCellStyle19.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle19; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; this.dgvShop.AutoRowNumber = true; this.dgvShop.BackgroundColor = System.Drawing.Color.White; this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle20.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle20.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle20.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle20.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle20.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle20; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colSelect, @@ -539,19 +540,19 @@ namespace TemuKJD.KJDForms.ProductForms // this.dgvStock.AllowUserToAddRows = false; this.dgvStock.AllowUserToDeleteRows = false; - dataGridViewCellStyle21.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvStock.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle21; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvStock.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; this.dgvStock.AutoRowNumber = true; this.dgvStock.BackgroundColor = System.Drawing.Color.White; this.dgvStock.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle22.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle22.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvStock.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle22; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvStock.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; this.dgvStock.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvStock.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colUpId, @@ -663,8 +664,8 @@ namespace TemuKJD.KJDForms.ProductForms // // colProdName // - dataGridViewCellStyle23.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colProdName.DefaultCellStyle = dataGridViewCellStyle23; + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colProdName.DefaultCellStyle = dataGridViewCellStyle5; this.colProdName.HeaderText = "标题"; this.colProdName.Name = "colProdName"; this.colProdName.ReadOnly = true; @@ -686,8 +687,8 @@ namespace TemuKJD.KJDForms.ProductForms // // colCreateTime // - dataGridViewCellStyle24.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colCreateTime.DefaultCellStyle = dataGridViewCellStyle24; + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colCreateTime.DefaultCellStyle = dataGridViewCellStyle6; this.colCreateTime.HeaderText = "备货单创建时间"; this.colCreateTime.Name = "colCreateTime"; this.colCreateTime.ReadOnly = true; @@ -816,6 +817,30 @@ namespace TemuKJD.KJDForms.ProductForms this.label1.TabIndex = 432; this.label1.Text = "重试间隔(秒)"; // + // btnSearchShop + // + this.btnSearchShop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnSearchShop.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSearchShop.DisabledBackColor = System.Drawing.Color.Empty; + this.btnSearchShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSearchShop.Location = new System.Drawing.Point(138, 90); + this.btnSearchShop.Name = "btnSearchShop"; + this.btnSearchShop.Size = new System.Drawing.Size(61, 23); + this.btnSearchShop.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearchShop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearchShop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearchShop.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnSearchShop.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnSearchShop.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnSearchShop.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnSearchShop.Style.GradientAngle = 90; + this.btnSearchShop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearchShop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearchShop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearchShop.TabIndex = 711; + this.btnSearchShop.Text = "查询店铺"; + this.btnSearchShop.Click += new System.EventHandler(this.btnSearchShop_Click); + // // JoinDeliveryForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -912,5 +937,6 @@ namespace TemuKJD.KJDForms.ProductForms private System.Windows.Forms.DataGridViewTextBoxColumn colMsg; private DevComponents.DotNetBar.PanelEx pnlMsg; private System.Windows.Forms.Label lblMsg; + private DevComponents.DotNetBar.PanelEx btnSearchShop; } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/ProductForms/JoinDeliveryForm.cs b/TEMUKJD/KJDForms/ProductForms/JoinDeliveryForm.cs index c8761e5..beffaa1 100644 --- a/TEMUKJD/KJDForms/ProductForms/JoinDeliveryForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/JoinDeliveryForm.cs @@ -43,6 +43,7 @@ namespace TemuKJD.KJDForms.ProductForms private void JoinDeliveryFrom_Load(object sender, EventArgs e) { ucSplitPage1.Visible = IsAdmin; + btnRefreshShop.Visible = IsAdmin; dgvShop.AddSelectorColumn("colSelect"); dgvStock.AddSelectorColumn("colCheck"); dgvStock.AddImgColumn("colProductSkcPic", "colImgUrl"); @@ -90,7 +91,7 @@ namespace TemuKJD.KJDForms.ProductForms } else { - RefreshShop(); + FiltShop(); } } } @@ -200,6 +201,20 @@ namespace TemuKJD.KJDForms.ProductForms } private void btnRefreshShop_Click(object sender, EventArgs e) + { + pbShopLoading.Visible = true; + Task.Run(() => + { + ShopListForm.UpdateShop(); + Invoke(new Action(() => + { + FiltShop(); + pbShopLoading.Visible = false; + })); + }); + } + + private void btnSearchShop_Click(object sender, EventArgs e) { if (IsAdmin) { @@ -210,11 +225,11 @@ namespace TemuKJD.KJDForms.ProductForms } else { - RefreshShop(); + FiltShop(); } } - private void RefreshShop() + private void FiltShop() { // 店铺Id var selectIds = dgvShop.Rows.Cast().Where(row @@ -594,7 +609,7 @@ namespace TemuKJD.KJDForms.ProductForms ShopLoginForm shopLoginForm = new ShopLoginForm(shop); shopLoginForm.openType = EnumOpenType.login; shopLoginForm.ShowDialog(); - RefreshShop(); + FiltShop(); } } break; diff --git a/TEMUKJD/KJDForms/ProductForms/PriceManageForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/PriceManageForm.Designer.cs index eb99eb7..b52c0c5 100644 --- a/TEMUKJD/KJDForms/ProductForms/PriceManageForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/PriceManageForm.Designer.cs @@ -43,9 +43,18 @@ namespace TemuKJD.KJDForms.ProductForms this.chkHasSuccess = new System.Windows.Forms.CheckBox(); this.btnSearchPrice = new DevComponents.DotNetBar.PanelEx(); this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.btnSearchShop = new DevComponents.DotNetBar.PanelEx(); this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx(); + this.btnEmpty = new DevComponents.DotNetBar.PanelEx(); + this.txtNotes = new System.Windows.Forms.TextBox(); + this.label14 = new System.Windows.Forms.Label(); + this.txtShopName = new System.Windows.Forms.TextBox(); + this.label21 = new System.Windows.Forms.Label(); + this.txtShopId = new System.Windows.Forms.TextBox(); + this.label22 = 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.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -78,13 +87,6 @@ namespace TemuKJD.KJDForms.ProductForms this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); this.btnClear = new DevComponents.DotNetBar.PanelEx(); - this.btnEmpty = new DevComponents.DotNetBar.PanelEx(); - this.txtNotes = new System.Windows.Forms.TextBox(); - this.label14 = new System.Windows.Forms.Label(); - this.txtShopName = new System.Windows.Forms.TextBox(); - this.label21 = new System.Windows.Forms.Label(); - this.txtShopId = new System.Windows.Forms.TextBox(); - this.label22 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -100,6 +102,7 @@ namespace TemuKJD.KJDForms.ProductForms this.splitContainer2.Panel1.SuspendLayout(); this.splitContainer2.Panel2.SuspendLayout(); this.splitContainer2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbShopLoading)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvAdjust)).BeginInit(); @@ -244,6 +247,7 @@ namespace TemuKJD.KJDForms.ProductForms | System.Windows.Forms.AnchorStyles.Left))); this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.ucGroupBoxEx1.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx1.Controls.Add(this.btnSearchShop); this.ucGroupBoxEx1.Controls.Add(this.btnRefreshShop); this.ucGroupBoxEx1.Controls.Add(this.btnEmpty); this.ucGroupBoxEx1.Controls.Add(this.txtNotes); @@ -259,16 +263,39 @@ namespace TemuKJD.KJDForms.ProductForms this.ucGroupBoxEx1.TabStop = false; this.ucGroupBoxEx1.Text = "基础"; // + // btnSearchShop + // + this.btnSearchShop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnSearchShop.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSearchShop.DisabledBackColor = System.Drawing.Color.Empty; + this.btnSearchShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSearchShop.Location = new System.Drawing.Point(138, 90); + this.btnSearchShop.Name = "btnSearchShop"; + this.btnSearchShop.Size = new System.Drawing.Size(61, 23); + this.btnSearchShop.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearchShop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearchShop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearchShop.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnSearchShop.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnSearchShop.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnSearchShop.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnSearchShop.Style.GradientAngle = 90; + this.btnSearchShop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearchShop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearchShop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearchShop.TabIndex = 722; + this.btnSearchShop.Text = "查询店铺"; + this.btnSearchShop.Click += new System.EventHandler(this.btnSearchShop_Click); + // // btnRefreshShop // - this.btnRefreshShop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnRefreshShop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnRefreshShop.Cursor = System.Windows.Forms.Cursors.Hand; this.btnRefreshShop.DisabledBackColor = System.Drawing.Color.Empty; this.btnRefreshShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnRefreshShop.Location = new System.Drawing.Point(75, 90); this.btnRefreshShop.Name = "btnRefreshShop"; - this.btnRefreshShop.Size = new System.Drawing.Size(96, 23); + this.btnRefreshShop.Size = new System.Drawing.Size(61, 23); this.btnRefreshShop.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnRefreshShop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnRefreshShop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); @@ -281,9 +308,81 @@ namespace TemuKJD.KJDForms.ProductForms this.btnRefreshShop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.btnRefreshShop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.btnRefreshShop.TabIndex = 431; - this.btnRefreshShop.Text = "查询/刷新店铺"; + this.btnRefreshShop.Text = "刷新店铺"; this.btnRefreshShop.Click += new System.EventHandler(this.btnRefreshShop_Click); // + // btnEmpty + // + this.btnEmpty.CanvasColor = System.Drawing.SystemColors.Control; + this.btnEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnEmpty.DisabledBackColor = System.Drawing.Color.Empty; + this.btnEmpty.Location = new System.Drawing.Point(201, 90); + this.btnEmpty.Name = "btnEmpty"; + this.btnEmpty.Size = new System.Drawing.Size(60, 23); + this.btnEmpty.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnEmpty.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnEmpty.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnEmpty.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnEmpty.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnEmpty.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnEmpty.Style.GradientAngle = 90; + this.btnEmpty.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnEmpty.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnEmpty.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnEmpty.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnEmpty.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnEmpty.TabIndex = 715; + this.btnEmpty.Text = "重置查询"; + this.btnEmpty.Click += new System.EventHandler(this.btnEmpty_Click); + // + // txtNotes + // + this.txtNotes.Location = new System.Drawing.Point(75, 65); + this.txtNotes.Name = "txtNotes"; + this.txtNotes.Size = new System.Drawing.Size(186, 23); + this.txtNotes.TabIndex = 713; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(18, 68); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(68, 17); + this.label14.TabIndex = 714; + this.label14.Text = "店铺分组:"; + // + // txtShopName + // + this.txtShopName.Location = new System.Drawing.Point(75, 40); + this.txtShopName.Name = "txtShopName"; + this.txtShopName.Size = new System.Drawing.Size(186, 23); + this.txtShopName.TabIndex = 711; + // + // label21 + // + this.label21.AutoSize = true; + this.label21.Location = new System.Drawing.Point(18, 43); + this.label21.Name = "label21"; + this.label21.Size = new System.Drawing.Size(68, 17); + this.label21.TabIndex = 712; + this.label21.Text = "店铺名称:"; + // + // txtShopId + // + this.txtShopId.Location = new System.Drawing.Point(75, 15); + this.txtShopId.Name = "txtShopId"; + this.txtShopId.Size = new System.Drawing.Size(186, 23); + this.txtShopId.TabIndex = 709; + // + // label22 + // + this.label22.AutoSize = true; + this.label22.Location = new System.Drawing.Point(29, 18); + this.label22.Name = "label22"; + this.label22.Size = new System.Drawing.Size(57, 17); + this.label22.TabIndex = 710; + this.label22.Text = "店铺ID:"; + // // splitContainer3 // this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; @@ -312,6 +411,7 @@ namespace TemuKJD.KJDForms.ProductForms // // splitContainer2.Panel1 // + this.splitContainer2.Panel1.Controls.Add(this.pbShopLoading); this.splitContainer2.Panel1.Controls.Add(this.dgvShop); this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0); // @@ -324,6 +424,18 @@ namespace TemuKJD.KJDForms.ProductForms this.splitContainer2.SplitterDistance = 280; this.splitContainer2.TabIndex = 0; // + // pbShopLoading + // + this.pbShopLoading.Anchor = System.Windows.Forms.AnchorStyles.None; + this.pbShopLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; + this.pbShopLoading.Location = new System.Drawing.Point(117, 196); + this.pbShopLoading.Name = "pbShopLoading"; + this.pbShopLoading.Size = new System.Drawing.Size(50, 50); + this.pbShopLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbShopLoading.TabIndex = 189; + this.pbShopLoading.TabStop = false; + this.pbShopLoading.Visible = false; + // // dgvShop // this.dgvShop.AllowUserToAddRows = false; @@ -692,78 +804,6 @@ namespace TemuKJD.KJDForms.ProductForms this.btnClear.Text = "清空结果"; this.btnClear.Visible = false; // - // btnEmpty - // - this.btnEmpty.CanvasColor = System.Drawing.SystemColors.Control; - this.btnEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnEmpty.DisabledBackColor = System.Drawing.Color.Empty; - this.btnEmpty.Location = new System.Drawing.Point(173, 90); - this.btnEmpty.Name = "btnEmpty"; - this.btnEmpty.Size = new System.Drawing.Size(88, 23); - this.btnEmpty.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnEmpty.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.btnEmpty.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.btnEmpty.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.btnEmpty.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnEmpty.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.btnEmpty.Style.GradientAngle = 90; - this.btnEmpty.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; - this.btnEmpty.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnEmpty.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnEmpty.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnEmpty.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; - this.btnEmpty.TabIndex = 715; - this.btnEmpty.Text = "重置查询条件"; - this.btnEmpty.Click += new System.EventHandler(this.btnEmpty_Click); - // - // txtNotes - // - this.txtNotes.Location = new System.Drawing.Point(75, 65); - this.txtNotes.Name = "txtNotes"; - this.txtNotes.Size = new System.Drawing.Size(186, 23); - this.txtNotes.TabIndex = 713; - // - // label14 - // - this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(18, 68); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(68, 17); - this.label14.TabIndex = 714; - this.label14.Text = "店铺分组:"; - // - // txtShopName - // - this.txtShopName.Location = new System.Drawing.Point(75, 40); - this.txtShopName.Name = "txtShopName"; - this.txtShopName.Size = new System.Drawing.Size(186, 23); - this.txtShopName.TabIndex = 711; - // - // label21 - // - this.label21.AutoSize = true; - this.label21.Location = new System.Drawing.Point(18, 43); - this.label21.Name = "label21"; - this.label21.Size = new System.Drawing.Size(68, 17); - this.label21.TabIndex = 712; - this.label21.Text = "店铺名称:"; - // - // txtShopId - // - this.txtShopId.Location = new System.Drawing.Point(75, 15); - this.txtShopId.Name = "txtShopId"; - this.txtShopId.Size = new System.Drawing.Size(186, 23); - this.txtShopId.TabIndex = 709; - // - // label22 - // - this.label22.AutoSize = true; - this.label22.Location = new System.Drawing.Point(29, 18); - this.label22.Name = "label22"; - this.label22.Size = new System.Drawing.Size(57, 17); - this.label22.TabIndex = 710; - this.label22.Text = "店铺ID:"; - // // PriceManageForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -793,6 +833,7 @@ namespace TemuKJD.KJDForms.ProductForms this.splitContainer2.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); this.splitContainer2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pbShopLoading)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvAdjust)).EndInit(); @@ -857,5 +898,7 @@ namespace TemuKJD.KJDForms.ProductForms private System.Windows.Forms.Label label21; private System.Windows.Forms.TextBox txtShopId; private System.Windows.Forms.Label label22; + private DevComponents.DotNetBar.PanelEx btnSearchShop; + private System.Windows.Forms.PictureBox pbShopLoading; } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/ProductForms/PriceManageForm.cs b/TEMUKJD/KJDForms/ProductForms/PriceManageForm.cs index 8cfd110..3efde8d 100644 --- a/TEMUKJD/KJDForms/ProductForms/PriceManageForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/PriceManageForm.cs @@ -65,14 +65,28 @@ namespace TemuKJD.KJDForms.ProductForms private void PriceManageForm_VisibleChanged(object sender, EventArgs e) { if (Visible == true) - RefreshShop(); + FiltShop(); } private void btnRefreshShop_Click(object sender, EventArgs e) { - RefreshShop(); + pbShopLoading.Visible = true; + Task.Run(() => + { + ShopListForm.UpdateShop(); + Invoke(new Action(() => + { + FiltShop(); + pbShopLoading.Visible = false; + })); + }); } - private void RefreshShop() + + private void btnSearchShop_Click(object sender, EventArgs e) + { + FiltShop(); + } + private void FiltShop() { // 店铺Id var selectIds = dgvShop.Rows.Cast().Where(row @@ -213,7 +227,7 @@ namespace TemuKJD.KJDForms.ProductForms ShopLoginForm shopLoginForm = new ShopLoginForm(shop); shopLoginForm.openType = EnumOpenType.login; shopLoginForm.ShowDialog(); - RefreshShop(); + FiltShop(); } } break; @@ -719,6 +733,7 @@ namespace TemuKJD.KJDForms.ProductForms private void btnEmpty_Click(object sender, EventArgs e) { txtNotes.Text = txtShopId.Text = txtShopName.Text = ""; + FiltShop(); } } } diff --git a/TEMUKJD/KJDForms/ProductForms/ProductForm.cs b/TEMUKJD/KJDForms/ProductForms/ProductForm.cs index a2a660d..193ccf8 100644 --- a/TEMUKJD/KJDForms/ProductForms/ProductForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/ProductForm.cs @@ -15,6 +15,7 @@ using TemuKJD.BaseForms; using TemuKJD.KJDForms.ProductThirdSelectForms; using AllBase; using TemuKJD.KJDForms.AdminForms; +using TemuKJD.BLL; namespace TemuKJD.KJDForms.ProductForms { @@ -113,15 +114,15 @@ namespace TemuKJD.KJDForms.ProductForms break; case "商品上传": - productSelectListManageForm.Value.ClientMode = DbProductSelectListManageForm.EnumClientMode.Client; + productSelectListManageForm.Value.ClientMode = EnumClientMode.Client; SetForm(productSelectListManageForm.Value); break; case "库存上传": - productThirdSelectListManageForm.Value.ClientMode = ProductThirdSelectListManageForm.EnumClientMode.Client; + productThirdSelectListManageForm.Value.ClientMode = EnumClientMode.Client; SetForm(productThirdSelectListManageForm.Value); break; case "商品核价": - productPriceCheckForm.Value.ClientMode = AdminProductPriceCheckForm.EnumClientMode.Client; + productPriceCheckForm.Value.ClientMode = EnumClientMode.Client; SetForm(productPriceCheckForm.Value); break; } diff --git a/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.Designer.cs index 61c33e8..ba7c912 100644 --- a/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.Designer.cs @@ -30,11 +30,11 @@ namespace TemuKJD.KJDForms.ProductForms private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.ucGroupBoxEx4 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); this.txtMaxQualityRate = new System.Windows.Forms.TextBox(); @@ -68,6 +68,7 @@ namespace TemuKJD.KJDForms.ProductForms this.btnSearch = new DevComponents.DotNetBar.PanelEx(); this.panelEx2 = new DevComponents.DotNetBar.PanelEx(); this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.pnlSearchShop = new DevComponents.DotNetBar.PanelEx(); this.btnEmpty = new DevComponents.DotNetBar.PanelEx(); this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx(); this.txtNotes = new System.Windows.Forms.TextBox(); @@ -78,6 +79,7 @@ namespace TemuKJD.KJDForms.ProductForms this.label22 = 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.txtPid = new System.Windows.Forms.TextBox(); this.txtStockid = new System.Windows.Forms.TextBox(); this.label9 = new System.Windows.Forms.Label(); @@ -95,44 +97,7 @@ namespace TemuKJD.KJDForms.ProductForms this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn(); this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ucGroupBoxEx99 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); - this.cmbCity = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.cmbProvince = new DevComponents.DotNetBar.Controls.ComboBoxEx(); - this.label3 = new System.Windows.Forms.Label(); - this.pnlSamePostage = new System.Windows.Forms.FlowLayoutPanel(); - this.label12 = new System.Windows.Forms.Label(); - this.txtSamePostagePrice = new System.Windows.Forms.TextBox(); - this.label13 = new System.Windows.Forms.Label(); - this.panel3 = new System.Windows.Forms.Panel(); - this.rbSamePostage = new System.Windows.Forms.RadioButton(); - this.rbStepPostage = new System.Windows.Forms.RadioButton(); - this.rbNoPostage = new System.Windows.Forms.RadioButton(); - this.pnlStepPostage = new System.Windows.Forms.FlowLayoutPanel(); - this.rbWithCount = new System.Windows.Forms.RadioButton(); - this.rbWithWeight = new System.Windows.Forms.RadioButton(); - this.label2 = new System.Windows.Forms.Label(); - this.txtWeightOrCountStep1 = new System.Windows.Forms.TextBox(); - this.lblWeightOrCountStep1 = new System.Windows.Forms.Label(); - this.txtWeightOrCountPrice1 = new System.Windows.Forms.TextBox(); - this.label5 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); - this.txtWeightOrCountStep2 = new System.Windows.Forms.TextBox(); - this.lblWeightOrCountStep2 = new System.Windows.Forms.Label(); - this.txtWeightOrCountPrice2 = new System.Windows.Forms.TextBox(); - this.label8 = new System.Windows.Forms.Label(); - this.panel2 = new System.Windows.Forms.Panel(); - this.textBox2 = new System.Windows.Forms.TextBox(); - this.btnSetNotArea = new DevComponents.DotNetBar.PanelEx(); - this.nudGroupCount = new System.Windows.Forms.NumericUpDown(); - this.label11 = new System.Windows.Forms.Label(); - this.panel1 = new System.Windows.Forms.Panel(); - this.btnSetName = new DevComponents.DotNetBar.PanelEx(); - this.rbCustomName = new System.Windows.Forms.RadioButton(); - this.rbAutoName = new System.Windows.Forms.RadioButton(); - this.label7 = new System.Windows.Forms.Label(); - this.btnAdd = new DevComponents.DotNetBar.PanelEx(); - this.btnStopAdd = new DevComponents.DotNetBar.PanelEx(); - this.chkLimited = new System.Windows.Forms.CheckBox(); + this.pbLoading = new System.Windows.Forms.PictureBox(); this.dgvStock = new TemuKJD.UserComponent.DataGridViewEx(); this.colUpId = new System.Windows.Forms.DataGridViewLinkColumn(); this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn(); @@ -179,14 +144,9 @@ namespace TemuKJD.KJDForms.ProductForms this.splitContainer2.Panel1.SuspendLayout(); this.splitContainer2.Panel2.SuspendLayout(); this.splitContainer2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbShopLoading)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit(); - this.ucGroupBoxEx99.SuspendLayout(); - this.pnlSamePostage.SuspendLayout(); - this.panel3.SuspendLayout(); - this.pnlStepPostage.SuspendLayout(); - this.panel2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudGroupCount)).BeginInit(); - this.panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvStock)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).BeginInit(); this.splitContainer4.Panel1.SuspendLayout(); @@ -676,6 +636,7 @@ namespace TemuKJD.KJDForms.ProductForms | System.Windows.Forms.AnchorStyles.Left))); this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.ucGroupBoxEx1.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx1.Controls.Add(this.pnlSearchShop); this.ucGroupBoxEx1.Controls.Add(this.btnEmpty); this.ucGroupBoxEx1.Controls.Add(this.btnRefreshShop); this.ucGroupBoxEx1.Controls.Add(this.txtNotes); @@ -691,14 +652,38 @@ namespace TemuKJD.KJDForms.ProductForms this.ucGroupBoxEx1.TabStop = false; this.ucGroupBoxEx1.Text = "基础"; // + // pnlSearchShop + // + this.pnlSearchShop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.pnlSearchShop.Cursor = System.Windows.Forms.Cursors.Hand; + this.pnlSearchShop.DisabledBackColor = System.Drawing.Color.Empty; + this.pnlSearchShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.pnlSearchShop.Location = new System.Drawing.Point(138, 90); + this.pnlSearchShop.Name = "pnlSearchShop"; + this.pnlSearchShop.Size = new System.Drawing.Size(61, 23); + this.pnlSearchShop.Style.Alignment = System.Drawing.StringAlignment.Center; + this.pnlSearchShop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.pnlSearchShop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.pnlSearchShop.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.pnlSearchShop.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.pnlSearchShop.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.pnlSearchShop.Style.ForeColor.Color = System.Drawing.Color.White; + this.pnlSearchShop.Style.GradientAngle = 90; + this.pnlSearchShop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.pnlSearchShop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.pnlSearchShop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.pnlSearchShop.TabIndex = 715; + this.pnlSearchShop.Text = "查询店铺"; + this.pnlSearchShop.Click += new System.EventHandler(this.btnSearchShop_Click); + // // btnEmpty // this.btnEmpty.CanvasColor = System.Drawing.SystemColors.Control; this.btnEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnEmpty.DisabledBackColor = System.Drawing.Color.Empty; - this.btnEmpty.Location = new System.Drawing.Point(173, 90); + this.btnEmpty.Location = new System.Drawing.Point(201, 90); this.btnEmpty.Name = "btnEmpty"; - this.btnEmpty.Size = new System.Drawing.Size(88, 23); + this.btnEmpty.Size = new System.Drawing.Size(60, 23); this.btnEmpty.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnEmpty.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); this.btnEmpty.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); @@ -712,19 +697,18 @@ namespace TemuKJD.KJDForms.ProductForms this.btnEmpty.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnEmpty.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; this.btnEmpty.TabIndex = 705; - this.btnEmpty.Text = "重置查询条件"; + this.btnEmpty.Text = "重置查询"; this.btnEmpty.Click += new System.EventHandler(this.btnEmpty_Click); // // btnRefreshShop // - this.btnRefreshShop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnRefreshShop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnRefreshShop.Cursor = System.Windows.Forms.Cursors.Hand; this.btnRefreshShop.DisabledBackColor = System.Drawing.Color.Empty; this.btnRefreshShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnRefreshShop.Location = new System.Drawing.Point(75, 90); this.btnRefreshShop.Name = "btnRefreshShop"; - this.btnRefreshShop.Size = new System.Drawing.Size(96, 23); + this.btnRefreshShop.Size = new System.Drawing.Size(61, 23); this.btnRefreshShop.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnRefreshShop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnRefreshShop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); @@ -737,7 +721,7 @@ namespace TemuKJD.KJDForms.ProductForms this.btnRefreshShop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.btnRefreshShop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.btnRefreshShop.TabIndex = 431; - this.btnRefreshShop.Text = "查询/刷新店铺"; + this.btnRefreshShop.Text = "刷新店铺"; this.btnRefreshShop.Click += new System.EventHandler(this.btnRefreshShop_Click); // // txtNotes @@ -816,6 +800,7 @@ namespace TemuKJD.KJDForms.ProductForms // // splitContainer2.Panel1 // + this.splitContainer2.Panel1.Controls.Add(this.pbShopLoading); this.splitContainer2.Panel1.Controls.Add(this.txtPid); this.splitContainer2.Panel1.Controls.Add(this.txtStockid); this.splitContainer2.Panel1.Controls.Add(this.label9); @@ -829,13 +814,25 @@ namespace TemuKJD.KJDForms.ProductForms // // splitContainer2.Panel2 // - this.splitContainer2.Panel2.Controls.Add(this.ucGroupBoxEx99); + this.splitContainer2.Panel2.Controls.Add(this.pbLoading); this.splitContainer2.Panel2.Controls.Add(this.dgvStock); this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0); this.splitContainer2.Size = new System.Drawing.Size(1350, 435); this.splitContainer2.SplitterDistance = 280; this.splitContainer2.TabIndex = 0; // + // pbShopLoading + // + this.pbShopLoading.Anchor = System.Windows.Forms.AnchorStyles.None; + this.pbShopLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; + this.pbShopLoading.Location = new System.Drawing.Point(117, 192); + this.pbShopLoading.Name = "pbShopLoading"; + this.pbShopLoading.Size = new System.Drawing.Size(50, 50); + this.pbShopLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbShopLoading.TabIndex = 659; + this.pbShopLoading.TabStop = false; + this.pbShopLoading.Visible = false; + // // txtPid // this.txtPid.Location = new System.Drawing.Point(85, 94); @@ -908,7 +905,7 @@ namespace TemuKJD.KJDForms.ProductForms // chkHasCreate // this.chkHasCreate.AutoSize = true; - this.chkHasCreate.Location = new System.Drawing.Point(31, 165); + this.chkHasCreate.Location = new System.Drawing.Point(120, 136); this.chkHasCreate.Name = "chkHasCreate"; this.chkHasCreate.Size = new System.Drawing.Size(111, 21); this.chkHasCreate.TabIndex = 658; @@ -930,19 +927,19 @@ namespace TemuKJD.KJDForms.ProductForms // this.dgvShop.AllowUserToAddRows = false; this.dgvShop.AllowUserToDeleteRows = false; - dataGridViewCellStyle6.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; this.dgvShop.AutoRowNumber = true; this.dgvShop.BackgroundColor = System.Drawing.Color.White; this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colSelect, @@ -1029,519 +1026,35 @@ namespace TemuKJD.KJDForms.ProductForms this.colMessage.ReadOnly = true; this.colMessage.Width = 120; // - // ucGroupBoxEx99 - // - this.ucGroupBoxEx99.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ucGroupBoxEx99.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.ucGroupBoxEx99.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; - this.ucGroupBoxEx99.Controls.Add(this.cmbCity); - this.ucGroupBoxEx99.Controls.Add(this.cmbProvince); - this.ucGroupBoxEx99.Controls.Add(this.label3); - this.ucGroupBoxEx99.Controls.Add(this.pnlSamePostage); - this.ucGroupBoxEx99.Controls.Add(this.panel3); - this.ucGroupBoxEx99.Controls.Add(this.pnlStepPostage); - this.ucGroupBoxEx99.Controls.Add(this.panel2); - this.ucGroupBoxEx99.Controls.Add(this.nudGroupCount); - this.ucGroupBoxEx99.Controls.Add(this.label11); - this.ucGroupBoxEx99.Controls.Add(this.panel1); - this.ucGroupBoxEx99.Controls.Add(this.btnAdd); - this.ucGroupBoxEx99.Controls.Add(this.btnStopAdd); - this.ucGroupBoxEx99.Controls.Add(this.chkLimited); - this.ucGroupBoxEx99.Location = new System.Drawing.Point(296, 46); - this.ucGroupBoxEx99.Name = "ucGroupBoxEx99"; - this.ucGroupBoxEx99.Size = new System.Drawing.Size(742, 180); - this.ucGroupBoxEx99.TabIndex = 470; - this.ucGroupBoxEx99.TabStop = false; - this.ucGroupBoxEx99.Text = "创建备货单"; - this.ucGroupBoxEx99.Visible = false; - // - // cmbCity - // - this.cmbCity.DisplayMember = "Text"; - this.cmbCity.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.cmbCity.FormattingEnabled = true; - this.cmbCity.ItemHeight = 18; - this.cmbCity.Location = new System.Drawing.Point(283, 28); - this.cmbCity.Name = "cmbCity"; - this.cmbCity.Size = new System.Drawing.Size(90, 24); - this.cmbCity.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.cmbCity.TabIndex = 650; - this.cmbCity.Text = "请选择"; - // - // cmbProvince - // - this.cmbProvince.DisplayMember = "Text"; - this.cmbProvince.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; - this.cmbProvince.FormattingEnabled = true; - this.cmbProvince.ItemHeight = 18; - this.cmbProvince.Location = new System.Drawing.Point(189, 29); - this.cmbProvince.Name = "cmbProvince"; - this.cmbProvince.Size = new System.Drawing.Size(90, 24); - this.cmbProvince.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.cmbProvince.TabIndex = 649; - this.cmbProvince.Text = "请选择"; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(130, 32); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(68, 17); - this.label3.TabIndex = 648; - this.label3.Text = "发货地区:"; - // - // pnlSamePostage - // - this.pnlSamePostage.Controls.Add(this.label12); - this.pnlSamePostage.Controls.Add(this.txtSamePostagePrice); - this.pnlSamePostage.Controls.Add(this.label13); - this.pnlSamePostage.Location = new System.Drawing.Point(277, 88); - this.pnlSamePostage.Name = "pnlSamePostage"; - this.pnlSamePostage.Size = new System.Drawing.Size(194, 23); - this.pnlSamePostage.TabIndex = 641; - this.pnlSamePostage.Visible = false; - // - // label12 - // - this.label12.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(3, 3); - this.label12.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(56, 17); - this.label12.TabIndex = 612; - this.label12.Text = "固定运费"; - // - // txtSamePostagePrice - // - this.txtSamePostagePrice.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.txtSamePostagePrice.Location = new System.Drawing.Point(59, 0); - this.txtSamePostagePrice.Margin = new System.Windows.Forms.Padding(0); - this.txtSamePostagePrice.Name = "txtSamePostagePrice"; - this.txtSamePostagePrice.Size = new System.Drawing.Size(45, 23); - this.txtSamePostagePrice.TabIndex = 613; - // - // label13 - // - this.label13.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(104, 3); - this.label13.Margin = new System.Windows.Forms.Padding(0); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(20, 17); - this.label13.TabIndex = 614; - this.label13.Text = "元"; - // - // panel3 - // - this.panel3.Controls.Add(this.rbSamePostage); - this.panel3.Controls.Add(this.rbStepPostage); - this.panel3.Controls.Add(this.rbNoPostage); - this.panel3.Location = new System.Drawing.Point(21, 88); - this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(250, 23); - this.panel3.TabIndex = 640; - // - // rbSamePostage - // - this.rbSamePostage.AutoSize = true; - this.rbSamePostage.Location = new System.Drawing.Point(83, 1); - this.rbSamePostage.Name = "rbSamePostage"; - this.rbSamePostage.Size = new System.Drawing.Size(74, 21); - this.rbSamePostage.TabIndex = 466; - this.rbSamePostage.Text = "固定运费"; - this.rbSamePostage.UseVisualStyleBackColor = true; - // - // rbStepPostage - // - this.rbStepPostage.AutoSize = true; - this.rbStepPostage.Location = new System.Drawing.Point(3, 1); - this.rbStepPostage.Name = "rbStepPostage"; - this.rbStepPostage.Size = new System.Drawing.Size(74, 21); - this.rbStepPostage.TabIndex = 465; - this.rbStepPostage.Text = "阶梯计价"; - this.rbStepPostage.UseVisualStyleBackColor = true; - // - // rbNoPostage - // - this.rbNoPostage.AutoSize = true; - this.rbNoPostage.Checked = true; - this.rbNoPostage.Location = new System.Drawing.Point(163, 1); - this.rbNoPostage.Name = "rbNoPostage"; - this.rbNoPostage.Size = new System.Drawing.Size(74, 21); - this.rbNoPostage.TabIndex = 467; - this.rbNoPostage.TabStop = true; - this.rbNoPostage.Text = "卖家包邮"; - this.rbNoPostage.UseVisualStyleBackColor = true; - // - // pnlStepPostage - // - this.pnlStepPostage.Controls.Add(this.rbWithCount); - this.pnlStepPostage.Controls.Add(this.rbWithWeight); - this.pnlStepPostage.Controls.Add(this.label2); - this.pnlStepPostage.Controls.Add(this.txtWeightOrCountStep1); - this.pnlStepPostage.Controls.Add(this.lblWeightOrCountStep1); - this.pnlStepPostage.Controls.Add(this.txtWeightOrCountPrice1); - this.pnlStepPostage.Controls.Add(this.label5); - this.pnlStepPostage.Controls.Add(this.label6); - this.pnlStepPostage.Controls.Add(this.txtWeightOrCountStep2); - this.pnlStepPostage.Controls.Add(this.lblWeightOrCountStep2); - this.pnlStepPostage.Controls.Add(this.txtWeightOrCountPrice2); - this.pnlStepPostage.Controls.Add(this.label8); - this.pnlStepPostage.Location = new System.Drawing.Point(21, 116); - this.pnlStepPostage.Name = "pnlStepPostage"; - this.pnlStepPostage.Size = new System.Drawing.Size(575, 23); - this.pnlStepPostage.TabIndex = 639; - this.pnlStepPostage.Visible = false; - // - // rbWithCount - // - this.rbWithCount.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.rbWithCount.AutoSize = true; - this.rbWithCount.Checked = true; - this.rbWithCount.Location = new System.Drawing.Point(3, 1); - this.rbWithCount.Margin = new System.Windows.Forms.Padding(3, 0, 0, 0); - this.rbWithCount.Name = "rbWithCount"; - this.rbWithCount.Size = new System.Drawing.Size(62, 21); - this.rbWithCount.TabIndex = 615; - this.rbWithCount.TabStop = true; - this.rbWithCount.Text = "按件数"; - this.rbWithCount.UseVisualStyleBackColor = true; - // - // rbWithWeight - // - this.rbWithWeight.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.rbWithWeight.AutoSize = true; - this.rbWithWeight.Location = new System.Drawing.Point(65, 1); - this.rbWithWeight.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0); - this.rbWithWeight.Name = "rbWithWeight"; - this.rbWithWeight.Size = new System.Drawing.Size(62, 21); - this.rbWithWeight.TabIndex = 616; - this.rbWithWeight.Text = "按重量"; - this.rbWithWeight.UseVisualStyleBackColor = true; - // - // label2 - // - this.label2.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(130, 3); - this.label2.Margin = new System.Windows.Forms.Padding(0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(56, 17); - this.label2.TabIndex = 605; - this.label2.Text = "默认运费"; - // - // txtWeightOrCountStep1 - // - this.txtWeightOrCountStep1.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.txtWeightOrCountStep1.Location = new System.Drawing.Point(186, 0); - this.txtWeightOrCountStep1.Margin = new System.Windows.Forms.Padding(0); - this.txtWeightOrCountStep1.Name = "txtWeightOrCountStep1"; - this.txtWeightOrCountStep1.Size = new System.Drawing.Size(45, 23); - this.txtWeightOrCountStep1.TabIndex = 606; - // - // lblWeightOrCountStep1 - // - this.lblWeightOrCountStep1.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.lblWeightOrCountStep1.AutoSize = true; - this.lblWeightOrCountStep1.Location = new System.Drawing.Point(231, 3); - this.lblWeightOrCountStep1.Margin = new System.Windows.Forms.Padding(0); - this.lblWeightOrCountStep1.Name = "lblWeightOrCountStep1"; - this.lblWeightOrCountStep1.Size = new System.Drawing.Size(56, 17); - this.lblWeightOrCountStep1.TabIndex = 607; - this.lblWeightOrCountStep1.Text = "件以内,"; - // - // txtWeightOrCountPrice1 - // - this.txtWeightOrCountPrice1.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.txtWeightOrCountPrice1.Location = new System.Drawing.Point(287, 0); - this.txtWeightOrCountPrice1.Margin = new System.Windows.Forms.Padding(0); - this.txtWeightOrCountPrice1.Name = "txtWeightOrCountPrice1"; - this.txtWeightOrCountPrice1.Size = new System.Drawing.Size(45, 23); - this.txtWeightOrCountPrice1.TabIndex = 608; - // - // label5 - // - this.label5.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(332, 3); - this.label5.Margin = new System.Windows.Forms.Padding(0); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(32, 17); - this.label5.TabIndex = 609; - this.label5.Text = "元,"; - // - // label6 - // - this.label6.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(364, 3); - this.label6.Margin = new System.Windows.Forms.Padding(0); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(44, 17); - this.label6.TabIndex = 610; - this.label6.Text = "每增加"; - // - // txtWeightOrCountStep2 - // - this.txtWeightOrCountStep2.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.txtWeightOrCountStep2.Location = new System.Drawing.Point(408, 0); - this.txtWeightOrCountStep2.Margin = new System.Windows.Forms.Padding(0); - this.txtWeightOrCountStep2.Name = "txtWeightOrCountStep2"; - this.txtWeightOrCountStep2.Size = new System.Drawing.Size(45, 23); - this.txtWeightOrCountStep2.TabIndex = 611; - // - // lblWeightOrCountStep2 - // - this.lblWeightOrCountStep2.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.lblWeightOrCountStep2.AutoSize = true; - this.lblWeightOrCountStep2.Location = new System.Drawing.Point(453, 3); - this.lblWeightOrCountStep2.Margin = new System.Windows.Forms.Padding(0); - this.lblWeightOrCountStep2.Name = "lblWeightOrCountStep2"; - this.lblWeightOrCountStep2.Size = new System.Drawing.Size(80, 17); - this.lblWeightOrCountStep2.TabIndex = 612; - this.lblWeightOrCountStep2.Text = "件,增加运费"; - // - // txtWeightOrCountPrice2 - // - this.txtWeightOrCountPrice2.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.txtWeightOrCountPrice2.Location = new System.Drawing.Point(0, 23); - this.txtWeightOrCountPrice2.Margin = new System.Windows.Forms.Padding(0); - this.txtWeightOrCountPrice2.Name = "txtWeightOrCountPrice2"; - this.txtWeightOrCountPrice2.Size = new System.Drawing.Size(45, 23); - this.txtWeightOrCountPrice2.TabIndex = 613; - // - // label8 - // - this.label8.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(45, 26); - this.label8.Margin = new System.Windows.Forms.Padding(0); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(20, 17); - this.label8.TabIndex = 614; - this.label8.Text = "元"; - // - // panel2 - // - this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.panel2.Controls.Add(this.textBox2); - this.panel2.Controls.Add(this.btnSetNotArea); - this.panel2.Location = new System.Drawing.Point(151, 59); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(487, 23); - this.panel2.TabIndex = 638; - // - // textBox2 - // - this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.textBox2.Location = new System.Drawing.Point(0, 0); - this.textBox2.Name = "textBox2"; - this.textBox2.ReadOnly = true; - this.textBox2.Size = new System.Drawing.Size(421, 23); - this.textBox2.TabIndex = 638; - // - // btnSetNotArea - // - this.btnSetNotArea.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnSetNotArea.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnSetNotArea.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnSetNotArea.DisabledBackColor = System.Drawing.Color.Empty; - this.btnSetNotArea.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSetNotArea.Location = new System.Drawing.Point(427, 2); - this.btnSetNotArea.Name = "btnSetNotArea"; - this.btnSetNotArea.Size = new System.Drawing.Size(56, 19); - this.btnSetNotArea.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnSetNotArea.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnSetNotArea.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnSetNotArea.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.btnSetNotArea.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.btnSetNotArea.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.btnSetNotArea.Style.ForeColor.Color = System.Drawing.Color.White; - this.btnSetNotArea.Style.GradientAngle = 90; - this.btnSetNotArea.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnSetNotArea.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnSetNotArea.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnSetNotArea.TabIndex = 634; - this.btnSetNotArea.Text = "设置地区"; - // - // nudGroupCount - // - this.nudGroupCount.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.nudGroupCount.Location = new System.Drawing.Point(75, 29); - this.nudGroupCount.Maximum = new decimal(new int[] { - 10000, - 0, - 0, - 0}); - this.nudGroupCount.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.nudGroupCount.Name = "nudGroupCount"; - this.nudGroupCount.Size = new System.Drawing.Size(49, 23); - this.nudGroupCount.TabIndex = 603; - this.nudGroupCount.Value = new decimal(new int[] { - 10, - 0, - 0, - 0}); - // - // label11 - // - this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(18, 32); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(68, 17); - this.label11.TabIndex = 602; - this.label11.Text = "新建数量:"; - // - // panel1 - // - this.panel1.Controls.Add(this.btnSetName); - this.panel1.Controls.Add(this.rbCustomName); - this.panel1.Controls.Add(this.rbAutoName); - this.panel1.Controls.Add(this.label7); - this.panel1.Location = new System.Drawing.Point(245, 29); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(254, 23); - this.panel1.TabIndex = 601; - // - // btnSetName - // - this.btnSetName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnSetName.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnSetName.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnSetName.DisabledBackColor = System.Drawing.Color.Empty; - this.btnSetName.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSetName.Location = new System.Drawing.Point(194, 2); - this.btnSetName.Name = "btnSetName"; - this.btnSetName.Size = new System.Drawing.Size(56, 19); - this.btnSetName.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnSetName.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnSetName.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnSetName.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.btnSetName.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.btnSetName.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.btnSetName.Style.ForeColor.Color = System.Drawing.Color.White; - this.btnSetName.Style.GradientAngle = 90; - this.btnSetName.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnSetName.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnSetName.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnSetName.TabIndex = 634; - this.btnSetName.Text = "设置名称"; - // - // rbCustomName - // - this.rbCustomName.AutoSize = true; - this.rbCustomName.Location = new System.Drawing.Point(133, 1); - this.rbCustomName.Name = "rbCustomName"; - this.rbCustomName.Size = new System.Drawing.Size(62, 21); - this.rbCustomName.TabIndex = 465; - this.rbCustomName.Text = "自定义"; - this.rbCustomName.UseVisualStyleBackColor = true; - // - // rbAutoName - // - this.rbAutoName.AutoSize = true; - this.rbAutoName.Checked = true; - this.rbAutoName.Location = new System.Drawing.Point(60, 1); - this.rbAutoName.Name = "rbAutoName"; - this.rbAutoName.Size = new System.Drawing.Size(74, 21); - this.rbAutoName.TabIndex = 464; - this.rbAutoName.TabStop = true; - this.rbAutoName.Text = "自动设置"; - this.rbAutoName.UseVisualStyleBackColor = true; - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(1, 3); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(68, 17); - this.label7.TabIndex = 638; - this.label7.Text = "模板名称:"; - // - // btnAdd - // - this.btnAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnAdd.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnAdd.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnAdd.DisabledBackColor = System.Drawing.Color.Empty; - this.btnAdd.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnAdd.Location = new System.Drawing.Point(646, 29); - this.btnAdd.Name = "btnAdd"; - this.btnAdd.Size = new System.Drawing.Size(80, 23); - this.btnAdd.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnAdd.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnAdd.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnAdd.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.btnAdd.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.btnAdd.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.btnAdd.Style.ForeColor.Color = System.Drawing.Color.White; - this.btnAdd.Style.GradientAngle = 90; - this.btnAdd.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnAdd.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnAdd.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnAdd.TabIndex = 427; - this.btnAdd.Text = "开始创建"; - // - // btnStopAdd - // - this.btnStopAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnStopAdd.CanvasColor = System.Drawing.SystemColors.Control; - this.btnStopAdd.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnStopAdd.DisabledBackColor = System.Drawing.Color.Empty; - this.btnStopAdd.Location = new System.Drawing.Point(646, 59); - this.btnStopAdd.Name = "btnStopAdd"; - this.btnStopAdd.Size = new System.Drawing.Size(80, 23); - this.btnStopAdd.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnStopAdd.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.btnStopAdd.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.btnStopAdd.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.btnStopAdd.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnStopAdd.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.btnStopAdd.Style.GradientAngle = 90; - this.btnStopAdd.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; - this.btnStopAdd.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnStopAdd.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnStopAdd.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnStopAdd.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; - this.btnStopAdd.TabIndex = 405; - this.btnStopAdd.Text = "停止创建"; - // - // chkLimited - // - this.chkLimited.AutoSize = true; - this.chkLimited.Location = new System.Drawing.Point(22, 61); - this.chkLimited.Name = "chkLimited"; - this.chkLimited.Size = new System.Drawing.Size(131, 21); - this.chkLimited.TabIndex = 657; - this.chkLimited.Text = "限制下单区域(可选)"; - this.chkLimited.UseVisualStyleBackColor = true; + // pbLoading + // + this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None; + this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; + this.pbLoading.Location = new System.Drawing.Point(506, 192); + this.pbLoading.Name = "pbLoading"; + this.pbLoading.Size = new System.Drawing.Size(50, 50); + this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbLoading.TabIndex = 471; + this.pbLoading.TabStop = false; + this.pbLoading.Visible = false; // // dgvStock // this.dgvStock.AllowUserToAddRows = false; this.dgvStock.AllowUserToDeleteRows = false; - dataGridViewCellStyle8.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvStock.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvStock.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; this.dgvStock.AutoRowNumber = true; this.dgvStock.BackgroundColor = System.Drawing.Color.White; this.dgvStock.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle9.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvStock.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvStock.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; this.dgvStock.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvStock.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colUpId, @@ -1663,8 +1176,8 @@ namespace TemuKJD.KJDForms.ProductForms // // colProdName // - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colProdName.DefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colProdName.DefaultCellStyle = dataGridViewCellStyle5; this.colProdName.HeaderText = "标题"; this.colProdName.Name = "colProdName"; this.colProdName.ReadOnly = true; @@ -1880,20 +1393,9 @@ namespace TemuKJD.KJDForms.ProductForms this.splitContainer2.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); this.splitContainer2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pbShopLoading)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit(); - this.ucGroupBoxEx99.ResumeLayout(false); - this.ucGroupBoxEx99.PerformLayout(); - this.pnlSamePostage.ResumeLayout(false); - this.pnlSamePostage.PerformLayout(); - this.panel3.ResumeLayout(false); - this.panel3.PerformLayout(); - this.pnlStepPostage.ResumeLayout(false); - this.pnlStepPostage.PerformLayout(); - this.panel2.ResumeLayout(false); - this.panel2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.nudGroupCount)).EndInit(); - this.panel1.ResumeLayout(false); - this.panel1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvStock)).EndInit(); this.splitContainer4.Panel1.ResumeLayout(false); this.splitContainer4.Panel2.ResumeLayout(false); @@ -1906,44 +1408,6 @@ namespace TemuKJD.KJDForms.ProductForms #endregion private System.Windows.Forms.SplitContainer splitContainer1; - private UserComponent.UcGroupBoxEx ucGroupBoxEx99; - private DevComponents.DotNetBar.Controls.ComboBoxEx cmbCity; - private DevComponents.DotNetBar.Controls.ComboBoxEx cmbProvince; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.FlowLayoutPanel pnlSamePostage; - private System.Windows.Forms.Label label12; - private System.Windows.Forms.TextBox txtSamePostagePrice; - private System.Windows.Forms.Label label13; - private System.Windows.Forms.Panel panel3; - private System.Windows.Forms.RadioButton rbSamePostage; - private System.Windows.Forms.RadioButton rbStepPostage; - private System.Windows.Forms.RadioButton rbNoPostage; - private System.Windows.Forms.FlowLayoutPanel pnlStepPostage; - private System.Windows.Forms.RadioButton rbWithCount; - private System.Windows.Forms.RadioButton rbWithWeight; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.TextBox txtWeightOrCountStep1; - private System.Windows.Forms.Label lblWeightOrCountStep1; - private System.Windows.Forms.TextBox txtWeightOrCountPrice1; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.TextBox txtWeightOrCountStep2; - private System.Windows.Forms.Label lblWeightOrCountStep2; - private System.Windows.Forms.TextBox txtWeightOrCountPrice2; - private System.Windows.Forms.Label label8; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.TextBox textBox2; - private DevComponents.DotNetBar.PanelEx btnSetNotArea; - private System.Windows.Forms.NumericUpDown nudGroupCount; - private System.Windows.Forms.Label label11; - private System.Windows.Forms.Panel panel1; - private DevComponents.DotNetBar.PanelEx btnSetName; - private System.Windows.Forms.RadioButton rbCustomName; - private System.Windows.Forms.RadioButton rbAutoName; - private System.Windows.Forms.Label label7; - private DevComponents.DotNetBar.PanelEx btnAdd; - private DevComponents.DotNetBar.PanelEx btnStopAdd; - private System.Windows.Forms.CheckBox chkLimited; private System.Windows.Forms.TextBox txtStockid; private System.Windows.Forms.Label label4; private DevComponents.DotNetBar.PanelEx btnSearch; @@ -2032,5 +1496,8 @@ namespace TemuKJD.KJDForms.ProductForms private System.Windows.Forms.TextBox txtShopId; private System.Windows.Forms.Label label22; private DevComponents.DotNetBar.PanelEx btnEmpty; + private DevComponents.DotNetBar.PanelEx pnlSearchShop; + private System.Windows.Forms.PictureBox pbShopLoading; + private System.Windows.Forms.PictureBox pbLoading; } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.cs b/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.cs index 396db21..b4cf82f 100644 --- a/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.cs @@ -50,8 +50,6 @@ namespace TemuKJD.KJDForms.ProductForms private void StockUpForm_Load(object sender, EventArgs e) { - pnlSamePostage.Location = pnlStepPostage.Location; - chkSelectAll = dgvShop.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false); dgvShop.Columns["colSelect"].HeaderText = ""; //chkSelectAll.Width = chkSelectAll.Height = 13; @@ -83,15 +81,29 @@ namespace TemuKJD.KJDForms.ProductForms private void StockUpForm_VisibleChanged(object sender, EventArgs e) { if (Visible == true) - RefreshShop(); + FiltShop(); } private void btnRefreshShop_Click(object sender, EventArgs e) { - RefreshShop(); + pbShopLoading.Visible = true; + Task.Run(() => + { + ShopListForm.UpdateShop(); + Invoke(new Action(() => + { + FiltShop(); + pbShopLoading.Visible = false; + })); + }); } - private void RefreshShop() + private void btnSearchShop_Click(object sender, EventArgs e) + { + FiltShop(); + } + + private void FiltShop() { // 店铺Id var selectIds = dgvShop.Rows.Cast().Where(row @@ -608,7 +620,7 @@ namespace TemuKJD.KJDForms.ProductForms ShopLoginForm shopLoginForm = new ShopLoginForm(shop); shopLoginForm.openType = EnumOpenType.login; shopLoginForm.ShowDialog(); - RefreshShop(); + FiltShop(); } break; } @@ -1364,6 +1376,7 @@ namespace TemuKJD.KJDForms.ProductForms private void btnEmpty_Click(object sender, EventArgs e) { txtNotes.Text = txtShopId.Text = txtShopName.Text = ""; + FiltShop(); } } } diff --git a/TEMUKJD/KJDForms/ProductForms/TemuAdsForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/TemuAdsForm.Designer.cs index 7a6c0dc..799bc25 100644 --- a/TEMUKJD/KJDForms/ProductForms/TemuAdsForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/TemuAdsForm.Designer.cs @@ -30,15 +30,15 @@ namespace TemuKJD.KJDForms.ProductForms private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.ucGroupBoxEx3 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); this.txtSelectFilter = new System.Windows.Forms.TextBox(); @@ -70,6 +70,7 @@ namespace TemuKJD.KJDForms.ProductForms this.chkToday = new TemuKJD.UserComponent.UcCheckBox(this.components); this.btnSearchAds = new DevComponents.DotNetBar.PanelEx(); this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.btnSearchShop = new DevComponents.DotNetBar.PanelEx(); this.btnEmpty = new DevComponents.DotNetBar.PanelEx(); this.txtNotes = new System.Windows.Forms.TextBox(); this.btnCheckAdsLogin = new DevComponents.DotNetBar.PanelEx(); @@ -81,7 +82,7 @@ namespace TemuKJD.KJDForms.ProductForms this.label7 = new System.Windows.Forms.Label(); this.splitContainer3 = new System.Windows.Forms.SplitContainer(); this.splitContainer2 = new System.Windows.Forms.SplitContainer(); - this.pbLoading2 = new System.Windows.Forms.PictureBox(); + this.pbShopLoading = new System.Windows.Forms.PictureBox(); this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx(); this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -158,7 +159,7 @@ namespace TemuKJD.KJDForms.ProductForms this.splitContainer2.Panel1.SuspendLayout(); this.splitContainer2.Panel2.SuspendLayout(); this.splitContainer2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbLoading2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbShopLoading)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit(); this.gbxSoloChangeRoas.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit(); @@ -552,7 +553,7 @@ namespace TemuKJD.KJDForms.ProductForms // // chk30Days // - this.chk30Days.Location = new System.Drawing.Point(70, 85); + this.chk30Days.Location = new System.Drawing.Point(70, 84); this.chk30Days.Name = "chk30Days"; this.chk30Days.Size = new System.Drawing.Size(59, 21); this.chk30Days.TabIndex = 443; @@ -563,7 +564,7 @@ namespace TemuKJD.KJDForms.ProductForms // chk7Days // this.chk7Days.AutoSize = true; - this.chk7Days.Location = new System.Drawing.Point(13, 85); + this.chk7Days.Location = new System.Drawing.Point(13, 84); this.chk7Days.Name = "chk7Days"; this.chk7Days.Size = new System.Drawing.Size(58, 21); this.chk7Days.TabIndex = 442; @@ -574,7 +575,7 @@ namespace TemuKJD.KJDForms.ProductForms // chkYesterday // this.chkYesterday.AutoSize = true; - this.chkYesterday.Location = new System.Drawing.Point(70, 61); + this.chkYesterday.Location = new System.Drawing.Point(70, 60); this.chkYesterday.Name = "chkYesterday"; this.chkYesterday.Size = new System.Drawing.Size(51, 21); this.chkYesterday.TabIndex = 441; @@ -588,7 +589,7 @@ namespace TemuKJD.KJDForms.ProductForms this.chkToday.Checked = true; this.chkToday.CheckState = System.Windows.Forms.CheckState.Checked; this.chkToday.Enabled = false; - this.chkToday.Location = new System.Drawing.Point(13, 61); + this.chkToday.Location = new System.Drawing.Point(13, 60); this.chkToday.Name = "chkToday"; this.chkToday.Size = new System.Drawing.Size(51, 21); this.chkToday.TabIndex = 440; @@ -602,7 +603,7 @@ namespace TemuKJD.KJDForms.ProductForms this.btnSearchAds.Cursor = System.Windows.Forms.Cursors.Hand; this.btnSearchAds.DisabledBackColor = System.Drawing.Color.Empty; this.btnSearchAds.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSearchAds.Location = new System.Drawing.Point(13, 32); + this.btnSearchAds.Location = new System.Drawing.Point(13, 31); this.btnSearchAds.Name = "btnSearchAds"; this.btnSearchAds.Size = new System.Drawing.Size(110, 23); this.btnSearchAds.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -626,6 +627,7 @@ namespace TemuKJD.KJDForms.ProductForms | System.Windows.Forms.AnchorStyles.Left))); this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.ucGroupBoxEx1.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx1.Controls.Add(this.btnSearchShop); this.ucGroupBoxEx1.Controls.Add(this.btnEmpty); this.ucGroupBoxEx1.Controls.Add(this.txtNotes); this.ucGroupBoxEx1.Controls.Add(this.btnCheckAdsLogin); @@ -642,14 +644,38 @@ namespace TemuKJD.KJDForms.ProductForms this.ucGroupBoxEx1.TabStop = false; this.ucGroupBoxEx1.Text = "基础"; // + // btnSearchShop + // + this.btnSearchShop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnSearchShop.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSearchShop.DisabledBackColor = System.Drawing.Color.Empty; + this.btnSearchShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSearchShop.Location = new System.Drawing.Point(172, 90); + this.btnSearchShop.Name = "btnSearchShop"; + this.btnSearchShop.Size = new System.Drawing.Size(56, 23); + this.btnSearchShop.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearchShop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearchShop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearchShop.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnSearchShop.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnSearchShop.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnSearchShop.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnSearchShop.Style.GradientAngle = 90; + this.btnSearchShop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearchShop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearchShop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearchShop.TabIndex = 435; + this.btnSearchShop.Text = "查询店铺"; + this.btnSearchShop.Click += new System.EventHandler(this.btnSearchShop_Click); + // // btnEmpty // this.btnEmpty.CanvasColor = System.Drawing.SystemColors.Control; this.btnEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnEmpty.DisabledBackColor = System.Drawing.Color.Empty; - this.btnEmpty.Location = new System.Drawing.Point(223, 90); + this.btnEmpty.Location = new System.Drawing.Point(230, 90); this.btnEmpty.Name = "btnEmpty"; - this.btnEmpty.Size = new System.Drawing.Size(38, 23); + this.btnEmpty.Size = new System.Drawing.Size(31, 23); this.btnEmpty.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnEmpty.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); this.btnEmpty.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); @@ -675,14 +701,13 @@ namespace TemuKJD.KJDForms.ProductForms // // btnCheckAdsLogin // - this.btnCheckAdsLogin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnCheckAdsLogin.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnCheckAdsLogin.Cursor = System.Windows.Forms.Cursors.Hand; this.btnCheckAdsLogin.DisabledBackColor = System.Drawing.Color.Empty; this.btnCheckAdsLogin.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnCheckAdsLogin.Location = new System.Drawing.Point(19, 90); this.btnCheckAdsLogin.Name = "btnCheckAdsLogin"; - this.btnCheckAdsLogin.Size = new System.Drawing.Size(102, 23); + this.btnCheckAdsLogin.Size = new System.Drawing.Size(93, 23); this.btnCheckAdsLogin.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnCheckAdsLogin.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnCheckAdsLogin.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); @@ -709,14 +734,13 @@ namespace TemuKJD.KJDForms.ProductForms // // btnRefreshShop // - this.btnRefreshShop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnRefreshShop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnRefreshShop.Cursor = System.Windows.Forms.Cursors.Hand; this.btnRefreshShop.DisabledBackColor = System.Drawing.Color.Empty; this.btnRefreshShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnRefreshShop.Location = new System.Drawing.Point(123, 90); + this.btnRefreshShop.Location = new System.Drawing.Point(114, 90); this.btnRefreshShop.Name = "btnRefreshShop"; - this.btnRefreshShop.Size = new System.Drawing.Size(98, 23); + this.btnRefreshShop.Size = new System.Drawing.Size(56, 23); this.btnRefreshShop.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnRefreshShop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnRefreshShop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); @@ -729,7 +753,7 @@ namespace TemuKJD.KJDForms.ProductForms this.btnRefreshShop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.btnRefreshShop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.btnRefreshShop.TabIndex = 431; - this.btnRefreshShop.Text = "查询/刷新店铺"; + this.btnRefreshShop.Text = "刷新店铺"; this.btnRefreshShop.Click += new System.EventHandler(this.btnRefreshShop_Click); // // txtShopName @@ -792,7 +816,7 @@ namespace TemuKJD.KJDForms.ProductForms // // splitContainer2.Panel1 // - this.splitContainer2.Panel1.Controls.Add(this.pbLoading2); + this.splitContainer2.Panel1.Controls.Add(this.pbShopLoading); this.splitContainer2.Panel1.Controls.Add(this.dgvShop); this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0); // @@ -807,35 +831,35 @@ namespace TemuKJD.KJDForms.ProductForms this.splitContainer2.SplitterDistance = 280; this.splitContainer2.TabIndex = 0; // - // pbLoading2 + // pbShopLoading // - this.pbLoading2.Anchor = System.Windows.Forms.AnchorStyles.None; - this.pbLoading2.Image = global::TemuKJD.Properties.Resources.loading_blue; - this.pbLoading2.Location = new System.Drawing.Point(115, 188); - this.pbLoading2.Name = "pbLoading2"; - this.pbLoading2.Size = new System.Drawing.Size(50, 50); - this.pbLoading2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.pbLoading2.TabIndex = 9; - this.pbLoading2.TabStop = false; - this.pbLoading2.Visible = false; + this.pbShopLoading.Anchor = System.Windows.Forms.AnchorStyles.None; + this.pbShopLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; + this.pbShopLoading.Location = new System.Drawing.Point(115, 188); + this.pbShopLoading.Name = "pbShopLoading"; + this.pbShopLoading.Size = new System.Drawing.Size(50, 50); + this.pbShopLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbShopLoading.TabIndex = 9; + this.pbShopLoading.TabStop = false; + this.pbShopLoading.Visible = false; // // dgvShop // this.dgvShop.AllowUserToAddRows = false; this.dgvShop.AllowUserToDeleteRows = false; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle10.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10; this.dgvShop.AutoRowNumber = true; this.dgvShop.BackgroundColor = System.Drawing.Color.White; this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11; this.dgvShop.ColumnHeadersHeight = 45; this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colSelect, @@ -1117,19 +1141,19 @@ namespace TemuKJD.KJDForms.ProductForms // this.dgvAds.AllowUserToAddRows = false; this.dgvAds.AllowUserToDeleteRows = false; - dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke; - this.dgvAds.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle12.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvAds.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle12; this.dgvAds.AutoRowNumber = true; this.dgvAds.BackgroundColor = System.Drawing.Color.White; this.dgvAds.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dgvAds.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle13.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvAds.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle13; this.dgvAds.ColumnHeadersHeight = 45; this.dgvAds.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.colCheck, @@ -1193,8 +1217,8 @@ namespace TemuKJD.KJDForms.ProductForms // // colSupplierName // - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colSupplierName.DefaultCellStyle = dataGridViewCellStyle14; this.colSupplierName.HeaderText = "店铺名称"; this.colSupplierName.Name = "colSupplierName"; this.colSupplierName.ReadOnly = true; @@ -1251,8 +1275,8 @@ namespace TemuKJD.KJDForms.ProductForms // // colPrcie // - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colPrcie.DefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colPrcie.DefaultCellStyle = dataGridViewCellStyle15; this.colPrcie.HeaderText = "申报价"; this.colPrcie.Name = "colPrcie"; this.colPrcie.ReadOnly = true; @@ -1282,8 +1306,8 @@ namespace TemuKJD.KJDForms.ProductForms // // colSetCost // - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colSetCost.DefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colSetCost.DefaultCellStyle = dataGridViewCellStyle16; this.colSetCost.HeaderText = "成本"; this.colSetCost.Name = "colSetCost"; this.colSetCost.ReadOnly = true; @@ -1292,8 +1316,8 @@ namespace TemuKJD.KJDForms.ProductForms // // colSetDiscount // - dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colSetDiscount.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colSetDiscount.DefaultCellStyle = dataGridViewCellStyle17; this.colSetDiscount.HeaderText = "折扣"; this.colSetDiscount.Name = "colSetDiscount"; this.colSetDiscount.ReadOnly = true; @@ -1301,8 +1325,8 @@ namespace TemuKJD.KJDForms.ProductForms // // colAdStatus // - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.colAdStatus.DefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.colAdStatus.DefaultCellStyle = dataGridViewCellStyle18; this.colAdStatus.HeaderText = "推广状态"; this.colAdStatus.Name = "colAdStatus"; this.colAdStatus.ReadOnly = true; @@ -1531,7 +1555,7 @@ namespace TemuKJD.KJDForms.ProductForms this.splitContainer2.Panel2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); this.splitContainer2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.pbLoading2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbShopLoading)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit(); this.gbxSoloChangeRoas.ResumeLayout(false); this.gbxSoloChangeRoas.PerformLayout(); @@ -1563,7 +1587,7 @@ namespace TemuKJD.KJDForms.ProductForms private DevComponents.DotNetBar.PanelEx panelEx1; private DevComponents.DotNetBar.PanelEx btnClear; private DevComponents.DotNetBar.PanelEx btnCheckAdsLogin; - private System.Windows.Forms.PictureBox pbLoading2; + private System.Windows.Forms.PictureBox pbShopLoading; private System.Windows.Forms.PictureBox pbLoading; private DevComponents.DotNetBar.PanelEx btnAddAds; private DevComponents.DotNetBar.PanelEx btnDelAds; @@ -1651,5 +1675,6 @@ namespace TemuKJD.KJDForms.ProductForms private System.Windows.Forms.Label label8; private System.Windows.Forms.TextBox txtShopId; private DevComponents.DotNetBar.PanelEx btnEmpty; + private DevComponents.DotNetBar.PanelEx btnSearchShop; } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/ProductForms/TemuAdsForm.cs b/TEMUKJD/KJDForms/ProductForms/TemuAdsForm.cs index 8350d0c..cd559bc 100644 --- a/TEMUKJD/KJDForms/ProductForms/TemuAdsForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/TemuAdsForm.cs @@ -85,15 +85,29 @@ namespace TemuKJD.KJDForms.ProductForms private void TemuAdsForm_VisibleChanged(object sender, EventArgs e) { if (Visible == true) - RefreshShop(); + FiltShop(); } private void btnRefreshShop_Click(object sender, EventArgs e) { - RefreshShop(); + pbShopLoading.Visible = true; + Task.Run(() => + { + ShopListForm.UpdateShop(); + Invoke(new Action(() => + { + FiltShop(); + pbShopLoading.Visible = false; + })); + }); } - private void RefreshShop() + private void btnSearchShop_Click(object sender, EventArgs e) + { + FiltShop(); + } + + private void FiltShop() { // 店铺Id var selectIds = dgvShop.Rows.Cast().Where(row @@ -228,7 +242,7 @@ namespace TemuKJD.KJDForms.ProductForms ShopLoginForm shopLoginForm = new ShopLoginForm(shop); shopLoginForm.openType = EnumOpenType.login; shopLoginForm.ShowDialog(); - RefreshShop(); + FiltShop(); } } break; @@ -247,7 +261,7 @@ namespace TemuKJD.KJDForms.ProductForms shopLoginForm.openType = EnumOpenType.login; shopLoginForm.IsAdsLogin = true; shopLoginForm.ShowDialog(); - RefreshShop(); + FiltShop(); } break; } @@ -262,8 +276,8 @@ namespace TemuKJD.KJDForms.ProductForms BaseMsgForm.ShowError("请选中店铺!"); return; } - ShopListForm.Instance.CheckShopAdsLogin(shopIds, pbLoading2, statusBar); - this.RefreshShop(); + ShopListForm.Instance.CheckShopAdsLogin(shopIds, pbShopLoading, statusBar); + this.FiltShop(); } public static string getAdsGoodsList(ShopLoginInfo shop, int page = 1, int pageSize = 20) @@ -740,7 +754,7 @@ namespace TemuKJD.KJDForms.ProductForms if(!string.IsNullOrEmpty(error)) { BaseMsgForm.ShowError(error); - this.RefreshShop(); + this.FiltShop(); } lstWareHouse.AddRange(wareHouses); @@ -1067,7 +1081,7 @@ namespace TemuKJD.KJDForms.ProductForms if (!string.IsNullOrEmpty(error)) { BaseMsgForm.ShowError(error); - this.RefreshShop(); + this.FiltShop(); } lstWareHouse.AddRange(wareHouses); @@ -2388,6 +2402,7 @@ namespace TemuKJD.KJDForms.ProductForms private void btnEmpty_Click(object sender, EventArgs e) { txtNotes.Text = txtShopId.Text = txtShopName.Text = ""; + FiltShop(); } private void panelEx1_Click(object sender, EventArgs e) diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductCategorySearch.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductCategorySearch.cs index e436062..765e24a 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductCategorySearch.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductCategorySearch.cs @@ -21,11 +21,11 @@ namespace TemuKJD.KJDForms.ProductSelectForms { ShopLoginInfo Shop; TemuDBProductSelect ProdSelect; - SetProductSelectNotesType SelectType; + SetProductSelectType SelectType; //string ChangeCatId = ""; //string ChangeCatName = ""; Dictionary cateIdNameMap = new Dictionary(); - public DbProductCategorySearch(ShopLoginInfo shop, TemuDBProductSelect prodSelect, SetProductSelectNotesType selectType = SetProductSelectNotesType.DbProduct) + public DbProductCategorySearch(ShopLoginInfo shop, TemuDBProductSelect prodSelect, SetProductSelectType selectType = SetProductSelectType.DbProduct) { InitializeComponent(); @@ -46,7 +46,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms private void btnSave_Click(object sender, EventArgs e) { var url = BaseClass.BuildObjString("product/mdy_product_category"); - if (this.SelectType == SetProductSelectNotesType.ThirdProduct) + if (this.SelectType == SetProductSelectType.ThirdProduct) url = BaseClass.BuildObjString("product_third/mdy_product_category"); var data = UserLogin.GetSignaturex() + diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductEditDetailForm.Designer.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductEditDetailForm.Designer.cs index b1952a1..3d7dd76 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductEditDetailForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductEditDetailForm.Designer.cs @@ -33,13 +33,24 @@ namespace TemuKJD.KJDForms.ProductSelectForms this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.ucSkuImgListItem1 = new TemuKJD.ToolForms.UcSkuImgListItem(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.btnSave = new DevComponents.DotNetBar.PanelEx(); + this.tabProduct = new PinBaoBao.UserControls.UcTabControlMetro(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); + this.ucPropEdit1 = new TemuKJD.KJDForms.ProductSelectForms.UcPropEdit(); this.btnCancel = new DevComponents.DotNetBar.PanelEx(); + this.btnSave = new DevComponents.DotNetBar.PanelEx(); + this.pbLoading = new System.Windows.Forms.PictureBox(); this.flowLayoutPanel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.SuspendLayout(); + this.tabProduct.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.tabPage2.SuspendLayout(); + this.flowLayoutPanel2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).BeginInit(); this.SuspendLayout(); // // flowLayoutPanel1 @@ -48,10 +59,10 @@ namespace TemuKJD.KJDForms.ProductSelectForms this.flowLayoutPanel1.BackColor = System.Drawing.Color.White; this.flowLayoutPanel1.Controls.Add(this.ucSkuImgListItem1); this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 3); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; this.flowLayoutPanel1.Padding = new System.Windows.Forms.Padding(4); - this.flowLayoutPanel1.Size = new System.Drawing.Size(1198, 555); + this.flowLayoutPanel1.Size = new System.Drawing.Size(431, 292); this.flowLayoutPanel1.TabIndex = 2; // // ucSkuImgListItem1 @@ -74,46 +85,82 @@ namespace TemuKJD.KJDForms.ProductSelectForms // // splitContainer1.Panel1 // - this.splitContainer1.Panel1.Controls.Add(this.flowLayoutPanel1); + this.splitContainer1.Panel1.Controls.Add(this.pbLoading); + this.splitContainer1.Panel1.Controls.Add(this.tabProduct); // // splitContainer1.Panel2 // this.splitContainer1.Panel2.Controls.Add(this.btnCancel); this.splitContainer1.Panel2.Controls.Add(this.btnSave); this.splitContainer1.Size = new System.Drawing.Size(1198, 606); - this.splitContainer1.SplitterDistance = 555; + this.splitContainer1.SplitterDistance = 561; this.splitContainer1.TabIndex = 3; // - // btnSave + // tabProduct // - this.btnSave.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnSave.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnSave.DisabledBackColor = System.Drawing.Color.Empty; - this.btnSave.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSave.Location = new System.Drawing.Point(1108, 11); - this.btnSave.Name = "btnSave"; - this.btnSave.Size = new System.Drawing.Size(73, 23); - this.btnSave.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnSave.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnSave.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnSave.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.btnSave.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.btnSave.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.btnSave.Style.ForeColor.Color = System.Drawing.Color.White; - this.btnSave.Style.GradientAngle = 90; - this.btnSave.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnSave.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnSave.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnSave.TabIndex = 435; - this.btnSave.Text = "保存"; - this.btnSave.Click += new System.EventHandler(this.btnSave_Click); + this.tabProduct.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(251)))), ((int)(((byte)(251)))), ((int)(((byte)(251))))); + this.tabProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.tabProduct.Controls.Add(this.tabPage1); + this.tabProduct.Controls.Add(this.tabPage2); + this.tabProduct.Location = new System.Drawing.Point(0, 0); + this.tabProduct.Name = "tabProduct"; + this.tabProduct.SelectedIndex = 0; + this.tabProduct.ShowCloseButton = false; + this.tabProduct.Size = new System.Drawing.Size(445, 328); + this.tabProduct.TabIndex = 3; + this.tabProduct.TabSelectColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.tabProduct.TabSelectTextColor = System.Drawing.Color.Gray; + this.tabProduct.TabUnSelectTextColor = System.Drawing.Color.White; + // + // tabPage1 + // + this.tabPage1.Controls.Add(this.flowLayoutPanel1); + this.tabPage1.Location = new System.Drawing.Point(4, 26); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(437, 298); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "商品主图"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // tabPage2 + // + this.tabPage2.Controls.Add(this.flowLayoutPanel2); + this.tabPage2.Location = new System.Drawing.Point(4, 26); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(437, 298); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "商品属性"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // flowLayoutPanel2 + // + this.flowLayoutPanel2.AutoScroll = true; + this.flowLayoutPanel2.BackColor = System.Drawing.Color.White; + this.flowLayoutPanel2.Controls.Add(this.ucPropEdit1); + this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel2.Location = new System.Drawing.Point(3, 3); + this.flowLayoutPanel2.Name = "flowLayoutPanel2"; + this.flowLayoutPanel2.Padding = new System.Windows.Forms.Padding(4); + this.flowLayoutPanel2.Size = new System.Drawing.Size(431, 292); + this.flowLayoutPanel2.TabIndex = 3; + // + // ucPropEdit1 + // + this.ucPropEdit1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.ucPropEdit1.Location = new System.Drawing.Point(7, 7); + this.ucPropEdit1.Name = "ucPropEdit1"; + this.ucPropEdit1.Size = new System.Drawing.Size(300, 71); + this.ucPropEdit1.TabIndex = 0; // // btnCancel // + this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnCancel.CanvasColor = System.Drawing.SystemColors.Control; this.btnCancel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnCancel.DisabledBackColor = System.Drawing.Color.Empty; - this.btnCancel.Location = new System.Drawing.Point(1031, 11); + this.btnCancel.Location = new System.Drawing.Point(1031, 5); this.btnCancel.Margin = new System.Windows.Forms.Padding(4, 2, 2, 2); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(73, 23); @@ -133,12 +180,49 @@ namespace TemuKJD.KJDForms.ProductSelectForms this.btnCancel.Text = "取消"; this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); // + // btnSave + // + this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnSave.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnSave.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSave.DisabledBackColor = System.Drawing.Color.Empty; + this.btnSave.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSave.Location = new System.Drawing.Point(1108, 5); + this.btnSave.Name = "btnSave"; + this.btnSave.Size = new System.Drawing.Size(73, 23); + this.btnSave.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnSave.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSave.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSave.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnSave.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnSave.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnSave.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnSave.Style.GradientAngle = 90; + this.btnSave.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnSave.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSave.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSave.TabIndex = 435; + this.btnSave.Text = "保存"; + this.btnSave.Click += new System.EventHandler(this.btnSave_Click); + // + // pbLoading + // + this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None; + this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; + this.pbLoading.Location = new System.Drawing.Point(574, 255); + this.pbLoading.Name = "pbLoading"; + this.pbLoading.Size = new System.Drawing.Size(50, 50); + this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbLoading.TabIndex = 189; + this.pbLoading.TabStop = false; + this.pbLoading.Visible = false; + // // DbProductEditDetailForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.ClientSize = new System.Drawing.Size(1200, 640); this.Controls.Add(this.splitContainer1); + this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Name = "DbProductEditDetailForm"; this.Text = "DbProductEditDetailForm"; @@ -150,6 +234,11 @@ namespace TemuKJD.KJDForms.ProductSelectForms this.splitContainer1.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); this.splitContainer1.ResumeLayout(false); + this.tabProduct.ResumeLayout(false); + this.tabPage1.ResumeLayout(false); + this.tabPage2.ResumeLayout(false); + this.flowLayoutPanel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pbLoading)).EndInit(); this.ResumeLayout(false); } @@ -161,5 +250,11 @@ namespace TemuKJD.KJDForms.ProductSelectForms private System.Windows.Forms.SplitContainer splitContainer1; private DevComponents.DotNetBar.PanelEx btnSave; private DevComponents.DotNetBar.PanelEx btnCancel; + private PinBaoBao.UserControls.UcTabControlMetro tabProduct; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2; + private UcPropEdit ucPropEdit1; + private System.Windows.Forms.PictureBox pbLoading; } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductEditDetailForm.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductEditDetailForm.cs index 7cff071..6c21e7a 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductEditDetailForm.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductEditDetailForm.cs @@ -2,6 +2,7 @@ using AllBase.Model.Result; using DevComponents.DotNetBar; using NaiBa.Util.Extension; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.ComponentModel; @@ -12,6 +13,8 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using TemuKJD.BaseForms; +using TemuKJD.BLL; +using TemuKJD.KJDForms.ProductThirdSelectForms; using TemuKJD.ToolForms; using Work; @@ -19,17 +22,26 @@ namespace TemuKJD.KJDForms.ProductSelectForms { public partial class DbProductEditDetailForm : LRBaseForm { + public ShopLoginInfo shop { get; set; } + public string productDraftId { get; set; } KJDDBProduct dbProd = null; + TemuDBProductSelect dbProdSelect = null; List lstUcSkuImgListItem = new List(); int maxIndex = 1; int minIndex = 1; + List lstCategoryTemplate = new List(); - public DbProductEditDetailForm(KJDDBProduct _dbProd) + SetProductSelectType selectType; + + public DbProductEditDetailForm(KJDDBProduct _dbProd, TemuDBProductSelect _dbProdSelect = null, SetProductSelectType _selectType = SetProductSelectType.DbProduct) { InitializeComponent(); if (_dbProd != null) dbProd = _dbProd; + if (_dbProdSelect != null) + dbProdSelect = _dbProdSelect; + this.selectType = _selectType; this.Width = Math.Min(1600, Screen.PrimaryScreen.Bounds.Width); this.Height = Math.Min(900, Screen.PrimaryScreen.Bounds.Height); @@ -40,7 +52,11 @@ namespace TemuKJD.KJDForms.ProductSelectForms { if (string.IsNullOrWhiteSpace(dbProd.product_json)) { - var temuDBProd = DbProductSelectListManageForm.GetProductDetail(dbProd.id.ToString()); + KJDDBProduct temuDBProd = null; + if (selectType == SetProductSelectType.DbProduct) + temuDBProd = DbProductSelectListManageForm.GetProductDetail(dbProd.id.ToString()); + else if (selectType == SetProductSelectType.ThirdProduct) + temuDBProd = ProductThirdSelectListManageForm.GetProductDetail(dbProd.id.ToString()); if (temuDBProd == null || temuDBProd.id == 0) { BaseMsgForm.ShowError("商品已清除!"); @@ -49,7 +65,59 @@ namespace TemuKJD.KJDForms.ProductSelectForms dbProd = temuDBProd; } - var prodInfo = JsonHelper.DeserializeJsonToObject(dbProd.product_json); + pbLoading.BringToFront(); + pbLoading.Visible = true; + this.tabProduct.Dock = DockStyle.Fill; + var t = Task.Run(() => + { + var prodInfo = JsonHelper.DeserializeJsonToObject(dbProd.product_json); + + Invoke(new Action(() => + { + // 取商品主图并展示 + DisplayMainImg(prodInfo); + pbLoading.Visible = false; + })); + + //后面功能没写完暂时return掉 + Invoke(new Action(() => + { + this.tabProduct.TabPages.Remove(tabPage2); + })); + return; + + Invoke(new Action(() => + { + pbLoading.Visible = true; + })); + if (shop == null) + { + while (shop == null || shop.LoginStatus2 != "国际版在线") + { + var shopList = AdminForms.AdminShopListForm.lstAdminShopInfo.Where(s => s.LoginStatus2 == "国际版在线").ToList(); + if (shopList.Count == 0) + { + BaseMsgForm.ShowError("店铺全部掉线,无法上传图片!"); + return; + } + shop = shopList[Randomx.GetId(shopList.Count)]; + AdminForms.AdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false); + } + } + GetPropTemplate(prodInfo); + + Invoke(new Action(() => + { + // 根据类目获取商品属性模板 + DisplayPropTemplate(prodInfo); + pbLoading.Visible = false; + })); + }); + + } + + private void DisplayMainImg(TemuDetailProductInfo prodInfo) + { var mainImgUrls = prodInfo.carouselImageUrls; flowLayoutPanel1.Controls.Clear(); lstUcSkuImgListItem.Clear(); @@ -65,14 +133,187 @@ namespace TemuKJD.KJDForms.ProductSelectForms imgListItem.txtUseCount.Text = index.ToString(); imgListItem.txtUseCount.Tag = index; imgListItem.txtUseCount.ReadOnly = false; - imgListItem.btnDel.Text = "交换"; + imgListItem.txtUseCount.Width -= imgListItem.btnEdit.Width + 2; + imgListItem.btnEdit.Visible = true; + imgListItem.btnEdit.Text = "交换"; + imgListItem.btnEdit.Tag = imgListItem; + imgListItem.btnEdit.Click += BtnEdit_Click; imgListItem.btnDel.Tag = imgListItem; imgListItem.btnDel.Click += BtnDel_Click; + this.flowLayoutPanel1.Controls.Add(imgListItem); lstUcSkuImgListItem.Add(imgListItem); } } + private void GetPropTemplate(TemuDetailProductInfo prodInfo) + { + long catId = (this.dbProdSelect?.change_cat_id).ParseToLong(); + if (catId == 0) catId = (prodInfo?.categories?.cat10?.catId).ParseToLong(); + if (catId == 0) catId = (prodInfo?.categories?.cat9?.catId).ParseToLong(); + if (catId == 0) catId = (prodInfo?.categories?.cat8?.catId).ParseToLong(); + if (catId == 0) catId = (prodInfo?.categories?.cat7?.catId).ParseToLong(); + if (catId == 0) catId = (prodInfo?.categories?.cat6?.catId).ParseToLong(); + if (catId == 0) catId = (prodInfo?.categories?.cat5?.catId).ParseToLong(); + if (catId == 0) catId = (prodInfo?.categories?.cat4?.catId).ParseToLong(); + if (catId == 0) catId = (prodInfo?.categories?.cat3?.catId).ParseToLong(); + if (catId == 0) catId = (prodInfo?.categories?.cat2?.catId).ParseToLong(); + if (catId == 0) catId = (prodInfo?.categories?.cat1?.catId).ParseToLong(); + var propTemplateRst = DbProductSelectListManageForm.QueryCategoryTemplate(shop, productDraftId, catId.ParseToString()); + if (propTemplateRst.Contains("\"success\":true")) + { + try + { + JObject jObj = JObject.Parse(propTemplateRst); + var PropLstStr = JsonHelper.SerializeObject(jObj["result"]["properties"]); + lstCategoryTemplate.Clear(); + lstCategoryTemplate.AddRange(JsonHelper.DeserializeJsonToList(PropLstStr).OrderBy(p => p.templatePid)); + } + catch (Exception ex) + { + } + } + else + { + var error = BaseRegex.GetStringJson(ref propTemplateRst, "errorMsg"); + if (string.IsNullOrEmpty(error)) + error = BaseRegex.GetStringJson(ref propTemplateRst, "error_msg"); + + AdminForms.AdminShopListForm.Instance.CheckShopLogin(new ShopLoginInfo[] { shop }, false); + + if (shop.LoginStatus2 != "国际版在线") + { + BaseMsgForm.ShowError("因掉线导致商品属性模板获取失败,请登录后再试。"); + return; + } + else + { + BaseMsgForm.ShowError("商品属性模板获取失败,请重试:" + error); + return; + } + } + } + + private void DisplayPropTemplate(TemuDetailProductInfo prodInfo) + { + this.flowLayoutPanel2.Controls.Clear(); + foreach (var propCatTempInfo in this.lstCategoryTemplate) + { + if (propCatTempInfo.controlType != 1 && propCatTempInfo.controlType != 3 && propCatTempInfo.controlType != 1) + { + // 3 多选 + // 1 单选 + // 0 填写 + } + if (propCatTempInfo.name == "品牌名") + { + } + + var propEditItem = new UcPropEdit(); + propEditItem.Tag = propCatTempInfo; + propEditItem.Anchor = AnchorStyles.None; + propEditItem.lblRequired.Visible = propCatTempInfo.required.ParseToBool()|| propCatTempInfo.isImportant.ParseToBool(); //propCatTempInfo.required.ParseToBool(); + propEditItem.lblPropName.Text = propCatTempInfo.name + " " + propCatTempInfo.lang2Name["en"]; + propEditItem.cmbPropValues.TextChanged += CmbPropValues_TextChanged; + propEditItem.cmbPropValues.Tag = propCatTempInfo; + if (propCatTempInfo.values != null) + { + foreach (var v in propCatTempInfo.values) + { + propEditItem.cmbPropValues.Items.Add(v.value); + } + } + this.flowLayoutPanel2.Controls.Add(propEditItem); + + // 0为主属性 1为附庸属性,当主属性选择了某个值以后,附庸属性才显示 + if (propCatTempInfo.showType != 0) + propEditItem.Visible = false; + } + + foreach (var propCatTempInfo in this.lstCategoryTemplate) + { + var propEditItem = flowLayoutPanel2.Controls.Cast().FirstOrDefault(c => c.Tag == propCatTempInfo) as UcPropEdit; + if (propEditItem == null) + continue; + + var currentValue = prodInfo.productPropertyList.FirstOrDefault(p => p.refPid == propCatTempInfo.refPid); + if (currentValue != null) + { + propEditItem.cmbPropValues.Text = currentValue.propValue; + if (string.IsNullOrEmpty(propEditItem.cmbPropValues.Text)) + propEditItem.cmbPropValues.Text = currentValue.numberInputValue; + } + } + + SetSubPropEditVisible(); + } + + private void SetSubPropEditVisible() + { + foreach (var propCatTempInfo in this.lstCategoryTemplate) + { + var propEditItem = flowLayoutPanel2.Controls.Cast().FirstOrDefault(c => c.Tag == propCatTempInfo) as UcPropEdit; + if (propEditItem == null) + continue; + + if (propCatTempInfo.showType == 1) + { + propEditItem.Visible = false; + + var parentPropCatTempInfo = this.lstCategoryTemplate.FirstOrDefault(p => p.templatePid == propCatTempInfo.parentTemplatePid); + var parentPropEditItem = flowLayoutPanel2.Controls.Cast().FirstOrDefault(c => c.Tag == parentPropCatTempInfo) as UcPropEdit; + if (parentPropCatTempInfo == null || parentPropEditItem == null) + continue; + + var parentValue = parentPropEditItem.cmbPropValues.Text; + var parentId = parentPropCatTempInfo.values.FirstOrDefault(v => v.value == parentValue)?.vid; + if (string.IsNullOrEmpty(parentValue) || parentId == 0) + continue; + + var templatePropertyValueParent = + propCatTempInfo.templatePropertyValueParentList.FirstOrDefault(p => p.parentVidList.Contains(parentId.ParseToLong())); + if (templatePropertyValueParent != null) + { + propEditItem.Visible = true; + propEditItem.cmbPropValues.Items.Clear(); + foreach (var vid in templatePropertyValueParent.vidList) + { + var valueItem = propCatTempInfo.values.FirstOrDefault(v => v.vid == vid); + if (valueItem != null) + { + propEditItem.cmbPropValues.Items.Add(valueItem.value); + } + } + } + } + } + } + + private void CmbPropValues_TextChanged(object sender, EventArgs e) + { + var cmbPropValues = sender as ComboBox; + if (cmbPropValues == null) + return; + var propCatTempInfo = cmbPropValues.Tag as TemuCategoryTemplateInfo; + if (propCatTempInfo == null) + return; + + SetSubPropEditVisible(); + + cmbPropValues.ForeColor = Color.Red; + if (cmbPropValues.Items.Count == 0) + { + cmbPropValues.ForeColor = Color.Black; + return; + } + var propValues = cmbPropValues.Text.Split(new char[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries).ToList(); + if (propValues.Count <= propCatTempInfo.chooseMaxNum.ParseToInt()) + { + if (propValues.All(p => cmbPropValues.Items.Cast().Any(i => i.ParseToString() == p))) + cmbPropValues.ForeColor = Color.Black; + } + } + private void BtnDel_Click(object sender, EventArgs e) { PanelEx btnDel = sender as PanelEx; @@ -82,6 +323,18 @@ namespace TemuKJD.KJDForms.ProductSelectForms if (imgListItem == null) return; + flowLayoutPanel1.Controls.Remove(imgListItem); + } + + private void BtnEdit_Click(object sender, EventArgs e) + { + PanelEx btnEdit = sender as PanelEx; + if (btnEdit == null) + return; + UcSkuImgListItem imgListItem = btnEdit.Tag as UcSkuImgListItem; + if (imgListItem == null) + return; + int newIndex = imgListItem.txtUseCount.Text.ParseToInt(); if (newIndex < minIndex || newIndex > maxIndex) { @@ -131,11 +384,14 @@ namespace TemuKJD.KJDForms.ProductSelectForms if (dbProd != null && prodInfo != null) { var oldMainImgUrls = prodInfo.carouselImageUrls; - dbProd.product_json = dbProd.product_json.Replace(JsonHelper.SerializeObject(oldMainImgUrls), JsonHelper.SerializeObject(imgUrlLst)); + // 尽量使用字符串替换防止序列化时破坏原json结构 + var newProductJson = dbProd.product_json.Replace(JsonHelper.SerializeObject(oldMainImgUrls), JsonHelper.SerializeObject(imgUrlLst)); var url = BaseClass.BuildObjString("product/mdy_db_product"); + if (selectType == SetProductSelectType.ThirdProduct) + url = BaseClass.BuildObjString("product_third/mdy_db_product"); var data = UserLogin.GetSignaturex() + "&db_id=" + dbProd.id; - data += "&product_json=" + HttpUtility.UrlEncode(dbProd.product_json, Encoding.UTF8); + data += "&product_json=" + HttpUtility.UrlEncode(newProductJson, Encoding.UTF8); var html = GetHtml.PostUtf8(url, data); if (string.IsNullOrEmpty(html) || !html.Contains("\"code\":200")) html = GetHtml.PostUtf8(url, data); @@ -146,6 +402,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms } else { + dbProd.product_json = newProductJson; this.Close(); } } diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductListForm.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductListForm.cs index 239d98f..8bd9561 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductListForm.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductListForm.cs @@ -165,7 +165,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms Task.Run(() => { int pageCount; - var list = GetProductList(out pageCount, page); + decimal seconds; + var list = GetProductList(out pageCount, out seconds, page); lstTemuDbProduct.AddRange(list); this.ucSplitPage1.TotalPage = pageCount; @@ -215,6 +216,10 @@ namespace TemuKJD.KJDForms.ProductSelectForms Invoke(new Action(() => { this.pbLoading.Visible = false; + this.statusBar.lblTaskStatus.Text = "商品查询完毕"; +#if DEBUG + this.statusBar.lblTaskStatus.Text += ",耗时:" + seconds; +#endif })); }); } @@ -261,10 +266,11 @@ namespace TemuKJD.KJDForms.ProductSelectForms } } - public List GetProductList(out int pageCount, int page = 1, int pageSize = 200) + public List GetProductList(out int pageCount, out decimal seconds, int page = 1, int pageSize = 200) { List list = new List(); pageCount = 1; + seconds = 0; var url = BaseClass.BuildObjString("product/get_product_list"); var data = ""; @@ -278,7 +284,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms "&search_skc=" + txtSKC.Text.Trim() + "&search_notes=" + txtNotes.Text.Trim() + "&search_cat=" + txtCat.Text.Trim() + - "&search_ext_code=" + txtExtCode.Text.Trim() + + "&search_ext_code=" + string.Join(",", txtExtCode.Text.Trim().Split(new string[] { ",", ",", " "}, StringSplitOptions.RemoveEmptyEntries)) + "&search_prod_name=" + txtProdName.Text.Trim(); if (!IsClientJit) data += "&search_group=" + cmbGroup.Text.Trim(); @@ -293,6 +299,12 @@ namespace TemuKJD.KJDForms.ProductSelectForms { data += "&product_get_type=all"; } + if (BaseClass.SaLevel == 1 && !IsClientJit) + { +#if DEBUG + //data += "&sa_level=" + BaseClass.SaLevel; +#endif + } if (this.cmbSort.Text == "认领总数") { @@ -301,8 +313,6 @@ namespace TemuKJD.KJDForms.ProductSelectForms })); 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")) @@ -314,6 +324,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms return list; } + seconds = BaseRegex.GetDecimalJson(ref html, "seconds"); int count = BaseRegex.GetIntJson(ref html, "count"); pageCount = Math.Ceiling(1.0 * count / pageSize).ParseToInt(); pageCount = Math.Max(pageCount, 1); @@ -1150,10 +1161,16 @@ namespace TemuKJD.KJDForms.ProductSelectForms decimal GetExchangeRate(string inputStr) { if (inputStr.StartsWith("CA$")) - return 5.1m; + return 5.1m * 1.5m; if (inputStr.StartsWith("US$")) - return 7.1m; - return 1; + return 7.1m * 1.5m; + if (inputStr.StartsWith("AU$")) + return 4.7m * 1.5m; + if (inputStr.StartsWith("EU$") || inputStr.StartsWith("EUR$") || inputStr.StartsWith("EU€") || inputStr.StartsWith("EUR€")) + return 8.3m * 1.5m; + if (inputStr.StartsWith("CNY") || inputStr.StartsWith("CN$")) + return 1m * 1.5m; + return 10m; } private void dgvSelectShop_CellContentClick(object sender, DataGridViewCellEventArgs e) diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectEditNotesForm.Designer.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectEditNotesForm.Designer.cs index f7f0ca3..9f83d1e 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectEditNotesForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectEditNotesForm.Designer.cs @@ -50,13 +50,17 @@ this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.label8 = new System.Windows.Forms.Label(); this.txtNotes = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.btnEditDbProd = new DevComponents.DotNetBar.PanelEx(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.panel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.flowLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // // panel2 // this.panel2.BackColor = System.Drawing.Color.White; + this.panel2.Controls.Add(this.flowLayoutPanel1); this.panel2.Controls.Add(this.label7); this.panel2.Controls.Add(this.btnOk); this.panel2.Controls.Add(this.cmbUserNotes); @@ -64,7 +68,6 @@ this.panel2.Controls.Add(this.label6); this.panel2.Controls.Add(this.txtDraftId); this.panel2.Controls.Add(this.label5); - this.panel2.Controls.Add(this.btnFission); this.panel2.Controls.Add(this.lblTextCount); this.panel2.Controls.Add(this.txtSkc); this.panel2.Controls.Add(this.txtSpu); @@ -176,7 +179,8 @@ this.btnFission.CanvasColor = System.Drawing.SystemColors.Control; this.btnFission.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnFission.DisabledBackColor = System.Drawing.Color.Empty; - this.btnFission.Location = new System.Drawing.Point(88, 490); + this.btnFission.Location = new System.Drawing.Point(0, 0); + this.btnFission.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0); this.btnFission.Name = "btnFission"; this.btnFission.Size = new System.Drawing.Size(56, 26); this.btnFission.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -325,6 +329,41 @@ this.txtNotes.Size = new System.Drawing.Size(265, 44); this.txtNotes.TabIndex = 385; // + // btnEditDbProd + // + this.btnEditDbProd.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnEditDbProd.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnEditDbProd.DisabledBackColor = System.Drawing.Color.Empty; + this.btnEditDbProd.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnEditDbProd.Location = new System.Drawing.Point(59, 0); + this.btnEditDbProd.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0); + this.btnEditDbProd.Name = "btnEditDbProd"; + this.btnEditDbProd.Size = new System.Drawing.Size(72, 26); + this.btnEditDbProd.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnEditDbProd.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnEditDbProd.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnEditDbProd.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnEditDbProd.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnEditDbProd.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnEditDbProd.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnEditDbProd.Style.GradientAngle = 90; + this.btnEditDbProd.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnEditDbProd.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnEditDbProd.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnEditDbProd.TabIndex = 504; + this.btnEditDbProd.Text = "编辑源商品"; + this.btnEditDbProd.Visible = false; + this.btnEditDbProd.Click += new System.EventHandler(this.btnEditDbProd_Click); + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.Controls.Add(this.btnFission); + this.flowLayoutPanel1.Controls.Add(this.btnEditDbProd); + this.flowLayoutPanel1.Location = new System.Drawing.Point(88, 490); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(200, 28); + this.flowLayoutPanel1.TabIndex = 505; + // // DbProductSelectEditNotesForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -340,6 +379,7 @@ this.panel2.ResumeLayout(false); this.panel2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.flowLayoutPanel1.ResumeLayout(false); this.ResumeLayout(false); } @@ -367,5 +407,7 @@ private System.Windows.Forms.ComboBox cmbUserNotes; private DevComponents.DotNetBar.PanelEx btnOk; private System.Windows.Forms.Label label7; + private DevComponents.DotNetBar.PanelEx btnEditDbProd; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectEditNotesForm.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectEditNotesForm.cs index ba34413..554b1ea 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectEditNotesForm.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectEditNotesForm.cs @@ -13,17 +13,19 @@ using System.Windows.Forms; using AllBase; using Work; using TemuKJD.BLL; +using NaiBa.Util.Extension; namespace TemuKJD.KJDForms.ProductSelectForms { public partial class DbProductSelectEditNotesForm : LRBaseForm { - public bool IsClientJit { get; set; } = false; + public EnumClientMode ClientMode { get; set; } = EnumClientMode.Admin; + public ShopLoginInfo shop { get; set; } TemuDBProductSelect dbProdSelect = null; - SetProductSelectNotesType selectNotesType; + SetProductSelectType selectNotesType; - public DbProductSelectEditNotesForm(TemuDBProductSelect prod, SetProductSelectNotesType notesType= SetProductSelectNotesType.DbProduct) + public DbProductSelectEditNotesForm(TemuDBProductSelect prod, SetProductSelectType notesType= SetProductSelectType.DbProduct) { InitializeComponent(); @@ -46,7 +48,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms this.cmbUserNotes.Text = dbProdSelect.user_notes; } - if (selectNotesType == SetProductSelectNotesType.DbProduct) + if (selectNotesType == SetProductSelectType.DbProduct) { this.txtProdName.ReadOnly = false; this.lblTextCount.Visible = true; @@ -58,12 +60,21 @@ namespace TemuKJD.KJDForms.ProductSelectForms this.lblTextCount.Visible = false; this.btnFission.Visible = false; } + + if (ClientMode == EnumClientMode.Admin && BaseClass.SaLevel == 1) + { + this.btnEditDbProd.Visible = true; + } + else + { + this.btnEditDbProd.Visible = false; + } } private void btnOk_Click(object sender, EventArgs e) { var url = ""; - if (selectNotesType == SetProductSelectNotesType.DbProduct) + if (selectNotesType == SetProductSelectType.DbProduct) url = BaseClass.BuildObjString("product/mdy_product_select_notes"); else url = BaseClass.BuildObjString("product_third/mdy_product_select_notes"); @@ -72,9 +83,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms data += "&select_add_time=" + dbProdSelect.add_time.ToString("yyyy-MM-dd HH:mm:ss"); data += "¬es=" + this.txtNotes.Text.Trim(); data += "&user_notes=" + this.cmbUserNotes.Text.Trim(); - if (IsClientJit) + if (ClientMode == EnumClientMode.ClientJit) data += "&is_client_jit=true"; - if (selectNotesType == SetProductSelectNotesType.DbProduct) + if (selectNotesType == SetProductSelectType.DbProduct) { byte[] bytes = Encoding.GetEncoding("gb2312").GetBytes(txtProdName.Text.Trim()); if (bytes.Length > 1250) @@ -100,7 +111,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms { dbProdSelect.notes = this.txtNotes.Text.Trim(); dbProdSelect.user_notes = this.cmbUserNotes.Text.Trim(); - if (selectNotesType == SetProductSelectNotesType.DbProduct) + if (selectNotesType == SetProductSelectType.DbProduct) { dbProdSelect.fission_product_name = this.txtProdName.Text.Trim(); } @@ -135,5 +146,14 @@ namespace TemuKJD.KJDForms.ProductSelectForms this.txtProdName.Text = DbProductListForm.GetFissionProductName(temuDBProd); } + + private void btnEditDbProd_Click(object sender, EventArgs e) + { + var dbProd = new KJDDBProduct() { id = dbProdSelect.out_product_Id.ParseToInt() }; + DbProductEditDetailForm editDetailForm = new DbProductEditDetailForm(dbProd, dbProdSelect, selectNotesType); + editDetailForm.shop = shop; + editDetailForm.productDraftId = dbProdSelect.draft_id; + editDetailForm.ShowDialog(); + } } } diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.Designer.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.Designer.cs index 80aaf77..85e0b3a 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.Designer.cs @@ -42,6 +42,7 @@ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DbProductSelectListManageForm)); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.label12 = new System.Windows.Forms.Label(); this.numMaxWaitSecond = new System.Windows.Forms.NumericUpDown(); this.pbFissionSetting = new System.Windows.Forms.PictureBox(); this.btnForceEnable = new DevComponents.DotNetBar.PanelEx(); @@ -216,6 +217,7 @@ // // splitContainer1.Panel1 // + this.splitContainer1.Panel1.Controls.Add(this.label12); this.splitContainer1.Panel1.Controls.Add(this.numMaxWaitSecond); this.splitContainer1.Panel1.Controls.Add(this.pbFissionSetting); this.splitContainer1.Panel1.Controls.Add(this.btnForceEnable); @@ -267,6 +269,16 @@ this.splitContainer1.SplitterDistance = 120; this.splitContainer1.TabIndex = 2; // + // label12 + // + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(817, 71); + this.label12.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(56, 17); + this.label12.TabIndex = 802; + this.label12.Text = "加价配置"; + // // numMaxWaitSecond // this.numMaxWaitSecond.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); @@ -558,8 +570,8 @@ // chkSkuRandomPrice // this.chkSkuRandomPrice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.chkSkuRandomPrice.Location = new System.Drawing.Point(763, 4); - this.chkSkuRandomPrice.Margin = new System.Windows.Forms.Padding(2, 0, 0, 0); + this.chkSkuRandomPrice.Location = new System.Drawing.Point(761, 4); + this.chkSkuRandomPrice.Margin = new System.Windows.Forms.Padding(0); this.chkSkuRandomPrice.Name = "chkSkuRandomPrice"; this.chkSkuRandomPrice.Size = new System.Drawing.Size(110, 21); this.chkSkuRandomPrice.TabIndex = 468; @@ -575,7 +587,7 @@ 0, 0, 131072}); - this.numSkuRandomPrice.Location = new System.Drawing.Point(873, 3); + this.numSkuRandomPrice.Location = new System.Drawing.Point(871, 3); this.numSkuRandomPrice.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.numSkuRandomPrice.Name = "numSkuRandomPrice"; this.numSkuRandomPrice.Size = new System.Drawing.Size(44, 23); @@ -591,7 +603,7 @@ // this.label11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(917, 6); + this.label11.Location = new System.Drawing.Point(915, 6); this.label11.Margin = new System.Windows.Forms.Padding(0); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(20, 17); @@ -602,13 +614,14 @@ // this.chkOriginalPriceMarkUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.chkOriginalPriceMarkUp.AutoSize = true; - this.chkOriginalPriceMarkUp.Location = new System.Drawing.Point(939, 4); + this.chkOriginalPriceMarkUp.Location = new System.Drawing.Point(937, 4); this.chkOriginalPriceMarkUp.Margin = new System.Windows.Forms.Padding(2, 0, 0, 0); this.chkOriginalPriceMarkUp.Name = "chkOriginalPriceMarkUp"; this.chkOriginalPriceMarkUp.Size = new System.Drawing.Size(95, 21); this.chkOriginalPriceMarkUp.TabIndex = 469; this.chkOriginalPriceMarkUp.Text = "sku原价加价"; this.chkOriginalPriceMarkUp.UseVisualStyleBackColor = true; + this.chkOriginalPriceMarkUp.CheckedChanged += new System.EventHandler(this.chkOriginalPriceMarkUp_CheckedChanged); // // btnSetSubSa // @@ -1000,7 +1013,7 @@ // label17 // this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(933, 71); + this.label17.Location = new System.Drawing.Point(1007, 71); this.label17.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(20, 17); @@ -1015,7 +1028,7 @@ 0, 0, 131072}); - this.numAddPrice.Location = new System.Drawing.Point(889, 68); + this.numAddPrice.Location = new System.Drawing.Point(963, 68); this.numAddPrice.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.numAddPrice.Name = "numAddPrice"; this.numAddPrice.Size = new System.Drawing.Size(44, 23); @@ -1029,7 +1042,7 @@ // label16 // this.label16.AutoSize = true; - this.label16.Location = new System.Drawing.Point(843, 71); + this.label16.Location = new System.Drawing.Point(917, 71); this.label16.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(48, 17); @@ -1044,7 +1057,7 @@ 0, 0, 131072}); - this.numAddPriceTimes.Location = new System.Drawing.Point(799, 68); + this.numAddPriceTimes.Location = new System.Drawing.Point(873, 68); this.numAddPriceTimes.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.numAddPriceTimes.Name = "numAddPriceTimes"; this.numAddPriceTimes.Size = new System.Drawing.Size(44, 23); @@ -1395,13 +1408,14 @@ // chkAddPrice // this.chkAddPrice.AutoSize = true; - this.chkAddPrice.Location = new System.Drawing.Point(755, 69); + this.chkAddPrice.Location = new System.Drawing.Point(750, 69); this.chkAddPrice.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.chkAddPrice.Name = "chkAddPrice"; - this.chkAddPrice.Size = new System.Drawing.Size(51, 21); + this.chkAddPrice.Size = new System.Drawing.Size(75, 21); this.chkAddPrice.TabIndex = 550; - this.chkAddPrice.Text = "加价"; + this.chkAddPrice.Text = "额外加价"; this.chkAddPrice.UseVisualStyleBackColor = true; + this.chkAddPrice.CheckedChanged += new System.EventHandler(this.chkAddPrice_CheckedChanged); // // flowLayoutPanel2 // @@ -2238,5 +2252,6 @@ private System.Windows.Forms.DataGridViewLinkColumn colEditNotes; private System.Windows.Forms.DataGridViewLinkColumn colDelete; private System.Windows.Forms.DataGridViewTextBoxColumn colOpResult; + private System.Windows.Forms.Label label12; } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs index 8a265ff..3bc0889 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductSelectListManageForm.cs @@ -34,13 +34,6 @@ namespace TemuKJD.KJDForms.ProductSelectForms { public partial class DbProductSelectListManageForm : LRBaseForm { - public enum EnumClientMode - { - Admin, - Client, - ClientJit, - } - public EnumClientMode ClientMode { get; set; } = EnumClientMode.Admin; public CancellationTokenSource cancellationTokenSource { get; set; } = null; @@ -494,7 +487,8 @@ namespace TemuKJD.KJDForms.ProductSelectForms break; case "编辑备注": DbProductSelectEditNotesForm editForm = new DbProductSelectEditNotesForm(dbSelectProduct); - editForm.IsClientJit = (ClientMode == EnumClientMode.ClientJit); + editForm.ClientMode = ClientMode; + editForm.shop = GetShop(shopId); editForm.ShowDialog(); dgvSelectProduct.Rows[e.RowIndex].Cells["colNotes"].Value = dbSelectProduct.notes; dgvSelectProduct.Rows[e.RowIndex].Cells["colUserNotes"].Value = dbSelectProduct.user_notes; @@ -980,6 +974,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms string opRst = prod.status == "已上传" ? "已成功上传" : "已上传草稿箱"; row.Cells["colOpResult"].Value = opRst + "但保存到服务端失败:" + BaseRegex.GetStringJson(ref html, "msg") + (" " + error).Trim(' '); row.Cells["colStatus"].Value = prod.status; + row.Cells["colSelect"].Value = false; })); } else @@ -989,6 +984,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms row.Cells["colDraftId"].Value = productDraftId; // 草稿箱id row.Cells["colOpResult"].Value = prod.status == "已上传" ? "已成功上传" : "已上传草稿箱" + (" " + error).TrimEnd(' '); row.Cells["colStatus"].Value = prod.status; + row.Cells["colSelect"].Value = false; })); } } @@ -1207,13 +1203,13 @@ namespace TemuKJD.KJDForms.ProductSelectForms } prodParam.carouselImageI18nReqs = prodInfo.carouselImageI18nVOList; - prodParam.carouselImageUrls = prodInfo.carouselImageUrls; + prodParam.carouselImageUrls = prodInfo.carouselImageUrls.Take(10).ToList(); List realSkuItems = new List(); Dictionary aiImgInfoDic = new Dictionary(); List aiImgInfoList = new List(); List realCarouselImageUrls = new List(); - realCarouselImageUrls.AddRange(prodInfo.carouselImageUrls); + realCarouselImageUrls.AddRange(prodInfo.carouselImageUrls.Take(10)); if (chkCustomPic.Checked) // 上传自定义图片 自定义主图 { @@ -2057,9 +2053,19 @@ namespace TemuKJD.KJDForms.ProductSelectForms // 按照批号原价取商品原价和加价规则并修改商品上传价格 if (chkOriginalPriceMarkUp.Checked) { - var dbPrice = lstDbPrice.FirstOrDefault(p => p.ext_code == dbProd.ext_code); - if (dbPrice != null) - skuItem.supplierPrice = dbPrice.original_price * dbPrice.markup_times + dbPrice.extra_price; + if (dbProd.cost_price != null && dbProd.cost_price.ParseToInt() > 0) + { + skuItem.supplierPrice = (dbProd.cost_price.ParseToDecimal() * 100).ParseToInt(); + skuItem.supplierPrice = (skuItem.supplierPrice * numAddPriceTimes.Value + numAddPrice.Value * 100).ParseToInt(); + } + else + { + var dbPrice = lstDbPrice.FirstOrDefault(p => p.ext_code == dbProd.ext_code); + if (dbPrice != null) + skuItem.supplierPrice = dbPrice.original_price * dbPrice.markup_times + dbPrice.extra_price; + else + skuItem.supplierPrice = (skuInfo.supplierPrice * numAddPriceTimes.Value + numAddPrice.Value * 100).ParseToInt(); + } } if (chkAddPrice.Checked) //自定义加价 { @@ -3126,7 +3132,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms return HttpResponseBLL.PostResponse2(shop, url, body, refere); } - private string QueryCategoryTemplate(ShopLoginInfo shop, string draftId, string catId) + public static string QueryCategoryTemplate(ShopLoginInfo shop, string draftId, string catId) { string url = "https://agentseller.temu.com/anniston-agent-seller/category/template/query"; string body = @"{""catId"":" + catId + @",""langList"":[""en""]}"; @@ -3746,5 +3752,17 @@ Content-Disposition: form-data; name=""sign"" ProductThirdSelectForms.ProductThirdTitleForm titleForm = new ProductThirdSelectForms.ProductThirdTitleForm(); titleForm.ShowDialog(); } + + private void chkAddPrice_CheckedChanged(object sender, EventArgs e) + { + if (chkAddPrice.Checked) + chkOriginalPriceMarkUp.Checked = false; + } + + private void chkOriginalPriceMarkUp_CheckedChanged(object sender, EventArgs e) + { + if (chkOriginalPriceMarkUp.Checked) + chkAddPrice.Checked = false; + } } } diff --git a/TEMUKJD/KJDForms/ProductSelectForms/DbProductUserSelectEditNotesForm.cs b/TEMUKJD/KJDForms/ProductSelectForms/DbProductUserSelectEditNotesForm.cs index e4873da..5d799d5 100644 --- a/TEMUKJD/KJDForms/ProductSelectForms/DbProductUserSelectEditNotesForm.cs +++ b/TEMUKJD/KJDForms/ProductSelectForms/DbProductUserSelectEditNotesForm.cs @@ -19,9 +19,9 @@ namespace TemuKJD.KJDForms.ProductSelectForms public partial class DbProductUserSelectEditNotesForm : LRBaseForm { TemuDBProductSelect dbProdSelect = null; - SetProductSelectNotesType selectNotesType; + SetProductSelectType selectNotesType; - public DbProductUserSelectEditNotesForm(TemuDBProductSelect prod, SetProductSelectNotesType notesType= SetProductSelectNotesType.DbProduct) + public DbProductUserSelectEditNotesForm(TemuDBProductSelect prod, SetProductSelectType notesType= SetProductSelectType.DbProduct) { InitializeComponent(); @@ -41,7 +41,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms this.cmbUserNotes.Text = dbProdSelect.user_notes; } - if (selectNotesType == SetProductSelectNotesType.DbProduct) + if (selectNotesType == SetProductSelectType.DbProduct) { this.txtProdName.ReadOnly = true; this.lblTextCount.Visible = false; @@ -59,7 +59,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms this.cmbUserNotes.Text = "已买"; var url = ""; - if (selectNotesType == SetProductSelectNotesType.DbProduct) + if (selectNotesType == SetProductSelectType.DbProduct) url = BaseClass.BuildObjString("product/mdy_product_select_notes"); else url = BaseClass.BuildObjString("product_third/mdy_product_select_notes"); @@ -80,7 +80,7 @@ namespace TemuKJD.KJDForms.ProductSelectForms else { dbProdSelect.user_notes = this.cmbUserNotes.Text.Trim(); - if (selectNotesType == SetProductSelectNotesType.DbProduct) + if (selectNotesType == SetProductSelectType.DbProduct) { dbProdSelect.fission_product_name = this.txtProdName.Text.Trim(); } diff --git a/TEMUKJD/KJDForms/ProductSelectForms/UcPropEdit.Designer.cs b/TEMUKJD/KJDForms/ProductSelectForms/UcPropEdit.Designer.cs new file mode 100644 index 0000000..b6522dc --- /dev/null +++ b/TEMUKJD/KJDForms/ProductSelectForms/UcPropEdit.Designer.cs @@ -0,0 +1,100 @@ + +namespace TemuKJD.KJDForms.ProductSelectForms +{ + partial class UcPropEdit + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.cmbPropValues = new System.Windows.Forms.ComboBox(); + this.lblPropName = new System.Windows.Forms.Label(); + this.lblNotes = new System.Windows.Forms.Label(); + this.lblRequired = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // cmbPropValues + // + this.cmbPropValues.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.cmbPropValues.FormattingEnabled = true; + this.cmbPropValues.Location = new System.Drawing.Point(24, 32); + this.cmbPropValues.Name = "cmbPropValues"; + this.cmbPropValues.Size = new System.Drawing.Size(273, 25); + this.cmbPropValues.TabIndex = 0; + // + // lblPropName + // + this.lblPropName.AutoSize = true; + this.lblPropName.Location = new System.Drawing.Point(29, 11); + this.lblPropName.Name = "lblPropName"; + this.lblPropName.Size = new System.Drawing.Size(85, 17); + this.lblPropName.TabIndex = 1; + this.lblPropName.Text = "lblPropName"; + // + // lblNotes + // + this.lblNotes.Location = new System.Drawing.Point(173, 11); + this.lblNotes.Name = "lblNotes"; + this.lblNotes.Size = new System.Drawing.Size(124, 17); + this.lblNotes.TabIndex = 2; + this.lblNotes.Text = "lblNotes"; + this.lblNotes.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.lblNotes.Visible = false; + // + // lblRequired + // + this.lblRequired.AutoSize = true; + this.lblRequired.ForeColor = System.Drawing.Color.Red; + this.lblRequired.Location = new System.Drawing.Point(21, 11); + this.lblRequired.Name = "lblRequired"; + this.lblRequired.Size = new System.Drawing.Size(13, 17); + this.lblRequired.TabIndex = 3; + this.lblRequired.Text = "*"; + // + // UcPropEdit + // + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.Controls.Add(this.lblPropName); + this.Controls.Add(this.lblRequired); + this.Controls.Add(this.lblNotes); + this.Controls.Add(this.cmbPropValues); + this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Name = "UcPropEdit"; + this.Size = new System.Drawing.Size(323, 71); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + public System.Windows.Forms.ComboBox cmbPropValues; + public System.Windows.Forms.Label lblPropName; + public System.Windows.Forms.Label lblNotes; + public System.Windows.Forms.Label lblRequired; + } +} diff --git a/TEMUKJD/KJDForms/ProductSelectForms/UcPropEdit.cs b/TEMUKJD/KJDForms/ProductSelectForms/UcPropEdit.cs new file mode 100644 index 0000000..0bd049b --- /dev/null +++ b/TEMUKJD/KJDForms/ProductSelectForms/UcPropEdit.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace TemuKJD.KJDForms.ProductSelectForms +{ + public partial class UcPropEdit : UserControl + { + public UcPropEdit() + { + InitializeComponent(); + } + } +} diff --git a/TEMUKJD/KJDForms/ProductSelectForms/UcPropEdit.resx b/TEMUKJD/KJDForms/ProductSelectForms/UcPropEdit.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/TEMUKJD/KJDForms/ProductSelectForms/UcPropEdit.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectAddShopForm.cs b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectAddShopForm.cs index e30e70b..533bb89 100644 --- a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectAddShopForm.cs +++ b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectAddShopForm.cs @@ -1,6 +1,7 @@ using AllBase; using AllBase.Model.Result; using NaiBa.Util.Extension; +using NaiBa.Util.Winform.Extension; using System; using System.Collections.Generic; using System.ComponentModel; @@ -51,6 +52,8 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms private void ProductSelectAddShopForm_Load(object sender, EventArgs e) { + this.dgvSelectShop.AddSelectorColumn("colSelect"); + dgvSelectShop.Rows.Clear(); lstShop.Clear(); diff --git a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.Designer.cs b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.Designer.cs index 7a16841..b9429fd 100644 --- a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.Designer.cs @@ -590,16 +590,16 @@ this.chkDeleteLowPriceSku.Location = new System.Drawing.Point(567, 4); this.chkDeleteLowPriceSku.Margin = new System.Windows.Forms.Padding(0); this.chkDeleteLowPriceSku.Name = "chkDeleteLowPriceSku"; - this.chkDeleteLowPriceSku.Size = new System.Drawing.Size(95, 21); + this.chkDeleteLowPriceSku.Size = new System.Drawing.Size(99, 21); this.chkDeleteLowPriceSku.TabIndex = 472; - this.chkDeleteLowPriceSku.Text = "删除低价sku"; + this.chkDeleteLowPriceSku.Text = "删除低价SKU"; this.chkDeleteLowPriceSku.UseVisualStyleBackColor = true; // // chkRandomSkuOrder // this.chkRandomSkuOrder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.chkRandomSkuOrder.AutoSize = true; - this.chkRandomSkuOrder.Location = new System.Drawing.Point(662, 4); + this.chkRandomSkuOrder.Location = new System.Drawing.Point(666, 4); this.chkRandomSkuOrder.Margin = new System.Windows.Forms.Padding(0); this.chkRandomSkuOrder.Name = "chkRandomSkuOrder"; this.chkRandomSkuOrder.Size = new System.Drawing.Size(95, 21); @@ -610,7 +610,7 @@ // chkSkuRandomPrice // this.chkSkuRandomPrice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.chkSkuRandomPrice.Location = new System.Drawing.Point(757, 4); + this.chkSkuRandomPrice.Location = new System.Drawing.Point(761, 4); this.chkSkuRandomPrice.Margin = new System.Windows.Forms.Padding(0); this.chkSkuRandomPrice.Name = "chkSkuRandomPrice"; this.chkSkuRandomPrice.Size = new System.Drawing.Size(110, 21); @@ -626,7 +626,7 @@ 0, 0, 131072}); - this.numSkuRandomPrice.Location = new System.Drawing.Point(867, 3); + this.numSkuRandomPrice.Location = new System.Drawing.Point(871, 3); this.numSkuRandomPrice.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.numSkuRandomPrice.Name = "numSkuRandomPrice"; this.numSkuRandomPrice.Size = new System.Drawing.Size(44, 23); @@ -641,7 +641,7 @@ // this.label11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(911, 6); + this.label11.Location = new System.Drawing.Point(915, 6); this.label11.Margin = new System.Windows.Forms.Padding(0); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(20, 17); @@ -907,7 +907,7 @@ // label17 // this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(933, 71); + this.label17.Location = new System.Drawing.Point(952, 71); this.label17.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(20, 17); @@ -922,7 +922,7 @@ 0, 0, 131072}); - this.numAddPrice.Location = new System.Drawing.Point(889, 68); + this.numAddPrice.Location = new System.Drawing.Point(908, 68); this.numAddPrice.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.numAddPrice.Name = "numAddPrice"; this.numAddPrice.Size = new System.Drawing.Size(44, 23); @@ -936,7 +936,7 @@ // label16 // this.label16.AutoSize = true; - this.label16.Location = new System.Drawing.Point(843, 71); + this.label16.Location = new System.Drawing.Point(862, 71); this.label16.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(48, 17); @@ -951,7 +951,7 @@ 0, 0, 131072}); - this.numAddPriceTimes.Location = new System.Drawing.Point(799, 68); + this.numAddPriceTimes.Location = new System.Drawing.Point(818, 68); this.numAddPriceTimes.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.numAddPriceTimes.Name = "numAddPriceTimes"; this.numAddPriceTimes.Size = new System.Drawing.Size(44, 23); @@ -976,12 +976,12 @@ // chkAddPrice // this.chkAddPrice.AutoSize = true; - this.chkAddPrice.Location = new System.Drawing.Point(755, 69); + this.chkAddPrice.Location = new System.Drawing.Point(750, 69); this.chkAddPrice.Margin = new System.Windows.Forms.Padding(6, 0, 0, 0); this.chkAddPrice.Name = "chkAddPrice"; - this.chkAddPrice.Size = new System.Drawing.Size(51, 21); + this.chkAddPrice.Size = new System.Drawing.Size(75, 21); this.chkAddPrice.TabIndex = 615; - this.chkAddPrice.Text = "加价"; + this.chkAddPrice.Text = "额外加价"; this.chkAddPrice.UseVisualStyleBackColor = true; // // btnStop diff --git a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.cs b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.cs index 0d360a7..5632f1a 100644 --- a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.cs +++ b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdSelectListManageForm.cs @@ -36,13 +36,6 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms /// public partial class ProductThirdSelectListManageForm : LRBaseForm { - public enum EnumClientMode - { - Admin, - Client, - ClientJit, - } - public EnumClientMode ClientMode { get; set; } = EnumClientMode.Admin; public CancellationTokenSource cancellationTokenSource { get; set; } = null; @@ -395,7 +388,9 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms } break; case "编辑备注": - DbProductSelectEditNotesForm editForm = new DbProductSelectEditNotesForm(dbSelectProduct, SetProductSelectNotesType.ThirdProduct); + DbProductSelectEditNotesForm editForm = new DbProductSelectEditNotesForm(dbSelectProduct, SetProductSelectType.ThirdProduct); + editForm.ClientMode = this.ClientMode; + editForm.shop = GetShop(shopId); editForm.ShowDialog(); dgvSelectProduct.Rows[e.RowIndex].Cells["colNotes"].Value = dbSelectProduct.notes; dgvSelectProduct.Rows[e.RowIndex].Cells["colUserNotes"].Value = dbSelectProduct.user_notes; @@ -410,7 +405,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms case "商品类目": { var shop = GetShop(shopId); - DbProductCategorySearch searchForm = new DbProductCategorySearch(shop, dbSelectProduct, SetProductSelectNotesType.ThirdProduct); + DbProductCategorySearch searchForm = new DbProductCategorySearch(shop, dbSelectProduct, SetProductSelectType.ThirdProduct); searchForm.SaveComplete += SearchForm_SaveComplete; searchForm.ShowDialog(); } @@ -899,6 +894,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms string opRst = prod.status == "已上传" ? "已成功上传" : "已上传草稿箱"; row.Cells["colOpResult"].Value = opRst + "但保存到服务端失败:" + BaseRegex.GetStringJson(ref html, "msg") + (" " + error).Trim(' '); row.Cells["colStatus"].Value = prod.status; + row.Cells["colSelect"].Value = false; })); } else @@ -908,6 +904,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms row.Cells["colDraftId"].Value = productDraftId; // 草稿箱id row.Cells["colOpResult"].Value = prod.status == "已上传" ? "已成功上传" : "已上传草稿箱" + (" " + error).TrimEnd(' '); row.Cells["colStatus"].Value = prod.status; + row.Cells["colSelect"].Value = false; })); } } @@ -937,7 +934,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms return list.FirstOrDefault(); } - public KJDDBProduct GetProductDetail(string prodDbId) + public static KJDDBProduct GetProductDetail(string prodDbId) { if (string.IsNullOrEmpty(prodDbId)) return new KJDDBProduct(); @@ -1125,7 +1122,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms } prodParam.carouselImageI18nReqs = prodInfo.carouselImageI18nVOList; - prodParam.carouselImageUrls = prodInfo.carouselImageUrls; + prodParam.carouselImageUrls = prodInfo.carouselImageUrls.Take(10).ToList(); prodParam.goodsAdvantageLabelTypes = prodInfo.goodsAdvantageLabelVOList != null ? prodInfo.goodsAdvantageLabelVOList : new List(); diff --git a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdUserSelectForm.cs b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdUserSelectForm.cs index 519fa80..5b1eb49 100644 --- a/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdUserSelectForm.cs +++ b/TEMUKJD/KJDForms/ProductThirdSelectForms/ProductThirdUserSelectForm.cs @@ -406,7 +406,7 @@ namespace TemuKJD.KJDForms.ProductThirdSelectForms break; case "重上/已买": { - DbProductUserSelectEditNotesForm userNotesForm = new DbProductUserSelectEditNotesForm(dbProduct, SetProductSelectNotesType.ThirdProduct); + DbProductUserSelectEditNotesForm userNotesForm = new DbProductUserSelectEditNotesForm(dbProduct, SetProductSelectType.ThirdProduct); userNotesForm.ShowDialog(); dgvSelectProduct.Rows[e.RowIndex].Cells["colUserNotes"].Value = (dbProduct.user_notes + " 编辑").Trim(); } diff --git a/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.Designer.cs b/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.Designer.cs index 0206e1d..7243294 100644 --- a/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.Designer.cs +++ b/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.Designer.cs @@ -73,6 +73,14 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.splitContainer3 = new System.Windows.Forms.SplitContainer(); this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx(); + this.colSelect = new TemuKJD.UserComponent.UcDataGridViewCheckBoxColumn(this.components); + this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.splitContainer5 = new System.Windows.Forms.SplitContainer(); this.actDiscountLess60 = new TemuKJD.KJDForms.SalesCenterForms.UcActivityDiscountCtrl(); this.chkIfLowCancel = new TemuKJD.UserComponent.UcCheckBox(this.components); @@ -109,14 +117,8 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); this.btnClear = new DevComponents.DotNetBar.PanelEx(); this.panel1 = new System.Windows.Forms.Panel(); - this.colSelect = new TemuKJD.UserComponent.UcDataGridViewCheckBoxColumn(this.components); - this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn(); - this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn(); - this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.btnSearchShop = new DevComponents.DotNetBar.PanelEx(); + this.pbShopLoading = new System.Windows.Forms.PictureBox(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -148,6 +150,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.splitContainer4.Panel2.SuspendLayout(); this.splitContainer4.SuspendLayout(); this.panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbShopLoading)).BeginInit(); this.SuspendLayout(); // // splitContainer1 @@ -177,6 +180,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms | System.Windows.Forms.AnchorStyles.Left))); this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.ucGroupBoxEx1.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx1.Controls.Add(this.btnSearchShop); this.ucGroupBoxEx1.Controls.Add(this.btnEmpty); this.ucGroupBoxEx1.Controls.Add(this.txtNotes); this.ucGroupBoxEx1.Controls.Add(this.label14); @@ -197,9 +201,9 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.btnEmpty.CanvasColor = System.Drawing.SystemColors.Control; this.btnEmpty.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnEmpty.DisabledBackColor = System.Drawing.Color.Empty; - this.btnEmpty.Location = new System.Drawing.Point(173, 90); + this.btnEmpty.Location = new System.Drawing.Point(201, 90); this.btnEmpty.Name = "btnEmpty"; - this.btnEmpty.Size = new System.Drawing.Size(88, 23); + this.btnEmpty.Size = new System.Drawing.Size(60, 23); this.btnEmpty.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnEmpty.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); this.btnEmpty.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); @@ -213,7 +217,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.btnEmpty.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnEmpty.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; this.btnEmpty.TabIndex = 725; - this.btnEmpty.Text = "重置查询条件"; + this.btnEmpty.Text = "重置查询"; this.btnEmpty.Click += new System.EventHandler(this.btnEmpty_Click); // // txtNotes @@ -266,14 +270,13 @@ namespace TemuKJD.KJDForms.SalesCenterForms // // btnRefreshShop // - this.btnRefreshShop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnRefreshShop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.btnRefreshShop.Cursor = System.Windows.Forms.Cursors.Hand; this.btnRefreshShop.DisabledBackColor = System.Drawing.Color.Empty; this.btnRefreshShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnRefreshShop.Location = new System.Drawing.Point(75, 90); this.btnRefreshShop.Name = "btnRefreshShop"; - this.btnRefreshShop.Size = new System.Drawing.Size(96, 23); + this.btnRefreshShop.Size = new System.Drawing.Size(61, 23); this.btnRefreshShop.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnRefreshShop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnRefreshShop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); @@ -286,7 +289,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.btnRefreshShop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.btnRefreshShop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); this.btnRefreshShop.TabIndex = 431; - this.btnRefreshShop.Text = "查询/刷新店铺"; + this.btnRefreshShop.Text = "刷新店铺"; this.btnRefreshShop.Click += new System.EventHandler(this.btnRefreshShop_Click); // // ucGroupBoxEx2 @@ -638,6 +641,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms // // splitContainer2.Panel1 // + this.splitContainer2.Panel1.Controls.Add(this.pbShopLoading); this.splitContainer2.Panel1.Controls.Add(this.dgvShop); this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0); // @@ -687,6 +691,72 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.dgvShop.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellClick); this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick); // + // colSelect + // + this.colSelect.HeaderText = "全选"; + this.colSelect.Name = "colSelect"; + this.colSelect.ReadOnly = true; + this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colSelect.Width = 28; + // + // colShopLoginName + // + this.colShopLoginName.HeaderText = "店铺登录名"; + this.colShopLoginName.Name = "colShopLoginName"; + this.colShopLoginName.ReadOnly = true; + this.colShopLoginName.Visible = false; + // + // colShopId + // + this.colShopId.HeaderText = "店铺Id"; + this.colShopId.Name = "colShopId"; + this.colShopId.ReadOnly = true; + this.colShopId.Visible = false; + this.colShopId.Width = 55; + // + // colShopName + // + this.colShopName.FillWeight = 150F; + this.colShopName.HeaderText = "店铺名称"; + this.colShopName.Name = "colShopName"; + this.colShopName.ReadOnly = true; + this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colShopName.Width = 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; + // + // 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; + this.colMessage.Width = 120; + // // splitContainer5 // this.splitContainer5.Dock = System.Windows.Forms.DockStyle.Fill; @@ -1095,71 +1165,41 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.panel1.Size = new System.Drawing.Size(1438, 566); this.panel1.TabIndex = 12; // - // colSelect + // btnSearchShop // - 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; + this.btnSearchShop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnSearchShop.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSearchShop.DisabledBackColor = System.Drawing.Color.Empty; + this.btnSearchShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSearchShop.Location = new System.Drawing.Point(138, 90); + this.btnSearchShop.Name = "btnSearchShop"; + this.btnSearchShop.Size = new System.Drawing.Size(61, 23); + this.btnSearchShop.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearchShop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearchShop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearchShop.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnSearchShop.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnSearchShop.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnSearchShop.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnSearchShop.Style.GradientAngle = 90; + this.btnSearchShop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearchShop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearchShop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearchShop.TabIndex = 735; + this.btnSearchShop.Text = "查询店铺"; + this.btnSearchShop.Click += new System.EventHandler(this.btnSearchShop_Click); // - // colShopLoginName + // pbShopLoading // - this.colShopLoginName.HeaderText = "店铺登录名"; - this.colShopLoginName.Name = "colShopLoginName"; - this.colShopLoginName.ReadOnly = true; - this.colShopLoginName.Visible = false; - // - // colShopId - // - this.colShopId.HeaderText = "店铺Id"; - this.colShopId.Name = "colShopId"; - this.colShopId.ReadOnly = true; - this.colShopId.Visible = false; - this.colShopId.Width = 55; - // - // colShopName - // - this.colShopName.FillWeight = 150F; - this.colShopName.HeaderText = "店铺名称"; - this.colShopName.Name = "colShopName"; - this.colShopName.ReadOnly = true; - this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colShopName.Width = 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; - // - // 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; - this.colMessage.Width = 120; + this.pbShopLoading.Anchor = System.Windows.Forms.AnchorStyles.None; + this.pbShopLoading.Image = global::TemuKJD.Properties.Resources.loading_blue; + this.pbShopLoading.Location = new System.Drawing.Point(117, 181); + this.pbShopLoading.Name = "pbShopLoading"; + this.pbShopLoading.Size = new System.Drawing.Size(50, 50); + this.pbShopLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbShopLoading.TabIndex = 190; + this.pbShopLoading.TabStop = false; + this.pbShopLoading.Visible = false; // // MarketingActivityForm // @@ -1213,6 +1253,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms ((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).EndInit(); this.splitContainer4.ResumeLayout(false); this.panel1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pbShopLoading)).EndInit(); this.ResumeLayout(false); } @@ -1299,5 +1340,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms private System.Windows.Forms.DataGridViewLinkColumn colLoginStatus; private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse; private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; + private DevComponents.DotNetBar.PanelEx btnSearchShop; + private System.Windows.Forms.PictureBox pbShopLoading; } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.cs b/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.cs index 34a4d29..ae05830 100644 --- a/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.cs +++ b/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.cs @@ -154,15 +154,29 @@ namespace TemuKJD.KJDForms.SalesCenterForms private void MarketingActivityForm_VisibleChanged(object sender, EventArgs e) { if (this.Visible) - RefreshShop(); + FiltShop(); } private void btnRefreshShop_Click(object sender, EventArgs e) { - RefreshShop(); + pbShopLoading.Visible = true; + Task.Run(() => + { + ShopListForm.UpdateShop(); + Invoke(new Action(() => + { + FiltShop(); + pbShopLoading.Visible = false; + })); + }); } - private void RefreshShop() + private void btnSearchShop_Click(object sender, EventArgs e) + { + FiltShop(); + } + + private void FiltShop() { // 店铺Id var selectIds = dgvShop.Rows.Cast().Where(row @@ -201,6 +215,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms private void btnEmpty_Click(object sender, EventArgs e) { txtNotes.Text = txtShopId.Text = txtShopName.Text = ""; + FiltShop(); } private void BindShop(ShopLoginInfo shopEntity, List selectShopId = null) @@ -323,7 +338,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms ShopLoginForm shopLoginForm = new ShopLoginForm(shop); shopLoginForm.openType = EnumOpenType.login; shopLoginForm.ShowDialog(); - RefreshShop(); + FiltShop(); } } break; diff --git a/TEMUKJD/KJDForms/ShopForms/ShopListForm.cs b/TEMUKJD/KJDForms/ShopForms/ShopListForm.cs index bc71490..ea61ce4 100644 --- a/TEMUKJD/KJDForms/ShopForms/ShopListForm.cs +++ b/TEMUKJD/KJDForms/ShopForms/ShopListForm.cs @@ -48,31 +48,14 @@ namespace TemuKJD.KJDForms.ShopForms #region 服务端店铺管理 public static void UpdateShop() { - // 获取本地店铺和服务端店铺。将服务端相关信息与本地店铺合并后暂时存在内存中(不保存敏感信息)。 - //GlobalConfig.ShopLoginList = new ConcurrentList(); - GlobalConfig.ShopLoginList.Clear(); // 获取服务端店铺 var serverShopList = ShopListForm.GetServerShop(); - //var localShopList = NaiBa.Util.Helper.ConfigHelper.LoadConfig>("dou_shop_login"); - //if (localShopList == null) - // localShopList = new ConcurrentList(); - //foreach (var serverShop in serverShopList) - //{ - // var localShop = localShopList.FirstOrDefault(s => s.LoginName == serverShop.LoginName && s.ShopId == serverShop.ShopId); - // if (localShop == null) - // { - // localShopList.Add(serverShop); - // } - //} - var localShopList = new ConcurrentList(); - localShopList.AddRange(serverShopList); - foreach (var localShop in localShopList) + GlobalConfig.ShopLoginList.RemoveAll(s => serverShopList.Any(s1 => s1.LoginName == s.LoginName && s1.ShopId == s.ShopId)); + + foreach (var serverShop in serverShopList) { - if (GlobalConfig.ShopLoginList.Any(s => s.LoginName == localShop.LoginName && s.ShopId == localShop.ShopId)) - continue; - - var serverShop = serverShopList.FirstOrDefault(s => s.LoginName == localShop.LoginName && s.ShopId == localShop.ShopId); - if (serverShop != null) + var localShop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.LoginName == serverShop.LoginName && s.ShopId == serverShop.ShopId); + if (localShop != null) { localShop.ShopAccount = serverShop.ShopAccount; localShop.LoginName = serverShop.LoginName; @@ -95,9 +78,11 @@ namespace TemuKJD.KJDForms.ShopForms localShop.LoginStatus2 = serverShop.LoginStatus2; localShop.AddProductRemaining = serverShop.AddProductRemaining; localShop.OperateSubSaName = serverShop.OperateSubSaName; - if (localShop.TrialUploadCount < 0) - localShop.TrialUploadCount = 0; - GlobalConfig.ShopLoginList.Add(localShop); + localShop.TrialUploadCount = Math.Max(0, serverShop.TrialUploadCount); + } + else + { + GlobalConfig.ShopLoginList.Add(serverShop); } } } diff --git a/TEMUKJD/MainForm.cs b/TEMUKJD/MainForm.cs index f08cd80..20876cf 100644 --- a/TEMUKJD/MainForm.cs +++ b/TEMUKJD/MainForm.cs @@ -150,6 +150,11 @@ namespace TemuKJD BaseClass.MainPath = "binxixi"; this.pnlJit.Visible = false; } + else if (loginType == "Dy") + { + BaseClass.MainPath = "douyin"; + this.pnlJit.Visible = false; + } instance = this; this.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height); @@ -670,7 +675,7 @@ namespace TemuKJD } ShowMainPanel(shopForm as ShopForm, sender as Panel); } - else + else if (BaseClass.MainPath == "binxixi") { if (shopForm == null) { @@ -691,7 +696,7 @@ namespace TemuKJD } ShowMainPanel(adminForm as AdminForm, sender as Panel); } - else + else if (BaseClass.MainPath == "binxixi") { if (adminForm == null) { @@ -712,7 +717,7 @@ namespace TemuKJD } ShowMainPanel(uploadForm as ProductForm, sender as Panel); } - else + else if (BaseClass.MainPath == "binxixi") { if (uploadForm == null) { diff --git a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectEditNotesForm.cs b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectEditNotesForm.cs index 446e530..feb87d3 100644 --- a/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectEditNotesForm.cs +++ b/TEMUKJD/PDDForms/ProductSelectForms/PDDDBProdUserSelectEditNotesForm.cs @@ -20,9 +20,9 @@ namespace TemuKJD.PDDForms.ProductSelectForms public partial class PDDDBProdUserSelectEditNotesForm : LRBaseForm { TemuDBProductSelect dbProdSelect = null; - SetProductSelectNotesType selectNotesType; + SetProductSelectType selectNotesType; - public PDDDBProdUserSelectEditNotesForm(TemuDBProductSelect prod, SetProductSelectNotesType notesType= SetProductSelectNotesType.DbProduct) + public PDDDBProdUserSelectEditNotesForm(TemuDBProductSelect prod, SetProductSelectType notesType= SetProductSelectType.DbProduct) { InitializeComponent(); @@ -42,7 +42,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.cmbUserNotes.Text = dbProdSelect.user_notes; } - if (selectNotesType == SetProductSelectNotesType.DbProduct) + if (selectNotesType == SetProductSelectType.DbProduct) { this.txtProdName.ReadOnly = true; this.lblTextCount.Visible = false; @@ -60,7 +60,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms this.cmbUserNotes.Text = "已买"; var url = ""; - if (selectNotesType == SetProductSelectNotesType.DbProduct) + if (selectNotesType == SetProductSelectType.DbProduct) url = BaseClass.BuildObjString("product/mdy_product_select_notes"); else url = BaseClass.BuildObjString("product_third/mdy_product_select_notes"); @@ -81,7 +81,7 @@ namespace TemuKJD.PDDForms.ProductSelectForms else { dbProdSelect.user_notes = this.cmbUserNotes.Text.Trim(); - if (selectNotesType == SetProductSelectNotesType.DbProduct) + if (selectNotesType == SetProductSelectType.DbProduct) { dbProdSelect.fission_product_name = this.txtProdName.Text.Trim(); } diff --git a/TEMUKJD/StartUp.cs b/TEMUKJD/StartUp.cs index 2344ca6..c456cfc 100644 --- a/TEMUKJD/StartUp.cs +++ b/TEMUKJD/StartUp.cs @@ -19,7 +19,6 @@ using System.Text; using System.Threading; using System.Threading.Tasks; using Work; -using Work.DouyinApiClass; using AllBase.Model.Param.TemuProductManage; using TemuKJD.KJDForms.ShopForms; using TemuKJD.KJDForms.AdminForms; diff --git a/TEMUKJD/ToolForms/UcSkuImgListItem.Designer.cs b/TEMUKJD/ToolForms/UcSkuImgListItem.Designer.cs index 9e1c34c..b7e32a7 100644 --- a/TEMUKJD/ToolForms/UcSkuImgListItem.Designer.cs +++ b/TEMUKJD/ToolForms/UcSkuImgListItem.Designer.cs @@ -32,6 +32,7 @@ namespace TemuKJD.ToolForms this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.btnDel = new DevComponents.DotNetBar.PanelEx(); this.txtUseCount = new System.Windows.Forms.TextBox(); + this.btnEdit = new DevComponents.DotNetBar.PanelEx(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // @@ -56,9 +57,9 @@ namespace TemuKJD.ToolForms this.btnDel.Cursor = System.Windows.Forms.Cursors.Hand; this.btnDel.DisabledBackColor = System.Drawing.Color.Empty; this.btnDel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnDel.Location = new System.Drawing.Point(152, 253); + this.btnDel.Location = new System.Drawing.Point(192, 253); this.btnDel.Name = "btnDel"; - this.btnDel.Size = new System.Drawing.Size(98, 23); + this.btnDel.Size = new System.Drawing.Size(58, 23); this.btnDel.Style.Alignment = System.Drawing.StringAlignment.Center; this.btnDel.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.btnDel.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); @@ -87,17 +88,50 @@ namespace TemuKJD.ToolForms this.txtUseCount.Location = new System.Drawing.Point(0, 253); this.txtUseCount.Name = "txtUseCount"; this.txtUseCount.ReadOnly = true; - this.txtUseCount.Size = new System.Drawing.Size(150, 23); + this.txtUseCount.Size = new System.Drawing.Size(190, 23); this.txtUseCount.TabIndex = 533; this.txtUseCount.Text = "txtUseCount"; // + // btnEdit + // + this.btnEdit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnEdit.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnEdit.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnEdit.DisabledBackColor = System.Drawing.Color.Empty; + this.btnEdit.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnEdit.Location = new System.Drawing.Point(132, 253); + this.btnEdit.Name = "btnEdit"; + this.btnEdit.Size = new System.Drawing.Size(58, 23); + this.btnEdit.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnEdit.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnEdit.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnEdit.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnEdit.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnEdit.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnEdit.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnEdit.Style.GradientAngle = 90; + this.btnEdit.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnEdit.StyleMouseDown.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(151)))), ((int)(((byte)(61))))); + this.btnEdit.StyleMouseDown.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(184)))), ((int)(((byte)(94))))); + this.btnEdit.StyleMouseDown.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(251)))), ((int)(((byte)(140)))), ((int)(((byte)(60))))); + this.btnEdit.StyleMouseDown.ForeColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnEdit.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnEdit.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnEdit.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnEdit.StyleMouseOver.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(189)))), ((int)(((byte)(105))))); + this.btnEdit.StyleMouseOver.ForeColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.btnEdit.TabIndex = 540; + this.btnEdit.Text = "编辑图片"; + this.btnEdit.Visible = false; + // // UcSkuImgListItem // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; - this.Controls.Add(this.txtUseCount); this.Controls.Add(this.btnDel); this.Controls.Add(this.pictureBox1); + this.Controls.Add(this.btnEdit); + this.Controls.Add(this.txtUseCount); this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Name = "UcSkuImgListItem"; this.Size = new System.Drawing.Size(250, 280); @@ -111,5 +145,6 @@ namespace TemuKJD.ToolForms public DevComponents.DotNetBar.PanelEx btnDel; public System.Windows.Forms.PictureBox pictureBox1; public System.Windows.Forms.TextBox txtUseCount; + public DevComponents.DotNetBar.PanelEx btnEdit; } } diff --git a/Work/DouyinApiClass/DouyinApi.cs b/Work/DouyinApiClass/DouyinApi.cs deleted file mode 100644 index b371617..0000000 --- a/Work/DouyinApiClass/DouyinApi.cs +++ /dev/null @@ -1,401 +0,0 @@ -using AllBase; -using AllBase.Model.Result; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Work.DouyinApiClass -{ - public class DouyinApi - { - public Dictionary Data = new Dictionary(); - public Dictionary JsonData = new Dictionary(); - public ShopLoginInfo Shop = null; - public string Type, Name; - public static string Gate = "https://openapi-fxg.jinritemai.com/"; - public DouyinApi(ShopLoginInfo shop) - { - Shop = shop; - } - - public string GetDataDouyin() - { - - return ""; - } - - public string GetFreightTemplateList() - { - Type = "freightTemplate.list"; - string html = GetData(); - return html; - } - - /// - /// 获取店铺的已授权品牌列表 - /// - /// - public string shopBrandList() - { - Type = "shop.brandList"; - string html = GetData(); - return html; - } - - /// - ///类目品牌列表 - /// - /// - public string cateBrandList() - { - Type = "brand.list"; - string html = GetData(); - return html; - } - - public string GetCateProperty() - { - Type = "product.getCateProperty"; - string html = GetData(); - return html; - } - public string GetCatePropertyV2() - { - Type = "product.getCatePropertyV2"; - string html = GetData(); - return html; - } - - public string GetShopCategory(int cid) - { - Type = "shop.GetShopCategory"; - JsonData.Add("cid", cid.ToString()); - string html = GetData(); - return html; - } - - public string GetUploadVideo() - { - Type = "material.uploadVideoAsync"; - string html = GetData(); - return html; - } - - public string GetProperty() - { - Type = "product.getCateProperty"; - string html = GetData(); - return html; - } - - - public string GetAdd() - { - Type = "product.addV2"; - string html = GetData(); - return html; - } - - public string GetProductList() - { - Type = "product.listV2"; - string html = GetData(); - return html; - } - - public string SetProductOnline() - { - Type = "product.setOnline"; - string html = GetData(); - return html; - } - - public string SetProductOffline() - { - Type = "product.setOffline"; - string html = GetData(); - return html; - } - - public string GetResultUpdateRule() - { - Type = "product.getProductUpdateRule"; - string html = GetData(); - return html; - } - - public string SetProductStock() - { - Type = "sku.syncStock"; - string html = GetData(); - return html; - } - - public string DeleteProduct() - { - Type = "product.del"; - string html = GetData(); - return html; - } - public string GetProductEdit() - { - Type = "product.editV2"; - string html = GetData(); - return html; - } - public string GetProductDetail() - { - Type = "product.detail"; - string html = GetData(); - return html; - } - - public string GetEditStock() - { - Type = "sku.syncStock"; - string html = GetData(); - return html; - } - - public string GetEditPrice() - { - Type = "sku.editPrice"; - string html = GetData(); - return html; - } - /// - /// 创建图片文件夹 - /// - /// - public string GetCreateFolder() - { - Type = "material.createFolder"; - string html = GetData(); - return html; - } - - /// - /// 查询图片文件夹 - /// - /// - public string GetSearchFolder() - { - Type = "material.searchFolder"; - string html = GetData(); - return html; - } - - /// - /// 查询图片文件夹 - /// - /// - public string GetSearchMaterial() - { - Type = "material.searchMaterial"; - string html = GetData(); - return html; - } - - /// - /// 上传图片 - /// - /// - public string GetUploadImageSync() - { - Type = "material.uploadImageSync"; - string html = GetData(); - return html; - } - /// - /// 批量上传图片 - /// - /// - public string GetBatchUploadImageSync() - { - Type = "material.batchUploadImageSync"; - string html = GetData(); - return html; - } - - public string MaterialDeleteFolder() - { - Type = "material.deleteFolder"; - string html = GetData(); - return html == null ? "" : html; - } - public string MaterialDeleteMaterial() - { - Type = "material.deleteMaterial"; - string html = GetData(); - return html == null ? "" : html; - } - - /// - /// 获取类目资质证书 - /// - /// - public string GetQualificationConfig() - { - Type = "product.qualificationConfig"; - string html = GetData(); - return html; - } - - /// - /// 罗盘店铺信息open api - /// - /// - public string GetStatData() - { - Type = "compass.GetStatData"; - string html = GetData(); - return html; - } - - public string GetDataJson() - { - StringBuilder stringBuilder = new StringBuilder(); - foreach (string current in JsonData.Keys) - { - stringBuilder.AppendFormat((stringBuilder.Length > 0) ? ",\"{0}\":\"{1}\"" : "\"{0}\":\"{1}\"", current, JsonData[current].ToString()); - } - string json = "{" + stringBuilder.ToString() + "}"; - return json; - } - public string GetDataSignPara() - { - StringBuilder stringBuilderData = new StringBuilder(); - foreach (string current in Data.Keys) - { - if (current == "access_token" || current == "sign" || current == "param_json") - continue; - stringBuilderData.AppendFormat((stringBuilderData.Length > 0) ? ",\"{0}\":\"{1}\"" : "\"{0}\":\"{1}\"", current, Data[current].ToString()); - } - string param = "{" + stringBuilderData.ToString() + "}"; - return param; - } - public string GetDataFxgPara() - { - StringBuilder stringBuilderData = new StringBuilder(); - foreach (string current in Data.Keys) - { - stringBuilderData.AppendFormat((stringBuilderData.Length > 0) ? "&{0}={1}" : "{0}={1}", current, Data[current]?.ToString()); - } - string param = stringBuilderData.ToString(); - return param; - } - - public string GetData() - { - #region 获取接口数据 - string json = GetDataJson(); - json = HttpUtility.UrlEncode(json, Encoding.UTF8); - #endregion - #region 获取sign - string timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); - Data["app_key"] = Shop.AppKey; - Data["timestamp"] = timestamp; - Data["method"] = Type; - Data["v"] = "2"; - //Data["sign"] = ""; - string param = GetDataSignPara(); - string url = BaseClass.BuildObjString("sign&act=signature"); - string data = UserLogin.GetSignaturex() + "¶m_json=" + "" + json + "" - + "¶ms=" + param; - if (Shop.ShopAccount == "权益服务齐全的专营店") - url = "http://new.qixiaoke.com/index.php?obj=douyin/sign&act=signature_boe"; - string html = GetHtml.PostUtf8(url, data); - string sign = BaseRegex.GetStringJson(ref html, "sign"); - for (int i = 0; i < 5 && (string.IsNullOrEmpty(sign)); i++) - { - html = GetHtml.PostUtf8(url, data); - sign = BaseRegex.GetStringJson(ref html, "sign"); - } - #endregion - #region 提交抖店 - Data["param_json"] = json; - Data["access_token"] = Shop.AccessToken; - Data["sign"] = sign; - string fxgPara = GetDataFxgPara(); - string urlx = "https://openapi-fxg.jinritemai.com/" + Type.Replace(".", "/"); - if (Shop.ShopAccount == "权益服务齐全的专营店") - urlx = "https://openapi.jinritemai.com/" + Type.Replace(".", "/"); - string datax = fxgPara; - string htmlx = GetHtml.PostUtf8(urlx, datax); - int retryTime = 0; - while (!htmlx.Contains("\"code\":10000") && retryTime < 3) - { - System.Threading.Thread.Sleep(500); - if (htmlx.Contains("非法的参数")) - htmlx = GetHtml.PostUtf8(urlx, datax); - retryTime++; - } - return htmlx; - #endregion - } - - public string AddFreightTemplateListByBuyApi() - { - Type = "freightTemplate.create"; - string html = GetBuyApiData(); - return html; - } - - public string GetFreightTemplateListByBuyApi() - { - Type = "freightTemplate.list"; - string html = GetBuyApiData(); - return html; - } - - public string GetDouyinAddressAreaByBuyApi(string province_id) - { - if (string.IsNullOrEmpty(province_id) || province_id == "0") - Type = "address.getProvince"; - else - Type = "address.getAreasByProvince"; - JsonData["province_id"] = province_id; - string html = GetBuyApiData(); - return html; - } - - public string GetBuyApiData() - { - #region 获取接口数据 - string json = GetHtml.UrlEncodeUtf8(GetDataJson()); - // string timestamp = BaseClass.DateTimeToTimestampSeconds(DateTime.Now).ToString(); - //json = HttpUtility.UrlEncode(json, Encoding.UTF8); - #endregion - #region 获取sign - string timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); - Data["app_key"] = "7016502755254683171"; //Shop.AppKey; - Data["timestamp"] = timestamp; - Data["method"] = Type; - Data["v"] = "2"; - string param = GetHtml.UrlEncodeUtf8(GetDataSignPara()); - - string url = "http://103.90.155.35:54" + (new Random().Next(10, 20)) + "/sign.php?act=signature"; - //string url = BaseClass.DouYinBuildObjString("sign&act=signature"); - string data = UserLogin.GetSignaturex() + "¶m_json=" + json + "" - + "¶ms=" + param + "&service=2"; - string html = GetHtml.PostUtf8(url, data); - string sign = BaseRegex.GetStringJson(ref html, "sign"); // "c4df970da7f412d4dc7f5f9e0ee1b0e8" - #endregion - - #region 提交抖店 - - Data["param_json"] = json; - Data["access_token"] = Shop.BuyApiAuth.AccessToken; - Data["sign"] = sign; - string fxgPara = GetDataFxgPara(); - string urlx = "https://openapi-fxg.jinritemai.com/" + Type.Replace(".", "/") + "?app_key=7016502755254683171×tamp=" + timestamp + - "&method=" + Type + "&v=2¶m_json=" + json + "&access_token=" + Shop.BuyApiAuth.AccessToken + "&sign=" + sign; - string datax = fxgPara; - string htmlx = GetHtml.PostUtf8(urlx, datax); - return htmlx; - #endregion - } - } -} diff --git a/Work/Work.csproj b/Work/Work.csproj index 8778a89..a3a36ea 100644 --- a/Work/Work.csproj +++ b/Work/Work.csproj @@ -181,7 +181,6 @@ -