diff --git a/AllBase/BaseClass.cs b/AllBase/BaseClass.cs index b58878e..04b2e3f 100644 --- a/AllBase/BaseClass.cs +++ b/AllBase/BaseClass.cs @@ -27,7 +27,7 @@ namespace AllBase /// /// 版本ID /// - public static int VersionCount = 658; + public static int VersionCount = 661; //public static int VersionCount = 613; /// diff --git a/AllBase/Model/Result/TemuResult/AiSkuImgInfo.cs b/AllBase/Model/Result/TemuResult/AiSkuImgInfo.cs index 46ccee6..f3cc85b 100644 --- a/AllBase/Model/Result/TemuResult/AiSkuImgInfo.cs +++ b/AllBase/Model/Result/TemuResult/AiSkuImgInfo.cs @@ -20,6 +20,9 @@ namespace AllBase.Model.Result.TemuResult public DateTime mdy_time { get; set; } public DateTime base64_mdy_time { get; set; } public string img_base64 { get; set; } + /// + /// 图片使用次数(上传1个商品使用n次算1次) + /// public int use_count { get; set; } /// diff --git a/KJDService/KJD_WebService/BLL/KJD/ProductManage.cs b/KJDService/KJD_WebService/BLL/KJD/ProductManage.cs index fa43695..7d350af 100644 --- a/KJDService/KJD_WebService/BLL/KJD/ProductManage.cs +++ b/KJDService/KJD_WebService/BLL/KJD/ProductManage.cs @@ -1015,7 +1015,7 @@ namespace KJD_Web.BLL } else { - sql = "select s.*,b.img_md5,b.img_base64,b.img_url,b.mdy_time base64_mdy_time from kjd.sku_img s left join kjd.sku_img_base64 b on " + + sql = "select s.*,b.img_md5,b.use_count,b.img_base64,b.img_url,b.mdy_time base64_mdy_time from kjd.sku_img s left join kjd.sku_img_base64 b on " + "s.img_base64_db_id = b.id where 1=1"; //where子句 @@ -1052,6 +1052,7 @@ namespace KJD_Web.BLL product_id = row["product_id"].ParseToString(), spec_id = row["spec_id"].ParseToString(), spec_name = row["spec_name"].ParseToString(), + use_count = row["use_count"].ParseToInt(), }; if(img.base64_mdy_time.AddDays(2) < DateTime.Now) { diff --git a/KJDService/KJD_WebService/Model/SkuImgResult.cs b/KJDService/KJD_WebService/Model/SkuImgResult.cs index 212b922..15a8f82 100644 --- a/KJDService/KJD_WebService/Model/SkuImgResult.cs +++ b/KJDService/KJD_WebService/Model/SkuImgResult.cs @@ -19,5 +19,6 @@ namespace KJD_Web.Model public DateTime mdy_time { get; set; } public DateTime base64_mdy_time { get; set; } public string img_base64 { get; set; } + public int use_count { get; set; } } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/AdminForms/AdminShopLoginForm.Designer.cs b/TEMUKJD/KJDForms/AdminForms/AdminShopLoginForm.Designer.cs index 810f6b5..cc36ce7 100644 --- a/TEMUKJD/KJDForms/AdminForms/AdminShopLoginForm.Designer.cs +++ b/TEMUKJD/KJDForms/AdminForms/AdminShopLoginForm.Designer.cs @@ -83,7 +83,7 @@ this.splitContainer1.Panel2.Controls.Add(this.btnReload); this.splitContainer1.Panel2.Controls.Add(this.chkCloseAfterLogin); this.splitContainer1.Size = new System.Drawing.Size(1438, 736); - this.splitContainer1.SplitterDistance = 673; + this.splitContainer1.SplitterDistance = 674; this.splitContainer1.SplitterWidth = 3; this.splitContainer1.TabIndex = 4; // @@ -345,6 +345,7 @@ this.txtAddress.Name = "txtAddress"; this.txtAddress.Size = new System.Drawing.Size(1432, 23); this.txtAddress.TabIndex = 7; + this.txtAddress.TextChanged += new System.EventHandler(this.txtAddress_TextChanged); this.txtAddress.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtAddress_KeyDown); // // AdminShopLoginForm diff --git a/TEMUKJD/KJDForms/AdminForms/AdminShopLoginForm.cs b/TEMUKJD/KJDForms/AdminForms/AdminShopLoginForm.cs index cfabb23..e821312 100644 --- a/TEMUKJD/KJDForms/AdminForms/AdminShopLoginForm.cs +++ b/TEMUKJD/KJDForms/AdminForms/AdminShopLoginForm.cs @@ -282,11 +282,22 @@ namespace TemuKJD.KJDForms.AdminForms OnSaveComplete(shop); if (this.Created && this.chkCloseAfterLogin.Checked) { - Invoke(new Action(() => { this.Close(); })); + //Invoke(new Action(() => { this.Close(); })); } else break; } + + var obtainCodeRst = ShopListForm.GetObtainCode(shop); + var obtainCode = BaseRegex.GetStringJson(ref obtainCodeRst, "code"); + //https://ads.temu.com/login.html? + //redirectUrl=https%3A%2F%2Fads.temu.com%2Findex.html%3FadAreaOverride%3D2&userType=1&mallType=0 + //&ticket=Zjze2NHyZFaGP88ROyjN19a47ae59611391a296ae6403bbbfa39e9046ceba744aafe8227fd6 + //&adSellerUniqueId=eyJ1IjoiTVF3NFRGVmN2ZUVyZG1USDdOQ2o5dz09IiwidiI6MX0%3D&source=2&seller_source=11&adAreaOverride=2 + string url = "https://ads.temu.com/login.html?" + + "redirectUrl=https%3A%2F%2Fads.temu.com%2Findex.html%3FadAreaOverride%3D2&userType=1&mallType=0&ticket=" + obtainCode + + "&source=2&seller_source=11&adAreaOverride=2"; + cefWebBrowser.Load(url); } } }); @@ -683,7 +694,20 @@ namespace TemuKJD.KJDForms.AdminForms /// private void InputUserNameAndPassword(ChromiumWebBrowser webBrowser, string _account, string _password) { - string jsStr1 = "function getInputItem () {var usernameId = document.getElementById('usernameId'); if (usernameId) return 'true';} getInputItem();"; + webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sInputValueChange2); + webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sGetElementWithText); + + //扫码登录切换到账号登录 + var switchJsStr = "var clickItem = getElementWithText('账号登录'); " + + "clickItem.click()"; + var switchResponse = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(switchJsStr); + switchResponse.Wait(1000); + Thread.Sleep(Randomx.GetId(300, 800)); + + //检查是否有登录框 + 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")) { @@ -698,27 +722,28 @@ namespace TemuKJD.KJDForms.AdminForms return; } - webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sInputValueChange2); - webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sGetElementWithText); - + //输入用户名 jsStr1 = "var usernameId = document.getElementById('usernameId'); " + "changeReactInputValue(usernameId,'" + _account + "');"; response1 = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr1); response1.Wait(1000); Thread.Sleep(Randomx.GetId(500, 1000)); + //输入密码 string jsStr = "var passwordId = document.getElementById('passwordId'); "+ "changeReactInputValue(passwordId,'" + _password + "');"; var response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr); response.Wait(1000); Thread.Sleep(Randomx.GetId(500, 1000)); + //点击阅读并同意框 jsStr = "var clickBox = getElementWithText('我已阅读并同意'); " + "clickBox.click()"; response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr); response.Wait(1000); Thread.Sleep(Randomx.GetId(500, 1000)); + //点击登录 jsStr = "var clickBox = getElementWithText('登录'); " + "clickBox.click()"; response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr); @@ -928,5 +953,10 @@ function getElementWithText(sText) ReturnPackageDetailForm form = new ReturnPackageDetailForm(this.shop); form.ShowDialog(); } + + private void txtAddress_TextChanged(object sender, EventArgs e) + { + var address = txtAddress.Text; + } } } diff --git a/TEMUKJD/KJDForms/ProductForms/PriceManageForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/PriceManageForm.Designer.cs index df11bae..e23ce8c 100644 --- a/TEMUKJD/KJDForms/ProductForms/PriceManageForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/PriceManageForm.Designer.cs @@ -47,19 +47,7 @@ namespace TemuKJD.KJDForms.ProductForms 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.colShopNotes = 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(); @@ -77,6 +65,18 @@ namespace TemuKJD.KJDForms.ProductForms this.colChangeType = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colChangeReason = 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(); + 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.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -344,68 +344,6 @@ namespace TemuKJD.KJDForms.ProductForms this.dgvShop.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellClick); this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick); // - // colSelect - // - this.colSelect.HeaderText = "全选"; - this.colSelect.Name = "colSelect"; - this.colSelect.ReadOnly = true; - this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.colSelect.Width = 28; - // - // colShopLoginName - // - this.colShopLoginName.HeaderText = "店铺登录名"; - this.colShopLoginName.Name = "colShopLoginName"; - this.colShopLoginName.ReadOnly = true; - this.colShopLoginName.Visible = false; - // - // colShopId - // - this.colShopId.HeaderText = "店铺Id"; - this.colShopId.Name = "colShopId"; - this.colShopId.ReadOnly = true; - this.colShopId.Visible = false; - this.colShopId.Width = 55; - // - // colShopName - // - this.colShopName.HeaderText = "店铺名称"; - this.colShopName.Name = "colShopName"; - this.colShopName.ReadOnly = true; - this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colShopName.Width = 70; - // - // colShopNotes - // - this.colShopNotes.HeaderText = "分组"; - this.colShopNotes.Name = "colShopNotes"; - this.colShopNotes.ReadOnly = true; - this.colShopNotes.Width = 70; - // - // colLoginStatus - // - this.colLoginStatus.HeaderText = "状态"; - this.colLoginStatus.Name = "colLoginStatus"; - this.colLoginStatus.ReadOnly = true; - this.colLoginStatus.Width = 38; - // - // colCanUse - // - this.colCanUse.HeaderText = "可用"; - this.colCanUse.Name = "colCanUse"; - this.colCanUse.ReadOnly = true; - this.colCanUse.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colCanUse.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.colCanUse.Visible = false; - this.colCanUse.Width = 28; - // - // colMessage - // - this.colMessage.HeaderText = "消息"; - this.colMessage.Name = "colMessage"; - this.colMessage.ReadOnly = true; - // // dgvAdjust // this.dgvAdjust.AllowUserToAddRows = false; @@ -451,86 +389,6 @@ namespace TemuKJD.KJDForms.ProductForms this.dgvAdjust.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvStock_CellContentClick); this.dgvAdjust.Scroll += new System.Windows.Forms.ScrollEventHandler(this.dgvAdjust_Scroll); // - // 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 = "选择"; @@ -659,6 +517,150 @@ namespace TemuKJD.KJDForms.ProductForms this.colMsg.ReadOnly = true; this.colMsg.Width = 400; // + // 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; + // + // 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.HeaderText = "店铺名称"; + this.colShopName.Name = "colShopName"; + this.colShopName.ReadOnly = true; + this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colShopName.Width = 70; + // + // colShopNotes + // + this.colShopNotes.HeaderText = "分组"; + this.colShopNotes.Name = "colShopNotes"; + this.colShopNotes.ReadOnly = true; + this.colShopNotes.Width = 70; + // + // colLoginStatus + // + this.colLoginStatus.HeaderText = "状态"; + this.colLoginStatus.Name = "colLoginStatus"; + this.colLoginStatus.ReadOnly = true; + this.colLoginStatus.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colLoginStatus.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colLoginStatus.Width = 38; + // + // colCanUse + // + this.colCanUse.HeaderText = "可用"; + this.colCanUse.Name = "colCanUse"; + this.colCanUse.ReadOnly = true; + this.colCanUse.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colCanUse.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colCanUse.Visible = false; + this.colCanUse.Width = 28; + // + // colMessage + // + this.colMessage.HeaderText = "消息"; + this.colMessage.Name = "colMessage"; + this.colMessage.ReadOnly = true; + // // PriceManageForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -717,14 +719,6 @@ namespace TemuKJD.KJDForms.ProductForms 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 colShopNotes; - 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; @@ -742,5 +736,13 @@ namespace TemuKJD.KJDForms.ProductForms private System.Windows.Forms.DataGridViewTextBoxColumn colChangeType; private System.Windows.Forms.DataGridViewTextBoxColumn colChangeReason; private System.Windows.Forms.DataGridViewTextBoxColumn colMsg; + 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 colShopNotes; + private System.Windows.Forms.DataGridViewLinkColumn colLoginStatus; + private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse; + private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/ProductForms/PriceManageForm.cs b/TEMUKJD/KJDForms/ProductForms/PriceManageForm.cs index a460290..8783350 100644 --- a/TEMUKJD/KJDForms/ProductForms/PriceManageForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/PriceManageForm.cs @@ -115,7 +115,11 @@ namespace TemuKJD.KJDForms.ProductForms string.Empty ); row = dgvShop.Rows[id]; - row.Cells["colLoginStatus"].Style.ForeColor = canUse ? Color.Green : Color.Red; + //row.Cells["colLoginStatus"].Style.ForeColor = canUse ? Color.Green : Color.Red; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Green : Color.Red; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).LinkColor = canUse ? Color.Green : Color.Red; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).ActiveLinkColor = canUse ? Color.LightGreen : Color.OrangeRed; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).VisitedLinkColor = canUse ? Color.DarkGreen : Color.DarkRed; } else { @@ -124,7 +128,11 @@ namespace TemuKJD.KJDForms.ProductForms row.Cells["colShopName"].Value = shopEntity.ShopAccount; row.Cells["colShopNotes"].Value = shopEntity.Notes; row.Cells["colLoginStatus"].Value = canUse ? "在线" : "掉线"; - row.Cells["colLoginStatus"].Style.ForeColor = canUse ? Color.Green : Color.Red; + //row.Cells["colLoginStatus"].Style.ForeColor = canUse ? Color.Green : Color.Red; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Green : Color.Red; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).LinkColor = canUse ? Color.Green : Color.Red; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).ActiveLinkColor = canUse ? Color.LightGreen : Color.OrangeRed; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).VisitedLinkColor = canUse ? Color.DarkGreen : Color.DarkRed; row.Cells["colCanUse"].Value = canUse; } } @@ -174,6 +182,12 @@ namespace TemuKJD.KJDForms.ProductForms BaseMsgForm.ShowInfo("店铺国际版未登录!"); } break; + case "colLoginStatus": + ShopLoginForm shopLoginForm = new ShopLoginForm(shop); + shopLoginForm.openType = EnumOpenType.login; + shopLoginForm.ShowDialog(); + RefreshShop(); + break; } } diff --git a/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.Designer.cs b/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.Designer.cs index 90812c7..e1ac7d6 100644 --- a/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.Designer.cs +++ b/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.Designer.cs @@ -86,7 +86,7 @@ namespace TemuKJD.KJDForms.ProductForms this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colLoginStatus = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn(); this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ucGroupBoxEx99 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); @@ -567,6 +567,8 @@ namespace TemuKJD.KJDForms.ProductForms // this.ucCheckBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.ucCheckBox1.AutoSize = true; + this.ucCheckBox1.Checked = true; + this.ucCheckBox1.CheckState = System.Windows.Forms.CheckState.Checked; this.ucCheckBox1.Location = new System.Drawing.Point(831, 58); this.ucCheckBox1.Name = "ucCheckBox1"; this.ucCheckBox1.Size = new System.Drawing.Size(87, 21); @@ -936,6 +938,8 @@ namespace TemuKJD.KJDForms.ProductForms this.colLoginStatus.HeaderText = "状态"; this.colLoginStatus.Name = "colLoginStatus"; this.colLoginStatus.ReadOnly = true; + this.colLoginStatus.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colLoginStatus.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; this.colLoginStatus.Width = 38; // // colCanUse @@ -1910,14 +1914,6 @@ namespace TemuKJD.KJDForms.ProductForms private System.Windows.Forms.CheckBox chkIfLessMakeZero; private System.Windows.Forms.Label label18; private UserComponent.UcCheckBox ucCheckBox1; - private UserComponent.UcDataGridViewCheckBoxColumn colSelect; - private System.Windows.Forms.DataGridViewTextBoxColumn colShopLoginName; - private System.Windows.Forms.DataGridViewTextBoxColumn colShopId; - private System.Windows.Forms.DataGridViewTextBoxColumn colShopName; - private System.Windows.Forms.DataGridViewTextBoxColumn colShopNotes; - private System.Windows.Forms.DataGridViewTextBoxColumn colLoginStatus; - private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse; - private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; private System.Windows.Forms.TextBox txtMinQualityScore; private System.Windows.Forms.CheckBox chkMinQualityScore; private System.Windows.Forms.Label label19; @@ -1952,5 +1948,13 @@ namespace TemuKJD.KJDForms.ProductForms private System.Windows.Forms.TextBox txtMaxQualityRate; private System.Windows.Forms.CheckBox chkMaxQualityRate; private System.Windows.Forms.Label label10; + private UserComponent.UcDataGridViewCheckBoxColumn colSelect; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopLoginName; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopId; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopName; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopNotes; + private System.Windows.Forms.DataGridViewLinkColumn colLoginStatus; + private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse; + private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.cs b/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.cs index 3941b91..3e5c2ac 100644 --- a/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.cs +++ b/TEMUKJD/KJDForms/ProductForms/SaleStockUpForm.cs @@ -134,7 +134,11 @@ namespace TemuKJD.KJDForms.ProductForms string.Empty ); row = dgvShop.Rows[id]; - row.Cells["colLoginStatus"].Style.ForeColor = canUse ? Color.Green : Color.Red; + //row.Cells["colLoginStatus"].Style.ForeColor = canUse ? Color.Green : Color.Red; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Green : Color.Red; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).LinkColor = canUse ? Color.Green : Color.Red; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).ActiveLinkColor = canUse ? Color.LightGreen : Color.OrangeRed; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).VisitedLinkColor = canUse ? Color.DarkGreen : Color.DarkRed; } else { @@ -143,7 +147,11 @@ namespace TemuKJD.KJDForms.ProductForms row.Cells["colShopName"].Value = shopEntity.ShopAccount; row.Cells["colShopNotes"].Value = shopEntity.Notes; row.Cells["colLoginStatus"].Value = canUse ? "在线" : "掉线"; - row.Cells["colLoginStatus"].Style.ForeColor = canUse ? Color.Green : Color.Red; + //row.Cells["colLoginStatus"].Style.ForeColor = canUse ? Color.Green : Color.Red; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Green : Color.Red; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).LinkColor = canUse ? Color.Green : Color.Red; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).ActiveLinkColor = canUse ? Color.LightGreen : Color.OrangeRed; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).VisitedLinkColor = canUse ? Color.DarkGreen : Color.DarkRed; row.Cells["colCanUse"].Value = canUse; } } @@ -570,6 +578,12 @@ namespace TemuKJD.KJDForms.ProductForms BaseMsgForm.ShowInfo("店铺未登录!"); } break; + case "colLoginStatus": + ShopLoginForm shopLoginForm = new ShopLoginForm(shop); + shopLoginForm.openType = EnumOpenType.login; + shopLoginForm.ShowDialog(); + RefreshShop(); + break; } } diff --git a/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.Designer.cs b/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.Designer.cs index 564c337..24c005b 100644 --- a/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.Designer.cs +++ b/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.Designer.cs @@ -38,18 +38,17 @@ namespace TemuKJD.KJDForms.SalesCenterForms System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MarketingActivityForm)); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx(); + this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); + this.chkGetDiscount = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.btnSearchActivity = new DevComponents.DotNetBar.PanelEx(); this.ucGroupBoxEx3 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); - this.chkSoloActivityProduct = new TemuKJD.UserComponent.UcCheckBox(this.components); - this.chkIfLowCancel = new TemuKJD.UserComponent.UcCheckBox(this.components); - this.actDiscount80 = new TemuKJD.KJDForms.SalesCenterForms.UcActivityDiscountCtrl(); - this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f = new TemuKJD.UserComponent.UcCheckBox(this.components); - this.ucCheckBox2 = new TemuKJD.UserComponent.UcCheckBox(this.components); - this.ucCheckBox3 = new TemuKJD.UserComponent.UcCheckBox(this.components); this.actDiscount85 = new TemuKJD.KJDForms.SalesCenterForms.UcActivityDiscountCtrl(); - this.object_5db00808_c6be_4ffa_a702_9b91e2208933 = new TemuKJD.UserComponent.UcCheckBox(this.components); - this.ucCheckBox1 = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.actDiscount80 = new TemuKJD.KJDForms.SalesCenterForms.UcActivityDiscountCtrl(); + this.label6 = new System.Windows.Forms.Label(); this.actDiscount70 = new TemuKJD.KJDForms.SalesCenterForms.UcActivityDiscountCtrl(); - this.chkDiscount6 = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.chkSoloActivityProduct = new TemuKJD.UserComponent.UcCheckBox(this.components); this.actDiscount60 = new TemuKJD.KJDForms.SalesCenterForms.UcActivityDiscountCtrl(); this.panelEx2 = new DevComponents.DotNetBar.PanelEx(); this.chkFullShop = new TemuKJD.UserComponent.UcCheckBox(this.components); @@ -64,23 +63,12 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.numOnSaleDays = new System.Windows.Forms.NumericUpDown(); this.label1 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); - this.ucGroupBoxEx1 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); - this.btnRefreshShop = new DevComponents.DotNetBar.PanelEx(); - this.ucGroupBoxEx2 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); - this.chkGetDiscount = new TemuKJD.UserComponent.UcCheckBox(this.components); - this.btnSearchActivity = 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 TemuKJD.UserComponent.UcDataGridViewCheckBoxColumn(this.components); - this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colLoginStatus = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn(); - this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.splitContainer5 = new System.Windows.Forms.SplitContainer(); + this.actDiscountLess60 = new TemuKJD.KJDForms.SalesCenterForms.UcActivityDiscountCtrl(); + this.chkIfLowCancel = new TemuKJD.UserComponent.UcCheckBox(this.components); this.dgvActivity = new TemuKJD.UserComponent.DataGridViewEx(); this.colCheckActivity = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.colActivityType = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -89,6 +77,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.colActivityThematicName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colActivityTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colSignUpTime = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colDiscountTenth = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colDiscount = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.colActivityMsg = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dgvProduct = new TemuKJD.UserComponent.DataGridViewEx(); @@ -113,20 +102,25 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); this.btnClear = new DevComponents.DotNetBar.PanelEx(); this.panel1 = new System.Windows.Forms.Panel(); + this.colSelect = new TemuKJD.UserComponent.UcDataGridViewCheckBoxColumn(this.components); + this.colShopLoginName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShopNotes = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colLoginStatus = new System.Windows.Forms.DataGridViewLinkColumn(); + this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.SuspendLayout(); + this.ucGroupBoxEx1.SuspendLayout(); + this.ucGroupBoxEx2.SuspendLayout(); this.ucGroupBoxEx3.SuspendLayout(); - this.actDiscount80.SuspendLayout(); - this.actDiscount85.SuspendLayout(); - this.actDiscount70.SuspendLayout(); this.panel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numOnSaleDays2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numSaleCount)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numOnSaleDays)).BeginInit(); - this.ucGroupBoxEx1.SuspendLayout(); - this.ucGroupBoxEx2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit(); this.splitContainer3.Panel1.SuspendLayout(); this.splitContainer3.Panel2.SuspendLayout(); @@ -159,9 +153,9 @@ namespace TemuKJD.KJDForms.SalesCenterForms // // splitContainer1.Panel1 // - this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx3); this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx1); this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx2); + this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx3); // // splitContainer1.Panel2 // @@ -170,6 +164,96 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.splitContainer1.SplitterDistance = 120; this.splitContainer1.TabIndex = 11; // + // 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); + // + // 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.chkGetDiscount); + this.ucGroupBoxEx2.Controls.Add(this.btnSearchActivity); + this.ucGroupBoxEx2.Location = new System.Drawing.Point(147, 2); + this.ucGroupBoxEx2.Name = "ucGroupBoxEx2"; + this.ucGroupBoxEx2.Size = new System.Drawing.Size(135, 120); + this.ucGroupBoxEx2.TabIndex = 469; + this.ucGroupBoxEx2.TabStop = false; + this.ucGroupBoxEx2.Text = "查询活动"; + // + // chkGetDiscount + // + this.chkGetDiscount.AutoSize = true; + this.chkGetDiscount.Checked = true; + this.chkGetDiscount.CheckState = System.Windows.Forms.CheckState.Checked; + this.chkGetDiscount.Location = new System.Drawing.Point(20, 68); + this.chkGetDiscount.Name = "chkGetDiscount"; + this.chkGetDiscount.Size = new System.Drawing.Size(99, 38); + this.chkGetDiscount.TabIndex = 0; + this.chkGetDiscount.Text = "同时查询折扣\r\n (较耗时)"; + this.chkGetDiscount.UseVisualStyleBackColor = true; + // + // btnSearchActivity + // + this.btnSearchActivity.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.btnSearchActivity.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnSearchActivity.DisabledBackColor = System.Drawing.Color.Empty; + this.btnSearchActivity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSearchActivity.Location = new System.Drawing.Point(30, 32); + this.btnSearchActivity.Name = "btnSearchActivity"; + this.btnSearchActivity.Size = new System.Drawing.Size(70, 23); + this.btnSearchActivity.Style.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearchActivity.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearchActivity.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); + this.btnSearchActivity.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.btnSearchActivity.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + this.btnSearchActivity.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; + this.btnSearchActivity.Style.ForeColor.Color = System.Drawing.Color.White; + this.btnSearchActivity.Style.GradientAngle = 90; + this.btnSearchActivity.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; + this.btnSearchActivity.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearchActivity.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); + this.btnSearchActivity.TabIndex = 427; + this.btnSearchActivity.Text = "查询活动"; + this.btnSearchActivity.Click += new System.EventHandler(this.btnSearchActivity_Click); + // // ucGroupBoxEx3 // this.ucGroupBoxEx3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) @@ -177,11 +261,11 @@ namespace TemuKJD.KJDForms.SalesCenterForms | System.Windows.Forms.AnchorStyles.Right))); this.ucGroupBoxEx3.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.ucGroupBoxEx3.BorderStyle = TemuKJD.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND; - this.ucGroupBoxEx3.Controls.Add(this.chkSoloActivityProduct); - this.ucGroupBoxEx3.Controls.Add(this.chkIfLowCancel); - this.ucGroupBoxEx3.Controls.Add(this.actDiscount80); this.ucGroupBoxEx3.Controls.Add(this.actDiscount85); + this.ucGroupBoxEx3.Controls.Add(this.actDiscount80); + this.ucGroupBoxEx3.Controls.Add(this.label6); this.ucGroupBoxEx3.Controls.Add(this.actDiscount70); + this.ucGroupBoxEx3.Controls.Add(this.chkSoloActivityProduct); this.ucGroupBoxEx3.Controls.Add(this.actDiscount60); this.ucGroupBoxEx3.Controls.Add(this.panelEx2); this.ucGroupBoxEx3.Controls.Add(this.chkFullShop); @@ -194,12 +278,66 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.ucGroupBoxEx3.TabStop = false; this.ucGroupBoxEx3.Text = "活动设置"; // + // actDiscount85 + // + this.actDiscount85.AutoSize = true; + this.actDiscount85.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.actDiscount85.Discount = 85; + this.actDiscount85.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.actDiscount85.Inventory = 10; + this.actDiscount85.IsDefaultInventory = false; + this.actDiscount85.IsLess = false; + this.actDiscount85.Location = new System.Drawing.Point(361, 85); + this.actDiscount85.Name = "actDiscount85"; + this.actDiscount85.Size = new System.Drawing.Size(322, 23); + this.actDiscount85.TabIndex = 740; + // + // actDiscount80 + // + this.actDiscount80.AutoSize = true; + this.actDiscount80.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.actDiscount80.Discount = 80; + this.actDiscount80.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.actDiscount80.Inventory = 10; + this.actDiscount80.IsDefaultInventory = false; + this.actDiscount80.IsLess = false; + this.actDiscount80.Location = new System.Drawing.Point(18, 85); + this.actDiscount80.Name = "actDiscount80"; + this.actDiscount80.Size = new System.Drawing.Size(322, 23); + this.actDiscount80.TabIndex = 739; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Font = new System.Drawing.Font("微软雅黑", 8.5F); + this.label6.ForeColor = System.Drawing.Color.Gray; + this.label6.Location = new System.Drawing.Point(689, 58); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(320, 51); + this.label6.TabIndex = 741; + this.label6.Text = "说明:报名6折活动为6-7折(不含7折)及6折以下所有活动,\r\n   报名85折活动为85折以上所有活动,其他选项均为\r\n   当前折扣挡位到下一挡位(不含)的所" + + "有活动。"; + // + // actDiscount70 + // + this.actDiscount70.AutoSize = true; + this.actDiscount70.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.actDiscount70.Discount = 70; + this.actDiscount70.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.actDiscount70.Inventory = 10; + this.actDiscount70.IsDefaultInventory = false; + this.actDiscount70.IsLess = false; + this.actDiscount70.Location = new System.Drawing.Point(361, 55); + this.actDiscount70.Name = "actDiscount70"; + this.actDiscount70.Size = new System.Drawing.Size(322, 23); + this.actDiscount70.TabIndex = 735; + // // chkSoloActivityProduct // this.chkSoloActivityProduct.AutoSize = true; this.chkSoloActivityProduct.Checked = true; this.chkSoloActivityProduct.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkSoloActivityProduct.Location = new System.Drawing.Point(774, 27); + this.chkSoloActivityProduct.Location = new System.Drawing.Point(713, 25); this.chkSoloActivityProduct.Name = "chkSoloActivityProduct"; this.chkSoloActivityProduct.Size = new System.Drawing.Size(99, 21); this.chkSoloActivityProduct.TabIndex = 727; @@ -207,130 +345,18 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.chkSoloActivityProduct.UseVisualStyleBackColor = true; this.chkSoloActivityProduct.Visible = false; // - // chkIfLowCancel - // - this.chkIfLowCancel.AutoSize = true; - this.chkIfLowCancel.Location = new System.Drawing.Point(653, 84); - this.chkIfLowCancel.Name = "chkIfLowCancel"; - this.chkIfLowCancel.Size = new System.Drawing.Size(207, 21); - this.chkIfLowCancel.TabIndex = 723; - this.chkIfLowCancel.Text = "设置库存低于最低库存不报名活动"; - this.chkIfLowCancel.UseVisualStyleBackColor = true; - this.chkIfLowCancel.Visible = false; - // - // actDiscount80 - // - this.actDiscount80.AutoSize = true; - this.actDiscount80.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.actDiscount80.Controls.Add(this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f); - this.actDiscount80.Controls.Add(this.ucCheckBox2); - this.actDiscount80.Controls.Add(this.ucCheckBox3); - this.actDiscount80.Discount = 80; - this.actDiscount80.Inventory = 10; - this.actDiscount80.IsDefaultInventory = false; - this.actDiscount80.Location = new System.Drawing.Point(15, 82); - this.actDiscount80.Name = "actDiscount80"; - this.actDiscount80.Size = new System.Drawing.Size(303, 26); - this.actDiscount80.TabIndex = 715; - // - // object_6dcc57fe_428d_475c_90c2_d99d71a7014f - // - this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.AutoSize = true; - this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.Location = new System.Drawing.Point(180, 2); - this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.Margin = new System.Windows.Forms.Padding(0); - this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.Name = "object_6dcc57fe_428d_475c_90c2_d99d71a7014f"; - this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.Size = new System.Drawing.Size(123, 21); - this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.TabIndex = 706; - this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.Text = "平台推荐最低库存"; - this.object_6dcc57fe_428d_475c_90c2_d99d71a7014f.UseVisualStyleBackColor = true; - // - // ucCheckBox2 - // - this.ucCheckBox2.AutoSize = true; - this.ucCheckBox2.Location = new System.Drawing.Point(198, 2); - this.ucCheckBox2.Name = "ucCheckBox2"; - this.ucCheckBox2.Size = new System.Drawing.Size(51, 21); - this.ucCheckBox2.TabIndex = 706; - this.ucCheckBox2.Text = "默认"; - this.ucCheckBox2.UseVisualStyleBackColor = true; - // - // ucCheckBox3 - // - this.ucCheckBox3.AutoSize = true; - this.ucCheckBox3.Location = new System.Drawing.Point(198, 2); - this.ucCheckBox3.Name = "ucCheckBox3"; - this.ucCheckBox3.Size = new System.Drawing.Size(51, 21); - this.ucCheckBox3.TabIndex = 706; - this.ucCheckBox3.Text = "默认"; - this.ucCheckBox3.UseVisualStyleBackColor = true; - // - // actDiscount85 - // - this.actDiscount85.AutoSize = true; - this.actDiscount85.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.actDiscount85.Controls.Add(this.object_5db00808_c6be_4ffa_a702_9b91e2208933); - this.actDiscount85.Controls.Add(this.ucCheckBox1); - this.actDiscount85.Discount = 85; - this.actDiscount85.Inventory = 10; - this.actDiscount85.IsDefaultInventory = false; - this.actDiscount85.Location = new System.Drawing.Point(329, 82); - this.actDiscount85.Name = "actDiscount85"; - this.actDiscount85.Size = new System.Drawing.Size(306, 26); - this.actDiscount85.TabIndex = 711; - // - // object_5db00808_c6be_4ffa_a702_9b91e2208933 - // - this.object_5db00808_c6be_4ffa_a702_9b91e2208933.AutoSize = true; - this.object_5db00808_c6be_4ffa_a702_9b91e2208933.Location = new System.Drawing.Point(180, 2); - this.object_5db00808_c6be_4ffa_a702_9b91e2208933.Name = "object_5db00808_c6be_4ffa_a702_9b91e2208933"; - this.object_5db00808_c6be_4ffa_a702_9b91e2208933.Size = new System.Drawing.Size(123, 21); - this.object_5db00808_c6be_4ffa_a702_9b91e2208933.TabIndex = 706; - this.object_5db00808_c6be_4ffa_a702_9b91e2208933.Text = "平台推荐最低库存"; - this.object_5db00808_c6be_4ffa_a702_9b91e2208933.UseVisualStyleBackColor = true; - // - // ucCheckBox1 - // - this.ucCheckBox1.AutoSize = true; - this.ucCheckBox1.Location = new System.Drawing.Point(198, 2); - this.ucCheckBox1.Name = "ucCheckBox1"; - this.ucCheckBox1.Size = new System.Drawing.Size(51, 21); - this.ucCheckBox1.TabIndex = 706; - this.ucCheckBox1.Text = "默认"; - this.ucCheckBox1.UseVisualStyleBackColor = true; - // - // actDiscount70 - // - this.actDiscount70.AutoSize = true; - this.actDiscount70.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.actDiscount70.Controls.Add(this.chkDiscount6); - this.actDiscount70.Discount = 70; - this.actDiscount70.Inventory = 10; - this.actDiscount70.IsDefaultInventory = false; - this.actDiscount70.Location = new System.Drawing.Point(329, 54); - this.actDiscount70.Name = "actDiscount70"; - this.actDiscount70.Size = new System.Drawing.Size(306, 26); - this.actDiscount70.TabIndex = 710; - // - // chkDiscount6 - // - this.chkDiscount6.AutoSize = true; - this.chkDiscount6.Location = new System.Drawing.Point(180, 2); - this.chkDiscount6.Name = "chkDiscount6"; - this.chkDiscount6.Size = new System.Drawing.Size(123, 21); - this.chkDiscount6.TabIndex = 706; - this.chkDiscount6.Text = "平台推荐最低库存"; - this.chkDiscount6.UseVisualStyleBackColor = true; - // // actDiscount60 // this.actDiscount60.AutoSize = true; this.actDiscount60.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.actDiscount60.Discount = 60; + this.actDiscount60.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.actDiscount60.Inventory = 10; this.actDiscount60.IsDefaultInventory = false; - this.actDiscount60.Location = new System.Drawing.Point(15, 54); + this.actDiscount60.IsLess = false; + this.actDiscount60.Location = new System.Drawing.Point(18, 55); this.actDiscount60.Name = "actDiscount60"; - this.actDiscount60.Size = new System.Drawing.Size(303, 23); + this.actDiscount60.Size = new System.Drawing.Size(322, 23); this.actDiscount60.TabIndex = 709; // // panelEx2 @@ -340,7 +366,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.panelEx2.Cursor = System.Windows.Forms.Cursors.Hand; this.panelEx2.DisabledBackColor = System.Drawing.Color.Empty; this.panelEx2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.panelEx2.Location = new System.Drawing.Point(1024, 32); + this.panelEx2.Location = new System.Drawing.Point(1024, 26); this.panelEx2.Name = "panelEx2"; this.panelEx2.Size = new System.Drawing.Size(70, 23); this.panelEx2.Style.Alignment = System.Drawing.StringAlignment.Center; @@ -395,7 +421,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.panel2.Controls.Add(this.label5); this.panel2.Location = new System.Drawing.Point(223, 24); this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(545, 26); + this.panel2.Size = new System.Drawing.Size(484, 26); this.panel2.TabIndex = 722; this.panel2.Visible = false; // @@ -498,96 +524,6 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.label5.TabIndex = 731; this.label5.Text = "至"; // - // 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); - // - // 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.chkGetDiscount); - this.ucGroupBoxEx2.Controls.Add(this.btnSearchActivity); - this.ucGroupBoxEx2.Location = new System.Drawing.Point(147, 2); - this.ucGroupBoxEx2.Name = "ucGroupBoxEx2"; - this.ucGroupBoxEx2.Size = new System.Drawing.Size(135, 120); - this.ucGroupBoxEx2.TabIndex = 469; - this.ucGroupBoxEx2.TabStop = false; - this.ucGroupBoxEx2.Text = "查询活动"; - // - // chkGetDiscount - // - this.chkGetDiscount.AutoSize = true; - this.chkGetDiscount.Checked = true; - this.chkGetDiscount.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkGetDiscount.Location = new System.Drawing.Point(20, 68); - this.chkGetDiscount.Name = "chkGetDiscount"; - this.chkGetDiscount.Size = new System.Drawing.Size(99, 38); - this.chkGetDiscount.TabIndex = 0; - this.chkGetDiscount.Text = "同时查询折扣\r\n (较耗时)"; - this.chkGetDiscount.UseVisualStyleBackColor = true; - // - // btnSearchActivity - // - this.btnSearchActivity.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnSearchActivity.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnSearchActivity.DisabledBackColor = System.Drawing.Color.Empty; - this.btnSearchActivity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSearchActivity.Location = new System.Drawing.Point(30, 32); - this.btnSearchActivity.Name = "btnSearchActivity"; - this.btnSearchActivity.Size = new System.Drawing.Size(70, 23); - this.btnSearchActivity.Style.Alignment = System.Drawing.StringAlignment.Center; - this.btnSearchActivity.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnSearchActivity.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); - this.btnSearchActivity.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.btnSearchActivity.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash; - this.btnSearchActivity.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None; - this.btnSearchActivity.Style.ForeColor.Color = System.Drawing.Color.White; - this.btnSearchActivity.Style.GradientAngle = 90; - this.btnSearchActivity.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center; - this.btnSearchActivity.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnSearchActivity.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255))))); - this.btnSearchActivity.TabIndex = 427; - this.btnSearchActivity.Text = "查询活动"; - this.btnSearchActivity.Click += new System.EventHandler(this.btnSearchActivity_Click); - // // splitContainer3 // this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; @@ -664,70 +600,6 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.dgvShop.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellClick); this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick); // - // colSelect - // - this.colSelect.HeaderText = "全选"; - this.colSelect.Name = "colSelect"; - this.colSelect.ReadOnly = true; - this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.colSelect.Width = 28; - // - // colShopLoginName - // - this.colShopLoginName.HeaderText = "店铺登录名"; - this.colShopLoginName.Name = "colShopLoginName"; - this.colShopLoginName.ReadOnly = true; - this.colShopLoginName.Visible = false; - // - // colShopId - // - this.colShopId.HeaderText = "店铺Id"; - this.colShopId.Name = "colShopId"; - this.colShopId.ReadOnly = true; - this.colShopId.Visible = false; - this.colShopId.Width = 55; - // - // colShopName - // - this.colShopName.FillWeight = 150F; - this.colShopName.HeaderText = "店铺名"; - this.colShopName.Name = "colShopName"; - this.colShopName.ReadOnly = true; - this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colShopName.Width = 70; - // - // colShopNotes - // - this.colShopNotes.HeaderText = "分组"; - this.colShopNotes.Name = "colShopNotes"; - this.colShopNotes.ReadOnly = true; - this.colShopNotes.Width = 70; - // - // colLoginStatus - // - this.colLoginStatus.HeaderText = "状态"; - this.colLoginStatus.Name = "colLoginStatus"; - this.colLoginStatus.ReadOnly = true; - this.colLoginStatus.Width = 38; - // - // colCanUse - // - this.colCanUse.HeaderText = "可用"; - this.colCanUse.Name = "colCanUse"; - this.colCanUse.ReadOnly = true; - this.colCanUse.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colCanUse.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.colCanUse.Visible = false; - this.colCanUse.Width = 28; - // - // colMessage - // - this.colMessage.HeaderText = "消息"; - this.colMessage.Name = "colMessage"; - this.colMessage.ReadOnly = true; - this.colMessage.Width = 120; - // // splitContainer5 // this.splitContainer5.Dock = System.Windows.Forms.DockStyle.Fill; @@ -737,6 +609,8 @@ namespace TemuKJD.KJDForms.SalesCenterForms // // splitContainer5.Panel1 // + this.splitContainer5.Panel1.Controls.Add(this.actDiscountLess60); + this.splitContainer5.Panel1.Controls.Add(this.chkIfLowCancel); this.splitContainer5.Panel1.Controls.Add(this.dgvActivity); // // splitContainer5.Panel2 @@ -746,6 +620,32 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.splitContainer5.SplitterDistance = 169; this.splitContainer5.TabIndex = 0; // + // actDiscountLess60 + // + this.actDiscountLess60.AutoSize = true; + this.actDiscountLess60.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.actDiscountLess60.Discount = 60; + this.actDiscountLess60.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.actDiscountLess60.Inventory = 10; + this.actDiscountLess60.IsDefaultInventory = false; + this.actDiscountLess60.IsLess = true; + this.actDiscountLess60.Location = new System.Drawing.Point(772, 40); + this.actDiscountLess60.Name = "actDiscountLess60"; + this.actDiscountLess60.Size = new System.Drawing.Size(322, 23); + this.actDiscountLess60.TabIndex = 731; + this.actDiscountLess60.Visible = false; + // + // chkIfLowCancel + // + this.chkIfLowCancel.AutoSize = true; + this.chkIfLowCancel.Location = new System.Drawing.Point(772, 69); + this.chkIfLowCancel.Name = "chkIfLowCancel"; + this.chkIfLowCancel.Size = new System.Drawing.Size(207, 21); + this.chkIfLowCancel.TabIndex = 723; + this.chkIfLowCancel.Text = "设置库存低于最低库存不报名活动"; + this.chkIfLowCancel.UseVisualStyleBackColor = true; + this.chkIfLowCancel.Visible = false; + // // dgvActivity // this.dgvActivity.AllowUserToAddRows = false; @@ -772,6 +672,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.colActivityThematicName, this.colActivityTime, this.colSignUpTime, + this.colDiscountTenth, this.colDiscount, this.colActivityMsg}); this.dgvActivity.Dock = System.Windows.Forms.DockStyle.Fill; @@ -833,6 +734,13 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.colSignUpTime.Name = "colSignUpTime"; this.colSignUpTime.ReadOnly = true; // + // colDiscountTenth + // + this.colDiscountTenth.HeaderText = "折扣数字"; + this.colDiscountTenth.Name = "colDiscountTenth"; + this.colDiscountTenth.ReadOnly = true; + this.colDiscountTenth.Visible = false; + // // colDiscount // this.colDiscount.FillWeight = 50F; @@ -1098,6 +1006,72 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.panel1.Size = new System.Drawing.Size(1398, 566); this.panel1.TabIndex = 12; // + // colSelect + // + this.colSelect.HeaderText = "全选"; + this.colSelect.Name = "colSelect"; + this.colSelect.ReadOnly = true; + this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colSelect.Width = 28; + // + // colShopLoginName + // + this.colShopLoginName.HeaderText = "店铺登录名"; + this.colShopLoginName.Name = "colShopLoginName"; + this.colShopLoginName.ReadOnly = true; + this.colShopLoginName.Visible = false; + // + // colShopId + // + this.colShopId.HeaderText = "店铺Id"; + this.colShopId.Name = "colShopId"; + this.colShopId.ReadOnly = true; + this.colShopId.Visible = false; + this.colShopId.Width = 55; + // + // colShopName + // + this.colShopName.FillWeight = 150F; + this.colShopName.HeaderText = "店铺名"; + this.colShopName.Name = "colShopName"; + this.colShopName.ReadOnly = true; + this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colShopName.Width = 70; + // + // colShopNotes + // + this.colShopNotes.HeaderText = "分组"; + this.colShopNotes.Name = "colShopNotes"; + this.colShopNotes.ReadOnly = true; + this.colShopNotes.Width = 70; + // + // colLoginStatus + // + this.colLoginStatus.HeaderText = "状态"; + this.colLoginStatus.Name = "colLoginStatus"; + this.colLoginStatus.ReadOnly = true; + this.colLoginStatus.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colLoginStatus.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colLoginStatus.Width = 38; + // + // colCanUse + // + this.colCanUse.HeaderText = "可用"; + this.colCanUse.Name = "colCanUse"; + this.colCanUse.ReadOnly = true; + this.colCanUse.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colCanUse.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.colCanUse.Visible = false; + this.colCanUse.Width = 28; + // + // colMessage + // + this.colMessage.HeaderText = "消息"; + this.colMessage.Name = "colMessage"; + this.colMessage.ReadOnly = true; + this.colMessage.Width = 120; + // // MarketingActivityForm // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -1118,22 +1092,16 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.splitContainer1.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); this.splitContainer1.ResumeLayout(false); + this.ucGroupBoxEx1.ResumeLayout(false); + this.ucGroupBoxEx2.ResumeLayout(false); + this.ucGroupBoxEx2.PerformLayout(); this.ucGroupBoxEx3.ResumeLayout(false); this.ucGroupBoxEx3.PerformLayout(); - this.actDiscount80.ResumeLayout(false); - this.actDiscount80.PerformLayout(); - this.actDiscount85.ResumeLayout(false); - this.actDiscount85.PerformLayout(); - this.actDiscount70.ResumeLayout(false); - this.actDiscount70.PerformLayout(); this.panel2.ResumeLayout(false); this.panel2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.numOnSaleDays2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numSaleCount)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numOnSaleDays)).EndInit(); - this.ucGroupBoxEx1.ResumeLayout(false); - this.ucGroupBoxEx2.ResumeLayout(false); - this.ucGroupBoxEx2.PerformLayout(); this.splitContainer3.Panel1.ResumeLayout(false); this.splitContainer3.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit(); @@ -1144,6 +1112,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.splitContainer2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit(); this.splitContainer5.Panel1.ResumeLayout(false); + this.splitContainer5.Panel1.PerformLayout(); this.splitContainer5.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.splitContainer5)).EndInit(); this.splitContainer5.ResumeLayout(false); @@ -1180,16 +1149,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms private UserComponent.DataGridViewEx dgvActivity; private UserComponent.UcCheckBox chkGetDiscount; private DevComponents.DotNetBar.PanelEx panelEx2; - private UcActivityDiscountCtrl actDiscount85; - private UserComponent.UcCheckBox object_5db00808_c6be_4ffa_a702_9b91e2208933; - private UserComponent.UcCheckBox ucCheckBox1; - private UcActivityDiscountCtrl actDiscount70; - private UserComponent.UcCheckBox chkDiscount6; private UcActivityDiscountCtrl actDiscount60; - private UcActivityDiscountCtrl actDiscount80; - private UserComponent.UcCheckBox object_6dcc57fe_428d_475c_90c2_d99d71a7014f; - private UserComponent.UcCheckBox ucCheckBox2; - private UserComponent.UcCheckBox ucCheckBox3; private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Label label2; private System.Windows.Forms.NumericUpDown numOnSaleDays; @@ -1198,23 +1158,6 @@ namespace TemuKJD.KJDForms.SalesCenterForms private System.Windows.Forms.Label label3; private System.Windows.Forms.ComboBox cmbDays; private System.Windows.Forms.Label label4; - private System.Windows.Forms.DataGridViewCheckBoxColumn colCheckActivity; - private System.Windows.Forms.DataGridViewTextBoxColumn colActivityType; - private System.Windows.Forms.DataGridViewTextBoxColumn colActivityTypeName; - private System.Windows.Forms.DataGridViewTextBoxColumn colActivityThematicId; - private System.Windows.Forms.DataGridViewTextBoxColumn colActivityThematicName; - private System.Windows.Forms.DataGridViewTextBoxColumn colActivityTime; - private System.Windows.Forms.DataGridViewTextBoxColumn colSignUpTime; - private System.Windows.Forms.DataGridViewTextBoxColumn colDiscount; - private System.Windows.Forms.DataGridViewTextBoxColumn colActivityMsg; - private UserComponent.UcDataGridViewCheckBoxColumn colSelect; - private System.Windows.Forms.DataGridViewTextBoxColumn colShopLoginName; - private System.Windows.Forms.DataGridViewTextBoxColumn colShopId; - private System.Windows.Forms.DataGridViewTextBoxColumn colShopName; - private System.Windows.Forms.DataGridViewTextBoxColumn colShopNotes; - private System.Windows.Forms.DataGridViewTextBoxColumn colLoginStatus; - private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse; - private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; private System.Windows.Forms.DataGridViewCheckBoxColumn colCheckProduct; private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierId; private System.Windows.Forms.DataGridViewTextBoxColumn colSupplierName; @@ -1236,5 +1179,28 @@ namespace TemuKJD.KJDForms.SalesCenterForms private System.Windows.Forms.Label label5; private System.Windows.Forms.Panel panel1; private UserComponent.UcCheckBox chkSoloActivityProduct; + private UcActivityDiscountCtrl actDiscountLess60; + private UcActivityDiscountCtrl actDiscount70; + private UcActivityDiscountCtrl actDiscount85; + private UcActivityDiscountCtrl actDiscount80; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.DataGridViewCheckBoxColumn colCheckActivity; + private System.Windows.Forms.DataGridViewTextBoxColumn colActivityType; + private System.Windows.Forms.DataGridViewTextBoxColumn colActivityTypeName; + private System.Windows.Forms.DataGridViewTextBoxColumn colActivityThematicId; + private System.Windows.Forms.DataGridViewTextBoxColumn colActivityThematicName; + private System.Windows.Forms.DataGridViewTextBoxColumn colActivityTime; + private System.Windows.Forms.DataGridViewTextBoxColumn colSignUpTime; + private System.Windows.Forms.DataGridViewTextBoxColumn colDiscountTenth; + private System.Windows.Forms.DataGridViewTextBoxColumn colDiscount; + private System.Windows.Forms.DataGridViewTextBoxColumn colActivityMsg; + private UserComponent.UcDataGridViewCheckBoxColumn colSelect; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopLoginName; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopId; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopName; + private System.Windows.Forms.DataGridViewTextBoxColumn colShopNotes; + private System.Windows.Forms.DataGridViewLinkColumn colLoginStatus; + private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse; + private System.Windows.Forms.DataGridViewTextBoxColumn colMessage; } } \ No newline at end of file diff --git a/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.cs b/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.cs index e85f6c4..12a3dbe 100644 --- a/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.cs +++ b/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.cs @@ -83,6 +83,47 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.dgvActivity.AddSelectorColumn("colCheckActivity"); this.dgvProduct.AddSelectorColumn("colCheckProduct"); + + this.actDiscount60.chkSignActivity.CheckedChanged += ChkSignActivity_CheckedChanged; + this.actDiscount70.chkSignActivity.CheckedChanged += ChkSignActivity_CheckedChanged; + this.actDiscount80.chkSignActivity.CheckedChanged += ChkSignActivity_CheckedChanged; + this.actDiscount85.chkSignActivity.CheckedChanged += ChkSignActivity_CheckedChanged; + } + + private void ChkSignActivity_CheckedChanged(object sender, EventArgs e) + { + foreach(DataGridViewRow row in dgvActivity.Rows) + { + SetRowCheck(row); + } + } + + void SetRowCheck(DataGridViewRow row) + { + try + { + if (row.Cells["colDiscountTenth"].Value.ParseToInt() > 0) + { + int discount = this.GetNearDiscount(row.Cells["colDiscountTenth"].Value.ParseToInt()); + var discountCtrl = this.actDiscount60; + if (discount == 70) + discountCtrl = this.actDiscount70; + if (discount == 80) + discountCtrl = this.actDiscount80; + if (discount == 85) + discountCtrl = this.actDiscount85; + + row.Cells["colCheckActivity"].Value = discountCtrl.chkSignActivity.Checked; + } + else + { + row.Cells["colCheckActivity"].Value = false; + } + } + catch (Exception ex) + { + BaseMsgForm.ShowError("选择活动失败" + ex.Message); + } } private void chkSelectAll_CheckedChanged(object sender, EventArgs e) @@ -159,7 +200,11 @@ namespace TemuKJD.KJDForms.SalesCenterForms string.Empty ); row = dgvShop.Rows[id]; - row.Cells["colLoginStatus"].Style.ForeColor = canUse ? Color.Green : Color.Red; + //row.Cells["colLoginStatus"].Style.ForeColor = canUse ? Color.Green : Color.Red; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Green : Color.Red; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).LinkColor = canUse ? Color.Green : Color.Red; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).ActiveLinkColor = canUse ? Color.LightGreen : Color.OrangeRed; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).VisitedLinkColor = canUse ? Color.DarkGreen : Color.DarkRed; } else { @@ -168,7 +213,11 @@ namespace TemuKJD.KJDForms.SalesCenterForms row.Cells["colShopName"].Value = shopEntity.ShopAccount; row.Cells["colShopNotes"].Value = shopEntity.Notes; row.Cells["colLoginStatus"].Value = canUse ? "在线" : "掉线"; - row.Cells["colLoginStatus"].Style.ForeColor = canUse ? Color.Green : Color.Red; + //row.Cells["colLoginStatus"].Style.ForeColor = canUse ? Color.Green : Color.Red; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Green : Color.Red; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).LinkColor = canUse ? Color.Green : Color.Red; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).ActiveLinkColor = canUse ? Color.LightGreen : Color.OrangeRed; + (row.Cells["colLoginStatus"] as DataGridViewLinkCell).VisitedLinkColor = canUse ? Color.DarkGreen : Color.DarkRed; row.Cells["colCanUse"].Value = canUse; } if (soloActivityShop != null && row != null) @@ -233,6 +282,12 @@ namespace TemuKJD.KJDForms.SalesCenterForms BaseMsgForm.ShowInfo("店铺国际版未登录!"); } break; + case "colLoginStatus": + ShopLoginForm shopLoginForm = new ShopLoginForm(shop); + shopLoginForm.openType = EnumOpenType.login; + shopLoginForm.ShowDialog(); + RefreshShop(); + break; } } @@ -515,6 +570,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms actInfo.activityThematicName, sActivityTime, sActivityRemaining, + actInfo.discount, string.IsNullOrEmpty(actInfo.discount)? "-" : actInfo.discount.TrimEnd('0') + "折" ); @@ -526,6 +582,9 @@ namespace TemuKJD.KJDForms.SalesCenterForms if(chkGetDiscount.Checked) GetDiscount(); + //设置当前快捷选中的活动 + ChkSignActivity_CheckedChanged(null, null); + Invoke(new Action(() => { ucGroupBoxEx2.Enabled = true; diff --git a/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.resx b/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.resx index 088422a..87107c4 100644 --- a/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.resx +++ b/TEMUKJD/KJDForms/SalesCenterForms/MarketingActivityForm.resx @@ -159,6 +159,9 @@ True + + True + True diff --git a/TEMUKJD/KJDForms/SalesCenterForms/UcActivityDiscountCtrl.Designer.cs b/TEMUKJD/KJDForms/SalesCenterForms/UcActivityDiscountCtrl.Designer.cs index 3aac4b0..1df2028 100644 --- a/TEMUKJD/KJDForms/SalesCenterForms/UcActivityDiscountCtrl.Designer.cs +++ b/TEMUKJD/KJDForms/SalesCenterForms/UcActivityDiscountCtrl.Designer.cs @@ -32,13 +32,18 @@ namespace TemuKJD.KJDForms.SalesCenterForms this.components = new System.ComponentModel.Container(); this.numInventory = new System.Windows.Forms.NumericUpDown(); this.chkMinInventory = new TemuKJD.UserComponent.UcCheckBox(this.components); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.chkSignActivity = new TemuKJD.UserComponent.UcCheckBox(this.components); this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.numInventory)).BeginInit(); + this.flowLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // // numInventory // - this.numInventory.Location = new System.Drawing.Point(127, 0); + this.numInventory.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.numInventory.Location = new System.Drawing.Point(150, 0); this.numInventory.Margin = new System.Windows.Forms.Padding(0); this.numInventory.Maximum = new decimal(new int[] { 3000, @@ -46,7 +51,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms 0, 0}); this.numInventory.Name = "numInventory"; - this.numInventory.Size = new System.Drawing.Size(49, 21); + this.numInventory.Size = new System.Drawing.Size(45, 23); this.numInventory.TabIndex = 707; this.numInventory.Value = new decimal(new int[] { 10, @@ -57,37 +62,78 @@ namespace TemuKJD.KJDForms.SalesCenterForms // // chkMinInventory // + this.chkMinInventory.Anchor = System.Windows.Forms.AnchorStyles.Left; this.chkMinInventory.AutoSize = true; - this.chkMinInventory.Location = new System.Drawing.Point(180, 2); - this.chkMinInventory.Margin = new System.Windows.Forms.Padding(0); + this.chkMinInventory.Location = new System.Drawing.Point(199, 1); + this.chkMinInventory.Margin = new System.Windows.Forms.Padding(4, 0, 0, 0); this.chkMinInventory.Name = "chkMinInventory"; - this.chkMinInventory.Size = new System.Drawing.Size(120, 16); + this.chkMinInventory.Size = new System.Drawing.Size(123, 21); this.chkMinInventory.TabIndex = 706; this.chkMinInventory.Text = "平台允许最低库存"; this.chkMinInventory.UseVisualStyleBackColor = true; this.chkMinInventory.CheckedChanged += new System.EventHandler(this.chkDefaultInventory_CheckedChanged); // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.AutoSize = true; + this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flowLayoutPanel1.Controls.Add(this.chkSignActivity); + this.flowLayoutPanel1.Controls.Add(this.label1); + this.flowLayoutPanel1.Controls.Add(this.label2); + this.flowLayoutPanel1.Controls.Add(this.numInventory); + this.flowLayoutPanel1.Controls.Add(this.chkMinInventory); + this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(322, 23); + this.flowLayoutPanel1.TabIndex = 708; + // + // chkSignActivity + // + this.chkSignActivity.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.chkSignActivity.Location = new System.Drawing.Point(0, 1); + this.chkSignActivity.Margin = new System.Windows.Forms.Padding(0); + this.chkSignActivity.Name = "chkSignActivity"; + this.chkSignActivity.Size = new System.Drawing.Size(44, 21); + this.chkSignActivity.TabIndex = 708; + this.chkSignActivity.Text = "报名"; + this.chkSignActivity.UseVisualStyleBackColor = true; + // // label1 // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(0, 4); + this.label1.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.label1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label1.Location = new System.Drawing.Point(44, 1); this.label1.Margin = new System.Windows.Forms.Padding(0); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(125, 12); - this.label1.TabIndex = 705; - this.label1.Text = "设置 6折报名活动库存"; + this.label1.Size = new System.Drawing.Size(26, 20); + this.label1.TabIndex = 709; + this.label1.Text = "70"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label2 + // + this.label2.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(70, 3); + this.label2.Margin = new System.Windows.Forms.Padding(0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(80, 17); + this.label2.TabIndex = 710; + this.label2.Text = "折活动,库存"; // // UcActivityDiscountCtrl // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoSize = true; this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.Controls.Add(this.numInventory); - this.Controls.Add(this.chkMinInventory); - this.Controls.Add(this.label1); + this.Controls.Add(this.flowLayoutPanel1); + this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Name = "UcActivityDiscountCtrl"; - this.Size = new System.Drawing.Size(300, 21); + this.Size = new System.Drawing.Size(322, 23); ((System.ComponentModel.ISupportInitialize)(this.numInventory)).EndInit(); + this.flowLayoutPanel1.ResumeLayout(false); + this.flowLayoutPanel1.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -97,6 +143,9 @@ namespace TemuKJD.KJDForms.SalesCenterForms private System.Windows.Forms.NumericUpDown numInventory; private UserComponent.UcCheckBox chkMinInventory; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + public UserComponent.UcCheckBox chkSignActivity; } } diff --git a/TEMUKJD/KJDForms/SalesCenterForms/UcActivityDiscountCtrl.cs b/TEMUKJD/KJDForms/SalesCenterForms/UcActivityDiscountCtrl.cs index 92f6889..60d5391 100644 --- a/TEMUKJD/KJDForms/SalesCenterForms/UcActivityDiscountCtrl.cs +++ b/TEMUKJD/KJDForms/SalesCenterForms/UcActivityDiscountCtrl.cs @@ -21,9 +21,30 @@ namespace TemuKJD.KJDForms.SalesCenterForms private void UcActivityDiscountCtrl_Load(object sender, EventArgs e) { - this.label1.Text = "设置" + discount.ToString().Trim('0').PadLeft(2, ' ') + "折报名活动库存"; + if (isLess) + label1.Text = "<" + discount.ToString().Trim('0'); + else + label1.Text = discount.ToString().Trim('0').PadLeft(0, ' ').Trim(); } + private bool isLess = false; + /// + /// 折扣数值 + /// + [Description("是否小于折扣"), Category("UserProperty")] + public bool IsLess + { + get + { + return isLess; + } + set + { + isLess = value; + } + } + + private int discount = 90; /// /// 折扣数值 @@ -40,7 +61,10 @@ namespace TemuKJD.KJDForms.SalesCenterForms if (discount != value) { discount = value; - this.label1.Text = "设置" + discount.ToString().Trim('0').PadLeft(2, ' ') + "折报名活动库存"; + if (isLess) + label1.Text = "<" + discount.ToString().Trim('0'); + else + label1.Text = discount.ToString().Trim('0').PadLeft(0, ' ').Trim(); this.Invalidate(); } } @@ -92,7 +116,7 @@ namespace TemuKJD.KJDForms.SalesCenterForms private void chkDefaultInventory_CheckedChanged(object sender, EventArgs e) { - numInventory.Enabled = !chkMinInventory.Checked; + numInventory.Enabled = !chkMinInventory.Checked; } } } diff --git a/TEMUKJD/KJDForms/ShopForms/ShopListForm.cs b/TEMUKJD/KJDForms/ShopForms/ShopListForm.cs index 1eb2c4b..c759bc0 100644 --- a/TEMUKJD/KJDForms/ShopForms/ShopListForm.cs +++ b/TEMUKJD/KJDForms/ShopForms/ShopListForm.cs @@ -676,6 +676,14 @@ namespace TemuKJD.KJDForms.ShopForms return HttpResponseBLL.PostResponse(shop, url, body, refere); } + public static string GetObtainCode(ShopLoginInfo shop) + { + string url = "https://agentseller.temu.com/bg/swift/api/auth/obtainCode"; + string refere = "https://agentseller.temu.com/"; + string body = @"{""redirectUrl"":""https://ads.temu.com/index.html?adAreaOverride=2&source=2&seller_source=11""}"; + return HttpResponseBLL.PostResponse2(shop, url, body, refere); + } + private void ShopListForm_VisibleChanged(object sender, EventArgs e) { if (this.Visible == true) diff --git a/TEMUKJD/KJDForms/ShopForms/ShopLoginForm.cs b/TEMUKJD/KJDForms/ShopForms/ShopLoginForm.cs index 819fa5c..2af57e4 100644 --- a/TEMUKJD/KJDForms/ShopForms/ShopLoginForm.cs +++ b/TEMUKJD/KJDForms/ShopForms/ShopLoginForm.cs @@ -669,7 +669,19 @@ 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();"; + webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sInputValueChange2); + webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sGetElementWithText); + + //扫码登录切换到账号登录 + var switchJsStr = "var clickItem = getElementWithText('账号登录'); " + + "clickItem.click()"; + var switchResponse = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(switchJsStr); + switchResponse.Wait(1000); + Thread.Sleep(Randomx.GetId(300, 800)); + + 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")) { @@ -684,27 +696,28 @@ namespace TemuKJD.KJDForms.ShopForms return; } - webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sInputValueChange2); - webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(sGetElementWithText); - + //输入用户名 jsStr1 = "var usernameId = document.getElementById('usernameId'); " + "changeReactInputValue(usernameId,'" + _account + "');"; response1 = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr1); response1.Wait(1000); Thread.Sleep(Randomx.GetId(500, 1000)); + //输入密码 string jsStr = "var passwordId = document.getElementById('passwordId'); "+ "changeReactInputValue(passwordId,'" + _password + "');"; var response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr); response.Wait(1000); Thread.Sleep(Randomx.GetId(500, 1000)); + //点击阅读并同意框 jsStr = "var clickBox = getElementWithText('我已阅读并同意'); " + "clickBox.click()"; response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr); response.Wait(1000); Thread.Sleep(Randomx.GetId(500, 1000)); + //点击登录 jsStr = "var clickBox = getElementWithText('登录'); " + "clickBox.click()"; response = webBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr);