From b48f3200990aae576b1a23db0b3c75965fb73f05 Mon Sep 17 00:00:00 2001 From: wule Date: Sat, 5 Jul 2025 16:55:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=90=E8=B4=A6=E5=8F=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AllBase/AllBase.csproj | 7 +- AllBase/BaseClass.cs | 5 +- AllBase/Model/Result/DouShopLoginInfo.cs | 19 +- AllBase/Model/Result/TemuPriceAdjustInfo.cs | 106 +++ .../Result/{StockInfo.cs => TemuStockInfo.cs} | 2 +- TEMUKJD/ChangeForm.cs | 1 + TEMUKJD/KJD.csproj | 157 ++-- .../AccountForms/AccountForm.Designer.cs | 472 +++++++++++ TEMUKJD/KJDForms/AccountForms/AccountForm.cs | 151 ++++ .../KJDForms/AccountForms/AccountForm.resx | 144 ++++ .../UcCategoryProp.Designer.cs | 2 +- .../FissionUserControl/UcCategoryProp.cs | 2 +- .../FissionUserControl/UcCategoryProp.resx | 0 .../UcQualifiaction.Designer.cs | 2 +- .../FissionUserControl/UcQualifiaction.cs | 4 +- .../FissionUserControl/UcQualifiaction.resx | 0 .../Old}/CatForm.cs | 2 +- .../Old}/CatForm.designer.cs | 2 +- .../Old}/CatForm.resx | 0 .../Old}/CleanDataForm.Designer.cs | 2 +- .../Old}/CleanDataForm.cs | 2 +- .../Old}/CleanDataForm.resx | 0 .../Old}/CommissionForm.Designer.cs | 2 +- .../Old}/CommissionForm.cs | 2 +- .../Old}/CommissionForm.resx | 0 .../Old}/FilterForm.Designer.cs | 2 +- .../Old}/FilterForm.cs | 2 +- .../Old}/FilterForm.resx | 0 .../Old}/Fission.cs | 4 +- .../Old}/Fission.designer.cs | 2 +- .../Old}/Fission.resx | 0 .../Old}/FissionBrowserObject.cs | 2 +- .../Old}/FissionDataBaseForm.Designer.cs | 2 +- .../Old}/FissionDataBaseForm.cs | 6 +- .../Old}/FissionDataBaseForm.resx | 0 .../Old}/FissionShowBigImgForm.cs | 2 +- .../Old}/FissionShowBigImgForm.designer.cs | 2 +- .../Old}/FissionShowBigImgForm.resx | 0 .../Old}/GetUpProductForm.Designer.cs | 2 +- .../Old}/GetUpProductForm.cs | 2 +- .../Old}/GetUpProductForm.resx | 0 .../Old}/IeForm.cs | 0 .../Old}/IeForm.designer.cs | 0 .../Old}/IeForm.resx | 0 .../Old}/ShopProductForm.Designer.cs | 2 +- .../Old}/ShopProductForm.cs | 2 +- .../Old}/ShopProductForm.resx | 0 .../Old}/SpecialDelaySendForm.Designer.cs | 2 +- .../Old}/SpecialDelaySendForm.cs | 2 +- .../Old}/SpecialDelaySendForm.resx | 0 .../Old}/StockSyncForm.Designer.cs | 2 +- .../Old}/StockSyncForm.cs | 2 +- .../Old}/StockSyncForm.resx | 0 .../Old}/TbSettleSlideForm.cs | 0 .../Old}/TbSettleSlideForm.designer.cs | 0 .../Old}/TbSettleSlideForm.resx | 0 .../Old}/UploadProductCefForm.cs | 2 +- .../Old}/UploadProductErrorForm.Designer.cs | 2 +- .../Old}/UploadProductErrorForm.cs | 2 +- .../Old}/UploadProductErrorForm.resx | 0 .../Old}/UploadProductForm.Designer.cs | 2 +- .../Old}/UploadProductForm.cs | 2 +- .../Old}/UploadProductForm.resx | 0 ...UploadProductViolateSelectForm.Designer.cs | 2 +- .../Old}/UploadProductViolateSelectForm.cs | 2 +- .../Old}/UploadProductViolateSelectForm.resx | 0 .../Old}/ViolateManageForm.Designer.cs | 2 +- .../Old}/ViolateManageForm.cs | 2 +- .../Old}/ViolateManageForm.resx | 0 .../ProductForms/PriceManageForm.Designer.cs | 730 ++++++++++++++++++ .../KJDForms/ProductForms/PriceManageForm.cs | 559 ++++++++++++++ .../ProductForms/PriceManageForm.resx | 183 +++++ .../ProductForm.Designer.cs} | 90 +-- .../ProductForm.cs} | 21 +- .../ProductForm.resx} | 0 .../ProductResponse/ProductResponse.cs | 74 ++ .../SaleStockUpForm.Designer.cs} | 283 ++++--- .../SaleStockUpForm.cs} | 179 ++--- .../SaleStockUpForm.resx} | 0 .../ShopForms/ShopAddEditForm.Designer.cs | 6 +- TEMUKJD/KJDForms/ShopForms/ShopForm.cs | 8 +- .../ShopForms/ShopListForm.Designer.cs | 11 + TEMUKJD/KJDForms/ShopForms/ShopListForm.cs | 31 +- TEMUKJD/KJDForms/ShopForms/ShopListForm.resx | 3 + .../ShopForms/ShopLoginForm.Designer.cs | 22 +- TEMUKJD/KJDForms/ShopForms/ShopLoginForm.cs | 67 +- TEMUKJD/KJDForms/ShopForms/ShopLoginForm.resx | 54 +- .../ShopForms/SubAccountListForm.Designer.cs | 43 +- .../KJDForms/ShopForms/SubAccountListForm.cs | 38 +- .../ShopForms/SubAccountListForm.resx | 2 +- .../ShopForms/SubAccountShopEditForm.cs | 57 +- TEMUKJD/KJDForms/ShopForms/UcSubAccount.cs | 6 +- .../SystemRemoveRestrictionsForm.Designer.cs | 12 + .../KeywordsForms/KeywordsCatchFrom.cs | 2 +- TEMUKJD/MainForm.cs | 6 +- TEMUKJD/MainForm.designer.cs | 1 + TEMUKJD/Properties/AssemblyInfo.cs | 8 +- TEMUKJD/StartUp.cs | 3 +- TEMUKJD/UserForm/LoginForm.Designer.cs | 31 +- TEMUKJD/UserForm/LoginForm.cs | 15 +- TEMUKJD/UserForm/LoginForm.resx | 54 +- 101 files changed, 3171 insertions(+), 572 deletions(-) create mode 100644 AllBase/Model/Result/TemuPriceAdjustInfo.cs rename AllBase/Model/Result/{StockInfo.cs => TemuStockInfo.cs} (99%) create mode 100644 TEMUKJD/KJDForms/AccountForms/AccountForm.Designer.cs create mode 100644 TEMUKJD/KJDForms/AccountForms/AccountForm.cs create mode 100644 TEMUKJD/KJDForms/AccountForms/AccountForm.resx rename TEMUKJD/KJDForms/{UploadForms => ProductForms}/FissionUserControl/UcCategoryProp.Designer.cs (98%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms}/FissionUserControl/UcCategoryProp.cs (95%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms}/FissionUserControl/UcCategoryProp.resx (100%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms}/FissionUserControl/UcQualifiaction.Designer.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms}/FissionUserControl/UcQualifiaction.cs (97%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms}/FissionUserControl/UcQualifiaction.resx (100%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/CatForm.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/CatForm.designer.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/CatForm.resx (100%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/CleanDataForm.Designer.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/CleanDataForm.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/CleanDataForm.resx (100%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/CommissionForm.Designer.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/CommissionForm.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/CommissionForm.resx (100%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/FilterForm.Designer.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/FilterForm.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/FilterForm.resx (100%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/Fission.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/Fission.designer.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/Fission.resx (100%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/FissionBrowserObject.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/FissionDataBaseForm.Designer.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/FissionDataBaseForm.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/FissionDataBaseForm.resx (100%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/FissionShowBigImgForm.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/FissionShowBigImgForm.designer.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/FissionShowBigImgForm.resx (100%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/GetUpProductForm.Designer.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/GetUpProductForm.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/GetUpProductForm.resx (100%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/IeForm.cs (100%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/IeForm.designer.cs (100%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/IeForm.resx (100%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/ShopProductForm.Designer.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/ShopProductForm.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/ShopProductForm.resx (100%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/SpecialDelaySendForm.Designer.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/SpecialDelaySendForm.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/SpecialDelaySendForm.resx (100%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/StockSyncForm.Designer.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/StockSyncForm.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/StockSyncForm.resx (100%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/TbSettleSlideForm.cs (100%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/TbSettleSlideForm.designer.cs (100%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/TbSettleSlideForm.resx (100%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/UploadProductCefForm.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/UploadProductErrorForm.Designer.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/UploadProductErrorForm.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/UploadProductErrorForm.resx (100%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/UploadProductForm.Designer.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/UploadProductForm.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/UploadProductForm.resx (100%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/UploadProductViolateSelectForm.Designer.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/UploadProductViolateSelectForm.cs (98%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/UploadProductViolateSelectForm.resx (100%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/ViolateManageForm.Designer.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/ViolateManageForm.cs (99%) rename TEMUKJD/KJDForms/{UploadForms => ProductForms/Old}/ViolateManageForm.resx (100%) create mode 100644 TEMUKJD/KJDForms/ProductForms/PriceManageForm.Designer.cs create mode 100644 TEMUKJD/KJDForms/ProductForms/PriceManageForm.cs create mode 100644 TEMUKJD/KJDForms/ProductForms/PriceManageForm.resx rename TEMUKJD/KJDForms/{UploadForms/UploadForm.Designer.cs => ProductForms/ProductForm.Designer.cs} (85%) rename TEMUKJD/KJDForms/{UploadForms/UploadForm.cs => ProductForms/ProductForm.cs} (91%) rename TEMUKJD/KJDForms/{UploadForms/UploadForm.resx => ProductForms/ProductForm.resx} (100%) create mode 100644 TEMUKJD/KJDForms/ProductForms/ProductResponse/ProductResponse.cs rename TEMUKJD/KJDForms/{UploadForms/StockUpForm.Designer.cs => ProductForms/SaleStockUpForm.Designer.cs} (98%) rename TEMUKJD/KJDForms/{UploadForms/StockUpForm.cs => ProductForms/SaleStockUpForm.cs} (88%) rename TEMUKJD/KJDForms/{UploadForms/StockUpForm.resx => ProductForms/SaleStockUpForm.resx} (100%) diff --git a/AllBase/AllBase.csproj b/AllBase/AllBase.csproj index 7513a76..1b9514b 100644 --- a/AllBase/AllBase.csproj +++ b/AllBase/AllBase.csproj @@ -179,7 +179,8 @@ - + + @@ -225,9 +226,7 @@ - - - + diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs index 5177925..e75fec8 100644 --- a/AllBase/BaseClass.cs +++ b/AllBase/BaseClass.cs @@ -89,7 +89,8 @@ namespace AllBase public static string OriginUrl = "http://mobile.yangkeduo.com"; public static string NewUrl = "https://yangkeduo.com"; - public static string ServerUrl = "http://localhost:9000"; + //public static string ServerUrl = "http://localhost:9000"; + public static string ServerUrl = "http://1.13.195.131:9000"; /// /// 订单监控延迟 /// @@ -142,7 +143,7 @@ namespace AllBase /// 图片API /// //public static string LoginApiUrl = "http://new.qixiaoke.com/"; - public static string LoginApiUrl = "http://localhost:9000"; + public static string LoginApiUrl = ServerUrl; public static string BigDataApiUrl = "http://bigdata.qixiaoke.com/"; public static string GateApi = ""; public static string QqGroupNum = ""; diff --git a/AllBase/Model/Result/DouShopLoginInfo.cs b/AllBase/Model/Result/DouShopLoginInfo.cs index 2347bb6..2e2f6cb 100644 --- a/AllBase/Model/Result/DouShopLoginInfo.cs +++ b/AllBase/Model/Result/DouShopLoginInfo.cs @@ -39,7 +39,7 @@ namespace AllBase.Model.Result foreach (var sub in this.ShopSubAccountList) { if (sub.group_name == "客服") - accountStr += sub.name + ","; + accountStr += sub.user_name + ","; } return accountStr.TrimEnd(','); } @@ -55,7 +55,7 @@ namespace AllBase.Model.Result foreach (var sub in this.ShopSubAccountList) { if (sub.group_name == "上货") - accountStr += sub.name + ","; + accountStr += sub.user_name + ","; } return accountStr.TrimEnd(','); } @@ -71,7 +71,7 @@ namespace AllBase.Model.Result foreach (var sub in this.ShopSubAccountList) { if (sub.group_name == "采购") - accountStr += sub.name + ","; + accountStr += sub.user_name + ","; } return accountStr.TrimEnd(','); } @@ -104,7 +104,13 @@ namespace AllBase.Model.Result /// 拍单Api授权信息 /// public AuthInfo BuyApiAuth { get; set; } = new AuthInfo(); - + /// + /// 子账户 + /// + public string SubUserName { get; set; } + /// + /// 子账户列表(抖店用) + /// public List ShopSubAccountList { get; } = new List(); public int OnlineProductCount { get; set; } = -1; @@ -150,7 +156,8 @@ namespace AllBase.Model.Result public class SubAccountInfo { - public string name { get; set; } + public string user_name { get; set; } + public string nick_name { get; set; } public string mobile { get; set; } public string group_id { get; set; } public string group_name @@ -181,7 +188,7 @@ namespace AllBase.Model.Result { public string shop_login_name { get; set; } public string sub_user_id { get { return id.ToString(); } set { id = value.ParseToInt(); } } - public string sub_user_name { get { return name; } set { name = value; } } + public string sub_user_name { get { return user_name; } set { user_name = value; } } public string status { get; set; } = "1"; public string company_id { get; set; } } diff --git a/AllBase/Model/Result/TemuPriceAdjustInfo.cs b/AllBase/Model/Result/TemuPriceAdjustInfo.cs new file mode 100644 index 0000000..4665f8a --- /dev/null +++ b/AllBase/Model/Result/TemuPriceAdjustInfo.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace AllBase.Model.Result +{ + public class TemuPriceAdjustInfo + { + /// + /// 店铺Id(非登录id) + /// + public long supplierId { get; set; } + /// + /// skcId + /// + public long skcId { get; set; } + /// + /// 商品Id + /// + public long productId { get;set; } + public string productName { get; set; } + public string image { get; set; } + /// + /// 调价单号 + /// + public string priceOrderSn { get; set;} + /// + /// 调价Id + /// + public long? id { get; set; } + /// + /// 申请来源 + /// + public string source { get; set; } + /// + /// 调价原因 + /// + public string adjustReason { get; set; } + /// + /// sku详情列表 + /// + public List skuInfoItemList { get; set; } = new List(); + public string skuIds + { + get + { + var skuIsList = this.skuInfoItemList.Select(s => s.productSkuId).ToList(); + return string.Join(",", skuIsList); + } + } + public string skuSpecs + { + get + { + var skuSpecList = this.skuInfoItemList.Select(s => s.spec).ToList(); + return string.Join(",", skuSpecList); + } + } + /// + /// 申报价格类型 + /// + public string activityInvitationName { get; set; } + /// + /// 调整后申报价格 + /// + public decimal? newSupplyPrice { get; set; } + /// + /// 是否已取消调价 + /// + public bool isRefuseAdjust { get; set; } = false; + } + + public class SkuInfoItem + { + /// + /// skuId + /// + public long? productSkuId { get; set; } + public string skuExtCode { get; set; } + public int? priceBeforeExchange { get; set; } + public int? moreThanReviewPrice { get; set; } + /// + /// sku名称 + /// + public string spec { get; set; } + /// + /// 计价货币 "CNY", + /// + public string priceCurrency { get; set; } + /// + /// 币种 计价货币名称 "人民币" + /// + public string currencyName { get; set; } + /// + /// 价格 2500 单位分 + /// + public int? price { get; set; } + /// + /// + /// + public int? reviewSupplyPrice { get; set; } + public string semiManagerSource { get; set; } + } +} diff --git a/AllBase/Model/Result/StockInfo.cs b/AllBase/Model/Result/TemuStockInfo.cs similarity index 99% rename from AllBase/Model/Result/StockInfo.cs rename to AllBase/Model/Result/TemuStockInfo.cs index b4c8c48..b707f28 100644 --- a/AllBase/Model/Result/StockInfo.cs +++ b/AllBase/Model/Result/TemuStockInfo.cs @@ -9,7 +9,7 @@ namespace AllBase.Model.Result /// /// 系统待创建备货单 /// - public class StockInfo + public class TemuStockInfo { /// /// 卖家店铺id diff --git a/TEMUKJD/ChangeForm.cs b/TEMUKJD/ChangeForm.cs index edd7680..89145e9 100644 --- a/TEMUKJD/ChangeForm.cs +++ b/TEMUKJD/ChangeForm.cs @@ -37,6 +37,7 @@ namespace TemuKJD private void panel2_Click(object sender, EventArgs e) { + mf.WindowState = FormWindowState.Maximized; mf.Show(); mf.SetTitle(); mf.ShowTaobaoLoginAndInitModule(); diff --git a/TEMUKJD/KJD.csproj b/TEMUKJD/KJD.csproj index 3a77233..c84f8bc 100644 --- a/TEMUKJD/KJD.csproj +++ b/TEMUKJD/KJD.csproj @@ -186,6 +186,12 @@ InitForm.cs + + Form + + + AccountForm.cs + Form @@ -240,6 +246,13 @@ OrderForm.cs + + Form + + + PriceManageForm.cs + + Form @@ -510,128 +523,128 @@ TokenNewForm.cs - + Form - + CatForm.cs - + Form - + CleanDataForm.cs - + Form - + CommissionForm.cs - + Form - + FilterForm.cs - + Form - + Fission.cs - + Form - + FissionDataBaseForm.cs - + Form - + FissionShowBigImgForm.cs - + UserControl - + UcCategoryProp.cs - + Form - + GetUpProductForm.cs - + Form - + IeForm.cs - - + + Form - - StockUpForm.cs + + SaleStockUpForm.cs - + Form - + UploadProductErrorForm.cs - + Form - + UploadProductViolateSelectForm.cs - + Form - + ViolateManageForm.cs - + UserControl - + UcQualifiaction.cs - + Form - + SpecialDelaySendForm.cs - + Form - + StockSyncForm.cs - + Form - + TbSettleSlideForm.cs - + Form - - UploadForm.cs + + ProductForm.cs - + Form - + Form - + UploadProductForm.cs @@ -658,10 +671,10 @@ ShopListForm.cs - + Form - + ShopProductForm.cs @@ -769,6 +782,9 @@ InitForm.cs + + AccountForm.cs + BaseMsgForm.cs @@ -796,6 +812,9 @@ OrderForm.cs + + PriceManageForm.cs + FullMinusActiveForm.cs @@ -932,64 +951,64 @@ TokenNewForm.cs - + CatForm.cs - + CleanDataForm.cs - + CommissionForm.cs - + FilterForm.cs - + Fission.cs - + FissionDataBaseForm.cs - + FissionShowBigImgForm.cs - + UcCategoryProp.cs - + GetUpProductForm.cs - + IeForm.cs - - StockUpForm.cs + + SaleStockUpForm.cs - + UploadProductErrorForm.cs - + UploadProductViolateSelectForm.cs - + ViolateManageForm.cs - + UcQualifiaction.cs - + SpecialDelaySendForm.cs - + StockSyncForm.cs - + TbSettleSlideForm.cs - - UploadForm.cs + + ProductForm.cs - + UploadProductForm.cs @@ -1004,7 +1023,7 @@ ShopListForm.cs - + ShopProductForm.cs diff --git a/TEMUKJD/KJDForms/AccountForms/AccountForm.Designer.cs b/TEMUKJD/KJDForms/AccountForms/AccountForm.Designer.cs new file mode 100644 index 0000000..ce15fd8 --- /dev/null +++ b/TEMUKJD/KJDForms/AccountForms/AccountForm.Designer.cs @@ -0,0 +1,472 @@ + +namespace TemuKJD.KJDForms.AccountForms +{ + partial class AccountForm + { + /// + /// 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.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.repasstextBox = 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.groupIdcomboBox = new System.Windows.Forms.ComboBox(); + this.label37 = new System.Windows.Forms.Label(); + this.passwordtextBox = new System.Windows.Forms.TextBox(); + this.label38 = new System.Windows.Forms.Label(); + this.mobiletextBox = 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.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.shopCountColumn = 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.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.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.repasstextBox); + 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.groupIdcomboBox); + this.splitContainer5.Panel1.Controls.Add(this.label37); + this.splitContainer5.Panel1.Controls.Add(this.passwordtextBox); + this.splitContainer5.Panel1.Controls.Add(this.label38); + this.splitContainer5.Panel1.Controls.Add(this.mobiletextBox); + 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.dgvUser); + this.splitContainer5.Panel2.Padding = new System.Windows.Forms.Padding(0, 5, 5, 5); + this.splitContainer5.Size = new System.Drawing.Size(800, 450); + this.splitContainer5.SplitterDistance = 357; + this.splitContainer5.SplitterWidth = 1; + this.splitContainer5.TabIndex = 3; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.ForeColor = System.Drawing.SystemColors.ButtonShadow; + this.label1.Location = new System.Drawing.Point(56, 378); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(209, 12); + 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; + // + // 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, 328); + 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, 328); + 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, 145); + this.label30.Name = "label30"; + this.label30.Size = new System.Drawing.Size(53, 12); + 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, 229); + this.label31.Name = "label31"; + this.label31.Size = new System.Drawing.Size(11, 12); + this.label31.TabIndex = 32; + this.label31.Text = "*"; + // + // repasstextBox + // + this.repasstextBox.Location = new System.Drawing.Point(112, 226); + this.repasstextBox.Name = "repasstextBox"; + this.repasstextBox.PasswordChar = '*'; + this.repasstextBox.Size = new System.Drawing.Size(148, 21); + this.repasstextBox.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, 227); + 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, 271); + this.label33.Name = "label33"; + this.label33.Size = new System.Drawing.Size(11, 12); + 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, 187); + this.label34.Name = "label34"; + this.label34.Size = new System.Drawing.Size(11, 12); + 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, 145); + this.label35.Name = "label35"; + this.label35.Size = new System.Drawing.Size(11, 12); + 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, 103); + this.label36.Name = "label36"; + this.label36.Size = new System.Drawing.Size(11, 12); + this.label36.TabIndex = 27; + this.label36.Text = "*"; + // + // groupIdcomboBox + // + this.groupIdcomboBox.Enabled = false; + this.groupIdcomboBox.FormattingEnabled = true; + this.groupIdcomboBox.Items.AddRange(new object[] { + "客服", + "采购", + "上货", + "数据", + "登录"}); + this.groupIdcomboBox.Location = new System.Drawing.Point(112, 267); + this.groupIdcomboBox.Name = "groupIdcomboBox"; + this.groupIdcomboBox.Size = new System.Drawing.Size(148, 20); + this.groupIdcomboBox.TabIndex = 26; + this.groupIdcomboBox.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, 269); + this.label37.Name = "label37"; + this.label37.Size = new System.Drawing.Size(51, 20); + this.label37.TabIndex = 25; + this.label37.Text = "分组:"; + // + // passwordtextBox + // + this.passwordtextBox.Location = new System.Drawing.Point(112, 184); + this.passwordtextBox.Name = "passwordtextBox"; + this.passwordtextBox.PasswordChar = '*'; + this.passwordtextBox.Size = new System.Drawing.Size(148, 21); + this.passwordtextBox.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, 185); + this.label38.Name = "label38"; + this.label38.Size = new System.Drawing.Size(51, 20); + this.label38.TabIndex = 22; + this.label38.Text = "密码:"; + // + // mobiletextBox + // + this.mobiletextBox.Location = new System.Drawing.Point(112, 142); + this.mobiletextBox.Name = "mobiletextBox"; + this.mobiletextBox.Size = new System.Drawing.Size(148, 21); + this.mobiletextBox.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, 143); + 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, 100); + this.txtNickName.Name = "txtNickName"; + this.txtNickName.Size = new System.Drawing.Size(148, 21); + 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, 101); + this.label40.Name = "label40"; + this.label40.Size = new System.Drawing.Size(51, 20); + this.label40.TabIndex = 18; + this.label40.Text = "昵称:"; + // + // 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.shopCountColumn, + 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, 5); + this.dgvUser.Name = "dgvUser"; + this.dgvUser.ReadOnly = true; + this.dgvUser.RowTemplate.Height = 23; + this.dgvUser.Size = new System.Drawing.Size(437, 440); + this.dgvUser.TabIndex = 1; + // + // 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; + // + // shopCountColumn + // + this.shopCountColumn.HeaderText = "店铺数"; + this.shopCountColumn.Name = "shopCountColumn"; + this.shopCountColumn.ReadOnly = true; + this.shopCountColumn.Visible = false; + // + // 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; + // + // AccountForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.splitContainer5); + this.Name = "AccountForm"; + this.Text = "AccountForm"; + this.splitContainer5.Panel1.ResumeLayout(false); + this.splitContainer5.Panel1.PerformLayout(); + this.splitContainer5.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer5)).EndInit(); + this.splitContainer5.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 repasstextBox; + 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 groupIdcomboBox; + private System.Windows.Forms.Label label37; + private System.Windows.Forms.TextBox passwordtextBox; + private System.Windows.Forms.Label label38; + private System.Windows.Forms.TextBox mobiletextBox; + 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.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 shopCountColumn; + private System.Windows.Forms.DataGridViewLinkColumn editColumn; + private System.Windows.Forms.DataGridViewLinkColumn deleteColumn; + } +} \ No newline at end of file diff --git a/TEMUKJD/KJDForms/AccountForms/AccountForm.cs b/TEMUKJD/KJDForms/AccountForms/AccountForm.cs new file mode 100644 index 0000000..a943370 --- /dev/null +++ b/TEMUKJD/KJDForms/AccountForms/AccountForm.cs @@ -0,0 +1,151 @@ +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.KJDForms.BaseForms; +using Work; + +namespace TemuKJD.KJDForms.AccountForms +{ + public partial class AccountForm : Form + { + public static List AllUsers { get; set; } = new List(); + public MainForm Mf { get; set; } = null; + public string Uid { get; set; } = ""; + + public AccountForm() + { + InitializeComponent(); + } + + private void btnOpUser_Click(object sender, EventArgs e) + { + if (passwordtextBox.Text != repasstextBox.Text) + { + BaseMsgForm.ShowInfo("两次密码不正确", "提示"); + return; + } + if (btnOpUser.Text == "添加用户" && passwordtextBox.Text.Length < 6) + { + BaseMsgForm.ShowInfo("密码最少6位", "提示"); + return; + } + if (string.IsNullOrEmpty(txtNickName.Text) || string.IsNullOrEmpty(mobiletextBox.Text) || + mobiletextBox.Text.Length != 11) + { + BaseMsgForm.ShowInfo("信息不正确", "提示"); + return; + } + + StringBuilder data = new StringBuilder(); + data.Append(UserLogin.GetSignaturex()); + data.Append("&sub_nick_name=" + GetHtml.UrlEncodeUtf8(txtNickName.Text)); + data.Append("&sub_name=" + GetHtml.UrlEncodeUtf8(mobiletextBox.Text)); + data.Append("&sub_mobile=" + GetHtml.UrlEncodeUtf8(mobiletextBox.Text)); + data.Append("&card_id="); + if (groupIdcomboBox.Text == "客服") + data.Append("&group_id=4"); + else if (groupIdcomboBox.Text == "采购") + data.Append("&group_id=9"); + else if (groupIdcomboBox.Text == "主管") + { + data.Append("&group_id=3"); + } + else + { + BaseMsgForm.ShowInfo("分组不正确", "提示"); + return; + } + //if (groupIdcomboBox.Text == "上货") + // data.Append("&group_id=10"); + //if (groupIdcomboBox.Text == "数据") + // data.Append("&group_id=11"); + //if (groupIdcomboBox.Text == "登录") + // data.Append("&group_id=8"); + if (!string.IsNullOrEmpty(passwordtextBox.Text)) + data.Append("&sub_password=" + Md5Base.GetMd5(passwordtextBox.Text).ToLower()); + 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 (html == "had" || html == "error had") + { + BaseMsgForm.ShowInfo("手机号被占用,请换一个", "提示"); + return; + } + 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_user"); + string data = UserLogin.GetSignaturex(); + string html = GetHtml.PostUtf8(url, data); + 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); + DouShopSubAccountInfo user = new DouShopSubAccountInfo(); + 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"); + + AllUsers.Add(user); + dgvUser.Rows.Add(user.id, user.nick_name, user.user_name, user.group_id, user.group_name, user.shop_count, "编辑", "删除"); + } + } + } + + private void btnCancel_Click(object sender, EventArgs e) + { + btnOpUser.Text = "添加用户"; + Uid = ""; + EmptyInput(); + btnCancel.Visible = false; + } + + private void EmptyInput() + { + txtNickName.Clear(); + passwordtextBox.Clear(); + repasstextBox.Clear(); + mobiletextBox.Clear(); + } + } +} diff --git a/TEMUKJD/KJDForms/AccountForms/AccountForm.resx b/TEMUKJD/KJDForms/AccountForms/AccountForm.resx new file mode 100644 index 0000000..8daa718 --- /dev/null +++ b/TEMUKJD/KJDForms/AccountForms/AccountForm.resx @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/TEMUKJD/KJDForms/UploadForms/FissionUserControl/UcCategoryProp.Designer.cs b/TEMUKJD/KJDForms/ProductForms/FissionUserControl/UcCategoryProp.Designer.cs similarity index 98% rename from TEMUKJD/KJDForms/UploadForms/FissionUserControl/UcCategoryProp.Designer.cs rename to TEMUKJD/KJDForms/ProductForms/FissionUserControl/UcCategoryProp.Designer.cs index 9f7d946..07f80c4 100644 --- a/TEMUKJD/KJDForms/UploadForms/FissionUserControl/UcCategoryProp.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/FissionUserControl/UcCategoryProp.Designer.cs @@ -1,4 +1,4 @@ -namespace TemuKJD.KJDForms.UploadForms.FissionUserControl +namespace TemuKJD.KJDForms.ProductForms.FissionUserControl { partial class UcCategoryProp { diff --git a/TEMUKJD/KJDForms/UploadForms/FissionUserControl/UcCategoryProp.cs b/TEMUKJD/KJDForms/ProductForms/FissionUserControl/UcCategoryProp.cs similarity index 95% rename from TEMUKJD/KJDForms/UploadForms/FissionUserControl/UcCategoryProp.cs rename to TEMUKJD/KJDForms/ProductForms/FissionUserControl/UcCategoryProp.cs index d5df314..2d37ff5 100644 --- a/TEMUKJD/KJDForms/UploadForms/FissionUserControl/UcCategoryProp.cs +++ b/TEMUKJD/KJDForms/ProductForms/FissionUserControl/UcCategoryProp.cs @@ -10,7 +10,7 @@ using System.Windows.Forms; using AllBase.Helper; using TemuKJD.KJDForms.BaseForms; -namespace TemuKJD.KJDForms.UploadForms.FissionUserControl +namespace TemuKJD.KJDForms.ProductForms.FissionUserControl { public partial class UcCategoryProp : UserControl { diff --git a/TEMUKJD/KJDForms/UploadForms/FissionUserControl/UcCategoryProp.resx b/TEMUKJD/KJDForms/ProductForms/FissionUserControl/UcCategoryProp.resx similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/FissionUserControl/UcCategoryProp.resx rename to TEMUKJD/KJDForms/ProductForms/FissionUserControl/UcCategoryProp.resx diff --git a/TEMUKJD/KJDForms/UploadForms/FissionUserControl/UcQualifiaction.Designer.cs b/TEMUKJD/KJDForms/ProductForms/FissionUserControl/UcQualifiaction.Designer.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/FissionUserControl/UcQualifiaction.Designer.cs rename to TEMUKJD/KJDForms/ProductForms/FissionUserControl/UcQualifiaction.Designer.cs index 93e436c..7b0fb8d 100644 --- a/TEMUKJD/KJDForms/UploadForms/FissionUserControl/UcQualifiaction.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/FissionUserControl/UcQualifiaction.Designer.cs @@ -1,4 +1,4 @@ -namespace TemuKJD.KJDForms.UploadForms.FissionUserControl +namespace TemuKJD.KJDForms.ProductForms.FissionUserControl { partial class UcQualifiaction { diff --git a/TEMUKJD/KJDForms/UploadForms/FissionUserControl/UcQualifiaction.cs b/TEMUKJD/KJDForms/ProductForms/FissionUserControl/UcQualifiaction.cs similarity index 97% rename from TEMUKJD/KJDForms/UploadForms/FissionUserControl/UcQualifiaction.cs rename to TEMUKJD/KJDForms/ProductForms/FissionUserControl/UcQualifiaction.cs index 6340406..f5471ed 100644 --- a/TEMUKJD/KJDForms/UploadForms/FissionUserControl/UcQualifiaction.cs +++ b/TEMUKJD/KJDForms/ProductForms/FissionUserControl/UcQualifiaction.cs @@ -10,9 +10,9 @@ using System.Windows.Forms; using AllBase.Model.Param.ProductManage; using AllBase; using TemuKJD.KJDForms.BaseForms; -using TemuKJD.KJDForms.UploadForms; +using TemuKJD.KJDForms.ProductForms; -namespace TemuKJD.KJDForms.UploadForms.FissionUserControl +namespace TemuKJD.KJDForms.ProductForms.FissionUserControl { public partial class UcQualifiaction : UserControl { diff --git a/TEMUKJD/KJDForms/UploadForms/FissionUserControl/UcQualifiaction.resx b/TEMUKJD/KJDForms/ProductForms/FissionUserControl/UcQualifiaction.resx similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/FissionUserControl/UcQualifiaction.resx rename to TEMUKJD/KJDForms/ProductForms/FissionUserControl/UcQualifiaction.resx diff --git a/TEMUKJD/KJDForms/UploadForms/CatForm.cs b/TEMUKJD/KJDForms/ProductForms/Old/CatForm.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/CatForm.cs rename to TEMUKJD/KJDForms/ProductForms/Old/CatForm.cs index 8ed5eb0..b72e6e0 100644 --- a/TEMUKJD/KJDForms/UploadForms/CatForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/CatForm.cs @@ -13,7 +13,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { public partial class CatForm : LRBaseForm { diff --git a/TEMUKJD/KJDForms/UploadForms/CatForm.designer.cs b/TEMUKJD/KJDForms/ProductForms/Old/CatForm.designer.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/CatForm.designer.cs rename to TEMUKJD/KJDForms/ProductForms/Old/CatForm.designer.cs index de74142..98f94f9 100644 --- a/TEMUKJD/KJDForms/UploadForms/CatForm.designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/CatForm.designer.cs @@ -1,6 +1,6 @@ using System.Windows.Forms; -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { partial class CatForm { diff --git a/TEMUKJD/KJDForms/UploadForms/CatForm.resx b/TEMUKJD/KJDForms/ProductForms/Old/CatForm.resx similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/CatForm.resx rename to TEMUKJD/KJDForms/ProductForms/Old/CatForm.resx diff --git a/TEMUKJD/KJDForms/UploadForms/CleanDataForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/Old/CleanDataForm.Designer.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/CleanDataForm.Designer.cs rename to TEMUKJD/KJDForms/ProductForms/Old/CleanDataForm.Designer.cs index 93b29dc..966bcf7 100644 --- a/TEMUKJD/KJDForms/UploadForms/CleanDataForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/CleanDataForm.Designer.cs @@ -1,4 +1,4 @@ -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { partial class CleanDataForm { diff --git a/TEMUKJD/KJDForms/UploadForms/CleanDataForm.cs b/TEMUKJD/KJDForms/ProductForms/Old/CleanDataForm.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/CleanDataForm.cs rename to TEMUKJD/KJDForms/ProductForms/Old/CleanDataForm.cs index b1c544e..2ddc640 100644 --- a/TEMUKJD/KJDForms/UploadForms/CleanDataForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/CleanDataForm.cs @@ -20,7 +20,7 @@ using Work.Api; using Work.BLL.Upload; using Work.CollectClass; -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { public partial class CleanDataForm : Form { diff --git a/TEMUKJD/KJDForms/UploadForms/CleanDataForm.resx b/TEMUKJD/KJDForms/ProductForms/Old/CleanDataForm.resx similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/CleanDataForm.resx rename to TEMUKJD/KJDForms/ProductForms/Old/CleanDataForm.resx diff --git a/TEMUKJD/KJDForms/UploadForms/CommissionForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/Old/CommissionForm.Designer.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/CommissionForm.Designer.cs rename to TEMUKJD/KJDForms/ProductForms/Old/CommissionForm.Designer.cs index bf1acf2..a44b2da 100644 --- a/TEMUKJD/KJDForms/UploadForms/CommissionForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/CommissionForm.Designer.cs @@ -1,4 +1,4 @@ -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { partial class CommissionForm { diff --git a/TEMUKJD/KJDForms/UploadForms/CommissionForm.cs b/TEMUKJD/KJDForms/ProductForms/Old/CommissionForm.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/CommissionForm.cs rename to TEMUKJD/KJDForms/ProductForms/Old/CommissionForm.cs index fb907ea..2d2569c 100644 --- a/TEMUKJD/KJDForms/UploadForms/CommissionForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/CommissionForm.cs @@ -19,7 +19,7 @@ using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { public partial class CommissionForm : Form { diff --git a/TEMUKJD/KJDForms/UploadForms/CommissionForm.resx b/TEMUKJD/KJDForms/ProductForms/Old/CommissionForm.resx similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/CommissionForm.resx rename to TEMUKJD/KJDForms/ProductForms/Old/CommissionForm.resx diff --git a/TEMUKJD/KJDForms/UploadForms/FilterForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/Old/FilterForm.Designer.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/FilterForm.Designer.cs rename to TEMUKJD/KJDForms/ProductForms/Old/FilterForm.Designer.cs index 63e880b..aad5c03 100644 --- a/TEMUKJD/KJDForms/UploadForms/FilterForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/FilterForm.Designer.cs @@ -1,4 +1,4 @@ -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { partial class FilterForm { diff --git a/TEMUKJD/KJDForms/UploadForms/FilterForm.cs b/TEMUKJD/KJDForms/ProductForms/Old/FilterForm.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/FilterForm.cs rename to TEMUKJD/KJDForms/ProductForms/Old/FilterForm.cs index bc1423a..1381b4a 100644 --- a/TEMUKJD/KJDForms/UploadForms/FilterForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/FilterForm.cs @@ -12,7 +12,7 @@ using System.Windows.Forms; using Work; using Work.BLL.Upload; -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { public partial class FilterForm : LRBaseForm { diff --git a/TEMUKJD/KJDForms/UploadForms/FilterForm.resx b/TEMUKJD/KJDForms/ProductForms/Old/FilterForm.resx similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/FilterForm.resx rename to TEMUKJD/KJDForms/ProductForms/Old/FilterForm.resx diff --git a/TEMUKJD/KJDForms/UploadForms/Fission.cs b/TEMUKJD/KJDForms/ProductForms/Old/Fission.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/Fission.cs rename to TEMUKJD/KJDForms/ProductForms/Old/Fission.cs index 92105e7..0e03ee7 100644 --- a/TEMUKJD/KJDForms/UploadForms/Fission.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/Fission.cs @@ -29,12 +29,12 @@ using Work.DouyinApiClass; using Work.BLL.Upload; using NaiBa.CefHelper; using AllBase.Model.Param.ProductManage; -using TemuKJD.KJDForms.UploadForms.FissionUserControl; +using TemuKJD.KJDForms.ProductForms.FissionUserControl; using AllBase.Model.Result; using NaiBa.CefHelper.Handler; using TemuKJD.KJDForms.ToolForms.KeywordsForms; -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { public partial class Fission : LRBaseForm { diff --git a/TEMUKJD/KJDForms/UploadForms/Fission.designer.cs b/TEMUKJD/KJDForms/ProductForms/Old/Fission.designer.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/Fission.designer.cs rename to TEMUKJD/KJDForms/ProductForms/Old/Fission.designer.cs index c52e7a0..32825c1 100644 --- a/TEMUKJD/KJDForms/UploadForms/Fission.designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/Fission.designer.cs @@ -3,7 +3,7 @@ using System.Windows.Forms; using DevComponents.DotNetBar.Controls; using TemuKJD.UserComponent; -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { partial class Fission { diff --git a/TEMUKJD/KJDForms/UploadForms/Fission.resx b/TEMUKJD/KJDForms/ProductForms/Old/Fission.resx similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/Fission.resx rename to TEMUKJD/KJDForms/ProductForms/Old/Fission.resx diff --git a/TEMUKJD/KJDForms/UploadForms/FissionBrowserObject.cs b/TEMUKJD/KJDForms/ProductForms/Old/FissionBrowserObject.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/FissionBrowserObject.cs rename to TEMUKJD/KJDForms/ProductForms/Old/FissionBrowserObject.cs index 80b8035..62e95c3 100644 --- a/TEMUKJD/KJDForms/UploadForms/FissionBrowserObject.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/FissionBrowserObject.cs @@ -12,7 +12,7 @@ using System.Threading.Tasks; using System.Windows.Forms; using Work; -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { class FissionBrowserObject { diff --git a/TEMUKJD/KJDForms/UploadForms/FissionDataBaseForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/Old/FissionDataBaseForm.Designer.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/FissionDataBaseForm.Designer.cs rename to TEMUKJD/KJDForms/ProductForms/Old/FissionDataBaseForm.Designer.cs index d7811dc..4d24644 100644 --- a/TEMUKJD/KJDForms/UploadForms/FissionDataBaseForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/FissionDataBaseForm.Designer.cs @@ -1,4 +1,4 @@ -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { partial class FissionDataBaseForm { diff --git a/TEMUKJD/KJDForms/UploadForms/FissionDataBaseForm.cs b/TEMUKJD/KJDForms/ProductForms/Old/FissionDataBaseForm.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/FissionDataBaseForm.cs rename to TEMUKJD/KJDForms/ProductForms/Old/FissionDataBaseForm.cs index ae62b3f..931f6bd 100644 --- a/TEMUKJD/KJDForms/UploadForms/FissionDataBaseForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/FissionDataBaseForm.cs @@ -24,7 +24,7 @@ using Work.BLL.Upload; using Work.CollectClass; using Work.DouyinApiClass; -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { public partial class FissionDataBaseForm : Form { @@ -1069,8 +1069,8 @@ namespace TemuKJD.KJDForms.UploadForms private void btnToUpload_Click(object sender, EventArgs e) { - if (UploadForm.instance != null) - UploadForm.instance.SetTvSelect("商品发布"); + if (ProductForm.instance != null) + ProductForm.instance.SetTvSelect("商品发布"); } private void pnlDelCate_Click(object sender, EventArgs e) diff --git a/TEMUKJD/KJDForms/UploadForms/FissionDataBaseForm.resx b/TEMUKJD/KJDForms/ProductForms/Old/FissionDataBaseForm.resx similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/FissionDataBaseForm.resx rename to TEMUKJD/KJDForms/ProductForms/Old/FissionDataBaseForm.resx diff --git a/TEMUKJD/KJDForms/UploadForms/FissionShowBigImgForm.cs b/TEMUKJD/KJDForms/ProductForms/Old/FissionShowBigImgForm.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/FissionShowBigImgForm.cs rename to TEMUKJD/KJDForms/ProductForms/Old/FissionShowBigImgForm.cs index 441cd7f..59ecc54 100644 --- a/TEMUKJD/KJDForms/UploadForms/FissionShowBigImgForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/FissionShowBigImgForm.cs @@ -12,7 +12,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { public partial class FissionShowBigImgForm : LRBaseForm { diff --git a/TEMUKJD/KJDForms/UploadForms/FissionShowBigImgForm.designer.cs b/TEMUKJD/KJDForms/ProductForms/Old/FissionShowBigImgForm.designer.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/FissionShowBigImgForm.designer.cs rename to TEMUKJD/KJDForms/ProductForms/Old/FissionShowBigImgForm.designer.cs index b1c40a1..f4455aa 100644 --- a/TEMUKJD/KJDForms/UploadForms/FissionShowBigImgForm.designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/FissionShowBigImgForm.designer.cs @@ -1,4 +1,4 @@ -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { partial class FissionShowBigImgForm { diff --git a/TEMUKJD/KJDForms/UploadForms/FissionShowBigImgForm.resx b/TEMUKJD/KJDForms/ProductForms/Old/FissionShowBigImgForm.resx similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/FissionShowBigImgForm.resx rename to TEMUKJD/KJDForms/ProductForms/Old/FissionShowBigImgForm.resx diff --git a/TEMUKJD/KJDForms/UploadForms/GetUpProductForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/Old/GetUpProductForm.Designer.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/GetUpProductForm.Designer.cs rename to TEMUKJD/KJDForms/ProductForms/Old/GetUpProductForm.Designer.cs index ea6bb5a..8ec9b43 100644 --- a/TEMUKJD/KJDForms/UploadForms/GetUpProductForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/GetUpProductForm.Designer.cs @@ -1,4 +1,4 @@ -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { partial class GetUpProductForm { diff --git a/TEMUKJD/KJDForms/UploadForms/GetUpProductForm.cs b/TEMUKJD/KJDForms/ProductForms/Old/GetUpProductForm.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/GetUpProductForm.cs rename to TEMUKJD/KJDForms/ProductForms/Old/GetUpProductForm.cs index fb366e3..c3a524f 100644 --- a/TEMUKJD/KJDForms/UploadForms/GetUpProductForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/GetUpProductForm.cs @@ -15,7 +15,7 @@ using System.Threading.Tasks; using System.Windows.Forms; using Work; -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { public partial class GetUpProductForm : Form { diff --git a/TEMUKJD/KJDForms/UploadForms/GetUpProductForm.resx b/TEMUKJD/KJDForms/ProductForms/Old/GetUpProductForm.resx similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/GetUpProductForm.resx rename to TEMUKJD/KJDForms/ProductForms/Old/GetUpProductForm.resx diff --git a/TEMUKJD/KJDForms/UploadForms/IeForm.cs b/TEMUKJD/KJDForms/ProductForms/Old/IeForm.cs similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/IeForm.cs rename to TEMUKJD/KJDForms/ProductForms/Old/IeForm.cs diff --git a/TEMUKJD/KJDForms/UploadForms/IeForm.designer.cs b/TEMUKJD/KJDForms/ProductForms/Old/IeForm.designer.cs similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/IeForm.designer.cs rename to TEMUKJD/KJDForms/ProductForms/Old/IeForm.designer.cs diff --git a/TEMUKJD/KJDForms/UploadForms/IeForm.resx b/TEMUKJD/KJDForms/ProductForms/Old/IeForm.resx similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/IeForm.resx rename to TEMUKJD/KJDForms/ProductForms/Old/IeForm.resx diff --git a/TEMUKJD/KJDForms/UploadForms/ShopProductForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/Old/ShopProductForm.Designer.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/ShopProductForm.Designer.cs rename to TEMUKJD/KJDForms/ProductForms/Old/ShopProductForm.Designer.cs index 67d7d54..056c434 100644 --- a/TEMUKJD/KJDForms/UploadForms/ShopProductForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/ShopProductForm.Designer.cs @@ -1,4 +1,4 @@ -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { partial class ShopProductForm { diff --git a/TEMUKJD/KJDForms/UploadForms/ShopProductForm.cs b/TEMUKJD/KJDForms/ProductForms/Old/ShopProductForm.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/ShopProductForm.cs rename to TEMUKJD/KJDForms/ProductForms/Old/ShopProductForm.cs index 6745a57..cf605dd 100644 --- a/TEMUKJD/KJDForms/UploadForms/ShopProductForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/ShopProductForm.cs @@ -22,7 +22,7 @@ using System.Windows.Forms; using Work.BLL.Product; using Work.DouyinApiClass; -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { public partial class ShopProductForm : Form { diff --git a/TEMUKJD/KJDForms/UploadForms/ShopProductForm.resx b/TEMUKJD/KJDForms/ProductForms/Old/ShopProductForm.resx similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/ShopProductForm.resx rename to TEMUKJD/KJDForms/ProductForms/Old/ShopProductForm.resx diff --git a/TEMUKJD/KJDForms/UploadForms/SpecialDelaySendForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/Old/SpecialDelaySendForm.Designer.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/SpecialDelaySendForm.Designer.cs rename to TEMUKJD/KJDForms/ProductForms/Old/SpecialDelaySendForm.Designer.cs index d4be3f6..780b6b4 100644 --- a/TEMUKJD/KJDForms/UploadForms/SpecialDelaySendForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/SpecialDelaySendForm.Designer.cs @@ -1,4 +1,4 @@ -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { partial class SpecialDelaySendForm { diff --git a/TEMUKJD/KJDForms/UploadForms/SpecialDelaySendForm.cs b/TEMUKJD/KJDForms/ProductForms/Old/SpecialDelaySendForm.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/SpecialDelaySendForm.cs rename to TEMUKJD/KJDForms/ProductForms/Old/SpecialDelaySendForm.cs index dc67b77..731425a 100644 --- a/TEMUKJD/KJDForms/UploadForms/SpecialDelaySendForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/SpecialDelaySendForm.cs @@ -20,7 +20,7 @@ using System.Threading.Tasks; using System.Windows.Forms; using Work.DouyinApiClass; -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { public partial class SpecialDelaySendForm : Form { diff --git a/TEMUKJD/KJDForms/UploadForms/SpecialDelaySendForm.resx b/TEMUKJD/KJDForms/ProductForms/Old/SpecialDelaySendForm.resx similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/SpecialDelaySendForm.resx rename to TEMUKJD/KJDForms/ProductForms/Old/SpecialDelaySendForm.resx diff --git a/TEMUKJD/KJDForms/UploadForms/StockSyncForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/Old/StockSyncForm.Designer.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/StockSyncForm.Designer.cs rename to TEMUKJD/KJDForms/ProductForms/Old/StockSyncForm.Designer.cs index b29f1af..5401777 100644 --- a/TEMUKJD/KJDForms/UploadForms/StockSyncForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/StockSyncForm.Designer.cs @@ -1,4 +1,4 @@ -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { partial class StockSyncForm { diff --git a/TEMUKJD/KJDForms/UploadForms/StockSyncForm.cs b/TEMUKJD/KJDForms/ProductForms/Old/StockSyncForm.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/StockSyncForm.cs rename to TEMUKJD/KJDForms/ProductForms/Old/StockSyncForm.cs index c622dd3..dc929eb 100644 --- a/TEMUKJD/KJDForms/UploadForms/StockSyncForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/StockSyncForm.cs @@ -17,7 +17,7 @@ using System.Threading.Tasks; using System.Windows.Forms; using Work.DouyinApiClass; -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { public partial class StockSyncForm : Form { diff --git a/TEMUKJD/KJDForms/UploadForms/StockSyncForm.resx b/TEMUKJD/KJDForms/ProductForms/Old/StockSyncForm.resx similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/StockSyncForm.resx rename to TEMUKJD/KJDForms/ProductForms/Old/StockSyncForm.resx diff --git a/TEMUKJD/KJDForms/UploadForms/TbSettleSlideForm.cs b/TEMUKJD/KJDForms/ProductForms/Old/TbSettleSlideForm.cs similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/TbSettleSlideForm.cs rename to TEMUKJD/KJDForms/ProductForms/Old/TbSettleSlideForm.cs diff --git a/TEMUKJD/KJDForms/UploadForms/TbSettleSlideForm.designer.cs b/TEMUKJD/KJDForms/ProductForms/Old/TbSettleSlideForm.designer.cs similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/TbSettleSlideForm.designer.cs rename to TEMUKJD/KJDForms/ProductForms/Old/TbSettleSlideForm.designer.cs diff --git a/TEMUKJD/KJDForms/UploadForms/TbSettleSlideForm.resx b/TEMUKJD/KJDForms/ProductForms/Old/TbSettleSlideForm.resx similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/TbSettleSlideForm.resx rename to TEMUKJD/KJDForms/ProductForms/Old/TbSettleSlideForm.resx diff --git a/TEMUKJD/KJDForms/UploadForms/UploadProductCefForm.cs b/TEMUKJD/KJDForms/ProductForms/Old/UploadProductCefForm.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/UploadProductCefForm.cs rename to TEMUKJD/KJDForms/ProductForms/Old/UploadProductCefForm.cs index 8b1ecd7..519ed04 100644 --- a/TEMUKJD/KJDForms/UploadForms/UploadProductCefForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/UploadProductCefForm.cs @@ -11,7 +11,7 @@ using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { /// /// 主要用来设置上货佣金逻辑 diff --git a/TEMUKJD/KJDForms/UploadForms/UploadProductErrorForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/Old/UploadProductErrorForm.Designer.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/UploadProductErrorForm.Designer.cs rename to TEMUKJD/KJDForms/ProductForms/Old/UploadProductErrorForm.Designer.cs index 5c749ba..e751557 100644 --- a/TEMUKJD/KJDForms/UploadForms/UploadProductErrorForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/UploadProductErrorForm.Designer.cs @@ -1,4 +1,4 @@ -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { partial class UploadProductErrorForm { diff --git a/TEMUKJD/KJDForms/UploadForms/UploadProductErrorForm.cs b/TEMUKJD/KJDForms/ProductForms/Old/UploadProductErrorForm.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/UploadProductErrorForm.cs rename to TEMUKJD/KJDForms/ProductForms/Old/UploadProductErrorForm.cs index 5add530..abe3bb5 100644 --- a/TEMUKJD/KJDForms/UploadForms/UploadProductErrorForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/UploadProductErrorForm.cs @@ -22,7 +22,7 @@ using System.Windows.Forms; using Work.BLL.Upload; using Work.DouyinApiClass; -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { public partial class UploadProductErrorForm : Form { diff --git a/TEMUKJD/KJDForms/UploadForms/UploadProductErrorForm.resx b/TEMUKJD/KJDForms/ProductForms/Old/UploadProductErrorForm.resx similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/UploadProductErrorForm.resx rename to TEMUKJD/KJDForms/ProductForms/Old/UploadProductErrorForm.resx diff --git a/TEMUKJD/KJDForms/UploadForms/UploadProductForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/Old/UploadProductForm.Designer.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/UploadProductForm.Designer.cs rename to TEMUKJD/KJDForms/ProductForms/Old/UploadProductForm.Designer.cs index 1fde664..2253c1f 100644 --- a/TEMUKJD/KJDForms/UploadForms/UploadProductForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/UploadProductForm.Designer.cs @@ -1,4 +1,4 @@ -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { partial class UploadProductForm { diff --git a/TEMUKJD/KJDForms/UploadForms/UploadProductForm.cs b/TEMUKJD/KJDForms/ProductForms/Old/UploadProductForm.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/UploadProductForm.cs rename to TEMUKJD/KJDForms/ProductForms/Old/UploadProductForm.cs index e3a8876..0022b63 100644 --- a/TEMUKJD/KJDForms/UploadForms/UploadProductForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/UploadProductForm.cs @@ -29,7 +29,7 @@ using Work.CollectClass; using Work.DouyinApiClass; using Work.GoodDetail; -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { public partial class UploadProductForm : Form { diff --git a/TEMUKJD/KJDForms/UploadForms/UploadProductForm.resx b/TEMUKJD/KJDForms/ProductForms/Old/UploadProductForm.resx similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/UploadProductForm.resx rename to TEMUKJD/KJDForms/ProductForms/Old/UploadProductForm.resx diff --git a/TEMUKJD/KJDForms/UploadForms/UploadProductViolateSelectForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/Old/UploadProductViolateSelectForm.Designer.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/UploadProductViolateSelectForm.Designer.cs rename to TEMUKJD/KJDForms/ProductForms/Old/UploadProductViolateSelectForm.Designer.cs index 954e1c3..9fba4bb 100644 --- a/TEMUKJD/KJDForms/UploadForms/UploadProductViolateSelectForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/UploadProductViolateSelectForm.Designer.cs @@ -1,4 +1,4 @@ -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { partial class UploadProductViolateSelectForm { diff --git a/TEMUKJD/KJDForms/UploadForms/UploadProductViolateSelectForm.cs b/TEMUKJD/KJDForms/ProductForms/Old/UploadProductViolateSelectForm.cs similarity index 98% rename from TEMUKJD/KJDForms/UploadForms/UploadProductViolateSelectForm.cs rename to TEMUKJD/KJDForms/ProductForms/Old/UploadProductViolateSelectForm.cs index 655cf03..d603815 100644 --- a/TEMUKJD/KJDForms/UploadForms/UploadProductViolateSelectForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/UploadProductViolateSelectForm.cs @@ -8,7 +8,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { public partial class UploadProductViolateSelectForm : TemuKJD.KJDForms.BaseForms.LRBaseForm { diff --git a/TEMUKJD/KJDForms/UploadForms/UploadProductViolateSelectForm.resx b/TEMUKJD/KJDForms/ProductForms/Old/UploadProductViolateSelectForm.resx similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/UploadProductViolateSelectForm.resx rename to TEMUKJD/KJDForms/ProductForms/Old/UploadProductViolateSelectForm.resx diff --git a/TEMUKJD/KJDForms/UploadForms/ViolateManageForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/Old/ViolateManageForm.Designer.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/ViolateManageForm.Designer.cs rename to TEMUKJD/KJDForms/ProductForms/Old/ViolateManageForm.Designer.cs index 88285da..4c2d6fd 100644 --- a/TEMUKJD/KJDForms/UploadForms/ViolateManageForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/ViolateManageForm.Designer.cs @@ -1,4 +1,4 @@ -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { partial class ViolateManageForm { diff --git a/TEMUKJD/KJDForms/UploadForms/ViolateManageForm.cs b/TEMUKJD/KJDForms/ProductForms/Old/ViolateManageForm.cs similarity index 99% rename from TEMUKJD/KJDForms/UploadForms/ViolateManageForm.cs rename to TEMUKJD/KJDForms/ProductForms/Old/ViolateManageForm.cs index a194e92..955fe06 100644 --- a/TEMUKJD/KJDForms/UploadForms/ViolateManageForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/Old/ViolateManageForm.cs @@ -25,7 +25,7 @@ using Work.BLL.Product; using Work.BLL.Upload; using Work.DouyinApiClass; -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { public partial class ViolateManageForm : Form { diff --git a/TEMUKJD/KJDForms/UploadForms/ViolateManageForm.resx b/TEMUKJD/KJDForms/ProductForms/Old/ViolateManageForm.resx similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/ViolateManageForm.resx rename to TEMUKJD/KJDForms/ProductForms/Old/ViolateManageForm.resx diff --git a/TEMUKJD/KJDForms/ProductForms/PriceManageForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/PriceManageForm.Designer.cs new file mode 100644 index 0000000..1548780 --- /dev/null +++ b/TEMUKJD/KJDForms/ProductForms/PriceManageForm.Designer.cs @@ -0,0 +1,730 @@ + +namespace TemuKJD.KJDForms.ProductForms +{ + partial class PriceManageForm + { + /// + /// 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() + { + this.components = new System.ComponentModel.Container(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.ucGroupBoxEx4 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.txtScale1 = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); + this.btnStartStockUp = new DevComponents.DotNetBar.PanelEx(); + this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.chkHasSuccess = new System.Windows.Forms.CheckBox(); + this.btnSearchPrice = new DevComponents.DotNetBar.PanelEx(); + this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx(); + this.splitContainer3 = new System.Windows.Forms.SplitContainer(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx(); + this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colLoginStatus = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dgvAdjust = new TemuKJD.UserComponent.DataGridViewEx(); + this.splitContainer4 = new System.Windows.Forms.SplitContainer(); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); + this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); + this.btnClear = new DevComponents.DotNetBar.PanelEx(); + this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colSupplierId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSupplierName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colPriceOrderSn = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colProductSkcPic = new System.Windows.Forms.DataGridViewImageColumn(); + this.colProductId = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colProdSkc = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colProdName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colPriceType = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colPrcie = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colAdjustPrice = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colCurrencyType = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colFromType = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colChangeType = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colChangeReason = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.ucGroupBoxEx4.SuspendLayout(); + this.ucGroupBoxEx2.SuspendLayout(); + this.ucGroupBoxEx1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit(); + this.splitContainer3.Panel1.SuspendLayout(); + this.splitContainer3.Panel2.SuspendLayout(); + this.splitContainer3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvAdjust)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).BeginInit(); + this.splitContainer4.Panel1.SuspendLayout(); + this.splitContainer4.Panel2.SuspendLayout(); + this.splitContainer4.SuspendLayout(); + this.SuspendLayout(); + // + // splitContainer1 + // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx4); + this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx2); + this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx1); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.splitContainer3); + this.splitContainer1.Size = new System.Drawing.Size(1110, 597); + this.splitContainer1.SplitterDistance = 120; + this.splitContainer1.TabIndex = 10; + // + // ucGroupBoxEx4 + // + this.ucGroupBoxEx4.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.ucGroupBoxEx4.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.ucGroupBoxEx4.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx4.Controls.Add(this.txtScale1); + this.ucGroupBoxEx4.Controls.Add(this.label10); + this.ucGroupBoxEx4.Controls.Add(this.btnStartStockUp); + this.ucGroupBoxEx4.Location = new System.Drawing.Point(272, 2); + this.ucGroupBoxEx4.Name = "ucGroupBoxEx4"; + this.ucGroupBoxEx4.Size = new System.Drawing.Size(836, 120); + this.ucGroupBoxEx4.TabIndex = 666; + this.ucGroupBoxEx4.TabStop = false; + this.ucGroupBoxEx4.Text = "拒绝跟价"; + // + // txtScale1 + // + this.txtScale1.Location = new System.Drawing.Point(110, 32); + this.txtScale1.Margin = new System.Windows.Forms.Padding(0); + this.txtScale1.Name = "txtScale1"; + this.txtScale1.Size = new System.Drawing.Size(263, 23); + this.txtScale1.TabIndex = 679; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(24, 36); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(92, 17); + this.label10.TabIndex = 680; + this.label10.Text = "拒绝跟价理由:"; + // + // btnStartStockUp + // + this.btnStartStockUp.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnStartStockUp.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnStartStockUp.DisabledBackColor = System.Drawing.Color.Empty; + this.btnStartStockUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnStartStockUp.Location = new System.Drawing.Point(376, 32); + this.btnStartStockUp.Name = "btnStartStockUp"; + this.btnStartStockUp.Size = new System.Drawing.Size(80, 23); + this.btnStartStockUp.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnStartStockUp.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStartStockUp.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStartStockUp.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnStartStockUp.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnStartStockUp.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnStartStockUp.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnStartStockUp.Style.GradientAngle = 90; + this.btnStartStockUp.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnStartStockUp.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnStartStockUp.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnStartStockUp.TabIndex = 427; + this.btnStartStockUp.Text = "拒绝跟价"; + this.btnStartStockUp.Click += new System.EventHandler(this.btnStartStockUp_Click); + // + // ucGroupBoxEx2 + // + this.ucGroupBoxEx2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.ucGroupBoxEx2.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; + this.ucGroupBoxEx2.Controls.Add(this.chkHasSuccess); + this.ucGroupBoxEx2.Controls.Add(this.btnSearchPrice); + this.ucGroupBoxEx2.Location = new System.Drawing.Point(147, 2); + this.ucGroupBoxEx2.Name = "ucGroupBoxEx2"; + this.ucGroupBoxEx2.Size = new System.Drawing.Size(125, 120); + this.ucGroupBoxEx2.TabIndex = 469; + this.ucGroupBoxEx2.TabStop = false; + this.ucGroupBoxEx2.Text = "读取调价"; + // + // chkHasSuccess + // + this.chkHasSuccess.AutoSize = true; + this.chkHasSuccess.Location = new System.Drawing.Point(6, 72); + this.chkHasSuccess.Name = "chkHasSuccess"; + this.chkHasSuccess.Size = new System.Drawing.Size(123, 21); + this.chkHasSuccess.TabIndex = 659; + this.chkHasSuccess.Text = "测试读取调价成功"; + this.chkHasSuccess.UseVisualStyleBackColor = true; + this.chkHasSuccess.Visible = false; + // + // btnSearchPrice + // + this.btnSearchPrice.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnSearchPrice.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSearchPrice.DisabledBackColor = System.Drawing.Color.Empty; + this.btnSearchPrice.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSearchPrice.Location = new System.Drawing.Point(25, 32); + this.btnSearchPrice.Name = "btnSearchPrice"; + this.btnSearchPrice.Size = new System.Drawing.Size(70, 23); + this.btnSearchPrice.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearchPrice.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearchPrice.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearchPrice.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnSearchPrice.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnSearchPrice.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnSearchPrice.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnSearchPrice.Style.GradientAngle = 90; + this.btnSearchPrice.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearchPrice.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearchPrice.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearchPrice.TabIndex = 427; + this.btnSearchPrice.Text = "读取调价"; + this.btnSearchPrice.Click += new System.EventHandler(this.btnSearchPrice_Click); + // + // ucGroupBoxEx1 + // + this.ucGroupBoxEx1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | 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.btnRefreshShop); + this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2); + this.ucGroupBoxEx1.Name = "ucGroupBoxEx1"; + this.ucGroupBoxEx1.Size = new System.Drawing.Size(144, 120); + this.ucGroupBoxEx1.TabIndex = 399; + this.ucGroupBoxEx1.TabStop = false; + this.ucGroupBoxEx1.Text = "基础"; + // + // 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(17, 31); + this.btnRefreshShop.Name = "btnRefreshShop"; + this.btnRefreshShop.Size = new System.Drawing.Size(110, 24); + 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))))); + this.btnRefreshShop.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnRefreshShop.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnRefreshShop.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnRefreshShop.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnRefreshShop.Style.GradientAngle = 90; + this.btnRefreshShop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + 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.Click += new System.EventHandler(this.btnRefreshShop_Click); + // + // splitContainer3 + // + this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer3.Location = new System.Drawing.Point(0, 0); + this.splitContainer3.Name = "splitContainer3"; + this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer3.Panel1 + // + this.splitContainer3.Panel1.Controls.Add(this.splitContainer2); + // + // splitContainer3.Panel2 + // + this.splitContainer3.Panel2.Controls.Add(this.splitContainer4); + this.splitContainer3.Size = new System.Drawing.Size(1110, 473); + this.splitContainer3.SplitterDistance = 443; + this.splitContainer3.TabIndex = 1; + // + // splitContainer2 + // + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; + this.splitContainer2.Location = new System.Drawing.Point(0, 0); + this.splitContainer2.Name = "splitContainer2"; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.Controls.Add(this.dgvShop); + this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.dgvAdjust); + this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0); + this.splitContainer2.Size = new System.Drawing.Size(1110, 443); + this.splitContainer2.SplitterDistance = 270; + this.splitContainer2.TabIndex = 0; + // + // dgvShop + // + this.dgvShop.AllowUserToAddRows = false; + this.dgvShop.AllowUserToDeleteRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.dgvShop.BackgroundColor = System.Drawing.Color.White; + this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.colSelect, + this.colShopLoginName, + this.colShopId, + this.colShopName, + this.colLoginStatus, + this.colCanUse, + this.colMessage}); + this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvShop.Location = new System.Drawing.Point(4, 0); + this.dgvShop.Name = "dgvShop"; + this.dgvShop.ReadOnly = true; + this.dgvShop.RowHeadersWidth = 30; + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dgvShop.RowsDefaultCellStyle = dataGridViewCellStyle3; + this.dgvShop.RowTemplate.Height = 23; + this.dgvShop.Size = new System.Drawing.Size(266, 443); + this.dgvShop.TabIndex = 6; + this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick); + // + // colSelect + // + this.colSelect.HeaderText = "全选"; + this.colSelect.Name = "colSelect"; + this.colSelect.ReadOnly = true; + this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colSelect.Width = 28; + // + // 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 = 75; + // + // colLoginStatus + // + this.colLoginStatus.HeaderText = "登录状态"; + this.colLoginStatus.Name = "colLoginStatus"; + this.colLoginStatus.ReadOnly = true; + this.colLoginStatus.Width = 65; + // + // 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.Width = 28; + // + // colMessage + // + this.colMessage.HeaderText = "消息"; + this.colMessage.Name = "colMessage"; + this.colMessage.ReadOnly = true; + // + // dgvAdjust + // + this.dgvAdjust.AllowUserToAddRows = false; + this.dgvAdjust.AllowUserToDeleteRows = false; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.WhiteSmoke; + this.dgvAdjust.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4; + this.dgvAdjust.BackgroundColor = System.Drawing.Color.White; + this.dgvAdjust.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvAdjust.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5; + this.dgvAdjust.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgvAdjust.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.colCheck, + this.colSupplierId, + this.colSupplierName, + this.colPriceOrderSn, + this.colProductSkcPic, + this.colProductId, + this.colProdSkc, + this.colProdName, + this.colPriceType, + this.colPrcie, + this.colAdjustPrice, + this.colCurrencyType, + this.colFromType, + this.colChangeType, + this.colChangeReason, + this.colMsg}); + this.dgvAdjust.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgvAdjust.Location = new System.Drawing.Point(0, 0); + this.dgvAdjust.Name = "dgvAdjust"; + this.dgvAdjust.ReadOnly = true; + dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dgvAdjust.RowsDefaultCellStyle = dataGridViewCellStyle6; + this.dgvAdjust.RowTemplate.Height = 23; + this.dgvAdjust.Size = new System.Drawing.Size(832, 443); + this.dgvAdjust.TabIndex = 187; + this.dgvAdjust.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvStock_CellContentClick); + // + // splitContainer4 + // + this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer4.Location = new System.Drawing.Point(0, 0); + this.splitContainer4.Name = "splitContainer4"; + // + // splitContainer4.Panel1 + // + this.splitContainer4.Panel1.Controls.Add(this.statusBar); + // + // splitContainer4.Panel2 + // + this.splitContainer4.Panel2.Controls.Add(this.panelEx1); + this.splitContainer4.Panel2.Controls.Add(this.btnClear); + this.splitContainer4.Size = new System.Drawing.Size(1110, 26); + this.splitContainer4.SplitterDistance = 832; + this.splitContainer4.TabIndex = 3; + // + // statusBar + // + this.statusBar.BackColor = System.Drawing.Color.White; + this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill; + this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.statusBar.Location = new System.Drawing.Point(0, 0); + this.statusBar.Margin = new System.Windows.Forms.Padding(0); + this.statusBar.Name = "statusBar"; + this.statusBar.Size = new System.Drawing.Size(832, 26); + this.statusBar.TabIndex = 2; + // + // panelEx1 + // + this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control; + this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty; + this.panelEx1.Location = new System.Drawing.Point(155, 0); + this.panelEx1.Name = "panelEx1"; + this.panelEx1.Size = new System.Drawing.Size(115, 21); + this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.panelEx1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panelEx1.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.panelEx1.Style.GradientAngle = 90; + this.panelEx1.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panelEx1.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.panelEx1.TabIndex = 668; + this.panelEx1.Text = "停止当前操作"; + this.panelEx1.Click += new System.EventHandler(this.panelEx1_Click); + // + // btnClear + // + this.btnClear.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnClear.DisabledBackColor = System.Drawing.Color.Empty; + this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnClear.Location = new System.Drawing.Point(47, 0); + this.btnClear.Name = "btnClear"; + this.btnClear.Size = new System.Drawing.Size(90, 21); + this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnClear.Style.GradientAngle = 90; + this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnClear.TabIndex = 440; + this.btnClear.Text = "清空结果"; + this.btnClear.Visible = false; + // + // colCheck + // + this.colCheck.HeaderText = "选择"; + this.colCheck.Name = "colCheck"; + this.colCheck.ReadOnly = true; + this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colCheck.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colCheck.Width = 30; + // + // colSupplierId + // + this.colSupplierId.HeaderText = "店铺Id"; + this.colSupplierId.Name = "colSupplierId"; + this.colSupplierId.ReadOnly = true; + // + // colSupplierName + // + this.colSupplierName.HeaderText = "店铺名称"; + this.colSupplierName.Name = "colSupplierName"; + this.colSupplierName.ReadOnly = true; + this.colSupplierName.Width = 110; + // + // colPriceOrderSn + // + this.colPriceOrderSn.HeaderText = "调价单号"; + this.colPriceOrderSn.Name = "colPriceOrderSn"; + this.colPriceOrderSn.ReadOnly = true; + this.colPriceOrderSn.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colPriceOrderSn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colPriceOrderSn.Width = 125; + // + // colProductSkcPic + // + this.colProductSkcPic.HeaderText = "Skc图片"; + this.colProductSkcPic.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom; + this.colProductSkcPic.Name = "colProductSkcPic"; + this.colProductSkcPic.ReadOnly = true; + this.colProductSkcPic.Width = 60; + // + // colProductId + // + this.colProductId.HeaderText = "商品Id"; + this.colProductId.Name = "colProductId"; + this.colProductId.ReadOnly = true; + this.colProductId.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colProductId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colProductId.Visible = false; + // + // colProdSkc + // + this.colProdSkc.FillWeight = 150F; + this.colProdSkc.HeaderText = "商品SKC"; + this.colProdSkc.Name = "colProdSkc"; + this.colProdSkc.ReadOnly = true; + this.colProdSkc.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colProdSkc.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colProdSkc.Width = 80; + // + // colProdName + // + this.colProdName.HeaderText = "标题"; + this.colProdName.Name = "colProdName"; + this.colProdName.ReadOnly = true; + this.colProdName.Width = 150; + // + // colPriceType + // + this.colPriceType.HeaderText = "申报价格类型"; + this.colPriceType.Name = "colPriceType"; + this.colPriceType.ReadOnly = true; + this.colPriceType.Width = 90; + // + // colPrcie + // + this.colPrcie.HeaderText = "当前申报价格"; + this.colPrcie.Name = "colPrcie"; + this.colPrcie.ReadOnly = true; + this.colPrcie.Width = 90; + // + // colAdjustPrice + // + this.colAdjustPrice.HeaderText = "调整后申报价格"; + this.colAdjustPrice.Name = "colAdjustPrice"; + this.colAdjustPrice.ReadOnly = true; + // + // colCurrencyType + // + this.colCurrencyType.HeaderText = "币种"; + this.colCurrencyType.Name = "colCurrencyType"; + this.colCurrencyType.ReadOnly = true; + this.colCurrencyType.Width = 45; + // + // colFromType + // + this.colFromType.HeaderText = "申请来源"; + this.colFromType.Name = "colFromType"; + this.colFromType.ReadOnly = true; + this.colFromType.Width = 65; + // + // colChangeType + // + this.colChangeType.HeaderText = "调价类型"; + this.colChangeType.Name = "colChangeType"; + this.colChangeType.ReadOnly = true; + this.colChangeType.Visible = false; + this.colChangeType.Width = 70; + // + // colChangeReason + // + this.colChangeReason.HeaderText = "调价原因"; + this.colChangeReason.Name = "colChangeReason"; + this.colChangeReason.ReadOnly = true; + this.colChangeReason.Width = 65; + // + // colMsg + // + this.colMsg.HeaderText = "状态"; + this.colMsg.Name = "colMsg"; + this.colMsg.ReadOnly = true; + this.colMsg.Width = 400; + // + // PriceManageForm + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(1110, 597); + this.Controls.Add(this.splitContainer1); + this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.Name = "PriceManageForm"; + this.Text = "调价跟价管理"; + this.Load += new System.EventHandler(this.PriceManageForm_Load); + this.VisibleChanged += new System.EventHandler(this.PriceManageForm_VisibleChanged); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.ucGroupBoxEx4.ResumeLayout(false); + this.ucGroupBoxEx4.PerformLayout(); + this.ucGroupBoxEx2.ResumeLayout(false); + this.ucGroupBoxEx2.PerformLayout(); + this.ucGroupBoxEx1.ResumeLayout(false); + this.splitContainer3.Panel1.ResumeLayout(false); + this.splitContainer3.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit(); + this.splitContainer3.ResumeLayout(false); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); + this.splitContainer2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dgvAdjust)).EndInit(); + this.splitContainer4.Panel1.ResumeLayout(false); + this.splitContainer4.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).EndInit(); + this.splitContainer4.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitContainer1; + private UserComponent.UcGroupBoxEx ucGroupBoxEx4; + private DevComponents.DotNetBar.PanelEx btnStartStockUp; + private UserComponent.UcGroupBoxEx ucGroupBoxEx2; + private DevComponents.DotNetBar.PanelEx btnSearchPrice; + private UserComponent.UcGroupBoxEx ucGroupBoxEx1; + private DevComponents.DotNetBar.PanelEx btnRefreshShop; + private System.Windows.Forms.SplitContainer splitContainer3; + private System.Windows.Forms.SplitContainer splitContainer2; + private UserComponent.DataGridViewEx dgvShop; + private UserComponent.DataGridViewEx dgvAdjust; + private System.Windows.Forms.SplitContainer splitContainer4; + private UserControls.StatusBarUserControl statusBar; + private DevComponents.DotNetBar.PanelEx panelEx1; + private DevComponents.DotNetBar.PanelEx btnClear; + private System.Windows.Forms.TextBox txtScale1; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.CheckBox chkHasSuccess; + private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopLoginName; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopId; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopName; + private System.Windows.Forms.DataGridViewTextBoxColumn colLoginStatus; + private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse; + private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; + private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck; + private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId; + private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierName; + private System.Windows.Forms.DataGridViewLinkColumn colPriceOrderSn; + private System.Windows.Forms.DataGridViewImageColumn colProductSkcPic; + private System.Windows.Forms.DataGridViewLinkColumn colProductId; + private System.Windows.Forms.DataGridViewLinkColumn colProdSkc; + private System.Windows.Forms.DataGridViewTextBoxColumn colProdName; + private System.Windows.Forms.DataGridViewTextBoxColumn colPriceType; + private System.Windows.Forms.DataGridViewTextBoxColumn colPrcie; + private System.Windows.Forms.DataGridViewTextBoxColumn colAdjustPrice; + private System.Windows.Forms.DataGridViewTextBoxColumn colCurrencyType; + private System.Windows.Forms.DataGridViewTextBoxColumn colFromType; + private System.Windows.Forms.DataGridViewTextBoxColumn colChangeType; + private System.Windows.Forms.DataGridViewTextBoxColumn colChangeReason; + private System.Windows.Forms.DataGridViewTextBoxColumn colMsg; + } +} \ No newline at end of file diff --git a/TEMUKJD/KJDForms/ProductForms/PriceManageForm.cs b/TEMUKJD/KJDForms/ProductForms/PriceManageForm.cs new file mode 100644 index 0000000..db5f26d --- /dev/null +++ b/TEMUKJD/KJDForms/ProductForms/PriceManageForm.cs @@ -0,0 +1,559 @@ +using AllBase; +using AllBase.Helper; +using AllBase.Model.Result; +using NaiBa.Util.Extension; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using TemuKJD.Extension; +using TemuKJD.KJDForms.BaseForms; +using TemuKJD.KJDForms.ShopForms; + +namespace TemuKJD.KJDForms.ProductForms +{ + public partial class PriceManageForm : Form + { + private CheckBox chkSelectAll = null; + public CancellationTokenSource cancellationTokenSource { get; set; } = null; + List lstPriceAdjustInfo = new List(); + + public PriceManageForm() + { + InitializeComponent(); + } + + private void PriceManageForm_Load(object sender, EventArgs e) + { + chkSelectAll = dgvShop.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false); + dgvShop.Columns["colSelect"].HeaderText = ""; + chkSelectAll.Width = chkSelectAll.Height = 13; + chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged; + + this.dgvAdjust.AddSelectorColumn("colCheck"); + } + private void chkSelectAll_CheckedChanged(object sender, EventArgs e) + { + if (!chkSelectAll.Checked) + { + foreach (DataGridViewRow row in dgvShop.Rows) + { + row.Cells["colSelect"].Value = false; + } + } + else + { + var list = GlobalConfig.ShopLoginList.Where(s => s.LoginStatus == "登录成功").Select(ss => ss.ShopId); + foreach (DataGridViewRow row in dgvShop.Rows) + { + if (list.Any(l => l == row.Cells["colShopId"]?.Value?.ToString())) + row.Cells["colSelect"].Value = true; + } + } + } + + private void PriceManageForm_VisibleChanged(object sender, EventArgs e) + { + if (Visible == true) + RefreshShop(); + } + + private void btnRefreshShop_Click(object sender, EventArgs e) + { + RefreshShop(); + } + private void RefreshShop() + { + // 店铺Id + var selectIds = dgvShop.Rows.Cast().Where(row + => row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList(); + // 获取被删除的店铺 + List dgvRowList = dgvShop.Rows.Cast().Where(row + => !GlobalConfig.ShopLoginList.Any(s => s.ShopId == row.Cells["colShopId"]?.Value?.ToString())).ToList(); + // 更新被删除的店铺列表 + foreach (var row in dgvRowList) + { + dgvShop.Rows.Remove(row); + } + // 绑定其他店铺(含新导入的店铺) + foreach (DouShopLoginInfo shopEntity in GlobalConfig.ShopLoginList) + { + if (!string.IsNullOrEmpty(shopEntity.ShopId)) + BindShop(shopEntity, selectIds); + } + } + + private void BindShop(DouShopLoginInfo shopEntity, List selectShopId = null) + { + if (shopEntity == null) + return; + if (selectShopId == null) + selectShopId = new List(); + + bool canUse = shopEntity.LoginStatus == "登录成功"; + var row = dgvShop.Rows.Cast().FirstOrDefault(p => p.Cells.GetCellValueFromColumnName("colShopId").ParseToString() == shopEntity.ShopId); + if (row == null) + { + this.dgvShop.Rows.Add( + selectShopId.Contains(shopEntity.ShopId) && canUse, + shopEntity.LoginName, + shopEntity.ShopId, + shopEntity.ShopAccount, + shopEntity.LoginStatus, + canUse, + string.Empty + ); + } + else + { + row.Cells["colSelect"].Value = selectShopId.Contains(shopEntity.ShopId) && canUse; + row.Cells["colShopLoginName"].Value = shopEntity.LoginName; + row.Cells["colShopName"].Value = shopEntity.ShopAccount; + row.Cells["colLoginStatus"].Value = shopEntity.LoginStatus; + row.Cells["colCanUse"].Value = canUse; + } + } + + private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + if (e.ColumnIndex < 0 || e.RowIndex < 0) + return; + string headerText = dgvShop.Columns[e.ColumnIndex].HeaderText; + string columnName = dgvShop.Columns[e.ColumnIndex].Name; + long shopId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToLong(); + string shopAccount = dgvShop.Rows[e.RowIndex].Cells["colShopName"].Value.ToString(); + var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId.ToString()); + var row = dgvShop.Rows[e.RowIndex]; + switch (columnName) + { + case "colSelect": + if (row.Cells["colCanUse"].Value.ParseToBool()) + { + row.Cells["colSelect"].Value = !row.Cells["colSelect"].Value.ParseToBool(); + + chkSelectAll.CheckedChanged -= chkSelectAll_CheckedChanged; + if (dgvShop.Rows.Cast().All(r => r.Cells["colSelect"].Value.ParseToBool())) + chkSelectAll.Checked = true; + else + chkSelectAll.Checked = false; + chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged; + } + else + { + BaseMsgForm.ShowInfo("店铺未登录!"); + } + break; + } + } + + private void btnSearchPrice_Click(object sender, EventArgs e) + { + var lstShopId = dgvShop.Rows.Cast().Where(row + => row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList(); + if (lstShopId.Count == 0) + { + BaseMsgForm.ShowInfo("请选择店铺!"); + return; + } + + var columns = this.dgvAdjust.Columns.Cast(); + foreach (var col in columns) + { + //if (col.Name == "colParentStockId" || col.Name == "colStockId") + //{ + // col.Visible = true; + //} + //if (col.Name == "colTodaySaleVolume" || col.Name == "colInCartNumber7d" || col.Name == "colSalesInventoryNum" + // || col.Name == "colWaitReceiveNum" || col.Name == "colNeedStockUp") + //{ + // col.Visible = false; + //} + } + + lstPriceAdjustInfo.Clear(); + dgvAdjust.Rows.Clear(); + + var dgvRows = this.dgvShop.Rows.Cast();//.Where(r => lstShopId.Contains(r.Cells["colShopId"].Value.ParseToString())); + foreach (var row in dgvRows) + { + row.Cells["colMessage"].Value = ""; + } + + ucGroupBoxEx2.Enabled = false; + ucGroupBoxEx4.Enabled = false; + + cancellationTokenSource = new CancellationTokenSource(); + Task.Run(() => + { + var lstShopIdTemp = new List(); + lstShopIdTemp.AddRange(lstShopId); + int i = 0; + + foreach (var shopId in lstShopIdTemp) + { + this.Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "正在查询..."; + this.statusBar.pgbTaskProgress.Value = (i + 1); + this.statusBar.pgbTaskProgress.Text = (i + 1) + "/" + lstShopIdTemp.Count; + this.statusBar.pgbTaskProgress.Maximum = lstShopIdTemp.Count; + i++; + })); + + if (cancellationTokenSource.IsCancellationRequested) + break; + + var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == shopId); + if (shop == null) + continue; + + #region 检测登录 + if (shop.LoginStatus != "登录成功") + { + continue; + } + if (ShopListForm.Instance == null) + ShopListForm.Instance = new ShopListForm(); + ShopListForm.Instance.CheckShopLogin(new string[] { shop.LoginName }, false); + if (shop.LoginStatus != "登录成功") + { + Invoke(new Action(() => + { + var rows = this.dgvShop.Rows.Cast().Where(r => r.Cells["colShopLoginName"].Value.ToString() == shop.LoginName); + foreach (var row in rows) + { + row.Cells["colMessage"].Value = "店铺掉线"; + row.Cells["colLoginStatus"].Value = "未登录"; + row.Cells["colCanUse"].Value = false; + } + })); + continue; + } + #endregion + + Invoke(new Action(() => + { + var rows = this.dgvShop.Rows.Cast().Where(r => r.Cells["colShopId"].Value.ToString() == shop.ShopId); + foreach (var row in rows) + { + row.Cells["colMessage"].Value = "正在查询"; + } + })); + + int page = 1; + int totalPage = 1; + bool isError = false; + string errMsg = ""; + while (page <= totalPage) + { + if (cancellationTokenSource.IsCancellationRequested) + break; + + int tryCount = 0; + tryAgain: + Thread.Sleep(100 + Randomx.GetId(200)); + string jsonStr = GetPriceAdjustList(shop, page, chkHasSuccess.Checked ? "已调价" : "待调价"); + if (jsonStr.Contains("指定的值含有无效的控制字符")) + { + BaseMsgForm.ShowError("店铺" + shop.LoginName + " " + shop.ShopId + "已掉线"); + isError = true; + break; + } + if (jsonStr.Contains("当前操作人数太多,请稍后重试") && tryCount < 5) + { + tryCount++; + goto tryAgain; + } + if (!jsonStr.Contains("\"success\":true")) + { + isError = true; + string sErr = BaseRegex.GetStringJson(ref jsonStr, "errorMsg"); + if (!string.IsNullOrWhiteSpace(sErr) && !errMsg.Contains(sErr)) + errMsg += sErr + " "; + continue; + } + + if (jsonStr.Contains("\"success\":true")) + { + var jArr = new JArray(); + try + { + var jObj = JObject.Parse(jsonStr); + jArr = jObj["result"]?["list"] as JArray; + if (jArr == null) + jArr = new JArray(); + } + catch (Exception ex) { BaseMsgForm.ShowError(ex.Message); } + foreach (var item in jArr) + { + string sItem = item.ToString(); + TemuPriceAdjustInfo pInfo = JsonHelper.DeserializeJsonToObject(sItem); // 反序列化得到类 + if (pInfo != null && !lstPriceAdjustInfo.Any(a=>a.priceOrderSn == pInfo.priceOrderSn)) + { + lstPriceAdjustInfo.Add(pInfo); + + string url = pInfo.image.Replace("https", "http"); + var image = Image.FromStream(WebRequest.Create(url).GetResponse().GetResponseStream()); + + Invoke(new Action(() => + { + int rowId = this.dgvAdjust.Rows.Add( + true, + pInfo.supplierId, + shop.ShopAccount, // pInfo.supplierName, // 列表里取不到,这里取shop里的 + pInfo.priceOrderSn, + image, // skc图片 + pInfo.productId, + pInfo.skcId, + pInfo.productName + "\r\n" + pInfo.skuSpecs, // 商品标题+sku名称 + string.IsNullOrEmpty(pInfo.activityInvitationName)? "日常价格" : pInfo.activityInvitationName, // 申报价格类型 + pInfo.skuInfoItemList.FirstOrDefault()?.price.ParseToDecimal() / 100, // 当前申报价格 + pInfo.newSupplyPrice?.ParseToDecimal() / 100, // 调整后的申报价格 + pInfo.skuInfoItemList.FirstOrDefault()?.currencyName, // 币种 + pInfo.source, // 申请来源 + "", // 调价类型 + pInfo.adjustReason, // 调价原因 + "" // 操作结果,状态 + ); + + dgvAdjust.Rows[rowId].Height = 60; + })); + } + } + + int total = BaseRegex.GetStringJson(ref jsonStr, "total").ParseToInt(); + totalPage = Math.Ceiling(total / 10.0).ParseToInt(); + } + page++; + } + + Invoke(new Action(() => + { + var rows = this.dgvShop.Rows.Cast().Where(r => r.Cells["colShopId"].Value.ToString() == shop.ShopId); + + if (!isError) + { + foreach (var row in rows) + { + row.Cells["colMessage"].Value = "已查询"; + } + } + else + { + foreach (var row in rows) + { + row.Cells["colMessage"].Value = "查询失败 " + errMsg; + } + } + })); + } + Invoke(new Action(() => + { + chkHasSuccess.Enabled = true; + ucGroupBoxEx2.Enabled = true; + ucGroupBoxEx4.Enabled = true; + string sRst = "查询结束!"; + if (cancellationTokenSource.IsCancellationRequested) + sRst = "已取消查询!"; + + BaseMsgForm.ShowInfo(sRst); + this.statusBar.lblTaskStatus.Text = sRst; + })); + }, cancellationTokenSource.Token); + } + + /// + /// 根据店铺获取调价单列表 + /// + /// + /// + /// + private string GetPriceAdjustList(DouShopLoginInfo shop, int page = 1, string type = "待调价") + { + page = Math.Max(page, 1); + string url = "https://seller.kuajingmaihuo.com/marvel-mms/cn/api/kiana/magneto/price-adjust/page-query"; + string body; + if (type == "待调价") + body = @"{""pageInfo"":{""pageSize"":10,""pageNo"":" + page + @"},""status"":1,""quickSearch"":[]}"; + else + body = @"{""pageInfo"":{""pageSize"":10,""pageNo"":" + page + @"},""status"":2,""quickSearch"":[]}"; + + string refere = "https://seller.kuajingmaihuo.com/main/price-manage/price-adjustment"; + + return ProductResponse.GetPostResponse(shop, url, body, refere); + } + + private void panelEx1_Click(object sender, EventArgs e) + { + if (cancellationTokenSource != null) + cancellationTokenSource.Cancel(); + } + + private void btnStartStockUp_Click(object sender, EventArgs e) + { + var lstSn = dgvAdjust.Rows.Cast().Where(row + => row.Cells["colCheck"]?.Value.ParseToBool() == true).Select(r => r.Cells["colPriceOrderSn"]?.Value.ToString()).ToList(); + var lstPriceAdjust = lstPriceAdjustInfo.Where(s => lstSn.Contains(s.priceOrderSn.ParseToString())).ToList(); + if (lstPriceAdjust.Count == 0) + { + BaseMsgForm.ShowInfo("请选择要拒绝跟价的商品!"); + return; + } + + if (string.IsNullOrEmpty(txtScale1.Text.Trim())) + { + BaseMsgForm.ShowInfo("请输入拒绝跟价理由!"); + return; + } + + ucGroupBoxEx2.Enabled = false; + ucGroupBoxEx4.Enabled = false; + + cancellationTokenSource = new CancellationTokenSource(); + Task.Run(() => + { + int i = 0; + foreach (var priceAdjust in lstPriceAdjust) + { + this.Invoke(new Action(() => + { + this.statusBar.lblTaskStatus.Text = "正在创建备货单..."; + this.statusBar.pgbTaskProgress.Value = (i + 1); + this.statusBar.pgbTaskProgress.Text = (i + 1) + "/" + lstPriceAdjust.Count; + this.statusBar.pgbTaskProgress.Maximum = lstPriceAdjust.Count; + i++; + })); + + if (cancellationTokenSource.IsCancellationRequested) + break; + var rows = this.dgvAdjust.Rows.Cast().Where(r => + r.Cells["colPriceOrderSn"].Value.ToString() == priceAdjust.priceOrderSn.ParseToString()); + + + if (priceAdjust.isRefuseAdjust == true) + { + Invoke(new Action(() => + { + foreach (var row in rows) + { + row.Cells["colMsg"].Value = "已拒绝跟价"; + } + })); + continue; + } + + var shop = GlobalConfig.ShopLoginList.FirstOrDefault(s => s.ShopId == priceAdjust.supplierId.ToString()); + if (shop == null || shop.LoginStatus != "登录成功") + { + Invoke(new Action(() => + { + foreach (var row in rows) + { + row.Cells["colMsg"].Value = "店铺掉线或不存在"; + } + })); + continue; + } + + Invoke(new Action(() => + { + foreach (var row in rows) + { + row.Cells["colMsg"].Value = "正在操作"; + } + })); + + Thread.Sleep(200 + Randomx.GetId(100)); + + //var adjustLst = lstPriceAdjustInfo.Where(a => a.skuIds == priceAdjust.skuIds && a.isRefuseAdjust == false).ToList(); + var adjustLst = lstPriceAdjustInfo.Where(a => + priceAdjust.skuInfoItemList.Any(sku => a.skuIds.Contains(sku.productSkuId.ToString())) && a.isRefuseAdjust == false).ToList(); + var adjustStrLst = adjustLst.Select(s => s.id.ParseToString()).ToList(); + + + string jsonStr = this.refuseAdjust(shop, adjustStrLst, this.txtScale1.Text.Trim()); + bool isError = !jsonStr.Contains("\"success\":true"); + string sErrMsg1 = BaseRegex.GetStringJson(ref jsonStr, "errorMsg").ParseToString(); + if (!isError) + { + foreach(var adj in adjustLst) + { + adj.isRefuseAdjust = true; + } + } + + Invoke(new Action(() => + { + if (!isError) + { + priceAdjust.isRefuseAdjust = true; + foreach (var row in rows) + { + row.Cells["colMsg"].Value = "已拒绝跟价"; + } + } + else + { + foreach (var row in rows) + { + row.Cells["colMsg"].Value = "拒绝跟价失败:" + sErrMsg1; + } + } + })); + } + Invoke(new Action(() => + { + ucGroupBoxEx2.Enabled = true; + ucGroupBoxEx4.Enabled = true; + string sRst = "操作结束(拒绝跟价)!"; + if (cancellationTokenSource.IsCancellationRequested) + sRst = "已取消操作(拒绝跟价)!"; + + BaseMsgForm.ShowInfo(sRst); + this.statusBar.lblTaskStatus.Text = sRst; + })); + }, cancellationTokenSource.Token); + } + + /// + /// 拒绝跟价 + /// + /// + /// + /// + private string refuseAdjust(DouShopLoginInfo shop, List adjustIdList, string refuseReason) + { + string url = "https://seller.kuajingmaihuo.com/marvel-mms/cn/api/kiana/gmp/bg/magneto/api/price-adjust/batch/adjust"; + string body = "{\"adjustList\":["; + foreach (var adjustId in adjustIdList) + { + body += "{\"adjustId\":" + adjustId + ",\"result\":2,\"reason\":\"" + refuseReason + "\"},"; + } + body = body.TrimEnd(','); + body += "]}"; + string refere = "https://seller.kuajingmaihuo.com/main/price-manage/price-adjustment"; + + return ProductResponse.GetPostResponse(shop, url, body, refere); + } + + private void dgvStock_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + string columnName = dgvAdjust.Columns[e.ColumnIndex].Name; + var row = dgvAdjust.Rows[e.RowIndex]; + switch (columnName) + { + case "colCheck": + row.Cells["colCheck"].Value = !row.Cells["colCheck"].Value.ParseToBool(); + break; + } + } + } +} diff --git a/TEMUKJD/KJDForms/ProductForms/PriceManageForm.resx b/TEMUKJD/KJDForms/ProductForms/PriceManageForm.resx new file mode 100644 index 0000000..97593ab --- /dev/null +++ b/TEMUKJD/KJDForms/ProductForms/PriceManageForm.resx @@ -0,0 +1,183 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + \ No newline at end of file diff --git a/TEMUKJD/KJDForms/UploadForms/UploadForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/ProductForm.Designer.cs similarity index 85% rename from TEMUKJD/KJDForms/UploadForms/UploadForm.Designer.cs rename to TEMUKJD/KJDForms/ProductForms/ProductForm.Designer.cs index d908261..1ade8cd 100644 --- a/TEMUKJD/KJDForms/UploadForms/UploadForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/ProductForm.Designer.cs @@ -1,6 +1,6 @@ -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { - partial class UploadForm + partial class ProductForm { /// /// Required designer variable. @@ -29,18 +29,19 @@ 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("净化数据"); - 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("特殊延迟发货"); - System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("云违规排查"); - System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("跳转上家"); - System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("上传错误列表"); - System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("商品管理", 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("佣金设置"); + 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("库存管理"); + System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("特殊延迟发货"); + System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("云违规排查"); + System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("跳转上家"); + System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("上传错误列表"); + System.Windows.Forms.TreeNode treeNode14 = new System.Windows.Forms.TreeNode("商品管理", new System.Windows.Forms.TreeNode[] { treeNode1, treeNode2, treeNode3, @@ -52,7 +53,8 @@ treeNode9, treeNode10, treeNode11, - treeNode12}); + treeNode12, + treeNode13}); this.panel1 = new System.Windows.Forms.Panel(); this.panel3 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel(); @@ -145,39 +147,41 @@ this.tv.Name = "tv"; treeNode1.Name = "备货管理"; treeNode1.Text = "备货管理"; - treeNode2.Name = "商品发布"; - treeNode2.Text = "商品发布"; - treeNode3.Name = "佣金设置"; - treeNode3.Text = "佣金设置"; - treeNode4.Name = "净化数据"; - treeNode4.Text = "净化数据"; - treeNode5.Name = "产品数据库"; - treeNode5.Text = "产品数据库"; - treeNode6.Name = "商品上下架"; - treeNode6.Text = "商品上下架"; - treeNode7.Name = "清理无流量"; - treeNode7.Text = "清理无流量"; - treeNode8.Name = "库存管理"; - treeNode8.Text = "库存管理"; - treeNode9.Name = "特殊延迟发货"; - treeNode9.Text = "特殊延迟发货"; - treeNode10.Name = "云违规排查"; - treeNode10.Text = "云违规排查"; - treeNode11.Name = "跳转上家"; - treeNode11.Tag = "bottom"; - treeNode11.Text = "跳转上家"; - treeNode12.Name = "上传错误列表"; - treeNode12.Text = "上传错误列表"; - treeNode13.Name = "商品管理"; - treeNode13.Text = "商品管理"; + treeNode2.Name = "调价管理"; + treeNode2.Text = "调价管理"; + treeNode3.Name = "商品发布"; + treeNode3.Text = "商品发布"; + treeNode4.Name = "佣金设置"; + treeNode4.Text = "佣金设置"; + treeNode5.Name = "净化数据"; + treeNode5.Text = "净化数据"; + treeNode6.Name = "产品数据库"; + treeNode6.Text = "产品数据库"; + treeNode7.Name = "商品上下架"; + treeNode7.Text = "商品上下架"; + treeNode8.Name = "清理无流量"; + treeNode8.Text = "清理无流量"; + treeNode9.Name = "库存管理"; + treeNode9.Text = "库存管理"; + treeNode10.Name = "特殊延迟发货"; + treeNode10.Text = "特殊延迟发货"; + treeNode11.Name = "云违规排查"; + treeNode11.Text = "云违规排查"; + treeNode12.Name = "跳转上家"; + treeNode12.Tag = "bottom"; + treeNode12.Text = "跳转上家"; + treeNode13.Name = "上传错误列表"; + treeNode13.Text = "上传错误列表"; + treeNode14.Name = "商品管理"; + treeNode14.Text = "商品管理"; this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { - treeNode13}); + treeNode14}); this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); this.tv.Size = new System.Drawing.Size(140, 521); this.tv.TabIndex = 1; this.tv.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tv_AfterSelect); // - // UploadForm + // ProductForm // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; @@ -185,7 +189,7 @@ 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 = "UploadForm"; + this.Name = "ProductForm"; this.Text = "UploadForms"; this.Load += new System.EventHandler(this.ShopForm_Load); this.panel1.ResumeLayout(false); diff --git a/TEMUKJD/KJDForms/UploadForms/UploadForm.cs b/TEMUKJD/KJDForms/ProductForms/ProductForm.cs similarity index 91% rename from TEMUKJD/KJDForms/UploadForms/UploadForm.cs rename to TEMUKJD/KJDForms/ProductForms/ProductForm.cs index eee6245..ec94489 100644 --- a/TEMUKJD/KJDForms/UploadForms/UploadForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/ProductForm.cs @@ -1,4 +1,4 @@ -using TemuKJD.KJDForms.UploadForms; +using TemuKJD.KJDForms.ProductForms; using TemuKJD.KJDForms.SalesCenterForms; using TemuKJD.KJDForms.ShopOptimizeForms; using System; @@ -11,13 +11,17 @@ using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; +using TemuKJD.KJDForms.ProductForms; -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { - public partial class UploadForm : Form + public partial class ProductForm : Form { - public static UploadForm instance; - public Lazy stockUpForm = new Lazy(); + public static ProductForm instance; + public Lazy saleStockUpForm = new Lazy(); + public Lazy priceManageForm = new Lazy(); + + public Lazy uploadProductForm = new Lazy(); public Lazy commissionForm = new Lazy(); public Lazy cleanDataForm = new Lazy(); @@ -30,7 +34,7 @@ namespace TemuKJD.KJDForms.UploadForms public Lazy uploadProductErrorForm = new Lazy(); public Lazy clearNoVisitorForm = new Lazy(); - public UploadForm() + public ProductForm() { InitializeComponent(); } @@ -52,7 +56,10 @@ namespace TemuKJD.KJDForms.UploadForms switch (e.Node.Name) { case "备货管理": - SetForm(stockUpForm.Value); + SetForm(saleStockUpForm.Value); + break; + case "调价管理": + SetForm(priceManageForm.Value); break; case "商品发布": SetForm(uploadProductForm.Value); diff --git a/TEMUKJD/KJDForms/UploadForms/UploadForm.resx b/TEMUKJD/KJDForms/ProductForms/ProductForm.resx similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/UploadForm.resx rename to TEMUKJD/KJDForms/ProductForms/ProductForm.resx diff --git a/TEMUKJD/KJDForms/ProductForms/ProductResponse/ProductResponse.cs b/TEMUKJD/KJDForms/ProductForms/ProductResponse/ProductResponse.cs new file mode 100644 index 0000000..417dcd1 --- /dev/null +++ b/TEMUKJD/KJDForms/ProductForms/ProductResponse/ProductResponse.cs @@ -0,0 +1,74 @@ +using AllBase; +using AllBase.Model.Result; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; + +namespace TemuKJD.KJDForms.ProductForms +{ + public class ProductResponse + { + public static string GetPostResponse(DouShopLoginInfo shop, string _url, string _data, string referer) + { + HttpWebResponse response = null; + string result; + try + { + string url = _url; + HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); + + request.KeepAlive = true; + request.Headers.Set(HttpRequestHeader.CacheControl, "max-age=0"); + request.Headers.Add("Anti-Content", @"0aqAfqFyXcGvBgd9Q0HiJJ7kvWcKK7muUHnJ6oMAdmem0tmm_enmX1DBr-nJNxmoki33dqHTkZU18BU2p8P72Cg2uEZ_acOOBCxGmIs-Gym4EtKpTdZ6kWRCSClS9L6maLm0imx0GIjodHtLnwpx4ayHnhzNnCXEFecZSC8lBRHb9WCAoyY79kMLIWxBMZZSZrR2_LYUJ5UXzf-82ob455f7OvJa6s895N4wiMGR4vbVH8gFN2VuCxS27RpXDa2WCQQQd6XsJPw7amSUaob6oZ2MXuYb9K3ZqoCX5-nJimNZDR0rNCLB13sYgWq9jy0Q3gjnsFY2dJQDh3ewXS2vvf2DN9IAEzInwWTY31Fn0B6-s8DqwIm61OlXsfYt1AYOOyNMLzkw5llaDaqK21f7vspAuXwnJdAdKXJXSyyEimvTyF_AYLp1gkNqBqN1_ik_jc6cKTDJtGUgFjRojR4g4zM7Ww3wfW63WQrJftYhiTIJiS1tZcsceZht3Zu3MsvyxpAbx4bxFrvL0A6OFx752XsVi04Tm6HDhgt7MmpsrTO5WD_KjgjxNX8VNoGndD0OmriAYVn6kwmZXE6Y_khGedxumIGy4sOQI36__CeiuiPIvB8itfOqd7eyqyeCIaEODrh9dSLBQz8AxQ2xt60OTn4HSiPmlwo1J0TFtjUw2DUZB68tdrINb7ugulMsaIwMKr8S0bilSKW6JuYw3oAsmK3daQfJWy3mzVowY1UwPQfTB4Ibz6uRQxHkvhsRTXkrAygGeZIc9S"); + request.Headers.Add("sec-ch-ua-platform", @"""Windows"""); + request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"; + request.Headers.Add("mallid", shop.ShopId); + request.Headers.Add("sec-ch-ua", @"""Google Chrome"";v=""137"", ""Chromium"";v=""137"", ""Not/A)Brand"";v=""24"""); + request.ContentType = "application/json"; + request.Headers.Add("sec-ch-ua-mobile", @"?0"); + request.Accept = "*/*"; + request.Headers.Add("Origin", @"https://seller.kuajingmaihuo.com"); + request.Headers.Add("Sec-Fetch-Site", @"same-origin"); + request.Headers.Add("Sec-Fetch-Mode", @"cors"); + request.Headers.Add("Sec-Fetch-Dest", @"empty"); + request.Referer = referer; + request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate, br, zstd"); + request.Headers.Set(HttpRequestHeader.AcceptLanguage, "zh-CN,zh;q=0.9"); + request.Headers.Set(HttpRequestHeader.Cookie, shop.Cookies); + + request.Method = "POST"; + request.ServicePoint.Expect100Continue = false; + + string body = _data; + byte[] postBytes = System.Text.Encoding.UTF8.GetBytes(body); + request.ContentLength = postBytes.Length; + Stream stream = request.GetRequestStream(); + stream.Write(postBytes, 0, postBytes.Length); + stream.Close(); + + response = (HttpWebResponse)request.GetResponse(); + } + catch (WebException ex) + { + if (ex.Status == WebExceptionStatus.ProtocolError) + { + response = (HttpWebResponse)ex.Response; + result = GetProxyHtml.ReadResponse(response); + return result; + } + else return ex.Message; + } + catch (Exception e) + { + if (response != null) response.Close(); + return e.Message; + } + result = GetProxyHtml.ReadResponse(response); + return result; + } + } +} diff --git a/TEMUKJD/KJDForms/UploadForms/StockUpForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.Designer.cs similarity index 98% rename from TEMUKJD/KJDForms/UploadForms/StockUpForm.Designer.cs rename to TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.Designer.cs index 6b9d975..8d35c22 100644 --- a/TEMUKJD/KJDForms/UploadForms/StockUpForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.Designer.cs @@ -1,7 +1,7 @@  -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { - partial class StockUpForm + partial class SaleStockUpForm { /// /// Required designer variable. @@ -51,7 +51,6 @@ namespace TemuKJD.KJDForms.UploadForms this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); this.chkHasCreate = new System.Windows.Forms.CheckBox(); this.btnSearch = new DevComponents.DotNetBar.PanelEx(); - this.btnStop = new DevComponents.DotNetBar.PanelEx(); this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx(); this.splitContainer3 = new System.Windows.Forms.SplitContainer(); @@ -61,6 +60,7 @@ namespace TemuKJD.KJDForms.UploadForms this.label9 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.txtParentStockid = new System.Windows.Forms.TextBox(); + this.btnStop = new DevComponents.DotNetBar.PanelEx(); this.label1 = new System.Windows.Forms.Label(); this.dgvShop = new TemuKJD.UserComponent.DataGridViewEx(); this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn(); @@ -109,10 +109,6 @@ namespace TemuKJD.KJDForms.UploadForms this.btnStopAdd = new DevComponents.DotNetBar.PanelEx(); this.chkLimited = new System.Windows.Forms.CheckBox(); this.dgvStock = new TemuKJD.UserComponent.DataGridViewEx(); - this.splitContainer4 = new System.Windows.Forms.SplitContainer(); - this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); - this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); - this.btnClear = new DevComponents.DotNetBar.PanelEx(); this.colUpId = new System.Windows.Forms.DataGridViewLinkColumn(); this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colSupplierId = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -132,6 +128,10 @@ namespace TemuKJD.KJDForms.UploadForms this.colWaitReceiveNum = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colNeedStockUp = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colMsg = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.splitContainer4 = new System.Windows.Forms.SplitContainer(); + this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); + this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); + this.btnClear = new DevComponents.DotNetBar.PanelEx(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -182,7 +182,7 @@ namespace TemuKJD.KJDForms.UploadForms // this.splitContainer1.Panel2.Controls.Add(this.splitContainer3); this.splitContainer1.Size = new System.Drawing.Size(1148, 589); - this.splitContainer1.SplitterDistance = 150; + this.splitContainer1.SplitterDistance = 120; this.splitContainer1.TabIndex = 9; // // ucGroupBoxEx4 @@ -201,15 +201,14 @@ namespace TemuKJD.KJDForms.UploadForms this.ucGroupBoxEx4.Controls.Add(this.label10); this.ucGroupBoxEx4.Location = new System.Drawing.Point(397, 2); this.ucGroupBoxEx4.Name = "ucGroupBoxEx4"; - this.ucGroupBoxEx4.Size = new System.Drawing.Size(749, 150); + this.ucGroupBoxEx4.Size = new System.Drawing.Size(749, 120); this.ucGroupBoxEx4.TabIndex = 666; this.ucGroupBoxEx4.TabStop = false; this.ucGroupBoxEx4.Text = "创建备货单"; // // txtScale2 // - this.txtScale2.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.txtScale2.Location = new System.Drawing.Point(369, 79); + this.txtScale2.Location = new System.Drawing.Point(369, 68); this.txtScale2.Margin = new System.Windows.Forms.Padding(0); this.txtScale2.Name = "txtScale2"; this.txtScale2.Size = new System.Drawing.Size(39, 23); @@ -220,7 +219,7 @@ namespace TemuKJD.KJDForms.UploadForms // label14 // this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(223, 82); + this.label14.Location = new System.Drawing.Point(223, 72); this.label14.Name = "label14"; this.label14.Size = new System.Drawing.Size(147, 17); this.label14.TabIndex = 679; @@ -228,8 +227,7 @@ namespace TemuKJD.KJDForms.UploadForms // // txtScale1 // - this.txtScale1.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.txtScale1.Location = new System.Drawing.Point(369, 51); + this.txtScale1.Location = new System.Drawing.Point(369, 40); this.txtScale1.Margin = new System.Windows.Forms.Padding(0); this.txtScale1.Name = "txtScale1"; this.txtScale1.Size = new System.Drawing.Size(39, 23); @@ -242,7 +240,7 @@ namespace TemuKJD.KJDForms.UploadForms this.panelEx3.CanvasColor = System.Drawing.SystemColors.Control; this.panelEx3.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.panelEx3.DisabledBackColor = System.Drawing.Color.Empty; - this.panelEx3.Location = new System.Drawing.Point(27, 87); + this.panelEx3.Location = new System.Drawing.Point(27, 71); this.panelEx3.Name = "panelEx3"; this.panelEx3.Size = new System.Drawing.Size(115, 23); this.panelEx3.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -268,7 +266,7 @@ namespace TemuKJD.KJDForms.UploadForms this.btnListWarehouse.Cursor = System.Windows.Forms.Cursors.Hand; this.btnListWarehouse.DisabledBackColor = System.Drawing.Color.Empty; this.btnListWarehouse.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnListWarehouse.Location = new System.Drawing.Point(27, 44); + this.btnListWarehouse.Location = new System.Drawing.Point(27, 32); this.btnListWarehouse.Name = "btnListWarehouse"; this.btnListWarehouse.Size = new System.Drawing.Size(115, 23); this.btnListWarehouse.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -293,7 +291,7 @@ namespace TemuKJD.KJDForms.UploadForms this.btnStartStockUp.Cursor = System.Windows.Forms.Cursors.Hand; this.btnStartStockUp.DisabledBackColor = System.Drawing.Color.Empty; this.btnStartStockUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnStartStockUp.Location = new System.Drawing.Point(647, 44); + this.btnStartStockUp.Location = new System.Drawing.Point(647, 32); this.btnStartStockUp.Name = "btnStartStockUp"; this.btnStartStockUp.Size = new System.Drawing.Size(80, 23); this.btnStartStockUp.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -314,7 +312,7 @@ namespace TemuKJD.KJDForms.UploadForms // label10 // this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(163, 54); + this.label10.Location = new System.Drawing.Point(163, 44); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(207, 17); this.label10.TabIndex = 678; @@ -330,7 +328,7 @@ namespace TemuKJD.KJDForms.UploadForms this.ucGroupBoxEx3.Controls.Add(this.panelEx2); this.ucGroupBoxEx3.Location = new System.Drawing.Point(272, 2); this.ucGroupBoxEx3.Name = "ucGroupBoxEx3"; - this.ucGroupBoxEx3.Size = new System.Drawing.Size(125, 150); + this.ucGroupBoxEx3.Size = new System.Drawing.Size(125, 120); this.ucGroupBoxEx3.TabIndex = 665; this.ucGroupBoxEx3.TabStop = false; this.ucGroupBoxEx3.Text = "取消待创建"; @@ -341,7 +339,7 @@ namespace TemuKJD.KJDForms.UploadForms this.btnCancelSubPurchaseOrder.Cursor = System.Windows.Forms.Cursors.Hand; this.btnCancelSubPurchaseOrder.DisabledBackColor = System.Drawing.Color.Empty; this.btnCancelSubPurchaseOrder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnCancelSubPurchaseOrder.Location = new System.Drawing.Point(27, 44); + this.btnCancelSubPurchaseOrder.Location = new System.Drawing.Point(27, 32); this.btnCancelSubPurchaseOrder.Name = "btnCancelSubPurchaseOrder"; this.btnCancelSubPurchaseOrder.Size = new System.Drawing.Size(70, 23); this.btnCancelSubPurchaseOrder.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -364,7 +362,7 @@ namespace TemuKJD.KJDForms.UploadForms this.panelEx2.CanvasColor = System.Drawing.SystemColors.Control; this.panelEx2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.panelEx2.DisabledBackColor = System.Drawing.Color.Empty; - this.panelEx2.Location = new System.Drawing.Point(27, 87); + this.panelEx2.Location = new System.Drawing.Point(27, 71); this.panelEx2.Name = "panelEx2"; this.panelEx2.Size = new System.Drawing.Size(70, 23); this.panelEx2.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -392,10 +390,9 @@ namespace TemuKJD.KJDForms.UploadForms this.ucGroupBoxEx2.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; this.ucGroupBoxEx2.Controls.Add(this.chkHasCreate); this.ucGroupBoxEx2.Controls.Add(this.btnSearch); - this.ucGroupBoxEx2.Controls.Add(this.btnStop); this.ucGroupBoxEx2.Location = new System.Drawing.Point(147, 2); this.ucGroupBoxEx2.Name = "ucGroupBoxEx2"; - this.ucGroupBoxEx2.Size = new System.Drawing.Size(125, 150); + this.ucGroupBoxEx2.Size = new System.Drawing.Size(125, 120); this.ucGroupBoxEx2.TabIndex = 469; this.ucGroupBoxEx2.TabStop = false; this.ucGroupBoxEx2.Text = "读取待创建"; @@ -403,12 +400,13 @@ namespace TemuKJD.KJDForms.UploadForms // chkHasCreate // this.chkHasCreate.AutoSize = true; - this.chkHasCreate.Location = new System.Drawing.Point(25, 120); + this.chkHasCreate.Location = new System.Drawing.Point(11, 73); this.chkHasCreate.Name = "chkHasCreate"; - this.chkHasCreate.Size = new System.Drawing.Size(63, 21); + this.chkHasCreate.Size = new System.Drawing.Size(111, 21); this.chkHasCreate.TabIndex = 658; - this.chkHasCreate.Text = "已送货"; + this.chkHasCreate.Text = "测试读取已送货"; this.chkHasCreate.UseVisualStyleBackColor = true; + this.chkHasCreate.Visible = false; // // btnSearch // @@ -416,7 +414,7 @@ namespace TemuKJD.KJDForms.UploadForms this.btnSearch.Cursor = System.Windows.Forms.Cursors.Hand; this.btnSearch.DisabledBackColor = System.Drawing.Color.Empty; this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSearch.Location = new System.Drawing.Point(25, 44); + this.btnSearch.Location = new System.Drawing.Point(25, 32); this.btnSearch.Name = "btnSearch"; this.btnSearch.Size = new System.Drawing.Size(70, 23); this.btnSearch.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -434,31 +432,6 @@ namespace TemuKJD.KJDForms.UploadForms this.btnSearch.Text = "读取待创建"; this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click); // - // btnStop - // - this.btnStop.CanvasColor = System.Drawing.SystemColors.Control; - this.btnStop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnStop.DisabledBackColor = System.Drawing.Color.Empty; - this.btnStop.Location = new System.Drawing.Point(25, 87); - this.btnStop.Name = "btnStop"; - this.btnStop.Size = new System.Drawing.Size(70, 23); - this.btnStop.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnStop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.btnStop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.btnStop.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.btnStop.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnStop.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.btnStop.Style.GradientAngle = 90; - this.btnStop.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; - this.btnStop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnStop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnStop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnStop.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; - this.btnStop.TabIndex = 405; - this.btnStop.Text = "停止搜索"; - this.btnStop.Visible = false; - this.btnStop.Click += new System.EventHandler(this.btnStop_Click); - // // ucGroupBoxEx1 // this.ucGroupBoxEx1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -468,7 +441,7 @@ namespace TemuKJD.KJDForms.UploadForms this.ucGroupBoxEx1.Controls.Add(this.btnRefreshShop); this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2); this.ucGroupBoxEx1.Name = "ucGroupBoxEx1"; - this.ucGroupBoxEx1.Size = new System.Drawing.Size(144, 150); + this.ucGroupBoxEx1.Size = new System.Drawing.Size(144, 120); this.ucGroupBoxEx1.TabIndex = 399; this.ucGroupBoxEx1.TabStop = false; this.ucGroupBoxEx1.Text = "基础"; @@ -513,8 +486,8 @@ namespace TemuKJD.KJDForms.UploadForms // splitContainer3.Panel2 // this.splitContainer3.Panel2.Controls.Add(this.splitContainer4); - this.splitContainer3.Size = new System.Drawing.Size(1148, 435); - this.splitContainer3.SplitterDistance = 405; + this.splitContainer3.Size = new System.Drawing.Size(1148, 465); + this.splitContainer3.SplitterDistance = 435; this.splitContainer3.TabIndex = 1; // // splitContainer2 @@ -531,6 +504,7 @@ namespace TemuKJD.KJDForms.UploadForms this.splitContainer2.Panel1.Controls.Add(this.label9); this.splitContainer2.Panel1.Controls.Add(this.label4); this.splitContainer2.Panel1.Controls.Add(this.txtParentStockid); + this.splitContainer2.Panel1.Controls.Add(this.btnStop); this.splitContainer2.Panel1.Controls.Add(this.label1); this.splitContainer2.Panel1.Controls.Add(this.dgvShop); this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0); @@ -540,7 +514,7 @@ namespace TemuKJD.KJDForms.UploadForms this.splitContainer2.Panel2.Controls.Add(this.ucGroupBoxEx99); 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(1148, 405); + this.splitContainer2.Size = new System.Drawing.Size(1148, 435); this.splitContainer2.SplitterDistance = 270; this.splitContainer2.TabIndex = 0; // @@ -588,6 +562,31 @@ namespace TemuKJD.KJDForms.UploadForms this.txtParentStockid.TabIndex = 602; this.txtParentStockid.Visible = false; // + // btnStop + // + this.btnStop.CanvasColor = System.Drawing.SystemColors.Control; + this.btnStop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnStop.DisabledBackColor = System.Drawing.Color.Empty; + this.btnStop.Location = new System.Drawing.Point(43, 131); + this.btnStop.Name = "btnStop"; + this.btnStop.Size = new System.Drawing.Size(70, 23); + this.btnStop.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnStop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnStop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.btnStop.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.btnStop.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStop.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.btnStop.Style.GradientAngle = 90; + this.btnStop.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.btnStop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnStop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnStop.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnStop.TabIndex = 405; + this.btnStop.Text = "停止搜索"; + this.btnStop.Visible = false; + this.btnStop.Click += new System.EventHandler(this.btnStop_Click); + // // label1 // this.label1.AutoSize = true; @@ -631,7 +630,7 @@ namespace TemuKJD.KJDForms.UploadForms dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.dgvShop.RowsDefaultCellStyle = dataGridViewCellStyle3; this.dgvShop.RowTemplate.Height = 23; - this.dgvShop.Size = new System.Drawing.Size(266, 405); + this.dgvShop.Size = new System.Drawing.Size(266, 435); this.dgvShop.TabIndex = 6; this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick); // @@ -713,7 +712,7 @@ namespace TemuKJD.KJDForms.UploadForms 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(550, 150); + this.ucGroupBoxEx99.Size = new System.Drawing.Size(550, 180); this.ucGroupBoxEx99.TabIndex = 470; this.ucGroupBoxEx99.TabStop = false; this.ucGroupBoxEx99.Text = "创建备货单"; @@ -1231,90 +1230,10 @@ namespace TemuKJD.KJDForms.UploadForms dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.dgvStock.RowsDefaultCellStyle = dataGridViewCellStyle6; this.dgvStock.RowTemplate.Height = 23; - this.dgvStock.Size = new System.Drawing.Size(870, 405); + this.dgvStock.Size = new System.Drawing.Size(870, 435); this.dgvStock.TabIndex = 187; this.dgvStock.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvStock_CellContentClick); // - // splitContainer4 - // - this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; - this.splitContainer4.Location = new System.Drawing.Point(0, 0); - this.splitContainer4.Name = "splitContainer4"; - // - // splitContainer4.Panel1 - // - this.splitContainer4.Panel1.Controls.Add(this.statusBar); - // - // splitContainer4.Panel2 - // - this.splitContainer4.Panel2.Controls.Add(this.panelEx1); - this.splitContainer4.Panel2.Controls.Add(this.btnClear); - this.splitContainer4.Size = new System.Drawing.Size(1148, 26); - this.splitContainer4.SplitterDistance = 870; - this.splitContainer4.TabIndex = 3; - // - // statusBar - // - this.statusBar.BackColor = System.Drawing.Color.White; - this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill; - this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.statusBar.Location = new System.Drawing.Point(0, 0); - this.statusBar.Margin = new System.Windows.Forms.Padding(0); - this.statusBar.Name = "statusBar"; - this.statusBar.Size = new System.Drawing.Size(870, 26); - this.statusBar.TabIndex = 2; - // - // panelEx1 - // - this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control; - this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty; - this.panelEx1.Location = new System.Drawing.Point(155, 0); - this.panelEx1.Name = "panelEx1"; - this.panelEx1.Size = new System.Drawing.Size(115, 23); - this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center; - this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); - this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.panelEx1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.panelEx1.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.panelEx1.Style.GradientAngle = 90; - this.panelEx1.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; - this.panelEx1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.panelEx1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.panelEx1.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; - this.panelEx1.TabIndex = 668; - this.panelEx1.Text = "停止当前操作"; - this.panelEx1.Click += new System.EventHandler(this.btnStop_Click); - // - // btnClear - // - this.btnClear.Anchor = System.Windows.Forms.AnchorStyles.Right; - this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnClear.DisabledBackColor = System.Drawing.Color.Empty; - this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnClear.Location = new System.Drawing.Point(47, 0); - this.btnClear.Name = "btnClear"; - this.btnClear.Size = new System.Drawing.Size(90, 21); - this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White; - this.btnClear.Style.GradientAngle = 90; - this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; - this.btnClear.TabIndex = 440; - this.btnClear.Text = "清空结果"; - this.btnClear.Visible = false; - // // colUpId // this.colUpId.HeaderText = "上家Id"; @@ -1467,15 +1386,95 @@ namespace TemuKJD.KJDForms.UploadForms this.colMsg.ReadOnly = true; this.colMsg.Width = 400; // - // StockUpForm + // splitContainer4 + // + this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; + this.splitContainer4.Location = new System.Drawing.Point(0, 0); + this.splitContainer4.Name = "splitContainer4"; + // + // splitContainer4.Panel1 + // + this.splitContainer4.Panel1.Controls.Add(this.statusBar); + // + // splitContainer4.Panel2 + // + this.splitContainer4.Panel2.Controls.Add(this.panelEx1); + this.splitContainer4.Panel2.Controls.Add(this.btnClear); + this.splitContainer4.Size = new System.Drawing.Size(1148, 26); + this.splitContainer4.SplitterDistance = 870; + this.splitContainer4.TabIndex = 3; + // + // statusBar + // + this.statusBar.BackColor = System.Drawing.Color.White; + this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill; + this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.statusBar.Location = new System.Drawing.Point(0, 0); + this.statusBar.Margin = new System.Windows.Forms.Padding(0); + this.statusBar.Name = "statusBar"; + this.statusBar.Size = new System.Drawing.Size(870, 26); + this.statusBar.TabIndex = 2; + // + // panelEx1 + // + this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control; + this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty; + this.panelEx1.Location = new System.Drawing.Point(155, 0); + this.panelEx1.Name = "panelEx1"; + this.panelEx1.Size = new System.Drawing.Size(115, 21); + this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.panelEx1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255))))); + this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.panelEx1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panelEx1.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.panelEx1.Style.GradientAngle = 90; + this.panelEx1.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx1.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.panelEx1.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panelEx1.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.panelEx1.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.panelEx1.TabIndex = 668; + this.panelEx1.Text = "停止当前操作"; + this.panelEx1.Click += new System.EventHandler(this.btnStop_Click); + // + // btnClear + // + this.btnClear.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnClear.DisabledBackColor = System.Drawing.Color.Empty; + this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnClear.Location = new System.Drawing.Point(47, 0); + this.btnClear.Name = "btnClear"; + this.btnClear.Size = new System.Drawing.Size(90, 21); + this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnClear.Style.GradientAngle = 90; + this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White; + this.btnClear.TabIndex = 440; + this.btnClear.Text = "清空结果"; + this.btnClear.Visible = false; + // + // SaleStockUpForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(1148, 589); this.Controls.Add(this.splitContainer1); this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.Name = "StockUpForm"; - this.Text = "库存备货单窗口"; + this.Name = "SaleStockUpForm"; + this.Text = "销售备货管理窗口"; this.Load += new System.EventHandler(this.StockUpForm_Load); this.VisibleChanged += new System.EventHandler(this.StockUpForm_VisibleChanged); this.splitContainer1.Panel1.ResumeLayout(false); diff --git a/TEMUKJD/KJDForms/UploadForms/StockUpForm.cs b/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.cs similarity index 88% rename from TEMUKJD/KJDForms/UploadForms/StockUpForm.cs rename to TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.cs index 2677dec..1498ef0 100644 --- a/TEMUKJD/KJDForms/UploadForms/StockUpForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.cs @@ -20,22 +20,27 @@ using TemuKJD.Extension; using TemuKJD.KJDForms.BaseForms; using TemuKJD.KJDForms.ShopForms; -namespace TemuKJD.KJDForms.UploadForms +namespace TemuKJD.KJDForms.ProductForms { - public partial class StockUpForm : Form + /// + /// 销售备货管理 + /// + public partial class SaleStockUpForm : Form { private CheckBox chkSelectAll = null; //private CheckBox chkCheckAll = null; public CancellationTokenSource cancellationTokenSource { get; set; } = null; /// - /// 备货单列表 + /// 取消待创建备货单列表 + /// + List lstStockInfo = new List(); + /// + /// 待备货商品列表 /// - List lstStockInfo = new List(); - List lstSubOrderInfo = new List(); - public StockUpForm() + public SaleStockUpForm() { InitializeComponent(); } @@ -238,6 +243,9 @@ namespace TemuKJD.KJDForms.UploadForms bool isError = false; while (page <= totalPage) { + if (cancellationTokenSource.IsCancellationRequested) + break; + Thread.Sleep(100 + Randomx.GetId(200)); string jsonStr = GetShopStockList(shop, page, chkHasCreate.Checked ? "已送货" : "待创建"); if (jsonStr.Contains("指定的值含有无效的控制字符")) @@ -255,14 +263,19 @@ namespace TemuKJD.KJDForms.UploadForms if (jsonStr.Contains("\"success\":true")) { - var jObj = JObject.Parse(jsonStr); - var jArr = jObj["result"]?["subOrderForSupplierList"] as JArray; - if (jArr == null) - jArr = new JArray(); + var jArr = new JArray(); + try + { + var jObj = JObject.Parse(jsonStr); + jArr = jObj["result"]?["subOrderForSupplierList"] as JArray; + if (jArr == null) + jArr = new JArray(); + } + catch (Exception ex) { BaseMsgForm.ShowError(ex.Message); } foreach (var item in jArr) { string sItem = item.ToString(); - StockInfo sInfo = JsonHelper.DeserializeJsonToObject(sItem); // 反序列化得到类 + TemuStockInfo sInfo = JsonHelper.DeserializeJsonToObject(sItem); // 反序列化得到类 if (sInfo != null) { lstStockInfo.Add(sInfo); @@ -297,10 +310,10 @@ namespace TemuKJD.KJDForms.UploadForms })); } } - } - int total = BaseRegex.GetStringJson(ref jsonStr, "total").ParseToInt(); - totalPage = Math.Ceiling(total / 20.0).ParseToInt(); + int total = BaseRegex.GetStringJson(ref jsonStr, "total").ParseToInt(); + totalPage = Math.Ceiling(total / 20.0).ParseToInt(); + } page++; } @@ -359,7 +372,7 @@ namespace TemuKJD.KJDForms.UploadForms string refere = "https://seller.kuajingmaihuo.com/main/order-manage"; - return StockResponse(shop, url, body,refere); + return ProductResponse.GetPostResponse(shop, url, body,refere); } /// @@ -374,7 +387,7 @@ namespace TemuKJD.KJDForms.UploadForms string body = "{\"subPurchaseOrderSnList\":[\"" + subPurchaseOrderSn + "\"]}"; string refere = "https://seller.kuajingmaihuo.com/main/order-manage"; - return StockResponse(shop, url, body, refere); + return ProductResponse.GetPostResponse(shop, url, body, refere); } private string GetWarehouseList(DouShopLoginInfo shop, int page = 1) @@ -384,7 +397,7 @@ namespace TemuKJD.KJDForms.UploadForms string body = @"{""pageNo"":" + page + @",""pageSize"":10,""isLack"":0,""selectStatusList"":[12],""priceAdjustRecentDays"":7}"; string refere = "https://seller.kuajingmaihuo.com/main/sale-manage/main"; - return StockResponse(shop, url, body, refere); + return ProductResponse.GetPostResponse(shop, url, body, refere); } /// @@ -399,7 +412,7 @@ namespace TemuKJD.KJDForms.UploadForms string body = "{\"productSkcId\":" + subOrderInfo.productSkcId + ",\"warehouseGroupId\":" + subOrderInfo.warehouseGroupIdList.FirstOrDefault() + "}"; string refere = "https://seller.kuajingmaihuo.com/main/sale-manage/main"; - return StockResponse(shop, url, body, refere); + return ProductResponse.GetPostResponse(shop, url, body, refere); } /// @@ -422,66 +435,7 @@ namespace TemuKJD.KJDForms.UploadForms body += "],\"warehouseGroupId\":" + subOrderInfo.warehouseGroupIdList.FirstOrDefault() + "}"; string refere = "https://seller.kuajingmaihuo.com/main/sale-manage/main"; - return StockResponse(shop, url, body, refere); - } - - private string StockResponse(DouShopLoginInfo shop, string _url, string _data, string referer) - { - HttpWebResponse response = null; - string result; - try - { - string url = _url; - HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); - - request.KeepAlive = true; - request.Headers.Set(HttpRequestHeader.CacheControl, "max-age=0"); - request.Headers.Add("Anti-Content", @"0aqAfqFyXcGvBgd9Q0HiJJ7kvWcKK7muUHnJ6oMAdmem0tmm_enmX1DBr-nJNxmoki33dqHTkZU18BU2p8P72Cg2uEZ_acOOBCxGmIs-Gym4EtKpTdZ6kWRCSClS9L6maLm0imx0GIjodHtLnwpx4ayHnhzNnCXEFecZSC8lBRHb9WCAoyY79kMLIWxBMZZSZrR2_LYUJ5UXzf-82ob455f7OvJa6s895N4wiMGR4vbVH8gFN2VuCxS27RpXDa2WCQQQd6XsJPw7amSUaob6oZ2MXuYb9K3ZqoCX5-nJimNZDR0rNCLB13sYgWq9jy0Q3gjnsFY2dJQDh3ewXS2vvf2DN9IAEzInwWTY31Fn0B6-s8DqwIm61OlXsfYt1AYOOyNMLzkw5llaDaqK21f7vspAuXwnJdAdKXJXSyyEimvTyF_AYLp1gkNqBqN1_ik_jc6cKTDJtGUgFjRojR4g4zM7Ww3wfW63WQrJftYhiTIJiS1tZcsceZht3Zu3MsvyxpAbx4bxFrvL0A6OFx752XsVi04Tm6HDhgt7MmpsrTO5WD_KjgjxNX8VNoGndD0OmriAYVn6kwmZXE6Y_khGedxumIGy4sOQI36__CeiuiPIvB8itfOqd7eyqyeCIaEODrh9dSLBQz8AxQ2xt60OTn4HSiPmlwo1J0TFtjUw2DUZB68tdrINb7ugulMsaIwMKr8S0bilSKW6JuYw3oAsmK3daQfJWy3mzVowY1UwPQfTB4Ibz6uRQxHkvhsRTXkrAygGeZIc9S"); - request.Headers.Add("sec-ch-ua-platform", @"""Windows"""); - request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36"; - request.Headers.Add("mallid", shop.ShopId); - request.Headers.Add("sec-ch-ua", @"""Google Chrome"";v=""137"", ""Chromium"";v=""137"", ""Not/A)Brand"";v=""24"""); - request.ContentType = "application/json"; - request.Headers.Add("sec-ch-ua-mobile", @"?0"); - request.Accept = "*/*"; - request.Headers.Add("Origin", @"https://seller.kuajingmaihuo.com"); - request.Headers.Add("Sec-Fetch-Site", @"same-origin"); - request.Headers.Add("Sec-Fetch-Mode", @"cors"); - request.Headers.Add("Sec-Fetch-Dest", @"empty"); - request.Referer = referer; - request.Headers.Set(HttpRequestHeader.AcceptEncoding, "gzip, deflate, br, zstd"); - request.Headers.Set(HttpRequestHeader.AcceptLanguage, "zh-CN,zh;q=0.9"); - request.Headers.Set(HttpRequestHeader.Cookie, shop.Cookies); - - request.Method = "POST"; - request.ServicePoint.Expect100Continue = false; - - string body = _data; - byte[] postBytes = System.Text.Encoding.UTF8.GetBytes(body); - request.ContentLength = postBytes.Length; - Stream stream = request.GetRequestStream(); - stream.Write(postBytes, 0, postBytes.Length); - stream.Close(); - - response = (HttpWebResponse)request.GetResponse(); - } - catch (WebException ex) - { - if (ex.Status == WebExceptionStatus.ProtocolError) - { - response = (HttpWebResponse)ex.Response; - result = GetProxyHtml.ReadResponse(response); - return result; - } - else return ex.Message; - } - catch (Exception e) - { - if (response != null) response.Close(); - return e.Message; - } - result = GetProxyHtml.ReadResponse(response); - return result; + return ProductResponse.GetPostResponse(shop, url, body, refere); } private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e) @@ -612,11 +566,15 @@ namespace TemuKJD.KJDForms.UploadForms string sErrMsg = BaseRegex.GetStringJson(ref jsonStr, "errorMsg"); if (!isError) { - var jObj = JObject.Parse(jsonStr); - var jItem = jObj["result"]; - var subJsonstr = jItem == null ? "" : JsonHelper.SerializeObject(jItem); - isError = !subJsonstr.Contains("\"isSuccess\":true"); - sErrMsg = BaseRegex.GetStringJson(ref subJsonstr, "errorMsg"); + try + { + var jObj = JObject.Parse(jsonStr); + var jItem = jObj["result"]; + var subJsonstr = jItem == null ? "" : JsonHelper.SerializeObject(jItem); + isError = !subJsonstr.Contains("\"isSuccess\":true"); + sErrMsg = BaseRegex.GetStringJson(ref subJsonstr, "errorMsg"); + } + catch (Exception ex) { } } Invoke(new Action(() => @@ -778,10 +736,18 @@ namespace TemuKJD.KJDForms.UploadForms if (jsonStr.Contains("\"success\":true")) { - var jObj = JObject.Parse(jsonStr); - var jArr = jObj["result"]?["subOrderList"] as JArray; - if (jArr == null) - jArr = new JArray(); + var jArr = new JArray(); + try + { + var jObj = JObject.Parse(jsonStr); + jArr = jObj["result"]["subOrderList"] as JArray; + if (jArr == null) + jArr = new JArray(); + } + catch (Exception ex) + { + BaseMsgForm.ShowError(ex.Message); + } foreach (var item in jArr) { string sItem = item.ToString(); @@ -840,10 +806,11 @@ namespace TemuKJD.KJDForms.UploadForms })); } } + + int total = BaseRegex.GetStringJson(ref jsonStr, "total").ParseToInt(); + totalPage = Math.Ceiling(total / 10.0).ParseToInt(); } - int total = BaseRegex.GetStringJson(ref jsonStr, "total").ParseToInt(); - totalPage = Math.Ceiling(total / 10.0).ParseToInt(); page++; } @@ -962,9 +929,17 @@ namespace TemuKJD.KJDForms.UploadForms { Thread.Sleep(Randomx.GetId(200, 400)); - var jObj = JObject.Parse(jsonStr); - var jItem = jObj["result"]; - var jStr = jObj["result"].ParseToString(); + var jStr = ""; + try + { + var jObj = JObject.Parse(jsonStr); + var jItem = jObj["result"]; + jStr = jObj["result"].ParseToString(); + } + catch (Exception ex) + { + BaseMsgForm.ShowError(ex.Message); + } stockBaseInfo sBaseInfo = JsonHelper.DeserializeJsonToObject(jStr); foreach(var sku in stockUp.skuQuantityDetailList) @@ -987,20 +962,28 @@ namespace TemuKJD.KJDForms.UploadForms //如果已备过货但是还未发出,做一个判断 isError = true; stockUp.needStockUp = false; - sErrMsg1 += "已达平台备货量上限!"; + sErrMsg1 += "已达平台备货量上限!已申请过备货"; } else { jsonStr = this.CreateStockOrder(shop, stockUp); isError = !jsonStr.Contains("\"success\":true"); string sErrMsg2 = BaseRegex.GetStringJson(ref jsonStr, "errorMsg").ParseToString(); - var jObj2 = JObject.Parse(jsonStr); - string failDetailList = jObj2["result"]?["failDetailList"].ParseToString(); - if (failDetailList.Length > 5) + + try { - isError = true; - sErrMsg2 += failDetailList; + var jObj2 = JObject.Parse(jsonStr); + if (jObj2["result"] != null && jObj2["result"]["failDetailList"] != null) + { + string failDetailList = (jObj2["result"]["failDetailList"])?.ParseToString(); + if (failDetailList.Length > 5) + { + isError = true; + sErrMsg2 += failDetailList; + } + } } + catch { } sErrMsg1 += sErrMsg2; } } diff --git a/TEMUKJD/KJDForms/UploadForms/StockUpForm.resx b/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.resx similarity index 100% rename from TEMUKJD/KJDForms/UploadForms/StockUpForm.resx rename to TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.resx diff --git a/TEMUKJD/KJDForms/ShopForms/ShopAddEditForm.Designer.cs b/TEMUKJD/KJDForms/ShopForms/ShopAddEditForm.Designer.cs index 9129c8c..f090e99 100644 --- a/TEMUKJD/KJDForms/ShopForms/ShopAddEditForm.Designer.cs +++ b/TEMUKJD/KJDForms/ShopForms/ShopAddEditForm.Designer.cs @@ -95,6 +95,7 @@ this.cmbGroup.Name = "cmbGroup"; this.cmbGroup.Size = new System.Drawing.Size(172, 25); this.cmbGroup.TabIndex = 383; + this.cmbGroup.Visible = false; // // txtBuyAccount // @@ -111,6 +112,7 @@ this.txtBuyAccount.Name = "txtBuyAccount"; this.txtBuyAccount.Size = new System.Drawing.Size(172, 23); this.txtBuyAccount.TabIndex = 382; + this.txtBuyAccount.Visible = false; this.txtBuyAccount.WatermarkText = "点击添加店铺子账户"; this.txtBuyAccount.Click += new System.EventHandler(this.txt_Click); this.txtBuyAccount.TextChanged += new System.EventHandler(this.txtBuyAccount_TextChanged); @@ -123,6 +125,7 @@ this.label6.Size = new System.Drawing.Size(56, 17); this.label6.TabIndex = 381; this.label6.Text = "采购账户"; + this.label6.Visible = false; // // txtChatAccount // @@ -154,7 +157,7 @@ this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(56, 17); this.label4.TabIndex = 379; - this.label4.Text = "客服账户"; + this.label4.Text = " 子账户"; // // txtUploadAccount // @@ -226,6 +229,7 @@ this.label5.Size = new System.Drawing.Size(56, 17); this.label5.TabIndex = 377; this.label5.Text = "店铺分组"; + this.label5.Visible = false; // // btnOk // diff --git a/TEMUKJD/KJDForms/ShopForms/ShopForm.cs b/TEMUKJD/KJDForms/ShopForms/ShopForm.cs index 1428f12..1e407d1 100644 --- a/TEMUKJD/KJDForms/ShopForms/ShopForm.cs +++ b/TEMUKJD/KJDForms/ShopForms/ShopForm.cs @@ -1,4 +1,5 @@ -using System; +using AllBase; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -30,6 +31,11 @@ namespace TemuKJD.KJDForms.ShopForms List hideName = new List() { "高级运费模板", "运费模板", "素材库管理" }; + if (BaseClass.GroupId != 3) + { + hideName.Add("用户管理"); + } + foreach (var item in hideName) { var n = tv.Nodes[0].Nodes.Find(item, true); diff --git a/TEMUKJD/KJDForms/ShopForms/ShopListForm.Designer.cs b/TEMUKJD/KJDForms/ShopForms/ShopListForm.Designer.cs index c990c95..4bfdd2f 100644 --- a/TEMUKJD/KJDForms/ShopForms/ShopListForm.Designer.cs +++ b/TEMUKJD/KJDForms/ShopForms/ShopListForm.Designer.cs @@ -51,6 +51,7 @@ this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colShopAccount = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colCookie = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colSubUser = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colGroup = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colUploadAccount = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colBuyAccount = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -284,6 +285,7 @@ this.colShopId, this.colShopAccount, this.colCookie, + this.colSubUser, this.colGroup, this.colUploadAccount, this.colBuyAccount, @@ -370,12 +372,20 @@ this.colCookie.ReadOnly = true; this.colCookie.Visible = false; // + // colSubUser + // + this.colSubUser.FillWeight = 67F; + this.colSubUser.HeaderText = "子账户"; + this.colSubUser.Name = "colSubUser"; + this.colSubUser.ReadOnly = true; + // // colGroup // this.colGroup.FillWeight = 69.42601F; this.colGroup.HeaderText = "店铺分组"; this.colGroup.Name = "colGroup"; this.colGroup.ReadOnly = true; + this.colGroup.Visible = false; // // colUploadAccount // @@ -546,6 +556,7 @@ private System.Windows.Forms.DataGridViewTextBoxColumn colShopId; private System.Windows.Forms.DataGridViewTextBoxColumn colShopAccount; private System.Windows.Forms.DataGridViewTextBoxColumn colCookie; + private System.Windows.Forms.DataGridViewTextBoxColumn colSubUser; private System.Windows.Forms.DataGridViewTextBoxColumn colGroup; private System.Windows.Forms.DataGridViewTextBoxColumn colUploadAccount; private System.Windows.Forms.DataGridViewTextBoxColumn colBuyAccount; diff --git a/TEMUKJD/KJDForms/ShopForms/ShopListForm.cs b/TEMUKJD/KJDForms/ShopForms/ShopListForm.cs index 3d9b1b2..9e1e298 100644 --- a/TEMUKJD/KJDForms/ShopForms/ShopListForm.cs +++ b/TEMUKJD/KJDForms/ShopForms/ShopListForm.cs @@ -38,7 +38,8 @@ namespace TemuKJD.KJDForms.ShopForms + "&shop_id=" + _shop.ShopId + "&shop_account=" + _shop.ShopAccount + "&cookie=" + _shop.Cookies - + "&shop_group=" + GetHtml.UrlEncodeUtf8(_shop.Group); + + "&shop_group=" + GetHtml.UrlEncodeUtf8(_shop.Group) + + "&sub_user_name=" + GetHtml.UrlEncodeUtf8(_shop.SubUserName); var result = GetHtml.PostUtf8(url, data); if (!result.Contains("\"code\":200") && !result.Contains("已达上限") && !result.Contains("已存在")) @@ -61,7 +62,8 @@ namespace TemuKJD.KJDForms.ShopForms var data = UserLogin.GetSignaturex() + "&login_name=" + _shop.LoginName + "&login_pass=" + GetHtml.UrlEncodeUtf8(_shop.Password) - + "&shop_group=" + GetHtml.UrlEncodeUtf8(_shop.Group); + + "&shop_group=" + GetHtml.UrlEncodeUtf8(_shop.Group) + + "&sub_user_name=" + GetHtml.UrlEncodeUtf8(_shop.SubUserName); var result = GetHtml.PostUtf8(url, data); if (!result.Contains("\"code\":200") && !result.Contains("已达上限") && !result.Contains("已存在")) @@ -115,8 +117,10 @@ namespace TemuKJD.KJDForms.ShopForms shop.Password = BaseRegex.GetStringJson(ref shopStr, "login_pass"); shop.ShopId = BaseRegex.GetStringJson(ref shopStr, "shop_id"); shop.ShopAccount = BaseRegex.GetStringJson(ref shopStr, "shop_account"); + shop.SubUserName = BaseRegex.GetStringJson(ref shopStr, "sub_user_name"); shop.Group = BaseRegex.GetStringJson(ref shopStr, "shop_group"); shop.Cookies = BaseRegex.GetStringJson(ref shopStr, "cookie"); + shop.Cookies = shop.Cookies.Replace("&", "&").Replace("%", "%").Replace("+", "+"); //shop.PayStatus = BaseRegex.GetIntJson(ref shopStr, "shop_pay_status"); //if (list.Any(l => l.ShopId == shop.ShopId) || list.Any(l => l.ShopName == shop.ShopName)) // continue; @@ -249,6 +253,7 @@ namespace TemuKJD.KJDForms.ShopForms var url = BaseClass.BuildObjString("shop/mdy_shop"); var data = UserLogin.GetSignaturex() + "&login_name=" + shop.LoginName + + "&sub_user_name=" + shop.SubUserName + "&cookie=" + shopCookies.Replace("&", "&").Replace("%", "%").Replace("+", "+") + fTool; var result = GetHtml.PostUtf8(url, data); @@ -319,7 +324,7 @@ namespace TemuKJD.KJDForms.ShopForms else { StartUp.SaveLocalShopLoginInfo(); - ShopListForm.AddServerDouShop(shopInfo); + ShopListForm.MdyServerDouShop(shopInfo); RefreshDataGridView(false); } } @@ -486,6 +491,7 @@ namespace TemuKJD.KJDForms.ShopForms param.ShopId, param.ShopAccount, param.Cookies, + param.SubUserName, param.Group, param.UploadAccount, param.BuyAccount, @@ -689,7 +695,9 @@ namespace TemuKJD.KJDForms.ShopForms { this.dgvShop.Columns["ColEdit"].Visible = false; this.dgvShop.Columns["colDelete"].Visible = false; + this.dgvShop.Columns["colSubUser"].Visible = false; this.btnImport.Visible = false; + this.btnAddShop.Visible = false; } this.dgvShop.AddSelectorColumn("colSelect"); @@ -710,6 +718,19 @@ namespace TemuKJD.KJDForms.ShopForms // shop.ShopSubAccountList.AddRange(shopSubAccountList.Where(s => s.shop_login_name == shop.LoginName)); // } //} + foreach (var shop in GlobalConfig.ShopLoginList) + { + shop.ShopSubAccountList.Clear(); + if (!string.IsNullOrWhiteSpace(shop.SubUserName)) + { + DouShopSubAccountInfo subAccount = new DouShopSubAccountInfo(); + subAccount.sub_user_name = shop.SubUserName; + subAccount.user_name = shop.SubUserName; + subAccount.shop_login_name = shop.LoginName; + subAccount.group_id = "4"; + shop.ShopSubAccountList.Add(subAccount); + } + } } private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e) @@ -730,7 +751,9 @@ namespace TemuKJD.KJDForms.ShopForms { ShopLoginForm shopLoginForm = new ShopLoginForm(shop); shopLoginForm.openType = EnumOpenType.manage; - shopLoginForm.ShowDialog(); + //shopLoginForm.Parent = this; + shopLoginForm.WindowState = FormWindowState.Maximized; + shopLoginForm.Show(); IsOperate = false; } break; diff --git a/TEMUKJD/KJDForms/ShopForms/ShopListForm.resx b/TEMUKJD/KJDForms/ShopForms/ShopListForm.resx index d48cac6..46a8355 100644 --- a/TEMUKJD/KJDForms/ShopForms/ShopListForm.resx +++ b/TEMUKJD/KJDForms/ShopForms/ShopListForm.resx @@ -132,6 +132,9 @@ True + + True + True diff --git a/TEMUKJD/KJDForms/ShopForms/ShopLoginForm.Designer.cs b/TEMUKJD/KJDForms/ShopForms/ShopLoginForm.Designer.cs index 92ebf70..f35daaf 100644 --- a/TEMUKJD/KJDForms/ShopForms/ShopLoginForm.Designer.cs +++ b/TEMUKJD/KJDForms/ShopForms/ShopLoginForm.Designer.cs @@ -30,6 +30,7 @@ { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ShopLoginForm)); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.btnLoginAgain = new TemuKJD.UserControls.ButtonEx(); this.pnlMultiLogin = new System.Windows.Forms.Panel(); this.cmbMultiCookieName = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.btnMultiLogin = new DevComponents.DotNetBar.PanelEx(); @@ -68,6 +69,7 @@ // splitContainer1.Panel2 // this.splitContainer1.Panel2.BackColor = System.Drawing.Color.White; + this.splitContainer1.Panel2.Controls.Add(this.btnLoginAgain); this.splitContainer1.Panel2.Controls.Add(this.pnlMultiLogin); this.splitContainer1.Panel2.Controls.Add(this.label2); this.splitContainer1.Panel2.Controls.Add(this.label1); @@ -83,6 +85,23 @@ this.splitContainer1.SplitterWidth = 3; this.splitContainer1.TabIndex = 4; // + // btnLoginAgain + // + this.btnLoginAgain.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnLoginAgain.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnLoginAgain.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnLoginAgain.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnLoginAgain.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnLoginAgain.ForeColor = System.Drawing.Color.White; + this.btnLoginAgain.Location = new System.Drawing.Point(1137, 31); + this.btnLoginAgain.Margin = new System.Windows.Forms.Padding(2); + this.btnLoginAgain.Name = "btnLoginAgain"; + this.btnLoginAgain.Size = new System.Drawing.Size(91, 25); + this.btnLoginAgain.TabIndex = 462; + this.btnLoginAgain.Text = "重新登录"; + this.btnLoginAgain.UseVisualStyleBackColor = false; + this.btnLoginAgain.Click += new System.EventHandler(this.btnLoginAgain_Click); + // // pnlMultiLogin // this.pnlMultiLogin.Controls.Add(this.cmbMultiCookieName); @@ -271,7 +290,7 @@ this.chkCloseAfterLogin.Checked = true; this.chkCloseAfterLogin.CheckState = System.Windows.Forms.CheckState.Checked; this.chkCloseAfterLogin.CheckValue = "Y"; - this.chkCloseAfterLogin.Location = new System.Drawing.Point(1096, 32); + this.chkCloseAfterLogin.Location = new System.Drawing.Point(997, 32); this.chkCloseAfterLogin.Name = "chkCloseAfterLogin"; this.chkCloseAfterLogin.Size = new System.Drawing.Size(135, 23); this.chkCloseAfterLogin.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -355,5 +374,6 @@ private DevComponents.DotNetBar.PanelEx btnDel; private DevComponents.DotNetBar.PanelEx btnMultiLogin; private System.Windows.Forms.Panel pnlMultiLogin; + private UserControls.ButtonEx btnLoginAgain; } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/ShopForms/ShopLoginForm.cs b/TEMUKJD/KJDForms/ShopForms/ShopLoginForm.cs index 3b3e305..89538bf 100644 --- a/TEMUKJD/KJDForms/ShopForms/ShopLoginForm.cs +++ b/TEMUKJD/KJDForms/ShopForms/ShopLoginForm.cs @@ -120,8 +120,9 @@ namespace TemuKJD.KJDForms.ShopForms { foreach (var cookie in cookieList) { - //SUB_PASS_ID要用domain是seller.kuajingmaihuo.com才是能登录店铺后台的 - if (cookie.Name == "SUB_PASS_ID" && cookie.Domain != "seller.kuajingmaihuo.com") + //SUB_PASS_ID同时出现两个,domain是seller.kuajingmaihuo.com才是能登录店铺后台的 + if (cookie.Name == "SUB_PASS_ID" && cookie.Domain != "seller.kuajingmaihuo.com" + && cookieList.Any(c=>c.Name== "SUB_PASS_ID" && cookie.Domain == "seller.kuajingmaihuo.com")) continue; cookies += cookie.Name + "=" + cookie.Value + "; "; @@ -145,6 +146,7 @@ namespace TemuKJD.KJDForms.ShopForms Group = shop.Group, ShopAccount = sc.AccountName, ShopId = sc.AccountId, + SubUserName = shop.SubUserName, }; var oldShop = GlobalConfig.ShopLoginList.FirstOrDefault(l => @@ -165,6 +167,7 @@ namespace TemuKJD.KJDForms.ShopForms oldShop.Group = newShop.Group; oldShop.ShopAccount = newShop.ShopAccount; oldShop.ShopId = newShop.ShopId; + oldShop.SubUserName = newShop.SubUserName; } } var lstShop = GlobalConfig.ShopLoginList.Where(l => l.LoginName == shop.LoginName).ToList(); @@ -258,7 +261,8 @@ namespace TemuKJD.KJDForms.ShopForms if (cefWebBrowser == null) { - cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser("about:blank", false); + //cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser("about:blank", false); + cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser(shopMainUrl, false); CustomResourceRequestHandlerLocal resourceRequestHandler = new CustomResourceRequestHandlerLocal(); resourceRequestHandler.ResourceLoadCompleteEvent += RequestHandler_ResourceLoadComplete; cefWebBrowser.RequestHandler = new CustomRequestHandler(resourceRequestHandler); @@ -277,23 +281,34 @@ namespace TemuKJD.KJDForms.ShopForms if (isMultiLogin) cookie = shop.DictMultiCookies.Keys.Contains(MultiLoginCookieName) ? shop.DictMultiCookies[MultiLoginCookieName] : ""; - var t = CEFBrowser.SetCookieAsync(shopCookieHead, cookie, cefWebBrowser.RequestContext.GetCookieManager(null)); - splitContainer1.Panel1.Controls.Add(cefWebBrowser); Task.Run(() => { - Thread.Sleep(25); - cefWebBrowser.Load(shopMainUrl); + var t = CEFBrowser.SetCookieAsync(shopCookieHead, cookie, cefWebBrowser.RequestContext.GetCookieManager(null)); + t.Wait(5000); + + Invoke(new Action(() => + { + splitContainer1.Panel1.Controls.Add(cefWebBrowser); + //cefWebBrowser.Load(shopMainUrl); + })); if (openType != EnumOpenType.login) + { + Invoke(new Action(() => + { + chkCloseAfterLogin.Visible = false; + btnLoginAgain.Visible = false; + })); return; + } for (int i = 0; i < 50; i++) { if (cefWebBrowser.IsLoading) Thread.Sleep(100); } - Thread.Sleep(Randomx.GetId(1000,1500)); + Thread.Sleep(Randomx.GetId(1500,2000)); //设置 local storage //if (GlobalConfig.dicLocalStorage != null) @@ -424,12 +439,27 @@ namespace TemuKJD.KJDForms.ShopForms /// private void InputUserNameAndPassword(ChromiumWebBrowser webBrowser, string _account, string _password) { + string jsStr1 = "function getInputItem () {var usernameId = document.getElementById('usernameId'); if (usernameId) return 'true';} getInputItem();"; + Task response1 = null; + while (response1?.Result?.Result == null || !response1.Result.Result.ParseToString().Contains("true")) + { + Thread.Sleep(250); + if (!this.Created) + return; + + response1 = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr1); + response1.Wait(5000); + + if (!this.Created) + return; + } + webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sInputValueChange2); webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sGetElementWithText); - string jsStr1 = "var usernameId = document.getElementById('usernameId'); " + + jsStr1 = "var usernameId = document.getElementById('usernameId'); " + "changeReactInputValue(usernameId,'" + _account + "');"; - var response1 = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr1); + response1 = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr1); response1.Wait(1000); Thread.Sleep(Randomx.GetId(500, 1000)); @@ -712,7 +742,10 @@ function fireKeyEvent(el, evtType, keyCode) { { if (cefWebBrowser != null) { - cefWebBrowser.Load(txtAddress.Text); + if (txtAddress.Text != "about:blank") + cefWebBrowser.Load(txtAddress.Text); + else + cefWebBrowser.Load(shopMainUrl); } } @@ -808,5 +841,17 @@ function getElementWithText(sText) return elem; }; "; + + private void btnLoginAgain_Click(object sender, EventArgs e) + { + if (this.currentUrl != shopLoginUrl) + this.cefWebBrowser.Load(shopLoginUrl); + + + Task.Run(() => + { + InputUserNameAndPassword(cefWebBrowser, shop.LoginName, DataOpenSSL.DecryptString(shop.Password)); + }); + } } } diff --git a/TEMUKJD/KJDForms/ShopForms/ShopLoginForm.resx b/TEMUKJD/KJDForms/ShopForms/ShopLoginForm.resx index 35a31a1..c963c3c 100644 --- a/TEMUKJD/KJDForms/ShopForms/ShopLoginForm.resx +++ b/TEMUKJD/KJDForms/ShopForms/ShopLoginForm.resx @@ -1,17 +1,17 @@  - diff --git a/TEMUKJD/KJDForms/ShopForms/SubAccountListForm.Designer.cs b/TEMUKJD/KJDForms/ShopForms/SubAccountListForm.Designer.cs index 8b83d8b..39fb7c4 100644 --- a/TEMUKJD/KJDForms/ShopForms/SubAccountListForm.Designer.cs +++ b/TEMUKJD/KJDForms/ShopForms/SubAccountListForm.Designer.cs @@ -50,11 +50,11 @@ this.label38 = new System.Windows.Forms.Label(); this.mobiletextBox = new System.Windows.Forms.TextBox(); this.label39 = new System.Windows.Forms.Label(); - this.nametextBox = new System.Windows.Forms.TextBox(); + this.txtNickName = new System.Windows.Forms.TextBox(); this.label40 = new System.Windows.Forms.Label(); this.dgvUser = new TemuKJD.UserComponent.DataGridViewEx(); this.UserIdColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.UserNameColumn = 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(); @@ -96,7 +96,7 @@ this.splitContainer5.Panel1.Controls.Add(this.label38); this.splitContainer5.Panel1.Controls.Add(this.mobiletextBox); this.splitContainer5.Panel1.Controls.Add(this.label39); - this.splitContainer5.Panel1.Controls.Add(this.nametextBox); + this.splitContainer5.Panel1.Controls.Add(this.txtNickName); this.splitContainer5.Panel1.Controls.Add(this.label40); // // splitContainer5.Panel2 @@ -304,22 +304,22 @@ this.label39.TabIndex = 20; this.label39.Text = "手机号:"; // - // nametextBox + // txtNickName // - this.nametextBox.Location = new System.Drawing.Point(112, 100); - this.nametextBox.Name = "nametextBox"; - this.nametextBox.Size = new System.Drawing.Size(148, 23); - this.nametextBox.TabIndex = 19; + this.txtNickName.Location = new System.Drawing.Point(112, 100); + 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(41, 101); + this.label40.Location = new System.Drawing.Point(55, 101); this.label40.Name = "label40"; - this.label40.Size = new System.Drawing.Size(65, 20); + this.label40.Size = new System.Drawing.Size(51, 20); this.label40.TabIndex = 18; - this.label40.Text = "账户名:"; + this.label40.Text = "昵称:"; // // dgvUser // @@ -341,7 +341,7 @@ this.dgvUser.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvUser.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.UserIdColumn, - this.UserNameColumn, + this.UserNickNameColumn, this.mobileColumn, this.groupIdColumn, this.groupNameColumn, @@ -373,15 +373,15 @@ this.UserIdColumn.ReadOnly = true; this.UserIdColumn.Visible = false; // - // UserNameColumn + // UserNickNameColumn // - this.UserNameColumn.HeaderText = "用户名"; - this.UserNameColumn.Name = "UserNameColumn"; - this.UserNameColumn.ReadOnly = true; + this.UserNickNameColumn.HeaderText = "用户昵称"; + this.UserNickNameColumn.Name = "UserNickNameColumn"; + this.UserNickNameColumn.ReadOnly = true; // // mobileColumn // - this.mobileColumn.HeaderText = "手机"; + this.mobileColumn.HeaderText = "手机(登录账号)"; this.mobileColumn.Name = "mobileColumn"; this.mobileColumn.ReadOnly = true; // @@ -403,6 +403,7 @@ this.shopCountColumn.HeaderText = "店铺数"; this.shopCountColumn.Name = "shopCountColumn"; this.shopCountColumn.ReadOnly = true; + this.shopCountColumn.Visible = false; // // editColumn // @@ -459,18 +460,18 @@ private System.Windows.Forms.Label label38; private System.Windows.Forms.TextBox mobiletextBox; private System.Windows.Forms.Label label39; - private System.Windows.Forms.TextBox nametextBox; + private System.Windows.Forms.TextBox txtNickName; private System.Windows.Forms.Label label40; private UserComponent.DataGridViewEx dgvUser; + private UserControls.ButtonEx btnRefresh; + private System.Windows.Forms.Label label1; private System.Windows.Forms.DataGridViewTextBoxColumn UserIdColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn UserNameColumn; + 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 shopCountColumn; private System.Windows.Forms.DataGridViewLinkColumn editColumn; private System.Windows.Forms.DataGridViewLinkColumn deleteColumn; - private UserControls.ButtonEx btnRefresh; - private System.Windows.Forms.Label label1; } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/ShopForms/SubAccountListForm.cs b/TEMUKJD/KJDForms/ShopForms/SubAccountListForm.cs index 9db8e0e..fea5a09 100644 --- a/TEMUKJD/KJDForms/ShopForms/SubAccountListForm.cs +++ b/TEMUKJD/KJDForms/ShopForms/SubAccountListForm.cs @@ -35,7 +35,7 @@ namespace TemuKJD.KJDForms.ShopForms BaseMsgForm.ShowInfo("密码最少6位", "提示"); return; } - if (string.IsNullOrEmpty(nametextBox.Text) || string.IsNullOrEmpty(mobiletextBox.Text) || + if (string.IsNullOrEmpty(txtNickName.Text) || string.IsNullOrEmpty(mobiletextBox.Text) || mobiletextBox.Text.Length != 11) { BaseMsgForm.ShowInfo("信息不正确", "提示"); @@ -44,9 +44,10 @@ namespace TemuKJD.KJDForms.ShopForms StringBuilder data = new StringBuilder(); data.Append(UserLogin.GetSignaturex()); - data.Append("&name=" + GetHtml.UrlEncodeUtf8(nametextBox.Text)); - data.Append("&sub_user_name=" + GetHtml.UrlEncodeUtf8(mobiletextBox.Text)); - data.Append("&sub_user_mobile=" + GetHtml.UrlEncodeUtf8(mobiletextBox.Text)); + data.Append("&sub_nick_name=" + GetHtml.UrlEncodeUtf8(txtNickName.Text)); + data.Append("&sub_name=" + GetHtml.UrlEncodeUtf8(mobiletextBox.Text)); + data.Append("&sub_mobile=" + GetHtml.UrlEncodeUtf8(mobiletextBox.Text)); + data.Append("&card_id="); if (groupIdcomboBox.Text == "客服") data.Append("&group_id=4"); else if (groupIdcomboBox.Text == "采购") @@ -63,12 +64,12 @@ namespace TemuKJD.KJDForms.ShopForms //if (groupIdcomboBox.Text == "登录") // data.Append("&group_id=8"); if (!string.IsNullOrEmpty(passwordtextBox.Text)) - data.Append("&password=" + Md5Base.GetMd5(passwordtextBox.Text).ToLower()); - string url = BaseClass.BuildObjString("user/add_user"); + data.Append("&sub_password=" + Md5Base.GetMd5(passwordtextBox.Text).ToLower()); + string url = BaseClass.BuildObjString("user/add_sub_user"); if (btnOpUser.Text != "添加用户" && !string.IsNullOrEmpty(Uid)) { data.Append("&id=" + Uid); - url = BaseClass.BuildObjString("user&act=update"); + url = BaseClass.BuildObjString("user/update_sub_user"); } string html = GetHtml.PostUtf8(url, data.ToString()).Trim(); @@ -98,7 +99,7 @@ namespace TemuKJD.KJDForms.ShopForms private void EmptyInput() { - nametextBox.Clear(); + txtNickName.Clear(); passwordtextBox.Clear(); repasstextBox.Clear(); mobiletextBox.Clear(); @@ -108,7 +109,7 @@ namespace TemuKJD.KJDForms.ShopForms { dgvUser.Rows.Clear(); AllUsers.Clear(); - string url = BaseClass.BuildObjString("user&act=get"); + string url = BaseClass.BuildObjString("user/get_sub_user"); string data = UserLogin.GetSignaturex(); string html = GetHtml.PostUtf8(url, data); if (string.IsNullOrEmpty(html)) @@ -121,13 +122,14 @@ namespace TemuKJD.KJDForms.ShopForms string oStr = JsonHelper.SerializeObject(obj); DouShopSubAccountInfo user = new DouShopSubAccountInfo(); user.id = BaseRegex.GetIntJson(ref oStr, "id"); - user.name = BaseRegex.GetStringJson(ref oStr, "name"); + 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"); AllUsers.Add(user); - dgvUser.Rows.Add(user.id, user.name, user.mobile, user.group_id, user.group_name, user.shop_count, "编辑", "删除"); + dgvUser.Rows.Add(user.id, user.nick_name, user.user_name, user.group_id, user.group_name, user.shop_count, "编辑", "删除"); } } } @@ -146,13 +148,13 @@ namespace TemuKJD.KJDForms.ShopForms return; string columname = dgvUser.Columns[e.ColumnIndex].HeaderText; string uid = dgvUser.Rows[e.RowIndex].Cells["UseridColumn"].Value.ToString(); - string name = dgvUser.Rows[e.RowIndex].Cells["UserNameColumn"].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(); if (columname == "编辑") { Uid = uid; - nametextBox.Text = name; + txtNickName.Text = nickName; mobiletextBox.Text = mobile; groupIdcomboBox.Text = groupName; passwordtextBox.Text = ""; @@ -174,7 +176,7 @@ namespace TemuKJD.KJDForms.ShopForms StringBuilder data = new StringBuilder(); data.Append(UserLogin.GetSignaturex()); data.Append("&id=" + uid); - string url = BaseClass.BuildObjString("user&act=delete"); + string url = BaseClass.BuildObjString("user/delete_user"); string html = GetHtml.PostUtf8(url, data.ToString()); if (!string.IsNullOrEmpty(html)) { @@ -195,10 +197,16 @@ namespace TemuKJD.KJDForms.ShopForms private void SubAccountForm_Load(object sender, EventArgs e) { + this.groupIdcomboBox.Enabled = false; this.groupIdcomboBox.Items.Clear(); //this.groupIdcomboBox.Items.Add("上货"); - this.groupIdcomboBox.Items.Add("采购"); + //this.groupIdcomboBox.Items.Add("采购"); this.groupIdcomboBox.Items.Add("客服"); + //if (BaseClass.UserName == "18888888888") + //{ + // this.groupIdcomboBox.Items.Add("主管"); + // this.groupIdcomboBox.Enabled = true; + //} this.dgvUser.BackgroundColor = Color.White; GetUser(); } diff --git a/TEMUKJD/KJDForms/ShopForms/SubAccountListForm.resx b/TEMUKJD/KJDForms/ShopForms/SubAccountListForm.resx index ad1ec8b..8daa718 100644 --- a/TEMUKJD/KJDForms/ShopForms/SubAccountListForm.resx +++ b/TEMUKJD/KJDForms/ShopForms/SubAccountListForm.resx @@ -120,7 +120,7 @@ True - + True diff --git a/TEMUKJD/KJDForms/ShopForms/SubAccountShopEditForm.cs b/TEMUKJD/KJDForms/ShopForms/SubAccountShopEditForm.cs index dca1db6..7b451e6 100644 --- a/TEMUKJD/KJDForms/ShopForms/SubAccountShopEditForm.cs +++ b/TEMUKJD/KJDForms/ShopForms/SubAccountShopEditForm.cs @@ -40,7 +40,7 @@ namespace TemuKJD.KJDForms.ShopForms flpNotSubAccount.Controls.Clear(); flpShopSubAccount.Controls.Clear(); AllSubAccountList.Clear(); - string url = BaseClass.BuildObjString("user&act=get"); + string url = BaseClass.BuildObjString("user/get_sub_user"); string data = UserLogin.GetSignaturex(); string html = GetHtml.PostUtf8(url, data); if (string.IsNullOrEmpty(html)) @@ -53,7 +53,8 @@ namespace TemuKJD.KJDForms.ShopForms string oStr = JsonHelper.SerializeObject(obj); DouShopSubAccountInfo user = new DouShopSubAccountInfo(); user.id = BaseRegex.GetIntJson(ref oStr, "id"); - user.name = BaseRegex.GetStringJson(ref oStr, "name"); + user.nick_name = BaseRegex.GetStringJson(ref oStr, "nick_name"); + user.user_name = BaseRegex.GetStringJson(ref oStr, "user_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"); @@ -63,7 +64,10 @@ namespace TemuKJD.KJDForms.ShopForms if (shop != null) { - ShopSubAccountList.AddRange(shop.ShopSubAccountList); + ShopSubAccountList.Clear(); + ShopSubAccountList.AddRange(AllSubAccountList.Where(u=>shop.SubUserName==u.sub_user_name)); + shop.ShopSubAccountList.Clear(); + shop.ShopSubAccountList.AddRange(ShopSubAccountList); NotShopSubAccountList.AddRange(AllSubAccountList.Where(u => !ShopSubAccountList.Any(bu => bu.id == u.id))); foreach (var item in ShopSubAccountList) { @@ -88,6 +92,13 @@ namespace TemuKJD.KJDForms.ShopForms var s = obj as UcSubAccount; if (s != null) { + if (this.flpShopSubAccount.Controls.Count > 0) + { + BaseMsgForm.ShowInfo("只能有一个子账户!"); + s.lblRight_Click(null, null); + return; + } + this.flpNotSubAccount.Controls.Remove(s); this.flpShopSubAccount.Controls.Add(s); } @@ -135,13 +146,14 @@ namespace TemuKJD.KJDForms.ShopForms { DeleteUsers.Add(co.subAccount); shop.ShopSubAccountList.Remove(co.subAccount); - string url = BaseClass.BuildObjString("shop&act=delete_shop_user_sub_group"); - string data = UserLogin.GetSignaturex() - + "&shop_id=" + shop.ShopId - + "&sub_user_id=" + co.subAccount.sub_user_id - + "&status=" + co.subAccount.status - + "&group_id=" + co.subAccount.group_id; - string html = GetHtml.PostUtf8(url, data); + //string url = BaseClass.BuildObjString("shop&act=delete_shop_user_sub_group"); + //string data = UserLogin.GetSignaturex() + // + "&shop_id=" + shop.ShopId + // + "&sub_user_id=" + co.subAccount.sub_user_id + // + "&sub_user_name=" + co.subAccount.sub_user_name + // + "&status=" + co.subAccount.status + // + "&group_id=" + co.subAccount.group_id; + //string html = GetHtml.PostUtf8(url, data); } } foreach (Control c in this.flpShopSubAccount.Controls) @@ -154,15 +166,26 @@ namespace TemuKJD.KJDForms.ShopForms { AddUsers.Add(co.subAccount); shop.ShopSubAccountList.Add(co.subAccount); - string url = BaseClass.BuildObjString("shop&act=update_shop_user_sub_group"); - string data = UserLogin.GetSignaturex() - + "&shop_id=" + shop.ShopId - + "&sub_user_id=" + co.subAccount.sub_user_id - + "&status=" + co.subAccount.status - + "&group_id=" + co.subAccount.group_id; - string html = GetHtml.PostUtf8(url, data); + //string url = BaseClass.BuildObjString("shop&act=update_shop_user_sub_group"); + //string data = UserLogin.GetSignaturex() + // + "&shop_id=" + shop.ShopId + // + "&sub_user_id=" + co.subAccount.sub_user_id + // + "&sub_user_name=" + co.subAccount.sub_user_name + // + "&status=" + co.subAccount.status + // + "&group_id=" + co.subAccount.group_id; + //string html = GetHtml.PostUtf8(url, data); } } + + shop.SubUserName = shop.ShopSubAccountList.FirstOrDefault()?.sub_user_name; + var shopLst = AllBase.Helper.GlobalConfig.ShopLoginList.Where(s => s.LoginName == shop.LoginName && s.ShopId!= shop.ShopId); + foreach(var s in shopLst) + { + s.SubUserName = shop.SubUserName; + s.ShopSubAccountList.Clear(); + shop.ShopSubAccountList.AddRange(s.ShopSubAccountList); + } + OnSaveComplete(shop); this.Close(); } diff --git a/TEMUKJD/KJDForms/ShopForms/UcSubAccount.cs b/TEMUKJD/KJDForms/ShopForms/UcSubAccount.cs index 12ede71..aff9a61 100644 --- a/TEMUKJD/KJDForms/ShopForms/UcSubAccount.cs +++ b/TEMUKJD/KJDForms/ShopForms/UcSubAccount.cs @@ -44,7 +44,7 @@ namespace TemuKJD.KJDForms.ShopForms private void UcSubAccount_Load(object sender, EventArgs e) { - this.lblSubAccountName.Text = subAccount.name; + this.lblSubAccountName.Text = subAccount.user_name; this.lblSubAccountGroupName.Text = subAccount.group_name; this.lblSubAccountName.Resize += Lbl_Resize; this.lblSubAccountGroupName.Resize += Lbl_Resize; @@ -55,14 +55,14 @@ namespace TemuKJD.KJDForms.ShopForms { } - private void lblLeft_Click(object sender, EventArgs e) + public void lblLeft_Click(object sender, EventArgs e) { this.lblRight.Visible = true; this.lblLeft.Visible = false; AddSubAcountEvent?.Invoke(this); } - private void lblRight_Click(object sender, EventArgs e) + public void lblRight_Click(object sender, EventArgs e) { this.lblRight.Visible = false; this.lblLeft.Visible = true; diff --git a/TEMUKJD/KJDForms/SystemForms/SystemRemoveRestrictionsForm.Designer.cs b/TEMUKJD/KJDForms/SystemForms/SystemRemoveRestrictionsForm.Designer.cs index 9c498cb..c11f436 100644 --- a/TEMUKJD/KJDForms/SystemForms/SystemRemoveRestrictionsForm.Designer.cs +++ b/TEMUKJD/KJDForms/SystemForms/SystemRemoveRestrictionsForm.Designer.cs @@ -65,6 +65,7 @@ this.label6.Size = new System.Drawing.Size(52, 16); this.label6.TabIndex = 126; this.label6.Text = "设置代理"; + this.label6.Visible = false; this.label6.Click += new System.EventHandler(this.pbAgentIp_Click); // // label7 @@ -78,6 +79,7 @@ this.label7.Size = new System.Drawing.Size(78, 20); this.label7.TabIndex = 125; this.label7.Text = "设置代理IP"; + this.label7.Visible = false; this.label7.Click += new System.EventHandler(this.pbAgentIp_Click); // // label5 @@ -91,6 +93,7 @@ this.label5.Size = new System.Drawing.Size(52, 16); this.label5.TabIndex = 123; this.label5.Text = "进入管理"; + this.label5.Visible = false; this.label5.Click += new System.EventHandler(this.pbManageToken_Click); // // label4 @@ -131,6 +134,7 @@ this.label2.Size = new System.Drawing.Size(52, 16); this.label2.TabIndex = 120; this.label2.Text = "点击登录"; + this.label2.Visible = false; this.label2.Click += new System.EventHandler(this.pbLogin1688_Click); // // label13 @@ -144,6 +148,7 @@ this.label13.Size = new System.Drawing.Size(52, 16); this.label13.TabIndex = 119; this.label13.Text = "点击登录"; + this.label13.Visible = false; this.label13.Click += new System.EventHandler(this.pbLoginTaobao_Click); // // lbManageToken @@ -157,6 +162,7 @@ this.lbManageToken.Size = new System.Drawing.Size(79, 20); this.lbManageToken.TabIndex = 118; this.lbManageToken.Text = "Token管理"; + this.lbManageToken.Visible = false; this.lbManageToken.Click += new System.EventHandler(this.pbManageToken_Click); // // lbLogin1688 @@ -170,6 +176,7 @@ this.lbLogin1688.Size = new System.Drawing.Size(69, 20); this.lbLogin1688.TabIndex = 116; this.lbLogin1688.Text = "登录1688"; + this.lbLogin1688.Visible = false; this.lbLogin1688.Click += new System.EventHandler(this.pbLogin1688_Click); // // lbLoginPdd @@ -210,6 +217,7 @@ this.lbLoginTaobao.Size = new System.Drawing.Size(65, 20); this.lbLoginTaobao.TabIndex = 110; this.lbLoginTaobao.Text = "登录淘宝"; + this.lbLoginTaobao.Visible = false; this.lbLoginTaobao.Click += new System.EventHandler(this.pbLoginTaobao_Click); // // pbAgentIp @@ -222,6 +230,7 @@ this.pbAgentIp.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pbAgentIp.TabIndex = 124; this.pbAgentIp.TabStop = false; + this.pbAgentIp.Visible = false; this.pbAgentIp.Click += new System.EventHandler(this.pbAgentIp_Click); // // pbManageToken @@ -234,6 +243,7 @@ this.pbManageToken.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pbManageToken.TabIndex = 117; this.pbManageToken.TabStop = false; + this.pbManageToken.Visible = false; this.pbManageToken.Click += new System.EventHandler(this.pbManageToken_Click); // // pbLogin1688 @@ -246,6 +256,7 @@ this.pbLogin1688.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pbLogin1688.TabIndex = 115; this.pbLogin1688.TabStop = false; + this.pbLogin1688.Visible = false; this.pbLogin1688.Click += new System.EventHandler(this.pbLogin1688_Click); // // pbLoginPdd @@ -284,6 +295,7 @@ this.pbLoginTaobao.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; this.pbLoginTaobao.TabIndex = 109; this.pbLoginTaobao.TabStop = false; + this.pbLoginTaobao.Visible = false; this.pbLoginTaobao.Click += new System.EventHandler(this.pbLoginTaobao_Click); // // SystemRemoveRestrictionsForm diff --git a/TEMUKJD/KJDForms/ToolForms/KeywordsForms/KeywordsCatchFrom.cs b/TEMUKJD/KJDForms/ToolForms/KeywordsForms/KeywordsCatchFrom.cs index 2fee37e..be2e452 100644 --- a/TEMUKJD/KJDForms/ToolForms/KeywordsForms/KeywordsCatchFrom.cs +++ b/TEMUKJD/KJDForms/ToolForms/KeywordsForms/KeywordsCatchFrom.cs @@ -3,7 +3,7 @@ using CefSharp; using CefSharp.WinForms; using TemuKJD.Helper; using TemuKJD.KJDForms.BaseForms; -using TemuKJD.KJDForms.UploadForms; +using TemuKJD.KJDForms.ProductForms; using NaiBa.CefHelper.Handler; using System; using System.Collections.Generic; diff --git a/TEMUKJD/MainForm.cs b/TEMUKJD/MainForm.cs index 99cf5bd..a40b2f5 100644 --- a/TEMUKJD/MainForm.cs +++ b/TEMUKJD/MainForm.cs @@ -19,7 +19,7 @@ using System.Reflection; using System.Net; using System.Collections; using TemuKJD.KJDForms.ShopForms; -using TemuKJD.KJDForms.UploadForms; +using TemuKJD.KJDForms.ProductForms; using TemuKJD.KJDForms.OrderForms; using TemuKJD.KJDForms.SystemForms; using Work.CollectClass; @@ -617,12 +617,12 @@ namespace TemuKJD ShowMainPanel(shopForm, sender as Panel); } - private UploadForm uploadForm; + private ProductForm uploadForm; public void pnlUpload_Click(object sender, EventArgs e) { if (uploadForm == null) { - uploadForm = new UploadForm(); + uploadForm = new ProductForm(); } ShowMainPanel(uploadForm, sender as Panel); } diff --git a/TEMUKJD/MainForm.designer.cs b/TEMUKJD/MainForm.designer.cs index 2bd95ec..93867b0 100644 --- a/TEMUKJD/MainForm.designer.cs +++ b/TEMUKJD/MainForm.designer.cs @@ -211,6 +211,7 @@ namespace TemuKJD this.pnlMarket.StyleMouseOver.MarginTop = 63; this.pnlMarket.TabIndex = 3; this.pnlMarket.Text = "营销中心"; + this.pnlMarket.Visible = false; this.pnlMarket.Click += new System.EventHandler(this.pnlMarket_Click); // // pnlCollect diff --git a/TEMUKJD/Properties/AssemblyInfo.cs b/TEMUKJD/Properties/AssemblyInfo.cs index ec63d50..0545e6b 100644 --- a/TEMUKJD/Properties/AssemblyInfo.cs +++ b/TEMUKJD/Properties/AssemblyInfo.cs @@ -5,12 +5,12 @@ using System.Runtime.InteropServices; // 有关程序集的一般信息由以下 // 控制。更改这些特性值可修改 // 与程序集关联的信息。 -[assembly: AssemblyTitle("抖音店群管理软件")] -[assembly: AssemblyDescription("DyQunkong")] +[assembly: AssemblyTitle("Temu跨境达管理软件")] +[assembly: AssemblyDescription("TemuKJD")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("DyQunkong")] -[assembly: AssemblyCopyright("Copyright © DyQunkong 2021")] +[assembly: AssemblyProduct("TemuKJD")] +[assembly: AssemblyCopyright("Copyright © TemuKJD 2025")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/TEMUKJD/StartUp.cs b/TEMUKJD/StartUp.cs index decd0f2..58da27b 100644 --- a/TEMUKJD/StartUp.cs +++ b/TEMUKJD/StartUp.cs @@ -6,7 +6,7 @@ using AllBase.Model.Param.ProductManage; using AllBase.Model.Param.ShopManage; using AllBase.Model.Result; using TemuKJD.KJDForms.BaseForms; -using TemuKJD.KJDForms.UploadForms; +using TemuKJD.KJDForms.ProductForms; using NaiBa.Util; using NaiBa.Util.Extension; using System; @@ -96,6 +96,7 @@ namespace TemuKJD localShop.Password = serverShop.Password; localShop.Cookies = serverShop.Cookies; localShop.DbId = serverShop.DbId; + localShop.SubUserName = serverShop.SubUserName; localShop.ApiAuthInfoList = new List(); localShop.ApiAuthInfoList.AddRange(serverShop.ApiAuthInfoList); localShop.BuyApiAuth.AccessToken = serverShop.BuyApiAuth.AccessToken; diff --git a/TEMUKJD/UserForm/LoginForm.Designer.cs b/TEMUKJD/UserForm/LoginForm.Designer.cs index 95cf105..7265582 100644 --- a/TEMUKJD/UserForm/LoginForm.Designer.cs +++ b/TEMUKJD/UserForm/LoginForm.Designer.cs @@ -33,7 +33,7 @@ this.txtMobile = new DevComponents.DotNetBar.Controls.TextBoxX(); this.password = new DevComponents.DotNetBar.Controls.TextBoxX(); this.lblResetPassword = new DevComponents.DotNetBar.LabelX(); - this.remember = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.chkRemember = new DevComponents.DotNetBar.Controls.CheckBoxX(); this.autoLogin = new DevComponents.DotNetBar.Controls.CheckBoxX(); this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); this.closePanel = new DevComponents.DotNetBar.PanelEx(); @@ -133,24 +133,25 @@ this.lblResetPassword.Size = new System.Drawing.Size(56, 20); this.lblResetPassword.TabIndex = 6; this.lblResetPassword.Text = "找回密码"; + this.lblResetPassword.Visible = false; this.lblResetPassword.Click += new System.EventHandler(this.lblResetPassword_Click); // - // remember + // chkRemember // // // // - this.remember.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.remember.FocusCuesEnabled = false; - this.remember.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.remember.Location = new System.Drawing.Point(134, 215); - this.remember.Name = "remember"; - this.remember.Size = new System.Drawing.Size(80, 22); - this.remember.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.remember.TabIndex = 7; - this.remember.Text = "记住密码"; - this.remember.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(101)))), ((int)(((byte)(101))))); - this.remember.CheckedChanged += new System.EventHandler(this.remember_CheckedChanged); + this.chkRemember.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.chkRemember.FocusCuesEnabled = false; + this.chkRemember.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.chkRemember.Location = new System.Drawing.Point(134, 215); + this.chkRemember.Name = "chkRemember"; + this.chkRemember.Size = new System.Drawing.Size(80, 22); + this.chkRemember.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.chkRemember.TabIndex = 7; + this.chkRemember.Text = "记住密码"; + this.chkRemember.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(101)))), ((int)(((byte)(101)))), ((int)(((byte)(101))))); + this.chkRemember.CheckedChanged += new System.EventHandler(this.remember_CheckedChanged); // // autoLogin // @@ -383,7 +384,7 @@ this.Controls.Add(this.panelEx2); this.Controls.Add(this.panelEx1); this.Controls.Add(this.autoLogin); - this.Controls.Add(this.remember); + this.Controls.Add(this.chkRemember); this.Controls.Add(this.lblResetPassword); this.Controls.Add(this.loginPanel); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; @@ -407,7 +408,7 @@ private DevComponents.DotNetBar.Controls.TextBoxX txtMobile; private DevComponents.DotNetBar.Controls.TextBoxX password; private DevComponents.DotNetBar.LabelX lblResetPassword; - private DevComponents.DotNetBar.Controls.CheckBoxX remember; + private DevComponents.DotNetBar.Controls.CheckBoxX chkRemember; private DevComponents.DotNetBar.Controls.CheckBoxX autoLogin; private DevComponents.DotNetBar.PanelEx panelEx1; private DevComponents.DotNetBar.PanelEx panelEx2; diff --git a/TEMUKJD/UserForm/LoginForm.cs b/TEMUKJD/UserForm/LoginForm.cs index 8a7bbd7..ceed620 100644 --- a/TEMUKJD/UserForm/LoginForm.cs +++ b/TEMUKJD/UserForm/LoginForm.cs @@ -86,7 +86,7 @@ namespace TemuKJD.UserForm txtMobile.Text = BaseClass.UserName; if (BaseClass.Remember) { - remember.Checked = true; + chkRemember.Checked = true; if (!string.IsNullOrEmpty(BaseClass.PassWord)) password.Text = "******"; } @@ -103,6 +103,7 @@ namespace TemuKJD.UserForm lblContactSupport.Visible = false; else lblContactSupport.Visible = true; + lblContactSupport.Visible = false; } private void lblSignUp_Click(object sender, EventArgs e) @@ -121,22 +122,22 @@ namespace TemuKJD.UserForm private void remember_CheckedChanged(object sender, EventArgs e) { - BaseClass.Remember = remember.Checked; + BaseClass.Remember = chkRemember.Checked; } private void autoLogin_CheckedChanged(object sender, EventArgs e) { BaseClass.AutoLogin = autoLogin.Checked; if (autoLogin.Checked) - remember.Checked = true; + chkRemember.Checked = true; } private void loginPanel_Click(object sender, EventArgs e) { - //if (rbtDev.Checked) - // BaseClass.LoginApiUrl = "http://192.168.8.191:9090/"; - //else - // BaseClass.LoginApiUrl = "http://new.qixiaoke.com/"; + if (rbtDev.Checked) + BaseClass.LoginApiUrl = "http://localhost:9000"; + else + BaseClass.LoginApiUrl = BaseClass.ServerUrl; //"http://localhost:8000/user/user_login" UserLogin ul = new UserLogin(); diff --git a/TEMUKJD/UserForm/LoginForm.resx b/TEMUKJD/UserForm/LoginForm.resx index 9aae545..4da5264 100644 --- a/TEMUKJD/UserForm/LoginForm.resx +++ b/TEMUKJD/UserForm/LoginForm.resx @@ -1,17 +1,17 @@  -